passes.c (register_one_dump_file): Free full_name.
authorJakub Jelinek <jakub@redhat.com>
Mon, 2 Jan 2012 13:34:52 +0000 (14:34 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 2 Jan 2012 13:34:52 +0000 (14:34 +0100)
* passes.c (register_one_dump_file): Free full_name.

* reload1.c (reload): Don't allocate reg_max_ref_width
here.
(calculate_elim_costs_all_insns): Free offsets_at and
offsets_known_at at the end and clear the pointers.

From-SVN: r182800

gcc/ChangeLog
gcc/passes.c
gcc/reload1.c

index e86e8cd31d6e35718e3063ecc0475074cb8e87bc..5b0d4a682232d4da64ba966ede2ffac0927e8588 100644 (file)
@@ -1,3 +1,12 @@
+2012-01-02  Jakub Jelinek  <jakub@redhat.com>
+
+       * passes.c (register_one_dump_file): Free full_name.
+
+       * reload1.c (reload): Don't allocate reg_max_ref_width
+       here.
+       (calculate_elim_costs_all_insns): Free offsets_at and
+       offsets_known_at at the end and clear the pointers.
+
 2012-01-02  Georg-Johann Lay  <avr@gjlay.de>
 
        * config/avr/avr.opt (-mbranch-cost): Fix double definition of
index e21971cf7c202f032913e11999567bc9c68b57b1..a786881ce2e3828eee1b9943198e2695eb6dc0cc 100644 (file)
@@ -1,7 +1,7 @@
 /* Top level of GCC compilers (cc1, cc1plus, etc.)
    Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
    1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-   2011  Free Software Foundation, Inc.
+   2011, 2012  Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -414,6 +414,7 @@ register_one_dump_file (struct opt_pass *pass)
   set_pass_for_id (id, pass);
   full_name = concat (prefix, pass->name, num, NULL);
   register_pass_name (pass, full_name);
+  free (CONST_CAST (char *, full_name));
 }
 
 /* Recursive worker function for register_dump_files.  */
index 7852566190411d77fe628ffe954b586090c7f573..883ddd7b292e5e42d4a711cef029de9774f7211f 100644 (file)
@@ -1,7 +1,7 @@
 /* Reload pseudo regs into hard regs for insns that require hard regs.
    Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
    1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-   2011 Free Software Foundation, Inc.
+   2011, 2012 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -768,7 +768,6 @@ reload (rtx first, int global)
      be substituted eventually by altering the REG-rtx's.  */
 
   grow_reg_equivs ();
-  reg_max_ref_width = XCNEWVEC (unsigned int, max_regno);
   reg_old_renumber = XCNEWVEC (short, max_regno);
   memcpy (reg_old_renumber, reg_renumber, max_regno * sizeof (short));
   pseudo_forbidden_regs = XNEWVEC (HARD_REG_SET, max_regno);
@@ -1688,6 +1687,10 @@ calculate_elim_costs_all_insns (void)
     }
 
   free (reg_equiv_init_cost);
+  free (offsets_known_at);
+  free (offsets_at);
+  offsets_at = NULL;
+  offsets_known_at = NULL;
 }
 \f
 /* Comparison function for qsort to decide which of two reloads