[PATCH] D127899: [MLInliner] Don't inline call sites in unreachable basic blocks

Kazu Hirata via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 16 08:59:04 PDT 2022


kazu accepted this revision.
kazu added a comment.
This revision is now accepted and ready to land.

LGTM modulo minor cosmetic changes.  Thanks!



================
Comment at: llvm/lib/Analysis/MLInlineAdvisor.cpp:279
 
-std::unique_ptr<InlineAdvice> MLInlineAdvisor::getAdviceImpl(CallBase &CB) {
+std::unique_ptr<InlineAdvice> MLInlineAdvisor::getAdviceImpl(CallBase &CB) {  
   auto &Caller = *CB.getCaller();
----------------
Remove the trailing space.


================
Comment at: llvm/lib/Analysis/MLInlineAdvisor.cpp:289-290
 
+  if (auto Skip = getSkipAdviceIfUnreachableCallsite(CB))
+    return Skip;
+
----------------
Could you move this up to the beginning of the function if all you need is `CB`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127899



More information about the llvm-commits mailing list