diff --git a/contrib/header-tools/ChangeLog b/contrib/header-tools/ChangeLog index bf89e6c2da9..8977a000cd9 100644 --- a/contrib/header-tools/ChangeLog +++ b/contrib/header-tools/ChangeLog @@ -1,3 +1,9 @@ +2017-07-02 Richard Sandiford + Alan Hayward + David Sherwood + + * graph-header-logs (ignore): Update coretypes.h header list. + 2016-06-21 Trevor Saunders * README: Remove references to avr-rtems. diff --git a/contrib/header-tools/graph-header-logs b/contrib/header-tools/graph-header-logs index d4febd7f571..e537aaeac0c 100755 --- a/contrib/header-tools/graph-header-logs +++ b/contrib/header-tools/graph-header-logs @@ -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", diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f7c24de6f9d..f90ed507a47 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,55 @@ +2017-07-02 Richard Sandiford + Alan Hayward + David Sherwood + + * 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 * tree-ssa-strlen.c (strinfo): Rename the length field to diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 67d69c1c0d2..a3beaad614e 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -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) \ diff --git a/gcc/coretypes.h b/gcc/coretypes.h index b7c3704eff8..9ceb5391b3c 100644 --- a/gcc/coretypes.h +++ b/gcc/coretypes.h @@ -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 */ diff --git a/gcc/function-tests.c b/gcc/function-tests.c index ca30028143b..9e6e0116077 100644 --- a/gcc/function-tests.c +++ b/gcc/function-tests.c @@ -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" diff --git a/gcc/gcc-rich-location.c b/gcc/gcc-rich-location.c index 68bcb7d24f1..09f3081dd15 100644 --- a/gcc/gcc-rich-location.c +++ b/gcc/gcc-rich-location.c @@ -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" diff --git a/gcc/gencheck.c b/gcc/gencheck.c index f541d1c5389..7d71a62db2c 100644 --- a/gcc/gencheck.c +++ b/gcc/gencheck.c @@ -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 . */ -/* 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" diff --git a/gcc/genmodes.c b/gcc/genmodes.c index e56c08b4d30..f7eaeef2fe6 100644 --- a/gcc/genmodes.c +++ b/gcc/genmodes.c @@ -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 diff --git a/gcc/godump.c b/gcc/godump.c index 3e905319b8f..28d81a1e260 100644 --- a/gcc/godump.c +++ b/gcc/godump.c @@ -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" diff --git a/gcc/hash-map-tests.c b/gcc/hash-map-tests.c index 1fd796e8cb0..fb5b365c129 100644 --- a/gcc/hash-map-tests.c +++ b/gcc/hash-map-tests.c @@ -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" diff --git a/gcc/hash-set-tests.c b/gcc/hash-set-tests.c index 67ba42007db..9c48da25159 100644 --- a/gcc/hash-set-tests.c +++ b/gcc/hash-set-tests.c @@ -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" diff --git a/gcc/machmode.h b/gcc/machmode.h index 42b14d09c1b..4b861ac41dd 100644 --- a/gcc/machmode.h +++ b/gcc/machmode.h @@ -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]; diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh index 9fc7b5ca734..3ee7fd32218 100644 --- a/gcc/mkconfig.sh +++ b/gcc/mkconfig.sh @@ -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 diff --git a/gcc/optc-save-gen.awk b/gcc/optc-save-gen.awk index d79d1e9cd8d..fc582103f6f 100644 --- a/gcc/optc-save-gen.awk +++ b/gcc/optc-save-gen.awk @@ -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 diff --git a/gcc/pretty-print.h b/gcc/pretty-print.h index 40e56a35d93..98296b1c20f 100644 --- a/gcc/pretty-print.h +++ b/gcc/pretty-print.h @@ -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 diff --git a/gcc/rtl-tests.c b/gcc/rtl-tests.c index 705434012d6..54bd6a37e7f 100644 --- a/gcc/rtl-tests.c +++ b/gcc/rtl-tests.c @@ -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" diff --git a/gcc/rtl.h b/gcc/rtl.h index c3790ccde9b..59da995c21a 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -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" diff --git a/gcc/wide-int-print.cc b/gcc/wide-int-print.cc index c67b1a08bbf..36d8ad863f5 100644 --- a/gcc/wide-int-print.cc +++ b/gcc/wide-int-print.cc @@ -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. diff --git a/gcc/wide-int.cc b/gcc/wide-int.cc index dab4c194f23..71e24ec22af 100644 --- a/gcc/wide-int.cc +++ b/gcc/wide-int.cc @@ -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