[Analysis] Introduce a new InstructionCost class


For people who are interested I have posted an initial patch on phabricator to

introduce a new class for the instruction cost:


This follows on from a proposal I posted earlier to the LLVM dev mailing list.

The initial patch doesn’t change all the interfaces in one go, but it does introduce

the class and future patches can migrate more of the code over to use the new


Please feel free to comment on the patch!

Kind Regards,

David Sherwood.