Skip to content

Commit b23fbd1

Browse files
committed
[BOLT] Update InsertNegateRAStatePass.h
- remove unused declarations - update comments
1 parent 7acba33 commit b23fbd1

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

bolt/include/bolt/Passes/InsertNegateRAStatePass.h

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,30 +30,19 @@ class InsertNegateRAState : public BinaryFunctionPass {
3030
private:
3131
/// Because states are tracked as MCAnnotations on individual instructions,
3232
/// newly inserted instructions do not have a state associated with them.
33-
/// Uses fillUnknownStateInBB, fillUnknownBlocksInCFG and fillUnknownStubs in
34-
/// this order of priority.
33+
/// Uses fillUnknownStateInBB and fillUnknownStubs.
3534
void inferUnknownStates(BinaryFunction &BF);
3635

3736
/// Simple case: copy RAStates to unknown insts from previous inst.
38-
/// Account for signing and authenticating insts.
37+
/// If the first inst has unknown state, copy set it to the first known state.
38+
/// Accounts for signing and authenticating insts.
3939
void fillUnknownStateInBB(BinaryContext &BC, BinaryBasicBlock &BB);
4040

41-
/// Fill unknown RAStates in BBs with no successors/predecessors. These are
42-
/// Stubs inserted by LongJmp. As of #160989, we have to copy the RAState from
43-
/// the previous BB in the layout, because CFIs are already incorrect here.
41+
/// Fill in RAState in BasicBlocks consisting entirely of new instructions.
42+
/// As of #160989, we have to copy the RAState from the previous BB in the
43+
/// layout, because CFIs are already incorrect here.
4444
void fillUnknownStubs(BinaryFunction &BF);
4545

46-
/// Fills unknowns RAStates of BBs with successors/predecessors. Uses
47-
/// getRAStateByCFG to determine the RAState. Does more than one iteration if
48-
/// needed. Reports an error, if it cannot find the RAState for all BBs with
49-
/// predecessors/successors.
50-
void fillUnknownBlocksInCFG(BinaryFunction &BF);
51-
52-
/// For BBs which only hold instructions with unknown RAState, we check
53-
/// CFG neighbors (successors, predecessors) of the BB. If they have different
54-
/// RAStates, we report an inconsistency. Otherwise, we return the found
55-
/// RAState.
56-
std::optional<bool> getRAStateByCFG(BinaryBasicBlock &BB, BinaryFunction &BF);
5746
/// Returns the first known RAState from \p BB, or std::nullopt if all are
5847
/// unknown.
5948
std::optional<bool> getFirstKnownRAState(BinaryContext &BC,

0 commit comments

Comments
 (0)