mirror of git://gcc.gnu.org/git/gcc.git
fix memory leak in scop-detection
* graphite-scop-detection.c
(scop_detection::harmful_loop_in_region): Free dom and loops.
(scop_detection::loop_body_is_valid_scop): Free bbs.
Co-Authored-By: Sebastian Pop <s.pop@samsung.com>
From-SVN: r232655
This commit is contained in:
parent
5431c9ea56
commit
eaca025e57
|
|
@ -1,3 +1,10 @@
|
|||
2016-01-21 Aditya Kumar <aditya.k7@samsung.com>
|
||||
Sebastian Pop <s.pop@samsung.com>
|
||||
|
||||
* graphite-scop-detection.c
|
||||
(scop_detection::harmful_loop_in_region): Free dom and loops.
|
||||
(scop_detection::loop_body_is_valid_scop): Free bbs.
|
||||
|
||||
2016-01-21 Aditya Kumar <aditya.k7@samsung.com>
|
||||
Sebastian Pop <s.pop@samsung.com>
|
||||
|
||||
|
|
|
|||
|
|
@ -1088,8 +1088,12 @@ scop_detection::harmful_loop_in_region (sese_l scop) const
|
|||
any loop fully contained in the scop: other bbs are checked below
|
||||
in loop_is_valid_in_scop. */
|
||||
if (harmful_stmt_in_bb (scop, bb))
|
||||
{
|
||||
dom.release ();
|
||||
BITMAP_FREE (loops);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1104,13 +1108,14 @@ scop_detection::harmful_loop_in_region (sese_l scop) const
|
|||
|
||||
if (!loop_is_valid_in_scop (loop, scop))
|
||||
{
|
||||
dom.release ();
|
||||
BITMAP_FREE (loops);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
BITMAP_FREE (loops);
|
||||
dom.release ();
|
||||
BITMAP_FREE (loops);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -1503,8 +1508,11 @@ scop_detection::loop_body_is_valid_scop (loop_p loop, sese_l scop) const
|
|||
basic_block bb = bbs[i];
|
||||
|
||||
if (harmful_stmt_in_bb (scop, bb))
|
||||
{
|
||||
free (bbs);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
free (bbs);
|
||||
|
||||
if (loop->inner)
|
||||
|
|
|
|||
Loading…
Reference in New Issue