Commit bbedc1ae by Martin Liska Committed by Martin Liska

Clean up dead condition for operators in DCE.

2019-08-15  Martin Liska  <mliska@suse.cz>

	* tree-ssa-dce.c (propagate_necessity): We can't reach now
	operators with no arguments.
	(eliminate_unnecessary_stmts): Likewise here.

From-SVN: r274529
parent 21c1e205
2019-08-15 Martin Liska <mliska@suse.cz>
* tree-ssa-dce.c (propagate_necessity): We can't reach now
operators with no arguments.
(eliminate_unnecessary_stmts): Likewise here.
2019-08-15 Uroš Bizjak <ubizjak@gmail.com> 2019-08-15 Uroš Bizjak <ubizjak@gmail.com>
* config/i386/i386-features.c (general_scalar_chain::convert_insn) * config/i386/i386-features.c (general_scalar_chain::convert_insn)
......
...@@ -810,11 +810,6 @@ propagate_necessity (bool aggressive) ...@@ -810,11 +810,6 @@ propagate_necessity (bool aggressive)
if (is_delete_operator if (is_delete_operator
|| gimple_call_builtin_p (stmt, BUILT_IN_FREE)) || gimple_call_builtin_p (stmt, BUILT_IN_FREE))
{ {
/* It can happen that a user delete operator has the pointer
argument optimized out already. */
if (gimple_call_num_args (stmt) == 0)
continue;
tree ptr = gimple_call_arg (stmt, 0); tree ptr = gimple_call_arg (stmt, 0);
gimple *def_stmt; gimple *def_stmt;
tree def_callee; tree def_callee;
...@@ -1328,10 +1323,6 @@ eliminate_unnecessary_stmts (void) ...@@ -1328,10 +1323,6 @@ eliminate_unnecessary_stmts (void)
|| (is_gimple_call (stmt) || (is_gimple_call (stmt)
&& gimple_call_operator_delete_p (as_a <gcall *> (stmt))))) && gimple_call_operator_delete_p (as_a <gcall *> (stmt)))))
{ {
/* It can happen that a user delete operator has the pointer
argument optimized out already. */
if (gimple_call_num_args (stmt) > 0)
{
tree ptr = gimple_call_arg (stmt, 0); tree ptr = gimple_call_arg (stmt, 0);
if (TREE_CODE (ptr) == SSA_NAME) if (TREE_CODE (ptr) == SSA_NAME)
{ {
...@@ -1341,7 +1332,6 @@ eliminate_unnecessary_stmts (void) ...@@ -1341,7 +1332,6 @@ eliminate_unnecessary_stmts (void)
gimple_set_plf (stmt, STMT_NECESSARY, false); gimple_set_plf (stmt, STMT_NECESSARY, false);
} }
} }
}
/* If GSI is not necessary then remove it. */ /* If GSI is not necessary then remove it. */
if (!gimple_plf (stmt, STMT_NECESSARY)) if (!gimple_plf (stmt, STMT_NECESSARY))
......
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