[llvm] [SPIR-V] Fix block sorting with irreducible CFG (PR #116996)
Nathan Gauër via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 20 10:54:30 PST 2024
================
@@ -525,6 +525,12 @@ size_t PartialOrderingVisitor::GetNodeRank(BasicBlock *BB) const {
continue;
auto Iterator = BlockToOrder.end();
+ // This block hasn't been ranked yet. Ignoring.
+ // This doesn't happen often, but when dealing with irreducible CFG, we have
+ // to rank nodes without knowing the rank of all their predecessors.
+ if (Iterator == BlockToOrder.end())
----------------
Keenuts wrote:
They dont't, and I need better test coverage. Somehow I messed up and added this at the wrong place. But somehow all my tests now pass, which means either I lack coverage, or the code below is useless.
https://github.com/llvm/llvm-project/pull/116996
More information about the llvm-commits
mailing list