[llvm] [BOLT][AArch64] Support for pointer authentication (v2) (PR #120064)
Paschalis Mpeis via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 14 08:49:00 PST 2025
================
@@ -632,8 +643,13 @@ bool CFIReaderWriter::fillCFIInfoFor(BinaryFunction &Function) const {
// DW_CFA_GNU_window_save and DW_CFA_GNU_NegateRAState just use the same
// id but mean different things. The latter is used in AArch64.
if (Function.getBinaryContext().isAArch64()) {
- Function.addCFIInstruction(
- Offset, MCCFIInstruction::createNegateRAState(nullptr));
+ // Not adding OpNegateRAState since the location they are needed
+ // depends on the order of BasicBlocks, which changes during
+ // optimizations. Instead, an annotation is added to the instruction, to
+ // mark that the instruction modifies the RA State. The actual state for
+ // instructions are worked out in MarkRAStates based on these
+ // annotations.
----------------
paschalis-mpeis wrote:
The first sentence below is based on the fact that previously `addCFIInstruction` was used with OpNegateRAState, right? This does make sense, but for future readers lacking context might be confusing as the relevant code is dropped.
If that is still fundamental info you could reword this. Alternatively you can drop the first sentence, maybe add a note on the commit message if you like, and here simply say something like:
```
// Annotate instruction to mark ...
```
https://github.com/llvm/llvm-project/pull/120064
More information about the llvm-commits
mailing list