Commit 59ce6d6b by Roger Sayle Committed by Roger Sayle

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
parent 8754a0f6
2004-05-20 Roger Sayle <roger@eyesopen.com>
* 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.
2004-05-20 Paul Brook <paul@codesourcery.com> 2004-05-20 Paul Brook <paul@codesourcery.com>
* unwind-dw2-fde.c (get_cie_encoding): Handle dwarf3 CIE format. * unwind-dw2-fde.c (get_cie_encoding): Handle dwarf3 CIE format.
......
...@@ -1260,7 +1260,7 @@ array_type_nelts (tree type) ...@@ -1260,7 +1260,7 @@ array_type_nelts (tree type)
return (integer_zerop (min) return (integer_zerop (min)
? max ? 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 /* Return nonzero if arg is static -- a reference to an object in
...@@ -1383,7 +1383,8 @@ save_expr (tree expr) ...@@ -1383,7 +1383,8 @@ save_expr (tree expr)
if (contains_placeholder_p (inner)) if (contains_placeholder_p (inner))
return t; 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 /* 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 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) ...@@ -1938,7 +1939,7 @@ substitute_in_expr (tree exp, tree f, tree r)
if (op0 == TREE_OPERAND (exp, 0)) if (op0 == TREE_OPERAND (exp, 0))
return exp; 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 else
switch (TREE_CODE_CLASS (code)) switch (TREE_CODE_CLASS (code))
...@@ -4458,8 +4459,8 @@ get_unwidened (tree op, tree for_type) ...@@ -4458,8 +4459,8 @@ get_unwidened (tree op, tree for_type)
&& (for_type || ! DECL_BIT_FIELD (TREE_OPERAND (op, 1))) && (for_type || ! DECL_BIT_FIELD (TREE_OPERAND (op, 1)))
&& (! uns || final_prec <= innerprec || unsignedp)) && (! uns || final_prec <= innerprec || unsignedp))
{ {
win = build (COMPONENT_REF, type, TREE_OPERAND (op, 0), win = build2 (COMPONENT_REF, type, TREE_OPERAND (op, 0),
TREE_OPERAND (op, 1)); TREE_OPERAND (op, 1));
TREE_SIDE_EFFECTS (win) = TREE_SIDE_EFFECTS (op); TREE_SIDE_EFFECTS (win) = TREE_SIDE_EFFECTS (op);
TREE_THIS_VOLATILE (win) = TREE_THIS_VOLATILE (op); TREE_THIS_VOLATILE (win) = TREE_THIS_VOLATILE (op);
} }
...@@ -4547,8 +4548,8 @@ get_narrower (tree op, int *unsignedp_ptr) ...@@ -4547,8 +4548,8 @@ get_narrower (tree op, int *unsignedp_ptr)
{ {
if (first) if (first)
uns = DECL_UNSIGNED (TREE_OPERAND (op, 1)); uns = DECL_UNSIGNED (TREE_OPERAND (op, 1));
win = build (COMPONENT_REF, type, TREE_OPERAND (op, 0), win = build2 (COMPONENT_REF, type, TREE_OPERAND (op, 0),
TREE_OPERAND (op, 1)); TREE_OPERAND (op, 1));
TREE_SIDE_EFFECTS (win) = TREE_SIDE_EFFECTS (op); TREE_SIDE_EFFECTS (win) = TREE_SIDE_EFFECTS (op);
TREE_THIS_VOLATILE (win) = TREE_THIS_VOLATILE (op); TREE_THIS_VOLATILE (win) = TREE_THIS_VOLATILE (op);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment