mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-10 13:15:47 +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:
parent
f9aaae06cd
commit
e9100c69cb
@ -632,7 +632,7 @@ void LoopStrengthReduce::runOnLoop(Loop *L) {
|
||||
|
||||
BasicBlock::iterator I = L->getHeader()->begin();
|
||||
PHINode *PN;
|
||||
for (; (PN = dyn_cast<PHINode>(I)); ) {
|
||||
while ((PN = dyn_cast<PHINode>(I))) {
|
||||
++I; // Preincrement iterator to avoid invalidating it when deleting PN.
|
||||
|
||||
// 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();
|
||||
CastedBasePointers.clear();
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user