summaryrefslogtreecommitdiff
path: root/gcc/tree-complex.c
diff options
context:
space:
mode:
authoraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>2006-12-05 17:26:05 +0000
committeraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>2006-12-05 17:26:05 +0000
commit35cc02b5c80ac6738c1a3362a822e3d7e4d0c587 (patch)
tree32d3ee1ddfcad180d619d756a84eeb0df779a6a2 /gcc/tree-complex.c
parentfc297ba47e780c3659434d04f3c299b705154d5f (diff)
downloadgcc-35cc02b5c80ac6738c1a3362a822e3d7e4d0c587.tar.gz
Merge gimple-tuples-branch into mainline.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119546 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-complex.c')
-rw-r--r--gcc/tree-complex.c65
1 files changed, 32 insertions, 33 deletions
diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c
index d3909ae0acc..38b2101d33c 100644
--- a/gcc/tree-complex.c
+++ b/gcc/tree-complex.c
@@ -206,13 +206,13 @@ init_dont_simulate_again (void)
since it's never used as an input to another computation. */
dsa = true;
stmt = TREE_OPERAND (stmt, 0);
- if (!stmt || TREE_CODE (stmt) != MODIFY_EXPR)
+ if (!stmt || TREE_CODE (stmt) != GIMPLE_MODIFY_STMT)
break;
/* FALLTHRU */
- case MODIFY_EXPR:
- dsa = !is_complex_reg (TREE_OPERAND (stmt, 0));
- rhs = TREE_OPERAND (stmt, 1);
+ case GIMPLE_MODIFY_STMT:
+ dsa = !is_complex_reg (GIMPLE_STMT_OPERAND (stmt, 0));
+ rhs = GIMPLE_STMT_OPERAND (stmt, 1);
break;
case COND_EXPR:
@@ -267,11 +267,11 @@ complex_visit_stmt (tree stmt, edge *taken_edge_p ATTRIBUTE_UNUSED,
unsigned int ver;
tree lhs, rhs;
- if (TREE_CODE (stmt) != MODIFY_EXPR)
+ if (TREE_CODE (stmt) != GIMPLE_MODIFY_STMT)
return SSA_PROP_VARYING;
- lhs = TREE_OPERAND (stmt, 0);
- rhs = TREE_OPERAND (stmt, 1);
+ lhs = GIMPLE_STMT_OPERAND (stmt, 0);
+ rhs = GIMPLE_STMT_OPERAND (stmt, 1);
/* These conditions should be satisfied due to the initial filter
set up in init_dont_simulate_again. */
@@ -532,7 +532,7 @@ set_component_ssa_name (tree ssa_name, bool imag_p, tree value)
/* Do all the work to assign VALUE to COMP. */
value = force_gimple_operand (value, &list, false, NULL);
- last = build2 (MODIFY_EXPR, TREE_TYPE (comp), comp, value);
+ last = build2_gimple (GIMPLE_MODIFY_STMT, comp, value);
append_to_statement_list (last, &list);
gcc_assert (SSA_NAME_DEF_STMT (comp) == NULL);
@@ -588,7 +588,7 @@ extract_component (block_stmt_iterator *bsi, tree t, bool imagpart_p,
static void
update_complex_components (block_stmt_iterator *bsi, tree stmt, tree r, tree i)
{
- tree lhs = TREE_OPERAND (stmt, 0);
+ tree lhs = GIMPLE_STMT_OPERAND (stmt, 0);
tree list;
list = set_component_ssa_name (lhs, false, r);
@@ -628,8 +628,8 @@ update_complex_assignment (block_stmt_iterator *bsi, tree r, tree i)
else if (gimple_in_ssa_p (cfun))
update_complex_components (bsi, stmt, r, i);
- type = TREE_TYPE (TREE_OPERAND (mod, 1));
- TREE_OPERAND (mod, 1) = build2 (COMPLEX_EXPR, type, r, i);
+ type = TREE_TYPE (GIMPLE_STMT_OPERAND (mod, 1));
+ GIMPLE_STMT_OPERAND (mod, 1) = build2 (COMPLEX_EXPR, type, r, i);
update_stmt (stmt);
}
@@ -773,25 +773,24 @@ expand_complex_move (block_stmt_iterator *bsi, tree stmt, tree type,
i = extract_component (bsi, rhs, 1, false);
x = build1 (REALPART_EXPR, inner_type, unshare_expr (lhs));
- x = build2 (MODIFY_EXPR, inner_type, x, r);
+ x = build2_gimple (GIMPLE_MODIFY_STMT, x, r);
bsi_insert_before (bsi, x, BSI_SAME_STMT);
if (stmt == bsi_stmt (*bsi))
{
x = build1 (IMAGPART_EXPR, inner_type, unshare_expr (lhs));
- TREE_OPERAND (stmt, 0) = x;
- TREE_OPERAND (stmt, 1) = i;
- TREE_TYPE (stmt) = inner_type;
+ GIMPLE_STMT_OPERAND (stmt, 0) = x;
+ GIMPLE_STMT_OPERAND (stmt, 1) = i;
}
else
{
x = build1 (IMAGPART_EXPR, inner_type, unshare_expr (lhs));
- x = build2 (MODIFY_EXPR, inner_type, x, i);
+ x = build2_gimple (GIMPLE_MODIFY_STMT, x, i);
bsi_insert_before (bsi, x, BSI_SAME_STMT);
stmt = bsi_stmt (*bsi);
gcc_assert (TREE_CODE (stmt) == RETURN_EXPR);
- TREE_OPERAND (stmt, 0) = lhs;
+ GIMPLE_STMT_OPERAND (stmt, 0) = lhs;
}
update_all_vops (stmt);
@@ -894,7 +893,7 @@ expand_complex_libcall (block_stmt_iterator *bsi, tree ar, tree ai,
args = tree_cons (NULL, ar, args);
stmt = bsi_stmt (*bsi);
- type = TREE_TYPE (TREE_OPERAND (stmt, 1));
+ type = TREE_TYPE (GIMPLE_STMT_OPERAND (stmt, 1));
mode = TYPE_MODE (type);
gcc_assert (GET_MODE_CLASS (mode) == MODE_COMPLEX_FLOAT);
@@ -906,13 +905,13 @@ expand_complex_libcall (block_stmt_iterator *bsi, tree ar, tree ai,
gcc_unreachable ();
fn = built_in_decls[bcode];
- TREE_OPERAND (stmt, 1)
+ GIMPLE_STMT_OPERAND (stmt, 1)
= build3 (CALL_EXPR, type, build_fold_addr_expr (fn), args, NULL);
update_stmt (stmt);
if (gimple_in_ssa_p (cfun))
{
- tree lhs = TREE_OPERAND (stmt, 0);
+ tree lhs = GIMPLE_STMT_OPERAND (stmt, 0);
type = TREE_TYPE (type);
update_complex_components (bsi, stmt,
build1 (REALPART_EXPR, type, lhs),
@@ -1122,9 +1121,9 @@ expand_complex_div_wide (block_stmt_iterator *bsi, tree inner_type,
if (bb_true)
{
- t1 = build2 (MODIFY_EXPR, inner_type, rr, tr);
+ t1 = build2_gimple (GIMPLE_MODIFY_STMT, rr, tr);
bsi_insert_before (bsi, t1, BSI_SAME_STMT);
- t1 = build2 (MODIFY_EXPR, inner_type, ri, ti);
+ t1 = build2_gimple (GIMPLE_MODIFY_STMT, ri, ti);
bsi_insert_before (bsi, t1, BSI_SAME_STMT);
bsi_remove (bsi, true);
}
@@ -1161,9 +1160,9 @@ expand_complex_div_wide (block_stmt_iterator *bsi, tree inner_type,
if (bb_false)
{
- t1 = build2 (MODIFY_EXPR, inner_type, rr, tr);
+ t1 = build2_gimple (GIMPLE_MODIFY_STMT, rr, tr);
bsi_insert_before (bsi, t1, BSI_SAME_STMT);
- t1 = build2 (MODIFY_EXPR, inner_type, ri, ti);
+ t1 = build2_gimple (GIMPLE_MODIFY_STMT, ri, ti);
bsi_insert_before (bsi, t1, BSI_SAME_STMT);
bsi_remove (bsi, true);
}
@@ -1307,9 +1306,9 @@ expand_complex_comparison (block_stmt_iterator *bsi, tree ar, tree ai,
case RETURN_EXPR:
expr = TREE_OPERAND (stmt, 0);
/* FALLTHRU */
- case MODIFY_EXPR:
- type = TREE_TYPE (TREE_OPERAND (expr, 1));
- TREE_OPERAND (expr, 1) = fold_convert (type, cc);
+ case GIMPLE_MODIFY_STMT:
+ type = TREE_TYPE (GIMPLE_STMT_OPERAND (expr, 1));
+ GIMPLE_STMT_OPERAND (expr, 1) = fold_convert (type, cc);
break;
case COND_EXPR:
TREE_OPERAND (stmt, 0) = cc;
@@ -1338,12 +1337,12 @@ expand_complex_operations_1 (block_stmt_iterator *bsi)
stmt = TREE_OPERAND (stmt, 0);
if (!stmt)
return;
- if (TREE_CODE (stmt) != MODIFY_EXPR)
+ if (TREE_CODE (stmt) != GIMPLE_MODIFY_STMT)
return;
/* FALLTHRU */
- case MODIFY_EXPR:
- rhs = TREE_OPERAND (stmt, 1);
+ case GIMPLE_MODIFY_STMT:
+ rhs = GIMPLE_STMT_OPERAND (stmt, 1);
break;
case COND_EXPR:
@@ -1384,8 +1383,8 @@ expand_complex_operations_1 (block_stmt_iterator *bsi)
default:
{
- tree lhs = TREE_OPERAND (stmt, 0);
- tree rhs = TREE_OPERAND (stmt, 1);
+ tree lhs = GENERIC_TREE_OPERAND (stmt, 0);
+ tree rhs = GENERIC_TREE_OPERAND (stmt, 1);
if (TREE_CODE (type) == COMPLEX_TYPE)
expand_complex_move (bsi, stmt, type, lhs, rhs);
@@ -1393,7 +1392,7 @@ expand_complex_operations_1 (block_stmt_iterator *bsi)
|| TREE_CODE (rhs) == IMAGPART_EXPR)
&& TREE_CODE (TREE_OPERAND (rhs, 0)) == SSA_NAME)
{
- TREE_OPERAND (stmt, 1)
+ GENERIC_TREE_OPERAND (stmt, 1)
= extract_component (bsi, TREE_OPERAND (rhs, 0),
TREE_CODE (rhs) == IMAGPART_EXPR, false);
update_stmt (stmt);