Commit 64e3a413 by Kazu Hirata Committed by Jeff Law

* local-alloc.c: Fix formatting.

From-SVN: r35378
parent bbe65572
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
2000-07-31 Kazu Hirata <kazu@hxi.com> 2000-07-31 Kazu Hirata <kazu@hxi.com>
* local-alloc.c: Fix formatting.
* h8300.c (get_shift_alg): Remove the variable alg. * h8300.c (get_shift_alg): Remove the variable alg.
(emit_a_shift): Rearrange code to improve readability. (emit_a_shift): Rearrange code to improve readability.
......
...@@ -19,7 +19,6 @@ along with GNU CC; see the file COPYING. If not, write to ...@@ -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, the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
/* Allocation of hard register numbers to pseudo registers is done in /* Allocation of hard register numbers to pseudo registers is done in
two passes. In this pass we consider only regs that are born and two passes. In this pass we consider only regs that are born and
die once within one basic block. We do this one basic block at a die once within one basic block. We do this one basic block at a
...@@ -177,7 +176,6 @@ static short *qty_phys_num_copy_sugg; ...@@ -177,7 +176,6 @@ static short *qty_phys_num_copy_sugg;
static short *qty_phys_num_sugg; static short *qty_phys_num_sugg;
/* If (REG N) has been assigned a quantity number, is a register number /* If (REG N) has been assigned a quantity number, is a register number
of another register assigned the same quantity number, or -1 for the of another register assigned the same quantity number, or -1 for the
end of the chain. qty->first_reg point to the head of this chain. */ end of the chain. qty->first_reg point to the head of this chain. */
...@@ -344,9 +342,9 @@ local_alloc () ...@@ -344,9 +342,9 @@ local_alloc ()
reg_qty = (int *) xmalloc (max_regno * sizeof (int)); reg_qty = (int *) xmalloc (max_regno * sizeof (int));
reg_offset = (char *) xmalloc (max_regno * sizeof (char)); reg_offset = (char *) xmalloc (max_regno * sizeof (char));
reg_next_in_qty = (int *) xmalloc(max_regno * sizeof (int)); reg_next_in_qty = (int *) xmalloc (max_regno * sizeof (int));
/* Allocate the reg_renumber array */ /* Allocate the reg_renumber array. */
allocate_reg_info (max_regno, FALSE, TRUE); allocate_reg_info (max_regno, FALSE, TRUE);
/* Determine which pseudo-registers can be allocated by local-alloc. /* Determine which pseudo-registers can be allocated by local-alloc.
...@@ -862,7 +860,6 @@ update_equiv_regs () ...@@ -862,7 +860,6 @@ update_equiv_regs ()
== LABEL_REF))) == LABEL_REF)))
recorded_label_ref = 1; recorded_label_ref = 1;
reg_equiv_replacement[regno] = XEXP (note, 0); reg_equiv_replacement[regno] = XEXP (note, 0);
/* Don't mess with things live during setjmp. */ /* Don't mess with things live during setjmp. */
...@@ -1434,7 +1431,6 @@ block_alloc (b) ...@@ -1434,7 +1431,6 @@ block_alloc (b)
&& !optimize_size && !optimize_size
&& !SMALL_REGISTER_CLASSES) && !SMALL_REGISTER_CLASSES)
{ {
qty[q].phys_reg = find_free_reg (qty[q].min_class, qty[q].phys_reg = find_free_reg (qty[q].min_class,
qty[q].mode, q, 0, 0, qty[q].mode, q, 0, 0,
fake_birth, fake_death); fake_birth, fake_death);
...@@ -1513,7 +1509,7 @@ qty_compare_1 (q1p, q2p) ...@@ -1513,7 +1509,7 @@ qty_compare_1 (q1p, q2p)
const PTR q1p; const PTR q1p;
const PTR q2p; const PTR q2p;
{ {
register int q1 = *(const int *)q1p, q2 = *(const int *)q2p; register int q1 = *(const int *) q1p, q2 = *(const int *) q2p;
register int tem = QTY_CMP_PRI (q2) - QTY_CMP_PRI (q1); register int tem = QTY_CMP_PRI (q2) - QTY_CMP_PRI (q1);
if (tem != 0) if (tem != 0)
...@@ -1553,7 +1549,7 @@ qty_sugg_compare_1 (q1p, q2p) ...@@ -1553,7 +1549,7 @@ qty_sugg_compare_1 (q1p, q2p)
const PTR q1p; const PTR q1p;
const PTR q2p; const PTR q2p;
{ {
register int q1 = *(const int *)q1p, q2 = *(const int *)q2p; register int q1 = *(const int *) q1p, q2 = *(const int *) q2p;
register int tem = QTY_CMP_SUGG (q1) - QTY_CMP_SUGG (q2); register int tem = QTY_CMP_SUGG (q1) - QTY_CMP_SUGG (q2);
if (tem != 0) if (tem != 0)
...@@ -1593,7 +1589,6 @@ qty_sugg_compare_1 (q1p, q2p) ...@@ -1593,7 +1589,6 @@ qty_sugg_compare_1 (q1p, q2p)
There are elaborate checks for the validity of combining. */ There are elaborate checks for the validity of combining. */
static int static int
combine_regs (usedreg, setreg, may_save_copy, insn_number, insn, already_dead) combine_regs (usedreg, setreg, may_save_copy, insn_number, insn, already_dead)
rtx usedreg, setreg; rtx usedreg, setreg;
...@@ -1916,7 +1911,7 @@ wipe_dead_reg (reg, output_p) ...@@ -1916,7 +1911,7 @@ wipe_dead_reg (reg, output_p)
not to happen). */ not to happen). */
if (output_p) if (output_p)
post_mark_life (regno, GET_MODE (reg), 1, post_mark_life (regno, GET_MODE (reg), 1,
2 * this_insn_number, 2 * this_insn_number+ 1); 2 * this_insn_number, 2 * this_insn_number + 1);
} }
else if (reg_qty[regno] >= 0) else if (reg_qty[regno] >= 0)
...@@ -1947,7 +1942,8 @@ find_free_reg (class, mode, qtyno, accept_call_clobbered, just_try_suggested, ...@@ -1947,7 +1942,8 @@ find_free_reg (class, mode, qtyno, accept_call_clobbered, just_try_suggested,
{ {
register int i, ins; register int i, ins;
#ifdef HARD_REG_SET #ifdef HARD_REG_SET
register /* Declare it register if it's a scalar. */ /* Declare it register if it's a scalar. */
register
#endif #endif
HARD_REG_SET used, first_used; HARD_REG_SET used, first_used;
#ifdef ELIMINABLE_REGS #ifdef ELIMINABLE_REGS
...@@ -1986,7 +1982,7 @@ find_free_reg (class, mode, qtyno, accept_call_clobbered, just_try_suggested, ...@@ -1986,7 +1982,7 @@ find_free_reg (class, mode, qtyno, accept_call_clobbered, just_try_suggested,
This is true of any register that can be eliminated. */ This is true of any register that can be eliminated. */
#ifdef ELIMINABLE_REGS #ifdef ELIMINABLE_REGS
for (i = 0; i < (int)(sizeof eliminables / sizeof eliminables[0]); i++) for (i = 0; i < (int) (sizeof eliminables / sizeof eliminables[0]); i++)
SET_HARD_REG_BIT (used, eliminables[i].from); SET_HARD_REG_BIT (used, eliminables[i].from);
#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM #if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
/* If FRAME_POINTER_REGNUM is not a real register, then protect the one /* If FRAME_POINTER_REGNUM is not a real register, then protect the one
...@@ -2048,13 +2044,13 @@ find_free_reg (class, mode, qtyno, accept_call_clobbered, just_try_suggested, ...@@ -2048,13 +2044,13 @@ find_free_reg (class, mode, qtyno, accept_call_clobbered, just_try_suggested,
return regno; return regno;
} }
#ifndef REG_ALLOC_ORDER #ifndef REG_ALLOC_ORDER
i += j; /* Skip starting points we know will lose */ /* Skip starting points we know will lose. */
i += j;
#endif #endif
} }
} }
fail: fail:
/* If we are just trying suggested register, we have just tried copy- /* If we are just trying suggested register, we have just tried copy-
suggested registers, and there are arithmetic-suggested registers, suggested registers, and there are arithmetic-suggested registers,
try them. */ try them. */
...@@ -2078,7 +2074,8 @@ find_free_reg (class, mode, qtyno, accept_call_clobbered, just_try_suggested, ...@@ -2078,7 +2074,8 @@ find_free_reg (class, mode, qtyno, accept_call_clobbered, just_try_suggested,
&& flag_caller_saves && flag_caller_saves
&& ! just_try_suggested && ! just_try_suggested
&& qty[qtyno].n_calls_crossed != 0 && qty[qtyno].n_calls_crossed != 0
&& CALLER_SAVE_PROFITABLE (qty[qtyno].n_refs, qty[qtyno].n_calls_crossed)) && CALLER_SAVE_PROFITABLE (qty[qtyno].n_refs,
qty[qtyno].n_calls_crossed))
{ {
i = find_free_reg (class, mode, qtyno, 1, 0, born_index, dead_index); i = find_free_reg (class, mode, qtyno, 1, 0, born_index, dead_index);
if (i >= 0) if (i >= 0)
...@@ -2119,7 +2116,8 @@ post_mark_life (regno, mode, life, birth, death) ...@@ -2119,7 +2116,8 @@ post_mark_life (regno, mode, life, birth, death)
{ {
register int j = HARD_REGNO_NREGS (regno, mode); register int j = HARD_REGNO_NREGS (regno, mode);
#ifdef HARD_REG_SET #ifdef HARD_REG_SET
register /* Declare it register if it's a scalar. */ /* Declare it register if it's a scalar. */
register
#endif #endif
HARD_REG_SET this_reg; HARD_REG_SET this_reg;
......
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