[PATCH] D51404: [IndVars] Remove unreasonable checks in rewriteLoopExitValues
Hongbin Zheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 18 08:34:30 PDT 2018
etherzhhb added inline comments.
================
Comment at: lib/Transforms/Scalar/IndVarSimplify.cpp:616-631
+ for (auto *PB : UseInstr->users()) {
+ unsigned PhiOpc = cast<Instruction>(PB)->getOpcode();
if (PhiOpc != Instruction::Call &&
PhiOpc != Instruction::Ret) {
HasSoftExternalUses = true;
break;
}
----------------
mkazantsev wrote:
> etherzhhb wrote:
> > mkazantsev wrote:
> > > etherzhhb wrote:
> > > > The only suggestion is maybe we could extract this piece of code to a standalone function.
> > > > This can make the code easier to understand
> > > It's done in the follow-up patch https://reviews.llvm.org/D51584. I'm merging them one by one just to make reviewers' life easier. :)
> > Is there other patches between this and D51584? I saw some thing like "if (ExitValue->getSCEVType()>=scMulExpr) {" is gone (just out of curiosity :) )
> Yes there is, https://reviews.llvm.org/D51581
>
> You can use "Stack" tab in Revision Contensts section to see dependencies. :)
>
> As for this check, it's removed in the last patch (I really have no idea why it was there).
I see
Repository:
rL LLVM
https://reviews.llvm.org/D51404
More information about the llvm-commits
mailing list