combine.c (can_combine_p): Allow combining insns with REG_RETVAL notes.
authorJeffrey A Law <law@cygnus.com>
Tue, 18 Aug 1998 18:29:40 +0000 (18:29 +0000)
committerJeff Law <law@gcc.gnu.org>
Tue, 18 Aug 1998 18:29:40 +0000 (12:29 -0600)
* combine.c (can_combine_p): Allow combining insns with REG_RETVAL
notes.
(try_combine): Allow combining insns with REG_LIBCALL notes.

From-SVN: r21833

gcc/ChangeLog
gcc/combine.c

index 97dea44cce24cb42f282d1fc595a2c1c2936395c..02b3a5fe1136acb1271246d2d67363c9c7d74ed9 100644 (file)
@@ -5,6 +5,10 @@ Tue Aug 18 12:40:27 1998  Richard Henderson  <rth@cygnus.com>
 
 Tue Aug 18 10:33:30 1998  Jeffrey A Law  (law@cygnus.com)
 
+       * combine.c (can_combine_p): Allow combining insns with REG_RETVAL
+       notes.
+       (try_combine): Allow combining insns with REG_LIBCALL notes.
+
        * expr.c (emit_block_move): Do not call memcpy as a libcall
        instead build up a CALL_EXPR and call it like any other
        function.
index 155585b9f1c77c00f9f37f9b54366c199fb96a3b..5c050f2a9baaff104b9f053f3464029c9de2bee6 100644 (file)
@@ -958,8 +958,14 @@ can_combine_p (insn, i3, pred, succ, pdest, psrc)
       /* Don't substitute into an incremented register.  */
       || FIND_REG_INC_NOTE (i3, dest)
       || (succ && FIND_REG_INC_NOTE (succ, dest))
+#if 0
       /* Don't combine the end of a libcall into anything.  */
+      /* ??? This gives worse code, and appears to be unnecessary, since no
+        pass after flow uses REG_LIBCALL/REG_RETVAL notes.  Local-alloc does
+        use REG_RETVAL notes for noconflict blocks, but other code here
+        makes sure that those insns don't disappear.  */
       || find_reg_note (insn, REG_RETVAL, NULL_RTX)
+#endif
       /* Make sure that DEST is not used after SUCC but before I3.  */
       || (succ && ! all_adjacent
          && reg_used_between_p (dest, succ, i3))
@@ -1371,7 +1377,12 @@ try_combine (i3, i2, i1)
   if (GET_RTX_CLASS (GET_CODE (i3)) != 'i'
       || GET_RTX_CLASS (GET_CODE (i2)) != 'i'
       || (i1 && GET_RTX_CLASS (GET_CODE (i1)) != 'i')
-      || find_reg_note (i3, REG_LIBCALL, NULL_RTX))
+#if 0
+      /* ??? This gives worse code, and appears to be unnecessary, since no
+        pass after flow uses REG_LIBCALL/REG_RETVAL notes.  */
+      || find_reg_note (i3, REG_LIBCALL, NULL_RTX)
+#endif
+)
     return 0;
 
   combine_attempts++;