[Mlir-commits] [mlir] [MLIR][LLVMIR] Handle MDTuple-of-MDStrings module flags (e.g. riscv-isa) (PR #188741)
Mehdi Amini
llvmlistbot at llvm.org
Mon Apr 13 04:00:18 PDT 2026
================
@@ -841,7 +841,17 @@ convertModuleFlagValueFromMDTuple(ModuleOp mlirModule,
if (key == LLVMDialect::getModuleFlagKeyProfileSummaryName())
return convertProfileSummaryModuleFlagValue(mlirModule, llvmModule,
mdTuple);
- return nullptr;
+ // Handle MDTuples whose operands are all MDStrings (e.g. "riscv-isa").
+ // Convert them to ArrayAttr of StringAttrs for a lossless round-trip.
+ Builder builder(mlirModule->getContext());
+ SmallVector<Attribute> strings;
----------------
joker-eph wrote:
Done!
https://github.com/llvm/llvm-project/pull/188741
More information about the Mlir-commits
mailing list