]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR middle-end/28071 (A file that can not be compiled in reasonable time/space)
authorJan Hubicka <jh@suse.cz>
Sat, 29 Jul 2006 13:14:22 +0000 (15:14 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sat, 29 Jul 2006 13:14:22 +0000 (13:14 +0000)
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
gcc/cfgrtl.c
gcc/flow.c

index ba7d040a7f81d61b3055b518d651cd6b11758b79..32c5848fc05b2af1176533ba9a306aa842607e8b 100644 (file)
@@ -1,3 +1,9 @@
+2006-07-28  Jan Hubicka  <jh@suse.cz>
+
+       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  <reichelt@igpm.rwth-aachen.de>
 
        * Makefile.in: Use $(HEADER_H) instead of header.h in dependencies
index 723e323ef26fd499a1c28beb39b96886b546a9cb..b07bb9467eb17365c363ed7f071e89818ff6f9d3 100644 (file)
@@ -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;
+    }
 }
 \f
 /* Records the basic block struct in BLOCK_FOR_INSN for every insn.  */
index 4913102a8f59ee583ada0360847804300ad2a573..4989db3e39019da782645410f078bcbb99001440 100644 (file)
@@ -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 (&reg_obstack);
-      bb->il.rtl->global_live_at_end = ALLOC_REG_SET (&reg_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 (&reg_obstack);
+         bb->il.rtl->global_live_at_end = ALLOC_REG_SET (&reg_obstack);
+       }
     }
 
   regs_live_at_setjmp = ALLOC_REG_SET (&reg_obstack);