https://gcc.gnu.org/g:3169ed19168a56443e3dc88e2ce79299ad91fe76
commit r17-6194-g3169ed19168a56443e3dc88e2ce79299ad91fe76 Author: Trevor Saunders <[email protected]> Date: Sun Nov 8 23:24:52 2026 +0000 Use functions for the CROSSING_JUMP_P flag gcc/ChangeLog: * rtl.h (CROSSING_JUMP_P, set_crossing_jump): Use functions on an rtx_insn *. * bb-reorder.cc (update_crossing_jump_flags): Use set_crossing_jump to store the flag. * cfgrtl.cc (fixup_partition_crossing): Likewise. * emit-rtl.cc (try_split, emit_copy_of_insn_after): Likewise. * haifa-sched.cc (sched_create_recovery_edges): Likewise. * jump.cc (redirect_jump_2): Likewise. * recog.cc (peep2_attempt): Likewise. * reorg.cc (fill_slots_from_thread, relax_delay_slots): Likewise. Signed-off-by: Trevor Saunders <[email protected]> Diff: --- gcc/bb-reorder.cc | 2 +- gcc/cfgrtl.cc | 4 ++-- gcc/emit-rtl.cc | 4 ++-- gcc/haifa-sched.cc | 2 +- gcc/jump.cc | 2 +- gcc/recog.cc | 2 +- gcc/reorg.cc | 6 +++--- gcc/rtl.h | 15 ++++++++++++--- 8 files changed, 23 insertions(+), 14 deletions(-) diff --git a/gcc/bb-reorder.cc b/gcc/bb-reorder.cc index 81a1e0f9ddda..6aac52b0661d 100644 --- a/gcc/bb-reorder.cc +++ b/gcc/bb-reorder.cc @@ -2334,7 +2334,7 @@ update_crossing_jump_flags (void) if (e->flags & EDGE_CROSSING) { if (JUMP_P (BB_END (bb))) - CROSSING_JUMP_P (BB_END (bb)) = 1; + set_crossing_jump (BB_END (bb), true); break; } } diff --git a/gcc/cfgrtl.cc b/gcc/cfgrtl.cc index c7c76967c3e7..cf265755ecee 100644 --- a/gcc/cfgrtl.cc +++ b/gcc/cfgrtl.cc @@ -1498,7 +1498,7 @@ fixup_partition_crossing (edge e) { e->flags |= EDGE_CROSSING; if (JUMP_P (BB_END (e->src))) - CROSSING_JUMP_P (BB_END (e->src)) = 1; + set_crossing_jump (BB_END (e->src), true); } else if (BB_PARTITION (e->src) == BB_PARTITION (e->dest)) { @@ -1518,7 +1518,7 @@ fixup_partition_crossing (edge e) break; } if (!has_crossing_succ) - CROSSING_JUMP_P (BB_END (e->src)) = 0; + set_crossing_jump (BB_END (e->src), false); } } } diff --git a/gcc/emit-rtl.cc b/gcc/emit-rtl.cc index 763225b57e9a..46cc60e66c9f 100644 --- a/gcc/emit-rtl.cc +++ b/gcc/emit-rtl.cc @@ -4051,7 +4051,7 @@ try_split (rtx pat, rtx_insn *trial, int last) if (JUMP_P (insn)) { if (JUMP_P (trial)) - CROSSING_JUMP_P (insn) = CROSSING_JUMP_P (trial); + set_crossing_jump (insn, CROSSING_JUMP_P (trial)); mark_jump_label (PATTERN (insn), insn, 0); njumps++; if (probability.initialized_p () @@ -6664,7 +6664,7 @@ emit_copy_of_insn_after (rtx_insn *insn, rtx_insn *after) case JUMP_INSN: new_rtx = emit_jump_insn_after (copy_insn (PATTERN (insn)), after); - CROSSING_JUMP_P (new_rtx) = CROSSING_JUMP_P (insn); + set_crossing_jump (new_rtx, CROSSING_JUMP_P (insn)); break; case DEBUG_INSN: diff --git a/gcc/haifa-sched.cc b/gcc/haifa-sched.cc index 1382713121ae..24054eed3612 100644 --- a/gcc/haifa-sched.cc +++ b/gcc/haifa-sched.cc @@ -8330,7 +8330,7 @@ sched_create_recovery_edges (basic_block first_bb, basic_block rec, { /* We don't need the same note for the check because any_condjump_p (check) == true. */ - CROSSING_JUMP_P (jump) = 1; + set_crossing_jump (jump, true); } edge_flags = EDGE_CROSSING; } diff --git a/gcc/jump.cc b/gcc/jump.cc index 545f1cb85f70..0f8776e35525 100644 --- a/gcc/jump.cc +++ b/gcc/jump.cc @@ -1552,7 +1552,7 @@ redirect_jump_2 (rtx_jump_insn *jump, rtx olabel, rtx nlabel, int delete_unused, label and are now changing it into a direct conditional return. The jump is no longer crossing in that case. */ if (ANY_RETURN_P (nlabel)) - CROSSING_JUMP_P (jump) = 0; + set_crossing_jump (jump, false); if (!ANY_RETURN_P (olabel) && --LABEL_NUSES (olabel) == 0 && delete_unused > 0 diff --git a/gcc/recog.cc b/gcc/recog.cc index 388aeeac8ae6..188ebc378343 100644 --- a/gcc/recog.cc +++ b/gcc/recog.cc @@ -4177,7 +4177,7 @@ peep2_attempt (basic_block bb, rtx_insn *insn, int match_len, rtx_insn *attempt) peep2_insn_data[i].insn, INSN_LOCATION (peepinsn)); if (JUMP_P (peepinsn) && JUMP_P (last)) - CROSSING_JUMP_P (last) = CROSSING_JUMP_P (peepinsn); + set_crossing_jump (last, CROSSING_JUMP_P (peepinsn)); before_try = PREV_INSN (insn); delete_insn_chain (insn, peep2_insn_data[i].insn, false); diff --git a/gcc/reorg.cc b/gcc/reorg.cc index d9d2fe46a3d0..a0db455e0c43 100644 --- a/gcc/reorg.cc +++ b/gcc/reorg.cc @@ -2747,7 +2747,7 @@ fill_slots_from_thread (rtx_jump_insn *insn, rtx condition, { reorg_redirect_jump (insn, label); if (crossing) - CROSSING_JUMP_P (insn) = 1; + set_crossing_jump (insn, true); } } } @@ -3125,7 +3125,7 @@ relax_delay_slots (rtx_insn *first) { reorg_redirect_jump (jump_insn, target_label); if (crossing) - CROSSING_JUMP_P (jump_insn) = 1; + set_crossing_jump (jump_insn, true); } /* See if this jump conditionally branches around an unconditional @@ -3282,7 +3282,7 @@ relax_delay_slots (rtx_insn *first) reorg_redirect_jump (delay_jump_insn, trial); target_label = trial; if (crossing) - CROSSING_JUMP_P (delay_jump_insn) = 1; + set_crossing_jump (delay_jump_insn, true); } /* If the first insn at TARGET_LABEL is redundant with a previous diff --git a/gcc/rtl.h b/gcc/rtl.h index 405232b5bd58..b94f1e9f9061 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -1583,9 +1583,18 @@ jump_table_for_label (const rtx_code_label *label) (RTL_FLAG_CHECK6 ("RTX_FRAME_RELATED_P", (RTX), DEBUG_INSN, INSN, \ CALL_INSN, JUMP_INSN, BARRIER, SET)->frame_related) -/* 1 if JUMP RTX is a crossing jump. */ -#define CROSSING_JUMP_P(RTX) \ - (RTL_FLAG_CHECK1 ("CROSSING_JUMP_P", (RTX), JUMP_INSN)->jump) +/* If JUMP RTX is a crossing jump. */ +inline bool +CROSSING_JUMP_P (const rtx_insn *insn) +{ + return RTL_FLAG_CHECK1 ("CROSSING_JUMP_P", insn, JUMP_INSN)->jump; +} + +inline void +set_crossing_jump (rtx_insn *insn, bool set) +{ + RTL_FLAG_CHECK1 ("CROSSING_JUMP_P", insn, JUMP_INSN)->jump = set; +} /* 1 if RTX is a call to a const function. Built from ECF_CONST and TREE_READONLY. */
