[PATCH] D14309: Use updated threshold for indirect call bonus

David Li via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 8 16:07:16 PST 2015


davidxl added inline comments.

================
Comment at: llvm/trunk/lib/Analysis/InlineCost.cpp:834
@@ -833,3 +833,3 @@
   // out. Pretend to inline the function, with a custom threshold.
   CallAnalyzer CA(TTI, ACT, *F, InlineConstants::IndirectCallThreshold, CS);
   if (CA.analyzeCall(CS)) {
----------------
I missed this unchanged line.  

On second look at the patch, I think the patch is still not complete.  We should not pass a fixed Threshold for indirect callsite here -- there are other factors that can boost the inlining for the callsite once it becomes direct -- think about PGO case where the indirect callsite is super hot.

Instead, as I said in previous comments, we should make IndirectCallThreshold as an additional booster (delta) on top of regular threshold computed.


Repository:
  rL LLVM

http://reviews.llvm.org/D14309





More information about the llvm-commits mailing list