[PATCH] D110922: [LoopPeel] Peel loops with deoptimizing exits
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 6 00:26:02 PDT 2021
lebedev.ri added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/BasicBlockUtils.cpp:502
+ isa<UnreachableInst>(BB->getTerminator()))
+ return true;
+ BB = BB->getSingleSuccessor();
----------------
mkazantsev wrote:
> lebedev.ri wrote:
> > mkazantsev wrote:
> > > There is one thing that bugs me. Imagine a sutiation:
> > > ```
> > > loop_exit:
> > > call foo() // will not return, but is not a deopt
> > > unreachable
> > > ```
> > >
> > > I'm not sure if it's bad actually. But maybe we should consider checking all other (non deopt) instruction with `isGuaranteedToTransferExecutionToSuccessor`. Opinions?
> > This is actually exactly the situation would have wanted to ask to be supported.
> Do you mean "supported" as "let's peel it" or "let's NOT peel it unless we know unreachable WILL execute"? :)
"let's peel it"
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110922/new/
https://reviews.llvm.org/D110922
More information about the llvm-commits
mailing list