diff options
author | Jakub Jelinek <jakub@redhat.com> | 2013-03-05 16:50:38 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2013-03-05 16:50:38 +0100 |
commit | 4ccf8f43ce30db2991656165ddd8839598751075 (patch) | |
tree | 5bf9393b8e40e0d31e41986d8586553f0385df63 /gcc/lra.c | |
parent | 334e71e8229943d34aa0826650a5abf3b1d662a9 (diff) | |
download | gcc-4ccf8f43ce30db2991656165ddd8839598751075.zip gcc-4ccf8f43ce30db2991656165ddd8839598751075.tar.gz gcc-4ccf8f43ce30db2991656165ddd8839598751075.tar.bz2 |
re PR middle-end/56461 (GCC is leaking lots of memory)
PR middle-end/56461
* lra.c (lra): Call lra_clear_live_ranges if live_p,
right before calling lra_create_live_ranges, also call it
when clearing live_p. Only call lra_clear_live_ranges
at the end if live_p.
From-SVN: r196468
Diffstat (limited to 'gcc/lra.c')
-rw-r--r-- | gcc/lra.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -2291,6 +2291,8 @@ lra (FILE *f) /* Do inheritance only for regular algorithms. */ if (! lra_simple_p) lra_inheritance (); + if (live_p) + lra_clear_live_ranges (); /* We need live ranges for lra_assign -- so build them. */ lra_create_live_ranges (true); live_p = true; @@ -2308,6 +2310,8 @@ lra (FILE *f) live_p = false; if (lra_undo_inheritance ()) live_p = false; + if (! live_p) + lra_clear_live_ranges (); } } bitmap_clear (&lra_optional_reload_pseudos); @@ -2334,7 +2338,8 @@ lra (FILE *f) lra_eliminate (true); lra_final_code_change (); lra_in_progress = 0; - lra_clear_live_ranges (); + if (live_p) + lra_clear_live_ranges (); lra_live_ranges_finish (); lra_constraints_finish (); finish_reg_info (); |