[patch] Simplify case labels for mathematical builtins
Roger Sayle
roger@eyesopen.com
Wed Nov 30 16:17:00 GMT 2005
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
--
More information about the Gcc-patches
mailing list