Commit 25b7069a by Richard Biener Committed by Richard Biener

tree-ssa-propagate.c (replace_phi_args_in): Return whether we propagated anything.

2014-06-18  Richard Biener  <rguenther@suse.de>

	* tree-ssa-propagate.c (replace_phi_args_in): Return whether
	we propagated anything.
	(substitute_and_fold_dom_walker::before_dom_children): Something
	changed if we propagated into PHI arguments.
	* tree-ssa-pre.c (eliminate): Always schedule cfg-cleanup if
	we removed a stmt.

From-SVN: r211770
parent f7917029
2014-06-18 Richard Biener <rguenther@suse.de>
* tree-ssa-propagate.c (replace_phi_args_in): Return whether
we propagated anything.
(substitute_and_fold_dom_walker::before_dom_children): Something
changed if we propagated into PHI arguments.
* tree-ssa-pre.c (eliminate): Always schedule cfg-cleanup if
we removed a stmt.
2014-06-18 Evgeny Stupachenko <evstupac@gmail.com>
* config/i386/i386.c (ix86_reassociation_width): Add alternative for
......
......@@ -4521,11 +4521,7 @@ eliminate (bool do_pre)
gsi = gsi_for_stmt (stmt);
if (gimple_code (stmt) == GIMPLE_PHI)
{
remove_phi_node (&gsi, true);
/* Removing a PHI node in a block may expose a forwarder block. */
el_todo |= TODO_cleanup_cfg;
}
remove_phi_node (&gsi, true);
else
{
basic_block bb = gimple_bb (stmt);
......@@ -4534,6 +4530,9 @@ eliminate (bool do_pre)
bitmap_set_bit (need_eh_cleanup, bb->index);
release_defs (stmt);
}
/* Removing a stmt may expose a forwarder block. */
el_todo |= TODO_cleanup_cfg;
}
el_to_remove.release ();
......
......@@ -964,7 +964,7 @@ replace_uses_in (gimple stmt, ssa_prop_get_value_fn get_value)
/* Replace propagated values into all the arguments for PHI using the
values from PROP_VALUE. */
static void
static bool
replace_phi_args_in (gimple phi, ssa_prop_get_value_fn get_value)
{
size_t i;
......@@ -1015,6 +1015,8 @@ replace_phi_args_in (gimple phi, ssa_prop_get_value_fn get_value)
fprintf (dump_file, "\n");
}
}
return replaced;
}
......@@ -1066,7 +1068,7 @@ substitute_and_fold_dom_walker::before_dom_children (basic_block bb)
continue;
}
}
replace_phi_args_in (phi, get_value_fn);
something_changed |= replace_phi_args_in (phi, get_value_fn);
}
/* Propagate known values into stmts. In some case it exposes
......
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