summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--polly/lib/CodeGen/PPCGCodeGeneration.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/polly/lib/CodeGen/PPCGCodeGeneration.cpp b/polly/lib/CodeGen/PPCGCodeGeneration.cpp
index 2366b5ec2f8..5bf31e60e92 100644
--- a/polly/lib/CodeGen/PPCGCodeGeneration.cpp
+++ b/polly/lib/CodeGen/PPCGCodeGeneration.cpp
@@ -1555,16 +1555,20 @@ void GPUNodeBuilder::clearDominators(Function *F) {
}
void GPUNodeBuilder::clearScalarEvolution(Function *F) {
- for (auto *L : LI)
+ for (BasicBlock &BB : *F) {
+ Loop *L = LI.getLoopFor(&BB);
if (L)
SE.forgetLoop(L);
+ }
}
void GPUNodeBuilder::clearLoops(Function *F) {
- clearScalarEvolution(F);
- SmallVector<Loop *, 1> Loops(LI.begin(), LI.end());
- for (auto *L : Loops)
- LI.erase(L);
+ for (BasicBlock &BB : *F) {
+ Loop *L = LI.getLoopFor(&BB);
+ if (L)
+ SE.forgetLoop(L);
+ LI.removeBlock(&BB);
+ }
}
std::tuple<Value *, Value *> GPUNodeBuilder::getGridSizes(ppcg_kernel *Kernel) {
OpenPOWER on IntegriCloud