llvm-project
1c1d0cd3 - [MLIR][LLVMIR] Handle MDTuple-of-MDStrings module flags (e.g. riscv-isa) (#188741)

Commit
22 days ago
[MLIR][LLVMIR] Handle MDTuple-of-MDStrings module flags (e.g. riscv-isa) (#188741) The "riscv-isa" LLVM module flag stores its value as an MDTuple containing MDStrings (e.g. `\!{\!"rv64i2p1", \!"m2p0"}`). Previously, this fell through the unrecognized-key path in `convertModuleFlagValueFromMDTuple`, which emitted a warning and dropped the flag during import. This patch adds generic handling for MDTuples whose operands are all MDStrings: - Import: convert to `ArrayAttr<StringAttr>` in `convertModuleFlagValueFromMDTuple` - Export: convert `ArrayAttr<StringAttr>` back to an MDTuple of MDStrings in `convertModuleFlagValue`, enabling a lossless round-trip - Verifier: allow `ArrayAttr<StringAttr>` as a valid `ModuleFlagAttr` value for keys not otherwise handled by specific verifier branches Fixes #188122 Assisted-by: Claude Code
Author
Parents
Loading