Commit 69bfd3c9 by Jan Hubicka Committed by Jan Hubicka

re PR middle-end/28071 (A file that can not be compiled in reasonable time/space)

	PR rtl-optimization/28071
	* global.c (greg_obstack): New obstack.
	(allocate_bb_info): Use it.
	(free_bb_info): Likewise.
	(modify_reg_pav): Likewise.

From-SVN: r115776
parent 482c6ce8
2006-07-27 Jan Hubicka <jh@suse.cz>
PR rtl-optimization/28071
* global.c (greg_obstack): New obstack.
(allocate_bb_info): Use it.
(free_bb_info): Likewise.
(modify_reg_pav): Likewise.
2006-07-27 Roger Sayle <roger@eyesopen.com> 2006-07-27 Roger Sayle <roger@eyesopen.com>
* builtins.c (fold_fixed_mathfn): When long and long long are the * builtins.c (fold_fixed_mathfn): When long and long long are the
......
...@@ -2047,6 +2047,7 @@ struct bb_info ...@@ -2047,6 +2047,7 @@ struct bb_info
#define BB_INFO(BB) ((struct bb_info *) (BB)->aux) #define BB_INFO(BB) ((struct bb_info *) (BB)->aux)
#define BB_INFO_BY_INDEX(N) BB_INFO (BASIC_BLOCK(N)) #define BB_INFO_BY_INDEX(N) BB_INFO (BASIC_BLOCK(N))
static struct bitmap_obstack greg_obstack;
/* The function allocates the info structures of each basic block. It /* The function allocates the info structures of each basic block. It
also initialized LIVE_PAVIN and LIVE_PAVOUT as if all hard also initialized LIVE_PAVIN and LIVE_PAVOUT as if all hard
registers were partially available. */ registers were partially available. */
...@@ -2063,14 +2064,15 @@ allocate_bb_info (void) ...@@ -2063,14 +2064,15 @@ allocate_bb_info (void)
init = BITMAP_ALLOC (NULL); init = BITMAP_ALLOC (NULL);
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
bitmap_set_bit (init, i); bitmap_set_bit (init, i);
bitmap_obstack_initialize (&greg_obstack);
FOR_EACH_BB (bb) FOR_EACH_BB (bb)
{ {
bb_info = bb->aux; bb_info = bb->aux;
bb_info->earlyclobber = BITMAP_ALLOC (NULL); bb_info->earlyclobber = BITMAP_ALLOC (&greg_obstack);
bb_info->avloc = BITMAP_ALLOC (NULL); bb_info->avloc = BITMAP_ALLOC (&greg_obstack);
bb_info->killed = BITMAP_ALLOC (NULL); bb_info->killed = BITMAP_ALLOC (&greg_obstack);
bb_info->live_pavin = BITMAP_ALLOC (NULL); bb_info->live_pavin = BITMAP_ALLOC (&greg_obstack);
bb_info->live_pavout = BITMAP_ALLOC (NULL); bb_info->live_pavout = BITMAP_ALLOC (&greg_obstack);
bitmap_copy (bb_info->live_pavin, init); bitmap_copy (bb_info->live_pavin, init);
bitmap_copy (bb_info->live_pavout, init); bitmap_copy (bb_info->live_pavout, init);
} }
...@@ -2082,18 +2084,7 @@ allocate_bb_info (void) ...@@ -2082,18 +2084,7 @@ allocate_bb_info (void)
static void static void
free_bb_info (void) free_bb_info (void)
{ {
basic_block bb; bitmap_obstack_release (&greg_obstack);
struct bb_info *bb_info;
FOR_EACH_BB (bb)
{
bb_info = BB_INFO (bb);
BITMAP_FREE (bb_info->live_pavout);
BITMAP_FREE (bb_info->live_pavin);
BITMAP_FREE (bb_info->killed);
BITMAP_FREE (bb_info->avloc);
BITMAP_FREE (bb_info->earlyclobber);
}
free_aux_for_blocks (); free_aux_for_blocks ();
} }
...@@ -2415,7 +2406,7 @@ modify_reg_pav (void) ...@@ -2415,7 +2406,7 @@ modify_reg_pav (void)
CLEAR_HARD_REG_SET (stack_hard_regs); CLEAR_HARD_REG_SET (stack_hard_regs);
for (i = FIRST_STACK_REG; i <= LAST_STACK_REG; i++) for (i = FIRST_STACK_REG; i <= LAST_STACK_REG; i++)
SET_HARD_REG_BIT(stack_hard_regs, i); SET_HARD_REG_BIT(stack_hard_regs, i);
stack_regs = BITMAP_ALLOC (NULL); stack_regs = BITMAP_ALLOC (&greg_obstack);
for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++) for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++)
{ {
COPY_HARD_REG_SET (used, reg_class_contents[reg_preferred_class (i)]); COPY_HARD_REG_SET (used, reg_class_contents[reg_preferred_class (i)]);
......
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