aboutsummaryrefslogtreecommitdiff
path: root/gcc/reload1.c
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@bitrange.com>2001-08-25 21:39:47 +0000
committerHans-Peter Nilsson <hp@gcc.gnu.org>2001-08-25 21:39:47 +0000
commitcf728d61ac9eab580ca831f1e52584c5b828463a (patch)
tree3f04cc547069c87b98593d538db187624b02a7b5 /gcc/reload1.c
parent6ab16dd9ad5daa079e0ad3312b1324a4dd51b8bb (diff)
downloadgcc-cf728d61ac9eab580ca831f1e52584c5b828463a.zip
gcc-cf728d61ac9eab580ca831f1e52584c5b828463a.tar.gz
gcc-cf728d61ac9eab580ca831f1e52584c5b828463a.tar.bz2
reload1.c (reload): Make all entries in reg_equiv_memory_loc unshared.
* reload1.c (reload): Make all entries in reg_equiv_memory_loc unshared. * reload.c (make_memloc): Copy result if it is still reg_equiv_memory_loc[regno] on return. (subst_reloads) [ENABLE_CHECKING]: Check that none of reg_equiv_constant, reg_equiv_memory_loc, reg_equiv_address and reg_equiv_mem are modified by the substitutions. From-SVN: r45177
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r--gcc/reload1.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 51a2ba9..8370840 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -782,12 +782,10 @@ reload (first, global)
{
if (GET_CODE (x) == MEM)
{
- /* If the operand is a PLUS, the MEM may be shared,
- so make sure we have an unshared copy here. */
- if (GET_CODE (XEXP (x, 0)) == PLUS)
- x = copy_rtx (x);
-
- reg_equiv_memory_loc[i] = x;
+ /* Always unshare the equivalence, so we can
+ substitute into this insn without touching the
+ equivalence. */
+ reg_equiv_memory_loc[i] = copy_rtx (x);
}
else if (function_invariant_p (x))
{