Hi,
this is another low hanging 100MB fruit on bug2.c compilation. The
liveness bitmaps are very dense and very numberous resulting in large memory
consumption, but we throw them away for each liveness pass not freeing them
until end of compilation of the function.
:ADDPATCH middle-end:
Bootstrapped/regtested i686-linux, K?
2006-07-27 Jan Hubicka <jh (AT) suse (DOT) cz>
PR rtl-optimization/28071
* cfgrtl.c (rtl_delete_block): Free regsets.
* flow.c (allocate_bb_life_data): Re-use regsets if available.
Index: cfgrtl.c
cfgrtl.c(revision 115764)
cfgrtl.c(working copy)
rtl_delete_block (basic_block b)
386,391
386,398
/* Selectively delete the entire chain. */
BB_HEAD (b) = NULL;
delete_insn_chain (insn, end);
+ if (b->il.rtl->global_live_at_start)
+ {
+ FREE_REG_SET (b->il.rtl->global_live_at_start);
+ FREE_REG_SET (b->il.rtl->global_live_at_end);
+ b->il.rtl->global_live_at_start = NULL;
+ b->il.rtl->global_live_at_end = NULL;
+ }
}
/* Records the basic block struct in BLCK_FR_INSN for every insn. */
Index: flow.c
flow.c(revision 115764)
flow.c(working copy)
allocate_bb_life_data (void)
1564,1571
FR_BB_BETWEEN (bb, ENTRY_BLCK_PTR, NULL, next_bb)
{
! bb->il.rtl->global_live_at_start = ALLC_REG_SET (®_obstack);
! bb->il.rtl->global_live_at_end = ALLC_REG_SET (®_obstack);
}
regs_live_at_setjmp = ALLC_REG_SET (®_obstack);
1564,1579
FR_BB_BETWEEN (bb, ENTRY_BLCK_PTR, NULL, next_bb)
{
! if (bb->il.rtl->global_live_at_start)
! {
! CLEAR_REG_SET (bb->il.rtl->global_live_at_start);
! CLEAR_REG_SET (bb->il.rtl->global_live_at_end);
! }
! else
! {
! bb->il.rtl->global_live_at_start = ALLC_REG_SET (®_obstack);
! bb->il.rtl->global_live_at_end = ALLC_REG_SET (®_obstack);
! }
}
regs_live_at_setjmp = ALLC_REG_SET (®_obstack);