Commit 5629b16c by Michael Hayes Committed by Jeff Law

loop.c (check_dbra_loop): New argument loop_info.

        * loop.c (check_dbra_loop): New argument loop_info.  Update fields
        as needed.

From-SVN: r24131
parent 01bdf1bc
Sun Dec 6 05:16:16 1998 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
* loop.c (check_dbra_loop): New argument loop_info. Update fields
as needed.
Sun Dec 6 03:40:13 PST 1998 Jeff Law (law@cygnus.com) Sun Dec 6 03:40:13 PST 1998 Jeff Law (law@cygnus.com)
* version.c: Bump for snapshot. * version.c: Bump for snapshot.
......
...@@ -312,7 +312,7 @@ static int basic_induction_var PROTO((rtx, enum machine_mode, rtx, rtx, rtx *, r ...@@ -312,7 +312,7 @@ static int basic_induction_var PROTO((rtx, enum machine_mode, rtx, rtx, rtx *, r
static rtx simplify_giv_expr PROTO((rtx, int *)); static rtx simplify_giv_expr PROTO((rtx, int *));
static int general_induction_var PROTO((rtx, rtx *, rtx *, rtx *, int, int *)); static int general_induction_var PROTO((rtx, rtx *, rtx *, rtx *, int, int *));
static int consec_sets_giv PROTO((int, rtx, rtx, rtx, rtx *, rtx *)); static int consec_sets_giv PROTO((int, rtx, rtx, rtx, rtx *, rtx *));
static int check_dbra_loop PROTO((rtx, int, rtx)); static int check_dbra_loop PROTO((rtx, int, rtx, struct loop_info *));
static rtx express_from_1 PROTO((rtx, rtx, rtx)); static rtx express_from_1 PROTO((rtx, rtx, rtx));
static rtx express_from PROTO((struct induction *, struct induction *)); static rtx express_from PROTO((struct induction *, struct induction *));
static rtx combine_givs_p PROTO((struct induction *, struct induction *)); static rtx combine_givs_p PROTO((struct induction *, struct induction *));
...@@ -4041,7 +4041,7 @@ strength_reduce (scan_start, end, loop_top, insn_count, ...@@ -4041,7 +4041,7 @@ strength_reduce (scan_start, end, loop_top, insn_count,
/* Try to prove that the loop counter variable (if any) is always /* Try to prove that the loop counter variable (if any) is always
nonnegative; if so, record that fact with a REG_NONNEG note nonnegative; if so, record that fact with a REG_NONNEG note
so that "decrement and branch until zero" insn can be used. */ so that "decrement and branch until zero" insn can be used. */
check_dbra_loop (loop_end, insn_count, loop_start); check_dbra_loop (loop_end, insn_count, loop_start, loop_info);
/* Create reg_map to hold substitutions for replaceable giv regs. */ /* Create reg_map to hold substitutions for replaceable giv regs. */
reg_map = (rtx *) alloca (max_reg_before_loop * sizeof (rtx)); reg_map = (rtx *) alloca (max_reg_before_loop * sizeof (rtx));
...@@ -6634,10 +6634,11 @@ product_cheap_p (a, b) ...@@ -6634,10 +6634,11 @@ product_cheap_p (a, b)
final_[bg]iv_value. */ final_[bg]iv_value. */
static int static int
check_dbra_loop (loop_end, insn_count, loop_start) check_dbra_loop (loop_end, insn_count, loop_start, loop_info)
rtx loop_end; rtx loop_end;
int insn_count; int insn_count;
rtx loop_start; rtx loop_start;
struct loop_info *loop_info;
{ {
struct iv_class *bl; struct iv_class *bl;
rtx reg; rtx reg;
...@@ -7065,6 +7066,15 @@ check_dbra_loop (loop_end, insn_count, loop_start) ...@@ -7065,6 +7066,15 @@ check_dbra_loop (loop_end, insn_count, loop_start)
bl->initial_value = start_value; bl->initial_value = start_value;
bl->biv->add_val = new_add_val; bl->biv->add_val = new_add_val;
/* Update loop info. */
loop_info->initial_value = bl->initial_value;
loop_info->initial_equiv_value = bl->initial_value;
loop_info->final_value = const0_rtx;
loop_info->final_equiv_value = const0_rtx;
loop_info->comparison_value = const0_rtx;
loop_info->comparison_code = cmp_code;
loop_info->increment = new_add_val;
/* Inc LABEL_NUSES so that delete_insn will /* Inc LABEL_NUSES so that delete_insn will
not delete the label. */ not delete the label. */
LABEL_NUSES (XEXP (jump_label, 0)) ++; LABEL_NUSES (XEXP (jump_label, 0)) ++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment