forked from OSchip/llvm-project
[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
This commit is contained in:
parent
6d55b90a22
commit
c06a6380a0
|
@ -1563,12 +1563,14 @@ void GPUNodeBuilder::clearScalarEvolution(Function *F) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPUNodeBuilder::clearLoops(Function *F) {
|
void GPUNodeBuilder::clearLoops(Function *F) {
|
||||||
|
SmallSet<Loop *, 1> WorkList;
|
||||||
for (BasicBlock &BB : *F) {
|
for (BasicBlock &BB : *F) {
|
||||||
Loop *L = LI.getLoopFor(&BB);
|
Loop *L = LI.getLoopFor(&BB);
|
||||||
if (L)
|
if (L)
|
||||||
SE.forgetLoop(L);
|
WorkList.insert(L);
|
||||||
LI.removeBlock(&BB);
|
|
||||||
}
|
}
|
||||||
|
for (auto *L : WorkList)
|
||||||
|
LI.erase(L);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::tuple<Value *, Value *> GPUNodeBuilder::getGridSizes(ppcg_kernel *Kernel) {
|
std::tuple<Value *, Value *> GPUNodeBuilder::getGridSizes(ppcg_kernel *Kernel) {
|
||||||
|
|
Loading…
Reference in New Issue