[PATCH] D51404: [IndVars] Remove unreasonable checks in rewriteLoopExitValues

Hongbin Zheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 17 19:58:00 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:
> > 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 :) )


https://reviews.llvm.org/D51404





More information about the llvm-commits mailing list