mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
Use Loop::block_iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52616 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -574,9 +574,10 @@ bool IndVarSimplify::runOnLoop(Loop *L, LPPassManager &LPM) {
|
||||
#if 0
|
||||
// Now replace all derived expressions in the loop body with simpler
|
||||
// expressions.
|
||||
for (unsigned i = 0, e = L->getBlocks().size(); i != e; ++i)
|
||||
if (LI->getLoopFor(L->getBlocks()[i]) == L) { // Not in a subloop...
|
||||
BasicBlock *BB = L->getBlocks()[i];
|
||||
for (LoopInfo::block_iterator I = L->block_begin(), E = L->block_end();
|
||||
I != E; ++I) {
|
||||
BasicBlock *BB = *I;
|
||||
if (LI->getLoopFor(BB) == L) { // Not in a subloop...
|
||||
for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I)
|
||||
if (I->getType()->isInteger() && // Is an integer instruction
|
||||
!I->use_empty() &&
|
||||
@ -593,6 +594,7 @@ bool IndVarSimplify::runOnLoop(Loop *L, LPPassManager &LPM) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
DeleteTriviallyDeadInstructions(DeadInsts);
|
||||
|
Reference in New Issue
Block a user