diff options
author | Andrew MacLeod <amacleod@redhat.com> | 2004-08-10 18:31:26 +0000 |
---|---|---|
committer | Andrew Macleod <amacleod@gcc.gnu.org> | 2004-08-10 18:31:26 +0000 |
commit | 68b9f53b865b6b0afdafa8f24ca83ec9c94bb780 (patch) | |
tree | 94a21421b527ae4b4227ebca0308a5feadea6008 /gcc/tree-complex.c | |
parent | 6c9c452695f66cfb588e4001e3a2b774a8a52015 (diff) | |
download | gcc-68b9f53b865b6b0afdafa8f24ca83ec9c94bb780.zip gcc-68b9f53b865b6b0afdafa8f24ca83ec9c94bb780.tar.gz gcc-68b9f53b865b6b0afdafa8f24ca83ec9c94bb780.tar.bz2 |
tree-cfg.c (bsi_insert_before, [...]): Call modify_stmt after linking stmt into the program.
2004-08-10 Andrew MacLeod <amacleod@redhat.com>
* tree-cfg.c (bsi_insert_before, bsi_insert_after): Call modify_stmt
after linking stmt into the program.
(bsi_remove): Don't call modify_stmt.
* tree-complex.c (update_complex_assignment,
expand_complex_comparison): Call modify_stmt after changing the stmt.
* tree-outof-ssa.c (rewrite_trees): Call modify_stmt only if not
removing the stmt.
* tree-ssa-ccp.c (substitute_and_fold): Call modify_stmt after changing
the stmt, and only if needed.
* tree-ssa-dom.c (thread_across_edge): Pass no annotation for a dummy
expression.
(simplify_rhs_and_lookup_avail_expr): Don't take an annotation param.
(simplify_cond_and_lookup_avail_expr): Use modify_stmt.
(simplify_switch_and_lookup_avail_expr): Don't take an annotation param.
(eliminate_redundant_computations): Don't pass an annotation. Call
modify_stmt rather than setting the annotation directly.
(record_equivalences_from_stmt): Remove unused local 'j'.
(cprop_operand): Take a stmt rather than an annotation as a parameter.
Call modify_stmt.
(cprop_into_stmt): Pass stmt rather than annotation.
(update_rhs_and_lookup_avail_expr): Call modify_stmt.
* tree-ssa-loop-im.c (schedule_sm): Call get_stmt_ann rather than
modify_stmt.
* tree-ssa.c (propagate_into_addr): Dont call modify_stmt.
From-SVN: r85765
Diffstat (limited to 'gcc/tree-complex.c')
-rw-r--r-- | gcc/tree-complex.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c index a960f92..54ea819 100644 --- a/gcc/tree-complex.c +++ b/gcc/tree-complex.c @@ -78,12 +78,12 @@ update_complex_assignment (block_stmt_iterator *bsi, tree r, tree i) tree stmt = bsi_stmt (*bsi); tree type; - modify_stmt (stmt); if (TREE_CODE (stmt) == RETURN_EXPR) stmt = TREE_OPERAND (stmt, 0); type = TREE_TYPE (TREE_OPERAND (stmt, 1)); TREE_OPERAND (stmt, 1) = build (COMPLEX_EXPR, type, r, i); + modify_stmt (stmt); } /* Expand complex addition to scalars: @@ -326,7 +326,7 @@ static void expand_complex_comparison (block_stmt_iterator *bsi, tree ar, tree ai, tree br, tree bi, enum tree_code code) { - tree cr, ci, cc, stmt, type; + tree cr, ci, cc, stmt, expr, type; cr = gimplify_build2 (bsi, code, boolean_type_node, ar, br); ci = gimplify_build2 (bsi, code, boolean_type_node, ai, bi); @@ -334,17 +334,16 @@ expand_complex_comparison (block_stmt_iterator *bsi, tree ar, tree ai, (code == EQ_EXPR ? TRUTH_AND_EXPR : TRUTH_OR_EXPR), boolean_type_node, cr, ci); - stmt = bsi_stmt (*bsi); - modify_stmt (stmt); + stmt = expr = bsi_stmt (*bsi); switch (TREE_CODE (stmt)) { case RETURN_EXPR: - stmt = TREE_OPERAND (stmt, 0); + expr = TREE_OPERAND (stmt, 0); /* FALLTHRU */ case MODIFY_EXPR: - type = TREE_TYPE (TREE_OPERAND (stmt, 1)); - TREE_OPERAND (stmt, 1) = fold_convert (type, cc); + type = TREE_TYPE (TREE_OPERAND (expr, 1)); + TREE_OPERAND (expr, 1) = fold_convert (type, cc); break; case COND_EXPR: TREE_OPERAND (stmt, 0) = cc; @@ -352,6 +351,8 @@ expand_complex_comparison (block_stmt_iterator *bsi, tree ar, tree ai, default: abort (); } + + modify_stmt (stmt); } /* Process one statement. If we identify a complex operation, expand it. */ |