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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to