[PATCH] D104598: [NFCI-ish][SimplifyCFGPass] Rework and generalize `ret` block tail-merging

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 22 15:15:18 PDT 2021


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

lgtm



================
Comment at: llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp:128-132
+      BasicBlock::iterator I(Term);
       --I;
       // Skip over debug info.
       while (isa<DbgInfoIntrinsic>(I) && I != BB.begin())
         --I;
----------------
lebedev.ri wrote:
> rnk wrote:
> > Can this be `Term->getPrevNonDebugInstruction`?
> I'd rather not change existing code just because we can, this code goes away in the very next patch.
Sounds good


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104598



More information about the llvm-commits mailing list