On 11/07/2015 05:35 AM, Richard Sandiford wrote:
This patch automatically generates case macros such as:

     CASE_CFN_SQRT

for each {F,,L} floating-point built-in function and each {,L,LL,IMAX}
integer built-in function.  The macros match the same built-in
functions as CASE_FLT_FN and CASE_INT_FN but in addition include
the associated internal function, if any.

The idea is to make sure that users of combined_fn don't need to know
which built-in functions have internal-function equivalents.  If we add
a new function to internal-fn.def, all combined_fn users should pick it
up automatically.

The generator wants to use "hash_set <nofree_string_hash>",
so the patch follows hash_map in using the types given by the
traits as the key.  This is a no-op for current users of hash_set.

Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
OK to install?

Thanks,
Richard


gcc/
        * Makefile.in (HASH_TABLE_H): Add GGC_H.
        (MOSTLYCLEANFILES, generated_files): Add case-fn-macros.h.
        (s-case-cfn-macros, case-cfn-macros.h, build/gencfn-macros.o)
        (build/gencfn-macros$(build_exeext): New rules.
        (genprogerr): Add cfn-macros.
        * hash-set.h (hash_set): Use the traits value_type as the key.
        * gencfn-macros.c: New file.
OK.

Jeff

Reply via email to