diff options
52 files changed, 262 insertions, 230 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cd83b5f..cda7a12 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,32 @@ +2010-11-30 Joseph Myers <joseph@codesourcery.com> + + * hwint.c: New. Extracted from toplev.c. + * hwint.h (clz_hwi, ctz_hwi, ffs_hwi, exact_log2, floor_log2): + Move from toplev.h. + * toplev.c (clz_hwi, ctz_hwi, ffs_hwi, exact_log2, floor_log2): + Move to hwint.c. + * toplev.h (clz_hwi, ctz_hwi, ffs_hwi, exact_log2, floor_log2): + Move to hwint.h. + * builtins.c, combine.c, config/i386/winnt.c, double-int.c, + explow.c, expmed.c, fold-const.c, ggc-page.c, ggc-zone.c, ifcvt.c, + ipa-struct-reorg.c, ira-color.c, matrix-reorg.c, omp-low.c, + real.c, recog.c, reload.c, rtlanal.c, simplify-rtx.c, + stor-layout.c, tree-dfa.c, tree-ssa-alias.c, + tree-ssa-loop-niter.c, tree-vect-data-refs.c, + tree-vect-loop-manip.c, tree-vect-loop.c, tree-vect-stmts.c, + tree-vrp.c: Don't include toplev.h. + * genattrtab.c, genconditions.c, genemit.c, genextract.c, + genoutput.c, genpeep.c, genpreds.c, genrecog.c: Don't include + toplev.h in generated output. + * Makefile.in (OBJS-common): Add hwint.o. + Dependencies for above files changed to remove toplev.h. + (hwint.o): New. + (insn-attrtab.o, insn-emit.o, insn-extract.o, insn-output.o, + insn-peep.o, insn-preds.o, insn-recog.o): Don't depend on + toplev.h. + * config/i386/t-cygming (winnt.o): Don't depend on toplev.h. + * config/i386/t-interix (winnt.o): Don't depend on toplev.h. + 2010-11-30 Richard Guenther <rguenther@suse.de> PR tree-optimization/46717 diff --git a/gcc/Makefile.in b/gcc/Makefile.in index b2f2dac..0852220 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -1263,6 +1263,7 @@ OBJS-common = \ gtype-desc.o \ haifa-sched.o \ hooks.o \ + hwint.o \ ifcvt.o \ implicit-zee.o \ init-regs.o \ @@ -2276,11 +2277,11 @@ ggc-common.o: ggc-common.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(HOSTHOOKS_DEF_H) $(VEC_H) $(PLUGIN_H) $(GGC_INTERNAL_H) $(TIMEVAR_H) ggc-page.o: ggc-page.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \ - $(FLAGS_H) toplev.h $(DIAGNOSTIC_CORE_H) $(GGC_H) $(TIMEVAR_H) $(TM_P_H) $(PARAMS_H) \ + $(FLAGS_H) $(DIAGNOSTIC_CORE_H) $(GGC_H) $(TIMEVAR_H) $(TM_P_H) $(PARAMS_H) \ $(TREE_FLOW_H) $(PLUGIN_H) $(GGC_INTERNAL_H) ggc-zone.o: ggc-zone.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ - $(TREE_H) $(FLAGS_H) toplev.h $(DIAGNOSTIC_CORE_H) $(GGC_H) $(TIMEVAR_H) $(TM_P_H) \ + $(TREE_H) $(FLAGS_H) $(DIAGNOSTIC_CORE_H) $(GGC_H) $(TIMEVAR_H) $(TM_P_H) \ $(PARAMS_H) $(BITMAP_H) $(PLUGIN_H) $(GGC_INTERNAL_H) ggc-none.o: ggc-none.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(GGC_H) \ @@ -2362,7 +2363,7 @@ print-tree.o : print-tree.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H stor-layout.o : stor-layout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(TREE_H) $(PARAMS_H) $(FLAGS_H) $(FUNCTION_H) $(EXPR_H) output.h $(RTL_H) \ $(GGC_H) $(TM_P_H) $(TARGET_H) langhooks.h $(REGS_H) gt-stor-layout.h \ - toplev.h $(DIAGNOSTIC_CORE_H) $(CGRAPH_H) $(TREE_INLINE_H) $(TREE_DUMP_H) $(GIMPLE_H) + $(DIAGNOSTIC_CORE_H) $(CGRAPH_H) $(TREE_INLINE_H) $(TREE_DUMP_H) $(GIMPLE_H) tree-ssa-structalias.o: tree-ssa-structalias.c \ $(SYSTEM_H) $(CONFIG_H) coretypes.h $(TM_H) $(GGC_H) $(OBSTACK_H) $(BITMAP_H) \ $(FLAGS_H) $(TM_P_H) $(BASIC_BLOCK_H) output.h \ @@ -2491,7 +2492,7 @@ tree-ssa-sccvn.o : tree-ssa-sccvn.c $(TREE_FLOW_H) $(CONFIG_H) \ tree-vrp.o : tree-vrp.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ $(TREE_FLOW_H) $(TREE_PASS_H) $(TREE_DUMP_H) $(DIAGNOSTIC_H) $(GGC_H) \ $(BASIC_BLOCK_H) tree-ssa-propagate.h $(FLAGS_H) $(TREE_DUMP_H) \ - $(CFGLOOP_H) $(SCEV_H) $(TIMEVAR_H) toplev.h intl.h tree-pretty-print.h \ + $(CFGLOOP_H) $(SCEV_H) $(TIMEVAR_H) intl.h tree-pretty-print.h \ gimple-pretty-print.h tree-cfg.o : tree-cfg.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) $(FLAGS_H) output.h \ @@ -2531,7 +2532,7 @@ tree-dfa.o : tree-dfa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ $(TREE_INLINE_H) $(HASHTAB_H) pointer-set.h $(FLAGS_H) $(FUNCTION_H) \ $(TIMEVAR_H) convert.h $(TM_H) coretypes.h langhooks.h $(TREE_DUMP_H) \ $(TREE_PASS_H) $(PARAMS_H) $(CGRAPH_H) $(BASIC_BLOCK_H) $(GIMPLE_H) \ - tree-pretty-print.h toplev.h + tree-pretty-print.h tree-ssa-operands.o : tree-ssa-operands.c $(TREE_FLOW_H) $(CONFIG_H) \ $(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) $(TREE_INLINE_H) \ $(FLAGS_H) $(FUNCTION_H) $(TM_H) $(TIMEVAR_H) $(TREE_PASS_H) \ @@ -2559,7 +2560,7 @@ tree-ssa-address.o : tree-ssa-address.c $(TREE_FLOW_H) $(CONFIG_H) \ tree-ssa-loop-niter.o : tree-ssa-loop-niter.c $(TREE_FLOW_H) $(CONFIG_H) \ $(SYSTEM_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) $(PARAMS_H) \ $(TREE_INLINE_H) output.h $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \ - toplev.h $(DIAGNOSTIC_CORE_H) $(FLAGS_H) $(TREE_PASS_H) $(TREE_DATA_REF_H) \ + $(DIAGNOSTIC_CORE_H) $(FLAGS_H) $(TREE_PASS_H) $(TREE_DATA_REF_H) \ $(BASIC_BLOCK_H) $(GGC_H) intl.h tree-pretty-print.h gimple-pretty-print.h tree-ssa-loop-ivcanon.o : tree-ssa-loop-ivcanon.c $(TREE_FLOW_H) $(CONFIG_H) \ $(SYSTEM_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) $(PARAMS_H) \ @@ -2613,7 +2614,7 @@ tree-ssa-alias.o : tree-ssa-alias.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ $(TREE_DUMP_H) $(TREE_PASS_H) $(PARAMS_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) \ $(GIMPLE_H) $(VEC_H) \ $(IPA_TYPE_ESCAPE_H) vecprim.h pointer-set.h alloc-pool.h \ - tree-pretty-print.h toplev.h + tree-pretty-print.h tree-ssa-reassoc.o : tree-ssa-reassoc.c $(TREE_FLOW_H) $(CONFIG_H) \ $(SYSTEM_H) $(TREE_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \ $(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_PASS_H) $(FLAGS_H) \ @@ -2648,7 +2649,7 @@ gimple-low.o : gimple-low.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \ $(HASHTAB_H) toplev.h $(DIAGNOSTIC_CORE_H) tree-iterator.h omp-low.o : omp-low.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ $(RTL_H) $(GIMPLE_H) $(TREE_INLINE_H) langhooks.h $(DIAGNOSTIC_CORE_H) \ - $(TREE_FLOW_H) $(TIMEVAR_H) $(FLAGS_H) $(EXPR_H) toplev.h $(DIAGNOSTIC_CORE_H) \ + $(TREE_FLOW_H) $(TIMEVAR_H) $(FLAGS_H) $(EXPR_H) $(DIAGNOSTIC_CORE_H) \ $(TREE_PASS_H) $(GGC_H) $(EXCEPT_H) $(SPLAY_TREE_H) $(OPTABS_H) \ $(CFGLOOP_H) tree-iterator.h gt-omp-low.h tree-browser.o : tree-browser.c tree-browser.def $(CONFIG_H) $(SYSTEM_H) \ @@ -2740,11 +2741,11 @@ graphite-sese-to-poly.o: graphite-sese-to-poly.c $(CONFIG_H) \ tree-vect-loop.o: tree-vect-loop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(GGC_H) $(TREE_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) \ $(TREE_DUMP_H) $(CFGLOOP_H) $(CFGLAYOUT_H) $(EXPR_H) $(RECOG_H) $(OPTABS_H) \ - toplev.h $(DIAGNOSTIC_CORE_H) $(SCEV_H) $(TREE_VECTORIZER_H) tree-pretty-print.h \ + $(DIAGNOSTIC_CORE_H) $(SCEV_H) $(TREE_VECTORIZER_H) tree-pretty-print.h \ gimple-pretty-print.h $(TARGET_H) tree-vect-loop-manip.o: tree-vect-loop-manip.c $(CONFIG_H) $(SYSTEM_H) \ coretypes.h $(TM_H) $(GGC_H) $(TREE_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) \ - $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(CFGLAYOUT_H) $(EXPR_H) toplev.h $(DIAGNOSTIC_CORE_H) \ + $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(CFGLAYOUT_H) $(EXPR_H) $(DIAGNOSTIC_CORE_H) \ $(SCEV_H) $(TREE_VECTORIZER_H) langhooks.h tree-pretty-print.h \ gimple-pretty-print.h tree-vect-patterns.o: tree-vect-patterns.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ @@ -2760,12 +2761,12 @@ tree-vect-slp.o: tree-vect-slp.c $(CONFIG_H) $(SYSTEM_H) \ tree-vect-stmts.o: tree-vect-stmts.c $(CONFIG_H) $(SYSTEM_H) \ coretypes.h $(TM_H) $(GGC_H) $(TREE_H) $(TARGET_H) $(BASIC_BLOCK_H) \ $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(CFGLAYOUT_H) \ - $(EXPR_H) $(RECOG_H) $(OPTABS_H) toplev.h $(DIAGNOSTIC_CORE_H) $(TREE_VECTORIZER_H) \ + $(EXPR_H) $(RECOG_H) $(OPTABS_H) $(DIAGNOSTIC_CORE_H) $(TREE_VECTORIZER_H) \ langhooks.h tree-pretty-print.h gimple-pretty-print.h tree-vect-data-refs.o: tree-vect-data-refs.c $(CONFIG_H) $(SYSTEM_H) \ coretypes.h $(TM_H) $(GGC_H) $(TREE_H) $(TARGET_H) $(BASIC_BLOCK_H) \ $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) \ - $(EXPR_H) $(OPTABS_H) $(SCEV_H) $(TREE_VECTORIZER_H) toplev.h \ + $(EXPR_H) $(OPTABS_H) $(SCEV_H) $(TREE_VECTORIZER_H) \ $(DIAGNOSTIC_CORE_H) $(TM_P_H) \ tree-pretty-print.h gimple-pretty-print.h tree-vectorizer.o: tree-vectorizer.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ @@ -2817,7 +2818,7 @@ tree-pretty-print.o : tree-pretty-print.c $(CONFIG_H) $(SYSTEM_H) \ tree-diagnostic.o : tree-diagnostic.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TREE_H) $(DIAGNOSTIC_H) tree-diagnostic.h langhooks.h $(LANGHOOKS_DEF_H) fold-const.o : fold-const.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ - $(TREE_H) $(FLAGS_H) toplev.h $(DIAGNOSTIC_CORE_H) $(HASHTAB_H) $(EXPR_H) $(RTL_H) \ + $(TREE_H) $(FLAGS_H) $(DIAGNOSTIC_CORE_H) $(HASHTAB_H) $(EXPR_H) $(RTL_H) \ $(GGC_H) $(TM_P_H) langhooks.h $(MD5_H) intl.h $(TARGET_H) \ $(GIMPLE_H) realmpfr.h $(TREE_FLOW_H) diagnostic.o : diagnostic.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ @@ -2862,6 +2863,8 @@ toplev.o : toplev.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ -DTARGET_NAME=\"$(target_noncanonical)\" \ -c $(srcdir)/toplev.c $(OUTPUT_OPTION) +hwint.o : hwint.c $(CONFIG_H) $(SYSTEM_H) + passes.o : passes.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ $(RTL_H) $(FUNCTION_H) $(FLAGS_H) xcoffout.h $(INPUT_H) $(INSN_ATTR_H) output.h \ $(DIAGNOSTIC_CORE_H) debug.h insn-config.h intl.h $(RECOG_H) toplev.h \ @@ -2937,7 +2940,7 @@ dojump.o : dojump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_ builtins.o : builtins.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(TREE_H) $(GIMPLE_H) $(FLAGS_H) $(TARGET_H) $(FUNCTION_H) $(REGS_H) \ $(EXPR_H) $(OPTABS_H) insn-config.h $(RECOG_H) output.h typeclass.h \ - hard-reg-set.h toplev.h $(DIAGNOSTIC_CORE_H) hard-reg-set.h $(EXCEPT_H) \ + hard-reg-set.h $(DIAGNOSTIC_CORE_H) hard-reg-set.h $(EXCEPT_H) \ $(TM_P_H) $(PREDICT_H) $(LIBFUNCS_H) langhooks.h $(BASIC_BLOCK_H) \ tree-mudflap.h realmpfr.h $(BUILTINS_DEF) $(MACHMODE_H) \ $(DIAGNOSTIC_CORE_H) $(TREE_FLOW_H) value-prof.h @@ -2948,11 +2951,11 @@ calls.o : calls.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(DBGCNT_H) $(TREE_FLOW_H) expmed.o : expmed.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \ $(FLAGS_H) insn-config.h $(EXPR_H) $(OPTABS_H) $(RECOG_H) \ - toplev.h $(DIAGNOSTIC_CORE_H) $(TM_P_H) langhooks.h $(DF_H) $(TARGET_H) \ + $(DIAGNOSTIC_CORE_H) $(TM_P_H) langhooks.h $(DF_H) $(TARGET_H) \ expmed.h explow.o : explow.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \ $(FLAGS_H) hard-reg-set.h insn-config.h $(EXPR_H) $(OPTABS_H) $(RECOG_H) \ - toplev.h $(DIAGNOSTIC_CORE_H) $(EXCEPT_H) $(FUNCTION_H) $(GGC_H) $(TM_P_H) langhooks.h gt-explow.h \ + $(DIAGNOSTIC_CORE_H) $(EXCEPT_H) $(FUNCTION_H) $(GGC_H) $(TM_P_H) langhooks.h gt-explow.h \ $(TARGET_H) output.h optabs.o : optabs.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(TREE_H) $(FLAGS_H) insn-config.h $(EXPR_H) $(OPTABS_H) $(LIBFUNCS_H) \ @@ -2990,7 +2993,7 @@ emit-rtl.o : emit-rtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(HASHTAB_H) $(TM_P_H) debug.h langhooks.h $(TREE_PASS_H) gt-emit-rtl.h \ $(DF_H) $(PARAMS_H) $(TARGET_H) real.o : real.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ - toplev.h $(DIAGNOSTIC_CORE_H) $(TM_P_H) $(REAL_H) dfp.h realmpfr.h + $(DIAGNOSTIC_CORE_H) $(TM_P_H) $(REAL_H) dfp.h realmpfr.h realmpfr.o : realmpfr.c realmpfr.h $(CONFIG_H) $(SYSTEM_H) $(REAL_H) dfp.o : dfp.c dfp.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ $(DIAGNOSTIC_CORE_H) $(TM_P_H) $(REAL_H) $(DECNUM_H) @@ -3008,7 +3011,7 @@ jump.o : jump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(PREDICT_H) $(TIMEVAR_H) $(TARGET_H) simplify-rtx.o : simplify-rtx.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \ - $(RECOG_H) $(EXPR_H) toplev.h $(DIAGNOSTIC_CORE_H) output.h $(FUNCTION_H) $(GGC_H) $(TM_P_H) \ + $(RECOG_H) $(EXPR_H) $(DIAGNOSTIC_CORE_H) output.h $(FUNCTION_H) $(GGC_H) $(TM_P_H) \ $(TREE_H) $(TARGET_H) cgraph.o : cgraph.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ langhooks.h toplev.h $(DIAGNOSTIC_CORE_H) $(FLAGS_H) $(GGC_H) $(TARGET_H) $(CGRAPH_H) \ @@ -3049,7 +3052,7 @@ ipa-split.o : ipa-split.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TREE_INLINE_H) $(FIBHEAP_H) $(PARAMS_H) matrix-reorg.o : matrix-reorg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(TREE_H) $(RTL_H) $(TREE_INLINE_H) $(TREE_FLOW_H) \ - tree-flow-inline.h langhooks.h $(HASHTAB_H) toplev.h $(DIAGNOSTIC_CORE_H) $(FLAGS_H) $(GGC_H) \ + tree-flow-inline.h langhooks.h $(HASHTAB_H) $(DIAGNOSTIC_CORE_H) $(FLAGS_H) $(GGC_H) \ debug.h $(TARGET_H) $(CGRAPH_H) $(DIAGNOSTIC_CORE_H) $(TIMEVAR_H) \ $(PARAMS_H) $(FIBHEAP_H) intl.h $(FUNCTION_H) $(BASIC_BLOCK_H) \ $(CFGLOOP_H) tree-iterator.h $(TREE_PASS_H) $(OPTS_H) $(TREE_DATA_REF_H) \ @@ -3081,7 +3084,7 @@ ipa-type-escape.o : ipa-type-escape.c $(CONFIG_H) $(SYSTEM_H) \ $(TIMEVAR_H) $(DIAGNOSTIC_H) $(FUNCTION_H) tree-pretty-print.h ipa-struct-reorg.o: ipa-struct-reorg.c ipa-struct-reorg.h $(CONFIG_H) $(SYSTEM_H) \ coretypes.h $(TM_H) $(GGC_H) $(TREE_H) $(RTL_H) $(GIMPLE_H) tree-inline.h \ - $(TREE_FLOW_H) langhooks.h pointer-set.h $(HASHTAB_H) toplev.h $(DIAGNOSTIC_CORE_H) \ + $(TREE_FLOW_H) langhooks.h pointer-set.h $(HASHTAB_H) $(DIAGNOSTIC_CORE_H) \ $(FLAGS_H) debug.h $(TARGET_H) $(CGRAPH_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \ $(PARAMS_H) $(FIBHEAP_H) intl.h $(FUNCTION_H) $(BASIC_BLOCK_H) tree-iterator.h \ $(TREE_PASS_H) $(OPTS_H) $(IPA_TYPE_ESCAPE_H) $(TREE_DUMP_H) \ @@ -3294,7 +3297,7 @@ et-forest.o : et-forest.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ combine.o : combine.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(FLAGS_H) $(FUNCTION_H) insn-config.h $(INSN_ATTR_H) $(REGS_H) $(EXPR_H) \ rtlhooks-def.h $(BASIC_BLOCK_H) $(RECOG_H) hard-reg-set.h \ - toplev.h $(DIAGNOSTIC_CORE_H) $(TM_P_H) $(TREE_H) $(TARGET_H) output.h $(PARAMS_H) $(OPTABS_H) \ + $(DIAGNOSTIC_CORE_H) $(TM_P_H) $(TREE_H) $(TARGET_H) output.h $(PARAMS_H) $(OPTABS_H) \ insn-codes.h $(TIMEVAR_H) $(TREE_PASS_H) $(DF_H) vecprim.h $(CGRAPH_H) reginfo.o : reginfo.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ hard-reg-set.h $(FLAGS_H) $(BASIC_BLOCK_H) addresses.h $(REGS_H) \ @@ -3308,7 +3311,7 @@ vec.o : vec.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(VEC_H) $(GGC_H) \ reload.o : reload.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_ERROR_H) \ $(FLAGS_H) output.h $(EXPR_H) $(OPTABS_H) reload.h $(RECOG_H) \ hard-reg-set.h insn-config.h $(REGS_H) $(FUNCTION_H) real.h \ - addresses.h $(TM_P_H) $(PARAMS_H) $(TARGET_H) $(DF_H) ira.h toplev.h $(DIAGNOSTIC_CORE_H) + addresses.h $(TM_P_H) $(PARAMS_H) $(TARGET_H) $(DF_H) ira.h $(DIAGNOSTIC_CORE_H) reload1.o : reload1.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_ERROR_H) \ $(EXPR_H) $(OPTABS_H) reload.h $(REGS_H) hard-reg-set.h insn-config.h \ $(BASIC_BLOCK_H) $(RECOG_H) output.h $(FUNCTION_H) $(TM_P_H) \ @@ -3365,7 +3368,7 @@ ira-conflicts.o: ira-conflicts.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(DF_H) sparseset.h addresses.h $(IRA_INT_H) ira-color.o: ira-color.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(TARGET_H) $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) \ - $(EXPR_H) $(BASIC_BLOCK_H) toplev.h $(DIAGNOSTIC_CORE_H) $(TM_P_H) reload.h $(PARAMS_H) \ + $(EXPR_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_CORE_H) $(TM_P_H) reload.h $(PARAMS_H) \ $(DF_H) $(SPLAY_TREE_H) $(IRA_INT_H) ira-emit.o: ira-emit.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(REGS_H) $(RTL_H) $(TM_P_H) $(TARGET_H) $(FLAGS_H) hard-reg-set.h \ @@ -3449,7 +3452,7 @@ recog.o : recog.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_ERROR_H) \ $(FUNCTION_H) $(BASIC_BLOCK_H) $(REGS_H) $(RECOG_H) $(EXPR_H) \ $(FLAGS_H) insn-config.h $(INSN_ATTR_H) output.h reload.h \ addresses.h $(TM_P_H) $(TIMEVAR_H) $(TREE_PASS_H) hard-reg-set.h \ - $(DF_H) $(DBGCNT_H) $(TARGET_H) toplev.h $(DIAGNOSTIC_CORE_H) + $(DF_H) $(DBGCNT_H) $(TARGET_H) $(DIAGNOSTIC_CORE_H) reg-stack.o : reg-stack.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_ERROR_H) $(TREE_H) $(RECOG_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) \ insn-config.h reload.h $(FUNCTION_H) $(TM_P_H) $(GGC_H) \ @@ -3489,7 +3492,7 @@ regrename.o : regrename.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ output.h $(RECOG_H) $(FUNCTION_H) $(OBSTACK_H) $(FLAGS_H) $(TM_P_H) \ addresses.h reload.h $(TIMEVAR_H) $(TREE_PASS_H) $(DF_H) ifcvt.o : ifcvt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ - $(REGS_H) toplev.h $(DIAGNOSTIC_CORE_H) $(FLAGS_H) insn-config.h $(FUNCTION_H) $(RECOG_H) \ + $(REGS_H) $(DIAGNOSTIC_CORE_H) $(FLAGS_H) insn-config.h $(FUNCTION_H) $(RECOG_H) \ $(TARGET_H) $(BASIC_BLOCK_H) $(EXPR_H) output.h $(EXCEPT_H) $(TM_P_H) \ $(OPTABS_H) $(CFGLOOP_H) hard-reg-set.h $(TIMEVAR_H) \ $(TREE_PASS_H) $(DF_H) $(DBGCNT_H) @@ -3565,18 +3568,18 @@ s-mddeps: $(md_file) $(MD_INCLUDES) build/genmddeps$(build_exeext) # Header dependencies for generated source files. insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(RTL_H) $(REGS_H) output.h $(INSN_ATTR_H) \ - insn-config.h toplev.h $(DIAGNOSTIC_CORE_H) $(RECOG_H) $(TM_P_H) $(FLAGS_H) + insn-config.h $(DIAGNOSTIC_CORE_H) $(RECOG_H) $(TM_P_H) $(FLAGS_H) insn-automata.o : insn-automata.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(RTL_H) $(REGS_H) output.h $(INSN_ATTR_H) \ insn-config.h toplev.h $(DIAGNOSTIC_CORE_H) $(RECOG_H) $(TM_P_H) $(FLAGS_H) $(EMIT_RTL_H) insn-emit.o : insn-emit.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_H) $(TM_P_H) $(FUNCTION_H) $(EXPR_H) $(OPTABS_H) \ dfp.h $(FLAGS_H) output.h insn-config.h hard-reg-set.h $(RECOG_H) \ - $(RESOURCE_H) reload.h toplev.h $(DIAGNOSTIC_CORE_H) $(REGS_H) tm-constrs.h $(GGC_H) \ + $(RESOURCE_H) reload.h $(DIAGNOSTIC_CORE_H) $(REGS_H) tm-constrs.h $(GGC_H) \ $(BASIC_BLOCK_H) $(INTEGRATE_H) insn-enums.o : insn-enums.c $(CONFIG_H) $(SYSTEM_H) insn-constants.h insn-extract.o : insn-extract.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ - $(TM_H) $(RTL_H) toplev.h $(DIAGNOSTIC_CORE_H) insn-config.h $(RECOG_H) + $(TM_H) $(RTL_H) $(DIAGNOSTIC_CORE_H) insn-config.h $(RECOG_H) insn-modes.o : insn-modes.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(MACHMODE_H) insn-opinit.o : insn-opinit.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ @@ -3585,18 +3588,18 @@ insn-opinit.o : insn-opinit.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ insn-output.o : insn-output.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(RTL_H) $(GGC_H) $(REGS_H) conditions.h \ hard-reg-set.h insn-config.h $(INSN_ATTR_H) $(EXPR_H) output.h \ - $(RECOG_H) $(FUNCTION_H) toplev.h $(DIAGNOSTIC_CORE_H) $(FLAGS_H) insn-codes.h $(TM_P_H)\ + $(RECOG_H) $(FUNCTION_H) $(DIAGNOSTIC_CORE_H) $(FLAGS_H) insn-codes.h $(TM_P_H)\ $(TARGET_H) tm-constrs.h insn-peep.o : insn-peep.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ insn-config.h $(RTL_H) $(TM_P_H) $(REGS_H) output.h \ - $(RECOG_H) $(EXCEPT_H) $(FUNCTION_H) toplev.h $(DIAGNOSTIC_CORE_H) $(FLAGS_H) tm-constrs.h + $(RECOG_H) $(EXCEPT_H) $(FUNCTION_H) $(DIAGNOSTIC_CORE_H) $(FLAGS_H) tm-constrs.h insn-preds.o : insn-preds.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(RTL_H) $(TREE_H) insn-config.h $(RECOG_H) output.h \ $(FLAGS_H) $(FUNCTION_H) hard-reg-set.h $(RESOURCE_H) $(TM_P_H) \ - toplev.h $(DIAGNOSTIC_CORE_H) reload.h $(REGS_H) tm-constrs.h + $(DIAGNOSTIC_CORE_H) reload.h $(REGS_H) tm-constrs.h insn-recog.o : insn-recog.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(RTL_H) insn-config.h $(RECOG_H) output.h $(FLAGS_H) \ - $(FUNCTION_H) hard-reg-set.h $(RESOURCE_H) $(TM_P_H) toplev.h $(DIAGNOSTIC_CORE_H) \ + $(FUNCTION_H) hard-reg-set.h $(RESOURCE_H) $(TM_P_H) $(DIAGNOSTIC_CORE_H) \ reload.h $(REGS_H) tm-constrs.h # For each of the files generated by running a generator program over diff --git a/gcc/builtins.c b/gcc/builtins.c index 5cdf480..5c09382 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -40,7 +40,6 @@ along with GCC; see the file COPYING3. If not see #include "recog.h" #include "output.h" #include "typeclass.h" -#include "toplev.h" #include "predict.h" #include "tm_p.h" #include "target.h" diff --git a/gcc/combine.c b/gcc/combine.c index a8ce701..d9d6838 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -93,7 +93,6 @@ along with GCC; see the file COPYING3. If not see #include "insn-attr.h" #include "recog.h" #include "diagnostic-core.h" -#include "toplev.h" #include "target.h" #include "optabs.h" #include "insn-codes.h" diff --git a/gcc/config/i386/t-cygming b/gcc/config/i386/t-cygming index eb4b9da..6d54e49 100644 --- a/gcc/config/i386/t-cygming +++ b/gcc/config/i386/t-cygming @@ -30,7 +30,7 @@ LIBGCC2_INCLUDES = -I$(srcdir)/../winsup/w32api/include winnt.o: $(srcdir)/config/i386/winnt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(RTL_H) $(REGS_H) hard-reg-set.h output.h $(TREE_H) flags.h \ - $(TM_P_H) toplev.h $(HASHTAB_H) $(GGC_H) $(LTO_STREAMER_H) + $(TM_P_H) $(HASHTAB_H) $(GGC_H) $(LTO_STREAMER_H) $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ $(srcdir)/config/i386/winnt.c diff --git a/gcc/config/i386/t-interix b/gcc/config/i386/t-interix index 30539e2..e7b016f 100644 --- a/gcc/config/i386/t-interix +++ b/gcc/config/i386/t-interix @@ -3,6 +3,6 @@ LIB1ASMFUNCS = _chkstk _chkstk_ms winnt.o: $(srcdir)/config/i386/winnt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(RTL_H) $(REGS_H) hard-reg-set.h output.h $(TREE_H) flags.h \ - $(TM_P_H) toplev.h $(HASHTAB_H) $(GGC_H) + $(TM_P_H) $(HASHTAB_H) $(GGC_H) $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ $(srcdir)/config/i386/winnt.c diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c index b8d6d69..16110a7 100644 --- a/gcc/config/i386/winnt.c +++ b/gcc/config/i386/winnt.c @@ -31,7 +31,6 @@ along with GCC; see the file COPYING3. If not see #include "flags.h" #include "tm_p.h" #include "diagnostic-core.h" -#include "toplev.h" #include "hashtab.h" #include "langhooks.h" #include "ggc.h" diff --git a/gcc/double-int.c b/gcc/double-int.c index 9e32b39..834eaf9 100644 --- a/gcc/double-int.c +++ b/gcc/double-int.c @@ -22,7 +22,6 @@ along with GCC; see the file COPYING3. If not see #include "coretypes.h" #include "tm.h" /* For SHIFT_COUNT_TRUNCATED. */ #include "tree.h" -#include "toplev.h" /* We know that A1 + B1 = SUM1, using 2's complement arithmetic and ignoring overflow. Suppose A, B and SUM have the same respective signs as A1, B1, diff --git a/gcc/explow.c b/gcc/explow.c index 85e9344..836f244 100644 --- a/gcc/explow.c +++ b/gcc/explow.c @@ -25,7 +25,6 @@ along with GCC; see the file COPYING3. If not see #include "coretypes.h" #include "tm.h" #include "diagnostic-core.h" -#include "toplev.h" #include "rtl.h" #include "tree.h" #include "tm_p.h" diff --git a/gcc/expmed.c b/gcc/expmed.c index 1f98bcf..24aedcc 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -26,7 +26,6 @@ along with GCC; see the file COPYING3. If not see #include "coretypes.h" #include "tm.h" #include "diagnostic-core.h" -#include "toplev.h" #include "rtl.h" #include "tree.h" #include "tm_p.h" diff --git a/gcc/fold-const.c b/gcc/fold-const.c index c195073..07b59d8 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -54,7 +54,6 @@ along with GCC; see the file COPYING3. If not see #include "tm_p.h" #include "target.h" #include "diagnostic-core.h" -#include "toplev.h" #include "intl.h" #include "ggc.h" #include "hashtab.h" diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index f8e8e20..4f2d7c1 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,7 @@ +2010-11-30 Joseph Myers <joseph@codesourcery.com> + + * trans-common.c: Don't include toplev.h. + 2010-11-29 Joseph Myers <joseph@codesourcery.com> * gfortran.h (alloca): Don't include definitions. diff --git a/gcc/fortran/trans-common.c b/gcc/fortran/trans-common.c index 1f59a69..ad4ef06 100644 --- a/gcc/fortran/trans-common.c +++ b/gcc/fortran/trans-common.c @@ -98,7 +98,6 @@ along with GCC; see the file COPYING3. If not see #include "coretypes.h" #include "tm.h" #include "tree.h" -#include "toplev.h" /* For exact_log2. */ #include "output.h" /* For decl_default_tls_model. */ #include "gfortran.h" #include "trans.h" diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c index 2213b2e..4976604 100644 --- a/gcc/genattrtab.c +++ b/gcc/genattrtab.c @@ -4920,8 +4920,7 @@ from the machine description file `md'. */\n\n"); printf ("#include \"recog.h\"\n"); printf ("#include \"regs.h\"\n"); printf ("#include \"output.h\"\n"); - printf ("#include \"diagnostic-core.h\"\n" - "#include \"toplev.h\"\n"); + printf ("#include \"diagnostic-core.h\"\n"); printf ("#include \"flags.h\"\n"); printf ("#include \"function.h\"\n"); printf ("\n"); diff --git a/gcc/genconditions.c b/gcc/genconditions.c index f356519..6caa7ef 100644 --- a/gcc/genconditions.c +++ b/gcc/genconditions.c @@ -1,5 +1,5 @@ /* Process machine description and calculate constant conditions. - Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007 + Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2010 Free Software Foundation, Inc. This file is part of GCC. @@ -87,7 +87,6 @@ write_header (void) #include \"hard-reg-set.h\"\n\ #include \"resource.h\"\n\ #include \"diagnostic-core.h\"\n\ -#include \"toplev.h\"\n\ #include \"reload.h\"\n\ #include \"tm-constrs.h\"\n"); diff --git a/gcc/genemit.c b/gcc/genemit.c index fbf1344..6b1ae7d 100644 --- a/gcc/genemit.c +++ b/gcc/genemit.c @@ -863,7 +863,6 @@ from the machine description file `md'. */\n\n"); printf ("#include \"resource.h\"\n"); printf ("#include \"reload.h\"\n"); printf ("#include \"diagnostic-core.h\"\n"); - printf ("#include \"toplev.h\"\n"); printf ("#include \"regs.h\"\n"); printf ("#include \"tm-constrs.h\"\n"); printf ("#include \"ggc.h\"\n"); diff --git a/gcc/genextract.c b/gcc/genextract.c index 694069c..09e7cde 100644 --- a/gcc/genextract.c +++ b/gcc/genextract.c @@ -1,6 +1,6 @@ /* Generate code from machine description to extract operands from insn as rtl. Copyright (C) 1987, 1991, 1992, 1993, 1997, 1998, 1999, 2000, 2003, - 2004, 2005, 2007, 2008 + 2004, 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GCC. @@ -366,7 +366,6 @@ print_header (void) #include \"insn-config.h\"\n\ #include \"recog.h\"\n\ #include \"diagnostic-core.h\"\n\ -#include \"toplev.h\"\n\ \n\ /* This variable is used as the \"location\" of any missing operand\n\ whose numbers are skipped by a given pattern. */\n\ diff --git a/gcc/genoutput.c b/gcc/genoutput.c index e138fcd..d03222f 100644 --- a/gcc/genoutput.c +++ b/gcc/genoutput.c @@ -1,6 +1,6 @@ /* Generate code from to output assembler insns as recognized from rtl. Copyright (C) 1987, 1988, 1992, 1994, 1995, 1997, 1998, 1999, 2000, 2002, - 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc. + 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GCC. @@ -241,7 +241,6 @@ output_prologue (void) printf ("#include \"insn-attr.h\"\n\n"); printf ("#include \"recog.h\"\n\n"); printf ("#include \"diagnostic-core.h\"\n"); - printf ("#include \"toplev.h\"\n"); printf ("#include \"output.h\"\n"); printf ("#include \"target.h\"\n"); printf ("#include \"tm-constrs.h\"\n"); diff --git a/gcc/genpeep.c b/gcc/genpeep.c index 77d14b8..ac08d80 100644 --- a/gcc/genpeep.c +++ b/gcc/genpeep.c @@ -1,6 +1,6 @@ /* Generate code from machine description to perform peephole optimizations. Copyright (C) 1987, 1989, 1992, 1997, 1998, 1999, 2000, 2003, 2004, - 2007 Free Software Foundation, Inc. + 2007, 2010 Free Software Foundation, Inc. This file is part of GCC. @@ -377,7 +377,6 @@ from the machine description file `md'. */\n\n"); printf ("#include \"except.h\"\n"); printf ("#include \"function.h\"\n"); printf ("#include \"diagnostic-core.h\"\n"); - printf ("#include \"toplev.h\"\n"); printf ("#include \"flags.h\"\n"); printf ("#include \"tm-constrs.h\"\n\n"); diff --git a/gcc/genpreds.c b/gcc/genpreds.c index 02379d6..fba4372 100644 --- a/gcc/genpreds.c +++ b/gcc/genpreds.c @@ -2,7 +2,7 @@ - prototype declarations for operand predicates (tm-preds.h) - function definitions of operand predicates, if defined new-style (insn-preds.c) - Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009 + Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GCC. @@ -1338,7 +1338,6 @@ write_insn_preds_c (void) #include \"hard-reg-set.h\"\n\ #include \"resource.h\"\n\ #include \"diagnostic-core.h\"\n\ -#include \"toplev.h\"\n\ #include \"reload.h\"\n\ #include \"regs.h\"\n\ #include \"tm-constrs.h\"\n"); diff --git a/gcc/genrecog.c b/gcc/genrecog.c index 9da0aea..74dd0a7 100644 --- a/gcc/genrecog.c +++ b/gcc/genrecog.c @@ -1,6 +1,6 @@ /* Generate code from machine description to recognize rtl as insns. Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009 + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GCC. @@ -2449,7 +2449,6 @@ write_header (void) #include \"hard-reg-set.h\"\n\ #include \"resource.h\"\n\ #include \"diagnostic-core.h\"\n\ -#include \"toplev.h\"\n\ #include \"reload.h\"\n\ #include \"regs.h\"\n\ #include \"tm-constrs.h\"\n\ diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c index 3104058..2c14adb 100644 --- a/gcc/ggc-page.c +++ b/gcc/ggc-page.c @@ -25,7 +25,6 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "rtl.h" #include "tm_p.h" -#include "toplev.h" /* exact_log2 */ #include "diagnostic-core.h" #include "flags.h" #include "ggc.h" diff --git a/gcc/ggc-zone.c b/gcc/ggc-zone.c index 43472be..d0c1d79 100644 --- a/gcc/ggc-zone.c +++ b/gcc/ggc-zone.c @@ -30,7 +30,6 @@ along with GCC; see the file COPYING3. If not see #include "rtl.h" #include "tm_p.h" #include "diagnostic-core.h" -#include "toplev.h" #include "flags.h" #include "ggc.h" #include "ggc-internal.h" diff --git a/gcc/hwint.c b/gcc/hwint.c new file mode 100644 index 0000000..85c1326 --- /dev/null +++ b/gcc/hwint.c @@ -0,0 +1,100 @@ +/* Operations on HOST_WIDE_INT. + Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 + Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +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/>. */ + +#include "config.h" +#include "system.h" + +#if GCC_VERSION < 3004 + +/* The functions clz_hwi, ctz_hwi, ffs_hwi, floor_log2 and exact_log2 + are defined as inline functions in hwint.h if GCC_VERSION >= 3004. + The definitions here are used for older versions of GCC and non-GCC + bootstrap compilers. */ + +/* Given X, an unsigned number, return the largest int Y such that 2**Y <= X. + If X is 0, return -1. */ + +int +floor_log2 (unsigned HOST_WIDE_INT x) +{ + int t = 0; + + if (x == 0) + return -1; + + if (HOST_BITS_PER_WIDE_INT > 64) + if (x >= (unsigned HOST_WIDE_INT) 1 << (t + 64)) + t += 64; + if (HOST_BITS_PER_WIDE_INT > 32) + if (x >= ((unsigned HOST_WIDE_INT) 1) << (t + 32)) + t += 32; + if (x >= ((unsigned HOST_WIDE_INT) 1) << (t + 16)) + t += 16; + if (x >= ((unsigned HOST_WIDE_INT) 1) << (t + 8)) + t += 8; + if (x >= ((unsigned HOST_WIDE_INT) 1) << (t + 4)) + t += 4; + if (x >= ((unsigned HOST_WIDE_INT) 1) << (t + 2)) + t += 2; + if (x >= ((unsigned HOST_WIDE_INT) 1) << (t + 1)) + t += 1; + + return t; +} + +/* Return the logarithm of X, base 2, considering X unsigned, + if X is a power of 2. Otherwise, returns -1. */ + +int +exact_log2 (unsigned HOST_WIDE_INT x) +{ + if (x != (x & -x)) + return -1; + return floor_log2 (x); +} + +/* Given X, an unsigned number, return the number of least significant bits + that are zero. When X == 0, the result is the word size. */ + +int +ctz_hwi (unsigned HOST_WIDE_INT x) +{ + return x ? floor_log2 (x & -x) : HOST_BITS_PER_WIDE_INT; +} + +/* Similarly for most significant bits. */ + +int +clz_hwi (unsigned HOST_WIDE_INT x) +{ + return HOST_BITS_PER_WIDE_INT - 1 - floor_log2(x); +} + +/* Similar to ctz_hwi, except that the least significant bit is numbered + starting from 1, and X == 0 yields 0. */ + +int +ffs_hwi (unsigned HOST_WIDE_INT x) +{ + return 1 + floor_log2 (x & -x); +} + +#endif /* GCC_VERSION < 3004 */ diff --git a/gcc/hwint.h b/gcc/hwint.h index c7fcd34..8bd7c5e 100644 --- a/gcc/hwint.h +++ b/gcc/hwint.h @@ -1,5 +1,6 @@ /* HOST_WIDE_INT definitions for the GNU compiler. - Copyright (C) 1998, 2002, 2004, 2008, 2009 Free Software Foundation, Inc. + Copyright (C) 1998, 2002, 2004, 2008, 2009, 2010 + Free Software Foundation, Inc. This file is part of GCC. @@ -157,4 +158,74 @@ extern char sizeof_long_long_must_be_8[sizeof(long long) == 8 ? 1 : -1]; # define HOST_BITS_PER_WIDEST_FAST_INT HOST_BITS_PER_LONG #endif +/* Inline functions operating on HOST_WIDE_INT. */ +#if GCC_VERSION < 3004 + +extern int clz_hwi (unsigned HOST_WIDE_INT x); +extern int ctz_hwi (unsigned HOST_WIDE_INT x); +extern int ffs_hwi (unsigned HOST_WIDE_INT x); + +/* Return log2, or -1 if not exact. */ +extern int exact_log2 (unsigned HOST_WIDE_INT); + +/* Return floor of log2, with -1 for zero. */ +extern int floor_log2 (unsigned HOST_WIDE_INT); + +#else /* GCC_VERSION >= 3004 */ + +/* For convenience, define 0 -> word_size. */ +static inline int +clz_hwi (unsigned HOST_WIDE_INT x) +{ + if (x == 0) + return HOST_BITS_PER_WIDE_INT; +# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG + return __builtin_clzl (x); +# elif HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONGLONG + return __builtin_clzll (x); +# else + return __builtin_clz (x); +# endif +} + +static inline int +ctz_hwi (unsigned HOST_WIDE_INT x) +{ + if (x == 0) + return HOST_BITS_PER_WIDE_INT; +# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG + return __builtin_ctzl (x); +# elif HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONGLONG + return __builtin_ctzll (x); +# else + return __builtin_ctz (x); +# endif +} + +static inline int +ffs_hwi (unsigned HOST_WIDE_INT x) +{ +# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG + return __builtin_ffsl (x); +# elif HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONGLONG + return __builtin_ffsll (x); +# else + return __builtin_ffs (x); +# endif +} + +static inline int +floor_log2 (unsigned HOST_WIDE_INT x) +{ + return HOST_BITS_PER_WIDE_INT - 1 - clz_hwi (x); +} + +static inline int +exact_log2 (unsigned HOST_WIDE_INT x) +{ + return x == (x & -x) && x ? ctz_hwi (x) : -1; +} + +#endif /* GCC_VERSION >= 3004 */ + #endif /* ! GCC_HWINT_H */ diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index 33c8395..e5a8835 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -36,7 +36,6 @@ #include "output.h" #include "optabs.h" #include "diagnostic-core.h" -#include "toplev.h" #include "tm_p.h" #include "cfgloop.h" #include "target.h" diff --git a/gcc/ipa-struct-reorg.c b/gcc/ipa-struct-reorg.c index d787a66..ae18da2 100644 --- a/gcc/ipa-struct-reorg.c +++ b/gcc/ipa-struct-reorg.c @@ -34,7 +34,6 @@ along with GCC; see the file COPYING3. If not see #include "langhooks.h" #include "pointer-set.h" #include "hashtab.h" -#include "toplev.h" #include "flags.h" #include "debug.h" #include "target.h" diff --git a/gcc/ira-color.c b/gcc/ira-color.c index 6a6a330..9c5f4b7 100644 --- a/gcc/ira-color.c +++ b/gcc/ira-color.c @@ -34,7 +34,6 @@ along with GCC; see the file COPYING3. If not see #include "basic-block.h" #include "expr.h" #include "diagnostic-core.h" -#include "toplev.h" #include "reload.h" #include "params.h" #include "df.h" diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index c30c994..2629d20 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,5 +1,10 @@ 2010-11-30 Joseph Myers <joseph@codesourcery.com> + * boehm.c: Don't include toplev.h. + * Make-lang.in (java/boehm.o): Don't depend on toplev.h. + +2010-11-30 Joseph Myers <joseph@codesourcery.com> + * expr.c, lang.c, mangle.c, mangle_name.c, typeck.c, verify-glue.c: Don't include toplev.h. * Make-lang.in: Dependencies for above files changed to remove diff --git a/gcc/java/Make-lang.in b/gcc/java/Make-lang.in index b9741e2..3e3d2c9 100644 --- a/gcc/java/Make-lang.in +++ b/gcc/java/Make-lang.in @@ -271,7 +271,7 @@ java/jcf-dump.o: $(CONFIG_H) $(SYSTEM_H) coretypes.h $(JAVA_TREE_H) \ java/jcf-dump.c java/jcf-reader.c java/jcf.h java/javaop.h java/javaop.def \ version.h $(GGC_H) intl.h java/zipfile.h java/boehm.o: java/boehm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ - $(TREE_H) $(JAVA_TREE_H) java/parse.h toplev.h + $(TREE_H) $(JAVA_TREE_H) java/parse.h java/builtins.o: java/builtins.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(JAVA_TREE_H) $(GGC_H) $(FLAGS_H) $(OPTABS_H) $(EXPR_H) langhooks.h \ gt-java-builtins.h diff --git a/gcc/java/boehm.c b/gcc/java/boehm.c index ce0ca2d7..f4a9af6 100644 --- a/gcc/java/boehm.c +++ b/gcc/java/boehm.c @@ -33,7 +33,6 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ #include "java-tree.h" #include "parse.h" #include "diagnostic-core.h" -#include "toplev.h" static void mark_reference_fields (tree, double_int *, unsigned int, int *, int *, int *, HOST_WIDE_INT *); diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 2bf8e81..236f8d9 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,5 +1,10 @@ 2010-11-30 Joseph Myers <joseph@codesourcery.com> + * lto-object.c: Don't include toplev.h. + * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h. + +2010-11-30 Joseph Myers <joseph@codesourcery.com> + * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of $(TOPLEV_H). diff --git a/gcc/lto/Make-lang.in b/gcc/lto/Make-lang.in index 3aea1fc..16b0f35 100644 --- a/gcc/lto/Make-lang.in +++ b/gcc/lto/Make-lang.in @@ -87,7 +87,7 @@ lto/lto.o: lto/lto.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(OPTS_H) \ $(COMMON_H) debug.h $(TIMEVAR_H) $(GIMPLE_H) $(LTO_H) $(LTO_TREE_H) \ $(LTO_TAGS_H) $(LTO_STREAMER_H) $(SPLAY_TREE_H) gt-lto-lto.h $(PARAMS_H) lto/lto-object.o: lto/lto-object.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ - $(DIAGNOSTIC_CORE_H) toplev.h $(LTO_H) $(TM_H) $(LTO_STREAMER_H) \ + $(DIAGNOSTIC_CORE_H) $(LTO_H) $(TM_H) $(LTO_STREAMER_H) \ ../include/simple-object.h # LTO testing is done as part of C/C++/Fortran etc. testing. diff --git a/gcc/lto/lto-object.c b/gcc/lto/lto-object.c index 21da20b..3be58de 100644 --- a/gcc/lto/lto-object.c +++ b/gcc/lto/lto-object.c @@ -22,7 +22,6 @@ along with GCC; see the file COPYING3. If not see #include "system.h" #include "coretypes.h" #include "diagnostic-core.h" -#include "toplev.h" #include "lto.h" #include "tm.h" #include "lto-streamer.h" diff --git a/gcc/matrix-reorg.c b/gcc/matrix-reorg.c index 3789af0..c303143 100644 --- a/gcc/matrix-reorg.c +++ b/gcc/matrix-reorg.c @@ -120,7 +120,6 @@ along with GCC; see the file COPYING3. If not see #include "tree-flow-inline.h" #include "langhooks.h" #include "hashtab.h" -#include "toplev.h" #include "flags.h" #include "ggc.h" #include "debug.h" diff --git a/gcc/omp-low.c b/gcc/omp-low.c index 54c243c..c3f2178 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -38,7 +38,6 @@ along with GCC; see the file COPYING3. If not see #include "flags.h" #include "function.h" #include "expr.h" -#include "toplev.h" #include "tree-pass.h" #include "ggc.h" #include "except.h" @@ -1,6 +1,6 @@ /* real.c - software floating point emulation. Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, - 2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc. + 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. Contributed by Stephen L. Moshier (moshier@world.std.com). Re-written by Richard Henderson <rth@redhat.com> @@ -26,7 +26,6 @@ #include "tm.h" #include "tree.h" #include "diagnostic-core.h" -#include "toplev.h" #include "real.h" #include "realmpfr.h" #include "tm_p.h" diff --git a/gcc/recog.c b/gcc/recog.c index edbf82b..8fb96a0 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -42,7 +42,6 @@ along with GCC; see the file COPYING3. If not see #include "timevar.h" #include "tree-pass.h" #include "df.h" -#include "toplev.h" /* exact_log2 may be used by targets */ #ifndef STACK_PUSH_CODE #ifdef STACK_GROWS_DOWNWARD diff --git a/gcc/reload.c b/gcc/reload.c index b1f94b2..aa9e68e 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -111,7 +111,6 @@ a register with any other reload. */ #include "params.h" #include "target.h" #include "ira.h" -#include "toplev.h" /* exact_log2 may be used by targets */ /* True if X is a constant that can be forced into the constant pool. */ #define CONST_POOL_OK_P(X) \ diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index eb4d3ab..3c0167e 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -25,7 +25,6 @@ along with GCC; see the file COPYING3. If not see #include "coretypes.h" #include "tm.h" #include "diagnostic-core.h" -#include "toplev.h" #include "rtl.h" #include "hard-reg-set.h" #include "insn-config.h" diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 84f3863..ce4eab4 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -34,7 +34,6 @@ along with GCC; see the file COPYING3. If not see #include "recog.h" #include "function.h" #include "expr.h" -#include "toplev.h" #include "diagnostic-core.h" #include "output.h" #include "ggc.h" diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index dc573a2..9056d7e 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -32,7 +32,6 @@ along with GCC; see the file COPYING3. If not see #include "expr.h" #include "output.h" #include "diagnostic-core.h" -#include "toplev.h" #include "ggc.h" #include "target.h" #include "langhooks.h" diff --git a/gcc/toplev.c b/gcc/toplev.c index 37114ce..3050f07 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -354,82 +354,6 @@ set_random_seed (const char *val) return old; } -#if GCC_VERSION < 3004 - -/* The functions clz_hwi, ctz_hwi, ffs_hwi, floor_log2 and exact_log2 - are defined as inline functions in toplev.h if GCC_VERSION >= 3004. - The definitions here are used for older versions of gcc. */ - -/* Given X, an unsigned number, return the largest int Y such that 2**Y <= X. - If X is 0, return -1. */ - -int -floor_log2 (unsigned HOST_WIDE_INT x) -{ - int t = 0; - - if (x == 0) - return -1; - - if (HOST_BITS_PER_WIDE_INT > 64) - if (x >= (unsigned HOST_WIDE_INT) 1 << (t + 64)) - t += 64; - if (HOST_BITS_PER_WIDE_INT > 32) - if (x >= ((unsigned HOST_WIDE_INT) 1) << (t + 32)) - t += 32; - if (x >= ((unsigned HOST_WIDE_INT) 1) << (t + 16)) - t += 16; - if (x >= ((unsigned HOST_WIDE_INT) 1) << (t + 8)) - t += 8; - if (x >= ((unsigned HOST_WIDE_INT) 1) << (t + 4)) - t += 4; - if (x >= ((unsigned HOST_WIDE_INT) 1) << (t + 2)) - t += 2; - if (x >= ((unsigned HOST_WIDE_INT) 1) << (t + 1)) - t += 1; - - return t; -} - -/* Return the logarithm of X, base 2, considering X unsigned, - if X is a power of 2. Otherwise, returns -1. */ - -int -exact_log2 (unsigned HOST_WIDE_INT x) -{ - if (x != (x & -x)) - return -1; - return floor_log2 (x); -} - -/* Given X, an unsigned number, return the number of least significant bits - that are zero. When X == 0, the result is the word size. */ - -int -ctz_hwi (unsigned HOST_WIDE_INT x) -{ - return x ? floor_log2 (x & -x) : HOST_BITS_PER_WIDE_INT; -} - -/* Similarly for most significant bits. */ - -int -clz_hwi (unsigned HOST_WIDE_INT x) -{ - return HOST_BITS_PER_WIDE_INT - 1 - floor_log2(x); -} - -/* Similar to ctz_hwi, except that the least significant bit is numbered - starting from 1, and X == 0 yields 0. */ - -int -ffs_hwi (unsigned HOST_WIDE_INT x) -{ - return 1 + floor_log2 (x & -x); -} - -#endif /* GCC_VERSION < 3004 */ - /* Handler for fatal signals, such as SIGSEGV. These are transformed into ICE messages, which is much more user friendly. In case the error printer crashes, reset the signal to prevent infinite recursion. */ diff --git a/gcc/toplev.h b/gcc/toplev.h index 08cbbc1..925e357 100644 --- a/gcc/toplev.h +++ b/gcc/toplev.h @@ -88,76 +88,6 @@ extern const char * default_pch_valid_p (const void *, size_t); /* The hashtable, so that the C front ends can pass it to cpplib. */ extern struct ht *ident_hash; -/* Inline versions of the above for speed. */ -#if GCC_VERSION < 3004 - -extern int clz_hwi (unsigned HOST_WIDE_INT x); -extern int ctz_hwi (unsigned HOST_WIDE_INT x); -extern int ffs_hwi (unsigned HOST_WIDE_INT x); - -/* Return log2, or -1 if not exact. */ -extern int exact_log2 (unsigned HOST_WIDE_INT); - -/* Return floor of log2, with -1 for zero. */ -extern int floor_log2 (unsigned HOST_WIDE_INT); - -#else /* GCC_VERSION >= 3004 */ - -/* For convenience, define 0 -> word_size. */ -static inline int -clz_hwi (unsigned HOST_WIDE_INT x) -{ - if (x == 0) - return HOST_BITS_PER_WIDE_INT; -# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG - return __builtin_clzl (x); -# elif HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONGLONG - return __builtin_clzll (x); -# else - return __builtin_clz (x); -# endif -} - -static inline int -ctz_hwi (unsigned HOST_WIDE_INT x) -{ - if (x == 0) - return HOST_BITS_PER_WIDE_INT; -# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG - return __builtin_ctzl (x); -# elif HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONGLONG - return __builtin_ctzll (x); -# else - return __builtin_ctz (x); -# endif -} - -static inline int -ffs_hwi (unsigned HOST_WIDE_INT x) -{ -# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG - return __builtin_ffsl (x); -# elif HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONGLONG - return __builtin_ffsll (x); -# else - return __builtin_ffs (x); -# endif -} - -static inline int -floor_log2 (unsigned HOST_WIDE_INT x) -{ - return HOST_BITS_PER_WIDE_INT - 1 - clz_hwi (x); -} - -static inline int -exact_log2 (unsigned HOST_WIDE_INT x) -{ - return x == (x & -x) && x ? ctz_hwi (x) : -1; -} - -#endif /* GCC_VERSION >= 3004 */ - /* Functions used to get and set GCC's notion of in what directory compilation was started. */ diff --git a/gcc/tree-dfa.c b/gcc/tree-dfa.c index 0bc9f41..05a682b 100644 --- a/gcc/tree-dfa.c +++ b/gcc/tree-dfa.c @@ -23,7 +23,6 @@ along with GCC; see the file COPYING3. If not see #include "system.h" #include "coretypes.h" #include "tm.h" -#include "toplev.h" #include "hashtab.h" #include "pointer-set.h" #include "tree.h" diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index b340e5f..d990a02 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -30,7 +30,6 @@ along with GCC; see the file COPYING3. If not see #include "ggc.h" #include "langhooks.h" #include "flags.h" -#include "toplev.h" #include "function.h" #include "tree-pretty-print.h" #include "tree-dump.h" diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c index 466cdae..ee85f6f 100644 --- a/gcc/tree-ssa-loop-niter.c +++ b/gcc/tree-ssa-loop-niter.c @@ -40,7 +40,6 @@ along with GCC; see the file COPYING3. If not see #include "params.h" #include "flags.h" #include "diagnostic-core.h" -#include "toplev.h" #include "tree-inline.h" #include "gmp.h" diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index ce872cf..2c92c37 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -38,7 +38,6 @@ along with GCC; see the file COPYING3. If not see #include "tree-scalar-evolution.h" #include "tree-vectorizer.h" #include "diagnostic-core.h" -#include "toplev.h" /* Need to include rtl.h, expr.h, etc. for optabs. */ #include "expr.h" diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c index eb7eada..6ecd304 100644 --- a/gcc/tree-vect-loop-manip.c +++ b/gcc/tree-vect-loop-manip.c @@ -34,7 +34,6 @@ along with GCC; see the file COPYING3. If not see #include "cfgloop.h" #include "cfglayout.h" #include "diagnostic-core.h" -#include "toplev.h" #include "tree-scalar-evolution.h" #include "tree-vectorizer.h" #include "langhooks.h" diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index bc87965..87d5ae8 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -38,7 +38,6 @@ along with GCC; see the file COPYING3. If not see #include "optabs.h" #include "params.h" #include "diagnostic-core.h" -#include "toplev.h" #include "tree-chrec.h" #include "tree-scalar-evolution.h" #include "tree-vectorizer.h" diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 3d18dfe..b1650d2ee 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -38,7 +38,6 @@ along with GCC; see the file COPYING3. If not see #include "recog.h" #include "optabs.h" #include "diagnostic-core.h" -#include "toplev.h" #include "tree-vectorizer.h" #include "langhooks.h" diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index d77cdef..b07f121 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -34,7 +34,6 @@ along with GCC; see the file COPYING3. If not see #include "tree-pretty-print.h" #include "gimple-pretty-print.h" #include "diagnostic-core.h" -#include "toplev.h" #include "intl.h" #include "cfgloop.h" #include "tree-scalar-evolution.h" |