diff options
author | Olivier Hainque <hainque@act-europe.fr> | 2003-05-03 16:25:22 +0200 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2003-05-03 10:25:22 -0400 |
commit | ee9609391b6e1bd4d026b86cf79bced76e1baa5b (patch) | |
tree | 7ad4bd29e44c9c37b87311753f154d5fa72e515b /gcc/builtins.c | |
parent | 3923e4102fcfa593de9148a4855ca54d8466fbe7 (diff) | |
download | gcc-ee9609391b6e1bd4d026b86cf79bced76e1baa5b.zip gcc-ee9609391b6e1bd4d026b86cf79bced76e1baa5b.tar.gz gcc-ee9609391b6e1bd4d026b86cf79bced76e1baa5b.tar.bz2 |
emit-rtl.c (last_call_insn, [...]): New functions.
* emit-rtl.c (last_call_insn, add_function_usage_to): New functions.
* rtl.h (last_call_insn, add_function_usage_to): New prototypes.
* builtins.c (expand_builtin_apply): Use the new emit-rtl functions.
* calls.c (emit_call_1): Likewise.
(expand_call): For calls initializing constant memory, replace
emission of standalone mem /u clobber with function usage entry.
* expr.c (emit_block_move_via_libcall): Likewise.
* cse.c (count_reg_usage, case EXPR_LIST): New case.
* flow.c (propagate_one_insn): Pass entire operand of
CALL_INSN_FUNCTION_USAGE to mark_used_regs.
* integrate.c (try_constants): For CALL_INSNs, substitute constants
within the FUNCTION_USAGE also.
* loop.c (prescan_loop): Note clobbers of const mem mentioned in
FUNCTION_USAGE lists.
* reload1.c (replace_pseudos_in): Renamed.
(reload): Use it for clobbers surviving until the end of the reload.
From-SVN: r66429
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index 46b14bc..969162b 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -1323,29 +1323,10 @@ expand_builtin_apply (function, arguments, argsize) #endif abort (); - /* Find the CALL insn we just emitted. */ - for (call_insn = get_last_insn (); - call_insn && GET_CODE (call_insn) != CALL_INSN; - call_insn = PREV_INSN (call_insn)) - ; - - if (! call_insn) - abort (); - - /* Put the register usage information on the CALL. If there is already - some usage information, put ours at the end. */ - if (CALL_INSN_FUNCTION_USAGE (call_insn)) - { - rtx link; - - for (link = CALL_INSN_FUNCTION_USAGE (call_insn); XEXP (link, 1) != 0; - link = XEXP (link, 1)) - ; - - XEXP (link, 1) = call_fusage; - } - else - CALL_INSN_FUNCTION_USAGE (call_insn) = call_fusage; + /* Find the CALL insn we just emitted, and attach the register usage + information. */ + call_insn = last_call_insn (); + add_function_usage_to (call_insn, call_fusage); /* Restore the stack. */ #ifdef HAVE_save_stack_nonlocal |