[PATCH] D14309: Use updated threshold for indirect call bonus
Easwaran Raman via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 8 16:25:58 PST 2015
On Tue, Dec 8, 2015 at 4:07 PM, David Li <davidxl at google.com> wrote:
> 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.
>
> I would also like to use the same thresholds as if we are considering
inlining the resolved indirect call into CS.getCalledFunction() in the
first place. In other words, inline-threshold or inlinehint-threshold
depending on whether the inline keyword is absent or present. However, this
is currently done in Inliner.cpp and not inside InlineCost.cpp. So some
refactoring has to be done.
> 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
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151208/bd6a192f/attachment.html>
More information about the llvm-commits
mailing list