[Mlir-commits] [mlir] [MLIR][LLVM] Add CG Profile module flags support (PR #137115)

Tobias Gysi llvmlistbot at llvm.org
Thu Apr 24 22:28:06 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") {
----------------
gysit wrote:

Nice!

https://github.com/llvm/llvm-project/pull/137115


More information about the Mlir-commits mailing list