[PATCH] D51404: [IndVars] Remove unreasonable checks in rewriteLoopExitValues
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 17 19:20:33 PDT 2018
mkazantsev 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;
}
----------------
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. :)
https://reviews.llvm.org/D51404
More information about the llvm-commits
mailing list