https://gcc.gnu.org/g:62451823e6408956dd2b9dc92845c3d62d301700
commit r17-6036-g62451823e6408956dd2b9dc92845c3d62d301700 Author: Trevor Saunders <[email protected]> Date: Wed Nov 4 11:24:45 2026 +0000 Pass an rtx_jump_insn * to the jump helpers gcc/ChangeLog: * rtl.h (redirect_jump_1): Take an rtx_jump_insn *. * jump.cc (redirect_jump_1, invert_exp_1): Likewise. * reorg.cc (redirect_with_delay_slots_safe_p, redirect_with_delay_list_safe_p): Likewise. Diff: --- gcc/jump.cc | 6 +++--- gcc/reorg.cc | 10 ++++++---- gcc/rtl.h | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/gcc/jump.cc b/gcc/jump.cc index d5ac39b49d3a..545f1cb85f70 100644 --- a/gcc/jump.cc +++ b/gcc/jump.cc @@ -63,7 +63,7 @@ static void mark_all_labels (rtx_insn *); static void mark_jump_label_1 (rtx, rtx_insn *, bool, bool); static void mark_jump_label_asm (rtx, rtx_insn *); static void redirect_exp_1 (rtx *, rtx, rtx, rtx_insn *); -static bool invert_exp_1 (rtx, rtx_insn *); +static bool invert_exp_1 (rtx, rtx_jump_insn *); /* Worker for rebuild_jump_labels and rebuild_jump_labels_chain. */ static void @@ -1453,7 +1453,7 @@ redirect_exp_1 (rtx *loc, rtx olabel, rtx nlabel, rtx_insn *insn) not see how to do that. */ bool -redirect_jump_1 (rtx_insn *jump, rtx nlabel) +redirect_jump_1 (rtx_jump_insn *jump, rtx nlabel) { int ochanges = num_validated_changes (); rtx *loc, asmop; @@ -1566,7 +1566,7 @@ redirect_jump_2 (rtx_jump_insn *jump, rtx olabel, rtx nlabel, int delete_unused, /* Invert the jump condition X contained in jump insn INSN. Accrue the modifications into the change group. Return true for success. */ static bool -invert_exp_1 (rtx x, rtx_insn *insn) +invert_exp_1 (rtx x, rtx_jump_insn *insn) { RTX_CODE code = GET_CODE (x); diff --git a/gcc/reorg.cc b/gcc/reorg.cc index cde1a5a8303a..19cb5259ff05 100644 --- a/gcc/reorg.cc +++ b/gcc/reorg.cc @@ -189,8 +189,9 @@ static int get_jump_flags (const rtx_insn *, rtx); static int mostly_true_jump (rtx_insn *); static rtx get_branch_condition (const rtx_insn *, rtx); static bool condition_dominates_p (rtx, const rtx_insn *); -static bool redirect_with_delay_slots_safe_p (rtx_insn *, rtx, rtx_insn *); -static bool redirect_with_delay_list_safe_p (rtx_insn *, rtx, +static bool redirect_with_delay_slots_safe_p (rtx_jump_insn *, + rtx, rtx_insn *); +static bool redirect_with_delay_list_safe_p (rtx_jump_insn *, rtx, const vec<rtx_insn *> &); static bool check_annul_list_true_false (bool, const vec<rtx_insn *> &); static void steal_delay_list_from_target (rtx_insn *, rtx, rtx_sequence *, @@ -879,7 +880,8 @@ condition_dominates_p (rtx condition, const rtx_insn *insn) any insns already in the delay slot of JUMP. */ static bool -redirect_with_delay_slots_safe_p (rtx_insn *jump, rtx newlabel, rtx_insn *seq) +redirect_with_delay_slots_safe_p (rtx_jump_insn *jump, rtx newlabel, + rtx_insn *seq) { int flags, i; rtx_sequence *pat = as_a <rtx_sequence *> (PATTERN (seq)); @@ -911,7 +913,7 @@ redirect_with_delay_slots_safe_p (rtx_insn *jump, rtx newlabel, rtx_insn *seq) any insns we wish to place in the delay slot of JUMP. */ static bool -redirect_with_delay_list_safe_p (rtx_insn *jump, rtx newlabel, +redirect_with_delay_list_safe_p (rtx_jump_insn *jump, rtx newlabel, const vec<rtx_insn *> &delay_list) { /* Make sure all the insns in DELAY_LIST would still be diff --git a/gcc/rtl.h b/gcc/rtl.h index 27f0ef1964a6..40fcfdce5d02 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -4331,7 +4331,7 @@ extern bool invert_jump (rtx_jump_insn *, rtx, int); extern bool rtx_renumbered_equal_p (const_rtx, const_rtx); extern int true_regnum (const_rtx); extern unsigned int reg_or_subregno (const_rtx); -extern bool redirect_jump_1 (rtx_insn *, rtx); +extern bool redirect_jump_1 (rtx_jump_insn *, rtx); extern void redirect_jump_2 (rtx_jump_insn *, rtx, rtx, int, int); extern bool redirect_jump (rtx_jump_insn *, rtx, int); extern void rebuild_jump_labels (rtx_insn *);
