Reorganise machmode.h headers

This patch splits the auto-generated inline functions out of
insn-modes.h and puts them in a new header file, insn-modes-inline.h.
It also makes coretypes.h include these files directly, rather than
indirectly via machmode.h.  This in turn allows insn-modes-inline.h
and machmode.h to come later in the include list, after wide-int.h.
This is useful for later patches.

insn-modes.h itself still needs to come first, since it provides
configuration information like MAX_BITSIZE_MODE_ANY_INT, which is
used to control the size of a wide_int.

The patch also makes the generator files include machmode.h
via coretypes.h.  Previously they did it by more indirect means.

Finally, the patch makes wide-int-print.h available via coretypes.h
too.  There didn't seem to be any reason to force only the print
routines to be included directly, and it would be painful to extend
that approach to the SVE patches.


[Based on the code ARM contributed in branches/ARM/sve-branch@242100]

2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

contrib/header-tools/
	* graph-header-logs (ignore): Update coretypes.h header list.

gcc/
	* Makefile.in (MACHMODE_H): Remove insn-modes.h
	(CORETYPES_H): New define.
	(MOSTLYCLEANFILES): Add insn-modes-inline.h.
	(insn-modes-inline.h, s-modes-inline-h): New rules.
	(generated_files): Add insn-modes-inline.h.
	(RTL_BASE_H, TREE_CORE_H): Use CORETYPES_H instead of coretypes.h.
	(build/gensupport.o, build/ggc-none.o, build/print-rtl.o): Likewise.
	(build/read-md.o, build/read-rtl.o, build/rtl.o): Likewise.
	(build/vec.o, build/hash-table.o, build/inchash.o): Likewise.
	(build/gencondmd.o, build/genattr.o, build/genattr-common.o): Likewise.
	(build/genattrtab.o, build/genautomata.o, build/gencheck.o): Likewise.
	(build/gencodes.o, build/genconditions.o): Likewise.
	(build/genconfig.o, build/genconstants.o, build/genemit.o): Likewise.
	(build/genenums.o, build/genextract.o, build/genflags.o): Likewise.
	(build/gentarget-def.o, build/genmddeps.o, build/genopinit.o)
	(build/genoutput.o, build/genpeep.o, build/genpreds.o): Likewise.
	(build/genrecog.o, build/genmddump.o, build/genmatch.o): Likewise.
	(build/gencfn-macros.o, build/gcov-iov.o): Likewise.
	* coretypes.h: Include everything up to real.h for generators.
	Include insn-modes.h first.  Include wide-int-print.h after
	wide-int.h.  Include insn-modes-inline.h and then machmode.h.
	* machmode.h: Don't include insn-modes.h here.
	* function-tests.c: Remove includes of signop.h, machmode.h,
	double-int.h and wide-int.h.
	* rtl.h: Likewise.
	* gcc-rich-location.c: Remove includes of machmode.h, double-int.h
	and wide-int.h.
	* optc-save-gen.awk: Likewise.
	* gencheck.c (BITS_PER_UNIT): Delete dummy definition.
	* godump.c: Remove include of wide-int-print.h.
	* pretty-print.h: Likewise.
	* wide-int-print.cc: Likewise.
	* wide-int.cc: Likewise.
	* hash-map-tests.c: Remove include of signop.h.
	* hash-set-tests.c: Likewise.
	* rtl-tests.c: Likewise.
	* mkconfig.sh: Remove include of machmode.h.
	* genmodes.c (emit_insn_modes_h): Split emission of inline functions
	into...
	(emit_insn_modes_inline_h): ...this new function.  Emit the code
	into an insn-modes-inline.h header file, adding appropriate
	include guards and end comments.
	(emit_insn_modes_c_header): Remove include of machmode.h.
	(emit_min_insn_modes_c_header): Include coretypes.h rather than
	machmode.h.
	(main): Handle -i flag and call emit_insn_modes_inline_h when
	it is passed.

Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>

From-SVN: r249881
This commit is contained in:
Richard Sandiford 2017-07-02 09:06:10 +00:00 committed by Richard Sandiford
parent e3f9a279f5
commit b0e84cf75a
20 changed files with 155 additions and 86 deletions

View File

@ -1,3 +1,9 @@
2017-07-02 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* graph-header-logs (ignore): Update coretypes.h header list.
2016-06-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* README: Remove references to avr-rtems.

View File

@ -25,9 +25,12 @@ depstring = ("In file included from", " from")
# indentation indicates nesting levels of included files
ignore = [ "coretypes_h",
"machmode_h",
"insn_modes_h",
"signop_h",
"wide_int_h",
"wide_int_print_h",
"insn_modes_inline_h",
"machmode_h",
"double_int_h",
"real_h",
"fixed_value_h",

View File

@ -1,3 +1,55 @@
2017-07-02 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* Makefile.in (MACHMODE_H): Remove insn-modes.h
(CORETYPES_H): New define.
(MOSTLYCLEANFILES): Add insn-modes-inline.h.
(insn-modes-inline.h, s-modes-inline-h): New rules.
(generated_files): Add insn-modes-inline.h.
(RTL_BASE_H, TREE_CORE_H): Use CORETYPES_H instead of coretypes.h.
(build/gensupport.o, build/ggc-none.o, build/print-rtl.o): Likewise.
(build/read-md.o, build/read-rtl.o, build/rtl.o): Likewise.
(build/vec.o, build/hash-table.o, build/inchash.o): Likewise.
(build/gencondmd.o, build/genattr.o, build/genattr-common.o): Likewise.
(build/genattrtab.o, build/genautomata.o, build/gencheck.o): Likewise.
(build/gencodes.o, build/genconditions.o): Likewise.
(build/genconfig.o, build/genconstants.o, build/genemit.o): Likewise.
(build/genenums.o, build/genextract.o, build/genflags.o): Likewise.
(build/gentarget-def.o, build/genmddeps.o, build/genopinit.o)
(build/genoutput.o, build/genpeep.o, build/genpreds.o): Likewise.
(build/genrecog.o, build/genmddump.o, build/genmatch.o): Likewise.
(build/gencfn-macros.o, build/gcov-iov.o): Likewise.
* coretypes.h: Include everything up to real.h for generators.
Include insn-modes.h first. Include wide-int-print.h after
wide-int.h. Include insn-modes-inline.h and then machmode.h.
* machmode.h: Don't include insn-modes.h here.
* function-tests.c: Remove includes of signop.h, machmode.h,
double-int.h and wide-int.h.
* rtl.h: Likewise.
* gcc-rich-location.c: Remove includes of machmode.h, double-int.h
and wide-int.h.
* optc-save-gen.awk: Likewise.
* gencheck.c (BITS_PER_UNIT): Delete dummy definition.
* godump.c: Remove include of wide-int-print.h.
* pretty-print.h: Likewise.
* wide-int-print.cc: Likewise.
* wide-int.cc: Likewise.
* hash-map-tests.c: Remove include of signop.h.
* hash-set-tests.c: Likewise.
* rtl-tests.c: Likewise.
* mkconfig.sh: Remove include of machmode.h.
* genmodes.c (emit_insn_modes_h): Split emission of inline functions
into...
(emit_insn_modes_inline_h): ...this new function. Emit the code
into an insn-modes-inline.h header file, adding appropriate
include guards and end comments.
(emit_insn_modes_c_header): Remove include of machmode.h.
(emit_min_insn_modes_c_header): Include coretypes.h rather than
machmode.h.
(main): Handle -i flag and call emit_insn_modes_inline_h when
it is passed.
2017-07-02 Richard Sandiford <richard.sandiford@linaro.org>
* tree-ssa-strlen.c (strinfo): Rename the length field to

View File

@ -900,14 +900,15 @@ COMMON_TARGET_DEF = common/common-target.def target-hooks-macros.h
TARGET_H = $(TM_H) target.h $(TARGET_DEF) insn-modes.h insn-codes.h
C_TARGET_H = c-family/c-target.h $(C_TARGET_DEF)
COMMON_TARGET_H = common/common-target.h $(INPUT_H) $(COMMON_TARGET_DEF)
MACHMODE_H = machmode.h mode-classes.def insn-modes.h
MACHMODE_H = machmode.h mode-classes.def
HOOKS_H = hooks.h $(MACHMODE_H)
HOSTHOOKS_DEF_H = hosthooks-def.h $(HOOKS_H)
LANGHOOKS_DEF_H = langhooks-def.h $(HOOKS_H)
TARGET_DEF_H = target-def.h target-hooks-def.h $(HOOKS_H) targhooks.h
C_TARGET_DEF_H = c-family/c-target-def.h c-family/c-target-hooks-def.h \
$(TREE_H) $(C_COMMON_H) $(HOOKS_H) common/common-targhooks.h
RTL_BASE_H = coretypes.h rtl.h rtl.def $(MACHMODE_H) reg-notes.def \
CORETYPES_H = coretypes.h insn-modes.h insn-modes-inline.h
RTL_BASE_H = $(CORETYPES_H) rtl.h rtl.def $(MACHMODE_H) reg-notes.def \
insn-notes.def $(INPUT_H) $(REAL_H) statistics.h $(VEC_H) \
$(FIXED_VALUE_H) alias.h $(HASHTAB_H)
FIXED_VALUE_H = fixed-value.h $(MACHMODE_H) double-int.h
@ -919,7 +920,7 @@ BUILTINS_DEF = builtins.def sync-builtins.def omp-builtins.def \
hsa-builtins.def
INTERNAL_FN_DEF = internal-fn.def
INTERNAL_FN_H = internal-fn.h $(INTERNAL_FN_DEF)
TREE_CORE_H = tree-core.h coretypes.h all-tree.def tree.def \
TREE_CORE_H = tree-core.h $(CORETYPES_H) all-tree.def tree.def \
c-family/c-common.def $(lang_tree_files) $(MACHMODE_H) \
$(BUILTINS_DEF) $(INPUT_H) statistics.h \
$(VEC_H) treestruct.def $(HASHTAB_H) \
@ -1632,7 +1633,7 @@ MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \
insn-attr.h insn-attr-common.h insn-attrtab.c insn-dfatab.c \
insn-latencytab.c insn-opinit.c insn-opinit.h insn-preds.c insn-constants.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 \
tree-check.h min-insn-modes.c insn-modes.c insn-modes.h insn-modes-inline.h \
genrtl.h gt-*.h gtype-*.h gtype-desc.c gtyp-input.list \
case-cfn-macros.h cfn-operators.pd \
xgcc$(exeext) cpp$(exeext) $(FULL_DRIVER_NAME) \
@ -2318,6 +2319,7 @@ s-genrtl-h: build/gengenrtl$(build_exeext)
insn-modes.c: s-modes; @true
insn-modes.h: s-modes-h; @true
insn-modes-inline.h: s-modes-inline-h; @true
min-insn-modes.c: s-modes-m; @true
s-modes: build/genmodes$(build_exeext)
@ -2330,6 +2332,12 @@ s-modes-h: build/genmodes$(build_exeext)
$(SHELL) $(srcdir)/../move-if-change tmp-modes.h insn-modes.h
$(STAMP) s-modes-h
s-modes-inline-h: build/genmodes$(build_exeext)
$(RUN_GEN) build/genmodes$(build_exeext) -i > tmp-modes-inline.h
$(SHELL) $(srcdir)/../move-if-change tmp-modes-inline.h \
insn-modes-inline.h
$(STAMP) s-modes-inline-h
s-modes-m: build/genmodes$(build_exeext)
$(RUN_GEN) build/genmodes$(build_exeext) -m > tmp-min-modes.c
$(SHELL) $(srcdir)/../move-if-change tmp-min-modes.c min-insn-modes.c
@ -2566,7 +2574,8 @@ s-gtype: build/gengtype$(build_exeext) $(filter-out [%], $(GTFILES)) \
generated_files = config.h tm.h $(TM_P_H) $(TM_H) multilib.h \
$(simple_generated_h) specs.h \
tree-check.h genrtl.h insn-modes.h tm-preds.h tm-constrs.h \
tree-check.h genrtl.h insn-modes.h insn-modes-inline.h \
tm-preds.h tm-constrs.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 \
@ -2593,30 +2602,30 @@ build/version.o: version.c version.h \
# Header dependencies for the programs that generate source code.
# These are library modules...
build/errors.o : errors.c $(BCONFIG_H) $(SYSTEM_H) errors.h
build/gensupport.o: gensupport.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \
$(GTM_H) $(RTL_BASE_H) $(OBSTACK_H) errors.h $(HASHTAB_H) \
$(READ_MD_H) $(GENSUPPORT_H)
build/ggc-none.o : ggc-none.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \
build/gensupport.o: gensupport.c $(BCONFIG_H) $(SYSTEM_H) \
$(CORETYPES_H) $(GTM_H) $(RTL_BASE_H) $(OBSTACK_H) errors.h \
$(HASHTAB_H) $(READ_MD_H) $(GENSUPPORT_H)
build/ggc-none.o : ggc-none.c $(BCONFIG_H) $(SYSTEM_H) $(CORETYPES_H) \
$(GGC_H)
build/min-insn-modes.o : min-insn-modes.c $(BCONFIG_H) $(SYSTEM_H) \
$(MACHMODE_H)
build/print-rtl.o: print-rtl.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \
build/print-rtl.o: print-rtl.c $(BCONFIG_H) $(SYSTEM_H) $(CORETYPES_H) \
$(GTM_H) $(RTL_BASE_H)
build/read-md.o: read-md.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \
build/read-md.o: read-md.c $(BCONFIG_H) $(SYSTEM_H) $(CORETYPES_H) \
$(HASHTAB_H) errors.h $(READ_MD_H)
build/read-rtl.o: read-rtl.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \
build/read-rtl.o: read-rtl.c $(BCONFIG_H) $(SYSTEM_H) $(CORETYPES_H) \
$(GTM_H) $(RTL_BASE_H) $(OBSTACK_H) $(HASHTAB_H) $(READ_MD_H) \
$(GENSUPPORT_H)
build/rtl.o: rtl.c $(BCONFIG_H) coretypes.h $(GTM_H) $(SYSTEM_H) \
build/rtl.o: rtl.c $(BCONFIG_H) $(CORETYPES_H) $(GTM_H) $(SYSTEM_H) \
$(RTL_H) $(GGC_H) errors.h
build/vec.o : vec.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h $(VEC_H) \
$(GGC_H) toplev.h $(DIAGNOSTIC_CORE_H)
build/hash-table.o : hash-table.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \
$(HASH_TABLE_H) $(GGC_H) toplev.h $(DIAGNOSTIC_CORE_H)
build/inchash.o : inchash.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \
$(HASHTAB_H) inchash.h
build/vec.o : vec.c $(BCONFIG_H) $(SYSTEM_H) $(CORETYPES_H) $(VEC_H) \
$(GGC_H) toplev.h $(DIAGNOSTIC_CORE_H)
build/hash-table.o : hash-table.c $(BCONFIG_H) $(SYSTEM_H) \
$(CORETYPES_H) $(HASH_TABLE_H) $(GGC_H) toplev.h $(DIAGNOSTIC_CORE_H)
build/inchash.o : inchash.c $(BCONFIG_H) $(SYSTEM_H) $(CORETYPES_H) \
$(HASHTAB_H) inchash.h
build/gencondmd.o : build/gencondmd.c $(BCONFIG_H) $(SYSTEM_H) \
coretypes.h $(GTM_H) insn-constants.h \
$(CORETYPES_H) $(GTM_H) insn-constants.h \
$(filter-out insn-flags.h, $(RTL_H) $(TM_P_H) $(FUNCTION_H) $(REGS_H) \
$(RECOG_H) output.h $(FLAGS_H) $(RESOURCE_H) toplev.h $(DIAGNOSTIC_CORE_H) reload.h \
$(EXCEPT_H) tm-constrs.h)
@ -2628,39 +2637,39 @@ build/gencondmd.o : \
# ...these are the programs themselves.
build/genattr.o : genattr.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
coretypes.h $(GTM_H) errors.h $(READ_MD_H) $(GENSUPPORT_H)
$(CORETYPES_H) $(GTM_H) errors.h $(READ_MD_H) $(GENSUPPORT_H)
build/genattr-common.o : genattr-common.c $(RTL_BASE_H) $(BCONFIG_H) \
$(SYSTEM_H) coretypes.h $(GTM_H) errors.h $(READ_MD_H) $(GENSUPPORT_H)
$(SYSTEM_H) $(CORETYPES_H) $(GTM_H) errors.h $(READ_MD_H) $(GENSUPPORT_H)
build/genattrtab.o : genattrtab.c $(RTL_BASE_H) $(OBSTACK_H) \
$(BCONFIG_H) $(SYSTEM_H) coretypes.h $(GTM_H) errors.h $(GGC_H) \
$(BCONFIG_H) $(SYSTEM_H) $(CORETYPES_H) $(GTM_H) errors.h $(GGC_H) \
$(READ_MD_H) $(GENSUPPORT_H) $(FNMATCH_H)
build/genautomata.o : genautomata.c $(RTL_BASE_H) $(OBSTACK_H) \
$(BCONFIG_H) $(SYSTEM_H) coretypes.h $(GTM_H) errors.h $(VEC_H) \
$(BCONFIG_H) $(SYSTEM_H) $(CORETYPES_H) $(GTM_H) errors.h $(VEC_H) \
$(HASHTAB_H) $(GENSUPPORT_H) $(FNMATCH_H)
build/gencheck.o : gencheck.c all-tree.def $(BCONFIG_H) $(GTM_H) \
$(SYSTEM_H) coretypes.h tree.def c-family/c-common.def \
$(SYSTEM_H) $(CORETYPES_H) tree.def c-family/c-common.def \
$(lang_tree_files) gimple.def
build/genchecksum.o : genchecksum.c $(BCONFIG_H) $(SYSTEM_H) $(MD5_H)
build/gencodes.o : gencodes.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
coretypes.h $(GTM_H) errors.h $(GENSUPPORT_H)
$(CORETYPES_H) $(GTM_H) errors.h $(GENSUPPORT_H)
build/genconditions.o : genconditions.c $(RTL_BASE_H) $(BCONFIG_H) \
$(SYSTEM_H) coretypes.h $(GTM_H) errors.h $(HASHTAB_H) $(READ_MD_H) \
$(GENSUPPORT_H)
$(SYSTEM_H) $(CORETYPES_H) $(GTM_H) errors.h $(HASHTAB_H) \
$(READ_MD_H) $(GENSUPPORT_H)
build/genconfig.o : genconfig.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
coretypes.h $(GTM_H) errors.h $(GENSUPPORT_H)
$(CORETYPES_H) $(GTM_H) errors.h $(GENSUPPORT_H)
build/genconstants.o : genconstants.c $(BCONFIG_H) $(SYSTEM_H) \
coretypes.h errors.h $(READ_MD_H)
$(CORETYPES_H) errors.h $(READ_MD_H)
build/genemit.o : genemit.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
coretypes.h $(GTM_H) errors.h $(READ_MD_H) $(GENSUPPORT_H) internal-fn.def
$(CORETYPES_H) $(GTM_H) errors.h $(READ_MD_H) $(GENSUPPORT_H) internal-fn.def
build/genenums.o : genenums.c $(BCONFIG_H) $(SYSTEM_H) \
coretypes.h errors.h $(READ_MD_H)
$(CORETYPES_H) errors.h $(READ_MD_H)
build/genextract.o : genextract.c $(RTL_BASE_H) $(BCONFIG_H) \
$(SYSTEM_H) coretypes.h $(GTM_H) errors.h $(READ_MD_H) $(GENSUPPORT_H)
$(SYSTEM_H) $(CORETYPES_H) $(GTM_H) errors.h $(READ_MD_H) $(GENSUPPORT_H)
build/genflags.o : genflags.c $(RTL_BASE_H) $(OBSTACK_H) $(BCONFIG_H) \
$(SYSTEM_H) coretypes.h $(GTM_H) errors.h $(READ_MD_H) $(GENSUPPORT_H)
$(SYSTEM_H) $(CORETYPES_H) $(GTM_H) errors.h $(READ_MD_H) $(GENSUPPORT_H)
build/gentarget-def.o : gentarget-def.c $(BCONFIG_H) $(SYSTEM_H) \
coretypes.h $(GTM_H) $(RTL_BASE_H) errors.h $(READ_MD_H) $(GENSUPPORT_H) \
$(HASH_TABLE_H) target-insns.def
$(CORETYPES_H) $(GTM_H) $(RTL_BASE_H) errors.h $(READ_MD_H) \
$(GENSUPPORT_H) $(HASH_TABLE_H) target-insns.def
build/gengenrtl.o : gengenrtl.c $(BCONFIG_H) $(SYSTEM_H) rtl.def
# The gengtype generator program is special: Two versions are built.
@ -2696,30 +2705,32 @@ build/gengtype.o: $(BCONFIG_H)
CFLAGS-errors.o += -DHOST_GENERATOR_FILE
build/genmddeps.o: genmddeps.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \
build/genmddeps.o: genmddeps.c $(BCONFIG_H) $(SYSTEM_H) $(CORETYPES_H) \
errors.h $(READ_MD_H)
build/genmodes.o : genmodes.c $(BCONFIG_H) $(SYSTEM_H) errors.h \
$(HASHTAB_H) machmode.def $(extra_modes_file)
build/genopinit.o : genopinit.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
coretypes.h $(GTM_H) errors.h $(GENSUPPORT_H) optabs.def
$(CORETYPES_H) $(GTM_H) errors.h $(GENSUPPORT_H) optabs.def
build/genoutput.o : genoutput.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
coretypes.h $(GTM_H) errors.h $(READ_MD_H) $(GENSUPPORT_H)
$(CORETYPES_H) $(GTM_H) errors.h $(READ_MD_H) $(GENSUPPORT_H)
build/genpeep.o : genpeep.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
coretypes.h $(GTM_H) errors.h $(GENSUPPORT_H) toplev.h $(DIAGNOSTIC_CORE_H)
$(CORETYPES_H) $(GTM_H) errors.h $(GENSUPPORT_H) toplev.h \
$(DIAGNOSTIC_CORE_H)
build/genpreds.o : genpreds.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
coretypes.h $(GTM_H) errors.h $(READ_MD_H) $(GENSUPPORT_H) $(OBSTACK_H)
$(CORETYPES_H) $(GTM_H) errors.h $(READ_MD_H) $(GENSUPPORT_H) $(OBSTACK_H)
build/genrecog.o : genrecog.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
coretypes.h $(GTM_H) errors.h $(READ_MD_H) $(GENSUPPORT_H) \
$(CORETYPES_H) $(GTM_H) errors.h $(READ_MD_H) $(GENSUPPORT_H) \
$(HASH_TABLE_H) inchash.h
build/genhooks.o : genhooks.c $(TARGET_DEF) $(C_TARGET_DEF) \
$(COMMON_TARGET_DEF) $(BCONFIG_H) $(SYSTEM_H) errors.h
build/genmddump.o : genmddump.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
coretypes.h $(GTM_H) errors.h $(READ_MD_H) $(GENSUPPORT_H)
$(CORETYPES_H) $(GTM_H) errors.h $(READ_MD_H) $(GENSUPPORT_H)
build/genmatch.o : genmatch.c $(BCONFIG_H) $(SYSTEM_H) \
coretypes.h errors.h $(HASH_TABLE_H) hash-map.h $(GGC_H) is-a.h \
$(CORETYPES_H) errors.h $(HASH_TABLE_H) hash-map.h $(GGC_H) is-a.h \
tree.def builtins.def internal-fn.def
build/gencfn-macros.o : gencfn-macros.c $(BCONFIG_H) $(SYSTEM_H) \
coretypes.h errors.h $(HASH_TABLE_H) hash-set.h builtins.def internal-fn.def
$(CORETYPES_H) errors.h $(HASH_TABLE_H) hash-set.h builtins.def \
internal-fn.def
# Compile the programs that generate insn-* from the machine description.
# They are compiled with $(COMPILER_FOR_BUILD), and associated libraries,
@ -2817,8 +2828,8 @@ CFLAGS-cppdefault.o += $(PREPROCESSOR_DEFINES)
# having an empty command (nothing following the semicolon).
# gcov-iov.c is run on the build machine to generate gcov-iov.h from version.c
build/gcov-iov.o: gcov-iov.c $(BCONFIG_H) coretypes.h $(GTM_H) \
$(SYSTEM_H) coretypes.h $(TM_H)
build/gcov-iov.o: gcov-iov.c $(BCONFIG_H) $(CORETYPES_H) $(GTM_H) \
$(SYSTEM_H) $(CORETYPES_H) $(TM_H)
build/gcov-iov$(build_exeext): build/gcov-iov.o
+$(LINKER_FOR_BUILD) $(BUILD_LINKERFLAGS) $(BUILD_LDFLAGS) \

View File

@ -358,12 +358,17 @@ typedef void (*gt_pointer_operator) (void *, void *);
typedef unsigned char uchar;
#endif
/* Most host source files will require the following headers. */
#if !defined (GENERATOR_FILE) && !defined (USED_FOR_TARGET)
#include "machmode.h"
/* Most source files will require the following headers. */
#if !defined (USED_FOR_TARGET)
#include "insn-modes.h"
#include "signop.h"
#include "wide-int.h"
#include "wide-int-print.h"
#include "insn-modes-inline.h"
#include "machmode.h"
#include "double-int.h"
/* Most host source files will require the following headers. */
#if !defined (GENERATOR_FILE)
#include "real.h"
#include "fixed-value.h"
#include "hash-table.h"
@ -372,6 +377,7 @@ typedef unsigned char uchar;
#include "is-a.h"
#include "memory-block.h"
#include "dumpfile.h"
#endif
#endif /* GENERATOR_FILE && !USED_FOR_TARGET */
#endif /* coretypes.h */

View File

@ -22,7 +22,6 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "tm.h"
#include "opts.h"
#include "signop.h"
#include "hash-set.h"
#include "fixed-value.h"
#include "alias.h"
@ -38,7 +37,6 @@ along with GCC; see the file COPYING3. If not see
#include "vec.h"
#include "hashtab.h"
#include "hash-set.h"
#include "machmode.h"
#include "hard-reg-set.h"
#include "input.h"
#include "function.h"
@ -56,10 +54,8 @@ along with GCC; see the file COPYING3. If not see
#include "gimplify.h"
#include "tree-cfg.h"
#include "basic-block.h"
#include "double-int.h"
#include "alias.h"
#include "symtab.h"
#include "wide-int.h"
#include "inchash.h"
#include "tree.h"
#include "fold-const.h"

View File

@ -23,13 +23,10 @@ along with GCC; see the file COPYING3. If not see
#include "tm.h"
#include "rtl.h"
#include "hash-set.h"
#include "machmode.h"
#include "vec.h"
#include "double-int.h"
#include "input.h"
#include "alias.h"
#include "symtab.h"
#include "wide-int.h"
#include "inchash.h"
#include "tree-core.h"
#include "tree.h"

View File

@ -17,9 +17,6 @@ You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
/* We don't have insn-modes.h, but we include tm.h. */
#define BITS_PER_UNIT 8
#include "bconfig.h"
#include "system.h"
#include "coretypes.h"

View File

@ -1204,6 +1204,24 @@ enum machine_mode\n{");
printf ("#define NUM_INT_N_ENTS %d\n", n_int_n_ents);
puts ("\
\n\
#endif /* insn-modes.h */");
}
static void
emit_insn_modes_inline_h (void)
{
printf ("/* Generated automatically from machmode.def%s%s\n",
HAVE_EXTRA_MODES ? " and " : "",
EXTRA_MODES_FILE);
puts ("\
by genmodes. */\n\
\n\
#ifndef GCC_INSN_MODES_INLINE_H\n\
#define GCC_INSN_MODES_INLINE_H");
puts ("\n#if !defined (USED_FOR_TARGET) && GCC_VERSION >= 4001\n");
emit_mode_size_inline ();
emit_mode_nunits_inline ();
@ -1214,7 +1232,7 @@ enum machine_mode\n{");
puts ("\
\n\
#endif /* insn-modes.h */");
#endif /* insn-modes-inline.h */");
}
static void
@ -1231,7 +1249,6 @@ emit_insn_modes_c_header (void)
#include \"system.h\"\n\
#include \"coretypes.h\"\n\
#include \"tm.h\"\n\
#include \"machmode.h\"\n\
#include \"real.h\"");
}
@ -1247,7 +1264,7 @@ emit_min_insn_modes_c_header (void)
\n\
#include \"bconfig.h\"\n\
#include \"system.h\"\n\
#include \"machmode.h\"");
#include \"coretypes.h\"");
}
static void
@ -1799,18 +1816,20 @@ emit_min_insn_modes_c (void)
int
main (int argc, char **argv)
{
bool gen_header = false, gen_min = false;
bool gen_header = false, gen_inlines = false, gen_min = false;
progname = argv[0];
if (argc == 1)
;
else if (argc == 2 && !strcmp (argv[1], "-h"))
gen_header = true;
else if (argc == 2 && !strcmp (argv[1], "-i"))
gen_inlines = true;
else if (argc == 2 && !strcmp (argv[1], "-m"))
gen_min = true;
else
{
error ("usage: %s [-h|-m] > file", progname);
error ("usage: %s [-h|-i|-m] > file", progname);
return FATAL_EXIT_CODE;
}
@ -1826,6 +1845,8 @@ main (int argc, char **argv)
if (gen_header)
emit_insn_modes_h ();
else if (gen_inlines)
emit_insn_modes_inline_h ();
else if (gen_min)
emit_min_insn_modes_c ();
else

View File

@ -31,7 +31,6 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "wide-int-print.h"
#include "diagnostic-core.h"
#include "debug.h"
#include "stor-layout.h"

View File

@ -22,7 +22,6 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "tm.h"
#include "opts.h"
#include "signop.h"
#include "hash-set.h"
#include "fixed-value.h"
#include "alias.h"

View File

@ -22,7 +22,6 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "tm.h"
#include "opts.h"
#include "signop.h"
#include "hash-set.h"
#include "selftest.h"

View File

@ -20,9 +20,6 @@ along with GCC; see the file COPYING3. If not see
#ifndef HAVE_MACHINE_MODES
#define HAVE_MACHINE_MODES
/* Make an enum class that gives all the machine modes. */
#include "insn-modes.h"
/* Get the name of mode MODE as a string. */
extern const char * const mode_name[NUM_MACHINE_MODES];

View File

@ -100,9 +100,6 @@ case $output in
#if defined IN_GCC && !defined GENERATOR_FILE
# include "insn-modes.h"
#endif
#if defined IN_GCC && defined GENERATOR_FILE && !defined BITS_PER_UNIT
#include "machmode.h"
#endif
EOF
;;
esac

View File

@ -41,13 +41,10 @@ print "#include " quote "flags.h" quote
print "#include " quote "target.h" quote
print "#include " quote "inchash.h" quote
print "#include " quote "hash-set.h" quote
print "#include " quote "machmode.h" quote
print "#include " quote "vec.h" quote
print "#include " quote "double-int.h" quote
print "#include " quote "input.h" quote
print "#include " quote "alias.h" quote
print "#include " quote "symtab.h" quote
print "#include " quote "wide-int.h" quote
print "#include " quote "inchash.h" quote
print "#include " quote "tree.h" quote
print "#include " quote "fold-const.h" quote

View File

@ -22,7 +22,6 @@ along with GCC; see the file COPYING3. If not see
#define GCC_PRETTY_PRINT_H
#include "obstack.h"
#include "wide-int-print.h"
/* Maximum number of format string arguments. */
#define PP_NL_ARGMAX 30

View File

@ -22,7 +22,6 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "tm.h"
#include "opts.h"
#include "signop.h"
#include "hash-set.h"
#include "fixed-value.h"
#include "alias.h"

View File

@ -24,10 +24,6 @@ along with GCC; see the file COPYING3. If not see
machmode.h and other files to exist and would not normally have been
included by coretypes.h. */
#ifdef GENERATOR_FILE
#include "machmode.h"
#include "signop.h"
#include "wide-int.h"
#include "double-int.h"
#include "real.h"
#include "fixed-value.h"
#include "statistics.h"

View File

@ -21,7 +21,6 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "wide-int-print.h"
/*
* public printing routines.

View File

@ -24,7 +24,6 @@ along with GCC; see the file COPYING3. If not see
#include "tm.h"
#include "tree.h"
#include "selftest.h"
#include "wide-int-print.h"
#define HOST_BITS_PER_HALF_WIDE_INT 32