+2014-05-09 Richard Biener <rguenther@suse.de>
+
+ * Makefile.in (GTFILES): Remove tree-ssa-propagate.c.
+ * tree-ssa-propagate.c: Do not include gt-tree-ssa-propagate.h.
+ (interesting_ssa_edges, varying_ssa_edges): Move out of GC space.
+ (add_ssa_edge, process_ssa_edge_worklist, ssa_prop_init,
+ ssa_propagate): Adjust.
+
2014-05-08 Jeff Law <law@redhat.com>
PR tree-optimization/61009
definition has changed. SSA edges are def-use edges in the SSA
web. For each D-U edge, we store the target statement or PHI node
U. */
-static GTY(()) vec<gimple, va_gc> *interesting_ssa_edges;
+static vec<gimple> interesting_ssa_edges;
/* Identical to INTERESTING_SSA_EDGES. For performance reasons, the
list of SSA edges is split into two. One contains all SSA edges
don't use a separate worklist for VARYING edges, we end up with
situations where lattice values move from
UNDEFINED->INTERESTING->VARYING instead of UNDEFINED->VARYING. */
-static GTY(()) vec<gimple, va_gc> *varying_ssa_edges;
+static vec<gimple> varying_ssa_edges;
/* Return true if the block worklist empty. */
{
gimple_set_plf (use_stmt, STMT_IN_SSA_EDGE_WORKLIST, true);
if (is_varying)
- vec_safe_push (varying_ssa_edges, use_stmt);
+ varying_ssa_edges.safe_push (use_stmt);
else
- vec_safe_push (interesting_ssa_edges, use_stmt);
+ interesting_ssa_edges.safe_push (use_stmt);
}
}
}
SSA edge is added to it in simulate_stmt. */
static void
-process_ssa_edge_worklist (vec<gimple, va_gc> **worklist)
+process_ssa_edge_worklist (vec<gimple> *worklist)
{
/* Drain the entire worklist. */
- while ((*worklist)->length () > 0)
+ while (worklist->length () > 0)
{
basic_block bb;
/* Pull the statement to simulate off the worklist. */
- gimple stmt = (*worklist)->pop ();
+ gimple stmt = worklist->pop ();
/* If this statement was already visited by simulate_block, then
we don't need to visit it again here. */
basic_block bb;
/* Worklists of SSA edges. */
- vec_alloc (interesting_ssa_edges, 20);
- vec_alloc (varying_ssa_edges, 20);
+ interesting_ssa_edges.create (20);
+ varying_ssa_edges.create (20);
executable_blocks = sbitmap_alloc (last_basic_block_for_fn (cfun));
bitmap_clear (executable_blocks);
static void
ssa_prop_fini (void)
{
- vec_free (interesting_ssa_edges);
- vec_free (varying_ssa_edges);
+ interesting_ssa_edges.release ();
+ varying_ssa_edges.release ();
cfg_blocks.release ();
sbitmap_free (bb_in_list);
sbitmap_free (executable_blocks);
/* Iterate until the worklists are empty. */
while (!cfg_blocks_empty_p ()
- || interesting_ssa_edges->length () > 0
- || varying_ssa_edges->length () > 0)
+ || interesting_ssa_edges.length () > 0
+ || varying_ssa_edges.length () > 0)
{
if (!cfg_blocks_empty_p ())
{
else
gcc_unreachable ();
}
-
-#include "gt-tree-ssa-propagate.h"