gcc/gcc/tree-streamer.c

431 lines
12 KiB
C
Raw Permalink Normal View History

2011-08-08 18:49:34 +02:00
/* Miscellaneous utilities for tree streaming. Things that are used
in both input and output are here.
Copyright (C) 2011-2017 Free Software Foundation, Inc.
2011-08-08 18:49:34 +02:00
Contributed by Diego Novillo <dnovillo@google.com>
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"
#include "coretypes.h"
tree-core.h: Include symtab.h. 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * tree-core.h: Include symtab.h. * rtl.h: Include hard-reg-set.h but not flags.h. (HARD_CONST): Remove condition compilation involving HARD_CONST since hard-reg-set.h is always included. * regs.h: Don't include hard-reg-set.h or rtl.h. * cfg.h: Include dominance.h. * gimple.h: Include tree-ssa-alias.h and gimple-expr.h. * backend.h: New. Aggregate commonly used backend header files. * gimple-ssa.h: Don't include tree-hasher.h. * ssa.h: New. Aggregate commonly used SSA header files. * regset.h: Remove bitmap.h and hard-reg-set.h #includes. * sel-sched-ir.h: Flatten includes. * lra-int.h: Flatten completely. * sel-sched-dump.h: Flatten includes. * ira-int.h: Flatten includes. * gimple-streamer.h: Remove all includes. * cfgloop.h: Remove all #includes except cfgloopmanip.h. * resource.h: Flatten hard-reg-set.h and df.h. * sched-int.h: Flatten insn-arrt.h and df.h. * valtrack.h: flatten bitmap.h, df.h, and rtl.h * df.h: Flatten includes, leaving regset.h, alloc-pool.h and timevar.h. * genattrtab.c (write_header): Adjust generated includes. * genautomata.c (main): Likewise. * genconditions.c (write-header): Likewise. * genemit.c (main): Likewise. * gengtype.c (open_base_files): Likewise. * genopinit.c (main): Likewise. * genoutput.c (output_prologue): Likewise. * genpeep.c (main): Likewise. * genpreds.c (write_insn_preds_c): Likewise. * genrecog.c (write_header): Likewise. * alias.c: Adjust includes. * asan.c: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * auto-profile.c: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * ccmp.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfgloop.c: Likewise. * cfgloopanal.c: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraphbuild.c: Likewise. * cgraphclones.c: Likewise. * cgraphunit.c: Likewise. * cilk-common.c: Likewise. * combine-stack-adj.c: Likewise. * combine.c: Likewise. * compare-elim.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * cppbuiltin.c: Likewise. * cprop.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * data-streamer-in.c: Likewise. * data-streamer-out.c: Likewise. * data-streamer.c: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * debug.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dfp.c: Likewise. * dojump.c: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * dse.c: Likewise. * dumpfile.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2cfi.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * final.c: Likewise. * fixed-value.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * fwprop.c: Likewise. * gcc-plugin.h: Likewise. * gcse-common.c: Likewise. * gcse.c: Likewise. * generic-match-head.c: Likewise. * ggc-page.c: Likewise. * gimple-builder.c: Likewise. * gimple-expr.c: Likewise. * gimple-fold.c: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-match-head.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple-ssa-isolate-paths.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * gimple-streamer-in.c: Likewise. * gimple-streamer-out.c: Likewise. * gimple-walk.c: Likewise. * gimple.c: Likewise. * gimplify-me.c: Likewise. * gimplify.c: Likewise. * godump.c: Likewise. * graph.c: Likewise. * graphite-blocking.c: Likewise. * graphite-dependences.c: Likewise. * graphite-interchange.c: Likewise. * graphite-isl-ast-to-gimple.c: Likewise. * graphite-optimize-isl.c: Likewise. * graphite-poly.c: Likewise. * graphite-scop-detection.c: Likewise. * graphite-sese-to-poly.c: Likewise. * graphite.c: Likewise. * haifa-sched.c: Likewise. * hw-doloop.c: Likewise. * ifcvt.c: Likewise. * init-regs.c: Likewise. * internal-fn.c: Likewise. * ipa-chkp.c: Likewise. * ipa-comdats.c: Likewise. * ipa-cp.c: Likewise. * ipa-devirt.c: Likewise. * ipa-icf-gimple.c: Likewise. * ipa-icf.c: Likewise. * ipa-inline-analysis.c: Likewise. * ipa-inline-transform.c: Likewise. * ipa-inline.c: Likewise. * ipa-polymorphic-call.c: Likewise. * ipa-profile.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-ref.c: Likewise. * ipa-reference.c: Likewise. * ipa-split.c: Likewise. * ipa-utils.c: Likewise. * ipa-visibility.c: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lra-assigns.c: Likewise. * lra-coalesce.c: Likewise. * lra-constraints.c: Likewise. * lra-eliminations.c: Likewise. * lra-lives.c: Likewise. * lra-remat.c: Likewise. * lra-spills.c: Likewise. * lra.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * opts-global.c: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * real.c: Likewise. * realmpfr.c: Likewise. * recog.c: Likewise. * ree.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regrename.c: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtl-chkp.c: Likewise. * rtlanal.c: Likewise. * rtlhooks.c: Likewise. * sanopt.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-ir.c: Likewise. * sel-sched.c: Likewise. * sese.c: Likewise. * shrink-wrap.c: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * symtab.c: Likewise. * target-globals.c: Likewise. * targhooks.c: Likewise. * toplev.c: Likewise. * tracer.c: Likewise. * trans-mem.c: Likewise. * tree-affine.c: Likewise. * tree-browser.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chkp-opt.c: Likewise. * tree-chkp.c: Likewise. * tree-chrec.c: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-dfa.c: Likewise. * tree-diagnostic.c: Likewise. * tree-dump.c: Likewise. * tree-eh.c: Likewise. * tree-emutls.c: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-iterator.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-scopedtables.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-strlen.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-tail-merge.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-stdarg.c: Likewise. * tree-streamer-in.c: Likewise. * tree-streamer-out.c: Likewise. * tree-streamer.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tsan.c: Likewise. * ubsan.c: Likewise. * valtrack.c: Likewise. * value-prof.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vmsdbgout.c: Likewise. * vtable-verify.c: Likewise. * web.c: Likewise. * wide-int.cc: Likewise. * xcoffout.c: Likewise. * config/aarch64/aarch64-builtins.c: Likewise. * config/aarch64/aarch64.c: Likewise. * config/aarch64/cortex-a57-fma-steering.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arc/arc.c: Likewise. * config/arm/aarch-common.c: Likewise. * config/arm/arm-builtins.c: Likewise. * config/arm/arm-c.c: Likewise. * config/arm/arm.c: Likewise. * config/avr/avr-c.c: Likewise. * config/avr/avr-log.c: Likewise. * config/avr/avr.c: Likewise. * config/bfin/bfin.c: Likewise. * config/c6x/c6x.c: Likewise. * config/cr16/cr16.c: Likewise. * config/cris/cris.c: Likewise. * config/darwin-c.c: Likewise. * config/darwin.c: Likewise. * config/epiphany/epiphany.c: Likewise. * config/epiphany/mode-switch-use.c: Likewise. * config/epiphany/resolve-sw-modes.c: Likewise. * config/fr30/fr30.c: Likewise. * config/frv/frv.c: Likewise. * config/ft32/ft32.c: Likewise. * config/h8300/h8300.c: Likewise. * config/i386/i386-c.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/msformat-c.c: Likewise. * config/i386/winnt-cxx.c: Likewise. * config/i386/winnt-stubs.c: Likewise. * config/i386/winnt.c: Likewise. * config/ia64/ia64-c.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/lm32/lm32.c: Likewise. * config/m32c/m32c-pragma.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32r/m32r.c: Likewise. * config/m68k/m68k.c: Likewise. * config/mcore/mcore.c: Likewise. * config/mep/mep-pragma.c: Likewise. * config/mep/mep.c: Likewise. * config/microblaze/microblaze-c.c: Likewise. * config/microblaze/microblaze.c: Likewise. * config/mips/mips.c: Likewise. * config/mmix/mmix.c: Likewise. * config/mn10300/mn10300.c: Likewise. * config/moxie/moxie.c: Likewise. * config/msp430/msp430-c.c: Likewise. * config/msp430/msp430.c: Likewise. * config/nds32/nds32-cost.c: Likewise. * config/nds32/nds32-fp-as-gp.c: Likewise. * config/nds32/nds32-intrinsic.c: Likewise. * config/nds32/nds32-isr.c: Likewise. * config/nds32/nds32-md-auxiliary.c: Likewise. * config/nds32/nds32-memory-manipulation.c: Likewise. * config/nds32/nds32-pipelines-auxiliary.c: Likewise. * config/nds32/nds32-predicates.c: Likewise. * config/nds32/nds32.c: Likewise. * config/nios2/nios2.c: Likewise. * config/nvptx/nvptx.c: Likewise. * config/pa/pa.c: Likewise. * config/pdp11/pdp11.c: Likewise. * config/rl78/rl78-c.c: Likewise. * config/rl78/rl78.c: Likewise. * config/rs6000/rs6000-c.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rx/rx.c: Likewise. * config/s390/s390-c.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh-c.c: Likewise. * config/sh/sh-mem.cc: Likewise. * config/sh/sh.c: Likewise. * config/sh/sh_optimize_sett_clrt.cc: Likewise. * config/sh/sh_treg_combine.cc: Likewise. * config/sol2-c.c: Likewise. * config/sol2-cxx.c: Likewise. * config/sol2-stubs.c: Likewise. * config/sol2.c: Likewise. * config/sparc/sparc-c.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu-c.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/tilegx/mul-tables.c: Likewise. * config/tilegx/tilegx-c.c: Likewise. * config/tilegx/tilegx.c: Likewise. * config/tilepro/mul-tables.c: Likewise. * config/tilepro/tilepro-c.c: Likewise. * config/tilepro/tilepro.c: Likewise. * config/v850/v850-c.c: Likewise. * config/v850/v850.c: Likewise. * config/vax/vax.c: Likewise. * config/visium/visium.c: Likewise. * config/vms/vms-c.c: Likewise. * config/vms/vms.c: Likewise. * config/vxworks.c: Likewise. * config/xtensa/xtensa.c: Likewise. ada 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * gcc-interface/cuintp.c: Adjust includes. * gcc-interface/decl.c: Likewise. * gcc-interface/misc.c: Likewise. * gcc-interface/targtyps.c: Likewise. * gcc-interface/trans.c: Likewise. * gcc-interface/utils.c: Likewise. * gcc-interface/utils2.c: Likewise. c 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * c-array-notation.c: Adjust includes. * c-aux-info.c: Likewise. * c-convert.c: Likewise. * c-decl.c: Likewise. * c-errors.c: Likewise. * c-lang.c: Likewise. * c-objc-common.c: Likewise. * c-parser.c: Likewise. * c-typeck.c: Likewise. c-family 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * array-notation-common.c: Adjust includes. * c-ada-spec.c: Likewise. * c-cilkplus.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-dump.c: Likewise. * c-format.c: Likewise. * c-gimplify.c: Likewise. * c-indentation.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-pch.c: Likewise. * c-ppoutput.c: Likewise. * c-pragma.c: Likewise. * c-pretty-print.c: Likewise. * c-semantics.c: Likewise. * c-ubsan.c: Likewise. * cilk.c: Likewise. * stub-objc.c: Likewise. cp 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * call.c: Adjust includes. * class.c: Likewise. * constexpr.c: Likewise. * cp-array-notation.c: Likewise. * cp-gimplify.c: Likewise. * cp-lang.c: Likewise. * cp-objcp-common.c: Likewise. * cp-ubsan.c: Likewise. * cvt.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * dump.c: Likewise. * error.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * friend.c: Likewise. * init.c: Likewise. * lambda.c: Likewise. * lex.c: Likewise. * mangle.c: Likewise. * method.c: Likewise. * name-lookup.c: Likewise. * optimize.c: Likewise. * parser.c: Likewise. * pt.c: Likewise. * ptree.c: Likewise. * repo.c: Likewise. * rtti.c: Likewise. * search.c: Likewise. * semantics.c: Likewise. * tree.c: Likewise. * typeck.c: Likewise. * typeck2.c: Likewise. fortran 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * convert.c: Adjust includes. * cpp.c: Likewise. * decl.c: Likewise. * f95-lang.c: Likewise. * iresolve.c: Likewise. * match.c: Likewise. * module.c: Likewise. * options.c: Likewise. * target-memory.c: Likewise. * trans-array.c: Likewise. * trans-common.c: Likewise. * trans-const.c: Likewise. * trans-decl.c: Likewise. * trans-expr.c: Likewise. * trans-intrinsic.c: Likewise. * trans-io.c: Likewise. * trans-openmp.c: Likewise. * trans-stmt.c: Likewise. * trans-types.c: Likewise. * trans.c: Likewise. go 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * go-backend.c: Adjust includes. * go-gcc.cc: Likewise. * go-lang.c: Likewise. java 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * boehm.c: Adjust includes. * builtins.c: Likewise. * class.c: Likewise. * constants.c: Likewise. * decl.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * java-gimplify.c: Likewise. * jcf-dump.c: Likewise. * jcf-io.c: Likewise. * jcf-parse.c: Likewise. * jvgenmain.c: Likewise. * lang.c: Likewise. * mangle.c: Likewise. * mangle_name.c: Likewise. * resource.c: Likewise. * typeck.c: Likewise. * verify-glue.c: Likewise. jit 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * dummy-frontend.c: Adjust includes. * jit-common.h: Likewise. * jit-playback.c: Likewise. lto 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * lto-lang.c: Adjust includes. * lto-object.c: Likewise. * lto-partition.c: Likewise. * lto-symtab.c: Likewise. * lto.c: Likewise. objc 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * objc-act.c: Adjust includes. * objc-encoding.c: Likewise. * objc-gnu-runtime-abi-01.c: Likewise. * objc-lang.c: Likewise. * objc-map.c: Likewise. * objc-next-runtime-abi-01.c: Likewise. * objc-next-runtime-abi-02.c: Likewise. * objc-runtime-shared-support.c: Likewise. objcp 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * objcp-decl.c: Adjust includes. * objcp-lang.c: Likewise. From-SVN: r225531
2015-07-08 02:53:03 +02:00
#include "backend.h"
genattrtab.c (write_header): Include hash-set.h... 2015-01-09 Michael Collison <michael.collison@linaro.org> * genattrtab.c (write_header): Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating insn-attrtab.c. * genautomata.c (main) : Include hash-set.h, macInclude hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating insn-automata.c. * genemit.c (main): Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating insn-emit.c. * gengtype.c (open_base_files): Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating gtype-desc.c. * genopinit.c (main): Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating insn-opinit.c. * genoutput.c (output_prologue): Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating insn-output.c. * genpeep.c (main): Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating insn-peep.c. * genpreds.c (write_insn_preds_c): Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating insn-preds.c. * optc-save-gen-awk: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating options-save.c. * opth-gen.awk: Change include guard from GCC_C_COMMON_H to GCC_C_COMMON_C when generating options.h. * ada/gcc-interface/cuintp.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ada/gcc-interface/decl.c: ditto. * ada/gcc-interface/misc.c: ditto. * ada/gcc-interface/targtyps.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ada/gcc-interface/trans.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, real.h, fold-const.h, wide-int.h, inchash.h due to flattening of tree.h. * ada/gcc-interface/utils.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ada/gcc-interface/utils2.c: ditto. * alias.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * asan.c: ditto. * attribs.c: ditto. * auto-inc-dec.c: ditto. * auto-profile.c: ditto * bb-reorder.c: ditto. * bt-load.c: Include symtab.h due to flattening of tree.h. * builtins.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * c/c-array-notation.c: ditto. * c/c-aux-info.c: ditto. * c/c-convert.c: ditto. * c/c-decl.c: ditto. * c/c-errors.c: ditto. * c/c-lang.c: dittoxs. * c/c-objc-common.c: ditto. * c/c-parser.c: ditto. * c/c-typeck.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, inchash.h, real.h and fixed-value.h due to flattening of tree.h. * calls.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ccmp.c: ditto. * c-family/array-notation-common.c: ditto. * c-family/c-ada-spec.c: ditto. * c-family/c-cilkplus.c: ditto. * c-family/c-common.c: Include input.h due to flattening of tree.h. Define macro GCC_C_COMMON_C. * c-family/c-common.h: Flatten tree.h header files into c-common.h. Remove include of tree-core.h. * c-family/c-cppbuiltin.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * c-family/c-dump.c: ditto. * c-family/c-format.c: Flatten tree.h header files into c-common.h. * c-family/c-cppbuiltin.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * c-family/c-dump.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * c-family/c-format.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * c-family/c-gimplify.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * c-family/cilk.c: ditto. * c-family/c-lex.c: ditto. * c-family/c-omp.c: ditto. * c-family/c-opts.c: ditto. * c-family/c-pch.c: ditto. * c-family/c-ppoutput.c: ditto. * c-family/c-pragma.c: ditto. * c-family/c-pretty-print.c: ditto. * c-family/c-semantics.c: ditto. * c-family/c-ubsan.c: ditto. * c-family/stub-objc.c: ditto. * cfgbuild.c: ditto. * cfg.c: ditto. * cfgcleanup.c: ditto. * cfgexpand.c: ditto. * cfghooks.c: ditto. * cfgloop.c: Include symtab.h, fold-const.h, and inchash.h due to flattening of tree.h. * cfgloopmanip.c: ditto. * cfgrtl.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * cgraphbuild.c: ditto. * cgraph.c: ditto. * cgraphclones.c: ditto. * cgraphunit.c: ditto. * cilk-common.c: ditto. * combine.c: ditto. * combine-stack-adj.c: Include symbol.h due to flattening of tree.h. * config/aarch64/aarch64-builtins.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/aarch64/aarch64.c: ditto. * config/alpha/alpha.c: ditto. * config/arc/arc.c: ditto. * config/arm/aarch-common.c: ditto. * config/arm/arm-builtins.c: ditto. * config/arm/arm.c: ditto. * config/arm/arm-c.c: ditto. * config/avr/avr.c: ditto. * config/avr/avr-c.c: ditto. * config/avr/avr-log.c: ditto. * config/bfin/bfin.c: ditto. * config/c6x/c6x.c: ditto. * config/cr16/cr16.c: ditto. * config/cris/cris.c: ditto. * config/darwin.c: ditto. * config/darwin-c.c: ditto. * config/default-c.c: ditto. * config/epiphany/epiphany.c: ditto. * config/fr30/fr30.c: ditto. * config/frv/frv.c: ditto. * config/glibc-c.c: ditto. * config/h8300/h8300.c: ditto. * config/i386/i386.c: ditto. * config/i386/i386-c.c: ditto. * config/i386/msformat.c: ditto. * config/i386/winnt.c: ditto. * config/i386/winnt-cxx.c: ditto. * config/i386/winnt-stubs.c: ditto. * config/ia64/ia64.c: ditto. * config/ia64/ia64-c.c: ditto. * config/iq2000/iq2000.c: ditto. * config/lm32/lm32.c: Include symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/m32c/m32c.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/m32c/m32c-pragma.c: ditto. * config/m32c/m32cr.c: ditto. * config/m68/m68k.c: ditto. * config/mcore/mcore.c: ditto. * config/mep/mep.c: ditto. * config/mep/mep-pragma.c: ditto. * config/microblaze/microblaze.c: ditto. * config/microblaze/microblaze-c.c: ditto. * config/mips/mips.c: ditto. * config/mmix/mmix.c: Include symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/mn10300/mn10300.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/moxie/moxie.c: ditto. * config/msp430/msp430.c: ditto. * config/msp430/msp430-c.c: ditto. * config/nds32/nds32.c: ditto. * config/nds32/nds32-cost.c: ditto. * config/nds32/nds32-fp-as-gp.c: ditto. * config/nds32/nds32-intrinsic.c: ditto. * config/nds32/nds32-isr.c: ditto. * config/nds32/nds32-md-auxillary.c: ditto. * config/nds32/nds32-memory-manipulationx.c: ditto. * config/nds32/nds32-pipelines-auxillary.c: ditto. * config/nds32/nds32-predicates.c: ditto. * config/nios2/nios2.c: ditto. * config/nvptx/nvptx.c: ditto. * config/pa/pa.c: ditto. * config/pdp11/pdp11x.c: Include symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/rl78/rl78.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/rl78/rl78-cx.c: ditto. * config/rs6000/rs6000.c: ditto. * config/rs6000/rs6000-c.c: ditto. * config/rx/rx.c: ditto. * config/s390/s390.c: ditto. * config/sh/sh.c: ditto. * config/sh/sc.c: ditto. * config/sh/sh-mem.cc: ditto. * config/sh/sh_treg_combine.cc: Include symtab.h, inchash.h and tree.h due to flattening of tree.h. Remove include of tree-core.h. * config/sol2.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/sol2-c.c: ditto. * config/sol2-cxx.c: ditto. * config/sol2-stubs.c: ditto. * config/sparc/sparc.c: ditto. * config/sparc/sparc-cx.c: ditto. * config/spu/spu.c: ditto. * config/spu/spu-c.c: ditto * config/storym16/stormy16.c: ditto. * config/tilegx/tilegx.c: Include symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/tilepro/gen-mul-tables.cc: Include symtab.h in generated file. * config/tilegx/tilegx-c.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/tilepro/tilepro.c: Include symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/tilepro/tilepro-c.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/v850/v850.c: ditto. * config/v850/v850-c.c: ditto. * config/vax/vax.c: ditto. * config/vms/vms.c: ditto. * config/vms/vms-c.c: ditto. * config/vxworks.c: ditto. * config/winnt-c.c: ditto. * config/xtensa/xtensa.c: Include symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * convert.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * coverage.c: ditto. * cp/call.c: ditto. * cp/class.c: ditto. * cp/constexpr.c: ditto. * cp/cp-array-notation.c: ditto. * cp/cp-gimplify.c: ditto. * cp/cp-lang.c: ditto. * cp/cp-objcp-common.c: ditto. * cp/cvt.c: ditto. * cp/decl2.c: ditto. * cp/decl.c: ditto. * cp/dump.c: ditto. * cp/error.c: ditto. * cp/except.c: ditto. * cp/expr.c: ditto. * cp/friend.c: ditto. * cp/init.c: ditto. * cp/lambda.c: ditto. * cp/lex.c: ditto. * cp/mangle.c: ditto. * cp/name-lookup.c: ditto. * cp/optimize.c: ditto. * cp/parser.c: ditto. * cp/pt.c: ditto. * cp/ptree.c: ditto. * cp/repo.c: ditto. * cp/rtti.c: ditto. * cp/search.c: ditto. * cp/semantics.c: ditto. * cp/tree.c: ditto. * cp/typeck2.c: ditto. * cp/typeck.c: ditto. * cppbuiltin.c: ditto. * cprop.c: ditto. * cse.c: Add include of symtab.h due to flattening of tree.h. * cselib.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * data-streamer.c: ditto. * data-streamer-in.c: ditto. * data-streamer-out.c: ditto. * dbxout.c: ditto. * dce.c: ditto. * ddg.c: Add include of symtab.h due to flattening of tree.h. * debug.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * dfp.c: ditto. * df-scan.c: ditto. * dojump.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * double-int.c: ditto. * dse.c: ditto. * dumpfile.c: ditto. * dwarf2asm.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * dwarf2cfi.c: ditto. * dwarf2out.c: ditto. * emit-rtl.c: ditto. * except.c: ditto. * explow.c: ditto. * expmed.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * expr.c: ditto. * final.c: ditto. * fixed-value.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and fixed-value.h due to flattening of tree.h. * fold-const.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. Relocate inline function convert_to_ptrofftype_loc from tree.h. Relocate inline function fold_build_pointer_plus_loc from tree.h. Relocate inline function fold_build_pointer_plus_hwi_loc from tree.h. * fold-const.h: Relocate macro convert_to_ptrofftype from tree.h. Relocate macro fold_build_pointer_plus to relocate from tree.h.h. Relocate macro fold_build_pointer_plus_hwi from tree.h. Add prototype for convert_to_ptrofftype_loc relocated from tree.h. Add prototype for fold_build_pointer_plus_loc relocated from tree.h. Add prototype for fold_build_pointer_plus_hwi_loc relocated from tree.h. * fortran/convert.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/cpp.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/decl.c: ditto. * fortran/f95.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/iresolve.c: ditto. * fortran/match.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/module.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/options.c: ditto. * fortran/target-memory.c: Include hash-set.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/trans-array.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/trans.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/trans-common.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/trans-const.c: ditto. * fortran/trans-decl.c: ditto. * fortran/trans-expr.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/trans-intrinsic.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * fortran/trans-io.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/trans-openmp.c: ditto. * fortran/trans-stmt.c: ditto. * fortran/trans-types.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * function.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * gcc-plugin.h: Include statistics.h, double-int.h, real.h, fixed-value.h, alias.h, flags.h, and symtab.h due to flattening of tree.h * gcse.c: ditto. * generic-match-head.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ggc-page.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * gimple-builder.c: ditto. * gimple.c: ditto. * gimple-expr.c: ditto. * gimple-fold.c: ditto. * gimple-iterator.c: ditto. * gimple-low.c: ditto. * gimple-match-head.c: ditto. * gimple-pretty-print.c: ditto. * generic-ssa-isolate-paths.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * gimple-ssa-strength-reduction.c: ditto. * gimple-streamer-in.c: ditto. * gimple-streamer-out.c: ditto. * gimple-walk.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * gimplify.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * gimplify-me.c: ditto. * go/go-gcc.cc: ditto. * go/go-lang.c: ditto. * go/gdump.c: ditto. * graphite-blocking.c: ditto. * graphite.c: ditto. * graphite-dependencies.c: ditto. * graphite-interchange.c: ditto. * graphite-isl-ast-to-gimple.c: ditto. * graphite-optimize-isl.c: ditto. * graphite-poly.c: ditto. * graphite-scop-detection.c: ditto. * graphite-sese-to-poly.c: ditto. * hw-doloop.c: Include symtab.h due to flattening of tree.h. * ifcvt.c: ditto. * init-regs.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * internal-fc.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h,options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa.c: ditto. * ipa-chkp.c: ditto. * ipa-comdats.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa-cp.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h,options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa-devirt.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa-icf.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h,options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa-icf-gimple.c: ditto. * ipa-inline-analysis.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa-inline.c: ditto. * ipa-inline-transform.c: ditto. * ipa-polymorhpic-call.c: ditto. * ipa-profile.c: ditto. * ipa-prop.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa-pure-const.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa-ref.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa-reference.c: ditto. * ipa-split.c: ditto. * ipa-utils.c: ditto. * ipa-visbility.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ira.c: ditto. * ira-color.c: Include hash-set.h due to flattening of tree.h. * ira-costs.c: ditto. * ira-emit.c: ditto. * java/boehm.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * java/builtins.c: ditto. * java/class.c: ditto. * java/constants.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * java/decl.c: ditto. * java/except.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * java/expr.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h,inchash.h and real.h due to flattening of tree.h. * java/gimplify.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * java/jcf-dump.c: ditto. * java/jcf-io.c: ditto. * java/jcf-parse.c: ditto. * java/jvgenmain.c: ditto. * java/lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * java/mangle.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * java/mangle_name.c: ditto. * java/resource.c: ditto. * java/typeck.c: ditto. * java/verify-glue.c: ditto. * java/verify-impl.c: ditto. * jump.c: Include symtab.h due to flattening of tree.h. * langhooks.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * loop-doloop.c: Include symtab.h due to flattening of tree.h. * loop-init.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * loop-invariant.c: Include symtab.h due to flattening of tree.h. * loop-iv.c: ditto. * loop-unroll.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * lower-subreg.c: ditto. * lra-assigns.c: Include symtab.h due to flattening of tree.h. * lra.c: Include symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * lra-coalesce.c: Include symtab.h due to flattening of tree.h. * lra-constraints.c: ditto. * lra-eliminations.c: ditto. * lra-livesc: ditto. * lra-remat.c: ditto. * lra-spills.c: ditto. * lto/lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * lto/lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * lto/lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * lto/lto-partition.c: ditto. * lto/lto-symtab.c: ditto. * lto-cgraph.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * lto-compress.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * lto-opts.c: ditto. * lto-section-in.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * lto-section-out.c: ditto. * lto-streamer.c: ditto. * lto-streamer-in.c: ditto. * lto-streamer-out.c: ditto. * modulo-sched.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * objc/objc-act.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * objc/objc-encoding.c: ditto. * objc/objc-gnu-runtime-abi-01.c: ditto. * objc/objc-lang.c: ditto. * objc/objc-map.c: ditto. * objc/objc-next-runtime-abi-01.c: ditto. * objc/objc-next-runtime-abi-02.c: ditto. * objc/objc-runtime-shared-support.c: ditto. * objcp/objcp-decl.c: ditto. * objcp/objcp-lang.c: ditto. * omega.c: ditto. * omega-low.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * optabs.c: ditto. * opts-global.c: ditto. * passes.c: ditto. * plugin.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * postreload.c: Include symtab.h due to flattening of tree.h. * postreload-gcse.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * predict.c: ditto. * print-rtl.c: ditto. * print-tree.c: ditto. * profile.c: Include symtab.h, fold-const.h and inchash.h due to flattening of tree.h. * real.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * realmpfr.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * recog.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ree.c: ditto. * reginfo.c: ditto. * reg-stack.c: ditto. * reload1.c: Include symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * reload.c: Include symtab.h due to flattening of tree.h. * reorg.c: ditto. * rtlanal.c: Include symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * rtl-chkp.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * rtlhooks.c: Include symtab.h due to flattening of tree.h. * sanopt.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * sched-deps.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * sched-vis.c: ditto. * sdbout.c: ditto. * sel-sched.c: Include symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * sel-sched-ir.c: ditto. * sese.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * shrink-wrap.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * simplify-rtx.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * stack-ptr-mod.c: ditto. * stmt.c: ditto. * store-motion.c: ditto. * store-layout.c: ditto. * stringpool.c: ditto. * symtab.c: ditto. * target-globals.c: ditto. * targhooks.c: ditto. * toplev.c: ditto. * tracer.c: ditto. * trans-mem.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree-affine.c: ditto. * tree-browser.c: ditto. * tree.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree-call-cdce.c: Include symtab.h, alias.h, double-int.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * tree-cfg.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree-cfgcleanup.c: ditto. * tree-chkp.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree-chkp-opt.c: ditto. * tree-chrec.c: ditto. * tree-chkp-opt.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * tree-core.h: Flatten header file by removing all #include statements. * tree-data-ref.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree-dfa.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * tree-diagnostic.c: ditto. * tree-dump.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h, real.h and fixed-value.h due to flattening of tree.h. * tree-dfa.c: ditto. * tree-eh.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * tree-emutls.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree.h: Flatten header files by removing all includes except tree-core.h. Remove inline function convert_to_ptrofftype_loc to relocate to fold-const.c. Remove macro convert_to_ptrofftype to relocate to fold-const.h. Remove inline function fold_build_pointer_plus_loc to relocate to fold-const.c. Remove macro fold_build_pointer_plus to relocate to fold-const.h. Remove inline function fold_build_pointer_plus_hwi_loc to relocate to fold-const.c. Remove macro fold_build_pointer_plus_hwi to relocate to fold-const.h. * tree-if-conv.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h, real.h and fixed-value.h due to flattening of tree.h. * tree-inline.c: ditto. * tree-into-ssa.c: ditto. * tree-iterator.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree-loop-distribution.c: ditto. * tree-nested.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-nrv.c: ditto. * tree-object-size.c: ditto. * tree-outof-ssa.c: ditto. * tree-parloops.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree-phinodes.c: ditto. * tree-predcom.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-pretty-print.c: ditto. * tree-profile.c: double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-scalar-evolution.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-sra.c: Include vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree-ssa-alias.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-ssa.c: ditto. * tree-ssa-ccp.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * tree-ssa-coalesce.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-ssa-copy.c: ditto. * tree-ssa-copyrename.c: ditto. * tree-ssa-dce.c: ditto. * tree-ssa-dom.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * tree-ssa-dse.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-ssa-forwprop.c: ditto. * tree-ssa-ifcombine.c: ditto. * tree-ssa-live.c: ditto. * tree-ssa-loop.c: ditto. * tree-ssa-loop-ch.c: ditto. * tree-ssa-loop-im.c: ditto. * tree-ssa-loop-ivcanon.c: ditto. * tree-ssa-loop-ivopts.c: ditto. * tree-ssa-loop-manip.c: ditto. * tree-ssa-loop-niter.c: ditto. * tree-ssa-loop-prefetch.c: ditto. * tree-ssa-loop-unswitch.c: ditto. * tree-ssa-loop-math-opts.c: ditto. * tree-ssanames.c: ditto. * tree-ssa-operands.c: ditto. * tree-ssa-phiopt.c: ditto. * tree-ssa-phiprop.c: ditto. * tree-ssa-pre.c: ditto. * tree-ssa-propagate.c: ditto. * tree-ssa-reassoc.c: ditto. * tree-ssa-sccvn.c: ditto. * tree-ssa-sink.c: ditto. * tree-ssa-strlen.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-ssa-structalias.c: double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-ssa-tail-merge.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-ssa-ter.c: ditto. * tree-ssa-threadedge.c: ditto. * tree-ssa-threadupdate.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-ssa-uncprop.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-ssa-uninit.c: ditto. * tree-stdarg.c: Include vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-streamer.c: Include vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-streamer-in.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, inchash.h, real.h and fixed-value.h due to flattening of tree.h. * tree-streamer-out.c: dittoo. * tree-switch-conversion.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-tailcall.c: ditto. * tree-vect-data-refs.c: ditto. * tree-vect-generic.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-vect-loop.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-vect-loop-manip.c: ditto. * tree-vectorizer.c: ditto. * tree-vect-patterns.c: ditto. * tree-vect-slp.c: ditto. * tree-vect-stmts.c: ditto. * tree-vrp.c: ditto. * tsan.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * ubsan.c: ditto. * value-prof.c.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * varasm.c: ditto. * varpool.c: ditto. * var-tracking.c: ditto. * vmsdbgout.c: ditto. * vtable-verify.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * wide-int.cc: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * xcoffout.c: ditto. * libcc1/plugin.cc: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. From-SVN: r219402
2015-01-09 21:18:42 +01:00
#include "tree.h"
tree-core.h: Include symtab.h. 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * tree-core.h: Include symtab.h. * rtl.h: Include hard-reg-set.h but not flags.h. (HARD_CONST): Remove condition compilation involving HARD_CONST since hard-reg-set.h is always included. * regs.h: Don't include hard-reg-set.h or rtl.h. * cfg.h: Include dominance.h. * gimple.h: Include tree-ssa-alias.h and gimple-expr.h. * backend.h: New. Aggregate commonly used backend header files. * gimple-ssa.h: Don't include tree-hasher.h. * ssa.h: New. Aggregate commonly used SSA header files. * regset.h: Remove bitmap.h and hard-reg-set.h #includes. * sel-sched-ir.h: Flatten includes. * lra-int.h: Flatten completely. * sel-sched-dump.h: Flatten includes. * ira-int.h: Flatten includes. * gimple-streamer.h: Remove all includes. * cfgloop.h: Remove all #includes except cfgloopmanip.h. * resource.h: Flatten hard-reg-set.h and df.h. * sched-int.h: Flatten insn-arrt.h and df.h. * valtrack.h: flatten bitmap.h, df.h, and rtl.h * df.h: Flatten includes, leaving regset.h, alloc-pool.h and timevar.h. * genattrtab.c (write_header): Adjust generated includes. * genautomata.c (main): Likewise. * genconditions.c (write-header): Likewise. * genemit.c (main): Likewise. * gengtype.c (open_base_files): Likewise. * genopinit.c (main): Likewise. * genoutput.c (output_prologue): Likewise. * genpeep.c (main): Likewise. * genpreds.c (write_insn_preds_c): Likewise. * genrecog.c (write_header): Likewise. * alias.c: Adjust includes. * asan.c: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * auto-profile.c: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * ccmp.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfgloop.c: Likewise. * cfgloopanal.c: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraphbuild.c: Likewise. * cgraphclones.c: Likewise. * cgraphunit.c: Likewise. * cilk-common.c: Likewise. * combine-stack-adj.c: Likewise. * combine.c: Likewise. * compare-elim.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * cppbuiltin.c: Likewise. * cprop.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * data-streamer-in.c: Likewise. * data-streamer-out.c: Likewise. * data-streamer.c: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * debug.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dfp.c: Likewise. * dojump.c: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * dse.c: Likewise. * dumpfile.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2cfi.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * final.c: Likewise. * fixed-value.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * fwprop.c: Likewise. * gcc-plugin.h: Likewise. * gcse-common.c: Likewise. * gcse.c: Likewise. * generic-match-head.c: Likewise. * ggc-page.c: Likewise. * gimple-builder.c: Likewise. * gimple-expr.c: Likewise. * gimple-fold.c: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-match-head.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple-ssa-isolate-paths.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * gimple-streamer-in.c: Likewise. * gimple-streamer-out.c: Likewise. * gimple-walk.c: Likewise. * gimple.c: Likewise. * gimplify-me.c: Likewise. * gimplify.c: Likewise. * godump.c: Likewise. * graph.c: Likewise. * graphite-blocking.c: Likewise. * graphite-dependences.c: Likewise. * graphite-interchange.c: Likewise. * graphite-isl-ast-to-gimple.c: Likewise. * graphite-optimize-isl.c: Likewise. * graphite-poly.c: Likewise. * graphite-scop-detection.c: Likewise. * graphite-sese-to-poly.c: Likewise. * graphite.c: Likewise. * haifa-sched.c: Likewise. * hw-doloop.c: Likewise. * ifcvt.c: Likewise. * init-regs.c: Likewise. * internal-fn.c: Likewise. * ipa-chkp.c: Likewise. * ipa-comdats.c: Likewise. * ipa-cp.c: Likewise. * ipa-devirt.c: Likewise. * ipa-icf-gimple.c: Likewise. * ipa-icf.c: Likewise. * ipa-inline-analysis.c: Likewise. * ipa-inline-transform.c: Likewise. * ipa-inline.c: Likewise. * ipa-polymorphic-call.c: Likewise. * ipa-profile.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-ref.c: Likewise. * ipa-reference.c: Likewise. * ipa-split.c: Likewise. * ipa-utils.c: Likewise. * ipa-visibility.c: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lra-assigns.c: Likewise. * lra-coalesce.c: Likewise. * lra-constraints.c: Likewise. * lra-eliminations.c: Likewise. * lra-lives.c: Likewise. * lra-remat.c: Likewise. * lra-spills.c: Likewise. * lra.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * opts-global.c: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * real.c: Likewise. * realmpfr.c: Likewise. * recog.c: Likewise. * ree.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regrename.c: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtl-chkp.c: Likewise. * rtlanal.c: Likewise. * rtlhooks.c: Likewise. * sanopt.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-ir.c: Likewise. * sel-sched.c: Likewise. * sese.c: Likewise. * shrink-wrap.c: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * symtab.c: Likewise. * target-globals.c: Likewise. * targhooks.c: Likewise. * toplev.c: Likewise. * tracer.c: Likewise. * trans-mem.c: Likewise. * tree-affine.c: Likewise. * tree-browser.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chkp-opt.c: Likewise. * tree-chkp.c: Likewise. * tree-chrec.c: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-dfa.c: Likewise. * tree-diagnostic.c: Likewise. * tree-dump.c: Likewise. * tree-eh.c: Likewise. * tree-emutls.c: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-iterator.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-scopedtables.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-strlen.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-tail-merge.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-stdarg.c: Likewise. * tree-streamer-in.c: Likewise. * tree-streamer-out.c: Likewise. * tree-streamer.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tsan.c: Likewise. * ubsan.c: Likewise. * valtrack.c: Likewise. * value-prof.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vmsdbgout.c: Likewise. * vtable-verify.c: Likewise. * web.c: Likewise. * wide-int.cc: Likewise. * xcoffout.c: Likewise. * config/aarch64/aarch64-builtins.c: Likewise. * config/aarch64/aarch64.c: Likewise. * config/aarch64/cortex-a57-fma-steering.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arc/arc.c: Likewise. * config/arm/aarch-common.c: Likewise. * config/arm/arm-builtins.c: Likewise. * config/arm/arm-c.c: Likewise. * config/arm/arm.c: Likewise. * config/avr/avr-c.c: Likewise. * config/avr/avr-log.c: Likewise. * config/avr/avr.c: Likewise. * config/bfin/bfin.c: Likewise. * config/c6x/c6x.c: Likewise. * config/cr16/cr16.c: Likewise. * config/cris/cris.c: Likewise. * config/darwin-c.c: Likewise. * config/darwin.c: Likewise. * config/epiphany/epiphany.c: Likewise. * config/epiphany/mode-switch-use.c: Likewise. * config/epiphany/resolve-sw-modes.c: Likewise. * config/fr30/fr30.c: Likewise. * config/frv/frv.c: Likewise. * config/ft32/ft32.c: Likewise. * config/h8300/h8300.c: Likewise. * config/i386/i386-c.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/msformat-c.c: Likewise. * config/i386/winnt-cxx.c: Likewise. * config/i386/winnt-stubs.c: Likewise. * config/i386/winnt.c: Likewise. * config/ia64/ia64-c.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/lm32/lm32.c: Likewise. * config/m32c/m32c-pragma.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32r/m32r.c: Likewise. * config/m68k/m68k.c: Likewise. * config/mcore/mcore.c: Likewise. * config/mep/mep-pragma.c: Likewise. * config/mep/mep.c: Likewise. * config/microblaze/microblaze-c.c: Likewise. * config/microblaze/microblaze.c: Likewise. * config/mips/mips.c: Likewise. * config/mmix/mmix.c: Likewise. * config/mn10300/mn10300.c: Likewise. * config/moxie/moxie.c: Likewise. * config/msp430/msp430-c.c: Likewise. * config/msp430/msp430.c: Likewise. * config/nds32/nds32-cost.c: Likewise. * config/nds32/nds32-fp-as-gp.c: Likewise. * config/nds32/nds32-intrinsic.c: Likewise. * config/nds32/nds32-isr.c: Likewise. * config/nds32/nds32-md-auxiliary.c: Likewise. * config/nds32/nds32-memory-manipulation.c: Likewise. * config/nds32/nds32-pipelines-auxiliary.c: Likewise. * config/nds32/nds32-predicates.c: Likewise. * config/nds32/nds32.c: Likewise. * config/nios2/nios2.c: Likewise. * config/nvptx/nvptx.c: Likewise. * config/pa/pa.c: Likewise. * config/pdp11/pdp11.c: Likewise. * config/rl78/rl78-c.c: Likewise. * config/rl78/rl78.c: Likewise. * config/rs6000/rs6000-c.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rx/rx.c: Likewise. * config/s390/s390-c.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh-c.c: Likewise. * config/sh/sh-mem.cc: Likewise. * config/sh/sh.c: Likewise. * config/sh/sh_optimize_sett_clrt.cc: Likewise. * config/sh/sh_treg_combine.cc: Likewise. * config/sol2-c.c: Likewise. * config/sol2-cxx.c: Likewise. * config/sol2-stubs.c: Likewise. * config/sol2.c: Likewise. * config/sparc/sparc-c.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu-c.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/tilegx/mul-tables.c: Likewise. * config/tilegx/tilegx-c.c: Likewise. * config/tilegx/tilegx.c: Likewise. * config/tilepro/mul-tables.c: Likewise. * config/tilepro/tilepro-c.c: Likewise. * config/tilepro/tilepro.c: Likewise. * config/v850/v850-c.c: Likewise. * config/v850/v850.c: Likewise. * config/vax/vax.c: Likewise. * config/visium/visium.c: Likewise. * config/vms/vms-c.c: Likewise. * config/vms/vms.c: Likewise. * config/vxworks.c: Likewise. * config/xtensa/xtensa.c: Likewise. ada 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * gcc-interface/cuintp.c: Adjust includes. * gcc-interface/decl.c: Likewise. * gcc-interface/misc.c: Likewise. * gcc-interface/targtyps.c: Likewise. * gcc-interface/trans.c: Likewise. * gcc-interface/utils.c: Likewise. * gcc-interface/utils2.c: Likewise. c 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * c-array-notation.c: Adjust includes. * c-aux-info.c: Likewise. * c-convert.c: Likewise. * c-decl.c: Likewise. * c-errors.c: Likewise. * c-lang.c: Likewise. * c-objc-common.c: Likewise. * c-parser.c: Likewise. * c-typeck.c: Likewise. c-family 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * array-notation-common.c: Adjust includes. * c-ada-spec.c: Likewise. * c-cilkplus.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-dump.c: Likewise. * c-format.c: Likewise. * c-gimplify.c: Likewise. * c-indentation.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-pch.c: Likewise. * c-ppoutput.c: Likewise. * c-pragma.c: Likewise. * c-pretty-print.c: Likewise. * c-semantics.c: Likewise. * c-ubsan.c: Likewise. * cilk.c: Likewise. * stub-objc.c: Likewise. cp 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * call.c: Adjust includes. * class.c: Likewise. * constexpr.c: Likewise. * cp-array-notation.c: Likewise. * cp-gimplify.c: Likewise. * cp-lang.c: Likewise. * cp-objcp-common.c: Likewise. * cp-ubsan.c: Likewise. * cvt.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * dump.c: Likewise. * error.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * friend.c: Likewise. * init.c: Likewise. * lambda.c: Likewise. * lex.c: Likewise. * mangle.c: Likewise. * method.c: Likewise. * name-lookup.c: Likewise. * optimize.c: Likewise. * parser.c: Likewise. * pt.c: Likewise. * ptree.c: Likewise. * repo.c: Likewise. * rtti.c: Likewise. * search.c: Likewise. * semantics.c: Likewise. * tree.c: Likewise. * typeck.c: Likewise. * typeck2.c: Likewise. fortran 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * convert.c: Adjust includes. * cpp.c: Likewise. * decl.c: Likewise. * f95-lang.c: Likewise. * iresolve.c: Likewise. * match.c: Likewise. * module.c: Likewise. * options.c: Likewise. * target-memory.c: Likewise. * trans-array.c: Likewise. * trans-common.c: Likewise. * trans-const.c: Likewise. * trans-decl.c: Likewise. * trans-expr.c: Likewise. * trans-intrinsic.c: Likewise. * trans-io.c: Likewise. * trans-openmp.c: Likewise. * trans-stmt.c: Likewise. * trans-types.c: Likewise. * trans.c: Likewise. go 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * go-backend.c: Adjust includes. * go-gcc.cc: Likewise. * go-lang.c: Likewise. java 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * boehm.c: Adjust includes. * builtins.c: Likewise. * class.c: Likewise. * constants.c: Likewise. * decl.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * java-gimplify.c: Likewise. * jcf-dump.c: Likewise. * jcf-io.c: Likewise. * jcf-parse.c: Likewise. * jvgenmain.c: Likewise. * lang.c: Likewise. * mangle.c: Likewise. * mangle_name.c: Likewise. * resource.c: Likewise. * typeck.c: Likewise. * verify-glue.c: Likewise. jit 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * dummy-frontend.c: Adjust includes. * jit-common.h: Likewise. * jit-playback.c: Likewise. lto 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * lto-lang.c: Adjust includes. * lto-object.c: Likewise. * lto-partition.c: Likewise. * lto-symtab.c: Likewise. * lto.c: Likewise. objc 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * objc-act.c: Adjust includes. * objc-encoding.c: Likewise. * objc-gnu-runtime-abi-01.c: Likewise. * objc-lang.c: Likewise. * objc-map.c: Likewise. * objc-next-runtime-abi-01.c: Likewise. * objc-next-runtime-abi-02.c: Likewise. * objc-runtime-shared-support.c: Likewise. objcp 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * objcp-decl.c: Adjust includes. * objcp-lang.c: Likewise. From-SVN: r225531
2015-07-08 02:53:03 +02:00
#include "gimple.h"
alias.c: Reorder #include statements and remove duplicates. 2015-10-29 Andrew MacLeod <amacleod@redhat.com> * alias.c: Reorder #include statements and remove duplicates. * asan.c: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * auto-profile.c: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * ccmp.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfgloop.c: Likewise. * cfgloopanal.c: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraphbuild.c: Likewise. * cgraphclones.c: Likewise. * cgraphunit.c: Likewise. * cilk-common.c: Likewise. * combine-stack-adj.c: Likewise. * combine.c: Likewise. * compare-elim.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * cppbuiltin.c: Likewise. * cprop.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * data-streamer-in.c: Likewise. * data-streamer-out.c: Likewise. * data-streamer.c: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * debug.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dfp.c: Likewise. * dojump.c: Likewise. * dominance.c: Likewise. * double-int.c: Likewise. * dse.c: Likewise. * dumpfile.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2cfi.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * except.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * final.c: Likewise. * fixed-value.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * fwprop.c: Likewise. * gcse.c: Likewise. * generic-match-head.c: Likewise. * ggc-common.c: Likewise. * gimple-builder.c: Likewise. * gimple-expr.c: Likewise. * gimple-fold.c: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-match-head.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple-ssa-isolate-paths.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * gimple-streamer-in.c: Likewise. * gimple-streamer-out.c: Likewise. * gimple-walk.c: Likewise. * gimple.c: Likewise. * gimplify-me.c: Likewise. * gimplify.c: Likewise. * godump.c: Likewise. * graph.c: Likewise. * graphite-poly.c: Likewise. * haifa-sched.c: Likewise. * hw-doloop.c: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * internal-fn.c: Likewise. * ipa-chkp.c: Likewise. * ipa-comdats.c: Likewise. * ipa-cp.c: Likewise. * ipa-devirt.c: Likewise. * ipa-icf-gimple.c: Likewise. * ipa-icf.c: Likewise. * ipa-inline-analysis.c: Likewise. * ipa-inline-transform.c: Likewise. * ipa-inline.c: Likewise. * ipa-polymorphic-call.c: Likewise. * ipa-profile.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-ref.c: Likewise. * ipa-reference.c: Likewise. * ipa-split.c: Likewise. * ipa-utils.c: Likewise. * ipa-visibility.c: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lra-assigns.c: Likewise. * lra-coalesce.c: Likewise. * lra-constraints.c: Likewise. * lra-eliminations.c: Likewise. * lra-lives.c: Likewise. * lra-remat.c: Likewise. * lra-spills.c: Likewise. * lra.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * opts-global.c: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * real.c: Likewise. * realmpfr.c: Likewise. * recog.c: Likewise. * ree.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regrename.c: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtl-chkp.c: Likewise. * rtl-error.c: Likewise. * rtlanal.c: Likewise. * rtlhooks.c: Likewise. * sanopt.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * sese.c: Likewise. * shrink-wrap.c: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * statistics.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * symtab.c: Likewise. * target-globals.c: Likewise. * targhooks.c: Likewise. * toplev.c: Likewise. * tracer.c: Likewise. * trans-mem.c: Likewise. * tree-affine.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chkp-opt.c: Likewise. * tree-chkp.c: Likewise. * tree-chrec.c: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-dfa.c: Likewise. * tree-diagnostic.c: Likewise. * tree-dump.c: Likewise. * tree-eh.c: Likewise. * tree-emutls.c: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-iterator.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-scopedtables.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-strlen.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-tail-merge.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-stdarg.c: Likewise. * tree-streamer-in.c: Likewise. * tree-streamer-out.c: Likewise. * tree-streamer.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tsan.c: Likewise. * ubsan.c: Likewise. * value-prof.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vtable-verify.c: Likewise. * web.c: Likewise. * wide-int-print.cc: Likewise. * wide-int.cc: Likewise. * xcoffout.c: Likewise. From-SVN: r229526
2015-10-29 14:57:32 +01:00
#include "tree-streamer.h"
#include "cgraph.h"
2011-08-08 18:49:34 +02:00
passes.c (ipa_write_summaries_1): Call lto_output_init_mode_table. * passes.c (ipa_write_summaries_1): Call lto_output_init_mode_table. (ipa_write_optimization_summaries): Likewise. * tree-streamer.h: Include data-streamer.h. (streamer_mode_table): Declare extern variable. (bp_pack_machine_mode, bp_unpack_machine_mode): New inline functions. * lto-streamer-out.c (lto_output_init_mode_table, lto_write_mode_table): New functions. (produce_asm_for_decls): Call lto_write_mode_table when streaming offloading LTO. * lto-section-in.c (lto_section_name): Add "mode_table" entry. (lto_create_simple_input_block): Add mode_table argument to the lto_input_block constructors. * ipa-prop.c (ipa_prop_read_section, read_replacements_section): Likewise. * data-streamer-in.c (string_for_index): Likewise. * ipa-inline-analysis.c (inline_read_section): Likewise. * ipa-icf.c (sem_item_optimizer::read_section): Likewise. * lto-cgraph.c (input_cgraph_opt_section): Likewise. * lto-streamer-in.c (lto_read_body_or_constructor, lto_input_toplevel_asms): Likewise. (lto_input_mode_table): New function. * tree-streamer-out.c (pack_ts_fixed_cst_value_fields, pack_ts_decl_common_value_fields, pack_ts_type_common_value_fields): Use bp_pack_machine_mode. * real.h (struct real_format): Add name field. * lto-streamer.h (enum lto_section_type): Add LTO_section_mode_table. (class lto_input_block): Add mode_table member. (lto_input_block::lto_input_block): Add mode_table_ argument, initialize mode_table. (struct lto_file_decl_data): Add mode_table field. (lto_input_mode_table, lto_output_init_mode_table): New prototypes. * tree-streamer-in.c (unpack_ts_fixed_cst_value_fields, unpack_ts_decl_common_value_fields, unpack_ts_type_common_value_fields): Call bp_unpack_machine_mode. * tree-streamer.c (streamer_mode_table): New variable. * real.c (ieee_single_format, mips_single_format, motorola_single_format, spu_single_format, ieee_double_format, mips_double_format, motorola_double_format, ieee_extended_motorola_format, ieee_extended_intel_96_format, ieee_extended_intel_128_format, ieee_extended_intel_96_round_53_format, ibm_extended_format, mips_extended_format, ieee_quad_format, mips_quad_format, vax_f_format, vax_d_format, vax_g_format, decimal_single_format, decimal_double_format, decimal_quad_format, ieee_half_format, arm_half_format, real_internal_format): Add name field. * config/pdp11/pdp11.c (pdp11_f_format, pdp11_d_format): Likewise. lto/ * lto.c (lto_mode_identity_table): New variable. (lto_read_decls): Add mode_table argument to the lto_input_block constructor. (lto_file_finalize): Initialize mode_table. (lto_init): Initialize lto_mode_identity_table. From-SVN: r221005
2015-02-26 13:26:11 +01:00
/* Table indexed by machine_mode, used for 2 different purposes.
During streaming out we record there non-zero value for all modes
that were streamed out.
During streaming in, we translate the on the disk mode using this
table. For normal LTO it is set to identity, for ACCEL_COMPILER
depending on the mode_table content. */
unsigned char streamer_mode_table[1 << 8];
data-streamer.h (streamer_write_zero): Rename from output_zero. * data-streamer.h (streamer_write_zero): Rename from output_zero. (streamer_write_uhwi): Rename from lto_output_uleb128. (streamer_write_hwi): Rename from output_sleb128. (streamer_write_string): Rename from lto_output_string. (streamer_string_index): Rename from lto_string_index. (streamer_write_string_with_length): Rename from lto_output_string_with_length. (streamer_write_uhwi_stream): Rename from lto_output_uleb128_stream. (streamer_write_hwi_stream): Rename from lto_output_sleb128_stream. (streamer_read_string): Rename from lto_input_string. (streamer_read_indexed_string): Rename from input_string_internal. (streamer_read_uhwi): Rename from lto_input_uleb128. (streamer_read_hwi): Rename from lto_input_sleb128. (streamer_write_hwi_in_range): Rename from lto_output_int_in_range. (streamer_read_hwi_in_range): Rename from lto_input_int_in_range. (streamer_write_enum): Rename from lto_output_enum. (streamer_read_enum): Rename from lto_input_enum. (streamer_write_record_start): Rename from output_record_start. (streamer_read_record_start): Rename from input_record_start. (streamer_write_bitpack): Rename from lto_output_bitpack. (streamer_read_bitpack): Rename from lto_input_bitpack. (streamer_write_char_stream): Rename from lto_output_1_stream. (streamer_read_uchar): Rename from lto_input_1_unsigned. * tree-streamer.h (streamer_cache_d): Rename from lto_streamer_cache_d. (streamer_handle_as_builtin_p): Rename from lto_stream_as_builtin_p. (streamer_read_string_cst): Rename from input_string_cst. (streamer_read_chain): Rename from lto_input_chain. (streamer_alloc_tree): Rename from lto_materialize_tree. (streamer_read_tree_body): Rename from lto_input_tree_pointers. (streamer_get_pickled_tree): Rename from lto_get_pickled_tree. (streamer_get_builtin_tree): Rename from lto_get_builtin_tree. (streamer_read_integer_cst): Rename from lto_input_integer_cst. (streamer_read_tree_bitfields): Rename from tree_read_bitfields. (streamer_write_chain): Rename from lto_output_chain. (streamer_write_tree_header): Rename from lto_output_tree_header. (streamer_pack_tree_bitfields): Rename from pack_value_fields. (streamer_write_tree_body): Rename from lto_output_tree_pointers. (streamer_write_integer_cst): Rename from lto_output_integer_cst. (streamer_write_builtin): Rename from lto_output_builtin_tree. (streamer_check_handled_ts_structures): Rename from check_handled_ts_structures. (streamer_tree_cache_insert): Rename from lto_streamer_cache_insert. (streamer_tree_cache_insert_at): Rename from lto_streamer_cache_insert_at. (streamer_tree_cache_append): Rename from lto_streamer_cache_append. (streamer_tree_cache_lookup): Rename from lto_streamer_cache_lookup. (streamer_tree_cache_get): Rename from lto_streamer_cache_get. (streamer_tree_cache_create): Rename from lto_streamer_cache_create. (streamer_tree_cache_delete): Rename from lto_streamer_cache_delete. * tree-streamer-out.c (write_string_cst): Rename from output_string_cst. (write_identifier): Rename from output_identifier. (write_ts_common_tree_pointers): Rename from lto_output_ts_common_tree_pointers. (write_ts_vector_tree_pointers): Rename from lto_output_ts_vector_tree_pointers. (write_ts_complex_tree_pointers): Rename from lto_output_ts_complex_tree_pointers. (write_ts_decl_minimal_tree_pointers): Rename from lto_output_ts_decl_minimal_tree_pointers. (write_ts_decl_common_tree_pointers): Rename from lto_output_ts_decl_common_tree_pointers. (write_ts_decl_non_common_tree_pointers): Rename from lto_output_ts_decl_non_common_tree_pointers. (write_ts_decl_with_vis_tree_pointers): Rename from lto_output_ts_decl_with_vis_tree_pointers. (write_ts_field_decl_tree_pointers): Rename from lto_output_ts_field_decl_tree_pointers. (write_ts_function_decl_tree_pointers): Rename from lto_output_ts_function_decl_tree_pointers. (write_ts_type_common_tree_pointers): Rename from lto_output_ts_type_common_tree_pointers. (write_ts_type_non_common_tree_pointers): Rename from lto_output_ts_type_non_common_tree_pointers. (write_ts_list_tree_pointers): Rename from lto_output_ts_list_tree_pointers. (write_ts_vec_tree_pointers): Rename from lto_output_ts_vec_tree_pointers. (write_ts_exp_tree_pointers): Rename from lto_output_ts_exp_tree_pointers. (write_ts_block_tree_pointers): Rename from lto_output_ts_block_tree_pointers. (write_ts_binfo_tree_pointers): Rename from lto_output_ts_binfo_tree_pointers. (write_ts_constructor_tree_pointers): Rename from lto_output_ts_constructor_tree_pointers. (write_ts_target_option): Rename from lto_output_ts_target_option. (write_ts_translation_unit_decl_tree_pointers): Rename from lto_output_ts_translation_unit_decl_tree_pointers. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Rename from lto_streamer_cache_add_to_node_array. (streamer_tree_cache_insert_1): Rename from lto_streamer_cache_insert_1. (record_common_node): Rename from lto_record_common_node. * streamer-hooks.h (bitpack_d, lto_streamer_cache_d): Remove forward declarations. * data-streamer-in.c (lto_input_widest_uint_uleb128): Remove unused function. * data-streamer-out.c (lto_output_widest_uint_uleb128_stream): Remove unused function. * Makefile.in (lto-section-out.o): Add dependency on DATA_STREAMER_H. (ipa-reference.o): Likewise. * lto-section-out.c: Include data-streamer.h. * ipa-reference.c: Include data-streamer.h. From-SVN: r177704
2011-08-12 18:42:13 +02:00
/* Check that all the TS_* structures handled by the streamer_write_* and
streamer_read_* routines are exactly ALL the structures defined in
2011-08-08 18:49:34 +02:00
treestruct.def. */
void
data-streamer.h (streamer_write_zero): Rename from output_zero. * data-streamer.h (streamer_write_zero): Rename from output_zero. (streamer_write_uhwi): Rename from lto_output_uleb128. (streamer_write_hwi): Rename from output_sleb128. (streamer_write_string): Rename from lto_output_string. (streamer_string_index): Rename from lto_string_index. (streamer_write_string_with_length): Rename from lto_output_string_with_length. (streamer_write_uhwi_stream): Rename from lto_output_uleb128_stream. (streamer_write_hwi_stream): Rename from lto_output_sleb128_stream. (streamer_read_string): Rename from lto_input_string. (streamer_read_indexed_string): Rename from input_string_internal. (streamer_read_uhwi): Rename from lto_input_uleb128. (streamer_read_hwi): Rename from lto_input_sleb128. (streamer_write_hwi_in_range): Rename from lto_output_int_in_range. (streamer_read_hwi_in_range): Rename from lto_input_int_in_range. (streamer_write_enum): Rename from lto_output_enum. (streamer_read_enum): Rename from lto_input_enum. (streamer_write_record_start): Rename from output_record_start. (streamer_read_record_start): Rename from input_record_start. (streamer_write_bitpack): Rename from lto_output_bitpack. (streamer_read_bitpack): Rename from lto_input_bitpack. (streamer_write_char_stream): Rename from lto_output_1_stream. (streamer_read_uchar): Rename from lto_input_1_unsigned. * tree-streamer.h (streamer_cache_d): Rename from lto_streamer_cache_d. (streamer_handle_as_builtin_p): Rename from lto_stream_as_builtin_p. (streamer_read_string_cst): Rename from input_string_cst. (streamer_read_chain): Rename from lto_input_chain. (streamer_alloc_tree): Rename from lto_materialize_tree. (streamer_read_tree_body): Rename from lto_input_tree_pointers. (streamer_get_pickled_tree): Rename from lto_get_pickled_tree. (streamer_get_builtin_tree): Rename from lto_get_builtin_tree. (streamer_read_integer_cst): Rename from lto_input_integer_cst. (streamer_read_tree_bitfields): Rename from tree_read_bitfields. (streamer_write_chain): Rename from lto_output_chain. (streamer_write_tree_header): Rename from lto_output_tree_header. (streamer_pack_tree_bitfields): Rename from pack_value_fields. (streamer_write_tree_body): Rename from lto_output_tree_pointers. (streamer_write_integer_cst): Rename from lto_output_integer_cst. (streamer_write_builtin): Rename from lto_output_builtin_tree. (streamer_check_handled_ts_structures): Rename from check_handled_ts_structures. (streamer_tree_cache_insert): Rename from lto_streamer_cache_insert. (streamer_tree_cache_insert_at): Rename from lto_streamer_cache_insert_at. (streamer_tree_cache_append): Rename from lto_streamer_cache_append. (streamer_tree_cache_lookup): Rename from lto_streamer_cache_lookup. (streamer_tree_cache_get): Rename from lto_streamer_cache_get. (streamer_tree_cache_create): Rename from lto_streamer_cache_create. (streamer_tree_cache_delete): Rename from lto_streamer_cache_delete. * tree-streamer-out.c (write_string_cst): Rename from output_string_cst. (write_identifier): Rename from output_identifier. (write_ts_common_tree_pointers): Rename from lto_output_ts_common_tree_pointers. (write_ts_vector_tree_pointers): Rename from lto_output_ts_vector_tree_pointers. (write_ts_complex_tree_pointers): Rename from lto_output_ts_complex_tree_pointers. (write_ts_decl_minimal_tree_pointers): Rename from lto_output_ts_decl_minimal_tree_pointers. (write_ts_decl_common_tree_pointers): Rename from lto_output_ts_decl_common_tree_pointers. (write_ts_decl_non_common_tree_pointers): Rename from lto_output_ts_decl_non_common_tree_pointers. (write_ts_decl_with_vis_tree_pointers): Rename from lto_output_ts_decl_with_vis_tree_pointers. (write_ts_field_decl_tree_pointers): Rename from lto_output_ts_field_decl_tree_pointers. (write_ts_function_decl_tree_pointers): Rename from lto_output_ts_function_decl_tree_pointers. (write_ts_type_common_tree_pointers): Rename from lto_output_ts_type_common_tree_pointers. (write_ts_type_non_common_tree_pointers): Rename from lto_output_ts_type_non_common_tree_pointers. (write_ts_list_tree_pointers): Rename from lto_output_ts_list_tree_pointers. (write_ts_vec_tree_pointers): Rename from lto_output_ts_vec_tree_pointers. (write_ts_exp_tree_pointers): Rename from lto_output_ts_exp_tree_pointers. (write_ts_block_tree_pointers): Rename from lto_output_ts_block_tree_pointers. (write_ts_binfo_tree_pointers): Rename from lto_output_ts_binfo_tree_pointers. (write_ts_constructor_tree_pointers): Rename from lto_output_ts_constructor_tree_pointers. (write_ts_target_option): Rename from lto_output_ts_target_option. (write_ts_translation_unit_decl_tree_pointers): Rename from lto_output_ts_translation_unit_decl_tree_pointers. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Rename from lto_streamer_cache_add_to_node_array. (streamer_tree_cache_insert_1): Rename from lto_streamer_cache_insert_1. (record_common_node): Rename from lto_record_common_node. * streamer-hooks.h (bitpack_d, lto_streamer_cache_d): Remove forward declarations. * data-streamer-in.c (lto_input_widest_uint_uleb128): Remove unused function. * data-streamer-out.c (lto_output_widest_uint_uleb128_stream): Remove unused function. * Makefile.in (lto-section-out.o): Add dependency on DATA_STREAMER_H. (ipa-reference.o): Likewise. * lto-section-out.c: Include data-streamer.h. * ipa-reference.c: Include data-streamer.h. From-SVN: r177704
2011-08-12 18:42:13 +02:00
streamer_check_handled_ts_structures (void)
2011-08-08 18:49:34 +02:00
{
bool handled_p[LAST_TS_ENUM];
unsigned i;
memset (&handled_p, 0, sizeof (handled_p));
/* These are the TS_* structures that are either handled or
explicitly ignored by the streamer routines. */
handled_p[TS_BASE] = true;
handled_p[TS_TYPED] = true;
handled_p[TS_COMMON] = true;
handled_p[TS_INT_CST] = true;
handled_p[TS_REAL_CST] = true;
handled_p[TS_FIXED_CST] = true;
handled_p[TS_VECTOR] = true;
handled_p[TS_STRING] = true;
handled_p[TS_COMPLEX] = true;
handled_p[TS_IDENTIFIER] = true;
handled_p[TS_DECL_MINIMAL] = true;
handled_p[TS_DECL_COMMON] = true;
handled_p[TS_DECL_WRTL] = true;
handled_p[TS_DECL_NON_COMMON] = true;
handled_p[TS_DECL_WITH_VIS] = true;
handled_p[TS_FIELD_DECL] = true;
handled_p[TS_VAR_DECL] = true;
handled_p[TS_PARM_DECL] = true;
handled_p[TS_LABEL_DECL] = true;
handled_p[TS_RESULT_DECL] = true;
handled_p[TS_CONST_DECL] = true;
handled_p[TS_TYPE_DECL] = true;
handled_p[TS_FUNCTION_DECL] = true;
handled_p[TS_TYPE_COMMON] = true;
handled_p[TS_TYPE_WITH_LANG_SPECIFIC] = true;
handled_p[TS_TYPE_NON_COMMON] = true;
handled_p[TS_LIST] = true;
handled_p[TS_VEC] = true;
handled_p[TS_EXP] = true;
handled_p[TS_SSA_NAME] = true;
handled_p[TS_BLOCK] = true;
handled_p[TS_BINFO] = true;
handled_p[TS_STATEMENT_LIST] = true;
handled_p[TS_CONSTRUCTOR] = true;
handled_p[TS_OMP_CLAUSE] = true;
handled_p[TS_OPTIMIZATION] = true;
handled_p[TS_TARGET_OPTION] = true;
handled_p[TS_TRANSLATION_UNIT_DECL] = true;
/* Anything not marked above will trigger the following assertion.
If this assertion triggers, it means that there is a new TS_*
structure that should be handled by the streamer. */
for (i = 0; i < LAST_TS_ENUM; i++)
gcc_assert (handled_p[i]);
}
data-streamer.h (streamer_write_zero): Rename from output_zero. * data-streamer.h (streamer_write_zero): Rename from output_zero. (streamer_write_uhwi): Rename from lto_output_uleb128. (streamer_write_hwi): Rename from output_sleb128. (streamer_write_string): Rename from lto_output_string. (streamer_string_index): Rename from lto_string_index. (streamer_write_string_with_length): Rename from lto_output_string_with_length. (streamer_write_uhwi_stream): Rename from lto_output_uleb128_stream. (streamer_write_hwi_stream): Rename from lto_output_sleb128_stream. (streamer_read_string): Rename from lto_input_string. (streamer_read_indexed_string): Rename from input_string_internal. (streamer_read_uhwi): Rename from lto_input_uleb128. (streamer_read_hwi): Rename from lto_input_sleb128. (streamer_write_hwi_in_range): Rename from lto_output_int_in_range. (streamer_read_hwi_in_range): Rename from lto_input_int_in_range. (streamer_write_enum): Rename from lto_output_enum. (streamer_read_enum): Rename from lto_input_enum. (streamer_write_record_start): Rename from output_record_start. (streamer_read_record_start): Rename from input_record_start. (streamer_write_bitpack): Rename from lto_output_bitpack. (streamer_read_bitpack): Rename from lto_input_bitpack. (streamer_write_char_stream): Rename from lto_output_1_stream. (streamer_read_uchar): Rename from lto_input_1_unsigned. * tree-streamer.h (streamer_cache_d): Rename from lto_streamer_cache_d. (streamer_handle_as_builtin_p): Rename from lto_stream_as_builtin_p. (streamer_read_string_cst): Rename from input_string_cst. (streamer_read_chain): Rename from lto_input_chain. (streamer_alloc_tree): Rename from lto_materialize_tree. (streamer_read_tree_body): Rename from lto_input_tree_pointers. (streamer_get_pickled_tree): Rename from lto_get_pickled_tree. (streamer_get_builtin_tree): Rename from lto_get_builtin_tree. (streamer_read_integer_cst): Rename from lto_input_integer_cst. (streamer_read_tree_bitfields): Rename from tree_read_bitfields. (streamer_write_chain): Rename from lto_output_chain. (streamer_write_tree_header): Rename from lto_output_tree_header. (streamer_pack_tree_bitfields): Rename from pack_value_fields. (streamer_write_tree_body): Rename from lto_output_tree_pointers. (streamer_write_integer_cst): Rename from lto_output_integer_cst. (streamer_write_builtin): Rename from lto_output_builtin_tree. (streamer_check_handled_ts_structures): Rename from check_handled_ts_structures. (streamer_tree_cache_insert): Rename from lto_streamer_cache_insert. (streamer_tree_cache_insert_at): Rename from lto_streamer_cache_insert_at. (streamer_tree_cache_append): Rename from lto_streamer_cache_append. (streamer_tree_cache_lookup): Rename from lto_streamer_cache_lookup. (streamer_tree_cache_get): Rename from lto_streamer_cache_get. (streamer_tree_cache_create): Rename from lto_streamer_cache_create. (streamer_tree_cache_delete): Rename from lto_streamer_cache_delete. * tree-streamer-out.c (write_string_cst): Rename from output_string_cst. (write_identifier): Rename from output_identifier. (write_ts_common_tree_pointers): Rename from lto_output_ts_common_tree_pointers. (write_ts_vector_tree_pointers): Rename from lto_output_ts_vector_tree_pointers. (write_ts_complex_tree_pointers): Rename from lto_output_ts_complex_tree_pointers. (write_ts_decl_minimal_tree_pointers): Rename from lto_output_ts_decl_minimal_tree_pointers. (write_ts_decl_common_tree_pointers): Rename from lto_output_ts_decl_common_tree_pointers. (write_ts_decl_non_common_tree_pointers): Rename from lto_output_ts_decl_non_common_tree_pointers. (write_ts_decl_with_vis_tree_pointers): Rename from lto_output_ts_decl_with_vis_tree_pointers. (write_ts_field_decl_tree_pointers): Rename from lto_output_ts_field_decl_tree_pointers. (write_ts_function_decl_tree_pointers): Rename from lto_output_ts_function_decl_tree_pointers. (write_ts_type_common_tree_pointers): Rename from lto_output_ts_type_common_tree_pointers. (write_ts_type_non_common_tree_pointers): Rename from lto_output_ts_type_non_common_tree_pointers. (write_ts_list_tree_pointers): Rename from lto_output_ts_list_tree_pointers. (write_ts_vec_tree_pointers): Rename from lto_output_ts_vec_tree_pointers. (write_ts_exp_tree_pointers): Rename from lto_output_ts_exp_tree_pointers. (write_ts_block_tree_pointers): Rename from lto_output_ts_block_tree_pointers. (write_ts_binfo_tree_pointers): Rename from lto_output_ts_binfo_tree_pointers. (write_ts_constructor_tree_pointers): Rename from lto_output_ts_constructor_tree_pointers. (write_ts_target_option): Rename from lto_output_ts_target_option. (write_ts_translation_unit_decl_tree_pointers): Rename from lto_output_ts_translation_unit_decl_tree_pointers. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Rename from lto_streamer_cache_add_to_node_array. (streamer_tree_cache_insert_1): Rename from lto_streamer_cache_insert_1. (record_common_node): Rename from lto_record_common_node. * streamer-hooks.h (bitpack_d, lto_streamer_cache_d): Remove forward declarations. * data-streamer-in.c (lto_input_widest_uint_uleb128): Remove unused function. * data-streamer-out.c (lto_output_widest_uint_uleb128_stream): Remove unused function. * Makefile.in (lto-section-out.o): Add dependency on DATA_STREAMER_H. (ipa-reference.o): Likewise. * lto-section-out.c: Include data-streamer.h. * ipa-reference.c: Include data-streamer.h. From-SVN: r177704
2011-08-12 18:42:13 +02:00
/* Helper for streamer_tree_cache_insert_1. Add T to CACHE->NODES at
2011-08-08 18:49:34 +02:00
slot IX. */
static void
data-streamer.h (streamer_write_zero): Rename from output_zero. * data-streamer.h (streamer_write_zero): Rename from output_zero. (streamer_write_uhwi): Rename from lto_output_uleb128. (streamer_write_hwi): Rename from output_sleb128. (streamer_write_string): Rename from lto_output_string. (streamer_string_index): Rename from lto_string_index. (streamer_write_string_with_length): Rename from lto_output_string_with_length. (streamer_write_uhwi_stream): Rename from lto_output_uleb128_stream. (streamer_write_hwi_stream): Rename from lto_output_sleb128_stream. (streamer_read_string): Rename from lto_input_string. (streamer_read_indexed_string): Rename from input_string_internal. (streamer_read_uhwi): Rename from lto_input_uleb128. (streamer_read_hwi): Rename from lto_input_sleb128. (streamer_write_hwi_in_range): Rename from lto_output_int_in_range. (streamer_read_hwi_in_range): Rename from lto_input_int_in_range. (streamer_write_enum): Rename from lto_output_enum. (streamer_read_enum): Rename from lto_input_enum. (streamer_write_record_start): Rename from output_record_start. (streamer_read_record_start): Rename from input_record_start. (streamer_write_bitpack): Rename from lto_output_bitpack. (streamer_read_bitpack): Rename from lto_input_bitpack. (streamer_write_char_stream): Rename from lto_output_1_stream. (streamer_read_uchar): Rename from lto_input_1_unsigned. * tree-streamer.h (streamer_cache_d): Rename from lto_streamer_cache_d. (streamer_handle_as_builtin_p): Rename from lto_stream_as_builtin_p. (streamer_read_string_cst): Rename from input_string_cst. (streamer_read_chain): Rename from lto_input_chain. (streamer_alloc_tree): Rename from lto_materialize_tree. (streamer_read_tree_body): Rename from lto_input_tree_pointers. (streamer_get_pickled_tree): Rename from lto_get_pickled_tree. (streamer_get_builtin_tree): Rename from lto_get_builtin_tree. (streamer_read_integer_cst): Rename from lto_input_integer_cst. (streamer_read_tree_bitfields): Rename from tree_read_bitfields. (streamer_write_chain): Rename from lto_output_chain. (streamer_write_tree_header): Rename from lto_output_tree_header. (streamer_pack_tree_bitfields): Rename from pack_value_fields. (streamer_write_tree_body): Rename from lto_output_tree_pointers. (streamer_write_integer_cst): Rename from lto_output_integer_cst. (streamer_write_builtin): Rename from lto_output_builtin_tree. (streamer_check_handled_ts_structures): Rename from check_handled_ts_structures. (streamer_tree_cache_insert): Rename from lto_streamer_cache_insert. (streamer_tree_cache_insert_at): Rename from lto_streamer_cache_insert_at. (streamer_tree_cache_append): Rename from lto_streamer_cache_append. (streamer_tree_cache_lookup): Rename from lto_streamer_cache_lookup. (streamer_tree_cache_get): Rename from lto_streamer_cache_get. (streamer_tree_cache_create): Rename from lto_streamer_cache_create. (streamer_tree_cache_delete): Rename from lto_streamer_cache_delete. * tree-streamer-out.c (write_string_cst): Rename from output_string_cst. (write_identifier): Rename from output_identifier. (write_ts_common_tree_pointers): Rename from lto_output_ts_common_tree_pointers. (write_ts_vector_tree_pointers): Rename from lto_output_ts_vector_tree_pointers. (write_ts_complex_tree_pointers): Rename from lto_output_ts_complex_tree_pointers. (write_ts_decl_minimal_tree_pointers): Rename from lto_output_ts_decl_minimal_tree_pointers. (write_ts_decl_common_tree_pointers): Rename from lto_output_ts_decl_common_tree_pointers. (write_ts_decl_non_common_tree_pointers): Rename from lto_output_ts_decl_non_common_tree_pointers. (write_ts_decl_with_vis_tree_pointers): Rename from lto_output_ts_decl_with_vis_tree_pointers. (write_ts_field_decl_tree_pointers): Rename from lto_output_ts_field_decl_tree_pointers. (write_ts_function_decl_tree_pointers): Rename from lto_output_ts_function_decl_tree_pointers. (write_ts_type_common_tree_pointers): Rename from lto_output_ts_type_common_tree_pointers. (write_ts_type_non_common_tree_pointers): Rename from lto_output_ts_type_non_common_tree_pointers. (write_ts_list_tree_pointers): Rename from lto_output_ts_list_tree_pointers. (write_ts_vec_tree_pointers): Rename from lto_output_ts_vec_tree_pointers. (write_ts_exp_tree_pointers): Rename from lto_output_ts_exp_tree_pointers. (write_ts_block_tree_pointers): Rename from lto_output_ts_block_tree_pointers. (write_ts_binfo_tree_pointers): Rename from lto_output_ts_binfo_tree_pointers. (write_ts_constructor_tree_pointers): Rename from lto_output_ts_constructor_tree_pointers. (write_ts_target_option): Rename from lto_output_ts_target_option. (write_ts_translation_unit_decl_tree_pointers): Rename from lto_output_ts_translation_unit_decl_tree_pointers. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Rename from lto_streamer_cache_add_to_node_array. (streamer_tree_cache_insert_1): Rename from lto_streamer_cache_insert_1. (record_common_node): Rename from lto_record_common_node. * streamer-hooks.h (bitpack_d, lto_streamer_cache_d): Remove forward declarations. * data-streamer-in.c (lto_input_widest_uint_uleb128): Remove unused function. * data-streamer-out.c (lto_output_widest_uint_uleb128_stream): Remove unused function. * Makefile.in (lto-section-out.o): Add dependency on DATA_STREAMER_H. (ipa-reference.o): Likewise. * lto-section-out.c: Include data-streamer.h. * ipa-reference.c: Include data-streamer.h. From-SVN: r177704
2011-08-12 18:42:13 +02:00
streamer_tree_cache_add_to_node_array (struct streamer_tree_cache_d *cache,
lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. 2013-06-17 Richard Biener <rguenther@suse.de> * lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. (lto_input_scc): Declare. (lto_input_tree_1): Likewise. (struct lto_stats_d): Add num_tree_bodies_output and num_pickle_refs_output. * lto-streamer-in.c (lto_read_body): Use streamer_tree_cache_get_tree. (lto_read_tree_1): Split out from ... (lto_read_tree): ... this. (lto_input_scc): New function. (lto_input_tree_1): Split out from ... (lto_input_tree): ... this. Handle LTO_tree_scc. (lto_data_in_create): Create the streamer cache without hashes. * lto-streamer-out.c (create_output_block): Create the streamer cache with hashes when not doing WPA. (lto_write_tree_1): Split out from ... (lto_write_tree): ... this. (get_symbol_initial_value): New function. (lto_output_tree_1): Split out from ... (lto_output_tree): ... this. Write trees as series of SCCs using a DFS walk via DFS_write_tree. (struct sccs, struct scc_entry): New types. (next_dfs_num, sccstack, sccstate, sccstate_obstack): New globals. (DFS_write_tree_body): New function. (DFS_write_tree): Likewise. (hash_tree): Likewise. (scc_entry_compare): Likewise. (hash_scc): Likewise. (tree_is_indexable): DEBUG_EXPR_DECLs are local entities. * tree-streamer-in.c (lto_input_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. (streamer_read_integer_cst): Remove. (streamer_get_pickled_tree): Adjust. * tree-streamer-out.c (streamer_write_chain): Disable streaming of DECL_EXTERNALs in BLOCK_VARS for now. (write_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Add hash value argument and record that if hashes are recorded in the cache. (streamer_tree_cache_insert_1): Adjust. (streamer_tree_cache_insert): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_append): Adjust. (record_common_node): Likewise. (streamer_tree_cache_create): Add argument whether to record hash values together with trees. (streamer_tree_cache_delete): Adjust. * tree-streamer.h (struct streamer_tree_cache_d): Add vector of hashes. (streamer_read_integer_cst): Remove. (streamer_tree_cache_insert): Adjust. (streamer_tree_cache_append): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_create): Add argument whether to record hashes. (streamer_tree_cache_get): Rename to ... (streamer_tree_cache_get_tree): ... this. (streamer_tree_cache_get_hash): New function. * tree.c (cache_integer_cst): New function. * tree.h (cache_integer_cst): Declare. (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move here from cp/cp-tree.h. * lto-symtab.c (lto_varpool_replace_node): Only release DECL_INITIAL of non-prevailing decls. * varpool.c (varpool_remove_initializer): Do not release DECL_INITIAL when we are still in CGRAPH_LTO_STREAMING. cp/ * cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h. lto/ * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency. * lto.c: Include data-streamer.h. (lto_read_in_decl_state): Use streamer_tree_cache_get_tree. (gimple_type_leader_entry_s, gimple_type_leader, gimple_lookup_type_leader): Remove. (gtc_visit): Simplify. (gimple_types_compatible_p): Likewise. (gimple_register_type_1): Likewise. Merge into ... (gimple_register_type): ... this. Keep it as legacy for statistics purposes for now. (fixup_integer_cst): Remove. (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and rename to ... (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars, maybe_remember_with_vars_*): ... these. (uniquify_nodes): Remove. (lto_fixup_prevailing_type): New function. (struct tree_scc, struct tree_scc_hasher): New type and hasher. (tree_scc_hash, tree_scc_hash_obstack): New globals. (num_merged_types, num_prevailing_types, num_not_merged_types, num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read, total_scc_size_merged, num_sccs_merged, num_scc_compares, num_scc_compare_collisions): New global counters. (compare_tree_sccs_1): New function. (compare_tree_sccs): Likewise. (unify_scc): Likewise. (lto_read_decls): Stream in tree SCCs and unify them on the way in. Finalize prevailing SCC tree members. (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader. Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother to ggc-collect during merging. (print_lto_report_1): Adjust for new merging code. From-SVN: r200151
2013-06-17 17:08:24 +02:00
unsigned ix, tree t, hashval_t hash)
2011-08-08 18:49:34 +02:00
{
/* We're either replacing an old element or appending consecutively. */
if (cache->nodes.exists ())
lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. 2013-06-17 Richard Biener <rguenther@suse.de> * lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. (lto_input_scc): Declare. (lto_input_tree_1): Likewise. (struct lto_stats_d): Add num_tree_bodies_output and num_pickle_refs_output. * lto-streamer-in.c (lto_read_body): Use streamer_tree_cache_get_tree. (lto_read_tree_1): Split out from ... (lto_read_tree): ... this. (lto_input_scc): New function. (lto_input_tree_1): Split out from ... (lto_input_tree): ... this. Handle LTO_tree_scc. (lto_data_in_create): Create the streamer cache without hashes. * lto-streamer-out.c (create_output_block): Create the streamer cache with hashes when not doing WPA. (lto_write_tree_1): Split out from ... (lto_write_tree): ... this. (get_symbol_initial_value): New function. (lto_output_tree_1): Split out from ... (lto_output_tree): ... this. Write trees as series of SCCs using a DFS walk via DFS_write_tree. (struct sccs, struct scc_entry): New types. (next_dfs_num, sccstack, sccstate, sccstate_obstack): New globals. (DFS_write_tree_body): New function. (DFS_write_tree): Likewise. (hash_tree): Likewise. (scc_entry_compare): Likewise. (hash_scc): Likewise. (tree_is_indexable): DEBUG_EXPR_DECLs are local entities. * tree-streamer-in.c (lto_input_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. (streamer_read_integer_cst): Remove. (streamer_get_pickled_tree): Adjust. * tree-streamer-out.c (streamer_write_chain): Disable streaming of DECL_EXTERNALs in BLOCK_VARS for now. (write_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Add hash value argument and record that if hashes are recorded in the cache. (streamer_tree_cache_insert_1): Adjust. (streamer_tree_cache_insert): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_append): Adjust. (record_common_node): Likewise. (streamer_tree_cache_create): Add argument whether to record hash values together with trees. (streamer_tree_cache_delete): Adjust. * tree-streamer.h (struct streamer_tree_cache_d): Add vector of hashes. (streamer_read_integer_cst): Remove. (streamer_tree_cache_insert): Adjust. (streamer_tree_cache_append): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_create): Add argument whether to record hashes. (streamer_tree_cache_get): Rename to ... (streamer_tree_cache_get_tree): ... this. (streamer_tree_cache_get_hash): New function. * tree.c (cache_integer_cst): New function. * tree.h (cache_integer_cst): Declare. (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move here from cp/cp-tree.h. * lto-symtab.c (lto_varpool_replace_node): Only release DECL_INITIAL of non-prevailing decls. * varpool.c (varpool_remove_initializer): Do not release DECL_INITIAL when we are still in CGRAPH_LTO_STREAMING. cp/ * cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h. lto/ * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency. * lto.c: Include data-streamer.h. (lto_read_in_decl_state): Use streamer_tree_cache_get_tree. (gimple_type_leader_entry_s, gimple_type_leader, gimple_lookup_type_leader): Remove. (gtc_visit): Simplify. (gimple_types_compatible_p): Likewise. (gimple_register_type_1): Likewise. Merge into ... (gimple_register_type): ... this. Keep it as legacy for statistics purposes for now. (fixup_integer_cst): Remove. (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and rename to ... (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars, maybe_remember_with_vars_*): ... these. (uniquify_nodes): Remove. (lto_fixup_prevailing_type): New function. (struct tree_scc, struct tree_scc_hasher): New type and hasher. (tree_scc_hash, tree_scc_hash_obstack): New globals. (num_merged_types, num_prevailing_types, num_not_merged_types, num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read, total_scc_size_merged, num_sccs_merged, num_scc_compares, num_scc_compare_collisions): New global counters. (compare_tree_sccs_1): New function. (compare_tree_sccs): Likewise. (unify_scc): Likewise. (lto_read_decls): Stream in tree SCCs and unify them on the way in. Finalize prevailing SCC tree members. (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader. Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother to ggc-collect during merging. (print_lto_report_1): Adjust for new merging code. From-SVN: r200151
2013-06-17 17:08:24 +02:00
{
if (cache->nodes.length () == ix)
cache->nodes.safe_push (t);
else
cache->nodes[ix] = t;
lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. 2013-06-17 Richard Biener <rguenther@suse.de> * lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. (lto_input_scc): Declare. (lto_input_tree_1): Likewise. (struct lto_stats_d): Add num_tree_bodies_output and num_pickle_refs_output. * lto-streamer-in.c (lto_read_body): Use streamer_tree_cache_get_tree. (lto_read_tree_1): Split out from ... (lto_read_tree): ... this. (lto_input_scc): New function. (lto_input_tree_1): Split out from ... (lto_input_tree): ... this. Handle LTO_tree_scc. (lto_data_in_create): Create the streamer cache without hashes. * lto-streamer-out.c (create_output_block): Create the streamer cache with hashes when not doing WPA. (lto_write_tree_1): Split out from ... (lto_write_tree): ... this. (get_symbol_initial_value): New function. (lto_output_tree_1): Split out from ... (lto_output_tree): ... this. Write trees as series of SCCs using a DFS walk via DFS_write_tree. (struct sccs, struct scc_entry): New types. (next_dfs_num, sccstack, sccstate, sccstate_obstack): New globals. (DFS_write_tree_body): New function. (DFS_write_tree): Likewise. (hash_tree): Likewise. (scc_entry_compare): Likewise. (hash_scc): Likewise. (tree_is_indexable): DEBUG_EXPR_DECLs are local entities. * tree-streamer-in.c (lto_input_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. (streamer_read_integer_cst): Remove. (streamer_get_pickled_tree): Adjust. * tree-streamer-out.c (streamer_write_chain): Disable streaming of DECL_EXTERNALs in BLOCK_VARS for now. (write_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Add hash value argument and record that if hashes are recorded in the cache. (streamer_tree_cache_insert_1): Adjust. (streamer_tree_cache_insert): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_append): Adjust. (record_common_node): Likewise. (streamer_tree_cache_create): Add argument whether to record hash values together with trees. (streamer_tree_cache_delete): Adjust. * tree-streamer.h (struct streamer_tree_cache_d): Add vector of hashes. (streamer_read_integer_cst): Remove. (streamer_tree_cache_insert): Adjust. (streamer_tree_cache_append): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_create): Add argument whether to record hashes. (streamer_tree_cache_get): Rename to ... (streamer_tree_cache_get_tree): ... this. (streamer_tree_cache_get_hash): New function. * tree.c (cache_integer_cst): New function. * tree.h (cache_integer_cst): Declare. (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move here from cp/cp-tree.h. * lto-symtab.c (lto_varpool_replace_node): Only release DECL_INITIAL of non-prevailing decls. * varpool.c (varpool_remove_initializer): Do not release DECL_INITIAL when we are still in CGRAPH_LTO_STREAMING. cp/ * cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h. lto/ * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency. * lto.c: Include data-streamer.h. (lto_read_in_decl_state): Use streamer_tree_cache_get_tree. (gimple_type_leader_entry_s, gimple_type_leader, gimple_lookup_type_leader): Remove. (gtc_visit): Simplify. (gimple_types_compatible_p): Likewise. (gimple_register_type_1): Likewise. Merge into ... (gimple_register_type): ... this. Keep it as legacy for statistics purposes for now. (fixup_integer_cst): Remove. (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and rename to ... (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars, maybe_remember_with_vars_*): ... these. (uniquify_nodes): Remove. (lto_fixup_prevailing_type): New function. (struct tree_scc, struct tree_scc_hasher): New type and hasher. (tree_scc_hash, tree_scc_hash_obstack): New globals. (num_merged_types, num_prevailing_types, num_not_merged_types, num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read, total_scc_size_merged, num_sccs_merged, num_scc_compares, num_scc_compare_collisions): New global counters. (compare_tree_sccs_1): New function. (compare_tree_sccs): Likewise. (unify_scc): Likewise. (lto_read_decls): Stream in tree SCCs and unify them on the way in. Finalize prevailing SCC tree members. (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader. Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother to ggc-collect during merging. (print_lto_report_1): Adjust for new merging code. From-SVN: r200151
2013-06-17 17:08:24 +02:00
}
if (cache->hashes.exists ())
lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. 2013-06-17 Richard Biener <rguenther@suse.de> * lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. (lto_input_scc): Declare. (lto_input_tree_1): Likewise. (struct lto_stats_d): Add num_tree_bodies_output and num_pickle_refs_output. * lto-streamer-in.c (lto_read_body): Use streamer_tree_cache_get_tree. (lto_read_tree_1): Split out from ... (lto_read_tree): ... this. (lto_input_scc): New function. (lto_input_tree_1): Split out from ... (lto_input_tree): ... this. Handle LTO_tree_scc. (lto_data_in_create): Create the streamer cache without hashes. * lto-streamer-out.c (create_output_block): Create the streamer cache with hashes when not doing WPA. (lto_write_tree_1): Split out from ... (lto_write_tree): ... this. (get_symbol_initial_value): New function. (lto_output_tree_1): Split out from ... (lto_output_tree): ... this. Write trees as series of SCCs using a DFS walk via DFS_write_tree. (struct sccs, struct scc_entry): New types. (next_dfs_num, sccstack, sccstate, sccstate_obstack): New globals. (DFS_write_tree_body): New function. (DFS_write_tree): Likewise. (hash_tree): Likewise. (scc_entry_compare): Likewise. (hash_scc): Likewise. (tree_is_indexable): DEBUG_EXPR_DECLs are local entities. * tree-streamer-in.c (lto_input_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. (streamer_read_integer_cst): Remove. (streamer_get_pickled_tree): Adjust. * tree-streamer-out.c (streamer_write_chain): Disable streaming of DECL_EXTERNALs in BLOCK_VARS for now. (write_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Add hash value argument and record that if hashes are recorded in the cache. (streamer_tree_cache_insert_1): Adjust. (streamer_tree_cache_insert): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_append): Adjust. (record_common_node): Likewise. (streamer_tree_cache_create): Add argument whether to record hash values together with trees. (streamer_tree_cache_delete): Adjust. * tree-streamer.h (struct streamer_tree_cache_d): Add vector of hashes. (streamer_read_integer_cst): Remove. (streamer_tree_cache_insert): Adjust. (streamer_tree_cache_append): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_create): Add argument whether to record hashes. (streamer_tree_cache_get): Rename to ... (streamer_tree_cache_get_tree): ... this. (streamer_tree_cache_get_hash): New function. * tree.c (cache_integer_cst): New function. * tree.h (cache_integer_cst): Declare. (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move here from cp/cp-tree.h. * lto-symtab.c (lto_varpool_replace_node): Only release DECL_INITIAL of non-prevailing decls. * varpool.c (varpool_remove_initializer): Do not release DECL_INITIAL when we are still in CGRAPH_LTO_STREAMING. cp/ * cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h. lto/ * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency. * lto.c: Include data-streamer.h. (lto_read_in_decl_state): Use streamer_tree_cache_get_tree. (gimple_type_leader_entry_s, gimple_type_leader, gimple_lookup_type_leader): Remove. (gtc_visit): Simplify. (gimple_types_compatible_p): Likewise. (gimple_register_type_1): Likewise. Merge into ... (gimple_register_type): ... this. Keep it as legacy for statistics purposes for now. (fixup_integer_cst): Remove. (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and rename to ... (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars, maybe_remember_with_vars_*): ... these. (uniquify_nodes): Remove. (lto_fixup_prevailing_type): New function. (struct tree_scc, struct tree_scc_hasher): New type and hasher. (tree_scc_hash, tree_scc_hash_obstack): New globals. (num_merged_types, num_prevailing_types, num_not_merged_types, num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read, total_scc_size_merged, num_sccs_merged, num_scc_compares, num_scc_compare_collisions): New global counters. (compare_tree_sccs_1): New function. (compare_tree_sccs): Likewise. (unify_scc): Likewise. (lto_read_decls): Stream in tree SCCs and unify them on the way in. Finalize prevailing SCC tree members. (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader. Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother to ggc-collect during merging. (print_lto_report_1): Adjust for new merging code. From-SVN: r200151
2013-06-17 17:08:24 +02:00
{
if (cache->hashes.length () == ix)
cache->hashes.safe_push (hash);
else
lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. 2013-06-17 Richard Biener <rguenther@suse.de> * lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. (lto_input_scc): Declare. (lto_input_tree_1): Likewise. (struct lto_stats_d): Add num_tree_bodies_output and num_pickle_refs_output. * lto-streamer-in.c (lto_read_body): Use streamer_tree_cache_get_tree. (lto_read_tree_1): Split out from ... (lto_read_tree): ... this. (lto_input_scc): New function. (lto_input_tree_1): Split out from ... (lto_input_tree): ... this. Handle LTO_tree_scc. (lto_data_in_create): Create the streamer cache without hashes. * lto-streamer-out.c (create_output_block): Create the streamer cache with hashes when not doing WPA. (lto_write_tree_1): Split out from ... (lto_write_tree): ... this. (get_symbol_initial_value): New function. (lto_output_tree_1): Split out from ... (lto_output_tree): ... this. Write trees as series of SCCs using a DFS walk via DFS_write_tree. (struct sccs, struct scc_entry): New types. (next_dfs_num, sccstack, sccstate, sccstate_obstack): New globals. (DFS_write_tree_body): New function. (DFS_write_tree): Likewise. (hash_tree): Likewise. (scc_entry_compare): Likewise. (hash_scc): Likewise. (tree_is_indexable): DEBUG_EXPR_DECLs are local entities. * tree-streamer-in.c (lto_input_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. (streamer_read_integer_cst): Remove. (streamer_get_pickled_tree): Adjust. * tree-streamer-out.c (streamer_write_chain): Disable streaming of DECL_EXTERNALs in BLOCK_VARS for now. (write_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Add hash value argument and record that if hashes are recorded in the cache. (streamer_tree_cache_insert_1): Adjust. (streamer_tree_cache_insert): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_append): Adjust. (record_common_node): Likewise. (streamer_tree_cache_create): Add argument whether to record hash values together with trees. (streamer_tree_cache_delete): Adjust. * tree-streamer.h (struct streamer_tree_cache_d): Add vector of hashes. (streamer_read_integer_cst): Remove. (streamer_tree_cache_insert): Adjust. (streamer_tree_cache_append): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_create): Add argument whether to record hashes. (streamer_tree_cache_get): Rename to ... (streamer_tree_cache_get_tree): ... this. (streamer_tree_cache_get_hash): New function. * tree.c (cache_integer_cst): New function. * tree.h (cache_integer_cst): Declare. (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move here from cp/cp-tree.h. * lto-symtab.c (lto_varpool_replace_node): Only release DECL_INITIAL of non-prevailing decls. * varpool.c (varpool_remove_initializer): Do not release DECL_INITIAL when we are still in CGRAPH_LTO_STREAMING. cp/ * cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h. lto/ * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency. * lto.c: Include data-streamer.h. (lto_read_in_decl_state): Use streamer_tree_cache_get_tree. (gimple_type_leader_entry_s, gimple_type_leader, gimple_lookup_type_leader): Remove. (gtc_visit): Simplify. (gimple_types_compatible_p): Likewise. (gimple_register_type_1): Likewise. Merge into ... (gimple_register_type): ... this. Keep it as legacy for statistics purposes for now. (fixup_integer_cst): Remove. (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and rename to ... (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars, maybe_remember_with_vars_*): ... these. (uniquify_nodes): Remove. (lto_fixup_prevailing_type): New function. (struct tree_scc, struct tree_scc_hasher): New type and hasher. (tree_scc_hash, tree_scc_hash_obstack): New globals. (num_merged_types, num_prevailing_types, num_not_merged_types, num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read, total_scc_size_merged, num_sccs_merged, num_scc_compares, num_scc_compare_collisions): New global counters. (compare_tree_sccs_1): New function. (compare_tree_sccs): Likewise. (unify_scc): Likewise. (lto_read_decls): Stream in tree SCCs and unify them on the way in. Finalize prevailing SCC tree members. (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader. Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother to ggc-collect during merging. (print_lto_report_1): Adjust for new merging code. From-SVN: r200151
2013-06-17 17:08:24 +02:00
cache->hashes[ix] = hash;
}
2011-08-08 18:49:34 +02:00
}
data-streamer.h (streamer_write_zero): Rename from output_zero. * data-streamer.h (streamer_write_zero): Rename from output_zero. (streamer_write_uhwi): Rename from lto_output_uleb128. (streamer_write_hwi): Rename from output_sleb128. (streamer_write_string): Rename from lto_output_string. (streamer_string_index): Rename from lto_string_index. (streamer_write_string_with_length): Rename from lto_output_string_with_length. (streamer_write_uhwi_stream): Rename from lto_output_uleb128_stream. (streamer_write_hwi_stream): Rename from lto_output_sleb128_stream. (streamer_read_string): Rename from lto_input_string. (streamer_read_indexed_string): Rename from input_string_internal. (streamer_read_uhwi): Rename from lto_input_uleb128. (streamer_read_hwi): Rename from lto_input_sleb128. (streamer_write_hwi_in_range): Rename from lto_output_int_in_range. (streamer_read_hwi_in_range): Rename from lto_input_int_in_range. (streamer_write_enum): Rename from lto_output_enum. (streamer_read_enum): Rename from lto_input_enum. (streamer_write_record_start): Rename from output_record_start. (streamer_read_record_start): Rename from input_record_start. (streamer_write_bitpack): Rename from lto_output_bitpack. (streamer_read_bitpack): Rename from lto_input_bitpack. (streamer_write_char_stream): Rename from lto_output_1_stream. (streamer_read_uchar): Rename from lto_input_1_unsigned. * tree-streamer.h (streamer_cache_d): Rename from lto_streamer_cache_d. (streamer_handle_as_builtin_p): Rename from lto_stream_as_builtin_p. (streamer_read_string_cst): Rename from input_string_cst. (streamer_read_chain): Rename from lto_input_chain. (streamer_alloc_tree): Rename from lto_materialize_tree. (streamer_read_tree_body): Rename from lto_input_tree_pointers. (streamer_get_pickled_tree): Rename from lto_get_pickled_tree. (streamer_get_builtin_tree): Rename from lto_get_builtin_tree. (streamer_read_integer_cst): Rename from lto_input_integer_cst. (streamer_read_tree_bitfields): Rename from tree_read_bitfields. (streamer_write_chain): Rename from lto_output_chain. (streamer_write_tree_header): Rename from lto_output_tree_header. (streamer_pack_tree_bitfields): Rename from pack_value_fields. (streamer_write_tree_body): Rename from lto_output_tree_pointers. (streamer_write_integer_cst): Rename from lto_output_integer_cst. (streamer_write_builtin): Rename from lto_output_builtin_tree. (streamer_check_handled_ts_structures): Rename from check_handled_ts_structures. (streamer_tree_cache_insert): Rename from lto_streamer_cache_insert. (streamer_tree_cache_insert_at): Rename from lto_streamer_cache_insert_at. (streamer_tree_cache_append): Rename from lto_streamer_cache_append. (streamer_tree_cache_lookup): Rename from lto_streamer_cache_lookup. (streamer_tree_cache_get): Rename from lto_streamer_cache_get. (streamer_tree_cache_create): Rename from lto_streamer_cache_create. (streamer_tree_cache_delete): Rename from lto_streamer_cache_delete. * tree-streamer-out.c (write_string_cst): Rename from output_string_cst. (write_identifier): Rename from output_identifier. (write_ts_common_tree_pointers): Rename from lto_output_ts_common_tree_pointers. (write_ts_vector_tree_pointers): Rename from lto_output_ts_vector_tree_pointers. (write_ts_complex_tree_pointers): Rename from lto_output_ts_complex_tree_pointers. (write_ts_decl_minimal_tree_pointers): Rename from lto_output_ts_decl_minimal_tree_pointers. (write_ts_decl_common_tree_pointers): Rename from lto_output_ts_decl_common_tree_pointers. (write_ts_decl_non_common_tree_pointers): Rename from lto_output_ts_decl_non_common_tree_pointers. (write_ts_decl_with_vis_tree_pointers): Rename from lto_output_ts_decl_with_vis_tree_pointers. (write_ts_field_decl_tree_pointers): Rename from lto_output_ts_field_decl_tree_pointers. (write_ts_function_decl_tree_pointers): Rename from lto_output_ts_function_decl_tree_pointers. (write_ts_type_common_tree_pointers): Rename from lto_output_ts_type_common_tree_pointers. (write_ts_type_non_common_tree_pointers): Rename from lto_output_ts_type_non_common_tree_pointers. (write_ts_list_tree_pointers): Rename from lto_output_ts_list_tree_pointers. (write_ts_vec_tree_pointers): Rename from lto_output_ts_vec_tree_pointers. (write_ts_exp_tree_pointers): Rename from lto_output_ts_exp_tree_pointers. (write_ts_block_tree_pointers): Rename from lto_output_ts_block_tree_pointers. (write_ts_binfo_tree_pointers): Rename from lto_output_ts_binfo_tree_pointers. (write_ts_constructor_tree_pointers): Rename from lto_output_ts_constructor_tree_pointers. (write_ts_target_option): Rename from lto_output_ts_target_option. (write_ts_translation_unit_decl_tree_pointers): Rename from lto_output_ts_translation_unit_decl_tree_pointers. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Rename from lto_streamer_cache_add_to_node_array. (streamer_tree_cache_insert_1): Rename from lto_streamer_cache_insert_1. (record_common_node): Rename from lto_record_common_node. * streamer-hooks.h (bitpack_d, lto_streamer_cache_d): Remove forward declarations. * data-streamer-in.c (lto_input_widest_uint_uleb128): Remove unused function. * data-streamer-out.c (lto_output_widest_uint_uleb128_stream): Remove unused function. * Makefile.in (lto-section-out.o): Add dependency on DATA_STREAMER_H. (ipa-reference.o): Likewise. * lto-section-out.c: Include data-streamer.h. * ipa-reference.c: Include data-streamer.h. From-SVN: r177704
2011-08-12 18:42:13 +02:00
/* Helper for streamer_tree_cache_insert and streamer_tree_cache_insert_at.
CACHE, T, and IX_P are as in streamer_tree_cache_insert.
2011-08-08 18:49:34 +02:00
If INSERT_AT_NEXT_SLOT_P is true, T is inserted at the next available
slot in the cache. Otherwise, T is inserted at the position indicated
in *IX_P.
If T already existed in CACHE, return true. Otherwise,
return false. */
static bool
data-streamer.h (streamer_write_zero): Rename from output_zero. * data-streamer.h (streamer_write_zero): Rename from output_zero. (streamer_write_uhwi): Rename from lto_output_uleb128. (streamer_write_hwi): Rename from output_sleb128. (streamer_write_string): Rename from lto_output_string. (streamer_string_index): Rename from lto_string_index. (streamer_write_string_with_length): Rename from lto_output_string_with_length. (streamer_write_uhwi_stream): Rename from lto_output_uleb128_stream. (streamer_write_hwi_stream): Rename from lto_output_sleb128_stream. (streamer_read_string): Rename from lto_input_string. (streamer_read_indexed_string): Rename from input_string_internal. (streamer_read_uhwi): Rename from lto_input_uleb128. (streamer_read_hwi): Rename from lto_input_sleb128. (streamer_write_hwi_in_range): Rename from lto_output_int_in_range. (streamer_read_hwi_in_range): Rename from lto_input_int_in_range. (streamer_write_enum): Rename from lto_output_enum. (streamer_read_enum): Rename from lto_input_enum. (streamer_write_record_start): Rename from output_record_start. (streamer_read_record_start): Rename from input_record_start. (streamer_write_bitpack): Rename from lto_output_bitpack. (streamer_read_bitpack): Rename from lto_input_bitpack. (streamer_write_char_stream): Rename from lto_output_1_stream. (streamer_read_uchar): Rename from lto_input_1_unsigned. * tree-streamer.h (streamer_cache_d): Rename from lto_streamer_cache_d. (streamer_handle_as_builtin_p): Rename from lto_stream_as_builtin_p. (streamer_read_string_cst): Rename from input_string_cst. (streamer_read_chain): Rename from lto_input_chain. (streamer_alloc_tree): Rename from lto_materialize_tree. (streamer_read_tree_body): Rename from lto_input_tree_pointers. (streamer_get_pickled_tree): Rename from lto_get_pickled_tree. (streamer_get_builtin_tree): Rename from lto_get_builtin_tree. (streamer_read_integer_cst): Rename from lto_input_integer_cst. (streamer_read_tree_bitfields): Rename from tree_read_bitfields. (streamer_write_chain): Rename from lto_output_chain. (streamer_write_tree_header): Rename from lto_output_tree_header. (streamer_pack_tree_bitfields): Rename from pack_value_fields. (streamer_write_tree_body): Rename from lto_output_tree_pointers. (streamer_write_integer_cst): Rename from lto_output_integer_cst. (streamer_write_builtin): Rename from lto_output_builtin_tree. (streamer_check_handled_ts_structures): Rename from check_handled_ts_structures. (streamer_tree_cache_insert): Rename from lto_streamer_cache_insert. (streamer_tree_cache_insert_at): Rename from lto_streamer_cache_insert_at. (streamer_tree_cache_append): Rename from lto_streamer_cache_append. (streamer_tree_cache_lookup): Rename from lto_streamer_cache_lookup. (streamer_tree_cache_get): Rename from lto_streamer_cache_get. (streamer_tree_cache_create): Rename from lto_streamer_cache_create. (streamer_tree_cache_delete): Rename from lto_streamer_cache_delete. * tree-streamer-out.c (write_string_cst): Rename from output_string_cst. (write_identifier): Rename from output_identifier. (write_ts_common_tree_pointers): Rename from lto_output_ts_common_tree_pointers. (write_ts_vector_tree_pointers): Rename from lto_output_ts_vector_tree_pointers. (write_ts_complex_tree_pointers): Rename from lto_output_ts_complex_tree_pointers. (write_ts_decl_minimal_tree_pointers): Rename from lto_output_ts_decl_minimal_tree_pointers. (write_ts_decl_common_tree_pointers): Rename from lto_output_ts_decl_common_tree_pointers. (write_ts_decl_non_common_tree_pointers): Rename from lto_output_ts_decl_non_common_tree_pointers. (write_ts_decl_with_vis_tree_pointers): Rename from lto_output_ts_decl_with_vis_tree_pointers. (write_ts_field_decl_tree_pointers): Rename from lto_output_ts_field_decl_tree_pointers. (write_ts_function_decl_tree_pointers): Rename from lto_output_ts_function_decl_tree_pointers. (write_ts_type_common_tree_pointers): Rename from lto_output_ts_type_common_tree_pointers. (write_ts_type_non_common_tree_pointers): Rename from lto_output_ts_type_non_common_tree_pointers. (write_ts_list_tree_pointers): Rename from lto_output_ts_list_tree_pointers. (write_ts_vec_tree_pointers): Rename from lto_output_ts_vec_tree_pointers. (write_ts_exp_tree_pointers): Rename from lto_output_ts_exp_tree_pointers. (write_ts_block_tree_pointers): Rename from lto_output_ts_block_tree_pointers. (write_ts_binfo_tree_pointers): Rename from lto_output_ts_binfo_tree_pointers. (write_ts_constructor_tree_pointers): Rename from lto_output_ts_constructor_tree_pointers. (write_ts_target_option): Rename from lto_output_ts_target_option. (write_ts_translation_unit_decl_tree_pointers): Rename from lto_output_ts_translation_unit_decl_tree_pointers. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Rename from lto_streamer_cache_add_to_node_array. (streamer_tree_cache_insert_1): Rename from lto_streamer_cache_insert_1. (record_common_node): Rename from lto_record_common_node. * streamer-hooks.h (bitpack_d, lto_streamer_cache_d): Remove forward declarations. * data-streamer-in.c (lto_input_widest_uint_uleb128): Remove unused function. * data-streamer-out.c (lto_output_widest_uint_uleb128_stream): Remove unused function. * Makefile.in (lto-section-out.o): Add dependency on DATA_STREAMER_H. (ipa-reference.o): Likewise. * lto-section-out.c: Include data-streamer.h. * ipa-reference.c: Include data-streamer.h. From-SVN: r177704
2011-08-12 18:42:13 +02:00
streamer_tree_cache_insert_1 (struct streamer_tree_cache_d *cache,
lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. 2013-06-17 Richard Biener <rguenther@suse.de> * lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. (lto_input_scc): Declare. (lto_input_tree_1): Likewise. (struct lto_stats_d): Add num_tree_bodies_output and num_pickle_refs_output. * lto-streamer-in.c (lto_read_body): Use streamer_tree_cache_get_tree. (lto_read_tree_1): Split out from ... (lto_read_tree): ... this. (lto_input_scc): New function. (lto_input_tree_1): Split out from ... (lto_input_tree): ... this. Handle LTO_tree_scc. (lto_data_in_create): Create the streamer cache without hashes. * lto-streamer-out.c (create_output_block): Create the streamer cache with hashes when not doing WPA. (lto_write_tree_1): Split out from ... (lto_write_tree): ... this. (get_symbol_initial_value): New function. (lto_output_tree_1): Split out from ... (lto_output_tree): ... this. Write trees as series of SCCs using a DFS walk via DFS_write_tree. (struct sccs, struct scc_entry): New types. (next_dfs_num, sccstack, sccstate, sccstate_obstack): New globals. (DFS_write_tree_body): New function. (DFS_write_tree): Likewise. (hash_tree): Likewise. (scc_entry_compare): Likewise. (hash_scc): Likewise. (tree_is_indexable): DEBUG_EXPR_DECLs are local entities. * tree-streamer-in.c (lto_input_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. (streamer_read_integer_cst): Remove. (streamer_get_pickled_tree): Adjust. * tree-streamer-out.c (streamer_write_chain): Disable streaming of DECL_EXTERNALs in BLOCK_VARS for now. (write_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Add hash value argument and record that if hashes are recorded in the cache. (streamer_tree_cache_insert_1): Adjust. (streamer_tree_cache_insert): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_append): Adjust. (record_common_node): Likewise. (streamer_tree_cache_create): Add argument whether to record hash values together with trees. (streamer_tree_cache_delete): Adjust. * tree-streamer.h (struct streamer_tree_cache_d): Add vector of hashes. (streamer_read_integer_cst): Remove. (streamer_tree_cache_insert): Adjust. (streamer_tree_cache_append): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_create): Add argument whether to record hashes. (streamer_tree_cache_get): Rename to ... (streamer_tree_cache_get_tree): ... this. (streamer_tree_cache_get_hash): New function. * tree.c (cache_integer_cst): New function. * tree.h (cache_integer_cst): Declare. (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move here from cp/cp-tree.h. * lto-symtab.c (lto_varpool_replace_node): Only release DECL_INITIAL of non-prevailing decls. * varpool.c (varpool_remove_initializer): Do not release DECL_INITIAL when we are still in CGRAPH_LTO_STREAMING. cp/ * cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h. lto/ * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency. * lto.c: Include data-streamer.h. (lto_read_in_decl_state): Use streamer_tree_cache_get_tree. (gimple_type_leader_entry_s, gimple_type_leader, gimple_lookup_type_leader): Remove. (gtc_visit): Simplify. (gimple_types_compatible_p): Likewise. (gimple_register_type_1): Likewise. Merge into ... (gimple_register_type): ... this. Keep it as legacy for statistics purposes for now. (fixup_integer_cst): Remove. (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and rename to ... (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars, maybe_remember_with_vars_*): ... these. (uniquify_nodes): Remove. (lto_fixup_prevailing_type): New function. (struct tree_scc, struct tree_scc_hasher): New type and hasher. (tree_scc_hash, tree_scc_hash_obstack): New globals. (num_merged_types, num_prevailing_types, num_not_merged_types, num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read, total_scc_size_merged, num_sccs_merged, num_scc_compares, num_scc_compare_collisions): New global counters. (compare_tree_sccs_1): New function. (compare_tree_sccs): Likewise. (unify_scc): Likewise. (lto_read_decls): Stream in tree SCCs and unify them on the way in. Finalize prevailing SCC tree members. (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader. Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother to ggc-collect during merging. (print_lto_report_1): Adjust for new merging code. From-SVN: r200151
2013-06-17 17:08:24 +02:00
tree t, hashval_t hash, unsigned *ix_p,
data-streamer.h (streamer_write_zero): Rename from output_zero. * data-streamer.h (streamer_write_zero): Rename from output_zero. (streamer_write_uhwi): Rename from lto_output_uleb128. (streamer_write_hwi): Rename from output_sleb128. (streamer_write_string): Rename from lto_output_string. (streamer_string_index): Rename from lto_string_index. (streamer_write_string_with_length): Rename from lto_output_string_with_length. (streamer_write_uhwi_stream): Rename from lto_output_uleb128_stream. (streamer_write_hwi_stream): Rename from lto_output_sleb128_stream. (streamer_read_string): Rename from lto_input_string. (streamer_read_indexed_string): Rename from input_string_internal. (streamer_read_uhwi): Rename from lto_input_uleb128. (streamer_read_hwi): Rename from lto_input_sleb128. (streamer_write_hwi_in_range): Rename from lto_output_int_in_range. (streamer_read_hwi_in_range): Rename from lto_input_int_in_range. (streamer_write_enum): Rename from lto_output_enum. (streamer_read_enum): Rename from lto_input_enum. (streamer_write_record_start): Rename from output_record_start. (streamer_read_record_start): Rename from input_record_start. (streamer_write_bitpack): Rename from lto_output_bitpack. (streamer_read_bitpack): Rename from lto_input_bitpack. (streamer_write_char_stream): Rename from lto_output_1_stream. (streamer_read_uchar): Rename from lto_input_1_unsigned. * tree-streamer.h (streamer_cache_d): Rename from lto_streamer_cache_d. (streamer_handle_as_builtin_p): Rename from lto_stream_as_builtin_p. (streamer_read_string_cst): Rename from input_string_cst. (streamer_read_chain): Rename from lto_input_chain. (streamer_alloc_tree): Rename from lto_materialize_tree. (streamer_read_tree_body): Rename from lto_input_tree_pointers. (streamer_get_pickled_tree): Rename from lto_get_pickled_tree. (streamer_get_builtin_tree): Rename from lto_get_builtin_tree. (streamer_read_integer_cst): Rename from lto_input_integer_cst. (streamer_read_tree_bitfields): Rename from tree_read_bitfields. (streamer_write_chain): Rename from lto_output_chain. (streamer_write_tree_header): Rename from lto_output_tree_header. (streamer_pack_tree_bitfields): Rename from pack_value_fields. (streamer_write_tree_body): Rename from lto_output_tree_pointers. (streamer_write_integer_cst): Rename from lto_output_integer_cst. (streamer_write_builtin): Rename from lto_output_builtin_tree. (streamer_check_handled_ts_structures): Rename from check_handled_ts_structures. (streamer_tree_cache_insert): Rename from lto_streamer_cache_insert. (streamer_tree_cache_insert_at): Rename from lto_streamer_cache_insert_at. (streamer_tree_cache_append): Rename from lto_streamer_cache_append. (streamer_tree_cache_lookup): Rename from lto_streamer_cache_lookup. (streamer_tree_cache_get): Rename from lto_streamer_cache_get. (streamer_tree_cache_create): Rename from lto_streamer_cache_create. (streamer_tree_cache_delete): Rename from lto_streamer_cache_delete. * tree-streamer-out.c (write_string_cst): Rename from output_string_cst. (write_identifier): Rename from output_identifier. (write_ts_common_tree_pointers): Rename from lto_output_ts_common_tree_pointers. (write_ts_vector_tree_pointers): Rename from lto_output_ts_vector_tree_pointers. (write_ts_complex_tree_pointers): Rename from lto_output_ts_complex_tree_pointers. (write_ts_decl_minimal_tree_pointers): Rename from lto_output_ts_decl_minimal_tree_pointers. (write_ts_decl_common_tree_pointers): Rename from lto_output_ts_decl_common_tree_pointers. (write_ts_decl_non_common_tree_pointers): Rename from lto_output_ts_decl_non_common_tree_pointers. (write_ts_decl_with_vis_tree_pointers): Rename from lto_output_ts_decl_with_vis_tree_pointers. (write_ts_field_decl_tree_pointers): Rename from lto_output_ts_field_decl_tree_pointers. (write_ts_function_decl_tree_pointers): Rename from lto_output_ts_function_decl_tree_pointers. (write_ts_type_common_tree_pointers): Rename from lto_output_ts_type_common_tree_pointers. (write_ts_type_non_common_tree_pointers): Rename from lto_output_ts_type_non_common_tree_pointers. (write_ts_list_tree_pointers): Rename from lto_output_ts_list_tree_pointers. (write_ts_vec_tree_pointers): Rename from lto_output_ts_vec_tree_pointers. (write_ts_exp_tree_pointers): Rename from lto_output_ts_exp_tree_pointers. (write_ts_block_tree_pointers): Rename from lto_output_ts_block_tree_pointers. (write_ts_binfo_tree_pointers): Rename from lto_output_ts_binfo_tree_pointers. (write_ts_constructor_tree_pointers): Rename from lto_output_ts_constructor_tree_pointers. (write_ts_target_option): Rename from lto_output_ts_target_option. (write_ts_translation_unit_decl_tree_pointers): Rename from lto_output_ts_translation_unit_decl_tree_pointers. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Rename from lto_streamer_cache_add_to_node_array. (streamer_tree_cache_insert_1): Rename from lto_streamer_cache_insert_1. (record_common_node): Rename from lto_record_common_node. * streamer-hooks.h (bitpack_d, lto_streamer_cache_d): Remove forward declarations. * data-streamer-in.c (lto_input_widest_uint_uleb128): Remove unused function. * data-streamer-out.c (lto_output_widest_uint_uleb128_stream): Remove unused function. * Makefile.in (lto-section-out.o): Add dependency on DATA_STREAMER_H. (ipa-reference.o): Likewise. * lto-section-out.c: Include data-streamer.h. * ipa-reference.c: Include data-streamer.h. From-SVN: r177704
2011-08-12 18:42:13 +02:00
bool insert_at_next_slot_p)
2011-08-08 18:49:34 +02:00
{
bool existed_p;
gcc_assert (t);
unsigned int &ix = cache->node_map->get_or_insert (t, &existed_p);
pointer-set.h (struct pointer_set_t): Move here from pointer-set.c. 2013-06-24 Richard Biener <rguenther@suse.de> * pointer-set.h (struct pointer_set_t): Move here from pointer-set.c. (pointer_set_lookup): Declare. (class pointer_map): New template class implementing a generic pointer to T map. (pointer_map<T>::pointer_map, pointer_map<T>::~pointer_map, pointer_map<T>::contains, pointer_map<T>::insert, pointer_map<T>::traverse): New functions. * pointer-set.c (struct pointer_set_t): Moved to pointer-set.h. (pointer_set_lookup): New function. (pointer_set_contains): Use pointer_set_lookup. (pointer_set_insert): Likewise. (insert_aux): Remove. (struct pointer_map_t): Embed a pointer_set_t. (pointer_map_create): Adjust. (pointer_map_destroy): Likewise. (pointer_map_contains): Likewise. (pointer_map_insert): Likewise. (pointer_map_traverse): Likewise. * tree-streamer.h (struct streamer_tree_cache_d): Use a pointer_map<unsigned> instead of a pointer_map_t. * tree-streamer.c (streamer_tree_cache_insert_1): Adjust. (streamer_tree_cache_lookup): Likewise. (streamer_tree_cache_create): Likewise. (streamer_tree_cache_delete): Likewise. * lto-streamer.h (struct lto_tree_ref_encoder): Use a pointer_map<unsigned> instead of a pointer_map_t. (lto_init_tree_ref_encoder): Adjust. (lto_destroy_tree_ref_encoder): Likewise. * lto-section-out.c (lto_output_decl_index): Likewise. (lto_record_function_out_decl_state): Likewise. * dominance.c (iterate_fix_dominators): Use pointer_map<int>. From-SVN: r200367
2013-06-24 14:17:16 +02:00
if (!existed_p)
2011-08-08 18:49:34 +02:00
{
/* Determine the next slot to use in the cache. */
if (insert_at_next_slot_p)
ix = cache->next_idx++;
2011-08-08 18:49:34 +02:00
else
ix = *ix_p;
lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. 2013-06-17 Richard Biener <rguenther@suse.de> * lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. (lto_input_scc): Declare. (lto_input_tree_1): Likewise. (struct lto_stats_d): Add num_tree_bodies_output and num_pickle_refs_output. * lto-streamer-in.c (lto_read_body): Use streamer_tree_cache_get_tree. (lto_read_tree_1): Split out from ... (lto_read_tree): ... this. (lto_input_scc): New function. (lto_input_tree_1): Split out from ... (lto_input_tree): ... this. Handle LTO_tree_scc. (lto_data_in_create): Create the streamer cache without hashes. * lto-streamer-out.c (create_output_block): Create the streamer cache with hashes when not doing WPA. (lto_write_tree_1): Split out from ... (lto_write_tree): ... this. (get_symbol_initial_value): New function. (lto_output_tree_1): Split out from ... (lto_output_tree): ... this. Write trees as series of SCCs using a DFS walk via DFS_write_tree. (struct sccs, struct scc_entry): New types. (next_dfs_num, sccstack, sccstate, sccstate_obstack): New globals. (DFS_write_tree_body): New function. (DFS_write_tree): Likewise. (hash_tree): Likewise. (scc_entry_compare): Likewise. (hash_scc): Likewise. (tree_is_indexable): DEBUG_EXPR_DECLs are local entities. * tree-streamer-in.c (lto_input_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. (streamer_read_integer_cst): Remove. (streamer_get_pickled_tree): Adjust. * tree-streamer-out.c (streamer_write_chain): Disable streaming of DECL_EXTERNALs in BLOCK_VARS for now. (write_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Add hash value argument and record that if hashes are recorded in the cache. (streamer_tree_cache_insert_1): Adjust. (streamer_tree_cache_insert): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_append): Adjust. (record_common_node): Likewise. (streamer_tree_cache_create): Add argument whether to record hash values together with trees. (streamer_tree_cache_delete): Adjust. * tree-streamer.h (struct streamer_tree_cache_d): Add vector of hashes. (streamer_read_integer_cst): Remove. (streamer_tree_cache_insert): Adjust. (streamer_tree_cache_append): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_create): Add argument whether to record hashes. (streamer_tree_cache_get): Rename to ... (streamer_tree_cache_get_tree): ... this. (streamer_tree_cache_get_hash): New function. * tree.c (cache_integer_cst): New function. * tree.h (cache_integer_cst): Declare. (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move here from cp/cp-tree.h. * lto-symtab.c (lto_varpool_replace_node): Only release DECL_INITIAL of non-prevailing decls. * varpool.c (varpool_remove_initializer): Do not release DECL_INITIAL when we are still in CGRAPH_LTO_STREAMING. cp/ * cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h. lto/ * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency. * lto.c: Include data-streamer.h. (lto_read_in_decl_state): Use streamer_tree_cache_get_tree. (gimple_type_leader_entry_s, gimple_type_leader, gimple_lookup_type_leader): Remove. (gtc_visit): Simplify. (gimple_types_compatible_p): Likewise. (gimple_register_type_1): Likewise. Merge into ... (gimple_register_type): ... this. Keep it as legacy for statistics purposes for now. (fixup_integer_cst): Remove. (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and rename to ... (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars, maybe_remember_with_vars_*): ... these. (uniquify_nodes): Remove. (lto_fixup_prevailing_type): New function. (struct tree_scc, struct tree_scc_hasher): New type and hasher. (tree_scc_hash, tree_scc_hash_obstack): New globals. (num_merged_types, num_prevailing_types, num_not_merged_types, num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read, total_scc_size_merged, num_sccs_merged, num_scc_compares, num_scc_compare_collisions): New global counters. (compare_tree_sccs_1): New function. (compare_tree_sccs): Likewise. (unify_scc): Likewise. (lto_read_decls): Stream in tree SCCs and unify them on the way in. Finalize prevailing SCC tree members. (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader. Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother to ggc-collect during merging. (print_lto_report_1): Adjust for new merging code. From-SVN: r200151
2013-06-17 17:08:24 +02:00
streamer_tree_cache_add_to_node_array (cache, ix, t, hash);
2011-08-08 18:49:34 +02:00
}
else
{
if (!insert_at_next_slot_p && ix != *ix_p)
{
/* If the caller wants to insert T at a specific slot
location, and ENTRY->TO does not match *IX_P, add T to
the requested location slot. */
ix = *ix_p;
lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. 2013-06-17 Richard Biener <rguenther@suse.de> * lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. (lto_input_scc): Declare. (lto_input_tree_1): Likewise. (struct lto_stats_d): Add num_tree_bodies_output and num_pickle_refs_output. * lto-streamer-in.c (lto_read_body): Use streamer_tree_cache_get_tree. (lto_read_tree_1): Split out from ... (lto_read_tree): ... this. (lto_input_scc): New function. (lto_input_tree_1): Split out from ... (lto_input_tree): ... this. Handle LTO_tree_scc. (lto_data_in_create): Create the streamer cache without hashes. * lto-streamer-out.c (create_output_block): Create the streamer cache with hashes when not doing WPA. (lto_write_tree_1): Split out from ... (lto_write_tree): ... this. (get_symbol_initial_value): New function. (lto_output_tree_1): Split out from ... (lto_output_tree): ... this. Write trees as series of SCCs using a DFS walk via DFS_write_tree. (struct sccs, struct scc_entry): New types. (next_dfs_num, sccstack, sccstate, sccstate_obstack): New globals. (DFS_write_tree_body): New function. (DFS_write_tree): Likewise. (hash_tree): Likewise. (scc_entry_compare): Likewise. (hash_scc): Likewise. (tree_is_indexable): DEBUG_EXPR_DECLs are local entities. * tree-streamer-in.c (lto_input_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. (streamer_read_integer_cst): Remove. (streamer_get_pickled_tree): Adjust. * tree-streamer-out.c (streamer_write_chain): Disable streaming of DECL_EXTERNALs in BLOCK_VARS for now. (write_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Add hash value argument and record that if hashes are recorded in the cache. (streamer_tree_cache_insert_1): Adjust. (streamer_tree_cache_insert): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_append): Adjust. (record_common_node): Likewise. (streamer_tree_cache_create): Add argument whether to record hash values together with trees. (streamer_tree_cache_delete): Adjust. * tree-streamer.h (struct streamer_tree_cache_d): Add vector of hashes. (streamer_read_integer_cst): Remove. (streamer_tree_cache_insert): Adjust. (streamer_tree_cache_append): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_create): Add argument whether to record hashes. (streamer_tree_cache_get): Rename to ... (streamer_tree_cache_get_tree): ... this. (streamer_tree_cache_get_hash): New function. * tree.c (cache_integer_cst): New function. * tree.h (cache_integer_cst): Declare. (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move here from cp/cp-tree.h. * lto-symtab.c (lto_varpool_replace_node): Only release DECL_INITIAL of non-prevailing decls. * varpool.c (varpool_remove_initializer): Do not release DECL_INITIAL when we are still in CGRAPH_LTO_STREAMING. cp/ * cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h. lto/ * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency. * lto.c: Include data-streamer.h. (lto_read_in_decl_state): Use streamer_tree_cache_get_tree. (gimple_type_leader_entry_s, gimple_type_leader, gimple_lookup_type_leader): Remove. (gtc_visit): Simplify. (gimple_types_compatible_p): Likewise. (gimple_register_type_1): Likewise. Merge into ... (gimple_register_type): ... this. Keep it as legacy for statistics purposes for now. (fixup_integer_cst): Remove. (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and rename to ... (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars, maybe_remember_with_vars_*): ... these. (uniquify_nodes): Remove. (lto_fixup_prevailing_type): New function. (struct tree_scc, struct tree_scc_hasher): New type and hasher. (tree_scc_hash, tree_scc_hash_obstack): New globals. (num_merged_types, num_prevailing_types, num_not_merged_types, num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read, total_scc_size_merged, num_sccs_merged, num_scc_compares, num_scc_compare_collisions): New global counters. (compare_tree_sccs_1): New function. (compare_tree_sccs): Likewise. (unify_scc): Likewise. (lto_read_decls): Stream in tree SCCs and unify them on the way in. Finalize prevailing SCC tree members. (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader. Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother to ggc-collect during merging. (print_lto_report_1): Adjust for new merging code. From-SVN: r200151
2013-06-17 17:08:24 +02:00
streamer_tree_cache_add_to_node_array (cache, ix, t, hash);
2011-08-08 18:49:34 +02:00
}
}
if (ix_p)
*ix_p = ix;
return existed_p;
}
/* Insert tree node T in CACHE. If T already existed in the cache
return true. Otherwise, return false.
If IX_P is non-null, update it with the index into the cache where
T has been stored. */
bool
data-streamer.h (streamer_write_zero): Rename from output_zero. * data-streamer.h (streamer_write_zero): Rename from output_zero. (streamer_write_uhwi): Rename from lto_output_uleb128. (streamer_write_hwi): Rename from output_sleb128. (streamer_write_string): Rename from lto_output_string. (streamer_string_index): Rename from lto_string_index. (streamer_write_string_with_length): Rename from lto_output_string_with_length. (streamer_write_uhwi_stream): Rename from lto_output_uleb128_stream. (streamer_write_hwi_stream): Rename from lto_output_sleb128_stream. (streamer_read_string): Rename from lto_input_string. (streamer_read_indexed_string): Rename from input_string_internal. (streamer_read_uhwi): Rename from lto_input_uleb128. (streamer_read_hwi): Rename from lto_input_sleb128. (streamer_write_hwi_in_range): Rename from lto_output_int_in_range. (streamer_read_hwi_in_range): Rename from lto_input_int_in_range. (streamer_write_enum): Rename from lto_output_enum. (streamer_read_enum): Rename from lto_input_enum. (streamer_write_record_start): Rename from output_record_start. (streamer_read_record_start): Rename from input_record_start. (streamer_write_bitpack): Rename from lto_output_bitpack. (streamer_read_bitpack): Rename from lto_input_bitpack. (streamer_write_char_stream): Rename from lto_output_1_stream. (streamer_read_uchar): Rename from lto_input_1_unsigned. * tree-streamer.h (streamer_cache_d): Rename from lto_streamer_cache_d. (streamer_handle_as_builtin_p): Rename from lto_stream_as_builtin_p. (streamer_read_string_cst): Rename from input_string_cst. (streamer_read_chain): Rename from lto_input_chain. (streamer_alloc_tree): Rename from lto_materialize_tree. (streamer_read_tree_body): Rename from lto_input_tree_pointers. (streamer_get_pickled_tree): Rename from lto_get_pickled_tree. (streamer_get_builtin_tree): Rename from lto_get_builtin_tree. (streamer_read_integer_cst): Rename from lto_input_integer_cst. (streamer_read_tree_bitfields): Rename from tree_read_bitfields. (streamer_write_chain): Rename from lto_output_chain. (streamer_write_tree_header): Rename from lto_output_tree_header. (streamer_pack_tree_bitfields): Rename from pack_value_fields. (streamer_write_tree_body): Rename from lto_output_tree_pointers. (streamer_write_integer_cst): Rename from lto_output_integer_cst. (streamer_write_builtin): Rename from lto_output_builtin_tree. (streamer_check_handled_ts_structures): Rename from check_handled_ts_structures. (streamer_tree_cache_insert): Rename from lto_streamer_cache_insert. (streamer_tree_cache_insert_at): Rename from lto_streamer_cache_insert_at. (streamer_tree_cache_append): Rename from lto_streamer_cache_append. (streamer_tree_cache_lookup): Rename from lto_streamer_cache_lookup. (streamer_tree_cache_get): Rename from lto_streamer_cache_get. (streamer_tree_cache_create): Rename from lto_streamer_cache_create. (streamer_tree_cache_delete): Rename from lto_streamer_cache_delete. * tree-streamer-out.c (write_string_cst): Rename from output_string_cst. (write_identifier): Rename from output_identifier. (write_ts_common_tree_pointers): Rename from lto_output_ts_common_tree_pointers. (write_ts_vector_tree_pointers): Rename from lto_output_ts_vector_tree_pointers. (write_ts_complex_tree_pointers): Rename from lto_output_ts_complex_tree_pointers. (write_ts_decl_minimal_tree_pointers): Rename from lto_output_ts_decl_minimal_tree_pointers. (write_ts_decl_common_tree_pointers): Rename from lto_output_ts_decl_common_tree_pointers. (write_ts_decl_non_common_tree_pointers): Rename from lto_output_ts_decl_non_common_tree_pointers. (write_ts_decl_with_vis_tree_pointers): Rename from lto_output_ts_decl_with_vis_tree_pointers. (write_ts_field_decl_tree_pointers): Rename from lto_output_ts_field_decl_tree_pointers. (write_ts_function_decl_tree_pointers): Rename from lto_output_ts_function_decl_tree_pointers. (write_ts_type_common_tree_pointers): Rename from lto_output_ts_type_common_tree_pointers. (write_ts_type_non_common_tree_pointers): Rename from lto_output_ts_type_non_common_tree_pointers. (write_ts_list_tree_pointers): Rename from lto_output_ts_list_tree_pointers. (write_ts_vec_tree_pointers): Rename from lto_output_ts_vec_tree_pointers. (write_ts_exp_tree_pointers): Rename from lto_output_ts_exp_tree_pointers. (write_ts_block_tree_pointers): Rename from lto_output_ts_block_tree_pointers. (write_ts_binfo_tree_pointers): Rename from lto_output_ts_binfo_tree_pointers. (write_ts_constructor_tree_pointers): Rename from lto_output_ts_constructor_tree_pointers. (write_ts_target_option): Rename from lto_output_ts_target_option. (write_ts_translation_unit_decl_tree_pointers): Rename from lto_output_ts_translation_unit_decl_tree_pointers. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Rename from lto_streamer_cache_add_to_node_array. (streamer_tree_cache_insert_1): Rename from lto_streamer_cache_insert_1. (record_common_node): Rename from lto_record_common_node. * streamer-hooks.h (bitpack_d, lto_streamer_cache_d): Remove forward declarations. * data-streamer-in.c (lto_input_widest_uint_uleb128): Remove unused function. * data-streamer-out.c (lto_output_widest_uint_uleb128_stream): Remove unused function. * Makefile.in (lto-section-out.o): Add dependency on DATA_STREAMER_H. (ipa-reference.o): Likewise. * lto-section-out.c: Include data-streamer.h. * ipa-reference.c: Include data-streamer.h. From-SVN: r177704
2011-08-12 18:42:13 +02:00
streamer_tree_cache_insert (struct streamer_tree_cache_d *cache, tree t,
lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. 2013-06-17 Richard Biener <rguenther@suse.de> * lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. (lto_input_scc): Declare. (lto_input_tree_1): Likewise. (struct lto_stats_d): Add num_tree_bodies_output and num_pickle_refs_output. * lto-streamer-in.c (lto_read_body): Use streamer_tree_cache_get_tree. (lto_read_tree_1): Split out from ... (lto_read_tree): ... this. (lto_input_scc): New function. (lto_input_tree_1): Split out from ... (lto_input_tree): ... this. Handle LTO_tree_scc. (lto_data_in_create): Create the streamer cache without hashes. * lto-streamer-out.c (create_output_block): Create the streamer cache with hashes when not doing WPA. (lto_write_tree_1): Split out from ... (lto_write_tree): ... this. (get_symbol_initial_value): New function. (lto_output_tree_1): Split out from ... (lto_output_tree): ... this. Write trees as series of SCCs using a DFS walk via DFS_write_tree. (struct sccs, struct scc_entry): New types. (next_dfs_num, sccstack, sccstate, sccstate_obstack): New globals. (DFS_write_tree_body): New function. (DFS_write_tree): Likewise. (hash_tree): Likewise. (scc_entry_compare): Likewise. (hash_scc): Likewise. (tree_is_indexable): DEBUG_EXPR_DECLs are local entities. * tree-streamer-in.c (lto_input_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. (streamer_read_integer_cst): Remove. (streamer_get_pickled_tree): Adjust. * tree-streamer-out.c (streamer_write_chain): Disable streaming of DECL_EXTERNALs in BLOCK_VARS for now. (write_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Add hash value argument and record that if hashes are recorded in the cache. (streamer_tree_cache_insert_1): Adjust. (streamer_tree_cache_insert): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_append): Adjust. (record_common_node): Likewise. (streamer_tree_cache_create): Add argument whether to record hash values together with trees. (streamer_tree_cache_delete): Adjust. * tree-streamer.h (struct streamer_tree_cache_d): Add vector of hashes. (streamer_read_integer_cst): Remove. (streamer_tree_cache_insert): Adjust. (streamer_tree_cache_append): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_create): Add argument whether to record hashes. (streamer_tree_cache_get): Rename to ... (streamer_tree_cache_get_tree): ... this. (streamer_tree_cache_get_hash): New function. * tree.c (cache_integer_cst): New function. * tree.h (cache_integer_cst): Declare. (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move here from cp/cp-tree.h. * lto-symtab.c (lto_varpool_replace_node): Only release DECL_INITIAL of non-prevailing decls. * varpool.c (varpool_remove_initializer): Do not release DECL_INITIAL when we are still in CGRAPH_LTO_STREAMING. cp/ * cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h. lto/ * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency. * lto.c: Include data-streamer.h. (lto_read_in_decl_state): Use streamer_tree_cache_get_tree. (gimple_type_leader_entry_s, gimple_type_leader, gimple_lookup_type_leader): Remove. (gtc_visit): Simplify. (gimple_types_compatible_p): Likewise. (gimple_register_type_1): Likewise. Merge into ... (gimple_register_type): ... this. Keep it as legacy for statistics purposes for now. (fixup_integer_cst): Remove. (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and rename to ... (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars, maybe_remember_with_vars_*): ... these. (uniquify_nodes): Remove. (lto_fixup_prevailing_type): New function. (struct tree_scc, struct tree_scc_hasher): New type and hasher. (tree_scc_hash, tree_scc_hash_obstack): New globals. (num_merged_types, num_prevailing_types, num_not_merged_types, num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read, total_scc_size_merged, num_sccs_merged, num_scc_compares, num_scc_compare_collisions): New global counters. (compare_tree_sccs_1): New function. (compare_tree_sccs): Likewise. (unify_scc): Likewise. (lto_read_decls): Stream in tree SCCs and unify them on the way in. Finalize prevailing SCC tree members. (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader. Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother to ggc-collect during merging. (print_lto_report_1): Adjust for new merging code. From-SVN: r200151
2013-06-17 17:08:24 +02:00
hashval_t hash, unsigned *ix_p)
2011-08-08 18:49:34 +02:00
{
lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. 2013-06-17 Richard Biener <rguenther@suse.de> * lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. (lto_input_scc): Declare. (lto_input_tree_1): Likewise. (struct lto_stats_d): Add num_tree_bodies_output and num_pickle_refs_output. * lto-streamer-in.c (lto_read_body): Use streamer_tree_cache_get_tree. (lto_read_tree_1): Split out from ... (lto_read_tree): ... this. (lto_input_scc): New function. (lto_input_tree_1): Split out from ... (lto_input_tree): ... this. Handle LTO_tree_scc. (lto_data_in_create): Create the streamer cache without hashes. * lto-streamer-out.c (create_output_block): Create the streamer cache with hashes when not doing WPA. (lto_write_tree_1): Split out from ... (lto_write_tree): ... this. (get_symbol_initial_value): New function. (lto_output_tree_1): Split out from ... (lto_output_tree): ... this. Write trees as series of SCCs using a DFS walk via DFS_write_tree. (struct sccs, struct scc_entry): New types. (next_dfs_num, sccstack, sccstate, sccstate_obstack): New globals. (DFS_write_tree_body): New function. (DFS_write_tree): Likewise. (hash_tree): Likewise. (scc_entry_compare): Likewise. (hash_scc): Likewise. (tree_is_indexable): DEBUG_EXPR_DECLs are local entities. * tree-streamer-in.c (lto_input_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. (streamer_read_integer_cst): Remove. (streamer_get_pickled_tree): Adjust. * tree-streamer-out.c (streamer_write_chain): Disable streaming of DECL_EXTERNALs in BLOCK_VARS for now. (write_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Add hash value argument and record that if hashes are recorded in the cache. (streamer_tree_cache_insert_1): Adjust. (streamer_tree_cache_insert): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_append): Adjust. (record_common_node): Likewise. (streamer_tree_cache_create): Add argument whether to record hash values together with trees. (streamer_tree_cache_delete): Adjust. * tree-streamer.h (struct streamer_tree_cache_d): Add vector of hashes. (streamer_read_integer_cst): Remove. (streamer_tree_cache_insert): Adjust. (streamer_tree_cache_append): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_create): Add argument whether to record hashes. (streamer_tree_cache_get): Rename to ... (streamer_tree_cache_get_tree): ... this. (streamer_tree_cache_get_hash): New function. * tree.c (cache_integer_cst): New function. * tree.h (cache_integer_cst): Declare. (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move here from cp/cp-tree.h. * lto-symtab.c (lto_varpool_replace_node): Only release DECL_INITIAL of non-prevailing decls. * varpool.c (varpool_remove_initializer): Do not release DECL_INITIAL when we are still in CGRAPH_LTO_STREAMING. cp/ * cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h. lto/ * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency. * lto.c: Include data-streamer.h. (lto_read_in_decl_state): Use streamer_tree_cache_get_tree. (gimple_type_leader_entry_s, gimple_type_leader, gimple_lookup_type_leader): Remove. (gtc_visit): Simplify. (gimple_types_compatible_p): Likewise. (gimple_register_type_1): Likewise. Merge into ... (gimple_register_type): ... this. Keep it as legacy for statistics purposes for now. (fixup_integer_cst): Remove. (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and rename to ... (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars, maybe_remember_with_vars_*): ... these. (uniquify_nodes): Remove. (lto_fixup_prevailing_type): New function. (struct tree_scc, struct tree_scc_hasher): New type and hasher. (tree_scc_hash, tree_scc_hash_obstack): New globals. (num_merged_types, num_prevailing_types, num_not_merged_types, num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read, total_scc_size_merged, num_sccs_merged, num_scc_compares, num_scc_compare_collisions): New global counters. (compare_tree_sccs_1): New function. (compare_tree_sccs): Likewise. (unify_scc): Likewise. (lto_read_decls): Stream in tree SCCs and unify them on the way in. Finalize prevailing SCC tree members. (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader. Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother to ggc-collect during merging. (print_lto_report_1): Adjust for new merging code. From-SVN: r200151
2013-06-17 17:08:24 +02:00
return streamer_tree_cache_insert_1 (cache, t, hash, ix_p, true);
2011-08-08 18:49:34 +02:00
}
lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. 2013-06-17 Richard Biener <rguenther@suse.de> * lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. (lto_input_scc): Declare. (lto_input_tree_1): Likewise. (struct lto_stats_d): Add num_tree_bodies_output and num_pickle_refs_output. * lto-streamer-in.c (lto_read_body): Use streamer_tree_cache_get_tree. (lto_read_tree_1): Split out from ... (lto_read_tree): ... this. (lto_input_scc): New function. (lto_input_tree_1): Split out from ... (lto_input_tree): ... this. Handle LTO_tree_scc. (lto_data_in_create): Create the streamer cache without hashes. * lto-streamer-out.c (create_output_block): Create the streamer cache with hashes when not doing WPA. (lto_write_tree_1): Split out from ... (lto_write_tree): ... this. (get_symbol_initial_value): New function. (lto_output_tree_1): Split out from ... (lto_output_tree): ... this. Write trees as series of SCCs using a DFS walk via DFS_write_tree. (struct sccs, struct scc_entry): New types. (next_dfs_num, sccstack, sccstate, sccstate_obstack): New globals. (DFS_write_tree_body): New function. (DFS_write_tree): Likewise. (hash_tree): Likewise. (scc_entry_compare): Likewise. (hash_scc): Likewise. (tree_is_indexable): DEBUG_EXPR_DECLs are local entities. * tree-streamer-in.c (lto_input_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. (streamer_read_integer_cst): Remove. (streamer_get_pickled_tree): Adjust. * tree-streamer-out.c (streamer_write_chain): Disable streaming of DECL_EXTERNALs in BLOCK_VARS for now. (write_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Add hash value argument and record that if hashes are recorded in the cache. (streamer_tree_cache_insert_1): Adjust. (streamer_tree_cache_insert): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_append): Adjust. (record_common_node): Likewise. (streamer_tree_cache_create): Add argument whether to record hash values together with trees. (streamer_tree_cache_delete): Adjust. * tree-streamer.h (struct streamer_tree_cache_d): Add vector of hashes. (streamer_read_integer_cst): Remove. (streamer_tree_cache_insert): Adjust. (streamer_tree_cache_append): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_create): Add argument whether to record hashes. (streamer_tree_cache_get): Rename to ... (streamer_tree_cache_get_tree): ... this. (streamer_tree_cache_get_hash): New function. * tree.c (cache_integer_cst): New function. * tree.h (cache_integer_cst): Declare. (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move here from cp/cp-tree.h. * lto-symtab.c (lto_varpool_replace_node): Only release DECL_INITIAL of non-prevailing decls. * varpool.c (varpool_remove_initializer): Do not release DECL_INITIAL when we are still in CGRAPH_LTO_STREAMING. cp/ * cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h. lto/ * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency. * lto.c: Include data-streamer.h. (lto_read_in_decl_state): Use streamer_tree_cache_get_tree. (gimple_type_leader_entry_s, gimple_type_leader, gimple_lookup_type_leader): Remove. (gtc_visit): Simplify. (gimple_types_compatible_p): Likewise. (gimple_register_type_1): Likewise. Merge into ... (gimple_register_type): ... this. Keep it as legacy for statistics purposes for now. (fixup_integer_cst): Remove. (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and rename to ... (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars, maybe_remember_with_vars_*): ... these. (uniquify_nodes): Remove. (lto_fixup_prevailing_type): New function. (struct tree_scc, struct tree_scc_hasher): New type and hasher. (tree_scc_hash, tree_scc_hash_obstack): New globals. (num_merged_types, num_prevailing_types, num_not_merged_types, num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read, total_scc_size_merged, num_sccs_merged, num_scc_compares, num_scc_compare_collisions): New global counters. (compare_tree_sccs_1): New function. (compare_tree_sccs): Likewise. (unify_scc): Likewise. (lto_read_decls): Stream in tree SCCs and unify them on the way in. Finalize prevailing SCC tree members. (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader. Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother to ggc-collect during merging. (print_lto_report_1): Adjust for new merging code. From-SVN: r200151
2013-06-17 17:08:24 +02:00
/* Replace the tree node with T in CACHE at slot IX. */
2011-08-08 18:49:34 +02:00
lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. 2013-06-17 Richard Biener <rguenther@suse.de> * lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. (lto_input_scc): Declare. (lto_input_tree_1): Likewise. (struct lto_stats_d): Add num_tree_bodies_output and num_pickle_refs_output. * lto-streamer-in.c (lto_read_body): Use streamer_tree_cache_get_tree. (lto_read_tree_1): Split out from ... (lto_read_tree): ... this. (lto_input_scc): New function. (lto_input_tree_1): Split out from ... (lto_input_tree): ... this. Handle LTO_tree_scc. (lto_data_in_create): Create the streamer cache without hashes. * lto-streamer-out.c (create_output_block): Create the streamer cache with hashes when not doing WPA. (lto_write_tree_1): Split out from ... (lto_write_tree): ... this. (get_symbol_initial_value): New function. (lto_output_tree_1): Split out from ... (lto_output_tree): ... this. Write trees as series of SCCs using a DFS walk via DFS_write_tree. (struct sccs, struct scc_entry): New types. (next_dfs_num, sccstack, sccstate, sccstate_obstack): New globals. (DFS_write_tree_body): New function. (DFS_write_tree): Likewise. (hash_tree): Likewise. (scc_entry_compare): Likewise. (hash_scc): Likewise. (tree_is_indexable): DEBUG_EXPR_DECLs are local entities. * tree-streamer-in.c (lto_input_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. (streamer_read_integer_cst): Remove. (streamer_get_pickled_tree): Adjust. * tree-streamer-out.c (streamer_write_chain): Disable streaming of DECL_EXTERNALs in BLOCK_VARS for now. (write_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Add hash value argument and record that if hashes are recorded in the cache. (streamer_tree_cache_insert_1): Adjust. (streamer_tree_cache_insert): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_append): Adjust. (record_common_node): Likewise. (streamer_tree_cache_create): Add argument whether to record hash values together with trees. (streamer_tree_cache_delete): Adjust. * tree-streamer.h (struct streamer_tree_cache_d): Add vector of hashes. (streamer_read_integer_cst): Remove. (streamer_tree_cache_insert): Adjust. (streamer_tree_cache_append): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_create): Add argument whether to record hashes. (streamer_tree_cache_get): Rename to ... (streamer_tree_cache_get_tree): ... this. (streamer_tree_cache_get_hash): New function. * tree.c (cache_integer_cst): New function. * tree.h (cache_integer_cst): Declare. (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move here from cp/cp-tree.h. * lto-symtab.c (lto_varpool_replace_node): Only release DECL_INITIAL of non-prevailing decls. * varpool.c (varpool_remove_initializer): Do not release DECL_INITIAL when we are still in CGRAPH_LTO_STREAMING. cp/ * cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h. lto/ * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency. * lto.c: Include data-streamer.h. (lto_read_in_decl_state): Use streamer_tree_cache_get_tree. (gimple_type_leader_entry_s, gimple_type_leader, gimple_lookup_type_leader): Remove. (gtc_visit): Simplify. (gimple_types_compatible_p): Likewise. (gimple_register_type_1): Likewise. Merge into ... (gimple_register_type): ... this. Keep it as legacy for statistics purposes for now. (fixup_integer_cst): Remove. (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and rename to ... (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars, maybe_remember_with_vars_*): ... these. (uniquify_nodes): Remove. (lto_fixup_prevailing_type): New function. (struct tree_scc, struct tree_scc_hasher): New type and hasher. (tree_scc_hash, tree_scc_hash_obstack): New globals. (num_merged_types, num_prevailing_types, num_not_merged_types, num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read, total_scc_size_merged, num_sccs_merged, num_scc_compares, num_scc_compare_collisions): New global counters. (compare_tree_sccs_1): New function. (compare_tree_sccs): Likewise. (unify_scc): Likewise. (lto_read_decls): Stream in tree SCCs and unify them on the way in. Finalize prevailing SCC tree members. (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader. Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother to ggc-collect during merging. (print_lto_report_1): Adjust for new merging code. From-SVN: r200151
2013-06-17 17:08:24 +02:00
void
streamer_tree_cache_replace_tree (struct streamer_tree_cache_d *cache,
tree t, unsigned ix)
2011-08-08 18:49:34 +02:00
{
lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. 2013-06-17 Richard Biener <rguenther@suse.de> * lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. (lto_input_scc): Declare. (lto_input_tree_1): Likewise. (struct lto_stats_d): Add num_tree_bodies_output and num_pickle_refs_output. * lto-streamer-in.c (lto_read_body): Use streamer_tree_cache_get_tree. (lto_read_tree_1): Split out from ... (lto_read_tree): ... this. (lto_input_scc): New function. (lto_input_tree_1): Split out from ... (lto_input_tree): ... this. Handle LTO_tree_scc. (lto_data_in_create): Create the streamer cache without hashes. * lto-streamer-out.c (create_output_block): Create the streamer cache with hashes when not doing WPA. (lto_write_tree_1): Split out from ... (lto_write_tree): ... this. (get_symbol_initial_value): New function. (lto_output_tree_1): Split out from ... (lto_output_tree): ... this. Write trees as series of SCCs using a DFS walk via DFS_write_tree. (struct sccs, struct scc_entry): New types. (next_dfs_num, sccstack, sccstate, sccstate_obstack): New globals. (DFS_write_tree_body): New function. (DFS_write_tree): Likewise. (hash_tree): Likewise. (scc_entry_compare): Likewise. (hash_scc): Likewise. (tree_is_indexable): DEBUG_EXPR_DECLs are local entities. * tree-streamer-in.c (lto_input_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. (streamer_read_integer_cst): Remove. (streamer_get_pickled_tree): Adjust. * tree-streamer-out.c (streamer_write_chain): Disable streaming of DECL_EXTERNALs in BLOCK_VARS for now. (write_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Add hash value argument and record that if hashes are recorded in the cache. (streamer_tree_cache_insert_1): Adjust. (streamer_tree_cache_insert): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_append): Adjust. (record_common_node): Likewise. (streamer_tree_cache_create): Add argument whether to record hash values together with trees. (streamer_tree_cache_delete): Adjust. * tree-streamer.h (struct streamer_tree_cache_d): Add vector of hashes. (streamer_read_integer_cst): Remove. (streamer_tree_cache_insert): Adjust. (streamer_tree_cache_append): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_create): Add argument whether to record hashes. (streamer_tree_cache_get): Rename to ... (streamer_tree_cache_get_tree): ... this. (streamer_tree_cache_get_hash): New function. * tree.c (cache_integer_cst): New function. * tree.h (cache_integer_cst): Declare. (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move here from cp/cp-tree.h. * lto-symtab.c (lto_varpool_replace_node): Only release DECL_INITIAL of non-prevailing decls. * varpool.c (varpool_remove_initializer): Do not release DECL_INITIAL when we are still in CGRAPH_LTO_STREAMING. cp/ * cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h. lto/ * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency. * lto.c: Include data-streamer.h. (lto_read_in_decl_state): Use streamer_tree_cache_get_tree. (gimple_type_leader_entry_s, gimple_type_leader, gimple_lookup_type_leader): Remove. (gtc_visit): Simplify. (gimple_types_compatible_p): Likewise. (gimple_register_type_1): Likewise. Merge into ... (gimple_register_type): ... this. Keep it as legacy for statistics purposes for now. (fixup_integer_cst): Remove. (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and rename to ... (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars, maybe_remember_with_vars_*): ... these. (uniquify_nodes): Remove. (lto_fixup_prevailing_type): New function. (struct tree_scc, struct tree_scc_hasher): New type and hasher. (tree_scc_hash, tree_scc_hash_obstack): New globals. (num_merged_types, num_prevailing_types, num_not_merged_types, num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read, total_scc_size_merged, num_sccs_merged, num_scc_compares, num_scc_compare_collisions): New global counters. (compare_tree_sccs_1): New function. (compare_tree_sccs): Likewise. (unify_scc): Likewise. (lto_read_decls): Stream in tree SCCs and unify them on the way in. Finalize prevailing SCC tree members. (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader. Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother to ggc-collect during merging. (print_lto_report_1): Adjust for new merging code. From-SVN: r200151
2013-06-17 17:08:24 +02:00
hashval_t hash = 0;
if (cache->hashes.exists ())
hash = streamer_tree_cache_get_hash (cache, ix);
if (!cache->node_map)
streamer_tree_cache_add_to_node_array (cache, ix, t, hash);
else
streamer_tree_cache_insert_1 (cache, t, hash, &ix, false);
2011-08-08 18:49:34 +02:00
}
/* Appends tree node T to CACHE, even if T already existed in it. */
void
lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. 2013-06-17 Richard Biener <rguenther@suse.de> * lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. (lto_input_scc): Declare. (lto_input_tree_1): Likewise. (struct lto_stats_d): Add num_tree_bodies_output and num_pickle_refs_output. * lto-streamer-in.c (lto_read_body): Use streamer_tree_cache_get_tree. (lto_read_tree_1): Split out from ... (lto_read_tree): ... this. (lto_input_scc): New function. (lto_input_tree_1): Split out from ... (lto_input_tree): ... this. Handle LTO_tree_scc. (lto_data_in_create): Create the streamer cache without hashes. * lto-streamer-out.c (create_output_block): Create the streamer cache with hashes when not doing WPA. (lto_write_tree_1): Split out from ... (lto_write_tree): ... this. (get_symbol_initial_value): New function. (lto_output_tree_1): Split out from ... (lto_output_tree): ... this. Write trees as series of SCCs using a DFS walk via DFS_write_tree. (struct sccs, struct scc_entry): New types. (next_dfs_num, sccstack, sccstate, sccstate_obstack): New globals. (DFS_write_tree_body): New function. (DFS_write_tree): Likewise. (hash_tree): Likewise. (scc_entry_compare): Likewise. (hash_scc): Likewise. (tree_is_indexable): DEBUG_EXPR_DECLs are local entities. * tree-streamer-in.c (lto_input_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. (streamer_read_integer_cst): Remove. (streamer_get_pickled_tree): Adjust. * tree-streamer-out.c (streamer_write_chain): Disable streaming of DECL_EXTERNALs in BLOCK_VARS for now. (write_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Add hash value argument and record that if hashes are recorded in the cache. (streamer_tree_cache_insert_1): Adjust. (streamer_tree_cache_insert): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_append): Adjust. (record_common_node): Likewise. (streamer_tree_cache_create): Add argument whether to record hash values together with trees. (streamer_tree_cache_delete): Adjust. * tree-streamer.h (struct streamer_tree_cache_d): Add vector of hashes. (streamer_read_integer_cst): Remove. (streamer_tree_cache_insert): Adjust. (streamer_tree_cache_append): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_create): Add argument whether to record hashes. (streamer_tree_cache_get): Rename to ... (streamer_tree_cache_get_tree): ... this. (streamer_tree_cache_get_hash): New function. * tree.c (cache_integer_cst): New function. * tree.h (cache_integer_cst): Declare. (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move here from cp/cp-tree.h. * lto-symtab.c (lto_varpool_replace_node): Only release DECL_INITIAL of non-prevailing decls. * varpool.c (varpool_remove_initializer): Do not release DECL_INITIAL when we are still in CGRAPH_LTO_STREAMING. cp/ * cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h. lto/ * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency. * lto.c: Include data-streamer.h. (lto_read_in_decl_state): Use streamer_tree_cache_get_tree. (gimple_type_leader_entry_s, gimple_type_leader, gimple_lookup_type_leader): Remove. (gtc_visit): Simplify. (gimple_types_compatible_p): Likewise. (gimple_register_type_1): Likewise. Merge into ... (gimple_register_type): ... this. Keep it as legacy for statistics purposes for now. (fixup_integer_cst): Remove. (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and rename to ... (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars, maybe_remember_with_vars_*): ... these. (uniquify_nodes): Remove. (lto_fixup_prevailing_type): New function. (struct tree_scc, struct tree_scc_hasher): New type and hasher. (tree_scc_hash, tree_scc_hash_obstack): New globals. (num_merged_types, num_prevailing_types, num_not_merged_types, num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read, total_scc_size_merged, num_sccs_merged, num_scc_compares, num_scc_compare_collisions): New global counters. (compare_tree_sccs_1): New function. (compare_tree_sccs): Likewise. (unify_scc): Likewise. (lto_read_decls): Stream in tree SCCs and unify them on the way in. Finalize prevailing SCC tree members. (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader. Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother to ggc-collect during merging. (print_lto_report_1): Adjust for new merging code. From-SVN: r200151
2013-06-17 17:08:24 +02:00
streamer_tree_cache_append (struct streamer_tree_cache_d *cache,
tree t, hashval_t hash)
2011-08-08 18:49:34 +02:00
{
unsigned ix = cache->next_idx++;
if (!cache->node_map)
streamer_tree_cache_add_to_node_array (cache, ix, t, hash);
else
streamer_tree_cache_insert_1 (cache, t, hash, &ix, false);
2011-08-08 18:49:34 +02:00
}
/* Return true if tree node T exists in CACHE, otherwise false. If IX_P is
not NULL, write to *IX_P the index into the cache where T is stored
((unsigned)-1 if T is not found). */
bool
data-streamer.h (streamer_write_zero): Rename from output_zero. * data-streamer.h (streamer_write_zero): Rename from output_zero. (streamer_write_uhwi): Rename from lto_output_uleb128. (streamer_write_hwi): Rename from output_sleb128. (streamer_write_string): Rename from lto_output_string. (streamer_string_index): Rename from lto_string_index. (streamer_write_string_with_length): Rename from lto_output_string_with_length. (streamer_write_uhwi_stream): Rename from lto_output_uleb128_stream. (streamer_write_hwi_stream): Rename from lto_output_sleb128_stream. (streamer_read_string): Rename from lto_input_string. (streamer_read_indexed_string): Rename from input_string_internal. (streamer_read_uhwi): Rename from lto_input_uleb128. (streamer_read_hwi): Rename from lto_input_sleb128. (streamer_write_hwi_in_range): Rename from lto_output_int_in_range. (streamer_read_hwi_in_range): Rename from lto_input_int_in_range. (streamer_write_enum): Rename from lto_output_enum. (streamer_read_enum): Rename from lto_input_enum. (streamer_write_record_start): Rename from output_record_start. (streamer_read_record_start): Rename from input_record_start. (streamer_write_bitpack): Rename from lto_output_bitpack. (streamer_read_bitpack): Rename from lto_input_bitpack. (streamer_write_char_stream): Rename from lto_output_1_stream. (streamer_read_uchar): Rename from lto_input_1_unsigned. * tree-streamer.h (streamer_cache_d): Rename from lto_streamer_cache_d. (streamer_handle_as_builtin_p): Rename from lto_stream_as_builtin_p. (streamer_read_string_cst): Rename from input_string_cst. (streamer_read_chain): Rename from lto_input_chain. (streamer_alloc_tree): Rename from lto_materialize_tree. (streamer_read_tree_body): Rename from lto_input_tree_pointers. (streamer_get_pickled_tree): Rename from lto_get_pickled_tree. (streamer_get_builtin_tree): Rename from lto_get_builtin_tree. (streamer_read_integer_cst): Rename from lto_input_integer_cst. (streamer_read_tree_bitfields): Rename from tree_read_bitfields. (streamer_write_chain): Rename from lto_output_chain. (streamer_write_tree_header): Rename from lto_output_tree_header. (streamer_pack_tree_bitfields): Rename from pack_value_fields. (streamer_write_tree_body): Rename from lto_output_tree_pointers. (streamer_write_integer_cst): Rename from lto_output_integer_cst. (streamer_write_builtin): Rename from lto_output_builtin_tree. (streamer_check_handled_ts_structures): Rename from check_handled_ts_structures. (streamer_tree_cache_insert): Rename from lto_streamer_cache_insert. (streamer_tree_cache_insert_at): Rename from lto_streamer_cache_insert_at. (streamer_tree_cache_append): Rename from lto_streamer_cache_append. (streamer_tree_cache_lookup): Rename from lto_streamer_cache_lookup. (streamer_tree_cache_get): Rename from lto_streamer_cache_get. (streamer_tree_cache_create): Rename from lto_streamer_cache_create. (streamer_tree_cache_delete): Rename from lto_streamer_cache_delete. * tree-streamer-out.c (write_string_cst): Rename from output_string_cst. (write_identifier): Rename from output_identifier. (write_ts_common_tree_pointers): Rename from lto_output_ts_common_tree_pointers. (write_ts_vector_tree_pointers): Rename from lto_output_ts_vector_tree_pointers. (write_ts_complex_tree_pointers): Rename from lto_output_ts_complex_tree_pointers. (write_ts_decl_minimal_tree_pointers): Rename from lto_output_ts_decl_minimal_tree_pointers. (write_ts_decl_common_tree_pointers): Rename from lto_output_ts_decl_common_tree_pointers. (write_ts_decl_non_common_tree_pointers): Rename from lto_output_ts_decl_non_common_tree_pointers. (write_ts_decl_with_vis_tree_pointers): Rename from lto_output_ts_decl_with_vis_tree_pointers. (write_ts_field_decl_tree_pointers): Rename from lto_output_ts_field_decl_tree_pointers. (write_ts_function_decl_tree_pointers): Rename from lto_output_ts_function_decl_tree_pointers. (write_ts_type_common_tree_pointers): Rename from lto_output_ts_type_common_tree_pointers. (write_ts_type_non_common_tree_pointers): Rename from lto_output_ts_type_non_common_tree_pointers. (write_ts_list_tree_pointers): Rename from lto_output_ts_list_tree_pointers. (write_ts_vec_tree_pointers): Rename from lto_output_ts_vec_tree_pointers. (write_ts_exp_tree_pointers): Rename from lto_output_ts_exp_tree_pointers. (write_ts_block_tree_pointers): Rename from lto_output_ts_block_tree_pointers. (write_ts_binfo_tree_pointers): Rename from lto_output_ts_binfo_tree_pointers. (write_ts_constructor_tree_pointers): Rename from lto_output_ts_constructor_tree_pointers. (write_ts_target_option): Rename from lto_output_ts_target_option. (write_ts_translation_unit_decl_tree_pointers): Rename from lto_output_ts_translation_unit_decl_tree_pointers. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Rename from lto_streamer_cache_add_to_node_array. (streamer_tree_cache_insert_1): Rename from lto_streamer_cache_insert_1. (record_common_node): Rename from lto_record_common_node. * streamer-hooks.h (bitpack_d, lto_streamer_cache_d): Remove forward declarations. * data-streamer-in.c (lto_input_widest_uint_uleb128): Remove unused function. * data-streamer-out.c (lto_output_widest_uint_uleb128_stream): Remove unused function. * Makefile.in (lto-section-out.o): Add dependency on DATA_STREAMER_H. (ipa-reference.o): Likewise. * lto-section-out.c: Include data-streamer.h. * ipa-reference.c: Include data-streamer.h. From-SVN: r177704
2011-08-12 18:42:13 +02:00
streamer_tree_cache_lookup (struct streamer_tree_cache_d *cache, tree t,
unsigned *ix_p)
2011-08-08 18:49:34 +02:00
{
pointer-set.h (struct pointer_set_t): Move here from pointer-set.c. 2013-06-24 Richard Biener <rguenther@suse.de> * pointer-set.h (struct pointer_set_t): Move here from pointer-set.c. (pointer_set_lookup): Declare. (class pointer_map): New template class implementing a generic pointer to T map. (pointer_map<T>::pointer_map, pointer_map<T>::~pointer_map, pointer_map<T>::contains, pointer_map<T>::insert, pointer_map<T>::traverse): New functions. * pointer-set.c (struct pointer_set_t): Moved to pointer-set.h. (pointer_set_lookup): New function. (pointer_set_contains): Use pointer_set_lookup. (pointer_set_insert): Likewise. (insert_aux): Remove. (struct pointer_map_t): Embed a pointer_set_t. (pointer_map_create): Adjust. (pointer_map_destroy): Likewise. (pointer_map_contains): Likewise. (pointer_map_insert): Likewise. (pointer_map_traverse): Likewise. * tree-streamer.h (struct streamer_tree_cache_d): Use a pointer_map<unsigned> instead of a pointer_map_t. * tree-streamer.c (streamer_tree_cache_insert_1): Adjust. (streamer_tree_cache_lookup): Likewise. (streamer_tree_cache_create): Likewise. (streamer_tree_cache_delete): Likewise. * lto-streamer.h (struct lto_tree_ref_encoder): Use a pointer_map<unsigned> instead of a pointer_map_t. (lto_init_tree_ref_encoder): Adjust. (lto_destroy_tree_ref_encoder): Likewise. * lto-section-out.c (lto_output_decl_index): Likewise. (lto_record_function_out_decl_state): Likewise. * dominance.c (iterate_fix_dominators): Use pointer_map<int>. From-SVN: r200367
2013-06-24 14:17:16 +02:00
unsigned *slot;
2011-08-08 18:49:34 +02:00
bool retval;
unsigned ix;
gcc_assert (t);
slot = cache->node_map->get (t);
2011-08-08 18:49:34 +02:00
if (slot == NULL)
{
retval = false;
ix = -1;
}
else
{
retval = true;
pointer-set.h (struct pointer_set_t): Move here from pointer-set.c. 2013-06-24 Richard Biener <rguenther@suse.de> * pointer-set.h (struct pointer_set_t): Move here from pointer-set.c. (pointer_set_lookup): Declare. (class pointer_map): New template class implementing a generic pointer to T map. (pointer_map<T>::pointer_map, pointer_map<T>::~pointer_map, pointer_map<T>::contains, pointer_map<T>::insert, pointer_map<T>::traverse): New functions. * pointer-set.c (struct pointer_set_t): Moved to pointer-set.h. (pointer_set_lookup): New function. (pointer_set_contains): Use pointer_set_lookup. (pointer_set_insert): Likewise. (insert_aux): Remove. (struct pointer_map_t): Embed a pointer_set_t. (pointer_map_create): Adjust. (pointer_map_destroy): Likewise. (pointer_map_contains): Likewise. (pointer_map_insert): Likewise. (pointer_map_traverse): Likewise. * tree-streamer.h (struct streamer_tree_cache_d): Use a pointer_map<unsigned> instead of a pointer_map_t. * tree-streamer.c (streamer_tree_cache_insert_1): Adjust. (streamer_tree_cache_lookup): Likewise. (streamer_tree_cache_create): Likewise. (streamer_tree_cache_delete): Likewise. * lto-streamer.h (struct lto_tree_ref_encoder): Use a pointer_map<unsigned> instead of a pointer_map_t. (lto_init_tree_ref_encoder): Adjust. (lto_destroy_tree_ref_encoder): Likewise. * lto-section-out.c (lto_output_decl_index): Likewise. (lto_record_function_out_decl_state): Likewise. * dominance.c (iterate_fix_dominators): Use pointer_map<int>. From-SVN: r200367
2013-06-24 14:17:16 +02:00
ix = *slot;
2011-08-08 18:49:34 +02:00
}
if (ix_p)
*ix_p = ix;
return retval;
}
/* Verify that NODE is in CACHE. */
static void
verify_common_node_recorded (struct streamer_tree_cache_d *cache, tree node)
{
/* Restrict this to flag_checking only because in general violating it is
harmless plus we never know what happens on all targets/frontend/flag(!)
combinations. */
if (!flag_checking)
return;
if (cache->node_map)
gcc_assert (streamer_tree_cache_lookup (cache, node, NULL));
else
{
bool found = false;
gcc_assert (cache->nodes.exists ());
/* Linear search... */
for (unsigned i = 0; !found && i < cache->nodes.length (); ++i)
if (cache->nodes[i] == node)
found = true;
gcc_assert (found);
}
}
tree-streamer-out.c (lto_output_ts_decl_with_vis_tree_pointers): Call stream_write_tree instead of output_record_start. * tree-streamer-out.c (lto_output_ts_decl_with_vis_tree_pointers): Call stream_write_tree instead of output_record_start. (lto_output_ts_binfo_tree_pointers): Likewise. * streamer-hooks.h (stream_write_tree): Move from tree-streamer.h. Convert it to a macro. (stream_read_tree): Likewise. * lto-streamer.h (lto_stream_as_builtin_p): Move ... * tree-streamer.h (lto_stream_as_builtin_p): ... here. * lto-streamer-in.c (lto_read_tree): Call lto_streamer_cache_append and tree_read_bitfields. * lto-streamer-out.c (lto_is_streamable): Move from lto-streamer.c (lto_write_tree): Call it. * lto-streamer.c (lto_is_streamable): Move to lto-streamer-out.c * streamer-hooks.h (struct streamer_hooks): Remove fields name, is_streamable and alloc_tree. Update all users. * tree-streamer-in.c (tree_read_bitfields): Factor out of ... (lto_materialize_tree): ... here. Handle CALL_EXPR codes. Remove call to lto_streamer_cache_append. * tree-streamer-out.c (lto_output_tree_header): Handle CALL_EXPR nodes. * tree-streamer.h (tree_read_bitfields): Declare. * Makefile.in (TREE_STREAMER_H): Add STREAMER_HOOKS_H. (gimple-streamer-in.o): Add dependency on TREE_STREAMER_H. * tree-streamer.h (stream_read_tree): New. Replace all calls to lto_input_tree with it. (stream_write_tree): New. Replace all calls to lto_output_tree, lto_output_tree_ref and lto_output_tree_or_ref with it. * lto-streamer-in.c (lto_read_tree): Inline code from lto_streamer_read_tree. (lto_input_tree): Move from tree-streamer-in.c. * lto-streamer-out.c (lto_output_tree_ref): Make static. Remove handling of NULL values for EXPR. Do not handle EXPRs that are not indexable. (lto_write_tree): Move from tree-streamer-out.c. Inline lto_streamer_write_tree. (lto_output_tree): Move from tree-streamer-out.c. If REF_P is true and EXPR is indexable, call lto_output_tree_ref. * lto-streamer.c (lto_record_common_node): Move to tree-streamer.c. (lto_preload_common_nodes): Likewise. Remove assertions and adjustments for nodes main_identifier_node, ptrdiff_type_node and fileptr_type_node. (lto_streamer_hooks_init): Set streamer_hooks.write_tree to lto_output_tree and streamer_hooks.read_tree to lto_input_tree. * lto-streamer.h (lto_input_tree): Declare. (lto_output_tree_ref): Remove. * streamer-hooks.h (struct streamer_hooks): Remove fields preload_common_nodes, indexable_with_decls_p, pack_value_fields, unpack_value_fields, output_tree_header and has_unique_integer_csts_p. Update all users. * tree-streamer-in.c (lto_materialize_tree): Make extern. (lto_input_tree_pointers): Likewise. (lto_read_tree): Move to lto-streamer-in.c. (lto_input_integer_cst): Make extern. (lto_get_pickled_tree): Likewise. (lto_get_builtin_tree): Likewise. (lto_input_tree): Move to lto-streamer-in.c. * tree-streamer-out.c (pack_value_fields): Make extern. (lto_output_tree_or_ref): Remove. Replace all callers with calls to stream_write_tree. (lto_output_builtin_tree): Make extern. (lto_streamer_write_tree): Inline into lto_write_tree. (lto_output_tree_pointers): Make extern. (lto_output_tree_header): Likewise. (lto_output_integer_cst): Likewise. (lto_write_tree): Move to lto-streamer-out.c. (lto_output_tree): Likewise. * tree-streamer.c (lto_record_common_node): Move from lto-streamer.c (preload_common_nodes): Likewise. (lto_streamer_cache_create): Call it. * tree-streamer.h: Include streamer-hooks.h. (stream_write_tree): New. (stream_read_tree): New. (lto_input_tree): Remove. (lto_materialize_tree): Declare. (lto_input_tree_pointers): Declare. (lto_get_pickled_tree): Declare. (lto_get_builtin_tree): Declare. (lto_input_integer_cst): Declare. (lto_output_tree_header): Declare. (pack_value_fields): Declare. (lto_output_tree_pointers): Declare. (lto_output_integer_cst): Declare. (lto_output_builtin_tree): Declare. From-SVN: r177661
2011-08-11 14:02:34 +02:00
/* Record NODE in CACHE. */
static void
data-streamer.h (streamer_write_zero): Rename from output_zero. * data-streamer.h (streamer_write_zero): Rename from output_zero. (streamer_write_uhwi): Rename from lto_output_uleb128. (streamer_write_hwi): Rename from output_sleb128. (streamer_write_string): Rename from lto_output_string. (streamer_string_index): Rename from lto_string_index. (streamer_write_string_with_length): Rename from lto_output_string_with_length. (streamer_write_uhwi_stream): Rename from lto_output_uleb128_stream. (streamer_write_hwi_stream): Rename from lto_output_sleb128_stream. (streamer_read_string): Rename from lto_input_string. (streamer_read_indexed_string): Rename from input_string_internal. (streamer_read_uhwi): Rename from lto_input_uleb128. (streamer_read_hwi): Rename from lto_input_sleb128. (streamer_write_hwi_in_range): Rename from lto_output_int_in_range. (streamer_read_hwi_in_range): Rename from lto_input_int_in_range. (streamer_write_enum): Rename from lto_output_enum. (streamer_read_enum): Rename from lto_input_enum. (streamer_write_record_start): Rename from output_record_start. (streamer_read_record_start): Rename from input_record_start. (streamer_write_bitpack): Rename from lto_output_bitpack. (streamer_read_bitpack): Rename from lto_input_bitpack. (streamer_write_char_stream): Rename from lto_output_1_stream. (streamer_read_uchar): Rename from lto_input_1_unsigned. * tree-streamer.h (streamer_cache_d): Rename from lto_streamer_cache_d. (streamer_handle_as_builtin_p): Rename from lto_stream_as_builtin_p. (streamer_read_string_cst): Rename from input_string_cst. (streamer_read_chain): Rename from lto_input_chain. (streamer_alloc_tree): Rename from lto_materialize_tree. (streamer_read_tree_body): Rename from lto_input_tree_pointers. (streamer_get_pickled_tree): Rename from lto_get_pickled_tree. (streamer_get_builtin_tree): Rename from lto_get_builtin_tree. (streamer_read_integer_cst): Rename from lto_input_integer_cst. (streamer_read_tree_bitfields): Rename from tree_read_bitfields. (streamer_write_chain): Rename from lto_output_chain. (streamer_write_tree_header): Rename from lto_output_tree_header. (streamer_pack_tree_bitfields): Rename from pack_value_fields. (streamer_write_tree_body): Rename from lto_output_tree_pointers. (streamer_write_integer_cst): Rename from lto_output_integer_cst. (streamer_write_builtin): Rename from lto_output_builtin_tree. (streamer_check_handled_ts_structures): Rename from check_handled_ts_structures. (streamer_tree_cache_insert): Rename from lto_streamer_cache_insert. (streamer_tree_cache_insert_at): Rename from lto_streamer_cache_insert_at. (streamer_tree_cache_append): Rename from lto_streamer_cache_append. (streamer_tree_cache_lookup): Rename from lto_streamer_cache_lookup. (streamer_tree_cache_get): Rename from lto_streamer_cache_get. (streamer_tree_cache_create): Rename from lto_streamer_cache_create. (streamer_tree_cache_delete): Rename from lto_streamer_cache_delete. * tree-streamer-out.c (write_string_cst): Rename from output_string_cst. (write_identifier): Rename from output_identifier. (write_ts_common_tree_pointers): Rename from lto_output_ts_common_tree_pointers. (write_ts_vector_tree_pointers): Rename from lto_output_ts_vector_tree_pointers. (write_ts_complex_tree_pointers): Rename from lto_output_ts_complex_tree_pointers. (write_ts_decl_minimal_tree_pointers): Rename from lto_output_ts_decl_minimal_tree_pointers. (write_ts_decl_common_tree_pointers): Rename from lto_output_ts_decl_common_tree_pointers. (write_ts_decl_non_common_tree_pointers): Rename from lto_output_ts_decl_non_common_tree_pointers. (write_ts_decl_with_vis_tree_pointers): Rename from lto_output_ts_decl_with_vis_tree_pointers. (write_ts_field_decl_tree_pointers): Rename from lto_output_ts_field_decl_tree_pointers. (write_ts_function_decl_tree_pointers): Rename from lto_output_ts_function_decl_tree_pointers. (write_ts_type_common_tree_pointers): Rename from lto_output_ts_type_common_tree_pointers. (write_ts_type_non_common_tree_pointers): Rename from lto_output_ts_type_non_common_tree_pointers. (write_ts_list_tree_pointers): Rename from lto_output_ts_list_tree_pointers. (write_ts_vec_tree_pointers): Rename from lto_output_ts_vec_tree_pointers. (write_ts_exp_tree_pointers): Rename from lto_output_ts_exp_tree_pointers. (write_ts_block_tree_pointers): Rename from lto_output_ts_block_tree_pointers. (write_ts_binfo_tree_pointers): Rename from lto_output_ts_binfo_tree_pointers. (write_ts_constructor_tree_pointers): Rename from lto_output_ts_constructor_tree_pointers. (write_ts_target_option): Rename from lto_output_ts_target_option. (write_ts_translation_unit_decl_tree_pointers): Rename from lto_output_ts_translation_unit_decl_tree_pointers. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Rename from lto_streamer_cache_add_to_node_array. (streamer_tree_cache_insert_1): Rename from lto_streamer_cache_insert_1. (record_common_node): Rename from lto_record_common_node. * streamer-hooks.h (bitpack_d, lto_streamer_cache_d): Remove forward declarations. * data-streamer-in.c (lto_input_widest_uint_uleb128): Remove unused function. * data-streamer-out.c (lto_output_widest_uint_uleb128_stream): Remove unused function. * Makefile.in (lto-section-out.o): Add dependency on DATA_STREAMER_H. (ipa-reference.o): Likewise. * lto-section-out.c: Include data-streamer.h. * ipa-reference.c: Include data-streamer.h. From-SVN: r177704
2011-08-12 18:42:13 +02:00
record_common_node (struct streamer_tree_cache_d *cache, tree node)
tree-streamer-out.c (lto_output_ts_decl_with_vis_tree_pointers): Call stream_write_tree instead of output_record_start. * tree-streamer-out.c (lto_output_ts_decl_with_vis_tree_pointers): Call stream_write_tree instead of output_record_start. (lto_output_ts_binfo_tree_pointers): Likewise. * streamer-hooks.h (stream_write_tree): Move from tree-streamer.h. Convert it to a macro. (stream_read_tree): Likewise. * lto-streamer.h (lto_stream_as_builtin_p): Move ... * tree-streamer.h (lto_stream_as_builtin_p): ... here. * lto-streamer-in.c (lto_read_tree): Call lto_streamer_cache_append and tree_read_bitfields. * lto-streamer-out.c (lto_is_streamable): Move from lto-streamer.c (lto_write_tree): Call it. * lto-streamer.c (lto_is_streamable): Move to lto-streamer-out.c * streamer-hooks.h (struct streamer_hooks): Remove fields name, is_streamable and alloc_tree. Update all users. * tree-streamer-in.c (tree_read_bitfields): Factor out of ... (lto_materialize_tree): ... here. Handle CALL_EXPR codes. Remove call to lto_streamer_cache_append. * tree-streamer-out.c (lto_output_tree_header): Handle CALL_EXPR nodes. * tree-streamer.h (tree_read_bitfields): Declare. * Makefile.in (TREE_STREAMER_H): Add STREAMER_HOOKS_H. (gimple-streamer-in.o): Add dependency on TREE_STREAMER_H. * tree-streamer.h (stream_read_tree): New. Replace all calls to lto_input_tree with it. (stream_write_tree): New. Replace all calls to lto_output_tree, lto_output_tree_ref and lto_output_tree_or_ref with it. * lto-streamer-in.c (lto_read_tree): Inline code from lto_streamer_read_tree. (lto_input_tree): Move from tree-streamer-in.c. * lto-streamer-out.c (lto_output_tree_ref): Make static. Remove handling of NULL values for EXPR. Do not handle EXPRs that are not indexable. (lto_write_tree): Move from tree-streamer-out.c. Inline lto_streamer_write_tree. (lto_output_tree): Move from tree-streamer-out.c. If REF_P is true and EXPR is indexable, call lto_output_tree_ref. * lto-streamer.c (lto_record_common_node): Move to tree-streamer.c. (lto_preload_common_nodes): Likewise. Remove assertions and adjustments for nodes main_identifier_node, ptrdiff_type_node and fileptr_type_node. (lto_streamer_hooks_init): Set streamer_hooks.write_tree to lto_output_tree and streamer_hooks.read_tree to lto_input_tree. * lto-streamer.h (lto_input_tree): Declare. (lto_output_tree_ref): Remove. * streamer-hooks.h (struct streamer_hooks): Remove fields preload_common_nodes, indexable_with_decls_p, pack_value_fields, unpack_value_fields, output_tree_header and has_unique_integer_csts_p. Update all users. * tree-streamer-in.c (lto_materialize_tree): Make extern. (lto_input_tree_pointers): Likewise. (lto_read_tree): Move to lto-streamer-in.c. (lto_input_integer_cst): Make extern. (lto_get_pickled_tree): Likewise. (lto_get_builtin_tree): Likewise. (lto_input_tree): Move to lto-streamer-in.c. * tree-streamer-out.c (pack_value_fields): Make extern. (lto_output_tree_or_ref): Remove. Replace all callers with calls to stream_write_tree. (lto_output_builtin_tree): Make extern. (lto_streamer_write_tree): Inline into lto_write_tree. (lto_output_tree_pointers): Make extern. (lto_output_tree_header): Likewise. (lto_output_integer_cst): Likewise. (lto_write_tree): Move to lto-streamer-out.c. (lto_output_tree): Likewise. * tree-streamer.c (lto_record_common_node): Move from lto-streamer.c (preload_common_nodes): Likewise. (lto_streamer_cache_create): Call it. * tree-streamer.h: Include streamer-hooks.h. (stream_write_tree): New. (stream_read_tree): New. (lto_input_tree): Remove. (lto_materialize_tree): Declare. (lto_input_tree_pointers): Declare. (lto_get_pickled_tree): Declare. (lto_get_builtin_tree): Declare. (lto_input_integer_cst): Declare. (lto_output_tree_header): Declare. (pack_value_fields): Declare. (lto_output_tree_pointers): Declare. (lto_output_integer_cst): Declare. (lto_output_builtin_tree): Declare. From-SVN: r177661
2011-08-11 14:02:34 +02:00
{
/* If we recursively end up at nodes we do not want to preload simply don't.
??? We'd want to verify that this doesn't happen, or alternatively
do not recurse at all. */
if (node == char_type_node)
return;
gcc_checking_assert (node != boolean_type_node
&& node != boolean_true_node
&& node != boolean_false_node);
tree-streamer-out.c (lto_output_ts_decl_with_vis_tree_pointers): Call stream_write_tree instead of output_record_start. * tree-streamer-out.c (lto_output_ts_decl_with_vis_tree_pointers): Call stream_write_tree instead of output_record_start. (lto_output_ts_binfo_tree_pointers): Likewise. * streamer-hooks.h (stream_write_tree): Move from tree-streamer.h. Convert it to a macro. (stream_read_tree): Likewise. * lto-streamer.h (lto_stream_as_builtin_p): Move ... * tree-streamer.h (lto_stream_as_builtin_p): ... here. * lto-streamer-in.c (lto_read_tree): Call lto_streamer_cache_append and tree_read_bitfields. * lto-streamer-out.c (lto_is_streamable): Move from lto-streamer.c (lto_write_tree): Call it. * lto-streamer.c (lto_is_streamable): Move to lto-streamer-out.c * streamer-hooks.h (struct streamer_hooks): Remove fields name, is_streamable and alloc_tree. Update all users. * tree-streamer-in.c (tree_read_bitfields): Factor out of ... (lto_materialize_tree): ... here. Handle CALL_EXPR codes. Remove call to lto_streamer_cache_append. * tree-streamer-out.c (lto_output_tree_header): Handle CALL_EXPR nodes. * tree-streamer.h (tree_read_bitfields): Declare. * Makefile.in (TREE_STREAMER_H): Add STREAMER_HOOKS_H. (gimple-streamer-in.o): Add dependency on TREE_STREAMER_H. * tree-streamer.h (stream_read_tree): New. Replace all calls to lto_input_tree with it. (stream_write_tree): New. Replace all calls to lto_output_tree, lto_output_tree_ref and lto_output_tree_or_ref with it. * lto-streamer-in.c (lto_read_tree): Inline code from lto_streamer_read_tree. (lto_input_tree): Move from tree-streamer-in.c. * lto-streamer-out.c (lto_output_tree_ref): Make static. Remove handling of NULL values for EXPR. Do not handle EXPRs that are not indexable. (lto_write_tree): Move from tree-streamer-out.c. Inline lto_streamer_write_tree. (lto_output_tree): Move from tree-streamer-out.c. If REF_P is true and EXPR is indexable, call lto_output_tree_ref. * lto-streamer.c (lto_record_common_node): Move to tree-streamer.c. (lto_preload_common_nodes): Likewise. Remove assertions and adjustments for nodes main_identifier_node, ptrdiff_type_node and fileptr_type_node. (lto_streamer_hooks_init): Set streamer_hooks.write_tree to lto_output_tree and streamer_hooks.read_tree to lto_input_tree. * lto-streamer.h (lto_input_tree): Declare. (lto_output_tree_ref): Remove. * streamer-hooks.h (struct streamer_hooks): Remove fields preload_common_nodes, indexable_with_decls_p, pack_value_fields, unpack_value_fields, output_tree_header and has_unique_integer_csts_p. Update all users. * tree-streamer-in.c (lto_materialize_tree): Make extern. (lto_input_tree_pointers): Likewise. (lto_read_tree): Move to lto-streamer-in.c. (lto_input_integer_cst): Make extern. (lto_get_pickled_tree): Likewise. (lto_get_builtin_tree): Likewise. (lto_input_tree): Move to lto-streamer-in.c. * tree-streamer-out.c (pack_value_fields): Make extern. (lto_output_tree_or_ref): Remove. Replace all callers with calls to stream_write_tree. (lto_output_builtin_tree): Make extern. (lto_streamer_write_tree): Inline into lto_write_tree. (lto_output_tree_pointers): Make extern. (lto_output_tree_header): Likewise. (lto_output_integer_cst): Likewise. (lto_write_tree): Move to lto-streamer-out.c. (lto_output_tree): Likewise. * tree-streamer.c (lto_record_common_node): Move from lto-streamer.c (preload_common_nodes): Likewise. (lto_streamer_cache_create): Call it. * tree-streamer.h: Include streamer-hooks.h. (stream_write_tree): New. (stream_read_tree): New. (lto_input_tree): Remove. (lto_materialize_tree): Declare. (lto_input_tree_pointers): Declare. (lto_get_pickled_tree): Declare. (lto_get_builtin_tree): Declare. (lto_input_integer_cst): Declare. (lto_output_tree_header): Declare. (pack_value_fields): Declare. (lto_output_tree_pointers): Declare. (lto_output_integer_cst): Declare. (lto_output_builtin_tree): Declare. From-SVN: r177661
2011-08-11 14:02:34 +02:00
/* We have to make sure to fill exactly the same number of
elements for all frontends. That can include NULL trees.
As our hash table can't deal with zero entries we'll simply stream
a random other tree. A NULL tree never will be looked up so it
doesn't matter which tree we replace it with, just to be sure
use error_mark_node. */
if (!node)
node = error_mark_node;
lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. 2013-06-17 Richard Biener <rguenther@suse.de> * lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. (lto_input_scc): Declare. (lto_input_tree_1): Likewise. (struct lto_stats_d): Add num_tree_bodies_output and num_pickle_refs_output. * lto-streamer-in.c (lto_read_body): Use streamer_tree_cache_get_tree. (lto_read_tree_1): Split out from ... (lto_read_tree): ... this. (lto_input_scc): New function. (lto_input_tree_1): Split out from ... (lto_input_tree): ... this. Handle LTO_tree_scc. (lto_data_in_create): Create the streamer cache without hashes. * lto-streamer-out.c (create_output_block): Create the streamer cache with hashes when not doing WPA. (lto_write_tree_1): Split out from ... (lto_write_tree): ... this. (get_symbol_initial_value): New function. (lto_output_tree_1): Split out from ... (lto_output_tree): ... this. Write trees as series of SCCs using a DFS walk via DFS_write_tree. (struct sccs, struct scc_entry): New types. (next_dfs_num, sccstack, sccstate, sccstate_obstack): New globals. (DFS_write_tree_body): New function. (DFS_write_tree): Likewise. (hash_tree): Likewise. (scc_entry_compare): Likewise. (hash_scc): Likewise. (tree_is_indexable): DEBUG_EXPR_DECLs are local entities. * tree-streamer-in.c (lto_input_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. (streamer_read_integer_cst): Remove. (streamer_get_pickled_tree): Adjust. * tree-streamer-out.c (streamer_write_chain): Disable streaming of DECL_EXTERNALs in BLOCK_VARS for now. (write_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Add hash value argument and record that if hashes are recorded in the cache. (streamer_tree_cache_insert_1): Adjust. (streamer_tree_cache_insert): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_append): Adjust. (record_common_node): Likewise. (streamer_tree_cache_create): Add argument whether to record hash values together with trees. (streamer_tree_cache_delete): Adjust. * tree-streamer.h (struct streamer_tree_cache_d): Add vector of hashes. (streamer_read_integer_cst): Remove. (streamer_tree_cache_insert): Adjust. (streamer_tree_cache_append): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_create): Add argument whether to record hashes. (streamer_tree_cache_get): Rename to ... (streamer_tree_cache_get_tree): ... this. (streamer_tree_cache_get_hash): New function. * tree.c (cache_integer_cst): New function. * tree.h (cache_integer_cst): Declare. (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move here from cp/cp-tree.h. * lto-symtab.c (lto_varpool_replace_node): Only release DECL_INITIAL of non-prevailing decls. * varpool.c (varpool_remove_initializer): Do not release DECL_INITIAL when we are still in CGRAPH_LTO_STREAMING. cp/ * cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h. lto/ * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency. * lto.c: Include data-streamer.h. (lto_read_in_decl_state): Use streamer_tree_cache_get_tree. (gimple_type_leader_entry_s, gimple_type_leader, gimple_lookup_type_leader): Remove. (gtc_visit): Simplify. (gimple_types_compatible_p): Likewise. (gimple_register_type_1): Likewise. Merge into ... (gimple_register_type): ... this. Keep it as legacy for statistics purposes for now. (fixup_integer_cst): Remove. (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and rename to ... (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars, maybe_remember_with_vars_*): ... these. (uniquify_nodes): Remove. (lto_fixup_prevailing_type): New function. (struct tree_scc, struct tree_scc_hasher): New type and hasher. (tree_scc_hash, tree_scc_hash_obstack): New globals. (num_merged_types, num_prevailing_types, num_not_merged_types, num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read, total_scc_size_merged, num_sccs_merged, num_scc_compares, num_scc_compare_collisions): New global counters. (compare_tree_sccs_1): New function. (compare_tree_sccs): Likewise. (unify_scc): Likewise. (lto_read_decls): Stream in tree SCCs and unify them on the way in. Finalize prevailing SCC tree members. (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader. Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother to ggc-collect during merging. (print_lto_report_1): Adjust for new merging code. From-SVN: r200151
2013-06-17 17:08:24 +02:00
/* ??? FIXME, devise a better hash value. But the hash needs to be equal
for all frontend and lto1 invocations. So just use the position
in the cache as hash value. */
streamer_tree_cache_append (cache, node, cache->nodes.length ());
tree-streamer-out.c (lto_output_ts_decl_with_vis_tree_pointers): Call stream_write_tree instead of output_record_start. * tree-streamer-out.c (lto_output_ts_decl_with_vis_tree_pointers): Call stream_write_tree instead of output_record_start. (lto_output_ts_binfo_tree_pointers): Likewise. * streamer-hooks.h (stream_write_tree): Move from tree-streamer.h. Convert it to a macro. (stream_read_tree): Likewise. * lto-streamer.h (lto_stream_as_builtin_p): Move ... * tree-streamer.h (lto_stream_as_builtin_p): ... here. * lto-streamer-in.c (lto_read_tree): Call lto_streamer_cache_append and tree_read_bitfields. * lto-streamer-out.c (lto_is_streamable): Move from lto-streamer.c (lto_write_tree): Call it. * lto-streamer.c (lto_is_streamable): Move to lto-streamer-out.c * streamer-hooks.h (struct streamer_hooks): Remove fields name, is_streamable and alloc_tree. Update all users. * tree-streamer-in.c (tree_read_bitfields): Factor out of ... (lto_materialize_tree): ... here. Handle CALL_EXPR codes. Remove call to lto_streamer_cache_append. * tree-streamer-out.c (lto_output_tree_header): Handle CALL_EXPR nodes. * tree-streamer.h (tree_read_bitfields): Declare. * Makefile.in (TREE_STREAMER_H): Add STREAMER_HOOKS_H. (gimple-streamer-in.o): Add dependency on TREE_STREAMER_H. * tree-streamer.h (stream_read_tree): New. Replace all calls to lto_input_tree with it. (stream_write_tree): New. Replace all calls to lto_output_tree, lto_output_tree_ref and lto_output_tree_or_ref with it. * lto-streamer-in.c (lto_read_tree): Inline code from lto_streamer_read_tree. (lto_input_tree): Move from tree-streamer-in.c. * lto-streamer-out.c (lto_output_tree_ref): Make static. Remove handling of NULL values for EXPR. Do not handle EXPRs that are not indexable. (lto_write_tree): Move from tree-streamer-out.c. Inline lto_streamer_write_tree. (lto_output_tree): Move from tree-streamer-out.c. If REF_P is true and EXPR is indexable, call lto_output_tree_ref. * lto-streamer.c (lto_record_common_node): Move to tree-streamer.c. (lto_preload_common_nodes): Likewise. Remove assertions and adjustments for nodes main_identifier_node, ptrdiff_type_node and fileptr_type_node. (lto_streamer_hooks_init): Set streamer_hooks.write_tree to lto_output_tree and streamer_hooks.read_tree to lto_input_tree. * lto-streamer.h (lto_input_tree): Declare. (lto_output_tree_ref): Remove. * streamer-hooks.h (struct streamer_hooks): Remove fields preload_common_nodes, indexable_with_decls_p, pack_value_fields, unpack_value_fields, output_tree_header and has_unique_integer_csts_p. Update all users. * tree-streamer-in.c (lto_materialize_tree): Make extern. (lto_input_tree_pointers): Likewise. (lto_read_tree): Move to lto-streamer-in.c. (lto_input_integer_cst): Make extern. (lto_get_pickled_tree): Likewise. (lto_get_builtin_tree): Likewise. (lto_input_tree): Move to lto-streamer-in.c. * tree-streamer-out.c (pack_value_fields): Make extern. (lto_output_tree_or_ref): Remove. Replace all callers with calls to stream_write_tree. (lto_output_builtin_tree): Make extern. (lto_streamer_write_tree): Inline into lto_write_tree. (lto_output_tree_pointers): Make extern. (lto_output_tree_header): Likewise. (lto_output_integer_cst): Likewise. (lto_write_tree): Move to lto-streamer-out.c. (lto_output_tree): Likewise. * tree-streamer.c (lto_record_common_node): Move from lto-streamer.c (preload_common_nodes): Likewise. (lto_streamer_cache_create): Call it. * tree-streamer.h: Include streamer-hooks.h. (stream_write_tree): New. (stream_read_tree): New. (lto_input_tree): Remove. (lto_materialize_tree): Declare. (lto_input_tree_pointers): Declare. (lto_get_pickled_tree): Declare. (lto_get_builtin_tree): Declare. (lto_input_integer_cst): Declare. (lto_output_tree_header): Declare. (pack_value_fields): Declare. (lto_output_tree_pointers): Declare. (lto_output_integer_cst): Declare. (lto_output_builtin_tree): Declare. From-SVN: r177661
2011-08-11 14:02:34 +02:00
switch (TREE_CODE (node))
tree-streamer-out.c (lto_output_ts_decl_with_vis_tree_pointers): Call stream_write_tree instead of output_record_start. * tree-streamer-out.c (lto_output_ts_decl_with_vis_tree_pointers): Call stream_write_tree instead of output_record_start. (lto_output_ts_binfo_tree_pointers): Likewise. * streamer-hooks.h (stream_write_tree): Move from tree-streamer.h. Convert it to a macro. (stream_read_tree): Likewise. * lto-streamer.h (lto_stream_as_builtin_p): Move ... * tree-streamer.h (lto_stream_as_builtin_p): ... here. * lto-streamer-in.c (lto_read_tree): Call lto_streamer_cache_append and tree_read_bitfields. * lto-streamer-out.c (lto_is_streamable): Move from lto-streamer.c (lto_write_tree): Call it. * lto-streamer.c (lto_is_streamable): Move to lto-streamer-out.c * streamer-hooks.h (struct streamer_hooks): Remove fields name, is_streamable and alloc_tree. Update all users. * tree-streamer-in.c (tree_read_bitfields): Factor out of ... (lto_materialize_tree): ... here. Handle CALL_EXPR codes. Remove call to lto_streamer_cache_append. * tree-streamer-out.c (lto_output_tree_header): Handle CALL_EXPR nodes. * tree-streamer.h (tree_read_bitfields): Declare. * Makefile.in (TREE_STREAMER_H): Add STREAMER_HOOKS_H. (gimple-streamer-in.o): Add dependency on TREE_STREAMER_H. * tree-streamer.h (stream_read_tree): New. Replace all calls to lto_input_tree with it. (stream_write_tree): New. Replace all calls to lto_output_tree, lto_output_tree_ref and lto_output_tree_or_ref with it. * lto-streamer-in.c (lto_read_tree): Inline code from lto_streamer_read_tree. (lto_input_tree): Move from tree-streamer-in.c. * lto-streamer-out.c (lto_output_tree_ref): Make static. Remove handling of NULL values for EXPR. Do not handle EXPRs that are not indexable. (lto_write_tree): Move from tree-streamer-out.c. Inline lto_streamer_write_tree. (lto_output_tree): Move from tree-streamer-out.c. If REF_P is true and EXPR is indexable, call lto_output_tree_ref. * lto-streamer.c (lto_record_common_node): Move to tree-streamer.c. (lto_preload_common_nodes): Likewise. Remove assertions and adjustments for nodes main_identifier_node, ptrdiff_type_node and fileptr_type_node. (lto_streamer_hooks_init): Set streamer_hooks.write_tree to lto_output_tree and streamer_hooks.read_tree to lto_input_tree. * lto-streamer.h (lto_input_tree): Declare. (lto_output_tree_ref): Remove. * streamer-hooks.h (struct streamer_hooks): Remove fields preload_common_nodes, indexable_with_decls_p, pack_value_fields, unpack_value_fields, output_tree_header and has_unique_integer_csts_p. Update all users. * tree-streamer-in.c (lto_materialize_tree): Make extern. (lto_input_tree_pointers): Likewise. (lto_read_tree): Move to lto-streamer-in.c. (lto_input_integer_cst): Make extern. (lto_get_pickled_tree): Likewise. (lto_get_builtin_tree): Likewise. (lto_input_tree): Move to lto-streamer-in.c. * tree-streamer-out.c (pack_value_fields): Make extern. (lto_output_tree_or_ref): Remove. Replace all callers with calls to stream_write_tree. (lto_output_builtin_tree): Make extern. (lto_streamer_write_tree): Inline into lto_write_tree. (lto_output_tree_pointers): Make extern. (lto_output_tree_header): Likewise. (lto_output_integer_cst): Likewise. (lto_write_tree): Move to lto-streamer-out.c. (lto_output_tree): Likewise. * tree-streamer.c (lto_record_common_node): Move from lto-streamer.c (preload_common_nodes): Likewise. (lto_streamer_cache_create): Call it. * tree-streamer.h: Include streamer-hooks.h. (stream_write_tree): New. (stream_read_tree): New. (lto_input_tree): Remove. (lto_materialize_tree): Declare. (lto_input_tree_pointers): Declare. (lto_get_pickled_tree): Declare. (lto_get_builtin_tree): Declare. (lto_input_integer_cst): Declare. (lto_output_tree_header): Declare. (pack_value_fields): Declare. (lto_output_tree_pointers): Declare. (lto_output_integer_cst): Declare. (lto_output_builtin_tree): Declare. From-SVN: r177661
2011-08-11 14:02:34 +02:00
{
case ERROR_MARK:
case FIELD_DECL:
case FIXED_POINT_TYPE:
case IDENTIFIER_NODE:
case INTEGER_CST:
case INTEGER_TYPE:
case POINTER_BOUNDS_TYPE:
case REAL_TYPE:
case TREE_LIST:
case VOID_CST:
case VOID_TYPE:
/* No recursive trees. */
break;
case ARRAY_TYPE:
case POINTER_TYPE:
case REFERENCE_TYPE:
record_common_node (cache, TREE_TYPE (node));
break;
case COMPLEX_TYPE:
/* Verify that a complex type's component type (node_type) has been
handled already (and we thus don't need to recurse here). */
verify_common_node_recorded (cache, TREE_TYPE (node));
break;
case RECORD_TYPE:
tree-streamer-out.c (lto_output_ts_decl_with_vis_tree_pointers): Call stream_write_tree instead of output_record_start. * tree-streamer-out.c (lto_output_ts_decl_with_vis_tree_pointers): Call stream_write_tree instead of output_record_start. (lto_output_ts_binfo_tree_pointers): Likewise. * streamer-hooks.h (stream_write_tree): Move from tree-streamer.h. Convert it to a macro. (stream_read_tree): Likewise. * lto-streamer.h (lto_stream_as_builtin_p): Move ... * tree-streamer.h (lto_stream_as_builtin_p): ... here. * lto-streamer-in.c (lto_read_tree): Call lto_streamer_cache_append and tree_read_bitfields. * lto-streamer-out.c (lto_is_streamable): Move from lto-streamer.c (lto_write_tree): Call it. * lto-streamer.c (lto_is_streamable): Move to lto-streamer-out.c * streamer-hooks.h (struct streamer_hooks): Remove fields name, is_streamable and alloc_tree. Update all users. * tree-streamer-in.c (tree_read_bitfields): Factor out of ... (lto_materialize_tree): ... here. Handle CALL_EXPR codes. Remove call to lto_streamer_cache_append. * tree-streamer-out.c (lto_output_tree_header): Handle CALL_EXPR nodes. * tree-streamer.h (tree_read_bitfields): Declare. * Makefile.in (TREE_STREAMER_H): Add STREAMER_HOOKS_H. (gimple-streamer-in.o): Add dependency on TREE_STREAMER_H. * tree-streamer.h (stream_read_tree): New. Replace all calls to lto_input_tree with it. (stream_write_tree): New. Replace all calls to lto_output_tree, lto_output_tree_ref and lto_output_tree_or_ref with it. * lto-streamer-in.c (lto_read_tree): Inline code from lto_streamer_read_tree. (lto_input_tree): Move from tree-streamer-in.c. * lto-streamer-out.c (lto_output_tree_ref): Make static. Remove handling of NULL values for EXPR. Do not handle EXPRs that are not indexable. (lto_write_tree): Move from tree-streamer-out.c. Inline lto_streamer_write_tree. (lto_output_tree): Move from tree-streamer-out.c. If REF_P is true and EXPR is indexable, call lto_output_tree_ref. * lto-streamer.c (lto_record_common_node): Move to tree-streamer.c. (lto_preload_common_nodes): Likewise. Remove assertions and adjustments for nodes main_identifier_node, ptrdiff_type_node and fileptr_type_node. (lto_streamer_hooks_init): Set streamer_hooks.write_tree to lto_output_tree and streamer_hooks.read_tree to lto_input_tree. * lto-streamer.h (lto_input_tree): Declare. (lto_output_tree_ref): Remove. * streamer-hooks.h (struct streamer_hooks): Remove fields preload_common_nodes, indexable_with_decls_p, pack_value_fields, unpack_value_fields, output_tree_header and has_unique_integer_csts_p. Update all users. * tree-streamer-in.c (lto_materialize_tree): Make extern. (lto_input_tree_pointers): Likewise. (lto_read_tree): Move to lto-streamer-in.c. (lto_input_integer_cst): Make extern. (lto_get_pickled_tree): Likewise. (lto_get_builtin_tree): Likewise. (lto_input_tree): Move to lto-streamer-in.c. * tree-streamer-out.c (pack_value_fields): Make extern. (lto_output_tree_or_ref): Remove. Replace all callers with calls to stream_write_tree. (lto_output_builtin_tree): Make extern. (lto_streamer_write_tree): Inline into lto_write_tree. (lto_output_tree_pointers): Make extern. (lto_output_tree_header): Likewise. (lto_output_integer_cst): Likewise. (lto_write_tree): Move to lto-streamer-out.c. (lto_output_tree): Likewise. * tree-streamer.c (lto_record_common_node): Move from lto-streamer.c (preload_common_nodes): Likewise. (lto_streamer_cache_create): Call it. * tree-streamer.h: Include streamer-hooks.h. (stream_write_tree): New. (stream_read_tree): New. (lto_input_tree): Remove. (lto_materialize_tree): Declare. (lto_input_tree_pointers): Declare. (lto_get_pickled_tree): Declare. (lto_get_builtin_tree): Declare. (lto_input_integer_cst): Declare. (lto_output_tree_header): Declare. (pack_value_fields): Declare. (lto_output_tree_pointers): Declare. (lto_output_integer_cst): Declare. (lto_output_builtin_tree): Declare. From-SVN: r177661
2011-08-11 14:02:34 +02:00
/* The FIELD_DECLs of structures should be shared, so that every
COMPONENT_REF uses the same tree node when referencing a field.
Pointer equality between FIELD_DECLs is used by the alias
machinery to compute overlapping component references (see
nonoverlapping_component_refs_p and
nonoverlapping_component_refs_of_decl_p). */
for (tree f = TYPE_FIELDS (node); f; f = TREE_CHAIN (f))
data-streamer.h (streamer_write_zero): Rename from output_zero. * data-streamer.h (streamer_write_zero): Rename from output_zero. (streamer_write_uhwi): Rename from lto_output_uleb128. (streamer_write_hwi): Rename from output_sleb128. (streamer_write_string): Rename from lto_output_string. (streamer_string_index): Rename from lto_string_index. (streamer_write_string_with_length): Rename from lto_output_string_with_length. (streamer_write_uhwi_stream): Rename from lto_output_uleb128_stream. (streamer_write_hwi_stream): Rename from lto_output_sleb128_stream. (streamer_read_string): Rename from lto_input_string. (streamer_read_indexed_string): Rename from input_string_internal. (streamer_read_uhwi): Rename from lto_input_uleb128. (streamer_read_hwi): Rename from lto_input_sleb128. (streamer_write_hwi_in_range): Rename from lto_output_int_in_range. (streamer_read_hwi_in_range): Rename from lto_input_int_in_range. (streamer_write_enum): Rename from lto_output_enum. (streamer_read_enum): Rename from lto_input_enum. (streamer_write_record_start): Rename from output_record_start. (streamer_read_record_start): Rename from input_record_start. (streamer_write_bitpack): Rename from lto_output_bitpack. (streamer_read_bitpack): Rename from lto_input_bitpack. (streamer_write_char_stream): Rename from lto_output_1_stream. (streamer_read_uchar): Rename from lto_input_1_unsigned. * tree-streamer.h (streamer_cache_d): Rename from lto_streamer_cache_d. (streamer_handle_as_builtin_p): Rename from lto_stream_as_builtin_p. (streamer_read_string_cst): Rename from input_string_cst. (streamer_read_chain): Rename from lto_input_chain. (streamer_alloc_tree): Rename from lto_materialize_tree. (streamer_read_tree_body): Rename from lto_input_tree_pointers. (streamer_get_pickled_tree): Rename from lto_get_pickled_tree. (streamer_get_builtin_tree): Rename from lto_get_builtin_tree. (streamer_read_integer_cst): Rename from lto_input_integer_cst. (streamer_read_tree_bitfields): Rename from tree_read_bitfields. (streamer_write_chain): Rename from lto_output_chain. (streamer_write_tree_header): Rename from lto_output_tree_header. (streamer_pack_tree_bitfields): Rename from pack_value_fields. (streamer_write_tree_body): Rename from lto_output_tree_pointers. (streamer_write_integer_cst): Rename from lto_output_integer_cst. (streamer_write_builtin): Rename from lto_output_builtin_tree. (streamer_check_handled_ts_structures): Rename from check_handled_ts_structures. (streamer_tree_cache_insert): Rename from lto_streamer_cache_insert. (streamer_tree_cache_insert_at): Rename from lto_streamer_cache_insert_at. (streamer_tree_cache_append): Rename from lto_streamer_cache_append. (streamer_tree_cache_lookup): Rename from lto_streamer_cache_lookup. (streamer_tree_cache_get): Rename from lto_streamer_cache_get. (streamer_tree_cache_create): Rename from lto_streamer_cache_create. (streamer_tree_cache_delete): Rename from lto_streamer_cache_delete. * tree-streamer-out.c (write_string_cst): Rename from output_string_cst. (write_identifier): Rename from output_identifier. (write_ts_common_tree_pointers): Rename from lto_output_ts_common_tree_pointers. (write_ts_vector_tree_pointers): Rename from lto_output_ts_vector_tree_pointers. (write_ts_complex_tree_pointers): Rename from lto_output_ts_complex_tree_pointers. (write_ts_decl_minimal_tree_pointers): Rename from lto_output_ts_decl_minimal_tree_pointers. (write_ts_decl_common_tree_pointers): Rename from lto_output_ts_decl_common_tree_pointers. (write_ts_decl_non_common_tree_pointers): Rename from lto_output_ts_decl_non_common_tree_pointers. (write_ts_decl_with_vis_tree_pointers): Rename from lto_output_ts_decl_with_vis_tree_pointers. (write_ts_field_decl_tree_pointers): Rename from lto_output_ts_field_decl_tree_pointers. (write_ts_function_decl_tree_pointers): Rename from lto_output_ts_function_decl_tree_pointers. (write_ts_type_common_tree_pointers): Rename from lto_output_ts_type_common_tree_pointers. (write_ts_type_non_common_tree_pointers): Rename from lto_output_ts_type_non_common_tree_pointers. (write_ts_list_tree_pointers): Rename from lto_output_ts_list_tree_pointers. (write_ts_vec_tree_pointers): Rename from lto_output_ts_vec_tree_pointers. (write_ts_exp_tree_pointers): Rename from lto_output_ts_exp_tree_pointers. (write_ts_block_tree_pointers): Rename from lto_output_ts_block_tree_pointers. (write_ts_binfo_tree_pointers): Rename from lto_output_ts_binfo_tree_pointers. (write_ts_constructor_tree_pointers): Rename from lto_output_ts_constructor_tree_pointers. (write_ts_target_option): Rename from lto_output_ts_target_option. (write_ts_translation_unit_decl_tree_pointers): Rename from lto_output_ts_translation_unit_decl_tree_pointers. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Rename from lto_streamer_cache_add_to_node_array. (streamer_tree_cache_insert_1): Rename from lto_streamer_cache_insert_1. (record_common_node): Rename from lto_record_common_node. * streamer-hooks.h (bitpack_d, lto_streamer_cache_d): Remove forward declarations. * data-streamer-in.c (lto_input_widest_uint_uleb128): Remove unused function. * data-streamer-out.c (lto_output_widest_uint_uleb128_stream): Remove unused function. * Makefile.in (lto-section-out.o): Add dependency on DATA_STREAMER_H. (ipa-reference.o): Likewise. * lto-section-out.c: Include data-streamer.h. * ipa-reference.c: Include data-streamer.h. From-SVN: r177704
2011-08-12 18:42:13 +02:00
record_common_node (cache, f);
break;
default:
/* Unexpected tree code. */
gcc_unreachable ();
tree-streamer-out.c (lto_output_ts_decl_with_vis_tree_pointers): Call stream_write_tree instead of output_record_start. * tree-streamer-out.c (lto_output_ts_decl_with_vis_tree_pointers): Call stream_write_tree instead of output_record_start. (lto_output_ts_binfo_tree_pointers): Likewise. * streamer-hooks.h (stream_write_tree): Move from tree-streamer.h. Convert it to a macro. (stream_read_tree): Likewise. * lto-streamer.h (lto_stream_as_builtin_p): Move ... * tree-streamer.h (lto_stream_as_builtin_p): ... here. * lto-streamer-in.c (lto_read_tree): Call lto_streamer_cache_append and tree_read_bitfields. * lto-streamer-out.c (lto_is_streamable): Move from lto-streamer.c (lto_write_tree): Call it. * lto-streamer.c (lto_is_streamable): Move to lto-streamer-out.c * streamer-hooks.h (struct streamer_hooks): Remove fields name, is_streamable and alloc_tree. Update all users. * tree-streamer-in.c (tree_read_bitfields): Factor out of ... (lto_materialize_tree): ... here. Handle CALL_EXPR codes. Remove call to lto_streamer_cache_append. * tree-streamer-out.c (lto_output_tree_header): Handle CALL_EXPR nodes. * tree-streamer.h (tree_read_bitfields): Declare. * Makefile.in (TREE_STREAMER_H): Add STREAMER_HOOKS_H. (gimple-streamer-in.o): Add dependency on TREE_STREAMER_H. * tree-streamer.h (stream_read_tree): New. Replace all calls to lto_input_tree with it. (stream_write_tree): New. Replace all calls to lto_output_tree, lto_output_tree_ref and lto_output_tree_or_ref with it. * lto-streamer-in.c (lto_read_tree): Inline code from lto_streamer_read_tree. (lto_input_tree): Move from tree-streamer-in.c. * lto-streamer-out.c (lto_output_tree_ref): Make static. Remove handling of NULL values for EXPR. Do not handle EXPRs that are not indexable. (lto_write_tree): Move from tree-streamer-out.c. Inline lto_streamer_write_tree. (lto_output_tree): Move from tree-streamer-out.c. If REF_P is true and EXPR is indexable, call lto_output_tree_ref. * lto-streamer.c (lto_record_common_node): Move to tree-streamer.c. (lto_preload_common_nodes): Likewise. Remove assertions and adjustments for nodes main_identifier_node, ptrdiff_type_node and fileptr_type_node. (lto_streamer_hooks_init): Set streamer_hooks.write_tree to lto_output_tree and streamer_hooks.read_tree to lto_input_tree. * lto-streamer.h (lto_input_tree): Declare. (lto_output_tree_ref): Remove. * streamer-hooks.h (struct streamer_hooks): Remove fields preload_common_nodes, indexable_with_decls_p, pack_value_fields, unpack_value_fields, output_tree_header and has_unique_integer_csts_p. Update all users. * tree-streamer-in.c (lto_materialize_tree): Make extern. (lto_input_tree_pointers): Likewise. (lto_read_tree): Move to lto-streamer-in.c. (lto_input_integer_cst): Make extern. (lto_get_pickled_tree): Likewise. (lto_get_builtin_tree): Likewise. (lto_input_tree): Move to lto-streamer-in.c. * tree-streamer-out.c (pack_value_fields): Make extern. (lto_output_tree_or_ref): Remove. Replace all callers with calls to stream_write_tree. (lto_output_builtin_tree): Make extern. (lto_streamer_write_tree): Inline into lto_write_tree. (lto_output_tree_pointers): Make extern. (lto_output_tree_header): Likewise. (lto_output_integer_cst): Likewise. (lto_write_tree): Move to lto-streamer-out.c. (lto_output_tree): Likewise. * tree-streamer.c (lto_record_common_node): Move from lto-streamer.c (preload_common_nodes): Likewise. (lto_streamer_cache_create): Call it. * tree-streamer.h: Include streamer-hooks.h. (stream_write_tree): New. (stream_read_tree): New. (lto_input_tree): Remove. (lto_materialize_tree): Declare. (lto_input_tree_pointers): Declare. (lto_get_pickled_tree): Declare. (lto_get_builtin_tree): Declare. (lto_input_integer_cst): Declare. (lto_output_tree_header): Declare. (pack_value_fields): Declare. (lto_output_tree_pointers): Declare. (lto_output_integer_cst): Declare. (lto_output_builtin_tree): Declare. From-SVN: r177661
2011-08-11 14:02:34 +02:00
}
}
/* Preload common nodes into CACHE and make sure they are merged
properly according to the gimple type table. */
static void
data-streamer.h (streamer_write_zero): Rename from output_zero. * data-streamer.h (streamer_write_zero): Rename from output_zero. (streamer_write_uhwi): Rename from lto_output_uleb128. (streamer_write_hwi): Rename from output_sleb128. (streamer_write_string): Rename from lto_output_string. (streamer_string_index): Rename from lto_string_index. (streamer_write_string_with_length): Rename from lto_output_string_with_length. (streamer_write_uhwi_stream): Rename from lto_output_uleb128_stream. (streamer_write_hwi_stream): Rename from lto_output_sleb128_stream. (streamer_read_string): Rename from lto_input_string. (streamer_read_indexed_string): Rename from input_string_internal. (streamer_read_uhwi): Rename from lto_input_uleb128. (streamer_read_hwi): Rename from lto_input_sleb128. (streamer_write_hwi_in_range): Rename from lto_output_int_in_range. (streamer_read_hwi_in_range): Rename from lto_input_int_in_range. (streamer_write_enum): Rename from lto_output_enum. (streamer_read_enum): Rename from lto_input_enum. (streamer_write_record_start): Rename from output_record_start. (streamer_read_record_start): Rename from input_record_start. (streamer_write_bitpack): Rename from lto_output_bitpack. (streamer_read_bitpack): Rename from lto_input_bitpack. (streamer_write_char_stream): Rename from lto_output_1_stream. (streamer_read_uchar): Rename from lto_input_1_unsigned. * tree-streamer.h (streamer_cache_d): Rename from lto_streamer_cache_d. (streamer_handle_as_builtin_p): Rename from lto_stream_as_builtin_p. (streamer_read_string_cst): Rename from input_string_cst. (streamer_read_chain): Rename from lto_input_chain. (streamer_alloc_tree): Rename from lto_materialize_tree. (streamer_read_tree_body): Rename from lto_input_tree_pointers. (streamer_get_pickled_tree): Rename from lto_get_pickled_tree. (streamer_get_builtin_tree): Rename from lto_get_builtin_tree. (streamer_read_integer_cst): Rename from lto_input_integer_cst. (streamer_read_tree_bitfields): Rename from tree_read_bitfields. (streamer_write_chain): Rename from lto_output_chain. (streamer_write_tree_header): Rename from lto_output_tree_header. (streamer_pack_tree_bitfields): Rename from pack_value_fields. (streamer_write_tree_body): Rename from lto_output_tree_pointers. (streamer_write_integer_cst): Rename from lto_output_integer_cst. (streamer_write_builtin): Rename from lto_output_builtin_tree. (streamer_check_handled_ts_structures): Rename from check_handled_ts_structures. (streamer_tree_cache_insert): Rename from lto_streamer_cache_insert. (streamer_tree_cache_insert_at): Rename from lto_streamer_cache_insert_at. (streamer_tree_cache_append): Rename from lto_streamer_cache_append. (streamer_tree_cache_lookup): Rename from lto_streamer_cache_lookup. (streamer_tree_cache_get): Rename from lto_streamer_cache_get. (streamer_tree_cache_create): Rename from lto_streamer_cache_create. (streamer_tree_cache_delete): Rename from lto_streamer_cache_delete. * tree-streamer-out.c (write_string_cst): Rename from output_string_cst. (write_identifier): Rename from output_identifier. (write_ts_common_tree_pointers): Rename from lto_output_ts_common_tree_pointers. (write_ts_vector_tree_pointers): Rename from lto_output_ts_vector_tree_pointers. (write_ts_complex_tree_pointers): Rename from lto_output_ts_complex_tree_pointers. (write_ts_decl_minimal_tree_pointers): Rename from lto_output_ts_decl_minimal_tree_pointers. (write_ts_decl_common_tree_pointers): Rename from lto_output_ts_decl_common_tree_pointers. (write_ts_decl_non_common_tree_pointers): Rename from lto_output_ts_decl_non_common_tree_pointers. (write_ts_decl_with_vis_tree_pointers): Rename from lto_output_ts_decl_with_vis_tree_pointers. (write_ts_field_decl_tree_pointers): Rename from lto_output_ts_field_decl_tree_pointers. (write_ts_function_decl_tree_pointers): Rename from lto_output_ts_function_decl_tree_pointers. (write_ts_type_common_tree_pointers): Rename from lto_output_ts_type_common_tree_pointers. (write_ts_type_non_common_tree_pointers): Rename from lto_output_ts_type_non_common_tree_pointers. (write_ts_list_tree_pointers): Rename from lto_output_ts_list_tree_pointers. (write_ts_vec_tree_pointers): Rename from lto_output_ts_vec_tree_pointers. (write_ts_exp_tree_pointers): Rename from lto_output_ts_exp_tree_pointers. (write_ts_block_tree_pointers): Rename from lto_output_ts_block_tree_pointers. (write_ts_binfo_tree_pointers): Rename from lto_output_ts_binfo_tree_pointers. (write_ts_constructor_tree_pointers): Rename from lto_output_ts_constructor_tree_pointers. (write_ts_target_option): Rename from lto_output_ts_target_option. (write_ts_translation_unit_decl_tree_pointers): Rename from lto_output_ts_translation_unit_decl_tree_pointers. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Rename from lto_streamer_cache_add_to_node_array. (streamer_tree_cache_insert_1): Rename from lto_streamer_cache_insert_1. (record_common_node): Rename from lto_record_common_node. * streamer-hooks.h (bitpack_d, lto_streamer_cache_d): Remove forward declarations. * data-streamer-in.c (lto_input_widest_uint_uleb128): Remove unused function. * data-streamer-out.c (lto_output_widest_uint_uleb128_stream): Remove unused function. * Makefile.in (lto-section-out.o): Add dependency on DATA_STREAMER_H. (ipa-reference.o): Likewise. * lto-section-out.c: Include data-streamer.h. * ipa-reference.c: Include data-streamer.h. From-SVN: r177704
2011-08-12 18:42:13 +02:00
preload_common_nodes (struct streamer_tree_cache_d *cache)
tree-streamer-out.c (lto_output_ts_decl_with_vis_tree_pointers): Call stream_write_tree instead of output_record_start. * tree-streamer-out.c (lto_output_ts_decl_with_vis_tree_pointers): Call stream_write_tree instead of output_record_start. (lto_output_ts_binfo_tree_pointers): Likewise. * streamer-hooks.h (stream_write_tree): Move from tree-streamer.h. Convert it to a macro. (stream_read_tree): Likewise. * lto-streamer.h (lto_stream_as_builtin_p): Move ... * tree-streamer.h (lto_stream_as_builtin_p): ... here. * lto-streamer-in.c (lto_read_tree): Call lto_streamer_cache_append and tree_read_bitfields. * lto-streamer-out.c (lto_is_streamable): Move from lto-streamer.c (lto_write_tree): Call it. * lto-streamer.c (lto_is_streamable): Move to lto-streamer-out.c * streamer-hooks.h (struct streamer_hooks): Remove fields name, is_streamable and alloc_tree. Update all users. * tree-streamer-in.c (tree_read_bitfields): Factor out of ... (lto_materialize_tree): ... here. Handle CALL_EXPR codes. Remove call to lto_streamer_cache_append. * tree-streamer-out.c (lto_output_tree_header): Handle CALL_EXPR nodes. * tree-streamer.h (tree_read_bitfields): Declare. * Makefile.in (TREE_STREAMER_H): Add STREAMER_HOOKS_H. (gimple-streamer-in.o): Add dependency on TREE_STREAMER_H. * tree-streamer.h (stream_read_tree): New. Replace all calls to lto_input_tree with it. (stream_write_tree): New. Replace all calls to lto_output_tree, lto_output_tree_ref and lto_output_tree_or_ref with it. * lto-streamer-in.c (lto_read_tree): Inline code from lto_streamer_read_tree. (lto_input_tree): Move from tree-streamer-in.c. * lto-streamer-out.c (lto_output_tree_ref): Make static. Remove handling of NULL values for EXPR. Do not handle EXPRs that are not indexable. (lto_write_tree): Move from tree-streamer-out.c. Inline lto_streamer_write_tree. (lto_output_tree): Move from tree-streamer-out.c. If REF_P is true and EXPR is indexable, call lto_output_tree_ref. * lto-streamer.c (lto_record_common_node): Move to tree-streamer.c. (lto_preload_common_nodes): Likewise. Remove assertions and adjustments for nodes main_identifier_node, ptrdiff_type_node and fileptr_type_node. (lto_streamer_hooks_init): Set streamer_hooks.write_tree to lto_output_tree and streamer_hooks.read_tree to lto_input_tree. * lto-streamer.h (lto_input_tree): Declare. (lto_output_tree_ref): Remove. * streamer-hooks.h (struct streamer_hooks): Remove fields preload_common_nodes, indexable_with_decls_p, pack_value_fields, unpack_value_fields, output_tree_header and has_unique_integer_csts_p. Update all users. * tree-streamer-in.c (lto_materialize_tree): Make extern. (lto_input_tree_pointers): Likewise. (lto_read_tree): Move to lto-streamer-in.c. (lto_input_integer_cst): Make extern. (lto_get_pickled_tree): Likewise. (lto_get_builtin_tree): Likewise. (lto_input_tree): Move to lto-streamer-in.c. * tree-streamer-out.c (pack_value_fields): Make extern. (lto_output_tree_or_ref): Remove. Replace all callers with calls to stream_write_tree. (lto_output_builtin_tree): Make extern. (lto_streamer_write_tree): Inline into lto_write_tree. (lto_output_tree_pointers): Make extern. (lto_output_tree_header): Likewise. (lto_output_integer_cst): Likewise. (lto_write_tree): Move to lto-streamer-out.c. (lto_output_tree): Likewise. * tree-streamer.c (lto_record_common_node): Move from lto-streamer.c (preload_common_nodes): Likewise. (lto_streamer_cache_create): Call it. * tree-streamer.h: Include streamer-hooks.h. (stream_write_tree): New. (stream_read_tree): New. (lto_input_tree): Remove. (lto_materialize_tree): Declare. (lto_input_tree_pointers): Declare. (lto_get_pickled_tree): Declare. (lto_get_builtin_tree): Declare. (lto_input_integer_cst): Declare. (lto_output_tree_header): Declare. (pack_value_fields): Declare. (lto_output_tree_pointers): Declare. (lto_output_integer_cst): Declare. (lto_output_builtin_tree): Declare. From-SVN: r177661
2011-08-11 14:02:34 +02:00
{
unsigned i;
for (i = 0; i < itk_none; i++)
/* Skip itk_char. char_type_node is dependent on -f[un]signed-char. */
if (i != itk_char)
data-streamer.h (streamer_write_zero): Rename from output_zero. * data-streamer.h (streamer_write_zero): Rename from output_zero. (streamer_write_uhwi): Rename from lto_output_uleb128. (streamer_write_hwi): Rename from output_sleb128. (streamer_write_string): Rename from lto_output_string. (streamer_string_index): Rename from lto_string_index. (streamer_write_string_with_length): Rename from lto_output_string_with_length. (streamer_write_uhwi_stream): Rename from lto_output_uleb128_stream. (streamer_write_hwi_stream): Rename from lto_output_sleb128_stream. (streamer_read_string): Rename from lto_input_string. (streamer_read_indexed_string): Rename from input_string_internal. (streamer_read_uhwi): Rename from lto_input_uleb128. (streamer_read_hwi): Rename from lto_input_sleb128. (streamer_write_hwi_in_range): Rename from lto_output_int_in_range. (streamer_read_hwi_in_range): Rename from lto_input_int_in_range. (streamer_write_enum): Rename from lto_output_enum. (streamer_read_enum): Rename from lto_input_enum. (streamer_write_record_start): Rename from output_record_start. (streamer_read_record_start): Rename from input_record_start. (streamer_write_bitpack): Rename from lto_output_bitpack. (streamer_read_bitpack): Rename from lto_input_bitpack. (streamer_write_char_stream): Rename from lto_output_1_stream. (streamer_read_uchar): Rename from lto_input_1_unsigned. * tree-streamer.h (streamer_cache_d): Rename from lto_streamer_cache_d. (streamer_handle_as_builtin_p): Rename from lto_stream_as_builtin_p. (streamer_read_string_cst): Rename from input_string_cst. (streamer_read_chain): Rename from lto_input_chain. (streamer_alloc_tree): Rename from lto_materialize_tree. (streamer_read_tree_body): Rename from lto_input_tree_pointers. (streamer_get_pickled_tree): Rename from lto_get_pickled_tree. (streamer_get_builtin_tree): Rename from lto_get_builtin_tree. (streamer_read_integer_cst): Rename from lto_input_integer_cst. (streamer_read_tree_bitfields): Rename from tree_read_bitfields. (streamer_write_chain): Rename from lto_output_chain. (streamer_write_tree_header): Rename from lto_output_tree_header. (streamer_pack_tree_bitfields): Rename from pack_value_fields. (streamer_write_tree_body): Rename from lto_output_tree_pointers. (streamer_write_integer_cst): Rename from lto_output_integer_cst. (streamer_write_builtin): Rename from lto_output_builtin_tree. (streamer_check_handled_ts_structures): Rename from check_handled_ts_structures. (streamer_tree_cache_insert): Rename from lto_streamer_cache_insert. (streamer_tree_cache_insert_at): Rename from lto_streamer_cache_insert_at. (streamer_tree_cache_append): Rename from lto_streamer_cache_append. (streamer_tree_cache_lookup): Rename from lto_streamer_cache_lookup. (streamer_tree_cache_get): Rename from lto_streamer_cache_get. (streamer_tree_cache_create): Rename from lto_streamer_cache_create. (streamer_tree_cache_delete): Rename from lto_streamer_cache_delete. * tree-streamer-out.c (write_string_cst): Rename from output_string_cst. (write_identifier): Rename from output_identifier. (write_ts_common_tree_pointers): Rename from lto_output_ts_common_tree_pointers. (write_ts_vector_tree_pointers): Rename from lto_output_ts_vector_tree_pointers. (write_ts_complex_tree_pointers): Rename from lto_output_ts_complex_tree_pointers. (write_ts_decl_minimal_tree_pointers): Rename from lto_output_ts_decl_minimal_tree_pointers. (write_ts_decl_common_tree_pointers): Rename from lto_output_ts_decl_common_tree_pointers. (write_ts_decl_non_common_tree_pointers): Rename from lto_output_ts_decl_non_common_tree_pointers. (write_ts_decl_with_vis_tree_pointers): Rename from lto_output_ts_decl_with_vis_tree_pointers. (write_ts_field_decl_tree_pointers): Rename from lto_output_ts_field_decl_tree_pointers. (write_ts_function_decl_tree_pointers): Rename from lto_output_ts_function_decl_tree_pointers. (write_ts_type_common_tree_pointers): Rename from lto_output_ts_type_common_tree_pointers. (write_ts_type_non_common_tree_pointers): Rename from lto_output_ts_type_non_common_tree_pointers. (write_ts_list_tree_pointers): Rename from lto_output_ts_list_tree_pointers. (write_ts_vec_tree_pointers): Rename from lto_output_ts_vec_tree_pointers. (write_ts_exp_tree_pointers): Rename from lto_output_ts_exp_tree_pointers. (write_ts_block_tree_pointers): Rename from lto_output_ts_block_tree_pointers. (write_ts_binfo_tree_pointers): Rename from lto_output_ts_binfo_tree_pointers. (write_ts_constructor_tree_pointers): Rename from lto_output_ts_constructor_tree_pointers. (write_ts_target_option): Rename from lto_output_ts_target_option. (write_ts_translation_unit_decl_tree_pointers): Rename from lto_output_ts_translation_unit_decl_tree_pointers. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Rename from lto_streamer_cache_add_to_node_array. (streamer_tree_cache_insert_1): Rename from lto_streamer_cache_insert_1. (record_common_node): Rename from lto_record_common_node. * streamer-hooks.h (bitpack_d, lto_streamer_cache_d): Remove forward declarations. * data-streamer-in.c (lto_input_widest_uint_uleb128): Remove unused function. * data-streamer-out.c (lto_output_widest_uint_uleb128_stream): Remove unused function. * Makefile.in (lto-section-out.o): Add dependency on DATA_STREAMER_H. (ipa-reference.o): Likewise. * lto-section-out.c: Include data-streamer.h. * ipa-reference.c: Include data-streamer.h. From-SVN: r177704
2011-08-12 18:42:13 +02:00
record_common_node (cache, integer_types[i]);
tree-streamer-out.c (lto_output_ts_decl_with_vis_tree_pointers): Call stream_write_tree instead of output_record_start. * tree-streamer-out.c (lto_output_ts_decl_with_vis_tree_pointers): Call stream_write_tree instead of output_record_start. (lto_output_ts_binfo_tree_pointers): Likewise. * streamer-hooks.h (stream_write_tree): Move from tree-streamer.h. Convert it to a macro. (stream_read_tree): Likewise. * lto-streamer.h (lto_stream_as_builtin_p): Move ... * tree-streamer.h (lto_stream_as_builtin_p): ... here. * lto-streamer-in.c (lto_read_tree): Call lto_streamer_cache_append and tree_read_bitfields. * lto-streamer-out.c (lto_is_streamable): Move from lto-streamer.c (lto_write_tree): Call it. * lto-streamer.c (lto_is_streamable): Move to lto-streamer-out.c * streamer-hooks.h (struct streamer_hooks): Remove fields name, is_streamable and alloc_tree. Update all users. * tree-streamer-in.c (tree_read_bitfields): Factor out of ... (lto_materialize_tree): ... here. Handle CALL_EXPR codes. Remove call to lto_streamer_cache_append. * tree-streamer-out.c (lto_output_tree_header): Handle CALL_EXPR nodes. * tree-streamer.h (tree_read_bitfields): Declare. * Makefile.in (TREE_STREAMER_H): Add STREAMER_HOOKS_H. (gimple-streamer-in.o): Add dependency on TREE_STREAMER_H. * tree-streamer.h (stream_read_tree): New. Replace all calls to lto_input_tree with it. (stream_write_tree): New. Replace all calls to lto_output_tree, lto_output_tree_ref and lto_output_tree_or_ref with it. * lto-streamer-in.c (lto_read_tree): Inline code from lto_streamer_read_tree. (lto_input_tree): Move from tree-streamer-in.c. * lto-streamer-out.c (lto_output_tree_ref): Make static. Remove handling of NULL values for EXPR. Do not handle EXPRs that are not indexable. (lto_write_tree): Move from tree-streamer-out.c. Inline lto_streamer_write_tree. (lto_output_tree): Move from tree-streamer-out.c. If REF_P is true and EXPR is indexable, call lto_output_tree_ref. * lto-streamer.c (lto_record_common_node): Move to tree-streamer.c. (lto_preload_common_nodes): Likewise. Remove assertions and adjustments for nodes main_identifier_node, ptrdiff_type_node and fileptr_type_node. (lto_streamer_hooks_init): Set streamer_hooks.write_tree to lto_output_tree and streamer_hooks.read_tree to lto_input_tree. * lto-streamer.h (lto_input_tree): Declare. (lto_output_tree_ref): Remove. * streamer-hooks.h (struct streamer_hooks): Remove fields preload_common_nodes, indexable_with_decls_p, pack_value_fields, unpack_value_fields, output_tree_header and has_unique_integer_csts_p. Update all users. * tree-streamer-in.c (lto_materialize_tree): Make extern. (lto_input_tree_pointers): Likewise. (lto_read_tree): Move to lto-streamer-in.c. (lto_input_integer_cst): Make extern. (lto_get_pickled_tree): Likewise. (lto_get_builtin_tree): Likewise. (lto_input_tree): Move to lto-streamer-in.c. * tree-streamer-out.c (pack_value_fields): Make extern. (lto_output_tree_or_ref): Remove. Replace all callers with calls to stream_write_tree. (lto_output_builtin_tree): Make extern. (lto_streamer_write_tree): Inline into lto_write_tree. (lto_output_tree_pointers): Make extern. (lto_output_tree_header): Likewise. (lto_output_integer_cst): Likewise. (lto_write_tree): Move to lto-streamer-out.c. (lto_output_tree): Likewise. * tree-streamer.c (lto_record_common_node): Move from lto-streamer.c (preload_common_nodes): Likewise. (lto_streamer_cache_create): Call it. * tree-streamer.h: Include streamer-hooks.h. (stream_write_tree): New. (stream_read_tree): New. (lto_input_tree): Remove. (lto_materialize_tree): Declare. (lto_input_tree_pointers): Declare. (lto_get_pickled_tree): Declare. (lto_get_builtin_tree): Declare. (lto_input_integer_cst): Declare. (lto_output_tree_header): Declare. (pack_value_fields): Declare. (lto_output_tree_pointers): Declare. (lto_output_integer_cst): Declare. (lto_output_builtin_tree): Declare. From-SVN: r177661
2011-08-11 14:02:34 +02:00
for (i = 0; i < stk_type_kind_last; i++)
data-streamer.h (streamer_write_zero): Rename from output_zero. * data-streamer.h (streamer_write_zero): Rename from output_zero. (streamer_write_uhwi): Rename from lto_output_uleb128. (streamer_write_hwi): Rename from output_sleb128. (streamer_write_string): Rename from lto_output_string. (streamer_string_index): Rename from lto_string_index. (streamer_write_string_with_length): Rename from lto_output_string_with_length. (streamer_write_uhwi_stream): Rename from lto_output_uleb128_stream. (streamer_write_hwi_stream): Rename from lto_output_sleb128_stream. (streamer_read_string): Rename from lto_input_string. (streamer_read_indexed_string): Rename from input_string_internal. (streamer_read_uhwi): Rename from lto_input_uleb128. (streamer_read_hwi): Rename from lto_input_sleb128. (streamer_write_hwi_in_range): Rename from lto_output_int_in_range. (streamer_read_hwi_in_range): Rename from lto_input_int_in_range. (streamer_write_enum): Rename from lto_output_enum. (streamer_read_enum): Rename from lto_input_enum. (streamer_write_record_start): Rename from output_record_start. (streamer_read_record_start): Rename from input_record_start. (streamer_write_bitpack): Rename from lto_output_bitpack. (streamer_read_bitpack): Rename from lto_input_bitpack. (streamer_write_char_stream): Rename from lto_output_1_stream. (streamer_read_uchar): Rename from lto_input_1_unsigned. * tree-streamer.h (streamer_cache_d): Rename from lto_streamer_cache_d. (streamer_handle_as_builtin_p): Rename from lto_stream_as_builtin_p. (streamer_read_string_cst): Rename from input_string_cst. (streamer_read_chain): Rename from lto_input_chain. (streamer_alloc_tree): Rename from lto_materialize_tree. (streamer_read_tree_body): Rename from lto_input_tree_pointers. (streamer_get_pickled_tree): Rename from lto_get_pickled_tree. (streamer_get_builtin_tree): Rename from lto_get_builtin_tree. (streamer_read_integer_cst): Rename from lto_input_integer_cst. (streamer_read_tree_bitfields): Rename from tree_read_bitfields. (streamer_write_chain): Rename from lto_output_chain. (streamer_write_tree_header): Rename from lto_output_tree_header. (streamer_pack_tree_bitfields): Rename from pack_value_fields. (streamer_write_tree_body): Rename from lto_output_tree_pointers. (streamer_write_integer_cst): Rename from lto_output_integer_cst. (streamer_write_builtin): Rename from lto_output_builtin_tree. (streamer_check_handled_ts_structures): Rename from check_handled_ts_structures. (streamer_tree_cache_insert): Rename from lto_streamer_cache_insert. (streamer_tree_cache_insert_at): Rename from lto_streamer_cache_insert_at. (streamer_tree_cache_append): Rename from lto_streamer_cache_append. (streamer_tree_cache_lookup): Rename from lto_streamer_cache_lookup. (streamer_tree_cache_get): Rename from lto_streamer_cache_get. (streamer_tree_cache_create): Rename from lto_streamer_cache_create. (streamer_tree_cache_delete): Rename from lto_streamer_cache_delete. * tree-streamer-out.c (write_string_cst): Rename from output_string_cst. (write_identifier): Rename from output_identifier. (write_ts_common_tree_pointers): Rename from lto_output_ts_common_tree_pointers. (write_ts_vector_tree_pointers): Rename from lto_output_ts_vector_tree_pointers. (write_ts_complex_tree_pointers): Rename from lto_output_ts_complex_tree_pointers. (write_ts_decl_minimal_tree_pointers): Rename from lto_output_ts_decl_minimal_tree_pointers. (write_ts_decl_common_tree_pointers): Rename from lto_output_ts_decl_common_tree_pointers. (write_ts_decl_non_common_tree_pointers): Rename from lto_output_ts_decl_non_common_tree_pointers. (write_ts_decl_with_vis_tree_pointers): Rename from lto_output_ts_decl_with_vis_tree_pointers. (write_ts_field_decl_tree_pointers): Rename from lto_output_ts_field_decl_tree_pointers. (write_ts_function_decl_tree_pointers): Rename from lto_output_ts_function_decl_tree_pointers. (write_ts_type_common_tree_pointers): Rename from lto_output_ts_type_common_tree_pointers. (write_ts_type_non_common_tree_pointers): Rename from lto_output_ts_type_non_common_tree_pointers. (write_ts_list_tree_pointers): Rename from lto_output_ts_list_tree_pointers. (write_ts_vec_tree_pointers): Rename from lto_output_ts_vec_tree_pointers. (write_ts_exp_tree_pointers): Rename from lto_output_ts_exp_tree_pointers. (write_ts_block_tree_pointers): Rename from lto_output_ts_block_tree_pointers. (write_ts_binfo_tree_pointers): Rename from lto_output_ts_binfo_tree_pointers. (write_ts_constructor_tree_pointers): Rename from lto_output_ts_constructor_tree_pointers. (write_ts_target_option): Rename from lto_output_ts_target_option. (write_ts_translation_unit_decl_tree_pointers): Rename from lto_output_ts_translation_unit_decl_tree_pointers. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Rename from lto_streamer_cache_add_to_node_array. (streamer_tree_cache_insert_1): Rename from lto_streamer_cache_insert_1. (record_common_node): Rename from lto_record_common_node. * streamer-hooks.h (bitpack_d, lto_streamer_cache_d): Remove forward declarations. * data-streamer-in.c (lto_input_widest_uint_uleb128): Remove unused function. * data-streamer-out.c (lto_output_widest_uint_uleb128_stream): Remove unused function. * Makefile.in (lto-section-out.o): Add dependency on DATA_STREAMER_H. (ipa-reference.o): Likewise. * lto-section-out.c: Include data-streamer.h. * ipa-reference.c: Include data-streamer.h. From-SVN: r177704
2011-08-12 18:42:13 +02:00
record_common_node (cache, sizetype_tab[i]);
tree-streamer-out.c (lto_output_ts_decl_with_vis_tree_pointers): Call stream_write_tree instead of output_record_start. * tree-streamer-out.c (lto_output_ts_decl_with_vis_tree_pointers): Call stream_write_tree instead of output_record_start. (lto_output_ts_binfo_tree_pointers): Likewise. * streamer-hooks.h (stream_write_tree): Move from tree-streamer.h. Convert it to a macro. (stream_read_tree): Likewise. * lto-streamer.h (lto_stream_as_builtin_p): Move ... * tree-streamer.h (lto_stream_as_builtin_p): ... here. * lto-streamer-in.c (lto_read_tree): Call lto_streamer_cache_append and tree_read_bitfields. * lto-streamer-out.c (lto_is_streamable): Move from lto-streamer.c (lto_write_tree): Call it. * lto-streamer.c (lto_is_streamable): Move to lto-streamer-out.c * streamer-hooks.h (struct streamer_hooks): Remove fields name, is_streamable and alloc_tree. Update all users. * tree-streamer-in.c (tree_read_bitfields): Factor out of ... (lto_materialize_tree): ... here. Handle CALL_EXPR codes. Remove call to lto_streamer_cache_append. * tree-streamer-out.c (lto_output_tree_header): Handle CALL_EXPR nodes. * tree-streamer.h (tree_read_bitfields): Declare. * Makefile.in (TREE_STREAMER_H): Add STREAMER_HOOKS_H. (gimple-streamer-in.o): Add dependency on TREE_STREAMER_H. * tree-streamer.h (stream_read_tree): New. Replace all calls to lto_input_tree with it. (stream_write_tree): New. Replace all calls to lto_output_tree, lto_output_tree_ref and lto_output_tree_or_ref with it. * lto-streamer-in.c (lto_read_tree): Inline code from lto_streamer_read_tree. (lto_input_tree): Move from tree-streamer-in.c. * lto-streamer-out.c (lto_output_tree_ref): Make static. Remove handling of NULL values for EXPR. Do not handle EXPRs that are not indexable. (lto_write_tree): Move from tree-streamer-out.c. Inline lto_streamer_write_tree. (lto_output_tree): Move from tree-streamer-out.c. If REF_P is true and EXPR is indexable, call lto_output_tree_ref. * lto-streamer.c (lto_record_common_node): Move to tree-streamer.c. (lto_preload_common_nodes): Likewise. Remove assertions and adjustments for nodes main_identifier_node, ptrdiff_type_node and fileptr_type_node. (lto_streamer_hooks_init): Set streamer_hooks.write_tree to lto_output_tree and streamer_hooks.read_tree to lto_input_tree. * lto-streamer.h (lto_input_tree): Declare. (lto_output_tree_ref): Remove. * streamer-hooks.h (struct streamer_hooks): Remove fields preload_common_nodes, indexable_with_decls_p, pack_value_fields, unpack_value_fields, output_tree_header and has_unique_integer_csts_p. Update all users. * tree-streamer-in.c (lto_materialize_tree): Make extern. (lto_input_tree_pointers): Likewise. (lto_read_tree): Move to lto-streamer-in.c. (lto_input_integer_cst): Make extern. (lto_get_pickled_tree): Likewise. (lto_get_builtin_tree): Likewise. (lto_input_tree): Move to lto-streamer-in.c. * tree-streamer-out.c (pack_value_fields): Make extern. (lto_output_tree_or_ref): Remove. Replace all callers with calls to stream_write_tree. (lto_output_builtin_tree): Make extern. (lto_streamer_write_tree): Inline into lto_write_tree. (lto_output_tree_pointers): Make extern. (lto_output_tree_header): Likewise. (lto_output_integer_cst): Likewise. (lto_write_tree): Move to lto-streamer-out.c. (lto_output_tree): Likewise. * tree-streamer.c (lto_record_common_node): Move from lto-streamer.c (preload_common_nodes): Likewise. (lto_streamer_cache_create): Call it. * tree-streamer.h: Include streamer-hooks.h. (stream_write_tree): New. (stream_read_tree): New. (lto_input_tree): Remove. (lto_materialize_tree): Declare. (lto_input_tree_pointers): Declare. (lto_get_pickled_tree): Declare. (lto_get_builtin_tree): Declare. (lto_input_integer_cst): Declare. (lto_output_tree_header): Declare. (pack_value_fields): Declare. (lto_output_tree_pointers): Declare. (lto_output_integer_cst): Declare. (lto_output_builtin_tree): Declare. From-SVN: r177661
2011-08-11 14:02:34 +02:00
for (i = 0; i < TI_MAX; i++)
/* Skip boolean type and constants, they are frontend dependent. */
tree-streamer-out.c (lto_output_ts_decl_with_vis_tree_pointers): Call stream_write_tree instead of output_record_start. * tree-streamer-out.c (lto_output_ts_decl_with_vis_tree_pointers): Call stream_write_tree instead of output_record_start. (lto_output_ts_binfo_tree_pointers): Likewise. * streamer-hooks.h (stream_write_tree): Move from tree-streamer.h. Convert it to a macro. (stream_read_tree): Likewise. * lto-streamer.h (lto_stream_as_builtin_p): Move ... * tree-streamer.h (lto_stream_as_builtin_p): ... here. * lto-streamer-in.c (lto_read_tree): Call lto_streamer_cache_append and tree_read_bitfields. * lto-streamer-out.c (lto_is_streamable): Move from lto-streamer.c (lto_write_tree): Call it. * lto-streamer.c (lto_is_streamable): Move to lto-streamer-out.c * streamer-hooks.h (struct streamer_hooks): Remove fields name, is_streamable and alloc_tree. Update all users. * tree-streamer-in.c (tree_read_bitfields): Factor out of ... (lto_materialize_tree): ... here. Handle CALL_EXPR codes. Remove call to lto_streamer_cache_append. * tree-streamer-out.c (lto_output_tree_header): Handle CALL_EXPR nodes. * tree-streamer.h (tree_read_bitfields): Declare. * Makefile.in (TREE_STREAMER_H): Add STREAMER_HOOKS_H. (gimple-streamer-in.o): Add dependency on TREE_STREAMER_H. * tree-streamer.h (stream_read_tree): New. Replace all calls to lto_input_tree with it. (stream_write_tree): New. Replace all calls to lto_output_tree, lto_output_tree_ref and lto_output_tree_or_ref with it. * lto-streamer-in.c (lto_read_tree): Inline code from lto_streamer_read_tree. (lto_input_tree): Move from tree-streamer-in.c. * lto-streamer-out.c (lto_output_tree_ref): Make static. Remove handling of NULL values for EXPR. Do not handle EXPRs that are not indexable. (lto_write_tree): Move from tree-streamer-out.c. Inline lto_streamer_write_tree. (lto_output_tree): Move from tree-streamer-out.c. If REF_P is true and EXPR is indexable, call lto_output_tree_ref. * lto-streamer.c (lto_record_common_node): Move to tree-streamer.c. (lto_preload_common_nodes): Likewise. Remove assertions and adjustments for nodes main_identifier_node, ptrdiff_type_node and fileptr_type_node. (lto_streamer_hooks_init): Set streamer_hooks.write_tree to lto_output_tree and streamer_hooks.read_tree to lto_input_tree. * lto-streamer.h (lto_input_tree): Declare. (lto_output_tree_ref): Remove. * streamer-hooks.h (struct streamer_hooks): Remove fields preload_common_nodes, indexable_with_decls_p, pack_value_fields, unpack_value_fields, output_tree_header and has_unique_integer_csts_p. Update all users. * tree-streamer-in.c (lto_materialize_tree): Make extern. (lto_input_tree_pointers): Likewise. (lto_read_tree): Move to lto-streamer-in.c. (lto_input_integer_cst): Make extern. (lto_get_pickled_tree): Likewise. (lto_get_builtin_tree): Likewise. (lto_input_tree): Move to lto-streamer-in.c. * tree-streamer-out.c (pack_value_fields): Make extern. (lto_output_tree_or_ref): Remove. Replace all callers with calls to stream_write_tree. (lto_output_builtin_tree): Make extern. (lto_streamer_write_tree): Inline into lto_write_tree. (lto_output_tree_pointers): Make extern. (lto_output_tree_header): Likewise. (lto_output_integer_cst): Likewise. (lto_write_tree): Move to lto-streamer-out.c. (lto_output_tree): Likewise. * tree-streamer.c (lto_record_common_node): Move from lto-streamer.c (preload_common_nodes): Likewise. (lto_streamer_cache_create): Call it. * tree-streamer.h: Include streamer-hooks.h. (stream_write_tree): New. (stream_read_tree): New. (lto_input_tree): Remove. (lto_materialize_tree): Declare. (lto_input_tree_pointers): Declare. (lto_get_pickled_tree): Declare. (lto_get_builtin_tree): Declare. (lto_input_integer_cst): Declare. (lto_output_tree_header): Declare. (pack_value_fields): Declare. (lto_output_tree_pointers): Declare. (lto_output_integer_cst): Declare. (lto_output_builtin_tree): Declare. From-SVN: r177661
2011-08-11 14:02:34 +02:00
if (i != TI_BOOLEAN_TYPE
&& i != TI_BOOLEAN_FALSE
&& i != TI_BOOLEAN_TRUE
/* MAIN_IDENTIFIER is not always initialized by Fortran FE. */
&& i != TI_MAIN_IDENTIFIER
/* PID_TYPE is initialized only by C family front-ends. */
&& i != TI_PID_TYPE
/* Skip optimization and target option nodes; they depend on flags. */
&& i != TI_OPTIMIZATION_DEFAULT
&& i != TI_OPTIMIZATION_CURRENT
&& i != TI_TARGET_OPTION_DEFAULT
&& i != TI_TARGET_OPTION_CURRENT
&& i != TI_CURRENT_TARGET_PRAGMA
&& i != TI_CURRENT_OPTIMIZE_PRAGMA
/* Skip va_list* related nodes if offloading. For native LTO
we want them to be merged for the stdarg pass, for offloading
they might not be identical between host and offloading target. */
&& (!lto_stream_offload_p
|| (i != TI_VA_LIST_TYPE
&& i != TI_VA_LIST_GPR_COUNTER_FIELD
&& i != TI_VA_LIST_FPR_COUNTER_FIELD)))
data-streamer.h (streamer_write_zero): Rename from output_zero. * data-streamer.h (streamer_write_zero): Rename from output_zero. (streamer_write_uhwi): Rename from lto_output_uleb128. (streamer_write_hwi): Rename from output_sleb128. (streamer_write_string): Rename from lto_output_string. (streamer_string_index): Rename from lto_string_index. (streamer_write_string_with_length): Rename from lto_output_string_with_length. (streamer_write_uhwi_stream): Rename from lto_output_uleb128_stream. (streamer_write_hwi_stream): Rename from lto_output_sleb128_stream. (streamer_read_string): Rename from lto_input_string. (streamer_read_indexed_string): Rename from input_string_internal. (streamer_read_uhwi): Rename from lto_input_uleb128. (streamer_read_hwi): Rename from lto_input_sleb128. (streamer_write_hwi_in_range): Rename from lto_output_int_in_range. (streamer_read_hwi_in_range): Rename from lto_input_int_in_range. (streamer_write_enum): Rename from lto_output_enum. (streamer_read_enum): Rename from lto_input_enum. (streamer_write_record_start): Rename from output_record_start. (streamer_read_record_start): Rename from input_record_start. (streamer_write_bitpack): Rename from lto_output_bitpack. (streamer_read_bitpack): Rename from lto_input_bitpack. (streamer_write_char_stream): Rename from lto_output_1_stream. (streamer_read_uchar): Rename from lto_input_1_unsigned. * tree-streamer.h (streamer_cache_d): Rename from lto_streamer_cache_d. (streamer_handle_as_builtin_p): Rename from lto_stream_as_builtin_p. (streamer_read_string_cst): Rename from input_string_cst. (streamer_read_chain): Rename from lto_input_chain. (streamer_alloc_tree): Rename from lto_materialize_tree. (streamer_read_tree_body): Rename from lto_input_tree_pointers. (streamer_get_pickled_tree): Rename from lto_get_pickled_tree. (streamer_get_builtin_tree): Rename from lto_get_builtin_tree. (streamer_read_integer_cst): Rename from lto_input_integer_cst. (streamer_read_tree_bitfields): Rename from tree_read_bitfields. (streamer_write_chain): Rename from lto_output_chain. (streamer_write_tree_header): Rename from lto_output_tree_header. (streamer_pack_tree_bitfields): Rename from pack_value_fields. (streamer_write_tree_body): Rename from lto_output_tree_pointers. (streamer_write_integer_cst): Rename from lto_output_integer_cst. (streamer_write_builtin): Rename from lto_output_builtin_tree. (streamer_check_handled_ts_structures): Rename from check_handled_ts_structures. (streamer_tree_cache_insert): Rename from lto_streamer_cache_insert. (streamer_tree_cache_insert_at): Rename from lto_streamer_cache_insert_at. (streamer_tree_cache_append): Rename from lto_streamer_cache_append. (streamer_tree_cache_lookup): Rename from lto_streamer_cache_lookup. (streamer_tree_cache_get): Rename from lto_streamer_cache_get. (streamer_tree_cache_create): Rename from lto_streamer_cache_create. (streamer_tree_cache_delete): Rename from lto_streamer_cache_delete. * tree-streamer-out.c (write_string_cst): Rename from output_string_cst. (write_identifier): Rename from output_identifier. (write_ts_common_tree_pointers): Rename from lto_output_ts_common_tree_pointers. (write_ts_vector_tree_pointers): Rename from lto_output_ts_vector_tree_pointers. (write_ts_complex_tree_pointers): Rename from lto_output_ts_complex_tree_pointers. (write_ts_decl_minimal_tree_pointers): Rename from lto_output_ts_decl_minimal_tree_pointers. (write_ts_decl_common_tree_pointers): Rename from lto_output_ts_decl_common_tree_pointers. (write_ts_decl_non_common_tree_pointers): Rename from lto_output_ts_decl_non_common_tree_pointers. (write_ts_decl_with_vis_tree_pointers): Rename from lto_output_ts_decl_with_vis_tree_pointers. (write_ts_field_decl_tree_pointers): Rename from lto_output_ts_field_decl_tree_pointers. (write_ts_function_decl_tree_pointers): Rename from lto_output_ts_function_decl_tree_pointers. (write_ts_type_common_tree_pointers): Rename from lto_output_ts_type_common_tree_pointers. (write_ts_type_non_common_tree_pointers): Rename from lto_output_ts_type_non_common_tree_pointers. (write_ts_list_tree_pointers): Rename from lto_output_ts_list_tree_pointers. (write_ts_vec_tree_pointers): Rename from lto_output_ts_vec_tree_pointers. (write_ts_exp_tree_pointers): Rename from lto_output_ts_exp_tree_pointers. (write_ts_block_tree_pointers): Rename from lto_output_ts_block_tree_pointers. (write_ts_binfo_tree_pointers): Rename from lto_output_ts_binfo_tree_pointers. (write_ts_constructor_tree_pointers): Rename from lto_output_ts_constructor_tree_pointers. (write_ts_target_option): Rename from lto_output_ts_target_option. (write_ts_translation_unit_decl_tree_pointers): Rename from lto_output_ts_translation_unit_decl_tree_pointers. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Rename from lto_streamer_cache_add_to_node_array. (streamer_tree_cache_insert_1): Rename from lto_streamer_cache_insert_1. (record_common_node): Rename from lto_record_common_node. * streamer-hooks.h (bitpack_d, lto_streamer_cache_d): Remove forward declarations. * data-streamer-in.c (lto_input_widest_uint_uleb128): Remove unused function. * data-streamer-out.c (lto_output_widest_uint_uleb128_stream): Remove unused function. * Makefile.in (lto-section-out.o): Add dependency on DATA_STREAMER_H. (ipa-reference.o): Likewise. * lto-section-out.c: Include data-streamer.h. * ipa-reference.c: Include data-streamer.h. From-SVN: r177704
2011-08-12 18:42:13 +02:00
record_common_node (cache, global_trees[i]);
tree-streamer-out.c (lto_output_ts_decl_with_vis_tree_pointers): Call stream_write_tree instead of output_record_start. * tree-streamer-out.c (lto_output_ts_decl_with_vis_tree_pointers): Call stream_write_tree instead of output_record_start. (lto_output_ts_binfo_tree_pointers): Likewise. * streamer-hooks.h (stream_write_tree): Move from tree-streamer.h. Convert it to a macro. (stream_read_tree): Likewise. * lto-streamer.h (lto_stream_as_builtin_p): Move ... * tree-streamer.h (lto_stream_as_builtin_p): ... here. * lto-streamer-in.c (lto_read_tree): Call lto_streamer_cache_append and tree_read_bitfields. * lto-streamer-out.c (lto_is_streamable): Move from lto-streamer.c (lto_write_tree): Call it. * lto-streamer.c (lto_is_streamable): Move to lto-streamer-out.c * streamer-hooks.h (struct streamer_hooks): Remove fields name, is_streamable and alloc_tree. Update all users. * tree-streamer-in.c (tree_read_bitfields): Factor out of ... (lto_materialize_tree): ... here. Handle CALL_EXPR codes. Remove call to lto_streamer_cache_append. * tree-streamer-out.c (lto_output_tree_header): Handle CALL_EXPR nodes. * tree-streamer.h (tree_read_bitfields): Declare. * Makefile.in (TREE_STREAMER_H): Add STREAMER_HOOKS_H. (gimple-streamer-in.o): Add dependency on TREE_STREAMER_H. * tree-streamer.h (stream_read_tree): New. Replace all calls to lto_input_tree with it. (stream_write_tree): New. Replace all calls to lto_output_tree, lto_output_tree_ref and lto_output_tree_or_ref with it. * lto-streamer-in.c (lto_read_tree): Inline code from lto_streamer_read_tree. (lto_input_tree): Move from tree-streamer-in.c. * lto-streamer-out.c (lto_output_tree_ref): Make static. Remove handling of NULL values for EXPR. Do not handle EXPRs that are not indexable. (lto_write_tree): Move from tree-streamer-out.c. Inline lto_streamer_write_tree. (lto_output_tree): Move from tree-streamer-out.c. If REF_P is true and EXPR is indexable, call lto_output_tree_ref. * lto-streamer.c (lto_record_common_node): Move to tree-streamer.c. (lto_preload_common_nodes): Likewise. Remove assertions and adjustments for nodes main_identifier_node, ptrdiff_type_node and fileptr_type_node. (lto_streamer_hooks_init): Set streamer_hooks.write_tree to lto_output_tree and streamer_hooks.read_tree to lto_input_tree. * lto-streamer.h (lto_input_tree): Declare. (lto_output_tree_ref): Remove. * streamer-hooks.h (struct streamer_hooks): Remove fields preload_common_nodes, indexable_with_decls_p, pack_value_fields, unpack_value_fields, output_tree_header and has_unique_integer_csts_p. Update all users. * tree-streamer-in.c (lto_materialize_tree): Make extern. (lto_input_tree_pointers): Likewise. (lto_read_tree): Move to lto-streamer-in.c. (lto_input_integer_cst): Make extern. (lto_get_pickled_tree): Likewise. (lto_get_builtin_tree): Likewise. (lto_input_tree): Move to lto-streamer-in.c. * tree-streamer-out.c (pack_value_fields): Make extern. (lto_output_tree_or_ref): Remove. Replace all callers with calls to stream_write_tree. (lto_output_builtin_tree): Make extern. (lto_streamer_write_tree): Inline into lto_write_tree. (lto_output_tree_pointers): Make extern. (lto_output_tree_header): Likewise. (lto_output_integer_cst): Likewise. (lto_write_tree): Move to lto-streamer-out.c. (lto_output_tree): Likewise. * tree-streamer.c (lto_record_common_node): Move from lto-streamer.c (preload_common_nodes): Likewise. (lto_streamer_cache_create): Call it. * tree-streamer.h: Include streamer-hooks.h. (stream_write_tree): New. (stream_read_tree): New. (lto_input_tree): Remove. (lto_materialize_tree): Declare. (lto_input_tree_pointers): Declare. (lto_get_pickled_tree): Declare. (lto_get_builtin_tree): Declare. (lto_input_integer_cst): Declare. (lto_output_tree_header): Declare. (pack_value_fields): Declare. (lto_output_tree_pointers): Declare. (lto_output_integer_cst): Declare. (lto_output_builtin_tree): Declare. From-SVN: r177661
2011-08-11 14:02:34 +02:00
}
2011-08-08 18:49:34 +02:00
/* Create a cache of pickled nodes. */
data-streamer.h (streamer_write_zero): Rename from output_zero. * data-streamer.h (streamer_write_zero): Rename from output_zero. (streamer_write_uhwi): Rename from lto_output_uleb128. (streamer_write_hwi): Rename from output_sleb128. (streamer_write_string): Rename from lto_output_string. (streamer_string_index): Rename from lto_string_index. (streamer_write_string_with_length): Rename from lto_output_string_with_length. (streamer_write_uhwi_stream): Rename from lto_output_uleb128_stream. (streamer_write_hwi_stream): Rename from lto_output_sleb128_stream. (streamer_read_string): Rename from lto_input_string. (streamer_read_indexed_string): Rename from input_string_internal. (streamer_read_uhwi): Rename from lto_input_uleb128. (streamer_read_hwi): Rename from lto_input_sleb128. (streamer_write_hwi_in_range): Rename from lto_output_int_in_range. (streamer_read_hwi_in_range): Rename from lto_input_int_in_range. (streamer_write_enum): Rename from lto_output_enum. (streamer_read_enum): Rename from lto_input_enum. (streamer_write_record_start): Rename from output_record_start. (streamer_read_record_start): Rename from input_record_start. (streamer_write_bitpack): Rename from lto_output_bitpack. (streamer_read_bitpack): Rename from lto_input_bitpack. (streamer_write_char_stream): Rename from lto_output_1_stream. (streamer_read_uchar): Rename from lto_input_1_unsigned. * tree-streamer.h (streamer_cache_d): Rename from lto_streamer_cache_d. (streamer_handle_as_builtin_p): Rename from lto_stream_as_builtin_p. (streamer_read_string_cst): Rename from input_string_cst. (streamer_read_chain): Rename from lto_input_chain. (streamer_alloc_tree): Rename from lto_materialize_tree. (streamer_read_tree_body): Rename from lto_input_tree_pointers. (streamer_get_pickled_tree): Rename from lto_get_pickled_tree. (streamer_get_builtin_tree): Rename from lto_get_builtin_tree. (streamer_read_integer_cst): Rename from lto_input_integer_cst. (streamer_read_tree_bitfields): Rename from tree_read_bitfields. (streamer_write_chain): Rename from lto_output_chain. (streamer_write_tree_header): Rename from lto_output_tree_header. (streamer_pack_tree_bitfields): Rename from pack_value_fields. (streamer_write_tree_body): Rename from lto_output_tree_pointers. (streamer_write_integer_cst): Rename from lto_output_integer_cst. (streamer_write_builtin): Rename from lto_output_builtin_tree. (streamer_check_handled_ts_structures): Rename from check_handled_ts_structures. (streamer_tree_cache_insert): Rename from lto_streamer_cache_insert. (streamer_tree_cache_insert_at): Rename from lto_streamer_cache_insert_at. (streamer_tree_cache_append): Rename from lto_streamer_cache_append. (streamer_tree_cache_lookup): Rename from lto_streamer_cache_lookup. (streamer_tree_cache_get): Rename from lto_streamer_cache_get. (streamer_tree_cache_create): Rename from lto_streamer_cache_create. (streamer_tree_cache_delete): Rename from lto_streamer_cache_delete. * tree-streamer-out.c (write_string_cst): Rename from output_string_cst. (write_identifier): Rename from output_identifier. (write_ts_common_tree_pointers): Rename from lto_output_ts_common_tree_pointers. (write_ts_vector_tree_pointers): Rename from lto_output_ts_vector_tree_pointers. (write_ts_complex_tree_pointers): Rename from lto_output_ts_complex_tree_pointers. (write_ts_decl_minimal_tree_pointers): Rename from lto_output_ts_decl_minimal_tree_pointers. (write_ts_decl_common_tree_pointers): Rename from lto_output_ts_decl_common_tree_pointers. (write_ts_decl_non_common_tree_pointers): Rename from lto_output_ts_decl_non_common_tree_pointers. (write_ts_decl_with_vis_tree_pointers): Rename from lto_output_ts_decl_with_vis_tree_pointers. (write_ts_field_decl_tree_pointers): Rename from lto_output_ts_field_decl_tree_pointers. (write_ts_function_decl_tree_pointers): Rename from lto_output_ts_function_decl_tree_pointers. (write_ts_type_common_tree_pointers): Rename from lto_output_ts_type_common_tree_pointers. (write_ts_type_non_common_tree_pointers): Rename from lto_output_ts_type_non_common_tree_pointers. (write_ts_list_tree_pointers): Rename from lto_output_ts_list_tree_pointers. (write_ts_vec_tree_pointers): Rename from lto_output_ts_vec_tree_pointers. (write_ts_exp_tree_pointers): Rename from lto_output_ts_exp_tree_pointers. (write_ts_block_tree_pointers): Rename from lto_output_ts_block_tree_pointers. (write_ts_binfo_tree_pointers): Rename from lto_output_ts_binfo_tree_pointers. (write_ts_constructor_tree_pointers): Rename from lto_output_ts_constructor_tree_pointers. (write_ts_target_option): Rename from lto_output_ts_target_option. (write_ts_translation_unit_decl_tree_pointers): Rename from lto_output_ts_translation_unit_decl_tree_pointers. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Rename from lto_streamer_cache_add_to_node_array. (streamer_tree_cache_insert_1): Rename from lto_streamer_cache_insert_1. (record_common_node): Rename from lto_record_common_node. * streamer-hooks.h (bitpack_d, lto_streamer_cache_d): Remove forward declarations. * data-streamer-in.c (lto_input_widest_uint_uleb128): Remove unused function. * data-streamer-out.c (lto_output_widest_uint_uleb128_stream): Remove unused function. * Makefile.in (lto-section-out.o): Add dependency on DATA_STREAMER_H. (ipa-reference.o): Likewise. * lto-section-out.c: Include data-streamer.h. * ipa-reference.c: Include data-streamer.h. From-SVN: r177704
2011-08-12 18:42:13 +02:00
struct streamer_tree_cache_d *
streamer_tree_cache_create (bool with_hashes, bool with_map, bool with_vec)
2011-08-08 18:49:34 +02:00
{
data-streamer.h (streamer_write_zero): Rename from output_zero. * data-streamer.h (streamer_write_zero): Rename from output_zero. (streamer_write_uhwi): Rename from lto_output_uleb128. (streamer_write_hwi): Rename from output_sleb128. (streamer_write_string): Rename from lto_output_string. (streamer_string_index): Rename from lto_string_index. (streamer_write_string_with_length): Rename from lto_output_string_with_length. (streamer_write_uhwi_stream): Rename from lto_output_uleb128_stream. (streamer_write_hwi_stream): Rename from lto_output_sleb128_stream. (streamer_read_string): Rename from lto_input_string. (streamer_read_indexed_string): Rename from input_string_internal. (streamer_read_uhwi): Rename from lto_input_uleb128. (streamer_read_hwi): Rename from lto_input_sleb128. (streamer_write_hwi_in_range): Rename from lto_output_int_in_range. (streamer_read_hwi_in_range): Rename from lto_input_int_in_range. (streamer_write_enum): Rename from lto_output_enum. (streamer_read_enum): Rename from lto_input_enum. (streamer_write_record_start): Rename from output_record_start. (streamer_read_record_start): Rename from input_record_start. (streamer_write_bitpack): Rename from lto_output_bitpack. (streamer_read_bitpack): Rename from lto_input_bitpack. (streamer_write_char_stream): Rename from lto_output_1_stream. (streamer_read_uchar): Rename from lto_input_1_unsigned. * tree-streamer.h (streamer_cache_d): Rename from lto_streamer_cache_d. (streamer_handle_as_builtin_p): Rename from lto_stream_as_builtin_p. (streamer_read_string_cst): Rename from input_string_cst. (streamer_read_chain): Rename from lto_input_chain. (streamer_alloc_tree): Rename from lto_materialize_tree. (streamer_read_tree_body): Rename from lto_input_tree_pointers. (streamer_get_pickled_tree): Rename from lto_get_pickled_tree. (streamer_get_builtin_tree): Rename from lto_get_builtin_tree. (streamer_read_integer_cst): Rename from lto_input_integer_cst. (streamer_read_tree_bitfields): Rename from tree_read_bitfields. (streamer_write_chain): Rename from lto_output_chain. (streamer_write_tree_header): Rename from lto_output_tree_header. (streamer_pack_tree_bitfields): Rename from pack_value_fields. (streamer_write_tree_body): Rename from lto_output_tree_pointers. (streamer_write_integer_cst): Rename from lto_output_integer_cst. (streamer_write_builtin): Rename from lto_output_builtin_tree. (streamer_check_handled_ts_structures): Rename from check_handled_ts_structures. (streamer_tree_cache_insert): Rename from lto_streamer_cache_insert. (streamer_tree_cache_insert_at): Rename from lto_streamer_cache_insert_at. (streamer_tree_cache_append): Rename from lto_streamer_cache_append. (streamer_tree_cache_lookup): Rename from lto_streamer_cache_lookup. (streamer_tree_cache_get): Rename from lto_streamer_cache_get. (streamer_tree_cache_create): Rename from lto_streamer_cache_create. (streamer_tree_cache_delete): Rename from lto_streamer_cache_delete. * tree-streamer-out.c (write_string_cst): Rename from output_string_cst. (write_identifier): Rename from output_identifier. (write_ts_common_tree_pointers): Rename from lto_output_ts_common_tree_pointers. (write_ts_vector_tree_pointers): Rename from lto_output_ts_vector_tree_pointers. (write_ts_complex_tree_pointers): Rename from lto_output_ts_complex_tree_pointers. (write_ts_decl_minimal_tree_pointers): Rename from lto_output_ts_decl_minimal_tree_pointers. (write_ts_decl_common_tree_pointers): Rename from lto_output_ts_decl_common_tree_pointers. (write_ts_decl_non_common_tree_pointers): Rename from lto_output_ts_decl_non_common_tree_pointers. (write_ts_decl_with_vis_tree_pointers): Rename from lto_output_ts_decl_with_vis_tree_pointers. (write_ts_field_decl_tree_pointers): Rename from lto_output_ts_field_decl_tree_pointers. (write_ts_function_decl_tree_pointers): Rename from lto_output_ts_function_decl_tree_pointers. (write_ts_type_common_tree_pointers): Rename from lto_output_ts_type_common_tree_pointers. (write_ts_type_non_common_tree_pointers): Rename from lto_output_ts_type_non_common_tree_pointers. (write_ts_list_tree_pointers): Rename from lto_output_ts_list_tree_pointers. (write_ts_vec_tree_pointers): Rename from lto_output_ts_vec_tree_pointers. (write_ts_exp_tree_pointers): Rename from lto_output_ts_exp_tree_pointers. (write_ts_block_tree_pointers): Rename from lto_output_ts_block_tree_pointers. (write_ts_binfo_tree_pointers): Rename from lto_output_ts_binfo_tree_pointers. (write_ts_constructor_tree_pointers): Rename from lto_output_ts_constructor_tree_pointers. (write_ts_target_option): Rename from lto_output_ts_target_option. (write_ts_translation_unit_decl_tree_pointers): Rename from lto_output_ts_translation_unit_decl_tree_pointers. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Rename from lto_streamer_cache_add_to_node_array. (streamer_tree_cache_insert_1): Rename from lto_streamer_cache_insert_1. (record_common_node): Rename from lto_record_common_node. * streamer-hooks.h (bitpack_d, lto_streamer_cache_d): Remove forward declarations. * data-streamer-in.c (lto_input_widest_uint_uleb128): Remove unused function. * data-streamer-out.c (lto_output_widest_uint_uleb128_stream): Remove unused function. * Makefile.in (lto-section-out.o): Add dependency on DATA_STREAMER_H. (ipa-reference.o): Likewise. * lto-section-out.c: Include data-streamer.h. * ipa-reference.c: Include data-streamer.h. From-SVN: r177704
2011-08-12 18:42:13 +02:00
struct streamer_tree_cache_d *cache;
2011-08-08 18:49:34 +02:00
data-streamer.h (streamer_write_zero): Rename from output_zero. * data-streamer.h (streamer_write_zero): Rename from output_zero. (streamer_write_uhwi): Rename from lto_output_uleb128. (streamer_write_hwi): Rename from output_sleb128. (streamer_write_string): Rename from lto_output_string. (streamer_string_index): Rename from lto_string_index. (streamer_write_string_with_length): Rename from lto_output_string_with_length. (streamer_write_uhwi_stream): Rename from lto_output_uleb128_stream. (streamer_write_hwi_stream): Rename from lto_output_sleb128_stream. (streamer_read_string): Rename from lto_input_string. (streamer_read_indexed_string): Rename from input_string_internal. (streamer_read_uhwi): Rename from lto_input_uleb128. (streamer_read_hwi): Rename from lto_input_sleb128. (streamer_write_hwi_in_range): Rename from lto_output_int_in_range. (streamer_read_hwi_in_range): Rename from lto_input_int_in_range. (streamer_write_enum): Rename from lto_output_enum. (streamer_read_enum): Rename from lto_input_enum. (streamer_write_record_start): Rename from output_record_start. (streamer_read_record_start): Rename from input_record_start. (streamer_write_bitpack): Rename from lto_output_bitpack. (streamer_read_bitpack): Rename from lto_input_bitpack. (streamer_write_char_stream): Rename from lto_output_1_stream. (streamer_read_uchar): Rename from lto_input_1_unsigned. * tree-streamer.h (streamer_cache_d): Rename from lto_streamer_cache_d. (streamer_handle_as_builtin_p): Rename from lto_stream_as_builtin_p. (streamer_read_string_cst): Rename from input_string_cst. (streamer_read_chain): Rename from lto_input_chain. (streamer_alloc_tree): Rename from lto_materialize_tree. (streamer_read_tree_body): Rename from lto_input_tree_pointers. (streamer_get_pickled_tree): Rename from lto_get_pickled_tree. (streamer_get_builtin_tree): Rename from lto_get_builtin_tree. (streamer_read_integer_cst): Rename from lto_input_integer_cst. (streamer_read_tree_bitfields): Rename from tree_read_bitfields. (streamer_write_chain): Rename from lto_output_chain. (streamer_write_tree_header): Rename from lto_output_tree_header. (streamer_pack_tree_bitfields): Rename from pack_value_fields. (streamer_write_tree_body): Rename from lto_output_tree_pointers. (streamer_write_integer_cst): Rename from lto_output_integer_cst. (streamer_write_builtin): Rename from lto_output_builtin_tree. (streamer_check_handled_ts_structures): Rename from check_handled_ts_structures. (streamer_tree_cache_insert): Rename from lto_streamer_cache_insert. (streamer_tree_cache_insert_at): Rename from lto_streamer_cache_insert_at. (streamer_tree_cache_append): Rename from lto_streamer_cache_append. (streamer_tree_cache_lookup): Rename from lto_streamer_cache_lookup. (streamer_tree_cache_get): Rename from lto_streamer_cache_get. (streamer_tree_cache_create): Rename from lto_streamer_cache_create. (streamer_tree_cache_delete): Rename from lto_streamer_cache_delete. * tree-streamer-out.c (write_string_cst): Rename from output_string_cst. (write_identifier): Rename from output_identifier. (write_ts_common_tree_pointers): Rename from lto_output_ts_common_tree_pointers. (write_ts_vector_tree_pointers): Rename from lto_output_ts_vector_tree_pointers. (write_ts_complex_tree_pointers): Rename from lto_output_ts_complex_tree_pointers. (write_ts_decl_minimal_tree_pointers): Rename from lto_output_ts_decl_minimal_tree_pointers. (write_ts_decl_common_tree_pointers): Rename from lto_output_ts_decl_common_tree_pointers. (write_ts_decl_non_common_tree_pointers): Rename from lto_output_ts_decl_non_common_tree_pointers. (write_ts_decl_with_vis_tree_pointers): Rename from lto_output_ts_decl_with_vis_tree_pointers. (write_ts_field_decl_tree_pointers): Rename from lto_output_ts_field_decl_tree_pointers. (write_ts_function_decl_tree_pointers): Rename from lto_output_ts_function_decl_tree_pointers. (write_ts_type_common_tree_pointers): Rename from lto_output_ts_type_common_tree_pointers. (write_ts_type_non_common_tree_pointers): Rename from lto_output_ts_type_non_common_tree_pointers. (write_ts_list_tree_pointers): Rename from lto_output_ts_list_tree_pointers. (write_ts_vec_tree_pointers): Rename from lto_output_ts_vec_tree_pointers. (write_ts_exp_tree_pointers): Rename from lto_output_ts_exp_tree_pointers. (write_ts_block_tree_pointers): Rename from lto_output_ts_block_tree_pointers. (write_ts_binfo_tree_pointers): Rename from lto_output_ts_binfo_tree_pointers. (write_ts_constructor_tree_pointers): Rename from lto_output_ts_constructor_tree_pointers. (write_ts_target_option): Rename from lto_output_ts_target_option. (write_ts_translation_unit_decl_tree_pointers): Rename from lto_output_ts_translation_unit_decl_tree_pointers. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Rename from lto_streamer_cache_add_to_node_array. (streamer_tree_cache_insert_1): Rename from lto_streamer_cache_insert_1. (record_common_node): Rename from lto_record_common_node. * streamer-hooks.h (bitpack_d, lto_streamer_cache_d): Remove forward declarations. * data-streamer-in.c (lto_input_widest_uint_uleb128): Remove unused function. * data-streamer-out.c (lto_output_widest_uint_uleb128_stream): Remove unused function. * Makefile.in (lto-section-out.o): Add dependency on DATA_STREAMER_H. (ipa-reference.o): Likewise. * lto-section-out.c: Include data-streamer.h. * ipa-reference.c: Include data-streamer.h. From-SVN: r177704
2011-08-12 18:42:13 +02:00
cache = XCNEW (struct streamer_tree_cache_d);
2011-08-08 18:49:34 +02:00
if (with_map)
cache->node_map = new hash_map<tree, unsigned> (251);
cache->next_idx = 0;
if (with_vec)
cache->nodes.create (165);
lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. 2013-06-17 Richard Biener <rguenther@suse.de> * lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. (lto_input_scc): Declare. (lto_input_tree_1): Likewise. (struct lto_stats_d): Add num_tree_bodies_output and num_pickle_refs_output. * lto-streamer-in.c (lto_read_body): Use streamer_tree_cache_get_tree. (lto_read_tree_1): Split out from ... (lto_read_tree): ... this. (lto_input_scc): New function. (lto_input_tree_1): Split out from ... (lto_input_tree): ... this. Handle LTO_tree_scc. (lto_data_in_create): Create the streamer cache without hashes. * lto-streamer-out.c (create_output_block): Create the streamer cache with hashes when not doing WPA. (lto_write_tree_1): Split out from ... (lto_write_tree): ... this. (get_symbol_initial_value): New function. (lto_output_tree_1): Split out from ... (lto_output_tree): ... this. Write trees as series of SCCs using a DFS walk via DFS_write_tree. (struct sccs, struct scc_entry): New types. (next_dfs_num, sccstack, sccstate, sccstate_obstack): New globals. (DFS_write_tree_body): New function. (DFS_write_tree): Likewise. (hash_tree): Likewise. (scc_entry_compare): Likewise. (hash_scc): Likewise. (tree_is_indexable): DEBUG_EXPR_DECLs are local entities. * tree-streamer-in.c (lto_input_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. (streamer_read_integer_cst): Remove. (streamer_get_pickled_tree): Adjust. * tree-streamer-out.c (streamer_write_chain): Disable streaming of DECL_EXTERNALs in BLOCK_VARS for now. (write_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Add hash value argument and record that if hashes are recorded in the cache. (streamer_tree_cache_insert_1): Adjust. (streamer_tree_cache_insert): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_append): Adjust. (record_common_node): Likewise. (streamer_tree_cache_create): Add argument whether to record hash values together with trees. (streamer_tree_cache_delete): Adjust. * tree-streamer.h (struct streamer_tree_cache_d): Add vector of hashes. (streamer_read_integer_cst): Remove. (streamer_tree_cache_insert): Adjust. (streamer_tree_cache_append): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_create): Add argument whether to record hashes. (streamer_tree_cache_get): Rename to ... (streamer_tree_cache_get_tree): ... this. (streamer_tree_cache_get_hash): New function. * tree.c (cache_integer_cst): New function. * tree.h (cache_integer_cst): Declare. (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move here from cp/cp-tree.h. * lto-symtab.c (lto_varpool_replace_node): Only release DECL_INITIAL of non-prevailing decls. * varpool.c (varpool_remove_initializer): Do not release DECL_INITIAL when we are still in CGRAPH_LTO_STREAMING. cp/ * cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h. lto/ * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency. * lto.c: Include data-streamer.h. (lto_read_in_decl_state): Use streamer_tree_cache_get_tree. (gimple_type_leader_entry_s, gimple_type_leader, gimple_lookup_type_leader): Remove. (gtc_visit): Simplify. (gimple_types_compatible_p): Likewise. (gimple_register_type_1): Likewise. Merge into ... (gimple_register_type): ... this. Keep it as legacy for statistics purposes for now. (fixup_integer_cst): Remove. (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and rename to ... (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars, maybe_remember_with_vars_*): ... these. (uniquify_nodes): Remove. (lto_fixup_prevailing_type): New function. (struct tree_scc, struct tree_scc_hasher): New type and hasher. (tree_scc_hash, tree_scc_hash_obstack): New globals. (num_merged_types, num_prevailing_types, num_not_merged_types, num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read, total_scc_size_merged, num_sccs_merged, num_scc_compares, num_scc_compare_collisions): New global counters. (compare_tree_sccs_1): New function. (compare_tree_sccs): Likewise. (unify_scc): Likewise. (lto_read_decls): Stream in tree SCCs and unify them on the way in. Finalize prevailing SCC tree members. (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader. Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother to ggc-collect during merging. (print_lto_report_1): Adjust for new merging code. From-SVN: r200151
2013-06-17 17:08:24 +02:00
if (with_hashes)
cache->hashes.create (165);
2011-08-08 18:49:34 +02:00
/* Load all the well-known tree nodes that are always created by
the compiler on startup. This prevents writing them out
unnecessarily. */
tree-streamer-out.c (lto_output_ts_decl_with_vis_tree_pointers): Call stream_write_tree instead of output_record_start. * tree-streamer-out.c (lto_output_ts_decl_with_vis_tree_pointers): Call stream_write_tree instead of output_record_start. (lto_output_ts_binfo_tree_pointers): Likewise. * streamer-hooks.h (stream_write_tree): Move from tree-streamer.h. Convert it to a macro. (stream_read_tree): Likewise. * lto-streamer.h (lto_stream_as_builtin_p): Move ... * tree-streamer.h (lto_stream_as_builtin_p): ... here. * lto-streamer-in.c (lto_read_tree): Call lto_streamer_cache_append and tree_read_bitfields. * lto-streamer-out.c (lto_is_streamable): Move from lto-streamer.c (lto_write_tree): Call it. * lto-streamer.c (lto_is_streamable): Move to lto-streamer-out.c * streamer-hooks.h (struct streamer_hooks): Remove fields name, is_streamable and alloc_tree. Update all users. * tree-streamer-in.c (tree_read_bitfields): Factor out of ... (lto_materialize_tree): ... here. Handle CALL_EXPR codes. Remove call to lto_streamer_cache_append. * tree-streamer-out.c (lto_output_tree_header): Handle CALL_EXPR nodes. * tree-streamer.h (tree_read_bitfields): Declare. * Makefile.in (TREE_STREAMER_H): Add STREAMER_HOOKS_H. (gimple-streamer-in.o): Add dependency on TREE_STREAMER_H. * tree-streamer.h (stream_read_tree): New. Replace all calls to lto_input_tree with it. (stream_write_tree): New. Replace all calls to lto_output_tree, lto_output_tree_ref and lto_output_tree_or_ref with it. * lto-streamer-in.c (lto_read_tree): Inline code from lto_streamer_read_tree. (lto_input_tree): Move from tree-streamer-in.c. * lto-streamer-out.c (lto_output_tree_ref): Make static. Remove handling of NULL values for EXPR. Do not handle EXPRs that are not indexable. (lto_write_tree): Move from tree-streamer-out.c. Inline lto_streamer_write_tree. (lto_output_tree): Move from tree-streamer-out.c. If REF_P is true and EXPR is indexable, call lto_output_tree_ref. * lto-streamer.c (lto_record_common_node): Move to tree-streamer.c. (lto_preload_common_nodes): Likewise. Remove assertions and adjustments for nodes main_identifier_node, ptrdiff_type_node and fileptr_type_node. (lto_streamer_hooks_init): Set streamer_hooks.write_tree to lto_output_tree and streamer_hooks.read_tree to lto_input_tree. * lto-streamer.h (lto_input_tree): Declare. (lto_output_tree_ref): Remove. * streamer-hooks.h (struct streamer_hooks): Remove fields preload_common_nodes, indexable_with_decls_p, pack_value_fields, unpack_value_fields, output_tree_header and has_unique_integer_csts_p. Update all users. * tree-streamer-in.c (lto_materialize_tree): Make extern. (lto_input_tree_pointers): Likewise. (lto_read_tree): Move to lto-streamer-in.c. (lto_input_integer_cst): Make extern. (lto_get_pickled_tree): Likewise. (lto_get_builtin_tree): Likewise. (lto_input_tree): Move to lto-streamer-in.c. * tree-streamer-out.c (pack_value_fields): Make extern. (lto_output_tree_or_ref): Remove. Replace all callers with calls to stream_write_tree. (lto_output_builtin_tree): Make extern. (lto_streamer_write_tree): Inline into lto_write_tree. (lto_output_tree_pointers): Make extern. (lto_output_tree_header): Likewise. (lto_output_integer_cst): Likewise. (lto_write_tree): Move to lto-streamer-out.c. (lto_output_tree): Likewise. * tree-streamer.c (lto_record_common_node): Move from lto-streamer.c (preload_common_nodes): Likewise. (lto_streamer_cache_create): Call it. * tree-streamer.h: Include streamer-hooks.h. (stream_write_tree): New. (stream_read_tree): New. (lto_input_tree): Remove. (lto_materialize_tree): Declare. (lto_input_tree_pointers): Declare. (lto_get_pickled_tree): Declare. (lto_get_builtin_tree): Declare. (lto_input_integer_cst): Declare. (lto_output_tree_header): Declare. (pack_value_fields): Declare. (lto_output_tree_pointers): Declare. (lto_output_integer_cst): Declare. (lto_output_builtin_tree): Declare. From-SVN: r177661
2011-08-11 14:02:34 +02:00
preload_common_nodes (cache);
2011-08-08 18:49:34 +02:00
return cache;
}
/* Delete the streamer cache C. */
void
data-streamer.h (streamer_write_zero): Rename from output_zero. * data-streamer.h (streamer_write_zero): Rename from output_zero. (streamer_write_uhwi): Rename from lto_output_uleb128. (streamer_write_hwi): Rename from output_sleb128. (streamer_write_string): Rename from lto_output_string. (streamer_string_index): Rename from lto_string_index. (streamer_write_string_with_length): Rename from lto_output_string_with_length. (streamer_write_uhwi_stream): Rename from lto_output_uleb128_stream. (streamer_write_hwi_stream): Rename from lto_output_sleb128_stream. (streamer_read_string): Rename from lto_input_string. (streamer_read_indexed_string): Rename from input_string_internal. (streamer_read_uhwi): Rename from lto_input_uleb128. (streamer_read_hwi): Rename from lto_input_sleb128. (streamer_write_hwi_in_range): Rename from lto_output_int_in_range. (streamer_read_hwi_in_range): Rename from lto_input_int_in_range. (streamer_write_enum): Rename from lto_output_enum. (streamer_read_enum): Rename from lto_input_enum. (streamer_write_record_start): Rename from output_record_start. (streamer_read_record_start): Rename from input_record_start. (streamer_write_bitpack): Rename from lto_output_bitpack. (streamer_read_bitpack): Rename from lto_input_bitpack. (streamer_write_char_stream): Rename from lto_output_1_stream. (streamer_read_uchar): Rename from lto_input_1_unsigned. * tree-streamer.h (streamer_cache_d): Rename from lto_streamer_cache_d. (streamer_handle_as_builtin_p): Rename from lto_stream_as_builtin_p. (streamer_read_string_cst): Rename from input_string_cst. (streamer_read_chain): Rename from lto_input_chain. (streamer_alloc_tree): Rename from lto_materialize_tree. (streamer_read_tree_body): Rename from lto_input_tree_pointers. (streamer_get_pickled_tree): Rename from lto_get_pickled_tree. (streamer_get_builtin_tree): Rename from lto_get_builtin_tree. (streamer_read_integer_cst): Rename from lto_input_integer_cst. (streamer_read_tree_bitfields): Rename from tree_read_bitfields. (streamer_write_chain): Rename from lto_output_chain. (streamer_write_tree_header): Rename from lto_output_tree_header. (streamer_pack_tree_bitfields): Rename from pack_value_fields. (streamer_write_tree_body): Rename from lto_output_tree_pointers. (streamer_write_integer_cst): Rename from lto_output_integer_cst. (streamer_write_builtin): Rename from lto_output_builtin_tree. (streamer_check_handled_ts_structures): Rename from check_handled_ts_structures. (streamer_tree_cache_insert): Rename from lto_streamer_cache_insert. (streamer_tree_cache_insert_at): Rename from lto_streamer_cache_insert_at. (streamer_tree_cache_append): Rename from lto_streamer_cache_append. (streamer_tree_cache_lookup): Rename from lto_streamer_cache_lookup. (streamer_tree_cache_get): Rename from lto_streamer_cache_get. (streamer_tree_cache_create): Rename from lto_streamer_cache_create. (streamer_tree_cache_delete): Rename from lto_streamer_cache_delete. * tree-streamer-out.c (write_string_cst): Rename from output_string_cst. (write_identifier): Rename from output_identifier. (write_ts_common_tree_pointers): Rename from lto_output_ts_common_tree_pointers. (write_ts_vector_tree_pointers): Rename from lto_output_ts_vector_tree_pointers. (write_ts_complex_tree_pointers): Rename from lto_output_ts_complex_tree_pointers. (write_ts_decl_minimal_tree_pointers): Rename from lto_output_ts_decl_minimal_tree_pointers. (write_ts_decl_common_tree_pointers): Rename from lto_output_ts_decl_common_tree_pointers. (write_ts_decl_non_common_tree_pointers): Rename from lto_output_ts_decl_non_common_tree_pointers. (write_ts_decl_with_vis_tree_pointers): Rename from lto_output_ts_decl_with_vis_tree_pointers. (write_ts_field_decl_tree_pointers): Rename from lto_output_ts_field_decl_tree_pointers. (write_ts_function_decl_tree_pointers): Rename from lto_output_ts_function_decl_tree_pointers. (write_ts_type_common_tree_pointers): Rename from lto_output_ts_type_common_tree_pointers. (write_ts_type_non_common_tree_pointers): Rename from lto_output_ts_type_non_common_tree_pointers. (write_ts_list_tree_pointers): Rename from lto_output_ts_list_tree_pointers. (write_ts_vec_tree_pointers): Rename from lto_output_ts_vec_tree_pointers. (write_ts_exp_tree_pointers): Rename from lto_output_ts_exp_tree_pointers. (write_ts_block_tree_pointers): Rename from lto_output_ts_block_tree_pointers. (write_ts_binfo_tree_pointers): Rename from lto_output_ts_binfo_tree_pointers. (write_ts_constructor_tree_pointers): Rename from lto_output_ts_constructor_tree_pointers. (write_ts_target_option): Rename from lto_output_ts_target_option. (write_ts_translation_unit_decl_tree_pointers): Rename from lto_output_ts_translation_unit_decl_tree_pointers. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Rename from lto_streamer_cache_add_to_node_array. (streamer_tree_cache_insert_1): Rename from lto_streamer_cache_insert_1. (record_common_node): Rename from lto_record_common_node. * streamer-hooks.h (bitpack_d, lto_streamer_cache_d): Remove forward declarations. * data-streamer-in.c (lto_input_widest_uint_uleb128): Remove unused function. * data-streamer-out.c (lto_output_widest_uint_uleb128_stream): Remove unused function. * Makefile.in (lto-section-out.o): Add dependency on DATA_STREAMER_H. (ipa-reference.o): Likewise. * lto-section-out.c: Include data-streamer.h. * ipa-reference.c: Include data-streamer.h. From-SVN: r177704
2011-08-12 18:42:13 +02:00
streamer_tree_cache_delete (struct streamer_tree_cache_d *c)
2011-08-08 18:49:34 +02:00
{
if (c == NULL)
return;
delete c->node_map;
c->node_map = NULL;
This patch rewrites the old VEC macro-based interface into a new one based on the template class 'vec'. This patch rewrites the old VEC macro-based interface into a new one based on the template class 'vec'. The user-visible changes are described in http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec. I have tested the patch pretty extensively: - Regular bootstraps on x86_64, ppc, ia64, sparc and hppa. - Bootstraps with --enable-checking=release - Bootstraps with --enable-checking=gc,gcac - Basic builds on all targets (using contrib/config-list.mk). We no longer access the vectors via VEC_* macros. The pattern is "VEC_operation (T, A, V, args)" becomes "V.operation (args)". The only thing I could not do is create proper ctors and dtors for the vec class. Since these vectors are stored in unions, we have to keep them as PODs (C++03 does not allow non-PODs in unions). This means that creation and destruction must be explicit. There is a new method vec<type, allocation, layout>::create() and another vec<type, allocation, layout>::destroy() to allocate the internal vector. For vectors that must be pointers, there is a family of free functions that implement the operations that need to tolerate NULL vectors. These functions all start with the prefix 'vec_safe_'. See the wiki page for details. The gengtype change removes the special handling for VEC() that used to exist in gengtype. Additionally, it allows gengtype to recognize templates of more than one argument and introduces the concept of an undefined type (useful for template arguments that may or may not be types). When a TYPE_UNDEFINED is reached, gengtype will ignore it if it happens inside a type marked with GTY((user)). Otherwise, it will emit an error. Finally, gengtype rejects root types marked GTY((user)) that are not first class pointers. 2012-11-16 Diego Novillo <dnovillo@google.com> VEC API overhaul (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec) * vec.c (register_overhead): Convert it into member function of vec_prefix. (release_overhead): Likewise. (calculate_allocation): Likewise. (vec_heap_free): Remove. (vec_gc_o_reserve_1): Remove. (vec_heap_o_reserve_1): Remove. (vec_stack_o_reserve_1): Remove. (vec_stack_o_reserve_exact): Remove. (register_stack_vec): New. (stack_vec_register_index): New. (unregister_stack_vec): New. (vec_assert_fail): Remove. * vec.h: Conditionally include ggc.h. Document conditional hackery. Update top-level documentation. (ALONE_VEC_CHECK_INFO): Remove. (VEC_CHECK_INFO): Remove. (ALONE_VEC_CHECK_DECL): Remove. (VEC_CHECK_DECL): Remove. (ALONE_VEC_CHECK_PASS): Remove. (VEC_CHECK_PASS): Remove. (VEC_ASSERT): Remove. (vec_prefix): Add friends va_gc, va_gc_atomic, va_heap and va_stack. Mark fields alloc_ and num_ as protected. (struct vec_t): Remove. Remove all function members. (struct vl_embed): Declare. (struct vl_ptr): Declare. (free): Remove. (reserve_exact): Remove. (reserve): Remove. (safe_splice): Remove. (safe_push): Remove. (safe_grow): Remove. (safe_grow_cleared): Remove. (safe_insert): Remove. (DEF_VEC_I): Remove. (DEF_VEC_ALLOC_I): Remove. (DEF_VEC_P): Remove. (DEF_VEC_ALLOC_P): Remove. (DEF_VEC_O): Remove. (DEF_VEC_ALLOC_O): Remove. (DEF_VEC_ALLOC_P_STACK): Remove. (DEF_VEC_ALLOC_O_STACK): Remove. (DEF_VEC_ALLOC_I_STACK): Remove. (DEF_VEC_A): Remove. (DEF_VEC_ALLOC_A): Remove. (vec_stack_p_reserve_exact_1): Remove. (vec_stack_o_reserve): Remove. (vec_stack_o_reserve_exact): Remove. (VEC_length): Remove. (VEC_empty): Remove. (VEC_address): Remove. (vec_address): Remove. (VEC_last): Remove. (VEC_index): Remove. (VEC_iterate): Remove. (VEC_embedded_size): Remove. (VEC_embedded_init): Remove. (VEC_free): Remove. (VEC_copy): Remove. (VEC_space): Remove. (VEC_reserve): Remove. (VEC_reserve_exact): Remove. (VEC_splice): Remove. (VEC_safe_splice): Remove. (VEC_quick_push): Remove. (VEC_safe_push): Remove. (VEC_pop): Remove. (VEC_truncate): Remove. (VEC_safe_grow): Remove. (VEC_replace): Remove. (VEC_quick_insert): Remove. (VEC_safe_insert): Remove. (VEC_ordered_remove): Remove. (VEC_unordered_remove): Remove. (VEC_block_remove): Remove. (VEC_lower_bound): Remove. (VEC_alloc): Remove. (VEC_qsort): Remove. (va_heap): Declare. (va_heap::default_layout): New typedef to vl_ptr. (va_heap::reserve): New. (va_heap::release): New. (va_gc): Declare. (va_gc::default_layout): New typedef to vl_embed. (va_gc::reserve): New. (va_gc::release): New. (va_gc_atomic): Declare. Inherit from va_gc. (va_stack): Declare. (va_stack::default_layout): New typedef to vl_ptr. (va_stack::alloc): New. (va_stack::reserve): New. (va_stack::release): New. (register_stack_vec): Declare. (stack_vec_register_index): Declare. (unregister_stack_vec): Declare. (vec<T, A = va_heap, L = typename A::default_layout>): Declare empty vec template. (vec<T, A, vl_embed>): Partial specialization for embedded layout. (vec<T, A, vl_embed>::allocated): New. (vec<T, A, vl_embed>::length): New. (vec<T, A, vl_embed>::is_empty): New. (vec<T, A, vl_embed>::address): New. (vec<T, A, vl_embed>::operator[]): New. (vec<T, A, vl_embed>::last New. (vec<T, A, vl_embed>::space): New. (vec<T, A, vl_embed>::iterate): New. (vec<T, A, vl_embed>::iterate): New. (vec<T, A, vl_embed>::copy): New. (vec<T, A, vl_embed>::splice): New. (vec<T, A, vl_embed>::quick_push New. (vec<T, A, vl_embed>::pop New. (vec<T, A, vl_embed>::truncate): New. (vec<T, A, vl_embed>::quick_insert): New. (vec<T, A, vl_embed>::ordered_remove): New. (vec<T, A, vl_embed>::unordered_remove): New. (vec<T, A, vl_embed>::block_remove): New. (vec<T, A, vl_embed>::qsort): New. (vec<T, A, vl_embed>::lower_bound): New. (vec<T, A, vl_embed>::embedded_size): New. (vec<T, A, vl_embed>::embedded_init): New. (vec<T, A, vl_embed>::quick_grow): New. (vec<T, A, vl_embed>::quick_grow_cleared): New. (vec_safe_space): New. (vec_safe_length): New. (vec_safe_address): New. (vec_safe_is_empty): New. (vec_safe_reserve): New. (vec_safe_reserve_exact): New. (vec_alloc): New. (vec_free): New. (vec_safe_grow): New. (vec_safe_grow_cleared): New. (vec_safe_iterate): New. (vec_safe_push): New. (vec_safe_insert): New. (vec_safe_truncate): New. (vec_safe_copy): New. (vec_safe_splice): New. (vec<T, A, vl_ptr>): New partial specialization for the space efficient layout. (vec<T, A, vl_ptr>::exists): New. (vec<T, A, vl_ptr>::is_empty): New. (vec<T, A, vl_ptr>::length): New. (vec<T, A, vl_ptr>::address): New. (vec<T, A, vl_ptr>::operator[]): New. (vec<T, A, vl_ptr>::operator!=): New. (vec<T, A, vl_ptr>::operator==): New. (vec<T, A, vl_ptr>::last): New. (vec<T, A, vl_ptr>::space): New. (vec<T, A, vl_ptr>::iterate): New. (vec<T, A, vl_ptr>::copy): New. (vec<T, A, vl_ptr>::reserve): New. (vec<T, A, vl_ptr>::reserve_exact): New. (vec<T, A, vl_ptr>::splice): New. (vec<T, A, vl_ptr>::safe_splice): New. (vec<T, A, vl_ptr>::quick_push): New. (vec<T, A, vl_ptr>::safe_push): New. (vec<T, A, vl_ptr>::pop): New. (vec<T, A, vl_ptr>::truncate): New. (vec<T, A, vl_ptr>::safe_grow): New. (vec<T, A, vl_ptr>::safe_grow_cleared): New. (vec<T, A, vl_ptr>::quick_grow): New. (vec<T, A, vl_ptr>::quick_grow_cleared): New. (vec<T, A, vl_ptr>::quick_insert): New. (vec<T, A, vl_ptr>::safe_insert): New. (vec<T, A, vl_ptr>::ordered_remove): New. (vec<T, A, vl_ptr>::unordered_remove): New. (vec<T, A, vl_ptr>::block_remove): New. (vec<T, A, vl_ptr>::qsort): New. (vec<T, A, vl_ptr>::lower_bound): New. (vec_stack_alloc): Define. (FOR_EACH_VEC_SAFE_ELT): Define. * vecir.h: Remove. Update all users. * vecprim.h: Remove. Update all users. Move uchar to coretypes.h. * Makefile.in (VEC_H): Add $(GGC_H). Remove vecir.h and vecprim.h dependencies everywhere. 2012-11-16 Diego Novillo <dnovillo@google.com> * gengtype-lex.l (VEC): Remove. Add characters in the set [\!\>\.-]. * gengtype-parse.c (token_names): Remove "VEC". (require_template_declaration): Remove handling of VEC_TOKEN. (type): Likewise. Call create_user_defined_type when parsing GTY((user)). * gengtype-state.c (type_lineloc): handle TYPE_UNDEFINED. (write_state_undefined_type): New. (write_state_type): Call write_state_undefined_type for TYPE_UNDEFINED. (read_state_type): Call read_state_undefined_type for TYPE_UNDEFINED. * gengtype.c (dbgprint_count_type_at): Handle TYPE_UNDEFINED. (create_user_defined_type): Make extern. (type_for_name): Factor out of resolve_typedef. (create_undefined_type): New (resolve_typedef): Call it when we cannot find a previous typedef and the type is not a template. (find_structure): Accept TYPE_UNDEFINED. (set_gc_used_type): Add argument ALLOWED_UNDEFINED_TYPES, default to false. Emit an error for TYPE_UNDEFINED unless LEVEL is GC_UNUSED or ALLOWED_UNDEFINED_TYPES is set. Set ALLOWED_UNDEFINED_TYPES to true for TYPE_USER_STRUCT. (filter_type_name): Accept templates with more than one argument. (output_mangled_typename): Handle TYPE_UNDEFINED (walk_type): Likewise. (write_types_process_field): Likewise. (write_func_for_structure): If CHAIN_NEXT is set, ORIG_S should not be a user-defined type. (write_types_local_user_process_field): Handle TYPE_ARRAY, TYPE_NONE and TYPE_UNDEFINED. (write_types_local_process_field): Likewise. (contains_scalar_p): Return 0 for TYPE_USER_STRUCT. (write_root): Reject user-defined types that are not pointers. Handle TYPE_NONE, TYPE_UNDEFINED, TYPE_UNION, TYPE_LANG_STRUCT and TYPE_PARAM_STRUCT. (output_typename): Handle TYPE_NONE, TYPE_UNDEFINED, and TYPE_ARRAY. (dump_typekind): Handle TYPE_UNDEFINED. * gengtype.h (enum typekind): Add TYPE_UNDEFINED. (create_user_defined_type): Declare. (enum gty_token): Remove VEC_TOKEN. 2012-11-16 Diego Novillo <dnovillo@google.com> Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec) * coretypes.h (uchar): Define. * alias.c: Use new vec API in vec.h. * asan.c: Likewise. * attribs.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * builtins.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopanal.c: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphclones.c: Likewise. * cgraphunit.c: Likewise. * combine.c: Likewise. * compare-elim.c: Likewise. * coverage.c: Likewise. * cprop.c: Likewise. * data-streamer.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * domwalk.h: Likewise. * dse.c: Likewise. * dwarf2cfi.c: Likewise. * dwarf2out.c: Likewise. * dwarf2out.h: Likewise. * emit-rtl.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genextract.c: Likewise. * genopinit.c: Likewise * ggc-common.c: Likewise. * ggc.h: Likewise. * gimple-low.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * gimple-streamer-in.c: Likewise. * gimple.c: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graph.c: Likewise. * graphds.c: Likewise. * graphds.h: Likewise. * graphite-blocking.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * graphite-dependences.c: Likewise. * graphite-interchange.c: Likewise. * graphite-optimize-isl.c: Likewise. * graphite-poly.c: Likewise. * graphite-poly.h: Likewise. * graphite-scop-detection.c: Likewise. * graphite-scop-detection.h: Likewise. * graphite-sese-to-poly.c: Likewise. * graphite.c: Likewise. * godump.c: Likewise. * haifa-sched.c: Likewise. * hw-doloop.c: Likewise. * hw-doloop.h: Likewise. * ifcvt.c: Likewise. * insn-addr.h: Likewise. * ipa-cp.c: Likewise. * ipa-inline-analysis.c: Likewise. * ipa-inline-transform.c: Likewise. * ipa-inline.c: Likewise. * ipa-inline.h: Likewise. * ipa-prop.c: Likewise. * ipa-prop.h: Likewise. * ipa-pure-const.c: Likewise. * ipa-ref-inline.h: Likewise. * ipa-ref.c: Likewise. * ipa-ref.h: Likewise. * ipa-reference.c: Likewise. * ipa-split.c: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira.c: Likewise. * loop-invariant.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lra-lives.c: Likewise. * lra.c: Likewise. * lto-cgraph.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * mcf.c: Likewise. * modulo-sched.c: Likewise. * omp-low.c: Likewise. * opts-common.c: Likewise. * opts-global.c: Likewise. * opts.c: Likewise. * opts.h: Likewise. * passes.c: Likewise. * predict.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * profile.h: Likewise. * read-rtl.c: Likewise. * ree.c: Likewise. * reg-stack.c: Likewise. * regrename.c: Likewise. * regrename.h: Likewise. * reload.c: Likewise. * reload.h: Likewise. * reload1.c: Likewise. * rtl.h: Likewise. * sched-deps.c: Likewise. * sched-int.h: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sese.c: Likewise. * sese.h: Likewise. * statistics.h: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * trans-mem.c: Likewise. * tree-browser.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-diagnostic.c: Likewise. * tree-dump.c: Likewise. * tree-eh.c: Likewise. * tree-emutls.c: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-inline.h: Likewise. * tree-into-ssa.c: Likewise. * tree-iterator.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-mudflap.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sccvn.h: Likewise. * tree-ssa-strlen.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-tail-merge.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-stdarg.c: Likewise. * tree-streamer-in.c: Likewise. * tree-streamer-out.c: Likewise. * tree-streamer.c: Likewise. * tree-streamer.h: Likewise. * tree-switch-conversion.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.h: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vmsdbgout.c: Likewise. * config/bfin/bfin.c: Likewise. * config/c6x/c6x.c: Likewise. * config/darwin.c: Likewise. * config/i386/i386.c: Likewise. * config/ia64/ia64.c: Likewise. * config/mep/mep.c: Likewise. * config/mips/mips.c: Likewise. * config/pa/pa.c: Likewise. * config/rs6000/rs6000-c.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rx/rx.c: Likewise. * config/spu/spu-c.c: Likewise. * config/vms/vms.c: Likewise. * config/vxworks.c: Likewise. * config/epiphany/resolve-sw-modes.c: Likewise. From-SVN: r193595
2012-11-18 03:54:30 +01:00
c->nodes.release ();
lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. 2013-06-17 Richard Biener <rguenther@suse.de> * lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. (lto_input_scc): Declare. (lto_input_tree_1): Likewise. (struct lto_stats_d): Add num_tree_bodies_output and num_pickle_refs_output. * lto-streamer-in.c (lto_read_body): Use streamer_tree_cache_get_tree. (lto_read_tree_1): Split out from ... (lto_read_tree): ... this. (lto_input_scc): New function. (lto_input_tree_1): Split out from ... (lto_input_tree): ... this. Handle LTO_tree_scc. (lto_data_in_create): Create the streamer cache without hashes. * lto-streamer-out.c (create_output_block): Create the streamer cache with hashes when not doing WPA. (lto_write_tree_1): Split out from ... (lto_write_tree): ... this. (get_symbol_initial_value): New function. (lto_output_tree_1): Split out from ... (lto_output_tree): ... this. Write trees as series of SCCs using a DFS walk via DFS_write_tree. (struct sccs, struct scc_entry): New types. (next_dfs_num, sccstack, sccstate, sccstate_obstack): New globals. (DFS_write_tree_body): New function. (DFS_write_tree): Likewise. (hash_tree): Likewise. (scc_entry_compare): Likewise. (hash_scc): Likewise. (tree_is_indexable): DEBUG_EXPR_DECLs are local entities. * tree-streamer-in.c (lto_input_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. (streamer_read_integer_cst): Remove. (streamer_get_pickled_tree): Adjust. * tree-streamer-out.c (streamer_write_chain): Disable streaming of DECL_EXTERNALs in BLOCK_VARS for now. (write_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Add hash value argument and record that if hashes are recorded in the cache. (streamer_tree_cache_insert_1): Adjust. (streamer_tree_cache_insert): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_append): Adjust. (record_common_node): Likewise. (streamer_tree_cache_create): Add argument whether to record hash values together with trees. (streamer_tree_cache_delete): Adjust. * tree-streamer.h (struct streamer_tree_cache_d): Add vector of hashes. (streamer_read_integer_cst): Remove. (streamer_tree_cache_insert): Adjust. (streamer_tree_cache_append): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_create): Add argument whether to record hashes. (streamer_tree_cache_get): Rename to ... (streamer_tree_cache_get_tree): ... this. (streamer_tree_cache_get_hash): New function. * tree.c (cache_integer_cst): New function. * tree.h (cache_integer_cst): Declare. (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move here from cp/cp-tree.h. * lto-symtab.c (lto_varpool_replace_node): Only release DECL_INITIAL of non-prevailing decls. * varpool.c (varpool_remove_initializer): Do not release DECL_INITIAL when we are still in CGRAPH_LTO_STREAMING. cp/ * cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h. lto/ * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency. * lto.c: Include data-streamer.h. (lto_read_in_decl_state): Use streamer_tree_cache_get_tree. (gimple_type_leader_entry_s, gimple_type_leader, gimple_lookup_type_leader): Remove. (gtc_visit): Simplify. (gimple_types_compatible_p): Likewise. (gimple_register_type_1): Likewise. Merge into ... (gimple_register_type): ... this. Keep it as legacy for statistics purposes for now. (fixup_integer_cst): Remove. (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and rename to ... (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars, maybe_remember_with_vars_*): ... these. (uniquify_nodes): Remove. (lto_fixup_prevailing_type): New function. (struct tree_scc, struct tree_scc_hasher): New type and hasher. (tree_scc_hash, tree_scc_hash_obstack): New globals. (num_merged_types, num_prevailing_types, num_not_merged_types, num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read, total_scc_size_merged, num_sccs_merged, num_scc_compares, num_scc_compare_collisions): New global counters. (compare_tree_sccs_1): New function. (compare_tree_sccs): Likewise. (unify_scc): Likewise. (lto_read_decls): Stream in tree SCCs and unify them on the way in. Finalize prevailing SCC tree members. (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader. Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother to ggc-collect during merging. (print_lto_report_1): Adjust for new merging code. From-SVN: r200151
2013-06-17 17:08:24 +02:00
c->hashes.release ();
2011-08-08 18:49:34 +02:00
free (c);
}