This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Make more use of combined_fn


On 11/07/2015 05:44 AM, Richard Sandiford wrote:
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.
OK to install?

Thanks,
Richard

[I've attached a -b form of the patch too since it's easier to read.]
Thanks for that. I was thinking that would have made one of the later ones easier to read, but it was small enough not to really matter.




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.

OK
jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]