1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Fix uninitialized use of the Changed variable.

llvm-svn: 53564
This commit is contained in:
Dan Gohman 2008-07-14 17:55:01 +00:00
parent 7b61b66334
commit 8280b2e66e

View File

@ -1747,6 +1747,7 @@ bool LoopStrengthReduce::runOnLoop(Loop *L, LPPassManager &LPM) {
SE = &getAnalysis<ScalarEvolution>(); SE = &getAnalysis<ScalarEvolution>();
TD = &getAnalysis<TargetData>(); TD = &getAnalysis<TargetData>();
UIntPtrTy = TD->getIntPtrType(); UIntPtrTy = TD->getIntPtrType();
Changed = false;
// Find all uses of induction variables in this loop, and catagorize // Find all uses of induction variables in this loop, and catagorize
// them by stride. Start by finding all of the PHI nodes in the header for // them by stride. Start by finding all of the PHI nodes in the header for
@ -1831,6 +1832,7 @@ bool LoopStrengthReduce::runOnLoop(Loop *L, LPPassManager &LPM) {
SE->deleteValueFromRecords(PN); SE->deleteValueFromRecords(PN);
PN->replaceAllUsesWith(UndefValue::get(PN->getType())); PN->replaceAllUsesWith(UndefValue::get(PN->getType()));
DeadInsts.insert(PN); DeadInsts.insert(PN);
Changed = true;
break; break;
} }
} }