toplev.c (compile_file): Call allocate_reg_info to free register table memory.
authorJeffrey A Law <law@cygnus.com>
Wed, 28 Oct 1998 00:06:22 +0000 (00:06 +0000)
committerJeff Law <law@gcc.gnu.org>
Wed, 28 Oct 1998 00:06:22 +0000 (17:06 -0700)
        * toplev.c (compile_file): Call allocate_reg_info to free register
        table memory.
        * rtl.h (allocate_reg_info): Declare.

From-SVN: r23384

gcc/ChangeLog
gcc/rtl.h
gcc/toplev.c

index a07b16a307ea87fe29337b9d40f3137ec0f0ad34..6d32f11b2a7a7d0866a28463e3263bcd98f6cc22 100644 (file)
@@ -4,6 +4,10 @@
 
 Wed Oct 28 00:10:35 1998  Jeffrey A Law  (law@cygnus.com)
 
+       * toplev.c (compile_file): Call allocate_reg_info to free register
+       table memory.
+       * rtl.h (allocate_reg_info): Declare.
+
        * PROJECTS: Remove entry for local spilling.
 
        * final.c (cleanup_subreg_operands): New function.
index d655d4e593ede030329f71d1011a166f774a6e46..0d7ffb77a8e48d176252dbf2eb11631c6f18f3de 100644 (file)
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -1009,6 +1009,9 @@ extern rtx find_use_as_address            PROTO((rtx, rtx, HOST_WIDE_INT));
 
 extern int max_parallel;
 
+/* Free up register info memory.  */
+extern void allocate_reg_info          PROTO((size_t, int, int));
+
 /* recog.c */
 extern int asm_noperands               PROTO((rtx));
 extern char *decode_asm_operands       PROTO((rtx, rtx *, rtx **, char **, enum machine_mode *));
index 64ef43e4301d561788b63203db8cc0d6a2496eeb..24b7c5ca9d125dbb8b8660ac5b84ea10784ea3e8 100644 (file)
@@ -3067,6 +3067,7 @@ compile_file (name)
   ASM_FILE_END (asm_out_file);
 #endif
 
+
   /* Language-specific end of compilation actions.  */
  finish_syntax:
   lang_finish ();
@@ -3097,6 +3098,9 @@ compile_file (name)
       && (ferror (asm_out_file) != 0 || fclose (asm_out_file) != 0))
     fatal_io_error (asm_file_name);
 
+  /* Free up memory for the benefit of leak detectors.  */
+  allocate_reg_info (-1, 0, 0);
+
   /* Print the times.  */
 
   if (! quiet_flag)