From 370adb7b5dcde35845e0d7b43cf05628a6193c7a Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Sat, 29 Jul 2006 15:14:22 +0200 Subject: [PATCH] re PR middle-end/28071 (A file that can not be compiled in reasonable time/space) PR rtl-optimization/28071 * cfgrtl.c (rtl_delete_block): Free regsets. * flow.c (allocate_bb_life_data): Re-use regsets if available. From-SVN: r115810 --- gcc/ChangeLog | 6 ++++++ gcc/cfgrtl.c | 7 +++++++ gcc/flow.c | 12 ++++++++++-- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ba7d040a7f8..32c5848fc05 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2006-07-28 Jan Hubicka + + PR rtl-optimization/28071 + * cfgrtl.c (rtl_delete_block): Free regsets. + * flow.c (allocate_bb_life_data): Re-use regsets if available. + 2006-07-28 Volker Reichelt * Makefile.in: Use $(HEADER_H) instead of header.h in dependencies diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index 723e323ef26..b07bb9467eb 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -386,6 +386,13 @@ rtl_delete_block (basic_block b) /* 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 BLOCK_FOR_INSN for every insn. */ diff --git a/gcc/flow.c b/gcc/flow.c index 4913102a8f5..4989db3e390 100644 --- a/gcc/flow.c +++ b/gcc/flow.c @@ -1564,8 +1564,16 @@ allocate_bb_life_data (void) FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb) { - bb->il.rtl->global_live_at_start = ALLOC_REG_SET (®_obstack); - bb->il.rtl->global_live_at_end = ALLOC_REG_SET (®_obstack); + 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 = ALLOC_REG_SET (®_obstack); + bb->il.rtl->global_live_at_end = ALLOC_REG_SET (®_obstack); + } } regs_live_at_setjmp = ALLOC_REG_SET (®_obstack); -- 2.30.2