mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-19 17:24:57 +00:00
[PowerPC] Really iterate over all loops in PPCLoopDataPrefetch/PPCLoopPreIncPrep
When I fixed these a couple of days ago to iterate over all loops, not just depth == 1 loops, I inadvertently made it such that we'd only look at the first top-level loop. Make sure that we really look at all of them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234705 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -111,13 +111,9 @@ bool PPCLoopDataPrefetch::runOnFunction(Function &F) {
|
||||
|
||||
bool MadeChange = false;
|
||||
|
||||
if (LI->empty())
|
||||
return MadeChange;
|
||||
|
||||
for (auto I = df_begin(*LI->begin()), E = df_end(*LI->begin()); I != E; ++I) {
|
||||
Loop *L = *I;
|
||||
MadeChange |= runOnLoop(L);
|
||||
}
|
||||
for (auto I = LI->begin(), IE = LI->end(); I != IE; ++I)
|
||||
for (auto L = df_begin(*I), LE = df_end(*I); L != LE; ++L)
|
||||
MadeChange |= runOnLoop(*L);
|
||||
|
||||
return MadeChange;
|
||||
}
|
||||
|
Reference in New Issue
Block a user