+2015-11-13 Martin Liska <mliska@suse.cz>
+
+ * graphite-poly.c (free_scop): Release scop->drs vector.
+ * graphite-scop-detection.c (scop_detection::harmful_stmt_in_region):
+ Release dom vector.
+ (try_generate_gimple_bb): Use vNULL as a default initialization
+ for vectors.
+
2015-11-13 Martin Liska <mliska@suse.cz>
PR ipa/68311
public:
scop_detection () : scops (vNULL) {}
+ ~scop_detection ()
+ {
+ scops.release ();
+ }
+
/* A marker for invalid sese_l. */
static sese_l invalid_sese;
/* The basic block should not be part of an irreducible loop. */
if (bb->flags & BB_IRREDUCIBLE_LOOP)
- return true;
+ {
+ dom.release ();
+ return true;
+ }
if (harmful_stmt_in_bb (scop, bb))
- return true;
+ {
+ dom.release ();
+ return true;
+ }
}
- return false;
+ dom.release ();
+ return false;
}
/* Returns true if S1 subsumes/surrounds S2. */
static gimple_poly_bb_p
try_generate_gimple_bb (scop_p scop, basic_block bb)
{
- vec<data_reference_p> drs;
- drs.create (3);
- vec<tree> writes;
- writes.create (3);
- vec<scalar_use> reads;
- reads.create (3);
+ vec<data_reference_p> drs = vNULL;
+ vec<tree> writes = vNULL;
+ vec<scalar_use> reads = vNULL;
sese_l region = scop->scop_info->region;
loop_p nest = outermost_loop_in_sese (region, bb);