This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Replace build with buildN in tree-*
More of the same.
Gr.
Steven
* tree-cfg.c (factor_computed_gotos): Use buildN instead of build.
(gimplify_val): Likewise.
* tree-complex.c (update_complex_assignment): Likewise.
(expand_complex_div_wide): Likewise.
* tree-data-ref.c (tree_fold_divides_p): Likewise.
(analyze_siv_subscript_cst_affine): Likewise.
* tree-eh.c (do_return_redirection): Likewise.
(honor_protect_cleanup_actions): Likewise.
(lower_try_finally_switch): Likewise.
* tree-if-conv.c (add_to_predicate_list): Likewise.
(add_to_dst_predicate_list): Likewise.
(replace_phi_with_cond_modify_expr): Likewise.
(ifc_temp_var): Likewise.
* tree-inline.c (copy_body_r): Likewise.
(setup_one_parameter): Likewise.
(expand_call_inline): Likewise.
* tree-mudflap.c (mf_decl_cache_locals): Likewise.
(mf_build_check_statement_for): Likewise.
(mf_xform_derefs_): Likewise.
(mx_register_decls): Likewise.
* tree-nested.c (init_tmp_var): Likewise.
(save_tmp_var): Likewise.
(get_static_chain): Likewise.
(get_frame_field): Likewise.
(finalize_nesting_tree_): Likewise.
* tree-outof-ssa.c (insert_copy_on_edge): Likewise.
(insert_backedge_copies): Likewise.
* tree-profile.c (tree_gen_edge_profiler): Likewise.
* tree-scalar-evolution.c (instantiate_parameters_): Likewise.
* tree-sra.c (generate_one_element_ref): Likewise.
(generate_copy_inout): Likewise.
(generate_element_copy): Likewise.
(generate_element_zero): Likewise.
* tree-ssa-ccp.c (ccp_fold): Likewise.
(maybe_fold_offset_to_array_ref): Likewise.
(maybe_fold_offset_to_component_ref): Likewise.
* tree-ssa-forwprop.c (substitute_single_use_vars): Likewise.
* tree-ssa-loop-im.c (schedule_sm): Likewise.
* tree-ssa-loop-ivopts.c (determine_base_object): Likewise.
* tree-ssa-phiopt.c (conditional_replacement): Likewise.
(value_replacement): Likewise.
(abs_replacement): Likewise.
* tree-ssa-pre.c (create_expression_by_pieces): Likewise.
* tree-tailcall.c (adjust_accumulator_values): Likewise.
(adjust_return_value): Likewise.
Index: tree-cfg.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-cfg.c,v
retrieving revision 2.151
diff -u -3 -p -r2.151 tree-cfg.c
--- tree-cfg.c 21 Feb 2005 18:38:05 -0000 2.151
+++ tree-cfg.c 26 Feb 2005 20:31:34 -0000
@@ -306,8 +306,8 @@ factor_computed_gotos (void)
}
/* Copy the original computed goto's destination into VAR. */
- assignment = build (MODIFY_EXPR, ptr_type_node,
- var, GOTO_DESTINATION (last));
+ assignment = build2 (MODIFY_EXPR, ptr_type_node,
+ var, GOTO_DESTINATION (last));
bsi_insert_before (&bsi, assignment, BSI_SAME_STMT);
/* And re-vector the computed goto to the new destination. */
@@ -5628,7 +5628,7 @@ gimplify_val (block_stmt_iterator *bsi,
return exp;
t = make_rename_temp (type, NULL);
- new_stmt = build (MODIFY_EXPR, type, t, exp);
+ new_stmt = build2 (MODIFY_EXPR, type, t, exp);
orig_stmt = bsi_stmt (*bsi);
SET_EXPR_LOCUS (new_stmt, EXPR_LOCUS (orig_stmt));
Index: tree-complex.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-complex.c,v
retrieving revision 2.19
diff -u -3 -p -r2.19 tree-complex.c
--- tree-complex.c 12 Feb 2005 00:26:56 -0000 2.19
+++ tree-complex.c 26 Feb 2005 20:31:34 -0000
@@ -83,7 +83,7 @@ update_complex_assignment (block_stmt_it
stmt = TREE_OPERAND (stmt, 0);
type = TREE_TYPE (TREE_OPERAND (stmt, 1));
- TREE_OPERAND (stmt, 1) = build (COMPLEX_EXPR, type, r, i);
+ TREE_OPERAND (stmt, 1) = build2 (COMPLEX_EXPR, type, r, i);
modify_stmt (stmt);
}
@@ -215,7 +215,7 @@ expand_complex_div_wide (block_stmt_iter
/* Examine |br| < |bi|, and branch. */
t1 = gimplify_build1 (bsi, ABS_EXPR, inner_type, br);
t2 = gimplify_build1 (bsi, ABS_EXPR, inner_type, bi);
- cond = fold (build (LT_EXPR, boolean_type_node, t1, t2));
+ cond = fold (build2 (LT_EXPR, boolean_type_node, t1, t2));
STRIP_NOPS (cond);
bb_cond = bb_true = bb_false = bb_join = NULL;
@@ -224,7 +224,7 @@ expand_complex_div_wide (block_stmt_iter
{
edge e;
- cond = build (COND_EXPR, void_type_node, cond, NULL, NULL);
+ cond = build3 (COND_EXPR, void_type_node, cond, NULL, NULL);
bsi_insert_before (bsi, cond, BSI_SAME_STMT);
/* Split the original block, and create the TRUE and FALSE blocks. */
@@ -234,8 +234,8 @@ expand_complex_div_wide (block_stmt_iter
bb_true = create_empty_bb (bb_cond);
bb_false = create_empty_bb (bb_true);
- t1 = build (GOTO_EXPR, void_type_node, tree_block_label (bb_true));
- t2 = build (GOTO_EXPR, void_type_node, tree_block_label (bb_false));
+ 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;
@@ -289,9 +289,9 @@ expand_complex_div_wide (block_stmt_iter
if (bb_true)
{
- t1 = build (MODIFY_EXPR, inner_type, rr, tr);
+ t1 = build2 (MODIFY_EXPR, inner_type, rr, tr);
bsi_insert_before (bsi, t1, BSI_SAME_STMT);
- t1 = build (MODIFY_EXPR, inner_type, ri, ti);
+ t1 = build2 (MODIFY_EXPR, inner_type, ri, ti);
bsi_insert_before (bsi, t1, BSI_SAME_STMT);
bsi_remove (bsi);
}
@@ -328,9 +328,9 @@ expand_complex_div_wide (block_stmt_iter
if (bb_false)
{
- t1 = build (MODIFY_EXPR, inner_type, rr, tr);
+ t1 = build2 (MODIFY_EXPR, inner_type, rr, tr);
bsi_insert_before (bsi, t1, BSI_SAME_STMT);
- t1 = build (MODIFY_EXPR, inner_type, ri, ti);
+ t1 = build2 (MODIFY_EXPR, inner_type, ri, ti);
bsi_insert_before (bsi, t1, BSI_SAME_STMT);
bsi_remove (bsi);
}
Index: tree-data-ref.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-data-ref.c,v
retrieving revision 2.23
diff -u -3 -p -r2.23 tree-data-ref.c
--- tree-data-ref.c 17 Feb 2005 12:58:01 -0000 2.23
+++ tree-data-ref.c 26 Feb 2005 20:31:35 -0000
@@ -195,7 +195,7 @@ tree_fold_divides_p (tree type,
{
/* Determines whether (A == gcd (A, B)). */
return integer_zerop
- (fold (build (MINUS_EXPR, type, a, tree_fold_gcd (a, b))));
+ (fold (build2 (MINUS_EXPR, type, a, tree_fold_gcd (a, b))));
}
/* Compute the greatest common denominator of two numbers using
@@ -937,9 +937,9 @@ analyze_siv_subscript_cst_affine (tree c
{
*overlaps_a = integer_zero_node;
*overlaps_b = fold
- (build (EXACT_DIV_EXPR, integer_type_node,
- fold (build1 (ABS_EXPR, integer_type_node, difference)),
- CHREC_RIGHT (chrec_b)));
+ (build2 (EXACT_DIV_EXPR, integer_type_node,
+ fold (build1 (ABS_EXPR, integer_type_node, difference)),
+ CHREC_RIGHT (chrec_b)));
*last_conflicts = integer_one_node;
return;
}
@@ -991,8 +991,8 @@ analyze_siv_subscript_cst_affine (tree c
{
*overlaps_a = integer_zero_node;
*overlaps_b = fold
- (build (EXACT_DIV_EXPR, integer_type_node, difference,
- CHREC_RIGHT (chrec_b)));
+ (build2 (EXACT_DIV_EXPR, integer_type_node, difference,
+ CHREC_RIGHT (chrec_b)));
*last_conflicts = integer_one_node;
return;
}
Index: tree-eh.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-eh.c,v
retrieving revision 2.26
diff -u -3 -p -r2.26 tree-eh.c
--- tree-eh.c 24 Feb 2005 21:47:26 -0000 2.26
+++ tree-eh.c 26 Feb 2005 20:31:36 -0000
@@ -620,13 +620,13 @@ do_return_redirection (struct goto_queue
else
new = *return_value_p;
- x = build (MODIFY_EXPR, TREE_TYPE (new), new, old);
+ x = build2 (MODIFY_EXPR, TREE_TYPE (new), new, old);
append_to_statement_list (x, &q->repl_stmt);
if (new == result)
x = result;
else
- x = build (MODIFY_EXPR, TREE_TYPE (result), result, new);
+ x = build2 (MODIFY_EXPR, TREE_TYPE (result), result, new);
q->cont_stmt = build1 (RETURN_EXPR, void_type_node, x);
}
@@ -815,21 +815,21 @@ honor_protect_cleanup_actions (struct le
save_filt = create_tmp_var (integer_type_node, "save_filt");
i = tsi_start (finally);
- x = build (EXC_PTR_EXPR, ptr_type_node);
- x = build (MODIFY_EXPR, void_type_node, save_eptr, x);
+ x = build0 (EXC_PTR_EXPR, ptr_type_node);
+ x = build2 (MODIFY_EXPR, void_type_node, save_eptr, x);
tsi_link_before (&i, x, TSI_CONTINUE_LINKING);
- x = build (FILTER_EXPR, integer_type_node);
- x = build (MODIFY_EXPR, void_type_node, save_filt, x);
+ x = build0 (FILTER_EXPR, integer_type_node);
+ x = build2 (MODIFY_EXPR, void_type_node, save_filt, x);
tsi_link_before (&i, x, TSI_CONTINUE_LINKING);
i = tsi_last (finally);
- x = build (EXC_PTR_EXPR, ptr_type_node);
- x = build (MODIFY_EXPR, void_type_node, x, save_eptr);
+ x = build0 (EXC_PTR_EXPR, ptr_type_node);
+ x = build2 (MODIFY_EXPR, void_type_node, x, save_eptr);
tsi_link_after (&i, x, TSI_CONTINUE_LINKING);
- x = build (FILTER_EXPR, integer_type_node);
- x = build (MODIFY_EXPR, void_type_node, x, save_filt);
+ x = build0 (FILTER_EXPR, integer_type_node);
+ x = build2 (MODIFY_EXPR, void_type_node, x, save_filt);
tsi_link_after (&i, x, TSI_CONTINUE_LINKING);
x = build1 (RESX_EXPR, void_type_node,
@@ -841,10 +841,10 @@ honor_protect_cleanup_actions (struct le
/* Wrap the block with protect_cleanup_actions as the action. */
if (protect_cleanup_actions)
{
- x = build (EH_FILTER_EXPR, void_type_node, NULL, NULL);
+ x = build2 (EH_FILTER_EXPR, void_type_node, NULL, NULL);
append_to_statement_list (protect_cleanup_actions, &EH_FILTER_FAILURE (x));
EH_FILTER_MUST_NOT_THROW (x) = 1;
- finally = build (TRY_CATCH_EXPR, void_type_node, finally, x);
+ finally = build2 (TRY_CATCH_EXPR, void_type_node, finally, x);
lower_eh_filter (outer_state, &finally);
}
else
@@ -1125,8 +1125,8 @@ lower_try_finally_switch (struct leh_sta
finally_label = create_artificial_label ();
case_label_vec = make_tree_vec (ndests);
- switch_stmt = build (SWITCH_EXPR, integer_type_node, finally_tmp,
- NULL_TREE, case_label_vec);
+ switch_stmt = build3 (SWITCH_EXPR, integer_type_node, finally_tmp,
+ NULL_TREE, case_label_vec);
switch_body = NULL;
last_case = NULL;
last_case_index = 0;
@@ -1137,8 +1137,8 @@ lower_try_finally_switch (struct leh_sta
if (tf->may_fallthru)
{
- x = build (MODIFY_EXPR, void_type_node, finally_tmp,
- build_int_cst (NULL_TREE, fallthru_index));
+ x = build2 (MODIFY_EXPR, void_type_node, finally_tmp,
+ build_int_cst (NULL_TREE, fallthru_index));
append_to_statement_list (x, tf->top_p);
if (tf->may_throw)
@@ -1148,13 +1148,13 @@ lower_try_finally_switch (struct leh_sta
}
- last_case = build (CASE_LABEL_EXPR, void_type_node,
- build_int_cst (NULL_TREE, fallthru_index), NULL,
- create_artificial_label ());
+ last_case = build3 (CASE_LABEL_EXPR, void_type_node,
+ build_int_cst (NULL_TREE, fallthru_index), NULL,
+ create_artificial_label ());
TREE_VEC_ELT (case_label_vec, last_case_index) = last_case;
last_case_index++;
- x = build (LABEL_EXPR, void_type_node, CASE_LABEL (last_case));
+ x = build1 (LABEL_EXPR, void_type_node, CASE_LABEL (last_case));
append_to_statement_list (x, &switch_body);
x = lower_try_finally_fallthru_label (tf);
@@ -1167,17 +1167,17 @@ lower_try_finally_switch (struct leh_sta
x = build1 (LABEL_EXPR, void_type_node, tf->eh_label);
append_to_statement_list (x, tf->top_p);
- x = build (MODIFY_EXPR, void_type_node, finally_tmp,
+ x = build2 (MODIFY_EXPR, void_type_node, finally_tmp,
build_int_cst (NULL_TREE, eh_index));
append_to_statement_list (x, tf->top_p);
- last_case = build (CASE_LABEL_EXPR, void_type_node,
- build_int_cst (NULL_TREE, eh_index), NULL,
- create_artificial_label ());
+ last_case = build3 (CASE_LABEL_EXPR, void_type_node,
+ build_int_cst (NULL_TREE, eh_index), NULL,
+ create_artificial_label ());
TREE_VEC_ELT (case_label_vec, last_case_index) = last_case;
last_case_index++;
- x = build (LABEL_EXPR, void_type_node, CASE_LABEL (last_case));
+ x = build1 (LABEL_EXPR, void_type_node, CASE_LABEL (last_case));
append_to_statement_list (x, &switch_body);
x = build1 (RESX_EXPR, void_type_node,
build_int_cst (NULL_TREE,
@@ -1202,15 +1202,15 @@ lower_try_finally_switch (struct leh_sta
if (q->index < 0)
{
- mod = build (MODIFY_EXPR, void_type_node, finally_tmp,
- build_int_cst (NULL_TREE, return_index));
+ mod = build2 (MODIFY_EXPR, void_type_node, finally_tmp,
+ build_int_cst (NULL_TREE, return_index));
do_return_redirection (q, finally_label, mod, &return_val);
switch_id = return_index;
}
else
{
- mod = build (MODIFY_EXPR, void_type_node, finally_tmp,
- build_int_cst (NULL_TREE, q->index));
+ mod = build2 (MODIFY_EXPR, void_type_node, finally_tmp,
+ build_int_cst (NULL_TREE, q->index));
do_goto_redirection (q, finally_label, mod);
switch_id = q->index;
}
@@ -1218,12 +1218,12 @@ lower_try_finally_switch (struct leh_sta
case_index = j + q->index;
if (!TREE_VEC_ELT (case_label_vec, case_index))
{
- last_case = build (CASE_LABEL_EXPR, void_type_node,
- build_int_cst (NULL_TREE, switch_id), NULL,
- create_artificial_label ());
+ last_case = build3 (CASE_LABEL_EXPR, void_type_node,
+ build_int_cst (NULL_TREE, switch_id), NULL,
+ create_artificial_label ());
TREE_VEC_ELT (case_label_vec, case_index) = last_case;
- x = build (LABEL_EXPR, void_type_node, CASE_LABEL (last_case));
+ x = build1 (LABEL_EXPR, void_type_node, CASE_LABEL (last_case));
append_to_statement_list (x, &switch_body);
append_to_statement_list (q->cont_stmt, &switch_body);
maybe_record_in_goto_queue (state, q->cont_stmt);
Index: tree-if-conv.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-if-conv.c,v
retrieving revision 2.28
diff -u -3 -p -r2.28 tree-if-conv.c
--- tree-if-conv.c 23 Feb 2005 01:10:36 -0000 2.28
+++ tree-if-conv.c 26 Feb 2005 20:31:36 -0000
@@ -614,8 +614,8 @@ add_to_predicate_list (basic_block bb, t
tree cond = bb->aux;
if (cond)
- cond = fold (build (TRUTH_OR_EXPR, boolean_type_node,
- unshare_expr (cond), new_cond));
+ cond = fold (build2 (TRUTH_OR_EXPR, boolean_type_node,
+ unshare_expr (cond), new_cond));
else
cond = new_cond;
@@ -654,8 +654,8 @@ add_to_dst_predicate_list (struct loop *
bsi_insert_before (bsi, tmp_stmts2, BSI_SAME_STMT);
/* new_cond == prev_cond AND cond */
- tmp = build (TRUTH_AND_EXPR, boolean_type_node,
- unshare_expr (prev_cond), cond);
+ tmp = build2 (TRUTH_AND_EXPR, boolean_type_node,
+ unshare_expr (prev_cond), cond);
tmp_stmt = ifc_temp_var (boolean_type_node, tmp);
bsi_insert_before (bsi, tmp_stmt, BSI_SAME_STMT);
new_cond = TREE_OPERAND (tmp_stmt, 0);
@@ -782,13 +782,13 @@ replace_phi_with_cond_modify_expr (tree
}
/* Build new RHS using selected condition and arguments. */
- rhs = build (COND_EXPR, TREE_TYPE (PHI_RESULT (phi)),
- unshare_expr (cond), unshare_expr (arg_0),
- unshare_expr (arg_1));
+ rhs = build3 (COND_EXPR, TREE_TYPE (PHI_RESULT (phi)),
+ unshare_expr (cond), unshare_expr (arg_0),
+ unshare_expr (arg_1));
/* Create new MODIFY expression using RHS. */
- new_stmt = build (MODIFY_EXPR, TREE_TYPE (PHI_RESULT (phi)),
- unshare_expr (PHI_RESULT (phi)), rhs);
+ new_stmt = build2 (MODIFY_EXPR, TREE_TYPE (PHI_RESULT (phi)),
+ unshare_expr (PHI_RESULT (phi)), rhs);
/* Make new statement definition of the original phi result. */
SSA_NAME_DEF_STMT (PHI_RESULT (phi)) = new_stmt;
@@ -971,7 +971,7 @@ ifc_temp_var (tree type, tree exp)
add_referenced_tmp_var (var);
/* Build new statement to assign EXP to new variable. */
- stmt = build (MODIFY_EXPR, type, var, exp);
+ stmt = build2 (MODIFY_EXPR, type, var, exp);
/* Get SSA name for the new variable and set make new statement
its definition statement. */
Index: tree-inline.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-inline.c,v
retrieving revision 1.170
diff -u -3 -p -r1.170 tree-inline.c
--- tree-inline.c 27 Jan 2005 14:36:17 -0000 1.170
+++ tree-inline.c 26 Feb 2005 20:31:37 -0000
@@ -482,7 +482,7 @@ copy_body_r (tree *tp, int *walk_subtree
if (TREE_CODE (assignment) == RESULT_DECL)
gimplify_stmt (&assignment);
- *tp = build (BIND_EXPR, void_type_node, NULL, NULL, NULL);
+ *tp = build3 (BIND_EXPR, void_type_node, NULL, NULL, NULL);
append_to_statement_list (assignment, &BIND_EXPR_BODY (*tp));
append_to_statement_list (goto_stmt, &BIND_EXPR_BODY (*tp));
}
@@ -749,7 +749,7 @@ setup_one_parameter (inline_data *id, tr
/* We want to use MODIFY_EXPR, not INIT_EXPR here so that we
keep our trees in gimple form. */
- init_stmt = build (MODIFY_EXPR, TREE_TYPE (var), var, rhs);
+ init_stmt = build2 (MODIFY_EXPR, TREE_TYPE (var), var, rhs);
append_to_statement_list (init_stmt, init_stmts);
/* If we did not create a gimple value and we did not create a gimple
@@ -1529,8 +1529,8 @@ expand_call_inline (tree *tp, int *walk_
statements within the function to jump to. The type of the
statement expression is the return type of the function call. */
stmt = NULL;
- expr = build (BIND_EXPR, void_type_node, NULL_TREE,
- stmt, make_node (BLOCK));
+ expr = build3 (BIND_EXPR, void_type_node, NULL_TREE,
+ stmt, make_node (BLOCK));
BLOCK_ABSTRACT_ORIGIN (BIND_EXPR_BLOCK (expr)) = fn;
/* Local declarations will be replaced by their equivalents in this
Index: tree-mudflap.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-mudflap.c,v
retrieving revision 2.35
diff -u -3 -p -r2.35 tree-mudflap.c
--- tree-mudflap.c 4 Jan 2005 18:47:02 -0000 2.35
+++ tree-mudflap.c 26 Feb 2005 20:31:37 -0000
@@ -453,14 +453,14 @@ mf_decl_cache_locals (void)
/* Build initialization nodes for the cache vars. We just load the
globals into the cache variables. */
- t = build (MODIFY_EXPR, TREE_TYPE (mf_cache_shift_decl_l),
- mf_cache_shift_decl_l, mf_cache_shift_decl);
+ t = build2 (MODIFY_EXPR, TREE_TYPE (mf_cache_shift_decl_l),
+ mf_cache_shift_decl_l, mf_cache_shift_decl);
SET_EXPR_LOCATION (t, DECL_SOURCE_LOCATION (current_function_decl));
gimplify_to_stmt_list (&t);
shift_init_stmts = t;
- t = build (MODIFY_EXPR, TREE_TYPE (mf_cache_mask_decl_l),
- mf_cache_mask_decl_l, mf_cache_mask_decl);
+ t = build2 (MODIFY_EXPR, TREE_TYPE (mf_cache_mask_decl_l),
+ mf_cache_mask_decl_l, mf_cache_mask_decl);
SET_EXPR_LOCATION (t, DECL_SOURCE_LOCATION (current_function_decl));
gimplify_to_stmt_list (&t);
mask_init_stmts = t;
@@ -566,31 +566,31 @@ mf_build_check_statement_for (tree base,
mf_limit = create_tmp_var (mf_uintptr_type, "__mf_limit");
/* Build: __mf_base = (uintptr_t) <base address expression>. */
- t = build (MODIFY_EXPR, void_type_node, mf_base,
- convert (mf_uintptr_type, unshare_expr (base)));
+ t = build2 (MODIFY_EXPR, void_type_node, mf_base,
+ convert (mf_uintptr_type, unshare_expr (base)));
SET_EXPR_LOCUS (t, locus);
gimplify_to_stmt_list (&t);
head = tsi_start (t);
tsi = tsi_last (t);
/* Build: __mf_limit = (uintptr_t) <limit address expression>. */
- t = build (MODIFY_EXPR, void_type_node, mf_limit,
- convert (mf_uintptr_type, unshare_expr (limit)));
+ t = build2 (MODIFY_EXPR, void_type_node, mf_limit,
+ convert (mf_uintptr_type, unshare_expr (limit)));
SET_EXPR_LOCUS (t, locus);
gimplify_to_stmt_list (&t);
tsi_link_after (&tsi, t, TSI_CONTINUE_LINKING);
/* Build: __mf_elem = &__mf_lookup_cache [(__mf_base >> __mf_shift)
& __mf_mask]. */
- t = build (RSHIFT_EXPR, mf_uintptr_type, mf_base,
- (flag_mudflap_threads ? mf_cache_shift_decl : mf_cache_shift_decl_l));
- t = build (BIT_AND_EXPR, mf_uintptr_type, t,
- (flag_mudflap_threads ? mf_cache_mask_decl : mf_cache_mask_decl_l));
- t = build (ARRAY_REF,
- TREE_TYPE (TREE_TYPE (mf_cache_array_decl)),
- mf_cache_array_decl, t, NULL_TREE, NULL_TREE);
+ t = build2 (RSHIFT_EXPR, mf_uintptr_type, mf_base,
+ (flag_mudflap_threads ? mf_cache_shift_decl : mf_cache_shift_decl_l));
+ t = build2 (BIT_AND_EXPR, mf_uintptr_type, t,
+ (flag_mudflap_threads ? mf_cache_mask_decl : mf_cache_mask_decl_l));
+ t = build4 (ARRAY_REF,
+ TREE_TYPE (TREE_TYPE (mf_cache_array_decl)),
+ mf_cache_array_decl, t, NULL_TREE, NULL_TREE);
t = build1 (ADDR_EXPR, mf_cache_structptr_type, t);
- t = build (MODIFY_EXPR, void_type_node, mf_elem, t);
+ t = build2 (MODIFY_EXPR, void_type_node, mf_elem, t);
SET_EXPR_LOCUS (t, locus);
gimplify_to_stmt_list (&t);
tsi_link_after (&tsi, t, TSI_CONTINUE_LINKING);
@@ -610,10 +610,10 @@ mf_build_check_statement_for (tree base,
the edge to the THEN clause of the conditional jump as unlikely. */
/* Construct t <-- '__mf_elem->low > __mf_base'. */
- t = build (COMPONENT_REF, mf_uintptr_type,
- build1 (INDIRECT_REF, mf_cache_struct_type, mf_elem),
- TYPE_FIELDS (mf_cache_struct_type), NULL_TREE);
- t = build (GT_EXPR, boolean_type_node, t, mf_base);
+ t = build3 (COMPONENT_REF, mf_uintptr_type,
+ build1 (INDIRECT_REF, mf_cache_struct_type, mf_elem),
+ TYPE_FIELDS (mf_cache_struct_type), NULL_TREE);
+ t = build2 (GT_EXPR, boolean_type_node, t, mf_base);
/* Construct '__mf_elem->high < __mf_limit'.
@@ -623,28 +623,28 @@ mf_build_check_statement_for (tree base,
Then build 'u <-- (u < v). */
- u = build (COMPONENT_REF, mf_uintptr_type,
- build1 (INDIRECT_REF, mf_cache_struct_type, mf_elem),
- TREE_CHAIN (TYPE_FIELDS (mf_cache_struct_type)), NULL_TREE);
+ u = build3 (COMPONENT_REF, mf_uintptr_type,
+ build1 (INDIRECT_REF, mf_cache_struct_type, mf_elem),
+ TREE_CHAIN (TYPE_FIELDS (mf_cache_struct_type)), NULL_TREE);
v = mf_limit;
- u = build (LT_EXPR, boolean_type_node, u, v);
+ u = build2 (LT_EXPR, boolean_type_node, u, v);
/* Build the composed conditional: t <-- 't || u'. Then store the
result of the evaluation of 't' in a temporary variable which we
can use as the condition for the conditional jump. */
- t = build (TRUTH_OR_EXPR, boolean_type_node, t, u);
+ t = build2 (TRUTH_OR_EXPR, boolean_type_node, t, u);
cond = create_tmp_var (boolean_type_node, "__mf_unlikely_cond");
- t = build (MODIFY_EXPR, boolean_type_node, cond, t);
+ t = build2 (MODIFY_EXPR, boolean_type_node, cond, t);
gimplify_to_stmt_list (&t);
tsi_link_after (&tsi, t, TSI_CONTINUE_LINKING);
/* Build the conditional jump. 'cond' is just a temporary so we can
simply build a void COND_EXPR. We do need labels in both arms though. */
- t = build (COND_EXPR, void_type_node, cond,
- build (GOTO_EXPR, void_type_node, tree_block_label (then_bb)),
- build (GOTO_EXPR, void_type_node, tree_block_label (join_bb)));
+ t = build3 (COND_EXPR, void_type_node, cond,
+ build1 (GOTO_EXPR, void_type_node, tree_block_label (then_bb)),
+ build1 (GOTO_EXPR, void_type_node, tree_block_label (join_bb)));
SET_EXPR_LOCUS (t, locus);
tsi_link_after (&tsi, t, TSI_CONTINUE_LINKING);
@@ -677,9 +677,10 @@ mf_build_check_statement_for (tree base,
u = tree_cons (NULL_TREE, dirflag, u);
/* NB: we pass the overall [base..limit] range to mf_check. */
u = tree_cons (NULL_TREE,
- fold (build (PLUS_EXPR, integer_type_node,
- fold (build (MINUS_EXPR, mf_uintptr_type, mf_limit, mf_base)),
- integer_one_node)),
+ fold (build2 (PLUS_EXPR, integer_type_node,
+ fold (build2 (MINUS_EXPR, mf_uintptr_type,
+ mf_limit, mf_base)),
+ integer_one_node)),
u);
u = tree_cons (NULL_TREE, mf_base, u);
t = build_function_call_expr (mf_check_fndecl, u);
@@ -689,12 +690,12 @@ mf_build_check_statement_for (tree base,
if (! flag_mudflap_threads)
{
- t = build (MODIFY_EXPR, void_type_node,
- mf_cache_shift_decl_l, mf_cache_shift_decl);
+ t = build2 (MODIFY_EXPR, void_type_node,
+ mf_cache_shift_decl_l, mf_cache_shift_decl);
tsi_link_after (&tsi, t, TSI_CONTINUE_LINKING);
- t = build (MODIFY_EXPR, void_type_node,
- mf_cache_mask_decl_l, mf_cache_mask_decl);
+ t = build2 (MODIFY_EXPR, void_type_node,
+ mf_cache_mask_decl_l, mf_cache_mask_decl);
tsi_link_after (&tsi, t, TSI_CONTINUE_LINKING);
}
@@ -830,27 +831,27 @@ mf_xform_derefs_1 (block_stmt_iterator *
if (elt)
elt = build1 (ADDR_EXPR, build_pointer_type TREE_TYPE (elt), elt);
addr = fold_convert (ptr_type_node, elt ? elt : base);
- addr = fold (build (PLUS_EXPR, ptr_type_node,
- addr, fold_convert (ptr_type_node,
- byte_position (field))));
+ addr = fold (build2 (PLUS_EXPR, ptr_type_node,
+ addr, fold_convert (ptr_type_node,
+ byte_position (field))));
}
else
addr = build1 (ADDR_EXPR, build_pointer_type (type), t);
- limit = fold (build (MINUS_EXPR, mf_uintptr_type,
- fold (build2 (PLUS_EXPR, mf_uintptr_type,
- convert (mf_uintptr_type, addr),
- size)),
- integer_one_node));
+ limit = fold (build2 (MINUS_EXPR, mf_uintptr_type,
+ fold (build2 (PLUS_EXPR, mf_uintptr_type,
+ convert (mf_uintptr_type, addr),
+ size)),
+ integer_one_node));
}
break;
case INDIRECT_REF:
addr = TREE_OPERAND (t, 0);
base = addr;
- limit = fold (build (MINUS_EXPR, ptr_type_node,
- fold (build (PLUS_EXPR, ptr_type_node, base, size)),
- integer_one_node));
+ limit = fold (build2 (MINUS_EXPR, ptr_type_node,
+ fold (build2 (PLUS_EXPR, ptr_type_node, base, size)),
+ integer_one_node));
break;
case ARRAY_RANGE_REF:
@@ -879,12 +880,12 @@ mf_xform_derefs_1 (block_stmt_iterator *
addr = TREE_OPERAND (TREE_OPERAND (t, 0), 0);
addr = convert (ptr_type_node, addr);
- addr = fold (build (PLUS_EXPR, ptr_type_node, addr, ofs));
+ addr = fold (build2 (PLUS_EXPR, ptr_type_node, addr, ofs));
base = addr;
- limit = fold (build (MINUS_EXPR, ptr_type_node,
- fold (build (PLUS_EXPR, ptr_type_node, base, size)),
- integer_one_node));
+ limit = fold (build2 (MINUS_EXPR, ptr_type_node,
+ fold (build2 (PLUS_EXPR, ptr_type_node, base, size)),
+ integer_one_node));
}
break;
@@ -1063,8 +1064,8 @@ mx_register_decls (tree decl, tree *stmt
/* Actually, (initially_stmts!=NULL) <=> (finally_stmts!=NULL) */
if (finally_stmts != NULL_TREE)
{
- tree t = build (TRY_FINALLY_EXPR, void_type_node,
- *stmt_list, finally_stmts);
+ tree t = build2 (TRY_FINALLY_EXPR, void_type_node,
+ *stmt_list, finally_stmts);
*stmt_list = NULL;
append_to_statement_list (t, stmt_list);
}
Index: tree-nested.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-nested.c,v
retrieving revision 2.24
diff -u -3 -p -r2.24 tree-nested.c
--- tree-nested.c 23 Jan 2005 15:05:31 -0000 2.24
+++ tree-nested.c 26 Feb 2005 20:31:38 -0000
@@ -358,7 +358,7 @@ init_tmp_var (struct nesting_info *info,
tree t, stmt;
t = create_tmp_var_for (info, TREE_TYPE (exp), NULL);
- stmt = build (MODIFY_EXPR, TREE_TYPE (t), t, exp);
+ stmt = build2 (MODIFY_EXPR, TREE_TYPE (t), t, exp);
SET_EXPR_LOCUS (stmt, EXPR_LOCUS (tsi_stmt (*tsi)));
tsi_link_before (tsi, stmt, TSI_SAME_STMT);
@@ -386,7 +386,7 @@ save_tmp_var (struct nesting_info *info,
tree t, stmt;
t = create_tmp_var_for (info, TREE_TYPE (exp), NULL);
- stmt = build (MODIFY_EXPR, TREE_TYPE (t), exp, t);
+ stmt = build2 (MODIFY_EXPR, TREE_TYPE (t), exp, t);
SET_EXPR_LOCUS (stmt, EXPR_LOCUS (tsi_stmt (*tsi)));
tsi_link_after (tsi, stmt, TSI_SAME_STMT);
@@ -727,7 +727,7 @@ get_static_chain (struct nesting_info *i
tree field = get_chain_field (i);
x = build1 (INDIRECT_REF, TREE_TYPE (TREE_TYPE (x)), x);
- x = build (COMPONENT_REF, TREE_TYPE (field), x, field, NULL_TREE);
+ x = build3 (COMPONENT_REF, TREE_TYPE (field), x, field, NULL_TREE);
x = init_tmp_var (info, x, tsi);
}
}
@@ -761,14 +761,14 @@ get_frame_field (struct nesting_info *in
tree field = get_chain_field (i);
x = build1 (INDIRECT_REF, TREE_TYPE (TREE_TYPE (x)), x);
- x = build (COMPONENT_REF, TREE_TYPE (field), x, field, NULL_TREE);
+ x = build3 (COMPONENT_REF, TREE_TYPE (field), x, field, NULL_TREE);
x = init_tmp_var (info, x, tsi);
}
x = build1 (INDIRECT_REF, TREE_TYPE (TREE_TYPE (x)), x);
}
- x = build (COMPONENT_REF, TREE_TYPE (field), x, field, NULL_TREE);
+ x = build3 (COMPONENT_REF, TREE_TYPE (field), x, field, NULL_TREE);
return x;
}
@@ -1326,9 +1326,9 @@ finalize_nesting_tree_1 (struct nesting_
else
x = p;
- y = build (COMPONENT_REF, TREE_TYPE (field),
- root->frame_decl, field, NULL_TREE);
- x = build (MODIFY_EXPR, TREE_TYPE (field), y, x);
+ y = build3 (COMPONENT_REF, TREE_TYPE (field),
+ root->frame_decl, field, NULL_TREE);
+ x = build2 (MODIFY_EXPR, TREE_TYPE (field), y, x);
append_to_statement_list (x, &stmt_list);
}
}
@@ -1337,9 +1337,9 @@ finalize_nesting_tree_1 (struct nesting_
from chain_decl. */
if (root->chain_field)
{
- tree x = build (COMPONENT_REF, TREE_TYPE (root->chain_field),
- root->frame_decl, root->chain_field, NULL_TREE);
- x = build (MODIFY_EXPR, TREE_TYPE (x), x, get_chain_decl (root));
+ tree x = build3 (COMPONENT_REF, TREE_TYPE (root->chain_field),
+ root->frame_decl, root->chain_field, NULL_TREE);
+ x = build2 (MODIFY_EXPR, TREE_TYPE (x), x, get_chain_decl (root));
append_to_statement_list (x, &stmt_list);
}
@@ -1364,8 +1364,8 @@ finalize_nesting_tree_1 (struct nesting_
x = build_addr (i->context);
arg = tree_cons (NULL, x, arg);
- x = build (COMPONENT_REF, TREE_TYPE (field),
- root->frame_decl, field, NULL_TREE);
+ x = build3 (COMPONENT_REF, TREE_TYPE (field),
+ root->frame_decl, field, NULL_TREE);
x = build_addr (x);
arg = tree_cons (NULL, x, arg);
Index: tree-outof-ssa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-outof-ssa.c,v
retrieving revision 2.47
diff -u -3 -p -r2.47 tree-outof-ssa.c
--- tree-outof-ssa.c 22 Feb 2005 16:48:03 -0000 2.47
+++ tree-outof-ssa.c 26 Feb 2005 20:31:38 -0000
@@ -188,7 +188,7 @@ insert_copy_on_edge (edge e, tree dest,
{
tree copy;
- copy = build (MODIFY_EXPR, TREE_TYPE (dest), dest, src);
+ copy = build2 (MODIFY_EXPR, TREE_TYPE (dest), dest, src);
set_is_used (dest);
if (TREE_CODE (src) == ADDR_EXPR)
@@ -2451,8 +2451,8 @@ insert_backedge_copies (void)
/* Create a new instance of the underlying
variable of the PHI result. */
- stmt = build (MODIFY_EXPR, TREE_TYPE (result_var),
- NULL, PHI_ARG_DEF (phi, i));
+ stmt = build2 (MODIFY_EXPR, TREE_TYPE (result_var),
+ NULL, PHI_ARG_DEF (phi, i));
name = make_ssa_name (result_var, stmt);
TREE_OPERAND (stmt, 0) = name;
Index: tree-profile.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-profile.c,v
retrieving revision 2.7
diff -u -3 -p -r2.7 tree-profile.c
--- tree-profile.c 28 Oct 2004 16:19:26 -0000 2.7
+++ tree-profile.c 26 Feb 2005 20:31:38 -0000
@@ -87,11 +87,11 @@ tree_gen_edge_profiler (int edgeno, edge
tree tmp1 = create_tmp_var (GCOV_TYPE_NODE, "PROF");
tree tmp2 = create_tmp_var (GCOV_TYPE_NODE, "PROF");
tree ref = tree_coverage_counter_ref (GCOV_COUNTER_ARCS, edgeno);
- tree stmt1 = build (MODIFY_EXPR, GCOV_TYPE_NODE, tmp1, ref);
- tree stmt2 = build (MODIFY_EXPR, GCOV_TYPE_NODE, tmp2,
- build (PLUS_EXPR, GCOV_TYPE_NODE,
- tmp1, integer_one_node));
- tree stmt3 = build (MODIFY_EXPR, GCOV_TYPE_NODE, ref, tmp2);
+ tree stmt1 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, tmp1, ref);
+ tree stmt2 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, tmp2,
+ build2 (PLUS_EXPR, GCOV_TYPE_NODE,
+ tmp1, integer_one_node));
+ tree stmt3 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, ref, tmp2);
bsi_insert_on_edge (e, stmt1);
bsi_insert_on_edge (e, stmt2);
bsi_insert_on_edge (e, stmt3);
Index: tree-scalar-evolution.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-scalar-evolution.c,v
retrieving revision 2.17
diff -u -3 -p -r2.17 tree-scalar-evolution.c
--- tree-scalar-evolution.c 17 Feb 2005 16:19:42 -0000 2.17
+++ tree-scalar-evolution.c 26 Feb 2005 20:31:39 -0000
@@ -2079,8 +2079,8 @@ instantiate_parameters_1 (struct loop *l
&& op2 == TREE_OPERAND (chrec, 2))
return chrec;
- return fold (build (TREE_CODE (chrec),
- TREE_TYPE (chrec), op0, op1, op2));
+ return fold (build3 (TREE_CODE (chrec),
+ TREE_TYPE (chrec), op0, op1, op2));
case 2:
op0 = instantiate_parameters_1 (loop, TREE_OPERAND (chrec, 0),
@@ -2094,7 +2094,7 @@ instantiate_parameters_1 (struct loop *l
if (op0 == TREE_OPERAND (chrec, 0)
&& op1 == TREE_OPERAND (chrec, 1))
return chrec;
- return fold (build (TREE_CODE (chrec), TREE_TYPE (chrec), op0, op1));
+ return fold (build2 (TREE_CODE (chrec), TREE_TYPE (chrec), op0, op1));
case 1:
op0 = instantiate_parameters_1 (loop, TREE_OPERAND (chrec, 0),
Index: tree-sra.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-sra.c,v
retrieving revision 2.53
diff -u -3 -p -r2.53 tree-sra.c
--- tree-sra.c 25 Feb 2005 01:56:14 -0000 2.53
+++ tree-sra.c 26 Feb 2005 20:31:40 -0000
@@ -1464,17 +1464,17 @@ generate_one_element_ref (struct sra_elt
if (DECL_FIELD_CONTEXT (field) != TYPE_MAIN_VARIANT (TREE_TYPE (base)))
field = find_compatible_field (TREE_TYPE (base), field);
- return build (COMPONENT_REF, elt->type, base, field, NULL);
+ return build3 (COMPONENT_REF, elt->type, base, field, NULL);
}
case ARRAY_TYPE:
- return build (ARRAY_REF, elt->type, base, elt->element, NULL, NULL);
+ return build4 (ARRAY_REF, elt->type, base, elt->element, NULL, NULL);
case COMPLEX_TYPE:
if (elt->element == integer_zero_node)
- return build (REALPART_EXPR, elt->type, base);
+ return build1 (REALPART_EXPR, elt->type, base);
else
- return build (IMAGPART_EXPR, elt->type, base);
+ return build1 (IMAGPART_EXPR, elt->type, base);
default:
gcc_unreachable ();
@@ -1507,9 +1507,9 @@ generate_copy_inout (struct sra_elt *elt
if (elt->replacement)
{
if (copy_out)
- t = build (MODIFY_EXPR, void_type_node, elt->replacement, expr);
+ t = build2 (MODIFY_EXPR, void_type_node, elt->replacement, expr);
else
- t = build (MODIFY_EXPR, void_type_node, expr, elt->replacement);
+ t = build2 (MODIFY_EXPR, void_type_node, expr, elt->replacement);
append_to_statement_list (t, list_p);
}
else
@@ -1544,7 +1544,7 @@ generate_element_copy (struct sra_elt *d
gcc_assert (src->replacement);
- t = build (MODIFY_EXPR, void_type_node, dst->replacement,
+ t = build2 (MODIFY_EXPR, void_type_node, dst->replacement,
src->replacement);
append_to_statement_list (t, list_p);
}
@@ -1576,7 +1576,7 @@ generate_element_zero (struct sra_elt *e
gcc_assert (elt->is_scalar);
t = fold_convert (elt->type, integer_zero_node);
- t = build (MODIFY_EXPR, void_type_node, elt->replacement, t);
+ t = build2 (MODIFY_EXPR, void_type_node, elt->replacement, t);
append_to_statement_list (t, list_p);
}
}
@@ -1588,7 +1588,7 @@ static void
generate_one_element_init (tree var, tree init, tree *list_p)
{
/* The replacement can be almost arbitrarily complex. Gimplify. */
- tree stmt = build (MODIFY_EXPR, void_type_node, var, init);
+ tree stmt = build2 (MODIFY_EXPR, void_type_node, var, init);
gimplify_and_add (stmt, list_p);
}
Index: tree-ssa-ccp.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-ccp.c,v
retrieving revision 2.58
diff -u -3 -p -r2.58 tree-ssa-ccp.c
--- tree-ssa-ccp.c 24 Feb 2005 18:58:04 -0000 2.58
+++ tree-ssa-ccp.c 26 Feb 2005 20:31:41 -0000
@@ -923,7 +923,7 @@ ccp_fold (tree stmt)
if (! retval
&& is_gimple_min_invariant (op0)
&& is_gimple_min_invariant (op1))
- return build (code, TREE_TYPE (rhs), op0, op1);
+ return build2 (code, TREE_TYPE (rhs), op0, op1);
}
/* We may be able to fold away calls to builtin functions if their
@@ -1399,9 +1399,9 @@ maybe_fold_offset_to_array_ref (tree bas
if (!integer_zerop (elt_offset))
idx = int_const_binop (PLUS_EXPR, idx, elt_offset, 0);
- return build (ARRAY_REF, orig_type, base, idx, min_idx,
- size_int (tree_low_cst (elt_size, 1)
- / (TYPE_ALIGN_UNIT (elt_type))));
+ return build4 (ARRAY_REF, orig_type, base, idx, min_idx,
+ size_int (tree_low_cst (elt_size, 1)
+ / (TYPE_ALIGN_UNIT (elt_type))));
}
@@ -1462,7 +1462,7 @@ maybe_fold_offset_to_component_ref (tree
{
if (base_is_ptr)
base = build1 (INDIRECT_REF, record_type, base);
- t = build (COMPONENT_REF, field_type, base, f, NULL_TREE);
+ t = build3 (COMPONENT_REF, field_type, base, f, NULL_TREE);
return t;
}
@@ -1502,7 +1502,7 @@ maybe_fold_offset_to_component_ref (tree
nonzero offset into them. Recurse and hope for a valid match. */
if (base_is_ptr)
base = build1 (INDIRECT_REF, record_type, base);
- base = build (COMPONENT_REF, field_type, base, f, NULL_TREE);
+ base = build3 (COMPONENT_REF, field_type, base, f, NULL_TREE);
t = maybe_fold_offset_to_array_ref (base, offset, orig_type);
if (t)
Index: tree-ssa-forwprop.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-forwprop.c,v
retrieving revision 2.11
diff -u -3 -p -r2.11 tree-ssa-forwprop.c
--- tree-ssa-forwprop.c 17 Feb 2005 22:41:32 -0000 2.11
+++ tree-ssa-forwprop.c 26 Feb 2005 20:31:41 -0000
@@ -390,7 +390,7 @@ substitute_single_use_vars (varray_type
if (!is_gimple_val (t))
continue;
- new_cond = build (cond_code, boolean_type_node, op0, t);
+ new_cond = build2 (cond_code, boolean_type_node, op0, t);
}
/* If the variable is defined by a conditional expression... */
else if (TREE_CODE_CLASS (def_rhs_code) == tcc_comparison)
@@ -399,7 +399,7 @@ substitute_single_use_vars (varray_type
tree op0 = TREE_OPERAND (def_rhs, 0);
tree op1 = TREE_OPERAND (def_rhs, 1);
- new_cond = build (def_rhs_code, boolean_type_node, op0, op1);
+ new_cond = build2 (def_rhs_code, boolean_type_node, op0, op1);
/* Invert the conditional if necessary. */
if ((cond_code == EQ_EXPR
Index: tree-ssa-loop-im.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-loop-im.c,v
retrieving revision 2.28
diff -u -3 -p -r2.28 tree-ssa-loop-im.c
--- tree-ssa-loop-im.c 19 Feb 2005 09:25:59 -0000 2.28
+++ tree-ssa-loop-im.c 26 Feb 2005 20:31:41 -0000
@@ -1124,7 +1124,7 @@ schedule_sm (struct loop *loop, edge *ex
LIM_DATA (aref->stmt)->sm_done = true;
/* Emit the load & stores. */
- load = build (MODIFY_EXPR, void_type_node, tmp_var, ref);
+ load = build2 (MODIFY_EXPR, void_type_node, tmp_var, ref);
get_stmt_ann (load)->common.aux = xcalloc (1, sizeof (struct lim_aux_data));
LIM_DATA (load)->max_loop = loop;
LIM_DATA (load)->tgt_loop = loop;
@@ -1135,8 +1135,8 @@ schedule_sm (struct loop *loop, edge *ex
for (i = 0; i < n_exits; i++)
{
- store = build (MODIFY_EXPR, void_type_node,
- unshare_expr (ref), tmp_var);
+ store = build2 (MODIFY_EXPR, void_type_node,
+ unshare_expr (ref), tmp_var);
bsi_insert_on_edge (exits[i], store);
}
}
Index: tree-ssa-loop-ivopts.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-loop-ivopts.c,v
retrieving revision 2.50
diff -u -3 -p -r2.50 tree-ssa-loop-ivopts.c
--- tree-ssa-loop-ivopts.c 25 Feb 2005 12:07:11 -0000 2.50
+++ tree-ssa-loop-ivopts.c 26 Feb 2005 20:31:43 -0000
@@ -786,7 +786,7 @@ determine_base_object (tree expr)
? op1
: fold (build1 (NEGATE_EXPR, ptr_type_node, op1)));
- return fold (build (code, ptr_type_node, op0, op1));
+ return fold (build2 (code, ptr_type_node, op0, op1));
case NOP_EXPR:
case CONVERT_EXPR:
Index: tree-ssa-phiopt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-phiopt.c,v
retrieving revision 2.20
diff -u -3 -p -r2.20 tree-ssa-phiopt.c
--- tree-ssa-phiopt.c 27 Nov 2004 17:26:16 -0000 2.20
+++ tree-ssa-phiopt.c 26 Feb 2005 20:31:43 -0000
@@ -335,11 +335,11 @@ conditional_replacement (basic_block bb,
if (!COMPARISON_CLASS_P (old_result))
return false;
- new1 = build (TREE_CODE (old_result), TREE_TYPE (old_result),
- TREE_OPERAND (old_result, 0),
- TREE_OPERAND (old_result, 1));
+ new1 = build2 (TREE_CODE (old_result), TREE_TYPE (old_result),
+ TREE_OPERAND (old_result, 0),
+ TREE_OPERAND (old_result, 1));
- new1 = build (MODIFY_EXPR, TREE_TYPE (old_result), new_var, new1);
+ new1 = build2 (MODIFY_EXPR, TREE_TYPE (old_result), new_var, new1);
bsi_insert_after (&bsi, new1, BSI_NEW_STMT);
}
@@ -365,7 +365,7 @@ conditional_replacement (basic_block bb,
|| (PHI_ARG_EDGE (phi, 1) == true_edge && integer_onep (arg1))
|| (PHI_ARG_EDGE (phi, 1) == false_edge && integer_zerop (arg1)))
{
- new = build (MODIFY_EXPR, TREE_TYPE (PHI_RESULT (phi)),
+ new = build2 (MODIFY_EXPR, TREE_TYPE (PHI_RESULT (phi)),
PHI_RESULT (phi), cond);
}
else
@@ -385,7 +385,7 @@ conditional_replacement (basic_block bb,
{
tree temp = TREE_OPERAND (cond, 0);
tree new_var_1 = make_rename_temp (TREE_TYPE (temp), NULL);
- new = build (MODIFY_EXPR, TREE_TYPE (new_var_1), new_var_1, temp);
+ new = build2 (MODIFY_EXPR, TREE_TYPE (new_var_1), new_var_1, temp);
bsi_insert_after (&bsi, new, BSI_NEW_STMT);
cond = fold_convert (TREE_TYPE (result), new_var_1);
}
@@ -394,7 +394,7 @@ conditional_replacement (basic_block bb,
&& !is_gimple_val (TREE_OPERAND (cond, 0)))
return false;
- new = build (MODIFY_EXPR, TREE_TYPE (PHI_RESULT (phi)),
+ new = build2 (MODIFY_EXPR, TREE_TYPE (PHI_RESULT (phi)),
PHI_RESULT (phi), cond);
}
@@ -478,7 +478,7 @@ value_replacement (basic_block bb, tree
arg = arg1;
/* Build the new assignment. */
- new = build (MODIFY_EXPR, TREE_TYPE (result), result, arg);
+ new = build2 (MODIFY_EXPR, TREE_TYPE (result), result, arg);
replace_phi_with_stmt (bsi_after_labels (bb), bb, cond_block, phi, new);
@@ -613,8 +613,8 @@ abs_replacement (basic_block bb, tree ph
lhs = result;
/* Build the modify expression with abs expression. */
- new = build (MODIFY_EXPR, TREE_TYPE (lhs),
- lhs, build1 (ABS_EXPR, TREE_TYPE (lhs), rhs));
+ new = build2 (MODIFY_EXPR, TREE_TYPE (lhs),
+ lhs, build1 (ABS_EXPR, TREE_TYPE (lhs), rhs));
replace_phi_with_stmt (bsi_after_labels (bb), bb, cond_block, phi, new);
@@ -626,8 +626,8 @@ abs_replacement (basic_block bb, tree ph
in the block. */
bsi = bsi_start (bb);
bsi_next (&bsi);
- new = build (MODIFY_EXPR, TREE_TYPE (result),
- result, build1 (NEGATE_EXPR, TREE_TYPE (lhs), lhs));
+ new = build2 (MODIFY_EXPR, TREE_TYPE (result),
+ result, build1 (NEGATE_EXPR, TREE_TYPE (lhs), lhs));
bsi_insert_after (&bsi, new, BSI_NEW_STMT);
Index: tree-ssa-pre.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-pre.c,v
retrieving revision 2.65
diff -u -3 -p -r2.65 tree-ssa-pre.c
--- tree-ssa-pre.c 17 Feb 2005 16:19:46 -0000 2.65
+++ tree-ssa-pre.c 26 Feb 2005 20:31:44 -0000
@@ -1325,10 +1325,10 @@ create_expression_by_pieces (basic_block
genop2 = find_or_generate_expression (block, op2, stmts);
temp = create_tmp_var (TREE_TYPE (expr), "pretmp");
add_referenced_tmp_var (temp);
- newexpr = fold (build (TREE_CODE (expr), TREE_TYPE (expr),
- genop1, genop2));
- newexpr = build (MODIFY_EXPR, TREE_TYPE (expr),
- temp, newexpr);
+ newexpr = fold (build2 (TREE_CODE (expr), TREE_TYPE (expr),
+ genop1, genop2));
+ newexpr = build2 (MODIFY_EXPR, TREE_TYPE (expr),
+ temp, newexpr);
NECESSARY (newexpr) = 0;
name = make_ssa_name (temp, newexpr);
TREE_OPERAND (newexpr, 0) = name;
@@ -1347,10 +1347,10 @@ create_expression_by_pieces (basic_block
genop1 = find_or_generate_expression (block, op1, stmts);
temp = create_tmp_var (TREE_TYPE (expr), "pretmp");
add_referenced_tmp_var (temp);
- newexpr = fold (build (TREE_CODE (expr), TREE_TYPE (expr),
- genop1));
- newexpr = build (MODIFY_EXPR, TREE_TYPE (expr),
- temp, newexpr);
+ newexpr = fold (build1 (TREE_CODE (expr), TREE_TYPE (expr),
+ genop1));
+ newexpr = build2 (MODIFY_EXPR, TREE_TYPE (expr),
+ temp, newexpr);
name = make_ssa_name (temp, newexpr);
TREE_OPERAND (newexpr, 0) = name;
NECESSARY (newexpr) = 0;
Index: tree-tailcall.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-tailcall.c,v
retrieving revision 2.36
diff -u -3 -p -r2.36 tree-tailcall.c
--- tree-tailcall.c 27 Jan 2005 18:22:23 -0000 2.36
+++ tree-tailcall.c 26 Feb 2005 20:31:44 -0000
@@ -561,8 +561,8 @@ adjust_accumulator_values (block_stmt_it
var = m_acc;
else
{
- stmt = build (MODIFY_EXPR, ret_type, NULL_TREE,
- build (MULT_EXPR, ret_type, m_acc, a));
+ stmt = build2 (MODIFY_EXPR, ret_type, NULL_TREE,
+ build2 (MULT_EXPR, ret_type, m_acc, a));
tmp = create_tmp_var (ret_type, "acc_tmp");
add_referenced_tmp_var (tmp);
@@ -575,8 +575,8 @@ adjust_accumulator_values (block_stmt_it
else
var = a;
- stmt = build (MODIFY_EXPR, ret_type, NULL_TREE,
- build (PLUS_EXPR, ret_type, a_acc, var));
+ stmt = build2 (MODIFY_EXPR, ret_type, NULL_TREE,
+ build2 (PLUS_EXPR, ret_type, a_acc, var));
var = make_ssa_name (SSA_NAME_VAR (a_acc), stmt);
TREE_OPERAND (stmt, 0) = var;
bsi_insert_after (&bsi, stmt, BSI_NEW_STMT);
@@ -585,8 +585,8 @@ adjust_accumulator_values (block_stmt_it
if (m)
{
- stmt = build (MODIFY_EXPR, ret_type, NULL_TREE,
- build (MULT_EXPR, ret_type, m_acc, m));
+ stmt = build2 (MODIFY_EXPR, ret_type, NULL_TREE,
+ build2 (MULT_EXPR, ret_type, m_acc, m));
var = make_ssa_name (SSA_NAME_VAR (m_acc), stmt);
TREE_OPERAND (stmt, 0) = var;
bsi_insert_after (&bsi, stmt, BSI_NEW_STMT);
@@ -640,8 +640,8 @@ adjust_return_value (basic_block bb, tre
if (m)
{
- stmt = build (MODIFY_EXPR, ret_type, NULL_TREE,
- build (MULT_EXPR, ret_type, m_acc, ret_var));
+ stmt = build2 (MODIFY_EXPR, ret_type, NULL_TREE,
+ build2 (MULT_EXPR, ret_type, m_acc, ret_var));
tmp = create_tmp_var (ret_type, "acc_tmp");
add_referenced_tmp_var (tmp);
@@ -655,8 +655,8 @@ adjust_return_value (basic_block bb, tre
if (a)
{
- stmt = build (MODIFY_EXPR, ret_type, NULL_TREE,
- build (PLUS_EXPR, ret_type, a_acc, var));
+ stmt = build2 (MODIFY_EXPR, ret_type, NULL_TREE,
+ build2 (PLUS_EXPR, ret_type, a_acc, var));
tmp = create_tmp_var (ret_type, "acc_tmp");
add_referenced_tmp_var (tmp);