* 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.
From-SVN: r38580
+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.
(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.
&& (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)
{
/* 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. */
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. */
/* 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;
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. */
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)
|| 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)
(*(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. */
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
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;
}
{
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;
}
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
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);
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. */
#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: