aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-fold.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2015-11-17 18:43:42 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2015-11-17 18:43:42 +0000
commit1d9da71f4f1dcad2a5e2bd3a3e9fac6012a6049b (patch)
tree3e66f5aadc735245c637a8832dd961243bf16b74 /gcc/gimple-fold.c
parentd7ebef0648bc358514ed2048a46b22f801c19689 (diff)
downloadgcc-1d9da71f4f1dcad2a5e2bd3a3e9fac6012a6049b.zip
gcc-1d9da71f4f1dcad2a5e2bd3a3e9fac6012a6049b.tar.gz
gcc-1d9da71f4f1dcad2a5e2bd3a3e9fac6012a6049b.tar.bz2
Make more use of combined_fn
This patch generalises fold-const.[hc] routines to use combined_fn instead of built_in_function. It also updates gimple-ssa-backprop,c since the update is simple and it avoids churn on the call to negate_mathfn_p. Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. gcc/ * fold-const.h (negate_mathfn_p): Take a combined_fn rather than a built_in_function. (tree_call_nonnegative_warnv_p): Take a combined_fn rather than a function decl. (integer_valued_real_call_p): Likewise. * fold-const.c: Include case-cfn-macros.h (negate_mathfn_p): Take a combined_fn rather than a built_in_function. (negate_expr_p): Update accordingly. (tree_call_nonnegative_warnv_p): Take a combined_fn rather than a function decl. (integer_valued_real_call_p): Likewise. (tree_invalid_nonnegative_warnv_p): Update accordingly. (integer_valued_real_p): Likewise. * gimple-fold.c (gimple_call_nonnegative_warnv_p): Update call to tree_call_nonnegative_warnv_p. (gimple_call_integer_valued_real_p): Likewise integer_valued_real_call_p. * gimple-ssa-backprop.c: Include case-cfn-macros.h. (backprop::process_builtin_call_use): Extend to combined_fn. (strip_sign_op_1): Likewise. (backprop::process_use): Don't check for built-in calls here. (backprop::execute): Likewise. (backprop::optimize_builtin_call): Update call to negate_mathfn_p. From-SVN: r230478
Diffstat (limited to 'gcc/gimple-fold.c')
-rw-r--r--gcc/gimple-fold.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c
index fc095eb..436e29b 100644
--- a/gcc/gimple-fold.c
+++ b/gcc/gimple-fold.c
@@ -6202,7 +6202,7 @@ gimple_call_nonnegative_warnv_p (gimple *stmt, bool *strict_overflow_p,
gimple_call_arg (stmt, 1) : NULL_TREE;
return tree_call_nonnegative_warnv_p (gimple_expr_type (stmt),
- gimple_call_fndecl (stmt),
+ gimple_call_combined_fn (stmt),
arg0,
arg1,
strict_overflow_p, depth);
@@ -6295,7 +6295,7 @@ gimple_call_integer_valued_real_p (gimple *stmt, int depth)
tree arg1 = (gimple_call_num_args (stmt) > 1
? gimple_call_arg (stmt, 1)
: NULL_TREE);
- return integer_valued_real_call_p (gimple_call_fndecl (stmt),
+ return integer_valued_real_call_p (gimple_call_combined_fn (stmt),
arg0, arg1, depth);
}