builtins.c (fold_call_stmt): Don't copy gimple call arguments into a temporary array.
* builtins.c (fold_call_stmt): Don't copy gimple call arguments into a temporary array. From-SVN: r165213
This commit is contained in:
parent
5bdf874256
commit
8897c9ce64
@ -1,3 +1,8 @@
|
||||
2010-10-08 Nathan Froyd <froydnj@codesourcery.com>
|
||||
|
||||
* builtins.c (fold_call_stmt): Don't copy gimple call arguments
|
||||
into a temporary array.
|
||||
|
||||
2010-10-08 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/45903
|
||||
|
@ -13627,26 +13627,20 @@ fold_call_stmt (gimple stmt, bool ignore)
|
||||
&& !gimple_call_va_arg_pack_p (stmt))
|
||||
{
|
||||
int nargs = gimple_call_num_args (stmt);
|
||||
tree *args = (nargs > 0
|
||||
? gimple_call_arg_ptr (stmt, 0)
|
||||
: &error_mark_node);
|
||||
|
||||
if (avoid_folding_inline_builtin (fndecl))
|
||||
return NULL_TREE;
|
||||
if (DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_MD)
|
||||
{
|
||||
return targetm.fold_builtin (fndecl, nargs,
|
||||
(nargs > 0
|
||||
? gimple_call_arg_ptr (stmt, 0)
|
||||
: &error_mark_node), ignore);
|
||||
return targetm.fold_builtin (fndecl, nargs, args, ignore);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (nargs <= MAX_ARGS_TO_FOLD_BUILTIN)
|
||||
{
|
||||
tree args[MAX_ARGS_TO_FOLD_BUILTIN];
|
||||
int i;
|
||||
for (i = 0; i < nargs; i++)
|
||||
args[i] = gimple_call_arg (stmt, i);
|
||||
ret = fold_builtin_n (loc, fndecl, args, nargs, ignore);
|
||||
}
|
||||
ret = fold_builtin_n (loc, fndecl, args, nargs, ignore);
|
||||
if (!ret)
|
||||
ret = gimple_fold_builtin_varargs (fndecl, stmt, ignore);
|
||||
if (ret)
|
||||
|
Loading…
Reference in New Issue
Block a user