type reg_equiv_init as rtx_insn_list
gcc/ChangeLog: 2015-05-02 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * 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
This commit is contained in:
parent
8df68a8219
commit
618bccf984
4 changed files with 20 additions and 10 deletions
|
@ -1,3 +1,11 @@
|
|||
2015-05-02 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
|
||||
|
||||
* 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 <tbsaunde+gcc@tbsaunde.org>
|
||||
|
||||
* cselib.c (fp_setter_insn): Take a rtx_insn *.
|
||||
|
|
12
gcc/ira.c
12
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 <rtx_insn *> (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))
|
||||
|
|
|
@ -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) \
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue