]> gcc.gnu.org Git - gcc.git/commitdiff
reload1.c (emit_reload_insns): When performing expensive optimizations...
authorH.J. Lu <hjl@gnu.org>
Fri, 8 May 1998 13:14:32 +0000 (13:14 +0000)
committerJeff Law <law@gcc.gnu.org>
Fri, 8 May 1998 13:14:32 +0000 (07:14 -0600)
        * 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

gcc/ChangeLog
gcc/reload1.c

index 6d74d45c4e5811c50b40334f0f11cfbd79738c50..4f36e060afb6c74af0e04dc017c91525361b566a 100644 (file)
@@ -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
index fc399dfa3cba0de4950cd6912d5e55fc1d0de625..65e5d65f26b459e47c73e18e113463c116be120b 100644 (file)
@@ -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,
This page took 0.088855 seconds and 5 git commands to generate.