Permit doloop treatment for preconditioned loops.

From-SVN: r57902
This commit is contained in:
Dale Johannesen 2002-10-07 17:55:46 +00:00 committed by Dale Johannesen
parent 0c59cbfaf6
commit dad482e6ee
5 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2002-10-07 Dale Johannesen <dalej@apple.com>
* rtl.h: Add NOTE_PRECONDITIONED.
* unroll.c: Set it.
* loop.c: Set loop_info->preconditioned from it.
* doloop.c: Permit doloop treatment when loop_info->preconditoned.
2002-10-07 Richard Henderson <rth@redhat.com>
* config/i960/i960.c (i960_setup_incoming_varargs): Create a

View File

@ -339,6 +339,7 @@ doloop_valid_p (loop, jump_insn)
condition at run-time and have an additional jump around the loop
to ensure an infinite loop. */
if (loop_info->comparison_code == NE
&& !loop_info->preconditioned
&& INTVAL (loop_info->increment) != -1
&& INTVAL (loop_info->increment) != 1)
{

View File

@ -2475,7 +2475,8 @@ prescan_loop (loop)
loop_info->first_loop_store_insn = NULL_RTX;
loop_info->mems_idx = 0;
loop_info->num_mem_sets = 0;
/* If loop opts run twice, this was set on 1st pass for 2nd. */
loop_info->preconditioned = NOTE_PRECONDITIONED (end);
for (insn = start; insn && GET_CODE (insn) != CODE_LABEL;
insn = PREV_INSN (insn))

View File

@ -787,6 +787,7 @@ extern const char * const reg_note_name[];
#define NOTE_BASIC_BLOCK(INSN) XCBBDEF (INSN, 4, NOTE)
#define NOTE_EXPECTED_VALUE(INSN) XCEXP (INSN, 4, NOTE)
#define NOTE_PREDICTION(INSN) XCINT (INSN, 4, NOTE)
#define NOTE_PRECONDITIONED(INSN) XCINT (INSN, 4, NOTE)
/* In a NOTE that is a line number, this is the line number.
Other kinds of NOTEs are identified by negative numbers here. */

View File

@ -1136,6 +1136,9 @@ unroll_loop (loop, insn_count, strength_reduce_p)
/* And whether the loop has been preconditioned. */
loop_info->preconditioned = loop_preconditioned;
/* Remember whether it was preconditioned for the second loop pass. */
NOTE_PRECONDITIONED (loop->end) = loop_preconditioned;
/* For each biv and giv, determine whether it can be safely split into
a different variable for each unrolled copy of the loop body.
We precalculate and save this info here, since computing it is