summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-pre.c
diff options
context:
space:
mode:
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>2007-02-16 03:38:22 +0000
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>2007-02-16 03:38:22 +0000
commit41076ef6f964adde18101acf85c620c4818a83e2 (patch)
treeab46b6fc569996fc94b0894059374459f6e9ad7f /gcc/tree-ssa-pre.c
parentf74811fea0c596c8ba7dbc74dddffe5c7c6e7b14 (diff)
downloadgcc-41076ef6f964adde18101acf85c620c4818a83e2.tar.gz
PR middle-end/30391
* tree.c (expr_align): Handle MODIFY_EXPR. GIMPLE_MODIFY_STMT should be unreachable. (build2_stat): Allow construction of MODIFY_EXPR at any time. For the time being redirect GIMPLE_MODIFY_STMT to the new (renamed) build_gimple_modify_stmt_stat. (build2_gimple_stat): Rename to... (build_gimple_modify_stmt_stat): Now longer take a CODE argument. Always build a GIMPLE_MODIFY_STMT node. * tree.h (build2_gimple, build2_gimple_stat): Delete. (build_gimple_modify_stmt, build_gimple_modify_stmt_stat): New declarations. * tree-cfg.c (factor_computed_gotos, tree_merge_blocks, gimplify_val): Use build_gimple_modify_stmt instead of build2_gimple. * tree-complex.c (set_component_ssa_name, expand_complex_move, expand_complex_div_wide): Likewise. * tree-ssa-dom.c (record_equivalences_from_stmt): Likewise. * tree-ssa-loop-im.c (schedule_sm): Likewise. * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Likewise. * tree-ssa-loop-manip.c (create_iv): Likewise. * tree-ssa-phiopt.c (conditional_replacement, minmax_replacement, abs_replacement): Likewise. * tree-ssa-pre.c (create_expression_by_pieces, poolify_modify_stmt, realify_fake_stores): Likewise. * builtins.c (std_expand_builtin_va_start): Build a MODIFY_EXPR node rather than a GIMPLE_MODIFY_STMT node. (std_gimpify_va_arg_expr, expand_builtin_va_copy, fold_builtin_memset, fold_builtin_memory_op, do_mpfr_sincos): Likewise. (integer_valued_real_p): Handle MODIFY_EXPR, not GIMPLE_MODIFY_STMT. * expr.c (expand_expr_real_1): Handle both MODIFY_EXPR and GIMPLE_MODIFY_STMT. * gfortran.dg/pr30391-1.f90: New test case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122030 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-pre.c')
-rw-r--r--gcc/tree-ssa-pre.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index b39c9e8e9f3..5e47a43ab16 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -1,5 +1,6 @@
/* SSA-PRE for trees.
- Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+ Free Software Foundation, Inc.
Contributed by Daniel Berlin <dan@dberlin.org> and Steven Bosscher
<stevenb@suse.de>
@@ -2606,7 +2607,7 @@ create_expression_by_pieces (basic_block block, tree expr, tree stmts)
|| TREE_CODE (TREE_TYPE (expr)) == VECTOR_TYPE)
DECL_GIMPLE_REG_P (temp) = 1;
- newexpr = build2_gimple (GIMPLE_MODIFY_STMT, temp, newexpr);
+ newexpr = build_gimple_modify_stmt (temp, newexpr);
name = make_ssa_name (temp, newexpr);
GIMPLE_STMT_OPERAND (newexpr, 0) = name;
NECESSARY (newexpr) = 0;
@@ -3385,7 +3386,7 @@ static tree
poolify_modify_stmt (tree op1, tree op2)
{
if (modify_expr_template == NULL)
- modify_expr_template = build2_gimple (GIMPLE_MODIFY_STMT, op1, op2);
+ modify_expr_template = build_gimple_modify_stmt (op1, op2);
GIMPLE_STMT_OPERAND (modify_expr_template, 0) = op1;
GIMPLE_STMT_OPERAND (modify_expr_template, 1) = op2;
@@ -3486,7 +3487,7 @@ realify_fake_stores (void)
if (NECESSARY (stmt))
{
block_stmt_iterator bsi;
- tree newstmt;
+ tree newstmt, tmp;
/* Mark the temp variable as referenced */
add_referenced_var (SSA_NAME_VAR (GIMPLE_STMT_OPERAND (stmt, 0)));
@@ -3497,9 +3498,9 @@ realify_fake_stores (void)
as a plain ssa name copy. */
bsi = bsi_for_stmt (stmt);
bsi_prev (&bsi);
- newstmt = build2_gimple (GIMPLE_MODIFY_STMT,
- GIMPLE_STMT_OPERAND (stmt, 0),
- GIMPLE_STMT_OPERAND (bsi_stmt (bsi), 1));
+ tmp = GIMPLE_STMT_OPERAND (bsi_stmt (bsi), 1);
+ newstmt = build_gimple_modify_stmt (GIMPLE_STMT_OPERAND (stmt, 0),
+ tmp);
SSA_NAME_DEF_STMT (GIMPLE_STMT_OPERAND (newstmt, 0)) = newstmt;
bsi_insert_before (&bsi, newstmt, BSI_SAME_STMT);
bsi = bsi_for_stmt (stmt);