[llvm] [BOLT][AArch64] Support for pointer authentication (v2) (PR #120064)

Gergely Bálint via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 16 01:38:49 PST 2025


bgergely0 wrote:

I will have a small improvement up in a few days to add some error recovery capability to the [asserts here](https://github.com/llvm/llvm-project/blob/fee74748ef374b77d22710e45d1ef09c432f03c8/bolt/lib/Passes/MarkRAStates.cpp#L74-L85). 
In MarkRAStates, I assume that functions start in an unsigned RA state, and that's why these asserts are in place. I have encountered one situation with handwritten assembly, where this is not be the case: a pair of paciasp and autiasp insts were split into two functions. To not fail on these asserts, I wrote [this hacky workaround](https://github.com/llvm/llvm-project/blob/fee74748ef374b77d22710e45d1ef09c432f03c8/bolt/lib/Passes/MarkRAStates.cpp#L46-L62) in MarkRAStates.cpp. 
But after submitting, I now realize that this situation is analogous to the normal function-splitting done during optimizations (so a function is split, and the paciasp and autiasp end up in different functions). So some level or error-recovery from the asserts is possible, which would make the code cleaner, and less likely to fail on the asserts.

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


More information about the llvm-commits mailing list