[PATCH] D101229: [InlineCost] Bump threshold for inlining cold callsites (PR50099)
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 24 11:56:20 PDT 2021
lebedev.ri added a comment.
In D101229#2714853 <https://reviews.llvm.org/D101229#2714853>, @davidxl wrote:
> Changing the default threshold needs lots of benchmarking.
> For this particular case, IMO the better way is to enhance inline cost
> analysis to give callsite more bonus if it enables SROA in call context.
I have thought about that too, yes.
> The analysis needs to be careful such that if there is another callsite
> that blocks SROA, and that callsites can never be inlined, then the bonus
> can not be applied.
So when inlining call to `curr_callee(arg)` from `entry()`,
and we've deduced that `arg` is an alloca within `entry()`,
we need to run an analysis on `entry()`, and verify that the alloca
is not used by anything that would prevent SROA, that's obvious to me.
The caveat that is a little murky to me still, *how* specifically
should we deal with the cases when the alloca is passed as an argument
to some other callee? I don't suppose we want to actually recurse into it?
> David
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101229/new/
https://reviews.llvm.org/D101229
More information about the llvm-commits
mailing list