-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Description
With clang the -fno-asynchronous-unwind-tables flag select synchronous mode for unwinding.
In this mode, the unwind information is not "complete" for all instructions, only for calls.
The sign-return-address-cfi-negate-ra-state.ll unittests in LLVM has a function with async unwind tables, and one with synchronous unwind tables. In the synchronous case, the autiasp (hint 29) does not have the .cfi_negate_ra_state CFI.
In BOLT, we expect all pac* and aut* variants that operate on the LR to have the appropriate unwind information (the negate-ra-state CFI), otherwise the function is ignored (not optimized).
Example: when applying BOLT to llama.cpp, this is seen in the logs: Ignored 1633 functions (99.03%) because of CFI inconsistencies. The huge % of ignored functions makes BOLT useless in such cases.
Expected behaviour:
- at minimum, the requirement of asynchronous unwind tables should be documented, and reported to users if we encounter a given % of such issues during optimization
- ideally, we should also enable optimizing such functions.