aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2011-03-30 09:18:30 -0600
committerJeff Law <law@gcc.gnu.org>2011-03-30 09:18:30 -0600
commitf2034d064c29d9620c5562b2b5b517bdc6c7a672 (patch)
treef600906a3414c87afd503872e7330139e7eb57ed /gcc/config
parent159b81b00a8683b5fe7efdbaff73391a8d9e2d96 (diff)
downloadgcc-f2034d064c29d9620c5562b2b5b517bdc6c7a672.zip
gcc-f2034d064c29d9620c5562b2b5b517bdc6c7a672.tar.gz
gcc-f2034d064c29d9620c5562b2b5b517bdc6c7a672.tar.bz2
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro.
* reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/alpha/alpha.c2
-rw-r--r--gcc/config/arm/arm.c12
-rw-r--r--gcc/config/avr/avr.h4
-rw-r--r--gcc/config/frv/predicates.md2
-rw-r--r--gcc/config/m68k/m68k.c8
-rw-r--r--gcc/config/microblaze/microblaze.c4
-rw-r--r--gcc/config/mn10300/mn10300.c2
-rw-r--r--gcc/config/pa/pa.c8
-rw-r--r--gcc/config/vax/vax.c5
-rw-r--r--gcc/config/xtensa/xtensa.c2
10 files changed, 24 insertions, 25 deletions
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index d6caa27..8aabeb2 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -548,7 +548,7 @@ resolve_reload_operand (rtx op)
if (REG_P (tmp)
&& REGNO (tmp) >= FIRST_PSEUDO_REGISTER)
{
- op = reg_equiv_memory_loc[REGNO (tmp)];
+ op = reg_equiv_memory_loc (REGNO (tmp));
if (op == 0)
return 0;
}
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 57fe96c..56dc85e 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -10897,14 +10897,14 @@ arm_reload_in_hi (rtx *operands)
are two cases here: the first where there is a simple
stack-slot replacement and a second where the stack-slot is
out of range, or is used as a subreg. */
- if (reg_equiv_mem[REGNO (ref)])
+ if (reg_equiv_mem (REGNO (ref)))
{
- ref = reg_equiv_mem[REGNO (ref)];
+ ref = reg_equiv_mem (REGNO (ref));
base = find_replacement (&XEXP (ref, 0));
}
else
/* The slot is out of range, or was dressed up in a SUBREG. */
- base = reg_equiv_address[REGNO (ref)];
+ base = reg_equiv_address (REGNO (ref));
}
else
base = find_replacement (&XEXP (ref, 0));
@@ -11014,14 +11014,14 @@ arm_reload_out_hi (rtx *operands)
are two cases here: the first where there is a simple
stack-slot replacement and a second where the stack-slot is
out of range, or is used as a subreg. */
- if (reg_equiv_mem[REGNO (ref)])
+ if (reg_equiv_mem (REGNO (ref)))
{
- ref = reg_equiv_mem[REGNO (ref)];
+ ref = reg_equiv_mem (REGNO (ref));
base = find_replacement (&XEXP (ref, 0));
}
else
/* The slot is out of range, or was dressed up in a SUBREG. */
- base = reg_equiv_address[REGNO (ref)];
+ base = reg_equiv_address (REGNO (ref));
}
else
base = find_replacement (&XEXP (ref, 0));
diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h
index 47bb3fb..ca73bad 100644
--- a/gcc/config/avr/avr.h
+++ b/gcc/config/avr/avr.h
@@ -393,14 +393,14 @@ do { \
} \
if (GET_CODE (X) == PLUS \
&& REG_P (XEXP (X, 0)) \
- && reg_equiv_constant[REGNO (XEXP (X, 0))] == 0 \
+ && (reg_equiv_constant (REGNO (XEXP (X, 0))) == 0) \
&& GET_CODE (XEXP (X, 1)) == CONST_INT \
&& INTVAL (XEXP (X, 1)) >= 1) \
{ \
int fit = INTVAL (XEXP (X, 1)) <= (64 - GET_MODE_SIZE (MODE)); \
if (fit) \
{ \
- if (reg_equiv_address[REGNO (XEXP (X, 0))] != 0) \
+ if (reg_equiv_address (REGNO (XEXP (X, 0))) != 0) \
{ \
int regno = REGNO (XEXP (X, 0)); \
rtx mem = make_memloc (X, regno); \
diff --git a/gcc/config/frv/predicates.md b/gcc/config/frv/predicates.md
index aeef3d8..e8bc35a 100644
--- a/gcc/config/frv/predicates.md
+++ b/gcc/config/frv/predicates.md
@@ -55,7 +55,7 @@
tmp = SUBREG_REG (tmp);
if (GET_CODE (tmp) == REG
&& REGNO (tmp) >= FIRST_PSEUDO_REGISTER)
- op = reg_equiv_memory_loc[REGNO (tmp)];
+ op = reg_equiv_memory_loc (REGNO (tmp));
}
return op && memory_operand (op, mode);
diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c
index 3a75385..40041b7 100644
--- a/gcc/config/m68k/m68k.c
+++ b/gcc/config/m68k/m68k.c
@@ -3729,7 +3729,7 @@ emit_move_sequence (rtx *operands, enum machine_mode mode, rtx scratch_reg)
if (scratch_reg
&& reload_in_progress && GET_CODE (operand0) == REG
&& REGNO (operand0) >= FIRST_PSEUDO_REGISTER)
- operand0 = reg_equiv_mem[REGNO (operand0)];
+ operand0 = reg_equiv_mem (REGNO (operand0));
else if (scratch_reg
&& reload_in_progress && GET_CODE (operand0) == SUBREG
&& GET_CODE (SUBREG_REG (operand0)) == REG
@@ -3738,7 +3738,7 @@ emit_move_sequence (rtx *operands, enum machine_mode mode, rtx scratch_reg)
/* We must not alter SUBREG_BYTE (operand0) since that would confuse
the code which tracks sets/uses for delete_output_reload. */
rtx temp = gen_rtx_SUBREG (GET_MODE (operand0),
- reg_equiv_mem [REGNO (SUBREG_REG (operand0))],
+ reg_equiv_mem (REGNO (SUBREG_REG (operand0))),
SUBREG_BYTE (operand0));
operand0 = alter_subreg (&temp);
}
@@ -3746,7 +3746,7 @@ emit_move_sequence (rtx *operands, enum machine_mode mode, rtx scratch_reg)
if (scratch_reg
&& reload_in_progress && GET_CODE (operand1) == REG
&& REGNO (operand1) >= FIRST_PSEUDO_REGISTER)
- operand1 = reg_equiv_mem[REGNO (operand1)];
+ operand1 = reg_equiv_mem (REGNO (operand1));
else if (scratch_reg
&& reload_in_progress && GET_CODE (operand1) == SUBREG
&& GET_CODE (SUBREG_REG (operand1)) == REG
@@ -3755,7 +3755,7 @@ emit_move_sequence (rtx *operands, enum machine_mode mode, rtx scratch_reg)
/* We must not alter SUBREG_BYTE (operand0) since that would confuse
the code which tracks sets/uses for delete_output_reload. */
rtx temp = gen_rtx_SUBREG (GET_MODE (operand1),
- reg_equiv_mem [REGNO (SUBREG_REG (operand1))],
+ reg_equiv_mem (REGNO (SUBREG_REG (operand1))),
SUBREG_BYTE (operand1));
operand1 = alter_subreg (&temp);
}
diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
index 468cfd3..6ea5fa2 100644
--- a/gcc/config/microblaze/microblaze.c
+++ b/gcc/config/microblaze/microblaze.c
@@ -326,8 +326,8 @@ double_memory_operand (rtx op, enum machine_mode mode)
&& GET_CODE (op) == REG
&& REGNO (op) >= FIRST_PSEUDO_REGISTER
&& reg_renumber[REGNO (op)] < 0
- && reg_equiv_mem[REGNO (op)] != 0
- && double_memory_operand (reg_equiv_mem[REGNO (op)], mode))
+ && reg_equiv_mem (REGNO (op)) != 0
+ && double_memory_operand (reg_equiv_mem (REGNO (op)), mode))
return 1;
return 0;
}
diff --git a/gcc/config/mn10300/mn10300.c b/gcc/config/mn10300/mn10300.c
index cad6a0d..f00c53e 100644
--- a/gcc/config/mn10300/mn10300.c
+++ b/gcc/config/mn10300/mn10300.c
@@ -1430,7 +1430,7 @@ mn10300_secondary_reload (bool in_p, rtx x, reg_class_t rclass_i,
if (xregno >= FIRST_PSEUDO_REGISTER && xregno != INVALID_REGNUM)
{
- addr = reg_equiv_mem [xregno];
+ addr = reg_equiv_mem (xregno);
if (addr)
addr = XEXP (addr, 0);
}
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index c1bf358..ab64851 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -1638,7 +1638,7 @@ emit_move_sequence (rtx *operands, enum machine_mode mode, rtx scratch_reg)
if (scratch_reg
&& reload_in_progress && GET_CODE (operand0) == REG
&& REGNO (operand0) >= FIRST_PSEUDO_REGISTER)
- operand0 = reg_equiv_mem[REGNO (operand0)];
+ operand0 = reg_equiv_mem (REGNO (operand0));
else if (scratch_reg
&& reload_in_progress && GET_CODE (operand0) == SUBREG
&& GET_CODE (SUBREG_REG (operand0)) == REG
@@ -1647,7 +1647,7 @@ emit_move_sequence (rtx *operands, enum machine_mode mode, rtx scratch_reg)
/* We must not alter SUBREG_BYTE (operand0) since that would confuse
the code which tracks sets/uses for delete_output_reload. */
rtx temp = gen_rtx_SUBREG (GET_MODE (operand0),
- reg_equiv_mem [REGNO (SUBREG_REG (operand0))],
+ reg_equiv_mem (REGNO (SUBREG_REG (operand0))),
SUBREG_BYTE (operand0));
operand0 = alter_subreg (&temp);
}
@@ -1655,7 +1655,7 @@ emit_move_sequence (rtx *operands, enum machine_mode mode, rtx scratch_reg)
if (scratch_reg
&& reload_in_progress && GET_CODE (operand1) == REG
&& REGNO (operand1) >= FIRST_PSEUDO_REGISTER)
- operand1 = reg_equiv_mem[REGNO (operand1)];
+ operand1 = reg_equiv_mem (REGNO (operand1));
else if (scratch_reg
&& reload_in_progress && GET_CODE (operand1) == SUBREG
&& GET_CODE (SUBREG_REG (operand1)) == REG
@@ -1664,7 +1664,7 @@ emit_move_sequence (rtx *operands, enum machine_mode mode, rtx scratch_reg)
/* We must not alter SUBREG_BYTE (operand0) since that would confuse
the code which tracks sets/uses for delete_output_reload. */
rtx temp = gen_rtx_SUBREG (GET_MODE (operand1),
- reg_equiv_mem [REGNO (SUBREG_REG (operand1))],
+ reg_equiv_mem (REGNO (SUBREG_REG (operand1))),
SUBREG_BYTE (operand1));
operand1 = alter_subreg (&temp);
}
diff --git a/gcc/config/vax/vax.c b/gcc/config/vax/vax.c
index 9656d73..c159354 100644
--- a/gcc/config/vax/vax.c
+++ b/gcc/config/vax/vax.c
@@ -1676,10 +1676,9 @@ nonindexed_address_p (rtx x, bool strict)
rtx xfoo0;
if (REG_P (x))
{
- extern rtx *reg_equiv_mem;
if (! reload_in_progress
- || reg_equiv_mem[REGNO (x)] == 0
- || indirectable_address_p (reg_equiv_mem[REGNO (x)], strict, false))
+ || reg_equiv_mem (REGNO (x)) == 0
+ || indirectable_address_p (reg_equiv_mem (REGNO (x)), strict, false))
return true;
}
if (indirectable_constant_address_p (x, false))
diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
index e7c395b..5623cc1 100644
--- a/gcc/config/xtensa/xtensa.c
+++ b/gcc/config/xtensa/xtensa.c
@@ -1093,7 +1093,7 @@ fixup_subreg_mem (rtx x)
{
rtx temp =
gen_rtx_SUBREG (GET_MODE (x),
- reg_equiv_mem [REGNO (SUBREG_REG (x))],
+ reg_equiv_mem (REGNO (SUBREG_REG (x))),
SUBREG_BYTE (x));
x = alter_subreg (&temp);
}