[Mlir-commits] [mlir] [MLIR][LLVM] Add CG Profile module flags support (PR #137115)
Bruno Cardoso Lopes
llvmlistbot at llvm.org
Thu Apr 24 10:07:26 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:
It's already returning right before the if scope ends, can you elaborate? If you mean returning early if the name isn't "CG Profile": my next PR will introduce yet another of these, that's why I didn't do it.
> do we have this string key available in some header?
Nope. Any ideas where to put this?
https://github.com/llvm/llvm-project/pull/137115
More information about the Mlir-commits
mailing list