diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-11-17 18:43:42 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-11-17 18:43:42 +0000 |
commit | 7a366e88efbd0567c79fd7c85da04f2db356abad (patch) | |
tree | 3e66f5aadc735245c637a8832dd961243bf16b74 /gcc/fold-const.h | |
parent | 744fe3587a6b26a6e402ecefc210b4634d2efccb (diff) | |
download | gcc-7a366e88efbd0567c79fd7c85da04f2db356abad.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230478 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.h')
-rw-r--r-- | gcc/fold-const.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/fold-const.h b/gcc/fold-const.h index 94a21b7652a..7741802981e 100644 --- a/gcc/fold-const.h +++ b/gcc/fold-const.h @@ -137,12 +137,12 @@ extern bool tree_unary_nonnegative_warnv_p (enum tree_code, tree, tree, extern bool tree_binary_nonnegative_warnv_p (enum tree_code, tree, tree, tree, bool *, int); extern bool tree_single_nonnegative_warnv_p (tree, bool *, int); -extern bool tree_call_nonnegative_warnv_p (tree, tree, tree, tree, bool *, - int); +extern bool tree_call_nonnegative_warnv_p (tree, combined_fn, tree, tree, + bool *, int); extern bool integer_valued_real_unary_p (tree_code, tree, int); extern bool integer_valued_real_binary_p (tree_code, tree, tree, int); -extern bool integer_valued_real_call_p (tree, tree, tree, int); +extern bool integer_valued_real_call_p (combined_fn, tree, tree, int); extern bool integer_valued_real_single_p (tree, int); extern bool integer_valued_real_p (tree, int = 0); @@ -179,7 +179,7 @@ extern tree sign_bit_p (tree, const_tree); extern tree exact_inverse (tree, tree); extern tree const_unop (enum tree_code, tree, tree); extern tree const_binop (enum tree_code, tree, tree, tree); -extern bool negate_mathfn_p (enum built_in_function); +extern bool negate_mathfn_p (combined_fn); extern const char *c_getstr (tree); /* Return OFF converted to a pointer offset type suitable as offset for |