[PATCH] D94825: [NewPM][Inliner] Move the 'always inliner' case in the same CGSCC pass as 'regular' inliner
Mircea Trofin via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 15 15:22:21 PST 2021
mtrofin marked 2 inline comments as done.
mtrofin added inline comments.
================
Comment at: llvm/lib/Analysis/InlineAdvisor.cpp:463
+ return getAdviceImpl(CB);
+ bool Advice = CB.getCaller() != CB.getCalledFunction() &&
+ MandatoryInliningKind::Always ==
----------------
aeubanks wrote:
> mtrofin wrote:
> > aeubanks wrote:
> > > I see this check a lot, should this be handled in some common place instead? Like `getMandatoryKind()`?
> > this is the recursion avoidance test. it's separate from mandatory - I suppose we can factor it upfront.
> We don't inline self-recursive CallBases right? Seems like we should always get a `Never` in that case. But not super important to factor that out right now.
right - I kept going back and forth between letting advisors handle that - you could, for example, imagine one that handled recursion and tracked caller/callee to allow a max number of recursive inlinings. But also something that can be factored now, and we deal with it when we get there.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94825/new/
https://reviews.llvm.org/D94825
More information about the cfe-commits
mailing list