summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-dom.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-12-06 09:02:17 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-12-06 09:02:17 +0000
commitf19604951bb23dfdf8939bf20be6e23c98f6721f (patch)
tree84166cf1fe0e2bf39bec0a5b5c73e24040f13a0f /gcc/tree-ssa-dom.c
parent471b6167501c50f77e2221ad41875411b62676ac (diff)
downloadgcc-f19604951bb23dfdf8939bf20be6e23c98f6721f.tar.gz
2011-12-06 Richard Guenther <rguenther@suse.de>
PR tree-optimization/51363 * gimple.c (gimple_rhs_has_side_effects): Remove. * gimple.h (gimple_rhs_has_side_effects): Likewise. * tree-ssa-dom.c (optimize_stmt): Simplify conditional. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182041 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-dom.c')
-rw-r--r--gcc/tree-ssa-dom.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c
index 949acf1d168..f8207e078e4 100644
--- a/gcc/tree-ssa-dom.c
+++ b/gcc/tree-ssa-dom.c
@@ -2154,12 +2154,10 @@ optimize_stmt (basic_block bb, gimple_stmt_iterator si)
/* Check for redundant computations. Do this optimization only
for assignments that have no volatile ops and conditionals. */
- may_optimize_p = (!gimple_has_volatile_ops (stmt)
- && ((is_gimple_assign (stmt)
- && !gimple_rhs_has_side_effects (stmt))
+ may_optimize_p = (!gimple_has_side_effects (stmt)
+ && (is_gimple_assign (stmt)
|| (is_gimple_call (stmt)
- && gimple_call_lhs (stmt) != NULL_TREE
- && !gimple_rhs_has_side_effects (stmt))
+ && gimple_call_lhs (stmt) != NULL_TREE)
|| gimple_code (stmt) == GIMPLE_COND
|| gimple_code (stmt) == GIMPLE_SWITCH));