[Mlir-commits] [mlir] [mlir][LLVMIR] Handle missing functions in CGProfile module flags (PR #169517)
Tobias Gysi
llvmlistbot at llvm.org
Wed Nov 26 11:02:05 PST 2025
================
@@ -0,0 +1,14 @@
+// RUN: mlir-translate %s -mlir-to-llvmir | FileCheck %s
+// CHECK: !llvm.module.flags = !{![[CG_FLAG:[0-9]+]], ![[DBG_FLAG:[0-9]+]]}
+// CHECK: [[CG_FLAG]] = !{i32 5, !"CG Profile", [[CG_LIST:![0-9]+]]}
+// CHECK: [[CG_LIST]] = distinct !{[[CG_ENTRY:![0-9]+]], [[CG_ENTRY]], [[CG_ENTRY]]}
+// CHECK: [[CG_ENTRY]] = !{null, null, i64 222}
+// CHECK: [[DBG_FLAG]] = !{i32 2, !"Debug Info Version", i32 3}
----------------
gysit wrote:
```suggestion
// CHECK: !llvm.module.flags = !{![[CG_FLAG:[0-9]+]], ![[DBG_FLAG:[0-9]+]]}
// CHECK: ![[CG_FLAG]] = !{i32 5, !"CG Profile", ![[CG_LIST:[0-9]+]]}
// CHECK: ![[CG_LIST]] = distinct !{![[CG_ENTRY:[0-9]+]], ![[CG_ENTRY]], ![[CG_ENTRY]]}
// CHECK: ![[CG_ENTRY]] = !{null, null, i64 222}
// CHECK: ![[DBG_FLAG]] = !{i32 2, !"Debug Info Version", i32 3}
```
ultra nit: let's either consistently match or not match the exclamation mark!
https://github.com/llvm/llvm-project/pull/169517
More information about the Mlir-commits
mailing list