re PR middle-end/56461 (GCC is leaking lots of memory)
authorJakub Jelinek <jakub@redhat.com>
Fri, 1 Mar 2013 22:56:18 +0000 (23:56 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 1 Mar 2013 22:56:18 +0000 (23:56 +0100)
PR middle-end/56461
* tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Release path
vector even when returning true.  Fix up function comment formatting.

From-SVN: r196398

gcc/ChangeLog
gcc/tree-ssa-loop-ivcanon.c

index 133af66eaf7c2cfbb90d9eb72431402a4e9e3011..fa0bb7655d0948100e2c7b56b7951034501c516e 100644 (file)
@@ -1,5 +1,9 @@
 2013-03-01  Jakub Jelinek  <jakub@redhat.com>
 
+       PR middle-end/56461
+       * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Release path
+       vector even when returning true.  Fix up function comment formatting.
+
        PR middle-end/56461
        * ira-build.c (ira_loop_nodes_count): New variable.
        (create_loop_tree_nodes): Initialize it.
index 910715aaadd30f1bef64bff6024229194f6928cb..4570807842d70d907ed60a466a7dd4597c0bd188 100644 (file)
@@ -207,7 +207,7 @@ constant_after_peeling (tree op, gimple stmt, struct loop *loop)
    EDGE_TO_CANCEL (if non-NULL) is an non-exit edge eliminated in the last iteration
    of loop.
    Return results in SIZE, estimate benefits for complete unrolling exiting by EXIT. 
-   Stop estimating after UPPER_BOUND is met. Return true in this case */
+   Stop estimating after UPPER_BOUND is met.  Return true in this case.  */
 
 static bool
 tree_estimate_loop_size (struct loop *loop, edge exit, edge edge_to_cancel, struct loop_size *size,
@@ -321,6 +321,7 @@ tree_estimate_loop_size (struct loop *loop, edge exit, edge edge_to_cancel, stru
              - size->last_iteration_eliminated_by_peeling) > upper_bound)
            {
               free (body);
+             path.release ();
              return true;
            }
        }