summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-dse.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-08 16:16:41 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-08 16:16:41 +0000
commite37235f0737c6d605e0d795c9251a40ceffd09f2 (patch)
tree200138df775b12823401ef7db79aecec6a2142da /gcc/tree-ssa-dse.c
parentc6a73f83115c4b0bb92241805cad4f69f646a14e (diff)
downloadgcc-e37235f0737c6d605e0d795c9251a40ceffd09f2.tar.gz
* tree-cfg.c (make_exit_edges): Use get_call_expr_in.
(remove_useless_stmts_1, is_ctrl_altering_stmt): Likewise. (tree_block_ends_with_call_p, need_fake_edge_p): Likewise. * tree-eh.c (lower_eh_constructs_1): Likewise. * tree-sra.c (sra_walk_modify_expr): Likewise. * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise. (eliminate_unnecessary_stmts): Likewise. * tree-ssa-dse.c (dse_optimize_stmt): Likewise. * tree-tailcall.c (optimize_tail_call): Likewise. * tree-ssa-ccp.c (get_rhs, set_rhs): Reorg to use switch. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84298 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-dse.c')
-rw-r--r--gcc/tree-ssa-dse.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/tree-ssa-dse.c b/gcc/tree-ssa-dse.c
index ce286948056..efc7d7fbef4 100644
--- a/gcc/tree-ssa-dse.c
+++ b/gcc/tree-ssa-dse.c
@@ -244,10 +244,11 @@ dse_optimize_stmt (struct dom_walk_data *walk_data,
if (NUM_V_MAY_DEFS (v_may_defs) == 0)
return;
- /* We know we have virtual definitions. If this is a MODIFY_EXPR, then
- record it into our table. */
- if (TREE_CODE (stmt) == MODIFY_EXPR
- && TREE_CODE (TREE_OPERAND (stmt, 1)) != CALL_EXPR)
+ /* We know we have virtual definitions. If this is a MODIFY_EXPR that's
+ not also a function call, then record it into our table. */
+ if (get_call_expr_in (stmt))
+ return;
+ if (TREE_CODE (stmt) == MODIFY_EXPR)
{
dataflow_t df = get_immediate_uses (stmt);
unsigned int num_uses = num_immediate_uses (df);