alias.c (init_alias_analysis): Allocate reg_known_value and reg_known_equiv_p on the heap.

* alias.c (init_alias_analysis): Allocate reg_known_value and
 	reg_known_equiv_p on the heap.  Likewise for new_reg_base_value
	and reg_seen.
	(end_alias_analysis): Free reg_known_value and reg_known_equiv_p.
	* cse.c (cse_main): Call end_alias_analysis.
	* haifa-sched.c (schedule_insns): Likewise.
	* local-alloc. (update_equiv_regs): Likewise.
	* reload1.c (reload_cse_regs): Likewise.

From-SVN: r30217
This commit is contained in:
Mark Mitchell 1999-10-27 17:34:59 +00:00 committed by Mark Mitchell
parent 46cc13b3e0
commit e05e2395bd
6 changed files with 36 additions and 10 deletions

View File

@ -1,3 +1,14 @@
Wed Oct 27 02:05:58 1999 Mark P. Mitchell <mark@codesourcery.com>
* alias.c (init_alias_analysis): Allocate reg_known_value and
reg_known_equiv_p on the heap. Likewise for new_reg_base_value
and reg_seen.
(end_alias_analysis): Free reg_known_value and reg_known_equiv_p.
* cse.c (cse_main): Call end_alias_analysis.
* haifa-sched.c (schedule_insns): Likewise.
* local-alloc. (update_equiv_regs): Likewise.
* reload1.c (reload_cse_regs): Likewise.
Wed Oct 27 01:49:17 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* sparc/sparc.c (sparc_override_options): Clear MASK_FPU_SET.

View File

@ -1538,15 +1538,12 @@ init_alias_analysis ()
reg_known_value_size = maxreg;
reg_known_value
= (rtx *) oballoc ((maxreg - FIRST_PSEUDO_REGISTER) * sizeof (rtx))
reg_known_value
= (rtx *) xcalloc ((maxreg - FIRST_PSEUDO_REGISTER), sizeof (rtx))
- FIRST_PSEUDO_REGISTER;
reg_known_equiv_p
= (char*) xcalloc ((maxreg - FIRST_PSEUDO_REGISTER), sizeof (char))
- FIRST_PSEUDO_REGISTER;
reg_known_equiv_p =
oballoc (maxreg - FIRST_PSEUDO_REGISTER) - FIRST_PSEUDO_REGISTER;
bzero ((char *) (reg_known_value + FIRST_PSEUDO_REGISTER),
(maxreg-FIRST_PSEUDO_REGISTER) * sizeof (rtx));
bzero (reg_known_equiv_p + FIRST_PSEUDO_REGISTER,
(maxreg - FIRST_PSEUDO_REGISTER) * sizeof (char));
/* Overallocate reg_base_value to allow some growth during loop
optimization. Loop unrolling can create a large number of
@ -1556,8 +1553,8 @@ init_alias_analysis ()
if (ggc_p)
ggc_add_rtx_root (reg_base_value, reg_base_value_size);
new_reg_base_value = (rtx *)alloca (reg_base_value_size * sizeof (rtx));
reg_seen = (char *)alloca (reg_base_value_size);
new_reg_base_value = (rtx *) xmalloc (reg_base_value_size * sizeof (rtx));
reg_seen = (char *) xmalloc (reg_base_value_size);
if (! reload_completed && flag_unroll_loops)
{
/* ??? Why are we realloc'ing if we're just going to zero it? */
@ -1730,15 +1727,21 @@ init_alias_analysis ()
}
while (changed && pass < MAX_ALIAS_LOOP_PASSES);
/* Clean up. */
free (new_reg_base_value);
new_reg_base_value = 0;
free (reg_seen);
reg_seen = 0;
}
void
end_alias_analysis ()
{
free (reg_known_value + FIRST_PSEUDO_REGISTER);
reg_known_value = 0;
reg_known_value_size = 0;
free (reg_known_equiv_p + FIRST_PSEUDO_REGISTER);
reg_known_equiv_p = 0;
if (reg_base_value)
{
if (ggc_p)

View File

@ -8801,6 +8801,9 @@ cse_main (f, nregs, after_loop, file)
if (max_elements_made < n_elements_made)
max_elements_made = n_elements_made;
/* Clean up. */
end_alias_analysis ();
return cse_jumps_altered || recorded_label_ref;
}

View File

@ -7123,6 +7123,9 @@ schedule_insns (dump_file)
fprintf (dump, "\n\n");
}
/* Clean up. */
end_alias_analysis ();
if (true_dependency_cache)
{
free (true_dependency_cache);

View File

@ -996,6 +996,9 @@ update_equiv_regs ()
}
}
}
/* Clean up. */
end_alias_analysis ();
}
/* Mark REG as having no known equivalence.

View File

@ -8926,6 +8926,9 @@ reload_cse_regs_1 (first)
}
}
/* Clean up. */
end_alias_analysis ();
/* Free all the temporary structures we created, and go back to the
regular obstacks. */
obstack_free (&reload_obstack, firstobj);