diff options
Diffstat (limited to 'gnu/usr.bin/gcc/loop.c')
-rw-r--r-- | gnu/usr.bin/gcc/loop.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/gnu/usr.bin/gcc/loop.c b/gnu/usr.bin/gcc/loop.c index 5fb24ca016d..3e780203977 100644 --- a/gnu/usr.bin/gcc/loop.c +++ b/gnu/usr.bin/gcc/loop.c @@ -110,7 +110,8 @@ int *loop_number_exit_count; unsigned HOST_WIDE_INT loop_n_iterations; -/* Nonzero if there is a subroutine call in the current loop. */ +/* Nonzero if there is a subroutine call in the current loop. + (unknown_address_altered is also nonzero in this case.) */ static int loop_has_call; @@ -158,7 +159,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 50 +#define NUM_STORES 20 static rtx loop_store_mems[NUM_STORES]; /* Index of first available slot in above array. */ @@ -2198,8 +2199,7 @@ prescan_loop (start, end) } else if (GET_CODE (insn) == CALL_INSN) { - if (! CONST_CALL_P (insn)) - unknown_address_altered = 1; + 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], VOIDmode, x, rtx_varies_p)) + if (true_dependence (loop_store_mems[i], x)) return 0; /* It's not invalidated by a store in memory @@ -4375,8 +4375,6 @@ 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 @@ -4654,11 +4652,8 @@ check_final_value (v, loop_start, loop_end) if (GET_CODE (p) == JUMP_INSN && JUMP_LABEL (p) && LABEL_NAME (JUMP_LABEL (p)) - && ((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 (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)))) { @@ -5565,8 +5560,6 @@ 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 |