aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2004-05-21 00:54:35 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2004-05-21 00:54:35 +0000
commit59ce6d6beeaac84f468963740cc09f40eefc398f (patch)
treeb1c1405f852a8137696a61832bb98c461a7aa0a7 /gcc/tree.c
parent8754a0f6a09ab97feffc72de50d1bc462fcc7ec2 (diff)
downloadgcc-59ce6d6beeaac84f468963740cc09f40eefc398f.zip
gcc-59ce6d6beeaac84f468963740cc09f40eefc398f.tar.gz
gcc-59ce6d6beeaac84f468963740cc09f40eefc398f.tar.bz2
tree.c (array_type_nelts, [...]): Replace build with build2.
* tree.c (array_type_nelts, save_expr, substitute_in_expr, get_unwidened, get_narrower): Replace build with build2. * fold-const.c (negate_expr, associate_trees, size_binop, fold_convert, eval_subst, omit_one_operand, invert_truthvalue, pedantic_omit_one_operand, distribute_bit_expr, make_bit_field_ref, optimize_bit_field_compare, decode_field_reference, range_binop, make_range, build_range_check, fold_range_test, fold_truthop, optimize_minmax_comparison, extract_muldiv_1, fold_binary_op_with_conditional_arg, fold_mathfn_compare, fold_inf_compare, fold_single_bit_test, fold, fold_relational_hi_lo, nondestructive_fold_binary_to_constant): Likewise replace build with either build2 or build3. From-SVN: r82083
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 2d1513c..f8b6779 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -1260,7 +1260,7 @@ array_type_nelts (tree type)
return (integer_zerop (min)
? max
- : fold (build (MINUS_EXPR, TREE_TYPE (max), max, min)));
+ : fold (build2 (MINUS_EXPR, TREE_TYPE (max), max, min)));
}
/* Return nonzero if arg is static -- a reference to an object in
@@ -1383,7 +1383,8 @@ save_expr (tree expr)
if (contains_placeholder_p (inner))
return t;
- t = build (SAVE_EXPR, TREE_TYPE (expr), t, current_function_decl, NULL_TREE);
+ t = build3 (SAVE_EXPR, TREE_TYPE (expr), t, current_function_decl,
+ NULL_TREE);
/* This expression might be placed ahead of a jump to ensure that the
value was computed on both sides of the jump. So make sure it isn't
@@ -1938,7 +1939,7 @@ substitute_in_expr (tree exp, tree f, tree r)
if (op0 == TREE_OPERAND (exp, 0))
return exp;
- new = fold (build (code, TREE_TYPE (exp), op0, TREE_OPERAND (exp, 1)));
+ new = fold (build2 (code, TREE_TYPE (exp), op0, TREE_OPERAND (exp, 1)));
}
else
switch (TREE_CODE_CLASS (code))
@@ -4458,8 +4459,8 @@ get_unwidened (tree op, tree for_type)
&& (for_type || ! DECL_BIT_FIELD (TREE_OPERAND (op, 1)))
&& (! uns || final_prec <= innerprec || unsignedp))
{
- win = build (COMPONENT_REF, type, TREE_OPERAND (op, 0),
- TREE_OPERAND (op, 1));
+ win = build2 (COMPONENT_REF, type, TREE_OPERAND (op, 0),
+ TREE_OPERAND (op, 1));
TREE_SIDE_EFFECTS (win) = TREE_SIDE_EFFECTS (op);
TREE_THIS_VOLATILE (win) = TREE_THIS_VOLATILE (op);
}
@@ -4547,8 +4548,8 @@ get_narrower (tree op, int *unsignedp_ptr)
{
if (first)
uns = DECL_UNSIGNED (TREE_OPERAND (op, 1));
- win = build (COMPONENT_REF, type, TREE_OPERAND (op, 0),
- TREE_OPERAND (op, 1));
+ win = build2 (COMPONENT_REF, type, TREE_OPERAND (op, 0),
+ TREE_OPERAND (op, 1));
TREE_SIDE_EFFECTS (win) = TREE_SIDE_EFFECTS (op);
TREE_THIS_VOLATILE (win) = TREE_THIS_VOLATILE (op);
}