]> gcc.gnu.org Git - gcc.git/commitdiff
Fix Graphite memory leaks.
authorSebastian Pop <sebastian.pop@amd.com>
Thu, 30 Sep 2010 21:21:29 +0000 (21:21 +0000)
committerSebastian Pop <spop@gcc.gnu.org>
Thu, 30 Sep 2010 21:21:29 +0000 (21:21 +0000)
2010-09-23  Sebastian Pop  <sebastian.pop@amd.com>

* graphite-clast-to-gimple.c (compute_bounds_for_level): Free le
and ps.
* graphite-poly.c (pbb_number_of_iterations_at_time): Free le and
domain.
* graphite-sese-to-poly.c (add_upper_bounds_from_estimated_nit):
Do not allocate ub_expr, it is passed in initialized.

From-SVN: r164809

gcc/ChangeLog
gcc/ChangeLog.graphite
gcc/graphite-clast-to-gimple.c
gcc/graphite-poly.c
gcc/graphite-sese-to-poly.c

index 281ab290ceb48ad18e51be341a2d6e959d71ee37..835e87beff22530cb756e1717f396821b5bcd41d 100644 (file)
@@ -1,3 +1,12 @@
+2010-09-30  Sebastian Pop  <sebastian.pop@amd.com>
+
+       * graphite-clast-to-gimple.c (compute_bounds_for_level): Free le
+       and ps.
+       * graphite-poly.c (pbb_number_of_iterations_at_time): Free le and
+       domain.
+       * graphite-sese-to-poly.c (add_upper_bounds_from_estimated_nit):
+       Do not allocate ub_expr, it is passed in initialized.
+
 2010-09-30  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
 
        * graphite-clast-to-gimple.c (init_cloog_input_file): New.
index ba7d99ebf0b2895e02a7a7c87b0ddf79c0cfb575..1dddf4c216d1b5758feb4875cdb6f703a1afd9d3 100644 (file)
@@ -1,3 +1,12 @@
+2010-09-23  Sebastian Pop  <sebastian.pop@amd.com>
+
+       * graphite-clast-to-gimple.c (compute_bounds_for_level): Free le
+       and ps.
+       * graphite-poly.c (pbb_number_of_iterations_at_time): Free le and
+       domain.
+       * graphite-sese-to-poly.c (add_upper_bounds_from_estimated_nit):
+       Do not allocate ub_expr, it is passed in initialized.
+
 2010-09-21  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
 
        * common.opt (fgraphite-dump-cloog): New flag.
index faefbb6ad50d46b7930883a5318aa53d75cbb060..9a90ef79185fbeeaac99e703ffaa069af09e8ab8 100644 (file)
@@ -703,6 +703,8 @@ compute_bounds_for_level (poly_bb_p pbb, int level, mpz_t low, mpz_t up)
 
   ppl_max_for_le_pointset (ps, le, up);
   ppl_min_for_le_pointset (ps, le, low);
+  ppl_delete_Linear_Expression (le);
+  ppl_delete_Pointset_Powerset_C_Polyhedron (ps);
 }
 
 /* Compute the type for the induction variable at LEVEL for the
index 1644ecf7517bdd4ff7b301d597c32f2596dcd3ee..9f67e855d0a4bc085e0d21477bf1d50b6ac2ddf5 100644 (file)
@@ -1738,8 +1738,10 @@ pbb_number_of_iterations_at_time (poly_bb_p pbb,
   mpz_clear (diff);
   mpz_clear (lb);
   mpz_clear (ub);
+  ppl_delete_Linear_Expression (le);
   ppl_delete_Pointset_Powerset_C_Polyhedron (sctr_ub);
   ppl_delete_Pointset_Powerset_C_Polyhedron (sctr_lb);
+  ppl_delete_Pointset_Powerset_C_Polyhedron (domain);
 }
 
 /* Translates LOOP to LST.  */
index 1ee6feeed150409121e08ee636b22ed5a9feefba..87b226b80f050780258a2efd64d1af47dc6eddad 100644 (file)
@@ -1032,7 +1032,6 @@ add_upper_bounds_from_estimated_nit (scop_p scop, double_int nit,
   ppl_Coefficient_t coef;
   ppl_Constraint_t ub;
 
-  ppl_new_Linear_Expression_with_dimension (&ub_expr, dim);
   ppl_new_C_Polyhedron_from_space_dimension (&pol, dim, 0);
   ppl_new_Linear_Expression_from_Linear_Expression (&nb_iters_le,
                                                    ub_expr);
This page took 0.109331 seconds and 5 git commands to generate.