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

Kristof Beyls via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 10 02:14:53 PST 2025


https://github.com/kbeyls commented:

Thank you very much for this patch @bgergely0 !

I haven't reviewed in depth (and might not be the best person to do an in-depth review), but I thought I'd share my initial thoughts after seeing this patch.

I think the PR description is excellent, it explains the overall design of how to correctly create/transform `.cfi_negate_ra_state` well.
I think it would be best that that description would live not only in the commit message, but ideally in some "design doc" area for BOLT. I don't think there's a "design doc" area for BOLT at the moment (@maksfb , is that right?), so probably best to try and find an appropriate place in the source code to store the info as a comment?

My one other high-level observation is that I'm wondering if it isn't too costly somehow to have many different kinds of MCAnnotation for this one use case. I wonder if it would be better/cheaper to have only a single annotation that would represent "OpNegateRAStateInfo", rather than having separate annotations. (Do I guess correctly that with this patch, typically, there will be a few annotations added to each MCInst?). Maybe some of the long-term BOLT developer might have an informed opinion on that?

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


More information about the llvm-commits mailing list