/* Lower complex number operations to scalar operations.
- Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of GCC.
/* Do all the work to assign VALUE to COMP. */
value = force_gimple_operand (value, &list, false, NULL);
- last = build2_gimple (GIMPLE_MODIFY_STMT, comp, value);
+ last = build_gimple_modify_stmt (comp, value);
append_to_statement_list (last, &list);
gcc_assert (SSA_NAME_DEF_STMT (comp) == NULL);
i = extract_component (bsi, rhs, 1, false);
x = build1 (REALPART_EXPR, inner_type, unshare_expr (lhs));
- x = build2_gimple (GIMPLE_MODIFY_STMT, x, r);
+ x = build_gimple_modify_stmt (x, r);
bsi_insert_before (bsi, x, BSI_SAME_STMT);
if (stmt == bsi_stmt (*bsi))
else
{
x = build1 (IMAGPART_EXPR, inner_type, unshare_expr (lhs));
- x = build2_gimple (GIMPLE_MODIFY_STMT, x, i);
+ x = build_gimple_modify_stmt (x, i);
bsi_insert_before (bsi, x, BSI_SAME_STMT);
stmt = bsi_stmt (*bsi);
bb_true = create_empty_bb (bb_cond);
bb_false = create_empty_bb (bb_true);
- t1 = build1 (GOTO_EXPR, void_type_node, tree_block_label (bb_true));
- t2 = build1 (GOTO_EXPR, void_type_node, tree_block_label (bb_false));
- COND_EXPR_THEN (cond) = t1;
- COND_EXPR_ELSE (cond) = t2;
-
/* Wire the blocks together. */
e->flags = EDGE_TRUE_VALUE;
redirect_edge_succ (e, bb_true);
if (bb_true)
{
- t1 = build2_gimple (GIMPLE_MODIFY_STMT, rr, tr);
+ t1 = build_gimple_modify_stmt (rr, tr);
bsi_insert_before (bsi, t1, BSI_SAME_STMT);
- t1 = build2_gimple (GIMPLE_MODIFY_STMT, ri, ti);
+ t1 = build_gimple_modify_stmt (ri, ti);
bsi_insert_before (bsi, t1, BSI_SAME_STMT);
bsi_remove (bsi, true);
}
if (bb_false)
{
- t1 = build2_gimple (GIMPLE_MODIFY_STMT, rr, tr);
+ t1 = build_gimple_modify_stmt (rr, tr);
bsi_insert_before (bsi, t1, BSI_SAME_STMT);
- t1 = build2_gimple (GIMPLE_MODIFY_STMT, ri, ti);
+ t1 = build_gimple_modify_stmt (ri, ti);
bsi_insert_before (bsi, t1, BSI_SAME_STMT);
bsi_remove (bsi, true);
}
default:
{
- tree lhs = GENERIC_TREE_OPERAND (stmt, 0);
- tree rhs = GENERIC_TREE_OPERAND (stmt, 1);
+ tree lhs, rhs;
+
+ /* COND_EXPR may also fallthru here, but we do not need to do anything
+ with it. */
+ if (TREE_CODE (stmt) != GIMPLE_MODIFY_STMT)
+ return;
+
+ lhs = GIMPLE_STMT_OPERAND (stmt, 0);
+ rhs = GIMPLE_STMT_OPERAND (stmt, 1);
if (TREE_CODE (type) == COMPLEX_TYPE)
expand_complex_move (bsi, stmt, type, lhs, rhs);
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
- TODO_dump_func | TODO_ggc_collect
- | TODO_update_smt_usage
- | TODO_update_ssa
- | TODO_verify_stmts, /* todo_flags_finish */
+ TODO_dump_func
+ | TODO_ggc_collect
+ | TODO_update_ssa
+ | TODO_verify_stmts, /* todo_flags_finish */
0 /* letter */
};