| Issue |
165215
|
| Summary |
[BOLT][PAC] PAuth DWARF rewriting does not work with synchronous unwind tables
|
| Labels |
BOLT
|
| Assignees |
bgergely0
|
| Reporter |
bgergely0
|
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](https://github.com/llvm/llvm-project/blob/main/llvm/test/CodeGen/AArch64/sign-return-address-cfi-negate-ra-state.ll#L59-L90), and one with [synchronous unwind tables](https://github.com/llvm/llvm-project/blob/main/llvm/test/CodeGen/AArch64/sign-return-address-cfi-negate-ra-state.ll#L137-L163). 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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs