[llvm] [SPIR-V] Add SPIR-V structurizer (PR #97606)
Steven Perron via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 15 07:28:58 PDT 2024
Nathan =?utf-8?q?Gauër?= <brioche at google.com>,
Nathan =?utf-8?q?Gauër?= <brioche at google.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/97606 at github.com>
================
@@ -230,7 +230,8 @@ class ConvergenceRegionAnalyzer {
auto *Terminator = From->getTerminator();
for (unsigned i = 0; i < Terminator->getNumSuccessors(); ++i) {
auto *To = Terminator->getSuccessor(i);
- if (isBackEdge(From, To))
+ // Ignore back edges and self edges.
+ if (From == To || isBackEdge(From, To))
----------------
s-perron wrote:
Why is a self edge not considered a back edge? I'm pretty sure standard definitions of a back edge will consider an edge from a node to itself to be a back edge because it creates a loop.
https://github.com/llvm/llvm-project/pull/97606
More information about the llvm-commits
mailing list