diff options
author | Bernd Schmidt <bernd.schmidt@analog.com> | 2005-06-02 08:39:06 +0000 |
---|---|---|
committer | Bernd Schmidt <bernds@gcc.gnu.org> | 2005-06-02 08:39:06 +0000 |
commit | bf8f8254eae6616841fcebe1af3de1d921bd0c24 (patch) | |
tree | 1690bbaff25f12d9831a1516662c851a5e636123 | |
parent | d29e107f39c435fd575e35d4aabd3984ede245cd (diff) | |
download | gcc-bf8f8254eae6616841fcebe1af3de1d921bd0c24.zip gcc-bf8f8254eae6616841fcebe1af3de1d921bd0c24.tar.gz gcc-bf8f8254eae6616841fcebe1af3de1d921bd0c24.tar.bz2 |
reload1.c (reload): Undo 2005-04-20 change.
* reload1.c (reload): Undo 2005-04-20 change. Make sure we detect
the correct set of init_insns that need deletion.
From-SVN: r100481
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/reload1.c | 19 |
2 files changed, 13 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cc70e56..9891a77 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-06-02 Bernd Schmidt <bernd.schmidt@analog.com> + + * reload1.c (reload): Undo 2005-04-20 change. Make sure we detect + the correct set of init_insns that need deletion. + 2005-06-02 Kaz Kojima <kkojima@gcc.gnu.org> * config/sh/sh.h (TARGET_FPU_DOUBLE): Use MASK_SH4. diff --git a/gcc/reload1.c b/gcc/reload1.c index 0caa411..78484aa 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -752,7 +752,7 @@ reload (rtx first, int global) for equivalences. This is overly conservative as we could find all sets of the destination pseudo and remove them as they should be redundant. */ - if (memory_operand (x, VOIDmode) && ! MEM_READONLY_P (x)) + if (memory_operand (x, VOIDmode)) { /* Always unshare the equivalence, so we can substitute into this insn without touching the @@ -787,14 +787,8 @@ reload (rtx first, int global) else continue; - /* If this register is being made equivalent to a MEM - and the MEM is not SET_SRC, the equivalencing insn - is one with the MEM as a SET_DEST and it occurs later. - So don't mark this insn now. */ - if (!MEM_P (x) - || rtx_equal_p (SET_SRC (set), x)) - reg_equiv_init[i] - = gen_rtx_INSN_LIST (VOIDmode, insn, reg_equiv_init[i]); + reg_equiv_init[i] + = gen_rtx_INSN_LIST (VOIDmode, insn, reg_equiv_init[i]); } } } @@ -806,9 +800,12 @@ reload (rtx first, int global) && reg_equiv_memory_loc[REGNO (SET_SRC (set))] && rtx_equal_p (SET_DEST (set), reg_equiv_memory_loc[REGNO (SET_SRC (set))])) + /* Equivalences made this way only have one initializing insn. + Previously, we may have set reg_equiv_init when encountering a + SET of this pseudo; discard that insn since it does not set up + an equivalence. */ reg_equiv_init[REGNO (SET_SRC (set))] - = gen_rtx_INSN_LIST (VOIDmode, insn, - reg_equiv_init[REGNO (SET_SRC (set))]); + = gen_rtx_INSN_LIST (VOIDmode, insn, NULL_RTX); if (INSN_P (insn)) scan_paradoxical_subregs (PATTERN (insn)); |