Revert "[Acc] Fix for PR33208"
This reverts commit r326643. Fix didn't really fix anything.
git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@326656 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/PPCGCodeGeneration.cpp b/lib/CodeGen/PPCGCodeGeneration.cpp
index 2366b5e..5bf31e6 100644
--- a/lib/CodeGen/PPCGCodeGeneration.cpp
+++ b/lib/CodeGen/PPCGCodeGeneration.cpp
@@ -1555,16 +1555,20 @@
}
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) {