Commit ee3958cf by Richard Biener Committed by Richard Biener

Makefile.in (GTFILES): Remove tree-ssa-propagate.c.

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.

From-SVN: r210261
parent 3ce2cd36
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> 2014-05-08 Jeff Law <law@redhat.com>
PR tree-optimization/61009 PR tree-optimization/61009
......
...@@ -2272,7 +2272,6 @@ GTFILES = $(CPP_ID_DATA_H) $(srcdir)/input.h $(srcdir)/coretypes.h \ ...@@ -2272,7 +2272,6 @@ GTFILES = $(CPP_ID_DATA_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
$(srcdir)/omp-low.c \ $(srcdir)/omp-low.c \
$(srcdir)/targhooks.c $(out_file) $(srcdir)/passes.c $(srcdir)/cgraphunit.c \ $(srcdir)/targhooks.c $(out_file) $(srcdir)/passes.c $(srcdir)/cgraphunit.c \
$(srcdir)/cgraphclones.c \ $(srcdir)/cgraphclones.c \
$(srcdir)/tree-ssa-propagate.c \
$(srcdir)/tree-phinodes.c \ $(srcdir)/tree-phinodes.c \
$(srcdir)/tree-ssa-alias.h \ $(srcdir)/tree-ssa-alias.h \
$(srcdir)/tree-ssanames.h \ $(srcdir)/tree-ssanames.h \
......
...@@ -153,7 +153,7 @@ static sbitmap bb_in_list; ...@@ -153,7 +153,7 @@ static sbitmap bb_in_list;
definition has changed. SSA edges are def-use edges in the SSA 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 web. For each D-U edge, we store the target statement or PHI node
U. */ 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 /* Identical to INTERESTING_SSA_EDGES. For performance reasons, the
list of SSA edges is split into two. One contains all SSA edges list of SSA edges is split into two. One contains all SSA edges
...@@ -169,7 +169,7 @@ static GTY(()) vec<gimple, va_gc> *interesting_ssa_edges; ...@@ -169,7 +169,7 @@ static GTY(()) vec<gimple, va_gc> *interesting_ssa_edges;
don't use a separate worklist for VARYING edges, we end up with don't use a separate worklist for VARYING edges, we end up with
situations where lattice values move from situations where lattice values move from
UNDEFINED->INTERESTING->VARYING instead of UNDEFINED->VARYING. */ 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. */ /* Return true if the block worklist empty. */
...@@ -271,9 +271,9 @@ add_ssa_edge (tree var, bool is_varying) ...@@ -271,9 +271,9 @@ add_ssa_edge (tree var, bool is_varying)
{ {
gimple_set_plf (use_stmt, STMT_IN_SSA_EDGE_WORKLIST, true); gimple_set_plf (use_stmt, STMT_IN_SSA_EDGE_WORKLIST, true);
if (is_varying) if (is_varying)
vec_safe_push (varying_ssa_edges, use_stmt); varying_ssa_edges.safe_push (use_stmt);
else else
vec_safe_push (interesting_ssa_edges, use_stmt); interesting_ssa_edges.safe_push (use_stmt);
} }
} }
} }
...@@ -369,15 +369,15 @@ simulate_stmt (gimple stmt) ...@@ -369,15 +369,15 @@ simulate_stmt (gimple stmt)
SSA edge is added to it in simulate_stmt. */ SSA edge is added to it in simulate_stmt. */
static void static void
process_ssa_edge_worklist (vec<gimple, va_gc> **worklist) process_ssa_edge_worklist (vec<gimple> *worklist)
{ {
/* Drain the entire worklist. */ /* Drain the entire worklist. */
while ((*worklist)->length () > 0) while (worklist->length () > 0)
{ {
basic_block bb; basic_block bb;
/* Pull the statement to simulate off the worklist. */ /* 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 /* If this statement was already visited by simulate_block, then
we don't need to visit it again here. */ we don't need to visit it again here. */
...@@ -492,8 +492,8 @@ ssa_prop_init (void) ...@@ -492,8 +492,8 @@ ssa_prop_init (void)
basic_block bb; basic_block bb;
/* Worklists of SSA edges. */ /* Worklists of SSA edges. */
vec_alloc (interesting_ssa_edges, 20); interesting_ssa_edges.create (20);
vec_alloc (varying_ssa_edges, 20); varying_ssa_edges.create (20);
executable_blocks = sbitmap_alloc (last_basic_block_for_fn (cfun)); executable_blocks = sbitmap_alloc (last_basic_block_for_fn (cfun));
bitmap_clear (executable_blocks); bitmap_clear (executable_blocks);
...@@ -535,8 +535,8 @@ ssa_prop_init (void) ...@@ -535,8 +535,8 @@ ssa_prop_init (void)
static void static void
ssa_prop_fini (void) ssa_prop_fini (void)
{ {
vec_free (interesting_ssa_edges); interesting_ssa_edges.release ();
vec_free (varying_ssa_edges); varying_ssa_edges.release ();
cfg_blocks.release (); cfg_blocks.release ();
sbitmap_free (bb_in_list); sbitmap_free (bb_in_list);
sbitmap_free (executable_blocks); sbitmap_free (executable_blocks);
...@@ -859,8 +859,8 @@ ssa_propagate (ssa_prop_visit_stmt_fn visit_stmt, ...@@ -859,8 +859,8 @@ ssa_propagate (ssa_prop_visit_stmt_fn visit_stmt,
/* Iterate until the worklists are empty. */ /* Iterate until the worklists are empty. */
while (!cfg_blocks_empty_p () while (!cfg_blocks_empty_p ()
|| interesting_ssa_edges->length () > 0 || interesting_ssa_edges.length () > 0
|| varying_ssa_edges->length () > 0) || varying_ssa_edges.length () > 0)
{ {
if (!cfg_blocks_empty_p ()) if (!cfg_blocks_empty_p ())
{ {
...@@ -1464,5 +1464,3 @@ propagate_tree_value_into_stmt (gimple_stmt_iterator *gsi, tree val) ...@@ -1464,5 +1464,3 @@ propagate_tree_value_into_stmt (gimple_stmt_iterator *gsi, tree val)
else else
gcc_unreachable (); gcc_unreachable ();
} }
#include "gt-tree-ssa-propagate.h"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment