summaryrefslogtreecommitdiff
path: root/gcc/unroll.c
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1997-09-22 01:49:19 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1997-09-22 01:49:19 +0000
commit152fc75106854082bb2230a8307486ad4e49ca94 (patch)
tree90446704bc98bcf3a8a28c6f81912cdac9a90ddf /gcc/unroll.c
parent79348588081cda4592aadc106e427e3cd0f0d5c1 (diff)
downloadgcc-152fc75106854082bb2230a8307486ad4e49ca94.tar.gz
* loop.c (loop_unroll_factor): Move outside #ifdef HAIFA
conditional. (loop_unroll_iter): Remove unused variable and all references. (loop_optimize): Always allocate and clear space for loop_unroll_factor. (insert_bct): Fix minor formatting problems. * loop.h (loop_unroll_factor): Move decl outside #ifdef HAIFA. (loop_unroll_iter): Removed unused decl. * unroll.c (unroll_loop): Remove code to set loop_unroll_iter. Always record the unrolling factor. More haifa cleanup git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15621 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/unroll.c')
-rw-r--r--gcc/unroll.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/gcc/unroll.c b/gcc/unroll.c
index ce6623c37cd..b9cbcfe6a48 100644
--- a/gcc/unroll.c
+++ b/gcc/unroll.c
@@ -1094,16 +1094,13 @@ unroll_loop (loop_end, insn_count, loop_start, end_insert_before,
/* Set unroll type to MODULO now. */
unroll_type = UNROLL_MODULO;
loop_preconditioned = 1;
+
#ifdef HAIFA
- if (loop_n_iterations > 0)
- loop_unroll_iter[ loop_number(loop_start, loop_end) ]
- = (loop_n_iterations
- - loop_n_iterations % (abs_inc * unroll_number));
- else
- /* inform loop.c about the new initial value */
- loop_start_value[loop_number(loop_start, loop_end)] = initial_value;
+ /* Fix the initial value for the loop as needed. */
+ if (loop_n_iterations <= 0)
+ loop_start_value [loop_number (loop_start, loop_end)]
+ = initial_value;
#endif
-
}
}
@@ -1118,13 +1115,11 @@ unroll_loop (loop_end, insn_count, loop_start, end_insert_before,
/* At this point, we are guaranteed to unroll the loop. */
-#ifdef HAIFA
- /* inform loop.c about the factor of unrolling */
+ /* Keep track of the unroll factor for each loop. */
if (unroll_type == UNROLL_COMPLETELY)
- loop_unroll_factor[ loop_number(loop_start, loop_end) ] = -1;
+ loop_unroll_factor [loop_number (loop_start, loop_end)] = -1;
else
- loop_unroll_factor[ loop_number(loop_start, loop_end) ] = unroll_number;
-#endif /* HAIFA */
+ loop_unroll_factor [loop_number (loop_start, loop_end)] = unroll_number;
/* For each biv and giv, determine whether it can be safely split into