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: [patch] Simplify case labels for mathematical builtins


On Wed, 30 Nov 2005, Volker Reichelt wrote:
> 2005-11-30  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
>
> 	* builtins.def (CASE_FLT_FN, CASE_INT_FN): New macros.
> 	* builtins.c (expand_builtin_mathfn): Use them.
> 	(expand_builtin_mathfn_2): Likewise.
> 	(expand_builtin_mathfn_3): Likewise.
> 	(expand_builtin_int_roundingfn): Likewise.
> 	(expand_builtin): Likewise.
> 	(integer_valued_real_p): Likewise.
> 	(fold_builtin_int_roundingfn): Likewise.
> 	(fold_builtin_bitop): Likewise.
> 	(fold_builtin_logarithm): Likewise.
> 	(fold_builtin_1): Likewise.
> 	* convert.c (convert_to_integer): Likewise.
> 	* fold-const.c (negate_mathfn_p): Likewise.
> 	(tree_expr_nonnegative_p): Likewise.

This is OK for mainline, provided that you move the definitions of
CASE_FLT_FN and CASE_INT_FN.  I don't think that builtins.def is the
most appropriate place for them, instead I prefer to see those lines
moved to tree.h (close to where we #include "builtins.def").  This
should also avoid to need to #undef them first, as builtins.def may
be included multiple times in a single source file, but tree.h will
be included only once.

Thanks,

Roger
--


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