[PATCH] D22182: Refactor indirect call promotion profitability analysis (NFC)

Rong Xu via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 11 11:29:33 PDT 2016


xur added inline comments.

================
Comment at: include/llvm/Analysis/IndirectCallPromotionAnalysis.h:60
@@ +59,3 @@
+  ArrayRef<InstrProfValueData>
+  getPromotionCandidatesForInstruction(const Instruction *I, uint32_t &NumVals,
+                                       uint64_t &TotalCount,
----------------
davidxl wrote:
> This analysis does not check legality, why is that?
I guess this can be a super set of the real transformations. this just to add edges.

================
Comment at: lib/Analysis/IndirectCallPromotionAnalysis.cpp:69
@@ +68,3 @@
+                                   cl::desc("Run indirect-call promotion for "
+                                            "invoke instruction only"));
+
----------------
icp-call-only and -icp-invoke-only are mainly for debug. I think it's better to keep together with the transformation code.


http://reviews.llvm.org/D22182





More information about the llvm-commits mailing list