[clang] [CIR] Emit the frame-pointer function attribute and module flag (PR #230697)

Adam Smith via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 13 08:00:00 PDT 2026


================
@@ -1454,6 +1454,57 @@ def CIR_UnwindTableKindAttr : CIR_EnumAttr<CIR_UnwindTableKind, "uwtable"> {
   }];
 }
 
+//===----------------------------------------------------------------------===//
+// FramePointerKind
+//===----------------------------------------------------------------------===//
+def CIR_FramePointerKind : CIR_I32Enum<"FramePointerKind",
+                                       "Frame Pointer Kind", [
+  I32EnumCase<"None", 0, "none">,
+  I32EnumCase<"NonLeaf", 1, "non_leaf">,
+  I32EnumCase<"All", 2, "all">,
+  I32EnumCase<"Reserved", 3, "reserved">,
+  I32EnumCase<"NonLeafNoReserve", 4, "non_leaf_no_reserve">
+]>;
+
+def CIR_FramePointerKindAttr
+    : CIR_EnumAttr<CIR_FramePointerKind, "frame_pointer"> {
+  let summary = "Encodes the frame pointer kind for a function or a module.";
+
+  let description = [{
+    A frame pointer is a register that holds the address of the current
----------------
adams381 wrote:

I removed the explanation of what a frame pointer is.  The description now links to LangRef and uses its wording for `none`, `reserved`, `non_leaf` and `all`.

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


More information about the cfe-commits mailing list