diff options
author | H.J. Lu <hjl@gnu.org> | 1998-05-08 13:14:32 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1998-05-08 07:14:32 -0600 |
commit | d7c2e385ea6be93ed92cbdeaa6b39215ad196dfb (patch) | |
tree | 24a54ea2ffe64ccf6deedae31c29ed5838ba2767 | |
parent | 507c117699e8f4786557f57f1f6038eabd3e4963 (diff) | |
download | gcc-d7c2e385ea6be93ed92cbdeaa6b39215ad196dfb.zip gcc-d7c2e385ea6be93ed92cbdeaa6b39215ad196dfb.tar.gz gcc-d7c2e385ea6be93ed92cbdeaa6b39215ad196dfb.tar.bz2 |
reload1.c (emit_reload_insns): When performing expensive optimizations...
* reload1.c (emit_reload_insns): When performing expensive
optimizations, do not output the last reload insn if OLD is
not the dest of NSN and is in the src and is clobbered by INSN.
From-SVN: r19634
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/reload1.c | 16 |
2 files changed, 20 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6d74d45..4f36e06 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Fri May 8 14:13:21 1998 H.J. Lu (hjl@gnu.org) + + * reload1.c (emit_reload_insns): When performing expensive + optimizations, do not output the last reload insn if OLD is + not the dest of NSN and is in the src and is clobbered by INSN. + Fri May 8 13:59:31 1998 Paul Eggert <eggert@twinsun.com> * dwarf2out.c: Don't assume that `.section ".text"' causes the diff --git a/gcc/reload1.c b/gcc/reload1.c index fc399df..65e5d65 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -6755,8 +6755,20 @@ emit_reload_insns (insn) /* Output the last reload insn. */ if (! special) - gen_reload (old, reloadreg, reload_opnum[j], - reload_when_needed[j]); + { + rtx set; + + /* Don't output the last reload if OLD is not the dest of + INSN and is in the src and is clobbered by INSN. */ + if (! flag_expensive_optimizations + || GET_CODE (old) != REG + || !(set = single_set (insn)) + || rtx_equal_p (old, SET_DEST (set)) + || !reg_mentioned_p (old, SET_SRC (set)) + || !regno_clobbered_p (REGNO (old), insn)) + gen_reload (old, reloadreg, reload_opnum[j], + reload_when_needed[j]); + } #ifdef PRESERVE_DEATH_INFO_REGNO_P /* If final will look at death notes for this reg, |