Commit 701b8964 by Zdenek Dvorak Committed by Zdenek Dvorak

tree-vrp.c (remove_range_assertions): Do not update statements unnecessarily.

	* tree-vrp.c (remove_range_assertions): Do not update statements unnecessarily.

From-SVN: r111654
parent 59994160
2006-03-02 Zdenek Dvorak <dvorakz@suse.cz> 2006-03-02 Zdenek Dvorak <dvorakz@suse.cz>
* tree-vrp.c (remove_range_assertions): Do not update statements unnecessarily.
2006-03-02 Zdenek Dvorak <dvorakz@suse.cz>
* cse.c (rest_of_handle_cse): Do not pass CLEANUP_PRE_LOOP to cfg * cse.c (rest_of_handle_cse): Do not pass CLEANUP_PRE_LOOP to cfg
cleanup. cleanup.
* gcse.c (rest_of_handle_gcse): Ditto. * gcse.c (rest_of_handle_gcse): Ditto.
......
...@@ -3198,21 +3198,19 @@ remove_range_assertions (void) ...@@ -3198,21 +3198,19 @@ remove_range_assertions (void)
if (TREE_CODE (stmt) == MODIFY_EXPR if (TREE_CODE (stmt) == MODIFY_EXPR
&& TREE_CODE (TREE_OPERAND (stmt, 1)) == ASSERT_EXPR) && TREE_CODE (TREE_OPERAND (stmt, 1)) == ASSERT_EXPR)
{ {
tree rhs = TREE_OPERAND (stmt, 1); tree rhs = TREE_OPERAND (stmt, 1), var;
tree cond = fold (ASSERT_EXPR_COND (rhs)); tree cond = fold (ASSERT_EXPR_COND (rhs));
use_operand_p use_p; use_operand_p use_p;
imm_use_iterator iter; imm_use_iterator iter;
gcc_assert (cond != boolean_false_node); gcc_assert (cond != boolean_false_node);
TREE_OPERAND (stmt, 1) = ASSERT_EXPR_VAR (rhs);
update_stmt (stmt);
/* The statement is now a copy. Propagate the RHS into /* Propagate the RHS into every use of the LHS. */
every use of the LHS. */ var = ASSERT_EXPR_VAR (rhs);
FOR_EACH_IMM_USE_SAFE (use_p, iter, TREE_OPERAND (stmt, 0)) FOR_EACH_IMM_USE_SAFE (use_p, iter, TREE_OPERAND (stmt, 0))
{ {
SET_USE (use_p, ASSERT_EXPR_VAR (rhs)); SET_USE (use_p, var);
update_stmt (USE_STMT (use_p)); gcc_assert (TREE_CODE (var) == SSA_NAME);
} }
/* And finally, remove the copy, it is not needed. */ /* And finally, remove the copy, it is not needed. */
......
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