This patch is a preparational stage for introducing a new printing pass and new
functionality to the existing Annotation Writer. Right now, CostAnnotationWriter
deals only with the cost/threshold difference per instruction. I plan to extend
this functionality for this tool to be more useful when looking at the inline
process. This patch deals with several key points:
- Renaming the class inherited from the Annotation Writer to better reflected its future, more generalized purposes : CostAnnotationWriter -> InlineCostAnnotationWriter
- Renaming the flag that enables this annotation to reflect its generalization as well: PrintDebugInstructionDeltas -> PrintInstructionComments
- Instead of storing all the information in the Annotation Writer class, we want to have public API from InlineCostCallAnalyzer class to retrieve information from it. For this purpose, the DenseMap from Instruction to InstructionCostDetail struct is hoisted to the InlineCostCallAnalyzer class and the getter for it is created.
- Some of the tests that used this functionality before were changed appropriately
This patch is the first part of D81016. The second patch will be introducing the printer pass.