summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--polly/lib/CodeGen/PPCGCodeGeneration.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/polly/lib/CodeGen/PPCGCodeGeneration.cpp b/polly/lib/CodeGen/PPCGCodeGeneration.cpp
index 98e673e5ba5..acc8ef0e13c 100644
--- a/polly/lib/CodeGen/PPCGCodeGeneration.cpp
+++ b/polly/lib/CodeGen/PPCGCodeGeneration.cpp
@@ -1563,12 +1563,14 @@ void GPUNodeBuilder::clearScalarEvolution(Function *F) {
}
void GPUNodeBuilder::clearLoops(Function *F) {
+ SmallSet<Loop *, 1> WorkList;
for (BasicBlock &BB : *F) {
Loop *L = LI.getLoopFor(&BB);
if (L)
- SE.forgetLoop(L);
- LI.removeBlock(&BB);
+ WorkList.insert(L);
}
+ for (auto *L : WorkList)
+ LI.erase(L);
}
std::tuple<Value *, Value *> GPUNodeBuilder::getGridSizes(ppcg_kernel *Kernel) {
OpenPOWER on IntegriCloud