diff options
author | Thomas Graichen <graichen@cvs.openbsd.org> | 1997-04-04 13:21:36 +0000 |
---|---|---|
committer | Thomas Graichen <graichen@cvs.openbsd.org> | 1997-04-04 13:21:36 +0000 |
commit | 50325cbab454647a313ba68279c844e2bc6143af (patch) | |
tree | 0e52e902317bb4442448c5c61ab6d2162111a240 /gnu/usr.bin/gcc/loop.c | |
parent | b2ad87cb6f8d3d16576e4e93251e0228f0672cdc (diff) |
sync g77 to version 0.5.20 - i hope i got everything right because there
is no patch from 0.5.19 to 0.5.20 - so i did it by diffing two gcc trees
looking carefully at the results
what does the new g77 give us:
* now it completely works on the alpha (64bit)
* faster
* less bugs :-)
Diffstat (limited to 'gnu/usr.bin/gcc/loop.c')
-rw-r--r-- | gnu/usr.bin/gcc/loop.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/gnu/usr.bin/gcc/loop.c b/gnu/usr.bin/gcc/loop.c index 3e780203977..5fb24ca016d 100644 --- a/gnu/usr.bin/gcc/loop.c +++ b/gnu/usr.bin/gcc/loop.c @@ -110,8 +110,7 @@ int *loop_number_exit_count; unsigned HOST_WIDE_INT loop_n_iterations; -/* Nonzero if there is a subroutine call in the current loop. - (unknown_address_altered is also nonzero in this case.) */ +/* Nonzero if there is a subroutine call in the current loop. */ static int loop_has_call; @@ -159,7 +158,7 @@ static char *moved_once; /* Array of MEMs that are stored in this loop. If there are too many to fit here, we just turn on unknown_address_altered. */ -#define NUM_STORES 20 +#define NUM_STORES 50 static rtx loop_store_mems[NUM_STORES]; /* Index of first available slot in above array. */ @@ -2199,7 +2198,8 @@ prescan_loop (start, end) } else if (GET_CODE (insn) == CALL_INSN) { - unknown_address_altered = 1; + if (! CONST_CALL_P (insn)) + unknown_address_altered = 1; loop_has_call = 1; } else @@ -2777,7 +2777,7 @@ invariant_p (x) /* See if there is any dependence between a store and this load. */ for (i = loop_store_mems_idx - 1; i >= 0; i--) - if (true_dependence (loop_store_mems[i], x)) + if (true_dependence (loop_store_mems[i], VOIDmode, x, rtx_varies_p)) return 0; /* It's not invalidated by a store in memory @@ -4375,6 +4375,8 @@ record_giv (v, insn, src_reg, dest_reg, mult_val, add_val, benefit, v->new_reg = 0; v->final_value = 0; v->same_insn = 0; + v->unrolled = 0; + v->shared = 0; /* The v->always_computable field is used in update_giv_derive, to determine whether a giv can be used to derive another giv. For a @@ -4652,8 +4654,11 @@ check_final_value (v, loop_start, loop_end) if (GET_CODE (p) == JUMP_INSN && JUMP_LABEL (p) && LABEL_NAME (JUMP_LABEL (p)) - && ((INSN_LUID (JUMP_LABEL (p)) < INSN_LUID (v->insn) - && INSN_LUID (JUMP_LABEL (p)) > INSN_LUID (loop_start)) + && ((INSN_UID (JUMP_LABEL (p)) >= max_uid_for_loop) + || (INSN_UID (v->insn) >= max_uid_for_loop) + || (INSN_UID (last_giv_use) >= max_uid_for_loop) + || (INSN_LUID (JUMP_LABEL (p)) < INSN_LUID (v->insn) + && INSN_LUID (JUMP_LABEL (p)) > INSN_LUID (loop_start)) || (INSN_LUID (JUMP_LABEL (p)) > INSN_LUID (last_giv_use) && INSN_LUID (JUMP_LABEL (p)) < INSN_LUID (loop_end)))) { @@ -5560,6 +5565,8 @@ emit_iv_add_mult (b, m, a, reg, insert_before) end_sequence (); emit_insn_before (seq, insert_before); + + record_base_value (REGNO (reg), b); } /* Test whether A * B can be computed without |