Convert SimplifyIVUsers into a worklist instead of a single pass over

the users.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131277 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Andrew Trick 2011-05-13 01:12:21 +00:00
parent 88882247d2
commit 14ba1ff133

View File

@ -458,7 +458,7 @@ void IndVarSimplify::RewriteNonIntegerIVs(Loop *L) {
/// loop. IVUsers is treated as a worklist. Each successive simplification may
/// push more users which may themselves be candidates for simplification.
void IndVarSimplify::SimplifyIVUsers() {
for (IVUsers::iterator I = IU->begin(), E = IU->end(); I != E; ++I) {
for (IVUsers::iterator I = IU->begin(); I != IU->end(); ++I) {
Instruction *UseInst = I->getUser();
Value *IVOperand = I->getOperandValToReplace();