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

Christian Ulmann llvmlistbot at llvm.org
Fri Nov 24 02:53:54 PST 2023


================
@@ -47,6 +47,15 @@ def LinkageAttr : LLVM_Attr<"Linkage", "linkage"> {
   let assemblyFormat = "`<` $linkage `>`";
 }
 
+//===----------------------------------------------------------------------===//
+// FramePointerKindAttr
+//===----------------------------------------------------------------------===//
+
+def FramePointerKindAttr : LLVM_Attr<"FramePointerKind", ""> {
+  let parameters = (ins "framePointerKind::FramePointerKind":$framePointerKind);
+  let assemblyFormat = "$framePointerKind";
----------------
Dinistro wrote:

@joker-eph this is what was originally implemented.
@gysit and I previously suggested to not do that, to avoid bloating the printed form further. There are already inherent attributes that are mixed with the discardable attributes.
I suggest to ship this PR with the current approach and decide if we should add special parsing and printing for all inherent attributes or not after that.

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


More information about the Mlir-commits mailing list