[llvm] [AArch64] Emit negate-ra-state CFI for pauth epilogues (PR #189924)

Gergely Bálint via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 1 05:17:37 PDT 2026


================
@@ -17,9 +17,6 @@
 // CHECK: BOLT-INFO: PointerAuthCFIAnalyzer ran on {{[0-9]+}} functions.
 // CHECK-SAME: Ignored {{[0-9]}} functions ({{[0-9.]+}}%) because of CFI
 // CHECK-SAME: inconsistencies
-// CHECK-NEXT: BOLT-WARNING: PointerAuthCFIAnalyzer only supports
----------------
bgergely0 wrote:

I'm not sure this is the right way to go about this.

BOLT's `PointerAuthCFIAnalyzer` indeed doesn't support synchronous unwind tables. But this fact shouldn't cause a change on the compiler's side. The point with synchronous unwind tables is to emit less CFIs (by accepting that unwinding only happens synchronously, therefore we won't be able to unwind from any instruction/location).
With this patch - afaict - you make .cfi_negate_ra_state become an exception to this rule, and always emit it, regardless of sync or async mode. This does help with BOLT's `PointerAuthCFIAnalyzer`, but also increases binary size regardless of indended BOLT usage later. The extra CFIs also doesn't help unwinding, as for sync mode, there's already enough information encoded in the existing CFIs.

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


More information about the llvm-commits mailing list