[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:08:20 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:
> 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.


================
Comment at: llvm/lib/Analysis/MLInlineAdvisor.cpp:254
+                                                                  bool Advice) {
+  // Make sure we track inlinings in all cases - mandatory or not.
+  if (Advice && !ForceStop)
----------------
aeubanks wrote:
> Is there a reason to track mandatory inlines? Seems like extra noise
yes, they change the stats that this inline advisor is tracking (currently nr edges, nodes, stuff like that)


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