diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2015-11-17 18:49:10 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2015-11-17 18:49:10 +0000 |
commit | b1dc4a20a797ed2718fb2ba3431753ce84db86b2 (patch) | |
tree | f6a69b77920259ec90eb2b68484d7e14ca6135ff /gcc/Makefile.in | |
parent | fa74b47a8c825cbdde6f97591befb474b739006f (diff) | |
download | gcc-b1dc4a20a797ed2718fb2ba3431753ce84db86b2.zip gcc-b1dc4a20a797ed2718fb2ba3431753ce84db86b2.tar.gz gcc-b1dc4a20a797ed2718fb2ba3431753ce84db86b2.tar.bz2 |
Replace match.pd DEFINE_MATH_FNs with auto-generated lists
This patch autogenerates the operator lists for maths functions
like SQRT, adding an additional entry for internal functions.
E.g.:
(define_operator_list SQRT
BUILT_IN_SQRTF
BUILT_IN_SQRT
BUILT_IN_SQRTL
IFN_SQRT)
and:
(define_operator_list CABS
BUILT_IN_CABSF
BUILT_IN_CABS
BUILT_IN_CABSL
null)
(since there's no internal function for CABS).
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
gcc/
* Makefile.in (MOSTLYCLEANFILES): Add cfn-operators.pd.
(generated_files): Likewise.
(s-cfn-operators, cfn-operators.pd): New rules.
(s-match): Depend on cfn-operators.pd.
* gencfn-macros.c: Expand comment to describe -o behavior.
(print_define_operator_list): New function.
(main): Accept -o. Call print_define_operator_list.
* genmatch.c (main): Add the current directory to the include path.
* match.pd (DEFINE_MATH_FN): Delete. Include cfn-operators.pd
instead.
From-SVN: r230486
Diffstat (limited to 'gcc/Makefile.in')
-rw-r--r-- | gcc/Makefile.in | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/gcc/Makefile.in b/gcc/Makefile.in index ba8108d..0fd8d99 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -1570,7 +1570,7 @@ MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \ tm-preds.h tm-constrs.h checksum-options gimple-match.c generic-match.c \ tree-check.h min-insn-modes.c insn-modes.c insn-modes.h \ genrtl.h gt-*.h gtype-*.h gtype-desc.c gtyp-input.list \ - case-cfn-macros.h \ + case-cfn-macros.h cfn-operators.pd \ xgcc$(exeext) cpp$(exeext) $(FULL_DRIVER_NAME) \ $(EXTRA_PROGRAMS) gcc-cross$(exeext) \ $(SPECS) collect2$(exeext) gcc-ar$(exeext) gcc-nm$(exeext) \ @@ -2256,6 +2256,14 @@ s-case-cfn-macros: build/gencfn-macros$(build_exeext) $(STAMP) s-case-cfn-macros case-cfn-macros.h: s-case-cfn-macros; @true +s-cfn-operators: build/gencfn-macros$(build_exeext) + $(RUN_GEN) build/gencfn-macros$(build_exeext) -o \ + > tmp-cfn-operators.pd + $(SHELL) $(srcdir)/../move-if-change tmp-cfn-operators.pd \ + cfn-operators.pd + $(STAMP) s-cfn-operators +cfn-operators.pd: s-cfn-operators; @true + target-hooks-def.h: s-target-hooks-def-h; @true # make sure that when we build info files, the used tm.texi is up to date. $(srcdir)/doc/tm.texi: s-tm-texi; @true @@ -2322,7 +2330,7 @@ s-tm-texi: build/genhooks$(build_exeext) $(srcdir)/doc/tm.texi.in gimple-match.c: s-match gimple-match-head.c ; @true generic-match.c: s-match generic-match-head.c ; @true -s-match: build/genmatch$(build_exeext) $(srcdir)/match.pd +s-match: build/genmatch$(build_exeext) $(srcdir)/match.pd cfn-operators.pd $(RUN_GEN) build/genmatch$(build_exeext) --gimple $(srcdir)/match.pd \ > tmp-gimple-match.c $(RUN_GEN) build/genmatch$(build_exeext) --generic $(srcdir)/match.pd \ @@ -2443,7 +2451,8 @@ generated_files = config.h tm.h $(TM_P_H) $(TM_H) multilib.h \ $(ALL_GTFILES_H) gtype-desc.c gtype-desc.h gcov-iov.h \ options.h target-hooks-def.h insn-opinit.h \ common/common-target-hooks-def.h pass-instances.def \ - c-family/c-target-hooks-def.h params.list case-cfn-macros.h + c-family/c-target-hooks-def.h params.list case-cfn-macros.h \ + cfn-operators.pd # # How to compile object files to run on the build machine. |