[Mlir-commits] [mlir] [MLIR] Add support for frame pointers in MLIR (PR #72145)
Christian Ulmann
llvmlistbot at llvm.org
Thu Nov 23 13:19:06 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:
```suggestion
let assemblyFormat = "`<` $framePointerKind `>`";
```
Apparently, `<` `>` are required around the assembly format to make this attribute "simple enough for the pretty form". https://github.com/llvm/llvm-project/blob/59e24eea3438ab2925bda025f52d2cce92195065/mlir/lib/IR/AsmPrinter.cpp#L2090-L2105
https://github.com/llvm/llvm-project/pull/72145
More information about the Mlir-commits
mailing list