r230476 - in /trunk/gcc: ChangeLog Makefile.in ...

rsandifo@gcc.gnu.org rsandifo@gcc.gnu.org
Tue Nov 17 18:41:00 GMT 2015


Author: rsandifo
Date: Tue Nov 17 18:41:55 2015
New Revision: 230476

URL: https://gcc.gnu.org/viewcvs?rev=230476&root=gcc&view=rev
Log:
Add gencfn-macros.c

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.

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.

Added:
    trunk/gcc/gencfn-macros.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/Makefile.in
    trunk/gcc/hash-set.h



More information about the Gcc-cvs mailing list