[llvm] AMDGPU: fix isSafeToSink expecting exactly one predecessor (PR #89224)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Thu May 9 08:09:38 PDT 2024
================
@@ -66,6 +66,19 @@ void GenericCycle<ContextT>::getExitBlocks(
}
}
+template <typename ContextT>
+void GenericCycle<ContextT>::getExitingBlocks(
+ SmallVectorImpl<BlockT *> &TmpStorage) const {
+ TmpStorage.clear();
+
+ for (BlockT *Block : blocks()) {
+ for (BlockT *Succ : successors(Block)) {
+ if (!contains(Succ))
+ TmpStorage.push_back(Block);
----------------
jayfoad wrote:
`break` from the inner loop here.
https://github.com/llvm/llvm-project/pull/89224
More information about the llvm-commits
mailing list