diff options
author | Richard Biener <rguenther@suse.de> | 2014-12-03 13:10:39 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2014-12-03 13:10:39 +0000 |
commit | a6a0570f151b9a4fd42dec96182439e53c19241a (patch) | |
tree | 35cb5d29ee00714e432effd24006281aa7ec24d8 /gcc/gimple-fold.c | |
parent | a844a6958395311c579a982d82958088b418be77 (diff) | |
download | gcc-a6a0570f151b9a4fd42dec96182439e53c19241a.zip gcc-a6a0570f151b9a4fd42dec96182439e53c19241a.tar.gz gcc-a6a0570f151b9a4fd42dec96182439e53c19241a.tar.bz2 |
builtins.c (fold_builtin_fpclassify): Change to take array of arguments instead of CALL_EXPR tree.
2014-12-03 Richard Biener <rguenther@suse.de>
* builtins.c (fold_builtin_fpclassify): Change to take
array of arguments instead of CALL_EXPR tree.
(MAX_ARGS_TO_FOLD_BUILTIN): Remove.
(fold_builtin_n): Dispatch to fold_builtin_varargs.
(fold_call_expr): Always use fold_builtin_n.
(fold_builtin_call_array): Change to not build the unfolded call,
always use fold_builtin_n.
(fold_builtin_varargs): Change to take array of arguments instead
of CALL_EXPR tree.
(fold_call_stmt): Always use fold_builtin_n.
* tree.c (build_call_expr_loc_array): Use fold_build_call_array_loc.
* fold-const.c (fold_build_call_array_loc): Build the call
if fold_builtin_call_array returned NULL_TREE.
* gimple-fold.c (gimple_fold_stmt_to_constant_1): Do not build
a CALL_EXPR and use fold_builtin_call_array instead of
fold_call_expr.
cp/
* constexpr.c (cxx_eval_builtin_function_call): Use
fold_build_call_array_loc.
From-SVN: r218311
Diffstat (limited to 'gcc/gimple-fold.c')
-rw-r--r-- | gcc/gimple-fold.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c index 4374c1d..bdc6088 100644 --- a/gcc/gimple-fold.c +++ b/gcc/gimple-fold.c @@ -4744,14 +4744,13 @@ gimple_fold_stmt_to_constant_1 (gimple stmt, tree (*valueize) (tree), TREE_OPERAND (fn, 0))) { tree *args = XALLOCAVEC (tree, gimple_call_num_args (stmt)); - tree call, retval; + tree retval; unsigned i; for (i = 0; i < gimple_call_num_args (stmt); ++i) args[i] = (*valueize) (gimple_call_arg (stmt, i)); - call = build_call_array_loc (loc, + retval = fold_builtin_call_array (loc, gimple_call_return_type (call_stmt), fn, gimple_call_num_args (stmt), args); - retval = fold_call_expr (EXPR_LOCATION (call), call, false); if (retval) { /* fold_call_expr wraps the result inside a NOP_EXPR. */ |