[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:
Hal Finkel
2015-04-12 17:18:56 +00:00
parent e0f4a11a89
commit ad96655905
3 changed files with 54 additions and 14 deletions

View File

@@ -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;
}