[PATCH] D51404: [IndVars] Remove unreasonable checks in rewriteLoopExitValues
Hongbin Zheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 17 09:50:35 PDT 2018
etherzhhb accepted this revision.
etherzhhb added a comment.
This revision is now accepted and ready to land.
LGTM
================
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;
}
----------------
The only suggestion is maybe we could extract this piece of code to a standalone function.
This can make the code easier to understand
https://reviews.llvm.org/D51404
More information about the llvm-commits
mailing list