[Mlir-commits] [mlir] [mlir][spirv] Add definition for GL Length (PR #144041)

Jakub Kuderski llvmlistbot at llvm.org
Mon Jun 16 08:27:01 PDT 2025


kuhar wrote:

> I have added the canonicalizer. I've considered whether I should put it in the GL canonicalizer, but since in here we transform GL op into GL op, the op availability should not be an issues.

I looked at this a little bit more closely and I think gl canonicalization is separated out mostly to better organize the code, similar how we have group op definitions in .td files (unlike most dialect that put all ops together). I don't see any logic that decides availability, unless I missed something. One caveat is that gl canon patterns don't run with the generic `--canonicalize` pass AFAICT and need to be added to the pass pipeline. `spriv.GL.Length` is probably not the most common op (do we plan to emit it anywhere?), so having the canonicalization be opt-in sounds fine to me.

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


More information about the Mlir-commits mailing list