[clang] [llvm] [docs] Drop stale "experimental" note for preserve_all (PR #244001)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 18 13:05:48 PST 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-ir
Author: guyfischman
<details>
<summary>Changes</summary>
Both LangRef and the clang attribute docs still say preserve_all "like the PreserveMost calling convention, will be used by a future version of the Objective-C runtime and should be considered experimental at this time." Since #<!-- -->214205 the comparison no longer holds, and the convention is in use, including in shipped ABIs:
- clang's -fsanitize-handler-preserve-all-regs (#<!-- -->168644, #<!-- -->168645) calls the UBSan minimal runtime handlers with preserve_all on X86-64 and AArch64, so the caller does not spill registers around a check.
- Apple's BrowserEngineCore framework declares its JIT memory functions (be_memory_inline_jit_restrict_*, macOS 14.3 / iOS 17.4) with __attribute__((preserve_all)) in the public SDK headers.
- Apple's clang uses it for the -fbounds-safety soft trap runtime calls, Google's gwpsan for its use-after-return detector, and FEX-Emu for the helpers its JIT calls on AArch64 hosts.
On #<!-- -->214205 I said preserve_all's adoption story was much thinner. I now have a use for preserve_all, so I did a more thorough search and found the Apple SDK declares functions with it.
---
Full diff: https://github.com/llvm/llvm-project/pull/244001.diff
2 Files Affected:
- (modified) clang/include/clang/Basic/AttrDocs.td (+5-3)
- (modified) llvm/docs/LangRef.md (+5-3)
``````````diff
diff --git a/clang/include/clang/Basic/AttrDocs.td b/clang/include/clang/Basic/AttrDocs.td
index 9828968c9d0f4..943f60109ece6 100644
--- a/clang/include/clang/Basic/AttrDocs.td
+++ b/clang/include/clang/Basic/AttrDocs.td
@@ -7071,9 +7071,11 @@ returned in callee-saved registers.
The idea behind this convention is to support calls to runtime functions
that don't need to call out to any other functions.
-This calling convention, like the `preserve_most` calling convention, will be
-used by a future version of the Objective-C runtime and should be considered
-experimental at this time.
+This convention was created to optimize certain runtime calls to the
+Objective-C runtime, but it is not limited to that runtime; it is also used by
+other runtimes and libraries, such as the UBSan minimal runtime and Apple's
+BrowserEngineCore framework. The current implementation supports X86-64 and
+AArch64.
}];
}
diff --git a/llvm/docs/LangRef.md b/llvm/docs/LangRef.md
index cfb4d965dc148..8010107566fd0 100644
--- a/llvm/docs/LangRef.md
+++ b/llvm/docs/LangRef.md
@@ -459,9 +459,11 @@ added in the future:
The idea behind this convention is to support calls to runtime functions
that don't need to call out to any other functions.
- This calling convention, like the `PreserveMost` calling convention, will be
- used by a future version of the Objective-C runtime and should be considered
- experimental at this time.
+ This convention was created to optimize certain runtime calls to the
+ Objective-C runtime, but it is not limited to that runtime; it is also used
+ by other runtimes and libraries, such as the UBSan minimal runtime and
+ Apple's BrowserEngineCore framework. The current implementation supports
+ X86-64 and AArch64.
"`preserve_nonecc`" - The `PreserveNone` calling convention
: This calling convention doesn't preserve any general registers. So all
``````````
</details>
https://github.com/llvm/llvm-project/pull/244001
More information about the cfe-commits
mailing list