[Mlir-commits] [mlir] [MLIR] Add support for frame pointers in MLIR (PR #72145)

Markus Böck llvmlistbot at llvm.org
Mon Nov 13 13:53:41 PST 2023


================
@@ -0,0 +1,8 @@
+// RUN: mlir-translate -mlir-to-llvmir %s | FileCheck %s
+
+llvm.func @frame_pointer_func() frame_pointer="non-leaf" {
+  // CHECK-LABEL: define void @frame_pointer_func
+  // CHECK: attributes #{{.*}} = { "frame-pointer"="non-leaf" }
----------------
zero9178 wrote:

```suggestion
  // CHECK-LABEL: define void @frame_pointer_func() #[[ATTRS:\d+]]
  // CHECK: attributes #[[ATTRS]] = { "frame-pointer"="non-leaf" }
```
you can make the test more robust to future changes here by making sure that the attribute set corresponds to the attribute set of the function

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


More information about the Mlir-commits mailing list