[Mlir-commits] [mlir] [MLIR][LLVM] add metadata attrs and `llvm.named_metadata` op (PR #186703)
Markus Böck
llvmlistbot at llvm.org
Mon Mar 16 03:23:37 PDT 2026
https://github.com/zero9178 commented:
Thank you for the PR! For reference, we used to have a `llvm.metadata` op which encoded these things using SSA cycles but its last use was removed in https://github.com/llvm/llvm-project/commit/1dda134f85d4fab7ace7b9ec9b57a0319c14de8f
and the op itself in https://github.com/llvm/llvm-project/commit/0fc8d9e41a81a52866e50a499af093e45f802a28
I am in support of the LLVM dialect having a metadata representation since we simply cannot make custom attributes for each and every use case of metadata (especially for custom backends of LLVM).
However, I think the current approach with the attributes has the issue of not being able to model cyclic metadata at all (something that is not uncommon I believe?).
I think that is okay as an initial limitation but should be documented somewhere.
CC @gysit @Dinistro since they're using metadata downstream quite extensively.
https://github.com/llvm/llvm-project/pull/186703
More information about the Mlir-commits
mailing list