Don't make bogus libcall blocks
authorBernd Schmidt <bernds@redhat.co.uk>
Fri, 15 Sep 2000 16:21:53 +0000 (16:21 +0000)
committerBernd Schmidt <crux@gcc.gnu.org>
Fri, 15 Sep 2000 16:21:53 +0000 (16:21 +0000)
From-SVN: r36435

gcc/ChangeLog
gcc/calls.c

index 147768eaca2654204fa88cfb898c47f833143c0d..ac895752a4a8feb8782f1752ae38744aadd25aa7 100644 (file)
@@ -4,6 +4,8 @@
        copy to a temporary first.
        * expr.c (convert_move): When generating a libcall, make a libcall
        block.
+       * calls.c (emit_library_call_value_1): Don't create a libcall
+       sequence here; our caller will in most cases do it.
 
 2000-09-15  Richard Henderson  <rth@cygnus.com>
 
index 45a7749d71fcf563c72e2552486a6eeda11fcdb6..71866113ab9c45e706ddfd128b172c2245a252cf 100644 (file)
@@ -3580,11 +3580,6 @@ emit_library_call_value_1 (retval, orgfun, value, fn_type, outmode, nargs, p)
 
   count = 0;
 
-  /* Now we are about to start emitting insns that can be deleted
-     if a libcall is deleted.  */
-  if (flags & (ECF_CONST | ECF_PURE))
-    start_sequence ();
-
   push_temp_slots ();
 
   /* If there's a structure value address to be passed,
@@ -4022,45 +4017,6 @@ emit_library_call_value_1 (retval, orgfun, value, fn_type, outmode, nargs, p)
   /* Now restore inhibit_defer_pop to its actual original value.  */
   OK_DEFER_POP;
 
-  /* If call is cse'able, make appropriate pair of reg-notes around it.
-     Test valreg so we don't crash; may safely ignore `const'
-     if return type is void.  Disable for PARALLEL return values, because
-     we have no way to move such values into a pseudo register.  */
-  if ((flags & (ECF_CONST | ECF_PURE))
-      && valreg != 0 && GET_CODE (valreg) != PARALLEL)
-    {
-      rtx note = 0;
-      rtx temp = gen_reg_rtx (GET_MODE (valreg));
-      rtx insns;
-      int i;
-
-      /* Construct an "equal form" for the value which mentions all the
-        arguments in order as well as the function name.  */
-      for (i = 0; i < nargs; i++)
-       note = gen_rtx_EXPR_LIST (VOIDmode, argvec[i].value, note);
-      note = gen_rtx_EXPR_LIST (VOIDmode, fun, note);
-
-      insns = get_insns ();
-      end_sequence ();
-
-      if (flags & ECF_PURE)
-       note = gen_rtx_EXPR_LIST (VOIDmode,
-          gen_rtx_USE (VOIDmode,
-                       gen_rtx_MEM (BLKmode,
-                                    gen_rtx_SCRATCH (VOIDmode))), note);
-
-      emit_libcall_block (insns, temp, valreg, note);
-
-      valreg = temp;
-    }
-  else if (flags & (ECF_CONST | ECF_PURE))
-    {
-      /* Otherwise, just write out the sequence without a note.  */
-      rtx insns = get_insns ();
-
-      end_sequence ();
-      emit_insns (insns);
-    }
   pop_temp_slots ();
 
   /* Copy the value to the right place.  */