aboutsummaryrefslogtreecommitdiff
path: root/gcc/loop.c
diff options
context:
space:
mode:
authorOlivier Hainque <hainque@act-europe.fr>2003-05-03 16:25:22 +0200
committerRichard Kenner <kenner@gcc.gnu.org>2003-05-03 10:25:22 -0400
commitee9609391b6e1bd4d026b86cf79bced76e1baa5b (patch)
tree7ad4bd29e44c9c37b87311753f154d5fa72e515b /gcc/loop.c
parent3923e4102fcfa593de9148a4855ca54d8466fbe7 (diff)
downloadgcc-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/loop.c')
-rw-r--r--gcc/loop.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/loop.c b/gcc/loop.c
index 1bdc1bd..b74d6ad 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -2575,6 +2575,30 @@ prescan_loop (loop)
loop_info->has_call = 1;
if (can_throw_internal (insn))
loop_info->has_multiple_exit_targets = 1;
+
+ /* Calls initializing constant objects have CLOBBER of MEM /u in the
+ attached FUNCTION_USAGE expression list, not accounted for by the
+ code above. We should note these to avoid missing dependencies in
+ later references. */
+ {
+ rtx fusage_entry;
+
+ for (fusage_entry = CALL_INSN_FUNCTION_USAGE (insn);
+ fusage_entry; fusage_entry = XEXP (fusage_entry, 1))
+ {
+ rtx fusage = XEXP (fusage_entry, 0);
+
+ if (GET_CODE (fusage) == CLOBBER
+ && GET_CODE (XEXP (fusage, 0)) == MEM
+ && RTX_UNCHANGING_P (XEXP (fusage, 0)))
+ {
+ note_stores (fusage, note_addr_stored, loop_info);
+ if (! loop_info->first_loop_store_insn
+ && loop_info->store_mems)
+ loop_info->first_loop_store_insn = insn;
+ }
+ }
+ }
break;
case JUMP_INSN: