[PATCH] D83743: [InlineAdvisor] New inliner advisor to replay inlining from optimization remarks

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 14 17:48:36 PDT 2020


wenlei added a comment.

In D83743#2151983 <https://reviews.llvm.org/D83743#2151983>, @mtrofin wrote:

> In D83743#2150725 <https://reviews.llvm.org/D83743#2150725>, @wenlei wrote:
>
> > In D83743#2150703 <https://reviews.llvm.org/D83743#2150703>, @davidxl wrote:
> >
> > > Can this be extended to the SCC inliner?
> >
> >
> > Yes, we can use it in SCC inliner as well. We just need extra plumbing there. We can do that in a separate change if needed.
>
>
> I'd be curious what the scenario in the SCC case would be. IIUC, here, the value is that you can replay decisions made with a profile, and use a different profile for everything else in the compiler. Hmm... I suppose maybe a similar scenario could be articulated for the SCC case?
>
> On this - could you please add in the patch description the motivating scenario (helps with understanding) - thanks!


Our current use case is not in the SCC inliner. But yeah, I image it could be useful there too. In general I feel some mechanism like this one to allow external input for tweaking inlining decision can be useful, mostly for tuning and experimental purpose. We currently don't have a good way of doing that, existing attributes like alwaysinline is function level, not call site level. And per-callsite inline intrinsic like https://reviews.llvm.org/D51200 is intrusive and hard to push through either. I thought this is a relatively easy and clean way of getting that functionality for tuning. I will update the description to include the motivation.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83743/new/

https://reviews.llvm.org/D83743





More information about the llvm-commits mailing list