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

Christian Ulmann llvmlistbot at llvm.org
Wed Nov 15 04:18:23 PST 2023


================
@@ -0,0 +1,8 @@
+; RUN: mlir-translate -import-llvm -split-input-file %s | FileCheck %s
+
+define void @frame_pointer_func() "frame-pointer"="non-leaf" {
+  ; CHECK: llvm.func @frame_pointer_func()
+  ; CHECK-SAME: attributes {frame_pointer = 1 : i64}   
----------------
Dinistro wrote:

It seems that the EnumAttr is not capable of forcing the assembly format of it to be a string. I suspect that something like the `LinkageAttr`, see `LLVMAttrDefs.td` is required to get nice printing.
Even though I worked with this at some point, I cannot explain to you why this is necessary.

Alternatively, it might be possible to add an assembly format to the existing attr, but I'm not sure this works.


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


More information about the Mlir-commits mailing list