Skip to content

Commit b14f217

Browse files
committed
[BOLT] Update doc
1 parent c727b78 commit b14f217

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

bolt/docs/PacRetDesign.md

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -201,27 +201,21 @@ Some BOLT passes can add new Instructions. In InsertNegateRAStatePass, we have
201201
to know what RA state these have.
202202

203203
> [!important]
204-
> As issue #160989 describes, unwind info is incorrect in stubs with multiple callers.
205-
> For this same reason, we cannot generate correct pac-specific unwind info: the signess
206-
> of the _incorrect_ return address is meaningless.
204+
> As issue #160989 explains, unwind info is missing from stubs.
205+
> For this same reason, we cannot generate correct pac-specific unwind info: the
206+
> signedness of the _incorrect_ return address is meaningless.
207207
208208
Assignment of RAStates to newly generated instructions is done in `inferUnknownStates`.
209-
We have three different cases to cover:
209+
We have two different cases to cover:
210210

211211
1. If a BasicBlock has some instructions with known RA state, and some without, we
212212
can copy the RAState of known instructions to the unknown ones. As the control
213-
flow only changes between BasicBlocks, instructions in the same BasicBlock have the
214-
same return address.
213+
flow only changes between BasicBlocks, instructions in the same BasicBlock have
214+
the same return address. (The exception is noreturn calls, but these would only
215+
cause problems, if the newly inserted instruction is right after the call.)
215216

216-
2. If all instructions in a BasicBlock are unknown, we can look at all CFG neighbors
217-
(that is predecessors/successors). The RAState should be the same as of the
218-
neighboring blocks. Conflicting RAStates in neighbors indicate an error. Such
219-
functions should be ignored.
220-
221-
3. If a BasicBlock has no CFG neighbors, we have to copy the RAState of the previous
222-
BasicBlock in layout order.
223-
224-
If any BasicBlocks remain with unknown instructions, the function will be ignored.
217+
2. If a BasicBlock has no instructions with known RAState, we have to copy the
218+
RAState of the previous BasicBlock in layout order.
225219

226220
### Optimizations requiring special attention
227221

0 commit comments

Comments
 (0)