diff options
author | Philip Pfaffe <philip.pfaffe@gmail.com> | 2018-05-23 14:52:35 +0000 |
---|---|---|
committer | Philip Pfaffe <philip.pfaffe@gmail.com> | 2018-05-23 14:52:35 +0000 |
commit | c06a6380a09fc98eec81b446a4c60d7bc03c6771 (patch) | |
tree | 02258d76c03b8f289d0becd1296dd38af1464a97 /polly/lib/CodeGen | |
parent | 6d55b90a229ccfd1333307285ca29913f7b7a90d (diff) | |
download | bcm5719-llvm-c06a6380a09fc98eec81b446a4c60d7bc03c6771.tar.gz bcm5719-llvm-c06a6380a09fc98eec81b446a4c60d7bc03c6771.zip |
[Acc] Re-land r326643 to finally fix PR33208.
Other than before, don't clear out LI entirely but only those relevant
loops.
llvm-svn: 333089
Diffstat (limited to 'polly/lib/CodeGen')
-rw-r--r-- | polly/lib/CodeGen/PPCGCodeGeneration.cpp | 6 |
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) { |