Commit e6fcb60d by Kazu Hirata Committed by Jeff Law

* loop.c: Fix formatting.

From-SVN: r35526
parent 556273e0
2000-08-06 Kazu Hirata <kazu@hxi.com>
* loop.c: Fix formatting.
* dwarf2out.c: Fix formatting.
* tm.texi (FUNCTION_ARG_PARTIAL_NREGS): Fix a typo.
......
......@@ -19,7 +19,6 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* This is the loop optimization pass of the compiler.
It finds invariant computations within loops and moves them
to the beginning of the loop. Then it identifies basic and
......@@ -352,7 +351,6 @@ static int copy_cost;
/* Cost of using a register, to normalize the benefits of a giv. */
static int reg_address_cost;
void
init_loop ()
{
......@@ -1330,7 +1328,8 @@ skip_consec_insns (insn, count)
&& (temp = find_reg_note (insn, REG_LIBCALL, NULL_RTX)))
insn = XEXP (temp, 0);
do insn = NEXT_INSN (insn);
do
insn = NEXT_INSN (insn);
while (GET_CODE (insn) == NOTE);
}
......@@ -1427,7 +1426,8 @@ combine_movables (movables, nregs)
/* Perhaps testing m->consec_sets would be more appropriate here? */
for (m = movables; m; m = m->next)
if (m->match == 0 && VARRAY_INT (n_times_set, m->regno) == 1 && !m->partial)
if (m->match == 0 && VARRAY_INT (n_times_set, m->regno) == 1
&& !m->partial)
{
register struct movable *m1;
int regno = m->regno;
......@@ -1519,7 +1519,8 @@ combine_movables (movables, nregs)
m->done = 1;
m->match = m0;
overlap: ;
overlap:
;
}
}
......@@ -2334,7 +2335,6 @@ count_nonfixed_reads (loop, x)
return value;
}
#if 0
/* P is an instruction that sets a register to the result of a ZERO_EXTEND.
Replace it with an instruction to load just the low bytes
......@@ -2487,7 +2487,8 @@ prescan_loop (loop)
label1 = SET_SRC (PATTERN (insn));
}
do {
do
{
if (label1 && label1 != pc_rtx)
{
if (GET_CODE (label1) != LABEL_REF)
......@@ -2507,7 +2508,8 @@ prescan_loop (loop)
label1 = label2;
label2 = NULL_RTX;
} while (label1);
}
while (label1);
}
}
else if (GET_CODE (insn) == RETURN)
......@@ -3328,7 +3330,6 @@ loop_invariant_p (loop, x)
return 1 + conditional;
}
/* Return nonzero if all the insns in the loop that set REG
are INSN and the immediately following insns,
and if each of those insns sets REG in an invariant way
......@@ -4099,7 +4100,7 @@ strength_reduce (loop, insn_count, flags)
rtx p;
rtx next;
for (next = NEXT_INSN (dominator); ; next = NEXT_INSN (next))
for (next = NEXT_INSN (dominator);; next = NEXT_INSN (next))
{
if (GET_CODE (next) == JUMP_INSN
|| (INSN_P (next)
......@@ -4116,7 +4117,7 @@ strength_reduce (loop, insn_count, flags)
/* Avoid problems with luids by actually moving the insn
and adjusting all luids in the range. */
reorder_insns (giv_insn, giv_insn, dominator);
for (p = dominator; INSN_UID (p) >= max_uid_for_loop; )
for (p = dominator; INSN_UID (p) >= max_uid_for_loop;)
p = PREV_INSN (p);
compute_luids (giv_insn, after_giv, INSN_LUID (p));
/* If the only purpose of the init insn is to initialize
......@@ -5653,7 +5654,6 @@ record_giv (loop, v, insn, src_reg, dest_reg, mult_val, add_val, benefit,
}
/* All this does is determine whether a giv can be made replaceable because
its final value can be calculated. This code can not be part of record_giv
above, because final_giv_value requires that the number of loop iterations
......@@ -5999,9 +5999,11 @@ basic_induction_var (loop, x, mode, dest_reg, p, inc_val, mult_val, location)
insn = p;
while (1)
{
do {
do
{
insn = PREV_INSN (insn);
} while (insn && GET_CODE (insn) == NOTE
}
while (insn && GET_CODE (insn) == NOTE
&& NOTE_LINE_NUMBER (insn) != NOTE_INSN_LOOP_BEG);
if (!insn)
......@@ -6505,7 +6507,7 @@ simplify_giv_expr (loop, x, benefit)
{
struct movable *m;
for (m = the_movables; m ; m = m->next)
for (m = the_movables; m; m = m->next)
if (rtx_equal_p (x, m->set_dest))
{
/* Ok, we found a match. Substitute and simplify. */
......@@ -6938,7 +6940,6 @@ express_from (g1, g2)
return gen_rtx_PLUS (g2->mode, mult, add);
}
}
/* Return an rtx, if any, that expresses giv G2 as a function of the register
......@@ -7041,7 +7042,7 @@ combine_givs (bl)
giv_array[i++] = g1;
stats = (struct combine_givs_stats *) xcalloc (giv_count, sizeof (*stats));
can_combine = (rtx *) xcalloc (giv_count, giv_count * sizeof(rtx));
can_combine = (rtx *) xcalloc (giv_count, giv_count * sizeof (rtx));
for (i = 0; i < giv_count; i++)
{
......@@ -7075,7 +7076,7 @@ combine_givs (bl)
if (g1 != g2
&& (this_combine = combine_givs_p (g1, g2)) != NULL_RTX)
{
can_combine[i*giv_count + j] = this_combine;
can_combine[i * giv_count + j] = this_combine;
this_benefit += g2->benefit + extra_benefit;
}
}
......@@ -7084,7 +7085,7 @@ combine_givs (bl)
/* Iterate, combining until we can't. */
restart:
qsort (stats, giv_count, sizeof(*stats), cmp_combine_givs_stats);
qsort (stats, giv_count, sizeof (*stats), cmp_combine_givs_stats);
if (loop_dump_stream)
{
......@@ -7114,13 +7115,13 @@ restart:
for (j = 0; j < giv_count; j++)
{
g2 = giv_array[j];
if (g1 != g2 && can_combine[i*giv_count + j]
if (g1 != g2 && can_combine[i * giv_count + j]
/* If it has already been combined, skip. */
&& ! g2->same && ! g2->combined_with)
{
int l;
g2->new_reg = can_combine[i*giv_count + j];
g2->new_reg = can_combine[i * giv_count + j];
g2->same = g1;
g1->combined_with++;
g1->lifetime += g2->lifetime;
......@@ -7138,7 +7139,7 @@ restart:
for (l = 0; l < giv_count; ++l)
{
int m = stats[l].giv_number;
if (can_combine[m*giv_count + j])
if (can_combine[m * giv_count + j])
stats[l].total_benefit -= g2->benefit + extra_benefit;
}
......@@ -7156,7 +7157,7 @@ restart:
for (j = 0; j < giv_count; ++j)
{
int m = stats[j].giv_number;
if (can_combine[m*giv_count + i])
if (can_combine[m * giv_count + i])
stats[j].total_benefit -= g1->benefit + extra_benefit;
}
......@@ -7333,7 +7334,7 @@ recombine_givs (loop, bl, unroll_p)
i++;
}
qsort (stats, giv_count, sizeof(*stats), cmp_recombine_givs_stats);
qsort (stats, giv_count, sizeof (*stats), cmp_recombine_givs_stats);
/* Set up the ix field for each giv in stats to name
the corresponding index into stats, and
......@@ -7397,7 +7398,7 @@ recombine_givs (loop, bl, unroll_p)
/* Loop unrolling of an inner loop can even create new DEST_REG
givs. */
rtx p;
for (p = v->insn; INSN_UID (p) >= max_uid_for_loop; )
for (p = v->insn; INSN_UID (p) >= max_uid_for_loop;)
p = PREV_INSN (p);
stats[i].start_luid = stats[i].end_luid = INSN_LUID (p);
if (p != v->insn)
......@@ -7510,7 +7511,7 @@ recombine_givs (loop, bl, unroll_p)
}
}
qsort (stats, giv_count, sizeof(*stats), cmp_recombine_givs_stats);
qsort (stats, giv_count, sizeof (*stats), cmp_recombine_givs_stats);
/* Try to derive DEST_REG givs from previous DEST_REG givs with the
same mult_val and non-overlapping lifetime. This reduces register
......@@ -7945,7 +7946,8 @@ check_dbra_loop (loop, insn_count)
}
if (no_use_except_counting)
; /* no need to worry about MEMs. */
/* No need to worry about MEMs. */
;
else if (num_mem_sets <= 1)
{
for (p = loop_start; p != loop_end; p = NEXT_INSN (p))
......@@ -8041,7 +8043,7 @@ check_dbra_loop (loop, insn_count)
if (comparison_const_width > HOST_BITS_PER_WIDE_INT)
comparison_const_width = HOST_BITS_PER_WIDE_INT;
comparison_sign_mask
= (unsigned HOST_WIDE_INT)1 << (comparison_const_width - 1);
= (unsigned HOST_WIDE_INT) 1 << (comparison_const_width - 1);
/* If the comparison value is not a loop invariant, then we
can not reverse this loop.
......@@ -8418,7 +8420,7 @@ loop_insn_first_p (insn, reference)
{
rtx p, q;
for (p = insn, q = reference; ;)
for (p = insn, q = reference;;)
{
/* Start with test for not first so that INSN == REFERENCE yields not
first. */
......@@ -8573,7 +8575,8 @@ maybe_eliminate_biv_1 (loop, x, insn, bl, eliminate_p, where)
overflow problem. */
for (v = bl->giv; v; v = v->next_iv)
if (GET_CODE (v->mult_val) == CONST_INT && v->mult_val != const0_rtx
if (GET_CODE (v->mult_val) == CONST_INT
&& v->mult_val != const0_rtx
&& ! v->ignore && ! v->maybe_dead && v->always_computable
&& v->mode == mode
&& (GET_CODE (v->add_val) == SYMBOL_REF
......@@ -8638,7 +8641,8 @@ maybe_eliminate_biv_1 (loop, x, insn, bl, eliminate_p, where)
negative mult_val, but it seems complex to do it in general. */
for (v = bl->giv; v; v = v->next_iv)
if (GET_CODE (v->mult_val) == CONST_INT && INTVAL (v->mult_val) > 0
if (GET_CODE (v->mult_val) == CONST_INT
&& INTVAL (v->mult_val) > 0
&& (GET_CODE (v->add_val) == SYMBOL_REF
|| GET_CODE (v->add_val) == LABEL_REF
|| GET_CODE (v->add_val) == CONST
......@@ -8654,7 +8658,7 @@ maybe_eliminate_biv_1 (loop, x, insn, bl, eliminate_p, where)
return 1;
/* Replace biv with the giv's reduced reg. */
validate_change (insn, &XEXP (x, 1-arg_operand), v->new_reg, 1);
validate_change (insn, &XEXP (x, 1 - arg_operand), v->new_reg, 1);
/* If all constants are actually constant integers and
the derived constant can be directly placed in the COMPARE,
......@@ -8684,7 +8688,8 @@ maybe_eliminate_biv_1 (loop, x, insn, bl, eliminate_p, where)
??? Turn this off due to possible overflow. */
for (v = bl->giv; v; v = v->next_iv)
if (GET_CODE (v->mult_val) == CONST_INT && INTVAL (v->mult_val) > 0
if (GET_CODE (v->mult_val) == CONST_INT
&& INTVAL (v->mult_val) > 0
&& ! v->ignore && ! v->maybe_dead && v->always_computable
&& v->mode == mode
&& 0)
......@@ -8788,7 +8793,7 @@ maybe_eliminate_biv_1 (loop, x, insn, bl, eliminate_p, where)
return 1;
/* Replace biv with its giv's reduced reg. */
XEXP (x, 1-arg_operand) = v->new_reg;
XEXP (x, 1 - arg_operand) = v->new_reg;
/* Replace other operand with the other giv's
reduced reg. */
XEXP (x, arg_operand) = tv->new_reg;
......@@ -9186,7 +9191,6 @@ canonicalize_condition (insn, cond, reverse, earliest, want_reg)
return gen_rtx_fmt_ee (code, VOIDmode, op0, op1);
}
/* Given a jump insn JUMP, return the condition that will cause it to branch
to its JUMP_LABEL. If the condition cannot be understood, or is an
inequality floating-point comparison which needs to be reversed, 0 will
......@@ -9242,7 +9246,6 @@ get_condition_for_loop (loop, x)
XEXP (comparison, 1), XEXP (comparison, 0));
}
/* Scan the function and determine whether it has indirect (computed) jumps.
This is taken mostly from flow.c; similar code exists elsewhere
......@@ -9735,7 +9738,7 @@ note_reg_stored (x, setter, arg)
rtx x, setter ATTRIBUTE_UNUSED;
void *arg;
{
struct note_reg_stored_arg *t = (struct note_reg_stored_arg *)arg;
struct note_reg_stored_arg *t = (struct note_reg_stored_arg *) arg;
if (t->reg == x)
t->set_seen = 1;
}
......@@ -9949,7 +9952,7 @@ replace_loop_mem (mem, data)
return 0;
}
ri = (rtx_and_int*) data;
ri = (rtx_and_int *) data;
i = ri->i;
if (!rtx_equal_p (loop_mems[i].mem, m))
......@@ -9975,7 +9978,7 @@ replace_loop_reg (px, data)
void *data;
{
rtx x = *px;
rtx *array = (rtx *)data;
rtx *array = (rtx *) data;
if (x == NULL_RTX)
return 0;
......@@ -9996,8 +9999,8 @@ replace_label (x, data)
void *data;
{
rtx l = *x;
rtx old_label = ((rtx_pair*) data)->r1;
rtx new_label = ((rtx_pair*) data)->r2;
rtx old_label = ((rtx_pair *) data)->r1;
rtx new_label = ((rtx_pair *) data)->r2;
if (l == NULL_RTX)
return 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