diff options
author | benwu25 <soggysocks206@gmail.com> | 2025-09-29 01:39:31 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-29 10:39:31 +0200 |
commit | 631b89cc4766d2b8f0f5a17c6d90fe920436a2c9 (patch) | |
tree | b3f58ed65a241a8e8b995efb473582f96d7404af /llvm/tools/llvm-diff/lib/DiffLog.h | |
parent | 2e19666600c91952e39a1fb482594598880a8bd6 (diff) | |
download | llvm-631b89cc4766d2b8f0f5a17c6d90fe920436a2c9.zip llvm-631b89cc4766d2b8f0f5a17c6d90fe920436a2c9.tar.gz llvm-631b89cc4766d2b8f0f5a17c6d90fe920436a2c9.tar.bz2 |
[MLIR][CF] Avoid collapsing blocks which participate in cycles (#160783)
Previously, collapseBranch did not return failure for successor blocks which were part of a cycle. mlir-opt --canonicalize would run indefinitely for any N-block cycle which is kicked off with an unconditional jump. The simplifyPassThroughBr transform would continue alternating which block was targeted in ^bb0, resulting in an infinite loop.
collapseBranch will not result in any useful transformation on blocks which participate in cycles, since the block is aliased by a different block. To avoid this, we can check for cycles in collapseBranch and abort when one is detected. Simplification of the cycle is left for other transforms.
Fixes #159743.
Diffstat (limited to 'llvm/tools/llvm-diff/lib/DiffLog.h')
0 files changed, 0 insertions, 0 deletions