From 618bccf9847235899b2b35452c8947d838007a3b Mon Sep 17 00:00:00 2001 From: Trevor Saunders Date: Sat, 2 May 2015 21:06:43 +0000 Subject: [PATCH] type reg_equiv_init as rtx_insn_list gcc/ChangeLog: 2015-05-02 Trevor Saunders * reload.h (struct reg_equivs_t): Change type of init to rtx_insn *. * ira.c (fix_reg_equiv_init): Adjust. * reload1.c (eliminate_regs_1): Likewise. (init_eliminable_invariants): Likewise. From-SVN: r222740 --- gcc/ChangeLog | 8 ++++++++ gcc/ira.c | 12 +++++++----- gcc/reload.h | 2 +- gcc/reload1.c | 8 ++++---- 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d3e23bd761e..59fa7f77c8d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2015-05-02 Trevor Saunders + + * reload.h (struct reg_equivs_t): Change type of init to + rtx_insn *. + * ira.c (fix_reg_equiv_init): Adjust. + * reload1.c (eliminate_regs_1): Likewise. + (init_eliminable_invariants): Likewise. + 2015-05-02 Trevor Saunders * cselib.c (fp_setter_insn): Take a rtx_insn *. diff --git a/gcc/ira.c b/gcc/ira.c index 25baa90845a..ab8e9cee86c 100644 --- a/gcc/ira.c +++ b/gcc/ira.c @@ -2709,20 +2709,22 @@ fix_reg_equiv_init (void) { int max_regno = max_reg_num (); int i, new_regno, max; - rtx x, prev, next, insn, set; + rtx set; + rtx_insn_list *x, *next, *prev; + rtx_insn *insn; if (max_regno_before_ira < max_regno) { max = vec_safe_length (reg_equivs); grow_reg_equivs (); for (i = FIRST_PSEUDO_REGISTER; i < max; i++) - for (prev = NULL_RTX, x = reg_equiv_init (i); + for (prev = NULL, x = reg_equiv_init (i); x != NULL_RTX; x = next) { - next = XEXP (x, 1); - insn = XEXP (x, 0); - set = single_set (as_a (insn)); + next = x->next (); + insn = x->insn (); + set = single_set (insn); ira_assert (set != NULL_RTX && (REG_P (SET_DEST (set)) || REG_P (SET_SRC (set)))); if (REG_P (SET_DEST (set)) diff --git a/gcc/reload.h b/gcc/reload.h index c777e541247..a58b9025bf5 100644 --- a/gcc/reload.h +++ b/gcc/reload.h @@ -239,7 +239,7 @@ struct reg_equivs_t /* The list of insns that initialized reg N from its equivalent constant or memory slot. */ - rtx init; + rtx_insn_list *init; }; #define reg_equiv_constant(ELT) \ diff --git a/gcc/reload1.c b/gcc/reload1.c index 82b106e6bc6..4c479069256 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -2619,7 +2619,7 @@ eliminate_regs_1 (rtx x, machine_mode mem_mode, rtx insn, mem_mode, insn, true, for_costs); /* There exists at least one use of REGNO that cannot be eliminated. Prevent the defining insn from being deleted. */ - reg_equiv_init (regno) = NULL_RTX; + reg_equiv_init (regno) = NULL; if (!for_costs) alter_reg (regno, -1, true); } @@ -4252,17 +4252,17 @@ init_eliminable_invariants (rtx_insn *first, bool do_subregs) { reg_equiv_memory_loc (i) = force_const_mem (mode, x); if (! reg_equiv_memory_loc (i)) - reg_equiv_init (i) = NULL_RTX; + reg_equiv_init (i) = NULL; } } else { - reg_equiv_init (i) = NULL_RTX; + reg_equiv_init (i) = NULL; continue; } } else - reg_equiv_init (i) = NULL_RTX; + reg_equiv_init (i) = NULL; } } -- 2.30.2