https://gcc.gnu.org/g:6f1060bd18d061ea8b1bb8c9904957a738e48850

commit r17-5372-g6f1060bd18d061ea8b1bb8c9904957a738e48850
Author: Trevor Saunders <[email protected]>
Date:   Fri Oct 16 18:59:06 2026 +0200

    Pass an rtx_insn * to replace_label
    
    gcc/ChangeLog:
    
            * rtl.h (replace_label): Take rtx_insn * labels.
            * rtlanal.cc (replace_label): Likewise.

Diff:
---
 gcc/rtl.h      | 2 +-
 gcc/rtlanal.cc | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/gcc/rtl.h b/gcc/rtl.h
index 9cc9ef351f63..efbbb61b2578 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -3782,7 +3782,7 @@ extern bool can_nonlocal_goto (const rtx_insn *);
 extern void copy_reg_eh_region_note_forward (rtx, rtx_insn *, rtx);
 extern void copy_reg_eh_region_note_backward (rtx, rtx_insn *, rtx);
 extern rtx replace_rtx (rtx, rtx, rtx, bool = false);
-extern void replace_label (rtx *, rtx, rtx, bool);
+extern void replace_label (rtx *, rtx_insn *, rtx_insn *, bool);
 extern void replace_label_in_insn (rtx_insn *, rtx_insn *, rtx_insn *, bool);
 extern bool rtx_referenced_p (const_rtx, const_rtx);
 extern bool tablejump_p (const rtx_insn *, rtx_insn **, rtx_jump_table_data 
**);
diff --git a/gcc/rtlanal.cc b/gcc/rtlanal.cc
index 4a060449dbcb..eed715243c1b 100644
--- a/gcc/rtlanal.cc
+++ b/gcc/rtlanal.cc
@@ -3416,7 +3416,8 @@ replace_rtx (rtx x, rtx from, rtx to, bool all_regs)
    the change in LABEL_NUSES if UPDATE_LABEL_NUSES.  */
 
 void
-replace_label (rtx *loc, rtx old_label, rtx new_label, bool update_label_nuses)
+replace_label (rtx *loc, rtx_insn *old_label, rtx_insn *new_label,
+              bool update_label_nuses)
 {
   /* Handle jump tables specially, since ADDR_{DIFF_,}VECs can be long.  */
   rtx x = *loc;

Reply via email to