summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorm.hayes <m.hayes@138bc75d-0d04-0410-961f-82ee72b054a4>2001-01-01 00:37:09 +0000
committerm.hayes <m.hayes@138bc75d-0d04-0410-961f-82ee72b054a4>2001-01-01 00:37:09 +0000
commitb995c337fde8b193359291a3f9631f80aaad69d0 (patch)
tree3b42886d723fcd6825f532d5914608cc58485318
parenta3915b3216caf3914b08a7be8b18eadcdcc70cda (diff)
downloadgcc-b995c337fde8b193359291a3f9631f80aaad69d0.tar.gz
* loop.h (REG_IV_CLASS): New accessor macro.
* loop.c (REG_IV_CLASS): Use it instead of reg_iv_class array. * unroll.c (REG_IV_CLASS): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38580 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/loop.c15
-rw-r--r--gcc/loop.h1
-rw-r--r--gcc/unroll.c14
4 files changed, 22 insertions, 15 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 57a5f174bf9..fa865355a18 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2001-01-01 Michael Hayes <mhayes@redhat.com>
+
+ * loop.h (REG_IV_CLASS): New accessor macro.
+ * loop.c (REG_IV_CLASS): Use it instead of reg_iv_class array.
+ * unroll.c (REG_IV_CLASS): Likewise.
+
Sun Dec 31 19:20:51 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* dwarf2out.c (loc_descriptor_from_tree, case WITH_RECORD_EXPR): New.
@@ -33,7 +39,6 @@ Sun Dec 31 19:20:51 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
(loop_movables_add, loop_movables_free): New functions.
(scan_loop): Use xmalloc instead of alloca for movables.
Call loop_movables_free.
-
* loop.c (debug_loops): New.
diff --git a/gcc/loop.c b/gcc/loop.c
index d931a573204..b5da95ed246 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -3741,7 +3741,7 @@ loop_bivs_init_find (loop)
&& (test = get_condition_for_loop (loop, p)) != 0
&& GET_CODE (XEXP (test, 0)) == REG
&& REGNO (XEXP (test, 0)) < max_reg_before_loop
- && (bl = ivs->reg_biv_class[REGNO (XEXP (test, 0))]) != 0
+ && (bl = REG_IV_CLASS (ivs, REGNO (XEXP (test, 0)))) != 0
&& valid_initial_value_p (XEXP (test, 1), p, call_seen, loop->start)
&& bl->init_insn == 0)
{
@@ -4915,7 +4915,7 @@ record_biv (loop, v, insn, dest_reg, inc_val, mult_val, location,
/* Add this to the reg's iv_class, creating a class
if this is the first incrementation of the reg. */
- bl = ivs->reg_biv_class[REGNO (dest_reg)];
+ bl = REG_IV_CLASS (ivs, REGNO (dest_reg));
if (bl == 0)
{
/* Create and initialize new iv_class. */
@@ -4946,7 +4946,7 @@ record_biv (loop, v, insn, dest_reg, inc_val, mult_val, location,
ivs->loop_iv_list = bl;
/* Put it in the array of biv register classes. */
- ivs->reg_biv_class[REGNO (dest_reg)] = bl;
+ REG_IV_CLASS (ivs, REGNO (dest_reg)) = bl;
}
/* Update IV_CLASS entry for this biv. */
@@ -5075,7 +5075,7 @@ record_giv (loop, v, insn, src_reg, dest_reg, mult_val, add_val, ext_val,
/* Add the giv to the class of givs computed from one biv. */
- bl = ivs->reg_biv_class[REGNO (src_reg)];
+ bl = REG_IV_CLASS (ivs, REGNO (src_reg));
if (bl)
{
v->next_iv = bl->giv;
@@ -5267,7 +5267,7 @@ check_final_value (loop, v)
struct iv_class *bl;
rtx final_value = 0;
- bl = ivs->reg_biv_class[REGNO (v->src_reg)];
+ bl = REG_IV_CLASS (ivs, REGNO (v->src_reg));
/* DEST_ADDR givs will never reach here, because they are always marked
replaceable above in record_giv. */
@@ -8225,7 +8225,8 @@ maybe_eliminate_biv_1 (loop, x, insn, bl, eliminate_p, where)
if (v->ignore || v->maybe_dead || v->mode != mode)
continue;
- for (tv = ivs->reg_biv_class[REGNO (arg)]->giv; tv; tv = tv->next_iv)
+ for (tv = REG_IV_CLASS (ivs, REGNO (arg))->giv; tv;
+ tv = tv->next_iv)
if (! tv->ignore && ! tv->maybe_dead
&& rtx_equal_p (tv->mult_val, v->mult_val)
&& rtx_equal_p (tv->add_val, v->add_val)
@@ -8323,7 +8324,7 @@ record_initial (dest, set, data)
|| REG_IV_TYPE (ivs, REGNO (dest)) != BASIC_INDUCT)
return;
- bl = ivs->reg_biv_class[REGNO (dest)];
+ bl = REG_IV_CLASS (ivs, REGNO (dest));
/* If this is the first set found, record it. */
if (bl->init_insn == 0)
diff --git a/gcc/loop.h b/gcc/loop.h
index bea5a808e72..7ca9b06a0ff 100644
--- a/gcc/loop.h
+++ b/gcc/loop.h
@@ -363,6 +363,7 @@ extern FILE *loop_dump_stream;
(*(enum iv_mode *) &VARRAY_INT(ivs->reg_iv_type, (n)))
#define REG_IV_INFO(ivs, n) \
(*(struct induction **) &VARRAY_GENERIC_PTR(ivs->reg_iv_info, (n)))
+#define REG_IV_CLASS(ivs, n) ivs->reg_biv_class[n]
/* Forward declarations for non-static functions declared in loop.c and
unroll.c. */
diff --git a/gcc/unroll.c b/gcc/unroll.c
index 0fe6256ddbf..1c66b1ff829 100644
--- a/gcc/unroll.c
+++ b/gcc/unroll.c
@@ -1770,7 +1770,7 @@ copy_loop_body (loop, copy_start, copy_end, map, exit_label, last_iteration,
unsigned int regno = REGNO (SET_DEST (set));
v = addr_combined_regs[REGNO (SET_DEST (set))];
- bl = ivs->reg_biv_class[REGNO (v->src_reg)];
+ bl = REG_IV_CLASS (ivs, REGNO (v->src_reg));
/* Although the giv_inc amount is not needed here, we must call
calculate_giv_inc here since it might try to delete the
@@ -1915,7 +1915,7 @@ copy_loop_body (loop, copy_start, copy_end, map, exit_label, last_iteration,
if (regno < max_reg_before_loop
&& REG_IV_TYPE (ivs, regno) == BASIC_INDUCT)
{
- giv_src_reg = ivs->reg_biv_class[regno]->biv->src_reg;
+ giv_src_reg = REG_IV_CLASS (ivs, regno)->biv->src_reg;
giv_dest_reg = giv_src_reg;
}
@@ -3030,7 +3030,7 @@ find_splittable_givs (loop, bl, unroll_type, increment, unroll_number)
{
int count = 1;
if (! v->ignore)
- count = ivs->reg_biv_class[REGNO (v->src_reg)]->biv_count;
+ count = REG_IV_CLASS (ivs, REGNO (v->src_reg))->biv_count;
splittable_regs_updates[REGNO (v->new_reg)] = count;
}
@@ -3226,7 +3226,7 @@ final_giv_value (loop, v)
rtx loop_end = loop->end;
unsigned HOST_WIDE_INT n_iterations = LOOP_INFO (loop)->n_iterations;
- bl = ivs->reg_biv_class[REGNO (v->src_reg)];
+ bl = REG_IV_CLASS (ivs, REGNO (v->src_reg));
/* The final value for givs which depend on reversed bivs must be calculated
differently than for ordinary givs. In this case, there is already an
@@ -3598,7 +3598,7 @@ loop_iterations (loop)
abort ();
/* Grab initial value, only useful if it is a constant. */
- bl = ivs->reg_biv_class[REGNO (iteration_var)];
+ bl = REG_IV_CLASS (ivs, REGNO (iteration_var));
initial_value = bl->initial_value;
increment = biv_total_increment (bl);
@@ -3612,7 +3612,7 @@ loop_iterations (loop)
if (REGNO (v->src_reg) >= max_reg_before_loop)
abort ();
- bl = ivs->reg_biv_class[REGNO (v->src_reg)];
+ bl = REG_IV_CLASS (ivs, REGNO (v->src_reg));
/* Increment value is mult_val times the increment value of the biv. */
@@ -4014,7 +4014,7 @@ remap_split_bivs (loop, x)
#endif
if (REGNO (x) < max_reg_before_loop
&& REG_IV_TYPE (ivs, REGNO (x)) == BASIC_INDUCT)
- return ivs->reg_biv_class[REGNO (x)]->biv->src_reg;
+ return REG_IV_CLASS (ivs, REGNO (x))->biv->src_reg;
break;
default: