* cfg.c, tree-vect-transform.c, tree.def: Fix comment typos.
* doc/invoke.texi: Fix typos.
+ * builtins.c, c-common.c, c-convert.c, c-decl.c, c-typeck.c,
+ convert.c, lambda-code.c, predict.c, tree-cfg.c,
+ tree-complex.c, tree-data-ref.c, tree-if-conv.c,
+ tree-mudflap.c, tree-scalar-evolution.c, tree-ssa-ccp.c,
+ tree-ssa-loop-ivcanon.c, tree-ssa-loop-ivopts.c,
+ tree-ssa-loop-manip.c, tree-ssa-phiopt.c, tree-ssa-pre.c,
+ tree-vect-analyze.c, tree-vect-transform.c, tree-vectorizer.c,
+ tree.c: Use fold_buildN instead of fold (buildN (...)).
+
2005-06-26 Gerald Pfeifer <gerald@pfeifer.com>
* doc/install.texi (Specific): Do not specify the concrete
&c, dest_align))
return 0;
- val = fold (build1 (CONVERT_EXPR, unsigned_char_type_node, val));
+ val = fold_build1 (CONVERT_EXPR, unsigned_char_type_node, val);
val_rtx = expand_expr (val, NULL_RTX, VOIDmode, 0);
val_rtx = force_reg (TYPE_MODE (unsigned_char_type_node),
val_rtx);
return 0;
/* The actual new length parameter is MIN(len,arg3). */
- len = fold (build2 (MIN_EXPR, TREE_TYPE (len), len,
- fold_convert (TREE_TYPE (len), arg3)));
+ len = fold_build2 (MIN_EXPR, TREE_TYPE (len), len,
+ fold_convert (TREE_TYPE (len), arg3));
/* If we don't have POINTER_TYPE, call the function. */
if (arg1_align == 0 || arg2_align == 0)
dst)));
/* Create (dst + (cast) strlen (dst)). */
newdst = fold_convert (TREE_TYPE (dst), newdst);
- newdst = fold (build2 (PLUS_EXPR, TREE_TYPE (dst), dst, newdst));
+ newdst = fold_build2 (PLUS_EXPR, TREE_TYPE (dst), dst, newdst);
/* Prepend the new dst argument. */
arglist = tree_cons (NULL_TREE, newdst, arglist);
return valist;
pt = build_pointer_type (va_list_type_node);
- valist = fold (build1 (ADDR_EXPR, pt, valist));
+ valist = fold_build1 (ADDR_EXPR, pt, valist);
TREE_SIDE_EFFECTS (valist) = 1;
}
if (PAD_VARARGS_DOWN && !integer_zerop (rounded_size))
{
/* Small args are padded downward. */
- t = fold (build2 (GT_EXPR, sizetype, rounded_size, size_int (align)));
- t = fold (build3 (COND_EXPR, sizetype, t, size_zero_node,
- size_binop (MINUS_EXPR, rounded_size, type_size)));
+ t = fold_build2 (GT_EXPR, sizetype, rounded_size, size_int (align));
+ t = fold_build3 (COND_EXPR, sizetype, t, size_zero_node,
+ size_binop (MINUS_EXPR, rounded_size, type_size));
t = fold_convert (TREE_TYPE (addr), t);
- addr = fold (build2 (PLUS_EXPR, TREE_TYPE (addr), addr, t));
+ addr = fold_build2 (PLUS_EXPR, TREE_TYPE (addr), addr, t);
}
/* Compute new value for AP. */
if (fmt->has_signed_zero && HONOR_SIGNED_ZEROS (fmode))
return 0;
- arg = fold (build2 (LT_EXPR, TREE_TYPE (exp), arg,
- build_real (TREE_TYPE (arg), dconst0)));
+ arg = fold_build2 (LT_EXPR, TREE_TYPE (exp), arg,
+ build_real (TREE_TYPE (arg), dconst0));
return expand_expr (arg, target, VOIDmode, EXPAND_NORMAL);
}
/* If argument is already integer valued, and we don't need to worry
about setting errno, there's no need to perform rounding. */
if (! flag_errno_math && integer_valued_real_p (arg))
- return fold (build1 (FIX_TRUNC_EXPR, TREE_TYPE (TREE_TYPE (fndecl)), arg));
+ return fold_build1 (FIX_TRUNC_EXPR, TREE_TYPE (TREE_TYPE (fndecl)), arg);
if (optimize)
{
/* If either part is zero, cabs is fabs of the other. */
if (TREE_CODE (arg) == COMPLEX_EXPR
&& real_zerop (TREE_OPERAND (arg, 0)))
- return fold (build1 (ABS_EXPR, type, TREE_OPERAND (arg, 1)));
+ return fold_build1 (ABS_EXPR, type, TREE_OPERAND (arg, 1));
if (TREE_CODE (arg) == COMPLEX_EXPR
&& real_zerop (TREE_OPERAND (arg, 1)))
- return fold (build1 (ABS_EXPR, type, TREE_OPERAND (arg, 0)));
+ return fold_build1 (ABS_EXPR, type, TREE_OPERAND (arg, 0));
/* Don't do this when optimizing for size. */
if (flag_unsafe_math_optimizations
arg = builtin_save_expr (arg);
- rpart = fold (build1 (REALPART_EXPR, type, arg));
- ipart = fold (build1 (IMAGPART_EXPR, type, arg));
+ rpart = fold_build1 (REALPART_EXPR, type, arg);
+ ipart = fold_build1 (IMAGPART_EXPR, type, arg);
rpart = builtin_save_expr (rpart);
ipart = builtin_save_expr (ipart);
- result = fold (build2 (PLUS_EXPR, type,
- fold (build2 (MULT_EXPR, type,
- rpart, rpart)),
- fold (build2 (MULT_EXPR, type,
- ipart, ipart))));
+ result = fold_build2 (PLUS_EXPR, type,
+ fold_build2 (MULT_EXPR, type,
+ rpart, rpart),
+ fold_build2 (MULT_EXPR, type,
+ ipart, ipart));
arglist = build_tree_list (NULL_TREE, result);
return build_function_call_expr (sqrtfn, arglist);
if (flag_unsafe_math_optimizations && BUILTIN_EXPONENT_P (fcode))
{
tree expfn = TREE_OPERAND (TREE_OPERAND (arg, 0), 0);
- arg = fold (build2 (MULT_EXPR, type,
- TREE_VALUE (TREE_OPERAND (arg, 1)),
- build_real (type, dconsthalf)));
+ arg = fold_build2 (MULT_EXPR, type,
+ TREE_VALUE (TREE_OPERAND (arg, 1)),
+ build_real (type, dconsthalf));
arglist = build_tree_list (NULL_TREE, arg);
return build_function_call_expr (expfn, arglist);
}
tree narg1;
if (!tree_expr_nonnegative_p (arg0))
arg0 = build1 (ABS_EXPR, type, arg0);
- narg1 = fold (build2 (MULT_EXPR, type, arg1,
- build_real (type, dconsthalf)));
+ narg1 = fold_build2 (MULT_EXPR, type, arg1,
+ build_real (type, dconsthalf));
arglist = tree_cons (NULL_TREE, arg0,
build_tree_list (NULL_TREE, narg1));
return build_function_call_expr (powfn, arglist);
tree expfn = TREE_OPERAND (TREE_OPERAND (arg, 0), 0);
const REAL_VALUE_TYPE third_trunc =
real_value_truncate (TYPE_MODE (type), dconstthird);
- arg = fold (build2 (MULT_EXPR, type,
- TREE_VALUE (TREE_OPERAND (arg, 1)),
- build_real (type, third_trunc)));
+ arg = fold_build2 (MULT_EXPR, type,
+ TREE_VALUE (TREE_OPERAND (arg, 1)),
+ build_real (type, third_trunc));
arglist = build_tree_list (NULL_TREE, arg);
return build_function_call_expr (expfn, arglist);
}
tree powfn = TREE_OPERAND (TREE_OPERAND (arg, 0), 0);
const REAL_VALUE_TYPE dconstroot
= real_value_truncate (TYPE_MODE (type), dconstthird);
- tree narg01 = fold (build2 (MULT_EXPR, type, arg01,
- build_real (type, dconstroot)));
+ tree narg01 = fold_build2 (MULT_EXPR, type, arg01,
+ build_real (type, dconstroot));
arglist = tree_cons (NULL_TREE, arg00,
build_tree_list (NULL_TREE, narg01));
return build_function_call_expr (powfn, arglist);
tree logfn;
arglist = build_tree_list (NULL_TREE, x);
logfn = build_function_call_expr (fndecl, arglist);
- return fold (build2 (MULT_EXPR, type, exponent, logfn));
+ return fold_build2 (MULT_EXPR, type, exponent, logfn);
}
}
}
/* Optimize pow(x,-1.0) = 1.0/x. */
if (REAL_VALUES_EQUAL (c, dconstm1))
- return fold (build2 (RDIV_EXPR, type,
- build_real (type, dconst1), arg0));
+ return fold_build2 (RDIV_EXPR, type,
+ build_real (type, dconst1), arg0);
/* Optimize pow(x,0.5) = sqrt(x). */
if (flag_unsafe_math_optimizations
{
tree expfn = TREE_OPERAND (TREE_OPERAND (arg0, 0), 0);
tree arg = TREE_VALUE (TREE_OPERAND (arg0, 1));
- arg = fold (build2 (MULT_EXPR, type, arg, arg1));
+ arg = fold_build2 (MULT_EXPR, type, arg, arg1);
arglist = build_tree_list (NULL_TREE, arg);
return build_function_call_expr (expfn, arglist);
}
if (BUILTIN_SQRT_P (fcode))
{
tree narg0 = TREE_VALUE (TREE_OPERAND (arg0, 1));
- tree narg1 = fold (build2 (MULT_EXPR, type, arg1,
- build_real (type, dconsthalf)));
+ tree narg1 = fold_build2 (MULT_EXPR, type, arg1,
+ build_real (type, dconsthalf));
arglist = tree_cons (NULL_TREE, narg0,
build_tree_list (NULL_TREE, narg1));
{
const REAL_VALUE_TYPE dconstroot
= real_value_truncate (TYPE_MODE (type), dconstthird);
- tree narg1 = fold (build2 (MULT_EXPR, type, arg1,
- build_real (type, dconstroot)));
+ tree narg1 = fold_build2 (MULT_EXPR, type, arg1,
+ build_real (type, dconstroot));
arglist = tree_cons (NULL_TREE, arg,
build_tree_list (NULL_TREE, narg1));
return build_function_call_expr (fndecl, arglist);
{
tree arg00 = TREE_VALUE (TREE_OPERAND (arg0, 1));
tree arg01 = TREE_VALUE (TREE_CHAIN (TREE_OPERAND (arg0, 1)));
- tree narg1 = fold (build2 (MULT_EXPR, type, arg01, arg1));
+ tree narg1 = fold_build2 (MULT_EXPR, type, arg01, arg1);
arglist = tree_cons (NULL_TREE, arg00,
build_tree_list (NULL_TREE, narg1));
return build_function_call_expr (fndecl, arglist);
/* Optimize pow(x,-1) = 1.0/x. */
if (c == -1)
- return fold (build2 (RDIV_EXPR, type,
- build_real (type, dconst1), arg0));
+ return fold_build2 (RDIV_EXPR, type,
+ build_real (type, dconst1), arg0);
}
return NULL_TREE;
return omit_one_operand (type, dest, len);
if (endp == 2)
- len = fold (build2 (MINUS_EXPR, TREE_TYPE (len), len,
- ssize_int (1)));
+ len = fold_build2 (MINUS_EXPR, TREE_TYPE (len), len,
+ ssize_int (1));
len = fold_convert (TREE_TYPE (dest), len);
- len = fold (build2 (PLUS_EXPR, TREE_TYPE (dest), dest, len));
+ len = fold_build2 (PLUS_EXPR, TREE_TYPE (dest), dest, len);
return fold_convert (type, len);
}
}
build1 (INDIRECT_REF, cst_uchar_node,
fold_convert (cst_uchar_ptr_node,
arg2)));
- return fold (build2 (MINUS_EXPR, integer_type_node, ind1, ind2));
+ return fold_build2 (MINUS_EXPR, integer_type_node, ind1, ind2);
}
return 0;
build1 (INDIRECT_REF, cst_uchar_node,
fold_convert (cst_uchar_ptr_node,
arg2)));
- return fold (build1 (NEGATE_EXPR, integer_type_node, temp));
+ return fold_build1 (NEGATE_EXPR, integer_type_node, temp);
}
return 0;
build1 (INDIRECT_REF, cst_uchar_node,
fold_convert (cst_uchar_ptr_node,
arg2)));
- return fold (build1 (NEGATE_EXPR, integer_type_node, temp));
+ return fold_build1 (NEGATE_EXPR, integer_type_node, temp);
}
/* If len parameter is one, return an expression corresponding to
build1 (INDIRECT_REF, cst_uchar_node,
fold_convert (cst_uchar_ptr_node,
arg2)));
- return fold (build2 (MINUS_EXPR, integer_type_node, ind1, ind2));
+ return fold_build2 (MINUS_EXPR, integer_type_node, ind1, ind2);
}
return 0;
/* If ARG's format doesn't have signed zeros, return "arg < 0.0". */
if (!HONOR_SIGNED_ZEROS (TYPE_MODE (TREE_TYPE (arg))))
- return fold (build2 (LT_EXPR, type, arg,
- build_real (TREE_TYPE (arg), dconst0)));
+ return fold_build2 (LT_EXPR, type, arg,
+ build_real (TREE_TYPE (arg), dconst0));
return NULL_TREE;
}
Remember to evaluate Y for side-effects. */
if (tree_expr_nonnegative_p (arg2))
return omit_one_operand (type,
- fold (build1 (ABS_EXPR, type, arg1)),
+ fold_build1 (ABS_EXPR, type, arg1),
arg2);
/* Strip sign changing operations for the first argument. */
arg = build2 (BIT_AND_EXPR, integer_type_node, arg,
build_int_cst (NULL_TREE,
~ (unsigned HOST_WIDE_INT) 0x7f));
- arg = fold (build2 (EQ_EXPR, integer_type_node,
- arg, integer_zero_node));
+ arg = fold_build2 (EQ_EXPR, integer_type_node,
+ arg, integer_zero_node);
if (in_gimple_form && !TREE_CONSTANT (arg))
return NULL_TREE;
/* Transform toascii(c) -> (c & 0x7f). */
tree arg = TREE_VALUE (arglist);
- return fold (build2 (BIT_AND_EXPR, integer_type_node, arg,
- build_int_cst (NULL_TREE, 0x7f)));
+ return fold_build2 (BIT_AND_EXPR, integer_type_node, arg,
+ build_int_cst (NULL_TREE, 0x7f));
}
}
arg = fold_convert (type, arg);
if (TREE_CODE (arg) == REAL_CST)
return fold_abs_const (arg, type);
- return fold (build1 (ABS_EXPR, type, arg));
+ return fold_build1 (ABS_EXPR, type, arg);
}
/* Fold a call to abs, labs, llabs or imaxabs. */
arg = fold_convert (type, arg);
if (TREE_CODE (arg) == INTEGER_CST)
return fold_abs_const (arg, type);
- return fold (build1 (ABS_EXPR, type, arg));
+ return fold_build1 (ABS_EXPR, type, arg);
}
/* Fold a call to __builtin_isnan(), __builtin_isinf, __builtin_finite.
}
arg = builtin_save_expr (arg);
- return fold (build2 (UNORDERED_EXPR, type, arg, arg));
+ return fold_build2 (UNORDERED_EXPR, type, arg, arg);
default:
gcc_unreachable ();
{
if (!MODE_HAS_NANS (TYPE_MODE (TREE_TYPE (arg0))))
return omit_two_operands (type, integer_zero_node, arg0, arg1);
- return fold (build2 (UNORDERED_EXPR, type, arg0, arg1));
+ return fold_build2 (UNORDERED_EXPR, type, arg0, arg1);
}
code = MODE_HAS_NANS (TYPE_MODE (TREE_TYPE (arg0))) ? unordered_code
: ordered_code;
- return fold (build1 (TRUTH_NOT_EXPR, type,
- fold (build2 (code, type, arg0, arg1))));
+ return fold_build1 (TRUTH_NOT_EXPR, type,
+ fold_build2 (code, type, arg0, arg1));
}
/* Used by constant folding to simplify calls to builtin functions. EXP is
case BUILT_IN_CONJF:
case BUILT_IN_CONJL:
if (validate_arglist (arglist, COMPLEX_TYPE, VOID_TYPE))
- return fold (build1 (CONJ_EXPR, type, TREE_VALUE (arglist)));
+ return fold_build1 (CONJ_EXPR, type, TREE_VALUE (arglist));
break;
case BUILT_IN_CREAL:
case BUILT_IN_CREALF:
case BUILT_IN_CREALL:
if (validate_arglist (arglist, COMPLEX_TYPE, VOID_TYPE))
- return non_lvalue (fold (build1 (REALPART_EXPR, type,
- TREE_VALUE (arglist))));
+ return non_lvalue (fold_build1 (REALPART_EXPR, type,
+ TREE_VALUE (arglist)));
break;
case BUILT_IN_CIMAG:
case BUILT_IN_CIMAGF:
case BUILT_IN_CIMAGL:
if (validate_arglist (arglist, COMPLEX_TYPE, VOID_TYPE))
- return non_lvalue (fold (build1 (IMAGPART_EXPR, type,
- TREE_VALUE (arglist))));
+ return non_lvalue (fold_build1 (IMAGPART_EXPR, type,
+ TREE_VALUE (arglist)));
break;
case BUILT_IN_CABS:
return build_int_cst (TREE_TYPE (s1), 0);
/* Return an offset into the constant string argument. */
- tem = fold (build2 (PLUS_EXPR, TREE_TYPE (s1),
- s1, build_int_cst (TREE_TYPE (s1), r - p1)));
+ tem = fold_build2 (PLUS_EXPR, TREE_TYPE (s1),
+ s1, build_int_cst (TREE_TYPE (s1), r - p1));
return fold_convert (type, tem);
}
return build_int_cst (TREE_TYPE (s1), 0);
/* Return an offset into the constant string argument. */
- tem = fold (build2 (PLUS_EXPR, TREE_TYPE (s1),
- s1, build_int_cst (TREE_TYPE (s1), r - p1)));
+ tem = fold_build2 (PLUS_EXPR, TREE_TYPE (s1),
+ s1, build_int_cst (TREE_TYPE (s1), r - p1));
return fold_convert (type, tem);
}
return 0;
return build_int_cst (TREE_TYPE (s1), 0);
/* Return an offset into the constant string argument. */
- tem = fold (build2 (PLUS_EXPR, TREE_TYPE (s1),
- s1, build_int_cst (TREE_TYPE (s1), r - p1)));
+ tem = fold_build2 (PLUS_EXPR, TREE_TYPE (s1),
+ s1, build_int_cst (TREE_TYPE (s1), r - p1));
return fold_convert (type, tem);
}
return build_int_cst (TREE_TYPE (s1), 0);
/* Return an offset into the constant string argument. */
- tem = fold (build2 (PLUS_EXPR, TREE_TYPE (s1),
- s1, build_int_cst (TREE_TYPE (s1), r - p1)));
+ tem = fold_build2 (PLUS_EXPR, TREE_TYPE (s1),
+ s1, build_int_cst (TREE_TYPE (s1), r - p1));
return fold_convert (type, tem);
}
a bit-wise negation, so use that operation instead. */
if (tree_int_cst_sgn (value) < 0)
- value = fold (build1 (BIT_NOT_EXPR, TREE_TYPE (value), value));
+ value = fold_build1 (BIT_NOT_EXPR, TREE_TYPE (value), value);
/* Return the number of bits needed, taking into account the fact
that we need one more bit for a signed than unsigned type. */
convert (TREE_TYPE (intop), size_exp), 1));
/* Create the sum or difference. */
- return fold (build2 (resultcode, result_type, ptrop, intop));
+ return fold_build2 (resultcode, result_type, ptrop, intop);
}
\f
/* Prepare expr to be an argument of a TRUTH_NOT_EXPR,
case COND_EXPR:
/* Distribute the conversion into the arms of a COND_EXPR. */
- return fold (build3 (COND_EXPR, truthvalue_type_node,
+ return fold_build3 (COND_EXPR, truthvalue_type_node,
TREE_OPERAND (expr, 0),
c_common_truthvalue_conversion (TREE_OPERAND (expr, 1)),
- c_common_truthvalue_conversion (TREE_OPERAND (expr, 2))));
+ c_common_truthvalue_conversion (TREE_OPERAND (expr, 2)));
case CONVERT_EXPR:
/* Don't cancel the effect of a CONVERT_EXPR from a REFERENCE_TYPE,
TYPE_IS_SIZETYPE means that certain things (like overflow) will
never happen. However, this node should really have type
`size_t', which is just a typedef for an ordinary integer type. */
- value = fold (build1 (NOP_EXPR, size_type_node, value));
+ value = fold_build1 (NOP_EXPR, size_type_node, value);
gcc_assert (!TYPE_IS_SIZETYPE (TREE_TYPE (value)));
return value;
else
return c_alignof (TREE_TYPE (expr));
- return fold (build1 (NOP_EXPR, size_type_node, t));
+ return fold_build1 (NOP_EXPR, size_type_node, t);
}
\f
/* Handle C and C++ default attributes. */
if (TREE_CODE (t) == INTEGER_CST && tree_int_cst_sgn (t) < 0)
{
code = MINUS_EXPR;
- t = fold (build1 (NEGATE_EXPR, TREE_TYPE (t), t));
+ t = fold_build1 (NEGATE_EXPR, TREE_TYPE (t), t);
}
t = convert (sizetype, t);
off = size_binop (MULT_EXPR, TYPE_SIZE_UNIT (TREE_TYPE (expr)), t);
return expr;
if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (TREE_TYPE (expr)))
- return fold (build1 (NOP_EXPR, type, expr));
+ return fold_build1 (NOP_EXPR, type, expr);
if (TREE_CODE (TREE_TYPE (expr)) == ERROR_MARK)
return error_mark_node;
if (TREE_CODE (TREE_TYPE (expr)) == VOID_TYPE)
/* If it returns a NOP_EXPR, we must fold it here to avoid
infinite recursion between fold () and convert (). */
if (TREE_CODE (t) == NOP_EXPR)
- return fold (build1 (NOP_EXPR, type, TREE_OPERAND (t, 0)));
+ return fold_build1 (NOP_EXPR, type, TREE_OPERAND (t, 0));
else
- return fold (build1 (NOP_EXPR, type, t));
+ return fold_build1 (NOP_EXPR, type, t);
}
if (code == POINTER_TYPE || code == REFERENCE_TYPE)
return fold (convert_to_pointer (type, e));
- 1. Do the calculation in index_type, so that
if it is a variable the computations will be
done in the proper mode. */
- itype = fold (build2 (MINUS_EXPR, index_type,
- convert (index_type, size),
- convert (index_type,
- size_one_node)));
+ itype = fold_build2 (MINUS_EXPR, index_type,
+ convert (index_type, size),
+ convert (index_type,
+ size_one_node));
/* If that overflowed, the array is too big. ???
While a size of INT_MAX+1 technically shouldn't
build_constructor (return_type,
NULL_TREE));
else
- rhs = fold (build1 (NOP_EXPR, return_type, integer_zero_node));
+ rhs = fold_build1 (NOP_EXPR, return_type, integer_zero_node);
return build2 (COMPOUND_EXPR, return_type, trap, rhs);
}
op1 = c_size_in_bytes (target_type);
/* Divide by the size, in easiest possible way. */
- return fold (build2 (EXACT_DIV_EXPR, restype, op0, convert (restype, op1)));
+ return fold_build2 (EXACT_DIV_EXPR, restype, op0, convert (restype, op1));
}
\f
/* Construct and perhaps optimize a tree representation
if (TREE_CODE (arg) == COMPLEX_CST)
return TREE_REALPART (arg);
else if (TREE_CODE (TREE_TYPE (arg)) == COMPLEX_TYPE)
- return fold (build1 (REALPART_EXPR, TREE_TYPE (TREE_TYPE (arg)), arg));
+ return fold_build1 (REALPART_EXPR, TREE_TYPE (TREE_TYPE (arg)), arg);
else
return arg;
if (TREE_CODE (arg) == COMPLEX_CST)
return TREE_IMAGPART (arg);
else if (TREE_CODE (TREE_TYPE (arg)) == COMPLEX_TYPE)
- return fold (build1 (IMAGPART_EXPR, TREE_TYPE (TREE_TYPE (arg)), arg));
+ return fold_build1 (IMAGPART_EXPR, TREE_TYPE (TREE_TYPE (arg)), arg);
else
return convert (TREE_TYPE (arg), integer_zero_node);
case COMPLEX_TYPE:
return convert (type,
- fold (build1 (REALPART_EXPR,
- TREE_TYPE (TREE_TYPE (expr)), expr)));
+ fold_build1 (REALPART_EXPR,
+ TREE_TYPE (TREE_TYPE (expr)), expr));
case POINTER_TYPE:
case REFERENCE_TYPE:
else
typex = lang_hooks.types.signed_type (typex);
return convert (type,
- fold (build2 (ex_form, typex,
- convert (typex, arg0),
- convert (typex, arg1))));
+ fold_build2 (ex_form, typex,
+ convert (typex, arg0),
+ convert (typex, arg1)));
}
}
}
else
typex = lang_hooks.types.signed_type (typex);
return convert (type,
- fold (build1 (ex_form, typex,
- convert (typex,
- TREE_OPERAND (expr, 0)))));
+ fold_build1 (ex_form, typex,
+ convert (typex,
+ TREE_OPERAND (expr, 0))));
}
}
case COND_EXPR:
/* It is sometimes worthwhile to push the narrowing down through
the conditional and never loses. */
- return fold (build3 (COND_EXPR, type, TREE_OPERAND (expr, 0),
- convert (type, TREE_OPERAND (expr, 1)),
- convert (type, TREE_OPERAND (expr, 2))));
+ return fold_build3 (COND_EXPR, type, TREE_OPERAND (expr, 0),
+ convert (type, TREE_OPERAND (expr, 1)),
+ convert (type, TREE_OPERAND (expr, 2)));
default:
break;
case COMPLEX_TYPE:
return convert (type,
- fold (build1 (REALPART_EXPR,
- TREE_TYPE (TREE_TYPE (expr)), expr)));
+ fold_build1 (REALPART_EXPR,
+ TREE_TYPE (TREE_TYPE (expr)), expr));
case VECTOR_TYPE:
if (!tree_int_cst_equal (TYPE_SIZE (type), TYPE_SIZE (TREE_TYPE (expr))))
if (TYPE_MAIN_VARIANT (elt_type) == TYPE_MAIN_VARIANT (subtype))
return expr;
else if (TREE_CODE (expr) == COMPLEX_EXPR)
- return fold (build2 (COMPLEX_EXPR, type,
- convert (subtype, TREE_OPERAND (expr, 0)),
- convert (subtype, TREE_OPERAND (expr, 1))));
+ return fold_build2 (COMPLEX_EXPR, type,
+ convert (subtype, TREE_OPERAND (expr, 0)),
+ convert (subtype, TREE_OPERAND (expr, 1)));
else
{
expr = save_expr (expr);
return
- fold (build2 (COMPLEX_EXPR, type,
- convert (subtype,
- fold (build1 (REALPART_EXPR,
- TREE_TYPE (TREE_TYPE (expr)),
- expr))),
- convert (subtype,
- fold (build1 (IMAGPART_EXPR,
- TREE_TYPE (TREE_TYPE (expr)),
- expr)))));
+ fold_build2 (COMPLEX_EXPR, type,
+ convert (subtype,
+ fold_build1 (REALPART_EXPR,
+ TREE_TYPE (TREE_TYPE (expr)),
+ expr)),
+ convert (subtype,
+ fold_build1 (IMAGPART_EXPR,
+ TREE_TYPE (TREE_TYPE (expr)),
+ expr)));
}
}
/* newname = coefficient * induction_variable */
coeffmult = build_int_cst (type, LBV_COEFFICIENTS (lbv)[i]);
stmt = build (MODIFY_EXPR, void_type_node, resvar,
- fold (build (MULT_EXPR, type, iv, coeffmult)));
+ fold_build2 (MULT_EXPR, type, iv, coeffmult));
newname = make_ssa_name (resvar, stmt);
TREE_OPERAND (stmt, 0) = newname;
{
coeff = build_int_cst (type,
LLE_COEFFICIENTS (lle)[i]);
- mult = fold (build (MULT_EXPR, type, iv, coeff));
+ mult = fold_build2 (MULT_EXPR, type, iv, coeff);
}
/* newname = mult */
else
{
coeff = build_int_cst (type, invcoeff);
- mult = fold (build (MULT_EXPR, type, invar, coeff));
+ mult = fold_build2 (MULT_EXPR, type, invar, coeff);
}
/* newname = mult */
op1 = expr_expected_value (TREE_OPERAND (expr, 1), visited);
if (!op1)
return NULL;
- res = fold (build (TREE_CODE (expr), TREE_TYPE (expr), op0, op1));
+ res = fold_build2 (TREE_CODE (expr), TREE_TYPE (expr), op0, op1);
if (TREE_CONSTANT (res))
return res;
return NULL;
op0 = expr_expected_value (TREE_OPERAND (expr, 0), visited);
if (!op0)
return NULL;
- res = fold (build1 (TREE_CODE (expr), TREE_TYPE (expr), op0));
+ res = fold_build1 (TREE_CODE (expr), TREE_TYPE (expr), op0);
if (TREE_CONSTANT (res))
return res;
return NULL;
{
tree ret;
- ret = fold (build3 (code, type, a, b, c));
+ ret = fold_build3 (code, type, a, b, c);
STRIP_NOPS (ret);
return gimplify_val (bsi, type, ret);
{
tree ret;
- ret = fold (build2 (code, type, a, b));
+ ret = fold_build2 (code, type, a, b);
STRIP_NOPS (ret);
return gimplify_val (bsi, type, ret);
{
tree ret;
- ret = fold (build1 (code, type, a));
+ ret = fold_build1 (code, type, a);
STRIP_NOPS (ret);
return gimplify_val (bsi, type, ret);
/* 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;
{
/* 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
|| TREE_CODE (element_size) != INTEGER_CST)
return;
- data_size = fold (build2 (EXACT_DIV_EXPR, integer_type_node,
- array_size, element_size));
+ data_size = fold_build2 (EXACT_DIV_EXPR, integer_type_node,
+ array_size, element_size);
if (init != NULL_TREE
&& step != NULL_TREE
&& TREE_CODE (init) == INTEGER_CST
&& TREE_CODE (step) == INTEGER_CST)
{
- estimation = fold (build2 (CEIL_DIV_EXPR, integer_type_node,
- fold (build2 (MINUS_EXPR, integer_type_node,
- data_size, init)), step));
+ estimation = fold_build2 (CEIL_DIV_EXPR, integer_type_node,
+ fold_build2 (MINUS_EXPR, integer_type_node,
+ data_size, init), step);
record_estimate (loop, estimation, boolean_true_node, stmt);
}
(integer_type_node, CHREC_RIGHT (chrec_b), difference))
{
*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)));
+ *overlaps_b = fold_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;
}
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;
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);
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 TARGET_MEM_REF:
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;
&& 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),
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),
return chrec_dont_know;
if (op0 == TREE_OPERAND (chrec, 0))
return chrec;
- return fold (build1 (TREE_CODE (chrec), TREE_TYPE (chrec), op0));
+ return fold_build1 (TREE_CODE (chrec), TREE_TYPE (chrec), op0);
case 0:
return chrec;
if (TREE_CODE (orig_lhs) == VIEW_CONVERT_EXPR
&& val.lattice_val == CONSTANT)
{
- tree w = fold (build1 (VIEW_CONVERT_EXPR,
- TREE_TYPE (TREE_OPERAND (orig_lhs, 0)),
- val.value));
+ tree w = fold_build1 (VIEW_CONVERT_EXPR,
+ TREE_TYPE (TREE_OPERAND (orig_lhs, 0)),
+ val.value);
orig_lhs = TREE_OPERAND (orig_lhs, 0);
if (w && is_gimple_min_invariant (w))
{
if (TYPE_UNSIGNED (TREE_TYPE (op1)))
return NULL;
- op1 = fold (build1 (NEGATE_EXPR, TREE_TYPE (op1), op1));
+ op1 = fold_build1 (NEGATE_EXPR, TREE_TYPE (op1), op1);
/* ??? In theory fold should always produce another integer. */
if (TREE_CODE (op1) != INTEGER_CST)
return NULL;
with a modulo arithmetics. */
type = TREE_TYPE (niter);
- niter = fold (build2 (PLUS_EXPR, type,
- niter,
- build_int_cst (type, 1)));
+ niter = fold_build2 (PLUS_EXPR, type,
+ niter,
+ build_int_cst (type, 1));
incr_at = bsi_last (in->src);
create_iv (niter,
fold_convert (type, integer_minus_one_node),
/* The result of number_of_iterations_in_loop is by one higher than
we expect (i.e. it returns number of executions of the exit
condition, not of the loop latch edge). */
- niter = fold (build2 (MINUS_EXPR, TREE_TYPE (niter), niter,
- build_int_cst (TREE_TYPE (niter), 1)));
+ niter = fold_build2 (MINUS_EXPR, TREE_TYPE (niter), niter,
+ build_int_cst (TREE_TYPE (niter), 1));
}
else
{
/* We may need to shift the value if we are after the increment. */
if (stmt_after_increment (loop, cand, at))
- cbase = fold (build2 (PLUS_EXPR, uutype, cbase, cstep));
+ cbase = fold_build2 (PLUS_EXPR, uutype, cbase, cstep);
/* use = ubase - ratio * cbase + ratio * var.
tree type = TREE_TYPE (iv->base);
niter = fold_convert (type, niter);
- val = fold (build2 (MULT_EXPR, type, iv->step, niter));
+ val = fold_build2 (MULT_EXPR, type, iv->step, niter);
- return fold (build2 (PLUS_EXPR, type, iv->base, val));
+ return fold_build2 (PLUS_EXPR, type, iv->base, val);
}
/* Computes value of candidate CAND at position AT in iteration NITER. */
tree type = TREE_TYPE (cand->iv->base);
if (stmt_after_increment (loop, cand, at))
- val = fold (build2 (PLUS_EXPR, type, val, cand->iv->step));
+ val = fold_build2 (PLUS_EXPR, type, val, cand->iv->step);
return val;
}
else
wider_type = nit_type;
- if (!integer_nonzerop (fold (build2 (GE_EXPR, boolean_type_node,
- fold_convert (wider_type, period),
- fold_convert (wider_type, nit)))))
+ if (!integer_nonzerop (fold_build2 (GE_EXPR, boolean_type_node,
+ fold_convert (wider_type, period),
+ fold_convert (wider_type, nit))))
return false;
*bound = cand_value_at (loop, cand, use->stmt, nit);
{
if (TYPE_UNSIGNED (TREE_TYPE (step)))
{
- step1 = fold (build1 (NEGATE_EXPR, TREE_TYPE (step), step));
+ step1 = fold_build1 (NEGATE_EXPR, TREE_TYPE (step), step);
if (tree_int_cst_lt (step1, step))
{
incr_op = MINUS_EXPR;
&& may_negate_without_overflow_p (step))
{
incr_op = MINUS_EXPR;
- step = fold (build1 (NEGATE_EXPR, TREE_TYPE (step), step));
+ step = fold_build1 (NEGATE_EXPR, TREE_TYPE (step), step);
}
}
}
return false;
/* We need BOUND <= LARGER. */
- if (!integer_nonzerop (fold (build2 (LE_EXPR, boolean_type_node,
- bound, larger))))
+ if (!integer_nonzerop (fold_build2 (LE_EXPR, boolean_type_node,
+ bound, larger)))
return false;
}
else if (operand_equal_for_phi_arg_p (arg_false, smaller))
return false;
/* We need BOUND >= SMALLER. */
- if (!integer_nonzerop (fold (build2 (GE_EXPR, boolean_type_node,
- bound, smaller))))
+ if (!integer_nonzerop (fold_build2 (GE_EXPR, boolean_type_node,
+ bound, smaller)))
return false;
}
else
return false;
/* We need BOUND >= LARGER. */
- if (!integer_nonzerop (fold (build2 (GE_EXPR, boolean_type_node,
- bound, larger))))
+ if (!integer_nonzerop (fold_build2 (GE_EXPR, boolean_type_node,
+ bound, larger)))
return false;
}
else if (operand_equal_for_phi_arg_p (arg_true, smaller))
return false;
/* We need BOUND <= SMALLER. */
- if (!integer_nonzerop (fold (build2 (LE_EXPR, boolean_type_node,
- bound, smaller))))
+ if (!integer_nonzerop (fold_build2 (LE_EXPR, boolean_type_node,
+ bound, smaller)))
return false;
}
else
if (op2)
genop2 = find_or_generate_expression (block, op2, stmts);
- folded = fold (build (TREE_CODE (expr), TREE_TYPE (expr),
- genop0, genarglist, genop2));
+ folded = fold_build3 (TREE_CODE (expr), TREE_TYPE (expr),
+ genop0, genarglist, genop2);
break;
tree op2 = TREE_OPERAND (expr, 1);
tree genop1 = find_or_generate_expression (block, op1, stmts);
tree genop2 = find_or_generate_expression (block, op2, stmts);
- folded = fold (build (TREE_CODE (expr), TREE_TYPE (expr),
- genop1, genop2));
+ folded = fold_build2 (TREE_CODE (expr), TREE_TYPE (expr),
+ genop1, genop2);
break;
}
{
tree op1 = TREE_OPERAND (expr, 0);
tree genop1 = find_or_generate_expression (block, op1, stmts);
- folded = fold (build (TREE_CODE (expr), TREE_TYPE (expr),
- genop1));
+ folded = fold_build1 (TREE_CODE (expr), TREE_TYPE (expr),
+ genop1);
break;
}
/* Compute offset. */
*initial_offset = fold_convert (ssizetype,
- fold (build2 (code, TREE_TYPE (left_offset),
- left_offset,
- right_offset)));
+ fold_build2 (code, TREE_TYPE (left_offset),
+ left_offset,
+ right_offset));
return true;
}
{
tree tmp = create_tmp_var (TREE_TYPE (base_offset), "offset");
add_referenced_tmp_var (tmp);
- offset = fold (build2 (MULT_EXPR, TREE_TYPE (offset), offset,
- STMT_VINFO_VECT_STEP (stmt_info)));
- base_offset = fold (build2 (PLUS_EXPR, TREE_TYPE (base_offset),
- base_offset, offset));
+ offset = fold_build2 (MULT_EXPR, TREE_TYPE (offset), offset,
+ STMT_VINFO_VECT_STEP (stmt_info));
+ base_offset = fold_build2 (PLUS_EXPR, TREE_TYPE (base_offset),
+ base_offset, offset);
base_offset = force_gimple_operand (base_offset, &new_stmt, false, tmp);
append_to_statement_list_force (new_stmt, new_stmt_list);
}
/* base + base_offset */
- addr_base = fold (build2 (PLUS_EXPR, TREE_TYPE (data_ref_base), data_ref_base,
- base_offset));
+ addr_base = fold_build2 (PLUS_EXPR, TREE_TYPE (data_ref_base), data_ref_base,
+ base_offset);
/* addr_expr = addr_base */
addr_expr = vect_get_new_vect_var (scalar_ptr_type, vect_pointer_var,
stmt_vec_info stmt_info = vinfo_for_stmt (DR_STMT (dr));
tree offset = STMT_VINFO_VECT_INIT_OFFSET (stmt_info);
- niters = fold (build2 (MULT_EXPR, TREE_TYPE (niters), niters,
- STMT_VINFO_VECT_STEP (stmt_info)));
- offset = fold (build2 (PLUS_EXPR, TREE_TYPE (offset), offset, niters));
+ niters = fold_build2 (MULT_EXPR, TREE_TYPE (niters), niters,
+ STMT_VINFO_VECT_STEP (stmt_info));
+ offset = fold_build2 (PLUS_EXPR, TREE_TYPE (offset), offset, niters);
STMT_VINFO_VECT_INIT_OFFSET (stmt_info) = offset;
}
/* Update number of times loop executes. */
n_iters = LOOP_VINFO_NITERS (loop_vinfo);
- LOOP_VINFO_NITERS (loop_vinfo) = fold (build2 (MINUS_EXPR,
- TREE_TYPE (n_iters), n_iters, niters_of_prolog_loop));
+ LOOP_VINFO_NITERS (loop_vinfo) = fold_build2 (MINUS_EXPR,
+ TREE_TYPE (n_iters), n_iters, niters_of_prolog_loop);
/* Update the init conditions of the access functions of all data refs. */
vect_update_inits_of_drs (loop_vinfo, niters_of_prolog_loop);
add_bb_to_loop (bb_before_second_loop, first_loop->outer);
pre_condition =
- fold (build2 (LE_EXPR, boolean_type_node, first_niters, integer_zero_node));
+ fold_build2 (LE_EXPR, boolean_type_node, first_niters, integer_zero_node);
skip_e = slpeel_add_loop_guard (bb_before_first_loop, pre_condition,
bb_before_second_loop, bb_before_first_loop);
slpeel_update_phi_nodes_for_guard1 (skip_e, first_loop,
add_bb_to_loop (bb_after_second_loop, second_loop->outer);
pre_condition =
- fold (build2 (EQ_EXPR, boolean_type_node, first_niters, niters));
+ fold_build2 (EQ_EXPR, boolean_type_node, first_niters, niters);
skip_e = slpeel_add_loop_guard (bb_between_loops, pre_condition,
bb_after_second_loop, bb_before_first_loop);
slpeel_update_phi_nodes_for_guard2 (skip_e, second_loop,
return (integer_zerop (min)
? max
- : fold (build2 (MINUS_EXPR, TREE_TYPE (max), max, min)));
+ : fold_build2 (MINUS_EXPR, TREE_TYPE (max), max, min));
}
\f
/* If arg is static -- a reference to an object in static storage -- then
if (op0 == TREE_OPERAND (exp, 0))
return exp;
- new = fold (build3 (COMPONENT_REF, TREE_TYPE (exp),
- op0, TREE_OPERAND (exp, 1), NULL_TREE));
+ new = fold_build3 (COMPONENT_REF, TREE_TYPE (exp),
+ op0, TREE_OPERAND (exp, 1), NULL_TREE);
}
else
switch (TREE_CODE_CLASS (code))
if (op0 == TREE_OPERAND (exp, 0))
return exp;
- new = fold (build1 (code, TREE_TYPE (exp), op0));
+ new = fold_build1 (code, TREE_TYPE (exp), op0);
break;
case 2:
if (op0 == TREE_OPERAND (exp, 0) && op1 == TREE_OPERAND (exp, 1))
return exp;
- new = fold (build2 (code, TREE_TYPE (exp), op0, op1));
+ new = fold_build2 (code, TREE_TYPE (exp), op0, op1);
break;
case 3:
&& op2 == TREE_OPERAND (exp, 2))
return exp;
- new = fold (build3 (code, TREE_TYPE (exp), op0, op1, op2));
+ new = fold_build3 (code, TREE_TYPE (exp), op0, op1, op2);
break;
default:
if (POINTER_TYPE_P (TREE_TYPE (elt))
&& (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (elt)))
== need_type))
- return fold (build1 (INDIRECT_REF, need_type, elt));
+ return fold_build1 (INDIRECT_REF, need_type, elt);
/* If we didn't find it, return the original PLACEHOLDER_EXPR. If it
survives until RTL generation, there will be an error. */
if (op0 == TREE_OPERAND (exp, 0))
return exp;
else
- return fold (build1 (code, TREE_TYPE (exp), op0));
+ return fold_build1 (code, TREE_TYPE (exp), op0);
case 2:
op0 = SUBSTITUTE_PLACEHOLDER_IN_EXPR (TREE_OPERAND (exp, 0), obj);
if (op0 == TREE_OPERAND (exp, 0) && op1 == TREE_OPERAND (exp, 1))
return exp;
else
- return fold (build2 (code, TREE_TYPE (exp), op0, op1));
+ return fold_build2 (code, TREE_TYPE (exp), op0, op1);
case 3:
op0 = SUBSTITUTE_PLACEHOLDER_IN_EXPR (TREE_OPERAND (exp, 0), obj);
&& op2 == TREE_OPERAND (exp, 2))
return exp;
else
- return fold (build3 (code, TREE_TYPE (exp), op0, op1, op2));
+ return fold_build3 (code, TREE_TYPE (exp), op0, op1, op2);
case 4:
op0 = SUBSTITUTE_PLACEHOLDER_IN_EXPR (TREE_OPERAND (exp, 0), obj);
return a;
if (tree_int_cst_sgn (a) == -1)
- a = fold (build2 (MULT_EXPR, type, a,
- convert (type, integer_minus_one_node)));
+ a = fold_build2 (MULT_EXPR, type, a,
+ convert (type, integer_minus_one_node));
if (tree_int_cst_sgn (b) == -1)
- b = fold (build2 (MULT_EXPR, type, b,
- convert (type, integer_minus_one_node)));
+ b = fold_build2 (MULT_EXPR, type, b,
+ convert (type, integer_minus_one_node));
while (1)
{
- a_mod_b = fold (build2 (FLOOR_MOD_EXPR, type, a, b));
+ a_mod_b = fold_build2 (FLOOR_MOD_EXPR, type, a, b);
if (!TREE_INT_CST_LOW (a_mod_b)
&& !TREE_INT_CST_HIGH (a_mod_b))