[Mlir-commits] [mlir] [SCF] add debug label for MergeNestedParallelLoops pattern (PR #135980)

Scott Manley llvmlistbot at llvm.org
Wed Apr 16 16:42:38 PDT 2025


rscottmanley wrote:

> I would argue that the canonical form of the IR isn't something meant to be customized with this kind of fine grain control.
Also, relying on some sort of string backdoor does not seem like a great API on the principle as well.

I agree with everything you're saying from a compiler design perspective.. but at the same time, I don't think this particular pattern is very good candidate for *canonicalization* and unfortunately feel the need to disable it somehow. For example, loop optimizations that may apply to a `fir::DoLoopOp` nest, a `scf::ForOp` nest and a `scf::ParallelOp` nest.. but have to be engineered differently as only the latter canonicalizes this way. I also would argue that it's more difficult to pick out the fact it's a nest in verbose IR. I assume this pattern is useful for working on `scf::ParallelOp` but it's less useful for working on "LoopLike" ops.

https://github.com/llvm/llvm-project/pull/135980


More information about the Mlir-commits mailing list