diff options
author | Dale Johannesen <dalej@apple.com> | 2002-10-07 17:55:46 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@gcc.gnu.org> | 2002-10-07 17:55:46 +0000 |
commit | dad482e6ee7c84e9793e721c0ec1c7de6e2ca5dc (patch) | |
tree | 928bfc28c103c04292730977d5b0cbfe5430a895 /gcc | |
parent | 0c59cbfaf61bce02e64caf4237f1d536a34caa8f (diff) | |
download | gcc-dad482e6ee7c84e9793e721c0ec1c7de6e2ca5dc.zip gcc-dad482e6ee7c84e9793e721c0ec1c7de6e2ca5dc.tar.gz gcc-dad482e6ee7c84e9793e721c0ec1c7de6e2ca5dc.tar.bz2 |
Permit doloop treatment for preconditioned loops.
From-SVN: r57902
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/doloop.c | 1 | ||||
-rw-r--r-- | gcc/loop.c | 3 | ||||
-rw-r--r-- | gcc/rtl.h | 1 | ||||
-rw-r--r-- | gcc/unroll.c | 3 |
5 files changed, 13 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 13f3151..adffbeb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/doloop.c b/gcc/doloop.c index 3e1c7b1..1f7d47a 100644 --- a/gcc/doloop.c +++ b/gcc/doloop.c @@ -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) { @@ -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)) @@ -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. */ diff --git a/gcc/unroll.c b/gcc/unroll.c index 3e5ea7f..fa04253 100644 --- a/gcc/unroll.c +++ b/gcc/unroll.c @@ -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 |