summaryrefslogtreecommitdiff
path: root/contrib/gcc/loop.c
diff options
context:
space:
mode:
authorcvs2svn <cvs2svn@FreeBSD.org>2000-03-27 03:00:06 +0000
committercvs2svn <cvs2svn@FreeBSD.org>2000-03-27 03:00:06 +0000
commit3e26bdf09c5e0a4e9b015a5f02b9c948454010e1 (patch)
tree36f3f9a09138cd7071d3de64269ad734e9d9c50b /contrib/gcc/loop.c
parent536abd52d2bd3b3830d8ac369f03865f32e4d496 (diff)
Diffstat (limited to 'contrib/gcc/loop.c')
-rw-r--r--contrib/gcc/loop.c66
1 files changed, 6 insertions, 60 deletions
diff --git a/contrib/gcc/loop.c b/contrib/gcc/loop.c
index 497ac369c2b37..7acd727042efa 100644
--- a/contrib/gcc/loop.c
+++ b/contrib/gcc/loop.c
@@ -283,9 +283,6 @@ static struct movable *the_movables;
FILE *loop_dump_stream;
-/* For communicating return values from note_set_pseudo_multiple_uses. */
-static int note_set_pseudo_multiple_uses_retval;
-
/* Forward declarations. */
static void verify_dominator PROTO((int));
@@ -300,7 +297,6 @@ static void count_one_set PROTO((rtx, rtx, varray_type, rtx *));
static void count_loop_regs_set PROTO((rtx, rtx, varray_type, varray_type,
int *, int));
static void note_addr_stored PROTO((rtx, rtx));
-static void note_set_pseudo_multiple_uses PROTO((rtx, rtx));
static int loop_reg_used_before_p PROTO((rtx, rtx, rtx, rtx, rtx));
static void scan_loop PROTO((rtx, rtx, rtx, int, int));
#if 0
@@ -3144,36 +3140,6 @@ note_addr_stored (x, y)
loop_store_mems = gen_rtx_EXPR_LIST (VOIDmode, x, loop_store_mems);
}
-
-/* X is a value modified by an INSN that references a biv inside a loop
- exit test (ie, X is somehow related to the value of the biv). If X
- is a pseudo that is used more than once, then the biv is (effectively)
- used more than once. */
-
-static void
-note_set_pseudo_multiple_uses (x, y)
- rtx x;
- rtx y ATTRIBUTE_UNUSED;
-{
- if (x == 0)
- return;
-
- while (GET_CODE (x) == STRICT_LOW_PART
- || GET_CODE (x) == SIGN_EXTRACT
- || GET_CODE (x) == ZERO_EXTRACT
- || GET_CODE (x) == SUBREG)
- x = XEXP (x, 0);
-
- if (GET_CODE (x) != REG || REGNO (x) < FIRST_PSEUDO_REGISTER)
- return;
-
- /* If we do not have usage information, or if we know the register
- is used more than once, note that fact for check_dbra_loop. */
- if (REGNO (x) >= max_reg_before_loop
- || ! VARRAY_RTX (reg_single_usage, REGNO (x))
- || VARRAY_RTX (reg_single_usage, REGNO (x)) == const0_rtx)
- note_set_pseudo_multiple_uses_retval = 1;
-}
/* Return nonzero if the rtx X is invariant over the current loop.
@@ -5998,8 +5964,6 @@ basic_induction_var (x, mode, dest_reg, p, inc_val, mult_val, location)
|| (GET_CODE (SET_DEST (set)) == SUBREG
&& (GET_MODE_SIZE (GET_MODE (SET_DEST (set)))
<= UNITS_PER_WORD)
- && (GET_MODE_CLASS (GET_MODE (SET_DEST (set)))
- == MODE_INT)
&& SUBREG_REG (SET_DEST (set)) == x))
&& basic_induction_var (SET_SRC (set),
(GET_MODE (SET_SRC (set)) == VOIDmode
@@ -7698,7 +7662,6 @@ check_dbra_loop (loop_end, insn_count, loop_start, loop_info)
for (bl = loop_iv_list; bl; bl = bl->next)
{
if (bl->biv_count == 1
- && ! bl->biv->maybe_multiple
&& bl->biv->dest_reg == XEXP (comparison, 0)
&& ! reg_used_between_p (regno_reg_rtx[bl->regno], bl->biv->insn,
first_compare))
@@ -7764,8 +7727,7 @@ check_dbra_loop (loop_end, insn_count, loop_start, loop_info)
}
}
}
- else if (GET_CODE (bl->biv->add_val) == CONST_INT
- && INTVAL (bl->biv->add_val) > 0)
+ else if (INTVAL (bl->biv->add_val) > 0)
{
/* Try to change inc to dec, so can apply above optimization. */
/* Can do this if:
@@ -7803,22 +7765,10 @@ check_dbra_loop (loop_end, insn_count, loop_start, loop_info)
&& REGNO (SET_DEST (set)) == bl->regno)
/* An insn that sets the biv is okay. */
;
- else if ((p == prev_nonnote_insn (prev_nonnote_insn (loop_end))
- || p == prev_nonnote_insn (loop_end))
- && reg_mentioned_p (bivreg, PATTERN (p)))
- {
- /* If either of these insns uses the biv and sets a pseudo
- that has more than one usage, then the biv has uses
- other than counting since it's used to derive a value
- that is used more than one time. */
- note_set_pseudo_multiple_uses_retval = 0;
- note_stores (PATTERN (p), note_set_pseudo_multiple_uses);
- if (note_set_pseudo_multiple_uses_retval)
- {
- no_use_except_counting = 0;
- break;
- }
- }
+ else if (p == prev_nonnote_insn (prev_nonnote_insn (loop_end))
+ || p == prev_nonnote_insn (loop_end))
+ /* Don't bother about the end test. */
+ ;
else if (reg_mentioned_p (bivreg, PATTERN (p)))
{
no_use_except_counting = 0;
@@ -7856,7 +7806,7 @@ check_dbra_loop (loop_end, insn_count, loop_start, loop_info)
{
if (v->giv_type == DEST_REG
&& reg_mentioned_p (v->dest_reg,
- PATTERN (first_loop_store_insn))
+ XEXP (loop_store_mems, 0))
&& loop_insn_first_p (first_loop_store_insn, v->insn))
reversible_mem_store = 0;
}
@@ -9555,10 +9505,6 @@ load_mems (scan_start, end, loop_top, start)
mem_list_entry = XEXP (mem_list_entry, 1);
}
- if (flag_float_store && written
- && GET_MODE_CLASS (GET_MODE (mem)) == MODE_FLOAT)
- loop_mems[i].optimize = 0;
-
/* If this MEM is written to, we must be sure that there
are no reads from another MEM that aliases this one. */
if (loop_mems[i].optimize && written)