+2016-10-18 Richard Biener <rguenther@suse.de>
+
+ * tree-ssa-propagate.h (substitute_and_fold): Adjust prototype.
+ * tree-ssa-propagate.c (ssa_prop_fini): Remove final BB_VISITED
+ clearing.
+ (substitute_and_fold_dom_walker): Adjust constructor.
+ (substitute_and_fold_dom_walker::before_dom_children): Remove
+ do_dce flag and handling (always true).
+ (substitute_and_fold): Likewise.
+ * tree-vrp.c (vrp_finalize): Adjust.
+ (execute_early_vrp): Remove final BB_VISITED clearing.
+ * tree-ssa-ccp.c (ccp_finalize): Adjust.
+ * tree-ssa-copy.c (fini_copy_prop): Likewise.
+ * ira.c (ira): Call clear_bb_flags.
+
2016-10-18 Richard Biener <rguenther@suse.de>
* genmatch.c (dt_operand::gen_gimple_expr): Use get_name to
free (cfg_order_to_bb);
BITMAP_FREE (ssa_edge_worklist);
uid_to_stmt.release ();
- basic_block bb;
- FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR_FOR_FN (cfun), NULL, next_bb)
- bb->flags &= ~BB_VISITED;
}
public:
substitute_and_fold_dom_walker (cdi_direction direction,
ssa_prop_get_value_fn get_value_fn_,
- ssa_prop_fold_stmt_fn fold_fn_,
- bool do_dce_)
+ ssa_prop_fold_stmt_fn fold_fn_)
: dom_walker (direction), get_value_fn (get_value_fn_),
- fold_fn (fold_fn_), do_dce (do_dce_), something_changed (false)
+ fold_fn (fold_fn_), something_changed (false)
{
stmts_to_remove.create (0);
stmts_to_fixup.create (0);
ssa_prop_get_value_fn get_value_fn;
ssa_prop_fold_stmt_fn fold_fn;
- bool do_dce;
bool something_changed;
vec<gimple *> stmts_to_remove;
vec<gimple *> stmts_to_fixup;
tree res = gimple_phi_result (phi);
if (virtual_operand_p (res))
continue;
- if (do_dce
- && res && TREE_CODE (res) == SSA_NAME)
+ if (res && TREE_CODE (res) == SSA_NAME)
{
tree sprime = get_value_fn (res);
if (sprime
/* No point propagating into a stmt we have a value for we
can propagate into all uses. Mark it for removal instead. */
tree lhs = gimple_get_lhs (stmt);
- if (do_dce
- && lhs && TREE_CODE (lhs) == SSA_NAME)
+ if (lhs && TREE_CODE (lhs) == SSA_NAME)
{
tree sprime = get_value_fn (lhs);
if (sprime
bool
substitute_and_fold (ssa_prop_get_value_fn get_value_fn,
- ssa_prop_fold_stmt_fn fold_fn,
- bool do_dce)
+ ssa_prop_fold_stmt_fn fold_fn)
{
gcc_assert (get_value_fn);
calculate_dominance_info (CDI_DOMINATORS);
substitute_and_fold_dom_walker walker(CDI_DOMINATORS,
- get_value_fn, fold_fn, do_dce);
+ get_value_fn, fold_fn);
walker.walk (ENTRY_BLOCK_PTR_FOR_FN (cfun));
/* We cannot remove stmts during the BB walk, especially not release
extern bool update_call_from_tree (gimple_stmt_iterator *, tree);
extern void ssa_propagate (ssa_prop_visit_stmt_fn, ssa_prop_visit_phi_fn);
extern bool stmt_makes_single_store (gimple *);
-extern bool substitute_and_fold (ssa_prop_get_value_fn, ssa_prop_fold_stmt_fn,
- bool);
+extern bool substitute_and_fold (ssa_prop_get_value_fn, ssa_prop_fold_stmt_fn);
extern bool may_propagate_copy (tree, tree);
extern bool may_propagate_copy_into_stmt (gimple *, tree);
extern bool may_propagate_copy_into_asm (tree);