diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e86e8cd31d6..5b0d4a68223 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2012-01-02 Jakub Jelinek + + * 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 * config/avr/avr.opt (-mbranch-cost): Fix double definition of diff --git a/gcc/passes.c b/gcc/passes.c index e21971cf7c2..a786881ce2e 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -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. */ diff --git a/gcc/reload1.c b/gcc/reload1.c index 78525661904..883ddd7b292 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -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; } /* Comparison function for qsort to decide which of two reloads