diff options
author | Bernd Schmidt <bernds@redhat.co.uk> | 2000-09-15 16:21:53 +0000 |
---|---|---|
committer | Bernd Schmidt <crux@gcc.gnu.org> | 2000-09-15 16:21:53 +0000 |
commit | 188c5e6ca8656feaa041ac6aa53c3b5f26a31678 (patch) | |
tree | 48998e6a8ca5552902e07ac045be5a345d80b498 | |
parent | 642dfa8b65d3f42e35df4ced39d8a58b1a8cc2e6 (diff) | |
download | gcc-188c5e6ca8656feaa041ac6aa53c3b5f26a31678.zip gcc-188c5e6ca8656feaa041ac6aa53c3b5f26a31678.tar.gz gcc-188c5e6ca8656feaa041ac6aa53c3b5f26a31678.tar.bz2 |
Don't make bogus libcall blocks
From-SVN: r36435
-rw-r--r-- | gcc/ChangeLog | 2 | ||||
-rw-r--r-- | gcc/calls.c | 44 |
2 files changed, 2 insertions, 44 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 147768e..ac89575 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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> diff --git a/gcc/calls.c b/gcc/calls.c index 45a7749..7186611 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -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. */ |