[PATCH] D81271: Correctly report modified status for AMDGPUUnifyDivergentExitNodes
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 5 11:50:05 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG72e4da45bd73: Correctly report modified status for AMDGPUUnifyDivergentExitNodes (authored by foad).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81271/new/
https://reviews.llvm.org/D81271
Files:
llvm/lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp
Index: llvm/lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp
+++ llvm/lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp
@@ -216,6 +216,7 @@
bool InsertExport = false;
+ bool Changed = false;
for (BasicBlock *BB : PDT.getRoots()) {
if (isa<ReturnInst>(BB->getTerminator())) {
if (!isUniformlyReached(DA, *BB))
@@ -281,6 +282,7 @@
BB->getTerminator()->eraseFromParent();
BranchInst::Create(TransitionBB, DummyReturnBB, BoolTrue, BB);
}
+ Changed = true;
}
}
@@ -299,6 +301,7 @@
BB->getTerminator()->eraseFromParent();
BranchInst::Create(UnreachableBlock, BB);
}
+ Changed = true;
}
if (!ReturningBlocks.empty()) {
@@ -322,15 +325,16 @@
// actually reached here.
ReturnInst::Create(F.getContext(), RetVal, UnreachableBlock);
ReturningBlocks.push_back(UnreachableBlock);
+ Changed = true;
}
}
// Now handle return blocks.
if (ReturningBlocks.empty())
- return false; // No blocks return
+ return Changed; // No blocks return
if (ReturningBlocks.size() == 1 && !InsertExport)
- return false; // Already has a single return block
+ return Changed; // Already has a single return block
const TargetTransformInfo &TTI
= getAnalysis<TargetTransformInfoWrapperPass>().getTTI(F);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81271.268904.patch
Type: text/x-patch
Size: 1477 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200605/472c7991/attachment-0001.bin>
More information about the llvm-commits
mailing list