Commit 69ba6af3 by Richard Henderson

loop.c (basic_induction_var): Typo NULL_RTX -> NULL.

        * loop.c (basic_induction_var): Typo NULL_RTX -> NULL.
        (strength_reduce): Release the varrays from the no-bivs early exit.

        * reload1.c (order_regs_for_reload): Init hard_reg_n_uses before
        the loop over the registers.

        * tree.c (save_tree_status): Set maybepermanent_firstobj NULL
        for a new obstack.
        (restore_tree_status): Check that instead when freeing the obstack.

From-SVN: r29270
parent a0d8bee9
...@@ -3926,7 +3926,7 @@ strength_reduce (scan_start, end, loop_top, insn_count, ...@@ -3926,7 +3926,7 @@ strength_reduce (scan_start, end, loop_top, insn_count,
unroll_loop (loop_end, insn_count, loop_start, end_insert_before, unroll_loop (loop_end, insn_count, loop_start, end_insert_before,
loop_info, 0); loop_info, 0);
return; goto egress;
} }
/* Find initial value for each biv by searching backwards from loop_start, /* Find initial value for each biv by searching backwards from loop_start,
...@@ -5225,6 +5225,8 @@ strength_reduce (scan_start, end, loop_top, insn_count, ...@@ -5225,6 +5225,8 @@ strength_reduce (scan_start, end, loop_top, insn_count,
if (loop_dump_stream) if (loop_dump_stream)
fprintf (loop_dump_stream, "\n"); fprintf (loop_dump_stream, "\n");
egress:
VARRAY_FREE (reg_iv_type); VARRAY_FREE (reg_iv_type);
VARRAY_FREE (reg_iv_info); VARRAY_FREE (reg_iv_info);
} }
...@@ -6000,7 +6002,7 @@ basic_induction_var (x, mode, dest_reg, p, inc_val, mult_val, location) ...@@ -6000,7 +6002,7 @@ basic_induction_var (x, mode, dest_reg, p, inc_val, mult_val, location)
rtx insn, set = 0; rtx insn, set = 0;
code = GET_CODE (x); code = GET_CODE (x);
*location = NULL_RTX; *location = NULL;
switch (code) switch (code)
{ {
case PLUS: case PLUS:
......
...@@ -4109,6 +4109,12 @@ order_regs_for_reload (chain) ...@@ -4109,6 +4109,12 @@ order_regs_for_reload (chain)
COPY_HARD_REG_SET (bad_spill_regs, bad_spill_regs_global); COPY_HARD_REG_SET (bad_spill_regs, bad_spill_regs_global);
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
{
hard_reg_n_uses[i].regno = i;
hard_reg_n_uses[i].uses = 0;
}
/* Count number of uses of each hard reg by pseudo regs allocated to it /* Count number of uses of each hard reg by pseudo regs allocated to it
and then order them by decreasing use. */ and then order them by decreasing use. */
...@@ -4116,9 +4122,6 @@ order_regs_for_reload (chain) ...@@ -4116,9 +4122,6 @@ order_regs_for_reload (chain)
{ {
int j; int j;
hard_reg_n_uses[i].regno = i;
hard_reg_n_uses[i].uses = 0;
/* Test the various reasons why we can't use a register for /* Test the various reasons why we can't use a register for
spilling in this insn. */ spilling in this insn. */
if (fixed_regs[i] if (fixed_regs[i]
......
...@@ -365,8 +365,7 @@ save_tree_status (p) ...@@ -365,8 +365,7 @@ save_tree_status (p)
function_maybepermanent_obstack function_maybepermanent_obstack
= (struct obstack *) xmalloc (sizeof (struct obstack)); = (struct obstack *) xmalloc (sizeof (struct obstack));
gcc_obstack_init (function_maybepermanent_obstack); gcc_obstack_init (function_maybepermanent_obstack);
maybepermanent_firstobj maybepermanent_firstobj = NULL;
= (char *) obstack_finish (function_maybepermanent_obstack);
function_obstack = (struct obstack *) xmalloc (sizeof (struct obstack)); function_obstack = (struct obstack *) xmalloc (sizeof (struct obstack));
gcc_obstack_init (function_obstack); gcc_obstack_init (function_obstack);
...@@ -399,9 +398,9 @@ restore_tree_status (p) ...@@ -399,9 +398,9 @@ restore_tree_status (p)
obstack_free (&temporary_obstack, temporary_firstobj); obstack_free (&temporary_obstack, temporary_firstobj);
obstack_free (&momentary_obstack, momentary_function_firstobj); obstack_free (&momentary_obstack, momentary_function_firstobj);
obstack_free (function_obstack, 0); obstack_free (function_obstack, NULL);
if (obstack_empty_p (function_maybepermanent_obstack)) if (maybepermanent_firstobj == NULL)
free (function_maybepermanent_obstack); free (function_maybepermanent_obstack);
free (function_obstack); free (function_obstack);
......
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