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

David Li via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 12 10:40:39 PDT 2016


davidxl 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,
----------------
tejohnson wrote:
> tejohnson wrote:
> > xur wrote:
> > > 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.
> > Because the legality check is based on the target function, and this is being refactored so that it can be called when the target function is not yet known (when building the summary in the ThinLTO compile step where it is an inter-module indirect call).
> > I guess this can be a super set of the real transformations. this just to add edges.
> 
> Right
ok.

================
Comment at: lib/Analysis/IndirectCallPromotionAnalysis.cpp:69
@@ +68,3 @@
+                                   cl::desc("Run indirect-call promotion for "
+                                            "invoke instruction only"));
+
----------------
tejohnson wrote:
> xur wrote:
> > icp-call-only and -icp-invoke-only are mainly for debug. I think it's better to keep together with the transformation code.
> Why not have them here and prevent adding the ThinLTO edges in the debug case?
sounds ok to put them here.


http://reviews.llvm.org/D22182





More information about the llvm-commits mailing list