mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-24 08:24:33 +00:00
Simplify for loop, clear a per-loop map after processing each loop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22580 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -632,7 +632,7 @@ void LoopStrengthReduce::runOnLoop(Loop *L) {
|
|||||||
|
|
||||||
BasicBlock::iterator I = L->getHeader()->begin();
|
BasicBlock::iterator I = L->getHeader()->begin();
|
||||||
PHINode *PN;
|
PHINode *PN;
|
||||||
for (; (PN = dyn_cast<PHINode>(I)); ) {
|
while ((PN = dyn_cast<PHINode>(I))) {
|
||||||
++I; // Preincrement iterator to avoid invalidating it when deleting PN.
|
++I; // Preincrement iterator to avoid invalidating it when deleting PN.
|
||||||
|
|
||||||
// At this point, we know that we have killed one or more GEP instructions.
|
// At this point, we know that we have killed one or more GEP instructions.
|
||||||
@ -664,5 +664,6 @@ void LoopStrengthReduce::runOnLoop(Loop *L) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
IVUsesByStride.clear();
|
IVUsesByStride.clear();
|
||||||
|
CastedBasePointers.clear();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user