llvm-project
bdd81f3f - [mlir][acc] Clone `scf.execute_region` blocks in dominance order (#248375)

Commit
5 hours ago
[mlir][acc] Clone `scf.execute_region` blocks in dominance order (#248375) `ACCCGToGPU` cloned the blocks of an `scf.execute_region` in region order. A block can come before a block that dominates it and use values defined there, e.g. after a forward branch into a loop built from branches. Such a use was cloned before its value was mapped, so the clone kept using the original value, and erasing the original `acc.compute_region` asserted with "expected that op has no uses". Clone the blocks in reverse post-order, which visits every block after the blocks that dominate it. Assisted-by: Claude Code (Claude Opus 5.5)
Author
Parents
Loading