[Mlir-commits] [mlir] [MLIR][LLVM] Add CG Profile module flags support (PR #137115)
Bruno Cardoso Lopes
llvmlistbot at llvm.org
Thu Apr 24 14:34:58 PDT 2025
================
@@ -271,6 +271,31 @@ static void convertLinkerOptionsOp(ArrayAttr options,
linkerMDNode->addOperand(listMDNode);
}
+static llvm::Metadata *
+convertModuleFlagValue(StringRef key, ArrayAttr arrayAttr,
+ llvm::IRBuilderBase &builder,
+ LLVM::ModuleTranslation &moduleTranslation) {
+ llvm::LLVMContext &context = builder.getContext();
+ llvm::MDBuilder mdb(context);
+ SmallVector<llvm::Metadata *> nodes;
+
+ if (key == "CG Profile") {
----------------
bcardosolopes wrote:
Added:
```
/// Names of known llvm module flag keys.
static StringRef getModuleFlagKeyCGProfileName() {
return "CG Profile";
}
```
To `LLVMDialect.td`, we do not really have an attribute for it (only for the entries) so I refrained from using "Attr" anywhere in the name.
https://github.com/llvm/llvm-project/pull/137115
More information about the Mlir-commits
mailing list