Commit 5d5cb4d4 by Richard Biener

tree-ssa-pre.c (eliminate_dom_walker::before_dom_children): Make all defs available at the end.

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

	* tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
	Make all defs available at the end.
	(eliminate): If we remove a PHI node schedule cfg-cleanup.

From-SVN: r211698
parent 4e4fa3c5
2014-06-16 Richard Biener <rguenther@suse.de>
* tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
Make all defs available at the end.
(eliminate): If we remove a PHI node schedule cfg-cleanup.
2014-06-18 Jakub Jelinek <jakub@redhat.com> 2014-06-18 Jakub Jelinek <jakub@redhat.com>
PR plugins/45078 PR plugins/45078
...@@ -11,7 +17,8 @@ ...@@ -11,7 +17,8 @@
2014-06-15 Jan Hubicka <hubicka@ucw.cz> 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
* c-family/c-common.c (handle_tls_model_attribute): Use set_decl_tls_model. * c-family/c-common.c (handle_tls_model_attribute): Use
set_decl_tls_model.
* cgraph.h (struct varpool_node): Add tls_model. * cgraph.h (struct varpool_node): Add tls_model.
* tree.c (decl_tls_model, set_decl_tls_model): New functions. * tree.c (decl_tls_model, set_decl_tls_model): New functions.
* tree.h (DECL_TLS_MODEL): Update. * tree.h (DECL_TLS_MODEL): Update.
......
...@@ -4188,7 +4188,6 @@ eliminate_dom_walker::before_dom_children (basic_block b) ...@@ -4188,7 +4188,6 @@ eliminate_dom_walker::before_dom_children (basic_block b)
b->loop_father->num); b->loop_father->num);
} }
/* Don't keep sprime available. */ /* Don't keep sprime available. */
eliminate_push_avail (lhs);
sprime = NULL_TREE; sprime = NULL_TREE;
} }
} }
...@@ -4433,10 +4432,11 @@ eliminate_dom_walker::before_dom_children (basic_block b) ...@@ -4433,10 +4432,11 @@ eliminate_dom_walker::before_dom_children (basic_block b)
VN_INFO (vdef)->valnum = vuse; VN_INFO (vdef)->valnum = vuse;
} }
/* Make the new value available - for fully redundant LHS we /* Make new values available - for fully redundant LHS we
continue with the next stmt above. */ continue with the next stmt above and skip this. */
if (lhs && TREE_CODE (lhs) == SSA_NAME) def_operand_p defp;
eliminate_push_avail (lhs); FOR_EACH_SSA_DEF_OPERAND (defp, stmt, iter, SSA_OP_DEF)
eliminate_push_avail (DEF_FROM_PTR (defp));
} }
/* Replace destination PHI arguments. */ /* Replace destination PHI arguments. */
...@@ -4521,7 +4521,11 @@ eliminate (bool do_pre) ...@@ -4521,7 +4521,11 @@ eliminate (bool do_pre)
gsi = gsi_for_stmt (stmt); gsi = gsi_for_stmt (stmt);
if (gimple_code (stmt) == GIMPLE_PHI) if (gimple_code (stmt) == GIMPLE_PHI)
remove_phi_node (&gsi, true); {
remove_phi_node (&gsi, true);
/* Removing a PHI node in a block may expose a forwarder block. */
el_todo |= TODO_cleanup_cfg;
}
else else
{ {
basic_block bb = gimple_bb (stmt); basic_block bb = gimple_bb (stmt);
......
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