gcc/gcc/modulo-sched.c

3361 lines
99 KiB
C
Raw Permalink Normal View History

/* Swing Modulo Scheduling implementation.
Copyright (C) 2004-2017 Free Software Foundation, Inc.
Contributed by Ayal Zaks and Mustafa Hagog <zaks,mustafa@il.ibm.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"
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 "target.h"
#include "rtl.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.h"
#include "cfghooks.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 "df.h"
Move MEMMODEL_* from coretypes.h to memmodel.h 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com> gcc/ * coretypes.h: Move MEMMODEL_* macros and enum memmodel definition into ... * memmodel.h: This file. * alias.c, asan.c, auto-inc-dec.c, bb-reorder.c, bt-load.c, caller-save.c, calls.c, ccmp.c, cfgbuild.c, cfgcleanup.c, cfgexpand.c, cfgloopanal.c, cfgrtl.c, cilk-common.c, combine.c, combine-stack-adj.c, common/config/aarch64/aarch64-common.c, common/config/arm/arm-common.c, common/config/bfin/bfin-common.c, common/config/c6x/c6x-common.c, common/config/i386/i386-common.c, common/config/ia64/ia64-common.c, common/config/nvptx/nvptx-common.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-c.c, config/aarch64/cortex-a57-fma-steering.c, config/arc/arc.c, config/arc/arc-c.c, config/arm/arm-builtins.c, config/arm/arm-c.c, config/avr/avr.c, config/avr/avr-c.c, config/avr/avr-log.c, config/bfin/bfin.c, config/c6x/c6x.c, config/cr16/cr16.c, config/cris/cris.c, config/darwin-c.c, config/darwin.c, config/epiphany/epiphany.c, config/epiphany/mode-switch-use.c, config/epiphany/resolve-sw-modes.c, config/fr30/fr30.c, config/frv/frv.c, config/ft32/ft32.c, config/h8300/h8300.c, config/i386/i386-c.c, config/i386/winnt.c, config/iq2000/iq2000.c, config/lm32/lm32.c, config/m32c/m32c.c, config/m32r/m32r.c, config/m68k/m68k.c, config/mcore/mcore.c, config/microblaze/microblaze.c, config/mmix/mmix.c, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-memory-manipulation.c, config/nds32/nds32-predicates.c, config/nds32/nds32.c, config/nios2/nios2.c, config/nvptx/nvptx.c, config/pa/pa.c, config/pdp11/pdp11.c, config/rl78/rl78.c, config/rs6000/rs6000-c.c, config/rx/rx.c, config/s390/s390-c.c, config/s390/s390.c, config/sh/sh.c, config/sh/sh-c.c, config/sh/sh-mem.cc, config/sh/sh_treg_combine.cc, config/sol2.c, config/spu/spu.c, config/stormy16/stormy16.c, config/tilegx/tilegx.c, config/tilepro/tilepro.c, config/v850/v850.c, config/vax/vax.c, config/visium/visium.c, config/vms/vms-c.c, config/xtensa/xtensa.c, coverage.c, cppbuiltin.c, cprop.c, cse.c, cselib.c, dbxout.c, dce.c, df-core.c, df-problems.c, df-scan.c, dojump.c, dse.c, dwarf2asm.c, dwarf2cfi.c, dwarf2out.c, emit-rtl.c, except.c, explow.c, expmed.c, expr.c, final.c, fold-const.c, function.c, fwprop.c, gcse.c, ggc-page.c, haifa-sched.c, hsa-brig.c, hsa-gen.c, hw-doloop.c, ifcvt.c, init-regs.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-lives.c, ira.c, jump.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lra.c, lra-assigns.c, lra-coalesce.c, lra-constraints.c, lra-eliminations.c, lra-lives.c, lra-remat.c, lra-spills.c, mode-switching.c, modulo-sched.c, omp-low.c, passes.c, postreload-gcse.c, postreload.c, predict.c, print-rtl-function.c, recog.c, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, reload.c, reload1.c, reorg.c, resource.c, rtl-chkp.c, rtl-tests.c, rtlanal.c, rtlhooks.c, sched-deps.c, sched-rgn.c, sdbout.c, sel-sched-ir.c, sel-sched.c, shrink-wrap.c, simplify-rtx.c, stack-ptr-mod.c, stmt.c, stor-layout.c, target-globals.c, targhooks.c, toplev.c, tree-nested.c, tree-outof-ssa.c, tree-profile.c, tree-ssa-coalesce.c, tree-ssa-ifcombine.c, tree-ssa-loop-ivopts.c, tree-ssa-loop.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-vect-data-refs.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Include memmodel.h. * genattrtab.c (write_header): Include memmodel.h in generated file. * genautomata.c (main): Likewise. * gengtype.c (open_base_files): Likewise. * genopinit.c (main): Likewise. * genconditions.c (write_header): Include memmodel.h earlier in generated file. * genemit.c (main): Likewise. * genoutput.c (output_prologue): Likewise. * genpeep.c (main): Likewise. * genpreds.c (write_insn_preds_c): Likewise. * genrecog.c (write_header): Likewise. * Makefile.in (PLUGIN_HEADERS): Include memmodel.h gcc/ada/ * gcc-interface/utils2.c: Include memmodel.h. gcc/c-family/ * c-cppbuiltin.c: Include memmodel.h. * c-opts.c: Likewise. * c-pragma.c: Likewise. * c-warn.c: Likewise. gcc/c/ * c-typeck.c: Include memmodel.h. gcc/cp/ * decl2.c: Include memmodel.h. * rtti.c: Likewise. gcc/fortran/ * trans-intrinsic.c: Include memmodel.h. gcc/go/ * go-backend.c: Include memmodel.h. libgcc/ * libgcov-profiler.c: Replace MEMMODEL_* macros by their __ATOMIC_* equivalent. * config/tilepro/atomic.c: Likewise and stop casting model to enum memmodel. From-SVN: r241121
2016-10-13 16:17:52 +02:00
#include "memmodel.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 "optabs.h"
#include "regs.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 "emit-rtl.h"
#include "gcov-io.h"
#include "profile.h"
#include "insn-attr.h"
ggcplug.c: Shuffle includes to include gcc-plugin.h earlier. 2014-10-27 Andrew MacLeod <amacleod@redhat.com> * testsuite/gcc.dg/plugin/ggcplug.c: Shuffle includes to include gcc-plugin.h earlier. 2014-10-27 Andrew MacLeod <amacleod@redhat.com> * c/c-typeck.c: Adjust include files. 2014-10-27 Andrew MacLeod <amacleod@redhat.com> * c-family/c-gimplify.c: Adjust include files. 2014-10-27 Andrew MacLeod <amacleod@redhat.com> * cp/cp-gimplify.c: Adjust include files. 2014-10-27 Andrew MacLeod <amacleod@redhat.com> * go/go-gcc.cc: Adjust include files. * go/go-lang.c: Ditto. 2014-10-27 Andrew MacLeod <amacleod@redhat.com> * java/java-gimplify.c: Adjust include files. 2014-10-27 Andrew MacLeod <amacleod@redhat.com> * lto/lto-lang.c: Adjust include files. * lto/lto-object.c: Ditto. * lto/lto-partition.c: Ditto. * lto/lto-symtab.c: Ditto. * lto/lto.c: Ditto. 2014-10-27 Andrew MacLeod <amacleod@redhat.com> * basic-block.h: Remove all includes. (enum profile_status_d, struct control_flow_graph): Move to cfg.h * cfg.h (profile_status_d, struct control_flow_graph): Relocate here. * Makefile.in (GTFILES): Add cfg.h to list. * cgraph.h (symbol_table::create_empty): Move to cgraph.c. * cgraph.c (symbol_table::create_empty): Relocate from cgraph.h. * genconditions.c (write_header): Add predict.h and basic-block.h to lits of includes. * genemit.c (main): Ditto. * genpreds.c (write_insn_preds_c): Ditto. * genrecog.c (write_header): Ditto. * gengtype.c (open_base_files): Add predict.h, basic-block.h, and cfg.h to list of includes. * alias.c: Adjust include files. * asan.c: Ditto. * auto-inc-dec.c: Ditto. * auto-profile.c: Ditto. * bb-reorder.c: Ditto. * bt-load.c: Ditto. * builtins.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfganal.c: Ditto. * cfgbuild.c: Ditto. * cfgcleanup.c: Ditto. * cfgexpand.c: Ditto. * cfghooks.c: Ditto. * cfgloop.c: Ditto. * cfgloopanal.c: Ditto. * cfgloopmanip.c: Ditto. * cfgrtl.c: Ditto. * cgraphbuild.c: Ditto. * cgraphclones.c: Ditto. * cgraphunit.c: Ditto. * combine-stack-adj.c: Ditto. * combine.c: Ditto. * compare-elim.c: Ditto. * coverage.c: Ditto. * cprop.c: Ditto. * cse.c: Ditto. * cselib.c: Ditto. * data-streamer-in.c: Ditto. * data-streamer-out.c: Ditto. * data-streamer.c: Ditto. * dce.c: Ditto. * ddg.c: Ditto. * ddg.h: Ditto. * df-core.c: Ditto. * df-problems.c: Ditto. * df-scan.c: Ditto. * df.h: Ditto. * dojump.c: Ditto. * dominance.c: Ditto. * domwalk.c: Ditto. * dse.c: Ditto. * dwarf2cfi.c: Ditto. * emit-rtl.c: Ditto. * et-forest.c: Ditto. * except.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * fwprop.c: Ditto. * gcc-plugin.h: Ditto. * gcse.c: Ditto. * generic-match-head.c: Ditto. * ggc-page.c: Ditto. * gimple-builder.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. * gimple-ssa-isolate-paths.c: Ditto. * gimple-ssa-strength-reduction.c: Ditto. * gimple-streamer-in.c: Ditto. * gimple-streamer-out.c: Ditto. * gimple-streamer.h: Ditto. * gimple-walk.c: Ditto. * gimple.c: Ditto. * gimplify-me.c: Ditto. * gimplify.c: Ditto. * graph.c: Ditto. * graphite-blocking.c: Ditto. * graphite-clast-to-gimple.c: Ditto. * graphite-dependences.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. * graphite.c: Ditto. * haifa-sched.c: Ditto. * hw-doloop.c: Ditto. * ifcvt.c: Ditto. * init-regs.c: Ditto. * internal-fn.c: Ditto. * ipa-cp.c: Ditto. * ipa-devirt.c: Ditto. * ipa-icf-gimple.c: Ditto. * ipa-icf.c: Ditto. * ipa-inline-analysis.c: Ditto. * ipa-inline.c: Ditto. * ipa-polymorphic-call.c: Ditto. * ipa-profile.c: Ditto. * ipa-prop.c: Ditto. * ipa-pure-const.c: Ditto. * ipa-reference.c: Ditto. * ipa-split.c: Ditto. * ipa-utils.c: Ditto. * ipa.c: Ditto. * ira-build.c: Ditto. * ira-color.c: Ditto. * ira-conflicts.c: Ditto. * ira-costs.c: Ditto. * ira-emit.c: Ditto. * ira-lives.c: Ditto. * ira.c: Ditto. * jump.c: Ditto. * lcm.c: Ditto. * loop-doloop.c: Ditto. * loop-init.c: Ditto. * loop-invariant.c: Ditto. * loop-iv.c: Ditto. * loop-unroll.c: Ditto. * lower-subreg.c: Ditto. * lra-assigns.c: Ditto. * lra-coalesce.c: Ditto. * lra-constraints.c: Ditto. * lra-eliminations.c: Ditto. * lra-lives.c: Ditto. * lra-spills.c: Ditto. * lra.c: Ditto. * lto-cgraph.c: Ditto. * lto-compress.c: Ditto. * lto-opts.c: Ditto. * lto-section-in.c: Ditto. * lto-section-out.c: Ditto. * lto-streamer-in.c: Ditto. * lto-streamer-out.c: Ditto. * lto-streamer.c: Ditto. * mcf.c: Ditto. * mode-switching.c: Ditto. * modulo-sched.c: Ditto. * omp-low.c: Ditto. * optabs.c: Ditto. * opts-global.c: Ditto. * passes.c: Ditto. * postreload-gcse.c: Ditto. * postreload.c: Ditto. * predict.c: Ditto. * print-rtl.c: Ditto. * profile.c: Ditto. * recog.c: Ditto. * ree.c: Ditto. * reg-stack.c: Ditto. * regcprop.c: Ditto. * regcprop.h: Ditto. * reginfo.c: Ditto. * regrename.c: Ditto. * regstat.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtlanal.c: Ditto. * sched-deps.c: Ditto. * sched-ebb.c: Ditto. * sched-int.h: Ditto. * sched-rgn.c: Ditto. * sched-vis.c: Ditto. * sel-sched-dump.c: Ditto. * sel-sched-ir.c: Ditto. * sel-sched-ir.h: Ditto. * sel-sched.c: Ditto. * sese.c: Ditto. * shrink-wrap.c: Ditto. * stack-ptr-mod.c: Ditto. * stmt.c: Ditto. * store-motion.c: Ditto. * symtab.c: Ditto. * toplev.c: Ditto. * tracer.c: Ditto. * trans-mem.c: Ditto. * tree-affine.c: Ditto. * tree-call-cdce.c: Ditto. * tree-cfg.c: Ditto. * tree-cfgcleanup.c: Ditto. * tree-chrec.c: Ditto. * tree-complex.c: Ditto. * tree-data-ref.c: Ditto. * tree-dfa.c: Ditto. * tree-eh.c: Ditto. * tree-emutls.c: Ditto. * tree-if-conv.c: Ditto. * tree-inline.c: Ditto. * tree-into-ssa.c: Ditto. * tree-loop-distribution.c: Ditto. * tree-nested.c: Ditto. * tree-nrv.c: Ditto. * tree-object-size.c: Ditto. * tree-outof-ssa.c: Ditto. * tree-parloops.c: Ditto. * tree-phinodes.c: Ditto. * tree-predcom.c: Ditto. * tree-pretty-print.c: Ditto. * tree-profile.c: Ditto. * tree-scalar-evolution.c: Ditto. * tree-sra.c: Ditto. * tree-ssa-address.c: Ditto. * tree-ssa-alias.c: Ditto. * tree-ssa-ccp.c: Ditto. * tree-ssa-coalesce.c: Ditto. * tree-ssa-copy.c: Ditto. * tree-ssa-copyrename.c: Ditto. * tree-ssa-dce.c: Ditto. * tree-ssa-dom.c: Ditto. * tree-ssa-dse.c: Ditto. * tree-ssa-forwprop.c: Ditto. * tree-ssa-ifcombine.c: Ditto. * tree-ssa-live.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.c: Ditto. * tree-ssa-math-opts.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: Ditto. * tree-ssa-structalias.c: Ditto. * tree-ssa-tail-merge.c: Ditto. * tree-ssa-ter.c: Ditto. * tree-ssa-threadedge.c: Ditto. * tree-ssa-threadupdate.c: Ditto. * tree-ssa-uncprop.c: Ditto. * tree-ssa-uninit.c: Ditto. * tree-ssa.c: Ditto. * tree-ssanames.c: Ditto. * tree-stdarg.c: Ditto. * tree-streamer-in.c: Ditto. * tree-streamer-out.c: Ditto. * tree-streamer.c: Ditto. * tree-switch-conversion.c: Ditto. * tree-tailcall.c: Ditto. * tree-vect-data-refs.c: Ditto. * tree-vect-generic.c: Ditto. * tree-vect-loop-manip.c: Ditto. * tree-vect-loop.c: Ditto. * tree-vect-patterns.c: Ditto. * tree-vect-slp.c: Ditto. * tree-vect-stmts.c: Ditto. * tree-vectorizer.c: Ditto. * tree-vrp.c: Ditto. * tree.c: Ditto. * tsan.c: Ditto. * ubsan.c: Ditto. * valtrack.c: Ditto. * valtrack.h: Ditto. * value-prof.c: Ditto. * var-tracking.c: Ditto. * varasm.c: Ditto. * varpool.c: Ditto. * vtable-verify.c: Ditto. * web.c: Ditto. * config/aarch64/aarch64-builtins.c: Ditto. * config/aarch64/aarch64.c: Ditto. * config/alpha/alpha.c: Ditto. * config/arc/arc.c: Ditto. * config/arm/arm.c: Ditto. * config/avr/avr.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.c: Ditto. * config/darwin.c: Ditto. * config/epiphany/epiphany.c: Ditto. * config/epiphany/mode-switch-use.c: Ditto. * config/epiphany/resolve-sw-modes.c: Ditto. * config/fr30/fr30.c: Ditto. * config/frv/frv.c: Ditto. * config/h8300/h8300.c: Ditto. * config/i386/i386.c: Ditto. * config/i386/winnt.c: Ditto. * config/ia64/ia64.c: Ditto. * config/iq2000/iq2000.c: Ditto. * config/lm32/lm32.c: Ditto. * config/m32c/m32c.c: Ditto. * config/m32r/m32r.c: Ditto. * config/m68k/m68k.c: Ditto. * config/mcore/mcore.c: Ditto. * config/mep/mep.c: Ditto. * config/microblaze/microblaze.c: Ditto. * config/mips/mips.c: Ditto. * config/mmix/mmix.c: Ditto. * config/mn10300/mn10300.c: Ditto. * config/moxie/moxie.c: Ditto. * config/msp430/msp430.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-auxiliary.c: Ditto. * config/nds32/nds32-memory-manipulation.c: Ditto. * config/nds32/nds32-pipelines-auxiliary.c: Ditto. * config/nds32/nds32-predicates.c: Ditto. * config/nds32/nds32.c: Ditto. * config/nios2/nios2.c: Ditto. * config/pa/pa.c: Ditto. * config/pdp11/pdp11.c: Ditto. * config/rl78/rl78.c: Ditto. * config/rs6000/rs6000.c: Ditto. * config/rx/rx.c: Ditto. * config/s390/s390.c: Ditto. * config/sh/sh-mem.cc: Ditto. * config/sh/sh.c: Ditto. * config/sh/sh_optimize_sett_clrt.cc: Ditto. * config/sh/sh_treg_combine.cc: Ditto. * config/sparc/sparc.c: Ditto. * config/spu/spu.c: Ditto. * config/stormy16/stormy16.c: Ditto. * config/tilegx/tilegx.c: Ditto. * config/tilepro/tilepro.c: Ditto. * config/v850/v850.c: Ditto. * config/vax/vax.c: Ditto. * config/xtensa/xtensa.c: Ditto. From-SVN: r216735
2014-10-27 13:41:01 +01:00
#include "cfgrtl.h"
#include "sched-int.h"
#include "cfgloop.h"
#include "expr.h"
#include "params.h"
#include "ddg.h"
Makefile.in: Adjust dependencies. 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in: Adjust dependencies. * tree-pass.h: Add new passes and passes formerly in tree-optimize.c. * basic-block.h (duplicate_computed_gotos): Remove, it is now static. * alias.c (rest_of_handle_cfg, pass_cfg): New. * bb-reorder.c (duplicate_computed_gotos): Make it static. * cfgexpand.c (tree_expand_cfg): Add code formerly at the beginning of rest_of_compilation. * bb-reorder.c (gate_duplicate_computed_gotos, pass_duplicate_computed_gotos, gate_handle_reorder_blocks, rest_of_handle_reorder_blocks, pass_reorder_blocks, gate_handle_partition_blocks, rest_of_handle_partition_blocks, pass_partition_blocks): New. * bt-load.c (gate_handle_branch_target_load_optimize, rest_of_handle_branch_target_load_optimize, pass_branch_target_load_optimize): New. * cfgcleanup.c (rest_of_handle_jump, pass_jump, rest_of_handle_jump2, pass_jump2): New. * cfglayout.c (pass_insn_locators_initialize): New. * cfgrtl.c (pass_free_cfg): New. * combine.c (gate_handle_combine, rest_of_handle_combine, pass_combine): New. * cse.c (gate_handle_cse, rest_of_handle_cse, pass_cse, gate_handle_cse2, rest_of_handle_cse2, pass_cse2): New. * emit-rtl.c (pass_unshare_all_rtl, pass_remove_unnecessary_notes): New. * except.c (pass_set_nothrow_function_flags, pass_convert_to_eh_region_ranges, gate_handle_eh, rest_of_handle_eh, pass_rtl_eh): New. * final.c (pass_compute_alignments, rest_of_handle_final, pass_final, rest_of_handle_shorten_branches, pass_shorten_branches, rest_of_clean_state, pass_clean_state): New. * flow.c (pass_recompute_reg_usage, gate_remove_death_notes, rest_of_handle_remove_death_notes, pass_remove_death_notes, rest_of_handle_life, pass_life, rest_of_handle_flow2, pass_flow2): New. * function.c (pass_instantiate_virtual_regs, pass_init_function, rest_of_handle_check_leaf_regs, pass_leaf_regs): New. * gcse.c (gate_handle_jump_bypass, rest_of_handle_jump_bypass, pass_jump_bypass, gate_handle_gcse, rest_of_handle_gcse, pass_gcse): New. * global.c (rest_of_handle_global_alloc, pass_global_alloc): New. * ifcvt.c (gate_handle_if_conversion, rest_of_handle_if_conversion, pass_rtl_ifcvt, gate_handle_if_after_combine, rest_of_handle_if_after_combine, pass_if_after_combine, gate_handle_if_after_reload, rest_of_handle_if_after_reload, pass_if_after_reload): New. * integrate.c (pass_initial_value_sets): New. * jump.c (pass_cleanup_barriers, purge_line_number_notes, pass_purge_lineno_notes): New. * mode-switching.c (rest_of_handle_mode_switching, pass_mode_switching): New. * local-alloc.c (rest_of_handle_local_alloc, pass_local_alloc): New. * loop-init.c (gate_handle_loop2, rest_of_handle_loop2, pass_loop2): New. * loop.c (gate_handle_loop_optimize, rest_of_handle_loop_optimize, pass_loop_optimize): New. * modulo-sched.c (gate_handle_sms, rest_of_handle_sms, pass_sms): New. * postreload-gcse.c (gate_handle_gcse2, rest_of_handle_gcse2, pass_gcse2): New. * postreload.c (gate_handle_postreload, rest_of_handle_postreload, pass_postreload_cse): New. * profile.c (gate_handle_profiling, pass_profiling, rest_of_handle_branch_prob, pass_branch_prob): New. * recog.c (pass pass_split_for_shorten_branches, gate_do_final_split, pass_split_before_regstack, gate_handle_split_before_regstack, gate_handle_peephole2, rest_of_handle_peephole2, pass_peephole2, rest_of_handle_split_all_insns, pass_split_all_insns): New. * reg-stack.c (gate_handle_stack_regs, rest_of_handle_stack_regs, pass_stack_regs): New. * regmove.c (gate_handle_regmove, rest_of_handle_regmove, pass_regmove, gate_handle_stack_adjustments, rest_of_handle_stack_adjustments, pass_stack_adjustments): New. * regrename.c (gate_handle_regrename, rest_of_handle_regrename, pass_regrename): New. * reorg.c (gate_handle_delay_slots, rest_of_handle_delay_slots, pass_delay_slots, gate_handle_machine_reorg, rest_of_handle_machine_reorg, pass_machine_reorg): New. * rtl.h (extern void purge_line_number_notes): New. * sched-rgn.c (gate_handle_sched, rest_of_handle_sched, gate_handle_sched2, rest_of_handle_sched2, pass_sched, pass_sched2): New. * tracer.c (gate_handle_tracer, rest_of_handle_tracer, pass_tracer): New. * value-prof.c (gate_handle_value_profile_transformations, rest_of_handle_value_profile_transformations, pass_value_profile_transformations): New. * var-tracking.c (gate_handle_var_tracking, pass_variable_tracking): New. * web.c (gate_handle_web, rest_of_handle_web, pass_web): New. * passes.c (open_dump_file, close_dump_file, rest_of_handle_final, rest_of_handle_delay_slots, rest_of_handle_stack_regs, rest_of_handle_variable_tracking, rest_of_handle_machine_reorg, rest_of_handle_old_regalloc, rest_of_handle_regrename, rest_of_handle_reorder_blocks, rest_of_handle_partition_blocks, rest_of_handle_sms, rest_of_handle_sched, rest_of_handle_sched2, rest_of_handle_gcse2, rest_of_handle_regmove, rest_of_handle_tracer, rest_of_handle_if_conversion, rest_of_handle_if_after_combine, rest_of_handle_if_after_reload, rest_of_handle_web, rest_of_handle_branch_prob, rest_of_handle_value_profile_transformations, rest_of_handle_cfg, rest_of_handle_jump_bypass, rest_of_handle_combine, rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2, rest_of_handle_gcse, rest_of_handle_loop_optimize, rest_of_handle_loop2, rest_of_handle_branch_target_load_optimize, rest_of_handle_mode_switching, rest_of_handle_jump, rest_of_handle_eh, rest_of_handle_stack_adjustments, rest_of_handle_flow2, rest_of_handle_jump2, rest_of_handle_peephole2, rest_of_handle_postreload, rest_of_handle_shorten_branches, rest_of_clean_state, rest_of_compilation): Remove. * cgraphunit.c (ipa_passes): Moved from tree-optimize.c. * passes.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list): Moved from tree-optimize.c. (init_optimization_passes): Moved from tree-optimize.c, adding the RTL optimizations. * tree-dump.h (dump_info_p, dump_flag): Moved from tree.h. * tree-optimize.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list, init_tree_optimization_passes, ipa_passes): Delete. * tree-pass.h (enum tree_dump_index): Moved from tree.h, removing the RTL dumps. (TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved from tree.h. (ipa_passes): Remove. (all_passes, all_ipa_passes, all_lowering_passes): Now extern. * tree.h (enum tree_dump_index, TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved to tree-pass.h. (dump_info_p, dump_flag): Moved to tree-dump.h. * Makefile.in: Adjust dependencies for tree-pretty-print.c, cgraph.c, opts.c. * passes.c (finish_optimization_passes): Use dump_begin and dump_end, TDI_end. (gate_rest_of_compilation): New. (pass_rest_of_compilation): Use it. (gate_postreload, pass_postreload): New. * toplev.c (general_init): Rename init_tree_optimization_passes. * toplev.h (init_tree_optimization_passes): Rename to init_optimizations_passes. * tree-dump.c (dump_flag): Make static. (dump_files): Remove RTL dumps. * tree-optimize.c (pass_all_optimizations, pass_early_local_passes, pass_cleanup_cfg, pass_free_cfg_annotations, pass_cleanup_cfg_post_optimizing, pass_free_datastructures, pass_init_datastructures, pass_fixup_cfg): Make non-static. * tree-pretty-print.c: Include tree-pass.h. * cgraph.c: Include tree-dump.h. cp: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (class.o, decl2.o): Adjust dependencies. * class.c: Include tree-dump.h. * decl2.c: Include tree-dump.h. java: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (parse.o): Adjust dependencies. * parse.y: Include tree-dump.h. From-SVN: r101627
2005-07-05 18:20:53 +02:00
#include "tree-pass.h"
#include "dbgcnt.h"
#include "loop-unroll.h"
#ifdef INSN_SCHEDULING
/* This file contains the implementation of the Swing Modulo Scheduler,
described in the following references:
[1] J. Llosa, A. Gonzalez, E. Ayguade, M. Valero., and J. Eckhardt.
Lifetime--sensitive modulo scheduling in a production environment.
IEEE Trans. on Comps., 50(3), March 2001
[2] J. Llosa, A. Gonzalez, E. Ayguade, and M. Valero.
Swing Modulo Scheduling: A Lifetime Sensitive Approach.
PACT '96 , pages 80-87, October 1996 (Boston - Massachusetts - USA).
The basic structure is:
1. Build a data-dependence graph (DDG) for each loop.
2. Use the DDG to order the insns of a loop (not in topological order
necessarily, but rather) trying to place each insn after all its
predecessors _or_ after all its successors.
3. Compute MII: a lower bound on the number of cycles to schedule the loop.
4. Use the ordering to perform list-scheduling of the loop:
1. Set II = MII. We will try to schedule the loop within II cycles.
2. Try to schedule the insns one by one according to the ordering.
For each insn compute an interval of cycles by considering already-
scheduled preds and succs (and associated latencies); try to place
the insn in the cycles of this window checking for potential
resource conflicts (using the DFA interface).
Note: this is different from the cycle-scheduling of schedule_insns;
here the insns are not scheduled monotonically top-down (nor bottom-
up).
3. If failed in scheduling all insns - bump II++ and try again, unless
II reaches an upper bound MaxII, in which case report failure.
5. If we succeeded in scheduling the loop within II cycles, we now
generate prolog and epilog, decrease the counter of the loop, and
perform modulo variable expansion for live ranges that span more than
II cycles (i.e. use register copies to prevent a def from overwriting
itself before reaching the use).
2011-07-31 12:21:01 +02:00
SMS works with countable loops (1) whose control part can be easily
decoupled from the rest of the loop and (2) whose loop count can
be easily adjusted. This is because we peel a constant number of
iterations into a prologue and epilogue for which we want to avoid
emitting the control part, and a kernel which is to iterate that
constant number of iterations less than the original loop. So the
control part should be a set of insns clearly identified and having
its own iv, not otherwise used in the loop (at-least for now), which
initializes a register before the loop to the number of iterations.
Currently SMS relies on the do-loop pattern to recognize such loops,
where (1) the control part comprises of all insns defining and/or
using a certain 'count' register and (2) the loop count can be
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: 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-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.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. * 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. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: 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-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.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-live.h: 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-operands.h: 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-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.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-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
adjusted by modifying this register prior to the loop.
TODO: Rely on cfgloop analysis instead. */
/* This page defines partial-schedule structures and functions for
modulo scheduling. */
typedef struct partial_schedule *partial_schedule_ptr;
typedef struct ps_insn *ps_insn_ptr;
/* The minimum (absolute) cycle that a node of ps was scheduled in. */
#define PS_MIN_CYCLE(ps) (((partial_schedule_ptr)(ps))->min_cycle)
/* The maximum (absolute) cycle that a node of ps was scheduled in. */
#define PS_MAX_CYCLE(ps) (((partial_schedule_ptr)(ps))->max_cycle)
/* Perform signed modulo, always returning a non-negative value. */
#define SMODULO(x,y) ((x) % (y) < 0 ? ((x) % (y) + (y)) : (x) % (y))
/* The number of different iterations the nodes in ps span, assuming
the stage boundaries are placed efficiently. */
#define CALC_STAGE_COUNT(max_cycle,min_cycle,ii) ((max_cycle - min_cycle \
+ 1 + ii - 1) / ii)
/* The stage count of ps. */
#define PS_STAGE_COUNT(ps) (((partial_schedule_ptr)(ps))->stage_count)
/* A single instruction in the partial schedule. */
struct ps_insn
{
/* Identifies the instruction to be scheduled. Values smaller than
the ddg's num_nodes refer directly to ddg nodes. A value of
X - num_nodes refers to register move X. */
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
int id;
/* The (absolute) cycle in which the PS instruction is scheduled.
Same as SCHED_TIME (node). */
int cycle;
/* The next/prev PS_INSN in the same row. */
ps_insn_ptr next_in_row,
prev_in_row;
};
/* Information about a register move that has been added to a partial
schedule. */
struct ps_reg_move_info
{
/* The source of the move is defined by the ps_insn with id DEF.
The destination is used by the ps_insns with the ids in USES. */
int def;
sbitmap uses;
/* The original form of USES' instructions used OLD_REG, but they
should now use NEW_REG. */
rtx old_reg;
rtx new_reg;
/* The number of consecutive stages that the move occupies. */
int num_consecutive_stages;
/* An instruction that sets NEW_REG to the correct value. The first
move associated with DEF will have an rhs of OLD_REG; later moves
use the result of the previous move. */
rtx_insn *insn;
};
/* Holds the partial schedule as an array of II rows. Each entry of the
array points to a linked list of PS_INSNs, which represents the
instructions that are scheduled for that row. */
struct partial_schedule
{
int ii; /* Number of rows in the partial schedule. */
int history; /* Threshold for conflict checking using DFA. */
/* rows[i] points to linked list of insns scheduled in row i (0<=i<ii). */
ps_insn_ptr *rows;
/* All the moves added for this partial schedule. Index X has
a ps_insn id of X + g->num_nodes. */
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
vec<ps_reg_move_info> reg_moves;
/* rows_length[i] holds the number of instructions in the row.
It is used only (as an optimization) to back off quickly from
trying to schedule a node in a full row; that is, to avoid running
through futile DFA state transitions. */
int *rows_length;
/* The earliest absolute cycle of an insn in the partial schedule. */
int min_cycle;
/* The latest absolute cycle of an insn in the partial schedule. */
int max_cycle;
ddg_ptr g; /* The DDG of the insns in the partial schedule. */
int stage_count; /* The stage count of the partial schedule. */
};
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: 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-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.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. * 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. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: 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-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.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-live.h: 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-operands.h: 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-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.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-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
static partial_schedule_ptr create_partial_schedule (int ii, ddg_ptr, int history);
static void free_partial_schedule (partial_schedule_ptr);
static void reset_partial_schedule (partial_schedule_ptr, int new_ii);
void print_partial_schedule (partial_schedule_ptr, FILE *);
static void verify_partial_schedule (partial_schedule_ptr, sbitmap);
static ps_insn_ptr ps_add_node_check_conflicts (partial_schedule_ptr,
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
int, int, sbitmap, sbitmap);
static void rotate_partial_schedule (partial_schedule_ptr, int);
void set_row_column_for_ps (partial_schedule_ptr);
static void ps_insert_empty_row (partial_schedule_ptr, int, sbitmap);
static int compute_split_row (sbitmap, int, int, int, ddg_node_ptr);
/* This page defines constants and structures for the modulo scheduling
driver. */
static int sms_order_nodes (ddg_ptr, int, int *, int *);
static void set_node_sched_params (ddg_ptr);
tree-vrp.c (execute_vrp): Do not pass dump argument to. * tree-vrp.c (execute_vrp): Do not pass dump argument to. loop_optimizer_init and loop_optimizer_finalize * tree-ssa-sink.c (execute_sink_code): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init, tree_ssa_loop_done): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Ditto. * sched-ebb.c: Include output.h. (schedule_ebbs): Do not use dump argument. * value-prof.h (struct profile_hooks): Remove profile_dump_file. * loop.c (loop_dump_stream): Removed. (loop_optimize, rest_of_handle_loop_optimize): Do not use dump argument. (scan_loop, move_movables, find_and_verify_loops, mark_loop_jump, emit_prefetch_instructions, loop_bivs_find, loop_bivs_check, final_biv_value, loop_biv_eliminable_p, loop_givs_rescan, loop_iterations, strength_reduce, record_biv, record_giv, final_giv_value, check_final_value, check_ext_dependent_givs, combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems, try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use dump_file instead of loop_dump_stream. * ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call argument dump_file. * reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use dump argument. * flow.c (life_analysis, rest_of_handle_life): Ditto. * haifa-sched.c: Include output.h (schedule_insns, sched_init): Do not use dump argument. * mode-switching.c (optimize_mode_switching): Ditto. * modulo-sched.c (stats_file): Removed. (print_node_sched_params): Do not call argument dump_file. (sms_schedule_by_order, loop_canon_p, sms_schedule, rest_of_handle_sms): Do not use dump argument. Use dump_file instead of stats_file. * cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not use dump argument. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize, rtl_loop_init, rtl_loop_done): Ditto. * global.c (global_alloc, rest_of_handle_global_alloc): Ditto. * predict.c (combine_predictions_for_bb, tree_estimate_probability): Ditto. * recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto. * lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto. * regmove.c (fixup_match_1, fixup_match_2, regmove_optimize, rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto. * emit-rtl.c (renumber_insns): Ditto. * cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr, expand_gimple_basic_block, tree_expand_cfg): Ditto. * regclass.c (regclass): Ditto. * tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts, remove_ssa_form, rewrite_out_of_ssa): Ditto. * reg-stack.c (compensate_edge, compensate_edges, convert_regs_1, convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs): Ditto. * sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto. * local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file to regclass. * gcse.c (gcse_file, debug_stderr): Removed. (gcse_main, bypass_jumps, rest_of_handle_jump_bypass, rest_of_handle_gcse): Do not use dump argument. (cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets, one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb, pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass, compute_code_hoist_vbeinout, compute_code_hoist_data, one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores, compute_store_table, build_store_vectors, insert_insn_start_bb, insert_store, remove_reachable_equiv_notes, replace_store_insn, store_motion): Use dump_file instead of gcse_file. * ipa-type-escape.c (type_escape_execute): Remove debugging comments. * profile.c (profile_dump_file): Removed. (branch_prob): Use dump_file instead of profile_dump_file. * ipa.c (cgraph_remove_unreachable_nodes): Do not call argument dump_file. * tree-ssa-copy.c (dump_copy_of): Ditto. * rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass dump file to life_analysis. * bt-load.c (branch_target_load_optimize): Ditto. * cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to renumber_insns. * rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs, regclass, dbr_schedule): Declaration changed. * sched-int.h (sched_init): Declaration changed. * tree-profile.c (tree_profile_dump_file): Removed. (tree_profile_hooks): Removed profile_dump_file hook. * rtl-profile (rtl_profile_dump_file): Removed. (rtl_profile_hooks): emoved profile_dump_file hook. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * c-gimplify.c (c_genericize): Do not call local variable dump_file. * tree-cfg.c (build_tree_cfg): Ditto. * Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency. * basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm): Declaration changed. * config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to life_analysis and schedule_insns. * config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to life_analysis. * config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to dbr_schedule. * config/mips/mips.c (mips_reorg): Ditto. * config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to schedule_ebbs. From-SVN: r110656
2006-02-06 19:20:47 +01:00
static partial_schedule_ptr sms_schedule_by_order (ddg_ptr, int, int, int *);
Work towards NEXT_INSN/PREV_INSN requiring insns as their params gcc/ 2014-08-28 David Malcolm <dmalcolm@redhat.com> * cfgexpand.c (pass_expand::execute): Strengthen local "after" from rtx to rtx_insn *. * cfgrtl.c (force_nonfallthru_and_redirect): Replace use of local rtx "note" with new local rtx_insn * "new_head" when calculating head insn of new basic block. * combine.c (combine_split_insns): Strengthen return type and local "ret" from rtx to rtx_insn *. (likely_spilled_retval_p): Likewise for locals "use" and "p". (try_combine): Eliminate local "m_split", splitting into new locals "m_split_insn" and "m_split_pat". (find_split_point): Strengthen local "seq" from rtx into rtx_insn *. * config/spu/spu.c (spu_machine_dependent_reorg): Likewise for locals "label", "branch". * config/spu/spu.md (define_expand "smulsi3_highpart"): Likewise for local "insn". (define_expand "umulsi3_highpart"): Likewise for local "insn". * dse.c (note_add_store_info): Likewise for fields "first", "current". (note_add_store): Likewise for local "insn". (emit_inc_dec_insn_before): Likewise for locals "insn", "new_insn", "cur". (find_shift_sequence): Likewise for locals "shift_seq", "insn". (replace_read): Likewise for locals "insns", "this_insn". * dwarf2cfi.c (dw_trace_info): Likewise for field "eh_head". (notice_eh_throw): Likewise for param "insn". (before_next_cfi_note): Likewise for return type, param, and local "prev". (connect_traces): Likewise for local "note". * emit-rtl.c (reset_all_used_flags): Likewise for local "p". (verify_rtl_sharing): Likewise. (unshare_all_rtl_in_chain): Likewise for param "insn". (get_first_nonnote_insn): Likewise for local "insn". (get_last_nonnote_insn): Likewise. Introduce local rtx_sequence * "seq" and use its methods to clarify things. (next_insn): Strengthen return type from rtx to rtx_insn *. Rename param "insn" to "uncast_insn" and reintroduce "insn" as a local rtx_insn * using a checked cast, dropping a checked cast made redundant by this change. Use a cast to and method of rtx_sequence to clarify the code. (previous_insn): Rename param "insn" to "uncast_insn" and reintroduce "insn" as a local rtx_insn * using a checked cast, dropping a checked cast made redundant by this change. Use a cast to and method of rtx_sequence to clarify the code. (next_nonnote_insn): Rename param "insn" to "uncast_insn" and reintroduce "insn" as a local rtx_insn * using a checked cast, dropping a checked cast made redundant by this change. (next_nonnote_insn_bb): Likewise. (prev_nonnote_insn): Likewise. (prev_nonnote_insn_bb): Likewise. (next_nondebug_insn): Likewise. (prev_nondebug_insn): Likewise. (next_nonnote_nondebug_insn): Likewise. (prev_nonnote_nondebug_insn): Likewise. (next_real_insn): Likewise. (prev_real_insn): Likewise. (next_active_insn): Likewise. (prev_active_insn): Likewise. (next_cc0_user): Likewise. Use rtx_sequence and a method for clarity. (prev_cc0_setter): Likewise. (try_split): Rename param "trial" to "uncast_trial" and reintroduce "insn" as a local rtx_insn * using a checked cast, dropping checked casts made redundant by this change. Strengthen locals "seq", "tem", "insn_last", "insn", "next" from rtx to rtx_insn *. (remove_insn): Rename param "insn" to "uncast_insn" and reintroduce "insn" as a local rtx_insn * using a checked cast. (emit_pattern_after_setloc): Likewise for param "after", as "uncast_after". (emit_pattern_after): Likewise. Strengthen local "prev" from rtx to rtx_insn *. (emit_pattern_before_setloc): Rename param "before" to "uncast_before" and reintroduce "before" as a local rtx_insn * using a checked cast. Strengthen locals "first", "last" from rtx to rtx_insn *. (emit_pattern_before): Likewise rename/cast param "before" to "uncast_before". Strengthen local "next" from rtx to rtx_insn *. * except.c (copy_reg_eh_region_note_forward): Strengthen param "first" and local "insn" from rtx to rtx_insn *. (copy_reg_eh_region_note_backward): Likewise for param "last" and local "insn". * expr.c (fixup_args_size_notes): Rename param "last" to "uncast_last" and reintroduce "last" as a local rtx_insn * using a checked cast. Strengthen local "insn" from rtx to rtx_insn *. * function.c (set_insn_locations): Strengthen param "insn" from rtx to rtx_insn *. (record_insns): Likewise for param "insns" and local "tmp". (active_insn_between): Rename param "tail" to "uncast_tail" and reintroduce "tail" as a local rtx_insn * using a checked cast. (thread_prologue_and_epilogue_insns): Split out top-level local rtx "seq" into three different rtx_insn * locals. Strengthen local "prologue_seq" from rtx to rtx_insn *. * gcse.c (insert_insn_end_basic_block): Strenghen local "insn" from rtx to rtx_insn *. * haifa-sched.c (initiate_bb_reg_pressure_info): Likewise. (priority): Likewise for locals "prev_first", "twin". (setup_insn_max_reg_pressure): Likewise for param "after". (sched_setup_bb_reg_pressure_info): Likewise. (no_real_insns_p): Strengthen params from const_rtx to const rtx_insn *. (schedule_block): Strengthen local "next_tail" from rtx to rtx_insn *. * ifcvt.c (find_active_insn_before): Strengthen return type and param "insn" from rtx to rtx_insn *. (find_active_insn_after): Likewise. (cond_exec_process_insns): Likewise for param "start" and local "insn". (cond_exec_process_if_block): Likewise for locals "then_start", "then_end", "else_start", "else_end", "insn", "start", "end", "from". (noce_process_if_block): Likewise for local "jump". (merge_if_block): Likewise for two locals named "end". (cond_exec_find_if_block): Likewise for local "last_insn". * jump.c (delete_related_insns): Rename param "insn" to "uncast_insn" and reintroduce "insn" as a local rtx_insn * using a checked cast. Strengthen local "p" from rtx to rtx_insn *. * lra-constraints.c (inherit_reload_reg): Replace NULL_RTX with NULL. (split_reg): Likewise. * lra.c (lra_process_new_insns): Likewise. * modulo-sched.c (permute_partial_schedule): Strengthen param "last" from rtx to rtx_insn *. * optabs.c (add_equal_note): Likewise for param "insns" and local "last_insn". (expand_binop_directly): Add checked casts to rtx_insn * within NEXT_INSN (pat) uses. (expand_unop_direct): Likewise. (maybe_emit_unop_insn): Likewise. * recog.c (peep2_attempt): Strengthen locals "last", "before_try", "x" from rtx to rtx_insn *. * reorg.c (optimize_skip): Strengthen return type and local "delay_list" from rtx to rtx_insn_list *. Strengthen param "insn" and locals "trial", "next_trial" from rtx to rtx_insn *. * resource.c (next_insn_no_annul): Strengthen return type and param "insn" from rtx to rtx_insn *. Use a cast to and method of rtx_sequence to clarify the code. (mark_referenced_resources): Add a checked cast to rtx_insn * within PREV_INSN (x). (find_dead_or_set_registers): Strengthen return type, param "target", locals "insn", "next", "jump_insn", "this_jump_insn" from rtx to rtx_insn *. Strengthen param "jump_target" from rtx * to rtx_insn **. (mark_target_live_regs): Strengthen params "insns" and "target", locals "insn", "jump_target", "start_insn", "stop_insn" from rtx to rtx_insn *. Use cast to and method of rtx_sequence to clarify the code. * resource.h (mark_target_live_regs): Strengthen params 1 and 2 from rtx to rtx_insn *. * rtl.h (copy_reg_eh_region_note_forward): Strengthen second param from rtx to rtx_insn *. (copy_reg_eh_region_note_backward): Likewise. (unshare_all_rtl_in_chain): Likewise for sole param. (dump_rtl_slim): Strengthen second and third params from const_rtx to const rtx_insn *. * sched-deps.c (sched_free_deps): Strengthen params "head" and "tail" and locals "insn", "next_tail" from rtx to rtx_insn *. * sched-ebb.c (init_ready_list): Strengthen locals "prev_head", "next_tail" from rtx to rtx_insn *. (begin_move_insn): Likewise for local "next". * sched-int.h (sched_free_deps): Likewise for first and second params. (no_real_insns_p): Strengthen both params from const_rtx to const rtx_insn *. (sched_setup_bb_reg_pressure_info): Strengthen second params from rtx to rtx_insn *. * sched-rgn.c (init_ready_list): Likewise for locals "prev_head", "next_tail". * sched-vis.c (dump_rtl_slim): Strengthen params "first", "last" and locals "insn", "tail" from const_rtx to const rtx_insn *. (rtl_dump_bb_for_graph): Strengthen local "insn" from rtx to rtx_insn *. (debug_rtl_slim): Strengthen params "first" and "last" from const_rtx to const rtx_insn *. * shrink-wrap.c (try_shrink_wrapping): Strengthen param "prologue_seq" and locals "seq", "p_insn" from rtx to rtx_insn *. (convert_to_simple_return): Likewise for param "returnjump". * shrink-wrap.h (try_shrink_wrapping): Likewise for param "prologue_seq". (convert_to_simple_return): Likewise for param "returnjump". * valtrack.c (propagate_for_debug): Likewise for params "insn", "last". * valtrack.h (propagate_for_debug): Likewise for second param. From-SVN: r214693
2014-08-28 22:45:40 +02:00
static void permute_partial_schedule (partial_schedule_ptr, rtx_insn *);
static void generate_prolog_epilog (partial_schedule_ptr, struct loop *,
rtx, rtx);
2011-08-03 09:59:23 +02:00
static int calculate_stage_count (partial_schedule_ptr, int);
static void calculate_must_precede_follow (ddg_node_ptr, int, int,
int, int, sbitmap, sbitmap, sbitmap);
static int get_sched_window (partial_schedule_ptr, ddg_node_ptr,
sbitmap, int, int *, int *, int *);
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
static bool try_scheduling_node_in_cycle (partial_schedule_ptr, int, int,
sbitmap, int *, sbitmap, sbitmap);
static void remove_node_from_ps (partial_schedule_ptr, ps_insn_ptr);
2011-08-03 09:59:23 +02:00
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
#define NODE_ASAP(node) ((node)->aux.count)
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
#define SCHED_PARAMS(x) (&node_sched_param_vec[x])
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
#define SCHED_TIME(x) (SCHED_PARAMS (x)->time)
#define SCHED_ROW(x) (SCHED_PARAMS (x)->row)
#define SCHED_STAGE(x) (SCHED_PARAMS (x)->stage)
#define SCHED_COLUMN(x) (SCHED_PARAMS (x)->column)
/* The scheduling parameters held for each node. */
typedef struct node_sched_params
{
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
int time; /* The absolute scheduling cycle. */
int row; /* Holds time % ii. */
int stage; /* Holds time / ii. */
/* The column of a node inside the ps. If nodes u, v are on the same row,
u will precede v if column (u) < column (v). */
int column;
} *node_sched_params_ptr;
/* The following three functions are copied from the current scheduler
code in order to use sched_analyze() for computing the dependencies.
They are used when initializing the sched_info structure. */
static const char *
Strengthen haifa_sched_info callbacks and 3 scheduler hooks gcc/ * target.def (reorder): Strengthen param "ready" of this DEFHOOK from rtx * to rtx_insn **. (reorder2): Likewise. (dependencies_evaluation_hook): Strengthen params "head", "tail" from rtx to rtx_insn *. * doc/tm.texi: Update mechanically for above change to target.def. * sched-int.h (note_list): Strengthen this variable from rtx to rtx_insn *. (remove_notes): Likewise for both params. (restore_other_notes): Likewise for return type and first param. (struct ready_list): Strengthen field "vec" from rtx * to rtx_insn **. (struct dep_replacement): Strenghten field "insn" from rtx to rtx_insn *. (struct deps_desc): Likewise for fields "last_debug_insn", "last_args_size". (struct haifa_sched_info): Likewise for callback field "can_schedule_ready_p"'s param, for first param of "new_ready" callback field, for both params of "rank" callback field, for first field of "print_insn" callback field (with a const), for both params of "contributes_to_priority" callback, for param of "insn_finishes_block_p" callback, for fields "prev_head", "next_tail", "head", "tail", for first param of "add_remove_insn" callback, for first param of "begin_schedule_ready" callback, for both params of "begin_move_insn" callback, and for second param of "advance_target_bb" callback. (add_dependence): Likewise for params 1 and 2. (sched_analyze): Likewise for params 2 and 3. (deps_analyze_insn): Likewise for param 2. (ready_element): Likewise for return type. (ready_lastpos): Strengthen return type from rtx * to rtx_insn **. (try_ready): Strenghten param from rtx to rtx_insn *. (sched_emit_insn): Likewise for return type. (record_delay_slot_pair): Likewise for params 1 and 2. (add_delay_dependencies): Likewise for param. (contributes_to_priority): Likewise for both params. (find_modifiable_mems): Likewise. * config/arm/arm.c (cortexa7_sched_reorder): Strengthen param "ready" from rtx * to rtx_insn **. Strengthen locals "insn", "first_older_only_insn" from rtx to rtx_insn *. (arm_sched_reorder): Strengthen param "ready" from rtx * to rtx_insn **. * config/c6x/c6x.c (struct c6x_sched_context): Strengthen field "last_scheduled_iter0" from rtx to rtx_insn *. (init_sched_state): Replace use of NULL_RTX with NULL for insn. (c6x_sched_reorder_1): Strengthen param "ready" and locals "e_ready", "insnp" from rtx * to rtx_insn **. Strengthen local "insn" from rtx to rtx_insn *. (c6x_sched_reorder): Strengthen param "ready" from rtx * to rtx_insn **. (c6x_sched_reorder2): Strengthen param "ready" and locals "e_ready", "insnp" from rtx * to rtx_insn **. Strengthen local "insn" from rtx to rtx_insn *. (c6x_variable_issue): Add a checked cast when assigning from insn to ss.last_scheduled_iter0. (split_delayed_branch): Strengthen param "insn" and local "i1" from rtx to rtx_insn *. (split_delayed_nonbranch): Likewise. (undo_split_delayed_nonbranch): Likewise for local "insn". (hwloop_optimize): Likewise for locals "seq", "insn", "prev", "entry_after", "end_packet", "head_insn", "tail_insn", "new_insns", "last_insn", "this_iter", "prev_stage_insn". Strengthen locals "orig_vec", "copies", "insn_copies" from rtx * to rtx_insn **. Remove now-redundant checked cast on last_insn, but add a checked cast on loop->start_label. Consolidate calls to avoid assigning result of gen_spkernel to "insn", now an rtx_insn *. * config/i386/i386.c (do_reorder_for_imul): Strengthen param "ready" from rtx * to rtx_insn **. Strengthen local "insn" from rtx to rtx_insn *. (swap_top_of_ready_list): Strengthen param "ready" from rtx * to rtx_insn **. Strengthen locals "top", "next" from rtx to rtx_insn *. (ix86_sched_reorder): Strengthen param "ready" from rtx * to rtx_insn **. Strengthen local "insn" from rtx to rtx_insn *. (add_parameter_dependencies): Strengthen params "call", "head" and locals "insn", "last", "first_arg" from rtx to rtx_insn *. (avoid_func_arg_motion): Likewise for params "first_arg", "insn". (add_dependee_for_func_arg): Likewise for param "arg" and local "insn". (ix86_dependencies_evaluation_hook): Likewise for params "head", "tail" and locals "insn", "first_arg". * config/ia64/ia64.c (ia64_dependencies_evaluation_hook): Likewise for params "head", "tail" and locals "insn", "next", "next_tail". (ia64_dfa_sched_reorder): Strengthen param "ready" and locals "e_ready", "insnp" from rtx * to rtx_insn **. Strengthen locals "insn", "lowest", "highest" from rtx to rtx_insn *. (ia64_sched_reorder): Strengthen param "ready" from rtx * to rtx_insn **. (ia64_sched_reorder2): Likewise. * config/mep/mep.c (mep_find_ready_insn): Strengthen return type and local "insn" from rtx to rtx_insn *. Strengthen param "ready" from rtx * to rtx_insn **. (mep_move_ready_insn): Strengthen param "ready" from rtx * to rtx_insn **. (mep_print_sched_insn): Strengthen param "insn" from rtx to rtx_insn *. (mep_sched_reorder): Strengthen param "ready" from rtx * to rtx_insn **. Strengthen locals "core_insn", "cop_insn" from rtx to rtx_insn *. * config/mips/mips.c (mips_promote_ready): Strengthen param "ready" from rtx * to rtx_insn **. Strengthen local "new_head" from rtx to rtx_insn *. (mips_maybe_swap_ready): Strengthen param "ready" from rtx * to rtx_insn **. Strengthen local "temp" from rtx to rtx_insn *. (mips_macc_chains_reorder): Strengthen param "ready" from rtx * to rtx_insn **. (vr4130_reorder): Likewise. (mips_74k_agen_reorder): Likewise. Strengthen local "insn" from rtx to rtx_insn *. (mips_sched_reorder_1): Strengthen param "ready" from rtx * to rtx_insn **. (mips_sched_reorder): Likewise. (mips_sched_reorder2): Likewise. * config/picochip/picochip.c (picochip_sched_reorder): Likewise. * config/rs6000/rs6000.c (rs6000_sched_reorder): Likewise. Strengthen local "tmp" from rtx to rtx_insn *. (rs6000_sched_reorder2): Likewise. * config/s390/s390.c (s390_z10_prevent_earlyload_conflicts): Likewise. Update sizeof(rtx) to sizeof(rtx_insn *) in memmove. (s390_sched_reorder): Strengthen param "ready" from rtx * to rtx_insn **. Strengthen local "tmp" from rtx to rtx_insn *. * config/sh/sh.c (rank_for_reorder): Strengthen locals "tmp", "tmp2" from rtx to rtx_insn *. (swap_reorder): Strengthen param "a" from rtx * to rtx_insn **. Strengthen local "insn" from rtx to rtx_insn *. (ready_reorder): Strengthen param "ready" from rtx * to rtx_insn **. Update sizeof(rtx) to sizeof(rtx_insn *) in qsort. (sh_reorder): Strengthen param "ready" from rtx * to rtx_insn **. (sh_reorder2): Likewise. * config/spu/spu.c (spu_sched_reorder): Likewise. Strengthen local "insn" from rtx to rtx_insn *. * haifa-sched.c (note_list): Strengthen this variable from rtx to rtx_insn *. (scheduled_insns): Strengthen this variable from vec<rtx> to vec<rtx_insn *>. (set_modulo_params): Likewise for locals "i1", "i2". (record_delay_slot_pair): Likewise for params "i1", "i2". (add_delay_dependencies): Likewise for param "insn". (cond_clobbered_p): Likewise. (recompute_todo_spec): Likewise for local "prev". (last_scheduled_insn): Likewise for this variable. (nonscheduled_insns_begin): Likewise. (model_set_excess_costs): Strengthen param "insns" from rtx * to rtx_insn **. (rank_for_schedule): Strengthen locals "tmp", "tmp2" from rtx to rtx_insn *. (swap_sort): Strengthen param "a" from rtx * to rtx_insn **. Strengthen local "insn" from rtx to rtx_insn *. (queue_insn): Strengthen param "insn" from rtx to rtx_insn *. (ready_lastpos): Strengthen return type from rtx * to rtx_insn **. (ready_add): Strengthen param "insn" from rtx to rtx_insn *. (ready_remove_first): Likewise for return type and local "t". (ready_element): Likewise for return type. (ready_remove): Likewise for return type and local "t". (ready_sort): Strengthen local "first" from rtx * to rtx_insn **. (check_clobbered_conditions): Strengthen local "x" from rtx to rtx_insn *, adding a checked cast. (schedule_insn): Likewise for param "insn". (remove_notes): Likewise for params "head", "tail" and locals "next_tail", "insn", "next". (struct haifa_saved_data): Likewise for fields "last_scheduled_insn", "nonscheduled_insns_begin". (save_backtrack_point): Update for change to field "vec" of struct ready_list. (toggle_cancelled_flags): Strengthen local "first" from rtx * to rtx_insn **. (restore_last_backtrack_point): Likewise. Strengthen local "insn" from rtx to rtx_insn * (resolve_dependencies): Strengthen param "insn" from rtx to rtx_insn * (restore_other_notes): Likewise for return type, for param "head" and local "note_head". (undo_all_replacements): Likewise for local "insn". (first_nonscheduled_insn): Likewise for return type and local "insn". (queue_to_ready): Likewise for local "insn", adding checked casts. (early_queue_to_ready): Likewise for local "insn". (debug_ready_list_1): Strengthen local "p" from rtx * to rtx_insn **. (move_insn): Strengthen param "insn" and local "note" from rtx to rtx_insn * (insn_finishes_cycle_p): Likewise for param "insn". (max_issue): Likewise for local "insn". (choose_ready): Likewise. Strengthen param "insn_ptr" from rtx * to rtx_insn **. (commit_schedule): Strengthen param "prev_head" and local "insn" from rtx to rtx_insn * (prune_ready_list): Likewise for local "insn". (schedule_block): Likewise for locals "prev_head", "head", "tail", "skip_insn", "insn", "failed_insn", "x", adding a checked cast. (set_priorities): Likewise for local "prev_head". (try_ready): Likewise for param "next". (fix_tick_ready): Likewise. (change_queue_index): Likewise. (sched_extend_ready_list): Update for change to field "vec" of struct ready_list. (generate_recovery_code): Strengthen param "insn" from rtx to rtx_insn *. (begin_speculative_block): Likewise. (create_check_block_twin): Likewise for param "insn" and locals "label", "check", "twin". Introduce local "check_pat" to avoid "check" being used as a plain rtx before being used as an insn. (fix_recovery_deps): Add a checked cast to rtx_insn * when extracting elements from ready_list. (sched_remove_insn): Strengthen param "insn" from rtx to rtx_insn *. (sched_emit_insn): Likewise for return type. (ready_remove_first_dispatch): Likewise for return type and local "insn". * hw-doloop.c (discover_loop): Add a checked cast to rtx_insn *. * modulo-sched.c (sms_print_insn): Strengthen from const_rtx to const rtx_insn *. * sched-deps.c (add_dependence): Strengthen params "con", "pro" from rtx to rtx_insn *. (add_dependence_list): Likewise for param "insn". Add a checked cast. (add_dependence_list_and_free): Strengthen param "insn" from rtx to rtx_insn *. Strengthen param "list_p" from rtx * to rtx_insn **. (chain_to_prev_insn): Strengthen param "insn" and locals "prec_nonnote", "i" from rtx to rtx_insn *. (flush_pending_lists): Likewise for param "insn". (cur_insn): Likewise for this variable. (haifa_start_insn): Add a checked cast. (note_dep): Strengthen param "e" from rtx to rtx_insn *. (sched_analyze_reg): Likewise for param "insn". (sched_analyze_1): Likewise. (sched_analyze_2): Likewise. Add checked casts. (sched_analyze_insn): Likewise. Also for local "prev". (deps_analyze_insn): Likewise for param "insn". (sched_analyze): Likewise for params "head", "tail" and local "insn". (add_dependence_1): Likewise for params "insn", "elem". (struct mem_inc_info): Likewise for fields "inc_insn", "mem_insn". (parse_add_or_inc): Likewise for param "insn". (find_inc): Likewise for local "inc_cand". (find_modifiable_mems): Likewise for params "head", "tail" and locals "insn", "next_tail". * sched-ebb.c (init_ready_list): Likewise for local "insn". (begin_schedule_ready): Likewise for param "insn". (begin_move_insn): Likewise for params "insn" and "last". (ebb_print_insn): Strengthen param "insn" from const_rtx to const rtx_insn *. (rank): Strengthen params "insn1", "insn2" from rtx to rtx_insn *. (ebb_contributes_to_priority): Likewise for params "next", "insn". (ebb_add_remove_insn): Likewise for param "insn". (advance_target_bb): Likewise. * sched-rgn.c (rgn_estimate_number_of_insns): Likewise for local "insn". (check_live): Likewise for param "insn". (init_ready_list): Likewise for local "insn". (can_schedule_ready_p): Likewise for param "insn". (begin_schedule_ready): Likewise. (new_ready): Likewise for param "next". (rgn_print_insn): Likewise for param "insn". (rgn_rank): Likewise for params "insn1", "insn2". (contributes_to_priority): Likewise for params "next", "insn". (rgn_insn_finishes_block_p): Likewise for param "insn". (add_branch_dependences): Likewise for params "head", "tail" and locals "insn", "last". (rgn_add_remove_insn): Likewise for param "insn". (advance_target_bb): Likewise. * sel-sched-dump.c (sel_print_insn): Strengthen param "insn" from const_rtx to const rtx_insn *. * sel-sched-dump.h (sel_print_insn): Likewise. * sel-sched-ir.c (advance_deps_context): Add a checked cast. (deps_init_id): Likewise. * sel-sched.c (convert_vec_av_set_to_ready): Likewise. (invoke_reorder_hooks): Strengthen local "arr" from rtx * to rtx_insn **. From-SVN: r214481
2014-08-25 23:19:23 +02:00
sms_print_insn (const rtx_insn *insn, int aligned ATTRIBUTE_UNUSED)
{
static char tmp[80];
sprintf (tmp, "i%4d", INSN_UID (insn));
return tmp;
}
static void
compute_jump_reg_dependencies (rtx insn ATTRIBUTE_UNUSED,
regset used ATTRIBUTE_UNUSED)
{
}
sel-sched.h, [...]: New files. 2008-08-31 Andrey Belevantsev <abel@ispras.ru> Dmitry Melnik <dm@ispras.ru> Dmitry Zhurikhin <zhur@ispras.ru> Alexander Monakov <amonakov@ispras.ru> Maxim Kuvyrkov <maxim@codesourcery.com> * sel-sched.h, sel-sched-dump.h, sel-sched-ir.h, sel-sched.c, sel-sched-dump.c, sel-sched-ir.c: New files. * Makefile.in (OBJS-common): Add selective scheduling object files. (sel-sched.o, sel-sched-dump.o, sel-sched-ir.o): New entries. (SEL_SCHED_IR_H, SEL_SCHED_DUMP_H): New entries. (sched-vis.o): Add dependency on $(INSN_ATTR_H). * cfghooks.h (get_cfg_hooks, set_cfg_hooks): New prototypes. * cfghooks.c (get_cfg_hooks, set_cfg_hooks): New functions. (make_forwarder_block): Update loop latch if we have redirected the loop latch edge. * cfgloop.c (get_loop_body_in_custom_order): New function. * cfgloop.h (LOOPS_HAVE_FALLTHRU_PREHEADERS): New enum field. (CP_FALLTHRU_PREHEADERS): Likewise. (get_loop_body_in_custom_order): Declare. * cfgloopmanip.c (has_preds_from_loop): New. (create_preheader): Honor CP_FALLTHRU_PREHEADERS. Assert that the preheader edge will be fall thru when it is set. * common.opt (fsel-sched-bookkeeping, fsel-sched-pipelining, fsel-sched-pipelining-outer-loops, fsel-sched-renaming, fsel-sched-substitution, fselective-scheduling): New flags. * cse.c (hash_rtx_cb): New. (hash_rtx): Use it. * dbgcnt.def (sel_sched_cnt, sel_sched_region_cnt, sel_sched_insn_cnt): New counters. * final.c (compute_alignments): Export. Free dominance info after loop_optimizer_finalize. * genattr.c (main): Output maximal_insn_latency prototype. * genautomata.c (output_default_latencies): New. Factor its code from ... (output_internal_insn_latency_func): ... here. (output_internal_maximal_insn_latency_func): New. (output_maximal_insn_latency_func): New. * hard-reg-set.h (UHOST_BITS_PER_WIDE_INT): Define unconditionally. (struct hard_reg_set_iterator): New. (hard_reg_set_iter_init, hard_reg_set_iter_set, hard_reg_set_iter_next): New functions. (EXECUTE_IF_SET_IN_HARD_REG_SET): New macro. * lists.c (remove_free_INSN_LIST_node, remove_free_EXPR_LIST_node): New functions. * loop-init.c (loop_optimizer_init): When LOOPS_HAVE_FALLTHRU_PREHEADERS, set CP_FALLTHRU_PREHEADERS when calling create_preheaders. (loop_optimizer_finalize): Do not verify flow info after reload. * recog.c (validate_replace_rtx_1): New parameter simplify. Default it to true. Update all uses. Factor out simplifying code to ... (simplify_while_replacing): ... this new function. (validate_replace_rtx_part, validate_replace_rtx_part_nosimplify): New. * recog.h (validate_replace_rtx_part, validate_replace_rtx_part_nosimplify): Declare. * rtl.c (rtx_equal_p_cb): New. (rtx_equal_p): Use it. * rtl.h (rtx_equal_p_cb, hash_rtx_cb): Declare. (remove_free_INSN_LIST_NODE, remove_free_EXPR_LIST_node, debug_bb_n_slim, debug_bb_slim, print_rtl_slim): Likewise. * vecprim.h: Add a vector type for unsigned int. * haifa-sched.c: Include vecprim.h and cfgloop.h. (issue_rate, sched_verbose_param, note_list, dfa_state_size, ready_try, cycle_issued_insns, spec_info): Make global. (readyp): Initialize. (dfa_lookahead): New global variable. (old_max_uid, old_last_basic_block): Remove. (h_i_d): Make it a vector. (INSN_TICK, INTER_TICK, QUEUE_INDEX, INSN_COST): Make them work through HID macro. (after_recovery, adding_bb_to_current_region_p): New variables to handle correct insertion of the recovery code. (struct ready_list): Move declaration to sched-int.h. (rgn_n_insns): Removed. (rtx_vec_t): Move to sched-int.h. (find_insn_reg_weight): Remove. (find_insn_reg_weight1): Rename to find_insn_reg_weight. (haifa_init_h_i_d, haifa_finish_h_i_d): New functions to initialize / finalize haifa instruction data. (extend_h_i_d, init_h_i_d): Rewrite. (unlink_other_notes): Move logic to add_to_note_list. Handle selective scheduler. (ready_lastpos, ready_element, ready_sort, reemit_notes, find_fallthru_edge): Make global, remove static prototypes. (max_issue): Make global. Add privileged_n and state parameters. Use them. (extend_global, extend_all): Removed. (init_before_recovery): Add new param. Fix the handling of the case when we insert a recovery code before the EXIT which has a predecessor with a fallthrough edge to it. (create_recovery_block): Make global. Rename to sched_create_recovery_block. Update. (change_pattern): Rename to sched_change_pattern. Make global. (speculate_insn): Rename to sched_speculate_insn. Make global. Split haifa-specific functionality into ... (haifa_change_pattern): New static function. (sched_extend_bb): New static function. (sched_init_bbs): New function. (current_sched_info): Change type to struct haifa_sched_info. (insn_cost): Adjust for selective scheduling. (dep_cost_1): New function. Move logic from ... (dep_cost): ... here. (dep_cost): Use dep_cost_1. (contributes_to_priority_p): Use sched_deps_info instead of current_sched_info. (priority): Adjust to work with selective scheduling. Process the corner case when all dependencies don't contribute to priority. (rank_for_schedule): Use ds_weak instead of dep_weak. (advance_state): New function. Move logic from ... (advance_one_cycle): ... here. (add_to_note_list, concat_note_lists): New functions. (rm_other_notes): Make static. Adjust for selective scheduling. (remove_notes, restore_other_notes): New functions. (move_insn): Add two arguments. Update assert. Don't call reemit_notes. (choose_ready): Remove lookahead variable, use dfa_lookahead. Remove more_issue, max_points. Move the code to initialize max_lookahead_tries to max_issue. (schedule_block): Remove rgn_n_insns1 parameter. Don't allocate ready. Adjust use of move_insn. Call restore_other_notes. (luid): Remove. (sched_init, sched_finish): Move Haifa-specific initialization/ finalization to ... (haifa_sched_init, haifa_sched_finish): ... respectively. New functions. (setup_sched_dump): New function. (haifa_init_only_bb): New static function. (haifa_speculate_insn): New static function. (try_ready): Use haifa_* instead of speculate_insn and change_pattern. (extend_ready, extend_all): Remove. (sched_extend_ready_list, sched_finish_ready_list): New functions. (create_check_block_twin, add_to_speculative_block): Use haifa_insns_init instead of extend_global. Update to use new initialization functions. Change parameter. Factor out code from create_check_block_twin to ... (sched_create_recovery_edges) ... this new function. (add_block): Remove. (sched_scan_info): New. (extend_bb): Use sched_scan_info. (init_bb, extend_insn, init_insn, init_insns_in_bb, sched_scan): New static functions for walking through scheduling region. (sched_luids): New vector variable to replace uid_to_luid. (luids_extend_insn): New function. (sched_max_luid): New variable. (luids_init_insn): New function. (sched_init_luids, sched_finish_luids): New functions. (insn_luid): New debug function. (sched_extend_target): New function. (haifa_init_insn): New static function. (sched_init_only_bb): New hook. (sched_split_block): New hook. (sched_split_block_1): New function. (sched_create_empty_bb): New hook. (sched_create_empty_bb_1): New function. (common_sched_info, ready): New global variables. (current_sched_info_var): Remove. (move_block_after_check): Use common_sched_info. (haifa_luid_for_non_insn): New static function. (init_before_recovery): Use haifa_init_only_bb instead of add_block. (increase_insn_priority): New. * modulo-sched.c: (issue_rate): Remove static declaration. (sms_sched_info): Change type to haifa_sched_info. (sms_sched_deps_info, sms_common_sched_info): New variables. (setup_sched_infos): New. (sms_schedule): Initialize them. Call haifa_sched_init/finish. Do not call regstat_free_calls_crossed. (sms_print_insn): Use const_rtx. * params.def (PARAM_MAX_PIPELINE_REGION_BLOCKS, PARAM_MAX_PIPELINE_REGION_INSNS, PARAM_SELSCHED_MAX_LOOKAHEAD, PARAM_SELSCHED_MAX_SCHED_TIMES, PARAM_SELSCHED_INSNS_TO_RENAME, PARAM_SCHED_MEM_TRUE_DEP_COST): New. * sched-deps.c (sched_deps_info): New. Update all relevant uses of current_sched_info to use it. (enum reg_pending_barrier_mode): Move to sched-int.h. (h_d_i_d): New variable. Initialize to NULL. ({true, output, anti, spec, forward}_dependency_cache): Initialize to NULL. (estimate_dep_weak): Remove static declaration. (sched_has_condition_p): New function. Adjust users of sched_get_condition to use it instead. (conditions_mutex_p): Add arguments indicating which conditions are reversed. Use them. (sched_get_condition_with_rev): Rename from sched_get_condition. Add argument to indicate whether returned condition is reversed. Do not generate new rtx when condition should be reversed; indicate it by setting new argument instead. (add_dependence_list_and_free): Add deps parameter. Update all users. Do not free dependence list when deps context is readonly. (add_insn_mem_dependence, flush_pending_lists): Adjust for readonly contexts. (remove_from_dependence_list, remove_from_both_dependence_lists): New. (remove_from_deps): New. Use the above functions. (cur_insn, can_start_lhs_rhs_p): New static variables. (add_or_update_back_dep_1): Initialize present_dep_type. (haifa_start_insn, haifa_finish_insn, haifa_note_reg_set, haifa_note_reg_clobber, haifa_note_reg_use, haifa_note_mem_dep, haifa_note_dep): New functions implementing dependence hooks for the Haifa scheduler. (note_reg_use, note_reg_set, note_reg_clobber, note_mem_dep, note_dep): New functions. (ds_to_dt, extend_deps_reg_info, maybe_extend_reg_info_p): New functions. (init_deps): Initialize last_reg_pending_barrier and deps->readonly. (free_deps): Initialize deps->reg_last. (sched_analyze_reg, sched_analyze_1, sched_analyze_2, sched_analyze_insn): Update to use dependency hooks infrastructure and readonly contexts. (deps_analyze_insn): New function. Move part of logic from ... (sched_analyze): ... here. Also move some logic to ... (deps_start_bb): ... here. New function. (add_forw_dep, delete_forw_dep): Guard use of INSN_DEP_COUNT with sel_sched_p. (sched_deps_init): New function. Move code from ... (init_dependency_caches): ... here. Remove. (init_deps_data_vector): New. (sched_deps_finish): New function. Move code from ... (free_dependency_caches): ... here. Remove. (init_deps_global, finish_deps_global): Adjust for use with selective scheduling. (get_dep_weak): Move logic to ... (get_dep_weak_1): New function. (ds_merge): Move logic to ... (ds_merge_1): New static function. (ds_full_merge, ds_max_merge, ds_get_speculation_types): New functions. (ds_get_max_dep_weak): New function. * sched-ebb.c (sched_n_insns): Rename to sched_rgn_n_insns. (n_insns): Rename to rgn_n_insns. (debug_ebb_dependencies): New function. (init_ready_list): Use it. (begin_schedule_ready): Use sched_init_only_bb. (ebb_print_insn): Indicate when an insn starts a new cycle. (contributes_to_priority, compute_jump_reg_dependencies, add_remove_insn, fix_recovery_cfg): Add ebb_ prefix to function names. (add_block1): Remove to ebb_add_block. (ebb_sched_deps_info, ebb_common_sched_info): New variables. (schedule_ebb): Initialize them. Use remove_notes instead of rm_other_notes. Use haifa_local_init/finish. (schedule_ebbs): Use haifa_sched_init/finish. * sched-int.h: Include vecprim.h, remove rtl.h. (struct ready_list): Delete declaration. (sched_verbose_param, enum sched_pass_id_t, bb_vec_t, insn_vec_t, rtx_vec_t): New. (struct sched_scan_info_def): New structure. (sched_scan_info, sched_scan, sched_init_bbs, sched_init_luids, sched_finish_luids, sched_extend_target, haifa_init_h_i_d, haifa_finish_h_i_d): Declare. (struct common_sched_info_def): New. (common_sched_info, haifa_common_sched_info, sched_emulate_haifa_p): Declare. (sel_sched_p): New. (sched_luids): Declare. (INSN_LUID, LUID_BY_UID, SET_INSN_LUID): Declare. (sched_max_luid, insn_luid): Declare. (note_list, remove_notes, restore_other_notes, bb_note): Declare. (sched_insns_init, sched_insns_finish, xrecalloc, reemit_notes, print_insn, print_pattern, print_value, haifa_classify_insn, sel_find_rgns, sel_mark_hard_insn, dfa_state_size, advance_state, setup_sched_dump, sched_init, sched_finish, sel_insn_is_speculation_check): Export. (struct ready_list): Move from haifa-sched.c. (ready_try, ready, max_issue): Export. (ebb_compute_jump_reg_dependencies, find_fallthru_edge, sched_init_only_bb, sched_split_block, sched_split_block_1, sched_create_empty_bb, sched_create_empty_bb_1, sched_create_recovery_block, sched_create_recovery_edges): Export. (enum reg_pending_barrier_mode): Export. (struct deps): New fields `last_reg_pending_barrier' and `readonly'. (deps_t): New. (struct sched_info): Rename to haifa_sched_info. Use const_rtx for print_insn field. Move add_block and fix_recovery_cfg to common_sched_info_def. Move compute_jump_reg_dependencies, use_cselib ... (struct sched_deps_info_def): ... this new structure. (sched_deps_info): Declare. (struct spec_info_def): Remove weakness_cutoff, add data_weakness_cutoff and control_weakness_cutoff. (spec_info): Declare. (struct _haifa_deps_insn_data): Split from haifa_insn_data. Add dep_count field. (struct haifa_insn_data): Rename to struct _haifa_insn_data. (haifa_insn_data_def, haifa_insn_data_t): New typedefs. (current_sched_info): Change type to struct haifa_sched_info. (haifa_deps_insn_data_def, haifa_deps_insn_data_t): New typedefs. (h_d_i_d): New variable. (HDID): New accessor macro. (h_i_d): Change type to VEC (haifa_insn_data_def, heap) *. (HID): New accessor macro. Rewrite h_i_d accessor macros through HID and HDID. (IS_SPECULATION_CHECK_P): Update for selective scheduler. (enum SCHED_FLAGS): Update for selective scheduler. (enum SPEC_SCHED_FLAGS): New flag SEL_SCHED_SPEC_DONT_CHECK_CONTROL. (init_dependency_caches, free_dependency_caches): Delete declarations. (deps_analyze_insn, remove_from_deps, get_dep_weak_1, estimate_dep_weak, ds_full_merge, ds_max_merge, ds_weak, ds_get_speculation_types, ds_get_max_dep_weak, sched_deps_init, sched_deps_finish, haifa_note_reg_set, haifa_note_reg_use, haifa_note_reg_clobber, maybe_extend_reg_info_p, deps_start_bb, ds_to_dt): Export. (rm_other_notes): Delete declaration. (schedule_block): Remove one argument. (cycle_issued_insns, issue_rate, dfa_lookahead, ready_sort, ready_element, ready_lastpos, sched_extend_ready_list, sched_finish_ready_list, sched_change_pattern, sched_speculate_insn, concat_note_lists): Export. (struct region): Move from sched-rgn.h. (nr_regions, rgn_table, rgn_bb_table, block_to_bb, containing_rgn, RGN_NR_BLOCKS, RGN_BLOCKS, RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB, BLOCK_TO_BB, CONTAINING_RGN): Export. (ebb_head, BB_TO_BLOCK, EBB_FIRST_BB, EBB_LAST_BB, INSN_BB): Likewise. (current_nr_blocks, current_blocks, target_bb): Likewise. (dep_cost_1, sched_is_disabled_for_current_region_p, sched_rgn_init, sched_rgn_finish, rgn_setup_region, sched_rgn_compute_dependencies, sched_rgn_local_init, extend_regions, rgn_make_new_region_out_of_new_block, compute_priorities, debug_rgn_dependencies, free_rgn_deps, contributes_to_priority, extend_rgns, deps_join rgn_setup_common_sched_info, rgn_setup_sched_infos, debug_regions, debug_region, dump_region_dot, dump_region_dot_file, haifa_sched_init, haifa_sched_finish): Export. (get_rgn_sched_max_insns_priority, sel_add_to_insn_priority, increase_insn_priority): Likewise. * sched-rgn.c: Include sel-sched.h. (ref_counts): New static variable. Use it ... (INSN_REF_COUNT): ... here. Rewrite and move closer to uses. (FED_BY_SPEC_LOAD, IS_LOAD_INSN): Rewrite to use HID accessor macro. (sched_is_disabled_for_current_region_p): Delete static declaration. (struct region): Move to sched-int.h. (nr_regions, rgn_table, rgn_bb_table, block_to_bb, containing_rgn, ebb_head): Define and initialize. (RGN_NR_BLOCKS, RGN_BLOCKS, RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB, BLOCK_TO_BB, CONTAINING_RGN, debug_regions, extend_regions, BB_TO_BLOCK, EBB_FIRST_BB, EBB_LAST_BB): Move to sched-int.h. (find_single_block_region): Add new argument to indicate that EBB regions should be constructed. (debug_live): Delete declaration. (current_nr_blocks, current_blocks, target_bb): Remove static qualifiers. (compute_dom_prob_ps, check_live, update_live, set_spec_fed): Delete declaration. (init_regions): Delete declaration. (debug_region, bb_in_region_p, dump_region_dot_file, dump_region_dot, rgn_estimate_number_of_insns): New. (too_large): Use estimate_number_of_insns. (haifa_find_rgns): New. Move the code from ... (find_rgns): ... here. Call either sel_find_rgns or haifa_find_rgns. (free_trg_info): New. (compute_trg_info): Allocate candidate tables here instead of ... (init_ready_list): ... here. (rgn_print_insn): Use const_rtx. (contributes_to_priority, extend_regions): Delete static declaration. (add_remove_insn, fix_recovery_cfg): Add rgn_ to function names. (add_block1): Rename to rgn_add_block. (debug_rgn_dependencies): Delete static qualifier. (new_ready): Use sched_deps_info. Simplify. (rgn_common_sched_info, rgn_const_sched_deps_info, rgn_const_sel_sched_deps_info, rgn_sched_deps_info, rgn_sched_info): New. (region_sched_info): Rename to rgn_const_sched_info. (deps_join): New, extracted from ... (propagate_deps): ... here. (compute_block_dependences, debug_dependencies): Update for selective scheduling. (free_rgn_deps, compute_priorities): New functions. (sched_rgn_init, sched_rgn_finish, rgn_setup_region, sched_rgn_compute_dependencies): New functions. (schedule_region): Use them. (sched_rgn_local_init, sched_rgn_local_free, sched_rgn_local_finish, rgn_setup_common_sched_info, rgn_setup_sched_infos): New functions. (schedule_insns): Call new functions that were split out. (rgn_make_new_region_out_of_new_block): New. (get_rgn_sched_max_insns_priority): New. (rest_of_handle_sched, rest_of_handle_sched2): Call selective scheduling when appropriate. * sched-vis.c: Include insn-attr.h. (print_value, print_pattern): Make global. (print_rtl_slim, debug_bb_slim, debug_bb_n_slim): New functions. * target-def.h (TARGET_SCHED_ADJUST_COST_2, TARGET_SCHED_ALLOC_SCHED_CONTEXT, TARGET_SCHED_INIT_SCHED_CONTEXT, TARGET_SCHED_SET_SCHED_CONTEXT, TARGET_SCHED_CLEAR_SCHED_CONTEXT, TARGET_SCHED_FREE_SCHED_CONTEXT, TARGET_SCHED_GET_INSN_CHECKED_DS, TARGET_SCHED_GET_INSN_SPEC_DS, TARGET_SCHED_SKIP_RTX_P): New target hooks. Initialize them to 0. (TARGET_SCHED_GEN_CHECK): Rename to TARGET_SCHED_GEN_SPEC_CHECK. * target.h (struct gcc_target): Add them. Rename gen_check field to gen_spec_check. * flags.h (sel_sched_switch_set): Declare. * opts.c (sel_sched_switch_set): New variable. (decode_options): Unset flag_sel_sched_pipelining_outer_loops if pipelining is disabled from command line. (common_handle_option): Record whether selective scheduling is requested from command line. * doc/invoke.texi: Document new flags and parameters. * doc/tm.texi: Document new target hooks. * config/ia64/ia64.c (TARGET_SCHED_GEN_SPEC_CHECK): Define to ia64_gen_check. (dfa_state_size): Do not declare locally. * config/ia64/ia64.opt (msched-ar-data-spec): Default to 0. * config/rs6000/rs6000.c (rs6000_init_sched_context, rs6000_alloc_sched_context, rs6000_set_sched_context, rs6000_free_sched_context): New functions. (struct _rs6000_sched_context): New. (rs6000_sched_reorder2): Do not modify INSN_PRIORITY for selective scheduling. (rs6000_sched_finish): Do not run for selective scheduling. Co-Authored-By: Alexander Monakov <amonakov@ispras.ru> Co-Authored-By: Dmitry Melnik <dm@ispras.ru> Co-Authored-By: Dmitry Zhurikhin <zhur@ispras.ru> Co-Authored-By: Maxim Kuvyrkov <maxim@codesourcery.com> From-SVN: r139854
2008-09-01 10:57:00 +02:00
static struct common_sched_info_def sms_common_sched_info;
static struct sched_deps_info_def sms_sched_deps_info =
{
compute_jump_reg_dependencies,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL,
0, 0, 0
};
static struct haifa_sched_info sms_sched_info =
{
NULL,
NULL,
NULL,
NULL,
NULL,
sms_print_insn,
target.h (struct spec_info_def): New opaque declaration. 2006-03-16 Maxim Kuvyrkov <mkuvyrkov@ispras.ru> * target.h (struct spec_info_def): New opaque declaration. (struct gcc_target.sched): New fields: adjust_cost_2, h_i_d_extended, speculate_insn, needs_block_p, gen_check, first_cycle_multipass_dfa_lookahead_guard_spec, set_sched_flags. * target-def.h (TARGET_SCHED_ADJUST_COST_2, TARGET_SCHED_H_I_D_EXTENDED, TARGET_SCHED_SPECULATE_INSN, TARGET_SCHED_NEEDS_BLOCK_P, TARGET_SCHED_GEN_CHECK, TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD_SPEC, TARGET_SCHED_SET_SCHED_FLAGS): New macros to initialize fields in gcc_target.sched. (TARGET_SCHED): Use new macros. * rtl.h (copy_DEPS_LIST_list): New prototype. * sched-int.h (struct sched_info): Change signature of new_ready field, adjust all initializations. New fields: add_remove_insn, begin_schedule_ready, add_block, advance_target_bb, fix_recovery_cfg, region_head_or_leaf_p. (struct spec_info_def): New structure declaration. (spec_info_t): New typedef. (struct haifa_insn_data): New fields: todo_spec, done_spec, check_spec, recovery_block, orig_pat. (glat_start, glat_end): New variables declaraions. (TODO_SPEC, DONE_SPEC, CHECK_SPEC, RECOVERY_BLOCK, ORIG_PAT): New access macros. (enum SCHED_FLAGS): New constants: SCHED_RGN, SCHED_EBB, DETACH_LIFE_INFO, USE_GLAT. (enum SPEC_SCHED_FLAGS): New enumeration. (NOTE_NOTE_BB_P): New macro. (extend_dependency_caches, xrecalloc, unlink_bb_notes, add_block, attach_life_info, debug_spec_status, check_reg_live): New functions. (get_block_head_tail): Change signature to get_ebb_head_tail, adjust all uses in ddg.c, modulo-sched.c, haifa-sched.c, sched-rgn.c, sched-ebb.c (get_dep_weak, ds_merge): Prototype functions from sched-deps.c . * ddg.c (get_block_head_tail): Adjust all uses. * modulo-sched.c (get_block_head_tail): Adjust all uses. (sms_sched_info): Initialize new fields. (contributes_to_priority): Removed. * haifa-sched.c (params.h): New include. (get_block_head_tail): Adjust all uses. (ISSUE_POINTS): New macro. (glat_start, glat_end): New global variables. (spec_info_var, spec_info, added_recovery_block_p, nr_begin_data, nr_be_in_data, nr_begin_control, nr_be_in_control, bb_header, old_last_basic_block, before_recovery, current_sched_info_var, rgn_n_insns, luid): New static variables. (insn_cost1): New function. Move logic from insn_cost to here. (find_insn_reg_weight1): New function. Move logic from find_insn_reg_weight to here. (reemit_notes, move_insn, max_issue): Change signature. (move_insn1): Removed. (extend_h_i_d, extend_ready, extend_global, extend_all, init_h_i_d, extend_bb): New static functions to support extension of scheduler's data structures. (generate_recovery_code, process_insn_depend_be_in_spec, begin_speculative_block, add_to_speculative_block, init_before_recovery, create_recovery_block, create_check_block_twin, fix_recovery_deps): New static functions to support generation of recovery code. (fix_jump_move, find_fallthru_edge, dump_new_block_header, restore_bb_notes, move_block_after_check, move_succs): New static functions to support ebb scheduling. (init_glat, init_glat1, attach_life_info1, free_glat): New static functions to support handling of register live information. (associate_line_notes_with_blocks, change_pattern, speculate_insn, sched_remove_insn, clear_priorities, calc_priorities, bb_note, add_jump_dependencies): New static functions. (check_cfg, has_edge_p, check_sched_flags): New static functions for consistancy checking. (debug_spec_status): New function to call from debugger. (priority): Added code to handle speculation checks. (rank_for_schedule): Added code to distinguish speculative instructions. (schedule_insn): Added code to handle speculation checks. (unlink_other_notes, rm_line_notes, restore_line_notes, rm_other_notes): Fixed to handle ebbs. (move_insn): Added code to handle ebb scheduling. (max_issue): Added code to use ISSUE_POINTS of instructions. (choose_ready): Added code to choose between speculative and non-speculative instructions. (schedule_block): Added code to handle ebb scheduling and scheduling of speculative instructions. (sched_init): Initialize new variables. (sched_finish): Free new variables. Print statistics. (try_ready): Added code to handle speculative instructions. * lists.c (copy_DEPS_LIST_list): New function. * sched-deps.c (extend_dependency_caches): New function. Move logic from create_dependency_caches to here. (get_dep_weak, ds_merge): Make global. * genattr.c (main): Code to output prototype for dfa_clear_single_insn_cache. * genautomata.c (DFA_CLEAR_SINGLE_INSN_CACHE_FUNC_NAME): New macros. (output_dfa_clean_insn_cache_func): Code to output dfa_clear_single_insn_cache function. * sched-ebb.c (target_n_insns): Remove. Adjust all users to use n_insns. (can_schedule_ready_p, fix_basic_block_boundaries, add_missing_bbs): Removed. (n_insns, dont_calc_deps, ebb_head, ebb_tail, last_bb): New static variables. (begin_schedule_ready, add_remove_insn, add_block1, advance_target_bb, fix_recovery_cfg, ebb_head_or_leaf_p): Implement hooks from struct sched_info. (ebb_sched_info): Initialize new fields. (get_block_head_tail): Adjust all uses. (compute_jump_reg_dependencies): Fixed to use glat_start. (schedule_ebb): Code to remove unreachable last block. (schedule_ebbs): Added code to update register live information. * sched-rgn.c (region_sched_info): Initialize new fields. (get_block_head_tail): Adjust all uses. (last_was_jump): Removed. Adjust users. (begin_schedule_ready, add_remove_insn, insn_points, extend_regions, add_block1, fix_recovery_cfg, advance_target_bb, region_head_or_leaf_p): Implement new hooks. (check_dead_notes1): New static function. (struct region): New fields: dont_calc_deps, has_real_ebb. (RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB): New access macros. (BB_TO_BLOCK): Fixed to handle EBBs. (EBB_FIRST_BB, EBB_LAST_BB): New macros. (ebb_head): New static variable. (debug_regions, contributes_to_priority): Fixed to handle EBBs. (find_single_block_regions, find_rgns, find_more_rgns): Initialize new fields. (compute_dom_prob_ps): New assertion. (check_live_1, update_live_1): Fixed to work with glat_start instead of global_live_at_start. (init_ready_list): New assertions. (can_schedule_ready_p): Split update code to begin_schedule_ready. (new_ready): Add support for BEGIN_CONTROL speculation. (schedule_insns): Fixed code that updates register live information to handle EBBs. (schedule_region): Fixed to handle EBBs. (init_regions): Use extend_regions and check_dead_notes1. * params.def (PARAM_MAX_SCHED_INSN_CONFLICT_DELAY, PARAM_SCHED_SPEC_PROB_CUTOFF): New parameters. * doc/tm.texi (TARGET_SCHED_ADJUST_COST_2, TARGET_SCHED_H_I_D_EXTENDED, TARGET_SCHED_SPECULATE_INSN, TARGET_SCHED_NEEDS_BLOCK_P, TARGET_SCHED_GEN_CHECK, TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD_SPEC, TARGET_SCHED_SET_SCHED_FLAGS): Document. * doc/invoke.texi (max-sched-insn-conflict-delay, sched-spec-prob-cutoff): Document. From-SVN: r112128
2006-03-16 06:27:03 +01:00
NULL,
NULL, /* insn_finishes_block_p */
NULL, NULL,
NULL, NULL,
sel-sched.h, [...]: New files. 2008-08-31 Andrey Belevantsev <abel@ispras.ru> Dmitry Melnik <dm@ispras.ru> Dmitry Zhurikhin <zhur@ispras.ru> Alexander Monakov <amonakov@ispras.ru> Maxim Kuvyrkov <maxim@codesourcery.com> * sel-sched.h, sel-sched-dump.h, sel-sched-ir.h, sel-sched.c, sel-sched-dump.c, sel-sched-ir.c: New files. * Makefile.in (OBJS-common): Add selective scheduling object files. (sel-sched.o, sel-sched-dump.o, sel-sched-ir.o): New entries. (SEL_SCHED_IR_H, SEL_SCHED_DUMP_H): New entries. (sched-vis.o): Add dependency on $(INSN_ATTR_H). * cfghooks.h (get_cfg_hooks, set_cfg_hooks): New prototypes. * cfghooks.c (get_cfg_hooks, set_cfg_hooks): New functions. (make_forwarder_block): Update loop latch if we have redirected the loop latch edge. * cfgloop.c (get_loop_body_in_custom_order): New function. * cfgloop.h (LOOPS_HAVE_FALLTHRU_PREHEADERS): New enum field. (CP_FALLTHRU_PREHEADERS): Likewise. (get_loop_body_in_custom_order): Declare. * cfgloopmanip.c (has_preds_from_loop): New. (create_preheader): Honor CP_FALLTHRU_PREHEADERS. Assert that the preheader edge will be fall thru when it is set. * common.opt (fsel-sched-bookkeeping, fsel-sched-pipelining, fsel-sched-pipelining-outer-loops, fsel-sched-renaming, fsel-sched-substitution, fselective-scheduling): New flags. * cse.c (hash_rtx_cb): New. (hash_rtx): Use it. * dbgcnt.def (sel_sched_cnt, sel_sched_region_cnt, sel_sched_insn_cnt): New counters. * final.c (compute_alignments): Export. Free dominance info after loop_optimizer_finalize. * genattr.c (main): Output maximal_insn_latency prototype. * genautomata.c (output_default_latencies): New. Factor its code from ... (output_internal_insn_latency_func): ... here. (output_internal_maximal_insn_latency_func): New. (output_maximal_insn_latency_func): New. * hard-reg-set.h (UHOST_BITS_PER_WIDE_INT): Define unconditionally. (struct hard_reg_set_iterator): New. (hard_reg_set_iter_init, hard_reg_set_iter_set, hard_reg_set_iter_next): New functions. (EXECUTE_IF_SET_IN_HARD_REG_SET): New macro. * lists.c (remove_free_INSN_LIST_node, remove_free_EXPR_LIST_node): New functions. * loop-init.c (loop_optimizer_init): When LOOPS_HAVE_FALLTHRU_PREHEADERS, set CP_FALLTHRU_PREHEADERS when calling create_preheaders. (loop_optimizer_finalize): Do not verify flow info after reload. * recog.c (validate_replace_rtx_1): New parameter simplify. Default it to true. Update all uses. Factor out simplifying code to ... (simplify_while_replacing): ... this new function. (validate_replace_rtx_part, validate_replace_rtx_part_nosimplify): New. * recog.h (validate_replace_rtx_part, validate_replace_rtx_part_nosimplify): Declare. * rtl.c (rtx_equal_p_cb): New. (rtx_equal_p): Use it. * rtl.h (rtx_equal_p_cb, hash_rtx_cb): Declare. (remove_free_INSN_LIST_NODE, remove_free_EXPR_LIST_node, debug_bb_n_slim, debug_bb_slim, print_rtl_slim): Likewise. * vecprim.h: Add a vector type for unsigned int. * haifa-sched.c: Include vecprim.h and cfgloop.h. (issue_rate, sched_verbose_param, note_list, dfa_state_size, ready_try, cycle_issued_insns, spec_info): Make global. (readyp): Initialize. (dfa_lookahead): New global variable. (old_max_uid, old_last_basic_block): Remove. (h_i_d): Make it a vector. (INSN_TICK, INTER_TICK, QUEUE_INDEX, INSN_COST): Make them work through HID macro. (after_recovery, adding_bb_to_current_region_p): New variables to handle correct insertion of the recovery code. (struct ready_list): Move declaration to sched-int.h. (rgn_n_insns): Removed. (rtx_vec_t): Move to sched-int.h. (find_insn_reg_weight): Remove. (find_insn_reg_weight1): Rename to find_insn_reg_weight. (haifa_init_h_i_d, haifa_finish_h_i_d): New functions to initialize / finalize haifa instruction data. (extend_h_i_d, init_h_i_d): Rewrite. (unlink_other_notes): Move logic to add_to_note_list. Handle selective scheduler. (ready_lastpos, ready_element, ready_sort, reemit_notes, find_fallthru_edge): Make global, remove static prototypes. (max_issue): Make global. Add privileged_n and state parameters. Use them. (extend_global, extend_all): Removed. (init_before_recovery): Add new param. Fix the handling of the case when we insert a recovery code before the EXIT which has a predecessor with a fallthrough edge to it. (create_recovery_block): Make global. Rename to sched_create_recovery_block. Update. (change_pattern): Rename to sched_change_pattern. Make global. (speculate_insn): Rename to sched_speculate_insn. Make global. Split haifa-specific functionality into ... (haifa_change_pattern): New static function. (sched_extend_bb): New static function. (sched_init_bbs): New function. (current_sched_info): Change type to struct haifa_sched_info. (insn_cost): Adjust for selective scheduling. (dep_cost_1): New function. Move logic from ... (dep_cost): ... here. (dep_cost): Use dep_cost_1. (contributes_to_priority_p): Use sched_deps_info instead of current_sched_info. (priority): Adjust to work with selective scheduling. Process the corner case when all dependencies don't contribute to priority. (rank_for_schedule): Use ds_weak instead of dep_weak. (advance_state): New function. Move logic from ... (advance_one_cycle): ... here. (add_to_note_list, concat_note_lists): New functions. (rm_other_notes): Make static. Adjust for selective scheduling. (remove_notes, restore_other_notes): New functions. (move_insn): Add two arguments. Update assert. Don't call reemit_notes. (choose_ready): Remove lookahead variable, use dfa_lookahead. Remove more_issue, max_points. Move the code to initialize max_lookahead_tries to max_issue. (schedule_block): Remove rgn_n_insns1 parameter. Don't allocate ready. Adjust use of move_insn. Call restore_other_notes. (luid): Remove. (sched_init, sched_finish): Move Haifa-specific initialization/ finalization to ... (haifa_sched_init, haifa_sched_finish): ... respectively. New functions. (setup_sched_dump): New function. (haifa_init_only_bb): New static function. (haifa_speculate_insn): New static function. (try_ready): Use haifa_* instead of speculate_insn and change_pattern. (extend_ready, extend_all): Remove. (sched_extend_ready_list, sched_finish_ready_list): New functions. (create_check_block_twin, add_to_speculative_block): Use haifa_insns_init instead of extend_global. Update to use new initialization functions. Change parameter. Factor out code from create_check_block_twin to ... (sched_create_recovery_edges) ... this new function. (add_block): Remove. (sched_scan_info): New. (extend_bb): Use sched_scan_info. (init_bb, extend_insn, init_insn, init_insns_in_bb, sched_scan): New static functions for walking through scheduling region. (sched_luids): New vector variable to replace uid_to_luid. (luids_extend_insn): New function. (sched_max_luid): New variable. (luids_init_insn): New function. (sched_init_luids, sched_finish_luids): New functions. (insn_luid): New debug function. (sched_extend_target): New function. (haifa_init_insn): New static function. (sched_init_only_bb): New hook. (sched_split_block): New hook. (sched_split_block_1): New function. (sched_create_empty_bb): New hook. (sched_create_empty_bb_1): New function. (common_sched_info, ready): New global variables. (current_sched_info_var): Remove. (move_block_after_check): Use common_sched_info. (haifa_luid_for_non_insn): New static function. (init_before_recovery): Use haifa_init_only_bb instead of add_block. (increase_insn_priority): New. * modulo-sched.c: (issue_rate): Remove static declaration. (sms_sched_info): Change type to haifa_sched_info. (sms_sched_deps_info, sms_common_sched_info): New variables. (setup_sched_infos): New. (sms_schedule): Initialize them. Call haifa_sched_init/finish. Do not call regstat_free_calls_crossed. (sms_print_insn): Use const_rtx. * params.def (PARAM_MAX_PIPELINE_REGION_BLOCKS, PARAM_MAX_PIPELINE_REGION_INSNS, PARAM_SELSCHED_MAX_LOOKAHEAD, PARAM_SELSCHED_MAX_SCHED_TIMES, PARAM_SELSCHED_INSNS_TO_RENAME, PARAM_SCHED_MEM_TRUE_DEP_COST): New. * sched-deps.c (sched_deps_info): New. Update all relevant uses of current_sched_info to use it. (enum reg_pending_barrier_mode): Move to sched-int.h. (h_d_i_d): New variable. Initialize to NULL. ({true, output, anti, spec, forward}_dependency_cache): Initialize to NULL. (estimate_dep_weak): Remove static declaration. (sched_has_condition_p): New function. Adjust users of sched_get_condition to use it instead. (conditions_mutex_p): Add arguments indicating which conditions are reversed. Use them. (sched_get_condition_with_rev): Rename from sched_get_condition. Add argument to indicate whether returned condition is reversed. Do not generate new rtx when condition should be reversed; indicate it by setting new argument instead. (add_dependence_list_and_free): Add deps parameter. Update all users. Do not free dependence list when deps context is readonly. (add_insn_mem_dependence, flush_pending_lists): Adjust for readonly contexts. (remove_from_dependence_list, remove_from_both_dependence_lists): New. (remove_from_deps): New. Use the above functions. (cur_insn, can_start_lhs_rhs_p): New static variables. (add_or_update_back_dep_1): Initialize present_dep_type. (haifa_start_insn, haifa_finish_insn, haifa_note_reg_set, haifa_note_reg_clobber, haifa_note_reg_use, haifa_note_mem_dep, haifa_note_dep): New functions implementing dependence hooks for the Haifa scheduler. (note_reg_use, note_reg_set, note_reg_clobber, note_mem_dep, note_dep): New functions. (ds_to_dt, extend_deps_reg_info, maybe_extend_reg_info_p): New functions. (init_deps): Initialize last_reg_pending_barrier and deps->readonly. (free_deps): Initialize deps->reg_last. (sched_analyze_reg, sched_analyze_1, sched_analyze_2, sched_analyze_insn): Update to use dependency hooks infrastructure and readonly contexts. (deps_analyze_insn): New function. Move part of logic from ... (sched_analyze): ... here. Also move some logic to ... (deps_start_bb): ... here. New function. (add_forw_dep, delete_forw_dep): Guard use of INSN_DEP_COUNT with sel_sched_p. (sched_deps_init): New function. Move code from ... (init_dependency_caches): ... here. Remove. (init_deps_data_vector): New. (sched_deps_finish): New function. Move code from ... (free_dependency_caches): ... here. Remove. (init_deps_global, finish_deps_global): Adjust for use with selective scheduling. (get_dep_weak): Move logic to ... (get_dep_weak_1): New function. (ds_merge): Move logic to ... (ds_merge_1): New static function. (ds_full_merge, ds_max_merge, ds_get_speculation_types): New functions. (ds_get_max_dep_weak): New function. * sched-ebb.c (sched_n_insns): Rename to sched_rgn_n_insns. (n_insns): Rename to rgn_n_insns. (debug_ebb_dependencies): New function. (init_ready_list): Use it. (begin_schedule_ready): Use sched_init_only_bb. (ebb_print_insn): Indicate when an insn starts a new cycle. (contributes_to_priority, compute_jump_reg_dependencies, add_remove_insn, fix_recovery_cfg): Add ebb_ prefix to function names. (add_block1): Remove to ebb_add_block. (ebb_sched_deps_info, ebb_common_sched_info): New variables. (schedule_ebb): Initialize them. Use remove_notes instead of rm_other_notes. Use haifa_local_init/finish. (schedule_ebbs): Use haifa_sched_init/finish. * sched-int.h: Include vecprim.h, remove rtl.h. (struct ready_list): Delete declaration. (sched_verbose_param, enum sched_pass_id_t, bb_vec_t, insn_vec_t, rtx_vec_t): New. (struct sched_scan_info_def): New structure. (sched_scan_info, sched_scan, sched_init_bbs, sched_init_luids, sched_finish_luids, sched_extend_target, haifa_init_h_i_d, haifa_finish_h_i_d): Declare. (struct common_sched_info_def): New. (common_sched_info, haifa_common_sched_info, sched_emulate_haifa_p): Declare. (sel_sched_p): New. (sched_luids): Declare. (INSN_LUID, LUID_BY_UID, SET_INSN_LUID): Declare. (sched_max_luid, insn_luid): Declare. (note_list, remove_notes, restore_other_notes, bb_note): Declare. (sched_insns_init, sched_insns_finish, xrecalloc, reemit_notes, print_insn, print_pattern, print_value, haifa_classify_insn, sel_find_rgns, sel_mark_hard_insn, dfa_state_size, advance_state, setup_sched_dump, sched_init, sched_finish, sel_insn_is_speculation_check): Export. (struct ready_list): Move from haifa-sched.c. (ready_try, ready, max_issue): Export. (ebb_compute_jump_reg_dependencies, find_fallthru_edge, sched_init_only_bb, sched_split_block, sched_split_block_1, sched_create_empty_bb, sched_create_empty_bb_1, sched_create_recovery_block, sched_create_recovery_edges): Export. (enum reg_pending_barrier_mode): Export. (struct deps): New fields `last_reg_pending_barrier' and `readonly'. (deps_t): New. (struct sched_info): Rename to haifa_sched_info. Use const_rtx for print_insn field. Move add_block and fix_recovery_cfg to common_sched_info_def. Move compute_jump_reg_dependencies, use_cselib ... (struct sched_deps_info_def): ... this new structure. (sched_deps_info): Declare. (struct spec_info_def): Remove weakness_cutoff, add data_weakness_cutoff and control_weakness_cutoff. (spec_info): Declare. (struct _haifa_deps_insn_data): Split from haifa_insn_data. Add dep_count field. (struct haifa_insn_data): Rename to struct _haifa_insn_data. (haifa_insn_data_def, haifa_insn_data_t): New typedefs. (current_sched_info): Change type to struct haifa_sched_info. (haifa_deps_insn_data_def, haifa_deps_insn_data_t): New typedefs. (h_d_i_d): New variable. (HDID): New accessor macro. (h_i_d): Change type to VEC (haifa_insn_data_def, heap) *. (HID): New accessor macro. Rewrite h_i_d accessor macros through HID and HDID. (IS_SPECULATION_CHECK_P): Update for selective scheduler. (enum SCHED_FLAGS): Update for selective scheduler. (enum SPEC_SCHED_FLAGS): New flag SEL_SCHED_SPEC_DONT_CHECK_CONTROL. (init_dependency_caches, free_dependency_caches): Delete declarations. (deps_analyze_insn, remove_from_deps, get_dep_weak_1, estimate_dep_weak, ds_full_merge, ds_max_merge, ds_weak, ds_get_speculation_types, ds_get_max_dep_weak, sched_deps_init, sched_deps_finish, haifa_note_reg_set, haifa_note_reg_use, haifa_note_reg_clobber, maybe_extend_reg_info_p, deps_start_bb, ds_to_dt): Export. (rm_other_notes): Delete declaration. (schedule_block): Remove one argument. (cycle_issued_insns, issue_rate, dfa_lookahead, ready_sort, ready_element, ready_lastpos, sched_extend_ready_list, sched_finish_ready_list, sched_change_pattern, sched_speculate_insn, concat_note_lists): Export. (struct region): Move from sched-rgn.h. (nr_regions, rgn_table, rgn_bb_table, block_to_bb, containing_rgn, RGN_NR_BLOCKS, RGN_BLOCKS, RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB, BLOCK_TO_BB, CONTAINING_RGN): Export. (ebb_head, BB_TO_BLOCK, EBB_FIRST_BB, EBB_LAST_BB, INSN_BB): Likewise. (current_nr_blocks, current_blocks, target_bb): Likewise. (dep_cost_1, sched_is_disabled_for_current_region_p, sched_rgn_init, sched_rgn_finish, rgn_setup_region, sched_rgn_compute_dependencies, sched_rgn_local_init, extend_regions, rgn_make_new_region_out_of_new_block, compute_priorities, debug_rgn_dependencies, free_rgn_deps, contributes_to_priority, extend_rgns, deps_join rgn_setup_common_sched_info, rgn_setup_sched_infos, debug_regions, debug_region, dump_region_dot, dump_region_dot_file, haifa_sched_init, haifa_sched_finish): Export. (get_rgn_sched_max_insns_priority, sel_add_to_insn_priority, increase_insn_priority): Likewise. * sched-rgn.c: Include sel-sched.h. (ref_counts): New static variable. Use it ... (INSN_REF_COUNT): ... here. Rewrite and move closer to uses. (FED_BY_SPEC_LOAD, IS_LOAD_INSN): Rewrite to use HID accessor macro. (sched_is_disabled_for_current_region_p): Delete static declaration. (struct region): Move to sched-int.h. (nr_regions, rgn_table, rgn_bb_table, block_to_bb, containing_rgn, ebb_head): Define and initialize. (RGN_NR_BLOCKS, RGN_BLOCKS, RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB, BLOCK_TO_BB, CONTAINING_RGN, debug_regions, extend_regions, BB_TO_BLOCK, EBB_FIRST_BB, EBB_LAST_BB): Move to sched-int.h. (find_single_block_region): Add new argument to indicate that EBB regions should be constructed. (debug_live): Delete declaration. (current_nr_blocks, current_blocks, target_bb): Remove static qualifiers. (compute_dom_prob_ps, check_live, update_live, set_spec_fed): Delete declaration. (init_regions): Delete declaration. (debug_region, bb_in_region_p, dump_region_dot_file, dump_region_dot, rgn_estimate_number_of_insns): New. (too_large): Use estimate_number_of_insns. (haifa_find_rgns): New. Move the code from ... (find_rgns): ... here. Call either sel_find_rgns or haifa_find_rgns. (free_trg_info): New. (compute_trg_info): Allocate candidate tables here instead of ... (init_ready_list): ... here. (rgn_print_insn): Use const_rtx. (contributes_to_priority, extend_regions): Delete static declaration. (add_remove_insn, fix_recovery_cfg): Add rgn_ to function names. (add_block1): Rename to rgn_add_block. (debug_rgn_dependencies): Delete static qualifier. (new_ready): Use sched_deps_info. Simplify. (rgn_common_sched_info, rgn_const_sched_deps_info, rgn_const_sel_sched_deps_info, rgn_sched_deps_info, rgn_sched_info): New. (region_sched_info): Rename to rgn_const_sched_info. (deps_join): New, extracted from ... (propagate_deps): ... here. (compute_block_dependences, debug_dependencies): Update for selective scheduling. (free_rgn_deps, compute_priorities): New functions. (sched_rgn_init, sched_rgn_finish, rgn_setup_region, sched_rgn_compute_dependencies): New functions. (schedule_region): Use them. (sched_rgn_local_init, sched_rgn_local_free, sched_rgn_local_finish, rgn_setup_common_sched_info, rgn_setup_sched_infos): New functions. (schedule_insns): Call new functions that were split out. (rgn_make_new_region_out_of_new_block): New. (get_rgn_sched_max_insns_priority): New. (rest_of_handle_sched, rest_of_handle_sched2): Call selective scheduling when appropriate. * sched-vis.c: Include insn-attr.h. (print_value, print_pattern): Make global. (print_rtl_slim, debug_bb_slim, debug_bb_n_slim): New functions. * target-def.h (TARGET_SCHED_ADJUST_COST_2, TARGET_SCHED_ALLOC_SCHED_CONTEXT, TARGET_SCHED_INIT_SCHED_CONTEXT, TARGET_SCHED_SET_SCHED_CONTEXT, TARGET_SCHED_CLEAR_SCHED_CONTEXT, TARGET_SCHED_FREE_SCHED_CONTEXT, TARGET_SCHED_GET_INSN_CHECKED_DS, TARGET_SCHED_GET_INSN_SPEC_DS, TARGET_SCHED_SKIP_RTX_P): New target hooks. Initialize them to 0. (TARGET_SCHED_GEN_CHECK): Rename to TARGET_SCHED_GEN_SPEC_CHECK. * target.h (struct gcc_target): Add them. Rename gen_check field to gen_spec_check. * flags.h (sel_sched_switch_set): Declare. * opts.c (sel_sched_switch_set): New variable. (decode_options): Unset flag_sel_sched_pipelining_outer_loops if pipelining is disabled from command line. (common_handle_option): Record whether selective scheduling is requested from command line. * doc/invoke.texi: Document new flags and parameters. * doc/tm.texi: Document new target hooks. * config/ia64/ia64.c (TARGET_SCHED_GEN_SPEC_CHECK): Define to ia64_gen_check. (dfa_state_size): Do not declare locally. * config/ia64/ia64.opt (msched-ar-data-spec): Default to 0. * config/rs6000/rs6000.c (rs6000_init_sched_context, rs6000_alloc_sched_context, rs6000_set_sched_context, rs6000_free_sched_context): New functions. (struct _rs6000_sched_context): New. (rs6000_sched_reorder2): Do not modify INSN_PRIORITY for selective scheduling. (rs6000_sched_finish): Do not run for selective scheduling. Co-Authored-By: Alexander Monakov <amonakov@ispras.ru> Co-Authored-By: Dmitry Melnik <dm@ispras.ru> Co-Authored-By: Dmitry Zhurikhin <zhur@ispras.ru> Co-Authored-By: Maxim Kuvyrkov <maxim@codesourcery.com> From-SVN: r139854
2008-09-01 10:57:00 +02:00
0, 0,
ddg.c (build_intra_loop_deps): Adjust add_forward_dependence call. 2006-03-16 Maxim Kuvyrkov <mkuvyrkov@ispras.ru> Andrey Belevantsev <abel@ispras.ru> * ddg.c (build_intra_loop_deps): Adjust add_forward_dependence call. * lists.c (unused_deps_list): New variable. (free_list): Add assertions to verify the proper distinguishing between INSN_LISTs and DEPS_LISTs. (find_list_elem, remove_list_elem, remove_list_node): New static functions. (alloc_DEPS_LIST, free_DEPS_LIST, free_DEPS_LIST_node, remove_free_INSN_LIST_elem, remove_free_DEPS_LIST_elem, remove_free_INSN_LIST_node, remove_free_DEPS_LIST_node): New functions. (alloc_INSN_LIST): Assert that the list we're working on is indeed an INSN_LIST. (free_INSN_LIST_node): Likewise. * modulo-sched.c (current_sched_info): Initialize flags field. * reg-notes.def: Exchange DEP_ANTI and DEP_OUTPUT. * rtl.def (DEPS_LIST): Define. * rtl.h: Declare new functions from lists.c. * sched-deps.c (spec_dependency_cache): New static variable. (maybe_add_or_update_back_dep_1, add_back_dep): New static functions. (add_dependence): Change return type to void. Move the logic to ... (add_or_update_back_dep_1): ... here. Handle speculative dependencies. (delete_all_dependences): Add comment about forward_dependency_cache. Handle spec_dependency_cache. Handle DEPS_LISTs. (fixup_sched_groups): Clarify the change of priority of output and anti dependencies. (sched_analyze_2): Adjust add_dependence calls to create data speculative dependence. (add_forward_dependence): Renamed to add_forw_dep, change prototype. Adjust all callers. Handle DEPS_LISTS. (compute_forward_dependences): Use add_forw_dep. Sort LOG_LINKs in presence of speculation. (init_dependency_caches, free_dependency_caches): Handle spec_dependency_cache. (adjust_add_sorted_back_dep, adjust_back_add_forw_dep, delete_forw_dep, estimate_dep_weak, get_dep_weak, ds_merge, check_dep_status): New static functions. (add_or_update_back_dep, add_or_update_back_forw_dep, add_back_forw_dep, delete_back_forw_dep): New functions. * sched-int.h (ds_t, dw_t): New typedefs. (struct sched_info): Add new field flags. (struct haifa_insn_data): Add new bitfield has_internal_dep. Prototype new sched-deps.c functions. (HAS_INTERNAL_DEP, DEP_STATUS): New access macros. (BITS_PER_DEP_STATUS, BITS_PER_DEP_WEAK, DEP_WEAK_MASK, MAX_DEP_WEAK, MIN_DEP_WEAK, NO_DEP_WEAK, UNCERTAIN_DEP_WEAK, BEGIN_DATA, BE_IN_DATA, BEGIN_CONTROL, BE_IN_CONTROL, BEGIN_SPEC, DATA_SPEC, CONTROL_SPEC, SPECULATIVE, BE_IN_SPEC, FIRST_SPEC_TYPE, LAST_SPEC_TYPE, SPEC_TYPE_SHIFT, DEP_TRUE, DEP_OUTPUT, DEP_ANTI, DEP_TYPES, HARD_DEP): New constants. (enum SPEC_TYPES_OFFSETS, enum DEPS_ADJUST_RESULT, enum SCHED_FLAGS): New enums. * sched-rgn.c (current_sched_info): Initialize flags field. (schedule_insns): Initialize current_sched_info before the sched_init call. * sched-ebb.c (current_sched_info): Initialize flags field. (add_deps_for_risky_insns): Use control_flow_insn_p instead of JUMP_P. Call add_or_update_back_dep instead of add_dependence. Create control speculative dependencies. (schedule_insns): Initialize current_sched_info before the sched_init call. Co-Authored-By: Andrey Belevantsev <abel@ispras.ru> From-SVN: r112125
2006-03-16 06:17:41 +01:00
NULL, NULL, NULL, NULL,
haifa-sched.c: Include "hashtab.h" * haifa-sched.c: Include "hashtab.h" (sched_no_dce): New global variable. (INSN_EXACT_TICK, INSN_TICK_ESTIMATE, FEEDS_BACKTRACK_INSN, SHADOW_P): New macros. (last_clock_var, cycle_issued_insns): Move declarations. (must_backtrack): New static variable. (struct delay_pair): New structure. (delay_htab, delay_htab_i2): New static variables. (delay_hash_i1, delay_hash_i2, delay_i1_eq, delay_i2_eq, record_delay_slot_pair, pair_delay, add_delay_dependencies): New functions. (dep_cost_1): If delay pairs exist, try to look up the insns and use the correct pair delay if we find them. (rank-for_schedule): Tweak priority for insns that must be scheduled soon to avoid backtracking. (queue_insn): Detect conditions which force backtracking. (ready_add): Likewise. (struct sched_block_state): Add member shadows_only_p. (struct haifa_save_data): New structure. (backtrack_queue): New static variable. (mark_backtrack_feeds, copy_insn_list, save_backtrack_point, unschedule_insns_until, restore_last_backtrack_point, free_topmost_backtrack_point, free_backtrack_queue, estimate_insn_tick, estimate_shadow_tick): New functions. (prune_ready_list): New arg shadows_only_p. All callers changed. If true, remove everything that isn't SHADOW_P. Look up delay pairs and estimate ticks to avoid scheduling the first insn too early. (verify_shadows): New function. (schedule_block): Add machinery to enable backtracking. (sched_init): Take sched_no_dce into account when setting DF_LR_RUN_DCE. (free_delay_pairs): New function. (init_h_i_d): Initialize INSN_EXACT_TICK. * Makefile.in (haifa-sched.o): Add $(HASHTAB_H). * sched-deps.c (sd_unresolve_dep): New function. * sched-int.h (struct haifa_sched_info): New fields save_state and restore_state. (struct _haifa_insn_data): New fields exact_tick, tick_estimate, feeds_backtrack_insn and shadow_p. (DO_BACKTRACKING): New value in enum SCHED_FLAGS. (sched_no_dce): Declare variable. (record_delay_slot_pair, free_delay_pairs, add_delay_dependencies, sd_unresolve_dep): Declare functions. * modulo-sched.c (sms_sched_info): Clear the two new fields. * sched-rgn.c (rgn_const_sched_info): Likewise. * sel-sched-ir.c (sched_sel_haifa_sched_info): Likewise. * sched-ebb.c (save_ebb_state, restore_ebb_state): New functions. (ebb_sched_info): Add them for the two new fields. (add_deps_for_risky_insns): Call add_delay_dependencies. From-SVN: r176255
2011-07-14 01:10:52 +02:00
NULL, NULL,
ddg.c (build_intra_loop_deps): Adjust add_forward_dependence call. 2006-03-16 Maxim Kuvyrkov <mkuvyrkov@ispras.ru> Andrey Belevantsev <abel@ispras.ru> * ddg.c (build_intra_loop_deps): Adjust add_forward_dependence call. * lists.c (unused_deps_list): New variable. (free_list): Add assertions to verify the proper distinguishing between INSN_LISTs and DEPS_LISTs. (find_list_elem, remove_list_elem, remove_list_node): New static functions. (alloc_DEPS_LIST, free_DEPS_LIST, free_DEPS_LIST_node, remove_free_INSN_LIST_elem, remove_free_DEPS_LIST_elem, remove_free_INSN_LIST_node, remove_free_DEPS_LIST_node): New functions. (alloc_INSN_LIST): Assert that the list we're working on is indeed an INSN_LIST. (free_INSN_LIST_node): Likewise. * modulo-sched.c (current_sched_info): Initialize flags field. * reg-notes.def: Exchange DEP_ANTI and DEP_OUTPUT. * rtl.def (DEPS_LIST): Define. * rtl.h: Declare new functions from lists.c. * sched-deps.c (spec_dependency_cache): New static variable. (maybe_add_or_update_back_dep_1, add_back_dep): New static functions. (add_dependence): Change return type to void. Move the logic to ... (add_or_update_back_dep_1): ... here. Handle speculative dependencies. (delete_all_dependences): Add comment about forward_dependency_cache. Handle spec_dependency_cache. Handle DEPS_LISTs. (fixup_sched_groups): Clarify the change of priority of output and anti dependencies. (sched_analyze_2): Adjust add_dependence calls to create data speculative dependence. (add_forward_dependence): Renamed to add_forw_dep, change prototype. Adjust all callers. Handle DEPS_LISTS. (compute_forward_dependences): Use add_forw_dep. Sort LOG_LINKs in presence of speculation. (init_dependency_caches, free_dependency_caches): Handle spec_dependency_cache. (adjust_add_sorted_back_dep, adjust_back_add_forw_dep, delete_forw_dep, estimate_dep_weak, get_dep_weak, ds_merge, check_dep_status): New static functions. (add_or_update_back_dep, add_or_update_back_forw_dep, add_back_forw_dep, delete_back_forw_dep): New functions. * sched-int.h (ds_t, dw_t): New typedefs. (struct sched_info): Add new field flags. (struct haifa_insn_data): Add new bitfield has_internal_dep. Prototype new sched-deps.c functions. (HAS_INTERNAL_DEP, DEP_STATUS): New access macros. (BITS_PER_DEP_STATUS, BITS_PER_DEP_WEAK, DEP_WEAK_MASK, MAX_DEP_WEAK, MIN_DEP_WEAK, NO_DEP_WEAK, UNCERTAIN_DEP_WEAK, BEGIN_DATA, BE_IN_DATA, BEGIN_CONTROL, BE_IN_CONTROL, BEGIN_SPEC, DATA_SPEC, CONTROL_SPEC, SPECULATIVE, BE_IN_SPEC, FIRST_SPEC_TYPE, LAST_SPEC_TYPE, SPEC_TYPE_SHIFT, DEP_TRUE, DEP_OUTPUT, DEP_ANTI, DEP_TYPES, HARD_DEP): New constants. (enum SPEC_TYPES_OFFSETS, enum DEPS_ADJUST_RESULT, enum SCHED_FLAGS): New enums. * sched-rgn.c (current_sched_info): Initialize flags field. (schedule_insns): Initialize current_sched_info before the sched_init call. * sched-ebb.c (current_sched_info): Initialize flags field. (add_deps_for_risky_insns): Use control_flow_insn_p instead of JUMP_P. Call add_or_update_back_dep instead of add_dependence. Create control speculative dependencies. (schedule_insns): Initialize current_sched_info before the sched_init call. Co-Authored-By: Andrey Belevantsev <abel@ispras.ru> From-SVN: r112125
2006-03-16 06:17:41 +01:00
0
};
/* Partial schedule instruction ID in PS is a register move. Return
information about it. */
static struct ps_reg_move_info *
ps_reg_move (partial_schedule_ptr ps, int id)
{
gcc_checking_assert (id >= ps->g->num_nodes);
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
return &ps->reg_moves[id - ps->g->num_nodes];
}
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
/* Return the rtl instruction that is being scheduled by partial schedule
instruction ID, which belongs to schedule PS. */
static rtx_insn *
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
ps_rtl_insn (partial_schedule_ptr ps, int id)
{
if (id < ps->g->num_nodes)
return ps->g->nodes[id].insn;
else
return ps_reg_move (ps, id)->insn;
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
}
LANGUAGES: Fix typos. * LANGUAGES: Fix typos. * Makefile.in: Fix typos. * alias.c: Fix typos. * auto-inc-dec.c: Fix typos. * bb-reorder.c: Fix typos. * cfgcleanup.c: Fix typos. * cgraph.c: Fix typos. * cgraph.h: Fix typos. * cgraphunit.c: Fix typos. * collect2-aix.h: Fix typos. * collect2.c: Fix typos. * compare-elim.c: Fix typos. * config/alpha/vms.h: Fix typos. * config/arm/README-interworking: Fix typos. * config/arm/arm.c: Fix typos. * config/arm/iterators.md: Fix typos. * config/arm/vxworks.h: Fix typos. * config/avr/avr.c: Fix typos. * config/avr/avr.h: Fix typos. * config/avr/avr.md: Fix typos. * config/avr/builtins.def: Fix typos. * config/c6x/c6x.c: Fix typos. * config/cr16/cr16.c: Fix typos. * config/cr16/cr16.md: Fix typos. * config/cris/cris.md: Fix typos. * config/darwin.c: Fix typos. * config/darwin.opt: Fix typos. * config/i386/i386-c.c: Fix typos. * config/i386/i386.c: Fix typos. * config/ia64/ia64.c: Fix typos. * config/m68k/cf.md: Fix typos. * config/mep/mep.c: Fix typos. * config/microblaze/microblaze.c: Fix typos. * config/microblaze/microblaze.h: Fix typos. * config/mn10300/mn10300.c: Fix typos. * config/mn10300/mn10300.md: Fix typos. * config/pa/pa.c: Fix typos. * config/picochip/picochip.h: Fix typos. * config/rs6000/a2.md: Fix typos. * config/rs6000/rs6000.c: Fix typos. * config/rs6000/vector.md: Fix typos. * config/rx/rx.md: Fix typos. * config/rx/rx.opt: Fix typos. * config/s390/2097.md: Fix typos. * config/s390/s390.c: Fix typos. * config/s390/s390.h: Fix typos. * config/sh/sh.c: Fix typos. * config/sh/sh.md: Fix typos. * config/sparc/sync.md: Fix typos. * config/spu/spu.c: Fix typos. * config/spu/spu.md: Fix typos. * config/vms/vms.c: Fix typos. * config/vxworks-dummy.h: Fix typos. * config/vxworks.h: Fix typos. * cselib.c: Fix typos. * df-scan.c: Fix typos. * df.h: Fix typos. * doc/extend.texi: Fix typos. * doc/install.texi: Fix typos. * doc/invoke.texi: Fix typos. * doc/md.texi: Fix typos. * doc/plugins.texi: Fix typos. * doc/rtl.texi: Fix typos. * dse.c: Fix typos. * dwarf2asm.c: Fix typos. * dwarf2out.c: Fix typos. * except.h: Fix typos. * expr.c: Fix typos. * fold-const.c: Fix typos. * gcc.c: Fix typos. * gcse.c: Fix typos. * genautomata.c: Fix typos. * gengtype-state.c: Fix typos. * gengtype.c: Fix typos. * genhooks.c: Fix typos. * gimple-fold.c: Fix typos. * gimple-pretty-print.c: Fix typos. * gimple.c: Fix typos. * gimple.h: Fix typos. * gimplify.c: Fix typos. * graphite-interchange.c: Fix typos. * graphite-sese-to-poly.c: Fix typos. * ifcvt.c: Fix typos. * input.c: Fix typos. * ipa-cp.c: Fix typos. * ipa-inline-analysis.c: Fix typos. * ipa-inline-transform.c: Fix typos. * ipa-inline.c: Fix typos. * ipa-pure-const.c: Fix typos. * ipa-ref.h: Fix typos. * ipa-reference.c: Fix typos. * ipa-utils.c: Fix typos. * ipa.c: Fix typos. * ira-emit.c: Fix typos. * ira-lives.c: Fix typos. * lto-streamer.c: Fix typos. * lto-streamer.h: Fix typos. * lto-wrapper.c: Fix typos. * mcf.c: Fix typos. * mode-switching.c: Fix typos. * modulo-sched.c: Fix typos. * plugin.c: Fix typos. * postreload.c: Fix typos. * sched-deps.c: Fix typos. * sel-sched-ir.c: Fix typos. * sel-sched-ir.h: Fix typos. * sel-sched.c: Fix typos. * sese.c: Fix typos. * stor-layout.c: Fix typos. * target-hooks-macros.h: Fix typos. * target.def: Fix typos. * trans-mem.c: Fix typos. * tree-eh.c: Fix typos. * tree-predcom.c: Fix typos. * tree-sra.c: Fix typos. * tree-ssa-address.c: Fix typos. * tree-ssa-loop-ivopts.c: Fix typos. * tree-ssa-loop-niter.c: Fix typos. * tree-ssa-math-opts.c: Fix typos. * tree-ssa-pre.c: Fix typos. * tree-ssa-propagate.c: Fix typos. * tree-ssa-reassoc.c: Fix typos. * tree-ssa-sccvn.c: Fix typos. * tree-ssa-ter.c: Fix typos. * tree-ssa-uninit.c: Fix typos. * tree-ssanames.c: Fix typos. * tree-vect-generic.c: Fix typos. * tree-vect-slp.c: Fix typos. * tree.c: Fix typos. * tree.h: Fix typos. * varasm.c: Fix typos. * varpool.c: Fix typos. From-SVN: r187959
2012-05-29 16:14:06 +02:00
/* Partial schedule instruction ID, which belongs to PS, occurred in
the original (unscheduled) loop. Return the first instruction
in the loop that was associated with ps_rtl_insn (PS, ID).
If the instruction had some notes before it, this is the first
of those notes. */
static rtx_insn *
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
ps_first_note (partial_schedule_ptr ps, int id)
{
gcc_assert (id < ps->g->num_nodes);
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
return ps->g->nodes[id].first_note;
}
/* Return the number of consecutive stages that are occupied by
partial schedule instruction ID in PS. */
static int
ps_num_consecutive_stages (partial_schedule_ptr ps, int id)
{
if (id < ps->g->num_nodes)
return 1;
else
return ps_reg_move (ps, id)->num_consecutive_stages;
}
/* Given HEAD and TAIL which are the first and last insns in a loop;
return the register which controls the loop. Return zero if it has
more than one occurrence in the loop besides the control part or the
do-loop pattern is not of the form we expect. */
static rtx
doloop_register_get (rtx_insn *head, rtx_insn *tail)
{
rtx reg, condition;
rtx_insn *insn, *first_insn_not_to_check;
if (!JUMP_P (tail))
return NULL_RTX;
if (!targetm.code_for_doloop_end)
return NULL_RTX;
/* TODO: Free SMS's dependence on doloop_condition_get. */
condition = doloop_condition_get (tail);
if (! condition)
return NULL_RTX;
if (REG_P (XEXP (condition, 0)))
reg = XEXP (condition, 0);
else if (GET_CODE (XEXP (condition, 0)) == PLUS
&& REG_P (XEXP (XEXP (condition, 0), 0)))
reg = XEXP (XEXP (condition, 0), 0);
else
gcc_unreachable ();
/* Check that the COUNT_REG has no other occurrences in the loop
until the decrement. We assume the control part consists of
either a single (parallel) branch-on-count or a (non-parallel)
branch immediately preceded by a single (decrement) insn. */
first_insn_not_to_check = (GET_CODE (PATTERN (tail)) == PARALLEL ? tail
: prev_nondebug_insn (tail));
for (insn = head; insn != first_insn_not_to_check; insn = NEXT_INSN (insn))
if (!DEBUG_INSN_P (insn) && reg_mentioned_p (reg, insn))
{
if (dump_file)
{
fprintf (dump_file, "SMS count_reg found ");
print_rtl_single (dump_file, reg);
fprintf (dump_file, " outside control in insn:\n");
print_rtl_single (dump_file, insn);
}
return NULL_RTX;
}
return reg;
}
/* Check if COUNT_REG is set to a constant in the PRE_HEADER block, so
that the number of iterations is a compile-time constant. If so,
return the rtx_insn that sets COUNT_REG to a constant, and set COUNT to
this constant. Otherwise return 0. */
static rtx_insn *
const_iteration_count (rtx count_reg, basic_block pre_header,
system.h: Define __STDC_FORMAT_MACROS before including inttypes.h. 2014-05-23 Richard Biener <rguenther@suse.de> * system.h: Define __STDC_FORMAT_MACROS before including inttypes.h. * hwint.h (HOST_WIDEST_INT, HOST_BITS_PER_WIDEST_INT, HOST_WIDEST_INT_PRINT, HOST_WIDEST_INT_PRINT_DEC, HOST_WIDEST_INT_PRINT_DEC_C, HOST_WIDEST_INT_PRINT_UNSIGNED, HOST_WIDEST_INT_PRINT_HEX, HOST_WIDEST_INT_PRINT_DOUBLE_HEX, HOST_WIDEST_INT_C): Remove. (PRId64, PRIi64, PRIo64, PRIu64, PRIx64, PRIX64): Define if C99 inttypes.h is not available. * coretypes.h (gcov_type, gcov_type_unsigned): Use [u]int64_t. * gcov-io.h (gcov_type, gcov_type_unsigned): Likewise. * gcov-io.c (gcov_histo_index): Drop non-64bit hwi case. * cfgloop.h (struct niter_desc): Use uint64_t for niter field. * bitmap.c (struct bitmap_descriptor_d): Use uint64_t for counters. (struct output_info): Likewise. (print_statistics): Adjust. (dump_bitmap_statistics): Likewise. * bt-load.c (migrate_btr_defs): Print with PRId64. * cfg.c (dump_edge_info, dump_bb_info): Likewise. (MAX_SAFE_MULTIPLIER): Adjust. * cfghooks.c (dump_bb_for_graph): Print with PRId64. * cgraph.c (cgraph_redirect_edge_call_stmt_to_callee, dump_cgraph_node): Likewise. * final.c (dump_basic_block_info): Likewise. * gcov-dump.c (tag_counters, tag_summary, dump_working_sets): Likewise. * gcov.c (format_gcov): Likewise. * ipa-cp.c (good_cloning_opportunity_p): Likewise. Use int64_t for calculation. (get_clone_agg_value): Use HOST_WIDE_INT for offset. * ipa-inline.c (compute_max_insns): Use int64_t for calcuation. (inline_small_functions, dump_overall_stats, dump_inline_stats): Use PRId64 for dumping. * ipa-profile.c (dump_histogram, ipa_profile): Likewise. * ira-color.c (struct allocno_hard_regs): Use int64_t for cost. (add_allocno_hard_regs): Adjust. * loop-doloop.c (doloop_modify): Print using PRId64. * loop-iv.c (inverse): Compute in uint64_t. (determine_max_iter, iv_number_of_iterations): Likewise. * loop-unroll.c (decide_peel_completely, decide_peel_simple): Print using PRId64. * lto-streamer-out.c (write_symbol): Use uint64_t. * mcf.c (CAP_INFINITY): Use int64_t maximum. (dump_fixup_edge, create_fixup_graph, cancel_negative_cycle, find_max_flow, adjust_cfg_counts): Use int64_t and dump with PRId64. * modulo-sched.c (const_iteration_count): Use int64_t. (sms_schedule): Dump using PRId64. * predict.c (dump_prediction): Likewise. * pretty-print.h (pp_widest_integer): Remove. * profile.c (get_working_sets, is_edge_inconsistent, is_inconsistent, read_profile_edge_counts): Dump using PRId64. * tree-pretty-print.c (pp_double_int): Remove case handling HOST_BITS_PER_DOUBLE_INT == HOST_BITS_PER_WIDEST_INT. * tree-ssa-math-opts.c (struct symbolic_number): Use uint64_t and adjust users. (pass_optimize_bswap::execute): Remove restriction on hosts. * tree-streamer-in.c (streamer_alloc_tree): Use HOST_WIDE_INT. * tree-streamer-out.c (streamer_write_tree_header): Likewise. * tree.c (widest_int_cst_value): Remove. * tree.h (widest_int_cst_value): Likewise. * value-prof.c (dump_histogram_value): Print using PRId64. * gengtype.c (main): Also inject int64_t. * ggc-page.c (struct max_alignment): Use int64_t. * alloc-pool.c (struct allocation_object_def): Likewise. * ira-conflicts.c (build_conflict_bit_table): Use uint64_t for computation. * doc/tm.texi.in: Remove reference to HOST_WIDEST_INT. * doc/tm.texi: Regenerated. * gengtype-lex.l (IWORD): Handle [u]int64_t. * config/sh/sh.c (expand_cbranchdi4): Use gcov_type. * config/mmix/mmix-protos.h (mmix_intval, mmix_shiftable_wyde_value, mmix_output_register_setting): Use [u]int64_t in prototypes. * config/mmix/mmix.c (mmix_print_operand, mmix_output_register_setting, mmix_shiftable_wyde_value, mmix_output_shiftvalue_op_from_str, mmix_output_octa, mmix_output_shifted_value): Adjust. (mmix_intval): Adjust. Remove unreachable case. * config/mmix/mmix.md (*nonlocal_goto_receiver_expanded): Use int64_t. lto/ * lto.c (lto_parse_hex): Use int64_t. (lto_resolution_read): Likewise. From-SVN: r210931
2014-05-26 12:42:43 +02:00
int64_t * count)
{
rtx_insn *insn;
rtx_insn *head, *tail;
if (! pre_header)
return NULL;
target.h (struct spec_info_def): New opaque declaration. 2006-03-16 Maxim Kuvyrkov <mkuvyrkov@ispras.ru> * target.h (struct spec_info_def): New opaque declaration. (struct gcc_target.sched): New fields: adjust_cost_2, h_i_d_extended, speculate_insn, needs_block_p, gen_check, first_cycle_multipass_dfa_lookahead_guard_spec, set_sched_flags. * target-def.h (TARGET_SCHED_ADJUST_COST_2, TARGET_SCHED_H_I_D_EXTENDED, TARGET_SCHED_SPECULATE_INSN, TARGET_SCHED_NEEDS_BLOCK_P, TARGET_SCHED_GEN_CHECK, TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD_SPEC, TARGET_SCHED_SET_SCHED_FLAGS): New macros to initialize fields in gcc_target.sched. (TARGET_SCHED): Use new macros. * rtl.h (copy_DEPS_LIST_list): New prototype. * sched-int.h (struct sched_info): Change signature of new_ready field, adjust all initializations. New fields: add_remove_insn, begin_schedule_ready, add_block, advance_target_bb, fix_recovery_cfg, region_head_or_leaf_p. (struct spec_info_def): New structure declaration. (spec_info_t): New typedef. (struct haifa_insn_data): New fields: todo_spec, done_spec, check_spec, recovery_block, orig_pat. (glat_start, glat_end): New variables declaraions. (TODO_SPEC, DONE_SPEC, CHECK_SPEC, RECOVERY_BLOCK, ORIG_PAT): New access macros. (enum SCHED_FLAGS): New constants: SCHED_RGN, SCHED_EBB, DETACH_LIFE_INFO, USE_GLAT. (enum SPEC_SCHED_FLAGS): New enumeration. (NOTE_NOTE_BB_P): New macro. (extend_dependency_caches, xrecalloc, unlink_bb_notes, add_block, attach_life_info, debug_spec_status, check_reg_live): New functions. (get_block_head_tail): Change signature to get_ebb_head_tail, adjust all uses in ddg.c, modulo-sched.c, haifa-sched.c, sched-rgn.c, sched-ebb.c (get_dep_weak, ds_merge): Prototype functions from sched-deps.c . * ddg.c (get_block_head_tail): Adjust all uses. * modulo-sched.c (get_block_head_tail): Adjust all uses. (sms_sched_info): Initialize new fields. (contributes_to_priority): Removed. * haifa-sched.c (params.h): New include. (get_block_head_tail): Adjust all uses. (ISSUE_POINTS): New macro. (glat_start, glat_end): New global variables. (spec_info_var, spec_info, added_recovery_block_p, nr_begin_data, nr_be_in_data, nr_begin_control, nr_be_in_control, bb_header, old_last_basic_block, before_recovery, current_sched_info_var, rgn_n_insns, luid): New static variables. (insn_cost1): New function. Move logic from insn_cost to here. (find_insn_reg_weight1): New function. Move logic from find_insn_reg_weight to here. (reemit_notes, move_insn, max_issue): Change signature. (move_insn1): Removed. (extend_h_i_d, extend_ready, extend_global, extend_all, init_h_i_d, extend_bb): New static functions to support extension of scheduler's data structures. (generate_recovery_code, process_insn_depend_be_in_spec, begin_speculative_block, add_to_speculative_block, init_before_recovery, create_recovery_block, create_check_block_twin, fix_recovery_deps): New static functions to support generation of recovery code. (fix_jump_move, find_fallthru_edge, dump_new_block_header, restore_bb_notes, move_block_after_check, move_succs): New static functions to support ebb scheduling. (init_glat, init_glat1, attach_life_info1, free_glat): New static functions to support handling of register live information. (associate_line_notes_with_blocks, change_pattern, speculate_insn, sched_remove_insn, clear_priorities, calc_priorities, bb_note, add_jump_dependencies): New static functions. (check_cfg, has_edge_p, check_sched_flags): New static functions for consistancy checking. (debug_spec_status): New function to call from debugger. (priority): Added code to handle speculation checks. (rank_for_schedule): Added code to distinguish speculative instructions. (schedule_insn): Added code to handle speculation checks. (unlink_other_notes, rm_line_notes, restore_line_notes, rm_other_notes): Fixed to handle ebbs. (move_insn): Added code to handle ebb scheduling. (max_issue): Added code to use ISSUE_POINTS of instructions. (choose_ready): Added code to choose between speculative and non-speculative instructions. (schedule_block): Added code to handle ebb scheduling and scheduling of speculative instructions. (sched_init): Initialize new variables. (sched_finish): Free new variables. Print statistics. (try_ready): Added code to handle speculative instructions. * lists.c (copy_DEPS_LIST_list): New function. * sched-deps.c (extend_dependency_caches): New function. Move logic from create_dependency_caches to here. (get_dep_weak, ds_merge): Make global. * genattr.c (main): Code to output prototype for dfa_clear_single_insn_cache. * genautomata.c (DFA_CLEAR_SINGLE_INSN_CACHE_FUNC_NAME): New macros. (output_dfa_clean_insn_cache_func): Code to output dfa_clear_single_insn_cache function. * sched-ebb.c (target_n_insns): Remove. Adjust all users to use n_insns. (can_schedule_ready_p, fix_basic_block_boundaries, add_missing_bbs): Removed. (n_insns, dont_calc_deps, ebb_head, ebb_tail, last_bb): New static variables. (begin_schedule_ready, add_remove_insn, add_block1, advance_target_bb, fix_recovery_cfg, ebb_head_or_leaf_p): Implement hooks from struct sched_info. (ebb_sched_info): Initialize new fields. (get_block_head_tail): Adjust all uses. (compute_jump_reg_dependencies): Fixed to use glat_start. (schedule_ebb): Code to remove unreachable last block. (schedule_ebbs): Added code to update register live information. * sched-rgn.c (region_sched_info): Initialize new fields. (get_block_head_tail): Adjust all uses. (last_was_jump): Removed. Adjust users. (begin_schedule_ready, add_remove_insn, insn_points, extend_regions, add_block1, fix_recovery_cfg, advance_target_bb, region_head_or_leaf_p): Implement new hooks. (check_dead_notes1): New static function. (struct region): New fields: dont_calc_deps, has_real_ebb. (RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB): New access macros. (BB_TO_BLOCK): Fixed to handle EBBs. (EBB_FIRST_BB, EBB_LAST_BB): New macros. (ebb_head): New static variable. (debug_regions, contributes_to_priority): Fixed to handle EBBs. (find_single_block_regions, find_rgns, find_more_rgns): Initialize new fields. (compute_dom_prob_ps): New assertion. (check_live_1, update_live_1): Fixed to work with glat_start instead of global_live_at_start. (init_ready_list): New assertions. (can_schedule_ready_p): Split update code to begin_schedule_ready. (new_ready): Add support for BEGIN_CONTROL speculation. (schedule_insns): Fixed code that updates register live information to handle EBBs. (schedule_region): Fixed to handle EBBs. (init_regions): Use extend_regions and check_dead_notes1. * params.def (PARAM_MAX_SCHED_INSN_CONFLICT_DELAY, PARAM_SCHED_SPEC_PROB_CUTOFF): New parameters. * doc/tm.texi (TARGET_SCHED_ADJUST_COST_2, TARGET_SCHED_H_I_D_EXTENDED, TARGET_SCHED_SPECULATE_INSN, TARGET_SCHED_NEEDS_BLOCK_P, TARGET_SCHED_GEN_CHECK, TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD_SPEC, TARGET_SCHED_SET_SCHED_FLAGS): Document. * doc/invoke.texi (max-sched-insn-conflict-delay, sched-spec-prob-cutoff): Document. From-SVN: r112128
2006-03-16 06:27:03 +01:00
get_ebb_head_tail (pre_header, pre_header, &head, &tail);
for (insn = tail; insn != PREV_INSN (head); insn = PREV_INSN (insn))
invoke.texi (-fvar-tracking-assignments): New. gcc/ChangeLog: * doc/invoke.texi (-fvar-tracking-assignments): New. (-fvar-tracking-assignments-toggle): New. (-fdump-final-insns=file): Mark filename as optional. (--param min-nondebug-insn-uid): New. (-gdwarf-@{version}): Mention version 4. * opts.c (common_handle_option): Accept it. * tree-vrp.c (find_assert_locations_1): Skip debug stmts. * regrename.c (regrename_optimize): Drop last. Don't count debug insns as uses. Don't reject change because of debug insn. (do_replace): Reject DEBUG_INSN as chain starter. Take base_regno from the chain starter, and check for inexact matches in DEBUG_INSNS. (scan_rtx_reg): Accept inexact matches in DEBUG_INSNs. (build_def_use): Simplify and fix the marking of DEBUG_INSNs. * sched-ebb.c (schedule_ebbs): Skip boundary debug insns. * fwprop.c (forward_propagate_and_simplify): ...into debug insns. * doc/gimple.texi (is_gimple_debug): New. (gimple_debug_bind_p): New. (is_gimple_call, gimple_assign_cast_p): End sentence with period. * doc/install.texi (bootstrap-debug): More details. (bootstrap-debug-big, bootstrap-debug-lean): Document. (bootstrap-debug-lib): More details. (bootstrap-debug-ckovw): Update. (bootstrap-time): New. * tree-into-ssa.c (mark_def_sites): Skip debug stmts. (insert_phi_nodes_for): Insert debug stmts. (rewrite_stmt): Take iterator. Insert debug stmts. (rewrite_enter_block): Adjust. (maybe_replace_use_in_debug_stmt): New. (rewrite_update_stmt): Use it. (mark_use_interesting): Return early for debug stmts. * tree-ssa-loop-im.c (rewrite_bittest): Propagate DEFs into debug stmts before replacing stmt. (move_computations_stmt): Likewise. * ira-conflicts.c (add_copies): Skip debug insns. * regstat.c (regstat_init_n_sets_and_refs): Discount debug insns. (regstat_bb_compute_ri): Skip debug insns. * tree-ssa-threadupdate.c (redirection_block_p): Skip debug stmts. * tree-ssa-loop-manip.c (find_uses_to_rename_stmt, check_loop_closed_ssa_stmt): Skip debug stmts. * tree-tailcall.c (find_tail_calls): Likewise. * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Likewise. * tree.h (MAY_HAVE_DEBUG_STMTS): New. (build_var_debug_value_stat): Declare. (build_var_debug_value): Define. (target_for_debug_bind): Declare. * reload.c (find_equiv_reg): Skip debug insns. * rtlanal.c (reg_used_between_p): Skip debug insns. (side_effects_p): Likewise. (canonicalize_condition): Likewise. * ddg.c (create_ddg_dep_from_intra_loop_link): Check that non-debug insns never depend on debug insns. (create_ddg_dep_no_link): Likewise. (add_cross_iteration_register_deps): Use ANTI_DEP for debug insns. Don't add inter-loop dependencies for debug insns. (build_intra_loop_deps): Likewise. (create_ddg): Count debug insns. * ddg.h (struct ddg::num_debug): New. (num_backargs): Pair up with previous int field. * diagnostic.c (diagnostic_report_diagnostic): Skip notes on -fcompare-debug-second. * final.c (get_attr_length_1): Skip debug insns. (rest_of_clean-state): Don't dump CFA_RESTORE_STATE. * gcc.c (invoke_as): Call compare-debug-dump-opt. (driver_self_specs): Map -fdump-final-insns to -fdump-final-insns=.. (get_local_tick): New. (compare_debug_dump_opt_spec_function): Test for . argument and compute output name. Compute temp output spec without flag name. Compute -frandom-seed. (OPT): Undef after use. * cfgloopanal.c (num_loop_insns): Skip debug insns. (average_num_loop_insns): Likewise. * params.h (MIN_NONDEBUG_INSN_UID): New. * gimple.def (GIMPLE_DEBUG): New. * ipa-reference.c (scan_stmt_for_static_refs): Skip debug stmts. * auto-inc-dec.c (merge_in_block): Skip debug insns. (merge_in_block): Fix whitespace. * toplev.c (flag_var_tracking): Update comment. (flag_var_tracking_assignments): New. (flag_var_tracking_assignments_toggle): New. (process_options): Don't open final insns dump file if we're not going to write to it. Compute defaults for var_tracking. * df-scan.c (df_insn_rescan_debug_internal): New. (df_uses_record): Handle debug insns. * haifa-sched.c (ready): Initialize n_debug. (contributes_to_priority): Skip debug insns. (dep_list_size): New. (priority): Use it. (rank_for_schedule): Likewise. Schedule debug insns as soon as they're ready. Disregard previous debug insns to make decisions. (queue_insn): Never queue debug insns. (ready_add, ready_remove_first, ready_remove): Count debug insns. (schedule_insn): Don't reject debug insns because of issue rate. (get_ebb_head_tail, no_real_insns_p): Skip boundary debug insns. (queue_to_ready): Skip and discount debug insns. (choose_ready): Let debug insns through. (schedule_block): Check boundary debug insns. Discount debug insns, schedule them early. Adjust whitespace. (set_priorities): Check for boundary debug insns. (add_jump_dependencies): Use dep_list_size. (prev_non_location_insn): New. (check_cfg): Use it. * tree-ssa-loop-ivopts.c (find-interesting_users): Skip debug stmts. (remove_unused_ivs): Reset debug stmts. * modulo-sched.c (const_iteration_count): Skip debug insns. (res_MII): Discount debug insns. (loop_single_full_bb_p): Skip debug insns. (sms_schedule): Likewise. (sms_schedule_by_order): Likewise. (ps_has_conflicts): Likewise. * caller-save.c (refmarker_fn): New. (save_call_clobbered_regs): Replace regs with saved mem in debug insns. (mark_referenced_regs): Take pointer, mark and arg. Adjust. Call refmarker_fn mark for hardregnos. (mark_reg_as_referenced): New. (replace_reg_with_saved_mem): New. * ipa-pure-const.c (check_stmt): Skip debug stmts. * cse.c (cse_insn): Canonicalize debug insns. Skip them when searching back. (cse_extended_basic_block): Skip debug insns. (count_reg_usage): Likewise. (is_dead_reg): New, split out of... (set_live_p): ... here. (insn_live_p): Use it for debug insns. * tree-stdarg.c (check_all_va_list_escapes): Skip debug stmts. (execute_optimize_stdarg): Likewise. * tree-ssa-dom.c (propagate_rhs_into_lhs): Likewise. * tree-ssa-propagate.c (substitute_and_fold): Don't regard changes in debug stmts as changes. * sel-sched.c (moving_insn_creates_bookkeeping_block_p): New. (moveup_expr): Don't move across debug insns. Don't move debug insn if it would create a bookkeeping block. (moveup_expr_cached): Don't use cache for debug insns that are heads of blocks. (compute_av_set_inside_bb): Skip debug insns. (sel_rank_for_schedule): Schedule debug insns first. Remove dead code. (block_valid_for_bookkeeping_p); Support lax searches. (create_block_for_bookkeeping): Adjust block numbers when encountering debug-only blocks. (find_place_for_bookkeeping): Deal with debug-only blocks. (generate_bookkeeping_insn): Accept no place to insert. (remove_temp_moveop_nops): New argument full_tidying. (prepare_place_to_insert): Deal with debug insns. (advance_state_on_fence): Debug insns don't start cycles. (update_boundaries): Take fence as argument. Deal with debug insns. (schedule_expr_on_boundary): No full_tidying on debug insns. (fill_insns): Deal with debug insns. (track_scheduled_insns_and_blocks): Don't count debug insns. (need_nop_to_preserve_insn_bb): New, split out of... (remove_insn_from_stream): ... this. (fur_orig_expr_not_found): Skip debug insns. * rtl.def (VALUE): Move up. (DEBUG_INSN): New. * tree-ssa-sink.c (all_immediate_uses_same_place): Skip debug stmts. (nearest_common_dominator_of_uses): Take debug_stmts argument. Set it if debug stmts are found. (statement_sink_location): Skip debug stmts. Propagate moving defs into debug stmts. * ifcvt.c (first_active_insn): Skip debug insns. (last_active_insns): Likewise. (cond_exec_process_insns): Likewise. (noce_process_if_block): Likewise. (check_cond_move_block): Likewise. (cond_move_convert_if_block): Likewise. (block_jumps_and_fallthru_p): Likewise. (dead_or_predicable): Likewise. * dwarf2out.c (debug_str_hash_forced): New. (find_AT_string): Add comment. (gen_label_for_indirect_string): New. (get_debug_string_label): New. (AT_string_form): Use it. (mem_loc_descriptor): Handle non-TLS symbols. Handle MINUS , DIV, MOD, AND, IOR, XOR, NOT, ABS, NEG, and CONST_STRING. Accept but discard COMPARE, IF_THEN_ELSE, ROTATE, ROTATERT, TRUNCATE and several operations that cannot be represented with DWARF opcodes. (loc_descriptor): Ignore SIGN_EXTEND and ZERO_EXTEND. Require dwarf_version 4 for DW_OP_implicit_value and DW_OP_stack_value. (dwarf2out_var_location): Take during-call mark into account. (output_indirect_string): Update comment. Output if there are label and references. (prune_indirect_string): New. (prune_unused_types): Call it if debug_str_hash_forced. More in dwarf2out.c, from Jakub Jelinek <jakub@redhat.com>: (dw_long_long_const): Remove. (struct dw_val_struct): Change val_long_long type to rtx. (print_die, attr_checksum, same_dw_val_p, loc_descriptor): Adjust for val_long_long change to CONST_DOUBLE rtx from a long hi/lo pair. (output_die): Likewise. Use HOST_BITS_PER_WIDE_INT size of each component instead of HOST_BITS_PER_LONG. (output_loc_operands): Likewise. For const8* assert HOST_BITS_PER_WIDE_INT rather than HOST_BITS_PER_LONG is >= 64. (output_loc_operands_raw): For const8* assert HOST_BITS_PER_WIDE_INT rather than HOST_BITS_PER_LONG is >= 64. (add_AT_long_long): Remove val_hi and val_lo arguments, add val_const_double. (size_of_die): Use HOST_BITS_PER_WIDE_INT size multiplier instead of HOST_BITS_PER_LONG for dw_val_class_long_long. (add_const_value_attribute): Adjust add_AT_long_long caller. Don't handle TLS SYMBOL_REFs. If CONST wraps a constant, tail recurse. (dwarf_stack_op_name): Handle DW_OP_implicit_value and DW_OP_stack_value. (size_of_loc_descr, output_loc_operands, output_loc_operands_raw): Handle DW_OP_implicit_value. (extract_int): Move prototype earlier. (mem_loc_descriptor): For SUBREG punt if inner mode size is wider than DWARF2_ADDR_SIZE. Handle SIGN_EXTEND and ZERO_EXTEND by DW_OP_shl and DW_OP_shr{a,}. Handle EQ, NE, GT, GE, LT, LE, GTU, GEU, LTU, LEU, SMIN, SMAX, UMIN, UMAX, SIGN_EXTRACT, ZERO_EXTRACT. (loc_descriptor): Compare mode size with DWARF2_ADDR_SIZE instead of Pmode size. (loc_descriptor): Add MODE argument. Handle CONST_INT, CONST_DOUBLE, CONST_VECTOR, CONST, LABEL_REF and SYMBOL_REF if mode != VOIDmode, attempt to handle other expressions. Don't handle TLS SYMBOL_REFs. (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor_from_tree_1): Adjust loc_descriptor callers. (add_location_or_const_value_attribute): Likewise. For single location loc_lists attempt to use add_const_value_attribute for constant decls. Add DW_AT_const_value even if NOTE_VAR_LOCATION is VAR_LOCATION with CONSTANT_P or CONST_STRING in its expression. * cfgbuild.c (inside_basic_block_p): Handle debug insns. (control_flow_insn_p): Likewise. * tree-parloops.c (eliminate_local_variables_stmt): Handle debug stmt. (separate_decls_in_region_debug_bind): New. (separate_decls_in_region): Process debug bind stmts afterwards. * recog.c (verify_changes): Handle debug insns. (extract_insn): Likewise. (peephole2_optimize): Skip debug insns. * dse.c (scan_insn): Skip debug insns. * sel-sched-ir.c (return_nop_to_pool): Take full_tidying argument. Pass it on. (setup_id_for_insn): Handle debug insns. (maybe_tidy_empty_bb): Adjust whitespace. (tidy_control_flow): Skip debug insns. (sel_remove_insn): Adjust for debug insns. (sel_estimate_number_of_insns): Skip debug insns. (create_insn_rtx_from_pattern): Handle debug insns. (create_copy_of_insn_rtx): Likewise. * sel-sched-.h (sel_bb_end): Declare. (sel_bb_empty_or_nop_p): New. (get_all_loop_exits): Use it. (_eligible_successor_edge_p): Likewise. (return_nop_to_pool): Adjust. * tree-eh.c (tre_empty_eh_handler_p): Skip debug stmts. * ira-lives.c (process_bb_node_lives): Skip debug insns. * gimple-pretty-print.c (dump_gimple_debug): New. (dump_gimple_stmt): Use it. (dump_bb_header): Skip gimple debug stmts. * regmove.c (optimize_reg_copy_1): Discount debug insns. (fixup_match_2): Likewise. (regmove_backward_pass): Likewise. Simplify combined replacement. Handle debug insns. * function.c (instantiate_virtual_regs): Handle debug insns. * function.h (struct emit_status): Add x_cur_debug_insn_uid. * print-rtl.h: Include cselib.h. (print_rtx): Print VALUEs. Split out and recurse for VAR_LOCATIONs. * df.h (df_inns_rescan_debug_internal): Declare. * gcse.c (alloc_hash_table): Estimate n_insns. (cprop_insn): Don't regard debug insns as changes. (bypass_conditional_jumps): Skip debug insns. (one_pre_gcse_pass): Adjust. (one_code_hoisting_pass): Likewise. (compute_ld_motion_mems): Skip debug insns. (one_cprop_pass): Adjust. * tree-if-conv.c (tree_if_convert_stmt): Reset debug stmts. (if_convertible_stmt_p): Handle debug stmts. * init-regs.c (initialize_uninitialized_regs): Skip debug insns. * tree-vect-loop.c (vect_is_simple_reduction): Skip debug stmts. * ira-build.c (create_bb_allocnos): Skip debug insns. * tree-flow-inline.h (has_zero_uses): Discount debug stmts. (has_single_use): Likewise. (single_imm_use): Likewise. (num_imm_uses): Likewise. * tree-ssa-phiopt.c (empty_block_p): Skip debug stmts. * tree-ssa-coalesce.c (build_ssa_conflict_graph): Skip debug stmts. (create_outofssa_var_map): Likewise. * lower-subreg.c (adjust_decomposed_uses): New. (resolve_debug): New. (decompose_multiword_subregs): Use it. * tree-dfa.c (find_referenced_vars): Skip debug stmts. * emit-rtl.c: Include params.h. (cur_debug_insn_uid): Define. (set_new_first_and_last_insn): Set cur_debug_insn_uid too. (copy_rtx_if_shared_1): Handle debug insns. (reset_used_flags): Likewise. (set_used_flags): LIkewise. (get_max_insn_count): New. (next_nondebug_insn): New. (prev_nondebug_insn): New. (make_debug_insn_raw): New. (emit_insn_before_noloc): Handle debug insns. (emit_jump_insn_before_noloc): Likewise. (emit_call_insn_before_noloc): Likewise. (emit_debug_insn_before_noloc): New. (emit_insn_after_noloc): Handle debug insns. (emit_jump_insn_after_noloc): Likewise. (emit_call_insn_after_noloc): Likewise. (emit_debug_insn_after_noloc): Likewise. (emit_insn_after): Take loc from earlier non-debug insn. (emit_jump_insn_after): Likewise. (emit_call_insn_after): Likewise. (emit_debug_insn_after_setloc): New. (emit_debug_insn_after): New. (emit_insn_before): Take loc from later non-debug insn. (emit_jump_insn_before): Likewise. (emit_call_insn_before): Likewise. (emit_debug_insn_before_setloc): New. (emit_debug_insn_before): New. (emit_insn): Handle debug insns. (emit_debug_insn): New. (emit_jump_insn): Handle debug insns. (emit_call_insn): Likewise. (emit): Likewise. (init_emit): Take min-nondebug-insn-uid into account. Initialize cur_debug_insn_uid. (emit_copy_of_insn_after): Handle debug insns. * cfgexpand.c (gimple_assign_rhs_to_tree): Do not overwrite location of single rhs in place. (maybe_dump_rtl_for_gimple_stmt): Dump lineno. (floor_sdiv_adjust): New. (cell_sdiv_adjust): New. (cell_udiv_adjust): New. (round_sdiv_adjust): New. (round_udiv_adjust): New. (wrap_constant): Moved from cselib. (unwrap_constant): New. (expand_debug_expr): New. (expand_debug_locations): New. (expand_gimple_basic_block): Drop hiding redeclaration. Expand debug bind stmts. (gimple_expand_cfg): Expand debug locations. * cselib.c: Include tree-pass.h. (struct expand_value_data): New. (cselib_record_sets_hook): New. (PRESERVED_VALUE_P, LONG_TERM_PRESERVED_VALUE_P): New. (cselib_clear_table): Move, and implemnet in terms of... (cselib_reset_table_with_next_value): ... this. (cselib_get_next_unknown_value): New. (discard_useless_locs): Don't discard preserved values. (cselib_preserve_value): New. (cselib_preserved_value_p): New. (cselib_preserve_definitely): New. (cselib_clear_preserve): New. (cselib_preserve_only_values): New. (new_cselib_val): Take rtx argument. Dump it in details. (cselib_lookup_mem): Adjust. (expand_loc): Take regs_active in struct. Adjust. Silence dumps unless details are requested. (cselib_expand_value_rtx_cb): New. (cselib_expand_value_rtx): Rename and reimplment in terms of... (cselib_expand_value_rtx_1): ... this. Adjust. Silence dumps without details. Copy more subregs. Try to resolve values using a callback. Wrap constants. (cselib_subst_to_values): Adjust. (cselib_log_lookup): New. (cselib_lookup): Call it. (cselib_invalidate_regno): Don't count preserved values as useless. (cselib_invalidate_mem): Likewise. (cselib_record_set): Likewise. (struct set): Renamed to cselib_set, moved to cselib.h. (cselib_record_sets): Adjust. Call hook. (cselib_process_insn): Reset table when it would be cleared. (dump_cselib_val): New. (dump_cselib_table): New. * tree-cfgcleanup.c (tree_forwarded_block_p): Skip debug stmts. (remove_forwarder_block): Support moving debug stmts. * cselib.h (cselib_record_sets_hook): Declare. (cselib_expand_callback): New type. (cselib_expand_value_rtx_cb): Declare. (cselib_reset_table_with_next_value): Declare. (cselib_get_next_unknown_value): Declare. (cselib_preserve_value): Declare. (cselib_preserved_value_p): Declare. (cselib_preserve_only_values): Declare. (dump_cselib_table): Declare. * cfgcleanup.c (flow_find_cross_jump): Skip debug insns. (try_crossjump_to_edge): Likewise. (delete_unreachable_blocks): Remove dominant GIMPLE blocks after dominated blocks when debug stmts are present. * simplify-rtx.c (delegitimize_mem_from_attrs): New. * tree-ssa-live.c (remove_unused_locals): Skip debug stmts. (set_var_live_on_entry): Likewise. * loop-invariant.c (find_invariants_bb): Skip debug insns. * cfglayout.c (curr_location, last_location): Make static. (set_curr_insn_source_location): Don't avoid bouncing. (get_curr_insn_source_location): New. (get_curr_insn_block): New. (duplicate_insn_chain): Handle debug insns. * tree-ssa-forwprop.c (forward_propagate_addr_expr): Propagate into debug stmts. * common.opt (fcompare-debug): Move to sort order. (fdump-unnumbered-links): Likewise. (fvar-tracking-assignments): New. (fvar-tracking-assignments-toggle): New. * tree-ssa-dce.c (mark_stmt_necessary): Don't mark blocks because of debug stmts. (mark_stmt_if_obviously_necessary): Mark debug stmts. (eliminate_unnecessary_stmts): Walk dominated blocks before dominators. * tree-ssa-ter.c (find_replaceable_in_bb): Skip debug stmts. * ira.c (memref_used_between_p): Skip debug insns. (update_equiv_regs): Likewise. * sched-deps.c (sd_lists_size): Accept empty list. (sd_init_insn): Mark debug insns. (sd_finish_insn): Unmark them. (sd_add_dep): Reject non-debug deps on debug insns. (fixup_sched_groups): Give debug insns group treatment. Skip debug insns. (sched_analyze_reg): Don't mark debug insns for sched before call. (sched_analyze_2): Handle debug insns. (sched_analyze_insn): Compute next non-debug insn. Handle debug insns. (deps_analyze_insn): Handle debug insns. (deps_start_bb): Skip debug insns. (init_deps): Initialize last_debug_insn. * tree-ssa.c (target_for_debug_bind): New. (find_released_ssa_name): New. (propagate_var_def_into_debug_stmts): New. (propagate_defs_into_debug_stmts): New. (verify_ssa): Skip debug bind stmts without values. (warn_uninialized_vars): Skip debug stmts. * target-def.h (TARGET_DELEGITIMIZE_ADDRESS): Set default. * rtl.c (rtx_equal_p_cb): Handle VALUEs. (rtx_equal_p): Likewise. * ira-costs.c (scan_one_insn): Skip debug insns. (process_bb_node_for_hard_reg_moves): Likewise. * rtl.h (DEBUG_INSN_P): New. (NONDEBUG_INSN_P): New. (MAY_HAVE_DEBUG_INSNS): New. (INSN_P): Accept debug insns. (RTX_FRAME_RELATED_P): Likewise. (INSN_DELETED_P): Likewise (PAT_VAR_LOCATION_DECL): New. (PAT_VAR_LOCATION_LOC): New. (PAT_VAR_OCATION_STATUS): New. (NOTE_VAR_LOCATION_DECL): Reimplement. (NOTE_VAR_LOCATION_LOC): Likewise. (NOTE_VAR_LOCATION_STATUS): Likewise. (INSN_VAR_LOCATION): New. (INSN_VAR_LOCATION_DECL): New. (INSN_VAR_LOCATION_LOC): New. (INSN_VAR_LOCATION_STATUS): New. (gen_rtx_UNKNOWN_VAR_LOC): New. (VAR_LOC_UNKNOWN_P): New. (NOTE_DURING_CALL_P): New. (SCHED_GROUP_P): Accept debug insns. (emit_debug_insn_before): Declare. (emit_debug_insn_before_noloc): Declare. (emit_debug_insn_beore_setloc): Declare. (emit_debug_insn_after): Declare. (emit_debug_insn_after_noloc): Declare. (emit_debug_insn_after_setloc): Declare. (emit_debug_insn): Declare. (make_debug_insn_raw): Declare. (prev_nondebug_insn): Declare. (next_nondebug_insn): Declare. (delegitimize_mem_from_attrs): Declare. (get_max_insn_count): Declare. (wrap_constant): Declare. (unwrap_constant): Declare. (get_curr_insn_source_location): Declare. (get_curr_insn_block): Declare. * tree-inline.c (insert_debug_decl_map): New. (processing_debug_stmt): New. (remap_decl): Don't create new mappings in debug stmts. (remap_gimple_op_r): Don't add references in debug stmts. (copy_tree_body_r): Likewise. (remap_gimple_stmt): Handle debug bind stmts. (copy_bb): Skip debug stmts. (copy_edges_for_bb): Likewise. (copy_debug_stmt): New. (copy_debug_stmts): New. (copy_body): Copy debug stmts at the end. (insert_init_debug_bind): New. (insert_init_stmt): Take id. Skip and emit debug stmts. (setup_one_parameter): Remap variable earlier, register debug mapping. (estimate_num_insns): Skip debug stmts. (expand_call_inline): Preserve debug_map. (optimize_inline_calls): Check for no debug_stmts left-overs. (unsave_expr_now): Preserve debug_map. (copy_gimple_seq_and_replace_locals): Likewise. (tree_function_versioning): Check for no debug_stmts left-overs. Init and destroy debug_map as needed. Split edges unconditionally. (build_duplicate_type): Init and destroy debug_map as needed. * tree-inline.h: Include gimple.h instead of pointer-set.h. (struct copy_body_data): Add debug_stmts and debug_map. * sched-int.h (struct ready_list): Add n_debug. (struct deps): Add last_debug_insn. (DEBUG_INSN_SCHED_P): New. (BOUNDARY_DEBUG_INSN_P): New. (SCHEDULE_DEBUG_INSN_P): New. (sd_iterator_cond): Accept empty list. * combine.c (create_log_links): Skip debug insns. (combine_instructions): Likewise. (cleanup_auto_inc_dec): New. From Jakub Jelinek: Make sure the return value is always unshared. (struct rtx_subst_pair): New. (auto_adjust_pair): New. (propagate_for_debug_subst): New. (propagate_for_debug): New. (try_combine): Skip debug insns. Propagate removed defs into debug insns. (next_nonnote_nondebug_insn): New. (distribute_notes): Use it. Skip debug insns. (distribute_links): Skip debug insns. * tree-outof-ssa.c (set_location_for_edge): Likewise. * resource.c (mark_target_live_regs): Likewise. * var-tracking.c: Include cselib.h and target.h. (enum micro_operation_type): Add MO_VAL_USE, MO_VAL_LOC, and MO_VAL_SET. (micro_operation_type_name): New. (enum emit_note_where): Add EMIT_NOTE_AFTER_CALL_INSN. (struct micro_operation_def): Update comments. (decl_or_value): New type. Use instead of decls. (struct emit_note_data_def): Add vars. (struct attrs_def): Use decl_or_value. (struct variable_tracking_info_def): Add permp, flooded. (struct location_chain_def): Update comment. (struct variable_part_def): Use decl_or_value. (struct variable_def): Make var_part a variable length array. (valvar_pool): New. (scratch_regs): New. (cselib_hook_called): New. (dv_is_decl_p): New. (dv_is_value_p): New. (dv_as_decl): New. (dv_as_value): New. (dv_as_opaque): New. (dv_onepart_p): New. (dv_pool): New. (IS_DECL_CODE): New. (check_value_is_not_decl): New. (dv_from_decl): New. (dv_from_value): New. (dv_htab_hash): New. (variable_htab_hash): Use it. (variable_htab_eq): Support values. (variable_htab_free): Free from the right pool. (attrs_list_member, attrs_list_insert): Use decl_or_value. (attrs_list_union): Adjust. (attrs_list_mpdv_union): New. (tie_break_pointers): New. (canon_value_cmp): New. (unshare_variable): Return possibly-modified slot. (vars_copy_1): Adjust. (var_reg_decl_set): Adjust. Split out of... (var_reg_set): ... this. (get_init_value): Adjust. (var_reg_delete_and_set): Adjust. (var_reg_delete): Adjust. (var_regno_delete): Adjust. (var_mem_decl_set): Split out of... (var_mem_set): ... this. (var_mem_delete_and_set): Adjust. (var_mem_delete): Adjust. (val_store): New. (val_reset): New. (val_resolve): New. (variable_union): Adjust. Speed up merge of 1-part vars. (variable_canonicalize): Use unshared slot. (VALUED_RECURSED_INTO): New. (find_loc_in_1pdv): New. (struct dfset_merge): New. (insert_into_intersection): New. (intersect_loc_chains): New. (loc_cmp): New. (canonicalize_loc_order_check): New. (canonicalize_values_mark): New. (canonicalize_values_star): New. (variable_merge_over_cur): New. (variable_merge_over_src): New. (dataflow_set_merge): New. (dataflow_set_equiv_regs): New. (remove_duplicate_values): New. (struct dfset_post_merge): New. (variable_post_merge_new_vals): New. (variable_post_merge_perm_vals): New. (dataflow_post_merge_adjust): New. (find_mem_expr_in_1pdv): New. (dataflow_set_preserve_mem_locs): New. (dataflow_set_remove_mem_locs): New. (dataflow_set_clear_at_call): New. (onepart_variable_different_p): New. (variable_different_p): Use it. (dataflow_set_different_1): Adjust. Make detailed dump more verbose. (track_expr_p): Add need_rtl parameter. Don't generate rtl if not needed. (track_loc_p): Pass it true. (struct count_use_info): New. (find_use_val): New. (replace_expr_with_values): New. (log_op_type): New. (use_type): New, partially split out of... (count_uses): ... this. Count new micro-ops. (count_uses_1): Adjust. (count_stores): Adjust. (count_with_sets): New. (VAL_NEEDS_RESOLUTION): New. (VAL_HOLDS_TRACK_EXPR): New. (VAL_EXPR_IS_COPIED): New. (VAL_EXPR_IS_CLOBBERED): New. (add_uses): Adjust. Generate new micro-ops. (add_uses_1): Adjust. (add_stores): Generate new micro-ops. (add_with_sets): New. (find_src_status): Adjust. (find_src_set_src): Adjust. (compute_bb_dataflow): Use dataflow_set_clear_at_call. Handle new micro-ops. Canonicalize value equivalances. (vt_find_locations): Compute total size of hash tables for dumping. Perform merge for var-tracking-assignments. Don't disregard single-block loops. (dump_attrs_list): Handle decl_or_value. (dump_variable): Take variable. Deal with decl_or_value. (dump_variable_slot): New. (dump_vars): Use it. (dump_dataflow_sets): Adjust. (set_slot_part): New, extended to support one-part variables after splitting out of... (set_variable_part): ... this. (clobber_slot_part): New, split out of... (clobber_variable_part): ... this. (delete_slot_part): New, split out of... (delete_variable_part): .... this. (check_wrap_constant): New. (vt_expand_loc_callback): New. (vt_expand_loc): New. (emit_note_insn_var_location): Adjust. Handle values. Handle EMIT_NOTE_AFTER_CALL_INSN. (emit_notes_for_differences_1): Adjust. Handle values. (emit_notes_for_differences_2): Likewise. (emit_notes_for_differences): Adjust. (emit_notes_in_bb): Take pointer to set. Emit AFTER_CALL_INSN notes. Adjust. Handle new micro-ops. (vt_add_function_parameters): Adjust. Create and bind values. (vt_initialize): Adjust. Initialize scratch_regs and valvar_pool, flooded and perm.. Initialize and use cselib. Log operations. Move some code to count_with_sets and add_with_sets. (delete_debug_insns): New. (vt_debug_insns_local): New. (vt_finalize): Release permp, valvar_pool, scratch_regs. Finish cselib. (var_tracking_main): If var-tracking-assignments is enabled but var-tracking isn't, delete debug insns and leave. Likewise if we exceed limits or fail the stack adjustments tests, and after all var-tracking processing. More in var-tracking, from Jakub Jelinek <jakub@redhat.com>: (dataflow_set): Add traversed_vars. (value_chain, const_value_chain): New typedefs. (value_chain_pool, value_chains): New variables. (value_chain_htab_hash, value_chain_htab_eq, add_value_chain, add_value_chains, add_cselib_value_chains, remove_value_chain, remove_value_chains, remove_cselib_value_chains): New functions. (shared_hash_find_slot_unshare_1, shared_hash_find_slot_1, shared_hash_find_slot_noinsert_1, shared_hash_find_1): New static inlines. (shared_hash_find_slot_unshare, shared_hash_find_slot, shared_hash_find_slot_noinsert, shared_hash_find): Update. (dst_can_be_shared): New variable. (unshare_variable): Unshare set->vars if shared, use shared_hash_*. Clear dst_can_be_shared. If set->traversed_vars is non-NULL and different from set->vars, look up slot again instead of using the passed in slot. (dataflow_set_init): Initialize traversed_vars. (variable_union): Use shared_hash_*. Use initially NO_INSERT lookup if set->vars is shared. Don't keep slot cleared before calling unshare_variable. Unshare set->vars if needed. Adjust unshare_variable callers. Clear dst_can_be_shared if needed. Even ->refcount == 1 vars must be unshared if set->vars is shared and var needs to be modified. (dataflow_set_union): Set traversed_vars during canonicalization. (VALUE_CHANGED, DECL_CHANGED): Define. (set_dv_changed, dv_changed_p): New static inlines. (track_expr_p): Clear DECL_CHANGED. (dump_dataflow_sets): Set it. (variable_was_changed): Call set_dv_changed. (emit_note_insn_var_location): Likewise. (changed_variables_stack): New variable. (check_changed_vars_1, check_changed_vars_2): New functions. (emit_notes_for_changes): Do nothing if changed_variables is empty. Traverse changed_variables with check_changed_vars_1, call check_changed_vars_2 on each changed_variables_stack entry. (emit_notes_in_bb): Add SET argument. Just clear it at the beginning, use it instead of local &set, don't destroy it at the end. (vt_emit_notes): Call dataflow_set_clear early on all VTI(bb)->out sets, never use them, instead use emit_notes_in_bb computed set, dataflow_set_clear also VTI(bb)->in when we are done with the basic block. Initialize changed_variables_stack, free it afterwards. If ENABLE_CHECKING verify that after noting differences to an empty set value_chains hash table is empty. (vt_initialize): Initialize value_chains and value_chain_pool. (vt_finalize): Delete value_chains htab, free value_chain_pool. (variable_tracking_main): Call dump_dataflow_sets before calling vt_emit_notes, not after it. * tree-flow.h (propagate_defs_into_debug_stmts): Declare. (propagate_var_def_into_debug_stmts): Declare. * df-problems.c (df_lr_bb_local_compute): Skip debug insns. (df_set_note): Reject debug insns. (df_whole_mw_reg_dead_p): Take added_notes_p argument. Don't add notes to debug insns. (df_note_bb_compute): Adjust. Likewise. (df_simulate_uses): Skip debug insns. (df_simulate_initialize_backwards): Likewise. * reg-stack.c (subst_stack_regs_in_debug_insn): New. (subst_stack_regs_pat): Reject debug insns. (convert_regs_1): Handle debug insns. * Makefile.in (TREE_INLINE_H): Take pointer-set.h from GIMPLE_H. (print-rtl.o): Depend on cselib.h. (cselib.o): Depend on TREE_PASS_H. (var-tracking.o): Depend on cselib.h and TARGET_H. * sched-rgn.c (rgn_estimate_number_of_insns): Discount debug insns. (init_ready_list): Skip boundary debug insns. (add_branch_dependences): Skip debug insns. (free_block_dependencies): Check for blocks with only debug insns. (compute_priorities): Likewise. * gimple.c (gss_for_code): Handle GIMPLE_DEBUG. (gimple_build_with_ops_stat): Take subcode as unsigned. Adjust all callers. (gimple_build_debug_bind_stat): New. (empty_body_p): Skip debug stmts. (gimple_has_side_effects): Likewise. (gimple_rhs_has_side_effects): Likewise. * gimple.h (enum gimple_debug_subcode, GIMPLE_DEBUG_BIND): New. (gimple_build_debug_bind_stat): Declare. (gimple_build_debug_bind): Define. (is_gimple_debug): New. (gimple_debug_bind_p): New. (gimple_debug_bind_get_var): New. (gimple_debug_bind_get_value): New. (gimple_debug_bind_get_value_ptr): New. (gimple_debug_bind_set_var): New. (gimple_debug_bind_set_value): New. (GIMPLE_DEBUG_BIND_NOVALUE): New internal temporary macro. (gimple_debug_bind_reset_value): New. (gimple_debug_bind_has_value_p): New. (gsi_next_nondebug): New. (gsi_prev_nondebug): New. (gsi_start_nondebug_bb): New. (gsi_last_nondebug_bb): New. * sched-vis.c (print_pattern): Handle VAR_LOCATION. (print_insn): Handle DEBUG_INSN. * tree-cfg.c (remove_bb): Walk stmts backwards. Let loc of first insn prevail. (first_stmt): Skip debug stmts. (first_non_label_stmt): Likewise. (last_stmt): Likewise. (has_zero_uses_1): New. (single_imm_use_1): New. (verify_gimple_debug): New. (verify_types_in_gimple_stmt): Handle debug stmts. (verify_stmt): Likewise. (debug_loop_num): Skip debug stmts. (remove_edge_and_dominated_blocks): Remove dominators last. * tree-ssa-reasssoc.c (rewrite_expr_tree): Propagate into debug stmts. (linearize_expr): Likewise. * config/i386/i386.c (ix86_delegitimize_address): Call default implementation. * config/ia64/ia64.c (ia64_safe_itanium_class): Handle debug insns. (group_barrier_needed): Skip debug insns. (emit_insn_group_barriers): Likewise. (emit_all_insn_group_barriers): Likewise. (ia64_variable_issue): Handle debug insns. (ia64_dfa_new_cycle): Likewise. (final_emit_insn_group_barriers): Skip debug insns. (ia64_dwarf2out_def_steady_cfa): Take frame argument. Don't def cfa without frame. (process_set): Likewise. (process_for_unwind_directive): Pass frame on. * config/rs6000/rs6000.c (TARGET_DELEGITIMIZE_ADDRESS): Define. (rs6000_delegitimize_address): New. (rs6000_debug_adjust_cost): Handle debug insns. (is_microcoded_insn): Likewise. (is_cracked_insn): Likewise. (is_nonpipeline_insn): Likewise. (insn_must_be_first_in_group): Likewise. (insn_must_be_last_in_group): Likewise. (force_new_group): Likewise. * cfgrtl.c (rtl_split_block): Emit INSN_DELETED note if block contains only debug insns. (rtl_merge_blocks): Skip debug insns. (purge_dead_edges): Likewise. (rtl_block_ends_with_call_p): Skip debug insns. * dce.c (deletable_insn_p): Handle VAR_LOCATION. (mark_reg_dependencies): Skip debug insns. * params.def (PARAM_MIN_NONDEBUG_INSN_UID): New. * tree-ssanames.c (release_ssa_name): Propagate def into debug stmts. * tree-ssa-threadedge.c (record_temporary_equivalences_from_stmts): Skip debug stmts. * regcprop.c (replace_oldest_value_addr): Skip debug insns. (replace_oldest_value_mem): Use ALL_REGS for debug insns. (copyprop_hardreg_forward_1): Handle debug insns. * reload1.c (reload): Skip debug insns. Replace unassigned pseudos in debug insns with their equivalences. (eliminate_regs_in_insn): Skip debug insns. (emit_input_reload_insns): Skip debug insns at first, adjust them later. * tree-ssa-operands.c (add_virtual_operand): Reject debug stmts. (get_indirect_ref_operands): Pass opf_no_vops on. (get_expr_operands): Likewise. Skip debug stmts. (parse_ssa_operands): Scan debug insns with opf_no_vops. gcc/testsuite/ChangeLog: * gcc.dg/guality/guality.c: New. * gcc.dg/guality/guality.h: New. * gcc.dg/guality/guality.exp: New. * gcc.dg/guality/example.c: New. * lib/gcc-dg.exp (cleanup-dump): Remove .gk files. (cleanup-saved-temps): Likewise, .gkd files too. gcc/cp/ChangeLog: * cp-tree.h (TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS): New. * cp-lang.c (cxx_dwarf_name): Pass it. * error.c (count_non_default_template_args): Take flags as argument. Adjust all callers. Skip counting of default arguments if the new flag is given. ChangeLog: * Makefile.tpl (BUILD_CONFIG): Default to bootstrap-debug. * Makefile.in: Rebuilt. contrib/ChangeLog: * compare-debug: Look for .gkd files and compare them. config/ChangeLog: * bootstrap-debug.mk: Add comments. * bootstrap-debug-big.mk: New. * bootstrap-debug-lean.mk: New. * bootstrap-debug-ckovw.mk: Add comments. * bootstrap-debug-lib.mk: Drop CFLAGS for stages. Use -g0 for TFLAGS in stage1. Drop -fvar-tracking-assignments-toggle. From-SVN: r151312
2009-09-02 04:42:21 +02:00
if (NONDEBUG_INSN_P (insn) && single_set (insn) &&
rtx_equal_p (count_reg, SET_DEST (single_set (insn))))
{
rtx pat = single_set (insn);
if (CONST_INT_P (SET_SRC (pat)))
{
*count = INTVAL (SET_SRC (pat));
return insn;
}
return NULL;
}
return NULL;
}
/* A very simple resource-based lower bound on the initiation interval.
??? Improve the accuracy of this bound by considering the
utilization of various units. */
static int
res_MII (ddg_ptr g)
{
if (targetm.sched.sms_res_mii)
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: 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-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.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. * 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. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: 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-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.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-live.h: 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-operands.h: 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-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.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-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
return targetm.sched.sms_res_mii (g);
invoke.texi (-fvar-tracking-assignments): New. gcc/ChangeLog: * doc/invoke.texi (-fvar-tracking-assignments): New. (-fvar-tracking-assignments-toggle): New. (-fdump-final-insns=file): Mark filename as optional. (--param min-nondebug-insn-uid): New. (-gdwarf-@{version}): Mention version 4. * opts.c (common_handle_option): Accept it. * tree-vrp.c (find_assert_locations_1): Skip debug stmts. * regrename.c (regrename_optimize): Drop last. Don't count debug insns as uses. Don't reject change because of debug insn. (do_replace): Reject DEBUG_INSN as chain starter. Take base_regno from the chain starter, and check for inexact matches in DEBUG_INSNS. (scan_rtx_reg): Accept inexact matches in DEBUG_INSNs. (build_def_use): Simplify and fix the marking of DEBUG_INSNs. * sched-ebb.c (schedule_ebbs): Skip boundary debug insns. * fwprop.c (forward_propagate_and_simplify): ...into debug insns. * doc/gimple.texi (is_gimple_debug): New. (gimple_debug_bind_p): New. (is_gimple_call, gimple_assign_cast_p): End sentence with period. * doc/install.texi (bootstrap-debug): More details. (bootstrap-debug-big, bootstrap-debug-lean): Document. (bootstrap-debug-lib): More details. (bootstrap-debug-ckovw): Update. (bootstrap-time): New. * tree-into-ssa.c (mark_def_sites): Skip debug stmts. (insert_phi_nodes_for): Insert debug stmts. (rewrite_stmt): Take iterator. Insert debug stmts. (rewrite_enter_block): Adjust. (maybe_replace_use_in_debug_stmt): New. (rewrite_update_stmt): Use it. (mark_use_interesting): Return early for debug stmts. * tree-ssa-loop-im.c (rewrite_bittest): Propagate DEFs into debug stmts before replacing stmt. (move_computations_stmt): Likewise. * ira-conflicts.c (add_copies): Skip debug insns. * regstat.c (regstat_init_n_sets_and_refs): Discount debug insns. (regstat_bb_compute_ri): Skip debug insns. * tree-ssa-threadupdate.c (redirection_block_p): Skip debug stmts. * tree-ssa-loop-manip.c (find_uses_to_rename_stmt, check_loop_closed_ssa_stmt): Skip debug stmts. * tree-tailcall.c (find_tail_calls): Likewise. * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Likewise. * tree.h (MAY_HAVE_DEBUG_STMTS): New. (build_var_debug_value_stat): Declare. (build_var_debug_value): Define. (target_for_debug_bind): Declare. * reload.c (find_equiv_reg): Skip debug insns. * rtlanal.c (reg_used_between_p): Skip debug insns. (side_effects_p): Likewise. (canonicalize_condition): Likewise. * ddg.c (create_ddg_dep_from_intra_loop_link): Check that non-debug insns never depend on debug insns. (create_ddg_dep_no_link): Likewise. (add_cross_iteration_register_deps): Use ANTI_DEP for debug insns. Don't add inter-loop dependencies for debug insns. (build_intra_loop_deps): Likewise. (create_ddg): Count debug insns. * ddg.h (struct ddg::num_debug): New. (num_backargs): Pair up with previous int field. * diagnostic.c (diagnostic_report_diagnostic): Skip notes on -fcompare-debug-second. * final.c (get_attr_length_1): Skip debug insns. (rest_of_clean-state): Don't dump CFA_RESTORE_STATE. * gcc.c (invoke_as): Call compare-debug-dump-opt. (driver_self_specs): Map -fdump-final-insns to -fdump-final-insns=.. (get_local_tick): New. (compare_debug_dump_opt_spec_function): Test for . argument and compute output name. Compute temp output spec without flag name. Compute -frandom-seed. (OPT): Undef after use. * cfgloopanal.c (num_loop_insns): Skip debug insns. (average_num_loop_insns): Likewise. * params.h (MIN_NONDEBUG_INSN_UID): New. * gimple.def (GIMPLE_DEBUG): New. * ipa-reference.c (scan_stmt_for_static_refs): Skip debug stmts. * auto-inc-dec.c (merge_in_block): Skip debug insns. (merge_in_block): Fix whitespace. * toplev.c (flag_var_tracking): Update comment. (flag_var_tracking_assignments): New. (flag_var_tracking_assignments_toggle): New. (process_options): Don't open final insns dump file if we're not going to write to it. Compute defaults for var_tracking. * df-scan.c (df_insn_rescan_debug_internal): New. (df_uses_record): Handle debug insns. * haifa-sched.c (ready): Initialize n_debug. (contributes_to_priority): Skip debug insns. (dep_list_size): New. (priority): Use it. (rank_for_schedule): Likewise. Schedule debug insns as soon as they're ready. Disregard previous debug insns to make decisions. (queue_insn): Never queue debug insns. (ready_add, ready_remove_first, ready_remove): Count debug insns. (schedule_insn): Don't reject debug insns because of issue rate. (get_ebb_head_tail, no_real_insns_p): Skip boundary debug insns. (queue_to_ready): Skip and discount debug insns. (choose_ready): Let debug insns through. (schedule_block): Check boundary debug insns. Discount debug insns, schedule them early. Adjust whitespace. (set_priorities): Check for boundary debug insns. (add_jump_dependencies): Use dep_list_size. (prev_non_location_insn): New. (check_cfg): Use it. * tree-ssa-loop-ivopts.c (find-interesting_users): Skip debug stmts. (remove_unused_ivs): Reset debug stmts. * modulo-sched.c (const_iteration_count): Skip debug insns. (res_MII): Discount debug insns. (loop_single_full_bb_p): Skip debug insns. (sms_schedule): Likewise. (sms_schedule_by_order): Likewise. (ps_has_conflicts): Likewise. * caller-save.c (refmarker_fn): New. (save_call_clobbered_regs): Replace regs with saved mem in debug insns. (mark_referenced_regs): Take pointer, mark and arg. Adjust. Call refmarker_fn mark for hardregnos. (mark_reg_as_referenced): New. (replace_reg_with_saved_mem): New. * ipa-pure-const.c (check_stmt): Skip debug stmts. * cse.c (cse_insn): Canonicalize debug insns. Skip them when searching back. (cse_extended_basic_block): Skip debug insns. (count_reg_usage): Likewise. (is_dead_reg): New, split out of... (set_live_p): ... here. (insn_live_p): Use it for debug insns. * tree-stdarg.c (check_all_va_list_escapes): Skip debug stmts. (execute_optimize_stdarg): Likewise. * tree-ssa-dom.c (propagate_rhs_into_lhs): Likewise. * tree-ssa-propagate.c (substitute_and_fold): Don't regard changes in debug stmts as changes. * sel-sched.c (moving_insn_creates_bookkeeping_block_p): New. (moveup_expr): Don't move across debug insns. Don't move debug insn if it would create a bookkeeping block. (moveup_expr_cached): Don't use cache for debug insns that are heads of blocks. (compute_av_set_inside_bb): Skip debug insns. (sel_rank_for_schedule): Schedule debug insns first. Remove dead code. (block_valid_for_bookkeeping_p); Support lax searches. (create_block_for_bookkeeping): Adjust block numbers when encountering debug-only blocks. (find_place_for_bookkeeping): Deal with debug-only blocks. (generate_bookkeeping_insn): Accept no place to insert. (remove_temp_moveop_nops): New argument full_tidying. (prepare_place_to_insert): Deal with debug insns. (advance_state_on_fence): Debug insns don't start cycles. (update_boundaries): Take fence as argument. Deal with debug insns. (schedule_expr_on_boundary): No full_tidying on debug insns. (fill_insns): Deal with debug insns. (track_scheduled_insns_and_blocks): Don't count debug insns. (need_nop_to_preserve_insn_bb): New, split out of... (remove_insn_from_stream): ... this. (fur_orig_expr_not_found): Skip debug insns. * rtl.def (VALUE): Move up. (DEBUG_INSN): New. * tree-ssa-sink.c (all_immediate_uses_same_place): Skip debug stmts. (nearest_common_dominator_of_uses): Take debug_stmts argument. Set it if debug stmts are found. (statement_sink_location): Skip debug stmts. Propagate moving defs into debug stmts. * ifcvt.c (first_active_insn): Skip debug insns. (last_active_insns): Likewise. (cond_exec_process_insns): Likewise. (noce_process_if_block): Likewise. (check_cond_move_block): Likewise. (cond_move_convert_if_block): Likewise. (block_jumps_and_fallthru_p): Likewise. (dead_or_predicable): Likewise. * dwarf2out.c (debug_str_hash_forced): New. (find_AT_string): Add comment. (gen_label_for_indirect_string): New. (get_debug_string_label): New. (AT_string_form): Use it. (mem_loc_descriptor): Handle non-TLS symbols. Handle MINUS , DIV, MOD, AND, IOR, XOR, NOT, ABS, NEG, and CONST_STRING. Accept but discard COMPARE, IF_THEN_ELSE, ROTATE, ROTATERT, TRUNCATE and several operations that cannot be represented with DWARF opcodes. (loc_descriptor): Ignore SIGN_EXTEND and ZERO_EXTEND. Require dwarf_version 4 for DW_OP_implicit_value and DW_OP_stack_value. (dwarf2out_var_location): Take during-call mark into account. (output_indirect_string): Update comment. Output if there are label and references. (prune_indirect_string): New. (prune_unused_types): Call it if debug_str_hash_forced. More in dwarf2out.c, from Jakub Jelinek <jakub@redhat.com>: (dw_long_long_const): Remove. (struct dw_val_struct): Change val_long_long type to rtx. (print_die, attr_checksum, same_dw_val_p, loc_descriptor): Adjust for val_long_long change to CONST_DOUBLE rtx from a long hi/lo pair. (output_die): Likewise. Use HOST_BITS_PER_WIDE_INT size of each component instead of HOST_BITS_PER_LONG. (output_loc_operands): Likewise. For const8* assert HOST_BITS_PER_WIDE_INT rather than HOST_BITS_PER_LONG is >= 64. (output_loc_operands_raw): For const8* assert HOST_BITS_PER_WIDE_INT rather than HOST_BITS_PER_LONG is >= 64. (add_AT_long_long): Remove val_hi and val_lo arguments, add val_const_double. (size_of_die): Use HOST_BITS_PER_WIDE_INT size multiplier instead of HOST_BITS_PER_LONG for dw_val_class_long_long. (add_const_value_attribute): Adjust add_AT_long_long caller. Don't handle TLS SYMBOL_REFs. If CONST wraps a constant, tail recurse. (dwarf_stack_op_name): Handle DW_OP_implicit_value and DW_OP_stack_value. (size_of_loc_descr, output_loc_operands, output_loc_operands_raw): Handle DW_OP_implicit_value. (extract_int): Move prototype earlier. (mem_loc_descriptor): For SUBREG punt if inner mode size is wider than DWARF2_ADDR_SIZE. Handle SIGN_EXTEND and ZERO_EXTEND by DW_OP_shl and DW_OP_shr{a,}. Handle EQ, NE, GT, GE, LT, LE, GTU, GEU, LTU, LEU, SMIN, SMAX, UMIN, UMAX, SIGN_EXTRACT, ZERO_EXTRACT. (loc_descriptor): Compare mode size with DWARF2_ADDR_SIZE instead of Pmode size. (loc_descriptor): Add MODE argument. Handle CONST_INT, CONST_DOUBLE, CONST_VECTOR, CONST, LABEL_REF and SYMBOL_REF if mode != VOIDmode, attempt to handle other expressions. Don't handle TLS SYMBOL_REFs. (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor_from_tree_1): Adjust loc_descriptor callers. (add_location_or_const_value_attribute): Likewise. For single location loc_lists attempt to use add_const_value_attribute for constant decls. Add DW_AT_const_value even if NOTE_VAR_LOCATION is VAR_LOCATION with CONSTANT_P or CONST_STRING in its expression. * cfgbuild.c (inside_basic_block_p): Handle debug insns. (control_flow_insn_p): Likewise. * tree-parloops.c (eliminate_local_variables_stmt): Handle debug stmt. (separate_decls_in_region_debug_bind): New. (separate_decls_in_region): Process debug bind stmts afterwards. * recog.c (verify_changes): Handle debug insns. (extract_insn): Likewise. (peephole2_optimize): Skip debug insns. * dse.c (scan_insn): Skip debug insns. * sel-sched-ir.c (return_nop_to_pool): Take full_tidying argument. Pass it on. (setup_id_for_insn): Handle debug insns. (maybe_tidy_empty_bb): Adjust whitespace. (tidy_control_flow): Skip debug insns. (sel_remove_insn): Adjust for debug insns. (sel_estimate_number_of_insns): Skip debug insns. (create_insn_rtx_from_pattern): Handle debug insns. (create_copy_of_insn_rtx): Likewise. * sel-sched-.h (sel_bb_end): Declare. (sel_bb_empty_or_nop_p): New. (get_all_loop_exits): Use it. (_eligible_successor_edge_p): Likewise. (return_nop_to_pool): Adjust. * tree-eh.c (tre_empty_eh_handler_p): Skip debug stmts. * ira-lives.c (process_bb_node_lives): Skip debug insns. * gimple-pretty-print.c (dump_gimple_debug): New. (dump_gimple_stmt): Use it. (dump_bb_header): Skip gimple debug stmts. * regmove.c (optimize_reg_copy_1): Discount debug insns. (fixup_match_2): Likewise. (regmove_backward_pass): Likewise. Simplify combined replacement. Handle debug insns. * function.c (instantiate_virtual_regs): Handle debug insns. * function.h (struct emit_status): Add x_cur_debug_insn_uid. * print-rtl.h: Include cselib.h. (print_rtx): Print VALUEs. Split out and recurse for VAR_LOCATIONs. * df.h (df_inns_rescan_debug_internal): Declare. * gcse.c (alloc_hash_table): Estimate n_insns. (cprop_insn): Don't regard debug insns as changes. (bypass_conditional_jumps): Skip debug insns. (one_pre_gcse_pass): Adjust. (one_code_hoisting_pass): Likewise. (compute_ld_motion_mems): Skip debug insns. (one_cprop_pass): Adjust. * tree-if-conv.c (tree_if_convert_stmt): Reset debug stmts. (if_convertible_stmt_p): Handle debug stmts. * init-regs.c (initialize_uninitialized_regs): Skip debug insns. * tree-vect-loop.c (vect_is_simple_reduction): Skip debug stmts. * ira-build.c (create_bb_allocnos): Skip debug insns. * tree-flow-inline.h (has_zero_uses): Discount debug stmts. (has_single_use): Likewise. (single_imm_use): Likewise. (num_imm_uses): Likewise. * tree-ssa-phiopt.c (empty_block_p): Skip debug stmts. * tree-ssa-coalesce.c (build_ssa_conflict_graph): Skip debug stmts. (create_outofssa_var_map): Likewise. * lower-subreg.c (adjust_decomposed_uses): New. (resolve_debug): New. (decompose_multiword_subregs): Use it. * tree-dfa.c (find_referenced_vars): Skip debug stmts. * emit-rtl.c: Include params.h. (cur_debug_insn_uid): Define. (set_new_first_and_last_insn): Set cur_debug_insn_uid too. (copy_rtx_if_shared_1): Handle debug insns. (reset_used_flags): Likewise. (set_used_flags): LIkewise. (get_max_insn_count): New. (next_nondebug_insn): New. (prev_nondebug_insn): New. (make_debug_insn_raw): New. (emit_insn_before_noloc): Handle debug insns. (emit_jump_insn_before_noloc): Likewise. (emit_call_insn_before_noloc): Likewise. (emit_debug_insn_before_noloc): New. (emit_insn_after_noloc): Handle debug insns. (emit_jump_insn_after_noloc): Likewise. (emit_call_insn_after_noloc): Likewise. (emit_debug_insn_after_noloc): Likewise. (emit_insn_after): Take loc from earlier non-debug insn. (emit_jump_insn_after): Likewise. (emit_call_insn_after): Likewise. (emit_debug_insn_after_setloc): New. (emit_debug_insn_after): New. (emit_insn_before): Take loc from later non-debug insn. (emit_jump_insn_before): Likewise. (emit_call_insn_before): Likewise. (emit_debug_insn_before_setloc): New. (emit_debug_insn_before): New. (emit_insn): Handle debug insns. (emit_debug_insn): New. (emit_jump_insn): Handle debug insns. (emit_call_insn): Likewise. (emit): Likewise. (init_emit): Take min-nondebug-insn-uid into account. Initialize cur_debug_insn_uid. (emit_copy_of_insn_after): Handle debug insns. * cfgexpand.c (gimple_assign_rhs_to_tree): Do not overwrite location of single rhs in place. (maybe_dump_rtl_for_gimple_stmt): Dump lineno. (floor_sdiv_adjust): New. (cell_sdiv_adjust): New. (cell_udiv_adjust): New. (round_sdiv_adjust): New. (round_udiv_adjust): New. (wrap_constant): Moved from cselib. (unwrap_constant): New. (expand_debug_expr): New. (expand_debug_locations): New. (expand_gimple_basic_block): Drop hiding redeclaration. Expand debug bind stmts. (gimple_expand_cfg): Expand debug locations. * cselib.c: Include tree-pass.h. (struct expand_value_data): New. (cselib_record_sets_hook): New. (PRESERVED_VALUE_P, LONG_TERM_PRESERVED_VALUE_P): New. (cselib_clear_table): Move, and implemnet in terms of... (cselib_reset_table_with_next_value): ... this. (cselib_get_next_unknown_value): New. (discard_useless_locs): Don't discard preserved values. (cselib_preserve_value): New. (cselib_preserved_value_p): New. (cselib_preserve_definitely): New. (cselib_clear_preserve): New. (cselib_preserve_only_values): New. (new_cselib_val): Take rtx argument. Dump it in details. (cselib_lookup_mem): Adjust. (expand_loc): Take regs_active in struct. Adjust. Silence dumps unless details are requested. (cselib_expand_value_rtx_cb): New. (cselib_expand_value_rtx): Rename and reimplment in terms of... (cselib_expand_value_rtx_1): ... this. Adjust. Silence dumps without details. Copy more subregs. Try to resolve values using a callback. Wrap constants. (cselib_subst_to_values): Adjust. (cselib_log_lookup): New. (cselib_lookup): Call it. (cselib_invalidate_regno): Don't count preserved values as useless. (cselib_invalidate_mem): Likewise. (cselib_record_set): Likewise. (struct set): Renamed to cselib_set, moved to cselib.h. (cselib_record_sets): Adjust. Call hook. (cselib_process_insn): Reset table when it would be cleared. (dump_cselib_val): New. (dump_cselib_table): New. * tree-cfgcleanup.c (tree_forwarded_block_p): Skip debug stmts. (remove_forwarder_block): Support moving debug stmts. * cselib.h (cselib_record_sets_hook): Declare. (cselib_expand_callback): New type. (cselib_expand_value_rtx_cb): Declare. (cselib_reset_table_with_next_value): Declare. (cselib_get_next_unknown_value): Declare. (cselib_preserve_value): Declare. (cselib_preserved_value_p): Declare. (cselib_preserve_only_values): Declare. (dump_cselib_table): Declare. * cfgcleanup.c (flow_find_cross_jump): Skip debug insns. (try_crossjump_to_edge): Likewise. (delete_unreachable_blocks): Remove dominant GIMPLE blocks after dominated blocks when debug stmts are present. * simplify-rtx.c (delegitimize_mem_from_attrs): New. * tree-ssa-live.c (remove_unused_locals): Skip debug stmts. (set_var_live_on_entry): Likewise. * loop-invariant.c (find_invariants_bb): Skip debug insns. * cfglayout.c (curr_location, last_location): Make static. (set_curr_insn_source_location): Don't avoid bouncing. (get_curr_insn_source_location): New. (get_curr_insn_block): New. (duplicate_insn_chain): Handle debug insns. * tree-ssa-forwprop.c (forward_propagate_addr_expr): Propagate into debug stmts. * common.opt (fcompare-debug): Move to sort order. (fdump-unnumbered-links): Likewise. (fvar-tracking-assignments): New. (fvar-tracking-assignments-toggle): New. * tree-ssa-dce.c (mark_stmt_necessary): Don't mark blocks because of debug stmts. (mark_stmt_if_obviously_necessary): Mark debug stmts. (eliminate_unnecessary_stmts): Walk dominated blocks before dominators. * tree-ssa-ter.c (find_replaceable_in_bb): Skip debug stmts. * ira.c (memref_used_between_p): Skip debug insns. (update_equiv_regs): Likewise. * sched-deps.c (sd_lists_size): Accept empty list. (sd_init_insn): Mark debug insns. (sd_finish_insn): Unmark them. (sd_add_dep): Reject non-debug deps on debug insns. (fixup_sched_groups): Give debug insns group treatment. Skip debug insns. (sched_analyze_reg): Don't mark debug insns for sched before call. (sched_analyze_2): Handle debug insns. (sched_analyze_insn): Compute next non-debug insn. Handle debug insns. (deps_analyze_insn): Handle debug insns. (deps_start_bb): Skip debug insns. (init_deps): Initialize last_debug_insn. * tree-ssa.c (target_for_debug_bind): New. (find_released_ssa_name): New. (propagate_var_def_into_debug_stmts): New. (propagate_defs_into_debug_stmts): New. (verify_ssa): Skip debug bind stmts without values. (warn_uninialized_vars): Skip debug stmts. * target-def.h (TARGET_DELEGITIMIZE_ADDRESS): Set default. * rtl.c (rtx_equal_p_cb): Handle VALUEs. (rtx_equal_p): Likewise. * ira-costs.c (scan_one_insn): Skip debug insns. (process_bb_node_for_hard_reg_moves): Likewise. * rtl.h (DEBUG_INSN_P): New. (NONDEBUG_INSN_P): New. (MAY_HAVE_DEBUG_INSNS): New. (INSN_P): Accept debug insns. (RTX_FRAME_RELATED_P): Likewise. (INSN_DELETED_P): Likewise (PAT_VAR_LOCATION_DECL): New. (PAT_VAR_LOCATION_LOC): New. (PAT_VAR_OCATION_STATUS): New. (NOTE_VAR_LOCATION_DECL): Reimplement. (NOTE_VAR_LOCATION_LOC): Likewise. (NOTE_VAR_LOCATION_STATUS): Likewise. (INSN_VAR_LOCATION): New. (INSN_VAR_LOCATION_DECL): New. (INSN_VAR_LOCATION_LOC): New. (INSN_VAR_LOCATION_STATUS): New. (gen_rtx_UNKNOWN_VAR_LOC): New. (VAR_LOC_UNKNOWN_P): New. (NOTE_DURING_CALL_P): New. (SCHED_GROUP_P): Accept debug insns. (emit_debug_insn_before): Declare. (emit_debug_insn_before_noloc): Declare. (emit_debug_insn_beore_setloc): Declare. (emit_debug_insn_after): Declare. (emit_debug_insn_after_noloc): Declare. (emit_debug_insn_after_setloc): Declare. (emit_debug_insn): Declare. (make_debug_insn_raw): Declare. (prev_nondebug_insn): Declare. (next_nondebug_insn): Declare. (delegitimize_mem_from_attrs): Declare. (get_max_insn_count): Declare. (wrap_constant): Declare. (unwrap_constant): Declare. (get_curr_insn_source_location): Declare. (get_curr_insn_block): Declare. * tree-inline.c (insert_debug_decl_map): New. (processing_debug_stmt): New. (remap_decl): Don't create new mappings in debug stmts. (remap_gimple_op_r): Don't add references in debug stmts. (copy_tree_body_r): Likewise. (remap_gimple_stmt): Handle debug bind stmts. (copy_bb): Skip debug stmts. (copy_edges_for_bb): Likewise. (copy_debug_stmt): New. (copy_debug_stmts): New. (copy_body): Copy debug stmts at the end. (insert_init_debug_bind): New. (insert_init_stmt): Take id. Skip and emit debug stmts. (setup_one_parameter): Remap variable earlier, register debug mapping. (estimate_num_insns): Skip debug stmts. (expand_call_inline): Preserve debug_map. (optimize_inline_calls): Check for no debug_stmts left-overs. (unsave_expr_now): Preserve debug_map. (copy_gimple_seq_and_replace_locals): Likewise. (tree_function_versioning): Check for no debug_stmts left-overs. Init and destroy debug_map as needed. Split edges unconditionally. (build_duplicate_type): Init and destroy debug_map as needed. * tree-inline.h: Include gimple.h instead of pointer-set.h. (struct copy_body_data): Add debug_stmts and debug_map. * sched-int.h (struct ready_list): Add n_debug. (struct deps): Add last_debug_insn. (DEBUG_INSN_SCHED_P): New. (BOUNDARY_DEBUG_INSN_P): New. (SCHEDULE_DEBUG_INSN_P): New. (sd_iterator_cond): Accept empty list. * combine.c (create_log_links): Skip debug insns. (combine_instructions): Likewise. (cleanup_auto_inc_dec): New. From Jakub Jelinek: Make sure the return value is always unshared. (struct rtx_subst_pair): New. (auto_adjust_pair): New. (propagate_for_debug_subst): New. (propagate_for_debug): New. (try_combine): Skip debug insns. Propagate removed defs into debug insns. (next_nonnote_nondebug_insn): New. (distribute_notes): Use it. Skip debug insns. (distribute_links): Skip debug insns. * tree-outof-ssa.c (set_location_for_edge): Likewise. * resource.c (mark_target_live_regs): Likewise. * var-tracking.c: Include cselib.h and target.h. (enum micro_operation_type): Add MO_VAL_USE, MO_VAL_LOC, and MO_VAL_SET. (micro_operation_type_name): New. (enum emit_note_where): Add EMIT_NOTE_AFTER_CALL_INSN. (struct micro_operation_def): Update comments. (decl_or_value): New type. Use instead of decls. (struct emit_note_data_def): Add vars. (struct attrs_def): Use decl_or_value. (struct variable_tracking_info_def): Add permp, flooded. (struct location_chain_def): Update comment. (struct variable_part_def): Use decl_or_value. (struct variable_def): Make var_part a variable length array. (valvar_pool): New. (scratch_regs): New. (cselib_hook_called): New. (dv_is_decl_p): New. (dv_is_value_p): New. (dv_as_decl): New. (dv_as_value): New. (dv_as_opaque): New. (dv_onepart_p): New. (dv_pool): New. (IS_DECL_CODE): New. (check_value_is_not_decl): New. (dv_from_decl): New. (dv_from_value): New. (dv_htab_hash): New. (variable_htab_hash): Use it. (variable_htab_eq): Support values. (variable_htab_free): Free from the right pool. (attrs_list_member, attrs_list_insert): Use decl_or_value. (attrs_list_union): Adjust. (attrs_list_mpdv_union): New. (tie_break_pointers): New. (canon_value_cmp): New. (unshare_variable): Return possibly-modified slot. (vars_copy_1): Adjust. (var_reg_decl_set): Adjust. Split out of... (var_reg_set): ... this. (get_init_value): Adjust. (var_reg_delete_and_set): Adjust. (var_reg_delete): Adjust. (var_regno_delete): Adjust. (var_mem_decl_set): Split out of... (var_mem_set): ... this. (var_mem_delete_and_set): Adjust. (var_mem_delete): Adjust. (val_store): New. (val_reset): New. (val_resolve): New. (variable_union): Adjust. Speed up merge of 1-part vars. (variable_canonicalize): Use unshared slot. (VALUED_RECURSED_INTO): New. (find_loc_in_1pdv): New. (struct dfset_merge): New. (insert_into_intersection): New. (intersect_loc_chains): New. (loc_cmp): New. (canonicalize_loc_order_check): New. (canonicalize_values_mark): New. (canonicalize_values_star): New. (variable_merge_over_cur): New. (variable_merge_over_src): New. (dataflow_set_merge): New. (dataflow_set_equiv_regs): New. (remove_duplicate_values): New. (struct dfset_post_merge): New. (variable_post_merge_new_vals): New. (variable_post_merge_perm_vals): New. (dataflow_post_merge_adjust): New. (find_mem_expr_in_1pdv): New. (dataflow_set_preserve_mem_locs): New. (dataflow_set_remove_mem_locs): New. (dataflow_set_clear_at_call): New. (onepart_variable_different_p): New. (variable_different_p): Use it. (dataflow_set_different_1): Adjust. Make detailed dump more verbose. (track_expr_p): Add need_rtl parameter. Don't generate rtl if not needed. (track_loc_p): Pass it true. (struct count_use_info): New. (find_use_val): New. (replace_expr_with_values): New. (log_op_type): New. (use_type): New, partially split out of... (count_uses): ... this. Count new micro-ops. (count_uses_1): Adjust. (count_stores): Adjust. (count_with_sets): New. (VAL_NEEDS_RESOLUTION): New. (VAL_HOLDS_TRACK_EXPR): New. (VAL_EXPR_IS_COPIED): New. (VAL_EXPR_IS_CLOBBERED): New. (add_uses): Adjust. Generate new micro-ops. (add_uses_1): Adjust. (add_stores): Generate new micro-ops. (add_with_sets): New. (find_src_status): Adjust. (find_src_set_src): Adjust. (compute_bb_dataflow): Use dataflow_set_clear_at_call. Handle new micro-ops. Canonicalize value equivalances. (vt_find_locations): Compute total size of hash tables for dumping. Perform merge for var-tracking-assignments. Don't disregard single-block loops. (dump_attrs_list): Handle decl_or_value. (dump_variable): Take variable. Deal with decl_or_value. (dump_variable_slot): New. (dump_vars): Use it. (dump_dataflow_sets): Adjust. (set_slot_part): New, extended to support one-part variables after splitting out of... (set_variable_part): ... this. (clobber_slot_part): New, split out of... (clobber_variable_part): ... this. (delete_slot_part): New, split out of... (delete_variable_part): .... this. (check_wrap_constant): New. (vt_expand_loc_callback): New. (vt_expand_loc): New. (emit_note_insn_var_location): Adjust. Handle values. Handle EMIT_NOTE_AFTER_CALL_INSN. (emit_notes_for_differences_1): Adjust. Handle values. (emit_notes_for_differences_2): Likewise. (emit_notes_for_differences): Adjust. (emit_notes_in_bb): Take pointer to set. Emit AFTER_CALL_INSN notes. Adjust. Handle new micro-ops. (vt_add_function_parameters): Adjust. Create and bind values. (vt_initialize): Adjust. Initialize scratch_regs and valvar_pool, flooded and perm.. Initialize and use cselib. Log operations. Move some code to count_with_sets and add_with_sets. (delete_debug_insns): New. (vt_debug_insns_local): New. (vt_finalize): Release permp, valvar_pool, scratch_regs. Finish cselib. (var_tracking_main): If var-tracking-assignments is enabled but var-tracking isn't, delete debug insns and leave. Likewise if we exceed limits or fail the stack adjustments tests, and after all var-tracking processing. More in var-tracking, from Jakub Jelinek <jakub@redhat.com>: (dataflow_set): Add traversed_vars. (value_chain, const_value_chain): New typedefs. (value_chain_pool, value_chains): New variables. (value_chain_htab_hash, value_chain_htab_eq, add_value_chain, add_value_chains, add_cselib_value_chains, remove_value_chain, remove_value_chains, remove_cselib_value_chains): New functions. (shared_hash_find_slot_unshare_1, shared_hash_find_slot_1, shared_hash_find_slot_noinsert_1, shared_hash_find_1): New static inlines. (shared_hash_find_slot_unshare, shared_hash_find_slot, shared_hash_find_slot_noinsert, shared_hash_find): Update. (dst_can_be_shared): New variable. (unshare_variable): Unshare set->vars if shared, use shared_hash_*. Clear dst_can_be_shared. If set->traversed_vars is non-NULL and different from set->vars, look up slot again instead of using the passed in slot. (dataflow_set_init): Initialize traversed_vars. (variable_union): Use shared_hash_*. Use initially NO_INSERT lookup if set->vars is shared. Don't keep slot cleared before calling unshare_variable. Unshare set->vars if needed. Adjust unshare_variable callers. Clear dst_can_be_shared if needed. Even ->refcount == 1 vars must be unshared if set->vars is shared and var needs to be modified. (dataflow_set_union): Set traversed_vars during canonicalization. (VALUE_CHANGED, DECL_CHANGED): Define. (set_dv_changed, dv_changed_p): New static inlines. (track_expr_p): Clear DECL_CHANGED. (dump_dataflow_sets): Set it. (variable_was_changed): Call set_dv_changed. (emit_note_insn_var_location): Likewise. (changed_variables_stack): New variable. (check_changed_vars_1, check_changed_vars_2): New functions. (emit_notes_for_changes): Do nothing if changed_variables is empty. Traverse changed_variables with check_changed_vars_1, call check_changed_vars_2 on each changed_variables_stack entry. (emit_notes_in_bb): Add SET argument. Just clear it at the beginning, use it instead of local &set, don't destroy it at the end. (vt_emit_notes): Call dataflow_set_clear early on all VTI(bb)->out sets, never use them, instead use emit_notes_in_bb computed set, dataflow_set_clear also VTI(bb)->in when we are done with the basic block. Initialize changed_variables_stack, free it afterwards. If ENABLE_CHECKING verify that after noting differences to an empty set value_chains hash table is empty. (vt_initialize): Initialize value_chains and value_chain_pool. (vt_finalize): Delete value_chains htab, free value_chain_pool. (variable_tracking_main): Call dump_dataflow_sets before calling vt_emit_notes, not after it. * tree-flow.h (propagate_defs_into_debug_stmts): Declare. (propagate_var_def_into_debug_stmts): Declare. * df-problems.c (df_lr_bb_local_compute): Skip debug insns. (df_set_note): Reject debug insns. (df_whole_mw_reg_dead_p): Take added_notes_p argument. Don't add notes to debug insns. (df_note_bb_compute): Adjust. Likewise. (df_simulate_uses): Skip debug insns. (df_simulate_initialize_backwards): Likewise. * reg-stack.c (subst_stack_regs_in_debug_insn): New. (subst_stack_regs_pat): Reject debug insns. (convert_regs_1): Handle debug insns. * Makefile.in (TREE_INLINE_H): Take pointer-set.h from GIMPLE_H. (print-rtl.o): Depend on cselib.h. (cselib.o): Depend on TREE_PASS_H. (var-tracking.o): Depend on cselib.h and TARGET_H. * sched-rgn.c (rgn_estimate_number_of_insns): Discount debug insns. (init_ready_list): Skip boundary debug insns. (add_branch_dependences): Skip debug insns. (free_block_dependencies): Check for blocks with only debug insns. (compute_priorities): Likewise. * gimple.c (gss_for_code): Handle GIMPLE_DEBUG. (gimple_build_with_ops_stat): Take subcode as unsigned. Adjust all callers. (gimple_build_debug_bind_stat): New. (empty_body_p): Skip debug stmts. (gimple_has_side_effects): Likewise. (gimple_rhs_has_side_effects): Likewise. * gimple.h (enum gimple_debug_subcode, GIMPLE_DEBUG_BIND): New. (gimple_build_debug_bind_stat): Declare. (gimple_build_debug_bind): Define. (is_gimple_debug): New. (gimple_debug_bind_p): New. (gimple_debug_bind_get_var): New. (gimple_debug_bind_get_value): New. (gimple_debug_bind_get_value_ptr): New. (gimple_debug_bind_set_var): New. (gimple_debug_bind_set_value): New. (GIMPLE_DEBUG_BIND_NOVALUE): New internal temporary macro. (gimple_debug_bind_reset_value): New. (gimple_debug_bind_has_value_p): New. (gsi_next_nondebug): New. (gsi_prev_nondebug): New. (gsi_start_nondebug_bb): New. (gsi_last_nondebug_bb): New. * sched-vis.c (print_pattern): Handle VAR_LOCATION. (print_insn): Handle DEBUG_INSN. * tree-cfg.c (remove_bb): Walk stmts backwards. Let loc of first insn prevail. (first_stmt): Skip debug stmts. (first_non_label_stmt): Likewise. (last_stmt): Likewise. (has_zero_uses_1): New. (single_imm_use_1): New. (verify_gimple_debug): New. (verify_types_in_gimple_stmt): Handle debug stmts. (verify_stmt): Likewise. (debug_loop_num): Skip debug stmts. (remove_edge_and_dominated_blocks): Remove dominators last. * tree-ssa-reasssoc.c (rewrite_expr_tree): Propagate into debug stmts. (linearize_expr): Likewise. * config/i386/i386.c (ix86_delegitimize_address): Call default implementation. * config/ia64/ia64.c (ia64_safe_itanium_class): Handle debug insns. (group_barrier_needed): Skip debug insns. (emit_insn_group_barriers): Likewise. (emit_all_insn_group_barriers): Likewise. (ia64_variable_issue): Handle debug insns. (ia64_dfa_new_cycle): Likewise. (final_emit_insn_group_barriers): Skip debug insns. (ia64_dwarf2out_def_steady_cfa): Take frame argument. Don't def cfa without frame. (process_set): Likewise. (process_for_unwind_directive): Pass frame on. * config/rs6000/rs6000.c (TARGET_DELEGITIMIZE_ADDRESS): Define. (rs6000_delegitimize_address): New. (rs6000_debug_adjust_cost): Handle debug insns. (is_microcoded_insn): Likewise. (is_cracked_insn): Likewise. (is_nonpipeline_insn): Likewise. (insn_must_be_first_in_group): Likewise. (insn_must_be_last_in_group): Likewise. (force_new_group): Likewise. * cfgrtl.c (rtl_split_block): Emit INSN_DELETED note if block contains only debug insns. (rtl_merge_blocks): Skip debug insns. (purge_dead_edges): Likewise. (rtl_block_ends_with_call_p): Skip debug insns. * dce.c (deletable_insn_p): Handle VAR_LOCATION. (mark_reg_dependencies): Skip debug insns. * params.def (PARAM_MIN_NONDEBUG_INSN_UID): New. * tree-ssanames.c (release_ssa_name): Propagate def into debug stmts. * tree-ssa-threadedge.c (record_temporary_equivalences_from_stmts): Skip debug stmts. * regcprop.c (replace_oldest_value_addr): Skip debug insns. (replace_oldest_value_mem): Use ALL_REGS for debug insns. (copyprop_hardreg_forward_1): Handle debug insns. * reload1.c (reload): Skip debug insns. Replace unassigned pseudos in debug insns with their equivalences. (eliminate_regs_in_insn): Skip debug insns. (emit_input_reload_insns): Skip debug insns at first, adjust them later. * tree-ssa-operands.c (add_virtual_operand): Reject debug stmts. (get_indirect_ref_operands): Pass opf_no_vops on. (get_expr_operands): Likewise. Skip debug stmts. (parse_ssa_operands): Scan debug insns with opf_no_vops. gcc/testsuite/ChangeLog: * gcc.dg/guality/guality.c: New. * gcc.dg/guality/guality.h: New. * gcc.dg/guality/guality.exp: New. * gcc.dg/guality/example.c: New. * lib/gcc-dg.exp (cleanup-dump): Remove .gk files. (cleanup-saved-temps): Likewise, .gkd files too. gcc/cp/ChangeLog: * cp-tree.h (TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS): New. * cp-lang.c (cxx_dwarf_name): Pass it. * error.c (count_non_default_template_args): Take flags as argument. Adjust all callers. Skip counting of default arguments if the new flag is given. ChangeLog: * Makefile.tpl (BUILD_CONFIG): Default to bootstrap-debug. * Makefile.in: Rebuilt. contrib/ChangeLog: * compare-debug: Look for .gkd files and compare them. config/ChangeLog: * bootstrap-debug.mk: Add comments. * bootstrap-debug-big.mk: New. * bootstrap-debug-lean.mk: New. * bootstrap-debug-ckovw.mk: Add comments. * bootstrap-debug-lib.mk: Drop CFLAGS for stages. Use -g0 for TFLAGS in stage1. Drop -fvar-tracking-assignments-toggle. From-SVN: r151312
2009-09-02 04:42:21 +02:00
return ((g->num_nodes - g->num_debug) / issue_rate);
}
/* A vector that contains the sched data for each ps_insn. */
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
static vec<node_sched_params> node_sched_param_vec;
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
/* Allocate sched_params for each node and initialize it. */
static void
set_node_sched_params (ddg_ptr g)
{
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
node_sched_param_vec.truncate (0);
node_sched_param_vec.safe_grow_cleared (g->num_nodes);
}
/* Make sure that node_sched_param_vec has an entry for every move in PS. */
static void
extend_node_sched_params (partial_schedule_ptr ps)
{
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
node_sched_param_vec.safe_grow_cleared (ps->g->num_nodes
+ ps->reg_moves.length ());
}
/* Update the sched_params (time, row and stage) for node U using the II,
the CYCLE of U and MIN_CYCLE.
We're not simply taking the following
SCHED_STAGE (u) = CALC_STAGE_COUNT (SCHED_TIME (u), min_cycle, ii);
because the stages may not be aligned on cycle 0. */
static void
update_node_sched_params (int u, int ii, int cycle, int min_cycle)
{
int sc_until_cycle_zero;
int stage;
SCHED_TIME (u) = cycle;
SCHED_ROW (u) = SMODULO (cycle, ii);
/* The calculation of stage count is done adding the number
of stages before cycle zero and after cycle zero. */
sc_until_cycle_zero = CALC_STAGE_COUNT (-1, min_cycle, ii);
if (SCHED_TIME (u) < 0)
{
stage = CALC_STAGE_COUNT (-1, SCHED_TIME (u), ii);
SCHED_STAGE (u) = sc_until_cycle_zero - stage;
}
else
{
stage = CALC_STAGE_COUNT (SCHED_TIME (u), 0, ii);
SCHED_STAGE (u) = sc_until_cycle_zero + stage - 1;
}
}
static void
print_node_sched_params (FILE *file, int num_nodes, partial_schedule_ptr ps)
{
int i;
tree-vrp.c (execute_vrp): Do not pass dump argument to. * tree-vrp.c (execute_vrp): Do not pass dump argument to. loop_optimizer_init and loop_optimizer_finalize * tree-ssa-sink.c (execute_sink_code): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init, tree_ssa_loop_done): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Ditto. * sched-ebb.c: Include output.h. (schedule_ebbs): Do not use dump argument. * value-prof.h (struct profile_hooks): Remove profile_dump_file. * loop.c (loop_dump_stream): Removed. (loop_optimize, rest_of_handle_loop_optimize): Do not use dump argument. (scan_loop, move_movables, find_and_verify_loops, mark_loop_jump, emit_prefetch_instructions, loop_bivs_find, loop_bivs_check, final_biv_value, loop_biv_eliminable_p, loop_givs_rescan, loop_iterations, strength_reduce, record_biv, record_giv, final_giv_value, check_final_value, check_ext_dependent_givs, combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems, try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use dump_file instead of loop_dump_stream. * ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call argument dump_file. * reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use dump argument. * flow.c (life_analysis, rest_of_handle_life): Ditto. * haifa-sched.c: Include output.h (schedule_insns, sched_init): Do not use dump argument. * mode-switching.c (optimize_mode_switching): Ditto. * modulo-sched.c (stats_file): Removed. (print_node_sched_params): Do not call argument dump_file. (sms_schedule_by_order, loop_canon_p, sms_schedule, rest_of_handle_sms): Do not use dump argument. Use dump_file instead of stats_file. * cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not use dump argument. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize, rtl_loop_init, rtl_loop_done): Ditto. * global.c (global_alloc, rest_of_handle_global_alloc): Ditto. * predict.c (combine_predictions_for_bb, tree_estimate_probability): Ditto. * recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto. * lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto. * regmove.c (fixup_match_1, fixup_match_2, regmove_optimize, rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto. * emit-rtl.c (renumber_insns): Ditto. * cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr, expand_gimple_basic_block, tree_expand_cfg): Ditto. * regclass.c (regclass): Ditto. * tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts, remove_ssa_form, rewrite_out_of_ssa): Ditto. * reg-stack.c (compensate_edge, compensate_edges, convert_regs_1, convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs): Ditto. * sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto. * local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file to regclass. * gcse.c (gcse_file, debug_stderr): Removed. (gcse_main, bypass_jumps, rest_of_handle_jump_bypass, rest_of_handle_gcse): Do not use dump argument. (cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets, one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb, pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass, compute_code_hoist_vbeinout, compute_code_hoist_data, one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores, compute_store_table, build_store_vectors, insert_insn_start_bb, insert_store, remove_reachable_equiv_notes, replace_store_insn, store_motion): Use dump_file instead of gcse_file. * ipa-type-escape.c (type_escape_execute): Remove debugging comments. * profile.c (profile_dump_file): Removed. (branch_prob): Use dump_file instead of profile_dump_file. * ipa.c (cgraph_remove_unreachable_nodes): Do not call argument dump_file. * tree-ssa-copy.c (dump_copy_of): Ditto. * rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass dump file to life_analysis. * bt-load.c (branch_target_load_optimize): Ditto. * cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to renumber_insns. * rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs, regclass, dbr_schedule): Declaration changed. * sched-int.h (sched_init): Declaration changed. * tree-profile.c (tree_profile_dump_file): Removed. (tree_profile_hooks): Removed profile_dump_file hook. * rtl-profile (rtl_profile_dump_file): Removed. (rtl_profile_hooks): emoved profile_dump_file hook. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * c-gimplify.c (c_genericize): Do not call local variable dump_file. * tree-cfg.c (build_tree_cfg): Ditto. * Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency. * basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm): Declaration changed. * config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to life_analysis and schedule_insns. * config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to life_analysis. * config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to dbr_schedule. * config/mips/mips.c (mips_reorg): Ditto. * config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to schedule_ebbs. From-SVN: r110656
2006-02-06 19:20:47 +01:00
if (! file)
return;
for (i = 0; i < num_nodes; i++)
{
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
node_sched_params_ptr nsp = SCHED_PARAMS (i);
fprintf (file, "Node = %d; INSN = %d\n", i,
INSN_UID (ps_rtl_insn (ps, i)));
fprintf (file, " asap = %d:\n", NODE_ASAP (&ps->g->nodes[i]));
tree-vrp.c (execute_vrp): Do not pass dump argument to. * tree-vrp.c (execute_vrp): Do not pass dump argument to. loop_optimizer_init and loop_optimizer_finalize * tree-ssa-sink.c (execute_sink_code): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init, tree_ssa_loop_done): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Ditto. * sched-ebb.c: Include output.h. (schedule_ebbs): Do not use dump argument. * value-prof.h (struct profile_hooks): Remove profile_dump_file. * loop.c (loop_dump_stream): Removed. (loop_optimize, rest_of_handle_loop_optimize): Do not use dump argument. (scan_loop, move_movables, find_and_verify_loops, mark_loop_jump, emit_prefetch_instructions, loop_bivs_find, loop_bivs_check, final_biv_value, loop_biv_eliminable_p, loop_givs_rescan, loop_iterations, strength_reduce, record_biv, record_giv, final_giv_value, check_final_value, check_ext_dependent_givs, combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems, try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use dump_file instead of loop_dump_stream. * ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call argument dump_file. * reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use dump argument. * flow.c (life_analysis, rest_of_handle_life): Ditto. * haifa-sched.c: Include output.h (schedule_insns, sched_init): Do not use dump argument. * mode-switching.c (optimize_mode_switching): Ditto. * modulo-sched.c (stats_file): Removed. (print_node_sched_params): Do not call argument dump_file. (sms_schedule_by_order, loop_canon_p, sms_schedule, rest_of_handle_sms): Do not use dump argument. Use dump_file instead of stats_file. * cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not use dump argument. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize, rtl_loop_init, rtl_loop_done): Ditto. * global.c (global_alloc, rest_of_handle_global_alloc): Ditto. * predict.c (combine_predictions_for_bb, tree_estimate_probability): Ditto. * recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto. * lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto. * regmove.c (fixup_match_1, fixup_match_2, regmove_optimize, rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto. * emit-rtl.c (renumber_insns): Ditto. * cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr, expand_gimple_basic_block, tree_expand_cfg): Ditto. * regclass.c (regclass): Ditto. * tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts, remove_ssa_form, rewrite_out_of_ssa): Ditto. * reg-stack.c (compensate_edge, compensate_edges, convert_regs_1, convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs): Ditto. * sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto. * local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file to regclass. * gcse.c (gcse_file, debug_stderr): Removed. (gcse_main, bypass_jumps, rest_of_handle_jump_bypass, rest_of_handle_gcse): Do not use dump argument. (cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets, one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb, pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass, compute_code_hoist_vbeinout, compute_code_hoist_data, one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores, compute_store_table, build_store_vectors, insert_insn_start_bb, insert_store, remove_reachable_equiv_notes, replace_store_insn, store_motion): Use dump_file instead of gcse_file. * ipa-type-escape.c (type_escape_execute): Remove debugging comments. * profile.c (profile_dump_file): Removed. (branch_prob): Use dump_file instead of profile_dump_file. * ipa.c (cgraph_remove_unreachable_nodes): Do not call argument dump_file. * tree-ssa-copy.c (dump_copy_of): Ditto. * rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass dump file to life_analysis. * bt-load.c (branch_target_load_optimize): Ditto. * cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to renumber_insns. * rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs, regclass, dbr_schedule): Declaration changed. * sched-int.h (sched_init): Declaration changed. * tree-profile.c (tree_profile_dump_file): Removed. (tree_profile_hooks): Removed profile_dump_file hook. * rtl-profile (rtl_profile_dump_file): Removed. (rtl_profile_hooks): emoved profile_dump_file hook. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * c-gimplify.c (c_genericize): Do not call local variable dump_file. * tree-cfg.c (build_tree_cfg): Ditto. * Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency. * basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm): Declaration changed. * config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to life_analysis and schedule_insns. * config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to life_analysis. * config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to dbr_schedule. * config/mips/mips.c (mips_reorg): Ditto. * config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to schedule_ebbs. From-SVN: r110656
2006-02-06 19:20:47 +01:00
fprintf (file, " time = %d:\n", nsp->time);
fprintf (file, " stage = %d:\n", nsp->stage);
}
}
/* Set SCHED_COLUMN for each instruction in row ROW of PS. */
static void
set_columns_for_row (partial_schedule_ptr ps, int row)
{
ps_insn_ptr cur_insn;
int column;
column = 0;
for (cur_insn = ps->rows[row]; cur_insn; cur_insn = cur_insn->next_in_row)
SCHED_COLUMN (cur_insn->id) = column++;
}
/* Set SCHED_COLUMN for each instruction in PS. */
static void
set_columns_for_ps (partial_schedule_ptr ps)
{
int row;
for (row = 0; row < ps->ii; row++)
set_columns_for_row (ps, row);
}
/* Try to schedule the move with ps_insn identifier I_REG_MOVE in PS.
Its single predecessor has already been scheduled, as has its
ddg node successors. (The move may have also another move as its
successor, in which case that successor will be scheduled later.)
The move is part of a chain that satisfies register dependencies
between a producing ddg node and various consuming ddg nodes.
If some of these dependencies have a distance of 1 (meaning that
the use is upward-exposed) then DISTANCE1_USES is nonnull and
contains the set of uses with distance-1 dependencies.
DISTANCE1_USES is null otherwise.
MUST_FOLLOW is a scratch bitmap that is big enough to hold
all current ps_insn ids.
Return true on success. */
static bool
schedule_reg_move (partial_schedule_ptr ps, int i_reg_move,
sbitmap distance1_uses, sbitmap must_follow)
{
unsigned int u;
int this_time, this_distance, this_start, this_end, this_latency;
int start, end, c, ii;
sbitmap_iterator sbi;
ps_reg_move_info *move;
rtx_insn *this_insn;
ps_insn_ptr psi;
move = ps_reg_move (ps, i_reg_move);
ii = ps->ii;
if (dump_file)
{
fprintf (dump_file, "Scheduling register move INSN %d; ii = %d"
", min cycle = %d\n\n", INSN_UID (move->insn), ii,
PS_MIN_CYCLE (ps));
print_rtl_single (dump_file, move->insn);
fprintf (dump_file, "\n%11s %11s %5s\n", "start", "end", "time");
fprintf (dump_file, "=========== =========== =====\n");
}
start = INT_MIN;
end = INT_MAX;
/* For dependencies of distance 1 between a producer ddg node A
and consumer ddg node B, we have a chain of dependencies:
A --(T,L1,1)--> M1 --(T,L2,0)--> M2 ... --(T,Ln,0)--> B
where Mi is the ith move. For dependencies of distance 0 between
a producer ddg node A and consumer ddg node C, we have a chain of
dependencies:
A --(T,L1',0)--> M1' --(T,L2',0)--> M2' ... --(T,Ln',0)--> C
where Mi' occupies the same position as Mi but occurs a stage later.
We can only schedule each move once, so if we have both types of
chain, we model the second as:
A --(T,L1',1)--> M1 --(T,L2',0)--> M2 ... --(T,Ln',-1)--> C
First handle the dependencies between the previously-scheduled
predecessor and the move. */
this_insn = ps_rtl_insn (ps, move->def);
this_latency = insn_latency (this_insn, move->insn);
this_distance = distance1_uses && move->def < ps->g->num_nodes ? 1 : 0;
this_time = SCHED_TIME (move->def) - this_distance * ii;
this_start = this_time + this_latency;
this_end = this_time + ii;
if (dump_file)
fprintf (dump_file, "%11d %11d %5d %d --(T,%d,%d)--> %d\n",
this_start, this_end, SCHED_TIME (move->def),
INSN_UID (this_insn), this_latency, this_distance,
INSN_UID (move->insn));
if (start < this_start)
start = this_start;
if (end > this_end)
end = this_end;
/* Handle the dependencies between the move and previously-scheduled
successors. */
This patch renames sbitmap iterators to unify them with the bitmap iterators. Remove the unused EXECUTE_IF_SET_IN_SBITMAP_REV, which has an unconventional interface. Rename the sbitmap_iter_* functions to match bitmap's bmp_iter_* functions. Add an additional parameter to the initialization and next functions to match the interface in bmp_iter_*. This extra parameter is mostly hidden by the use of the EXECUTE_IF macros. Rename the EXECUTE_IF_SET_IN_SBITMAP macro to EXECUTE_IF_SET_IN_BITMAP. Its implementation is now identical to that in bitmap.h. To prevent redefinition errors, both definitions are now guarded by #ifndef. An alternate strategy is to simply include bitmap.h from sbitmap.h. As this would increase build time, I have elected to use the #ifndef version. I do not have a strong preference here. The sbitmap_iterator type is still distinctly named because it is often declared in contexts where the bitmap type is not obvious. There are less than 40 uses of this type, so the burden to modify it when changing bitmap types is not large. Tested on x86-64, config-list.mk testing. Index: gcc/ChangeLog 2012-10-31 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_iter_init): Rename bmp_iter_set_init and add unused parameter to match bitmap iterator. Update callers. (sbitmap_iter_cond): Rename bmp_iter_set. Update callers. (sbitmap_iter_next): Rename bmp_iter_next and add unused parameter to match bitmap iterator. Update callers. (EXECUTE_IF_SET_IN_SBITMAP_REV): Remove unused. (EXECUTE_IF_SET_IN_SBITMAP): Rename EXECUTE_IF_SET_IN_BITMAP and adjust to be identical to the definition in bitmap.h. Conditionalize the definition based on not having been defined. Update callers. * bitmap.h (EXECUTE_IF_SET_IN_BITMAP): Conditionalize the definition based on not having been defined. (To match the above.) From-SVN: r193069
2012-11-01 22:02:15 +01:00
EXECUTE_IF_SET_IN_BITMAP (move->uses, 0, u, sbi)
{
this_insn = ps_rtl_insn (ps, u);
this_latency = insn_latency (move->insn, this_insn);
This patch normalizes more bitmap function names. sbitmap.h TEST_BIT -> bitmap_bit_p SET_BIT -> bitmap_set_bit SET_BIT_WITH_POPCOUNT -> bitmap_set_bit_with_popcount RESET_BIT -> bitmap_clear_bit RESET_BIT_WITH_POPCOUNT -> bitmap_clear_bit_with_popcount basic-block.h sbitmap_intersection_of_succs -> bitmap_intersection_of_succs sbitmap_intersection_of_preds -> bitmap_intersection_of_preds sbitmap_union_of_succs -> bitmap_union_of_succs sbitmap_union_of_preds -> bitmap_union_of_preds The sbitmap.h functions also needed their numeric paramter changed from unsigned int to int to match the bitmap functions. Callers updated to match. Tested on x86-64, config-list.mk testing. Index: gcc/ChangeLog 2012-11-01 Lawrence Crowl <crowl@google.com> * sbitmap.h (TEST_BIT): Rename bitmap_bit_p, normalizing parameter type. Update callers to match. (SET_BIT): Rename bitmap_set_bit, normalizing parameter type. Update callers to match. (SET_BIT_WITH_POPCOUNT): Rename bitmap_set_bit_with_popcount, normalizing parameter type. Update callers to match. (RESET_BIT): Rename bitmap_clear_bit, normalizing parameter type. Update callers to match. (RESET_BIT_WITH_POPCOUNT): Rename bitmap_clear_bit_with_popcount, normalizing parameter type. Update callers to match. * basic-block.h (sbitmap_intersection_of_succs): Rename bitmap_intersection_of_succs. Update callers to match. * basic-block.h (sbitmap_intersection_of_preds): Rename bitmap_intersection_of_preds. Update callers to match. * basic-block.h (sbitmap_union_of_succs): Rename bitmap_union_of_succs. Update callers to match. * basic-block.h (sbitmap_union_of_preds): Rename bitmap_union_of_preds. Update callers to match. From-SVN: r193066
2012-11-01 20:23:35 +01:00
if (distance1_uses && !bitmap_bit_p (distance1_uses, u))
this_distance = -1;
else
this_distance = 0;
this_time = SCHED_TIME (u) + this_distance * ii;
this_start = this_time - ii;
this_end = this_time - this_latency;
if (dump_file)
fprintf (dump_file, "%11d %11d %5d %d --(T,%d,%d)--> %d\n",
this_start, this_end, SCHED_TIME (u), INSN_UID (move->insn),
this_latency, this_distance, INSN_UID (this_insn));
if (start < this_start)
start = this_start;
if (end > this_end)
end = this_end;
}
if (dump_file)
{
fprintf (dump_file, "----------- ----------- -----\n");
fprintf (dump_file, "%11d %11d %5s %s\n", start, end, "", "(max, min)");
}
This patch implements the unification of the *bitmap interfaces as discussed. Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
2012-10-30 01:02:55 +01:00
bitmap_clear (must_follow);
This patch normalizes more bitmap function names. sbitmap.h TEST_BIT -> bitmap_bit_p SET_BIT -> bitmap_set_bit SET_BIT_WITH_POPCOUNT -> bitmap_set_bit_with_popcount RESET_BIT -> bitmap_clear_bit RESET_BIT_WITH_POPCOUNT -> bitmap_clear_bit_with_popcount basic-block.h sbitmap_intersection_of_succs -> bitmap_intersection_of_succs sbitmap_intersection_of_preds -> bitmap_intersection_of_preds sbitmap_union_of_succs -> bitmap_union_of_succs sbitmap_union_of_preds -> bitmap_union_of_preds The sbitmap.h functions also needed their numeric paramter changed from unsigned int to int to match the bitmap functions. Callers updated to match. Tested on x86-64, config-list.mk testing. Index: gcc/ChangeLog 2012-11-01 Lawrence Crowl <crowl@google.com> * sbitmap.h (TEST_BIT): Rename bitmap_bit_p, normalizing parameter type. Update callers to match. (SET_BIT): Rename bitmap_set_bit, normalizing parameter type. Update callers to match. (SET_BIT_WITH_POPCOUNT): Rename bitmap_set_bit_with_popcount, normalizing parameter type. Update callers to match. (RESET_BIT): Rename bitmap_clear_bit, normalizing parameter type. Update callers to match. (RESET_BIT_WITH_POPCOUNT): Rename bitmap_clear_bit_with_popcount, normalizing parameter type. Update callers to match. * basic-block.h (sbitmap_intersection_of_succs): Rename bitmap_intersection_of_succs. Update callers to match. * basic-block.h (sbitmap_intersection_of_preds): Rename bitmap_intersection_of_preds. Update callers to match. * basic-block.h (sbitmap_union_of_succs): Rename bitmap_union_of_succs. Update callers to match. * basic-block.h (sbitmap_union_of_preds): Rename bitmap_union_of_preds. Update callers to match. From-SVN: r193066
2012-11-01 20:23:35 +01:00
bitmap_set_bit (must_follow, move->def);
start = MAX (start, end - (ii - 1));
for (c = end; c >= start; c--)
{
psi = ps_add_node_check_conflicts (ps, i_reg_move, c,
move->uses, must_follow);
if (psi)
{
update_node_sched_params (i_reg_move, ii, c, PS_MIN_CYCLE (ps));
if (dump_file)
fprintf (dump_file, "\nScheduled register move INSN %d at"
" time %d, row %d\n\n", INSN_UID (move->insn), c,
SCHED_ROW (i_reg_move));
return true;
}
}
if (dump_file)
fprintf (dump_file, "\nNo available slot\n\n");
return false;
}
/*
Breaking intra-loop register anti-dependences:
Each intra-loop register anti-dependence implies a cross-iteration true
dependence of distance 1. Therefore, we can remove such false dependencies
and figure out if the partial schedule broke them by checking if (for a
true-dependence of distance 1): SCHED_TIME (def) < SCHED_TIME (use) and
if so generate a register move. The number of such moves is equal to:
SCHED_TIME (use) - SCHED_TIME (def) { 0 broken
nreg_moves = ----------------------------------- + 1 - { dependence.
ii { 1 if not.
*/
static bool
schedule_reg_moves (partial_schedule_ptr ps)
{
ddg_ptr g = ps->g;
int ii = ps->ii;
int i;
for (i = 0; i < g->num_nodes; i++)
{
ddg_node_ptr u = &g->nodes[i];
ddg_edge_ptr e;
int nreg_moves = 0, i_reg_move;
rtx prev_reg, old_reg;
int first_move;
int distances[2];
sbitmap distance1_uses;
rtx set = single_set (u->insn);
/* Skip instructions that do not set a register. */
if ((set && !REG_P (SET_DEST (set))))
continue;
/* Compute the number of reg_moves needed for u, by looking at life
ranges started at u (excluding self-loops). */
distances[0] = distances[1] = false;
for (e = u->out; e; e = e->next_out)
if (e->type == TRUE_DEP && e->dest != e->src)
{
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
int nreg_moves4e = (SCHED_TIME (e->dest->cuid)
- SCHED_TIME (e->src->cuid)) / ii;
if (e->distance == 1)
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
nreg_moves4e = (SCHED_TIME (e->dest->cuid)
- SCHED_TIME (e->src->cuid) + ii) / ii;
/* If dest precedes src in the schedule of the kernel, then dest
will read before src writes and we can save one reg_copy. */
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
if (SCHED_ROW (e->dest->cuid) == SCHED_ROW (e->src->cuid)
&& SCHED_COLUMN (e->dest->cuid) < SCHED_COLUMN (e->src->cuid))
nreg_moves4e--;
if (nreg_moves4e >= 1)
{
/* !single_set instructions are not supported yet and
thus we do not except to encounter them in the loop
except from the doloop part. For the latter case
we assume no regmoves are generated as the doloop
instructions are tied to the branch with an edge. */
gcc_assert (set);
/* If the instruction contains auto-inc register then
validate that the regmov is being generated for the
target regsiter rather then the inc'ed register. */
gcc_assert (!autoinc_var_is_used_p (u->insn, e->dest->insn));
}
if (nreg_moves4e)
{
gcc_assert (e->distance < 2);
distances[e->distance] = true;
}
nreg_moves = MAX (nreg_moves, nreg_moves4e);
}
if (nreg_moves == 0)
continue;
/* Create NREG_MOVES register moves. */
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
first_move = ps->reg_moves.length ();
ps->reg_moves.safe_grow_cleared (first_move + nreg_moves);
extend_node_sched_params (ps);
/* Record the moves associated with this node. */
first_move += ps->g->num_nodes;
/* Generate each move. */
old_reg = prev_reg = SET_DEST (single_set (u->insn));
for (i_reg_move = 0; i_reg_move < nreg_moves; i_reg_move++)
{
ps_reg_move_info *move = ps_reg_move (ps, first_move + i_reg_move);
move->def = i_reg_move > 0 ? first_move + i_reg_move - 1 : i;
move->uses = sbitmap_alloc (first_move + nreg_moves);
move->old_reg = old_reg;
move->new_reg = gen_reg_rtx (GET_MODE (prev_reg));
move->num_consecutive_stages = distances[0] && distances[1] ? 2 : 1;
Promote types of RTL expressions to more derived ones. * bb-reorder.c (set_edge_can_fallthru_flag): Use rtx_jump_insn where feasible. (fix_up_fall_thru_edges): Likewise. (fix_crossing_conditional_branches): Likewise. Promote jump targets from to rtx_insn to rtx_code_label where feasible. * bt-load.c (move_btr_def): Remove as-a cast of the value returned by gen_move_insn (returned type changed to rtx_insn). * builtins.c (expand_errno_check): Fix arguments of do_compare_rtx_and_jump (now expects rtx_code_label). (expand_builtin_acc_on_device): Likewise. * cfgcleanup.c (try_simplify_condjump): Add cast when calling invert_jump (now exprects rtx_jump_insn). * cfgexpand.c (label_rtx_for_bb): Promote return type to rtx_code_label. (construct_init_block): Use rtx_code_label. * cfgrtl.c (block_label): Promote return type to rtx_code_label. (try_redirect_by_replacing_jump): Use cast to rtx_jump_insn when calling redirect_jump. (patch_jump_insn): Likewise. (redirect_branch_edge): Likewise. (force_nonfallthru_and_redirect): Likewise. (fixup_reorder_chain): Explicitly use rtx_jump_insn instead of rtx_insn when suitable. (rtl_lv_add_condition_to_bb): Update call of do_compare_rtx_and_jump. * cfgrtl.h: Promote return type of block_label to rtx_code_label. * config/bfin/bfin.c (hwloop_optimize): Fix call of emit_label_before. * config/i386/i386.c (ix86_emit_cmove): Explicitly use rtx_code_label to store the value retured by gen_label_rtx. * config/mips/mips.c (mips16_split_long_branches): Promote rtx_insn to rtx_jump_insn. * config/sh/sh.c (gen_far_branch): Likewise. Fix call of invert_jump. (split_branches): Fix calls of redirect_jump. * dojump.c (jumpifnot): Promote argument type from rtx to rtx_code_label. (jumpifnot_1): Likewise. (jumpif): Likewise. (jumpif_1): Likewise. (do_jump_1): Likewise. (do_jump): Likewise. Use rtx_code_label when feasible. (do_jump_by_parts_greater_rtx): Likewise. (do_jump_by_parts_zero_rtx): Likewise. (do_jump_by_parts_equality_rtx): Likewise. (do_compare_rtx_and_jump): Likewise. * dojump.h: Update function prototypes. * dse.c (emit_inc_dec_insn_before): Remove case (gen_move_insn now returns rtx_insn). * emit-rtl.c (emit_jump_insn_before_noloc): Promote return type to rtx_jump_insn. (emit_label_before): Likewise. (emit_jump_insn_after_noloc): Likewise. (emit_jump_insn_after_setloc): Likewise. (emit_jump_insn_after): Likewise (emit_jump_insn_before_setloc): Likewise. (emit_jump_insn_before): Likewise. (emit_label_before): Promote return type to rtx_code_label. (emit_label): Likewise. * except.c (sjlj_emit_dispatch_table): Use jump_target_rtx. * explow.c (emit_stack_save): Use gen_move_insn_uncast instead of gen_move_insn. (emit_stack_restore): Likewise. * expmed.c (emit_store_flag_force): Fix calls of do_compare_rtx_and_jump. (do_cmp_and_jump): Likewise. * expr.c (expand_expr_real_2): Likewise. Promote some local variables from rtx to rtx_code_label. (gen_move_insn_uncast): New function. * expr.h: Update return type of gen_move_insn (promote to rtx_insn). * function.c (convert_jumps_to_returns): Fix call of redirect_jump. * gcse.c (pre_insert_copy_insn): Use rtx_insn instead of rtx. * ifcvt.c (dead_or_predicable): Use rtx_jump_insn when calling invert_jump_1 and redirect_jump_1. * internal-fn.c (expand_arith_overflow_result_store): Fix call of do_compare_rtx_and_jump. (expand_addsub_overflow): Likewise. (expand_neg_overflow): Likewise. (expand_mul_overflow): Likewise. * ira.c (split_live_ranges_for_shrink_wrap): Use rtx_insn for return value of gen_move_insn. * jump.c (redirect_jump): Promote argument from rtx to rtx_jump_insn. * loop-doloop.c (add_test): Use rtx_code_label. (doloop_modify): Likewise. (doloop_optimize): Likewise. * loop-unroll.c (compare_and_jump_seq): Promote rtx to rtx_code_label. * lra-constraints.c (emit_spill_move): Remove cast of value returned by gen_move_insn. (inherit_reload_reg): Add cast when calling dump_insn_slim. (split_reg): Likewise. * modulo-sched.c (schedule_reg_moves): Remove cast of value returned by gen_move_insn. * optabs.c (expand_binop_directly): Remove casts of values returned by maybe_gen_insn. (expand_unop_direct): Likewise. (expand_abs): Likewise. (maybe_emit_unop_insn): Likewise. (maybe_gen_insn): Promote return type to rtx_insn. * optabs.h: Update prototype of maybe_gen_insn. * postreload-gcse.c (eliminate_partially_redundant_load): Remove redundant cast. * recog.c (struct peep2_insn_data): Promote type of insn field to rtx_insn. (peep2_reinit_state): Use NULL instead of NULL_RTX. (peep2_attempt): Remove casts of insn in peep2_insn_data. (peep2_fill_buffer): Promote argument from rtx to rtx_insn * recog.h (struct insn_gen_fn): Promote return types of function pointers and operator ().from rtx to rtx_insn. * reorg.c (fill_simple_delay_slots): Promote rtx_insn to rtx_jump_insn. (fill_eager_delay_slots): Likewise. (relax_delay_slots): Likewise. (make_return_insns): Likewise. (dbr_schedule): Likewise. (optimize_skips): Likewise. (reorg_redirect_jump): Likewise. (fill_slots_from_thread): Likewise. * reorg.h: Update prototypes. * resource.c (find_dead_or_set_registers): Use dyn_cast to rtx_jump_insn instead of check. Use it's jump_target method. * rtl.h (rtx_jump_insn::jump_label): Define new method. (rtx_jump_insn::jump_target): Define new method. (rtx_jump_insn::set_jump_target): Define new method. * rtlanal.c (tablejump_p): Promote type of one local variable. * sched-deps.c (sched_analyze_2): Promote rtx to rtx_insn_list. (sched_analyze_insn): Likewise. * sched-vis.c (print_insn_with_notes): Promote rtx to rtx_insn. (print_insn): Likewise. * stmt.c (label_rtx): Promote return type to rtx_insn. (force_label_rtx): Likewise. (jump_target_rtx): Define new function. (expand_label): Use it, get rid of one cast. (expand_naked_return): Promote rtx to rtx_code_label. (do_jump_if_equal): Fix do_compare_rtx_and_jump call. (expand_case): Use rtx_code_label instread of rtx where feasible. (expand_sjlj_dispatch_table): Likewise. (emit_case_nodes): Likewise. * stmt.h: Declare jump_target_rtx. Update prototypes. Fix comments. * store-motion.c (insert_store): Make use of new return type of gen_move_insn and remove a cast. (replace_store_insn): Likewise. From-SVN: r223454
2015-05-20 21:39:42 +02:00
move->insn = gen_move_insn (move->new_reg, copy_rtx (prev_reg));
This patch implements the unification of the *bitmap interfaces as discussed. Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
2012-10-30 01:02:55 +01:00
bitmap_clear (move->uses);
prev_reg = move->new_reg;
}
distance1_uses = distances[1] ? sbitmap_alloc (g->num_nodes) : NULL;
if (distance1_uses)
bitmap_clear (distance1_uses);
/* Every use of the register defined by node may require a different
copy of this register, depending on the time the use is scheduled.
Record which uses require which move results. */
for (e = u->out; e; e = e->next_out)
if (e->type == TRUE_DEP && e->dest != e->src)
{
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
int dest_copy = (SCHED_TIME (e->dest->cuid)
- SCHED_TIME (e->src->cuid)) / ii;
if (e->distance == 1)
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
dest_copy = (SCHED_TIME (e->dest->cuid)
- SCHED_TIME (e->src->cuid) + ii) / ii;
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
if (SCHED_ROW (e->dest->cuid) == SCHED_ROW (e->src->cuid)
&& SCHED_COLUMN (e->dest->cuid) < SCHED_COLUMN (e->src->cuid))
dest_copy--;
if (dest_copy)
{
ps_reg_move_info *move;
move = ps_reg_move (ps, first_move + dest_copy - 1);
This patch normalizes more bitmap function names. sbitmap.h TEST_BIT -> bitmap_bit_p SET_BIT -> bitmap_set_bit SET_BIT_WITH_POPCOUNT -> bitmap_set_bit_with_popcount RESET_BIT -> bitmap_clear_bit RESET_BIT_WITH_POPCOUNT -> bitmap_clear_bit_with_popcount basic-block.h sbitmap_intersection_of_succs -> bitmap_intersection_of_succs sbitmap_intersection_of_preds -> bitmap_intersection_of_preds sbitmap_union_of_succs -> bitmap_union_of_succs sbitmap_union_of_preds -> bitmap_union_of_preds The sbitmap.h functions also needed their numeric paramter changed from unsigned int to int to match the bitmap functions. Callers updated to match. Tested on x86-64, config-list.mk testing. Index: gcc/ChangeLog 2012-11-01 Lawrence Crowl <crowl@google.com> * sbitmap.h (TEST_BIT): Rename bitmap_bit_p, normalizing parameter type. Update callers to match. (SET_BIT): Rename bitmap_set_bit, normalizing parameter type. Update callers to match. (SET_BIT_WITH_POPCOUNT): Rename bitmap_set_bit_with_popcount, normalizing parameter type. Update callers to match. (RESET_BIT): Rename bitmap_clear_bit, normalizing parameter type. Update callers to match. (RESET_BIT_WITH_POPCOUNT): Rename bitmap_clear_bit_with_popcount, normalizing parameter type. Update callers to match. * basic-block.h (sbitmap_intersection_of_succs): Rename bitmap_intersection_of_succs. Update callers to match. * basic-block.h (sbitmap_intersection_of_preds): Rename bitmap_intersection_of_preds. Update callers to match. * basic-block.h (sbitmap_union_of_succs): Rename bitmap_union_of_succs. Update callers to match. * basic-block.h (sbitmap_union_of_preds): Rename bitmap_union_of_preds. Update callers to match. From-SVN: r193066
2012-11-01 20:23:35 +01:00
bitmap_set_bit (move->uses, e->dest->cuid);
if (e->distance == 1)
This patch normalizes more bitmap function names. sbitmap.h TEST_BIT -> bitmap_bit_p SET_BIT -> bitmap_set_bit SET_BIT_WITH_POPCOUNT -> bitmap_set_bit_with_popcount RESET_BIT -> bitmap_clear_bit RESET_BIT_WITH_POPCOUNT -> bitmap_clear_bit_with_popcount basic-block.h sbitmap_intersection_of_succs -> bitmap_intersection_of_succs sbitmap_intersection_of_preds -> bitmap_intersection_of_preds sbitmap_union_of_succs -> bitmap_union_of_succs sbitmap_union_of_preds -> bitmap_union_of_preds The sbitmap.h functions also needed their numeric paramter changed from unsigned int to int to match the bitmap functions. Callers updated to match. Tested on x86-64, config-list.mk testing. Index: gcc/ChangeLog 2012-11-01 Lawrence Crowl <crowl@google.com> * sbitmap.h (TEST_BIT): Rename bitmap_bit_p, normalizing parameter type. Update callers to match. (SET_BIT): Rename bitmap_set_bit, normalizing parameter type. Update callers to match. (SET_BIT_WITH_POPCOUNT): Rename bitmap_set_bit_with_popcount, normalizing parameter type. Update callers to match. (RESET_BIT): Rename bitmap_clear_bit, normalizing parameter type. Update callers to match. (RESET_BIT_WITH_POPCOUNT): Rename bitmap_clear_bit_with_popcount, normalizing parameter type. Update callers to match. * basic-block.h (sbitmap_intersection_of_succs): Rename bitmap_intersection_of_succs. Update callers to match. * basic-block.h (sbitmap_intersection_of_preds): Rename bitmap_intersection_of_preds. Update callers to match. * basic-block.h (sbitmap_union_of_succs): Rename bitmap_union_of_succs. Update callers to match. * basic-block.h (sbitmap_union_of_preds): Rename bitmap_union_of_preds. Update callers to match. From-SVN: r193066
2012-11-01 20:23:35 +01:00
bitmap_set_bit (distance1_uses, e->dest->cuid);
}
}
use auto_sbitmap in various places gcc/ChangeLog: 2016-07-26 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * bt-load.c (compute_out): Use auto_sbitmap class. (link_btr_uses): Likewise. * cfganal.c (mark_dfs_back_edges): Likewise. (post_order_compute): Likewise. (inverted_post_order_compute): Likewise. (pre_and_rev_post_order_compute_fn): Likewise. (single_pred_before_succ_order): Likewise. * cfgexpand.c (pass_expand::execute): Likewise. * cfgloop.c (verify_loop_structure): Likewise. * cfgloopmanip.c (fix_bb_placements): Likewise. (remove_path): Likewise. (update_dominators_in_loop): Likewise. * cfgrtl.c (break_superblocks): Likewise. * ddg.c (check_sccs): Likewise. (create_ddg_all_sccs): Likewise. * df-core.c (df_worklist_dataflow): Likewise. * dse.c (dse_step3): Likewise. * except.c (eh_region_outermost): Likewise. * function.c (thread_prologue_and_epilogue_insns): Likewise. * gcse.c (prune_expressions): Likewise. (prune_insertions_deletions): Likewise. * gimple-ssa-backprop.c (backprop::~backprop): Likewise. * graph.c (draw_cfg_nodes_no_loops): Likewise. * ira-lives.c (remove_some_program_points_and_update_live_ranges): Likewise. * lcm.c (compute_earliest): Likewise. (compute_farthest): Likewise. * loop-unroll.c (unroll_loop_constant_iterations): Likewise. (unroll_loop_runtime_iterations): Likewise. (unroll_loop_stupid): Likewise. * lower-subreg.c (decompose_multiword_subregs): Likewise. * lra-lives.c: Likewise. * lra.c (lra): Likewise. * modulo-sched.c (schedule_reg_moves): Likewise. (optimize_sc): Likewise. (get_sched_window): Likewise. (sms_schedule_by_order): Likewise. (check_nodes_order): Likewise. (order_nodes_of_sccs): Likewise. (order_nodes_in_scc): Likewise. * recog.c (split_all_insns): Likewise. * regcprop.c (pass_cprop_hardreg::execute): Likewise. * reload1.c (reload): Likewise. * sched-rgn.c (haifa_find_rgns): Likewise. (split_edges): Likewise. (compute_trg_info): Likewise. * sel-sched.c (init_seqno): Likewise. * store-motion.c (remove_reachable_equiv_notes): Likewise. * tree-into-ssa.c (update_ssa): Likewise. * tree-ssa-live.c (live_worklist): Likewise. * tree-ssa-loop-im.c (fill_always_executed_in): Likewise. * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): * Likewise. (try_peel_loop): Likewise. * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): * Likewise. * tree-ssa-pre.c (compute_antic): Likewise. * tree-ssa-reassoc.c (undistribute_ops_list): Likewise. * tree-stdarg.c (reachable_at_most_once): Likewise. * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Likewise. * var-tracking.c (vt_find_locations): Likewise. From-SVN: r238748
2016-07-26 12:44:08 +02:00
auto_sbitmap must_follow (first_move + nreg_moves);
for (i_reg_move = 0; i_reg_move < nreg_moves; i_reg_move++)
if (!schedule_reg_move (ps, first_move + i_reg_move,
distance1_uses, must_follow))
break;
if (distance1_uses)
sbitmap_free (distance1_uses);
if (i_reg_move < nreg_moves)
return false;
}
return true;
}
Fix numerous typos in comments gcc: * alias.c (base_alias_check): Fix typo in comment. * cgraph.h (class ipa_polymorphic_call_context): Likewise. * cgraphunit.c (symbol_table::compile): Likewise. * collect2.c (maybe_run_lto_and_relink): Likewise. * config/arm/arm.c (arm_thumb1_mi_thunk): Likewise. * config/avr/avr-arch.h (avr_arch_info_t): Likewise. * config/avr/avr.c (avr_map_op_t): Likewise. * config/cr16/cr16.h (DATA_ALIGNMENT): Likewise. * config/epiphany/epiphany.c (TARGET_ARG_PARTIAL_BYTES): Likewise. * config/epiphany/epiphany.md (movcc): Likewise. * config/i386/i386.c (legitimize_pe_coff_extern_decl): Likewise. * config/m68k/m68k.c (struct _sched_ib, m68k_sched_variable_issue): Likewise. * config/mips/mips.c (mips_save_restore_reg): Likewise. * config/rx/rx.c (rx_is_restricted_memory_address): Likewise. * config/s390/s390.c (Z10_EARLYLOAD_DISTANCE): Likewise. * config/sh/sh.c (sh_rtx_costs): Likewise. * fold-const.c (fold_truth_andor): Likewise. * genautomata.c (collapse_flag): Likewise. * gengtype.h (struct type::u::s): Likewise. * gensupport.c (has_subst_attribute, add_mnemonic_string): Likewise. * input.c (FORMAT_AMOUNT): Likewise. * ipa-cp.c (class ipcp_lattice, agg_replacements_to_vector) (known_aggs_to_agg_replacement_list): Likewise. * ipa-inline-analysis.c: Likewise. * ipa-inline.h (estimate_edge_time, estimate_edge_hints): Likewise. * ipa-polymorphic-call.c (ipa_polymorphic_call_context::restrict_to_inner_class): Likewise. * loop-unroll.c (analyze_insn_to_expand_var): Likewise. * lra.c (lra_optional_reload_pseudos, lra_subreg_reload_pseudos): Likewise. * modulo-sched.c (apply_reg_moves): Likewise. * omp-expand.c (build_omp_regions_1): Likewise. * trans-mem.c (struct tm_wrapper_hasher): Likewise. * tree-ssa-loop-ivopts.c (may_eliminate_iv): Likewise. * tree-ssa-loop-niter.c (maybe_lower_iteration_bound): Likewise. * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise. * value-prof.c: Likewise. * var-tracking.c (val_reset): Likewise. gcc/ada: * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo. * g-socket.adb (To_Host_Entry): Fix typo in comment. * gnat_ugn.texi: Fix typo. * raise.c (_gnat_builtin_longjmp): Fix capitalization in comment. * s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment. * sem_ch3.adb (Build_Derived_Record_Type): Likewise. * sem_util.adb (Mark_Coextensions): Likewise. * sem_util.ads (Available_Full_View_Of_Component): Likewise. gcc/c: * c-array-notation.c: Fix typo in comment. gcc/c-family: * c-warn.c (do_warn_double_promotion): Fix typo in comment. gcc/cp: * class.c (update_vtable_entry_for_fn): Fix typo in comment. * decl2.c (one_static_initialization_or_destruction): Likewise. * name-lookup.c (store_bindings): Likewise. * parser.c (make_call_declarator): Likewise. * pt.c (check_explicit_specialization): Likewise. gcc/testsuite: * g++.old-deja/g++.benjamin/scope02.C: Fix typo in comment. * gcc.dg/20031012-1.c: Likewise. * gcc.dg/ipa/ipcp-1.c: Likewise. * gcc.dg/torture/matrix-3.c: Likewise. * gcc.target/powerpc/ppc-spe.c: Likewise. * gcc.target/rx/zero-width-bitfield.c: Likewise. libcpp: * include/line-map.h (LINEMAPS_MACRO_MAPS): Fix typo in comment. * lex.c (search_line_fast): Likewise. * pch.h (cpp_valid_state): Likewise. libdecnumber: * decCommon.c (decFloatFromPackedChecked): Fix typo in comment. * decNumber.c (decNumberPower, decMultiplyOp): Likewise. libgcc: * config/c6x/pr-support.c (__gnu_unwind_execute): Fix typo in comment. libitm: * libitm_i.h (sutrct gtm_thread): Fix typo in comment. From-SVN: r246664
2017-04-04 00:30:56 +02:00
/* Emit the moves associated with PS. Apply the substitutions
associated with them. */
static void
apply_reg_moves (partial_schedule_ptr ps)
{
ps_reg_move_info *move;
int i;
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
FOR_EACH_VEC_ELT (ps->reg_moves, i, move)
{
unsigned int i_use;
sbitmap_iterator sbi;
This patch renames sbitmap iterators to unify them with the bitmap iterators. Remove the unused EXECUTE_IF_SET_IN_SBITMAP_REV, which has an unconventional interface. Rename the sbitmap_iter_* functions to match bitmap's bmp_iter_* functions. Add an additional parameter to the initialization and next functions to match the interface in bmp_iter_*. This extra parameter is mostly hidden by the use of the EXECUTE_IF macros. Rename the EXECUTE_IF_SET_IN_SBITMAP macro to EXECUTE_IF_SET_IN_BITMAP. Its implementation is now identical to that in bitmap.h. To prevent redefinition errors, both definitions are now guarded by #ifndef. An alternate strategy is to simply include bitmap.h from sbitmap.h. As this would increase build time, I have elected to use the #ifndef version. I do not have a strong preference here. The sbitmap_iterator type is still distinctly named because it is often declared in contexts where the bitmap type is not obvious. There are less than 40 uses of this type, so the burden to modify it when changing bitmap types is not large. Tested on x86-64, config-list.mk testing. Index: gcc/ChangeLog 2012-10-31 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_iter_init): Rename bmp_iter_set_init and add unused parameter to match bitmap iterator. Update callers. (sbitmap_iter_cond): Rename bmp_iter_set. Update callers. (sbitmap_iter_next): Rename bmp_iter_next and add unused parameter to match bitmap iterator. Update callers. (EXECUTE_IF_SET_IN_SBITMAP_REV): Remove unused. (EXECUTE_IF_SET_IN_SBITMAP): Rename EXECUTE_IF_SET_IN_BITMAP and adjust to be identical to the definition in bitmap.h. Conditionalize the definition based on not having been defined. Update callers. * bitmap.h (EXECUTE_IF_SET_IN_BITMAP): Conditionalize the definition based on not having been defined. (To match the above.) From-SVN: r193069
2012-11-01 22:02:15 +01:00
EXECUTE_IF_SET_IN_BITMAP (move->uses, 0, i_use, sbi)
{
replace_rtx (ps->g->nodes[i_use].insn, move->old_reg, move->new_reg);
df_insn_rescan (ps->g->nodes[i_use].insn);
}
}
2011-08-03 09:59:23 +02:00
}
/* Bump the SCHED_TIMEs of all nodes by AMOUNT. Set the values of
SCHED_ROW and SCHED_STAGE. Instruction scheduled on cycle AMOUNT
will move to cycle zero. */
static void
reset_sched_times (partial_schedule_ptr ps, int amount)
{
int row;
int ii = ps->ii;
ps_insn_ptr crr_insn;
for (row = 0; row < ii; row++)
for (crr_insn = ps->rows[row]; crr_insn; crr_insn = crr_insn->next_in_row)
{
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
int u = crr_insn->id;
int normalized_time = SCHED_TIME (u) - amount;
int new_min_cycle = PS_MIN_CYCLE (ps) - amount;
if (dump_file)
{
/* Print the scheduling times after the rotation. */
rtx_insn *insn = ps_rtl_insn (ps, u);
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
fprintf (dump_file, "crr_insn->node=%d (insn id %d), "
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
"crr_insn->cycle=%d, min_cycle=%d", u,
INSN_UID (insn), normalized_time, new_min_cycle);
if (JUMP_P (insn))
fprintf (dump_file, " (branch)");
fprintf (dump_file, "\n");
}
gcc_assert (SCHED_TIME (u) >= ps->min_cycle);
gcc_assert (SCHED_TIME (u) <= ps->max_cycle);
2011-08-03 09:59:23 +02:00
crr_insn->cycle = normalized_time;
update_node_sched_params (u, ii, normalized_time, new_min_cycle);
}
}
/* Permute the insns according to their order in PS, from row 0 to
row ii-1, and position them right before LAST. This schedules
the insns of the loop kernel. */
static void
Work towards NEXT_INSN/PREV_INSN requiring insns as their params gcc/ 2014-08-28 David Malcolm <dmalcolm@redhat.com> * cfgexpand.c (pass_expand::execute): Strengthen local "after" from rtx to rtx_insn *. * cfgrtl.c (force_nonfallthru_and_redirect): Replace use of local rtx "note" with new local rtx_insn * "new_head" when calculating head insn of new basic block. * combine.c (combine_split_insns): Strengthen return type and local "ret" from rtx to rtx_insn *. (likely_spilled_retval_p): Likewise for locals "use" and "p". (try_combine): Eliminate local "m_split", splitting into new locals "m_split_insn" and "m_split_pat". (find_split_point): Strengthen local "seq" from rtx into rtx_insn *. * config/spu/spu.c (spu_machine_dependent_reorg): Likewise for locals "label", "branch". * config/spu/spu.md (define_expand "smulsi3_highpart"): Likewise for local "insn". (define_expand "umulsi3_highpart"): Likewise for local "insn". * dse.c (note_add_store_info): Likewise for fields "first", "current". (note_add_store): Likewise for local "insn". (emit_inc_dec_insn_before): Likewise for locals "insn", "new_insn", "cur". (find_shift_sequence): Likewise for locals "shift_seq", "insn". (replace_read): Likewise for locals "insns", "this_insn". * dwarf2cfi.c (dw_trace_info): Likewise for field "eh_head". (notice_eh_throw): Likewise for param "insn". (before_next_cfi_note): Likewise for return type, param, and local "prev". (connect_traces): Likewise for local "note". * emit-rtl.c (reset_all_used_flags): Likewise for local "p". (verify_rtl_sharing): Likewise. (unshare_all_rtl_in_chain): Likewise for param "insn". (get_first_nonnote_insn): Likewise for local "insn". (get_last_nonnote_insn): Likewise. Introduce local rtx_sequence * "seq" and use its methods to clarify things. (next_insn): Strengthen return type from rtx to rtx_insn *. Rename param "insn" to "uncast_insn" and reintroduce "insn" as a local rtx_insn * using a checked cast, dropping a checked cast made redundant by this change. Use a cast to and method of rtx_sequence to clarify the code. (previous_insn): Rename param "insn" to "uncast_insn" and reintroduce "insn" as a local rtx_insn * using a checked cast, dropping a checked cast made redundant by this change. Use a cast to and method of rtx_sequence to clarify the code. (next_nonnote_insn): Rename param "insn" to "uncast_insn" and reintroduce "insn" as a local rtx_insn * using a checked cast, dropping a checked cast made redundant by this change. (next_nonnote_insn_bb): Likewise. (prev_nonnote_insn): Likewise. (prev_nonnote_insn_bb): Likewise. (next_nondebug_insn): Likewise. (prev_nondebug_insn): Likewise. (next_nonnote_nondebug_insn): Likewise. (prev_nonnote_nondebug_insn): Likewise. (next_real_insn): Likewise. (prev_real_insn): Likewise. (next_active_insn): Likewise. (prev_active_insn): Likewise. (next_cc0_user): Likewise. Use rtx_sequence and a method for clarity. (prev_cc0_setter): Likewise. (try_split): Rename param "trial" to "uncast_trial" and reintroduce "insn" as a local rtx_insn * using a checked cast, dropping checked casts made redundant by this change. Strengthen locals "seq", "tem", "insn_last", "insn", "next" from rtx to rtx_insn *. (remove_insn): Rename param "insn" to "uncast_insn" and reintroduce "insn" as a local rtx_insn * using a checked cast. (emit_pattern_after_setloc): Likewise for param "after", as "uncast_after". (emit_pattern_after): Likewise. Strengthen local "prev" from rtx to rtx_insn *. (emit_pattern_before_setloc): Rename param "before" to "uncast_before" and reintroduce "before" as a local rtx_insn * using a checked cast. Strengthen locals "first", "last" from rtx to rtx_insn *. (emit_pattern_before): Likewise rename/cast param "before" to "uncast_before". Strengthen local "next" from rtx to rtx_insn *. * except.c (copy_reg_eh_region_note_forward): Strengthen param "first" and local "insn" from rtx to rtx_insn *. (copy_reg_eh_region_note_backward): Likewise for param "last" and local "insn". * expr.c (fixup_args_size_notes): Rename param "last" to "uncast_last" and reintroduce "last" as a local rtx_insn * using a checked cast. Strengthen local "insn" from rtx to rtx_insn *. * function.c (set_insn_locations): Strengthen param "insn" from rtx to rtx_insn *. (record_insns): Likewise for param "insns" and local "tmp". (active_insn_between): Rename param "tail" to "uncast_tail" and reintroduce "tail" as a local rtx_insn * using a checked cast. (thread_prologue_and_epilogue_insns): Split out top-level local rtx "seq" into three different rtx_insn * locals. Strengthen local "prologue_seq" from rtx to rtx_insn *. * gcse.c (insert_insn_end_basic_block): Strenghen local "insn" from rtx to rtx_insn *. * haifa-sched.c (initiate_bb_reg_pressure_info): Likewise. (priority): Likewise for locals "prev_first", "twin". (setup_insn_max_reg_pressure): Likewise for param "after". (sched_setup_bb_reg_pressure_info): Likewise. (no_real_insns_p): Strengthen params from const_rtx to const rtx_insn *. (schedule_block): Strengthen local "next_tail" from rtx to rtx_insn *. * ifcvt.c (find_active_insn_before): Strengthen return type and param "insn" from rtx to rtx_insn *. (find_active_insn_after): Likewise. (cond_exec_process_insns): Likewise for param "start" and local "insn". (cond_exec_process_if_block): Likewise for locals "then_start", "then_end", "else_start", "else_end", "insn", "start", "end", "from". (noce_process_if_block): Likewise for local "jump". (merge_if_block): Likewise for two locals named "end". (cond_exec_find_if_block): Likewise for local "last_insn". * jump.c (delete_related_insns): Rename param "insn" to "uncast_insn" and reintroduce "insn" as a local rtx_insn * using a checked cast. Strengthen local "p" from rtx to rtx_insn *. * lra-constraints.c (inherit_reload_reg): Replace NULL_RTX with NULL. (split_reg): Likewise. * lra.c (lra_process_new_insns): Likewise. * modulo-sched.c (permute_partial_schedule): Strengthen param "last" from rtx to rtx_insn *. * optabs.c (add_equal_note): Likewise for param "insns" and local "last_insn". (expand_binop_directly): Add checked casts to rtx_insn * within NEXT_INSN (pat) uses. (expand_unop_direct): Likewise. (maybe_emit_unop_insn): Likewise. * recog.c (peep2_attempt): Strengthen locals "last", "before_try", "x" from rtx to rtx_insn *. * reorg.c (optimize_skip): Strengthen return type and local "delay_list" from rtx to rtx_insn_list *. Strengthen param "insn" and locals "trial", "next_trial" from rtx to rtx_insn *. * resource.c (next_insn_no_annul): Strengthen return type and param "insn" from rtx to rtx_insn *. Use a cast to and method of rtx_sequence to clarify the code. (mark_referenced_resources): Add a checked cast to rtx_insn * within PREV_INSN (x). (find_dead_or_set_registers): Strengthen return type, param "target", locals "insn", "next", "jump_insn", "this_jump_insn" from rtx to rtx_insn *. Strengthen param "jump_target" from rtx * to rtx_insn **. (mark_target_live_regs): Strengthen params "insns" and "target", locals "insn", "jump_target", "start_insn", "stop_insn" from rtx to rtx_insn *. Use cast to and method of rtx_sequence to clarify the code. * resource.h (mark_target_live_regs): Strengthen params 1 and 2 from rtx to rtx_insn *. * rtl.h (copy_reg_eh_region_note_forward): Strengthen second param from rtx to rtx_insn *. (copy_reg_eh_region_note_backward): Likewise. (unshare_all_rtl_in_chain): Likewise for sole param. (dump_rtl_slim): Strengthen second and third params from const_rtx to const rtx_insn *. * sched-deps.c (sched_free_deps): Strengthen params "head" and "tail" and locals "insn", "next_tail" from rtx to rtx_insn *. * sched-ebb.c (init_ready_list): Strengthen locals "prev_head", "next_tail" from rtx to rtx_insn *. (begin_move_insn): Likewise for local "next". * sched-int.h (sched_free_deps): Likewise for first and second params. (no_real_insns_p): Strengthen both params from const_rtx to const rtx_insn *. (sched_setup_bb_reg_pressure_info): Strengthen second params from rtx to rtx_insn *. * sched-rgn.c (init_ready_list): Likewise for locals "prev_head", "next_tail". * sched-vis.c (dump_rtl_slim): Strengthen params "first", "last" and locals "insn", "tail" from const_rtx to const rtx_insn *. (rtl_dump_bb_for_graph): Strengthen local "insn" from rtx to rtx_insn *. (debug_rtl_slim): Strengthen params "first" and "last" from const_rtx to const rtx_insn *. * shrink-wrap.c (try_shrink_wrapping): Strengthen param "prologue_seq" and locals "seq", "p_insn" from rtx to rtx_insn *. (convert_to_simple_return): Likewise for param "returnjump". * shrink-wrap.h (try_shrink_wrapping): Likewise for param "prologue_seq". (convert_to_simple_return): Likewise for param "returnjump". * valtrack.c (propagate_for_debug): Likewise for params "insn", "last". * valtrack.h (propagate_for_debug): Likewise for second param. From-SVN: r214693
2014-08-28 22:45:40 +02:00
permute_partial_schedule (partial_schedule_ptr ps, rtx_insn *last)
{
int ii = ps->ii;
int row;
ps_insn_ptr ps_ij;
for (row = 0; row < ii ; row++)
for (ps_ij = ps->rows[row]; ps_ij; ps_ij = ps_ij->next_in_row)
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
{
rtx_insn *insn = ps_rtl_insn (ps, ps_ij->id);
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
if (PREV_INSN (last) != insn)
{
if (ps_ij->id < ps->g->num_nodes)
reorder_insns_nobb (ps_first_note (ps, ps_ij->id), insn,
PREV_INSN (last));
else
add_insn_before (insn, last, NULL);
}
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
}
}
2011-08-03 09:59:23 +02:00
/* Set bitmaps TMP_FOLLOW and TMP_PRECEDE to MUST_FOLLOW and MUST_PRECEDE
respectively only if cycle C falls on the border of the scheduling
window boundaries marked by START and END cycles. STEP is the
direction of the window. */
static inline void
set_must_precede_follow (sbitmap *tmp_follow, sbitmap must_follow,
sbitmap *tmp_precede, sbitmap must_precede, int c,
int start, int end, int step)
{
*tmp_precede = NULL;
*tmp_follow = NULL;
if (c == start)
{
if (step == 1)
*tmp_precede = must_precede;
else /* step == -1. */
*tmp_follow = must_follow;
}
if (c == end - step)
{
if (step == 1)
*tmp_follow = must_follow;
else /* step == -1. */
*tmp_precede = must_precede;
}
}
/* Return True if the branch can be moved to row ii-1 while
normalizing the partial schedule PS to start from cycle zero and thus
optimize the SC. Otherwise return False. */
static bool
optimize_sc (partial_schedule_ptr ps, ddg_ptr g)
{
int amount = PS_MIN_CYCLE (ps);
int start, end, step;
int ii = ps->ii;
bool ok = false;
int stage_count, stage_count_curr;
/* Compare the SC after normalization and SC after bringing the branch
to row ii-1. If they are equal just bail out. */
stage_count = calculate_stage_count (ps, amount);
stage_count_curr =
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
calculate_stage_count (ps, SCHED_TIME (g->closing_branch->cuid) - (ii - 1));
2011-08-03 09:59:23 +02:00
if (stage_count == stage_count_curr)
{
if (dump_file)
fprintf (dump_file, "SMS SC already optimized.\n");
use auto_sbitmap in various places gcc/ChangeLog: 2016-07-26 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * bt-load.c (compute_out): Use auto_sbitmap class. (link_btr_uses): Likewise. * cfganal.c (mark_dfs_back_edges): Likewise. (post_order_compute): Likewise. (inverted_post_order_compute): Likewise. (pre_and_rev_post_order_compute_fn): Likewise. (single_pred_before_succ_order): Likewise. * cfgexpand.c (pass_expand::execute): Likewise. * cfgloop.c (verify_loop_structure): Likewise. * cfgloopmanip.c (fix_bb_placements): Likewise. (remove_path): Likewise. (update_dominators_in_loop): Likewise. * cfgrtl.c (break_superblocks): Likewise. * ddg.c (check_sccs): Likewise. (create_ddg_all_sccs): Likewise. * df-core.c (df_worklist_dataflow): Likewise. * dse.c (dse_step3): Likewise. * except.c (eh_region_outermost): Likewise. * function.c (thread_prologue_and_epilogue_insns): Likewise. * gcse.c (prune_expressions): Likewise. (prune_insertions_deletions): Likewise. * gimple-ssa-backprop.c (backprop::~backprop): Likewise. * graph.c (draw_cfg_nodes_no_loops): Likewise. * ira-lives.c (remove_some_program_points_and_update_live_ranges): Likewise. * lcm.c (compute_earliest): Likewise. (compute_farthest): Likewise. * loop-unroll.c (unroll_loop_constant_iterations): Likewise. (unroll_loop_runtime_iterations): Likewise. (unroll_loop_stupid): Likewise. * lower-subreg.c (decompose_multiword_subregs): Likewise. * lra-lives.c: Likewise. * lra.c (lra): Likewise. * modulo-sched.c (schedule_reg_moves): Likewise. (optimize_sc): Likewise. (get_sched_window): Likewise. (sms_schedule_by_order): Likewise. (check_nodes_order): Likewise. (order_nodes_of_sccs): Likewise. (order_nodes_in_scc): Likewise. * recog.c (split_all_insns): Likewise. * regcprop.c (pass_cprop_hardreg::execute): Likewise. * reload1.c (reload): Likewise. * sched-rgn.c (haifa_find_rgns): Likewise. (split_edges): Likewise. (compute_trg_info): Likewise. * sel-sched.c (init_seqno): Likewise. * store-motion.c (remove_reachable_equiv_notes): Likewise. * tree-into-ssa.c (update_ssa): Likewise. * tree-ssa-live.c (live_worklist): Likewise. * tree-ssa-loop-im.c (fill_always_executed_in): Likewise. * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): * Likewise. (try_peel_loop): Likewise. * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): * Likewise. * tree-ssa-pre.c (compute_antic): Likewise. * tree-ssa-reassoc.c (undistribute_ops_list): Likewise. * tree-stdarg.c (reachable_at_most_once): Likewise. * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Likewise. * var-tracking.c (vt_find_locations): Likewise. From-SVN: r238748
2016-07-26 12:44:08 +02:00
return false;
2011-08-03 09:59:23 +02:00
}
if (dump_file)
{
fprintf (dump_file, "SMS Trying to optimize branch location\n");
fprintf (dump_file, "SMS partial schedule before trial:\n");
print_partial_schedule (ps, dump_file);
}
/* First, normalize the partial scheduling. */
reset_sched_times (ps, amount);
rotate_partial_schedule (ps, amount);
if (dump_file)
{
fprintf (dump_file,
"SMS partial schedule after normalization (ii, %d, SC %d):\n",
ii, stage_count);
print_partial_schedule (ps, dump_file);
}
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
if (SMODULO (SCHED_TIME (g->closing_branch->cuid), ii) == ii - 1)
use auto_sbitmap in various places gcc/ChangeLog: 2016-07-26 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * bt-load.c (compute_out): Use auto_sbitmap class. (link_btr_uses): Likewise. * cfganal.c (mark_dfs_back_edges): Likewise. (post_order_compute): Likewise. (inverted_post_order_compute): Likewise. (pre_and_rev_post_order_compute_fn): Likewise. (single_pred_before_succ_order): Likewise. * cfgexpand.c (pass_expand::execute): Likewise. * cfgloop.c (verify_loop_structure): Likewise. * cfgloopmanip.c (fix_bb_placements): Likewise. (remove_path): Likewise. (update_dominators_in_loop): Likewise. * cfgrtl.c (break_superblocks): Likewise. * ddg.c (check_sccs): Likewise. (create_ddg_all_sccs): Likewise. * df-core.c (df_worklist_dataflow): Likewise. * dse.c (dse_step3): Likewise. * except.c (eh_region_outermost): Likewise. * function.c (thread_prologue_and_epilogue_insns): Likewise. * gcse.c (prune_expressions): Likewise. (prune_insertions_deletions): Likewise. * gimple-ssa-backprop.c (backprop::~backprop): Likewise. * graph.c (draw_cfg_nodes_no_loops): Likewise. * ira-lives.c (remove_some_program_points_and_update_live_ranges): Likewise. * lcm.c (compute_earliest): Likewise. (compute_farthest): Likewise. * loop-unroll.c (unroll_loop_constant_iterations): Likewise. (unroll_loop_runtime_iterations): Likewise. (unroll_loop_stupid): Likewise. * lower-subreg.c (decompose_multiword_subregs): Likewise. * lra-lives.c: Likewise. * lra.c (lra): Likewise. * modulo-sched.c (schedule_reg_moves): Likewise. (optimize_sc): Likewise. (get_sched_window): Likewise. (sms_schedule_by_order): Likewise. (check_nodes_order): Likewise. (order_nodes_of_sccs): Likewise. (order_nodes_in_scc): Likewise. * recog.c (split_all_insns): Likewise. * regcprop.c (pass_cprop_hardreg::execute): Likewise. * reload1.c (reload): Likewise. * sched-rgn.c (haifa_find_rgns): Likewise. (split_edges): Likewise. (compute_trg_info): Likewise. * sel-sched.c (init_seqno): Likewise. * store-motion.c (remove_reachable_equiv_notes): Likewise. * tree-into-ssa.c (update_ssa): Likewise. * tree-ssa-live.c (live_worklist): Likewise. * tree-ssa-loop-im.c (fill_always_executed_in): Likewise. * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): * Likewise. (try_peel_loop): Likewise. * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): * Likewise. * tree-ssa-pre.c (compute_antic): Likewise. * tree-ssa-reassoc.c (undistribute_ops_list): Likewise. * tree-stdarg.c (reachable_at_most_once): Likewise. * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Likewise. * var-tracking.c (vt_find_locations): Likewise. From-SVN: r238748
2016-07-26 12:44:08 +02:00
return true;
2011-08-03 09:59:23 +02:00
use auto_sbitmap in various places gcc/ChangeLog: 2016-07-26 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * bt-load.c (compute_out): Use auto_sbitmap class. (link_btr_uses): Likewise. * cfganal.c (mark_dfs_back_edges): Likewise. (post_order_compute): Likewise. (inverted_post_order_compute): Likewise. (pre_and_rev_post_order_compute_fn): Likewise. (single_pred_before_succ_order): Likewise. * cfgexpand.c (pass_expand::execute): Likewise. * cfgloop.c (verify_loop_structure): Likewise. * cfgloopmanip.c (fix_bb_placements): Likewise. (remove_path): Likewise. (update_dominators_in_loop): Likewise. * cfgrtl.c (break_superblocks): Likewise. * ddg.c (check_sccs): Likewise. (create_ddg_all_sccs): Likewise. * df-core.c (df_worklist_dataflow): Likewise. * dse.c (dse_step3): Likewise. * except.c (eh_region_outermost): Likewise. * function.c (thread_prologue_and_epilogue_insns): Likewise. * gcse.c (prune_expressions): Likewise. (prune_insertions_deletions): Likewise. * gimple-ssa-backprop.c (backprop::~backprop): Likewise. * graph.c (draw_cfg_nodes_no_loops): Likewise. * ira-lives.c (remove_some_program_points_and_update_live_ranges): Likewise. * lcm.c (compute_earliest): Likewise. (compute_farthest): Likewise. * loop-unroll.c (unroll_loop_constant_iterations): Likewise. (unroll_loop_runtime_iterations): Likewise. (unroll_loop_stupid): Likewise. * lower-subreg.c (decompose_multiword_subregs): Likewise. * lra-lives.c: Likewise. * lra.c (lra): Likewise. * modulo-sched.c (schedule_reg_moves): Likewise. (optimize_sc): Likewise. (get_sched_window): Likewise. (sms_schedule_by_order): Likewise. (check_nodes_order): Likewise. (order_nodes_of_sccs): Likewise. (order_nodes_in_scc): Likewise. * recog.c (split_all_insns): Likewise. * regcprop.c (pass_cprop_hardreg::execute): Likewise. * reload1.c (reload): Likewise. * sched-rgn.c (haifa_find_rgns): Likewise. (split_edges): Likewise. (compute_trg_info): Likewise. * sel-sched.c (init_seqno): Likewise. * store-motion.c (remove_reachable_equiv_notes): Likewise. * tree-into-ssa.c (update_ssa): Likewise. * tree-ssa-live.c (live_worklist): Likewise. * tree-ssa-loop-im.c (fill_always_executed_in): Likewise. * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): * Likewise. (try_peel_loop): Likewise. * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): * Likewise. * tree-ssa-pre.c (compute_antic): Likewise. * tree-ssa-reassoc.c (undistribute_ops_list): Likewise. * tree-stdarg.c (reachable_at_most_once): Likewise. * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Likewise. * var-tracking.c (vt_find_locations): Likewise. From-SVN: r238748
2016-07-26 12:44:08 +02:00
auto_sbitmap sched_nodes (g->num_nodes);
This patch implements the unification of the *bitmap interfaces as discussed. Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
2012-10-30 01:02:55 +01:00
bitmap_ones (sched_nodes);
2011-08-03 09:59:23 +02:00
/* Calculate the new placement of the branch. It should be in row
ii-1 and fall into it's scheduling window. */
if (get_sched_window (ps, g->closing_branch, sched_nodes, ii, &start,
&step, &end) == 0)
{
bool success;
ps_insn_ptr next_ps_i;
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
int branch_cycle = SCHED_TIME (g->closing_branch->cuid);
2011-08-03 09:59:23 +02:00
int row = SMODULO (branch_cycle, ps->ii);
int num_splits = 0;
use auto_sbitmap in various places gcc/ChangeLog: 2016-07-26 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * bt-load.c (compute_out): Use auto_sbitmap class. (link_btr_uses): Likewise. * cfganal.c (mark_dfs_back_edges): Likewise. (post_order_compute): Likewise. (inverted_post_order_compute): Likewise. (pre_and_rev_post_order_compute_fn): Likewise. (single_pred_before_succ_order): Likewise. * cfgexpand.c (pass_expand::execute): Likewise. * cfgloop.c (verify_loop_structure): Likewise. * cfgloopmanip.c (fix_bb_placements): Likewise. (remove_path): Likewise. (update_dominators_in_loop): Likewise. * cfgrtl.c (break_superblocks): Likewise. * ddg.c (check_sccs): Likewise. (create_ddg_all_sccs): Likewise. * df-core.c (df_worklist_dataflow): Likewise. * dse.c (dse_step3): Likewise. * except.c (eh_region_outermost): Likewise. * function.c (thread_prologue_and_epilogue_insns): Likewise. * gcse.c (prune_expressions): Likewise. (prune_insertions_deletions): Likewise. * gimple-ssa-backprop.c (backprop::~backprop): Likewise. * graph.c (draw_cfg_nodes_no_loops): Likewise. * ira-lives.c (remove_some_program_points_and_update_live_ranges): Likewise. * lcm.c (compute_earliest): Likewise. (compute_farthest): Likewise. * loop-unroll.c (unroll_loop_constant_iterations): Likewise. (unroll_loop_runtime_iterations): Likewise. (unroll_loop_stupid): Likewise. * lower-subreg.c (decompose_multiword_subregs): Likewise. * lra-lives.c: Likewise. * lra.c (lra): Likewise. * modulo-sched.c (schedule_reg_moves): Likewise. (optimize_sc): Likewise. (get_sched_window): Likewise. (sms_schedule_by_order): Likewise. (check_nodes_order): Likewise. (order_nodes_of_sccs): Likewise. (order_nodes_in_scc): Likewise. * recog.c (split_all_insns): Likewise. * regcprop.c (pass_cprop_hardreg::execute): Likewise. * reload1.c (reload): Likewise. * sched-rgn.c (haifa_find_rgns): Likewise. (split_edges): Likewise. (compute_trg_info): Likewise. * sel-sched.c (init_seqno): Likewise. * store-motion.c (remove_reachable_equiv_notes): Likewise. * tree-into-ssa.c (update_ssa): Likewise. * tree-ssa-live.c (live_worklist): Likewise. * tree-ssa-loop-im.c (fill_always_executed_in): Likewise. * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): * Likewise. (try_peel_loop): Likewise. * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): * Likewise. * tree-ssa-pre.c (compute_antic): Likewise. * tree-ssa-reassoc.c (undistribute_ops_list): Likewise. * tree-stdarg.c (reachable_at_most_once): Likewise. * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Likewise. * var-tracking.c (vt_find_locations): Likewise. From-SVN: r238748
2016-07-26 12:44:08 +02:00
sbitmap tmp_precede, tmp_follow;
int min_cycle, c;
2011-08-03 09:59:23 +02:00
if (dump_file)
fprintf (dump_file, "\nTrying to schedule node %d "
"INSN = %d in (%d .. %d) step %d\n",
g->closing_branch->cuid,
(INSN_UID (g->closing_branch->insn)), start, end, step);
gcc_assert ((step > 0 && start < end) || (step < 0 && start > end));
if (step == 1)
{
c = start + ii - SMODULO (start, ii) - 1;
gcc_assert (c >= start);
if (c >= end)
{
if (dump_file)
fprintf (dump_file,
"SMS failed to schedule branch at cycle: %d\n", c);
use auto_sbitmap in various places gcc/ChangeLog: 2016-07-26 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * bt-load.c (compute_out): Use auto_sbitmap class. (link_btr_uses): Likewise. * cfganal.c (mark_dfs_back_edges): Likewise. (post_order_compute): Likewise. (inverted_post_order_compute): Likewise. (pre_and_rev_post_order_compute_fn): Likewise. (single_pred_before_succ_order): Likewise. * cfgexpand.c (pass_expand::execute): Likewise. * cfgloop.c (verify_loop_structure): Likewise. * cfgloopmanip.c (fix_bb_placements): Likewise. (remove_path): Likewise. (update_dominators_in_loop): Likewise. * cfgrtl.c (break_superblocks): Likewise. * ddg.c (check_sccs): Likewise. (create_ddg_all_sccs): Likewise. * df-core.c (df_worklist_dataflow): Likewise. * dse.c (dse_step3): Likewise. * except.c (eh_region_outermost): Likewise. * function.c (thread_prologue_and_epilogue_insns): Likewise. * gcse.c (prune_expressions): Likewise. (prune_insertions_deletions): Likewise. * gimple-ssa-backprop.c (backprop::~backprop): Likewise. * graph.c (draw_cfg_nodes_no_loops): Likewise. * ira-lives.c (remove_some_program_points_and_update_live_ranges): Likewise. * lcm.c (compute_earliest): Likewise. (compute_farthest): Likewise. * loop-unroll.c (unroll_loop_constant_iterations): Likewise. (unroll_loop_runtime_iterations): Likewise. (unroll_loop_stupid): Likewise. * lower-subreg.c (decompose_multiword_subregs): Likewise. * lra-lives.c: Likewise. * lra.c (lra): Likewise. * modulo-sched.c (schedule_reg_moves): Likewise. (optimize_sc): Likewise. (get_sched_window): Likewise. (sms_schedule_by_order): Likewise. (check_nodes_order): Likewise. (order_nodes_of_sccs): Likewise. (order_nodes_in_scc): Likewise. * recog.c (split_all_insns): Likewise. * regcprop.c (pass_cprop_hardreg::execute): Likewise. * reload1.c (reload): Likewise. * sched-rgn.c (haifa_find_rgns): Likewise. (split_edges): Likewise. (compute_trg_info): Likewise. * sel-sched.c (init_seqno): Likewise. * store-motion.c (remove_reachable_equiv_notes): Likewise. * tree-into-ssa.c (update_ssa): Likewise. * tree-ssa-live.c (live_worklist): Likewise. * tree-ssa-loop-im.c (fill_always_executed_in): Likewise. * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): * Likewise. (try_peel_loop): Likewise. * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): * Likewise. * tree-ssa-pre.c (compute_antic): Likewise. * tree-ssa-reassoc.c (undistribute_ops_list): Likewise. * tree-stdarg.c (reachable_at_most_once): Likewise. * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Likewise. * var-tracking.c (vt_find_locations): Likewise. From-SVN: r238748
2016-07-26 12:44:08 +02:00
return false;
2011-08-03 09:59:23 +02:00
}
}
else
{
c = start - SMODULO (start, ii) - 1;
gcc_assert (c <= start);
if (c <= end)
{
if (dump_file)
fprintf (dump_file,
"SMS failed to schedule branch at cycle: %d\n", c);
use auto_sbitmap in various places gcc/ChangeLog: 2016-07-26 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * bt-load.c (compute_out): Use auto_sbitmap class. (link_btr_uses): Likewise. * cfganal.c (mark_dfs_back_edges): Likewise. (post_order_compute): Likewise. (inverted_post_order_compute): Likewise. (pre_and_rev_post_order_compute_fn): Likewise. (single_pred_before_succ_order): Likewise. * cfgexpand.c (pass_expand::execute): Likewise. * cfgloop.c (verify_loop_structure): Likewise. * cfgloopmanip.c (fix_bb_placements): Likewise. (remove_path): Likewise. (update_dominators_in_loop): Likewise. * cfgrtl.c (break_superblocks): Likewise. * ddg.c (check_sccs): Likewise. (create_ddg_all_sccs): Likewise. * df-core.c (df_worklist_dataflow): Likewise. * dse.c (dse_step3): Likewise. * except.c (eh_region_outermost): Likewise. * function.c (thread_prologue_and_epilogue_insns): Likewise. * gcse.c (prune_expressions): Likewise. (prune_insertions_deletions): Likewise. * gimple-ssa-backprop.c (backprop::~backprop): Likewise. * graph.c (draw_cfg_nodes_no_loops): Likewise. * ira-lives.c (remove_some_program_points_and_update_live_ranges): Likewise. * lcm.c (compute_earliest): Likewise. (compute_farthest): Likewise. * loop-unroll.c (unroll_loop_constant_iterations): Likewise. (unroll_loop_runtime_iterations): Likewise. (unroll_loop_stupid): Likewise. * lower-subreg.c (decompose_multiword_subregs): Likewise. * lra-lives.c: Likewise. * lra.c (lra): Likewise. * modulo-sched.c (schedule_reg_moves): Likewise. (optimize_sc): Likewise. (get_sched_window): Likewise. (sms_schedule_by_order): Likewise. (check_nodes_order): Likewise. (order_nodes_of_sccs): Likewise. (order_nodes_in_scc): Likewise. * recog.c (split_all_insns): Likewise. * regcprop.c (pass_cprop_hardreg::execute): Likewise. * reload1.c (reload): Likewise. * sched-rgn.c (haifa_find_rgns): Likewise. (split_edges): Likewise. (compute_trg_info): Likewise. * sel-sched.c (init_seqno): Likewise. * store-motion.c (remove_reachable_equiv_notes): Likewise. * tree-into-ssa.c (update_ssa): Likewise. * tree-ssa-live.c (live_worklist): Likewise. * tree-ssa-loop-im.c (fill_always_executed_in): Likewise. * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): * Likewise. (try_peel_loop): Likewise. * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): * Likewise. * tree-ssa-pre.c (compute_antic): Likewise. * tree-ssa-reassoc.c (undistribute_ops_list): Likewise. * tree-stdarg.c (reachable_at_most_once): Likewise. * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Likewise. * var-tracking.c (vt_find_locations): Likewise. From-SVN: r238748
2016-07-26 12:44:08 +02:00
return false;
2011-08-03 09:59:23 +02:00
}
}
use auto_sbitmap in various places gcc/ChangeLog: 2016-07-26 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * bt-load.c (compute_out): Use auto_sbitmap class. (link_btr_uses): Likewise. * cfganal.c (mark_dfs_back_edges): Likewise. (post_order_compute): Likewise. (inverted_post_order_compute): Likewise. (pre_and_rev_post_order_compute_fn): Likewise. (single_pred_before_succ_order): Likewise. * cfgexpand.c (pass_expand::execute): Likewise. * cfgloop.c (verify_loop_structure): Likewise. * cfgloopmanip.c (fix_bb_placements): Likewise. (remove_path): Likewise. (update_dominators_in_loop): Likewise. * cfgrtl.c (break_superblocks): Likewise. * ddg.c (check_sccs): Likewise. (create_ddg_all_sccs): Likewise. * df-core.c (df_worklist_dataflow): Likewise. * dse.c (dse_step3): Likewise. * except.c (eh_region_outermost): Likewise. * function.c (thread_prologue_and_epilogue_insns): Likewise. * gcse.c (prune_expressions): Likewise. (prune_insertions_deletions): Likewise. * gimple-ssa-backprop.c (backprop::~backprop): Likewise. * graph.c (draw_cfg_nodes_no_loops): Likewise. * ira-lives.c (remove_some_program_points_and_update_live_ranges): Likewise. * lcm.c (compute_earliest): Likewise. (compute_farthest): Likewise. * loop-unroll.c (unroll_loop_constant_iterations): Likewise. (unroll_loop_runtime_iterations): Likewise. (unroll_loop_stupid): Likewise. * lower-subreg.c (decompose_multiword_subregs): Likewise. * lra-lives.c: Likewise. * lra.c (lra): Likewise. * modulo-sched.c (schedule_reg_moves): Likewise. (optimize_sc): Likewise. (get_sched_window): Likewise. (sms_schedule_by_order): Likewise. (check_nodes_order): Likewise. (order_nodes_of_sccs): Likewise. (order_nodes_in_scc): Likewise. * recog.c (split_all_insns): Likewise. * regcprop.c (pass_cprop_hardreg::execute): Likewise. * reload1.c (reload): Likewise. * sched-rgn.c (haifa_find_rgns): Likewise. (split_edges): Likewise. (compute_trg_info): Likewise. * sel-sched.c (init_seqno): Likewise. * store-motion.c (remove_reachable_equiv_notes): Likewise. * tree-into-ssa.c (update_ssa): Likewise. * tree-ssa-live.c (live_worklist): Likewise. * tree-ssa-loop-im.c (fill_always_executed_in): Likewise. * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): * Likewise. (try_peel_loop): Likewise. * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): * Likewise. * tree-ssa-pre.c (compute_antic): Likewise. * tree-ssa-reassoc.c (undistribute_ops_list): Likewise. * tree-stdarg.c (reachable_at_most_once): Likewise. * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Likewise. * var-tracking.c (vt_find_locations): Likewise. From-SVN: r238748
2016-07-26 12:44:08 +02:00
auto_sbitmap must_precede (g->num_nodes);
auto_sbitmap must_follow (g->num_nodes);
2011-08-03 09:59:23 +02:00
/* Try to schedule the branch is it's new cycle. */
calculate_must_precede_follow (g->closing_branch, start, end,
step, ii, sched_nodes,
must_precede, must_follow);
set_must_precede_follow (&tmp_follow, must_follow, &tmp_precede,
must_precede, c, start, end, step);
/* Find the element in the partial schedule related to the closing
branch so we can remove it from it's current cycle. */
for (next_ps_i = ps->rows[row];
next_ps_i; next_ps_i = next_ps_i->next_in_row)
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
if (next_ps_i->id == g->closing_branch->cuid)
2011-08-03 09:59:23 +02:00
break;
min_cycle = PS_MIN_CYCLE (ps) - SMODULO (PS_MIN_CYCLE (ps), ps->ii);
remove_node_from_ps (ps, next_ps_i);
2011-08-03 09:59:23 +02:00
success =
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
try_scheduling_node_in_cycle (ps, g->closing_branch->cuid, c,
2011-08-03 09:59:23 +02:00
sched_nodes, &num_splits,
tmp_precede, tmp_follow);
gcc_assert (num_splits == 0);
if (!success)
{
if (dump_file)
fprintf (dump_file,
"SMS failed to schedule branch at cycle: %d, "
"bringing it back to cycle %d\n", c, branch_cycle);
/* The branch was failed to be placed in row ii - 1.
Put it back in it's original place in the partial
schedualing. */
set_must_precede_follow (&tmp_follow, must_follow, &tmp_precede,
must_precede, branch_cycle, start, end,
step);
success =
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
try_scheduling_node_in_cycle (ps, g->closing_branch->cuid,
2011-08-03 09:59:23 +02:00
branch_cycle, sched_nodes,
&num_splits, tmp_precede,
tmp_follow);
gcc_assert (success && (num_splits == 0));
ok = false;
}
else
{
/* The branch is placed in row ii - 1. */
if (dump_file)
fprintf (dump_file,
"SMS success in moving branch to cycle %d\n", c);
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
update_node_sched_params (g->closing_branch->cuid, ii, c,
2011-08-03 09:59:23 +02:00
PS_MIN_CYCLE (ps));
ok = true;
}
/* This might have been added to a new first stage. */
if (PS_MIN_CYCLE (ps) < min_cycle)
reset_sched_times (ps, 0);
2011-08-03 09:59:23 +02:00
}
return ok;
}
static void
duplicate_insns_of_cycles (partial_schedule_ptr ps, int from_stage,
int to_stage, rtx count_reg)
{
int row;
ps_insn_ptr ps_ij;
for (row = 0; row < ps->ii; row++)
for (ps_ij = ps->rows[row]; ps_ij; ps_ij = ps_ij->next_in_row)
{
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
int u = ps_ij->id;
int first_u, last_u;
rtx_insn *u_insn;
/* Do not duplicate any insn which refers to count_reg as it
belongs to the control part.
The closing branch is scheduled as well and thus should
be ignored.
TODO: This should be done by analyzing the control part of
the loop. */
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
u_insn = ps_rtl_insn (ps, u);
if (reg_mentioned_p (count_reg, u_insn)
|| JUMP_P (u_insn))
continue;
first_u = SCHED_STAGE (u);
last_u = first_u + ps_num_consecutive_stages (ps, u) - 1;
if (from_stage <= last_u && to_stage >= first_u)
{
if (u < ps->g->num_nodes)
duplicate_insn_chain (ps_first_note (ps, u), u_insn);
else
emit_insn (copy_rtx (PATTERN (u_insn)));
}
}
}
/* Generate the instructions (including reg_moves) for prolog & epilog. */
static void
generate_prolog_epilog (partial_schedule_ptr ps, struct loop *loop,
rtx count_reg, rtx count_init)
{
int i;
int last_stage = PS_STAGE_COUNT (ps) - 1;
edge e;
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: 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-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.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. * 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. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: 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-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.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-live.h: 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-operands.h: 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-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.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-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
/* Generate the prolog, inserting its insns on the loop-entry edge. */
start_sequence ();
if (!count_init)
{
/* Generate instructions at the beginning of the prolog to
adjust the loop count by STAGE_COUNT. If loop count is constant
(count_init), this constant is adjusted by STAGE_COUNT in
generate_prolog_epilog function. */
rtx sub_reg = NULL_RTX;
sub_reg = expand_simple_binop (GET_MODE (count_reg), MINUS, count_reg,
gen_int_mode (last_stage,
GET_MODE (count_reg)),
count_reg, 1, OPTAB_DIRECT);
gcc_assert (REG_P (sub_reg));
if (REGNO (sub_reg) != REGNO (count_reg))
emit_move_insn (count_reg, sub_reg);
}
for (i = 0; i < last_stage; i++)
duplicate_insns_of_cycles (ps, 0, i, count_reg);
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: 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-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.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. * 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. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: 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-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.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-live.h: 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-operands.h: 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-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.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-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
tree-vrp.c (execute_vrp): Do not update current_loops. * tree-vrp.c (execute_vrp): Do not update current_loops. * loop-unswitch.c (unswitch_loop): Do not use loop_split_edge_with. * doc/loop.texi: Remove documentation for cancelled functions. * tree-ssa-loop-im.c (loop_commit_inserts): Removed. (move_computations, determine_lsm): Use bsi_commit_edge_inserts instead. * cfgloopmanip.c (remove_bbs): Do not update loops explicitly. (remove_path): Ensure that in delete_basic_blocks, the loops are still allocated. (add_loop): Work on valid loop structures. (loopify): Modify call of add_loop. (mfb_update_loops): Removed. (create_preheader): Do not update loops explicitly. (force_single_succ_latches, loop_version): Do not use loop_split_edge_with. (loop_split_edge_with): Removed. * tree-ssa-loop-manip.c (create_iv, determine_exit_conditions): Do not use bsi_insert_on_edge_immediate_loop. (split_loop_exit_edge, tree_unroll_loop): Do not use loop_split_edge_with. (bsi_insert_on_edge_immediate_loop): Removed. * tree-ssa-loop-ch.c (copy_loop_headers): Use current_loops. Do not use loop_split_edge_with. * cfghooks.c: Include cfgloop.h. (verify_flow_info): Verify that loop_father is filled iff current_loops are available. (redirect_edge_and_branch_force, split_block, delete_basic_block, split_edge, merge_blocks, make_forwarder_block, duplicate_block): Update cfg. * cfgloopanal.c (mark_irreducible_loops): Work if the function contains no loops. * modulo-sched.c (generate_prolog_epilog, canon_loop): Do not use loop_split_edge_with. (sms_schedule): Use current_loops. * tree-ssa-dom.c (tree_ssa_dominator_optimize): Use current_loops. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize): Set current_loops. (rtl_loop_init, rtl_loop_done): Do not set current_loops. * tree-ssa-sink.c (execute_sink_code): Use current_loops. * ifcvt.c (if_convert): Ditto. * predict.c (predict_loops): Do not clear current_loops. (tree_estimate_probability): Use current_loops. (propagate_freq): Receive head of the region to propagate instead of loop. (estimate_loops_at_level): Do not use shared to_visit bitmap. (estimate_loops): New function. Handle case current_loops == NULL. (estimate_bb_frequencies): Do not allocate tovisit. Use estimate_loops. * tree-ssa-loop.c (current_loops): Removed. (tree_loop_optimizer_init): Do not return loops. (tree_ssa_loop_init, tree_ssa_loop_done): Do not set current_loops. * tree-vectorizer.c (slpeel_update_phi_nodes_for_guard1, slpeel_update_phi_nodes_for_guard2, slpeel_tree_peel_loop_to_edge): Do not update loops explicitly. * function.h (struct function): Add x_current_loops field. (current_loops): New macro. * tree-if-conv.c (combine_blocks): Do not update loops explicitly. * loop-unroll.c (split_edge_and_insert): New function. (unroll_loop_runtime_iterations, analyze_insns_in_loop): Do not use loop_split_edge_with. * loop-doloop.c (add_test, doloop_modify): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Do not set current_loops. * cfglayout.c (copy_bbs): Do not update loops explicitly. * lambda-code.c (perfect_nestify): Do not use loop_split_edge_with. * tree-vect-transform.c (vect_transform_loop): Do not update loops explicitly. * cfgloop.c (flow_loops_cfg_dump): Do not dump dfs_order and rc_order. (flow_loops_free): Do not free dfs_order and rc_order. (flow_loops_find): Do not set dfs_order and rc_order in loops structure. Do not call loops and flow info verification. (add_bb_to_loop, remove_bb_from_loops): Check whether the block already belongs to some loop. * cfgloop.h (struct loops): Remove struct cfg. (current_loops, loop_split_edge_with): Declaration removed. (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * tree-flow.h (loop_commit_inserts, bsi_insert_on_edge_immediate_loop): Declaration removed. * Makefile.in (cfghooks.o): Add CFGLOOP_H dependency. * basic-block.h (split_edge_and_insert): Declare. * tree-cfg.c (remove_bb): Do not update loops explicitly. From-SVN: r118931
2006-11-17 12:29:17 +01:00
/* Put the prolog on the entry edge. */
e = loop_preheader_edge (loop);
split_edge_and_insert (e, get_insns ());
if (!flag_resched_modulo_sched)
e->dest->flags |= BB_DISABLE_SCHEDULE;
end_sequence ();
/* Generate the epilog, inserting its insns on the loop-exit edge. */
start_sequence ();
for (i = 0; i < last_stage; i++)
duplicate_insns_of_cycles (ps, i + 1, last_stage, count_reg);
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: 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-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.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. * 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. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: 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-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.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-live.h: 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-operands.h: 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-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.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-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
tree-vrp.c (execute_vrp): Do not update current_loops. * tree-vrp.c (execute_vrp): Do not update current_loops. * loop-unswitch.c (unswitch_loop): Do not use loop_split_edge_with. * doc/loop.texi: Remove documentation for cancelled functions. * tree-ssa-loop-im.c (loop_commit_inserts): Removed. (move_computations, determine_lsm): Use bsi_commit_edge_inserts instead. * cfgloopmanip.c (remove_bbs): Do not update loops explicitly. (remove_path): Ensure that in delete_basic_blocks, the loops are still allocated. (add_loop): Work on valid loop structures. (loopify): Modify call of add_loop. (mfb_update_loops): Removed. (create_preheader): Do not update loops explicitly. (force_single_succ_latches, loop_version): Do not use loop_split_edge_with. (loop_split_edge_with): Removed. * tree-ssa-loop-manip.c (create_iv, determine_exit_conditions): Do not use bsi_insert_on_edge_immediate_loop. (split_loop_exit_edge, tree_unroll_loop): Do not use loop_split_edge_with. (bsi_insert_on_edge_immediate_loop): Removed. * tree-ssa-loop-ch.c (copy_loop_headers): Use current_loops. Do not use loop_split_edge_with. * cfghooks.c: Include cfgloop.h. (verify_flow_info): Verify that loop_father is filled iff current_loops are available. (redirect_edge_and_branch_force, split_block, delete_basic_block, split_edge, merge_blocks, make_forwarder_block, duplicate_block): Update cfg. * cfgloopanal.c (mark_irreducible_loops): Work if the function contains no loops. * modulo-sched.c (generate_prolog_epilog, canon_loop): Do not use loop_split_edge_with. (sms_schedule): Use current_loops. * tree-ssa-dom.c (tree_ssa_dominator_optimize): Use current_loops. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize): Set current_loops. (rtl_loop_init, rtl_loop_done): Do not set current_loops. * tree-ssa-sink.c (execute_sink_code): Use current_loops. * ifcvt.c (if_convert): Ditto. * predict.c (predict_loops): Do not clear current_loops. (tree_estimate_probability): Use current_loops. (propagate_freq): Receive head of the region to propagate instead of loop. (estimate_loops_at_level): Do not use shared to_visit bitmap. (estimate_loops): New function. Handle case current_loops == NULL. (estimate_bb_frequencies): Do not allocate tovisit. Use estimate_loops. * tree-ssa-loop.c (current_loops): Removed. (tree_loop_optimizer_init): Do not return loops. (tree_ssa_loop_init, tree_ssa_loop_done): Do not set current_loops. * tree-vectorizer.c (slpeel_update_phi_nodes_for_guard1, slpeel_update_phi_nodes_for_guard2, slpeel_tree_peel_loop_to_edge): Do not update loops explicitly. * function.h (struct function): Add x_current_loops field. (current_loops): New macro. * tree-if-conv.c (combine_blocks): Do not update loops explicitly. * loop-unroll.c (split_edge_and_insert): New function. (unroll_loop_runtime_iterations, analyze_insns_in_loop): Do not use loop_split_edge_with. * loop-doloop.c (add_test, doloop_modify): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Do not set current_loops. * cfglayout.c (copy_bbs): Do not update loops explicitly. * lambda-code.c (perfect_nestify): Do not use loop_split_edge_with. * tree-vect-transform.c (vect_transform_loop): Do not update loops explicitly. * cfgloop.c (flow_loops_cfg_dump): Do not dump dfs_order and rc_order. (flow_loops_free): Do not free dfs_order and rc_order. (flow_loops_find): Do not set dfs_order and rc_order in loops structure. Do not call loops and flow info verification. (add_bb_to_loop, remove_bb_from_loops): Check whether the block already belongs to some loop. * cfgloop.h (struct loops): Remove struct cfg. (current_loops, loop_split_edge_with): Declaration removed. (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * tree-flow.h (loop_commit_inserts, bsi_insert_on_edge_immediate_loop): Declaration removed. * Makefile.in (cfghooks.o): Add CFGLOOP_H dependency. * basic-block.h (split_edge_and_insert): Declare. * tree-cfg.c (remove_bb): Do not update loops explicitly. From-SVN: r118931
2006-11-17 12:29:17 +01:00
/* Put the epilogue on the exit edge. */
tree-loop-linear.c (linear_transform_loops): Use single_exit accessor functions. * tree-loop-linear.c (linear_transform_loops): Use single_exit accessor functions. * tree-ssa-loop-niter.c (loop_only_exit_p): Ditto. * cfgloopmanip.c (update_single_exits_after_duplication, update_single_exit_for_duplicated_loop, loop_version): Ditto. * tree-scalar-evolution.c (get_loop_exit_condition, get_exit_conditions_rec, loop_closed_phi_def, number_of_iterations_in_loop, scev_const_prop): Ditto. * tree-ssa-loop-ivopts.c (single_dom_exit): Ditto. * modulo-sched.c (generate_prolog_epilog, loop_canon_p, sms_schedule): Ditto. * tree-ssa-loop-ivcanon.c (canonicalize_loop_induction_variables): Ditto. * tree-vectorizer.c (slpeel_update_phis_for_duplicate_loop, slpeel_update_phi_nodes_for_guard1, slpeel_update_phi_nodes_for_guard2, slpeel_make_loop_iterate_ntimes, slpeel_tree_duplicate_loop_to_edge_cfg, slpeel_can_duplicate_loop_p, slpeel_verify_cfg_after_peeling, slpeel_tree_peel_loop_to_edge): Ditto. * tree-if-conv.c (if_convertible_loop_p): Ditto. * tree-vect-analyze.c (vect_analyze_operations, vect_stmt_relevant_p, vect_analyze_loop_form): Ditto. * lambda-code.c (lambda_loopnest_to_gcc_loopnest, exit_phi_for_loop_p, can_convert_to_perfect_nest, perfect_nestify): Ditto. * tree-vect-transform.c (vect_create_epilog_for_reduction, vect_update_ivs_after_vectorizer, vect_do_peeling_for_loop_bound, vect_transform_loop): Ditto. * cfgloop.c (mark_single_exit_loops, verify_loop_structure): Ditto. (single_exit, set_single_exit): New functions. * cfgloop.h (struct loop): Rename single_exit field to single_exit_. (single_exit, set_single_exit): Declare. * doc/loop.texi: Undocument single_exit field. Document single_exit accessor function. From-SVN: r119075
2006-11-22 00:54:16 +01:00
gcc_assert (single_exit (loop));
e = single_exit (loop);
split_edge_and_insert (e, get_insns ());
if (!flag_resched_modulo_sched)
e->dest->flags |= BB_DISABLE_SCHEDULE;
end_sequence ();
}
/* Mark LOOP as software pipelined so the later
scheduling passes don't touch it. */
static void
mark_loop_unsched (struct loop *loop)
{
unsigned i;
basic_block *bbs = get_loop_body (loop);
for (i = 0; i < loop->num_nodes; i++)
bbs[i]->flags |= BB_DISABLE_SCHEDULE;
free (bbs);
}
/* Return true if all the BBs of the loop are empty except the
loop header. */
static bool
loop_single_full_bb_p (struct loop *loop)
{
unsigned i;
basic_block *bbs = get_loop_body (loop);
for (i = 0; i < loop->num_nodes ; i++)
{
rtx_insn *head, *tail;
bool empty_bb = true;
if (bbs[i] == loop->header)
continue;
/* Make sure that basic blocks other than the header
have only notes labels or jumps. */
target.h (struct spec_info_def): New opaque declaration. 2006-03-16 Maxim Kuvyrkov <mkuvyrkov@ispras.ru> * target.h (struct spec_info_def): New opaque declaration. (struct gcc_target.sched): New fields: adjust_cost_2, h_i_d_extended, speculate_insn, needs_block_p, gen_check, first_cycle_multipass_dfa_lookahead_guard_spec, set_sched_flags. * target-def.h (TARGET_SCHED_ADJUST_COST_2, TARGET_SCHED_H_I_D_EXTENDED, TARGET_SCHED_SPECULATE_INSN, TARGET_SCHED_NEEDS_BLOCK_P, TARGET_SCHED_GEN_CHECK, TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD_SPEC, TARGET_SCHED_SET_SCHED_FLAGS): New macros to initialize fields in gcc_target.sched. (TARGET_SCHED): Use new macros. * rtl.h (copy_DEPS_LIST_list): New prototype. * sched-int.h (struct sched_info): Change signature of new_ready field, adjust all initializations. New fields: add_remove_insn, begin_schedule_ready, add_block, advance_target_bb, fix_recovery_cfg, region_head_or_leaf_p. (struct spec_info_def): New structure declaration. (spec_info_t): New typedef. (struct haifa_insn_data): New fields: todo_spec, done_spec, check_spec, recovery_block, orig_pat. (glat_start, glat_end): New variables declaraions. (TODO_SPEC, DONE_SPEC, CHECK_SPEC, RECOVERY_BLOCK, ORIG_PAT): New access macros. (enum SCHED_FLAGS): New constants: SCHED_RGN, SCHED_EBB, DETACH_LIFE_INFO, USE_GLAT. (enum SPEC_SCHED_FLAGS): New enumeration. (NOTE_NOTE_BB_P): New macro. (extend_dependency_caches, xrecalloc, unlink_bb_notes, add_block, attach_life_info, debug_spec_status, check_reg_live): New functions. (get_block_head_tail): Change signature to get_ebb_head_tail, adjust all uses in ddg.c, modulo-sched.c, haifa-sched.c, sched-rgn.c, sched-ebb.c (get_dep_weak, ds_merge): Prototype functions from sched-deps.c . * ddg.c (get_block_head_tail): Adjust all uses. * modulo-sched.c (get_block_head_tail): Adjust all uses. (sms_sched_info): Initialize new fields. (contributes_to_priority): Removed. * haifa-sched.c (params.h): New include. (get_block_head_tail): Adjust all uses. (ISSUE_POINTS): New macro. (glat_start, glat_end): New global variables. (spec_info_var, spec_info, added_recovery_block_p, nr_begin_data, nr_be_in_data, nr_begin_control, nr_be_in_control, bb_header, old_last_basic_block, before_recovery, current_sched_info_var, rgn_n_insns, luid): New static variables. (insn_cost1): New function. Move logic from insn_cost to here. (find_insn_reg_weight1): New function. Move logic from find_insn_reg_weight to here. (reemit_notes, move_insn, max_issue): Change signature. (move_insn1): Removed. (extend_h_i_d, extend_ready, extend_global, extend_all, init_h_i_d, extend_bb): New static functions to support extension of scheduler's data structures. (generate_recovery_code, process_insn_depend_be_in_spec, begin_speculative_block, add_to_speculative_block, init_before_recovery, create_recovery_block, create_check_block_twin, fix_recovery_deps): New static functions to support generation of recovery code. (fix_jump_move, find_fallthru_edge, dump_new_block_header, restore_bb_notes, move_block_after_check, move_succs): New static functions to support ebb scheduling. (init_glat, init_glat1, attach_life_info1, free_glat): New static functions to support handling of register live information. (associate_line_notes_with_blocks, change_pattern, speculate_insn, sched_remove_insn, clear_priorities, calc_priorities, bb_note, add_jump_dependencies): New static functions. (check_cfg, has_edge_p, check_sched_flags): New static functions for consistancy checking. (debug_spec_status): New function to call from debugger. (priority): Added code to handle speculation checks. (rank_for_schedule): Added code to distinguish speculative instructions. (schedule_insn): Added code to handle speculation checks. (unlink_other_notes, rm_line_notes, restore_line_notes, rm_other_notes): Fixed to handle ebbs. (move_insn): Added code to handle ebb scheduling. (max_issue): Added code to use ISSUE_POINTS of instructions. (choose_ready): Added code to choose between speculative and non-speculative instructions. (schedule_block): Added code to handle ebb scheduling and scheduling of speculative instructions. (sched_init): Initialize new variables. (sched_finish): Free new variables. Print statistics. (try_ready): Added code to handle speculative instructions. * lists.c (copy_DEPS_LIST_list): New function. * sched-deps.c (extend_dependency_caches): New function. Move logic from create_dependency_caches to here. (get_dep_weak, ds_merge): Make global. * genattr.c (main): Code to output prototype for dfa_clear_single_insn_cache. * genautomata.c (DFA_CLEAR_SINGLE_INSN_CACHE_FUNC_NAME): New macros. (output_dfa_clean_insn_cache_func): Code to output dfa_clear_single_insn_cache function. * sched-ebb.c (target_n_insns): Remove. Adjust all users to use n_insns. (can_schedule_ready_p, fix_basic_block_boundaries, add_missing_bbs): Removed. (n_insns, dont_calc_deps, ebb_head, ebb_tail, last_bb): New static variables. (begin_schedule_ready, add_remove_insn, add_block1, advance_target_bb, fix_recovery_cfg, ebb_head_or_leaf_p): Implement hooks from struct sched_info. (ebb_sched_info): Initialize new fields. (get_block_head_tail): Adjust all uses. (compute_jump_reg_dependencies): Fixed to use glat_start. (schedule_ebb): Code to remove unreachable last block. (schedule_ebbs): Added code to update register live information. * sched-rgn.c (region_sched_info): Initialize new fields. (get_block_head_tail): Adjust all uses. (last_was_jump): Removed. Adjust users. (begin_schedule_ready, add_remove_insn, insn_points, extend_regions, add_block1, fix_recovery_cfg, advance_target_bb, region_head_or_leaf_p): Implement new hooks. (check_dead_notes1): New static function. (struct region): New fields: dont_calc_deps, has_real_ebb. (RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB): New access macros. (BB_TO_BLOCK): Fixed to handle EBBs. (EBB_FIRST_BB, EBB_LAST_BB): New macros. (ebb_head): New static variable. (debug_regions, contributes_to_priority): Fixed to handle EBBs. (find_single_block_regions, find_rgns, find_more_rgns): Initialize new fields. (compute_dom_prob_ps): New assertion. (check_live_1, update_live_1): Fixed to work with glat_start instead of global_live_at_start. (init_ready_list): New assertions. (can_schedule_ready_p): Split update code to begin_schedule_ready. (new_ready): Add support for BEGIN_CONTROL speculation. (schedule_insns): Fixed code that updates register live information to handle EBBs. (schedule_region): Fixed to handle EBBs. (init_regions): Use extend_regions and check_dead_notes1. * params.def (PARAM_MAX_SCHED_INSN_CONFLICT_DELAY, PARAM_SCHED_SPEC_PROB_CUTOFF): New parameters. * doc/tm.texi (TARGET_SCHED_ADJUST_COST_2, TARGET_SCHED_H_I_D_EXTENDED, TARGET_SCHED_SPECULATE_INSN, TARGET_SCHED_NEEDS_BLOCK_P, TARGET_SCHED_GEN_CHECK, TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD_SPEC, TARGET_SCHED_SET_SCHED_FLAGS): Document. * doc/invoke.texi (max-sched-insn-conflict-delay, sched-spec-prob-cutoff): Document. From-SVN: r112128
2006-03-16 06:27:03 +01:00
get_ebb_head_tail (bbs[i], bbs[i], &head, &tail);
for (; head != NEXT_INSN (tail); head = NEXT_INSN (head))
{
if (NOTE_P (head) || LABEL_P (head)
invoke.texi (-fvar-tracking-assignments): New. gcc/ChangeLog: * doc/invoke.texi (-fvar-tracking-assignments): New. (-fvar-tracking-assignments-toggle): New. (-fdump-final-insns=file): Mark filename as optional. (--param min-nondebug-insn-uid): New. (-gdwarf-@{version}): Mention version 4. * opts.c (common_handle_option): Accept it. * tree-vrp.c (find_assert_locations_1): Skip debug stmts. * regrename.c (regrename_optimize): Drop last. Don't count debug insns as uses. Don't reject change because of debug insn. (do_replace): Reject DEBUG_INSN as chain starter. Take base_regno from the chain starter, and check for inexact matches in DEBUG_INSNS. (scan_rtx_reg): Accept inexact matches in DEBUG_INSNs. (build_def_use): Simplify and fix the marking of DEBUG_INSNs. * sched-ebb.c (schedule_ebbs): Skip boundary debug insns. * fwprop.c (forward_propagate_and_simplify): ...into debug insns. * doc/gimple.texi (is_gimple_debug): New. (gimple_debug_bind_p): New. (is_gimple_call, gimple_assign_cast_p): End sentence with period. * doc/install.texi (bootstrap-debug): More details. (bootstrap-debug-big, bootstrap-debug-lean): Document. (bootstrap-debug-lib): More details. (bootstrap-debug-ckovw): Update. (bootstrap-time): New. * tree-into-ssa.c (mark_def_sites): Skip debug stmts. (insert_phi_nodes_for): Insert debug stmts. (rewrite_stmt): Take iterator. Insert debug stmts. (rewrite_enter_block): Adjust. (maybe_replace_use_in_debug_stmt): New. (rewrite_update_stmt): Use it. (mark_use_interesting): Return early for debug stmts. * tree-ssa-loop-im.c (rewrite_bittest): Propagate DEFs into debug stmts before replacing stmt. (move_computations_stmt): Likewise. * ira-conflicts.c (add_copies): Skip debug insns. * regstat.c (regstat_init_n_sets_and_refs): Discount debug insns. (regstat_bb_compute_ri): Skip debug insns. * tree-ssa-threadupdate.c (redirection_block_p): Skip debug stmts. * tree-ssa-loop-manip.c (find_uses_to_rename_stmt, check_loop_closed_ssa_stmt): Skip debug stmts. * tree-tailcall.c (find_tail_calls): Likewise. * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Likewise. * tree.h (MAY_HAVE_DEBUG_STMTS): New. (build_var_debug_value_stat): Declare. (build_var_debug_value): Define. (target_for_debug_bind): Declare. * reload.c (find_equiv_reg): Skip debug insns. * rtlanal.c (reg_used_between_p): Skip debug insns. (side_effects_p): Likewise. (canonicalize_condition): Likewise. * ddg.c (create_ddg_dep_from_intra_loop_link): Check that non-debug insns never depend on debug insns. (create_ddg_dep_no_link): Likewise. (add_cross_iteration_register_deps): Use ANTI_DEP for debug insns. Don't add inter-loop dependencies for debug insns. (build_intra_loop_deps): Likewise. (create_ddg): Count debug insns. * ddg.h (struct ddg::num_debug): New. (num_backargs): Pair up with previous int field. * diagnostic.c (diagnostic_report_diagnostic): Skip notes on -fcompare-debug-second. * final.c (get_attr_length_1): Skip debug insns. (rest_of_clean-state): Don't dump CFA_RESTORE_STATE. * gcc.c (invoke_as): Call compare-debug-dump-opt. (driver_self_specs): Map -fdump-final-insns to -fdump-final-insns=.. (get_local_tick): New. (compare_debug_dump_opt_spec_function): Test for . argument and compute output name. Compute temp output spec without flag name. Compute -frandom-seed. (OPT): Undef after use. * cfgloopanal.c (num_loop_insns): Skip debug insns. (average_num_loop_insns): Likewise. * params.h (MIN_NONDEBUG_INSN_UID): New. * gimple.def (GIMPLE_DEBUG): New. * ipa-reference.c (scan_stmt_for_static_refs): Skip debug stmts. * auto-inc-dec.c (merge_in_block): Skip debug insns. (merge_in_block): Fix whitespace. * toplev.c (flag_var_tracking): Update comment. (flag_var_tracking_assignments): New. (flag_var_tracking_assignments_toggle): New. (process_options): Don't open final insns dump file if we're not going to write to it. Compute defaults for var_tracking. * df-scan.c (df_insn_rescan_debug_internal): New. (df_uses_record): Handle debug insns. * haifa-sched.c (ready): Initialize n_debug. (contributes_to_priority): Skip debug insns. (dep_list_size): New. (priority): Use it. (rank_for_schedule): Likewise. Schedule debug insns as soon as they're ready. Disregard previous debug insns to make decisions. (queue_insn): Never queue debug insns. (ready_add, ready_remove_first, ready_remove): Count debug insns. (schedule_insn): Don't reject debug insns because of issue rate. (get_ebb_head_tail, no_real_insns_p): Skip boundary debug insns. (queue_to_ready): Skip and discount debug insns. (choose_ready): Let debug insns through. (schedule_block): Check boundary debug insns. Discount debug insns, schedule them early. Adjust whitespace. (set_priorities): Check for boundary debug insns. (add_jump_dependencies): Use dep_list_size. (prev_non_location_insn): New. (check_cfg): Use it. * tree-ssa-loop-ivopts.c (find-interesting_users): Skip debug stmts. (remove_unused_ivs): Reset debug stmts. * modulo-sched.c (const_iteration_count): Skip debug insns. (res_MII): Discount debug insns. (loop_single_full_bb_p): Skip debug insns. (sms_schedule): Likewise. (sms_schedule_by_order): Likewise. (ps_has_conflicts): Likewise. * caller-save.c (refmarker_fn): New. (save_call_clobbered_regs): Replace regs with saved mem in debug insns. (mark_referenced_regs): Take pointer, mark and arg. Adjust. Call refmarker_fn mark for hardregnos. (mark_reg_as_referenced): New. (replace_reg_with_saved_mem): New. * ipa-pure-const.c (check_stmt): Skip debug stmts. * cse.c (cse_insn): Canonicalize debug insns. Skip them when searching back. (cse_extended_basic_block): Skip debug insns. (count_reg_usage): Likewise. (is_dead_reg): New, split out of... (set_live_p): ... here. (insn_live_p): Use it for debug insns. * tree-stdarg.c (check_all_va_list_escapes): Skip debug stmts. (execute_optimize_stdarg): Likewise. * tree-ssa-dom.c (propagate_rhs_into_lhs): Likewise. * tree-ssa-propagate.c (substitute_and_fold): Don't regard changes in debug stmts as changes. * sel-sched.c (moving_insn_creates_bookkeeping_block_p): New. (moveup_expr): Don't move across debug insns. Don't move debug insn if it would create a bookkeeping block. (moveup_expr_cached): Don't use cache for debug insns that are heads of blocks. (compute_av_set_inside_bb): Skip debug insns. (sel_rank_for_schedule): Schedule debug insns first. Remove dead code. (block_valid_for_bookkeeping_p); Support lax searches. (create_block_for_bookkeeping): Adjust block numbers when encountering debug-only blocks. (find_place_for_bookkeeping): Deal with debug-only blocks. (generate_bookkeeping_insn): Accept no place to insert. (remove_temp_moveop_nops): New argument full_tidying. (prepare_place_to_insert): Deal with debug insns. (advance_state_on_fence): Debug insns don't start cycles. (update_boundaries): Take fence as argument. Deal with debug insns. (schedule_expr_on_boundary): No full_tidying on debug insns. (fill_insns): Deal with debug insns. (track_scheduled_insns_and_blocks): Don't count debug insns. (need_nop_to_preserve_insn_bb): New, split out of... (remove_insn_from_stream): ... this. (fur_orig_expr_not_found): Skip debug insns. * rtl.def (VALUE): Move up. (DEBUG_INSN): New. * tree-ssa-sink.c (all_immediate_uses_same_place): Skip debug stmts. (nearest_common_dominator_of_uses): Take debug_stmts argument. Set it if debug stmts are found. (statement_sink_location): Skip debug stmts. Propagate moving defs into debug stmts. * ifcvt.c (first_active_insn): Skip debug insns. (last_active_insns): Likewise. (cond_exec_process_insns): Likewise. (noce_process_if_block): Likewise. (check_cond_move_block): Likewise. (cond_move_convert_if_block): Likewise. (block_jumps_and_fallthru_p): Likewise. (dead_or_predicable): Likewise. * dwarf2out.c (debug_str_hash_forced): New. (find_AT_string): Add comment. (gen_label_for_indirect_string): New. (get_debug_string_label): New. (AT_string_form): Use it. (mem_loc_descriptor): Handle non-TLS symbols. Handle MINUS , DIV, MOD, AND, IOR, XOR, NOT, ABS, NEG, and CONST_STRING. Accept but discard COMPARE, IF_THEN_ELSE, ROTATE, ROTATERT, TRUNCATE and several operations that cannot be represented with DWARF opcodes. (loc_descriptor): Ignore SIGN_EXTEND and ZERO_EXTEND. Require dwarf_version 4 for DW_OP_implicit_value and DW_OP_stack_value. (dwarf2out_var_location): Take during-call mark into account. (output_indirect_string): Update comment. Output if there are label and references. (prune_indirect_string): New. (prune_unused_types): Call it if debug_str_hash_forced. More in dwarf2out.c, from Jakub Jelinek <jakub@redhat.com>: (dw_long_long_const): Remove. (struct dw_val_struct): Change val_long_long type to rtx. (print_die, attr_checksum, same_dw_val_p, loc_descriptor): Adjust for val_long_long change to CONST_DOUBLE rtx from a long hi/lo pair. (output_die): Likewise. Use HOST_BITS_PER_WIDE_INT size of each component instead of HOST_BITS_PER_LONG. (output_loc_operands): Likewise. For const8* assert HOST_BITS_PER_WIDE_INT rather than HOST_BITS_PER_LONG is >= 64. (output_loc_operands_raw): For const8* assert HOST_BITS_PER_WIDE_INT rather than HOST_BITS_PER_LONG is >= 64. (add_AT_long_long): Remove val_hi and val_lo arguments, add val_const_double. (size_of_die): Use HOST_BITS_PER_WIDE_INT size multiplier instead of HOST_BITS_PER_LONG for dw_val_class_long_long. (add_const_value_attribute): Adjust add_AT_long_long caller. Don't handle TLS SYMBOL_REFs. If CONST wraps a constant, tail recurse. (dwarf_stack_op_name): Handle DW_OP_implicit_value and DW_OP_stack_value. (size_of_loc_descr, output_loc_operands, output_loc_operands_raw): Handle DW_OP_implicit_value. (extract_int): Move prototype earlier. (mem_loc_descriptor): For SUBREG punt if inner mode size is wider than DWARF2_ADDR_SIZE. Handle SIGN_EXTEND and ZERO_EXTEND by DW_OP_shl and DW_OP_shr{a,}. Handle EQ, NE, GT, GE, LT, LE, GTU, GEU, LTU, LEU, SMIN, SMAX, UMIN, UMAX, SIGN_EXTRACT, ZERO_EXTRACT. (loc_descriptor): Compare mode size with DWARF2_ADDR_SIZE instead of Pmode size. (loc_descriptor): Add MODE argument. Handle CONST_INT, CONST_DOUBLE, CONST_VECTOR, CONST, LABEL_REF and SYMBOL_REF if mode != VOIDmode, attempt to handle other expressions. Don't handle TLS SYMBOL_REFs. (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor_from_tree_1): Adjust loc_descriptor callers. (add_location_or_const_value_attribute): Likewise. For single location loc_lists attempt to use add_const_value_attribute for constant decls. Add DW_AT_const_value even if NOTE_VAR_LOCATION is VAR_LOCATION with CONSTANT_P or CONST_STRING in its expression. * cfgbuild.c (inside_basic_block_p): Handle debug insns. (control_flow_insn_p): Likewise. * tree-parloops.c (eliminate_local_variables_stmt): Handle debug stmt. (separate_decls_in_region_debug_bind): New. (separate_decls_in_region): Process debug bind stmts afterwards. * recog.c (verify_changes): Handle debug insns. (extract_insn): Likewise. (peephole2_optimize): Skip debug insns. * dse.c (scan_insn): Skip debug insns. * sel-sched-ir.c (return_nop_to_pool): Take full_tidying argument. Pass it on. (setup_id_for_insn): Handle debug insns. (maybe_tidy_empty_bb): Adjust whitespace. (tidy_control_flow): Skip debug insns. (sel_remove_insn): Adjust for debug insns. (sel_estimate_number_of_insns): Skip debug insns. (create_insn_rtx_from_pattern): Handle debug insns. (create_copy_of_insn_rtx): Likewise. * sel-sched-.h (sel_bb_end): Declare. (sel_bb_empty_or_nop_p): New. (get_all_loop_exits): Use it. (_eligible_successor_edge_p): Likewise. (return_nop_to_pool): Adjust. * tree-eh.c (tre_empty_eh_handler_p): Skip debug stmts. * ira-lives.c (process_bb_node_lives): Skip debug insns. * gimple-pretty-print.c (dump_gimple_debug): New. (dump_gimple_stmt): Use it. (dump_bb_header): Skip gimple debug stmts. * regmove.c (optimize_reg_copy_1): Discount debug insns. (fixup_match_2): Likewise. (regmove_backward_pass): Likewise. Simplify combined replacement. Handle debug insns. * function.c (instantiate_virtual_regs): Handle debug insns. * function.h (struct emit_status): Add x_cur_debug_insn_uid. * print-rtl.h: Include cselib.h. (print_rtx): Print VALUEs. Split out and recurse for VAR_LOCATIONs. * df.h (df_inns_rescan_debug_internal): Declare. * gcse.c (alloc_hash_table): Estimate n_insns. (cprop_insn): Don't regard debug insns as changes. (bypass_conditional_jumps): Skip debug insns. (one_pre_gcse_pass): Adjust. (one_code_hoisting_pass): Likewise. (compute_ld_motion_mems): Skip debug insns. (one_cprop_pass): Adjust. * tree-if-conv.c (tree_if_convert_stmt): Reset debug stmts. (if_convertible_stmt_p): Handle debug stmts. * init-regs.c (initialize_uninitialized_regs): Skip debug insns. * tree-vect-loop.c (vect_is_simple_reduction): Skip debug stmts. * ira-build.c (create_bb_allocnos): Skip debug insns. * tree-flow-inline.h (has_zero_uses): Discount debug stmts. (has_single_use): Likewise. (single_imm_use): Likewise. (num_imm_uses): Likewise. * tree-ssa-phiopt.c (empty_block_p): Skip debug stmts. * tree-ssa-coalesce.c (build_ssa_conflict_graph): Skip debug stmts. (create_outofssa_var_map): Likewise. * lower-subreg.c (adjust_decomposed_uses): New. (resolve_debug): New. (decompose_multiword_subregs): Use it. * tree-dfa.c (find_referenced_vars): Skip debug stmts. * emit-rtl.c: Include params.h. (cur_debug_insn_uid): Define. (set_new_first_and_last_insn): Set cur_debug_insn_uid too. (copy_rtx_if_shared_1): Handle debug insns. (reset_used_flags): Likewise. (set_used_flags): LIkewise. (get_max_insn_count): New. (next_nondebug_insn): New. (prev_nondebug_insn): New. (make_debug_insn_raw): New. (emit_insn_before_noloc): Handle debug insns. (emit_jump_insn_before_noloc): Likewise. (emit_call_insn_before_noloc): Likewise. (emit_debug_insn_before_noloc): New. (emit_insn_after_noloc): Handle debug insns. (emit_jump_insn_after_noloc): Likewise. (emit_call_insn_after_noloc): Likewise. (emit_debug_insn_after_noloc): Likewise. (emit_insn_after): Take loc from earlier non-debug insn. (emit_jump_insn_after): Likewise. (emit_call_insn_after): Likewise. (emit_debug_insn_after_setloc): New. (emit_debug_insn_after): New. (emit_insn_before): Take loc from later non-debug insn. (emit_jump_insn_before): Likewise. (emit_call_insn_before): Likewise. (emit_debug_insn_before_setloc): New. (emit_debug_insn_before): New. (emit_insn): Handle debug insns. (emit_debug_insn): New. (emit_jump_insn): Handle debug insns. (emit_call_insn): Likewise. (emit): Likewise. (init_emit): Take min-nondebug-insn-uid into account. Initialize cur_debug_insn_uid. (emit_copy_of_insn_after): Handle debug insns. * cfgexpand.c (gimple_assign_rhs_to_tree): Do not overwrite location of single rhs in place. (maybe_dump_rtl_for_gimple_stmt): Dump lineno. (floor_sdiv_adjust): New. (cell_sdiv_adjust): New. (cell_udiv_adjust): New. (round_sdiv_adjust): New. (round_udiv_adjust): New. (wrap_constant): Moved from cselib. (unwrap_constant): New. (expand_debug_expr): New. (expand_debug_locations): New. (expand_gimple_basic_block): Drop hiding redeclaration. Expand debug bind stmts. (gimple_expand_cfg): Expand debug locations. * cselib.c: Include tree-pass.h. (struct expand_value_data): New. (cselib_record_sets_hook): New. (PRESERVED_VALUE_P, LONG_TERM_PRESERVED_VALUE_P): New. (cselib_clear_table): Move, and implemnet in terms of... (cselib_reset_table_with_next_value): ... this. (cselib_get_next_unknown_value): New. (discard_useless_locs): Don't discard preserved values. (cselib_preserve_value): New. (cselib_preserved_value_p): New. (cselib_preserve_definitely): New. (cselib_clear_preserve): New. (cselib_preserve_only_values): New. (new_cselib_val): Take rtx argument. Dump it in details. (cselib_lookup_mem): Adjust. (expand_loc): Take regs_active in struct. Adjust. Silence dumps unless details are requested. (cselib_expand_value_rtx_cb): New. (cselib_expand_value_rtx): Rename and reimplment in terms of... (cselib_expand_value_rtx_1): ... this. Adjust. Silence dumps without details. Copy more subregs. Try to resolve values using a callback. Wrap constants. (cselib_subst_to_values): Adjust. (cselib_log_lookup): New. (cselib_lookup): Call it. (cselib_invalidate_regno): Don't count preserved values as useless. (cselib_invalidate_mem): Likewise. (cselib_record_set): Likewise. (struct set): Renamed to cselib_set, moved to cselib.h. (cselib_record_sets): Adjust. Call hook. (cselib_process_insn): Reset table when it would be cleared. (dump_cselib_val): New. (dump_cselib_table): New. * tree-cfgcleanup.c (tree_forwarded_block_p): Skip debug stmts. (remove_forwarder_block): Support moving debug stmts. * cselib.h (cselib_record_sets_hook): Declare. (cselib_expand_callback): New type. (cselib_expand_value_rtx_cb): Declare. (cselib_reset_table_with_next_value): Declare. (cselib_get_next_unknown_value): Declare. (cselib_preserve_value): Declare. (cselib_preserved_value_p): Declare. (cselib_preserve_only_values): Declare. (dump_cselib_table): Declare. * cfgcleanup.c (flow_find_cross_jump): Skip debug insns. (try_crossjump_to_edge): Likewise. (delete_unreachable_blocks): Remove dominant GIMPLE blocks after dominated blocks when debug stmts are present. * simplify-rtx.c (delegitimize_mem_from_attrs): New. * tree-ssa-live.c (remove_unused_locals): Skip debug stmts. (set_var_live_on_entry): Likewise. * loop-invariant.c (find_invariants_bb): Skip debug insns. * cfglayout.c (curr_location, last_location): Make static. (set_curr_insn_source_location): Don't avoid bouncing. (get_curr_insn_source_location): New. (get_curr_insn_block): New. (duplicate_insn_chain): Handle debug insns. * tree-ssa-forwprop.c (forward_propagate_addr_expr): Propagate into debug stmts. * common.opt (fcompare-debug): Move to sort order. (fdump-unnumbered-links): Likewise. (fvar-tracking-assignments): New. (fvar-tracking-assignments-toggle): New. * tree-ssa-dce.c (mark_stmt_necessary): Don't mark blocks because of debug stmts. (mark_stmt_if_obviously_necessary): Mark debug stmts. (eliminate_unnecessary_stmts): Walk dominated blocks before dominators. * tree-ssa-ter.c (find_replaceable_in_bb): Skip debug stmts. * ira.c (memref_used_between_p): Skip debug insns. (update_equiv_regs): Likewise. * sched-deps.c (sd_lists_size): Accept empty list. (sd_init_insn): Mark debug insns. (sd_finish_insn): Unmark them. (sd_add_dep): Reject non-debug deps on debug insns. (fixup_sched_groups): Give debug insns group treatment. Skip debug insns. (sched_analyze_reg): Don't mark debug insns for sched before call. (sched_analyze_2): Handle debug insns. (sched_analyze_insn): Compute next non-debug insn. Handle debug insns. (deps_analyze_insn): Handle debug insns. (deps_start_bb): Skip debug insns. (init_deps): Initialize last_debug_insn. * tree-ssa.c (target_for_debug_bind): New. (find_released_ssa_name): New. (propagate_var_def_into_debug_stmts): New. (propagate_defs_into_debug_stmts): New. (verify_ssa): Skip debug bind stmts without values. (warn_uninialized_vars): Skip debug stmts. * target-def.h (TARGET_DELEGITIMIZE_ADDRESS): Set default. * rtl.c (rtx_equal_p_cb): Handle VALUEs. (rtx_equal_p): Likewise. * ira-costs.c (scan_one_insn): Skip debug insns. (process_bb_node_for_hard_reg_moves): Likewise. * rtl.h (DEBUG_INSN_P): New. (NONDEBUG_INSN_P): New. (MAY_HAVE_DEBUG_INSNS): New. (INSN_P): Accept debug insns. (RTX_FRAME_RELATED_P): Likewise. (INSN_DELETED_P): Likewise (PAT_VAR_LOCATION_DECL): New. (PAT_VAR_LOCATION_LOC): New. (PAT_VAR_OCATION_STATUS): New. (NOTE_VAR_LOCATION_DECL): Reimplement. (NOTE_VAR_LOCATION_LOC): Likewise. (NOTE_VAR_LOCATION_STATUS): Likewise. (INSN_VAR_LOCATION): New. (INSN_VAR_LOCATION_DECL): New. (INSN_VAR_LOCATION_LOC): New. (INSN_VAR_LOCATION_STATUS): New. (gen_rtx_UNKNOWN_VAR_LOC): New. (VAR_LOC_UNKNOWN_P): New. (NOTE_DURING_CALL_P): New. (SCHED_GROUP_P): Accept debug insns. (emit_debug_insn_before): Declare. (emit_debug_insn_before_noloc): Declare. (emit_debug_insn_beore_setloc): Declare. (emit_debug_insn_after): Declare. (emit_debug_insn_after_noloc): Declare. (emit_debug_insn_after_setloc): Declare. (emit_debug_insn): Declare. (make_debug_insn_raw): Declare. (prev_nondebug_insn): Declare. (next_nondebug_insn): Declare. (delegitimize_mem_from_attrs): Declare. (get_max_insn_count): Declare. (wrap_constant): Declare. (unwrap_constant): Declare. (get_curr_insn_source_location): Declare. (get_curr_insn_block): Declare. * tree-inline.c (insert_debug_decl_map): New. (processing_debug_stmt): New. (remap_decl): Don't create new mappings in debug stmts. (remap_gimple_op_r): Don't add references in debug stmts. (copy_tree_body_r): Likewise. (remap_gimple_stmt): Handle debug bind stmts. (copy_bb): Skip debug stmts. (copy_edges_for_bb): Likewise. (copy_debug_stmt): New. (copy_debug_stmts): New. (copy_body): Copy debug stmts at the end. (insert_init_debug_bind): New. (insert_init_stmt): Take id. Skip and emit debug stmts. (setup_one_parameter): Remap variable earlier, register debug mapping. (estimate_num_insns): Skip debug stmts. (expand_call_inline): Preserve debug_map. (optimize_inline_calls): Check for no debug_stmts left-overs. (unsave_expr_now): Preserve debug_map. (copy_gimple_seq_and_replace_locals): Likewise. (tree_function_versioning): Check for no debug_stmts left-overs. Init and destroy debug_map as needed. Split edges unconditionally. (build_duplicate_type): Init and destroy debug_map as needed. * tree-inline.h: Include gimple.h instead of pointer-set.h. (struct copy_body_data): Add debug_stmts and debug_map. * sched-int.h (struct ready_list): Add n_debug. (struct deps): Add last_debug_insn. (DEBUG_INSN_SCHED_P): New. (BOUNDARY_DEBUG_INSN_P): New. (SCHEDULE_DEBUG_INSN_P): New. (sd_iterator_cond): Accept empty list. * combine.c (create_log_links): Skip debug insns. (combine_instructions): Likewise. (cleanup_auto_inc_dec): New. From Jakub Jelinek: Make sure the return value is always unshared. (struct rtx_subst_pair): New. (auto_adjust_pair): New. (propagate_for_debug_subst): New. (propagate_for_debug): New. (try_combine): Skip debug insns. Propagate removed defs into debug insns. (next_nonnote_nondebug_insn): New. (distribute_notes): Use it. Skip debug insns. (distribute_links): Skip debug insns. * tree-outof-ssa.c (set_location_for_edge): Likewise. * resource.c (mark_target_live_regs): Likewise. * var-tracking.c: Include cselib.h and target.h. (enum micro_operation_type): Add MO_VAL_USE, MO_VAL_LOC, and MO_VAL_SET. (micro_operation_type_name): New. (enum emit_note_where): Add EMIT_NOTE_AFTER_CALL_INSN. (struct micro_operation_def): Update comments. (decl_or_value): New type. Use instead of decls. (struct emit_note_data_def): Add vars. (struct attrs_def): Use decl_or_value. (struct variable_tracking_info_def): Add permp, flooded. (struct location_chain_def): Update comment. (struct variable_part_def): Use decl_or_value. (struct variable_def): Make var_part a variable length array. (valvar_pool): New. (scratch_regs): New. (cselib_hook_called): New. (dv_is_decl_p): New. (dv_is_value_p): New. (dv_as_decl): New. (dv_as_value): New. (dv_as_opaque): New. (dv_onepart_p): New. (dv_pool): New. (IS_DECL_CODE): New. (check_value_is_not_decl): New. (dv_from_decl): New. (dv_from_value): New. (dv_htab_hash): New. (variable_htab_hash): Use it. (variable_htab_eq): Support values. (variable_htab_free): Free from the right pool. (attrs_list_member, attrs_list_insert): Use decl_or_value. (attrs_list_union): Adjust. (attrs_list_mpdv_union): New. (tie_break_pointers): New. (canon_value_cmp): New. (unshare_variable): Return possibly-modified slot. (vars_copy_1): Adjust. (var_reg_decl_set): Adjust. Split out of... (var_reg_set): ... this. (get_init_value): Adjust. (var_reg_delete_and_set): Adjust. (var_reg_delete): Adjust. (var_regno_delete): Adjust. (var_mem_decl_set): Split out of... (var_mem_set): ... this. (var_mem_delete_and_set): Adjust. (var_mem_delete): Adjust. (val_store): New. (val_reset): New. (val_resolve): New. (variable_union): Adjust. Speed up merge of 1-part vars. (variable_canonicalize): Use unshared slot. (VALUED_RECURSED_INTO): New. (find_loc_in_1pdv): New. (struct dfset_merge): New. (insert_into_intersection): New. (intersect_loc_chains): New. (loc_cmp): New. (canonicalize_loc_order_check): New. (canonicalize_values_mark): New. (canonicalize_values_star): New. (variable_merge_over_cur): New. (variable_merge_over_src): New. (dataflow_set_merge): New. (dataflow_set_equiv_regs): New. (remove_duplicate_values): New. (struct dfset_post_merge): New. (variable_post_merge_new_vals): New. (variable_post_merge_perm_vals): New. (dataflow_post_merge_adjust): New. (find_mem_expr_in_1pdv): New. (dataflow_set_preserve_mem_locs): New. (dataflow_set_remove_mem_locs): New. (dataflow_set_clear_at_call): New. (onepart_variable_different_p): New. (variable_different_p): Use it. (dataflow_set_different_1): Adjust. Make detailed dump more verbose. (track_expr_p): Add need_rtl parameter. Don't generate rtl if not needed. (track_loc_p): Pass it true. (struct count_use_info): New. (find_use_val): New. (replace_expr_with_values): New. (log_op_type): New. (use_type): New, partially split out of... (count_uses): ... this. Count new micro-ops. (count_uses_1): Adjust. (count_stores): Adjust. (count_with_sets): New. (VAL_NEEDS_RESOLUTION): New. (VAL_HOLDS_TRACK_EXPR): New. (VAL_EXPR_IS_COPIED): New. (VAL_EXPR_IS_CLOBBERED): New. (add_uses): Adjust. Generate new micro-ops. (add_uses_1): Adjust. (add_stores): Generate new micro-ops. (add_with_sets): New. (find_src_status): Adjust. (find_src_set_src): Adjust. (compute_bb_dataflow): Use dataflow_set_clear_at_call. Handle new micro-ops. Canonicalize value equivalances. (vt_find_locations): Compute total size of hash tables for dumping. Perform merge for var-tracking-assignments. Don't disregard single-block loops. (dump_attrs_list): Handle decl_or_value. (dump_variable): Take variable. Deal with decl_or_value. (dump_variable_slot): New. (dump_vars): Use it. (dump_dataflow_sets): Adjust. (set_slot_part): New, extended to support one-part variables after splitting out of... (set_variable_part): ... this. (clobber_slot_part): New, split out of... (clobber_variable_part): ... this. (delete_slot_part): New, split out of... (delete_variable_part): .... this. (check_wrap_constant): New. (vt_expand_loc_callback): New. (vt_expand_loc): New. (emit_note_insn_var_location): Adjust. Handle values. Handle EMIT_NOTE_AFTER_CALL_INSN. (emit_notes_for_differences_1): Adjust. Handle values. (emit_notes_for_differences_2): Likewise. (emit_notes_for_differences): Adjust. (emit_notes_in_bb): Take pointer to set. Emit AFTER_CALL_INSN notes. Adjust. Handle new micro-ops. (vt_add_function_parameters): Adjust. Create and bind values. (vt_initialize): Adjust. Initialize scratch_regs and valvar_pool, flooded and perm.. Initialize and use cselib. Log operations. Move some code to count_with_sets and add_with_sets. (delete_debug_insns): New. (vt_debug_insns_local): New. (vt_finalize): Release permp, valvar_pool, scratch_regs. Finish cselib. (var_tracking_main): If var-tracking-assignments is enabled but var-tracking isn't, delete debug insns and leave. Likewise if we exceed limits or fail the stack adjustments tests, and after all var-tracking processing. More in var-tracking, from Jakub Jelinek <jakub@redhat.com>: (dataflow_set): Add traversed_vars. (value_chain, const_value_chain): New typedefs. (value_chain_pool, value_chains): New variables. (value_chain_htab_hash, value_chain_htab_eq, add_value_chain, add_value_chains, add_cselib_value_chains, remove_value_chain, remove_value_chains, remove_cselib_value_chains): New functions. (shared_hash_find_slot_unshare_1, shared_hash_find_slot_1, shared_hash_find_slot_noinsert_1, shared_hash_find_1): New static inlines. (shared_hash_find_slot_unshare, shared_hash_find_slot, shared_hash_find_slot_noinsert, shared_hash_find): Update. (dst_can_be_shared): New variable. (unshare_variable): Unshare set->vars if shared, use shared_hash_*. Clear dst_can_be_shared. If set->traversed_vars is non-NULL and different from set->vars, look up slot again instead of using the passed in slot. (dataflow_set_init): Initialize traversed_vars. (variable_union): Use shared_hash_*. Use initially NO_INSERT lookup if set->vars is shared. Don't keep slot cleared before calling unshare_variable. Unshare set->vars if needed. Adjust unshare_variable callers. Clear dst_can_be_shared if needed. Even ->refcount == 1 vars must be unshared if set->vars is shared and var needs to be modified. (dataflow_set_union): Set traversed_vars during canonicalization. (VALUE_CHANGED, DECL_CHANGED): Define. (set_dv_changed, dv_changed_p): New static inlines. (track_expr_p): Clear DECL_CHANGED. (dump_dataflow_sets): Set it. (variable_was_changed): Call set_dv_changed. (emit_note_insn_var_location): Likewise. (changed_variables_stack): New variable. (check_changed_vars_1, check_changed_vars_2): New functions. (emit_notes_for_changes): Do nothing if changed_variables is empty. Traverse changed_variables with check_changed_vars_1, call check_changed_vars_2 on each changed_variables_stack entry. (emit_notes_in_bb): Add SET argument. Just clear it at the beginning, use it instead of local &set, don't destroy it at the end. (vt_emit_notes): Call dataflow_set_clear early on all VTI(bb)->out sets, never use them, instead use emit_notes_in_bb computed set, dataflow_set_clear also VTI(bb)->in when we are done with the basic block. Initialize changed_variables_stack, free it afterwards. If ENABLE_CHECKING verify that after noting differences to an empty set value_chains hash table is empty. (vt_initialize): Initialize value_chains and value_chain_pool. (vt_finalize): Delete value_chains htab, free value_chain_pool. (variable_tracking_main): Call dump_dataflow_sets before calling vt_emit_notes, not after it. * tree-flow.h (propagate_defs_into_debug_stmts): Declare. (propagate_var_def_into_debug_stmts): Declare. * df-problems.c (df_lr_bb_local_compute): Skip debug insns. (df_set_note): Reject debug insns. (df_whole_mw_reg_dead_p): Take added_notes_p argument. Don't add notes to debug insns. (df_note_bb_compute): Adjust. Likewise. (df_simulate_uses): Skip debug insns. (df_simulate_initialize_backwards): Likewise. * reg-stack.c (subst_stack_regs_in_debug_insn): New. (subst_stack_regs_pat): Reject debug insns. (convert_regs_1): Handle debug insns. * Makefile.in (TREE_INLINE_H): Take pointer-set.h from GIMPLE_H. (print-rtl.o): Depend on cselib.h. (cselib.o): Depend on TREE_PASS_H. (var-tracking.o): Depend on cselib.h and TARGET_H. * sched-rgn.c (rgn_estimate_number_of_insns): Discount debug insns. (init_ready_list): Skip boundary debug insns. (add_branch_dependences): Skip debug insns. (free_block_dependencies): Check for blocks with only debug insns. (compute_priorities): Likewise. * gimple.c (gss_for_code): Handle GIMPLE_DEBUG. (gimple_build_with_ops_stat): Take subcode as unsigned. Adjust all callers. (gimple_build_debug_bind_stat): New. (empty_body_p): Skip debug stmts. (gimple_has_side_effects): Likewise. (gimple_rhs_has_side_effects): Likewise. * gimple.h (enum gimple_debug_subcode, GIMPLE_DEBUG_BIND): New. (gimple_build_debug_bind_stat): Declare. (gimple_build_debug_bind): Define. (is_gimple_debug): New. (gimple_debug_bind_p): New. (gimple_debug_bind_get_var): New. (gimple_debug_bind_get_value): New. (gimple_debug_bind_get_value_ptr): New. (gimple_debug_bind_set_var): New. (gimple_debug_bind_set_value): New. (GIMPLE_DEBUG_BIND_NOVALUE): New internal temporary macro. (gimple_debug_bind_reset_value): New. (gimple_debug_bind_has_value_p): New. (gsi_next_nondebug): New. (gsi_prev_nondebug): New. (gsi_start_nondebug_bb): New. (gsi_last_nondebug_bb): New. * sched-vis.c (print_pattern): Handle VAR_LOCATION. (print_insn): Handle DEBUG_INSN. * tree-cfg.c (remove_bb): Walk stmts backwards. Let loc of first insn prevail. (first_stmt): Skip debug stmts. (first_non_label_stmt): Likewise. (last_stmt): Likewise. (has_zero_uses_1): New. (single_imm_use_1): New. (verify_gimple_debug): New. (verify_types_in_gimple_stmt): Handle debug stmts. (verify_stmt): Likewise. (debug_loop_num): Skip debug stmts. (remove_edge_and_dominated_blocks): Remove dominators last. * tree-ssa-reasssoc.c (rewrite_expr_tree): Propagate into debug stmts. (linearize_expr): Likewise. * config/i386/i386.c (ix86_delegitimize_address): Call default implementation. * config/ia64/ia64.c (ia64_safe_itanium_class): Handle debug insns. (group_barrier_needed): Skip debug insns. (emit_insn_group_barriers): Likewise. (emit_all_insn_group_barriers): Likewise. (ia64_variable_issue): Handle debug insns. (ia64_dfa_new_cycle): Likewise. (final_emit_insn_group_barriers): Skip debug insns. (ia64_dwarf2out_def_steady_cfa): Take frame argument. Don't def cfa without frame. (process_set): Likewise. (process_for_unwind_directive): Pass frame on. * config/rs6000/rs6000.c (TARGET_DELEGITIMIZE_ADDRESS): Define. (rs6000_delegitimize_address): New. (rs6000_debug_adjust_cost): Handle debug insns. (is_microcoded_insn): Likewise. (is_cracked_insn): Likewise. (is_nonpipeline_insn): Likewise. (insn_must_be_first_in_group): Likewise. (insn_must_be_last_in_group): Likewise. (force_new_group): Likewise. * cfgrtl.c (rtl_split_block): Emit INSN_DELETED note if block contains only debug insns. (rtl_merge_blocks): Skip debug insns. (purge_dead_edges): Likewise. (rtl_block_ends_with_call_p): Skip debug insns. * dce.c (deletable_insn_p): Handle VAR_LOCATION. (mark_reg_dependencies): Skip debug insns. * params.def (PARAM_MIN_NONDEBUG_INSN_UID): New. * tree-ssanames.c (release_ssa_name): Propagate def into debug stmts. * tree-ssa-threadedge.c (record_temporary_equivalences_from_stmts): Skip debug stmts. * regcprop.c (replace_oldest_value_addr): Skip debug insns. (replace_oldest_value_mem): Use ALL_REGS for debug insns. (copyprop_hardreg_forward_1): Handle debug insns. * reload1.c (reload): Skip debug insns. Replace unassigned pseudos in debug insns with their equivalences. (eliminate_regs_in_insn): Skip debug insns. (emit_input_reload_insns): Skip debug insns at first, adjust them later. * tree-ssa-operands.c (add_virtual_operand): Reject debug stmts. (get_indirect_ref_operands): Pass opf_no_vops on. (get_expr_operands): Likewise. Skip debug stmts. (parse_ssa_operands): Scan debug insns with opf_no_vops. gcc/testsuite/ChangeLog: * gcc.dg/guality/guality.c: New. * gcc.dg/guality/guality.h: New. * gcc.dg/guality/guality.exp: New. * gcc.dg/guality/example.c: New. * lib/gcc-dg.exp (cleanup-dump): Remove .gk files. (cleanup-saved-temps): Likewise, .gkd files too. gcc/cp/ChangeLog: * cp-tree.h (TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS): New. * cp-lang.c (cxx_dwarf_name): Pass it. * error.c (count_non_default_template_args): Take flags as argument. Adjust all callers. Skip counting of default arguments if the new flag is given. ChangeLog: * Makefile.tpl (BUILD_CONFIG): Default to bootstrap-debug. * Makefile.in: Rebuilt. contrib/ChangeLog: * compare-debug: Look for .gkd files and compare them. config/ChangeLog: * bootstrap-debug.mk: Add comments. * bootstrap-debug-big.mk: New. * bootstrap-debug-lean.mk: New. * bootstrap-debug-ckovw.mk: Add comments. * bootstrap-debug-lib.mk: Drop CFLAGS for stages. Use -g0 for TFLAGS in stage1. Drop -fvar-tracking-assignments-toggle. From-SVN: r151312
2009-09-02 04:42:21 +02:00
|| (INSN_P (head) && (DEBUG_INSN_P (head) || JUMP_P (head))))
continue;
empty_bb = false;
break;
}
if (! empty_bb)
{
free (bbs);
return false;
}
}
free (bbs);
return true;
}
/* Dump file:line from INSN's location info to dump_file. */
static void
dump_insn_location (rtx_insn *insn)
{
if (dump_file && INSN_HAS_LOCATION (insn))
{
expanded_location xloc = insn_location (insn);
fprintf (dump_file, " %s:%i", xloc.file, xloc.line);
}
}
/* A simple loop from SMS point of view; it is a loop that is composed of
either a single basic block or two BBs - a header and a latch. */
#define SIMPLE_SMS_LOOP_P(loop) ((loop->num_nodes < 3 ) \
&& (EDGE_COUNT (loop->latch->preds) == 1) \
&& (EDGE_COUNT (loop->latch->succs) == 1))
/* Return true if the loop is in its canonical form and false if not.
i.e. SIMPLE_SMS_LOOP_P and have one preheader block, and single exit. */
static bool
tree-vrp.c (execute_vrp): Do not pass dump argument to. * tree-vrp.c (execute_vrp): Do not pass dump argument to. loop_optimizer_init and loop_optimizer_finalize * tree-ssa-sink.c (execute_sink_code): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init, tree_ssa_loop_done): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Ditto. * sched-ebb.c: Include output.h. (schedule_ebbs): Do not use dump argument. * value-prof.h (struct profile_hooks): Remove profile_dump_file. * loop.c (loop_dump_stream): Removed. (loop_optimize, rest_of_handle_loop_optimize): Do not use dump argument. (scan_loop, move_movables, find_and_verify_loops, mark_loop_jump, emit_prefetch_instructions, loop_bivs_find, loop_bivs_check, final_biv_value, loop_biv_eliminable_p, loop_givs_rescan, loop_iterations, strength_reduce, record_biv, record_giv, final_giv_value, check_final_value, check_ext_dependent_givs, combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems, try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use dump_file instead of loop_dump_stream. * ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call argument dump_file. * reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use dump argument. * flow.c (life_analysis, rest_of_handle_life): Ditto. * haifa-sched.c: Include output.h (schedule_insns, sched_init): Do not use dump argument. * mode-switching.c (optimize_mode_switching): Ditto. * modulo-sched.c (stats_file): Removed. (print_node_sched_params): Do not call argument dump_file. (sms_schedule_by_order, loop_canon_p, sms_schedule, rest_of_handle_sms): Do not use dump argument. Use dump_file instead of stats_file. * cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not use dump argument. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize, rtl_loop_init, rtl_loop_done): Ditto. * global.c (global_alloc, rest_of_handle_global_alloc): Ditto. * predict.c (combine_predictions_for_bb, tree_estimate_probability): Ditto. * recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto. * lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto. * regmove.c (fixup_match_1, fixup_match_2, regmove_optimize, rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto. * emit-rtl.c (renumber_insns): Ditto. * cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr, expand_gimple_basic_block, tree_expand_cfg): Ditto. * regclass.c (regclass): Ditto. * tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts, remove_ssa_form, rewrite_out_of_ssa): Ditto. * reg-stack.c (compensate_edge, compensate_edges, convert_regs_1, convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs): Ditto. * sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto. * local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file to regclass. * gcse.c (gcse_file, debug_stderr): Removed. (gcse_main, bypass_jumps, rest_of_handle_jump_bypass, rest_of_handle_gcse): Do not use dump argument. (cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets, one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb, pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass, compute_code_hoist_vbeinout, compute_code_hoist_data, one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores, compute_store_table, build_store_vectors, insert_insn_start_bb, insert_store, remove_reachable_equiv_notes, replace_store_insn, store_motion): Use dump_file instead of gcse_file. * ipa-type-escape.c (type_escape_execute): Remove debugging comments. * profile.c (profile_dump_file): Removed. (branch_prob): Use dump_file instead of profile_dump_file. * ipa.c (cgraph_remove_unreachable_nodes): Do not call argument dump_file. * tree-ssa-copy.c (dump_copy_of): Ditto. * rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass dump file to life_analysis. * bt-load.c (branch_target_load_optimize): Ditto. * cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to renumber_insns. * rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs, regclass, dbr_schedule): Declaration changed. * sched-int.h (sched_init): Declaration changed. * tree-profile.c (tree_profile_dump_file): Removed. (tree_profile_hooks): Removed profile_dump_file hook. * rtl-profile (rtl_profile_dump_file): Removed. (rtl_profile_hooks): emoved profile_dump_file hook. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * c-gimplify.c (c_genericize): Do not call local variable dump_file. * tree-cfg.c (build_tree_cfg): Ditto. * Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency. * basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm): Declaration changed. * config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to life_analysis and schedule_insns. * config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to life_analysis. * config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to dbr_schedule. * config/mips/mips.c (mips_reorg): Ditto. * config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to schedule_ebbs. From-SVN: r110656
2006-02-06 19:20:47 +01:00
loop_canon_p (struct loop *loop)
{
tree-loop-linear.c (gather_interchange_stats, [...]): Use loop_depth and loop_outer accessor functions. * tree-loop-linear.c (gather_interchange_stats, try_interchange_loops): Use loop_depth and loop_outer accessor functions. * tree-ssa-loop-im.c (outermost_invariant_loop, set_level, determine_invariantness_stmt, move_computations_stmt): Ditto. * cfgloopmanip.c (fix_bb_placement, fix_loop_placement, remove_path, add_loop, loopify, unloop, fix_loop_structure): Ditto. * tree-ssa-loop-manip.c (find_uses_to_rename_use): Ditto. * tree-scalar-evolution.c (interpret_loop_phi, compute_scalar_evolution_in_loop, analyze_scalar_evolution_in_loop, instantiate_parameters_1, scev_const_prop): Ditto. * cfghooks.c (make_forwarder_block): Ditto. * cfgloopanal.c (mark_irreducible_loops, mark_loop_exit_edges): Ditto. * modulo-sched.c (loop_canon_p): Ditto. * tree-vectorizer.c (slpeel_tree_duplicate_loop_to_edge_cfg, slpeel_can_duplicate_loop_p): Ditto. * lambda-code.c (invariant_in_loop_and_outer_loops): Ditto. * tree-cfg.c (tree_duplicate_sese_region): Ditto. * cfgloop.c (flow_loop_dump, flow_loop_nodes_find, rescan_loop_exit, cancel_loop, verify_loop_structure): Ditto. (flow_loop_nested_p, superloop_at_depth, flow_loop_free, add_bb_to_loop, remove_bb_from_loops, find_common_loop): Use the superloops vector instead of "pred" array. (establish_preds): Take father loop as an argument. Initialize the superloops vector. (flow_loop_tree_node_add): Pass father loop to establish_preds. Do not initialize loop->outer. (flow_loop_tree_node_remove): Truncate the superloops vector. * cfgloop.h (struct loop): Removed field "outer", fields "depth" and "pred" merged to "superloops" vector. (loop_depth, loop_outer): New. (fel_init): Use loop_outer. From-SVN: r124619
2007-05-11 17:52:01 +02:00
if (loop->inner || !loop_outer (loop))
{
if (dump_file)
fprintf (dump_file, "SMS loop inner or !loop_outer\n");
return false;
}
tree-loop-linear.c (linear_transform_loops): Use single_exit accessor functions. * tree-loop-linear.c (linear_transform_loops): Use single_exit accessor functions. * tree-ssa-loop-niter.c (loop_only_exit_p): Ditto. * cfgloopmanip.c (update_single_exits_after_duplication, update_single_exit_for_duplicated_loop, loop_version): Ditto. * tree-scalar-evolution.c (get_loop_exit_condition, get_exit_conditions_rec, loop_closed_phi_def, number_of_iterations_in_loop, scev_const_prop): Ditto. * tree-ssa-loop-ivopts.c (single_dom_exit): Ditto. * modulo-sched.c (generate_prolog_epilog, loop_canon_p, sms_schedule): Ditto. * tree-ssa-loop-ivcanon.c (canonicalize_loop_induction_variables): Ditto. * tree-vectorizer.c (slpeel_update_phis_for_duplicate_loop, slpeel_update_phi_nodes_for_guard1, slpeel_update_phi_nodes_for_guard2, slpeel_make_loop_iterate_ntimes, slpeel_tree_duplicate_loop_to_edge_cfg, slpeel_can_duplicate_loop_p, slpeel_verify_cfg_after_peeling, slpeel_tree_peel_loop_to_edge): Ditto. * tree-if-conv.c (if_convertible_loop_p): Ditto. * tree-vect-analyze.c (vect_analyze_operations, vect_stmt_relevant_p, vect_analyze_loop_form): Ditto. * lambda-code.c (lambda_loopnest_to_gcc_loopnest, exit_phi_for_loop_p, can_convert_to_perfect_nest, perfect_nestify): Ditto. * tree-vect-transform.c (vect_create_epilog_for_reduction, vect_update_ivs_after_vectorizer, vect_do_peeling_for_loop_bound, vect_transform_loop): Ditto. * cfgloop.c (mark_single_exit_loops, verify_loop_structure): Ditto. (single_exit, set_single_exit): New functions. * cfgloop.h (struct loop): Rename single_exit field to single_exit_. (single_exit, set_single_exit): Declare. * doc/loop.texi: Undocument single_exit field. Document single_exit accessor function. From-SVN: r119075
2006-11-22 00:54:16 +01:00
if (!single_exit (loop))
{
if (dump_file)
{
rtx_insn *insn = BB_END (loop->header);
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: 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-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.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. * 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. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: 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-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.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-live.h: 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-operands.h: 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-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.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-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
fprintf (dump_file, "SMS loop many exits");
Integrate lexical block into source_location. gcc: 2012-09-19 Dehao Chen <dehao@google.com> * toplev.c (general_init): Init block_locations. * tree.c (tree_set_block): New. (tree_block): Change to use LOCATION_BLOCK. * tree.h (TREE_SET_BLOCK): New. * final.c (reemit_insn_block_notes): Change to use LOCATION_BLOCK. (final_start_function): Likewise. * input.c (expand_location_1): Likewise. * input.h (LOCATION_LOCUS): New. (LOCATION_BLOCK): New. (IS_UNKNOWN_LOCATION): New. * fold-const.c (expr_location_or): Change to use new location. * reorg.c (emit_delay_sequence): Likewise. (try_merge_delay_insns): Likewise. * modulo-sched.c (dump_insn_location): Likewise. * lto-streamer-out.c (lto_output_location_bitpack): Likewise. * lto-cgraph.c (output_node_opt_summary): Likewise. * jump.c (rtx_renumbered_equal_p): Likewise. * ifcvt.c (noce_try_move): Likewise. (noce_try_store_flag): Likewise. (noce_try_store_flag_constants): Likewise. (noce_try_addcc): Likewise. (noce_try_store_flag_mask): Likewise. (noce_try_cmove): Likewise. (noce_try_cmove_arith): Likewise. (noce_try_minmax): Likewise. (noce_try_abs): Likewise. (noce_try_sign_mask): Likewise. (noce_try_bitop): Likewise. (noce_process_if_block): Likewise. (cond_move_process_if_block): Likewise. (find_cond_trap): Likewise. * ipa-prop.c (ipa_set_jf_constant): Likewise. (ipa_write_jump_function): Likewise. * dwarf2out.c (add_src_coords_attributes): Likewise. * expr.c (expand_expr_real): Likewise. * tree-parloops.c (create_loop_fn): Likewise. * recog.c (peep2_attempt): Likewise. * function.c (free_after_compilation): Likewise. (expand_function_end): Likewise. (set_insn_locations): Likewise. (thread_prologue_and_epilogue_insns): Likewise. * print-rtl.c (print_rtx): Likewise. * profile.c (branch_prob): Likewise. * trans-mem.c (ipa_tm_scan_irr_block): Likewise. * gimplify.c (gimplify_call_expr): Likewise. * except.c (duplicate_eh_regions_1): Likewise. * emit-rtl.c (try_split): Likewise. (make_insn_raw): Likewise. (make_debug_insn_raw): Likewise. (make_jump_insn_raw): Likewise. (make_call_insn_raw): Likewise. (emit_pattern_after_setloc): Likewise. (emit_pattern_after): Likewise. (emit_debug_insn_after): Likewise. (emit_pattern_before): Likewise. (emit_insn_before_setloc): Likewise. (emit_jump_insn_before): Likewise. (emit_call_insn_before_setloc): Likewise. (emit_call_insn_before): Likeise. (emit_debug_insn_before_setloc): Likewise. (emit_copy_of_insn_after): Likewise. (insn_locators_alloc): Remove. (insn_locators_finalize): Remove. (insn_locators_free): Remove. (set_curr_insn_source_location): Remove. (get_curr_insn_source_location): Remove. (set_curr_insn_block): Remove. (get_curr_insn_block): Remove. (locator_scope): Remove. (insn_scope): Change to use new location. (locator_location): Remove. (insn_line): Change to use new location. (locator_file): Remove. (insn_file): Change to use new location. (locator_eq): Remove. (insn_locations_init): New. (insn_locations_finalize): New. (set_curr_insn_location): New. (curr_insn_location): New. * cfgexpand.c (gimple_assign_rhs_to_tree): Change to use new location. (expand_gimple_cond): Likewise. (expand_call_stmt): Likewise. (expand_gimple_stmt_1): Likewise. (expand_gimple_basic_block): Likewise. (construct_exit_block): Likewise. (gimple_expand_cfg): Likewise. * cfgcleanup.c (try_forward_edges): Likewise. * tree-ssa-live.c (remove_unused_scope_block_p): Likewise. (dump_scope_block): Likewise. (remove_unused_locals): Likewise. * rtl.c (rtx_equal_p_cb): Likewise. (rtx_equal_p): Likewise. * rtl.h (XUINT): New. (INSN_LOCATOR): Remove. (CURR_INSN_LOCATION): Remove. (INSN_LOCATION): New. (INSN_HAS_LOCATION): New. * tree-inline.c (remap_gimple_op_r): Change to use new location. (copy_tree_body_r): Likewise. (copy_phis_for_bb): Likewise. (expand_call_inline): Likewise. * tree-streamer-in.c (lto_input_ts_exp_tree_pointers): Likewise. * tree-streamer-out.c (write_ts_decl_minimal_tree_pointers): Likewise. * gimple-streamer-out.c (output_gimple_stmt): Likewise. * combine.c (try_combine): Likewise. * tree-outof-ssa.c (set_location_for_edge): Likewise. (insert_partition_copy_on_edge): Likewise. (insert_value_copy_on_edge): Likewise. (insert_rtx_to_part_on_edge): Likewise. (insert_part_to_rtx_on_edge): Likewise. * basic-block.h (edge_def): Remove field. * gimple.h (gimple_statement_base): Remove field. (gimple_bb): Change to use new location. (gimple_set_block): Likewise. (gimple_has_location): Likewise. * tree-cfg.c (make_cond_expr_edges): Likewise. (make_goto_expr_edges): Likewise. (gimple_can_merge_blocks_p): Likewise. (move_stmt_op): Likewise. (move_block_to_fn): Likewise. * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/i386/i386.c (x86_output_mi_thunk): Likewise. * config/tilegx/tilegx.c (tilegx_output_mi_thunk): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/ia64/ia64.c (ia64_output_mi_thunk): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/score/score.c (score_output_mi_thunk): Likewise. * config/tilepro/tilepro.c (tilepro_asm_output_mi_thunk): Likewise. * config/mips/mips.c (mips_output_mi_thunk): Likewise. * cfgrtl.c (unique_locus_on_edge_between_p): Likewise. (unique_locus_on_edge_between_p): Likewise. (emit_nop_for_unique_locus_between): Likewise. (force_nonfallthru_and_redirect): Likewise. (fixup_reorder_chain): Likewise. (cfg_layout_merge_blocks): Likewise. * stmt.c (emit_case_nodes): Likewise. gcc/lto: 2012-09-19 Dehao Chen <dehao@google.com> * lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field. libcpp: 2012-09-19 Dehao Chen <dehao@google.com> * include/line-map.h (MAX_SOURCE_LOCATION): New value. (location_adhoc_data_fini): New. (get_combined_adhoc_loc): New. (get_data_from_adhoc_loc): New. (get_location_from_adhoc_loc): New. (location_adhoc_data_map): New. (COMBINE_LOCATION_DATA): New. (IS_ADHOC_LOC): New. (expanded_location): New field. (line_maps): New field. * line-map.c (location_adhoc_data): New. (location_adhoc_data_hash): New. (location_adhoc_data_eq): New. (location_adhoc_data_update): New. (get_combined_adhoc_loc): New. (get_data_from_adhoc_loc): New. (get_location_from_adhoc_loc): New. (location_adhoc_data_init): New. (location_adhoc_data_fini): New. (linemap_init): Initialize location_adhoc_data. (linemap_lookup): Change to use new location. (linemap_ordinary_map_lookup): Likewise. (linemap_macro_map_lookup): Likewise. (linemap_macro_map_loc_to_def_point): Likewise. (linemap_macro_map_loc_unwind_toward_spel): Likewise. (linemap_get_expansion_line): Likewise. (linemap_get_expansion_filename): Likewise. (linemap_location_in_system_header_p): Likewise. (linemap_location_from_macro_expansion_p): Likewise. (linemap_macro_loc_to_spelling_point): Likewise. (linemap_macro_loc_to_def_point): Likewise. (linemap_macro_loc_to_exp_point): Likewise. (linemap_resolve_location): Likewise. (linemap_unwind_toward_expansion): Likewise. (linemap_unwind_to_first_non_reserved_loc): Likewise. (linemap_expand_location): Likewise. (linemap_dump_location): Likewise. (linemap_line_start): Likewise. From-SVN: r191494
2012-09-19 21:56:42 +02:00
dump_insn_location (insn);
fprintf (dump_file, "\n");
}
return false;
}
if (! SIMPLE_SMS_LOOP_P (loop) && ! loop_single_full_bb_p (loop))
{
if (dump_file)
{
rtx_insn *insn = BB_END (loop->header);
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: 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-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.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. * 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. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: 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-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.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-live.h: 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-operands.h: 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-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.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-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
fprintf (dump_file, "SMS loop many BBs.");
Integrate lexical block into source_location. gcc: 2012-09-19 Dehao Chen <dehao@google.com> * toplev.c (general_init): Init block_locations. * tree.c (tree_set_block): New. (tree_block): Change to use LOCATION_BLOCK. * tree.h (TREE_SET_BLOCK): New. * final.c (reemit_insn_block_notes): Change to use LOCATION_BLOCK. (final_start_function): Likewise. * input.c (expand_location_1): Likewise. * input.h (LOCATION_LOCUS): New. (LOCATION_BLOCK): New. (IS_UNKNOWN_LOCATION): New. * fold-const.c (expr_location_or): Change to use new location. * reorg.c (emit_delay_sequence): Likewise. (try_merge_delay_insns): Likewise. * modulo-sched.c (dump_insn_location): Likewise. * lto-streamer-out.c (lto_output_location_bitpack): Likewise. * lto-cgraph.c (output_node_opt_summary): Likewise. * jump.c (rtx_renumbered_equal_p): Likewise. * ifcvt.c (noce_try_move): Likewise. (noce_try_store_flag): Likewise. (noce_try_store_flag_constants): Likewise. (noce_try_addcc): Likewise. (noce_try_store_flag_mask): Likewise. (noce_try_cmove): Likewise. (noce_try_cmove_arith): Likewise. (noce_try_minmax): Likewise. (noce_try_abs): Likewise. (noce_try_sign_mask): Likewise. (noce_try_bitop): Likewise. (noce_process_if_block): Likewise. (cond_move_process_if_block): Likewise. (find_cond_trap): Likewise. * ipa-prop.c (ipa_set_jf_constant): Likewise. (ipa_write_jump_function): Likewise. * dwarf2out.c (add_src_coords_attributes): Likewise. * expr.c (expand_expr_real): Likewise. * tree-parloops.c (create_loop_fn): Likewise. * recog.c (peep2_attempt): Likewise. * function.c (free_after_compilation): Likewise. (expand_function_end): Likewise. (set_insn_locations): Likewise. (thread_prologue_and_epilogue_insns): Likewise. * print-rtl.c (print_rtx): Likewise. * profile.c (branch_prob): Likewise. * trans-mem.c (ipa_tm_scan_irr_block): Likewise. * gimplify.c (gimplify_call_expr): Likewise. * except.c (duplicate_eh_regions_1): Likewise. * emit-rtl.c (try_split): Likewise. (make_insn_raw): Likewise. (make_debug_insn_raw): Likewise. (make_jump_insn_raw): Likewise. (make_call_insn_raw): Likewise. (emit_pattern_after_setloc): Likewise. (emit_pattern_after): Likewise. (emit_debug_insn_after): Likewise. (emit_pattern_before): Likewise. (emit_insn_before_setloc): Likewise. (emit_jump_insn_before): Likewise. (emit_call_insn_before_setloc): Likewise. (emit_call_insn_before): Likeise. (emit_debug_insn_before_setloc): Likewise. (emit_copy_of_insn_after): Likewise. (insn_locators_alloc): Remove. (insn_locators_finalize): Remove. (insn_locators_free): Remove. (set_curr_insn_source_location): Remove. (get_curr_insn_source_location): Remove. (set_curr_insn_block): Remove. (get_curr_insn_block): Remove. (locator_scope): Remove. (insn_scope): Change to use new location. (locator_location): Remove. (insn_line): Change to use new location. (locator_file): Remove. (insn_file): Change to use new location. (locator_eq): Remove. (insn_locations_init): New. (insn_locations_finalize): New. (set_curr_insn_location): New. (curr_insn_location): New. * cfgexpand.c (gimple_assign_rhs_to_tree): Change to use new location. (expand_gimple_cond): Likewise. (expand_call_stmt): Likewise. (expand_gimple_stmt_1): Likewise. (expand_gimple_basic_block): Likewise. (construct_exit_block): Likewise. (gimple_expand_cfg): Likewise. * cfgcleanup.c (try_forward_edges): Likewise. * tree-ssa-live.c (remove_unused_scope_block_p): Likewise. (dump_scope_block): Likewise. (remove_unused_locals): Likewise. * rtl.c (rtx_equal_p_cb): Likewise. (rtx_equal_p): Likewise. * rtl.h (XUINT): New. (INSN_LOCATOR): Remove. (CURR_INSN_LOCATION): Remove. (INSN_LOCATION): New. (INSN_HAS_LOCATION): New. * tree-inline.c (remap_gimple_op_r): Change to use new location. (copy_tree_body_r): Likewise. (copy_phis_for_bb): Likewise. (expand_call_inline): Likewise. * tree-streamer-in.c (lto_input_ts_exp_tree_pointers): Likewise. * tree-streamer-out.c (write_ts_decl_minimal_tree_pointers): Likewise. * gimple-streamer-out.c (output_gimple_stmt): Likewise. * combine.c (try_combine): Likewise. * tree-outof-ssa.c (set_location_for_edge): Likewise. (insert_partition_copy_on_edge): Likewise. (insert_value_copy_on_edge): Likewise. (insert_rtx_to_part_on_edge): Likewise. (insert_part_to_rtx_on_edge): Likewise. * basic-block.h (edge_def): Remove field. * gimple.h (gimple_statement_base): Remove field. (gimple_bb): Change to use new location. (gimple_set_block): Likewise. (gimple_has_location): Likewise. * tree-cfg.c (make_cond_expr_edges): Likewise. (make_goto_expr_edges): Likewise. (gimple_can_merge_blocks_p): Likewise. (move_stmt_op): Likewise. (move_block_to_fn): Likewise. * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/i386/i386.c (x86_output_mi_thunk): Likewise. * config/tilegx/tilegx.c (tilegx_output_mi_thunk): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/ia64/ia64.c (ia64_output_mi_thunk): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/score/score.c (score_output_mi_thunk): Likewise. * config/tilepro/tilepro.c (tilepro_asm_output_mi_thunk): Likewise. * config/mips/mips.c (mips_output_mi_thunk): Likewise. * cfgrtl.c (unique_locus_on_edge_between_p): Likewise. (unique_locus_on_edge_between_p): Likewise. (emit_nop_for_unique_locus_between): Likewise. (force_nonfallthru_and_redirect): Likewise. (fixup_reorder_chain): Likewise. (cfg_layout_merge_blocks): Likewise. * stmt.c (emit_case_nodes): Likewise. gcc/lto: 2012-09-19 Dehao Chen <dehao@google.com> * lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field. libcpp: 2012-09-19 Dehao Chen <dehao@google.com> * include/line-map.h (MAX_SOURCE_LOCATION): New value. (location_adhoc_data_fini): New. (get_combined_adhoc_loc): New. (get_data_from_adhoc_loc): New. (get_location_from_adhoc_loc): New. (location_adhoc_data_map): New. (COMBINE_LOCATION_DATA): New. (IS_ADHOC_LOC): New. (expanded_location): New field. (line_maps): New field. * line-map.c (location_adhoc_data): New. (location_adhoc_data_hash): New. (location_adhoc_data_eq): New. (location_adhoc_data_update): New. (get_combined_adhoc_loc): New. (get_data_from_adhoc_loc): New. (get_location_from_adhoc_loc): New. (location_adhoc_data_init): New. (location_adhoc_data_fini): New. (linemap_init): Initialize location_adhoc_data. (linemap_lookup): Change to use new location. (linemap_ordinary_map_lookup): Likewise. (linemap_macro_map_lookup): Likewise. (linemap_macro_map_loc_to_def_point): Likewise. (linemap_macro_map_loc_unwind_toward_spel): Likewise. (linemap_get_expansion_line): Likewise. (linemap_get_expansion_filename): Likewise. (linemap_location_in_system_header_p): Likewise. (linemap_location_from_macro_expansion_p): Likewise. (linemap_macro_loc_to_spelling_point): Likewise. (linemap_macro_loc_to_def_point): Likewise. (linemap_macro_loc_to_exp_point): Likewise. (linemap_resolve_location): Likewise. (linemap_unwind_toward_expansion): Likewise. (linemap_unwind_to_first_non_reserved_loc): Likewise. (linemap_expand_location): Likewise. (linemap_dump_location): Likewise. (linemap_line_start): Likewise. From-SVN: r191494
2012-09-19 21:56:42 +02:00
dump_insn_location (insn);
fprintf (dump_file, "\n");
}
return false;
}
return true;
}
/* If there are more than one entry for the loop,
make it one by splitting the first entry edge and
redirecting the others to the new BB. */
static void
canon_loop (struct loop *loop)
{
edge e;
edge_iterator i;
/* Avoid annoying special cases of edges going to exit
block. */
Eliminate ENTRY_BLOCK_PTR and EXIT_BLOCK_PTR macros gcc/ * basic-block.h (ENTRY_BLOCK_PTR_FOR_FUNCTION): Rename macro to... (EXIT_BLOCK_PTR_FOR_FUNCTION): ...this. (ENTRY_BLOCK_PTR_FOR_FN): Renamed macro to... (EXIT_BLOCK_PTR_FOR_FN): ...this. (ENTRY_BLOCK_PTR): Eliminate macro as work towards making uses of cfun be explicit. (EXIT_BLOCK_PTR): Likewise. (FOR_ALL_BB): Rework for now to eliminate use of "ENTRY_BLOCK_PTR". (FOR_ALL_BB_FN): Update for renaming of "ENTRY_BLOCK_PTR_FOR_FUNCTION" to "ENTRY_BLOCK_PTR_FOR_FN". * cfg.c (init_flow): Likewise. (check_bb_profile): Likewise. * cfganal.c (pre_and_rev_post_order_compute_fn): Likewise. * cfgcleanup.c (walk_to_nondebug_insn): Likewise. * cfghooks.c (account_profile_record): Likewise. * cfgloop.c (init_loops_structure): Likewise. * cgraphbuild.c (record_eh_tables): Likewise. (compute_call_stmt_bb_frequency): Likewise. * ipa-inline-analysis.c (compute_bb_predicates): Likewise. * lto-streamer-in.c (input_cfg): Likewise. * predict.c (maybe_hot_frequency_p): Likewise. * tree-cfg.c (init_empty_tree_cfg_for_function): Likewise. * tree-inline.c (initialize_cfun): Likewise. (copy_cfg_body): Likewise. (copy_body): Likewise. (tree_function_versioning): Likewise. * bb-reorder.c (add_labels_and_missing_jumps): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (duplicate_computed_gotos): Remove usage of EXIT_BLOCK_PTR macro. (find_rarely_executed_basic_blocks_and_crossing_edges): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (connect_traces): Likewise. (rest_of_handle_reorder_blocks): Remove usage of EXIT_BLOCK_PTR macro. (bb_to_key): Remove usage of ENTRY_BLOCK_PTR macro. (fix_crossing_conditional_branches): Remove usage of EXIT_BLOCK_PTR macro. (find_traces_1_round): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (fix_up_fall_thru_edges): Remove usage of EXIT_BLOCK_PTR macro. (find_traces): Remove usage of ENTRY_BLOCK_PTR macro. (fix_up_crossing_landing_pad): Remove usage of EXIT_BLOCK_PTR macro. (rotate_loop): Likewise. * bt-load.c (migrate_btr_def): Remove usage of ENTRY_BLOCK_PTR macro. * cfg.c (clear_aux_for_edges): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (alloc_aux_for_edges): Likewise. (clear_bb_flags): Remove usage of ENTRY_BLOCK_PTR macro. (cached_make_edge): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (compact_blocks): Likewise. (clear_edges): Likewise. * cfganal.c (single_pred_before_succ_order): Remove usage of ENTRY_BLOCK_PTR macro. (bitmap_union_of_succs): Remove usage of EXIT_BLOCK_PTR macro. (bitmap_union_of_preds): Remove usage of ENTRY_BLOCK_PTR macro. (bitmap_intersection_of_succs): Remove usage of EXIT_BLOCK_PTR macro. (bitmap_intersection_of_preds): Remove usage of ENTRY_BLOCK_PTR macro. (inverted_post_order_compute): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (compute_dominance_frontiers_1): Remove usage of ENTRY_BLOCK_PTR macro. (post_order_compute): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (connect_infinite_loops_to_exit): Remove usage of EXIT_BLOCK_PTR macro. (remove_fake_edges): Remove usage of ENTRY_BLOCK_PTR macro. (add_noreturn_fake_exit_edges): Remove usage of EXIT_BLOCK_PTR macro. (find_pdom): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (remove_fake_exit_edges): Remove usage of EXIT_BLOCK_PTR macro. (verify_edge_list): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (print_edge_list): Likewise. (create_edge_list): Likewise. (find_unreachable_blocks): Remove usage of ENTRY_BLOCK_PTR macro. (mark_dfs_back_edges): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * cfgbuild.c (find_bb_boundaries): Remove usage of ENTRY_BLOCK_PTR macro. (find_many_sub_basic_blocks): Remove usage of EXIT_BLOCK_PTR macro. (make_edges): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * cfgcleanup.c (delete_unreachable_blocks): Likewise. (try_optimize_cfg): Likewise. (try_head_merge_bb): Remove usage of EXIT_BLOCK_PTR macro. (try_crossjump_to_edge): Remove usage of ENTRY_BLOCK_PTR macro. (try_crossjump_bb): Remove usage of EXIT_BLOCK_PTR macro. (merge_blocks_move): Remove usage of ENTRY_BLOCK_PTR macro. (outgoing_edges_match): Remove usage of EXIT_BLOCK_PTR macro. (try_forward_edges): Likewise. (try_simplify_condjump): Likewise. * cfgexpand.c (gimple_expand_cfg): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (construct_exit_block): Remove usage of EXIT_BLOCK_PTR macro. (construct_init_block): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (expand_gimple_basic_block): Remove usage of EXIT_BLOCK_PTR macro. (expand_gimple_tailcall): Likewise. * cfghooks.c (can_duplicate_block_p): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (tidy_fallthru_edges): Likewise. (verify_flow_info): Likewise. * cfgloop.c (flow_bb_inside_loop_p): Likewise. (num_loop_branches): Remove usage of EXIT_BLOCK_PTR macro. (disambiguate_multiple_latches): Remove usage of ENTRY_BLOCK_PTR macro. (get_loop_exit_edges): Remove usage of EXIT_BLOCK_PTR macro. (bb_loop_header_p): Remove usage of ENTRY_BLOCK_PTR macro. (get_loop_body_in_bfs_order): Remove usage of EXIT_BLOCK_PTR macro. (get_loop_body_in_dom_order): Likewise. (get_loop_body): Likewise. * cfgloopanal.c (mark_irreducible_loops): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * cfgloopmanip.c (create_preheader): Remove usage of ENTRY_BLOCK_PTR macro. (remove_path): Remove usage of EXIT_BLOCK_PTR macro. (fix_bb_placement): Likewise. * cfgrtl.c (rtl_block_empty_p): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (rtl_can_remove_branch_p): Remove usage of EXIT_BLOCK_PTR macro. (cfg_layout_split_edge): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (rtl_flow_call_edges_add): Remove usage of EXIT_BLOCK_PTR macro. (cfg_layout_can_merge_blocks_p): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (cfg_layout_redirect_edge_and_branch): Remove usage of ENTRY_BLOCK_PTR macro. (fixup_fallthru_exit_predecessor): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (fixup_reorder_chain): Likewise. (relink_block_chain): Likewise. (cfg_layout_delete_block): Remove usage of EXIT_BLOCK_PTR macro. (rtl_verify_bb_layout): Remove usage of ENTRY_BLOCK_PTR macro. (cfg_layout_duplicate_bb): Remove usage of EXIT_BLOCK_PTR macro. (force_one_exit_fallthru): Likewise. (rtl_verify_fallthru): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (rtl_verify_edges): Likewise. (commit_edge_insertions): Likewise. (commit_one_edge_insertion): Likewise. (rtl_split_edge): Likewise. (force_nonfallthru_and_redirect): Likewise. (outof_cfg_layout_mode): Remove usage of EXIT_BLOCK_PTR macro. (skip_insns_after_block): Likewise. (fixup_partition_crossing): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (purge_dead_edges): Remove usage of EXIT_BLOCK_PTR macro. (rtl_can_merge_blocks): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (contains_no_active_insn_p): Likewise. (emit_insn_at_entry): Remove usage of ENTRY_BLOCK_PTR macro. (entry_of_function): Likewise. (last_bb_in_partition): Remove usage of EXIT_BLOCK_PTR macro. (fixup_new_cold_bb): Likewise. (patch_jump_insn): Likewise. (try_redirect_by_replacing_jump): Likewise. (block_label): Likewise. (could_fall_through): Likewise. (can_fallthru): Likewise. * cgraphbuild.c (cgraph_rebuild_references): Remove usage of ENTRY_BLOCK_PTR macro. (rebuild_cgraph_edges): Likewise. * cgraphunit.c (init_lowered_empty_function): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (expand_thunk): Remove usage of EXIT_BLOCK_PTR macro. * combine.c (get_last_value): Remove usage of ENTRY_BLOCK_PTR macro. (distribute_links): Remove usage of EXIT_BLOCK_PTR macro. (get_last_value_validate): Remove usage of ENTRY_BLOCK_PTR macro. (try_combine): Remove usage of EXIT_BLOCK_PTR macro. (reg_num_sign_bit_copies_for_combine): Remove usage of ENTRY_BLOCK_PTR macro. (reg_nonzero_bits_for_combine): Likewise. (set_nonzero_bits_and_sign_copies): Likewise. (combine_instructions): Likewise. * cprop.c (one_cprop_pass): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (bypass_conditional_jumps): Likewise. (bypass_block): Remove usage of EXIT_BLOCK_PTR macro. (find_implicit_sets): Likewise. (cprop_jump): Likewise. * cse.c (cse_cc_succs): Likewise. (cse_find_path): Likewise. * df-problems.c (df_lr_confluence_0): Likewise. * df-scan.c (df_entry_block_defs_collect): Remove usage of ENTRY_BLOCK_PTR macro. (df_exit_block_uses_collect): Remove usage of EXIT_BLOCK_PTR macro. * dominance.c (iterate_fix_dominators): Remove usage of ENTRY_BLOCK_PTR macro. (calc_idoms): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (determine_dominators_for_sons): Remove usage of ENTRY_BLOCK_PTR macro. (calc_dfs_tree): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (prune_bbs_to_update_dominators): Remove usage of ENTRY_BLOCK_PTR macro. (calc_dfs_tree_nonrec): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * domwalk.c (cmp_bb_postorder): Likewise. * dse.c (dse_step1): Remove usage of EXIT_BLOCK_PTR macro. * except.c (finish_eh_generation): Remove usage of ENTRY_BLOCK_PTR macro. (sjlj_emit_function_enter): Likewise. * final.c (compute_alignments): Likewise. * function.c (thread_prologue_and_epilogue_insns): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (reposition_prologue_and_epilogue_notes): Remove usage of EXIT_BLOCK_PTR macro. (convert_jumps_to_returns): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (regno_clobbered_at_setjmp): Remove usage of ENTRY_BLOCK_PTR macro. (next_block_for_reg): Remove usage of EXIT_BLOCK_PTR macro. * gcse.c (hoist_code): Remove usage of ENTRY_BLOCK_PTR macro. (update_bb_reg_pressure): Remove usage of EXIT_BLOCK_PTR macro. (compute_code_hoist_vbeinout): Likewise. (should_hoist_expr_to_dom): Remove usage of ENTRY_BLOCK_PTR macro. (pre_expr_reaches_here_p_work): Likewise. * gimple-iterator.c (gsi_commit_edge_inserts): Likewise. (gimple_find_edge_insert_loc): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * gimple-ssa-strength-reduction.c (slsr_process_phi): Remove usage of ENTRY_BLOCK_PTR macro. * graph.c (draw_cfg_nodes_for_loop): Remove usage of EXIT_BLOCK_PTR macro. * graphite-clast-to-gimple.c (translate_clast_user): Remove usage of ENTRY_BLOCK_PTR macro. * graphite-scop-detection.c (build_scops): Likewise. (create_sese_edges): Remove usage of EXIT_BLOCK_PTR macro. (scopdet_basic_block_info): Remove usage of ENTRY_BLOCK_PTR macro. * haifa-sched.c (restore_bb_notes): Remove usage of EXIT_BLOCK_PTR macro. (unlink_bb_notes): Likewise. (create_check_block_twin): Likewise. (init_before_recovery): Likewise. (sched_extend_bb): Likewise. (priority): Likewise. * hw-doloop.c (reorder_loops): Likewise. (discover_loop): Likewise. * ifcvt.c (dead_or_predicable): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (find_if_case_1): Remove usage of EXIT_BLOCK_PTR macro. (block_has_only_trap): Likewise. (cond_exec_find_if_block): Likewise. (merge_if_block): Likewise. * ipa-inline-analysis.c (param_change_prob): Remove usage of ENTRY_BLOCK_PTR macro. (record_modified): Likewise. * ipa-pure-const.c (execute_warn_function_noreturn): Remove usage of EXIT_BLOCK_PTR macro. (local_pure_const): Likewise. * ipa-split.c (split_function): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (find_split_points): Likewise. (consider_split): Likewise. (find_return_bb): Remove usage of EXIT_BLOCK_PTR macro. (verify_non_ssa_vars): Remove usage of ENTRY_BLOCK_PTR macro. * ira-build.c (ira_loop_tree_body_rev_postorder): Likewise. * ira-color.c (print_loop_title): Remove usage of EXIT_BLOCK_PTR macro. * ira-emit.c (entered_from_non_parent_p): Remove usage of ENTRY_BLOCK_PTR macro. (ira_emit): Remove usage of EXIT_BLOCK_PTR macro. * ira-int.h (ira_assert): Remove usage of ENTRY_BLOCK_PTR macro. * ira.c (split_live_ranges_for_shrink_wrap): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * lcm.c (compute_rev_insert_delete): Remove usage of ENTRY_BLOCK_PTR macro. (compute_nearerout): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (compute_farthest): Likewise. (compute_available): Likewise. (compute_insert_delete): Remove usage of EXIT_BLOCK_PTR macro. (compute_laterin): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (compute_earliest): Likewise. (compute_antinout_edge): Likewise. * loop-iv.c (simplify_using_initial_values): Remove usage of ENTRY_BLOCK_PTR macro. * loop-unswitch.c (unswitch_loop): Remove usage of EXIT_BLOCK_PTR macro. * lra-assigns.c (find_hard_regno_for): Remove usage of ENTRY_BLOCK_PTR macro. * lra-constraints.c (lra_inheritance): Remove usage of EXIT_BLOCK_PTR macro. * lra-lives.c (lra_create_live_ranges): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * lra.c (has_nonexceptional_receiver): Remove usage of EXIT_BLOCK_PTR macro. * lto-streamer-in.c (input_function): Remove usage of ENTRY_BLOCK_PTR macro. * lto-streamer-out.c (output_cfg): Likewise. * mcf.c (adjust_cfg_counts): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (create_fixup_graph): Remove usage of ENTRY_BLOCK_PTR macro. * mode-switching.c (optimize_mode_switching): Likewise. (create_pre_exit): Remove usage of EXIT_BLOCK_PTR macro. * modulo-sched.c (rest_of_handle_sms): Likewise. (canon_loop): Likewise. * omp-low.c (build_omp_regions): Remove usage of ENTRY_BLOCK_PTR macro. * postreload-gcse.c (eliminate_partially_redundant_loads): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * predict.c (rebuild_frequencies): Remove usage of ENTRY_BLOCK_PTR macro. (propagate_freq): Remove usage of EXIT_BLOCK_PTR macro. (estimate_bb_frequencies): Remove usage of ENTRY_BLOCK_PTR macro. (tree_estimate_probability_bb): Remove usage of EXIT_BLOCK_PTR macro. (expensive_function_p): Remove usage of ENTRY_BLOCK_PTR macro. (tree_bb_level_predictions): Remove usage of EXIT_BLOCK_PTR macro. (counts_to_freqs): Remove usage of ENTRY_BLOCK_PTR macro. (apply_return_prediction): Remove usage of EXIT_BLOCK_PTR macro. (estimate_loops): Remove usage of ENTRY_BLOCK_PTR macro. (gimple_predict_edge): Likewise. (probably_never_executed): Likewise. * profile.c (find_spanning_tree): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (branch_prob): Likewise. (compute_branch_probabilities): Likewise. (compute_frequency_overlap): Remove usage of ENTRY_BLOCK_PTR macro. (is_inconsistent): Remove usage of EXIT_BLOCK_PTR macro. (read_profile_edge_counts): Remove usage of ENTRY_BLOCK_PTR macro. (set_bb_counts): Likewise. (correct_negative_edge_counts): Likewise. (get_exec_counts): Likewise. (instrument_values): Likewise. (instrument_edges): Likewise. * reg-stack.c (convert_regs): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (compensate_edges): Remove usage of ENTRY_BLOCK_PTR macro. (convert_regs_exit): Remove usage of EXIT_BLOCK_PTR macro. (convert_regs_entry): Remove usage of ENTRY_BLOCK_PTR macro. (reg_to_stack): Likewise. * regs.h (REG_N_SETS): Likewise. * reload.c (find_dummy_reload): Likewise. (combine_reloads): Likewise. (push_reload): Likewise. * reload1.c (has_nonexceptional_receiver): Remove usage of EXIT_BLOCK_PTR macro. * resource.c (mark_target_live_regs): Remove usage of ENTRY_BLOCK_PTR macro. (find_basic_block): Likewise. * sched-ebb.c (ebb_add_block): Remove usage of EXIT_BLOCK_PTR macro. (schedule_ebbs): Likewise. * sched-int.h (sel_sched_p): Likewise. * sched-rgn.c (compute_dom_prob_ps): Remove usage of ENTRY_BLOCK_PTR macro. (rgn_add_block): Remove usage of EXIT_BLOCK_PTR macro. (haifa_find_rgns): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (propagate_deps): Remove usage of EXIT_BLOCK_PTR macro. (extend_rgns): Likewise. (find_single_block_region): Likewise. * sel-sched-ir.c (sel_remove_loop_preheader): Remove usage of ENTRY_BLOCK_PTR macro. (setup_nop_and_exit_insns): Remove usage of EXIT_BLOCK_PTR macro. (sel_create_recovery_block): Likewise. (bb_ends_ebb_p): Likewise. (sel_bb_end): Likewise. (sel_bb_head): Likewise. (free_lv_sets): Likewise. (init_lv_sets): Likewise. (tidy_control_flow): Likewise. (maybe_tidy_empty_bb): Likewise. * sel-sched-ir.h (_succ_iter_cond): Likewise. (_succ_iter_start): Likewise. (sel_bb_empty_or_nop_p): Likewise. (get_loop_exit_edges_unique_dests): Likewise. (inner_loop_header_p): Likewise. * sel-sched.c (create_block_for_bookkeeping): Likewise. (find_block_for_bookkeeping): Likewise. * store-motion.c (remove_reachable_equiv_notes): Likewise. (insert_store): Likewise. * trans-mem.c (ipa_tm_transform_clone): Remove usage of ENTRY_BLOCK_PTR macro. (tm_memopt_compute_available): Remove usage of EXIT_BLOCK_PTR macro. (ipa_tm_scan_irr_function): Remove usage of ENTRY_BLOCK_PTR macro. (gate_tm_init): Likewise. (tm_region_init): Likewise. * tree-cfg.c (execute_fixup_cfg): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (execute_warn_function_return): Remove usage of EXIT_BLOCK_PTR macro. (split_critical_edges): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (print_loops): Remove usage of ENTRY_BLOCK_PTR macro. (move_sese_region_to_fn): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (gimple_redirect_edge_and_branch): Remove usage of ENTRY_BLOCK_PTR macro. (gimple_verify_flow_info): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (remove_edge_and_dominated_blocks): Remove usage of EXIT_BLOCK_PTR macro. (make_edges): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (gimple_flow_call_edges_add): Remove usage of EXIT_BLOCK_PTR macro. (make_blocks): Remove usage of ENTRY_BLOCK_PTR macro. (build_gimple_cfg): Likewise. (gimple_duplicate_bb): Remove usage of EXIT_BLOCK_PTR macro. (gimple_can_merge_blocks_p): Likewise. * tree-cfgcleanup.c (tree_forwarder_block_p): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * tree-complex.c (update_parameter_components): Remove usage of ENTRY_BLOCK_PTR macro. * tree-if-conv.c (get_loop_body_in_if_conv_order): Remove usage of EXIT_BLOCK_PTR macro. * tree-inline.c (tree_function_versioning): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (delete_unreachable_blocks_update_callgraph): Likewise. (initialize_cfun): Likewise. (copy_cfg_body): Remove usage of ENTRY_BLOCK_PTR macro. (copy_edges_for_bb): Remove usage of EXIT_BLOCK_PTR macro. (remap_ssa_name): Remove usage of ENTRY_BLOCK_PTR macro. * tree-into-ssa.c (update_ssa): Likewise. (maybe_register_def): Remove usage of EXIT_BLOCK_PTR macro. (insert_updated_phi_nodes_for): Remove usage of ENTRY_BLOCK_PTR macro. (rewrite_into_ssa): Likewise. (rewrite_debug_stmt_uses): Likewise. * tree-outof-ssa.c (expand_phi_nodes): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * tree-profile.c (gimple_gen_ic_func_profiler): Remove usage of ENTRY_BLOCK_PTR macro. * tree-scalar-evolution.h (block_before_loop): Likewise. * tree-sra.c (sra_ipa_reset_debug_stmts): Likewise. (dump_dereferences_table): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (analyze_caller_dereference_legality): Remove usage of ENTRY_BLOCK_PTR macro. (propagate_dereference_distances): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (initialize_parameter_reductions): Remove usage of ENTRY_BLOCK_PTR macro. * tree-ssa-ccp.c (gsi_prev_dom_bb_nondebug): Likewise. (optimize_stack_restore): Remove usage of EXIT_BLOCK_PTR macro. * tree-ssa-coalesce.c (create_outofssa_var_map): Likewise. * tree-ssa-dce.c (eliminate_unnecessary_stmts): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (remove_dead_stmt): Remove usage of EXIT_BLOCK_PTR macro. (propagate_necessity): Remove usage of ENTRY_BLOCK_PTR macro. (mark_control_dependent_edges_necessary): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * tree-ssa-dom.c (eliminate_degenerate_phis): Remove usage of ENTRY_BLOCK_PTR macro. (tree_ssa_dominator_optimize): Remove usage of EXIT_BLOCK_PTR macro. * tree-ssa-live.c (verify_live_on_entry): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (calculate_live_on_exit): Likewise. (set_var_live_on_entry): Remove usage of ENTRY_BLOCK_PTR macro. (loe_visit_block): Likewise. * tree-ssa-live.h (live_on_exit): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (live_on_entry): Likewise. * tree-ssa-loop-ivopts.c (find_interesting_uses): Remove usage of EXIT_BLOCK_PTR macro. * tree-ssa-loop-manip.c (compute_live_loop_exits): Remove usage of ENTRY_BLOCK_PTR macro. * tree-ssa-loop-niter.c (simplify_using_initial_conditions): Likewise. (bound_difference): Likewise. * tree-ssa-loop-prefetch.c (may_use_storent_in_loop_p): Remove usage of EXIT_BLOCK_PTR macro. * tree-ssa-loop-unswitch.c (simplify_using_entry_checks): Remove usage of ENTRY_BLOCK_PTR macro. * tree-ssa-math-opts.c (register_division_in): Likewise. * tree-ssa-phiprop.c (tree_ssa_phiprop): Likewise. * tree-ssa-pre.c (compute_avail): Likewise. (compute_antic): Remove usage of EXIT_BLOCK_PTR macro. (insert): Remove usage of ENTRY_BLOCK_PTR macro. * tree-ssa-propagate.c (ssa_prop_init): Likewise. (simulate_block): Remove usage of EXIT_BLOCK_PTR macro. (cfg_blocks_add): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (add_control_edge): Remove usage of EXIT_BLOCK_PTR macro. * tree-ssa-reassoc.c (do_reassoc): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (build_and_add_sum): Remove usage of ENTRY_BLOCK_PTR macro. * tree-ssa-sink.c (nearest_common_dominator_of_uses): Likewise. (execute_sink_code): Remove usage of EXIT_BLOCK_PTR macro. * tree-ssa-uninit.c (find_dom): Remove usage of ENTRY_BLOCK_PTR macro. (compute_control_dep_chain): Remove usage of EXIT_BLOCK_PTR macro. (find_pdom): Likewise. (warn_uninitialized_vars): Remove usage of ENTRY_BLOCK_PTR macro. * tree-stdarg.c (reachable_at_most_once): Likewise. * tree-tailcall.c (tree_optimize_tail_calls_1): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (eliminate_tail_call): Likewise. * tsan.c (instrument_func_entry): Remove usage of ENTRY_BLOCK_PTR macro. (instrument_func_exit): Remove usage of EXIT_BLOCK_PTR macro. * var-tracking.c (vt_initialize): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (vt_add_function_parameter): Remove usage of ENTRY_BLOCK_PTR macro. (vt_find_locations): Remove usage of EXIT_BLOCK_PTR macro. (vt_stack_adjustments): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * varasm.c (assemble_start_function): Remove usage of ENTRY_BLOCK_PTR macro. * config/bfin/bfin.c (hwloop_optimize): Likewise. * config/nds32/nds32.c (nds32_fp_as_gp_check_available): Remove usage of EXIT_BLOCK_PTR macro. * config/arm/arm.c (require_pic_register): Remove usage of ENTRY_BLOCK_PTR macro. (arm_r3_live_at_start_p): Likewise. (any_sibcall_could_use_r3): Remove usage of EXIT_BLOCK_PTR macro. * config/rs6000/rs6000.c (rs6000_emit_prologue): Likewise. * config/frv/frv.c (frv_optimize_membar_global): Likewise. * config/alpha/alpha.c (alpha_gp_save_rtx): Remove usage of ENTRY_BLOCK_PTR macro. * config/i386/i386.c (ix86_count_insn): Likewise. (ix86_seh_fixup_eh_fallthru): Remove usage of EXIT_BLOCK_PTR macro. (ix86_pad_short_function): Likewise. (ix86_compute_frame_layout): Remove usage of ENTRY_BLOCK_PTR macro. (ix86_pad_returns): Remove usage of EXIT_BLOCK_PTR macro. (ix86_eax_live_at_start_p): Remove usage of ENTRY_BLOCK_PTR macro. (add_condition_to_bb): Remove usage of EXIT_BLOCK_PTR macro. (ix86_expand_epilogue): Likewise. * config/ia64/ia64.c (ia64_asm_unwind_emit): Likewise. (ia64_expand_prologue): Likewise. From-SVN: r205055
2013-11-19 22:57:13 +01:00
FOR_EACH_EDGE (e, i, EXIT_BLOCK_PTR_FOR_FN (cfun)->preds)
if ((e->flags & EDGE_FALLTHRU) && (EDGE_COUNT (e->src->succs) > 1))
tree-vrp.c (execute_vrp): Do not update current_loops. * tree-vrp.c (execute_vrp): Do not update current_loops. * loop-unswitch.c (unswitch_loop): Do not use loop_split_edge_with. * doc/loop.texi: Remove documentation for cancelled functions. * tree-ssa-loop-im.c (loop_commit_inserts): Removed. (move_computations, determine_lsm): Use bsi_commit_edge_inserts instead. * cfgloopmanip.c (remove_bbs): Do not update loops explicitly. (remove_path): Ensure that in delete_basic_blocks, the loops are still allocated. (add_loop): Work on valid loop structures. (loopify): Modify call of add_loop. (mfb_update_loops): Removed. (create_preheader): Do not update loops explicitly. (force_single_succ_latches, loop_version): Do not use loop_split_edge_with. (loop_split_edge_with): Removed. * tree-ssa-loop-manip.c (create_iv, determine_exit_conditions): Do not use bsi_insert_on_edge_immediate_loop. (split_loop_exit_edge, tree_unroll_loop): Do not use loop_split_edge_with. (bsi_insert_on_edge_immediate_loop): Removed. * tree-ssa-loop-ch.c (copy_loop_headers): Use current_loops. Do not use loop_split_edge_with. * cfghooks.c: Include cfgloop.h. (verify_flow_info): Verify that loop_father is filled iff current_loops are available. (redirect_edge_and_branch_force, split_block, delete_basic_block, split_edge, merge_blocks, make_forwarder_block, duplicate_block): Update cfg. * cfgloopanal.c (mark_irreducible_loops): Work if the function contains no loops. * modulo-sched.c (generate_prolog_epilog, canon_loop): Do not use loop_split_edge_with. (sms_schedule): Use current_loops. * tree-ssa-dom.c (tree_ssa_dominator_optimize): Use current_loops. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize): Set current_loops. (rtl_loop_init, rtl_loop_done): Do not set current_loops. * tree-ssa-sink.c (execute_sink_code): Use current_loops. * ifcvt.c (if_convert): Ditto. * predict.c (predict_loops): Do not clear current_loops. (tree_estimate_probability): Use current_loops. (propagate_freq): Receive head of the region to propagate instead of loop. (estimate_loops_at_level): Do not use shared to_visit bitmap. (estimate_loops): New function. Handle case current_loops == NULL. (estimate_bb_frequencies): Do not allocate tovisit. Use estimate_loops. * tree-ssa-loop.c (current_loops): Removed. (tree_loop_optimizer_init): Do not return loops. (tree_ssa_loop_init, tree_ssa_loop_done): Do not set current_loops. * tree-vectorizer.c (slpeel_update_phi_nodes_for_guard1, slpeel_update_phi_nodes_for_guard2, slpeel_tree_peel_loop_to_edge): Do not update loops explicitly. * function.h (struct function): Add x_current_loops field. (current_loops): New macro. * tree-if-conv.c (combine_blocks): Do not update loops explicitly. * loop-unroll.c (split_edge_and_insert): New function. (unroll_loop_runtime_iterations, analyze_insns_in_loop): Do not use loop_split_edge_with. * loop-doloop.c (add_test, doloop_modify): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Do not set current_loops. * cfglayout.c (copy_bbs): Do not update loops explicitly. * lambda-code.c (perfect_nestify): Do not use loop_split_edge_with. * tree-vect-transform.c (vect_transform_loop): Do not update loops explicitly. * cfgloop.c (flow_loops_cfg_dump): Do not dump dfs_order and rc_order. (flow_loops_free): Do not free dfs_order and rc_order. (flow_loops_find): Do not set dfs_order and rc_order in loops structure. Do not call loops and flow info verification. (add_bb_to_loop, remove_bb_from_loops): Check whether the block already belongs to some loop. * cfgloop.h (struct loops): Remove struct cfg. (current_loops, loop_split_edge_with): Declaration removed. (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * tree-flow.h (loop_commit_inserts, bsi_insert_on_edge_immediate_loop): Declaration removed. * Makefile.in (cfghooks.o): Add CFGLOOP_H dependency. * basic-block.h (split_edge_and_insert): Declare. * tree-cfg.c (remove_bb): Do not update loops explicitly. From-SVN: r118931
2006-11-17 12:29:17 +01:00
split_edge (e);
if (loop->latch == loop->header
|| EDGE_COUNT (loop->latch->succs) > 1)
{
FOR_EACH_EDGE (e, i, loop->header->preds)
if (e->src == loop->latch)
break;
tree-vrp.c (execute_vrp): Do not update current_loops. * tree-vrp.c (execute_vrp): Do not update current_loops. * loop-unswitch.c (unswitch_loop): Do not use loop_split_edge_with. * doc/loop.texi: Remove documentation for cancelled functions. * tree-ssa-loop-im.c (loop_commit_inserts): Removed. (move_computations, determine_lsm): Use bsi_commit_edge_inserts instead. * cfgloopmanip.c (remove_bbs): Do not update loops explicitly. (remove_path): Ensure that in delete_basic_blocks, the loops are still allocated. (add_loop): Work on valid loop structures. (loopify): Modify call of add_loop. (mfb_update_loops): Removed. (create_preheader): Do not update loops explicitly. (force_single_succ_latches, loop_version): Do not use loop_split_edge_with. (loop_split_edge_with): Removed. * tree-ssa-loop-manip.c (create_iv, determine_exit_conditions): Do not use bsi_insert_on_edge_immediate_loop. (split_loop_exit_edge, tree_unroll_loop): Do not use loop_split_edge_with. (bsi_insert_on_edge_immediate_loop): Removed. * tree-ssa-loop-ch.c (copy_loop_headers): Use current_loops. Do not use loop_split_edge_with. * cfghooks.c: Include cfgloop.h. (verify_flow_info): Verify that loop_father is filled iff current_loops are available. (redirect_edge_and_branch_force, split_block, delete_basic_block, split_edge, merge_blocks, make_forwarder_block, duplicate_block): Update cfg. * cfgloopanal.c (mark_irreducible_loops): Work if the function contains no loops. * modulo-sched.c (generate_prolog_epilog, canon_loop): Do not use loop_split_edge_with. (sms_schedule): Use current_loops. * tree-ssa-dom.c (tree_ssa_dominator_optimize): Use current_loops. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize): Set current_loops. (rtl_loop_init, rtl_loop_done): Do not set current_loops. * tree-ssa-sink.c (execute_sink_code): Use current_loops. * ifcvt.c (if_convert): Ditto. * predict.c (predict_loops): Do not clear current_loops. (tree_estimate_probability): Use current_loops. (propagate_freq): Receive head of the region to propagate instead of loop. (estimate_loops_at_level): Do not use shared to_visit bitmap. (estimate_loops): New function. Handle case current_loops == NULL. (estimate_bb_frequencies): Do not allocate tovisit. Use estimate_loops. * tree-ssa-loop.c (current_loops): Removed. (tree_loop_optimizer_init): Do not return loops. (tree_ssa_loop_init, tree_ssa_loop_done): Do not set current_loops. * tree-vectorizer.c (slpeel_update_phi_nodes_for_guard1, slpeel_update_phi_nodes_for_guard2, slpeel_tree_peel_loop_to_edge): Do not update loops explicitly. * function.h (struct function): Add x_current_loops field. (current_loops): New macro. * tree-if-conv.c (combine_blocks): Do not update loops explicitly. * loop-unroll.c (split_edge_and_insert): New function. (unroll_loop_runtime_iterations, analyze_insns_in_loop): Do not use loop_split_edge_with. * loop-doloop.c (add_test, doloop_modify): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Do not set current_loops. * cfglayout.c (copy_bbs): Do not update loops explicitly. * lambda-code.c (perfect_nestify): Do not use loop_split_edge_with. * tree-vect-transform.c (vect_transform_loop): Do not update loops explicitly. * cfgloop.c (flow_loops_cfg_dump): Do not dump dfs_order and rc_order. (flow_loops_free): Do not free dfs_order and rc_order. (flow_loops_find): Do not set dfs_order and rc_order in loops structure. Do not call loops and flow info verification. (add_bb_to_loop, remove_bb_from_loops): Check whether the block already belongs to some loop. * cfgloop.h (struct loops): Remove struct cfg. (current_loops, loop_split_edge_with): Declaration removed. (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * tree-flow.h (loop_commit_inserts, bsi_insert_on_edge_immediate_loop): Declaration removed. * Makefile.in (cfghooks.o): Add CFGLOOP_H dependency. * basic-block.h (split_edge_and_insert): Declare. * tree-cfg.c (remove_bb): Do not update loops explicitly. From-SVN: r118931
2006-11-17 12:29:17 +01:00
split_edge (e);
}
}
sel-sched.h, [...]: New files. 2008-08-31 Andrey Belevantsev <abel@ispras.ru> Dmitry Melnik <dm@ispras.ru> Dmitry Zhurikhin <zhur@ispras.ru> Alexander Monakov <amonakov@ispras.ru> Maxim Kuvyrkov <maxim@codesourcery.com> * sel-sched.h, sel-sched-dump.h, sel-sched-ir.h, sel-sched.c, sel-sched-dump.c, sel-sched-ir.c: New files. * Makefile.in (OBJS-common): Add selective scheduling object files. (sel-sched.o, sel-sched-dump.o, sel-sched-ir.o): New entries. (SEL_SCHED_IR_H, SEL_SCHED_DUMP_H): New entries. (sched-vis.o): Add dependency on $(INSN_ATTR_H). * cfghooks.h (get_cfg_hooks, set_cfg_hooks): New prototypes. * cfghooks.c (get_cfg_hooks, set_cfg_hooks): New functions. (make_forwarder_block): Update loop latch if we have redirected the loop latch edge. * cfgloop.c (get_loop_body_in_custom_order): New function. * cfgloop.h (LOOPS_HAVE_FALLTHRU_PREHEADERS): New enum field. (CP_FALLTHRU_PREHEADERS): Likewise. (get_loop_body_in_custom_order): Declare. * cfgloopmanip.c (has_preds_from_loop): New. (create_preheader): Honor CP_FALLTHRU_PREHEADERS. Assert that the preheader edge will be fall thru when it is set. * common.opt (fsel-sched-bookkeeping, fsel-sched-pipelining, fsel-sched-pipelining-outer-loops, fsel-sched-renaming, fsel-sched-substitution, fselective-scheduling): New flags. * cse.c (hash_rtx_cb): New. (hash_rtx): Use it. * dbgcnt.def (sel_sched_cnt, sel_sched_region_cnt, sel_sched_insn_cnt): New counters. * final.c (compute_alignments): Export. Free dominance info after loop_optimizer_finalize. * genattr.c (main): Output maximal_insn_latency prototype. * genautomata.c (output_default_latencies): New. Factor its code from ... (output_internal_insn_latency_func): ... here. (output_internal_maximal_insn_latency_func): New. (output_maximal_insn_latency_func): New. * hard-reg-set.h (UHOST_BITS_PER_WIDE_INT): Define unconditionally. (struct hard_reg_set_iterator): New. (hard_reg_set_iter_init, hard_reg_set_iter_set, hard_reg_set_iter_next): New functions. (EXECUTE_IF_SET_IN_HARD_REG_SET): New macro. * lists.c (remove_free_INSN_LIST_node, remove_free_EXPR_LIST_node): New functions. * loop-init.c (loop_optimizer_init): When LOOPS_HAVE_FALLTHRU_PREHEADERS, set CP_FALLTHRU_PREHEADERS when calling create_preheaders. (loop_optimizer_finalize): Do not verify flow info after reload. * recog.c (validate_replace_rtx_1): New parameter simplify. Default it to true. Update all uses. Factor out simplifying code to ... (simplify_while_replacing): ... this new function. (validate_replace_rtx_part, validate_replace_rtx_part_nosimplify): New. * recog.h (validate_replace_rtx_part, validate_replace_rtx_part_nosimplify): Declare. * rtl.c (rtx_equal_p_cb): New. (rtx_equal_p): Use it. * rtl.h (rtx_equal_p_cb, hash_rtx_cb): Declare. (remove_free_INSN_LIST_NODE, remove_free_EXPR_LIST_node, debug_bb_n_slim, debug_bb_slim, print_rtl_slim): Likewise. * vecprim.h: Add a vector type for unsigned int. * haifa-sched.c: Include vecprim.h and cfgloop.h. (issue_rate, sched_verbose_param, note_list, dfa_state_size, ready_try, cycle_issued_insns, spec_info): Make global. (readyp): Initialize. (dfa_lookahead): New global variable. (old_max_uid, old_last_basic_block): Remove. (h_i_d): Make it a vector. (INSN_TICK, INTER_TICK, QUEUE_INDEX, INSN_COST): Make them work through HID macro. (after_recovery, adding_bb_to_current_region_p): New variables to handle correct insertion of the recovery code. (struct ready_list): Move declaration to sched-int.h. (rgn_n_insns): Removed. (rtx_vec_t): Move to sched-int.h. (find_insn_reg_weight): Remove. (find_insn_reg_weight1): Rename to find_insn_reg_weight. (haifa_init_h_i_d, haifa_finish_h_i_d): New functions to initialize / finalize haifa instruction data. (extend_h_i_d, init_h_i_d): Rewrite. (unlink_other_notes): Move logic to add_to_note_list. Handle selective scheduler. (ready_lastpos, ready_element, ready_sort, reemit_notes, find_fallthru_edge): Make global, remove static prototypes. (max_issue): Make global. Add privileged_n and state parameters. Use them. (extend_global, extend_all): Removed. (init_before_recovery): Add new param. Fix the handling of the case when we insert a recovery code before the EXIT which has a predecessor with a fallthrough edge to it. (create_recovery_block): Make global. Rename to sched_create_recovery_block. Update. (change_pattern): Rename to sched_change_pattern. Make global. (speculate_insn): Rename to sched_speculate_insn. Make global. Split haifa-specific functionality into ... (haifa_change_pattern): New static function. (sched_extend_bb): New static function. (sched_init_bbs): New function. (current_sched_info): Change type to struct haifa_sched_info. (insn_cost): Adjust for selective scheduling. (dep_cost_1): New function. Move logic from ... (dep_cost): ... here. (dep_cost): Use dep_cost_1. (contributes_to_priority_p): Use sched_deps_info instead of current_sched_info. (priority): Adjust to work with selective scheduling. Process the corner case when all dependencies don't contribute to priority. (rank_for_schedule): Use ds_weak instead of dep_weak. (advance_state): New function. Move logic from ... (advance_one_cycle): ... here. (add_to_note_list, concat_note_lists): New functions. (rm_other_notes): Make static. Adjust for selective scheduling. (remove_notes, restore_other_notes): New functions. (move_insn): Add two arguments. Update assert. Don't call reemit_notes. (choose_ready): Remove lookahead variable, use dfa_lookahead. Remove more_issue, max_points. Move the code to initialize max_lookahead_tries to max_issue. (schedule_block): Remove rgn_n_insns1 parameter. Don't allocate ready. Adjust use of move_insn. Call restore_other_notes. (luid): Remove. (sched_init, sched_finish): Move Haifa-specific initialization/ finalization to ... (haifa_sched_init, haifa_sched_finish): ... respectively. New functions. (setup_sched_dump): New function. (haifa_init_only_bb): New static function. (haifa_speculate_insn): New static function. (try_ready): Use haifa_* instead of speculate_insn and change_pattern. (extend_ready, extend_all): Remove. (sched_extend_ready_list, sched_finish_ready_list): New functions. (create_check_block_twin, add_to_speculative_block): Use haifa_insns_init instead of extend_global. Update to use new initialization functions. Change parameter. Factor out code from create_check_block_twin to ... (sched_create_recovery_edges) ... this new function. (add_block): Remove. (sched_scan_info): New. (extend_bb): Use sched_scan_info. (init_bb, extend_insn, init_insn, init_insns_in_bb, sched_scan): New static functions for walking through scheduling region. (sched_luids): New vector variable to replace uid_to_luid. (luids_extend_insn): New function. (sched_max_luid): New variable. (luids_init_insn): New function. (sched_init_luids, sched_finish_luids): New functions. (insn_luid): New debug function. (sched_extend_target): New function. (haifa_init_insn): New static function. (sched_init_only_bb): New hook. (sched_split_block): New hook. (sched_split_block_1): New function. (sched_create_empty_bb): New hook. (sched_create_empty_bb_1): New function. (common_sched_info, ready): New global variables. (current_sched_info_var): Remove. (move_block_after_check): Use common_sched_info. (haifa_luid_for_non_insn): New static function. (init_before_recovery): Use haifa_init_only_bb instead of add_block. (increase_insn_priority): New. * modulo-sched.c: (issue_rate): Remove static declaration. (sms_sched_info): Change type to haifa_sched_info. (sms_sched_deps_info, sms_common_sched_info): New variables. (setup_sched_infos): New. (sms_schedule): Initialize them. Call haifa_sched_init/finish. Do not call regstat_free_calls_crossed. (sms_print_insn): Use const_rtx. * params.def (PARAM_MAX_PIPELINE_REGION_BLOCKS, PARAM_MAX_PIPELINE_REGION_INSNS, PARAM_SELSCHED_MAX_LOOKAHEAD, PARAM_SELSCHED_MAX_SCHED_TIMES, PARAM_SELSCHED_INSNS_TO_RENAME, PARAM_SCHED_MEM_TRUE_DEP_COST): New. * sched-deps.c (sched_deps_info): New. Update all relevant uses of current_sched_info to use it. (enum reg_pending_barrier_mode): Move to sched-int.h. (h_d_i_d): New variable. Initialize to NULL. ({true, output, anti, spec, forward}_dependency_cache): Initialize to NULL. (estimate_dep_weak): Remove static declaration. (sched_has_condition_p): New function. Adjust users of sched_get_condition to use it instead. (conditions_mutex_p): Add arguments indicating which conditions are reversed. Use them. (sched_get_condition_with_rev): Rename from sched_get_condition. Add argument to indicate whether returned condition is reversed. Do not generate new rtx when condition should be reversed; indicate it by setting new argument instead. (add_dependence_list_and_free): Add deps parameter. Update all users. Do not free dependence list when deps context is readonly. (add_insn_mem_dependence, flush_pending_lists): Adjust for readonly contexts. (remove_from_dependence_list, remove_from_both_dependence_lists): New. (remove_from_deps): New. Use the above functions. (cur_insn, can_start_lhs_rhs_p): New static variables. (add_or_update_back_dep_1): Initialize present_dep_type. (haifa_start_insn, haifa_finish_insn, haifa_note_reg_set, haifa_note_reg_clobber, haifa_note_reg_use, haifa_note_mem_dep, haifa_note_dep): New functions implementing dependence hooks for the Haifa scheduler. (note_reg_use, note_reg_set, note_reg_clobber, note_mem_dep, note_dep): New functions. (ds_to_dt, extend_deps_reg_info, maybe_extend_reg_info_p): New functions. (init_deps): Initialize last_reg_pending_barrier and deps->readonly. (free_deps): Initialize deps->reg_last. (sched_analyze_reg, sched_analyze_1, sched_analyze_2, sched_analyze_insn): Update to use dependency hooks infrastructure and readonly contexts. (deps_analyze_insn): New function. Move part of logic from ... (sched_analyze): ... here. Also move some logic to ... (deps_start_bb): ... here. New function. (add_forw_dep, delete_forw_dep): Guard use of INSN_DEP_COUNT with sel_sched_p. (sched_deps_init): New function. Move code from ... (init_dependency_caches): ... here. Remove. (init_deps_data_vector): New. (sched_deps_finish): New function. Move code from ... (free_dependency_caches): ... here. Remove. (init_deps_global, finish_deps_global): Adjust for use with selective scheduling. (get_dep_weak): Move logic to ... (get_dep_weak_1): New function. (ds_merge): Move logic to ... (ds_merge_1): New static function. (ds_full_merge, ds_max_merge, ds_get_speculation_types): New functions. (ds_get_max_dep_weak): New function. * sched-ebb.c (sched_n_insns): Rename to sched_rgn_n_insns. (n_insns): Rename to rgn_n_insns. (debug_ebb_dependencies): New function. (init_ready_list): Use it. (begin_schedule_ready): Use sched_init_only_bb. (ebb_print_insn): Indicate when an insn starts a new cycle. (contributes_to_priority, compute_jump_reg_dependencies, add_remove_insn, fix_recovery_cfg): Add ebb_ prefix to function names. (add_block1): Remove to ebb_add_block. (ebb_sched_deps_info, ebb_common_sched_info): New variables. (schedule_ebb): Initialize them. Use remove_notes instead of rm_other_notes. Use haifa_local_init/finish. (schedule_ebbs): Use haifa_sched_init/finish. * sched-int.h: Include vecprim.h, remove rtl.h. (struct ready_list): Delete declaration. (sched_verbose_param, enum sched_pass_id_t, bb_vec_t, insn_vec_t, rtx_vec_t): New. (struct sched_scan_info_def): New structure. (sched_scan_info, sched_scan, sched_init_bbs, sched_init_luids, sched_finish_luids, sched_extend_target, haifa_init_h_i_d, haifa_finish_h_i_d): Declare. (struct common_sched_info_def): New. (common_sched_info, haifa_common_sched_info, sched_emulate_haifa_p): Declare. (sel_sched_p): New. (sched_luids): Declare. (INSN_LUID, LUID_BY_UID, SET_INSN_LUID): Declare. (sched_max_luid, insn_luid): Declare. (note_list, remove_notes, restore_other_notes, bb_note): Declare. (sched_insns_init, sched_insns_finish, xrecalloc, reemit_notes, print_insn, print_pattern, print_value, haifa_classify_insn, sel_find_rgns, sel_mark_hard_insn, dfa_state_size, advance_state, setup_sched_dump, sched_init, sched_finish, sel_insn_is_speculation_check): Export. (struct ready_list): Move from haifa-sched.c. (ready_try, ready, max_issue): Export. (ebb_compute_jump_reg_dependencies, find_fallthru_edge, sched_init_only_bb, sched_split_block, sched_split_block_1, sched_create_empty_bb, sched_create_empty_bb_1, sched_create_recovery_block, sched_create_recovery_edges): Export. (enum reg_pending_barrier_mode): Export. (struct deps): New fields `last_reg_pending_barrier' and `readonly'. (deps_t): New. (struct sched_info): Rename to haifa_sched_info. Use const_rtx for print_insn field. Move add_block and fix_recovery_cfg to common_sched_info_def. Move compute_jump_reg_dependencies, use_cselib ... (struct sched_deps_info_def): ... this new structure. (sched_deps_info): Declare. (struct spec_info_def): Remove weakness_cutoff, add data_weakness_cutoff and control_weakness_cutoff. (spec_info): Declare. (struct _haifa_deps_insn_data): Split from haifa_insn_data. Add dep_count field. (struct haifa_insn_data): Rename to struct _haifa_insn_data. (haifa_insn_data_def, haifa_insn_data_t): New typedefs. (current_sched_info): Change type to struct haifa_sched_info. (haifa_deps_insn_data_def, haifa_deps_insn_data_t): New typedefs. (h_d_i_d): New variable. (HDID): New accessor macro. (h_i_d): Change type to VEC (haifa_insn_data_def, heap) *. (HID): New accessor macro. Rewrite h_i_d accessor macros through HID and HDID. (IS_SPECULATION_CHECK_P): Update for selective scheduler. (enum SCHED_FLAGS): Update for selective scheduler. (enum SPEC_SCHED_FLAGS): New flag SEL_SCHED_SPEC_DONT_CHECK_CONTROL. (init_dependency_caches, free_dependency_caches): Delete declarations. (deps_analyze_insn, remove_from_deps, get_dep_weak_1, estimate_dep_weak, ds_full_merge, ds_max_merge, ds_weak, ds_get_speculation_types, ds_get_max_dep_weak, sched_deps_init, sched_deps_finish, haifa_note_reg_set, haifa_note_reg_use, haifa_note_reg_clobber, maybe_extend_reg_info_p, deps_start_bb, ds_to_dt): Export. (rm_other_notes): Delete declaration. (schedule_block): Remove one argument. (cycle_issued_insns, issue_rate, dfa_lookahead, ready_sort, ready_element, ready_lastpos, sched_extend_ready_list, sched_finish_ready_list, sched_change_pattern, sched_speculate_insn, concat_note_lists): Export. (struct region): Move from sched-rgn.h. (nr_regions, rgn_table, rgn_bb_table, block_to_bb, containing_rgn, RGN_NR_BLOCKS, RGN_BLOCKS, RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB, BLOCK_TO_BB, CONTAINING_RGN): Export. (ebb_head, BB_TO_BLOCK, EBB_FIRST_BB, EBB_LAST_BB, INSN_BB): Likewise. (current_nr_blocks, current_blocks, target_bb): Likewise. (dep_cost_1, sched_is_disabled_for_current_region_p, sched_rgn_init, sched_rgn_finish, rgn_setup_region, sched_rgn_compute_dependencies, sched_rgn_local_init, extend_regions, rgn_make_new_region_out_of_new_block, compute_priorities, debug_rgn_dependencies, free_rgn_deps, contributes_to_priority, extend_rgns, deps_join rgn_setup_common_sched_info, rgn_setup_sched_infos, debug_regions, debug_region, dump_region_dot, dump_region_dot_file, haifa_sched_init, haifa_sched_finish): Export. (get_rgn_sched_max_insns_priority, sel_add_to_insn_priority, increase_insn_priority): Likewise. * sched-rgn.c: Include sel-sched.h. (ref_counts): New static variable. Use it ... (INSN_REF_COUNT): ... here. Rewrite and move closer to uses. (FED_BY_SPEC_LOAD, IS_LOAD_INSN): Rewrite to use HID accessor macro. (sched_is_disabled_for_current_region_p): Delete static declaration. (struct region): Move to sched-int.h. (nr_regions, rgn_table, rgn_bb_table, block_to_bb, containing_rgn, ebb_head): Define and initialize. (RGN_NR_BLOCKS, RGN_BLOCKS, RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB, BLOCK_TO_BB, CONTAINING_RGN, debug_regions, extend_regions, BB_TO_BLOCK, EBB_FIRST_BB, EBB_LAST_BB): Move to sched-int.h. (find_single_block_region): Add new argument to indicate that EBB regions should be constructed. (debug_live): Delete declaration. (current_nr_blocks, current_blocks, target_bb): Remove static qualifiers. (compute_dom_prob_ps, check_live, update_live, set_spec_fed): Delete declaration. (init_regions): Delete declaration. (debug_region, bb_in_region_p, dump_region_dot_file, dump_region_dot, rgn_estimate_number_of_insns): New. (too_large): Use estimate_number_of_insns. (haifa_find_rgns): New. Move the code from ... (find_rgns): ... here. Call either sel_find_rgns or haifa_find_rgns. (free_trg_info): New. (compute_trg_info): Allocate candidate tables here instead of ... (init_ready_list): ... here. (rgn_print_insn): Use const_rtx. (contributes_to_priority, extend_regions): Delete static declaration. (add_remove_insn, fix_recovery_cfg): Add rgn_ to function names. (add_block1): Rename to rgn_add_block. (debug_rgn_dependencies): Delete static qualifier. (new_ready): Use sched_deps_info. Simplify. (rgn_common_sched_info, rgn_const_sched_deps_info, rgn_const_sel_sched_deps_info, rgn_sched_deps_info, rgn_sched_info): New. (region_sched_info): Rename to rgn_const_sched_info. (deps_join): New, extracted from ... (propagate_deps): ... here. (compute_block_dependences, debug_dependencies): Update for selective scheduling. (free_rgn_deps, compute_priorities): New functions. (sched_rgn_init, sched_rgn_finish, rgn_setup_region, sched_rgn_compute_dependencies): New functions. (schedule_region): Use them. (sched_rgn_local_init, sched_rgn_local_free, sched_rgn_local_finish, rgn_setup_common_sched_info, rgn_setup_sched_infos): New functions. (schedule_insns): Call new functions that were split out. (rgn_make_new_region_out_of_new_block): New. (get_rgn_sched_max_insns_priority): New. (rest_of_handle_sched, rest_of_handle_sched2): Call selective scheduling when appropriate. * sched-vis.c: Include insn-attr.h. (print_value, print_pattern): Make global. (print_rtl_slim, debug_bb_slim, debug_bb_n_slim): New functions. * target-def.h (TARGET_SCHED_ADJUST_COST_2, TARGET_SCHED_ALLOC_SCHED_CONTEXT, TARGET_SCHED_INIT_SCHED_CONTEXT, TARGET_SCHED_SET_SCHED_CONTEXT, TARGET_SCHED_CLEAR_SCHED_CONTEXT, TARGET_SCHED_FREE_SCHED_CONTEXT, TARGET_SCHED_GET_INSN_CHECKED_DS, TARGET_SCHED_GET_INSN_SPEC_DS, TARGET_SCHED_SKIP_RTX_P): New target hooks. Initialize them to 0. (TARGET_SCHED_GEN_CHECK): Rename to TARGET_SCHED_GEN_SPEC_CHECK. * target.h (struct gcc_target): Add them. Rename gen_check field to gen_spec_check. * flags.h (sel_sched_switch_set): Declare. * opts.c (sel_sched_switch_set): New variable. (decode_options): Unset flag_sel_sched_pipelining_outer_loops if pipelining is disabled from command line. (common_handle_option): Record whether selective scheduling is requested from command line. * doc/invoke.texi: Document new flags and parameters. * doc/tm.texi: Document new target hooks. * config/ia64/ia64.c (TARGET_SCHED_GEN_SPEC_CHECK): Define to ia64_gen_check. (dfa_state_size): Do not declare locally. * config/ia64/ia64.opt (msched-ar-data-spec): Default to 0. * config/rs6000/rs6000.c (rs6000_init_sched_context, rs6000_alloc_sched_context, rs6000_set_sched_context, rs6000_free_sched_context): New functions. (struct _rs6000_sched_context): New. (rs6000_sched_reorder2): Do not modify INSN_PRIORITY for selective scheduling. (rs6000_sched_finish): Do not run for selective scheduling. Co-Authored-By: Alexander Monakov <amonakov@ispras.ru> Co-Authored-By: Dmitry Melnik <dm@ispras.ru> Co-Authored-By: Dmitry Zhurikhin <zhur@ispras.ru> Co-Authored-By: Maxim Kuvyrkov <maxim@codesourcery.com> From-SVN: r139854
2008-09-01 10:57:00 +02:00
/* Setup infos. */
static void
setup_sched_infos (void)
{
memcpy (&sms_common_sched_info, &haifa_common_sched_info,
sizeof (sms_common_sched_info));
sms_common_sched_info.sched_pass_id = SCHED_SMS_PASS;
common_sched_info = &sms_common_sched_info;
sched_deps_info = &sms_sched_deps_info;
current_sched_info = &sms_sched_info;
}
/* Probability in % that the sms-ed loop rolls enough so that optimized
version may be entered. Just a guess. */
#define PROB_SMS_ENOUGH_ITERATIONS 80
/* Used to calculate the upper bound of ii. */
#define MAXII_FACTOR 2
/* Main entry point, perform SMS scheduling on the loops of the function
that consist of single basic blocks. */
static void
tree-vrp.c (execute_vrp): Do not pass dump argument to. * tree-vrp.c (execute_vrp): Do not pass dump argument to. loop_optimizer_init and loop_optimizer_finalize * tree-ssa-sink.c (execute_sink_code): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init, tree_ssa_loop_done): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Ditto. * sched-ebb.c: Include output.h. (schedule_ebbs): Do not use dump argument. * value-prof.h (struct profile_hooks): Remove profile_dump_file. * loop.c (loop_dump_stream): Removed. (loop_optimize, rest_of_handle_loop_optimize): Do not use dump argument. (scan_loop, move_movables, find_and_verify_loops, mark_loop_jump, emit_prefetch_instructions, loop_bivs_find, loop_bivs_check, final_biv_value, loop_biv_eliminable_p, loop_givs_rescan, loop_iterations, strength_reduce, record_biv, record_giv, final_giv_value, check_final_value, check_ext_dependent_givs, combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems, try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use dump_file instead of loop_dump_stream. * ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call argument dump_file. * reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use dump argument. * flow.c (life_analysis, rest_of_handle_life): Ditto. * haifa-sched.c: Include output.h (schedule_insns, sched_init): Do not use dump argument. * mode-switching.c (optimize_mode_switching): Ditto. * modulo-sched.c (stats_file): Removed. (print_node_sched_params): Do not call argument dump_file. (sms_schedule_by_order, loop_canon_p, sms_schedule, rest_of_handle_sms): Do not use dump argument. Use dump_file instead of stats_file. * cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not use dump argument. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize, rtl_loop_init, rtl_loop_done): Ditto. * global.c (global_alloc, rest_of_handle_global_alloc): Ditto. * predict.c (combine_predictions_for_bb, tree_estimate_probability): Ditto. * recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto. * lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto. * regmove.c (fixup_match_1, fixup_match_2, regmove_optimize, rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto. * emit-rtl.c (renumber_insns): Ditto. * cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr, expand_gimple_basic_block, tree_expand_cfg): Ditto. * regclass.c (regclass): Ditto. * tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts, remove_ssa_form, rewrite_out_of_ssa): Ditto. * reg-stack.c (compensate_edge, compensate_edges, convert_regs_1, convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs): Ditto. * sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto. * local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file to regclass. * gcse.c (gcse_file, debug_stderr): Removed. (gcse_main, bypass_jumps, rest_of_handle_jump_bypass, rest_of_handle_gcse): Do not use dump argument. (cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets, one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb, pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass, compute_code_hoist_vbeinout, compute_code_hoist_data, one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores, compute_store_table, build_store_vectors, insert_insn_start_bb, insert_store, remove_reachable_equiv_notes, replace_store_insn, store_motion): Use dump_file instead of gcse_file. * ipa-type-escape.c (type_escape_execute): Remove debugging comments. * profile.c (profile_dump_file): Removed. (branch_prob): Use dump_file instead of profile_dump_file. * ipa.c (cgraph_remove_unreachable_nodes): Do not call argument dump_file. * tree-ssa-copy.c (dump_copy_of): Ditto. * rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass dump file to life_analysis. * bt-load.c (branch_target_load_optimize): Ditto. * cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to renumber_insns. * rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs, regclass, dbr_schedule): Declaration changed. * sched-int.h (sched_init): Declaration changed. * tree-profile.c (tree_profile_dump_file): Removed. (tree_profile_hooks): Removed profile_dump_file hook. * rtl-profile (rtl_profile_dump_file): Removed. (rtl_profile_hooks): emoved profile_dump_file hook. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * c-gimplify.c (c_genericize): Do not call local variable dump_file. * tree-cfg.c (build_tree_cfg): Ditto. * Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency. * basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm): Declaration changed. * config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to life_analysis and schedule_insns. * config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to life_analysis. * config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to dbr_schedule. * config/mips/mips.c (mips_reorg): Ditto. * config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to schedule_ebbs. From-SVN: r110656
2006-02-06 19:20:47 +01:00
sms_schedule (void)
{
rtx_insn *insn;
ddg_ptr *g_arr, g;
int * node_order;
int maxii, max_asap;
partial_schedule_ptr ps;
basic_block bb = NULL;
struct loop *loop;
basic_block condition_bb = NULL;
edge latch_edge;
gcov_type trip_count = 0;
tree-vrp.c (execute_vrp): Do not update current_loops. * tree-vrp.c (execute_vrp): Do not update current_loops. * loop-unswitch.c (unswitch_loop): Do not use loop_split_edge_with. * doc/loop.texi: Remove documentation for cancelled functions. * tree-ssa-loop-im.c (loop_commit_inserts): Removed. (move_computations, determine_lsm): Use bsi_commit_edge_inserts instead. * cfgloopmanip.c (remove_bbs): Do not update loops explicitly. (remove_path): Ensure that in delete_basic_blocks, the loops are still allocated. (add_loop): Work on valid loop structures. (loopify): Modify call of add_loop. (mfb_update_loops): Removed. (create_preheader): Do not update loops explicitly. (force_single_succ_latches, loop_version): Do not use loop_split_edge_with. (loop_split_edge_with): Removed. * tree-ssa-loop-manip.c (create_iv, determine_exit_conditions): Do not use bsi_insert_on_edge_immediate_loop. (split_loop_exit_edge, tree_unroll_loop): Do not use loop_split_edge_with. (bsi_insert_on_edge_immediate_loop): Removed. * tree-ssa-loop-ch.c (copy_loop_headers): Use current_loops. Do not use loop_split_edge_with. * cfghooks.c: Include cfgloop.h. (verify_flow_info): Verify that loop_father is filled iff current_loops are available. (redirect_edge_and_branch_force, split_block, delete_basic_block, split_edge, merge_blocks, make_forwarder_block, duplicate_block): Update cfg. * cfgloopanal.c (mark_irreducible_loops): Work if the function contains no loops. * modulo-sched.c (generate_prolog_epilog, canon_loop): Do not use loop_split_edge_with. (sms_schedule): Use current_loops. * tree-ssa-dom.c (tree_ssa_dominator_optimize): Use current_loops. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize): Set current_loops. (rtl_loop_init, rtl_loop_done): Do not set current_loops. * tree-ssa-sink.c (execute_sink_code): Use current_loops. * ifcvt.c (if_convert): Ditto. * predict.c (predict_loops): Do not clear current_loops. (tree_estimate_probability): Use current_loops. (propagate_freq): Receive head of the region to propagate instead of loop. (estimate_loops_at_level): Do not use shared to_visit bitmap. (estimate_loops): New function. Handle case current_loops == NULL. (estimate_bb_frequencies): Do not allocate tovisit. Use estimate_loops. * tree-ssa-loop.c (current_loops): Removed. (tree_loop_optimizer_init): Do not return loops. (tree_ssa_loop_init, tree_ssa_loop_done): Do not set current_loops. * tree-vectorizer.c (slpeel_update_phi_nodes_for_guard1, slpeel_update_phi_nodes_for_guard2, slpeel_tree_peel_loop_to_edge): Do not update loops explicitly. * function.h (struct function): Add x_current_loops field. (current_loops): New macro. * tree-if-conv.c (combine_blocks): Do not update loops explicitly. * loop-unroll.c (split_edge_and_insert): New function. (unroll_loop_runtime_iterations, analyze_insns_in_loop): Do not use loop_split_edge_with. * loop-doloop.c (add_test, doloop_modify): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Do not set current_loops. * cfglayout.c (copy_bbs): Do not update loops explicitly. * lambda-code.c (perfect_nestify): Do not use loop_split_edge_with. * tree-vect-transform.c (vect_transform_loop): Do not update loops explicitly. * cfgloop.c (flow_loops_cfg_dump): Do not dump dfs_order and rc_order. (flow_loops_free): Do not free dfs_order and rc_order. (flow_loops_find): Do not set dfs_order and rc_order in loops structure. Do not call loops and flow info verification. (add_bb_to_loop, remove_bb_from_loops): Check whether the block already belongs to some loop. * cfgloop.h (struct loops): Remove struct cfg. (current_loops, loop_split_edge_with): Declaration removed. (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * tree-flow.h (loop_commit_inserts, bsi_insert_on_edge_immediate_loop): Declaration removed. * Makefile.in (cfghooks.o): Add CFGLOOP_H dependency. * basic-block.h (split_edge_and_insert): Declare. * tree-cfg.c (remove_bb): Do not update loops explicitly. From-SVN: r118931
2006-11-17 12:29:17 +01:00
loop_optimizer_init (LOOPS_HAVE_PREHEADERS
loop.texi: Document recording of loop exits. * doc/loop.texi: Document recording of loop exits. * cfgloopmanip.c (loopify, duplicate_loop): Use alloc_loop. (update_single_exits_after_duplication, update_single_exit_for_duplicated_loop, update_single_exit_for_duplicated_loops): Removed. (duplicate_loop_to_header_edge): Do not call update_single_exits_after_duplication and update_single_exit_for_duplicated_loops. (loop_version): Do not update single_exit information. (fix_loop_structure): Use record_loop_exits instead of mark_single_exit_loops. * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update the lists of loop exits. * cfghooks.c (redirect_edge_and_branch, redirect_edge_and_branch_force, split_edge, merge_blocks): Update the lists of loop exits. * modulo-sched.c (sms_schedule): Pass LOOPS_HAVE_RECORDED_EXITS to loop_optimizer_init. * loop-init.c (loop_optimizer_init): Call record_loop_exits instead of mark_single_exit_loops. (loop_optimizer_finalize): Call release_recorded_exits. * tree-ssa-loop.c (tree_loop_optimizer_init): Pass LOOPS_HAVE_RECORDED_EXITS to loop_optimizer_init. * tree-vectorizer.c (slpeel_tree_duplicate_loop_to_edge_cfg): Do not update single exit information. * lambda-code.c (perfect_nestify): Ditto. * cfgloop.c (flow_loop_free): Destroy the list of exits of the loop. (mark_single_exit_loops): Removed. (alloc_loop, loop_exit_hash, loop_exit_eq, loop_exit_free, get_exit_descriptions, rescan_loop_exit, record_loop_exits, dump_recorded_exit, dump_recorded_exits, release_recorded_exits): New functions. (get_loop_exit_edges, single_exit): Use recorded exit lists. (add_bb_to_loop, remove_bb_from_loops): Update the lists of loop exits. (verify_loop_structure): Verify consistency of the exit lists. (flow_loops_find): Use alloc_loop. Initialize exits hash. (set_single_exit): Removed. * cfgloop.h (struct loop_exit): New function. (struct loop): single_exit_ field replaced by exits field. (LOOPS_HAVE_MARKED_SINGLE_EXITS): Replaced by LOOPS_HAVE_RECORDED_EXITS. (struct loops): Added exits hash. (mark_single_exit_loops, set_single_exit): Declaration removed. (release_recorded_exits, record_loop_exits, rescan_loop_exit): Declare. From-SVN: r120728
2007-01-12 18:57:40 +01:00
| LOOPS_HAVE_RECORDED_EXITS);
function.h (loops_for_fn): New inline function. 2013-04-30 Richard Biener <rguenther@suse.de> * function.h (loops_for_fn): New inline function. (set_loops_for_fn): Likewise. * cfgloop.h (place_new_loop): Add struct function parameter. (get_loop): Likewise. (get_loops): Likewise. (number_of_loops): Likewise. (fel_next): Adjust. (fel_init): Likewise. * cfg.c (get_loop_copy): Adjust. * cfgloop.c (flow_loops_dump): Likewise. (record_loop_exits): Likewise. (verify_loop_structure): Likewise. * cfgloopanal.c (mark_irreducible_loops): Likewise. (estimate_reg_pressure_cost): Likewise. (mark_loop_exit_edges): Likewise. * cfgloopmanip.c (place_new_loop): Likewise. (add_loop): Likewise. (duplicate_loop): Likewise. * graph.c (draw_cfg_nodes): Likewise. * graphite-clast-to-gimple.c (translate_clast_user): Likewise. * graphite-sese-to-poly.c (build_scop_scattering): Likewise. (extract_affine_chrec): Likewise. (build_scop_iteration_domain): Likewise. * graphite.c (graphite_initialize): Likewise. * ira-build.c (create_loop_tree_nodes): Likewise. (more_one_region_p): Likewise. (rebuild_regno_allocno_maps): Likewise. (mark_loops_for_removal): Likewise. (mark_all_loops_for_removal): Likewise. (remove_unnecessary_regions): Likewise. (ira_build): Likewise. * ira-emit.c (setup_entered_from_non_parent_p): Likewise. * loop-init.c (fix_loop_structure): Likewise. (gate_rtl_move_loop_invariants): Likewise. (gate_rtl_unswitch): Likewise. (gate_rtl_unroll_and_peel_loops): Likewise. (rtl_doloop): Likewise. * lto-streamer-in.c (input_cfg): Likewise. * lto-streamer-out.c (output_cfg): Likewise. * modulo-sched.c (sms_schedule): Likewise. * predict.c (tree_estimate_probability): Likewise. (tree_estimate_probability_driver): Likewise. (estimate_loops): Likewise. * tree-cfg.c (fixup_loop_arrays_after_move): Likewise. (move_sese_region_to_fn): Likewise. (debug_loop_num): Likewise. * tree-chrec.c (chrec_evaluate): Likewise. (hide_evolution_in_other_loops_than_loop): Likewise. (chrec_component_in_loop_num): Likewise. (reset_evolution_in_loop): Likewise. (evolution_function_is_invariant_rec_p): Likewise. * tree-if-conv.c (main_tree_if_conversion): Likewise. * tree-inline.c (copy_loops): Likewise. (copy_cfg_body): Likewise. (tree_function_versioning): Likewise. * tree-loop-distribution.c (rdg_flag_loop_exits): Likewise. * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop): Likewise. (add_to_evolution_1): Likewise. (scev_const_prop): Likewise. * tree-scalar-evolution.h (get_chrec_loop): Likewise. * tree-ssa-loop-ch.c (copy_loop_headers): Likewise. * tree-ssa-loop-im.c (analyze_memory_references): Likewise. (tree_ssa_lim_initialize): Likewise. * tree-ssa-loop-manip.c (rewrite_into_loop_closed_ssa): Likewise. (verify_loop_closed_ssa): Likewise. * tree-ssa-loop.c (tree_ssa_loop_init): Likewise. (tree_ssa_loop_im): Likewise. (tree_ssa_loop_unswitch): Likewise. (tree_vectorize): Likewise. (check_data_deps): Likewise. (tree_ssa_loop_ivcanon): Likewise. (tree_ssa_loop_bounds): Likewise. (tree_complete_unroll): Likewise. (tree_complete_unroll_inner): Likewise. (tree_parallelize_loops): Likewise. (tree_ssa_loop_prefetch): Likewise. (tree_ssa_loop_ivopts): Likewise. * tree-ssa.c (execute_update_addresses_taken): Liekwise. * tree-vectorizer.c (vectorize_loops): Likewise. From-SVN: r198441
2013-04-30 10:14:09 +02:00
if (number_of_loops (cfun) <= 1)
tree-vrp.c (execute_vrp): Do not check whether current_loops == NULL. * tree-vrp.c (execute_vrp): Do not check whether current_loops == NULL. * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto. * ifcvt.c (if_convert): Ditto. * tree-ssa-threadupdate.c (thread_block): Ditto. (thread_through_all_blocks): Ditto. Assert that loops were analysed. * tree-ssa-loop-manip.c (rewrite_into_loop_closed_ssa, verify_loop_closed_ssa): Check number_of_loops instead of current_loops. * predict.c (tree_estimate_probability): Ditto. * tree-if-conv.c (main_tree_if_conversion): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * modulo-sched.c (sms_schedule): Ditto. * tree-scalar-evolution.c (scev_const_prop): Ditto. (scev_finalize): Do not do anything if scev analysis was not initialized. * cfgloopanal.c (mark_irreducible_loops): Do not check whether current_loops == NULL. (mark_loop_exit_edges): Check number_of_loops instead of current_loops. * loop-init.c (loop_optimizer_init): Do not free current_loops when there are no loops. (loop_optimizer_finalize): Assert that loops were analyzed. (rtl_move_loop_invariants, rtl_unswitch, rtl_unroll_and_peel_loops, rtl_doloop): Check number_of_loops instead of current_loops. * tree-ssa-loop.c (tree_loop_optimizer_init): Do not check whether current_loops == NULL. (tree_ssa_loop_init, tree_ssa_loop_im, tree_ssa_loop_unswitch, gate_tree_vectorize tree_linear_transform, check_data_deps, tree_ssa_loop_ivcanon, tree_ssa_empty_loop, tree_ssa_loop_bounds, tree_complete_unroll, tree_ssa_loop_prefetch, tree_ssa_loop_ivopts): Check number_of_loops instead of current_loops. (tree_ssa_loop_done): Do not check whether current_loops == NULL. * tree-ssa-pre.c (fini_pre): Do not take do_fre argument. Always free loops if available. (execute_pre): Do not pass do_fre to fini_pre. From-SVN: r125114
2007-05-27 19:23:11 +02:00
{
loop_optimizer_finalize ();
return; /* There are no loops to schedule. */
}
/* Initialize issue_rate. */
if (targetm.sched.issue_rate)
{
int temp = reload_completed;
reload_completed = 1;
issue_rate = targetm.sched.issue_rate ();
reload_completed = temp;
}
else
issue_rate = 1;
/* Initialize the scheduler. */
sel-sched.h, [...]: New files. 2008-08-31 Andrey Belevantsev <abel@ispras.ru> Dmitry Melnik <dm@ispras.ru> Dmitry Zhurikhin <zhur@ispras.ru> Alexander Monakov <amonakov@ispras.ru> Maxim Kuvyrkov <maxim@codesourcery.com> * sel-sched.h, sel-sched-dump.h, sel-sched-ir.h, sel-sched.c, sel-sched-dump.c, sel-sched-ir.c: New files. * Makefile.in (OBJS-common): Add selective scheduling object files. (sel-sched.o, sel-sched-dump.o, sel-sched-ir.o): New entries. (SEL_SCHED_IR_H, SEL_SCHED_DUMP_H): New entries. (sched-vis.o): Add dependency on $(INSN_ATTR_H). * cfghooks.h (get_cfg_hooks, set_cfg_hooks): New prototypes. * cfghooks.c (get_cfg_hooks, set_cfg_hooks): New functions. (make_forwarder_block): Update loop latch if we have redirected the loop latch edge. * cfgloop.c (get_loop_body_in_custom_order): New function. * cfgloop.h (LOOPS_HAVE_FALLTHRU_PREHEADERS): New enum field. (CP_FALLTHRU_PREHEADERS): Likewise. (get_loop_body_in_custom_order): Declare. * cfgloopmanip.c (has_preds_from_loop): New. (create_preheader): Honor CP_FALLTHRU_PREHEADERS. Assert that the preheader edge will be fall thru when it is set. * common.opt (fsel-sched-bookkeeping, fsel-sched-pipelining, fsel-sched-pipelining-outer-loops, fsel-sched-renaming, fsel-sched-substitution, fselective-scheduling): New flags. * cse.c (hash_rtx_cb): New. (hash_rtx): Use it. * dbgcnt.def (sel_sched_cnt, sel_sched_region_cnt, sel_sched_insn_cnt): New counters. * final.c (compute_alignments): Export. Free dominance info after loop_optimizer_finalize. * genattr.c (main): Output maximal_insn_latency prototype. * genautomata.c (output_default_latencies): New. Factor its code from ... (output_internal_insn_latency_func): ... here. (output_internal_maximal_insn_latency_func): New. (output_maximal_insn_latency_func): New. * hard-reg-set.h (UHOST_BITS_PER_WIDE_INT): Define unconditionally. (struct hard_reg_set_iterator): New. (hard_reg_set_iter_init, hard_reg_set_iter_set, hard_reg_set_iter_next): New functions. (EXECUTE_IF_SET_IN_HARD_REG_SET): New macro. * lists.c (remove_free_INSN_LIST_node, remove_free_EXPR_LIST_node): New functions. * loop-init.c (loop_optimizer_init): When LOOPS_HAVE_FALLTHRU_PREHEADERS, set CP_FALLTHRU_PREHEADERS when calling create_preheaders. (loop_optimizer_finalize): Do not verify flow info after reload. * recog.c (validate_replace_rtx_1): New parameter simplify. Default it to true. Update all uses. Factor out simplifying code to ... (simplify_while_replacing): ... this new function. (validate_replace_rtx_part, validate_replace_rtx_part_nosimplify): New. * recog.h (validate_replace_rtx_part, validate_replace_rtx_part_nosimplify): Declare. * rtl.c (rtx_equal_p_cb): New. (rtx_equal_p): Use it. * rtl.h (rtx_equal_p_cb, hash_rtx_cb): Declare. (remove_free_INSN_LIST_NODE, remove_free_EXPR_LIST_node, debug_bb_n_slim, debug_bb_slim, print_rtl_slim): Likewise. * vecprim.h: Add a vector type for unsigned int. * haifa-sched.c: Include vecprim.h and cfgloop.h. (issue_rate, sched_verbose_param, note_list, dfa_state_size, ready_try, cycle_issued_insns, spec_info): Make global. (readyp): Initialize. (dfa_lookahead): New global variable. (old_max_uid, old_last_basic_block): Remove. (h_i_d): Make it a vector. (INSN_TICK, INTER_TICK, QUEUE_INDEX, INSN_COST): Make them work through HID macro. (after_recovery, adding_bb_to_current_region_p): New variables to handle correct insertion of the recovery code. (struct ready_list): Move declaration to sched-int.h. (rgn_n_insns): Removed. (rtx_vec_t): Move to sched-int.h. (find_insn_reg_weight): Remove. (find_insn_reg_weight1): Rename to find_insn_reg_weight. (haifa_init_h_i_d, haifa_finish_h_i_d): New functions to initialize / finalize haifa instruction data. (extend_h_i_d, init_h_i_d): Rewrite. (unlink_other_notes): Move logic to add_to_note_list. Handle selective scheduler. (ready_lastpos, ready_element, ready_sort, reemit_notes, find_fallthru_edge): Make global, remove static prototypes. (max_issue): Make global. Add privileged_n and state parameters. Use them. (extend_global, extend_all): Removed. (init_before_recovery): Add new param. Fix the handling of the case when we insert a recovery code before the EXIT which has a predecessor with a fallthrough edge to it. (create_recovery_block): Make global. Rename to sched_create_recovery_block. Update. (change_pattern): Rename to sched_change_pattern. Make global. (speculate_insn): Rename to sched_speculate_insn. Make global. Split haifa-specific functionality into ... (haifa_change_pattern): New static function. (sched_extend_bb): New static function. (sched_init_bbs): New function. (current_sched_info): Change type to struct haifa_sched_info. (insn_cost): Adjust for selective scheduling. (dep_cost_1): New function. Move logic from ... (dep_cost): ... here. (dep_cost): Use dep_cost_1. (contributes_to_priority_p): Use sched_deps_info instead of current_sched_info. (priority): Adjust to work with selective scheduling. Process the corner case when all dependencies don't contribute to priority. (rank_for_schedule): Use ds_weak instead of dep_weak. (advance_state): New function. Move logic from ... (advance_one_cycle): ... here. (add_to_note_list, concat_note_lists): New functions. (rm_other_notes): Make static. Adjust for selective scheduling. (remove_notes, restore_other_notes): New functions. (move_insn): Add two arguments. Update assert. Don't call reemit_notes. (choose_ready): Remove lookahead variable, use dfa_lookahead. Remove more_issue, max_points. Move the code to initialize max_lookahead_tries to max_issue. (schedule_block): Remove rgn_n_insns1 parameter. Don't allocate ready. Adjust use of move_insn. Call restore_other_notes. (luid): Remove. (sched_init, sched_finish): Move Haifa-specific initialization/ finalization to ... (haifa_sched_init, haifa_sched_finish): ... respectively. New functions. (setup_sched_dump): New function. (haifa_init_only_bb): New static function. (haifa_speculate_insn): New static function. (try_ready): Use haifa_* instead of speculate_insn and change_pattern. (extend_ready, extend_all): Remove. (sched_extend_ready_list, sched_finish_ready_list): New functions. (create_check_block_twin, add_to_speculative_block): Use haifa_insns_init instead of extend_global. Update to use new initialization functions. Change parameter. Factor out code from create_check_block_twin to ... (sched_create_recovery_edges) ... this new function. (add_block): Remove. (sched_scan_info): New. (extend_bb): Use sched_scan_info. (init_bb, extend_insn, init_insn, init_insns_in_bb, sched_scan): New static functions for walking through scheduling region. (sched_luids): New vector variable to replace uid_to_luid. (luids_extend_insn): New function. (sched_max_luid): New variable. (luids_init_insn): New function. (sched_init_luids, sched_finish_luids): New functions. (insn_luid): New debug function. (sched_extend_target): New function. (haifa_init_insn): New static function. (sched_init_only_bb): New hook. (sched_split_block): New hook. (sched_split_block_1): New function. (sched_create_empty_bb): New hook. (sched_create_empty_bb_1): New function. (common_sched_info, ready): New global variables. (current_sched_info_var): Remove. (move_block_after_check): Use common_sched_info. (haifa_luid_for_non_insn): New static function. (init_before_recovery): Use haifa_init_only_bb instead of add_block. (increase_insn_priority): New. * modulo-sched.c: (issue_rate): Remove static declaration. (sms_sched_info): Change type to haifa_sched_info. (sms_sched_deps_info, sms_common_sched_info): New variables. (setup_sched_infos): New. (sms_schedule): Initialize them. Call haifa_sched_init/finish. Do not call regstat_free_calls_crossed. (sms_print_insn): Use const_rtx. * params.def (PARAM_MAX_PIPELINE_REGION_BLOCKS, PARAM_MAX_PIPELINE_REGION_INSNS, PARAM_SELSCHED_MAX_LOOKAHEAD, PARAM_SELSCHED_MAX_SCHED_TIMES, PARAM_SELSCHED_INSNS_TO_RENAME, PARAM_SCHED_MEM_TRUE_DEP_COST): New. * sched-deps.c (sched_deps_info): New. Update all relevant uses of current_sched_info to use it. (enum reg_pending_barrier_mode): Move to sched-int.h. (h_d_i_d): New variable. Initialize to NULL. ({true, output, anti, spec, forward}_dependency_cache): Initialize to NULL. (estimate_dep_weak): Remove static declaration. (sched_has_condition_p): New function. Adjust users of sched_get_condition to use it instead. (conditions_mutex_p): Add arguments indicating which conditions are reversed. Use them. (sched_get_condition_with_rev): Rename from sched_get_condition. Add argument to indicate whether returned condition is reversed. Do not generate new rtx when condition should be reversed; indicate it by setting new argument instead. (add_dependence_list_and_free): Add deps parameter. Update all users. Do not free dependence list when deps context is readonly. (add_insn_mem_dependence, flush_pending_lists): Adjust for readonly contexts. (remove_from_dependence_list, remove_from_both_dependence_lists): New. (remove_from_deps): New. Use the above functions. (cur_insn, can_start_lhs_rhs_p): New static variables. (add_or_update_back_dep_1): Initialize present_dep_type. (haifa_start_insn, haifa_finish_insn, haifa_note_reg_set, haifa_note_reg_clobber, haifa_note_reg_use, haifa_note_mem_dep, haifa_note_dep): New functions implementing dependence hooks for the Haifa scheduler. (note_reg_use, note_reg_set, note_reg_clobber, note_mem_dep, note_dep): New functions. (ds_to_dt, extend_deps_reg_info, maybe_extend_reg_info_p): New functions. (init_deps): Initialize last_reg_pending_barrier and deps->readonly. (free_deps): Initialize deps->reg_last. (sched_analyze_reg, sched_analyze_1, sched_analyze_2, sched_analyze_insn): Update to use dependency hooks infrastructure and readonly contexts. (deps_analyze_insn): New function. Move part of logic from ... (sched_analyze): ... here. Also move some logic to ... (deps_start_bb): ... here. New function. (add_forw_dep, delete_forw_dep): Guard use of INSN_DEP_COUNT with sel_sched_p. (sched_deps_init): New function. Move code from ... (init_dependency_caches): ... here. Remove. (init_deps_data_vector): New. (sched_deps_finish): New function. Move code from ... (free_dependency_caches): ... here. Remove. (init_deps_global, finish_deps_global): Adjust for use with selective scheduling. (get_dep_weak): Move logic to ... (get_dep_weak_1): New function. (ds_merge): Move logic to ... (ds_merge_1): New static function. (ds_full_merge, ds_max_merge, ds_get_speculation_types): New functions. (ds_get_max_dep_weak): New function. * sched-ebb.c (sched_n_insns): Rename to sched_rgn_n_insns. (n_insns): Rename to rgn_n_insns. (debug_ebb_dependencies): New function. (init_ready_list): Use it. (begin_schedule_ready): Use sched_init_only_bb. (ebb_print_insn): Indicate when an insn starts a new cycle. (contributes_to_priority, compute_jump_reg_dependencies, add_remove_insn, fix_recovery_cfg): Add ebb_ prefix to function names. (add_block1): Remove to ebb_add_block. (ebb_sched_deps_info, ebb_common_sched_info): New variables. (schedule_ebb): Initialize them. Use remove_notes instead of rm_other_notes. Use haifa_local_init/finish. (schedule_ebbs): Use haifa_sched_init/finish. * sched-int.h: Include vecprim.h, remove rtl.h. (struct ready_list): Delete declaration. (sched_verbose_param, enum sched_pass_id_t, bb_vec_t, insn_vec_t, rtx_vec_t): New. (struct sched_scan_info_def): New structure. (sched_scan_info, sched_scan, sched_init_bbs, sched_init_luids, sched_finish_luids, sched_extend_target, haifa_init_h_i_d, haifa_finish_h_i_d): Declare. (struct common_sched_info_def): New. (common_sched_info, haifa_common_sched_info, sched_emulate_haifa_p): Declare. (sel_sched_p): New. (sched_luids): Declare. (INSN_LUID, LUID_BY_UID, SET_INSN_LUID): Declare. (sched_max_luid, insn_luid): Declare. (note_list, remove_notes, restore_other_notes, bb_note): Declare. (sched_insns_init, sched_insns_finish, xrecalloc, reemit_notes, print_insn, print_pattern, print_value, haifa_classify_insn, sel_find_rgns, sel_mark_hard_insn, dfa_state_size, advance_state, setup_sched_dump, sched_init, sched_finish, sel_insn_is_speculation_check): Export. (struct ready_list): Move from haifa-sched.c. (ready_try, ready, max_issue): Export. (ebb_compute_jump_reg_dependencies, find_fallthru_edge, sched_init_only_bb, sched_split_block, sched_split_block_1, sched_create_empty_bb, sched_create_empty_bb_1, sched_create_recovery_block, sched_create_recovery_edges): Export. (enum reg_pending_barrier_mode): Export. (struct deps): New fields `last_reg_pending_barrier' and `readonly'. (deps_t): New. (struct sched_info): Rename to haifa_sched_info. Use const_rtx for print_insn field. Move add_block and fix_recovery_cfg to common_sched_info_def. Move compute_jump_reg_dependencies, use_cselib ... (struct sched_deps_info_def): ... this new structure. (sched_deps_info): Declare. (struct spec_info_def): Remove weakness_cutoff, add data_weakness_cutoff and control_weakness_cutoff. (spec_info): Declare. (struct _haifa_deps_insn_data): Split from haifa_insn_data. Add dep_count field. (struct haifa_insn_data): Rename to struct _haifa_insn_data. (haifa_insn_data_def, haifa_insn_data_t): New typedefs. (current_sched_info): Change type to struct haifa_sched_info. (haifa_deps_insn_data_def, haifa_deps_insn_data_t): New typedefs. (h_d_i_d): New variable. (HDID): New accessor macro. (h_i_d): Change type to VEC (haifa_insn_data_def, heap) *. (HID): New accessor macro. Rewrite h_i_d accessor macros through HID and HDID. (IS_SPECULATION_CHECK_P): Update for selective scheduler. (enum SCHED_FLAGS): Update for selective scheduler. (enum SPEC_SCHED_FLAGS): New flag SEL_SCHED_SPEC_DONT_CHECK_CONTROL. (init_dependency_caches, free_dependency_caches): Delete declarations. (deps_analyze_insn, remove_from_deps, get_dep_weak_1, estimate_dep_weak, ds_full_merge, ds_max_merge, ds_weak, ds_get_speculation_types, ds_get_max_dep_weak, sched_deps_init, sched_deps_finish, haifa_note_reg_set, haifa_note_reg_use, haifa_note_reg_clobber, maybe_extend_reg_info_p, deps_start_bb, ds_to_dt): Export. (rm_other_notes): Delete declaration. (schedule_block): Remove one argument. (cycle_issued_insns, issue_rate, dfa_lookahead, ready_sort, ready_element, ready_lastpos, sched_extend_ready_list, sched_finish_ready_list, sched_change_pattern, sched_speculate_insn, concat_note_lists): Export. (struct region): Move from sched-rgn.h. (nr_regions, rgn_table, rgn_bb_table, block_to_bb, containing_rgn, RGN_NR_BLOCKS, RGN_BLOCKS, RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB, BLOCK_TO_BB, CONTAINING_RGN): Export. (ebb_head, BB_TO_BLOCK, EBB_FIRST_BB, EBB_LAST_BB, INSN_BB): Likewise. (current_nr_blocks, current_blocks, target_bb): Likewise. (dep_cost_1, sched_is_disabled_for_current_region_p, sched_rgn_init, sched_rgn_finish, rgn_setup_region, sched_rgn_compute_dependencies, sched_rgn_local_init, extend_regions, rgn_make_new_region_out_of_new_block, compute_priorities, debug_rgn_dependencies, free_rgn_deps, contributes_to_priority, extend_rgns, deps_join rgn_setup_common_sched_info, rgn_setup_sched_infos, debug_regions, debug_region, dump_region_dot, dump_region_dot_file, haifa_sched_init, haifa_sched_finish): Export. (get_rgn_sched_max_insns_priority, sel_add_to_insn_priority, increase_insn_priority): Likewise. * sched-rgn.c: Include sel-sched.h. (ref_counts): New static variable. Use it ... (INSN_REF_COUNT): ... here. Rewrite and move closer to uses. (FED_BY_SPEC_LOAD, IS_LOAD_INSN): Rewrite to use HID accessor macro. (sched_is_disabled_for_current_region_p): Delete static declaration. (struct region): Move to sched-int.h. (nr_regions, rgn_table, rgn_bb_table, block_to_bb, containing_rgn, ebb_head): Define and initialize. (RGN_NR_BLOCKS, RGN_BLOCKS, RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB, BLOCK_TO_BB, CONTAINING_RGN, debug_regions, extend_regions, BB_TO_BLOCK, EBB_FIRST_BB, EBB_LAST_BB): Move to sched-int.h. (find_single_block_region): Add new argument to indicate that EBB regions should be constructed. (debug_live): Delete declaration. (current_nr_blocks, current_blocks, target_bb): Remove static qualifiers. (compute_dom_prob_ps, check_live, update_live, set_spec_fed): Delete declaration. (init_regions): Delete declaration. (debug_region, bb_in_region_p, dump_region_dot_file, dump_region_dot, rgn_estimate_number_of_insns): New. (too_large): Use estimate_number_of_insns. (haifa_find_rgns): New. Move the code from ... (find_rgns): ... here. Call either sel_find_rgns or haifa_find_rgns. (free_trg_info): New. (compute_trg_info): Allocate candidate tables here instead of ... (init_ready_list): ... here. (rgn_print_insn): Use const_rtx. (contributes_to_priority, extend_regions): Delete static declaration. (add_remove_insn, fix_recovery_cfg): Add rgn_ to function names. (add_block1): Rename to rgn_add_block. (debug_rgn_dependencies): Delete static qualifier. (new_ready): Use sched_deps_info. Simplify. (rgn_common_sched_info, rgn_const_sched_deps_info, rgn_const_sel_sched_deps_info, rgn_sched_deps_info, rgn_sched_info): New. (region_sched_info): Rename to rgn_const_sched_info. (deps_join): New, extracted from ... (propagate_deps): ... here. (compute_block_dependences, debug_dependencies): Update for selective scheduling. (free_rgn_deps, compute_priorities): New functions. (sched_rgn_init, sched_rgn_finish, rgn_setup_region, sched_rgn_compute_dependencies): New functions. (schedule_region): Use them. (sched_rgn_local_init, sched_rgn_local_free, sched_rgn_local_finish, rgn_setup_common_sched_info, rgn_setup_sched_infos): New functions. (schedule_insns): Call new functions that were split out. (rgn_make_new_region_out_of_new_block): New. (get_rgn_sched_max_insns_priority): New. (rest_of_handle_sched, rest_of_handle_sched2): Call selective scheduling when appropriate. * sched-vis.c: Include insn-attr.h. (print_value, print_pattern): Make global. (print_rtl_slim, debug_bb_slim, debug_bb_n_slim): New functions. * target-def.h (TARGET_SCHED_ADJUST_COST_2, TARGET_SCHED_ALLOC_SCHED_CONTEXT, TARGET_SCHED_INIT_SCHED_CONTEXT, TARGET_SCHED_SET_SCHED_CONTEXT, TARGET_SCHED_CLEAR_SCHED_CONTEXT, TARGET_SCHED_FREE_SCHED_CONTEXT, TARGET_SCHED_GET_INSN_CHECKED_DS, TARGET_SCHED_GET_INSN_SPEC_DS, TARGET_SCHED_SKIP_RTX_P): New target hooks. Initialize them to 0. (TARGET_SCHED_GEN_CHECK): Rename to TARGET_SCHED_GEN_SPEC_CHECK. * target.h (struct gcc_target): Add them. Rename gen_check field to gen_spec_check. * flags.h (sel_sched_switch_set): Declare. * opts.c (sel_sched_switch_set): New variable. (decode_options): Unset flag_sel_sched_pipelining_outer_loops if pipelining is disabled from command line. (common_handle_option): Record whether selective scheduling is requested from command line. * doc/invoke.texi: Document new flags and parameters. * doc/tm.texi: Document new target hooks. * config/ia64/ia64.c (TARGET_SCHED_GEN_SPEC_CHECK): Define to ia64_gen_check. (dfa_state_size): Do not declare locally. * config/ia64/ia64.opt (msched-ar-data-spec): Default to 0. * config/rs6000/rs6000.c (rs6000_init_sched_context, rs6000_alloc_sched_context, rs6000_set_sched_context, rs6000_free_sched_context): New functions. (struct _rs6000_sched_context): New. (rs6000_sched_reorder2): Do not modify INSN_PRIORITY for selective scheduling. (rs6000_sched_finish): Do not run for selective scheduling. Co-Authored-By: Alexander Monakov <amonakov@ispras.ru> Co-Authored-By: Dmitry Melnik <dm@ispras.ru> Co-Authored-By: Dmitry Zhurikhin <zhur@ispras.ru> Co-Authored-By: Maxim Kuvyrkov <maxim@codesourcery.com> From-SVN: r139854
2008-09-01 10:57:00 +02:00
setup_sched_infos ();
haifa_sched_init ();
/* Allocate memory to hold the DDG array one entry for each loop.
We use loop->num as index into this array. */
function.h (loops_for_fn): New inline function. 2013-04-30 Richard Biener <rguenther@suse.de> * function.h (loops_for_fn): New inline function. (set_loops_for_fn): Likewise. * cfgloop.h (place_new_loop): Add struct function parameter. (get_loop): Likewise. (get_loops): Likewise. (number_of_loops): Likewise. (fel_next): Adjust. (fel_init): Likewise. * cfg.c (get_loop_copy): Adjust. * cfgloop.c (flow_loops_dump): Likewise. (record_loop_exits): Likewise. (verify_loop_structure): Likewise. * cfgloopanal.c (mark_irreducible_loops): Likewise. (estimate_reg_pressure_cost): Likewise. (mark_loop_exit_edges): Likewise. * cfgloopmanip.c (place_new_loop): Likewise. (add_loop): Likewise. (duplicate_loop): Likewise. * graph.c (draw_cfg_nodes): Likewise. * graphite-clast-to-gimple.c (translate_clast_user): Likewise. * graphite-sese-to-poly.c (build_scop_scattering): Likewise. (extract_affine_chrec): Likewise. (build_scop_iteration_domain): Likewise. * graphite.c (graphite_initialize): Likewise. * ira-build.c (create_loop_tree_nodes): Likewise. (more_one_region_p): Likewise. (rebuild_regno_allocno_maps): Likewise. (mark_loops_for_removal): Likewise. (mark_all_loops_for_removal): Likewise. (remove_unnecessary_regions): Likewise. (ira_build): Likewise. * ira-emit.c (setup_entered_from_non_parent_p): Likewise. * loop-init.c (fix_loop_structure): Likewise. (gate_rtl_move_loop_invariants): Likewise. (gate_rtl_unswitch): Likewise. (gate_rtl_unroll_and_peel_loops): Likewise. (rtl_doloop): Likewise. * lto-streamer-in.c (input_cfg): Likewise. * lto-streamer-out.c (output_cfg): Likewise. * modulo-sched.c (sms_schedule): Likewise. * predict.c (tree_estimate_probability): Likewise. (tree_estimate_probability_driver): Likewise. (estimate_loops): Likewise. * tree-cfg.c (fixup_loop_arrays_after_move): Likewise. (move_sese_region_to_fn): Likewise. (debug_loop_num): Likewise. * tree-chrec.c (chrec_evaluate): Likewise. (hide_evolution_in_other_loops_than_loop): Likewise. (chrec_component_in_loop_num): Likewise. (reset_evolution_in_loop): Likewise. (evolution_function_is_invariant_rec_p): Likewise. * tree-if-conv.c (main_tree_if_conversion): Likewise. * tree-inline.c (copy_loops): Likewise. (copy_cfg_body): Likewise. (tree_function_versioning): Likewise. * tree-loop-distribution.c (rdg_flag_loop_exits): Likewise. * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop): Likewise. (add_to_evolution_1): Likewise. (scev_const_prop): Likewise. * tree-scalar-evolution.h (get_chrec_loop): Likewise. * tree-ssa-loop-ch.c (copy_loop_headers): Likewise. * tree-ssa-loop-im.c (analyze_memory_references): Likewise. (tree_ssa_lim_initialize): Likewise. * tree-ssa-loop-manip.c (rewrite_into_loop_closed_ssa): Likewise. (verify_loop_closed_ssa): Likewise. * tree-ssa-loop.c (tree_ssa_loop_init): Likewise. (tree_ssa_loop_im): Likewise. (tree_ssa_loop_unswitch): Likewise. (tree_vectorize): Likewise. (check_data_deps): Likewise. (tree_ssa_loop_ivcanon): Likewise. (tree_ssa_loop_bounds): Likewise. (tree_complete_unroll): Likewise. (tree_complete_unroll_inner): Likewise. (tree_parallelize_loops): Likewise. (tree_ssa_loop_prefetch): Likewise. (tree_ssa_loop_ivopts): Likewise. * tree-ssa.c (execute_update_addresses_taken): Liekwise. * tree-vectorizer.c (vectorize_loops): Likewise. From-SVN: r198441
2013-04-30 10:14:09 +02:00
g_arr = XCNEWVEC (ddg_ptr, number_of_loops (cfun));
if (dump_file)
{
fprintf (dump_file, "\n\nSMS analysis phase\n");
fprintf (dump_file, "===================\n\n");
}
/* Build DDGs for all the relevant loops and hold them in G_ARR
indexed by the loop index. */
FOR_EACH_LOOP (loop, 0)
{
rtx_insn *head, *tail;
rtx count_reg;
/* For debugging. */
if (dbg_cnt (sms_sched_loop) == false)
{
if (dump_file)
fprintf (dump_file, "SMS reached max limit... \n");
break;
}
if (dump_file)
{
rtx_insn *insn = BB_END (loop->header);
fprintf (dump_file, "SMS loop num: %d", loop->num);
Integrate lexical block into source_location. gcc: 2012-09-19 Dehao Chen <dehao@google.com> * toplev.c (general_init): Init block_locations. * tree.c (tree_set_block): New. (tree_block): Change to use LOCATION_BLOCK. * tree.h (TREE_SET_BLOCK): New. * final.c (reemit_insn_block_notes): Change to use LOCATION_BLOCK. (final_start_function): Likewise. * input.c (expand_location_1): Likewise. * input.h (LOCATION_LOCUS): New. (LOCATION_BLOCK): New. (IS_UNKNOWN_LOCATION): New. * fold-const.c (expr_location_or): Change to use new location. * reorg.c (emit_delay_sequence): Likewise. (try_merge_delay_insns): Likewise. * modulo-sched.c (dump_insn_location): Likewise. * lto-streamer-out.c (lto_output_location_bitpack): Likewise. * lto-cgraph.c (output_node_opt_summary): Likewise. * jump.c (rtx_renumbered_equal_p): Likewise. * ifcvt.c (noce_try_move): Likewise. (noce_try_store_flag): Likewise. (noce_try_store_flag_constants): Likewise. (noce_try_addcc): Likewise. (noce_try_store_flag_mask): Likewise. (noce_try_cmove): Likewise. (noce_try_cmove_arith): Likewise. (noce_try_minmax): Likewise. (noce_try_abs): Likewise. (noce_try_sign_mask): Likewise. (noce_try_bitop): Likewise. (noce_process_if_block): Likewise. (cond_move_process_if_block): Likewise. (find_cond_trap): Likewise. * ipa-prop.c (ipa_set_jf_constant): Likewise. (ipa_write_jump_function): Likewise. * dwarf2out.c (add_src_coords_attributes): Likewise. * expr.c (expand_expr_real): Likewise. * tree-parloops.c (create_loop_fn): Likewise. * recog.c (peep2_attempt): Likewise. * function.c (free_after_compilation): Likewise. (expand_function_end): Likewise. (set_insn_locations): Likewise. (thread_prologue_and_epilogue_insns): Likewise. * print-rtl.c (print_rtx): Likewise. * profile.c (branch_prob): Likewise. * trans-mem.c (ipa_tm_scan_irr_block): Likewise. * gimplify.c (gimplify_call_expr): Likewise. * except.c (duplicate_eh_regions_1): Likewise. * emit-rtl.c (try_split): Likewise. (make_insn_raw): Likewise. (make_debug_insn_raw): Likewise. (make_jump_insn_raw): Likewise. (make_call_insn_raw): Likewise. (emit_pattern_after_setloc): Likewise. (emit_pattern_after): Likewise. (emit_debug_insn_after): Likewise. (emit_pattern_before): Likewise. (emit_insn_before_setloc): Likewise. (emit_jump_insn_before): Likewise. (emit_call_insn_before_setloc): Likewise. (emit_call_insn_before): Likeise. (emit_debug_insn_before_setloc): Likewise. (emit_copy_of_insn_after): Likewise. (insn_locators_alloc): Remove. (insn_locators_finalize): Remove. (insn_locators_free): Remove. (set_curr_insn_source_location): Remove. (get_curr_insn_source_location): Remove. (set_curr_insn_block): Remove. (get_curr_insn_block): Remove. (locator_scope): Remove. (insn_scope): Change to use new location. (locator_location): Remove. (insn_line): Change to use new location. (locator_file): Remove. (insn_file): Change to use new location. (locator_eq): Remove. (insn_locations_init): New. (insn_locations_finalize): New. (set_curr_insn_location): New. (curr_insn_location): New. * cfgexpand.c (gimple_assign_rhs_to_tree): Change to use new location. (expand_gimple_cond): Likewise. (expand_call_stmt): Likewise. (expand_gimple_stmt_1): Likewise. (expand_gimple_basic_block): Likewise. (construct_exit_block): Likewise. (gimple_expand_cfg): Likewise. * cfgcleanup.c (try_forward_edges): Likewise. * tree-ssa-live.c (remove_unused_scope_block_p): Likewise. (dump_scope_block): Likewise. (remove_unused_locals): Likewise. * rtl.c (rtx_equal_p_cb): Likewise. (rtx_equal_p): Likewise. * rtl.h (XUINT): New. (INSN_LOCATOR): Remove. (CURR_INSN_LOCATION): Remove. (INSN_LOCATION): New. (INSN_HAS_LOCATION): New. * tree-inline.c (remap_gimple_op_r): Change to use new location. (copy_tree_body_r): Likewise. (copy_phis_for_bb): Likewise. (expand_call_inline): Likewise. * tree-streamer-in.c (lto_input_ts_exp_tree_pointers): Likewise. * tree-streamer-out.c (write_ts_decl_minimal_tree_pointers): Likewise. * gimple-streamer-out.c (output_gimple_stmt): Likewise. * combine.c (try_combine): Likewise. * tree-outof-ssa.c (set_location_for_edge): Likewise. (insert_partition_copy_on_edge): Likewise. (insert_value_copy_on_edge): Likewise. (insert_rtx_to_part_on_edge): Likewise. (insert_part_to_rtx_on_edge): Likewise. * basic-block.h (edge_def): Remove field. * gimple.h (gimple_statement_base): Remove field. (gimple_bb): Change to use new location. (gimple_set_block): Likewise. (gimple_has_location): Likewise. * tree-cfg.c (make_cond_expr_edges): Likewise. (make_goto_expr_edges): Likewise. (gimple_can_merge_blocks_p): Likewise. (move_stmt_op): Likewise. (move_block_to_fn): Likewise. * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/i386/i386.c (x86_output_mi_thunk): Likewise. * config/tilegx/tilegx.c (tilegx_output_mi_thunk): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/ia64/ia64.c (ia64_output_mi_thunk): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/score/score.c (score_output_mi_thunk): Likewise. * config/tilepro/tilepro.c (tilepro_asm_output_mi_thunk): Likewise. * config/mips/mips.c (mips_output_mi_thunk): Likewise. * cfgrtl.c (unique_locus_on_edge_between_p): Likewise. (unique_locus_on_edge_between_p): Likewise. (emit_nop_for_unique_locus_between): Likewise. (force_nonfallthru_and_redirect): Likewise. (fixup_reorder_chain): Likewise. (cfg_layout_merge_blocks): Likewise. * stmt.c (emit_case_nodes): Likewise. gcc/lto: 2012-09-19 Dehao Chen <dehao@google.com> * lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field. libcpp: 2012-09-19 Dehao Chen <dehao@google.com> * include/line-map.h (MAX_SOURCE_LOCATION): New value. (location_adhoc_data_fini): New. (get_combined_adhoc_loc): New. (get_data_from_adhoc_loc): New. (get_location_from_adhoc_loc): New. (location_adhoc_data_map): New. (COMBINE_LOCATION_DATA): New. (IS_ADHOC_LOC): New. (expanded_location): New field. (line_maps): New field. * line-map.c (location_adhoc_data): New. (location_adhoc_data_hash): New. (location_adhoc_data_eq): New. (location_adhoc_data_update): New. (get_combined_adhoc_loc): New. (get_data_from_adhoc_loc): New. (get_location_from_adhoc_loc): New. (location_adhoc_data_init): New. (location_adhoc_data_fini): New. (linemap_init): Initialize location_adhoc_data. (linemap_lookup): Change to use new location. (linemap_ordinary_map_lookup): Likewise. (linemap_macro_map_lookup): Likewise. (linemap_macro_map_loc_to_def_point): Likewise. (linemap_macro_map_loc_unwind_toward_spel): Likewise. (linemap_get_expansion_line): Likewise. (linemap_get_expansion_filename): Likewise. (linemap_location_in_system_header_p): Likewise. (linemap_location_from_macro_expansion_p): Likewise. (linemap_macro_loc_to_spelling_point): Likewise. (linemap_macro_loc_to_def_point): Likewise. (linemap_macro_loc_to_exp_point): Likewise. (linemap_resolve_location): Likewise. (linemap_unwind_toward_expansion): Likewise. (linemap_unwind_to_first_non_reserved_loc): Likewise. (linemap_expand_location): Likewise. (linemap_dump_location): Likewise. (linemap_line_start): Likewise. From-SVN: r191494
2012-09-19 21:56:42 +02:00
dump_insn_location (insn);
fprintf (dump_file, "\n");
}
tree-vrp.c (execute_vrp): Do not pass dump argument to. * tree-vrp.c (execute_vrp): Do not pass dump argument to. loop_optimizer_init and loop_optimizer_finalize * tree-ssa-sink.c (execute_sink_code): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init, tree_ssa_loop_done): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Ditto. * sched-ebb.c: Include output.h. (schedule_ebbs): Do not use dump argument. * value-prof.h (struct profile_hooks): Remove profile_dump_file. * loop.c (loop_dump_stream): Removed. (loop_optimize, rest_of_handle_loop_optimize): Do not use dump argument. (scan_loop, move_movables, find_and_verify_loops, mark_loop_jump, emit_prefetch_instructions, loop_bivs_find, loop_bivs_check, final_biv_value, loop_biv_eliminable_p, loop_givs_rescan, loop_iterations, strength_reduce, record_biv, record_giv, final_giv_value, check_final_value, check_ext_dependent_givs, combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems, try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use dump_file instead of loop_dump_stream. * ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call argument dump_file. * reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use dump argument. * flow.c (life_analysis, rest_of_handle_life): Ditto. * haifa-sched.c: Include output.h (schedule_insns, sched_init): Do not use dump argument. * mode-switching.c (optimize_mode_switching): Ditto. * modulo-sched.c (stats_file): Removed. (print_node_sched_params): Do not call argument dump_file. (sms_schedule_by_order, loop_canon_p, sms_schedule, rest_of_handle_sms): Do not use dump argument. Use dump_file instead of stats_file. * cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not use dump argument. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize, rtl_loop_init, rtl_loop_done): Ditto. * global.c (global_alloc, rest_of_handle_global_alloc): Ditto. * predict.c (combine_predictions_for_bb, tree_estimate_probability): Ditto. * recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto. * lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto. * regmove.c (fixup_match_1, fixup_match_2, regmove_optimize, rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto. * emit-rtl.c (renumber_insns): Ditto. * cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr, expand_gimple_basic_block, tree_expand_cfg): Ditto. * regclass.c (regclass): Ditto. * tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts, remove_ssa_form, rewrite_out_of_ssa): Ditto. * reg-stack.c (compensate_edge, compensate_edges, convert_regs_1, convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs): Ditto. * sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto. * local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file to regclass. * gcse.c (gcse_file, debug_stderr): Removed. (gcse_main, bypass_jumps, rest_of_handle_jump_bypass, rest_of_handle_gcse): Do not use dump argument. (cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets, one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb, pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass, compute_code_hoist_vbeinout, compute_code_hoist_data, one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores, compute_store_table, build_store_vectors, insert_insn_start_bb, insert_store, remove_reachable_equiv_notes, replace_store_insn, store_motion): Use dump_file instead of gcse_file. * ipa-type-escape.c (type_escape_execute): Remove debugging comments. * profile.c (profile_dump_file): Removed. (branch_prob): Use dump_file instead of profile_dump_file. * ipa.c (cgraph_remove_unreachable_nodes): Do not call argument dump_file. * tree-ssa-copy.c (dump_copy_of): Ditto. * rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass dump file to life_analysis. * bt-load.c (branch_target_load_optimize): Ditto. * cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to renumber_insns. * rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs, regclass, dbr_schedule): Declaration changed. * sched-int.h (sched_init): Declaration changed. * tree-profile.c (tree_profile_dump_file): Removed. (tree_profile_hooks): Removed profile_dump_file hook. * rtl-profile (rtl_profile_dump_file): Removed. (rtl_profile_hooks): emoved profile_dump_file hook. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * c-gimplify.c (c_genericize): Do not call local variable dump_file. * tree-cfg.c (build_tree_cfg): Ditto. * Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency. * basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm): Declaration changed. * config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to life_analysis and schedule_insns. * config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to life_analysis. * config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to dbr_schedule. * config/mips/mips.c (mips_reorg): Ditto. * config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to schedule_ebbs. From-SVN: r110656
2006-02-06 19:20:47 +01:00
if (! loop_canon_p (loop))
continue;
if (! loop_single_full_bb_p (loop))
{
if (dump_file)
fprintf (dump_file, "SMS not loop_single_full_bb_p\n");
continue;
}
bb = loop->header;
target.h (struct spec_info_def): New opaque declaration. 2006-03-16 Maxim Kuvyrkov <mkuvyrkov@ispras.ru> * target.h (struct spec_info_def): New opaque declaration. (struct gcc_target.sched): New fields: adjust_cost_2, h_i_d_extended, speculate_insn, needs_block_p, gen_check, first_cycle_multipass_dfa_lookahead_guard_spec, set_sched_flags. * target-def.h (TARGET_SCHED_ADJUST_COST_2, TARGET_SCHED_H_I_D_EXTENDED, TARGET_SCHED_SPECULATE_INSN, TARGET_SCHED_NEEDS_BLOCK_P, TARGET_SCHED_GEN_CHECK, TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD_SPEC, TARGET_SCHED_SET_SCHED_FLAGS): New macros to initialize fields in gcc_target.sched. (TARGET_SCHED): Use new macros. * rtl.h (copy_DEPS_LIST_list): New prototype. * sched-int.h (struct sched_info): Change signature of new_ready field, adjust all initializations. New fields: add_remove_insn, begin_schedule_ready, add_block, advance_target_bb, fix_recovery_cfg, region_head_or_leaf_p. (struct spec_info_def): New structure declaration. (spec_info_t): New typedef. (struct haifa_insn_data): New fields: todo_spec, done_spec, check_spec, recovery_block, orig_pat. (glat_start, glat_end): New variables declaraions. (TODO_SPEC, DONE_SPEC, CHECK_SPEC, RECOVERY_BLOCK, ORIG_PAT): New access macros. (enum SCHED_FLAGS): New constants: SCHED_RGN, SCHED_EBB, DETACH_LIFE_INFO, USE_GLAT. (enum SPEC_SCHED_FLAGS): New enumeration. (NOTE_NOTE_BB_P): New macro. (extend_dependency_caches, xrecalloc, unlink_bb_notes, add_block, attach_life_info, debug_spec_status, check_reg_live): New functions. (get_block_head_tail): Change signature to get_ebb_head_tail, adjust all uses in ddg.c, modulo-sched.c, haifa-sched.c, sched-rgn.c, sched-ebb.c (get_dep_weak, ds_merge): Prototype functions from sched-deps.c . * ddg.c (get_block_head_tail): Adjust all uses. * modulo-sched.c (get_block_head_tail): Adjust all uses. (sms_sched_info): Initialize new fields. (contributes_to_priority): Removed. * haifa-sched.c (params.h): New include. (get_block_head_tail): Adjust all uses. (ISSUE_POINTS): New macro. (glat_start, glat_end): New global variables. (spec_info_var, spec_info, added_recovery_block_p, nr_begin_data, nr_be_in_data, nr_begin_control, nr_be_in_control, bb_header, old_last_basic_block, before_recovery, current_sched_info_var, rgn_n_insns, luid): New static variables. (insn_cost1): New function. Move logic from insn_cost to here. (find_insn_reg_weight1): New function. Move logic from find_insn_reg_weight to here. (reemit_notes, move_insn, max_issue): Change signature. (move_insn1): Removed. (extend_h_i_d, extend_ready, extend_global, extend_all, init_h_i_d, extend_bb): New static functions to support extension of scheduler's data structures. (generate_recovery_code, process_insn_depend_be_in_spec, begin_speculative_block, add_to_speculative_block, init_before_recovery, create_recovery_block, create_check_block_twin, fix_recovery_deps): New static functions to support generation of recovery code. (fix_jump_move, find_fallthru_edge, dump_new_block_header, restore_bb_notes, move_block_after_check, move_succs): New static functions to support ebb scheduling. (init_glat, init_glat1, attach_life_info1, free_glat): New static functions to support handling of register live information. (associate_line_notes_with_blocks, change_pattern, speculate_insn, sched_remove_insn, clear_priorities, calc_priorities, bb_note, add_jump_dependencies): New static functions. (check_cfg, has_edge_p, check_sched_flags): New static functions for consistancy checking. (debug_spec_status): New function to call from debugger. (priority): Added code to handle speculation checks. (rank_for_schedule): Added code to distinguish speculative instructions. (schedule_insn): Added code to handle speculation checks. (unlink_other_notes, rm_line_notes, restore_line_notes, rm_other_notes): Fixed to handle ebbs. (move_insn): Added code to handle ebb scheduling. (max_issue): Added code to use ISSUE_POINTS of instructions. (choose_ready): Added code to choose between speculative and non-speculative instructions. (schedule_block): Added code to handle ebb scheduling and scheduling of speculative instructions. (sched_init): Initialize new variables. (sched_finish): Free new variables. Print statistics. (try_ready): Added code to handle speculative instructions. * lists.c (copy_DEPS_LIST_list): New function. * sched-deps.c (extend_dependency_caches): New function. Move logic from create_dependency_caches to here. (get_dep_weak, ds_merge): Make global. * genattr.c (main): Code to output prototype for dfa_clear_single_insn_cache. * genautomata.c (DFA_CLEAR_SINGLE_INSN_CACHE_FUNC_NAME): New macros. (output_dfa_clean_insn_cache_func): Code to output dfa_clear_single_insn_cache function. * sched-ebb.c (target_n_insns): Remove. Adjust all users to use n_insns. (can_schedule_ready_p, fix_basic_block_boundaries, add_missing_bbs): Removed. (n_insns, dont_calc_deps, ebb_head, ebb_tail, last_bb): New static variables. (begin_schedule_ready, add_remove_insn, add_block1, advance_target_bb, fix_recovery_cfg, ebb_head_or_leaf_p): Implement hooks from struct sched_info. (ebb_sched_info): Initialize new fields. (get_block_head_tail): Adjust all uses. (compute_jump_reg_dependencies): Fixed to use glat_start. (schedule_ebb): Code to remove unreachable last block. (schedule_ebbs): Added code to update register live information. * sched-rgn.c (region_sched_info): Initialize new fields. (get_block_head_tail): Adjust all uses. (last_was_jump): Removed. Adjust users. (begin_schedule_ready, add_remove_insn, insn_points, extend_regions, add_block1, fix_recovery_cfg, advance_target_bb, region_head_or_leaf_p): Implement new hooks. (check_dead_notes1): New static function. (struct region): New fields: dont_calc_deps, has_real_ebb. (RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB): New access macros. (BB_TO_BLOCK): Fixed to handle EBBs. (EBB_FIRST_BB, EBB_LAST_BB): New macros. (ebb_head): New static variable. (debug_regions, contributes_to_priority): Fixed to handle EBBs. (find_single_block_regions, find_rgns, find_more_rgns): Initialize new fields. (compute_dom_prob_ps): New assertion. (check_live_1, update_live_1): Fixed to work with glat_start instead of global_live_at_start. (init_ready_list): New assertions. (can_schedule_ready_p): Split update code to begin_schedule_ready. (new_ready): Add support for BEGIN_CONTROL speculation. (schedule_insns): Fixed code that updates register live information to handle EBBs. (schedule_region): Fixed to handle EBBs. (init_regions): Use extend_regions and check_dead_notes1. * params.def (PARAM_MAX_SCHED_INSN_CONFLICT_DELAY, PARAM_SCHED_SPEC_PROB_CUTOFF): New parameters. * doc/tm.texi (TARGET_SCHED_ADJUST_COST_2, TARGET_SCHED_H_I_D_EXTENDED, TARGET_SCHED_SPECULATE_INSN, TARGET_SCHED_NEEDS_BLOCK_P, TARGET_SCHED_GEN_CHECK, TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD_SPEC, TARGET_SCHED_SET_SCHED_FLAGS): Document. * doc/invoke.texi (max-sched-insn-conflict-delay, sched-spec-prob-cutoff): Document. From-SVN: r112128
2006-03-16 06:27:03 +01:00
get_ebb_head_tail (bb, bb, &head, &tail);
latch_edge = loop_latch_edge (loop);
tree-loop-linear.c (linear_transform_loops): Use single_exit accessor functions. * tree-loop-linear.c (linear_transform_loops): Use single_exit accessor functions. * tree-ssa-loop-niter.c (loop_only_exit_p): Ditto. * cfgloopmanip.c (update_single_exits_after_duplication, update_single_exit_for_duplicated_loop, loop_version): Ditto. * tree-scalar-evolution.c (get_loop_exit_condition, get_exit_conditions_rec, loop_closed_phi_def, number_of_iterations_in_loop, scev_const_prop): Ditto. * tree-ssa-loop-ivopts.c (single_dom_exit): Ditto. * modulo-sched.c (generate_prolog_epilog, loop_canon_p, sms_schedule): Ditto. * tree-ssa-loop-ivcanon.c (canonicalize_loop_induction_variables): Ditto. * tree-vectorizer.c (slpeel_update_phis_for_duplicate_loop, slpeel_update_phi_nodes_for_guard1, slpeel_update_phi_nodes_for_guard2, slpeel_make_loop_iterate_ntimes, slpeel_tree_duplicate_loop_to_edge_cfg, slpeel_can_duplicate_loop_p, slpeel_verify_cfg_after_peeling, slpeel_tree_peel_loop_to_edge): Ditto. * tree-if-conv.c (if_convertible_loop_p): Ditto. * tree-vect-analyze.c (vect_analyze_operations, vect_stmt_relevant_p, vect_analyze_loop_form): Ditto. * lambda-code.c (lambda_loopnest_to_gcc_loopnest, exit_phi_for_loop_p, can_convert_to_perfect_nest, perfect_nestify): Ditto. * tree-vect-transform.c (vect_create_epilog_for_reduction, vect_update_ivs_after_vectorizer, vect_do_peeling_for_loop_bound, vect_transform_loop): Ditto. * cfgloop.c (mark_single_exit_loops, verify_loop_structure): Ditto. (single_exit, set_single_exit): New functions. * cfgloop.h (struct loop): Rename single_exit field to single_exit_. (single_exit, set_single_exit): Declare. * doc/loop.texi: Undocument single_exit field. Document single_exit accessor function. From-SVN: r119075
2006-11-22 00:54:16 +01:00
gcc_assert (single_exit (loop));
if (single_exit (loop)->count)
trip_count = latch_edge->count / single_exit (loop)->count;
cgraph.c: Fix typos in comments. gcc/ * cgraph.c: Fix typos in comments. (cgraph_availability_names): Fix string typo. * fold-const.c: Fix typos in comments. (fold_binary): Fix typo in warning. * genautomata.c: Fix typos in comments. (check_presence_pattern_sets): Fix typo in local variable. (output_description): Fix typo in output. * ggc-zone.c (ggc_pch_finish): Fix typo in error message. * hwint.h: Likewise. * matrix-reorg.c (check_allocation_function): Likewise. * omega.c (smooth_weird_equations): Likewise. * auto-inc-dec.c: Fix typos in comments. * bb-reorder.c: Likewise. * builtins.c: Likewise. * c-common.c: Likewise. * c-cppbuiltin.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfglayout.c: Likewise. * cfgloopmanip.c: Likewise. * cgraphunit.c: Likewise. * coverage.c: Likewise. * dbxout.c: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dfp.c: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * dse.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * function.c: Likewise. * function.h: Likewise. * gcc.c: Likewise. * gcov-io.c: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattrtab.c: Likewise. * ggc-page.c: Likewise. * gimplify.c: Likewise. * gthr-lynx.h: Likewise. * haifa-sched.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.h: Likewise. * ipa-pure-const.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa.c: Likewise. * loop-doloop.c: Likewise. * mips-tfile.c: Likewise. * mkmap-flat.awk: Likewise. * mkmap-symver.awk: Likewise. * modulo-sched.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts.c: Likewise. * passes.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * pretty-print.h: Likewise. * profile.c: Likewise. * protoize.c: Likewise. * ra-conflict.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * regclass.c: Likewise. * regs.h: Likewise. * reload.c: Likewise. * rtl-error.c: Likewise. * rtlanal.c: Likewise. * scan.h: Likewise. * sched-rgn.c: Likewise. * see.c: Likewise. * stmt.c: Likewise. * target.h: Likewise. * tree-dfa.c: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-alias-warnings.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.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-ivopts.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa.c: Likewise. * tree-vect-analyze.c: Likewise. * tree-vect-transform.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vn.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * unwind-dw2-fde.c: Likewise. * unwind.inc: Likewise. * value-prof.c: Likewise. * vmsdbgout.c: Likewise. From-SVN: r136425
2008-06-06 07:42:00 +02:00
/* Perform SMS only on loops that their average count is above threshold. */
if ( latch_edge->count
tree-loop-linear.c (linear_transform_loops): Use single_exit accessor functions. * tree-loop-linear.c (linear_transform_loops): Use single_exit accessor functions. * tree-ssa-loop-niter.c (loop_only_exit_p): Ditto. * cfgloopmanip.c (update_single_exits_after_duplication, update_single_exit_for_duplicated_loop, loop_version): Ditto. * tree-scalar-evolution.c (get_loop_exit_condition, get_exit_conditions_rec, loop_closed_phi_def, number_of_iterations_in_loop, scev_const_prop): Ditto. * tree-ssa-loop-ivopts.c (single_dom_exit): Ditto. * modulo-sched.c (generate_prolog_epilog, loop_canon_p, sms_schedule): Ditto. * tree-ssa-loop-ivcanon.c (canonicalize_loop_induction_variables): Ditto. * tree-vectorizer.c (slpeel_update_phis_for_duplicate_loop, slpeel_update_phi_nodes_for_guard1, slpeel_update_phi_nodes_for_guard2, slpeel_make_loop_iterate_ntimes, slpeel_tree_duplicate_loop_to_edge_cfg, slpeel_can_duplicate_loop_p, slpeel_verify_cfg_after_peeling, slpeel_tree_peel_loop_to_edge): Ditto. * tree-if-conv.c (if_convertible_loop_p): Ditto. * tree-vect-analyze.c (vect_analyze_operations, vect_stmt_relevant_p, vect_analyze_loop_form): Ditto. * lambda-code.c (lambda_loopnest_to_gcc_loopnest, exit_phi_for_loop_p, can_convert_to_perfect_nest, perfect_nestify): Ditto. * tree-vect-transform.c (vect_create_epilog_for_reduction, vect_update_ivs_after_vectorizer, vect_do_peeling_for_loop_bound, vect_transform_loop): Ditto. * cfgloop.c (mark_single_exit_loops, verify_loop_structure): Ditto. (single_exit, set_single_exit): New functions. * cfgloop.h (struct loop): Rename single_exit field to single_exit_. (single_exit, set_single_exit): Declare. * doc/loop.texi: Undocument single_exit field. Document single_exit accessor function. From-SVN: r119075
2006-11-22 00:54:16 +01:00
&& (latch_edge->count < single_exit (loop)->count * SMS_LOOP_AVERAGE_COUNT_THRESHOLD))
{
tree-vrp.c (execute_vrp): Do not pass dump argument to. * tree-vrp.c (execute_vrp): Do not pass dump argument to. loop_optimizer_init and loop_optimizer_finalize * tree-ssa-sink.c (execute_sink_code): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init, tree_ssa_loop_done): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Ditto. * sched-ebb.c: Include output.h. (schedule_ebbs): Do not use dump argument. * value-prof.h (struct profile_hooks): Remove profile_dump_file. * loop.c (loop_dump_stream): Removed. (loop_optimize, rest_of_handle_loop_optimize): Do not use dump argument. (scan_loop, move_movables, find_and_verify_loops, mark_loop_jump, emit_prefetch_instructions, loop_bivs_find, loop_bivs_check, final_biv_value, loop_biv_eliminable_p, loop_givs_rescan, loop_iterations, strength_reduce, record_biv, record_giv, final_giv_value, check_final_value, check_ext_dependent_givs, combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems, try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use dump_file instead of loop_dump_stream. * ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call argument dump_file. * reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use dump argument. * flow.c (life_analysis, rest_of_handle_life): Ditto. * haifa-sched.c: Include output.h (schedule_insns, sched_init): Do not use dump argument. * mode-switching.c (optimize_mode_switching): Ditto. * modulo-sched.c (stats_file): Removed. (print_node_sched_params): Do not call argument dump_file. (sms_schedule_by_order, loop_canon_p, sms_schedule, rest_of_handle_sms): Do not use dump argument. Use dump_file instead of stats_file. * cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not use dump argument. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize, rtl_loop_init, rtl_loop_done): Ditto. * global.c (global_alloc, rest_of_handle_global_alloc): Ditto. * predict.c (combine_predictions_for_bb, tree_estimate_probability): Ditto. * recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto. * lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto. * regmove.c (fixup_match_1, fixup_match_2, regmove_optimize, rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto. * emit-rtl.c (renumber_insns): Ditto. * cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr, expand_gimple_basic_block, tree_expand_cfg): Ditto. * regclass.c (regclass): Ditto. * tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts, remove_ssa_form, rewrite_out_of_ssa): Ditto. * reg-stack.c (compensate_edge, compensate_edges, convert_regs_1, convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs): Ditto. * sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto. * local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file to regclass. * gcse.c (gcse_file, debug_stderr): Removed. (gcse_main, bypass_jumps, rest_of_handle_jump_bypass, rest_of_handle_gcse): Do not use dump argument. (cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets, one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb, pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass, compute_code_hoist_vbeinout, compute_code_hoist_data, one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores, compute_store_table, build_store_vectors, insert_insn_start_bb, insert_store, remove_reachable_equiv_notes, replace_store_insn, store_motion): Use dump_file instead of gcse_file. * ipa-type-escape.c (type_escape_execute): Remove debugging comments. * profile.c (profile_dump_file): Removed. (branch_prob): Use dump_file instead of profile_dump_file. * ipa.c (cgraph_remove_unreachable_nodes): Do not call argument dump_file. * tree-ssa-copy.c (dump_copy_of): Ditto. * rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass dump file to life_analysis. * bt-load.c (branch_target_load_optimize): Ditto. * cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to renumber_insns. * rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs, regclass, dbr_schedule): Declaration changed. * sched-int.h (sched_init): Declaration changed. * tree-profile.c (tree_profile_dump_file): Removed. (tree_profile_hooks): Removed profile_dump_file hook. * rtl-profile (rtl_profile_dump_file): Removed. (rtl_profile_hooks): emoved profile_dump_file hook. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * c-gimplify.c (c_genericize): Do not call local variable dump_file. * tree-cfg.c (build_tree_cfg): Ditto. * Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency. * basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm): Declaration changed. * config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to life_analysis and schedule_insns. * config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to life_analysis. * config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to dbr_schedule. * config/mips/mips.c (mips_reorg): Ditto. * config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to schedule_ebbs. From-SVN: r110656
2006-02-06 19:20:47 +01:00
if (dump_file)
{
Integrate lexical block into source_location. gcc: 2012-09-19 Dehao Chen <dehao@google.com> * toplev.c (general_init): Init block_locations. * tree.c (tree_set_block): New. (tree_block): Change to use LOCATION_BLOCK. * tree.h (TREE_SET_BLOCK): New. * final.c (reemit_insn_block_notes): Change to use LOCATION_BLOCK. (final_start_function): Likewise. * input.c (expand_location_1): Likewise. * input.h (LOCATION_LOCUS): New. (LOCATION_BLOCK): New. (IS_UNKNOWN_LOCATION): New. * fold-const.c (expr_location_or): Change to use new location. * reorg.c (emit_delay_sequence): Likewise. (try_merge_delay_insns): Likewise. * modulo-sched.c (dump_insn_location): Likewise. * lto-streamer-out.c (lto_output_location_bitpack): Likewise. * lto-cgraph.c (output_node_opt_summary): Likewise. * jump.c (rtx_renumbered_equal_p): Likewise. * ifcvt.c (noce_try_move): Likewise. (noce_try_store_flag): Likewise. (noce_try_store_flag_constants): Likewise. (noce_try_addcc): Likewise. (noce_try_store_flag_mask): Likewise. (noce_try_cmove): Likewise. (noce_try_cmove_arith): Likewise. (noce_try_minmax): Likewise. (noce_try_abs): Likewise. (noce_try_sign_mask): Likewise. (noce_try_bitop): Likewise. (noce_process_if_block): Likewise. (cond_move_process_if_block): Likewise. (find_cond_trap): Likewise. * ipa-prop.c (ipa_set_jf_constant): Likewise. (ipa_write_jump_function): Likewise. * dwarf2out.c (add_src_coords_attributes): Likewise. * expr.c (expand_expr_real): Likewise. * tree-parloops.c (create_loop_fn): Likewise. * recog.c (peep2_attempt): Likewise. * function.c (free_after_compilation): Likewise. (expand_function_end): Likewise. (set_insn_locations): Likewise. (thread_prologue_and_epilogue_insns): Likewise. * print-rtl.c (print_rtx): Likewise. * profile.c (branch_prob): Likewise. * trans-mem.c (ipa_tm_scan_irr_block): Likewise. * gimplify.c (gimplify_call_expr): Likewise. * except.c (duplicate_eh_regions_1): Likewise. * emit-rtl.c (try_split): Likewise. (make_insn_raw): Likewise. (make_debug_insn_raw): Likewise. (make_jump_insn_raw): Likewise. (make_call_insn_raw): Likewise. (emit_pattern_after_setloc): Likewise. (emit_pattern_after): Likewise. (emit_debug_insn_after): Likewise. (emit_pattern_before): Likewise. (emit_insn_before_setloc): Likewise. (emit_jump_insn_before): Likewise. (emit_call_insn_before_setloc): Likewise. (emit_call_insn_before): Likeise. (emit_debug_insn_before_setloc): Likewise. (emit_copy_of_insn_after): Likewise. (insn_locators_alloc): Remove. (insn_locators_finalize): Remove. (insn_locators_free): Remove. (set_curr_insn_source_location): Remove. (get_curr_insn_source_location): Remove. (set_curr_insn_block): Remove. (get_curr_insn_block): Remove. (locator_scope): Remove. (insn_scope): Change to use new location. (locator_location): Remove. (insn_line): Change to use new location. (locator_file): Remove. (insn_file): Change to use new location. (locator_eq): Remove. (insn_locations_init): New. (insn_locations_finalize): New. (set_curr_insn_location): New. (curr_insn_location): New. * cfgexpand.c (gimple_assign_rhs_to_tree): Change to use new location. (expand_gimple_cond): Likewise. (expand_call_stmt): Likewise. (expand_gimple_stmt_1): Likewise. (expand_gimple_basic_block): Likewise. (construct_exit_block): Likewise. (gimple_expand_cfg): Likewise. * cfgcleanup.c (try_forward_edges): Likewise. * tree-ssa-live.c (remove_unused_scope_block_p): Likewise. (dump_scope_block): Likewise. (remove_unused_locals): Likewise. * rtl.c (rtx_equal_p_cb): Likewise. (rtx_equal_p): Likewise. * rtl.h (XUINT): New. (INSN_LOCATOR): Remove. (CURR_INSN_LOCATION): Remove. (INSN_LOCATION): New. (INSN_HAS_LOCATION): New. * tree-inline.c (remap_gimple_op_r): Change to use new location. (copy_tree_body_r): Likewise. (copy_phis_for_bb): Likewise. (expand_call_inline): Likewise. * tree-streamer-in.c (lto_input_ts_exp_tree_pointers): Likewise. * tree-streamer-out.c (write_ts_decl_minimal_tree_pointers): Likewise. * gimple-streamer-out.c (output_gimple_stmt): Likewise. * combine.c (try_combine): Likewise. * tree-outof-ssa.c (set_location_for_edge): Likewise. (insert_partition_copy_on_edge): Likewise. (insert_value_copy_on_edge): Likewise. (insert_rtx_to_part_on_edge): Likewise. (insert_part_to_rtx_on_edge): Likewise. * basic-block.h (edge_def): Remove field. * gimple.h (gimple_statement_base): Remove field. (gimple_bb): Change to use new location. (gimple_set_block): Likewise. (gimple_has_location): Likewise. * tree-cfg.c (make_cond_expr_edges): Likewise. (make_goto_expr_edges): Likewise. (gimple_can_merge_blocks_p): Likewise. (move_stmt_op): Likewise. (move_block_to_fn): Likewise. * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/i386/i386.c (x86_output_mi_thunk): Likewise. * config/tilegx/tilegx.c (tilegx_output_mi_thunk): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/ia64/ia64.c (ia64_output_mi_thunk): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/score/score.c (score_output_mi_thunk): Likewise. * config/tilepro/tilepro.c (tilepro_asm_output_mi_thunk): Likewise. * config/mips/mips.c (mips_output_mi_thunk): Likewise. * cfgrtl.c (unique_locus_on_edge_between_p): Likewise. (unique_locus_on_edge_between_p): Likewise. (emit_nop_for_unique_locus_between): Likewise. (force_nonfallthru_and_redirect): Likewise. (fixup_reorder_chain): Likewise. (cfg_layout_merge_blocks): Likewise. * stmt.c (emit_case_nodes): Likewise. gcc/lto: 2012-09-19 Dehao Chen <dehao@google.com> * lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field. libcpp: 2012-09-19 Dehao Chen <dehao@google.com> * include/line-map.h (MAX_SOURCE_LOCATION): New value. (location_adhoc_data_fini): New. (get_combined_adhoc_loc): New. (get_data_from_adhoc_loc): New. (get_location_from_adhoc_loc): New. (location_adhoc_data_map): New. (COMBINE_LOCATION_DATA): New. (IS_ADHOC_LOC): New. (expanded_location): New field. (line_maps): New field. * line-map.c (location_adhoc_data): New. (location_adhoc_data_hash): New. (location_adhoc_data_eq): New. (location_adhoc_data_update): New. (get_combined_adhoc_loc): New. (get_data_from_adhoc_loc): New. (get_location_from_adhoc_loc): New. (location_adhoc_data_init): New. (location_adhoc_data_fini): New. (linemap_init): Initialize location_adhoc_data. (linemap_lookup): Change to use new location. (linemap_ordinary_map_lookup): Likewise. (linemap_macro_map_lookup): Likewise. (linemap_macro_map_loc_to_def_point): Likewise. (linemap_macro_map_loc_unwind_toward_spel): Likewise. (linemap_get_expansion_line): Likewise. (linemap_get_expansion_filename): Likewise. (linemap_location_in_system_header_p): Likewise. (linemap_location_from_macro_expansion_p): Likewise. (linemap_macro_loc_to_spelling_point): Likewise. (linemap_macro_loc_to_def_point): Likewise. (linemap_macro_loc_to_exp_point): Likewise. (linemap_resolve_location): Likewise. (linemap_unwind_toward_expansion): Likewise. (linemap_unwind_to_first_non_reserved_loc): Likewise. (linemap_expand_location): Likewise. (linemap_dump_location): Likewise. (linemap_line_start): Likewise. From-SVN: r191494
2012-09-19 21:56:42 +02:00
dump_insn_location (tail);
fprintf (dump_file, "\nSMS single-bb-loop\n");
if (profile_info && flag_branch_probabilities)
{
tree-vrp.c (execute_vrp): Do not pass dump argument to. * tree-vrp.c (execute_vrp): Do not pass dump argument to. loop_optimizer_init and loop_optimizer_finalize * tree-ssa-sink.c (execute_sink_code): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init, tree_ssa_loop_done): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Ditto. * sched-ebb.c: Include output.h. (schedule_ebbs): Do not use dump argument. * value-prof.h (struct profile_hooks): Remove profile_dump_file. * loop.c (loop_dump_stream): Removed. (loop_optimize, rest_of_handle_loop_optimize): Do not use dump argument. (scan_loop, move_movables, find_and_verify_loops, mark_loop_jump, emit_prefetch_instructions, loop_bivs_find, loop_bivs_check, final_biv_value, loop_biv_eliminable_p, loop_givs_rescan, loop_iterations, strength_reduce, record_biv, record_giv, final_giv_value, check_final_value, check_ext_dependent_givs, combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems, try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use dump_file instead of loop_dump_stream. * ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call argument dump_file. * reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use dump argument. * flow.c (life_analysis, rest_of_handle_life): Ditto. * haifa-sched.c: Include output.h (schedule_insns, sched_init): Do not use dump argument. * mode-switching.c (optimize_mode_switching): Ditto. * modulo-sched.c (stats_file): Removed. (print_node_sched_params): Do not call argument dump_file. (sms_schedule_by_order, loop_canon_p, sms_schedule, rest_of_handle_sms): Do not use dump argument. Use dump_file instead of stats_file. * cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not use dump argument. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize, rtl_loop_init, rtl_loop_done): Ditto. * global.c (global_alloc, rest_of_handle_global_alloc): Ditto. * predict.c (combine_predictions_for_bb, tree_estimate_probability): Ditto. * recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto. * lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto. * regmove.c (fixup_match_1, fixup_match_2, regmove_optimize, rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto. * emit-rtl.c (renumber_insns): Ditto. * cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr, expand_gimple_basic_block, tree_expand_cfg): Ditto. * regclass.c (regclass): Ditto. * tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts, remove_ssa_form, rewrite_out_of_ssa): Ditto. * reg-stack.c (compensate_edge, compensate_edges, convert_regs_1, convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs): Ditto. * sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto. * local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file to regclass. * gcse.c (gcse_file, debug_stderr): Removed. (gcse_main, bypass_jumps, rest_of_handle_jump_bypass, rest_of_handle_gcse): Do not use dump argument. (cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets, one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb, pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass, compute_code_hoist_vbeinout, compute_code_hoist_data, one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores, compute_store_table, build_store_vectors, insert_insn_start_bb, insert_store, remove_reachable_equiv_notes, replace_store_insn, store_motion): Use dump_file instead of gcse_file. * ipa-type-escape.c (type_escape_execute): Remove debugging comments. * profile.c (profile_dump_file): Removed. (branch_prob): Use dump_file instead of profile_dump_file. * ipa.c (cgraph_remove_unreachable_nodes): Do not call argument dump_file. * tree-ssa-copy.c (dump_copy_of): Ditto. * rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass dump file to life_analysis. * bt-load.c (branch_target_load_optimize): Ditto. * cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to renumber_insns. * rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs, regclass, dbr_schedule): Declaration changed. * sched-int.h (sched_init): Declaration changed. * tree-profile.c (tree_profile_dump_file): Removed. (tree_profile_hooks): Removed profile_dump_file hook. * rtl-profile (rtl_profile_dump_file): Removed. (rtl_profile_hooks): emoved profile_dump_file hook. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * c-gimplify.c (c_genericize): Do not call local variable dump_file. * tree-cfg.c (build_tree_cfg): Ditto. * Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency. * basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm): Declaration changed. * config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to life_analysis and schedule_insns. * config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to life_analysis. * config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to dbr_schedule. * config/mips/mips.c (mips_reorg): Ditto. * config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to schedule_ebbs. From-SVN: r110656
2006-02-06 19:20:47 +01:00
fprintf (dump_file, "SMS loop-count ");
fprintf (dump_file, "%" PRId64,
system.h: Define __STDC_FORMAT_MACROS before including inttypes.h. 2014-05-23 Richard Biener <rguenther@suse.de> * system.h: Define __STDC_FORMAT_MACROS before including inttypes.h. * hwint.h (HOST_WIDEST_INT, HOST_BITS_PER_WIDEST_INT, HOST_WIDEST_INT_PRINT, HOST_WIDEST_INT_PRINT_DEC, HOST_WIDEST_INT_PRINT_DEC_C, HOST_WIDEST_INT_PRINT_UNSIGNED, HOST_WIDEST_INT_PRINT_HEX, HOST_WIDEST_INT_PRINT_DOUBLE_HEX, HOST_WIDEST_INT_C): Remove. (PRId64, PRIi64, PRIo64, PRIu64, PRIx64, PRIX64): Define if C99 inttypes.h is not available. * coretypes.h (gcov_type, gcov_type_unsigned): Use [u]int64_t. * gcov-io.h (gcov_type, gcov_type_unsigned): Likewise. * gcov-io.c (gcov_histo_index): Drop non-64bit hwi case. * cfgloop.h (struct niter_desc): Use uint64_t for niter field. * bitmap.c (struct bitmap_descriptor_d): Use uint64_t for counters. (struct output_info): Likewise. (print_statistics): Adjust. (dump_bitmap_statistics): Likewise. * bt-load.c (migrate_btr_defs): Print with PRId64. * cfg.c (dump_edge_info, dump_bb_info): Likewise. (MAX_SAFE_MULTIPLIER): Adjust. * cfghooks.c (dump_bb_for_graph): Print with PRId64. * cgraph.c (cgraph_redirect_edge_call_stmt_to_callee, dump_cgraph_node): Likewise. * final.c (dump_basic_block_info): Likewise. * gcov-dump.c (tag_counters, tag_summary, dump_working_sets): Likewise. * gcov.c (format_gcov): Likewise. * ipa-cp.c (good_cloning_opportunity_p): Likewise. Use int64_t for calculation. (get_clone_agg_value): Use HOST_WIDE_INT for offset. * ipa-inline.c (compute_max_insns): Use int64_t for calcuation. (inline_small_functions, dump_overall_stats, dump_inline_stats): Use PRId64 for dumping. * ipa-profile.c (dump_histogram, ipa_profile): Likewise. * ira-color.c (struct allocno_hard_regs): Use int64_t for cost. (add_allocno_hard_regs): Adjust. * loop-doloop.c (doloop_modify): Print using PRId64. * loop-iv.c (inverse): Compute in uint64_t. (determine_max_iter, iv_number_of_iterations): Likewise. * loop-unroll.c (decide_peel_completely, decide_peel_simple): Print using PRId64. * lto-streamer-out.c (write_symbol): Use uint64_t. * mcf.c (CAP_INFINITY): Use int64_t maximum. (dump_fixup_edge, create_fixup_graph, cancel_negative_cycle, find_max_flow, adjust_cfg_counts): Use int64_t and dump with PRId64. * modulo-sched.c (const_iteration_count): Use int64_t. (sms_schedule): Dump using PRId64. * predict.c (dump_prediction): Likewise. * pretty-print.h (pp_widest_integer): Remove. * profile.c (get_working_sets, is_edge_inconsistent, is_inconsistent, read_profile_edge_counts): Dump using PRId64. * tree-pretty-print.c (pp_double_int): Remove case handling HOST_BITS_PER_DOUBLE_INT == HOST_BITS_PER_WIDEST_INT. * tree-ssa-math-opts.c (struct symbolic_number): Use uint64_t and adjust users. (pass_optimize_bswap::execute): Remove restriction on hosts. * tree-streamer-in.c (streamer_alloc_tree): Use HOST_WIDE_INT. * tree-streamer-out.c (streamer_write_tree_header): Likewise. * tree.c (widest_int_cst_value): Remove. * tree.h (widest_int_cst_value): Likewise. * value-prof.c (dump_histogram_value): Print using PRId64. * gengtype.c (main): Also inject int64_t. * ggc-page.c (struct max_alignment): Use int64_t. * alloc-pool.c (struct allocation_object_def): Likewise. * ira-conflicts.c (build_conflict_bit_table): Use uint64_t for computation. * doc/tm.texi.in: Remove reference to HOST_WIDEST_INT. * doc/tm.texi: Regenerated. * gengtype-lex.l (IWORD): Handle [u]int64_t. * config/sh/sh.c (expand_cbranchdi4): Use gcov_type. * config/mmix/mmix-protos.h (mmix_intval, mmix_shiftable_wyde_value, mmix_output_register_setting): Use [u]int64_t in prototypes. * config/mmix/mmix.c (mmix_print_operand, mmix_output_register_setting, mmix_shiftable_wyde_value, mmix_output_shiftvalue_op_from_str, mmix_output_octa, mmix_output_shifted_value): Adjust. (mmix_intval): Adjust. Remove unreachable case. * config/mmix/mmix.md (*nonlocal_goto_receiver_expanded): Use int64_t. lto/ * lto.c (lto_parse_hex): Use int64_t. (lto_resolution_read): Likewise. From-SVN: r210931
2014-05-26 12:42:43 +02:00
(int64_t) bb->count);
tree-vrp.c (execute_vrp): Do not pass dump argument to. * tree-vrp.c (execute_vrp): Do not pass dump argument to. loop_optimizer_init and loop_optimizer_finalize * tree-ssa-sink.c (execute_sink_code): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init, tree_ssa_loop_done): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Ditto. * sched-ebb.c: Include output.h. (schedule_ebbs): Do not use dump argument. * value-prof.h (struct profile_hooks): Remove profile_dump_file. * loop.c (loop_dump_stream): Removed. (loop_optimize, rest_of_handle_loop_optimize): Do not use dump argument. (scan_loop, move_movables, find_and_verify_loops, mark_loop_jump, emit_prefetch_instructions, loop_bivs_find, loop_bivs_check, final_biv_value, loop_biv_eliminable_p, loop_givs_rescan, loop_iterations, strength_reduce, record_biv, record_giv, final_giv_value, check_final_value, check_ext_dependent_givs, combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems, try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use dump_file instead of loop_dump_stream. * ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call argument dump_file. * reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use dump argument. * flow.c (life_analysis, rest_of_handle_life): Ditto. * haifa-sched.c: Include output.h (schedule_insns, sched_init): Do not use dump argument. * mode-switching.c (optimize_mode_switching): Ditto. * modulo-sched.c (stats_file): Removed. (print_node_sched_params): Do not call argument dump_file. (sms_schedule_by_order, loop_canon_p, sms_schedule, rest_of_handle_sms): Do not use dump argument. Use dump_file instead of stats_file. * cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not use dump argument. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize, rtl_loop_init, rtl_loop_done): Ditto. * global.c (global_alloc, rest_of_handle_global_alloc): Ditto. * predict.c (combine_predictions_for_bb, tree_estimate_probability): Ditto. * recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto. * lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto. * regmove.c (fixup_match_1, fixup_match_2, regmove_optimize, rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto. * emit-rtl.c (renumber_insns): Ditto. * cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr, expand_gimple_basic_block, tree_expand_cfg): Ditto. * regclass.c (regclass): Ditto. * tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts, remove_ssa_form, rewrite_out_of_ssa): Ditto. * reg-stack.c (compensate_edge, compensate_edges, convert_regs_1, convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs): Ditto. * sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto. * local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file to regclass. * gcse.c (gcse_file, debug_stderr): Removed. (gcse_main, bypass_jumps, rest_of_handle_jump_bypass, rest_of_handle_gcse): Do not use dump argument. (cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets, one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb, pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass, compute_code_hoist_vbeinout, compute_code_hoist_data, one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores, compute_store_table, build_store_vectors, insert_insn_start_bb, insert_store, remove_reachable_equiv_notes, replace_store_insn, store_motion): Use dump_file instead of gcse_file. * ipa-type-escape.c (type_escape_execute): Remove debugging comments. * profile.c (profile_dump_file): Removed. (branch_prob): Use dump_file instead of profile_dump_file. * ipa.c (cgraph_remove_unreachable_nodes): Do not call argument dump_file. * tree-ssa-copy.c (dump_copy_of): Ditto. * rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass dump file to life_analysis. * bt-load.c (branch_target_load_optimize): Ditto. * cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to renumber_insns. * rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs, regclass, dbr_schedule): Declaration changed. * sched-int.h (sched_init): Declaration changed. * tree-profile.c (tree_profile_dump_file): Removed. (tree_profile_hooks): Removed profile_dump_file hook. * rtl-profile (rtl_profile_dump_file): Removed. (rtl_profile_hooks): emoved profile_dump_file hook. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * c-gimplify.c (c_genericize): Do not call local variable dump_file. * tree-cfg.c (build_tree_cfg): Ditto. * Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency. * basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm): Declaration changed. * config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to life_analysis and schedule_insns. * config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to life_analysis. * config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to dbr_schedule. * config/mips/mips.c (mips_reorg): Ditto. * config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to schedule_ebbs. From-SVN: r110656
2006-02-06 19:20:47 +01:00
fprintf (dump_file, "\n");
fprintf (dump_file, "SMS trip-count ");
fprintf (dump_file, "%" PRId64,
system.h: Define __STDC_FORMAT_MACROS before including inttypes.h. 2014-05-23 Richard Biener <rguenther@suse.de> * system.h: Define __STDC_FORMAT_MACROS before including inttypes.h. * hwint.h (HOST_WIDEST_INT, HOST_BITS_PER_WIDEST_INT, HOST_WIDEST_INT_PRINT, HOST_WIDEST_INT_PRINT_DEC, HOST_WIDEST_INT_PRINT_DEC_C, HOST_WIDEST_INT_PRINT_UNSIGNED, HOST_WIDEST_INT_PRINT_HEX, HOST_WIDEST_INT_PRINT_DOUBLE_HEX, HOST_WIDEST_INT_C): Remove. (PRId64, PRIi64, PRIo64, PRIu64, PRIx64, PRIX64): Define if C99 inttypes.h is not available. * coretypes.h (gcov_type, gcov_type_unsigned): Use [u]int64_t. * gcov-io.h (gcov_type, gcov_type_unsigned): Likewise. * gcov-io.c (gcov_histo_index): Drop non-64bit hwi case. * cfgloop.h (struct niter_desc): Use uint64_t for niter field. * bitmap.c (struct bitmap_descriptor_d): Use uint64_t for counters. (struct output_info): Likewise. (print_statistics): Adjust. (dump_bitmap_statistics): Likewise. * bt-load.c (migrate_btr_defs): Print with PRId64. * cfg.c (dump_edge_info, dump_bb_info): Likewise. (MAX_SAFE_MULTIPLIER): Adjust. * cfghooks.c (dump_bb_for_graph): Print with PRId64. * cgraph.c (cgraph_redirect_edge_call_stmt_to_callee, dump_cgraph_node): Likewise. * final.c (dump_basic_block_info): Likewise. * gcov-dump.c (tag_counters, tag_summary, dump_working_sets): Likewise. * gcov.c (format_gcov): Likewise. * ipa-cp.c (good_cloning_opportunity_p): Likewise. Use int64_t for calculation. (get_clone_agg_value): Use HOST_WIDE_INT for offset. * ipa-inline.c (compute_max_insns): Use int64_t for calcuation. (inline_small_functions, dump_overall_stats, dump_inline_stats): Use PRId64 for dumping. * ipa-profile.c (dump_histogram, ipa_profile): Likewise. * ira-color.c (struct allocno_hard_regs): Use int64_t for cost. (add_allocno_hard_regs): Adjust. * loop-doloop.c (doloop_modify): Print using PRId64. * loop-iv.c (inverse): Compute in uint64_t. (determine_max_iter, iv_number_of_iterations): Likewise. * loop-unroll.c (decide_peel_completely, decide_peel_simple): Print using PRId64. * lto-streamer-out.c (write_symbol): Use uint64_t. * mcf.c (CAP_INFINITY): Use int64_t maximum. (dump_fixup_edge, create_fixup_graph, cancel_negative_cycle, find_max_flow, adjust_cfg_counts): Use int64_t and dump with PRId64. * modulo-sched.c (const_iteration_count): Use int64_t. (sms_schedule): Dump using PRId64. * predict.c (dump_prediction): Likewise. * pretty-print.h (pp_widest_integer): Remove. * profile.c (get_working_sets, is_edge_inconsistent, is_inconsistent, read_profile_edge_counts): Dump using PRId64. * tree-pretty-print.c (pp_double_int): Remove case handling HOST_BITS_PER_DOUBLE_INT == HOST_BITS_PER_WIDEST_INT. * tree-ssa-math-opts.c (struct symbolic_number): Use uint64_t and adjust users. (pass_optimize_bswap::execute): Remove restriction on hosts. * tree-streamer-in.c (streamer_alloc_tree): Use HOST_WIDE_INT. * tree-streamer-out.c (streamer_write_tree_header): Likewise. * tree.c (widest_int_cst_value): Remove. * tree.h (widest_int_cst_value): Likewise. * value-prof.c (dump_histogram_value): Print using PRId64. * gengtype.c (main): Also inject int64_t. * ggc-page.c (struct max_alignment): Use int64_t. * alloc-pool.c (struct allocation_object_def): Likewise. * ira-conflicts.c (build_conflict_bit_table): Use uint64_t for computation. * doc/tm.texi.in: Remove reference to HOST_WIDEST_INT. * doc/tm.texi: Regenerated. * gengtype-lex.l (IWORD): Handle [u]int64_t. * config/sh/sh.c (expand_cbranchdi4): Use gcov_type. * config/mmix/mmix-protos.h (mmix_intval, mmix_shiftable_wyde_value, mmix_output_register_setting): Use [u]int64_t in prototypes. * config/mmix/mmix.c (mmix_print_operand, mmix_output_register_setting, mmix_shiftable_wyde_value, mmix_output_shiftvalue_op_from_str, mmix_output_octa, mmix_output_shifted_value): Adjust. (mmix_intval): Adjust. Remove unreachable case. * config/mmix/mmix.md (*nonlocal_goto_receiver_expanded): Use int64_t. lto/ * lto.c (lto_parse_hex): Use int64_t. (lto_resolution_read): Likewise. From-SVN: r210931
2014-05-26 12:42:43 +02:00
(int64_t) trip_count);
tree-vrp.c (execute_vrp): Do not pass dump argument to. * tree-vrp.c (execute_vrp): Do not pass dump argument to. loop_optimizer_init and loop_optimizer_finalize * tree-ssa-sink.c (execute_sink_code): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init, tree_ssa_loop_done): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Ditto. * sched-ebb.c: Include output.h. (schedule_ebbs): Do not use dump argument. * value-prof.h (struct profile_hooks): Remove profile_dump_file. * loop.c (loop_dump_stream): Removed. (loop_optimize, rest_of_handle_loop_optimize): Do not use dump argument. (scan_loop, move_movables, find_and_verify_loops, mark_loop_jump, emit_prefetch_instructions, loop_bivs_find, loop_bivs_check, final_biv_value, loop_biv_eliminable_p, loop_givs_rescan, loop_iterations, strength_reduce, record_biv, record_giv, final_giv_value, check_final_value, check_ext_dependent_givs, combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems, try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use dump_file instead of loop_dump_stream. * ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call argument dump_file. * reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use dump argument. * flow.c (life_analysis, rest_of_handle_life): Ditto. * haifa-sched.c: Include output.h (schedule_insns, sched_init): Do not use dump argument. * mode-switching.c (optimize_mode_switching): Ditto. * modulo-sched.c (stats_file): Removed. (print_node_sched_params): Do not call argument dump_file. (sms_schedule_by_order, loop_canon_p, sms_schedule, rest_of_handle_sms): Do not use dump argument. Use dump_file instead of stats_file. * cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not use dump argument. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize, rtl_loop_init, rtl_loop_done): Ditto. * global.c (global_alloc, rest_of_handle_global_alloc): Ditto. * predict.c (combine_predictions_for_bb, tree_estimate_probability): Ditto. * recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto. * lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto. * regmove.c (fixup_match_1, fixup_match_2, regmove_optimize, rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto. * emit-rtl.c (renumber_insns): Ditto. * cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr, expand_gimple_basic_block, tree_expand_cfg): Ditto. * regclass.c (regclass): Ditto. * tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts, remove_ssa_form, rewrite_out_of_ssa): Ditto. * reg-stack.c (compensate_edge, compensate_edges, convert_regs_1, convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs): Ditto. * sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto. * local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file to regclass. * gcse.c (gcse_file, debug_stderr): Removed. (gcse_main, bypass_jumps, rest_of_handle_jump_bypass, rest_of_handle_gcse): Do not use dump argument. (cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets, one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb, pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass, compute_code_hoist_vbeinout, compute_code_hoist_data, one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores, compute_store_table, build_store_vectors, insert_insn_start_bb, insert_store, remove_reachable_equiv_notes, replace_store_insn, store_motion): Use dump_file instead of gcse_file. * ipa-type-escape.c (type_escape_execute): Remove debugging comments. * profile.c (profile_dump_file): Removed. (branch_prob): Use dump_file instead of profile_dump_file. * ipa.c (cgraph_remove_unreachable_nodes): Do not call argument dump_file. * tree-ssa-copy.c (dump_copy_of): Ditto. * rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass dump file to life_analysis. * bt-load.c (branch_target_load_optimize): Ditto. * cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to renumber_insns. * rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs, regclass, dbr_schedule): Declaration changed. * sched-int.h (sched_init): Declaration changed. * tree-profile.c (tree_profile_dump_file): Removed. (tree_profile_hooks): Removed profile_dump_file hook. * rtl-profile (rtl_profile_dump_file): Removed. (rtl_profile_hooks): emoved profile_dump_file hook. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * c-gimplify.c (c_genericize): Do not call local variable dump_file. * tree-cfg.c (build_tree_cfg): Ditto. * Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency. * basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm): Declaration changed. * config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to life_analysis and schedule_insns. * config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to life_analysis. * config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to dbr_schedule. * config/mips/mips.c (mips_reorg): Ditto. * config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to schedule_ebbs. From-SVN: r110656
2006-02-06 19:20:47 +01:00
fprintf (dump_file, "\n");
fprintf (dump_file, "SMS profile-sum-max ");
fprintf (dump_file, "%" PRId64,
system.h: Define __STDC_FORMAT_MACROS before including inttypes.h. 2014-05-23 Richard Biener <rguenther@suse.de> * system.h: Define __STDC_FORMAT_MACROS before including inttypes.h. * hwint.h (HOST_WIDEST_INT, HOST_BITS_PER_WIDEST_INT, HOST_WIDEST_INT_PRINT, HOST_WIDEST_INT_PRINT_DEC, HOST_WIDEST_INT_PRINT_DEC_C, HOST_WIDEST_INT_PRINT_UNSIGNED, HOST_WIDEST_INT_PRINT_HEX, HOST_WIDEST_INT_PRINT_DOUBLE_HEX, HOST_WIDEST_INT_C): Remove. (PRId64, PRIi64, PRIo64, PRIu64, PRIx64, PRIX64): Define if C99 inttypes.h is not available. * coretypes.h (gcov_type, gcov_type_unsigned): Use [u]int64_t. * gcov-io.h (gcov_type, gcov_type_unsigned): Likewise. * gcov-io.c (gcov_histo_index): Drop non-64bit hwi case. * cfgloop.h (struct niter_desc): Use uint64_t for niter field. * bitmap.c (struct bitmap_descriptor_d): Use uint64_t for counters. (struct output_info): Likewise. (print_statistics): Adjust. (dump_bitmap_statistics): Likewise. * bt-load.c (migrate_btr_defs): Print with PRId64. * cfg.c (dump_edge_info, dump_bb_info): Likewise. (MAX_SAFE_MULTIPLIER): Adjust. * cfghooks.c (dump_bb_for_graph): Print with PRId64. * cgraph.c (cgraph_redirect_edge_call_stmt_to_callee, dump_cgraph_node): Likewise. * final.c (dump_basic_block_info): Likewise. * gcov-dump.c (tag_counters, tag_summary, dump_working_sets): Likewise. * gcov.c (format_gcov): Likewise. * ipa-cp.c (good_cloning_opportunity_p): Likewise. Use int64_t for calculation. (get_clone_agg_value): Use HOST_WIDE_INT for offset. * ipa-inline.c (compute_max_insns): Use int64_t for calcuation. (inline_small_functions, dump_overall_stats, dump_inline_stats): Use PRId64 for dumping. * ipa-profile.c (dump_histogram, ipa_profile): Likewise. * ira-color.c (struct allocno_hard_regs): Use int64_t for cost. (add_allocno_hard_regs): Adjust. * loop-doloop.c (doloop_modify): Print using PRId64. * loop-iv.c (inverse): Compute in uint64_t. (determine_max_iter, iv_number_of_iterations): Likewise. * loop-unroll.c (decide_peel_completely, decide_peel_simple): Print using PRId64. * lto-streamer-out.c (write_symbol): Use uint64_t. * mcf.c (CAP_INFINITY): Use int64_t maximum. (dump_fixup_edge, create_fixup_graph, cancel_negative_cycle, find_max_flow, adjust_cfg_counts): Use int64_t and dump with PRId64. * modulo-sched.c (const_iteration_count): Use int64_t. (sms_schedule): Dump using PRId64. * predict.c (dump_prediction): Likewise. * pretty-print.h (pp_widest_integer): Remove. * profile.c (get_working_sets, is_edge_inconsistent, is_inconsistent, read_profile_edge_counts): Dump using PRId64. * tree-pretty-print.c (pp_double_int): Remove case handling HOST_BITS_PER_DOUBLE_INT == HOST_BITS_PER_WIDEST_INT. * tree-ssa-math-opts.c (struct symbolic_number): Use uint64_t and adjust users. (pass_optimize_bswap::execute): Remove restriction on hosts. * tree-streamer-in.c (streamer_alloc_tree): Use HOST_WIDE_INT. * tree-streamer-out.c (streamer_write_tree_header): Likewise. * tree.c (widest_int_cst_value): Remove. * tree.h (widest_int_cst_value): Likewise. * value-prof.c (dump_histogram_value): Print using PRId64. * gengtype.c (main): Also inject int64_t. * ggc-page.c (struct max_alignment): Use int64_t. * alloc-pool.c (struct allocation_object_def): Likewise. * ira-conflicts.c (build_conflict_bit_table): Use uint64_t for computation. * doc/tm.texi.in: Remove reference to HOST_WIDEST_INT. * doc/tm.texi: Regenerated. * gengtype-lex.l (IWORD): Handle [u]int64_t. * config/sh/sh.c (expand_cbranchdi4): Use gcov_type. * config/mmix/mmix-protos.h (mmix_intval, mmix_shiftable_wyde_value, mmix_output_register_setting): Use [u]int64_t in prototypes. * config/mmix/mmix.c (mmix_print_operand, mmix_output_register_setting, mmix_shiftable_wyde_value, mmix_output_shiftvalue_op_from_str, mmix_output_octa, mmix_output_shifted_value): Adjust. (mmix_intval): Adjust. Remove unreachable case. * config/mmix/mmix.md (*nonlocal_goto_receiver_expanded): Use int64_t. lto/ * lto.c (lto_parse_hex): Use int64_t. (lto_resolution_read): Likewise. From-SVN: r210931
2014-05-26 12:42:43 +02:00
(int64_t) profile_info->sum_max);
tree-vrp.c (execute_vrp): Do not pass dump argument to. * tree-vrp.c (execute_vrp): Do not pass dump argument to. loop_optimizer_init and loop_optimizer_finalize * tree-ssa-sink.c (execute_sink_code): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init, tree_ssa_loop_done): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Ditto. * sched-ebb.c: Include output.h. (schedule_ebbs): Do not use dump argument. * value-prof.h (struct profile_hooks): Remove profile_dump_file. * loop.c (loop_dump_stream): Removed. (loop_optimize, rest_of_handle_loop_optimize): Do not use dump argument. (scan_loop, move_movables, find_and_verify_loops, mark_loop_jump, emit_prefetch_instructions, loop_bivs_find, loop_bivs_check, final_biv_value, loop_biv_eliminable_p, loop_givs_rescan, loop_iterations, strength_reduce, record_biv, record_giv, final_giv_value, check_final_value, check_ext_dependent_givs, combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems, try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use dump_file instead of loop_dump_stream. * ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call argument dump_file. * reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use dump argument. * flow.c (life_analysis, rest_of_handle_life): Ditto. * haifa-sched.c: Include output.h (schedule_insns, sched_init): Do not use dump argument. * mode-switching.c (optimize_mode_switching): Ditto. * modulo-sched.c (stats_file): Removed. (print_node_sched_params): Do not call argument dump_file. (sms_schedule_by_order, loop_canon_p, sms_schedule, rest_of_handle_sms): Do not use dump argument. Use dump_file instead of stats_file. * cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not use dump argument. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize, rtl_loop_init, rtl_loop_done): Ditto. * global.c (global_alloc, rest_of_handle_global_alloc): Ditto. * predict.c (combine_predictions_for_bb, tree_estimate_probability): Ditto. * recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto. * lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto. * regmove.c (fixup_match_1, fixup_match_2, regmove_optimize, rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto. * emit-rtl.c (renumber_insns): Ditto. * cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr, expand_gimple_basic_block, tree_expand_cfg): Ditto. * regclass.c (regclass): Ditto. * tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts, remove_ssa_form, rewrite_out_of_ssa): Ditto. * reg-stack.c (compensate_edge, compensate_edges, convert_regs_1, convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs): Ditto. * sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto. * local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file to regclass. * gcse.c (gcse_file, debug_stderr): Removed. (gcse_main, bypass_jumps, rest_of_handle_jump_bypass, rest_of_handle_gcse): Do not use dump argument. (cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets, one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb, pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass, compute_code_hoist_vbeinout, compute_code_hoist_data, one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores, compute_store_table, build_store_vectors, insert_insn_start_bb, insert_store, remove_reachable_equiv_notes, replace_store_insn, store_motion): Use dump_file instead of gcse_file. * ipa-type-escape.c (type_escape_execute): Remove debugging comments. * profile.c (profile_dump_file): Removed. (branch_prob): Use dump_file instead of profile_dump_file. * ipa.c (cgraph_remove_unreachable_nodes): Do not call argument dump_file. * tree-ssa-copy.c (dump_copy_of): Ditto. * rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass dump file to life_analysis. * bt-load.c (branch_target_load_optimize): Ditto. * cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to renumber_insns. * rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs, regclass, dbr_schedule): Declaration changed. * sched-int.h (sched_init): Declaration changed. * tree-profile.c (tree_profile_dump_file): Removed. (tree_profile_hooks): Removed profile_dump_file hook. * rtl-profile (rtl_profile_dump_file): Removed. (rtl_profile_hooks): emoved profile_dump_file hook. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * c-gimplify.c (c_genericize): Do not call local variable dump_file. * tree-cfg.c (build_tree_cfg): Ditto. * Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency. * basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm): Declaration changed. * config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to life_analysis and schedule_insns. * config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to life_analysis. * config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to dbr_schedule. * config/mips/mips.c (mips_reorg): Ditto. * config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to schedule_ebbs. From-SVN: r110656
2006-02-06 19:20:47 +01:00
fprintf (dump_file, "\n");
}
}
continue;
}
/* Make sure this is a doloop. */
if ( !(count_reg = doloop_register_get (head, tail)))
{
if (dump_file)
fprintf (dump_file, "SMS doloop_register_get failed\n");
continue;
}
/* Don't handle BBs with calls or barriers
or !single_set with the exception of instructions that include
count_reg---these instructions are part of the control part
that do-loop recognizes.
??? Should handle insns defining subregs. */
for (insn = head; insn != NEXT_INSN (tail); insn = NEXT_INSN (insn))
{
rtx set;
if (CALL_P (insn)
|| BARRIER_P (insn)
invoke.texi (-fvar-tracking-assignments): New. gcc/ChangeLog: * doc/invoke.texi (-fvar-tracking-assignments): New. (-fvar-tracking-assignments-toggle): New. (-fdump-final-insns=file): Mark filename as optional. (--param min-nondebug-insn-uid): New. (-gdwarf-@{version}): Mention version 4. * opts.c (common_handle_option): Accept it. * tree-vrp.c (find_assert_locations_1): Skip debug stmts. * regrename.c (regrename_optimize): Drop last. Don't count debug insns as uses. Don't reject change because of debug insn. (do_replace): Reject DEBUG_INSN as chain starter. Take base_regno from the chain starter, and check for inexact matches in DEBUG_INSNS. (scan_rtx_reg): Accept inexact matches in DEBUG_INSNs. (build_def_use): Simplify and fix the marking of DEBUG_INSNs. * sched-ebb.c (schedule_ebbs): Skip boundary debug insns. * fwprop.c (forward_propagate_and_simplify): ...into debug insns. * doc/gimple.texi (is_gimple_debug): New. (gimple_debug_bind_p): New. (is_gimple_call, gimple_assign_cast_p): End sentence with period. * doc/install.texi (bootstrap-debug): More details. (bootstrap-debug-big, bootstrap-debug-lean): Document. (bootstrap-debug-lib): More details. (bootstrap-debug-ckovw): Update. (bootstrap-time): New. * tree-into-ssa.c (mark_def_sites): Skip debug stmts. (insert_phi_nodes_for): Insert debug stmts. (rewrite_stmt): Take iterator. Insert debug stmts. (rewrite_enter_block): Adjust. (maybe_replace_use_in_debug_stmt): New. (rewrite_update_stmt): Use it. (mark_use_interesting): Return early for debug stmts. * tree-ssa-loop-im.c (rewrite_bittest): Propagate DEFs into debug stmts before replacing stmt. (move_computations_stmt): Likewise. * ira-conflicts.c (add_copies): Skip debug insns. * regstat.c (regstat_init_n_sets_and_refs): Discount debug insns. (regstat_bb_compute_ri): Skip debug insns. * tree-ssa-threadupdate.c (redirection_block_p): Skip debug stmts. * tree-ssa-loop-manip.c (find_uses_to_rename_stmt, check_loop_closed_ssa_stmt): Skip debug stmts. * tree-tailcall.c (find_tail_calls): Likewise. * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Likewise. * tree.h (MAY_HAVE_DEBUG_STMTS): New. (build_var_debug_value_stat): Declare. (build_var_debug_value): Define. (target_for_debug_bind): Declare. * reload.c (find_equiv_reg): Skip debug insns. * rtlanal.c (reg_used_between_p): Skip debug insns. (side_effects_p): Likewise. (canonicalize_condition): Likewise. * ddg.c (create_ddg_dep_from_intra_loop_link): Check that non-debug insns never depend on debug insns. (create_ddg_dep_no_link): Likewise. (add_cross_iteration_register_deps): Use ANTI_DEP for debug insns. Don't add inter-loop dependencies for debug insns. (build_intra_loop_deps): Likewise. (create_ddg): Count debug insns. * ddg.h (struct ddg::num_debug): New. (num_backargs): Pair up with previous int field. * diagnostic.c (diagnostic_report_diagnostic): Skip notes on -fcompare-debug-second. * final.c (get_attr_length_1): Skip debug insns. (rest_of_clean-state): Don't dump CFA_RESTORE_STATE. * gcc.c (invoke_as): Call compare-debug-dump-opt. (driver_self_specs): Map -fdump-final-insns to -fdump-final-insns=.. (get_local_tick): New. (compare_debug_dump_opt_spec_function): Test for . argument and compute output name. Compute temp output spec without flag name. Compute -frandom-seed. (OPT): Undef after use. * cfgloopanal.c (num_loop_insns): Skip debug insns. (average_num_loop_insns): Likewise. * params.h (MIN_NONDEBUG_INSN_UID): New. * gimple.def (GIMPLE_DEBUG): New. * ipa-reference.c (scan_stmt_for_static_refs): Skip debug stmts. * auto-inc-dec.c (merge_in_block): Skip debug insns. (merge_in_block): Fix whitespace. * toplev.c (flag_var_tracking): Update comment. (flag_var_tracking_assignments): New. (flag_var_tracking_assignments_toggle): New. (process_options): Don't open final insns dump file if we're not going to write to it. Compute defaults for var_tracking. * df-scan.c (df_insn_rescan_debug_internal): New. (df_uses_record): Handle debug insns. * haifa-sched.c (ready): Initialize n_debug. (contributes_to_priority): Skip debug insns. (dep_list_size): New. (priority): Use it. (rank_for_schedule): Likewise. Schedule debug insns as soon as they're ready. Disregard previous debug insns to make decisions. (queue_insn): Never queue debug insns. (ready_add, ready_remove_first, ready_remove): Count debug insns. (schedule_insn): Don't reject debug insns because of issue rate. (get_ebb_head_tail, no_real_insns_p): Skip boundary debug insns. (queue_to_ready): Skip and discount debug insns. (choose_ready): Let debug insns through. (schedule_block): Check boundary debug insns. Discount debug insns, schedule them early. Adjust whitespace. (set_priorities): Check for boundary debug insns. (add_jump_dependencies): Use dep_list_size. (prev_non_location_insn): New. (check_cfg): Use it. * tree-ssa-loop-ivopts.c (find-interesting_users): Skip debug stmts. (remove_unused_ivs): Reset debug stmts. * modulo-sched.c (const_iteration_count): Skip debug insns. (res_MII): Discount debug insns. (loop_single_full_bb_p): Skip debug insns. (sms_schedule): Likewise. (sms_schedule_by_order): Likewise. (ps_has_conflicts): Likewise. * caller-save.c (refmarker_fn): New. (save_call_clobbered_regs): Replace regs with saved mem in debug insns. (mark_referenced_regs): Take pointer, mark and arg. Adjust. Call refmarker_fn mark for hardregnos. (mark_reg_as_referenced): New. (replace_reg_with_saved_mem): New. * ipa-pure-const.c (check_stmt): Skip debug stmts. * cse.c (cse_insn): Canonicalize debug insns. Skip them when searching back. (cse_extended_basic_block): Skip debug insns. (count_reg_usage): Likewise. (is_dead_reg): New, split out of... (set_live_p): ... here. (insn_live_p): Use it for debug insns. * tree-stdarg.c (check_all_va_list_escapes): Skip debug stmts. (execute_optimize_stdarg): Likewise. * tree-ssa-dom.c (propagate_rhs_into_lhs): Likewise. * tree-ssa-propagate.c (substitute_and_fold): Don't regard changes in debug stmts as changes. * sel-sched.c (moving_insn_creates_bookkeeping_block_p): New. (moveup_expr): Don't move across debug insns. Don't move debug insn if it would create a bookkeeping block. (moveup_expr_cached): Don't use cache for debug insns that are heads of blocks. (compute_av_set_inside_bb): Skip debug insns. (sel_rank_for_schedule): Schedule debug insns first. Remove dead code. (block_valid_for_bookkeeping_p); Support lax searches. (create_block_for_bookkeeping): Adjust block numbers when encountering debug-only blocks. (find_place_for_bookkeeping): Deal with debug-only blocks. (generate_bookkeeping_insn): Accept no place to insert. (remove_temp_moveop_nops): New argument full_tidying. (prepare_place_to_insert): Deal with debug insns. (advance_state_on_fence): Debug insns don't start cycles. (update_boundaries): Take fence as argument. Deal with debug insns. (schedule_expr_on_boundary): No full_tidying on debug insns. (fill_insns): Deal with debug insns. (track_scheduled_insns_and_blocks): Don't count debug insns. (need_nop_to_preserve_insn_bb): New, split out of... (remove_insn_from_stream): ... this. (fur_orig_expr_not_found): Skip debug insns. * rtl.def (VALUE): Move up. (DEBUG_INSN): New. * tree-ssa-sink.c (all_immediate_uses_same_place): Skip debug stmts. (nearest_common_dominator_of_uses): Take debug_stmts argument. Set it if debug stmts are found. (statement_sink_location): Skip debug stmts. Propagate moving defs into debug stmts. * ifcvt.c (first_active_insn): Skip debug insns. (last_active_insns): Likewise. (cond_exec_process_insns): Likewise. (noce_process_if_block): Likewise. (check_cond_move_block): Likewise. (cond_move_convert_if_block): Likewise. (block_jumps_and_fallthru_p): Likewise. (dead_or_predicable): Likewise. * dwarf2out.c (debug_str_hash_forced): New. (find_AT_string): Add comment. (gen_label_for_indirect_string): New. (get_debug_string_label): New. (AT_string_form): Use it. (mem_loc_descriptor): Handle non-TLS symbols. Handle MINUS , DIV, MOD, AND, IOR, XOR, NOT, ABS, NEG, and CONST_STRING. Accept but discard COMPARE, IF_THEN_ELSE, ROTATE, ROTATERT, TRUNCATE and several operations that cannot be represented with DWARF opcodes. (loc_descriptor): Ignore SIGN_EXTEND and ZERO_EXTEND. Require dwarf_version 4 for DW_OP_implicit_value and DW_OP_stack_value. (dwarf2out_var_location): Take during-call mark into account. (output_indirect_string): Update comment. Output if there are label and references. (prune_indirect_string): New. (prune_unused_types): Call it if debug_str_hash_forced. More in dwarf2out.c, from Jakub Jelinek <jakub@redhat.com>: (dw_long_long_const): Remove. (struct dw_val_struct): Change val_long_long type to rtx. (print_die, attr_checksum, same_dw_val_p, loc_descriptor): Adjust for val_long_long change to CONST_DOUBLE rtx from a long hi/lo pair. (output_die): Likewise. Use HOST_BITS_PER_WIDE_INT size of each component instead of HOST_BITS_PER_LONG. (output_loc_operands): Likewise. For const8* assert HOST_BITS_PER_WIDE_INT rather than HOST_BITS_PER_LONG is >= 64. (output_loc_operands_raw): For const8* assert HOST_BITS_PER_WIDE_INT rather than HOST_BITS_PER_LONG is >= 64. (add_AT_long_long): Remove val_hi and val_lo arguments, add val_const_double. (size_of_die): Use HOST_BITS_PER_WIDE_INT size multiplier instead of HOST_BITS_PER_LONG for dw_val_class_long_long. (add_const_value_attribute): Adjust add_AT_long_long caller. Don't handle TLS SYMBOL_REFs. If CONST wraps a constant, tail recurse. (dwarf_stack_op_name): Handle DW_OP_implicit_value and DW_OP_stack_value. (size_of_loc_descr, output_loc_operands, output_loc_operands_raw): Handle DW_OP_implicit_value. (extract_int): Move prototype earlier. (mem_loc_descriptor): For SUBREG punt if inner mode size is wider than DWARF2_ADDR_SIZE. Handle SIGN_EXTEND and ZERO_EXTEND by DW_OP_shl and DW_OP_shr{a,}. Handle EQ, NE, GT, GE, LT, LE, GTU, GEU, LTU, LEU, SMIN, SMAX, UMIN, UMAX, SIGN_EXTRACT, ZERO_EXTRACT. (loc_descriptor): Compare mode size with DWARF2_ADDR_SIZE instead of Pmode size. (loc_descriptor): Add MODE argument. Handle CONST_INT, CONST_DOUBLE, CONST_VECTOR, CONST, LABEL_REF and SYMBOL_REF if mode != VOIDmode, attempt to handle other expressions. Don't handle TLS SYMBOL_REFs. (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor_from_tree_1): Adjust loc_descriptor callers. (add_location_or_const_value_attribute): Likewise. For single location loc_lists attempt to use add_const_value_attribute for constant decls. Add DW_AT_const_value even if NOTE_VAR_LOCATION is VAR_LOCATION with CONSTANT_P or CONST_STRING in its expression. * cfgbuild.c (inside_basic_block_p): Handle debug insns. (control_flow_insn_p): Likewise. * tree-parloops.c (eliminate_local_variables_stmt): Handle debug stmt. (separate_decls_in_region_debug_bind): New. (separate_decls_in_region): Process debug bind stmts afterwards. * recog.c (verify_changes): Handle debug insns. (extract_insn): Likewise. (peephole2_optimize): Skip debug insns. * dse.c (scan_insn): Skip debug insns. * sel-sched-ir.c (return_nop_to_pool): Take full_tidying argument. Pass it on. (setup_id_for_insn): Handle debug insns. (maybe_tidy_empty_bb): Adjust whitespace. (tidy_control_flow): Skip debug insns. (sel_remove_insn): Adjust for debug insns. (sel_estimate_number_of_insns): Skip debug insns. (create_insn_rtx_from_pattern): Handle debug insns. (create_copy_of_insn_rtx): Likewise. * sel-sched-.h (sel_bb_end): Declare. (sel_bb_empty_or_nop_p): New. (get_all_loop_exits): Use it. (_eligible_successor_edge_p): Likewise. (return_nop_to_pool): Adjust. * tree-eh.c (tre_empty_eh_handler_p): Skip debug stmts. * ira-lives.c (process_bb_node_lives): Skip debug insns. * gimple-pretty-print.c (dump_gimple_debug): New. (dump_gimple_stmt): Use it. (dump_bb_header): Skip gimple debug stmts. * regmove.c (optimize_reg_copy_1): Discount debug insns. (fixup_match_2): Likewise. (regmove_backward_pass): Likewise. Simplify combined replacement. Handle debug insns. * function.c (instantiate_virtual_regs): Handle debug insns. * function.h (struct emit_status): Add x_cur_debug_insn_uid. * print-rtl.h: Include cselib.h. (print_rtx): Print VALUEs. Split out and recurse for VAR_LOCATIONs. * df.h (df_inns_rescan_debug_internal): Declare. * gcse.c (alloc_hash_table): Estimate n_insns. (cprop_insn): Don't regard debug insns as changes. (bypass_conditional_jumps): Skip debug insns. (one_pre_gcse_pass): Adjust. (one_code_hoisting_pass): Likewise. (compute_ld_motion_mems): Skip debug insns. (one_cprop_pass): Adjust. * tree-if-conv.c (tree_if_convert_stmt): Reset debug stmts. (if_convertible_stmt_p): Handle debug stmts. * init-regs.c (initialize_uninitialized_regs): Skip debug insns. * tree-vect-loop.c (vect_is_simple_reduction): Skip debug stmts. * ira-build.c (create_bb_allocnos): Skip debug insns. * tree-flow-inline.h (has_zero_uses): Discount debug stmts. (has_single_use): Likewise. (single_imm_use): Likewise. (num_imm_uses): Likewise. * tree-ssa-phiopt.c (empty_block_p): Skip debug stmts. * tree-ssa-coalesce.c (build_ssa_conflict_graph): Skip debug stmts. (create_outofssa_var_map): Likewise. * lower-subreg.c (adjust_decomposed_uses): New. (resolve_debug): New. (decompose_multiword_subregs): Use it. * tree-dfa.c (find_referenced_vars): Skip debug stmts. * emit-rtl.c: Include params.h. (cur_debug_insn_uid): Define. (set_new_first_and_last_insn): Set cur_debug_insn_uid too. (copy_rtx_if_shared_1): Handle debug insns. (reset_used_flags): Likewise. (set_used_flags): LIkewise. (get_max_insn_count): New. (next_nondebug_insn): New. (prev_nondebug_insn): New. (make_debug_insn_raw): New. (emit_insn_before_noloc): Handle debug insns. (emit_jump_insn_before_noloc): Likewise. (emit_call_insn_before_noloc): Likewise. (emit_debug_insn_before_noloc): New. (emit_insn_after_noloc): Handle debug insns. (emit_jump_insn_after_noloc): Likewise. (emit_call_insn_after_noloc): Likewise. (emit_debug_insn_after_noloc): Likewise. (emit_insn_after): Take loc from earlier non-debug insn. (emit_jump_insn_after): Likewise. (emit_call_insn_after): Likewise. (emit_debug_insn_after_setloc): New. (emit_debug_insn_after): New. (emit_insn_before): Take loc from later non-debug insn. (emit_jump_insn_before): Likewise. (emit_call_insn_before): Likewise. (emit_debug_insn_before_setloc): New. (emit_debug_insn_before): New. (emit_insn): Handle debug insns. (emit_debug_insn): New. (emit_jump_insn): Handle debug insns. (emit_call_insn): Likewise. (emit): Likewise. (init_emit): Take min-nondebug-insn-uid into account. Initialize cur_debug_insn_uid. (emit_copy_of_insn_after): Handle debug insns. * cfgexpand.c (gimple_assign_rhs_to_tree): Do not overwrite location of single rhs in place. (maybe_dump_rtl_for_gimple_stmt): Dump lineno. (floor_sdiv_adjust): New. (cell_sdiv_adjust): New. (cell_udiv_adjust): New. (round_sdiv_adjust): New. (round_udiv_adjust): New. (wrap_constant): Moved from cselib. (unwrap_constant): New. (expand_debug_expr): New. (expand_debug_locations): New. (expand_gimple_basic_block): Drop hiding redeclaration. Expand debug bind stmts. (gimple_expand_cfg): Expand debug locations. * cselib.c: Include tree-pass.h. (struct expand_value_data): New. (cselib_record_sets_hook): New. (PRESERVED_VALUE_P, LONG_TERM_PRESERVED_VALUE_P): New. (cselib_clear_table): Move, and implemnet in terms of... (cselib_reset_table_with_next_value): ... this. (cselib_get_next_unknown_value): New. (discard_useless_locs): Don't discard preserved values. (cselib_preserve_value): New. (cselib_preserved_value_p): New. (cselib_preserve_definitely): New. (cselib_clear_preserve): New. (cselib_preserve_only_values): New. (new_cselib_val): Take rtx argument. Dump it in details. (cselib_lookup_mem): Adjust. (expand_loc): Take regs_active in struct. Adjust. Silence dumps unless details are requested. (cselib_expand_value_rtx_cb): New. (cselib_expand_value_rtx): Rename and reimplment in terms of... (cselib_expand_value_rtx_1): ... this. Adjust. Silence dumps without details. Copy more subregs. Try to resolve values using a callback. Wrap constants. (cselib_subst_to_values): Adjust. (cselib_log_lookup): New. (cselib_lookup): Call it. (cselib_invalidate_regno): Don't count preserved values as useless. (cselib_invalidate_mem): Likewise. (cselib_record_set): Likewise. (struct set): Renamed to cselib_set, moved to cselib.h. (cselib_record_sets): Adjust. Call hook. (cselib_process_insn): Reset table when it would be cleared. (dump_cselib_val): New. (dump_cselib_table): New. * tree-cfgcleanup.c (tree_forwarded_block_p): Skip debug stmts. (remove_forwarder_block): Support moving debug stmts. * cselib.h (cselib_record_sets_hook): Declare. (cselib_expand_callback): New type. (cselib_expand_value_rtx_cb): Declare. (cselib_reset_table_with_next_value): Declare. (cselib_get_next_unknown_value): Declare. (cselib_preserve_value): Declare. (cselib_preserved_value_p): Declare. (cselib_preserve_only_values): Declare. (dump_cselib_table): Declare. * cfgcleanup.c (flow_find_cross_jump): Skip debug insns. (try_crossjump_to_edge): Likewise. (delete_unreachable_blocks): Remove dominant GIMPLE blocks after dominated blocks when debug stmts are present. * simplify-rtx.c (delegitimize_mem_from_attrs): New. * tree-ssa-live.c (remove_unused_locals): Skip debug stmts. (set_var_live_on_entry): Likewise. * loop-invariant.c (find_invariants_bb): Skip debug insns. * cfglayout.c (curr_location, last_location): Make static. (set_curr_insn_source_location): Don't avoid bouncing. (get_curr_insn_source_location): New. (get_curr_insn_block): New. (duplicate_insn_chain): Handle debug insns. * tree-ssa-forwprop.c (forward_propagate_addr_expr): Propagate into debug stmts. * common.opt (fcompare-debug): Move to sort order. (fdump-unnumbered-links): Likewise. (fvar-tracking-assignments): New. (fvar-tracking-assignments-toggle): New. * tree-ssa-dce.c (mark_stmt_necessary): Don't mark blocks because of debug stmts. (mark_stmt_if_obviously_necessary): Mark debug stmts. (eliminate_unnecessary_stmts): Walk dominated blocks before dominators. * tree-ssa-ter.c (find_replaceable_in_bb): Skip debug stmts. * ira.c (memref_used_between_p): Skip debug insns. (update_equiv_regs): Likewise. * sched-deps.c (sd_lists_size): Accept empty list. (sd_init_insn): Mark debug insns. (sd_finish_insn): Unmark them. (sd_add_dep): Reject non-debug deps on debug insns. (fixup_sched_groups): Give debug insns group treatment. Skip debug insns. (sched_analyze_reg): Don't mark debug insns for sched before call. (sched_analyze_2): Handle debug insns. (sched_analyze_insn): Compute next non-debug insn. Handle debug insns. (deps_analyze_insn): Handle debug insns. (deps_start_bb): Skip debug insns. (init_deps): Initialize last_debug_insn. * tree-ssa.c (target_for_debug_bind): New. (find_released_ssa_name): New. (propagate_var_def_into_debug_stmts): New. (propagate_defs_into_debug_stmts): New. (verify_ssa): Skip debug bind stmts without values. (warn_uninialized_vars): Skip debug stmts. * target-def.h (TARGET_DELEGITIMIZE_ADDRESS): Set default. * rtl.c (rtx_equal_p_cb): Handle VALUEs. (rtx_equal_p): Likewise. * ira-costs.c (scan_one_insn): Skip debug insns. (process_bb_node_for_hard_reg_moves): Likewise. * rtl.h (DEBUG_INSN_P): New. (NONDEBUG_INSN_P): New. (MAY_HAVE_DEBUG_INSNS): New. (INSN_P): Accept debug insns. (RTX_FRAME_RELATED_P): Likewise. (INSN_DELETED_P): Likewise (PAT_VAR_LOCATION_DECL): New. (PAT_VAR_LOCATION_LOC): New. (PAT_VAR_OCATION_STATUS): New. (NOTE_VAR_LOCATION_DECL): Reimplement. (NOTE_VAR_LOCATION_LOC): Likewise. (NOTE_VAR_LOCATION_STATUS): Likewise. (INSN_VAR_LOCATION): New. (INSN_VAR_LOCATION_DECL): New. (INSN_VAR_LOCATION_LOC): New. (INSN_VAR_LOCATION_STATUS): New. (gen_rtx_UNKNOWN_VAR_LOC): New. (VAR_LOC_UNKNOWN_P): New. (NOTE_DURING_CALL_P): New. (SCHED_GROUP_P): Accept debug insns. (emit_debug_insn_before): Declare. (emit_debug_insn_before_noloc): Declare. (emit_debug_insn_beore_setloc): Declare. (emit_debug_insn_after): Declare. (emit_debug_insn_after_noloc): Declare. (emit_debug_insn_after_setloc): Declare. (emit_debug_insn): Declare. (make_debug_insn_raw): Declare. (prev_nondebug_insn): Declare. (next_nondebug_insn): Declare. (delegitimize_mem_from_attrs): Declare. (get_max_insn_count): Declare. (wrap_constant): Declare. (unwrap_constant): Declare. (get_curr_insn_source_location): Declare. (get_curr_insn_block): Declare. * tree-inline.c (insert_debug_decl_map): New. (processing_debug_stmt): New. (remap_decl): Don't create new mappings in debug stmts. (remap_gimple_op_r): Don't add references in debug stmts. (copy_tree_body_r): Likewise. (remap_gimple_stmt): Handle debug bind stmts. (copy_bb): Skip debug stmts. (copy_edges_for_bb): Likewise. (copy_debug_stmt): New. (copy_debug_stmts): New. (copy_body): Copy debug stmts at the end. (insert_init_debug_bind): New. (insert_init_stmt): Take id. Skip and emit debug stmts. (setup_one_parameter): Remap variable earlier, register debug mapping. (estimate_num_insns): Skip debug stmts. (expand_call_inline): Preserve debug_map. (optimize_inline_calls): Check for no debug_stmts left-overs. (unsave_expr_now): Preserve debug_map. (copy_gimple_seq_and_replace_locals): Likewise. (tree_function_versioning): Check for no debug_stmts left-overs. Init and destroy debug_map as needed. Split edges unconditionally. (build_duplicate_type): Init and destroy debug_map as needed. * tree-inline.h: Include gimple.h instead of pointer-set.h. (struct copy_body_data): Add debug_stmts and debug_map. * sched-int.h (struct ready_list): Add n_debug. (struct deps): Add last_debug_insn. (DEBUG_INSN_SCHED_P): New. (BOUNDARY_DEBUG_INSN_P): New. (SCHEDULE_DEBUG_INSN_P): New. (sd_iterator_cond): Accept empty list. * combine.c (create_log_links): Skip debug insns. (combine_instructions): Likewise. (cleanup_auto_inc_dec): New. From Jakub Jelinek: Make sure the return value is always unshared. (struct rtx_subst_pair): New. (auto_adjust_pair): New. (propagate_for_debug_subst): New. (propagate_for_debug): New. (try_combine): Skip debug insns. Propagate removed defs into debug insns. (next_nonnote_nondebug_insn): New. (distribute_notes): Use it. Skip debug insns. (distribute_links): Skip debug insns. * tree-outof-ssa.c (set_location_for_edge): Likewise. * resource.c (mark_target_live_regs): Likewise. * var-tracking.c: Include cselib.h and target.h. (enum micro_operation_type): Add MO_VAL_USE, MO_VAL_LOC, and MO_VAL_SET. (micro_operation_type_name): New. (enum emit_note_where): Add EMIT_NOTE_AFTER_CALL_INSN. (struct micro_operation_def): Update comments. (decl_or_value): New type. Use instead of decls. (struct emit_note_data_def): Add vars. (struct attrs_def): Use decl_or_value. (struct variable_tracking_info_def): Add permp, flooded. (struct location_chain_def): Update comment. (struct variable_part_def): Use decl_or_value. (struct variable_def): Make var_part a variable length array. (valvar_pool): New. (scratch_regs): New. (cselib_hook_called): New. (dv_is_decl_p): New. (dv_is_value_p): New. (dv_as_decl): New. (dv_as_value): New. (dv_as_opaque): New. (dv_onepart_p): New. (dv_pool): New. (IS_DECL_CODE): New. (check_value_is_not_decl): New. (dv_from_decl): New. (dv_from_value): New. (dv_htab_hash): New. (variable_htab_hash): Use it. (variable_htab_eq): Support values. (variable_htab_free): Free from the right pool. (attrs_list_member, attrs_list_insert): Use decl_or_value. (attrs_list_union): Adjust. (attrs_list_mpdv_union): New. (tie_break_pointers): New. (canon_value_cmp): New. (unshare_variable): Return possibly-modified slot. (vars_copy_1): Adjust. (var_reg_decl_set): Adjust. Split out of... (var_reg_set): ... this. (get_init_value): Adjust. (var_reg_delete_and_set): Adjust. (var_reg_delete): Adjust. (var_regno_delete): Adjust. (var_mem_decl_set): Split out of... (var_mem_set): ... this. (var_mem_delete_and_set): Adjust. (var_mem_delete): Adjust. (val_store): New. (val_reset): New. (val_resolve): New. (variable_union): Adjust. Speed up merge of 1-part vars. (variable_canonicalize): Use unshared slot. (VALUED_RECURSED_INTO): New. (find_loc_in_1pdv): New. (struct dfset_merge): New. (insert_into_intersection): New. (intersect_loc_chains): New. (loc_cmp): New. (canonicalize_loc_order_check): New. (canonicalize_values_mark): New. (canonicalize_values_star): New. (variable_merge_over_cur): New. (variable_merge_over_src): New. (dataflow_set_merge): New. (dataflow_set_equiv_regs): New. (remove_duplicate_values): New. (struct dfset_post_merge): New. (variable_post_merge_new_vals): New. (variable_post_merge_perm_vals): New. (dataflow_post_merge_adjust): New. (find_mem_expr_in_1pdv): New. (dataflow_set_preserve_mem_locs): New. (dataflow_set_remove_mem_locs): New. (dataflow_set_clear_at_call): New. (onepart_variable_different_p): New. (variable_different_p): Use it. (dataflow_set_different_1): Adjust. Make detailed dump more verbose. (track_expr_p): Add need_rtl parameter. Don't generate rtl if not needed. (track_loc_p): Pass it true. (struct count_use_info): New. (find_use_val): New. (replace_expr_with_values): New. (log_op_type): New. (use_type): New, partially split out of... (count_uses): ... this. Count new micro-ops. (count_uses_1): Adjust. (count_stores): Adjust. (count_with_sets): New. (VAL_NEEDS_RESOLUTION): New. (VAL_HOLDS_TRACK_EXPR): New. (VAL_EXPR_IS_COPIED): New. (VAL_EXPR_IS_CLOBBERED): New. (add_uses): Adjust. Generate new micro-ops. (add_uses_1): Adjust. (add_stores): Generate new micro-ops. (add_with_sets): New. (find_src_status): Adjust. (find_src_set_src): Adjust. (compute_bb_dataflow): Use dataflow_set_clear_at_call. Handle new micro-ops. Canonicalize value equivalances. (vt_find_locations): Compute total size of hash tables for dumping. Perform merge for var-tracking-assignments. Don't disregard single-block loops. (dump_attrs_list): Handle decl_or_value. (dump_variable): Take variable. Deal with decl_or_value. (dump_variable_slot): New. (dump_vars): Use it. (dump_dataflow_sets): Adjust. (set_slot_part): New, extended to support one-part variables after splitting out of... (set_variable_part): ... this. (clobber_slot_part): New, split out of... (clobber_variable_part): ... this. (delete_slot_part): New, split out of... (delete_variable_part): .... this. (check_wrap_constant): New. (vt_expand_loc_callback): New. (vt_expand_loc): New. (emit_note_insn_var_location): Adjust. Handle values. Handle EMIT_NOTE_AFTER_CALL_INSN. (emit_notes_for_differences_1): Adjust. Handle values. (emit_notes_for_differences_2): Likewise. (emit_notes_for_differences): Adjust. (emit_notes_in_bb): Take pointer to set. Emit AFTER_CALL_INSN notes. Adjust. Handle new micro-ops. (vt_add_function_parameters): Adjust. Create and bind values. (vt_initialize): Adjust. Initialize scratch_regs and valvar_pool, flooded and perm.. Initialize and use cselib. Log operations. Move some code to count_with_sets and add_with_sets. (delete_debug_insns): New. (vt_debug_insns_local): New. (vt_finalize): Release permp, valvar_pool, scratch_regs. Finish cselib. (var_tracking_main): If var-tracking-assignments is enabled but var-tracking isn't, delete debug insns and leave. Likewise if we exceed limits or fail the stack adjustments tests, and after all var-tracking processing. More in var-tracking, from Jakub Jelinek <jakub@redhat.com>: (dataflow_set): Add traversed_vars. (value_chain, const_value_chain): New typedefs. (value_chain_pool, value_chains): New variables. (value_chain_htab_hash, value_chain_htab_eq, add_value_chain, add_value_chains, add_cselib_value_chains, remove_value_chain, remove_value_chains, remove_cselib_value_chains): New functions. (shared_hash_find_slot_unshare_1, shared_hash_find_slot_1, shared_hash_find_slot_noinsert_1, shared_hash_find_1): New static inlines. (shared_hash_find_slot_unshare, shared_hash_find_slot, shared_hash_find_slot_noinsert, shared_hash_find): Update. (dst_can_be_shared): New variable. (unshare_variable): Unshare set->vars if shared, use shared_hash_*. Clear dst_can_be_shared. If set->traversed_vars is non-NULL and different from set->vars, look up slot again instead of using the passed in slot. (dataflow_set_init): Initialize traversed_vars. (variable_union): Use shared_hash_*. Use initially NO_INSERT lookup if set->vars is shared. Don't keep slot cleared before calling unshare_variable. Unshare set->vars if needed. Adjust unshare_variable callers. Clear dst_can_be_shared if needed. Even ->refcount == 1 vars must be unshared if set->vars is shared and var needs to be modified. (dataflow_set_union): Set traversed_vars during canonicalization. (VALUE_CHANGED, DECL_CHANGED): Define. (set_dv_changed, dv_changed_p): New static inlines. (track_expr_p): Clear DECL_CHANGED. (dump_dataflow_sets): Set it. (variable_was_changed): Call set_dv_changed. (emit_note_insn_var_location): Likewise. (changed_variables_stack): New variable. (check_changed_vars_1, check_changed_vars_2): New functions. (emit_notes_for_changes): Do nothing if changed_variables is empty. Traverse changed_variables with check_changed_vars_1, call check_changed_vars_2 on each changed_variables_stack entry. (emit_notes_in_bb): Add SET argument. Just clear it at the beginning, use it instead of local &set, don't destroy it at the end. (vt_emit_notes): Call dataflow_set_clear early on all VTI(bb)->out sets, never use them, instead use emit_notes_in_bb computed set, dataflow_set_clear also VTI(bb)->in when we are done with the basic block. Initialize changed_variables_stack, free it afterwards. If ENABLE_CHECKING verify that after noting differences to an empty set value_chains hash table is empty. (vt_initialize): Initialize value_chains and value_chain_pool. (vt_finalize): Delete value_chains htab, free value_chain_pool. (variable_tracking_main): Call dump_dataflow_sets before calling vt_emit_notes, not after it. * tree-flow.h (propagate_defs_into_debug_stmts): Declare. (propagate_var_def_into_debug_stmts): Declare. * df-problems.c (df_lr_bb_local_compute): Skip debug insns. (df_set_note): Reject debug insns. (df_whole_mw_reg_dead_p): Take added_notes_p argument. Don't add notes to debug insns. (df_note_bb_compute): Adjust. Likewise. (df_simulate_uses): Skip debug insns. (df_simulate_initialize_backwards): Likewise. * reg-stack.c (subst_stack_regs_in_debug_insn): New. (subst_stack_regs_pat): Reject debug insns. (convert_regs_1): Handle debug insns. * Makefile.in (TREE_INLINE_H): Take pointer-set.h from GIMPLE_H. (print-rtl.o): Depend on cselib.h. (cselib.o): Depend on TREE_PASS_H. (var-tracking.o): Depend on cselib.h and TARGET_H. * sched-rgn.c (rgn_estimate_number_of_insns): Discount debug insns. (init_ready_list): Skip boundary debug insns. (add_branch_dependences): Skip debug insns. (free_block_dependencies): Check for blocks with only debug insns. (compute_priorities): Likewise. * gimple.c (gss_for_code): Handle GIMPLE_DEBUG. (gimple_build_with_ops_stat): Take subcode as unsigned. Adjust all callers. (gimple_build_debug_bind_stat): New. (empty_body_p): Skip debug stmts. (gimple_has_side_effects): Likewise. (gimple_rhs_has_side_effects): Likewise. * gimple.h (enum gimple_debug_subcode, GIMPLE_DEBUG_BIND): New. (gimple_build_debug_bind_stat): Declare. (gimple_build_debug_bind): Define. (is_gimple_debug): New. (gimple_debug_bind_p): New. (gimple_debug_bind_get_var): New. (gimple_debug_bind_get_value): New. (gimple_debug_bind_get_value_ptr): New. (gimple_debug_bind_set_var): New. (gimple_debug_bind_set_value): New. (GIMPLE_DEBUG_BIND_NOVALUE): New internal temporary macro. (gimple_debug_bind_reset_value): New. (gimple_debug_bind_has_value_p): New. (gsi_next_nondebug): New. (gsi_prev_nondebug): New. (gsi_start_nondebug_bb): New. (gsi_last_nondebug_bb): New. * sched-vis.c (print_pattern): Handle VAR_LOCATION. (print_insn): Handle DEBUG_INSN. * tree-cfg.c (remove_bb): Walk stmts backwards. Let loc of first insn prevail. (first_stmt): Skip debug stmts. (first_non_label_stmt): Likewise. (last_stmt): Likewise. (has_zero_uses_1): New. (single_imm_use_1): New. (verify_gimple_debug): New. (verify_types_in_gimple_stmt): Handle debug stmts. (verify_stmt): Likewise. (debug_loop_num): Skip debug stmts. (remove_edge_and_dominated_blocks): Remove dominators last. * tree-ssa-reasssoc.c (rewrite_expr_tree): Propagate into debug stmts. (linearize_expr): Likewise. * config/i386/i386.c (ix86_delegitimize_address): Call default implementation. * config/ia64/ia64.c (ia64_safe_itanium_class): Handle debug insns. (group_barrier_needed): Skip debug insns. (emit_insn_group_barriers): Likewise. (emit_all_insn_group_barriers): Likewise. (ia64_variable_issue): Handle debug insns. (ia64_dfa_new_cycle): Likewise. (final_emit_insn_group_barriers): Skip debug insns. (ia64_dwarf2out_def_steady_cfa): Take frame argument. Don't def cfa without frame. (process_set): Likewise. (process_for_unwind_directive): Pass frame on. * config/rs6000/rs6000.c (TARGET_DELEGITIMIZE_ADDRESS): Define. (rs6000_delegitimize_address): New. (rs6000_debug_adjust_cost): Handle debug insns. (is_microcoded_insn): Likewise. (is_cracked_insn): Likewise. (is_nonpipeline_insn): Likewise. (insn_must_be_first_in_group): Likewise. (insn_must_be_last_in_group): Likewise. (force_new_group): Likewise. * cfgrtl.c (rtl_split_block): Emit INSN_DELETED note if block contains only debug insns. (rtl_merge_blocks): Skip debug insns. (purge_dead_edges): Likewise. (rtl_block_ends_with_call_p): Skip debug insns. * dce.c (deletable_insn_p): Handle VAR_LOCATION. (mark_reg_dependencies): Skip debug insns. * params.def (PARAM_MIN_NONDEBUG_INSN_UID): New. * tree-ssanames.c (release_ssa_name): Propagate def into debug stmts. * tree-ssa-threadedge.c (record_temporary_equivalences_from_stmts): Skip debug stmts. * regcprop.c (replace_oldest_value_addr): Skip debug insns. (replace_oldest_value_mem): Use ALL_REGS for debug insns. (copyprop_hardreg_forward_1): Handle debug insns. * reload1.c (reload): Skip debug insns. Replace unassigned pseudos in debug insns with their equivalences. (eliminate_regs_in_insn): Skip debug insns. (emit_input_reload_insns): Skip debug insns at first, adjust them later. * tree-ssa-operands.c (add_virtual_operand): Reject debug stmts. (get_indirect_ref_operands): Pass opf_no_vops on. (get_expr_operands): Likewise. Skip debug stmts. (parse_ssa_operands): Scan debug insns with opf_no_vops. gcc/testsuite/ChangeLog: * gcc.dg/guality/guality.c: New. * gcc.dg/guality/guality.h: New. * gcc.dg/guality/guality.exp: New. * gcc.dg/guality/example.c: New. * lib/gcc-dg.exp (cleanup-dump): Remove .gk files. (cleanup-saved-temps): Likewise, .gkd files too. gcc/cp/ChangeLog: * cp-tree.h (TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS): New. * cp-lang.c (cxx_dwarf_name): Pass it. * error.c (count_non_default_template_args): Take flags as argument. Adjust all callers. Skip counting of default arguments if the new flag is given. ChangeLog: * Makefile.tpl (BUILD_CONFIG): Default to bootstrap-debug. * Makefile.in: Rebuilt. contrib/ChangeLog: * compare-debug: Look for .gkd files and compare them. config/ChangeLog: * bootstrap-debug.mk: Add comments. * bootstrap-debug-big.mk: New. * bootstrap-debug-lean.mk: New. * bootstrap-debug-ckovw.mk: Add comments. * bootstrap-debug-lib.mk: Drop CFLAGS for stages. Use -g0 for TFLAGS in stage1. Drop -fvar-tracking-assignments-toggle. From-SVN: r151312
2009-09-02 04:42:21 +02:00
|| (NONDEBUG_INSN_P (insn) && !JUMP_P (insn)
&& !single_set (insn) && GET_CODE (PATTERN (insn)) != USE
&& !reg_mentioned_p (count_reg, insn))
|| (INSN_P (insn) && (set = single_set (insn))
&& GET_CODE (SET_DEST (set)) == SUBREG))
break;
}
if (insn != NEXT_INSN (tail))
{
tree-vrp.c (execute_vrp): Do not pass dump argument to. * tree-vrp.c (execute_vrp): Do not pass dump argument to. loop_optimizer_init and loop_optimizer_finalize * tree-ssa-sink.c (execute_sink_code): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init, tree_ssa_loop_done): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Ditto. * sched-ebb.c: Include output.h. (schedule_ebbs): Do not use dump argument. * value-prof.h (struct profile_hooks): Remove profile_dump_file. * loop.c (loop_dump_stream): Removed. (loop_optimize, rest_of_handle_loop_optimize): Do not use dump argument. (scan_loop, move_movables, find_and_verify_loops, mark_loop_jump, emit_prefetch_instructions, loop_bivs_find, loop_bivs_check, final_biv_value, loop_biv_eliminable_p, loop_givs_rescan, loop_iterations, strength_reduce, record_biv, record_giv, final_giv_value, check_final_value, check_ext_dependent_givs, combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems, try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use dump_file instead of loop_dump_stream. * ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call argument dump_file. * reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use dump argument. * flow.c (life_analysis, rest_of_handle_life): Ditto. * haifa-sched.c: Include output.h (schedule_insns, sched_init): Do not use dump argument. * mode-switching.c (optimize_mode_switching): Ditto. * modulo-sched.c (stats_file): Removed. (print_node_sched_params): Do not call argument dump_file. (sms_schedule_by_order, loop_canon_p, sms_schedule, rest_of_handle_sms): Do not use dump argument. Use dump_file instead of stats_file. * cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not use dump argument. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize, rtl_loop_init, rtl_loop_done): Ditto. * global.c (global_alloc, rest_of_handle_global_alloc): Ditto. * predict.c (combine_predictions_for_bb, tree_estimate_probability): Ditto. * recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto. * lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto. * regmove.c (fixup_match_1, fixup_match_2, regmove_optimize, rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto. * emit-rtl.c (renumber_insns): Ditto. * cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr, expand_gimple_basic_block, tree_expand_cfg): Ditto. * regclass.c (regclass): Ditto. * tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts, remove_ssa_form, rewrite_out_of_ssa): Ditto. * reg-stack.c (compensate_edge, compensate_edges, convert_regs_1, convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs): Ditto. * sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto. * local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file to regclass. * gcse.c (gcse_file, debug_stderr): Removed. (gcse_main, bypass_jumps, rest_of_handle_jump_bypass, rest_of_handle_gcse): Do not use dump argument. (cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets, one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb, pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass, compute_code_hoist_vbeinout, compute_code_hoist_data, one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores, compute_store_table, build_store_vectors, insert_insn_start_bb, insert_store, remove_reachable_equiv_notes, replace_store_insn, store_motion): Use dump_file instead of gcse_file. * ipa-type-escape.c (type_escape_execute): Remove debugging comments. * profile.c (profile_dump_file): Removed. (branch_prob): Use dump_file instead of profile_dump_file. * ipa.c (cgraph_remove_unreachable_nodes): Do not call argument dump_file. * tree-ssa-copy.c (dump_copy_of): Ditto. * rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass dump file to life_analysis. * bt-load.c (branch_target_load_optimize): Ditto. * cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to renumber_insns. * rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs, regclass, dbr_schedule): Declaration changed. * sched-int.h (sched_init): Declaration changed. * tree-profile.c (tree_profile_dump_file): Removed. (tree_profile_hooks): Removed profile_dump_file hook. * rtl-profile (rtl_profile_dump_file): Removed. (rtl_profile_hooks): emoved profile_dump_file hook. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * c-gimplify.c (c_genericize): Do not call local variable dump_file. * tree-cfg.c (build_tree_cfg): Ditto. * Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency. * basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm): Declaration changed. * config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to life_analysis and schedule_insns. * config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to life_analysis. * config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to dbr_schedule. * config/mips/mips.c (mips_reorg): Ditto. * config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to schedule_ebbs. From-SVN: r110656
2006-02-06 19:20:47 +01:00
if (dump_file)
{
alias.c (nonlocal_mentioned_p, [...]): Use, LABEL_P, JUMP_P, CALL_P, NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P. 2004-07-08 Jerry Quinn <jlquinn@optonline.net> * alias.c (nonlocal_mentioned_p, nonlocal_referenced_p, nonlocal_set_p, init_alias_analysis): Use, LABEL_P, JUMP_P, CALL_P, NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P. * bb-reorder.c (mark_bb_for_unlikely_executed_section, add_labels_and_missing_jumps, find_jump_block, fix_crossing_unconditional_branches, add_reg_crossing_jump_notes): Likewise. * bt-load.c (btr_referenced_p, compute_defs_uses_and_gen, link_btr_uses, move_btr_def): Likewise. * builtins.c (expand_builtin_longjmp, expand_builtin_nonlocal_goto, expand_builtin_expect_jump): Likewise. * caller-save.c (save_call_clobbered_regs, insert_one_insn): Likewise. * calls.c (expand_call, emit_library_call_value_1): Likewise. * cfganal.c (forwarder_block_p): Likewise. * cfgbuild.c (inside_basic_block_p, count_basic_blocks, make_label_edge, rtl_make_eh_edge, make_edges, find_basic_blocks_1, find_bb_boundaries): Likewise. * cfgcleanup.c (try_simplify_condjump, try_forward_edges, merge_blocks_move_predecessor_nojumps, merge_blocks_move_successor_nojumps, insns_match_p, flow_find_cross_jump, outgoing_edges_match, try_crossjump_to_edge, try_optimize_cfg): Likewise. * cfgexpand.c (expand_block, construct_exit_block): Likewise. * cfglayout.c (skip_insns_after_block, label_for_bb, record_effective_endpoints, insn_locators_initialize, fixup_reorder_chain, update_unlikely_executed_notes): Likewise. * cfgmainloop.c (create_loop_notes): Likewise. * cfgrtl.c (delete_insn, delete_insn_chain, create_basic_block_structure, rtl_delete_block, free_bb_for_insn, update_bb_for_insn, rtl_merge_blocks, rtl_can_merge_blocks, block_label, try_redirect_by_replacing_jump, last_loop_beg_note, redirect_branch_edge, force_nonfallthru_and_redirect, rtl_tidy_fallthru_edge, back_edge_of_syntactic_loop_p, rtl_split_edge, commit_one_edge_insertion, print_rtl_with_bb, update_br_prob_note, rtl_verify_flow_info_1, rtl_verify_flow_info, purge_dead_edges, cfg_layout_redirect_edge_and_branch, cfg_layout_delete_block, cfg_layout_can_merge_blocks_p, cfg_layout_merge_blocks, rtl_block_ends_with_call_p, need_fake_edge_p, rtl_flow_call_edges_add): Likewise. * combine.c (combine_instructions, can_combine_p, try_combine, find_split_point, record_dead_and_set_regs, reg_dead_at_p, distribute_notes, distribute_links, insn_cuid): Likewise. * cse.c (fold_rtx, cse_insn, cse_around_loop, invalidate_skipped_block, cse_set_around_loop, cse_end_of_basic_block, cse_main, cse_basic_block, cse_condition_code_reg): Likewise. * cselib.c (cselib_process_insn): Likewise. * ddg.c (create_ddg): Likewise. * df.c (df_insn_refs_record, df_bb_rd_local_compute, df_insns_modify): Likewise. * dwarf2out.c (dwarf2out_stack_adjust, dwarf2out_frame_debug, gen_label_die, dwarf2out_var_location): Likewise. * emit-rtl.c (get_first_nonnote_insn, get_last_nonnote_insn, next_insn, previous_insn, next_nonnote_insn, prev_nonnote_insn, last_call_insn, active_insn_p, next_label, prev_label, link_cc0_insns, next_cc0_user, try_split, add_insn_after, add_insn_before, remove_insn, add_function_usage_to, reorder_insns, find_line_note, remove_unnecessary_notes, emit_insn_after_1, classify_insn): Likewise. * except.c (convert_from_eh_region_ranges_1, emit_to_new_bb_before, connect_post_landing_pads, sjlj_mark_call_sites, sjlj_emit_function_enter, sjlj_emit_function_exit, reachable_handlers, can_throw_internal, can_throw_external, set_nothrow_function_flags, convert_to_eh_region_ranges): Likewise. * explow.c (optimize_save_area_alloca): Likewise. * expr.c (expand_expr_real): Likewise. * final.c (insn_current_reference_address, compute_alignments, shorten_branches, final, scan_ahead_for_unlikely_executed_note, final_scan_insn, output_asm_label, leaf_function_p): Likewise. * flow.c (first_insn_after_basic_block_note, delete_dead_jumptables, propagate_block_delete_insn, propagate_one_insn, init_propagate_block_info, propagate_block, libcall_dead_p, mark_set_1, attempt_auto_inc, find_auto_inc, try_pre_increment): Likewise. * function.c (instantiate_virtual_regs, reorder_blocks_1, expand_function_start, expand_function_end, contains, thread_prologue_and_epilogue_insns, reposition_prologue_and_epilogue_notes): Likewise. * gcse.c (constprop_register, bypass_conditional_jumps, insert_insn_end_bb, gcse_after_reload): Likewise. * genemit.c (gen_expand, gen_split): Likewise. * genpeep.c (gen_peephole, main): Likewise. * global.c (build_insn_chain): Likewise. * graph.c (node_data, print_rtl_graph_with_bb): Likewise. * haifa-sched.c (unlink_other_notes, unlink_line_notes, get_block_head_tail, no_real_insns_p, rm_line_notes, save_line_notes, restore_line_notes, rm_redundant_line_notes, rm_other_notes, ok_for_early_queue_removal, set_priorities, sched_init): Likewise. * ifcvt.c (count_bb_insns, first_active_insn, last_active_insn, cond_exec_process_insns, end_ifcvt_sequence, noce_process_if_block, merge_if_block, block_jumps_and_fallthru_p, find_if_block, dead_or_predicable): Likewise. * integrate.c (try_constants): Likewise. * jump.c (rebuild_jump_labels, cleanup_barriers, purge_line_number_notes, init_label_info, mark_all_labels, squeeze_notes, get_label_before, get_label_after, reversed_comparison_code_parts, simplejump_p, pc_set, returnjump_p, onlyjump_p, follow_jumps, mark_jump_label, delete_barrier, delete_prior_computation, delete_computation, delete_related_insns, delete_for_peephole, redirect_jump): Likewise. * lcm.c (optimize_mode_switching): Likewise. * local-alloc.c (validate_equiv_mem, update_equiv_regs, block_alloc): Likewise. * loop-doloop.c (doloop_valid_p, doloop_optimize): Likewise. * loop-invariant.c (find_exits, find_invariants_bb): Likewise. * loop-iv.c (simplify_using_assignment): Likewise. * loop.c (compute_luids, loop_optimize, scan_loop, libcall_other_reg, libcall_benefit, skip_consec_insns, move_movables, prescan_loop, find_and_verify_loops, labels_in_range_p, for_each_insn_in_loop, loop_bivs_init_find, strength_reduce, check_insn_for_bivs, check_insn_for_givs, check_final_value, update_giv_derive, basic_induction_var, product_cheap_p, check_dbra_loop, loop_insn_first_p, last_use_this_basic_block, canonicalize_condition, get_condition, loop_regs_scan, load_mems, try_copy_prop, LOOP_BLOCK_NUM, loop_dump_aux): Likewise. * modulo-sched.c (doloop_register_get, find_line_note, sms_schedule, sms_schedule_by_order): Likewise. * optabs.c (emit_no_conflict_block, emit_libcall_block): Likewise. * postreload.c (reload_cse_simplify_operands, reload_combine, reload_cse_move2add): Likewise. * predict.c (can_predict_insn_p, estimate_probability, expected_value_to_br_prob, process_note_predictions): Likewise. * print-rtl.c (print_rtx, print_rtl, print_rtl_single): Likewise. * profile.c (branch_prob): Likewise. * ra-build.c (live_out_1, livethrough_conflicts_bb, detect_webs_set_in_cond_jump): Likewise. * ra-debug.c (ra_print_rtx_object, ra_debug_insns, ra_print_rtl_with_bb): Likewise. * ra-rewrite.c (insert_stores, rewrite_program2): Likewise. * recog.c (next_insn_tests_no_inequality, find_single_use, split_all_insns, peephole2_optimize, if_test_bypass_p): Likewise. * reg-stack.c (next_flags_user, record_label_references, emit_swap_insn, swap_rtx_condition, subst_stack_regs, compensate_edge, convert_regs_1): Likewise. * regclass.c (scan_one_insn): Likewise. * regmove.c (optimize_reg_copy_1, optimize_reg_copy_2, fixup_match_2, regmove_optimize, fixup_match_1, single_set_for_csa, combine_stack_adjustments_for_block): Likewise. * regrename.c (build_def_use, copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads, find_reloads_address_1, subst_reloads, find_equiv_reg): Likewise. * reload1.c (reload, calculate_needs_all_insns, set_label_offsets, reload_as_needed, emit_input_reload_insns, do_output_reload, delete_output_reload, delete_address_reloads_1, fixup_abnormal_edges): Likewise. * reorg.c (find_end_label, emit_delay_sequence, delete_from_delay_slot, delete_scheduled_jump, optimize_skip, get_jump_flags, rare_destination, mostly_true_jump, try_merge_delay_insns, redundant_insn, own_thread_p, fill_simple_delay_slots, fill_slots_from_thread, fill_eager_delay_slots, relax_delay_slots, make_return_insns, dbr_schedule): Likewise. * resource.c (find_basic_block, next_insn_no_annul, find_dead_or_set_registers, mark_target_live_regs): Likewise. * rtl.h (RTX_PREV): Likewise. * rtlanal.c (global_reg_mentioned_p, no_labels_between_p, no_jumps_between_p, reg_used_between_p, reg_referenced_between_p, reg_set_p, find_last_value, dead_or_set_regno_p, find_reg_fusage, find_regno_fusage, pure_call_p, replace_label, rtx_referenced_p_1, tablejump_p, computed_jump_p, insns_safe_to_move_p, find_first_parameter_load, can_hoist_insn_p): Likewise. * sched-deps.c (get_condition, add_dependence, sched_analyze_2, sched_analyze_insn, sched_analyze, add_forward_dependence): Likewise. * sched-ebb.c (fix_basic_block_boundaries, add_deps_for_risky_insns, schedule_ebbs): Likewise. * sched-rgn.c (is_cfg_nonregular, find_conditional_protection, is_conditionally_protected, can_schedule_ready_p, add_branch_dependences, debug_dependencies): Likewise. * stmt.c (emit_nop, expand_start_case, emit_jump_if_reachable): Likewise. * unroll.c (unroll_loop, copy_loop_body, back_branch_in_range_p, reg_dead_after_loop, loop_find_equiv_value, loop_iterations, set_dominates_use, ujump_to_loop_cont): Likewise. * var-tracking.c (prologue_stack_adjust, vt_initialize): Likewise. * varasm.c (output_constant_pool_1): Likewise. From-SVN: r84341
2004-07-09 05:29:35 +02:00
if (CALL_P (insn))
tree-vrp.c (execute_vrp): Do not pass dump argument to. * tree-vrp.c (execute_vrp): Do not pass dump argument to. loop_optimizer_init and loop_optimizer_finalize * tree-ssa-sink.c (execute_sink_code): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init, tree_ssa_loop_done): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Ditto. * sched-ebb.c: Include output.h. (schedule_ebbs): Do not use dump argument. * value-prof.h (struct profile_hooks): Remove profile_dump_file. * loop.c (loop_dump_stream): Removed. (loop_optimize, rest_of_handle_loop_optimize): Do not use dump argument. (scan_loop, move_movables, find_and_verify_loops, mark_loop_jump, emit_prefetch_instructions, loop_bivs_find, loop_bivs_check, final_biv_value, loop_biv_eliminable_p, loop_givs_rescan, loop_iterations, strength_reduce, record_biv, record_giv, final_giv_value, check_final_value, check_ext_dependent_givs, combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems, try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use dump_file instead of loop_dump_stream. * ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call argument dump_file. * reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use dump argument. * flow.c (life_analysis, rest_of_handle_life): Ditto. * haifa-sched.c: Include output.h (schedule_insns, sched_init): Do not use dump argument. * mode-switching.c (optimize_mode_switching): Ditto. * modulo-sched.c (stats_file): Removed. (print_node_sched_params): Do not call argument dump_file. (sms_schedule_by_order, loop_canon_p, sms_schedule, rest_of_handle_sms): Do not use dump argument. Use dump_file instead of stats_file. * cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not use dump argument. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize, rtl_loop_init, rtl_loop_done): Ditto. * global.c (global_alloc, rest_of_handle_global_alloc): Ditto. * predict.c (combine_predictions_for_bb, tree_estimate_probability): Ditto. * recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto. * lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto. * regmove.c (fixup_match_1, fixup_match_2, regmove_optimize, rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto. * emit-rtl.c (renumber_insns): Ditto. * cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr, expand_gimple_basic_block, tree_expand_cfg): Ditto. * regclass.c (regclass): Ditto. * tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts, remove_ssa_form, rewrite_out_of_ssa): Ditto. * reg-stack.c (compensate_edge, compensate_edges, convert_regs_1, convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs): Ditto. * sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto. * local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file to regclass. * gcse.c (gcse_file, debug_stderr): Removed. (gcse_main, bypass_jumps, rest_of_handle_jump_bypass, rest_of_handle_gcse): Do not use dump argument. (cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets, one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb, pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass, compute_code_hoist_vbeinout, compute_code_hoist_data, one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores, compute_store_table, build_store_vectors, insert_insn_start_bb, insert_store, remove_reachable_equiv_notes, replace_store_insn, store_motion): Use dump_file instead of gcse_file. * ipa-type-escape.c (type_escape_execute): Remove debugging comments. * profile.c (profile_dump_file): Removed. (branch_prob): Use dump_file instead of profile_dump_file. * ipa.c (cgraph_remove_unreachable_nodes): Do not call argument dump_file. * tree-ssa-copy.c (dump_copy_of): Ditto. * rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass dump file to life_analysis. * bt-load.c (branch_target_load_optimize): Ditto. * cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to renumber_insns. * rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs, regclass, dbr_schedule): Declaration changed. * sched-int.h (sched_init): Declaration changed. * tree-profile.c (tree_profile_dump_file): Removed. (tree_profile_hooks): Removed profile_dump_file hook. * rtl-profile (rtl_profile_dump_file): Removed. (rtl_profile_hooks): emoved profile_dump_file hook. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * c-gimplify.c (c_genericize): Do not call local variable dump_file. * tree-cfg.c (build_tree_cfg): Ditto. * Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency. * basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm): Declaration changed. * config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to life_analysis and schedule_insns. * config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to life_analysis. * config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to dbr_schedule. * config/mips/mips.c (mips_reorg): Ditto. * config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to schedule_ebbs. From-SVN: r110656
2006-02-06 19:20:47 +01:00
fprintf (dump_file, "SMS loop-with-call\n");
else if (BARRIER_P (insn))
fprintf (dump_file, "SMS loop-with-barrier\n");
invoke.texi (-fvar-tracking-assignments): New. gcc/ChangeLog: * doc/invoke.texi (-fvar-tracking-assignments): New. (-fvar-tracking-assignments-toggle): New. (-fdump-final-insns=file): Mark filename as optional. (--param min-nondebug-insn-uid): New. (-gdwarf-@{version}): Mention version 4. * opts.c (common_handle_option): Accept it. * tree-vrp.c (find_assert_locations_1): Skip debug stmts. * regrename.c (regrename_optimize): Drop last. Don't count debug insns as uses. Don't reject change because of debug insn. (do_replace): Reject DEBUG_INSN as chain starter. Take base_regno from the chain starter, and check for inexact matches in DEBUG_INSNS. (scan_rtx_reg): Accept inexact matches in DEBUG_INSNs. (build_def_use): Simplify and fix the marking of DEBUG_INSNs. * sched-ebb.c (schedule_ebbs): Skip boundary debug insns. * fwprop.c (forward_propagate_and_simplify): ...into debug insns. * doc/gimple.texi (is_gimple_debug): New. (gimple_debug_bind_p): New. (is_gimple_call, gimple_assign_cast_p): End sentence with period. * doc/install.texi (bootstrap-debug): More details. (bootstrap-debug-big, bootstrap-debug-lean): Document. (bootstrap-debug-lib): More details. (bootstrap-debug-ckovw): Update. (bootstrap-time): New. * tree-into-ssa.c (mark_def_sites): Skip debug stmts. (insert_phi_nodes_for): Insert debug stmts. (rewrite_stmt): Take iterator. Insert debug stmts. (rewrite_enter_block): Adjust. (maybe_replace_use_in_debug_stmt): New. (rewrite_update_stmt): Use it. (mark_use_interesting): Return early for debug stmts. * tree-ssa-loop-im.c (rewrite_bittest): Propagate DEFs into debug stmts before replacing stmt. (move_computations_stmt): Likewise. * ira-conflicts.c (add_copies): Skip debug insns. * regstat.c (regstat_init_n_sets_and_refs): Discount debug insns. (regstat_bb_compute_ri): Skip debug insns. * tree-ssa-threadupdate.c (redirection_block_p): Skip debug stmts. * tree-ssa-loop-manip.c (find_uses_to_rename_stmt, check_loop_closed_ssa_stmt): Skip debug stmts. * tree-tailcall.c (find_tail_calls): Likewise. * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Likewise. * tree.h (MAY_HAVE_DEBUG_STMTS): New. (build_var_debug_value_stat): Declare. (build_var_debug_value): Define. (target_for_debug_bind): Declare. * reload.c (find_equiv_reg): Skip debug insns. * rtlanal.c (reg_used_between_p): Skip debug insns. (side_effects_p): Likewise. (canonicalize_condition): Likewise. * ddg.c (create_ddg_dep_from_intra_loop_link): Check that non-debug insns never depend on debug insns. (create_ddg_dep_no_link): Likewise. (add_cross_iteration_register_deps): Use ANTI_DEP for debug insns. Don't add inter-loop dependencies for debug insns. (build_intra_loop_deps): Likewise. (create_ddg): Count debug insns. * ddg.h (struct ddg::num_debug): New. (num_backargs): Pair up with previous int field. * diagnostic.c (diagnostic_report_diagnostic): Skip notes on -fcompare-debug-second. * final.c (get_attr_length_1): Skip debug insns. (rest_of_clean-state): Don't dump CFA_RESTORE_STATE. * gcc.c (invoke_as): Call compare-debug-dump-opt. (driver_self_specs): Map -fdump-final-insns to -fdump-final-insns=.. (get_local_tick): New. (compare_debug_dump_opt_spec_function): Test for . argument and compute output name. Compute temp output spec without flag name. Compute -frandom-seed. (OPT): Undef after use. * cfgloopanal.c (num_loop_insns): Skip debug insns. (average_num_loop_insns): Likewise. * params.h (MIN_NONDEBUG_INSN_UID): New. * gimple.def (GIMPLE_DEBUG): New. * ipa-reference.c (scan_stmt_for_static_refs): Skip debug stmts. * auto-inc-dec.c (merge_in_block): Skip debug insns. (merge_in_block): Fix whitespace. * toplev.c (flag_var_tracking): Update comment. (flag_var_tracking_assignments): New. (flag_var_tracking_assignments_toggle): New. (process_options): Don't open final insns dump file if we're not going to write to it. Compute defaults for var_tracking. * df-scan.c (df_insn_rescan_debug_internal): New. (df_uses_record): Handle debug insns. * haifa-sched.c (ready): Initialize n_debug. (contributes_to_priority): Skip debug insns. (dep_list_size): New. (priority): Use it. (rank_for_schedule): Likewise. Schedule debug insns as soon as they're ready. Disregard previous debug insns to make decisions. (queue_insn): Never queue debug insns. (ready_add, ready_remove_first, ready_remove): Count debug insns. (schedule_insn): Don't reject debug insns because of issue rate. (get_ebb_head_tail, no_real_insns_p): Skip boundary debug insns. (queue_to_ready): Skip and discount debug insns. (choose_ready): Let debug insns through. (schedule_block): Check boundary debug insns. Discount debug insns, schedule them early. Adjust whitespace. (set_priorities): Check for boundary debug insns. (add_jump_dependencies): Use dep_list_size. (prev_non_location_insn): New. (check_cfg): Use it. * tree-ssa-loop-ivopts.c (find-interesting_users): Skip debug stmts. (remove_unused_ivs): Reset debug stmts. * modulo-sched.c (const_iteration_count): Skip debug insns. (res_MII): Discount debug insns. (loop_single_full_bb_p): Skip debug insns. (sms_schedule): Likewise. (sms_schedule_by_order): Likewise. (ps_has_conflicts): Likewise. * caller-save.c (refmarker_fn): New. (save_call_clobbered_regs): Replace regs with saved mem in debug insns. (mark_referenced_regs): Take pointer, mark and arg. Adjust. Call refmarker_fn mark for hardregnos. (mark_reg_as_referenced): New. (replace_reg_with_saved_mem): New. * ipa-pure-const.c (check_stmt): Skip debug stmts. * cse.c (cse_insn): Canonicalize debug insns. Skip them when searching back. (cse_extended_basic_block): Skip debug insns. (count_reg_usage): Likewise. (is_dead_reg): New, split out of... (set_live_p): ... here. (insn_live_p): Use it for debug insns. * tree-stdarg.c (check_all_va_list_escapes): Skip debug stmts. (execute_optimize_stdarg): Likewise. * tree-ssa-dom.c (propagate_rhs_into_lhs): Likewise. * tree-ssa-propagate.c (substitute_and_fold): Don't regard changes in debug stmts as changes. * sel-sched.c (moving_insn_creates_bookkeeping_block_p): New. (moveup_expr): Don't move across debug insns. Don't move debug insn if it would create a bookkeeping block. (moveup_expr_cached): Don't use cache for debug insns that are heads of blocks. (compute_av_set_inside_bb): Skip debug insns. (sel_rank_for_schedule): Schedule debug insns first. Remove dead code. (block_valid_for_bookkeeping_p); Support lax searches. (create_block_for_bookkeeping): Adjust block numbers when encountering debug-only blocks. (find_place_for_bookkeeping): Deal with debug-only blocks. (generate_bookkeeping_insn): Accept no place to insert. (remove_temp_moveop_nops): New argument full_tidying. (prepare_place_to_insert): Deal with debug insns. (advance_state_on_fence): Debug insns don't start cycles. (update_boundaries): Take fence as argument. Deal with debug insns. (schedule_expr_on_boundary): No full_tidying on debug insns. (fill_insns): Deal with debug insns. (track_scheduled_insns_and_blocks): Don't count debug insns. (need_nop_to_preserve_insn_bb): New, split out of... (remove_insn_from_stream): ... this. (fur_orig_expr_not_found): Skip debug insns. * rtl.def (VALUE): Move up. (DEBUG_INSN): New. * tree-ssa-sink.c (all_immediate_uses_same_place): Skip debug stmts. (nearest_common_dominator_of_uses): Take debug_stmts argument. Set it if debug stmts are found. (statement_sink_location): Skip debug stmts. Propagate moving defs into debug stmts. * ifcvt.c (first_active_insn): Skip debug insns. (last_active_insns): Likewise. (cond_exec_process_insns): Likewise. (noce_process_if_block): Likewise. (check_cond_move_block): Likewise. (cond_move_convert_if_block): Likewise. (block_jumps_and_fallthru_p): Likewise. (dead_or_predicable): Likewise. * dwarf2out.c (debug_str_hash_forced): New. (find_AT_string): Add comment. (gen_label_for_indirect_string): New. (get_debug_string_label): New. (AT_string_form): Use it. (mem_loc_descriptor): Handle non-TLS symbols. Handle MINUS , DIV, MOD, AND, IOR, XOR, NOT, ABS, NEG, and CONST_STRING. Accept but discard COMPARE, IF_THEN_ELSE, ROTATE, ROTATERT, TRUNCATE and several operations that cannot be represented with DWARF opcodes. (loc_descriptor): Ignore SIGN_EXTEND and ZERO_EXTEND. Require dwarf_version 4 for DW_OP_implicit_value and DW_OP_stack_value. (dwarf2out_var_location): Take during-call mark into account. (output_indirect_string): Update comment. Output if there are label and references. (prune_indirect_string): New. (prune_unused_types): Call it if debug_str_hash_forced. More in dwarf2out.c, from Jakub Jelinek <jakub@redhat.com>: (dw_long_long_const): Remove. (struct dw_val_struct): Change val_long_long type to rtx. (print_die, attr_checksum, same_dw_val_p, loc_descriptor): Adjust for val_long_long change to CONST_DOUBLE rtx from a long hi/lo pair. (output_die): Likewise. Use HOST_BITS_PER_WIDE_INT size of each component instead of HOST_BITS_PER_LONG. (output_loc_operands): Likewise. For const8* assert HOST_BITS_PER_WIDE_INT rather than HOST_BITS_PER_LONG is >= 64. (output_loc_operands_raw): For const8* assert HOST_BITS_PER_WIDE_INT rather than HOST_BITS_PER_LONG is >= 64. (add_AT_long_long): Remove val_hi and val_lo arguments, add val_const_double. (size_of_die): Use HOST_BITS_PER_WIDE_INT size multiplier instead of HOST_BITS_PER_LONG for dw_val_class_long_long. (add_const_value_attribute): Adjust add_AT_long_long caller. Don't handle TLS SYMBOL_REFs. If CONST wraps a constant, tail recurse. (dwarf_stack_op_name): Handle DW_OP_implicit_value and DW_OP_stack_value. (size_of_loc_descr, output_loc_operands, output_loc_operands_raw): Handle DW_OP_implicit_value. (extract_int): Move prototype earlier. (mem_loc_descriptor): For SUBREG punt if inner mode size is wider than DWARF2_ADDR_SIZE. Handle SIGN_EXTEND and ZERO_EXTEND by DW_OP_shl and DW_OP_shr{a,}. Handle EQ, NE, GT, GE, LT, LE, GTU, GEU, LTU, LEU, SMIN, SMAX, UMIN, UMAX, SIGN_EXTRACT, ZERO_EXTRACT. (loc_descriptor): Compare mode size with DWARF2_ADDR_SIZE instead of Pmode size. (loc_descriptor): Add MODE argument. Handle CONST_INT, CONST_DOUBLE, CONST_VECTOR, CONST, LABEL_REF and SYMBOL_REF if mode != VOIDmode, attempt to handle other expressions. Don't handle TLS SYMBOL_REFs. (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor_from_tree_1): Adjust loc_descriptor callers. (add_location_or_const_value_attribute): Likewise. For single location loc_lists attempt to use add_const_value_attribute for constant decls. Add DW_AT_const_value even if NOTE_VAR_LOCATION is VAR_LOCATION with CONSTANT_P or CONST_STRING in its expression. * cfgbuild.c (inside_basic_block_p): Handle debug insns. (control_flow_insn_p): Likewise. * tree-parloops.c (eliminate_local_variables_stmt): Handle debug stmt. (separate_decls_in_region_debug_bind): New. (separate_decls_in_region): Process debug bind stmts afterwards. * recog.c (verify_changes): Handle debug insns. (extract_insn): Likewise. (peephole2_optimize): Skip debug insns. * dse.c (scan_insn): Skip debug insns. * sel-sched-ir.c (return_nop_to_pool): Take full_tidying argument. Pass it on. (setup_id_for_insn): Handle debug insns. (maybe_tidy_empty_bb): Adjust whitespace. (tidy_control_flow): Skip debug insns. (sel_remove_insn): Adjust for debug insns. (sel_estimate_number_of_insns): Skip debug insns. (create_insn_rtx_from_pattern): Handle debug insns. (create_copy_of_insn_rtx): Likewise. * sel-sched-.h (sel_bb_end): Declare. (sel_bb_empty_or_nop_p): New. (get_all_loop_exits): Use it. (_eligible_successor_edge_p): Likewise. (return_nop_to_pool): Adjust. * tree-eh.c (tre_empty_eh_handler_p): Skip debug stmts. * ira-lives.c (process_bb_node_lives): Skip debug insns. * gimple-pretty-print.c (dump_gimple_debug): New. (dump_gimple_stmt): Use it. (dump_bb_header): Skip gimple debug stmts. * regmove.c (optimize_reg_copy_1): Discount debug insns. (fixup_match_2): Likewise. (regmove_backward_pass): Likewise. Simplify combined replacement. Handle debug insns. * function.c (instantiate_virtual_regs): Handle debug insns. * function.h (struct emit_status): Add x_cur_debug_insn_uid. * print-rtl.h: Include cselib.h. (print_rtx): Print VALUEs. Split out and recurse for VAR_LOCATIONs. * df.h (df_inns_rescan_debug_internal): Declare. * gcse.c (alloc_hash_table): Estimate n_insns. (cprop_insn): Don't regard debug insns as changes. (bypass_conditional_jumps): Skip debug insns. (one_pre_gcse_pass): Adjust. (one_code_hoisting_pass): Likewise. (compute_ld_motion_mems): Skip debug insns. (one_cprop_pass): Adjust. * tree-if-conv.c (tree_if_convert_stmt): Reset debug stmts. (if_convertible_stmt_p): Handle debug stmts. * init-regs.c (initialize_uninitialized_regs): Skip debug insns. * tree-vect-loop.c (vect_is_simple_reduction): Skip debug stmts. * ira-build.c (create_bb_allocnos): Skip debug insns. * tree-flow-inline.h (has_zero_uses): Discount debug stmts. (has_single_use): Likewise. (single_imm_use): Likewise. (num_imm_uses): Likewise. * tree-ssa-phiopt.c (empty_block_p): Skip debug stmts. * tree-ssa-coalesce.c (build_ssa_conflict_graph): Skip debug stmts. (create_outofssa_var_map): Likewise. * lower-subreg.c (adjust_decomposed_uses): New. (resolve_debug): New. (decompose_multiword_subregs): Use it. * tree-dfa.c (find_referenced_vars): Skip debug stmts. * emit-rtl.c: Include params.h. (cur_debug_insn_uid): Define. (set_new_first_and_last_insn): Set cur_debug_insn_uid too. (copy_rtx_if_shared_1): Handle debug insns. (reset_used_flags): Likewise. (set_used_flags): LIkewise. (get_max_insn_count): New. (next_nondebug_insn): New. (prev_nondebug_insn): New. (make_debug_insn_raw): New. (emit_insn_before_noloc): Handle debug insns. (emit_jump_insn_before_noloc): Likewise. (emit_call_insn_before_noloc): Likewise. (emit_debug_insn_before_noloc): New. (emit_insn_after_noloc): Handle debug insns. (emit_jump_insn_after_noloc): Likewise. (emit_call_insn_after_noloc): Likewise. (emit_debug_insn_after_noloc): Likewise. (emit_insn_after): Take loc from earlier non-debug insn. (emit_jump_insn_after): Likewise. (emit_call_insn_after): Likewise. (emit_debug_insn_after_setloc): New. (emit_debug_insn_after): New. (emit_insn_before): Take loc from later non-debug insn. (emit_jump_insn_before): Likewise. (emit_call_insn_before): Likewise. (emit_debug_insn_before_setloc): New. (emit_debug_insn_before): New. (emit_insn): Handle debug insns. (emit_debug_insn): New. (emit_jump_insn): Handle debug insns. (emit_call_insn): Likewise. (emit): Likewise. (init_emit): Take min-nondebug-insn-uid into account. Initialize cur_debug_insn_uid. (emit_copy_of_insn_after): Handle debug insns. * cfgexpand.c (gimple_assign_rhs_to_tree): Do not overwrite location of single rhs in place. (maybe_dump_rtl_for_gimple_stmt): Dump lineno. (floor_sdiv_adjust): New. (cell_sdiv_adjust): New. (cell_udiv_adjust): New. (round_sdiv_adjust): New. (round_udiv_adjust): New. (wrap_constant): Moved from cselib. (unwrap_constant): New. (expand_debug_expr): New. (expand_debug_locations): New. (expand_gimple_basic_block): Drop hiding redeclaration. Expand debug bind stmts. (gimple_expand_cfg): Expand debug locations. * cselib.c: Include tree-pass.h. (struct expand_value_data): New. (cselib_record_sets_hook): New. (PRESERVED_VALUE_P, LONG_TERM_PRESERVED_VALUE_P): New. (cselib_clear_table): Move, and implemnet in terms of... (cselib_reset_table_with_next_value): ... this. (cselib_get_next_unknown_value): New. (discard_useless_locs): Don't discard preserved values. (cselib_preserve_value): New. (cselib_preserved_value_p): New. (cselib_preserve_definitely): New. (cselib_clear_preserve): New. (cselib_preserve_only_values): New. (new_cselib_val): Take rtx argument. Dump it in details. (cselib_lookup_mem): Adjust. (expand_loc): Take regs_active in struct. Adjust. Silence dumps unless details are requested. (cselib_expand_value_rtx_cb): New. (cselib_expand_value_rtx): Rename and reimplment in terms of... (cselib_expand_value_rtx_1): ... this. Adjust. Silence dumps without details. Copy more subregs. Try to resolve values using a callback. Wrap constants. (cselib_subst_to_values): Adjust. (cselib_log_lookup): New. (cselib_lookup): Call it. (cselib_invalidate_regno): Don't count preserved values as useless. (cselib_invalidate_mem): Likewise. (cselib_record_set): Likewise. (struct set): Renamed to cselib_set, moved to cselib.h. (cselib_record_sets): Adjust. Call hook. (cselib_process_insn): Reset table when it would be cleared. (dump_cselib_val): New. (dump_cselib_table): New. * tree-cfgcleanup.c (tree_forwarded_block_p): Skip debug stmts. (remove_forwarder_block): Support moving debug stmts. * cselib.h (cselib_record_sets_hook): Declare. (cselib_expand_callback): New type. (cselib_expand_value_rtx_cb): Declare. (cselib_reset_table_with_next_value): Declare. (cselib_get_next_unknown_value): Declare. (cselib_preserve_value): Declare. (cselib_preserved_value_p): Declare. (cselib_preserve_only_values): Declare. (dump_cselib_table): Declare. * cfgcleanup.c (flow_find_cross_jump): Skip debug insns. (try_crossjump_to_edge): Likewise. (delete_unreachable_blocks): Remove dominant GIMPLE blocks after dominated blocks when debug stmts are present. * simplify-rtx.c (delegitimize_mem_from_attrs): New. * tree-ssa-live.c (remove_unused_locals): Skip debug stmts. (set_var_live_on_entry): Likewise. * loop-invariant.c (find_invariants_bb): Skip debug insns. * cfglayout.c (curr_location, last_location): Make static. (set_curr_insn_source_location): Don't avoid bouncing. (get_curr_insn_source_location): New. (get_curr_insn_block): New. (duplicate_insn_chain): Handle debug insns. * tree-ssa-forwprop.c (forward_propagate_addr_expr): Propagate into debug stmts. * common.opt (fcompare-debug): Move to sort order. (fdump-unnumbered-links): Likewise. (fvar-tracking-assignments): New. (fvar-tracking-assignments-toggle): New. * tree-ssa-dce.c (mark_stmt_necessary): Don't mark blocks because of debug stmts. (mark_stmt_if_obviously_necessary): Mark debug stmts. (eliminate_unnecessary_stmts): Walk dominated blocks before dominators. * tree-ssa-ter.c (find_replaceable_in_bb): Skip debug stmts. * ira.c (memref_used_between_p): Skip debug insns. (update_equiv_regs): Likewise. * sched-deps.c (sd_lists_size): Accept empty list. (sd_init_insn): Mark debug insns. (sd_finish_insn): Unmark them. (sd_add_dep): Reject non-debug deps on debug insns. (fixup_sched_groups): Give debug insns group treatment. Skip debug insns. (sched_analyze_reg): Don't mark debug insns for sched before call. (sched_analyze_2): Handle debug insns. (sched_analyze_insn): Compute next non-debug insn. Handle debug insns. (deps_analyze_insn): Handle debug insns. (deps_start_bb): Skip debug insns. (init_deps): Initialize last_debug_insn. * tree-ssa.c (target_for_debug_bind): New. (find_released_ssa_name): New. (propagate_var_def_into_debug_stmts): New. (propagate_defs_into_debug_stmts): New. (verify_ssa): Skip debug bind stmts without values. (warn_uninialized_vars): Skip debug stmts. * target-def.h (TARGET_DELEGITIMIZE_ADDRESS): Set default. * rtl.c (rtx_equal_p_cb): Handle VALUEs. (rtx_equal_p): Likewise. * ira-costs.c (scan_one_insn): Skip debug insns. (process_bb_node_for_hard_reg_moves): Likewise. * rtl.h (DEBUG_INSN_P): New. (NONDEBUG_INSN_P): New. (MAY_HAVE_DEBUG_INSNS): New. (INSN_P): Accept debug insns. (RTX_FRAME_RELATED_P): Likewise. (INSN_DELETED_P): Likewise (PAT_VAR_LOCATION_DECL): New. (PAT_VAR_LOCATION_LOC): New. (PAT_VAR_OCATION_STATUS): New. (NOTE_VAR_LOCATION_DECL): Reimplement. (NOTE_VAR_LOCATION_LOC): Likewise. (NOTE_VAR_LOCATION_STATUS): Likewise. (INSN_VAR_LOCATION): New. (INSN_VAR_LOCATION_DECL): New. (INSN_VAR_LOCATION_LOC): New. (INSN_VAR_LOCATION_STATUS): New. (gen_rtx_UNKNOWN_VAR_LOC): New. (VAR_LOC_UNKNOWN_P): New. (NOTE_DURING_CALL_P): New. (SCHED_GROUP_P): Accept debug insns. (emit_debug_insn_before): Declare. (emit_debug_insn_before_noloc): Declare. (emit_debug_insn_beore_setloc): Declare. (emit_debug_insn_after): Declare. (emit_debug_insn_after_noloc): Declare. (emit_debug_insn_after_setloc): Declare. (emit_debug_insn): Declare. (make_debug_insn_raw): Declare. (prev_nondebug_insn): Declare. (next_nondebug_insn): Declare. (delegitimize_mem_from_attrs): Declare. (get_max_insn_count): Declare. (wrap_constant): Declare. (unwrap_constant): Declare. (get_curr_insn_source_location): Declare. (get_curr_insn_block): Declare. * tree-inline.c (insert_debug_decl_map): New. (processing_debug_stmt): New. (remap_decl): Don't create new mappings in debug stmts. (remap_gimple_op_r): Don't add references in debug stmts. (copy_tree_body_r): Likewise. (remap_gimple_stmt): Handle debug bind stmts. (copy_bb): Skip debug stmts. (copy_edges_for_bb): Likewise. (copy_debug_stmt): New. (copy_debug_stmts): New. (copy_body): Copy debug stmts at the end. (insert_init_debug_bind): New. (insert_init_stmt): Take id. Skip and emit debug stmts. (setup_one_parameter): Remap variable earlier, register debug mapping. (estimate_num_insns): Skip debug stmts. (expand_call_inline): Preserve debug_map. (optimize_inline_calls): Check for no debug_stmts left-overs. (unsave_expr_now): Preserve debug_map. (copy_gimple_seq_and_replace_locals): Likewise. (tree_function_versioning): Check for no debug_stmts left-overs. Init and destroy debug_map as needed. Split edges unconditionally. (build_duplicate_type): Init and destroy debug_map as needed. * tree-inline.h: Include gimple.h instead of pointer-set.h. (struct copy_body_data): Add debug_stmts and debug_map. * sched-int.h (struct ready_list): Add n_debug. (struct deps): Add last_debug_insn. (DEBUG_INSN_SCHED_P): New. (BOUNDARY_DEBUG_INSN_P): New. (SCHEDULE_DEBUG_INSN_P): New. (sd_iterator_cond): Accept empty list. * combine.c (create_log_links): Skip debug insns. (combine_instructions): Likewise. (cleanup_auto_inc_dec): New. From Jakub Jelinek: Make sure the return value is always unshared. (struct rtx_subst_pair): New. (auto_adjust_pair): New. (propagate_for_debug_subst): New. (propagate_for_debug): New. (try_combine): Skip debug insns. Propagate removed defs into debug insns. (next_nonnote_nondebug_insn): New. (distribute_notes): Use it. Skip debug insns. (distribute_links): Skip debug insns. * tree-outof-ssa.c (set_location_for_edge): Likewise. * resource.c (mark_target_live_regs): Likewise. * var-tracking.c: Include cselib.h and target.h. (enum micro_operation_type): Add MO_VAL_USE, MO_VAL_LOC, and MO_VAL_SET. (micro_operation_type_name): New. (enum emit_note_where): Add EMIT_NOTE_AFTER_CALL_INSN. (struct micro_operation_def): Update comments. (decl_or_value): New type. Use instead of decls. (struct emit_note_data_def): Add vars. (struct attrs_def): Use decl_or_value. (struct variable_tracking_info_def): Add permp, flooded. (struct location_chain_def): Update comment. (struct variable_part_def): Use decl_or_value. (struct variable_def): Make var_part a variable length array. (valvar_pool): New. (scratch_regs): New. (cselib_hook_called): New. (dv_is_decl_p): New. (dv_is_value_p): New. (dv_as_decl): New. (dv_as_value): New. (dv_as_opaque): New. (dv_onepart_p): New. (dv_pool): New. (IS_DECL_CODE): New. (check_value_is_not_decl): New. (dv_from_decl): New. (dv_from_value): New. (dv_htab_hash): New. (variable_htab_hash): Use it. (variable_htab_eq): Support values. (variable_htab_free): Free from the right pool. (attrs_list_member, attrs_list_insert): Use decl_or_value. (attrs_list_union): Adjust. (attrs_list_mpdv_union): New. (tie_break_pointers): New. (canon_value_cmp): New. (unshare_variable): Return possibly-modified slot. (vars_copy_1): Adjust. (var_reg_decl_set): Adjust. Split out of... (var_reg_set): ... this. (get_init_value): Adjust. (var_reg_delete_and_set): Adjust. (var_reg_delete): Adjust. (var_regno_delete): Adjust. (var_mem_decl_set): Split out of... (var_mem_set): ... this. (var_mem_delete_and_set): Adjust. (var_mem_delete): Adjust. (val_store): New. (val_reset): New. (val_resolve): New. (variable_union): Adjust. Speed up merge of 1-part vars. (variable_canonicalize): Use unshared slot. (VALUED_RECURSED_INTO): New. (find_loc_in_1pdv): New. (struct dfset_merge): New. (insert_into_intersection): New. (intersect_loc_chains): New. (loc_cmp): New. (canonicalize_loc_order_check): New. (canonicalize_values_mark): New. (canonicalize_values_star): New. (variable_merge_over_cur): New. (variable_merge_over_src): New. (dataflow_set_merge): New. (dataflow_set_equiv_regs): New. (remove_duplicate_values): New. (struct dfset_post_merge): New. (variable_post_merge_new_vals): New. (variable_post_merge_perm_vals): New. (dataflow_post_merge_adjust): New. (find_mem_expr_in_1pdv): New. (dataflow_set_preserve_mem_locs): New. (dataflow_set_remove_mem_locs): New. (dataflow_set_clear_at_call): New. (onepart_variable_different_p): New. (variable_different_p): Use it. (dataflow_set_different_1): Adjust. Make detailed dump more verbose. (track_expr_p): Add need_rtl parameter. Don't generate rtl if not needed. (track_loc_p): Pass it true. (struct count_use_info): New. (find_use_val): New. (replace_expr_with_values): New. (log_op_type): New. (use_type): New, partially split out of... (count_uses): ... this. Count new micro-ops. (count_uses_1): Adjust. (count_stores): Adjust. (count_with_sets): New. (VAL_NEEDS_RESOLUTION): New. (VAL_HOLDS_TRACK_EXPR): New. (VAL_EXPR_IS_COPIED): New. (VAL_EXPR_IS_CLOBBERED): New. (add_uses): Adjust. Generate new micro-ops. (add_uses_1): Adjust. (add_stores): Generate new micro-ops. (add_with_sets): New. (find_src_status): Adjust. (find_src_set_src): Adjust. (compute_bb_dataflow): Use dataflow_set_clear_at_call. Handle new micro-ops. Canonicalize value equivalances. (vt_find_locations): Compute total size of hash tables for dumping. Perform merge for var-tracking-assignments. Don't disregard single-block loops. (dump_attrs_list): Handle decl_or_value. (dump_variable): Take variable. Deal with decl_or_value. (dump_variable_slot): New. (dump_vars): Use it. (dump_dataflow_sets): Adjust. (set_slot_part): New, extended to support one-part variables after splitting out of... (set_variable_part): ... this. (clobber_slot_part): New, split out of... (clobber_variable_part): ... this. (delete_slot_part): New, split out of... (delete_variable_part): .... this. (check_wrap_constant): New. (vt_expand_loc_callback): New. (vt_expand_loc): New. (emit_note_insn_var_location): Adjust. Handle values. Handle EMIT_NOTE_AFTER_CALL_INSN. (emit_notes_for_differences_1): Adjust. Handle values. (emit_notes_for_differences_2): Likewise. (emit_notes_for_differences): Adjust. (emit_notes_in_bb): Take pointer to set. Emit AFTER_CALL_INSN notes. Adjust. Handle new micro-ops. (vt_add_function_parameters): Adjust. Create and bind values. (vt_initialize): Adjust. Initialize scratch_regs and valvar_pool, flooded and perm.. Initialize and use cselib. Log operations. Move some code to count_with_sets and add_with_sets. (delete_debug_insns): New. (vt_debug_insns_local): New. (vt_finalize): Release permp, valvar_pool, scratch_regs. Finish cselib. (var_tracking_main): If var-tracking-assignments is enabled but var-tracking isn't, delete debug insns and leave. Likewise if we exceed limits or fail the stack adjustments tests, and after all var-tracking processing. More in var-tracking, from Jakub Jelinek <jakub@redhat.com>: (dataflow_set): Add traversed_vars. (value_chain, const_value_chain): New typedefs. (value_chain_pool, value_chains): New variables. (value_chain_htab_hash, value_chain_htab_eq, add_value_chain, add_value_chains, add_cselib_value_chains, remove_value_chain, remove_value_chains, remove_cselib_value_chains): New functions. (shared_hash_find_slot_unshare_1, shared_hash_find_slot_1, shared_hash_find_slot_noinsert_1, shared_hash_find_1): New static inlines. (shared_hash_find_slot_unshare, shared_hash_find_slot, shared_hash_find_slot_noinsert, shared_hash_find): Update. (dst_can_be_shared): New variable. (unshare_variable): Unshare set->vars if shared, use shared_hash_*. Clear dst_can_be_shared. If set->traversed_vars is non-NULL and different from set->vars, look up slot again instead of using the passed in slot. (dataflow_set_init): Initialize traversed_vars. (variable_union): Use shared_hash_*. Use initially NO_INSERT lookup if set->vars is shared. Don't keep slot cleared before calling unshare_variable. Unshare set->vars if needed. Adjust unshare_variable callers. Clear dst_can_be_shared if needed. Even ->refcount == 1 vars must be unshared if set->vars is shared and var needs to be modified. (dataflow_set_union): Set traversed_vars during canonicalization. (VALUE_CHANGED, DECL_CHANGED): Define. (set_dv_changed, dv_changed_p): New static inlines. (track_expr_p): Clear DECL_CHANGED. (dump_dataflow_sets): Set it. (variable_was_changed): Call set_dv_changed. (emit_note_insn_var_location): Likewise. (changed_variables_stack): New variable. (check_changed_vars_1, check_changed_vars_2): New functions. (emit_notes_for_changes): Do nothing if changed_variables is empty. Traverse changed_variables with check_changed_vars_1, call check_changed_vars_2 on each changed_variables_stack entry. (emit_notes_in_bb): Add SET argument. Just clear it at the beginning, use it instead of local &set, don't destroy it at the end. (vt_emit_notes): Call dataflow_set_clear early on all VTI(bb)->out sets, never use them, instead use emit_notes_in_bb computed set, dataflow_set_clear also VTI(bb)->in when we are done with the basic block. Initialize changed_variables_stack, free it afterwards. If ENABLE_CHECKING verify that after noting differences to an empty set value_chains hash table is empty. (vt_initialize): Initialize value_chains and value_chain_pool. (vt_finalize): Delete value_chains htab, free value_chain_pool. (variable_tracking_main): Call dump_dataflow_sets before calling vt_emit_notes, not after it. * tree-flow.h (propagate_defs_into_debug_stmts): Declare. (propagate_var_def_into_debug_stmts): Declare. * df-problems.c (df_lr_bb_local_compute): Skip debug insns. (df_set_note): Reject debug insns. (df_whole_mw_reg_dead_p): Take added_notes_p argument. Don't add notes to debug insns. (df_note_bb_compute): Adjust. Likewise. (df_simulate_uses): Skip debug insns. (df_simulate_initialize_backwards): Likewise. * reg-stack.c (subst_stack_regs_in_debug_insn): New. (subst_stack_regs_pat): Reject debug insns. (convert_regs_1): Handle debug insns. * Makefile.in (TREE_INLINE_H): Take pointer-set.h from GIMPLE_H. (print-rtl.o): Depend on cselib.h. (cselib.o): Depend on TREE_PASS_H. (var-tracking.o): Depend on cselib.h and TARGET_H. * sched-rgn.c (rgn_estimate_number_of_insns): Discount debug insns. (init_ready_list): Skip boundary debug insns. (add_branch_dependences): Skip debug insns. (free_block_dependencies): Check for blocks with only debug insns. (compute_priorities): Likewise. * gimple.c (gss_for_code): Handle GIMPLE_DEBUG. (gimple_build_with_ops_stat): Take subcode as unsigned. Adjust all callers. (gimple_build_debug_bind_stat): New. (empty_body_p): Skip debug stmts. (gimple_has_side_effects): Likewise. (gimple_rhs_has_side_effects): Likewise. * gimple.h (enum gimple_debug_subcode, GIMPLE_DEBUG_BIND): New. (gimple_build_debug_bind_stat): Declare. (gimple_build_debug_bind): Define. (is_gimple_debug): New. (gimple_debug_bind_p): New. (gimple_debug_bind_get_var): New. (gimple_debug_bind_get_value): New. (gimple_debug_bind_get_value_ptr): New. (gimple_debug_bind_set_var): New. (gimple_debug_bind_set_value): New. (GIMPLE_DEBUG_BIND_NOVALUE): New internal temporary macro. (gimple_debug_bind_reset_value): New. (gimple_debug_bind_has_value_p): New. (gsi_next_nondebug): New. (gsi_prev_nondebug): New. (gsi_start_nondebug_bb): New. (gsi_last_nondebug_bb): New. * sched-vis.c (print_pattern): Handle VAR_LOCATION. (print_insn): Handle DEBUG_INSN. * tree-cfg.c (remove_bb): Walk stmts backwards. Let loc of first insn prevail. (first_stmt): Skip debug stmts. (first_non_label_stmt): Likewise. (last_stmt): Likewise. (has_zero_uses_1): New. (single_imm_use_1): New. (verify_gimple_debug): New. (verify_types_in_gimple_stmt): Handle debug stmts. (verify_stmt): Likewise. (debug_loop_num): Skip debug stmts. (remove_edge_and_dominated_blocks): Remove dominators last. * tree-ssa-reasssoc.c (rewrite_expr_tree): Propagate into debug stmts. (linearize_expr): Likewise. * config/i386/i386.c (ix86_delegitimize_address): Call default implementation. * config/ia64/ia64.c (ia64_safe_itanium_class): Handle debug insns. (group_barrier_needed): Skip debug insns. (emit_insn_group_barriers): Likewise. (emit_all_insn_group_barriers): Likewise. (ia64_variable_issue): Handle debug insns. (ia64_dfa_new_cycle): Likewise. (final_emit_insn_group_barriers): Skip debug insns. (ia64_dwarf2out_def_steady_cfa): Take frame argument. Don't def cfa without frame. (process_set): Likewise. (process_for_unwind_directive): Pass frame on. * config/rs6000/rs6000.c (TARGET_DELEGITIMIZE_ADDRESS): Define. (rs6000_delegitimize_address): New. (rs6000_debug_adjust_cost): Handle debug insns. (is_microcoded_insn): Likewise. (is_cracked_insn): Likewise. (is_nonpipeline_insn): Likewise. (insn_must_be_first_in_group): Likewise. (insn_must_be_last_in_group): Likewise. (force_new_group): Likewise. * cfgrtl.c (rtl_split_block): Emit INSN_DELETED note if block contains only debug insns. (rtl_merge_blocks): Skip debug insns. (purge_dead_edges): Likewise. (rtl_block_ends_with_call_p): Skip debug insns. * dce.c (deletable_insn_p): Handle VAR_LOCATION. (mark_reg_dependencies): Skip debug insns. * params.def (PARAM_MIN_NONDEBUG_INSN_UID): New. * tree-ssanames.c (release_ssa_name): Propagate def into debug stmts. * tree-ssa-threadedge.c (record_temporary_equivalences_from_stmts): Skip debug stmts. * regcprop.c (replace_oldest_value_addr): Skip debug insns. (replace_oldest_value_mem): Use ALL_REGS for debug insns. (copyprop_hardreg_forward_1): Handle debug insns. * reload1.c (reload): Skip debug insns. Replace unassigned pseudos in debug insns with their equivalences. (eliminate_regs_in_insn): Skip debug insns. (emit_input_reload_insns): Skip debug insns at first, adjust them later. * tree-ssa-operands.c (add_virtual_operand): Reject debug stmts. (get_indirect_ref_operands): Pass opf_no_vops on. (get_expr_operands): Likewise. Skip debug stmts. (parse_ssa_operands): Scan debug insns with opf_no_vops. gcc/testsuite/ChangeLog: * gcc.dg/guality/guality.c: New. * gcc.dg/guality/guality.h: New. * gcc.dg/guality/guality.exp: New. * gcc.dg/guality/example.c: New. * lib/gcc-dg.exp (cleanup-dump): Remove .gk files. (cleanup-saved-temps): Likewise, .gkd files too. gcc/cp/ChangeLog: * cp-tree.h (TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS): New. * cp-lang.c (cxx_dwarf_name): Pass it. * error.c (count_non_default_template_args): Take flags as argument. Adjust all callers. Skip counting of default arguments if the new flag is given. ChangeLog: * Makefile.tpl (BUILD_CONFIG): Default to bootstrap-debug. * Makefile.in: Rebuilt. contrib/ChangeLog: * compare-debug: Look for .gkd files and compare them. config/ChangeLog: * bootstrap-debug.mk: Add comments. * bootstrap-debug-big.mk: New. * bootstrap-debug-lean.mk: New. * bootstrap-debug-ckovw.mk: Add comments. * bootstrap-debug-lib.mk: Drop CFLAGS for stages. Use -g0 for TFLAGS in stage1. Drop -fvar-tracking-assignments-toggle. From-SVN: r151312
2009-09-02 04:42:21 +02:00
else if ((NONDEBUG_INSN_P (insn) && !JUMP_P (insn)
&& !single_set (insn) && GET_CODE (PATTERN (insn)) != USE))
fprintf (dump_file, "SMS loop-with-not-single-set\n");
else
fprintf (dump_file, "SMS loop with subreg in lhs\n");
tree-vrp.c (execute_vrp): Do not pass dump argument to. * tree-vrp.c (execute_vrp): Do not pass dump argument to. loop_optimizer_init and loop_optimizer_finalize * tree-ssa-sink.c (execute_sink_code): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init, tree_ssa_loop_done): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Ditto. * sched-ebb.c: Include output.h. (schedule_ebbs): Do not use dump argument. * value-prof.h (struct profile_hooks): Remove profile_dump_file. * loop.c (loop_dump_stream): Removed. (loop_optimize, rest_of_handle_loop_optimize): Do not use dump argument. (scan_loop, move_movables, find_and_verify_loops, mark_loop_jump, emit_prefetch_instructions, loop_bivs_find, loop_bivs_check, final_biv_value, loop_biv_eliminable_p, loop_givs_rescan, loop_iterations, strength_reduce, record_biv, record_giv, final_giv_value, check_final_value, check_ext_dependent_givs, combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems, try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use dump_file instead of loop_dump_stream. * ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call argument dump_file. * reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use dump argument. * flow.c (life_analysis, rest_of_handle_life): Ditto. * haifa-sched.c: Include output.h (schedule_insns, sched_init): Do not use dump argument. * mode-switching.c (optimize_mode_switching): Ditto. * modulo-sched.c (stats_file): Removed. (print_node_sched_params): Do not call argument dump_file. (sms_schedule_by_order, loop_canon_p, sms_schedule, rest_of_handle_sms): Do not use dump argument. Use dump_file instead of stats_file. * cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not use dump argument. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize, rtl_loop_init, rtl_loop_done): Ditto. * global.c (global_alloc, rest_of_handle_global_alloc): Ditto. * predict.c (combine_predictions_for_bb, tree_estimate_probability): Ditto. * recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto. * lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto. * regmove.c (fixup_match_1, fixup_match_2, regmove_optimize, rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto. * emit-rtl.c (renumber_insns): Ditto. * cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr, expand_gimple_basic_block, tree_expand_cfg): Ditto. * regclass.c (regclass): Ditto. * tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts, remove_ssa_form, rewrite_out_of_ssa): Ditto. * reg-stack.c (compensate_edge, compensate_edges, convert_regs_1, convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs): Ditto. * sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto. * local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file to regclass. * gcse.c (gcse_file, debug_stderr): Removed. (gcse_main, bypass_jumps, rest_of_handle_jump_bypass, rest_of_handle_gcse): Do not use dump argument. (cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets, one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb, pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass, compute_code_hoist_vbeinout, compute_code_hoist_data, one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores, compute_store_table, build_store_vectors, insert_insn_start_bb, insert_store, remove_reachable_equiv_notes, replace_store_insn, store_motion): Use dump_file instead of gcse_file. * ipa-type-escape.c (type_escape_execute): Remove debugging comments. * profile.c (profile_dump_file): Removed. (branch_prob): Use dump_file instead of profile_dump_file. * ipa.c (cgraph_remove_unreachable_nodes): Do not call argument dump_file. * tree-ssa-copy.c (dump_copy_of): Ditto. * rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass dump file to life_analysis. * bt-load.c (branch_target_load_optimize): Ditto. * cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to renumber_insns. * rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs, regclass, dbr_schedule): Declaration changed. * sched-int.h (sched_init): Declaration changed. * tree-profile.c (tree_profile_dump_file): Removed. (tree_profile_hooks): Removed profile_dump_file hook. * rtl-profile (rtl_profile_dump_file): Removed. (rtl_profile_hooks): emoved profile_dump_file hook. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * c-gimplify.c (c_genericize): Do not call local variable dump_file. * tree-cfg.c (build_tree_cfg): Ditto. * Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency. * basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm): Declaration changed. * config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to life_analysis and schedule_insns. * config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to life_analysis. * config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to dbr_schedule. * config/mips/mips.c (mips_reorg): Ditto. * config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to schedule_ebbs. From-SVN: r110656
2006-02-06 19:20:47 +01:00
print_rtl_single (dump_file, insn);
}
continue;
}
/* Always schedule the closing branch with the rest of the
instructions. The branch is rotated to be in row ii-1 at the
end of the scheduling procedure to make sure it's the last
instruction in the iteration. */
if (! (g = create_ddg (bb, 1)))
{
tree-vrp.c (execute_vrp): Do not pass dump argument to. * tree-vrp.c (execute_vrp): Do not pass dump argument to. loop_optimizer_init and loop_optimizer_finalize * tree-ssa-sink.c (execute_sink_code): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init, tree_ssa_loop_done): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Ditto. * sched-ebb.c: Include output.h. (schedule_ebbs): Do not use dump argument. * value-prof.h (struct profile_hooks): Remove profile_dump_file. * loop.c (loop_dump_stream): Removed. (loop_optimize, rest_of_handle_loop_optimize): Do not use dump argument. (scan_loop, move_movables, find_and_verify_loops, mark_loop_jump, emit_prefetch_instructions, loop_bivs_find, loop_bivs_check, final_biv_value, loop_biv_eliminable_p, loop_givs_rescan, loop_iterations, strength_reduce, record_biv, record_giv, final_giv_value, check_final_value, check_ext_dependent_givs, combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems, try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use dump_file instead of loop_dump_stream. * ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call argument dump_file. * reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use dump argument. * flow.c (life_analysis, rest_of_handle_life): Ditto. * haifa-sched.c: Include output.h (schedule_insns, sched_init): Do not use dump argument. * mode-switching.c (optimize_mode_switching): Ditto. * modulo-sched.c (stats_file): Removed. (print_node_sched_params): Do not call argument dump_file. (sms_schedule_by_order, loop_canon_p, sms_schedule, rest_of_handle_sms): Do not use dump argument. Use dump_file instead of stats_file. * cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not use dump argument. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize, rtl_loop_init, rtl_loop_done): Ditto. * global.c (global_alloc, rest_of_handle_global_alloc): Ditto. * predict.c (combine_predictions_for_bb, tree_estimate_probability): Ditto. * recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto. * lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto. * regmove.c (fixup_match_1, fixup_match_2, regmove_optimize, rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto. * emit-rtl.c (renumber_insns): Ditto. * cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr, expand_gimple_basic_block, tree_expand_cfg): Ditto. * regclass.c (regclass): Ditto. * tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts, remove_ssa_form, rewrite_out_of_ssa): Ditto. * reg-stack.c (compensate_edge, compensate_edges, convert_regs_1, convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs): Ditto. * sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto. * local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file to regclass. * gcse.c (gcse_file, debug_stderr): Removed. (gcse_main, bypass_jumps, rest_of_handle_jump_bypass, rest_of_handle_gcse): Do not use dump argument. (cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets, one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb, pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass, compute_code_hoist_vbeinout, compute_code_hoist_data, one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores, compute_store_table, build_store_vectors, insert_insn_start_bb, insert_store, remove_reachable_equiv_notes, replace_store_insn, store_motion): Use dump_file instead of gcse_file. * ipa-type-escape.c (type_escape_execute): Remove debugging comments. * profile.c (profile_dump_file): Removed. (branch_prob): Use dump_file instead of profile_dump_file. * ipa.c (cgraph_remove_unreachable_nodes): Do not call argument dump_file. * tree-ssa-copy.c (dump_copy_of): Ditto. * rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass dump file to life_analysis. * bt-load.c (branch_target_load_optimize): Ditto. * cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to renumber_insns. * rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs, regclass, dbr_schedule): Declaration changed. * sched-int.h (sched_init): Declaration changed. * tree-profile.c (tree_profile_dump_file): Removed. (tree_profile_hooks): Removed profile_dump_file hook. * rtl-profile (rtl_profile_dump_file): Removed. (rtl_profile_hooks): emoved profile_dump_file hook. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * c-gimplify.c (c_genericize): Do not call local variable dump_file. * tree-cfg.c (build_tree_cfg): Ditto. * Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency. * basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm): Declaration changed. * config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to life_analysis and schedule_insns. * config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to life_analysis. * config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to dbr_schedule. * config/mips/mips.c (mips_reorg): Ditto. * config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to schedule_ebbs. From-SVN: r110656
2006-02-06 19:20:47 +01:00
if (dump_file)
fprintf (dump_file, "SMS create_ddg failed\n");
continue;
}
tree-vrp.c (adjust_range_with_scev): Use get_chrec_loop. * tree-vrp.c (adjust_range_with_scev): Use get_chrec_loop. * loop-unswitch.c (unswitch_loops): Use FOR_EACH_LOOP. * tree-loop-linear.c (linear_transform_loops): Ditto. * tree-ssa-loop-im.c (determine_lsm): Ditto. * tree-ssa-loop-niter.c (estimate_numbers_of_iterations, free_numbers_of_iterations_estimates): Ditto. * tree_ssa_unswitch_loops (tree_ssa_unswitch_loops): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize): Ditto. * modulo-sched.c (sms_schedule): Ditto. * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables, tree_unroll_loops_completely): Ditto. * predict.c (predict_loops): Ditto. * tree-if-conv.c (main_tree_if_conversion): Ditto. * loop-unroll.c (unroll_and_peel_loops, peel_loops_completely, decide_unrolling_and_peeling): Ditto. * cfgloopmanip.c (unloop): Use delete_loop. (place_new_loop): Access larray vector instead of parray. (create_preheaders, force_single_succ_latches, fix_loop_structure): Use FOR_EACH_LOOP and delete_loop.. * loop-doloop.c (doloop_optimize_loops): Ditto. * loop-invariant.c (move_loop_invariants): Ditto. * tree-cfg.c (replace_uses_by): Ditto. * tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Ditto. * tree-chrec.h (CHREC_VAR, CHREC_LEFT, CHREC_RIGHT, CHREC_VARIABLE): Moved to ... * tree.h (CHREC_VAR, CHREC_LEFT, CHREC_RIGHT, CHREC_VARIABLE): ... here. * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop, compute_overall_effect_of_inner_loop, chrec_is_positive): Use get_loop and get_chrec_loop. (number_of_iterations_for_all_loops): Use number_of_loops. (scev_initialize, scev_reset, scev_const_prop): Use FOR_EACH_LOOP. * tree-scalar-evolution.h (get_chrec_loop): New inline function. * cfgloopanal.c (mark_irreducible_loops): Use number_of_loops, and FOR_EACH_LOOP. * tree-chrec.c (evolution_function_is_invariant_rec_p, chrec_convert_1): Use get_loop and get_chrec_loop. * loop-init.c (loop_optimizer_init): Use number_of_loops. (loop_optimizer_init): Use FOR_EACH_LOOP. * tree-vectorizer.c (vect_loops_num): Removed. (vectorize_loops): Store number of loops locally. Use FOR_EACH_LOOP and get_loop. * tree-vectorizer.h (vect_loops_num): Removed. * tree-data-ref.c (get_number_of_iters_for_loop): Use get_loop. (find_data_references_in_loop): Do not set parallel_p. * tree-data-ref.h: Do not declare VEC(loop_p). * cfgloop.c (flow_loops_dump, mark_single_exit_loops, verify_loop_structure): Use FOR_EACH_LOOP. (flow_loops_free): Use FOR_EACH_LOOP, free larray vector. (initialize_loops_parallel_p): Removed. (flow_loops_find): Push the loops into a vector. (delete_loop): New function. (cancel_loop): Use delete_loop. * cfgloop.h: Declare VEC(loop_p). (struct loop): Remove parallel_p field. (struct loops): Replace num and parray field by larray vector. Remove shared_headers field. (delete_loop): Declare. (get_loop, get_loops, number_of_loops, fel_next, fel_init, FOR_EACH_LOOP): New. * doc/loop.tex: Document new accessor functions. From-SVN: r119713
2006-12-10 23:17:15 +01:00
g_arr[loop->num] = g;
if (dump_file)
fprintf (dump_file, "...OK\n");
}
if (dump_file)
{
fprintf (dump_file, "\nSMS transformation phase\n");
fprintf (dump_file, "=========================\n\n");
}
/* We don't want to perform SMS on new loops - created by versioning. */
FOR_EACH_LOOP (loop, 0)
{
rtx_insn *head, *tail;
single_set takes an insn gcc/ChangeLog: 2014-09-09 David Malcolm <dmalcolm@redhat.com> * rtl.h (single_set_2): Strengthen first param from const_rtx to const rtx_insn *, and move prototype to above... (single_set): ...this. Convert this from a macro to an inline function, enforcing the requirement that the param is a const rtx_insn *. (find_args_size_adjust): Strengthen param from rtx to rtx_insn *. * config/arm/aarch-common-protos.h (aarch_crypto_can_dual_issue): Strengthen both params from rtx to rtx_insn *. * config/arm/aarch-common.c (aarch_crypto_can_dual_issue): Likewise; introduce locals "producer_set", "consumer_set", using them in place of "producer" and "consumer" when dealing with SET rather than insn. * config/avr/avr.c (avr_out_plus): Add checked cast to rtx_insn * when invoking single_set in region guarded by INSN_P. (avr_out_bitop): Likewise. (_reg_unused_after): Introduce local rtx_sequence * "seq" in region guarded by GET_CODE check, using methods to strengthen local "this_insn" from rtx to rtx_insn *, and for clarity. * config/avr/avr.md (define_insn_and_split "xload8<mode>_A"): Strengthen local "insn" from rtx to rtx_insn *. (define_insn_and_split "xload<mode>_A"): Likewise. * config/bfin/bfin.c (trapping_loads_p): Likewise for param "insn". (find_load): Likewise for return type. (workaround_speculation): Likewise for both locals named "load_insn". * config/cris/cris.c (cris_cc0_user_requires_cmp): Likewise for local "cc0_user". * config/cris/cris.md (define_peephole2 ; moversideqi): Likewise for local "prev". * config/h8300/h8300-protos.h (notice_update_cc): Likewise for param 2. * config/h8300/h8300.c (notice_update_cc): Likewise. * config/i386/i386.c (ix86_flags_dependent): Likewise for params "insn" and "dep_insn". (exact_store_load_dependency): Likewise for both params. (ix86_macro_fusion_pair_p): Eliminate local named "single_set" since this now clashes with inline function. Instead, delay calling single_set until the point where its needed, and then assign the result to "compare_set" and rework the conditional that follows. * config/ia64/ia64.md (define_expand "tablejump"): Strengthen local "last" from rtx to rtx_insn *. * config/mips/mips-protos.h (mips_load_store_insns): Likewise for second param. (mips_store_data_bypass_p): Likewise for both params. * config/mips/mips.c (mips_load_store_insns): Likewise for second param. (mips_store_data_bypass_p): Likewise for both params. (mips_orphaned_high_part_p): Likewise for param "insn". * config/mn10300/mn10300.c (extract_bundle): Likewise. (mn10300_bundle_liw): Likewise for locals "r", "insn1", "insn2". Introduce local rtx "insn2_pat". * config/rl78/rl78.c (move_elim_pass): Likewise for locals "insn", "ninsn". (rl78_remove_unused_sets): Likewise for locals "insn", "ninsn". Introduce local rtx "set", using it in place of "insn" for the result of single_set. This appears to fix a bug, since the call to find_regno_note on a SET does nothing. * config/rs6000/rs6000.c (set_to_load_agen): Strengthen both params from rtx to rtx_insn *. (set_to_load_agen): Likewise. * config/s390/s390.c (s390_label_align): Likewise for local "prev_insn". Introduce new rtx locals "set" and "src", using them in place of "prev_insn" for the results of single_set and SET_SRC respectively. (s390_swap_cmp): Strengthen local "jump" from rtx to rtx_insn *. Introduce new rtx local "set" using in place of "jump" for the result of single_set. Use SET_SRC (set) rather than plain XEXP (set, 1). * config/sh/sh.c (noncall_uses_reg): Strengthen param 2from rtx to rtx_insn *. (noncall_uses_reg): Likewise. (reg_unused_after): Introduce local rtx_sequence * "seq" in region guarded by GET_CODE check, using its methods for clarity, and to enable strengthening local "this_insn" from rtx to rtx_insn *. * config/sh/sh.md (define_expand "mulhisi3"): Strengthen local "insn" from rtx to rtx_insn *. (define_expand "umulhisi3"): Likewise. (define_expand "smulsi3_highpart"): Likewise. (define_expand "umulsi3_highpart"): Likewise. * config/sparc/sparc.c (sparc_do_work_around_errata): Likewise for local "after". Replace GET_CODE check with a dyn_cast, introducing new local rtx_sequence * "seq", using insn method for typesafety. * dwarf2cfi.c (dwarf2out_frame_debug): Strengthen param "insn" from rtx to rtx_insn *. Introduce local rtx "pat", using it in place of "insn" once we're dealing with patterns rather than the input insn. (scan_insn_after): Strengthen param "insn" from rtx to rtx_insn *. (scan_trace): Likewise for local "elt", updating lookups within sequence to use insn method rather than element method. * expr.c (find_args_size_adjust): Strengthen param "insn" from rtx to rtx_insn *. * gcse.c (gcse_emit_move_after): Likewise for local "new_rtx". * ifcvt.c (noce_try_abs): Likewise for local "insn". * ira.c (fix_reg_equiv_init): Add checked cast to rtx_insn * when invoking single_set. * lra-constraints.c (insn_rhs_dead_pseudo_p): Strengthen param "insn" from rtx to rtx_insn *. (skip_usage_debug_insns): Likewise for return type, adding a checked cast. (check_secondary_memory_needed_p): Likewise for local "insn". (inherit_reload_reg): Likewise. * modulo-sched.c (sms_schedule): Likewise for local "count_init". * recog.c (peep2_attempt): Likewise for local "old_insn", adding checked casts. (store_data_bypass_p): Likewise for both params. (if_test_bypass_p): Likewise. * recog.h (store_data_bypass_p): Likewise for both params. (if_test_bypass_p): Likewise. * reload.c (find_equiv_reg): Likewise for local "where". * reorg.c (delete_jump): Likewise for param "insn". * rtlanal.c (single_set_2): Strenghen param "insn" from const_rtx to const rtx_insn *. * store-motion.c (replace_store_insn): Likewise for param "del". (delete_store): Strengthen local "i" from rtx to rtx_insn_list *, and use its methods for clarity, and to strengthen local "del" from rtx to rtx_insn *. (build_store_vectors): Use insn method of "st" when calling replace_store_insn for typesafety and clarity. From-SVN: r215089
2014-09-09 19:02:34 +02:00
rtx count_reg;
rtx_insn *count_init;
int mii, rec_mii, stage_count, min_cycle;
system.h: Define __STDC_FORMAT_MACROS before including inttypes.h. 2014-05-23 Richard Biener <rguenther@suse.de> * system.h: Define __STDC_FORMAT_MACROS before including inttypes.h. * hwint.h (HOST_WIDEST_INT, HOST_BITS_PER_WIDEST_INT, HOST_WIDEST_INT_PRINT, HOST_WIDEST_INT_PRINT_DEC, HOST_WIDEST_INT_PRINT_DEC_C, HOST_WIDEST_INT_PRINT_UNSIGNED, HOST_WIDEST_INT_PRINT_HEX, HOST_WIDEST_INT_PRINT_DOUBLE_HEX, HOST_WIDEST_INT_C): Remove. (PRId64, PRIi64, PRIo64, PRIu64, PRIx64, PRIX64): Define if C99 inttypes.h is not available. * coretypes.h (gcov_type, gcov_type_unsigned): Use [u]int64_t. * gcov-io.h (gcov_type, gcov_type_unsigned): Likewise. * gcov-io.c (gcov_histo_index): Drop non-64bit hwi case. * cfgloop.h (struct niter_desc): Use uint64_t for niter field. * bitmap.c (struct bitmap_descriptor_d): Use uint64_t for counters. (struct output_info): Likewise. (print_statistics): Adjust. (dump_bitmap_statistics): Likewise. * bt-load.c (migrate_btr_defs): Print with PRId64. * cfg.c (dump_edge_info, dump_bb_info): Likewise. (MAX_SAFE_MULTIPLIER): Adjust. * cfghooks.c (dump_bb_for_graph): Print with PRId64. * cgraph.c (cgraph_redirect_edge_call_stmt_to_callee, dump_cgraph_node): Likewise. * final.c (dump_basic_block_info): Likewise. * gcov-dump.c (tag_counters, tag_summary, dump_working_sets): Likewise. * gcov.c (format_gcov): Likewise. * ipa-cp.c (good_cloning_opportunity_p): Likewise. Use int64_t for calculation. (get_clone_agg_value): Use HOST_WIDE_INT for offset. * ipa-inline.c (compute_max_insns): Use int64_t for calcuation. (inline_small_functions, dump_overall_stats, dump_inline_stats): Use PRId64 for dumping. * ipa-profile.c (dump_histogram, ipa_profile): Likewise. * ira-color.c (struct allocno_hard_regs): Use int64_t for cost. (add_allocno_hard_regs): Adjust. * loop-doloop.c (doloop_modify): Print using PRId64. * loop-iv.c (inverse): Compute in uint64_t. (determine_max_iter, iv_number_of_iterations): Likewise. * loop-unroll.c (decide_peel_completely, decide_peel_simple): Print using PRId64. * lto-streamer-out.c (write_symbol): Use uint64_t. * mcf.c (CAP_INFINITY): Use int64_t maximum. (dump_fixup_edge, create_fixup_graph, cancel_negative_cycle, find_max_flow, adjust_cfg_counts): Use int64_t and dump with PRId64. * modulo-sched.c (const_iteration_count): Use int64_t. (sms_schedule): Dump using PRId64. * predict.c (dump_prediction): Likewise. * pretty-print.h (pp_widest_integer): Remove. * profile.c (get_working_sets, is_edge_inconsistent, is_inconsistent, read_profile_edge_counts): Dump using PRId64. * tree-pretty-print.c (pp_double_int): Remove case handling HOST_BITS_PER_DOUBLE_INT == HOST_BITS_PER_WIDEST_INT. * tree-ssa-math-opts.c (struct symbolic_number): Use uint64_t and adjust users. (pass_optimize_bswap::execute): Remove restriction on hosts. * tree-streamer-in.c (streamer_alloc_tree): Use HOST_WIDE_INT. * tree-streamer-out.c (streamer_write_tree_header): Likewise. * tree.c (widest_int_cst_value): Remove. * tree.h (widest_int_cst_value): Likewise. * value-prof.c (dump_histogram_value): Print using PRId64. * gengtype.c (main): Also inject int64_t. * ggc-page.c (struct max_alignment): Use int64_t. * alloc-pool.c (struct allocation_object_def): Likewise. * ira-conflicts.c (build_conflict_bit_table): Use uint64_t for computation. * doc/tm.texi.in: Remove reference to HOST_WIDEST_INT. * doc/tm.texi: Regenerated. * gengtype-lex.l (IWORD): Handle [u]int64_t. * config/sh/sh.c (expand_cbranchdi4): Use gcov_type. * config/mmix/mmix-protos.h (mmix_intval, mmix_shiftable_wyde_value, mmix_output_register_setting): Use [u]int64_t in prototypes. * config/mmix/mmix.c (mmix_print_operand, mmix_output_register_setting, mmix_shiftable_wyde_value, mmix_output_shiftvalue_op_from_str, mmix_output_octa, mmix_output_shifted_value): Adjust. (mmix_intval): Adjust. Remove unreachable case. * config/mmix/mmix.md (*nonlocal_goto_receiver_expanded): Use int64_t. lto/ * lto.c (lto_parse_hex): Use int64_t. (lto_resolution_read): Likewise. From-SVN: r210931
2014-05-26 12:42:43 +02:00
int64_t loop_count = 0;
bool opt_sc_p;
tree-vrp.c (adjust_range_with_scev): Use get_chrec_loop. * tree-vrp.c (adjust_range_with_scev): Use get_chrec_loop. * loop-unswitch.c (unswitch_loops): Use FOR_EACH_LOOP. * tree-loop-linear.c (linear_transform_loops): Ditto. * tree-ssa-loop-im.c (determine_lsm): Ditto. * tree-ssa-loop-niter.c (estimate_numbers_of_iterations, free_numbers_of_iterations_estimates): Ditto. * tree_ssa_unswitch_loops (tree_ssa_unswitch_loops): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize): Ditto. * modulo-sched.c (sms_schedule): Ditto. * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables, tree_unroll_loops_completely): Ditto. * predict.c (predict_loops): Ditto. * tree-if-conv.c (main_tree_if_conversion): Ditto. * loop-unroll.c (unroll_and_peel_loops, peel_loops_completely, decide_unrolling_and_peeling): Ditto. * cfgloopmanip.c (unloop): Use delete_loop. (place_new_loop): Access larray vector instead of parray. (create_preheaders, force_single_succ_latches, fix_loop_structure): Use FOR_EACH_LOOP and delete_loop.. * loop-doloop.c (doloop_optimize_loops): Ditto. * loop-invariant.c (move_loop_invariants): Ditto. * tree-cfg.c (replace_uses_by): Ditto. * tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Ditto. * tree-chrec.h (CHREC_VAR, CHREC_LEFT, CHREC_RIGHT, CHREC_VARIABLE): Moved to ... * tree.h (CHREC_VAR, CHREC_LEFT, CHREC_RIGHT, CHREC_VARIABLE): ... here. * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop, compute_overall_effect_of_inner_loop, chrec_is_positive): Use get_loop and get_chrec_loop. (number_of_iterations_for_all_loops): Use number_of_loops. (scev_initialize, scev_reset, scev_const_prop): Use FOR_EACH_LOOP. * tree-scalar-evolution.h (get_chrec_loop): New inline function. * cfgloopanal.c (mark_irreducible_loops): Use number_of_loops, and FOR_EACH_LOOP. * tree-chrec.c (evolution_function_is_invariant_rec_p, chrec_convert_1): Use get_loop and get_chrec_loop. * loop-init.c (loop_optimizer_init): Use number_of_loops. (loop_optimizer_init): Use FOR_EACH_LOOP. * tree-vectorizer.c (vect_loops_num): Removed. (vectorize_loops): Store number of loops locally. Use FOR_EACH_LOOP and get_loop. * tree-vectorizer.h (vect_loops_num): Removed. * tree-data-ref.c (get_number_of_iters_for_loop): Use get_loop. (find_data_references_in_loop): Do not set parallel_p. * tree-data-ref.h: Do not declare VEC(loop_p). * cfgloop.c (flow_loops_dump, mark_single_exit_loops, verify_loop_structure): Use FOR_EACH_LOOP. (flow_loops_free): Use FOR_EACH_LOOP, free larray vector. (initialize_loops_parallel_p): Removed. (flow_loops_find): Push the loops into a vector. (delete_loop): New function. (cancel_loop): Use delete_loop. * cfgloop.h: Declare VEC(loop_p). (struct loop): Remove parallel_p field. (struct loops): Replace num and parray field by larray vector. Remove shared_headers field. (delete_loop): Declare. (get_loop, get_loops, number_of_loops, fel_next, fel_init, FOR_EACH_LOOP): New. * doc/loop.tex: Document new accessor functions. From-SVN: r119713
2006-12-10 23:17:15 +01:00
if (! (g = g_arr[loop->num]))
continue;
if (dump_file)
{
rtx_insn *insn = BB_END (loop->header);
fprintf (dump_file, "SMS loop num: %d", loop->num);
Integrate lexical block into source_location. gcc: 2012-09-19 Dehao Chen <dehao@google.com> * toplev.c (general_init): Init block_locations. * tree.c (tree_set_block): New. (tree_block): Change to use LOCATION_BLOCK. * tree.h (TREE_SET_BLOCK): New. * final.c (reemit_insn_block_notes): Change to use LOCATION_BLOCK. (final_start_function): Likewise. * input.c (expand_location_1): Likewise. * input.h (LOCATION_LOCUS): New. (LOCATION_BLOCK): New. (IS_UNKNOWN_LOCATION): New. * fold-const.c (expr_location_or): Change to use new location. * reorg.c (emit_delay_sequence): Likewise. (try_merge_delay_insns): Likewise. * modulo-sched.c (dump_insn_location): Likewise. * lto-streamer-out.c (lto_output_location_bitpack): Likewise. * lto-cgraph.c (output_node_opt_summary): Likewise. * jump.c (rtx_renumbered_equal_p): Likewise. * ifcvt.c (noce_try_move): Likewise. (noce_try_store_flag): Likewise. (noce_try_store_flag_constants): Likewise. (noce_try_addcc): Likewise. (noce_try_store_flag_mask): Likewise. (noce_try_cmove): Likewise. (noce_try_cmove_arith): Likewise. (noce_try_minmax): Likewise. (noce_try_abs): Likewise. (noce_try_sign_mask): Likewise. (noce_try_bitop): Likewise. (noce_process_if_block): Likewise. (cond_move_process_if_block): Likewise. (find_cond_trap): Likewise. * ipa-prop.c (ipa_set_jf_constant): Likewise. (ipa_write_jump_function): Likewise. * dwarf2out.c (add_src_coords_attributes): Likewise. * expr.c (expand_expr_real): Likewise. * tree-parloops.c (create_loop_fn): Likewise. * recog.c (peep2_attempt): Likewise. * function.c (free_after_compilation): Likewise. (expand_function_end): Likewise. (set_insn_locations): Likewise. (thread_prologue_and_epilogue_insns): Likewise. * print-rtl.c (print_rtx): Likewise. * profile.c (branch_prob): Likewise. * trans-mem.c (ipa_tm_scan_irr_block): Likewise. * gimplify.c (gimplify_call_expr): Likewise. * except.c (duplicate_eh_regions_1): Likewise. * emit-rtl.c (try_split): Likewise. (make_insn_raw): Likewise. (make_debug_insn_raw): Likewise. (make_jump_insn_raw): Likewise. (make_call_insn_raw): Likewise. (emit_pattern_after_setloc): Likewise. (emit_pattern_after): Likewise. (emit_debug_insn_after): Likewise. (emit_pattern_before): Likewise. (emit_insn_before_setloc): Likewise. (emit_jump_insn_before): Likewise. (emit_call_insn_before_setloc): Likewise. (emit_call_insn_before): Likeise. (emit_debug_insn_before_setloc): Likewise. (emit_copy_of_insn_after): Likewise. (insn_locators_alloc): Remove. (insn_locators_finalize): Remove. (insn_locators_free): Remove. (set_curr_insn_source_location): Remove. (get_curr_insn_source_location): Remove. (set_curr_insn_block): Remove. (get_curr_insn_block): Remove. (locator_scope): Remove. (insn_scope): Change to use new location. (locator_location): Remove. (insn_line): Change to use new location. (locator_file): Remove. (insn_file): Change to use new location. (locator_eq): Remove. (insn_locations_init): New. (insn_locations_finalize): New. (set_curr_insn_location): New. (curr_insn_location): New. * cfgexpand.c (gimple_assign_rhs_to_tree): Change to use new location. (expand_gimple_cond): Likewise. (expand_call_stmt): Likewise. (expand_gimple_stmt_1): Likewise. (expand_gimple_basic_block): Likewise. (construct_exit_block): Likewise. (gimple_expand_cfg): Likewise. * cfgcleanup.c (try_forward_edges): Likewise. * tree-ssa-live.c (remove_unused_scope_block_p): Likewise. (dump_scope_block): Likewise. (remove_unused_locals): Likewise. * rtl.c (rtx_equal_p_cb): Likewise. (rtx_equal_p): Likewise. * rtl.h (XUINT): New. (INSN_LOCATOR): Remove. (CURR_INSN_LOCATION): Remove. (INSN_LOCATION): New. (INSN_HAS_LOCATION): New. * tree-inline.c (remap_gimple_op_r): Change to use new location. (copy_tree_body_r): Likewise. (copy_phis_for_bb): Likewise. (expand_call_inline): Likewise. * tree-streamer-in.c (lto_input_ts_exp_tree_pointers): Likewise. * tree-streamer-out.c (write_ts_decl_minimal_tree_pointers): Likewise. * gimple-streamer-out.c (output_gimple_stmt): Likewise. * combine.c (try_combine): Likewise. * tree-outof-ssa.c (set_location_for_edge): Likewise. (insert_partition_copy_on_edge): Likewise. (insert_value_copy_on_edge): Likewise. (insert_rtx_to_part_on_edge): Likewise. (insert_part_to_rtx_on_edge): Likewise. * basic-block.h (edge_def): Remove field. * gimple.h (gimple_statement_base): Remove field. (gimple_bb): Change to use new location. (gimple_set_block): Likewise. (gimple_has_location): Likewise. * tree-cfg.c (make_cond_expr_edges): Likewise. (make_goto_expr_edges): Likewise. (gimple_can_merge_blocks_p): Likewise. (move_stmt_op): Likewise. (move_block_to_fn): Likewise. * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/i386/i386.c (x86_output_mi_thunk): Likewise. * config/tilegx/tilegx.c (tilegx_output_mi_thunk): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/ia64/ia64.c (ia64_output_mi_thunk): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/score/score.c (score_output_mi_thunk): Likewise. * config/tilepro/tilepro.c (tilepro_asm_output_mi_thunk): Likewise. * config/mips/mips.c (mips_output_mi_thunk): Likewise. * cfgrtl.c (unique_locus_on_edge_between_p): Likewise. (unique_locus_on_edge_between_p): Likewise. (emit_nop_for_unique_locus_between): Likewise. (force_nonfallthru_and_redirect): Likewise. (fixup_reorder_chain): Likewise. (cfg_layout_merge_blocks): Likewise. * stmt.c (emit_case_nodes): Likewise. gcc/lto: 2012-09-19 Dehao Chen <dehao@google.com> * lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field. libcpp: 2012-09-19 Dehao Chen <dehao@google.com> * include/line-map.h (MAX_SOURCE_LOCATION): New value. (location_adhoc_data_fini): New. (get_combined_adhoc_loc): New. (get_data_from_adhoc_loc): New. (get_location_from_adhoc_loc): New. (location_adhoc_data_map): New. (COMBINE_LOCATION_DATA): New. (IS_ADHOC_LOC): New. (expanded_location): New field. (line_maps): New field. * line-map.c (location_adhoc_data): New. (location_adhoc_data_hash): New. (location_adhoc_data_eq): New. (location_adhoc_data_update): New. (get_combined_adhoc_loc): New. (get_data_from_adhoc_loc): New. (get_location_from_adhoc_loc): New. (location_adhoc_data_init): New. (location_adhoc_data_fini): New. (linemap_init): Initialize location_adhoc_data. (linemap_lookup): Change to use new location. (linemap_ordinary_map_lookup): Likewise. (linemap_macro_map_lookup): Likewise. (linemap_macro_map_loc_to_def_point): Likewise. (linemap_macro_map_loc_unwind_toward_spel): Likewise. (linemap_get_expansion_line): Likewise. (linemap_get_expansion_filename): Likewise. (linemap_location_in_system_header_p): Likewise. (linemap_location_from_macro_expansion_p): Likewise. (linemap_macro_loc_to_spelling_point): Likewise. (linemap_macro_loc_to_def_point): Likewise. (linemap_macro_loc_to_exp_point): Likewise. (linemap_resolve_location): Likewise. (linemap_unwind_toward_expansion): Likewise. (linemap_unwind_to_first_non_reserved_loc): Likewise. (linemap_expand_location): Likewise. (linemap_dump_location): Likewise. (linemap_line_start): Likewise. From-SVN: r191494
2012-09-19 21:56:42 +02:00
dump_insn_location (insn);
fprintf (dump_file, "\n");
print_ddg (dump_file, g);
}
target.h (struct spec_info_def): New opaque declaration. 2006-03-16 Maxim Kuvyrkov <mkuvyrkov@ispras.ru> * target.h (struct spec_info_def): New opaque declaration. (struct gcc_target.sched): New fields: adjust_cost_2, h_i_d_extended, speculate_insn, needs_block_p, gen_check, first_cycle_multipass_dfa_lookahead_guard_spec, set_sched_flags. * target-def.h (TARGET_SCHED_ADJUST_COST_2, TARGET_SCHED_H_I_D_EXTENDED, TARGET_SCHED_SPECULATE_INSN, TARGET_SCHED_NEEDS_BLOCK_P, TARGET_SCHED_GEN_CHECK, TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD_SPEC, TARGET_SCHED_SET_SCHED_FLAGS): New macros to initialize fields in gcc_target.sched. (TARGET_SCHED): Use new macros. * rtl.h (copy_DEPS_LIST_list): New prototype. * sched-int.h (struct sched_info): Change signature of new_ready field, adjust all initializations. New fields: add_remove_insn, begin_schedule_ready, add_block, advance_target_bb, fix_recovery_cfg, region_head_or_leaf_p. (struct spec_info_def): New structure declaration. (spec_info_t): New typedef. (struct haifa_insn_data): New fields: todo_spec, done_spec, check_spec, recovery_block, orig_pat. (glat_start, glat_end): New variables declaraions. (TODO_SPEC, DONE_SPEC, CHECK_SPEC, RECOVERY_BLOCK, ORIG_PAT): New access macros. (enum SCHED_FLAGS): New constants: SCHED_RGN, SCHED_EBB, DETACH_LIFE_INFO, USE_GLAT. (enum SPEC_SCHED_FLAGS): New enumeration. (NOTE_NOTE_BB_P): New macro. (extend_dependency_caches, xrecalloc, unlink_bb_notes, add_block, attach_life_info, debug_spec_status, check_reg_live): New functions. (get_block_head_tail): Change signature to get_ebb_head_tail, adjust all uses in ddg.c, modulo-sched.c, haifa-sched.c, sched-rgn.c, sched-ebb.c (get_dep_weak, ds_merge): Prototype functions from sched-deps.c . * ddg.c (get_block_head_tail): Adjust all uses. * modulo-sched.c (get_block_head_tail): Adjust all uses. (sms_sched_info): Initialize new fields. (contributes_to_priority): Removed. * haifa-sched.c (params.h): New include. (get_block_head_tail): Adjust all uses. (ISSUE_POINTS): New macro. (glat_start, glat_end): New global variables. (spec_info_var, spec_info, added_recovery_block_p, nr_begin_data, nr_be_in_data, nr_begin_control, nr_be_in_control, bb_header, old_last_basic_block, before_recovery, current_sched_info_var, rgn_n_insns, luid): New static variables. (insn_cost1): New function. Move logic from insn_cost to here. (find_insn_reg_weight1): New function. Move logic from find_insn_reg_weight to here. (reemit_notes, move_insn, max_issue): Change signature. (move_insn1): Removed. (extend_h_i_d, extend_ready, extend_global, extend_all, init_h_i_d, extend_bb): New static functions to support extension of scheduler's data structures. (generate_recovery_code, process_insn_depend_be_in_spec, begin_speculative_block, add_to_speculative_block, init_before_recovery, create_recovery_block, create_check_block_twin, fix_recovery_deps): New static functions to support generation of recovery code. (fix_jump_move, find_fallthru_edge, dump_new_block_header, restore_bb_notes, move_block_after_check, move_succs): New static functions to support ebb scheduling. (init_glat, init_glat1, attach_life_info1, free_glat): New static functions to support handling of register live information. (associate_line_notes_with_blocks, change_pattern, speculate_insn, sched_remove_insn, clear_priorities, calc_priorities, bb_note, add_jump_dependencies): New static functions. (check_cfg, has_edge_p, check_sched_flags): New static functions for consistancy checking. (debug_spec_status): New function to call from debugger. (priority): Added code to handle speculation checks. (rank_for_schedule): Added code to distinguish speculative instructions. (schedule_insn): Added code to handle speculation checks. (unlink_other_notes, rm_line_notes, restore_line_notes, rm_other_notes): Fixed to handle ebbs. (move_insn): Added code to handle ebb scheduling. (max_issue): Added code to use ISSUE_POINTS of instructions. (choose_ready): Added code to choose between speculative and non-speculative instructions. (schedule_block): Added code to handle ebb scheduling and scheduling of speculative instructions. (sched_init): Initialize new variables. (sched_finish): Free new variables. Print statistics. (try_ready): Added code to handle speculative instructions. * lists.c (copy_DEPS_LIST_list): New function. * sched-deps.c (extend_dependency_caches): New function. Move logic from create_dependency_caches to here. (get_dep_weak, ds_merge): Make global. * genattr.c (main): Code to output prototype for dfa_clear_single_insn_cache. * genautomata.c (DFA_CLEAR_SINGLE_INSN_CACHE_FUNC_NAME): New macros. (output_dfa_clean_insn_cache_func): Code to output dfa_clear_single_insn_cache function. * sched-ebb.c (target_n_insns): Remove. Adjust all users to use n_insns. (can_schedule_ready_p, fix_basic_block_boundaries, add_missing_bbs): Removed. (n_insns, dont_calc_deps, ebb_head, ebb_tail, last_bb): New static variables. (begin_schedule_ready, add_remove_insn, add_block1, advance_target_bb, fix_recovery_cfg, ebb_head_or_leaf_p): Implement hooks from struct sched_info. (ebb_sched_info): Initialize new fields. (get_block_head_tail): Adjust all uses. (compute_jump_reg_dependencies): Fixed to use glat_start. (schedule_ebb): Code to remove unreachable last block. (schedule_ebbs): Added code to update register live information. * sched-rgn.c (region_sched_info): Initialize new fields. (get_block_head_tail): Adjust all uses. (last_was_jump): Removed. Adjust users. (begin_schedule_ready, add_remove_insn, insn_points, extend_regions, add_block1, fix_recovery_cfg, advance_target_bb, region_head_or_leaf_p): Implement new hooks. (check_dead_notes1): New static function. (struct region): New fields: dont_calc_deps, has_real_ebb. (RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB): New access macros. (BB_TO_BLOCK): Fixed to handle EBBs. (EBB_FIRST_BB, EBB_LAST_BB): New macros. (ebb_head): New static variable. (debug_regions, contributes_to_priority): Fixed to handle EBBs. (find_single_block_regions, find_rgns, find_more_rgns): Initialize new fields. (compute_dom_prob_ps): New assertion. (check_live_1, update_live_1): Fixed to work with glat_start instead of global_live_at_start. (init_ready_list): New assertions. (can_schedule_ready_p): Split update code to begin_schedule_ready. (new_ready): Add support for BEGIN_CONTROL speculation. (schedule_insns): Fixed code that updates register live information to handle EBBs. (schedule_region): Fixed to handle EBBs. (init_regions): Use extend_regions and check_dead_notes1. * params.def (PARAM_MAX_SCHED_INSN_CONFLICT_DELAY, PARAM_SCHED_SPEC_PROB_CUTOFF): New parameters. * doc/tm.texi (TARGET_SCHED_ADJUST_COST_2, TARGET_SCHED_H_I_D_EXTENDED, TARGET_SCHED_SPECULATE_INSN, TARGET_SCHED_NEEDS_BLOCK_P, TARGET_SCHED_GEN_CHECK, TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD_SPEC, TARGET_SCHED_SET_SCHED_FLAGS): Document. * doc/invoke.texi (max-sched-insn-conflict-delay, sched-spec-prob-cutoff): Document. From-SVN: r112128
2006-03-16 06:27:03 +01:00
get_ebb_head_tail (loop->header, loop->header, &head, &tail);
latch_edge = loop_latch_edge (loop);
tree-loop-linear.c (linear_transform_loops): Use single_exit accessor functions. * tree-loop-linear.c (linear_transform_loops): Use single_exit accessor functions. * tree-ssa-loop-niter.c (loop_only_exit_p): Ditto. * cfgloopmanip.c (update_single_exits_after_duplication, update_single_exit_for_duplicated_loop, loop_version): Ditto. * tree-scalar-evolution.c (get_loop_exit_condition, get_exit_conditions_rec, loop_closed_phi_def, number_of_iterations_in_loop, scev_const_prop): Ditto. * tree-ssa-loop-ivopts.c (single_dom_exit): Ditto. * modulo-sched.c (generate_prolog_epilog, loop_canon_p, sms_schedule): Ditto. * tree-ssa-loop-ivcanon.c (canonicalize_loop_induction_variables): Ditto. * tree-vectorizer.c (slpeel_update_phis_for_duplicate_loop, slpeel_update_phi_nodes_for_guard1, slpeel_update_phi_nodes_for_guard2, slpeel_make_loop_iterate_ntimes, slpeel_tree_duplicate_loop_to_edge_cfg, slpeel_can_duplicate_loop_p, slpeel_verify_cfg_after_peeling, slpeel_tree_peel_loop_to_edge): Ditto. * tree-if-conv.c (if_convertible_loop_p): Ditto. * tree-vect-analyze.c (vect_analyze_operations, vect_stmt_relevant_p, vect_analyze_loop_form): Ditto. * lambda-code.c (lambda_loopnest_to_gcc_loopnest, exit_phi_for_loop_p, can_convert_to_perfect_nest, perfect_nestify): Ditto. * tree-vect-transform.c (vect_create_epilog_for_reduction, vect_update_ivs_after_vectorizer, vect_do_peeling_for_loop_bound, vect_transform_loop): Ditto. * cfgloop.c (mark_single_exit_loops, verify_loop_structure): Ditto. (single_exit, set_single_exit): New functions. * cfgloop.h (struct loop): Rename single_exit field to single_exit_. (single_exit, set_single_exit): Declare. * doc/loop.texi: Undocument single_exit field. Document single_exit accessor function. From-SVN: r119075
2006-11-22 00:54:16 +01:00
gcc_assert (single_exit (loop));
if (single_exit (loop)->count)
trip_count = latch_edge->count / single_exit (loop)->count;
tree-vrp.c (execute_vrp): Do not pass dump argument to. * tree-vrp.c (execute_vrp): Do not pass dump argument to. loop_optimizer_init and loop_optimizer_finalize * tree-ssa-sink.c (execute_sink_code): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init, tree_ssa_loop_done): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Ditto. * sched-ebb.c: Include output.h. (schedule_ebbs): Do not use dump argument. * value-prof.h (struct profile_hooks): Remove profile_dump_file. * loop.c (loop_dump_stream): Removed. (loop_optimize, rest_of_handle_loop_optimize): Do not use dump argument. (scan_loop, move_movables, find_and_verify_loops, mark_loop_jump, emit_prefetch_instructions, loop_bivs_find, loop_bivs_check, final_biv_value, loop_biv_eliminable_p, loop_givs_rescan, loop_iterations, strength_reduce, record_biv, record_giv, final_giv_value, check_final_value, check_ext_dependent_givs, combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems, try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use dump_file instead of loop_dump_stream. * ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call argument dump_file. * reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use dump argument. * flow.c (life_analysis, rest_of_handle_life): Ditto. * haifa-sched.c: Include output.h (schedule_insns, sched_init): Do not use dump argument. * mode-switching.c (optimize_mode_switching): Ditto. * modulo-sched.c (stats_file): Removed. (print_node_sched_params): Do not call argument dump_file. (sms_schedule_by_order, loop_canon_p, sms_schedule, rest_of_handle_sms): Do not use dump argument. Use dump_file instead of stats_file. * cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not use dump argument. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize, rtl_loop_init, rtl_loop_done): Ditto. * global.c (global_alloc, rest_of_handle_global_alloc): Ditto. * predict.c (combine_predictions_for_bb, tree_estimate_probability): Ditto. * recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto. * lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto. * regmove.c (fixup_match_1, fixup_match_2, regmove_optimize, rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto. * emit-rtl.c (renumber_insns): Ditto. * cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr, expand_gimple_basic_block, tree_expand_cfg): Ditto. * regclass.c (regclass): Ditto. * tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts, remove_ssa_form, rewrite_out_of_ssa): Ditto. * reg-stack.c (compensate_edge, compensate_edges, convert_regs_1, convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs): Ditto. * sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto. * local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file to regclass. * gcse.c (gcse_file, debug_stderr): Removed. (gcse_main, bypass_jumps, rest_of_handle_jump_bypass, rest_of_handle_gcse): Do not use dump argument. (cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets, one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb, pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass, compute_code_hoist_vbeinout, compute_code_hoist_data, one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores, compute_store_table, build_store_vectors, insert_insn_start_bb, insert_store, remove_reachable_equiv_notes, replace_store_insn, store_motion): Use dump_file instead of gcse_file. * ipa-type-escape.c (type_escape_execute): Remove debugging comments. * profile.c (profile_dump_file): Removed. (branch_prob): Use dump_file instead of profile_dump_file. * ipa.c (cgraph_remove_unreachable_nodes): Do not call argument dump_file. * tree-ssa-copy.c (dump_copy_of): Ditto. * rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass dump file to life_analysis. * bt-load.c (branch_target_load_optimize): Ditto. * cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to renumber_insns. * rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs, regclass, dbr_schedule): Declaration changed. * sched-int.h (sched_init): Declaration changed. * tree-profile.c (tree_profile_dump_file): Removed. (tree_profile_hooks): Removed profile_dump_file hook. * rtl-profile (rtl_profile_dump_file): Removed. (rtl_profile_hooks): emoved profile_dump_file hook. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * c-gimplify.c (c_genericize): Do not call local variable dump_file. * tree-cfg.c (build_tree_cfg): Ditto. * Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency. * basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm): Declaration changed. * config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to life_analysis and schedule_insns. * config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to life_analysis. * config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to dbr_schedule. * config/mips/mips.c (mips_reorg): Ditto. * config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to schedule_ebbs. From-SVN: r110656
2006-02-06 19:20:47 +01:00
if (dump_file)
{
Integrate lexical block into source_location. gcc: 2012-09-19 Dehao Chen <dehao@google.com> * toplev.c (general_init): Init block_locations. * tree.c (tree_set_block): New. (tree_block): Change to use LOCATION_BLOCK. * tree.h (TREE_SET_BLOCK): New. * final.c (reemit_insn_block_notes): Change to use LOCATION_BLOCK. (final_start_function): Likewise. * input.c (expand_location_1): Likewise. * input.h (LOCATION_LOCUS): New. (LOCATION_BLOCK): New. (IS_UNKNOWN_LOCATION): New. * fold-const.c (expr_location_or): Change to use new location. * reorg.c (emit_delay_sequence): Likewise. (try_merge_delay_insns): Likewise. * modulo-sched.c (dump_insn_location): Likewise. * lto-streamer-out.c (lto_output_location_bitpack): Likewise. * lto-cgraph.c (output_node_opt_summary): Likewise. * jump.c (rtx_renumbered_equal_p): Likewise. * ifcvt.c (noce_try_move): Likewise. (noce_try_store_flag): Likewise. (noce_try_store_flag_constants): Likewise. (noce_try_addcc): Likewise. (noce_try_store_flag_mask): Likewise. (noce_try_cmove): Likewise. (noce_try_cmove_arith): Likewise. (noce_try_minmax): Likewise. (noce_try_abs): Likewise. (noce_try_sign_mask): Likewise. (noce_try_bitop): Likewise. (noce_process_if_block): Likewise. (cond_move_process_if_block): Likewise. (find_cond_trap): Likewise. * ipa-prop.c (ipa_set_jf_constant): Likewise. (ipa_write_jump_function): Likewise. * dwarf2out.c (add_src_coords_attributes): Likewise. * expr.c (expand_expr_real): Likewise. * tree-parloops.c (create_loop_fn): Likewise. * recog.c (peep2_attempt): Likewise. * function.c (free_after_compilation): Likewise. (expand_function_end): Likewise. (set_insn_locations): Likewise. (thread_prologue_and_epilogue_insns): Likewise. * print-rtl.c (print_rtx): Likewise. * profile.c (branch_prob): Likewise. * trans-mem.c (ipa_tm_scan_irr_block): Likewise. * gimplify.c (gimplify_call_expr): Likewise. * except.c (duplicate_eh_regions_1): Likewise. * emit-rtl.c (try_split): Likewise. (make_insn_raw): Likewise. (make_debug_insn_raw): Likewise. (make_jump_insn_raw): Likewise. (make_call_insn_raw): Likewise. (emit_pattern_after_setloc): Likewise. (emit_pattern_after): Likewise. (emit_debug_insn_after): Likewise. (emit_pattern_before): Likewise. (emit_insn_before_setloc): Likewise. (emit_jump_insn_before): Likewise. (emit_call_insn_before_setloc): Likewise. (emit_call_insn_before): Likeise. (emit_debug_insn_before_setloc): Likewise. (emit_copy_of_insn_after): Likewise. (insn_locators_alloc): Remove. (insn_locators_finalize): Remove. (insn_locators_free): Remove. (set_curr_insn_source_location): Remove. (get_curr_insn_source_location): Remove. (set_curr_insn_block): Remove. (get_curr_insn_block): Remove. (locator_scope): Remove. (insn_scope): Change to use new location. (locator_location): Remove. (insn_line): Change to use new location. (locator_file): Remove. (insn_file): Change to use new location. (locator_eq): Remove. (insn_locations_init): New. (insn_locations_finalize): New. (set_curr_insn_location): New. (curr_insn_location): New. * cfgexpand.c (gimple_assign_rhs_to_tree): Change to use new location. (expand_gimple_cond): Likewise. (expand_call_stmt): Likewise. (expand_gimple_stmt_1): Likewise. (expand_gimple_basic_block): Likewise. (construct_exit_block): Likewise. (gimple_expand_cfg): Likewise. * cfgcleanup.c (try_forward_edges): Likewise. * tree-ssa-live.c (remove_unused_scope_block_p): Likewise. (dump_scope_block): Likewise. (remove_unused_locals): Likewise. * rtl.c (rtx_equal_p_cb): Likewise. (rtx_equal_p): Likewise. * rtl.h (XUINT): New. (INSN_LOCATOR): Remove. (CURR_INSN_LOCATION): Remove. (INSN_LOCATION): New. (INSN_HAS_LOCATION): New. * tree-inline.c (remap_gimple_op_r): Change to use new location. (copy_tree_body_r): Likewise. (copy_phis_for_bb): Likewise. (expand_call_inline): Likewise. * tree-streamer-in.c (lto_input_ts_exp_tree_pointers): Likewise. * tree-streamer-out.c (write_ts_decl_minimal_tree_pointers): Likewise. * gimple-streamer-out.c (output_gimple_stmt): Likewise. * combine.c (try_combine): Likewise. * tree-outof-ssa.c (set_location_for_edge): Likewise. (insert_partition_copy_on_edge): Likewise. (insert_value_copy_on_edge): Likewise. (insert_rtx_to_part_on_edge): Likewise. (insert_part_to_rtx_on_edge): Likewise. * basic-block.h (edge_def): Remove field. * gimple.h (gimple_statement_base): Remove field. (gimple_bb): Change to use new location. (gimple_set_block): Likewise. (gimple_has_location): Likewise. * tree-cfg.c (make_cond_expr_edges): Likewise. (make_goto_expr_edges): Likewise. (gimple_can_merge_blocks_p): Likewise. (move_stmt_op): Likewise. (move_block_to_fn): Likewise. * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/i386/i386.c (x86_output_mi_thunk): Likewise. * config/tilegx/tilegx.c (tilegx_output_mi_thunk): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/ia64/ia64.c (ia64_output_mi_thunk): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/score/score.c (score_output_mi_thunk): Likewise. * config/tilepro/tilepro.c (tilepro_asm_output_mi_thunk): Likewise. * config/mips/mips.c (mips_output_mi_thunk): Likewise. * cfgrtl.c (unique_locus_on_edge_between_p): Likewise. (unique_locus_on_edge_between_p): Likewise. (emit_nop_for_unique_locus_between): Likewise. (force_nonfallthru_and_redirect): Likewise. (fixup_reorder_chain): Likewise. (cfg_layout_merge_blocks): Likewise. * stmt.c (emit_case_nodes): Likewise. gcc/lto: 2012-09-19 Dehao Chen <dehao@google.com> * lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field. libcpp: 2012-09-19 Dehao Chen <dehao@google.com> * include/line-map.h (MAX_SOURCE_LOCATION): New value. (location_adhoc_data_fini): New. (get_combined_adhoc_loc): New. (get_data_from_adhoc_loc): New. (get_location_from_adhoc_loc): New. (location_adhoc_data_map): New. (COMBINE_LOCATION_DATA): New. (IS_ADHOC_LOC): New. (expanded_location): New field. (line_maps): New field. * line-map.c (location_adhoc_data): New. (location_adhoc_data_hash): New. (location_adhoc_data_eq): New. (location_adhoc_data_update): New. (get_combined_adhoc_loc): New. (get_data_from_adhoc_loc): New. (get_location_from_adhoc_loc): New. (location_adhoc_data_init): New. (location_adhoc_data_fini): New. (linemap_init): Initialize location_adhoc_data. (linemap_lookup): Change to use new location. (linemap_ordinary_map_lookup): Likewise. (linemap_macro_map_lookup): Likewise. (linemap_macro_map_loc_to_def_point): Likewise. (linemap_macro_map_loc_unwind_toward_spel): Likewise. (linemap_get_expansion_line): Likewise. (linemap_get_expansion_filename): Likewise. (linemap_location_in_system_header_p): Likewise. (linemap_location_from_macro_expansion_p): Likewise. (linemap_macro_loc_to_spelling_point): Likewise. (linemap_macro_loc_to_def_point): Likewise. (linemap_macro_loc_to_exp_point): Likewise. (linemap_resolve_location): Likewise. (linemap_unwind_toward_expansion): Likewise. (linemap_unwind_to_first_non_reserved_loc): Likewise. (linemap_expand_location): Likewise. (linemap_dump_location): Likewise. (linemap_line_start): Likewise. From-SVN: r191494
2012-09-19 21:56:42 +02:00
dump_insn_location (tail);
fprintf (dump_file, "\nSMS single-bb-loop\n");
if (profile_info && flag_branch_probabilities)
{
tree-vrp.c (execute_vrp): Do not pass dump argument to. * tree-vrp.c (execute_vrp): Do not pass dump argument to. loop_optimizer_init and loop_optimizer_finalize * tree-ssa-sink.c (execute_sink_code): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init, tree_ssa_loop_done): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Ditto. * sched-ebb.c: Include output.h. (schedule_ebbs): Do not use dump argument. * value-prof.h (struct profile_hooks): Remove profile_dump_file. * loop.c (loop_dump_stream): Removed. (loop_optimize, rest_of_handle_loop_optimize): Do not use dump argument. (scan_loop, move_movables, find_and_verify_loops, mark_loop_jump, emit_prefetch_instructions, loop_bivs_find, loop_bivs_check, final_biv_value, loop_biv_eliminable_p, loop_givs_rescan, loop_iterations, strength_reduce, record_biv, record_giv, final_giv_value, check_final_value, check_ext_dependent_givs, combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems, try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use dump_file instead of loop_dump_stream. * ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call argument dump_file. * reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use dump argument. * flow.c (life_analysis, rest_of_handle_life): Ditto. * haifa-sched.c: Include output.h (schedule_insns, sched_init): Do not use dump argument. * mode-switching.c (optimize_mode_switching): Ditto. * modulo-sched.c (stats_file): Removed. (print_node_sched_params): Do not call argument dump_file. (sms_schedule_by_order, loop_canon_p, sms_schedule, rest_of_handle_sms): Do not use dump argument. Use dump_file instead of stats_file. * cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not use dump argument. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize, rtl_loop_init, rtl_loop_done): Ditto. * global.c (global_alloc, rest_of_handle_global_alloc): Ditto. * predict.c (combine_predictions_for_bb, tree_estimate_probability): Ditto. * recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto. * lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto. * regmove.c (fixup_match_1, fixup_match_2, regmove_optimize, rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto. * emit-rtl.c (renumber_insns): Ditto. * cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr, expand_gimple_basic_block, tree_expand_cfg): Ditto. * regclass.c (regclass): Ditto. * tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts, remove_ssa_form, rewrite_out_of_ssa): Ditto. * reg-stack.c (compensate_edge, compensate_edges, convert_regs_1, convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs): Ditto. * sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto. * local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file to regclass. * gcse.c (gcse_file, debug_stderr): Removed. (gcse_main, bypass_jumps, rest_of_handle_jump_bypass, rest_of_handle_gcse): Do not use dump argument. (cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets, one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb, pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass, compute_code_hoist_vbeinout, compute_code_hoist_data, one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores, compute_store_table, build_store_vectors, insert_insn_start_bb, insert_store, remove_reachable_equiv_notes, replace_store_insn, store_motion): Use dump_file instead of gcse_file. * ipa-type-escape.c (type_escape_execute): Remove debugging comments. * profile.c (profile_dump_file): Removed. (branch_prob): Use dump_file instead of profile_dump_file. * ipa.c (cgraph_remove_unreachable_nodes): Do not call argument dump_file. * tree-ssa-copy.c (dump_copy_of): Ditto. * rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass dump file to life_analysis. * bt-load.c (branch_target_load_optimize): Ditto. * cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to renumber_insns. * rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs, regclass, dbr_schedule): Declaration changed. * sched-int.h (sched_init): Declaration changed. * tree-profile.c (tree_profile_dump_file): Removed. (tree_profile_hooks): Removed profile_dump_file hook. * rtl-profile (rtl_profile_dump_file): Removed. (rtl_profile_hooks): emoved profile_dump_file hook. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * c-gimplify.c (c_genericize): Do not call local variable dump_file. * tree-cfg.c (build_tree_cfg): Ditto. * Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency. * basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm): Declaration changed. * config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to life_analysis and schedule_insns. * config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to life_analysis. * config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to dbr_schedule. * config/mips/mips.c (mips_reorg): Ditto. * config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to schedule_ebbs. From-SVN: r110656
2006-02-06 19:20:47 +01:00
fprintf (dump_file, "SMS loop-count ");
fprintf (dump_file, "%" PRId64,
system.h: Define __STDC_FORMAT_MACROS before including inttypes.h. 2014-05-23 Richard Biener <rguenther@suse.de> * system.h: Define __STDC_FORMAT_MACROS before including inttypes.h. * hwint.h (HOST_WIDEST_INT, HOST_BITS_PER_WIDEST_INT, HOST_WIDEST_INT_PRINT, HOST_WIDEST_INT_PRINT_DEC, HOST_WIDEST_INT_PRINT_DEC_C, HOST_WIDEST_INT_PRINT_UNSIGNED, HOST_WIDEST_INT_PRINT_HEX, HOST_WIDEST_INT_PRINT_DOUBLE_HEX, HOST_WIDEST_INT_C): Remove. (PRId64, PRIi64, PRIo64, PRIu64, PRIx64, PRIX64): Define if C99 inttypes.h is not available. * coretypes.h (gcov_type, gcov_type_unsigned): Use [u]int64_t. * gcov-io.h (gcov_type, gcov_type_unsigned): Likewise. * gcov-io.c (gcov_histo_index): Drop non-64bit hwi case. * cfgloop.h (struct niter_desc): Use uint64_t for niter field. * bitmap.c (struct bitmap_descriptor_d): Use uint64_t for counters. (struct output_info): Likewise. (print_statistics): Adjust. (dump_bitmap_statistics): Likewise. * bt-load.c (migrate_btr_defs): Print with PRId64. * cfg.c (dump_edge_info, dump_bb_info): Likewise. (MAX_SAFE_MULTIPLIER): Adjust. * cfghooks.c (dump_bb_for_graph): Print with PRId64. * cgraph.c (cgraph_redirect_edge_call_stmt_to_callee, dump_cgraph_node): Likewise. * final.c (dump_basic_block_info): Likewise. * gcov-dump.c (tag_counters, tag_summary, dump_working_sets): Likewise. * gcov.c (format_gcov): Likewise. * ipa-cp.c (good_cloning_opportunity_p): Likewise. Use int64_t for calculation. (get_clone_agg_value): Use HOST_WIDE_INT for offset. * ipa-inline.c (compute_max_insns): Use int64_t for calcuation. (inline_small_functions, dump_overall_stats, dump_inline_stats): Use PRId64 for dumping. * ipa-profile.c (dump_histogram, ipa_profile): Likewise. * ira-color.c (struct allocno_hard_regs): Use int64_t for cost. (add_allocno_hard_regs): Adjust. * loop-doloop.c (doloop_modify): Print using PRId64. * loop-iv.c (inverse): Compute in uint64_t. (determine_max_iter, iv_number_of_iterations): Likewise. * loop-unroll.c (decide_peel_completely, decide_peel_simple): Print using PRId64. * lto-streamer-out.c (write_symbol): Use uint64_t. * mcf.c (CAP_INFINITY): Use int64_t maximum. (dump_fixup_edge, create_fixup_graph, cancel_negative_cycle, find_max_flow, adjust_cfg_counts): Use int64_t and dump with PRId64. * modulo-sched.c (const_iteration_count): Use int64_t. (sms_schedule): Dump using PRId64. * predict.c (dump_prediction): Likewise. * pretty-print.h (pp_widest_integer): Remove. * profile.c (get_working_sets, is_edge_inconsistent, is_inconsistent, read_profile_edge_counts): Dump using PRId64. * tree-pretty-print.c (pp_double_int): Remove case handling HOST_BITS_PER_DOUBLE_INT == HOST_BITS_PER_WIDEST_INT. * tree-ssa-math-opts.c (struct symbolic_number): Use uint64_t and adjust users. (pass_optimize_bswap::execute): Remove restriction on hosts. * tree-streamer-in.c (streamer_alloc_tree): Use HOST_WIDE_INT. * tree-streamer-out.c (streamer_write_tree_header): Likewise. * tree.c (widest_int_cst_value): Remove. * tree.h (widest_int_cst_value): Likewise. * value-prof.c (dump_histogram_value): Print using PRId64. * gengtype.c (main): Also inject int64_t. * ggc-page.c (struct max_alignment): Use int64_t. * alloc-pool.c (struct allocation_object_def): Likewise. * ira-conflicts.c (build_conflict_bit_table): Use uint64_t for computation. * doc/tm.texi.in: Remove reference to HOST_WIDEST_INT. * doc/tm.texi: Regenerated. * gengtype-lex.l (IWORD): Handle [u]int64_t. * config/sh/sh.c (expand_cbranchdi4): Use gcov_type. * config/mmix/mmix-protos.h (mmix_intval, mmix_shiftable_wyde_value, mmix_output_register_setting): Use [u]int64_t in prototypes. * config/mmix/mmix.c (mmix_print_operand, mmix_output_register_setting, mmix_shiftable_wyde_value, mmix_output_shiftvalue_op_from_str, mmix_output_octa, mmix_output_shifted_value): Adjust. (mmix_intval): Adjust. Remove unreachable case. * config/mmix/mmix.md (*nonlocal_goto_receiver_expanded): Use int64_t. lto/ * lto.c (lto_parse_hex): Use int64_t. (lto_resolution_read): Likewise. From-SVN: r210931
2014-05-26 12:42:43 +02:00
(int64_t) bb->count);
tree-vrp.c (execute_vrp): Do not pass dump argument to. * tree-vrp.c (execute_vrp): Do not pass dump argument to. loop_optimizer_init and loop_optimizer_finalize * tree-ssa-sink.c (execute_sink_code): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init, tree_ssa_loop_done): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Ditto. * sched-ebb.c: Include output.h. (schedule_ebbs): Do not use dump argument. * value-prof.h (struct profile_hooks): Remove profile_dump_file. * loop.c (loop_dump_stream): Removed. (loop_optimize, rest_of_handle_loop_optimize): Do not use dump argument. (scan_loop, move_movables, find_and_verify_loops, mark_loop_jump, emit_prefetch_instructions, loop_bivs_find, loop_bivs_check, final_biv_value, loop_biv_eliminable_p, loop_givs_rescan, loop_iterations, strength_reduce, record_biv, record_giv, final_giv_value, check_final_value, check_ext_dependent_givs, combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems, try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use dump_file instead of loop_dump_stream. * ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call argument dump_file. * reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use dump argument. * flow.c (life_analysis, rest_of_handle_life): Ditto. * haifa-sched.c: Include output.h (schedule_insns, sched_init): Do not use dump argument. * mode-switching.c (optimize_mode_switching): Ditto. * modulo-sched.c (stats_file): Removed. (print_node_sched_params): Do not call argument dump_file. (sms_schedule_by_order, loop_canon_p, sms_schedule, rest_of_handle_sms): Do not use dump argument. Use dump_file instead of stats_file. * cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not use dump argument. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize, rtl_loop_init, rtl_loop_done): Ditto. * global.c (global_alloc, rest_of_handle_global_alloc): Ditto. * predict.c (combine_predictions_for_bb, tree_estimate_probability): Ditto. * recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto. * lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto. * regmove.c (fixup_match_1, fixup_match_2, regmove_optimize, rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto. * emit-rtl.c (renumber_insns): Ditto. * cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr, expand_gimple_basic_block, tree_expand_cfg): Ditto. * regclass.c (regclass): Ditto. * tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts, remove_ssa_form, rewrite_out_of_ssa): Ditto. * reg-stack.c (compensate_edge, compensate_edges, convert_regs_1, convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs): Ditto. * sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto. * local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file to regclass. * gcse.c (gcse_file, debug_stderr): Removed. (gcse_main, bypass_jumps, rest_of_handle_jump_bypass, rest_of_handle_gcse): Do not use dump argument. (cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets, one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb, pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass, compute_code_hoist_vbeinout, compute_code_hoist_data, one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores, compute_store_table, build_store_vectors, insert_insn_start_bb, insert_store, remove_reachable_equiv_notes, replace_store_insn, store_motion): Use dump_file instead of gcse_file. * ipa-type-escape.c (type_escape_execute): Remove debugging comments. * profile.c (profile_dump_file): Removed. (branch_prob): Use dump_file instead of profile_dump_file. * ipa.c (cgraph_remove_unreachable_nodes): Do not call argument dump_file. * tree-ssa-copy.c (dump_copy_of): Ditto. * rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass dump file to life_analysis. * bt-load.c (branch_target_load_optimize): Ditto. * cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to renumber_insns. * rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs, regclass, dbr_schedule): Declaration changed. * sched-int.h (sched_init): Declaration changed. * tree-profile.c (tree_profile_dump_file): Removed. (tree_profile_hooks): Removed profile_dump_file hook. * rtl-profile (rtl_profile_dump_file): Removed. (rtl_profile_hooks): emoved profile_dump_file hook. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * c-gimplify.c (c_genericize): Do not call local variable dump_file. * tree-cfg.c (build_tree_cfg): Ditto. * Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency. * basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm): Declaration changed. * config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to life_analysis and schedule_insns. * config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to life_analysis. * config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to dbr_schedule. * config/mips/mips.c (mips_reorg): Ditto. * config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to schedule_ebbs. From-SVN: r110656
2006-02-06 19:20:47 +01:00
fprintf (dump_file, "\n");
fprintf (dump_file, "SMS profile-sum-max ");
fprintf (dump_file, "%" PRId64,
system.h: Define __STDC_FORMAT_MACROS before including inttypes.h. 2014-05-23 Richard Biener <rguenther@suse.de> * system.h: Define __STDC_FORMAT_MACROS before including inttypes.h. * hwint.h (HOST_WIDEST_INT, HOST_BITS_PER_WIDEST_INT, HOST_WIDEST_INT_PRINT, HOST_WIDEST_INT_PRINT_DEC, HOST_WIDEST_INT_PRINT_DEC_C, HOST_WIDEST_INT_PRINT_UNSIGNED, HOST_WIDEST_INT_PRINT_HEX, HOST_WIDEST_INT_PRINT_DOUBLE_HEX, HOST_WIDEST_INT_C): Remove. (PRId64, PRIi64, PRIo64, PRIu64, PRIx64, PRIX64): Define if C99 inttypes.h is not available. * coretypes.h (gcov_type, gcov_type_unsigned): Use [u]int64_t. * gcov-io.h (gcov_type, gcov_type_unsigned): Likewise. * gcov-io.c (gcov_histo_index): Drop non-64bit hwi case. * cfgloop.h (struct niter_desc): Use uint64_t for niter field. * bitmap.c (struct bitmap_descriptor_d): Use uint64_t for counters. (struct output_info): Likewise. (print_statistics): Adjust. (dump_bitmap_statistics): Likewise. * bt-load.c (migrate_btr_defs): Print with PRId64. * cfg.c (dump_edge_info, dump_bb_info): Likewise. (MAX_SAFE_MULTIPLIER): Adjust. * cfghooks.c (dump_bb_for_graph): Print with PRId64. * cgraph.c (cgraph_redirect_edge_call_stmt_to_callee, dump_cgraph_node): Likewise. * final.c (dump_basic_block_info): Likewise. * gcov-dump.c (tag_counters, tag_summary, dump_working_sets): Likewise. * gcov.c (format_gcov): Likewise. * ipa-cp.c (good_cloning_opportunity_p): Likewise. Use int64_t for calculation. (get_clone_agg_value): Use HOST_WIDE_INT for offset. * ipa-inline.c (compute_max_insns): Use int64_t for calcuation. (inline_small_functions, dump_overall_stats, dump_inline_stats): Use PRId64 for dumping. * ipa-profile.c (dump_histogram, ipa_profile): Likewise. * ira-color.c (struct allocno_hard_regs): Use int64_t for cost. (add_allocno_hard_regs): Adjust. * loop-doloop.c (doloop_modify): Print using PRId64. * loop-iv.c (inverse): Compute in uint64_t. (determine_max_iter, iv_number_of_iterations): Likewise. * loop-unroll.c (decide_peel_completely, decide_peel_simple): Print using PRId64. * lto-streamer-out.c (write_symbol): Use uint64_t. * mcf.c (CAP_INFINITY): Use int64_t maximum. (dump_fixup_edge, create_fixup_graph, cancel_negative_cycle, find_max_flow, adjust_cfg_counts): Use int64_t and dump with PRId64. * modulo-sched.c (const_iteration_count): Use int64_t. (sms_schedule): Dump using PRId64. * predict.c (dump_prediction): Likewise. * pretty-print.h (pp_widest_integer): Remove. * profile.c (get_working_sets, is_edge_inconsistent, is_inconsistent, read_profile_edge_counts): Dump using PRId64. * tree-pretty-print.c (pp_double_int): Remove case handling HOST_BITS_PER_DOUBLE_INT == HOST_BITS_PER_WIDEST_INT. * tree-ssa-math-opts.c (struct symbolic_number): Use uint64_t and adjust users. (pass_optimize_bswap::execute): Remove restriction on hosts. * tree-streamer-in.c (streamer_alloc_tree): Use HOST_WIDE_INT. * tree-streamer-out.c (streamer_write_tree_header): Likewise. * tree.c (widest_int_cst_value): Remove. * tree.h (widest_int_cst_value): Likewise. * value-prof.c (dump_histogram_value): Print using PRId64. * gengtype.c (main): Also inject int64_t. * ggc-page.c (struct max_alignment): Use int64_t. * alloc-pool.c (struct allocation_object_def): Likewise. * ira-conflicts.c (build_conflict_bit_table): Use uint64_t for computation. * doc/tm.texi.in: Remove reference to HOST_WIDEST_INT. * doc/tm.texi: Regenerated. * gengtype-lex.l (IWORD): Handle [u]int64_t. * config/sh/sh.c (expand_cbranchdi4): Use gcov_type. * config/mmix/mmix-protos.h (mmix_intval, mmix_shiftable_wyde_value, mmix_output_register_setting): Use [u]int64_t in prototypes. * config/mmix/mmix.c (mmix_print_operand, mmix_output_register_setting, mmix_shiftable_wyde_value, mmix_output_shiftvalue_op_from_str, mmix_output_octa, mmix_output_shifted_value): Adjust. (mmix_intval): Adjust. Remove unreachable case. * config/mmix/mmix.md (*nonlocal_goto_receiver_expanded): Use int64_t. lto/ * lto.c (lto_parse_hex): Use int64_t. (lto_resolution_read): Likewise. From-SVN: r210931
2014-05-26 12:42:43 +02:00
(int64_t) profile_info->sum_max);
tree-vrp.c (execute_vrp): Do not pass dump argument to. * tree-vrp.c (execute_vrp): Do not pass dump argument to. loop_optimizer_init and loop_optimizer_finalize * tree-ssa-sink.c (execute_sink_code): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init, tree_ssa_loop_done): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Ditto. * sched-ebb.c: Include output.h. (schedule_ebbs): Do not use dump argument. * value-prof.h (struct profile_hooks): Remove profile_dump_file. * loop.c (loop_dump_stream): Removed. (loop_optimize, rest_of_handle_loop_optimize): Do not use dump argument. (scan_loop, move_movables, find_and_verify_loops, mark_loop_jump, emit_prefetch_instructions, loop_bivs_find, loop_bivs_check, final_biv_value, loop_biv_eliminable_p, loop_givs_rescan, loop_iterations, strength_reduce, record_biv, record_giv, final_giv_value, check_final_value, check_ext_dependent_givs, combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems, try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use dump_file instead of loop_dump_stream. * ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call argument dump_file. * reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use dump argument. * flow.c (life_analysis, rest_of_handle_life): Ditto. * haifa-sched.c: Include output.h (schedule_insns, sched_init): Do not use dump argument. * mode-switching.c (optimize_mode_switching): Ditto. * modulo-sched.c (stats_file): Removed. (print_node_sched_params): Do not call argument dump_file. (sms_schedule_by_order, loop_canon_p, sms_schedule, rest_of_handle_sms): Do not use dump argument. Use dump_file instead of stats_file. * cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not use dump argument. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize, rtl_loop_init, rtl_loop_done): Ditto. * global.c (global_alloc, rest_of_handle_global_alloc): Ditto. * predict.c (combine_predictions_for_bb, tree_estimate_probability): Ditto. * recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto. * lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto. * regmove.c (fixup_match_1, fixup_match_2, regmove_optimize, rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto. * emit-rtl.c (renumber_insns): Ditto. * cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr, expand_gimple_basic_block, tree_expand_cfg): Ditto. * regclass.c (regclass): Ditto. * tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts, remove_ssa_form, rewrite_out_of_ssa): Ditto. * reg-stack.c (compensate_edge, compensate_edges, convert_regs_1, convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs): Ditto. * sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto. * local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file to regclass. * gcse.c (gcse_file, debug_stderr): Removed. (gcse_main, bypass_jumps, rest_of_handle_jump_bypass, rest_of_handle_gcse): Do not use dump argument. (cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets, one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb, pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass, compute_code_hoist_vbeinout, compute_code_hoist_data, one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores, compute_store_table, build_store_vectors, insert_insn_start_bb, insert_store, remove_reachable_equiv_notes, replace_store_insn, store_motion): Use dump_file instead of gcse_file. * ipa-type-escape.c (type_escape_execute): Remove debugging comments. * profile.c (profile_dump_file): Removed. (branch_prob): Use dump_file instead of profile_dump_file. * ipa.c (cgraph_remove_unreachable_nodes): Do not call argument dump_file. * tree-ssa-copy.c (dump_copy_of): Ditto. * rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass dump file to life_analysis. * bt-load.c (branch_target_load_optimize): Ditto. * cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to renumber_insns. * rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs, regclass, dbr_schedule): Declaration changed. * sched-int.h (sched_init): Declaration changed. * tree-profile.c (tree_profile_dump_file): Removed. (tree_profile_hooks): Removed profile_dump_file hook. * rtl-profile (rtl_profile_dump_file): Removed. (rtl_profile_hooks): emoved profile_dump_file hook. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * c-gimplify.c (c_genericize): Do not call local variable dump_file. * tree-cfg.c (build_tree_cfg): Ditto. * Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency. * basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm): Declaration changed. * config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to life_analysis and schedule_insns. * config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to life_analysis. * config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to dbr_schedule. * config/mips/mips.c (mips_reorg): Ditto. * config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to schedule_ebbs. From-SVN: r110656
2006-02-06 19:20:47 +01:00
fprintf (dump_file, "\n");
}
tree-vrp.c (execute_vrp): Do not pass dump argument to. * tree-vrp.c (execute_vrp): Do not pass dump argument to. loop_optimizer_init and loop_optimizer_finalize * tree-ssa-sink.c (execute_sink_code): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init, tree_ssa_loop_done): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Ditto. * sched-ebb.c: Include output.h. (schedule_ebbs): Do not use dump argument. * value-prof.h (struct profile_hooks): Remove profile_dump_file. * loop.c (loop_dump_stream): Removed. (loop_optimize, rest_of_handle_loop_optimize): Do not use dump argument. (scan_loop, move_movables, find_and_verify_loops, mark_loop_jump, emit_prefetch_instructions, loop_bivs_find, loop_bivs_check, final_biv_value, loop_biv_eliminable_p, loop_givs_rescan, loop_iterations, strength_reduce, record_biv, record_giv, final_giv_value, check_final_value, check_ext_dependent_givs, combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems, try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use dump_file instead of loop_dump_stream. * ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call argument dump_file. * reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use dump argument. * flow.c (life_analysis, rest_of_handle_life): Ditto. * haifa-sched.c: Include output.h (schedule_insns, sched_init): Do not use dump argument. * mode-switching.c (optimize_mode_switching): Ditto. * modulo-sched.c (stats_file): Removed. (print_node_sched_params): Do not call argument dump_file. (sms_schedule_by_order, loop_canon_p, sms_schedule, rest_of_handle_sms): Do not use dump argument. Use dump_file instead of stats_file. * cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not use dump argument. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize, rtl_loop_init, rtl_loop_done): Ditto. * global.c (global_alloc, rest_of_handle_global_alloc): Ditto. * predict.c (combine_predictions_for_bb, tree_estimate_probability): Ditto. * recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto. * lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto. * regmove.c (fixup_match_1, fixup_match_2, regmove_optimize, rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto. * emit-rtl.c (renumber_insns): Ditto. * cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr, expand_gimple_basic_block, tree_expand_cfg): Ditto. * regclass.c (regclass): Ditto. * tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts, remove_ssa_form, rewrite_out_of_ssa): Ditto. * reg-stack.c (compensate_edge, compensate_edges, convert_regs_1, convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs): Ditto. * sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto. * local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file to regclass. * gcse.c (gcse_file, debug_stderr): Removed. (gcse_main, bypass_jumps, rest_of_handle_jump_bypass, rest_of_handle_gcse): Do not use dump argument. (cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets, one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb, pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass, compute_code_hoist_vbeinout, compute_code_hoist_data, one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores, compute_store_table, build_store_vectors, insert_insn_start_bb, insert_store, remove_reachable_equiv_notes, replace_store_insn, store_motion): Use dump_file instead of gcse_file. * ipa-type-escape.c (type_escape_execute): Remove debugging comments. * profile.c (profile_dump_file): Removed. (branch_prob): Use dump_file instead of profile_dump_file. * ipa.c (cgraph_remove_unreachable_nodes): Do not call argument dump_file. * tree-ssa-copy.c (dump_copy_of): Ditto. * rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass dump file to life_analysis. * bt-load.c (branch_target_load_optimize): Ditto. * cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to renumber_insns. * rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs, regclass, dbr_schedule): Declaration changed. * sched-int.h (sched_init): Declaration changed. * tree-profile.c (tree_profile_dump_file): Removed. (tree_profile_hooks): Removed profile_dump_file hook. * rtl-profile (rtl_profile_dump_file): Removed. (rtl_profile_hooks): emoved profile_dump_file hook. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * c-gimplify.c (c_genericize): Do not call local variable dump_file. * tree-cfg.c (build_tree_cfg): Ditto. * Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency. * basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm): Declaration changed. * config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to life_analysis and schedule_insns. * config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to life_analysis. * config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to dbr_schedule. * config/mips/mips.c (mips_reorg): Ditto. * config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to schedule_ebbs. From-SVN: r110656
2006-02-06 19:20:47 +01:00
fprintf (dump_file, "SMS doloop\n");
fprintf (dump_file, "SMS built-ddg %d\n", g->num_nodes);
fprintf (dump_file, "SMS num-loads %d\n", g->num_loads);
fprintf (dump_file, "SMS num-stores %d\n", g->num_stores);
}
/* In case of th loop have doloop register it gets special
handling. */
single_set takes an insn gcc/ChangeLog: 2014-09-09 David Malcolm <dmalcolm@redhat.com> * rtl.h (single_set_2): Strengthen first param from const_rtx to const rtx_insn *, and move prototype to above... (single_set): ...this. Convert this from a macro to an inline function, enforcing the requirement that the param is a const rtx_insn *. (find_args_size_adjust): Strengthen param from rtx to rtx_insn *. * config/arm/aarch-common-protos.h (aarch_crypto_can_dual_issue): Strengthen both params from rtx to rtx_insn *. * config/arm/aarch-common.c (aarch_crypto_can_dual_issue): Likewise; introduce locals "producer_set", "consumer_set", using them in place of "producer" and "consumer" when dealing with SET rather than insn. * config/avr/avr.c (avr_out_plus): Add checked cast to rtx_insn * when invoking single_set in region guarded by INSN_P. (avr_out_bitop): Likewise. (_reg_unused_after): Introduce local rtx_sequence * "seq" in region guarded by GET_CODE check, using methods to strengthen local "this_insn" from rtx to rtx_insn *, and for clarity. * config/avr/avr.md (define_insn_and_split "xload8<mode>_A"): Strengthen local "insn" from rtx to rtx_insn *. (define_insn_and_split "xload<mode>_A"): Likewise. * config/bfin/bfin.c (trapping_loads_p): Likewise for param "insn". (find_load): Likewise for return type. (workaround_speculation): Likewise for both locals named "load_insn". * config/cris/cris.c (cris_cc0_user_requires_cmp): Likewise for local "cc0_user". * config/cris/cris.md (define_peephole2 ; moversideqi): Likewise for local "prev". * config/h8300/h8300-protos.h (notice_update_cc): Likewise for param 2. * config/h8300/h8300.c (notice_update_cc): Likewise. * config/i386/i386.c (ix86_flags_dependent): Likewise for params "insn" and "dep_insn". (exact_store_load_dependency): Likewise for both params. (ix86_macro_fusion_pair_p): Eliminate local named "single_set" since this now clashes with inline function. Instead, delay calling single_set until the point where its needed, and then assign the result to "compare_set" and rework the conditional that follows. * config/ia64/ia64.md (define_expand "tablejump"): Strengthen local "last" from rtx to rtx_insn *. * config/mips/mips-protos.h (mips_load_store_insns): Likewise for second param. (mips_store_data_bypass_p): Likewise for both params. * config/mips/mips.c (mips_load_store_insns): Likewise for second param. (mips_store_data_bypass_p): Likewise for both params. (mips_orphaned_high_part_p): Likewise for param "insn". * config/mn10300/mn10300.c (extract_bundle): Likewise. (mn10300_bundle_liw): Likewise for locals "r", "insn1", "insn2". Introduce local rtx "insn2_pat". * config/rl78/rl78.c (move_elim_pass): Likewise for locals "insn", "ninsn". (rl78_remove_unused_sets): Likewise for locals "insn", "ninsn". Introduce local rtx "set", using it in place of "insn" for the result of single_set. This appears to fix a bug, since the call to find_regno_note on a SET does nothing. * config/rs6000/rs6000.c (set_to_load_agen): Strengthen both params from rtx to rtx_insn *. (set_to_load_agen): Likewise. * config/s390/s390.c (s390_label_align): Likewise for local "prev_insn". Introduce new rtx locals "set" and "src", using them in place of "prev_insn" for the results of single_set and SET_SRC respectively. (s390_swap_cmp): Strengthen local "jump" from rtx to rtx_insn *. Introduce new rtx local "set" using in place of "jump" for the result of single_set. Use SET_SRC (set) rather than plain XEXP (set, 1). * config/sh/sh.c (noncall_uses_reg): Strengthen param 2from rtx to rtx_insn *. (noncall_uses_reg): Likewise. (reg_unused_after): Introduce local rtx_sequence * "seq" in region guarded by GET_CODE check, using its methods for clarity, and to enable strengthening local "this_insn" from rtx to rtx_insn *. * config/sh/sh.md (define_expand "mulhisi3"): Strengthen local "insn" from rtx to rtx_insn *. (define_expand "umulhisi3"): Likewise. (define_expand "smulsi3_highpart"): Likewise. (define_expand "umulsi3_highpart"): Likewise. * config/sparc/sparc.c (sparc_do_work_around_errata): Likewise for local "after". Replace GET_CODE check with a dyn_cast, introducing new local rtx_sequence * "seq", using insn method for typesafety. * dwarf2cfi.c (dwarf2out_frame_debug): Strengthen param "insn" from rtx to rtx_insn *. Introduce local rtx "pat", using it in place of "insn" once we're dealing with patterns rather than the input insn. (scan_insn_after): Strengthen param "insn" from rtx to rtx_insn *. (scan_trace): Likewise for local "elt", updating lookups within sequence to use insn method rather than element method. * expr.c (find_args_size_adjust): Strengthen param "insn" from rtx to rtx_insn *. * gcse.c (gcse_emit_move_after): Likewise for local "new_rtx". * ifcvt.c (noce_try_abs): Likewise for local "insn". * ira.c (fix_reg_equiv_init): Add checked cast to rtx_insn * when invoking single_set. * lra-constraints.c (insn_rhs_dead_pseudo_p): Strengthen param "insn" from rtx to rtx_insn *. (skip_usage_debug_insns): Likewise for return type, adding a checked cast. (check_secondary_memory_needed_p): Likewise for local "insn". (inherit_reload_reg): Likewise. * modulo-sched.c (sms_schedule): Likewise for local "count_init". * recog.c (peep2_attempt): Likewise for local "old_insn", adding checked casts. (store_data_bypass_p): Likewise for both params. (if_test_bypass_p): Likewise. * recog.h (store_data_bypass_p): Likewise for both params. (if_test_bypass_p): Likewise. * reload.c (find_equiv_reg): Likewise for local "where". * reorg.c (delete_jump): Likewise for param "insn". * rtlanal.c (single_set_2): Strenghen param "insn" from const_rtx to const rtx_insn *. * store-motion.c (replace_store_insn): Likewise for param "del". (delete_store): Strengthen local "i" from rtx to rtx_insn_list *, and use its methods for clarity, and to strengthen local "del" from rtx to rtx_insn *. (build_store_vectors): Use insn method of "st" when calling replace_store_insn for typesafety and clarity. From-SVN: r215089
2014-09-09 19:02:34 +02:00
count_init = NULL;
if ((count_reg = doloop_register_get (head, tail)))
{
basic_block pre_header;
pre_header = loop_preheader_edge (loop)->src;
count_init = const_iteration_count (count_reg, pre_header,
&loop_count);
}
gcc_assert (count_reg);
tree-vrp.c (execute_vrp): Do not pass dump argument to. * tree-vrp.c (execute_vrp): Do not pass dump argument to. loop_optimizer_init and loop_optimizer_finalize * tree-ssa-sink.c (execute_sink_code): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init, tree_ssa_loop_done): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Ditto. * sched-ebb.c: Include output.h. (schedule_ebbs): Do not use dump argument. * value-prof.h (struct profile_hooks): Remove profile_dump_file. * loop.c (loop_dump_stream): Removed. (loop_optimize, rest_of_handle_loop_optimize): Do not use dump argument. (scan_loop, move_movables, find_and_verify_loops, mark_loop_jump, emit_prefetch_instructions, loop_bivs_find, loop_bivs_check, final_biv_value, loop_biv_eliminable_p, loop_givs_rescan, loop_iterations, strength_reduce, record_biv, record_giv, final_giv_value, check_final_value, check_ext_dependent_givs, combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems, try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use dump_file instead of loop_dump_stream. * ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call argument dump_file. * reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use dump argument. * flow.c (life_analysis, rest_of_handle_life): Ditto. * haifa-sched.c: Include output.h (schedule_insns, sched_init): Do not use dump argument. * mode-switching.c (optimize_mode_switching): Ditto. * modulo-sched.c (stats_file): Removed. (print_node_sched_params): Do not call argument dump_file. (sms_schedule_by_order, loop_canon_p, sms_schedule, rest_of_handle_sms): Do not use dump argument. Use dump_file instead of stats_file. * cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not use dump argument. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize, rtl_loop_init, rtl_loop_done): Ditto. * global.c (global_alloc, rest_of_handle_global_alloc): Ditto. * predict.c (combine_predictions_for_bb, tree_estimate_probability): Ditto. * recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto. * lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto. * regmove.c (fixup_match_1, fixup_match_2, regmove_optimize, rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto. * emit-rtl.c (renumber_insns): Ditto. * cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr, expand_gimple_basic_block, tree_expand_cfg): Ditto. * regclass.c (regclass): Ditto. * tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts, remove_ssa_form, rewrite_out_of_ssa): Ditto. * reg-stack.c (compensate_edge, compensate_edges, convert_regs_1, convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs): Ditto. * sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto. * local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file to regclass. * gcse.c (gcse_file, debug_stderr): Removed. (gcse_main, bypass_jumps, rest_of_handle_jump_bypass, rest_of_handle_gcse): Do not use dump argument. (cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets, one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb, pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass, compute_code_hoist_vbeinout, compute_code_hoist_data, one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores, compute_store_table, build_store_vectors, insert_insn_start_bb, insert_store, remove_reachable_equiv_notes, replace_store_insn, store_motion): Use dump_file instead of gcse_file. * ipa-type-escape.c (type_escape_execute): Remove debugging comments. * profile.c (profile_dump_file): Removed. (branch_prob): Use dump_file instead of profile_dump_file. * ipa.c (cgraph_remove_unreachable_nodes): Do not call argument dump_file. * tree-ssa-copy.c (dump_copy_of): Ditto. * rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass dump file to life_analysis. * bt-load.c (branch_target_load_optimize): Ditto. * cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to renumber_insns. * rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs, regclass, dbr_schedule): Declaration changed. * sched-int.h (sched_init): Declaration changed. * tree-profile.c (tree_profile_dump_file): Removed. (tree_profile_hooks): Removed profile_dump_file hook. * rtl-profile (rtl_profile_dump_file): Removed. (rtl_profile_hooks): emoved profile_dump_file hook. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * c-gimplify.c (c_genericize): Do not call local variable dump_file. * tree-cfg.c (build_tree_cfg): Ditto. * Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency. * basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm): Declaration changed. * config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to life_analysis and schedule_insns. * config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to life_analysis. * config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to dbr_schedule. * config/mips/mips.c (mips_reorg): Ditto. * config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to schedule_ebbs. From-SVN: r110656
2006-02-06 19:20:47 +01:00
if (dump_file && count_init)
{
tree-vrp.c (execute_vrp): Do not pass dump argument to. * tree-vrp.c (execute_vrp): Do not pass dump argument to. loop_optimizer_init and loop_optimizer_finalize * tree-ssa-sink.c (execute_sink_code): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init, tree_ssa_loop_done): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Ditto. * sched-ebb.c: Include output.h. (schedule_ebbs): Do not use dump argument. * value-prof.h (struct profile_hooks): Remove profile_dump_file. * loop.c (loop_dump_stream): Removed. (loop_optimize, rest_of_handle_loop_optimize): Do not use dump argument. (scan_loop, move_movables, find_and_verify_loops, mark_loop_jump, emit_prefetch_instructions, loop_bivs_find, loop_bivs_check, final_biv_value, loop_biv_eliminable_p, loop_givs_rescan, loop_iterations, strength_reduce, record_biv, record_giv, final_giv_value, check_final_value, check_ext_dependent_givs, combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems, try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use dump_file instead of loop_dump_stream. * ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call argument dump_file. * reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use dump argument. * flow.c (life_analysis, rest_of_handle_life): Ditto. * haifa-sched.c: Include output.h (schedule_insns, sched_init): Do not use dump argument. * mode-switching.c (optimize_mode_switching): Ditto. * modulo-sched.c (stats_file): Removed. (print_node_sched_params): Do not call argument dump_file. (sms_schedule_by_order, loop_canon_p, sms_schedule, rest_of_handle_sms): Do not use dump argument. Use dump_file instead of stats_file. * cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not use dump argument. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize, rtl_loop_init, rtl_loop_done): Ditto. * global.c (global_alloc, rest_of_handle_global_alloc): Ditto. * predict.c (combine_predictions_for_bb, tree_estimate_probability): Ditto. * recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto. * lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto. * regmove.c (fixup_match_1, fixup_match_2, regmove_optimize, rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto. * emit-rtl.c (renumber_insns): Ditto. * cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr, expand_gimple_basic_block, tree_expand_cfg): Ditto. * regclass.c (regclass): Ditto. * tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts, remove_ssa_form, rewrite_out_of_ssa): Ditto. * reg-stack.c (compensate_edge, compensate_edges, convert_regs_1, convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs): Ditto. * sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto. * local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file to regclass. * gcse.c (gcse_file, debug_stderr): Removed. (gcse_main, bypass_jumps, rest_of_handle_jump_bypass, rest_of_handle_gcse): Do not use dump argument. (cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets, one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb, pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass, compute_code_hoist_vbeinout, compute_code_hoist_data, one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores, compute_store_table, build_store_vectors, insert_insn_start_bb, insert_store, remove_reachable_equiv_notes, replace_store_insn, store_motion): Use dump_file instead of gcse_file. * ipa-type-escape.c (type_escape_execute): Remove debugging comments. * profile.c (profile_dump_file): Removed. (branch_prob): Use dump_file instead of profile_dump_file. * ipa.c (cgraph_remove_unreachable_nodes): Do not call argument dump_file. * tree-ssa-copy.c (dump_copy_of): Ditto. * rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass dump file to life_analysis. * bt-load.c (branch_target_load_optimize): Ditto. * cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to renumber_insns. * rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs, regclass, dbr_schedule): Declaration changed. * sched-int.h (sched_init): Declaration changed. * tree-profile.c (tree_profile_dump_file): Removed. (tree_profile_hooks): Removed profile_dump_file hook. * rtl-profile (rtl_profile_dump_file): Removed. (rtl_profile_hooks): emoved profile_dump_file hook. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * c-gimplify.c (c_genericize): Do not call local variable dump_file. * tree-cfg.c (build_tree_cfg): Ditto. * Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency. * basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm): Declaration changed. * config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to life_analysis and schedule_insns. * config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to life_analysis. * config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to dbr_schedule. * config/mips/mips.c (mips_reorg): Ditto. * config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to schedule_ebbs. From-SVN: r110656
2006-02-06 19:20:47 +01:00
fprintf (dump_file, "SMS const-doloop ");
fprintf (dump_file, "%" PRId64,
loop_count);
tree-vrp.c (execute_vrp): Do not pass dump argument to. * tree-vrp.c (execute_vrp): Do not pass dump argument to. loop_optimizer_init and loop_optimizer_finalize * tree-ssa-sink.c (execute_sink_code): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init, tree_ssa_loop_done): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Ditto. * sched-ebb.c: Include output.h. (schedule_ebbs): Do not use dump argument. * value-prof.h (struct profile_hooks): Remove profile_dump_file. * loop.c (loop_dump_stream): Removed. (loop_optimize, rest_of_handle_loop_optimize): Do not use dump argument. (scan_loop, move_movables, find_and_verify_loops, mark_loop_jump, emit_prefetch_instructions, loop_bivs_find, loop_bivs_check, final_biv_value, loop_biv_eliminable_p, loop_givs_rescan, loop_iterations, strength_reduce, record_biv, record_giv, final_giv_value, check_final_value, check_ext_dependent_givs, combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems, try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use dump_file instead of loop_dump_stream. * ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call argument dump_file. * reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use dump argument. * flow.c (life_analysis, rest_of_handle_life): Ditto. * haifa-sched.c: Include output.h (schedule_insns, sched_init): Do not use dump argument. * mode-switching.c (optimize_mode_switching): Ditto. * modulo-sched.c (stats_file): Removed. (print_node_sched_params): Do not call argument dump_file. (sms_schedule_by_order, loop_canon_p, sms_schedule, rest_of_handle_sms): Do not use dump argument. Use dump_file instead of stats_file. * cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not use dump argument. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize, rtl_loop_init, rtl_loop_done): Ditto. * global.c (global_alloc, rest_of_handle_global_alloc): Ditto. * predict.c (combine_predictions_for_bb, tree_estimate_probability): Ditto. * recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto. * lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto. * regmove.c (fixup_match_1, fixup_match_2, regmove_optimize, rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto. * emit-rtl.c (renumber_insns): Ditto. * cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr, expand_gimple_basic_block, tree_expand_cfg): Ditto. * regclass.c (regclass): Ditto. * tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts, remove_ssa_form, rewrite_out_of_ssa): Ditto. * reg-stack.c (compensate_edge, compensate_edges, convert_regs_1, convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs): Ditto. * sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto. * local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file to regclass. * gcse.c (gcse_file, debug_stderr): Removed. (gcse_main, bypass_jumps, rest_of_handle_jump_bypass, rest_of_handle_gcse): Do not use dump argument. (cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets, one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb, pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass, compute_code_hoist_vbeinout, compute_code_hoist_data, one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores, compute_store_table, build_store_vectors, insert_insn_start_bb, insert_store, remove_reachable_equiv_notes, replace_store_insn, store_motion): Use dump_file instead of gcse_file. * ipa-type-escape.c (type_escape_execute): Remove debugging comments. * profile.c (profile_dump_file): Removed. (branch_prob): Use dump_file instead of profile_dump_file. * ipa.c (cgraph_remove_unreachable_nodes): Do not call argument dump_file. * tree-ssa-copy.c (dump_copy_of): Ditto. * rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass dump file to life_analysis. * bt-load.c (branch_target_load_optimize): Ditto. * cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to renumber_insns. * rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs, regclass, dbr_schedule): Declaration changed. * sched-int.h (sched_init): Declaration changed. * tree-profile.c (tree_profile_dump_file): Removed. (tree_profile_hooks): Removed profile_dump_file hook. * rtl-profile (rtl_profile_dump_file): Removed. (rtl_profile_hooks): emoved profile_dump_file hook. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * c-gimplify.c (c_genericize): Do not call local variable dump_file. * tree-cfg.c (build_tree_cfg): Ditto. * Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency. * basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm): Declaration changed. * config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to life_analysis and schedule_insns. * config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to life_analysis. * config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to dbr_schedule. * config/mips/mips.c (mips_reorg): Ditto. * config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to schedule_ebbs. From-SVN: r110656
2006-02-06 19:20:47 +01:00
fprintf (dump_file, "\n");
}
tree-vrp.c: Use XNEW/XCNEW allocation wrappers. 2006-01-31 Marcin Dalecki <martin@dalecki.de> * tree-vrp.c: Use XNEW/XCNEW allocation wrappers. * regrename.c: Ditto. * tree-ssa-loop-im.c: Ditto. * tree-dump.c: Ditto. * tree-complex.c: Ditto. * genrecog.c: Ditto. * tree-ssa-threadupdate.c: Ditto. * tracer.c: Ditto. * java/class.c: Ditto. * java/jcf-parse.c: Ditto. * java/resource.c: Ditto. * java/except.c: Ditto. * java/jvspec.c: Ditto. * java/jcf-write.c: Ditto. * java/jcf-path.c: Ditto. * java/gjavah.c: Ditto. * java/zextract.c: Ditto. * java/jcf-io.c: Ditto. * java/jcf.h: Ditto. * java/buffer.c: Ditto. * java/lang.c: Ditto. * java/parse-scan.y: Ditto. * java/lex.c: Ditto. * java/lex.h: Ditto. * cfgloopmanip.c: Ditto. * postreload-gcse.c: Ditto. * tree-ssa-loop-manip.c: Ditto. * postreload.c: Ditto. * tree-ssa-loop-ch.c: Ditto. * loop.c: Ditto. * ipa-cp.c: Ditto. * cppspec.c: Ditto. * diagnostic.c: Ditto. * final.c: Ditto. * genoutput.c: Ditto. * gcc.c: Ditto. * cfghooks.c: Ditto. * cfgloopanal.c: Ditto. * objc/objc-act.c: Ditto. * gcov.c: Ditto. * genextract.c: Ditto. * genautomata.c: Ditto. * pretty-print.c: Ditto. * genemit.c: Ditto. * cgraphunit.c: Ditto. * flow.c: Ditto. * df-scan.c: Ditto. * haifa-sched.c: Ditto. * dominance.c: Ditto. * dbxout.c: Ditto. * tree-ssa-loop-ivopts.c: Ditto. * df-core.c: Ditto. * mode-switching.c: Ditto. * modulo-sched.c: Ditto. * graph.c: Ditto. * ipa-pure-const.c: Ditto. * cse.c: Ditto. * fix-header.c: Ditto. * web.c: Ditto. * tree-stdarg.c: Ditto. * ipa-utils.c: Ditto. * loop-init.c: Ditto. * ipa-inline.c: Ditto. * cfganal.c: Ditto. * global.c: Ditto. * alloc-pool.c: Ditto. * dwarf2out.c: Ditto. * opts.c: Ditto. * genattrtab.c: Ditto. * tree-ssa-loop-ivcanon.c: Ditto. * predict.c: Ditto. * timevar.c: Ditto. * lcm.c: Ditto. * fortran/gfortranspec.c: Ditto. * regmove.c: Ditto. * local-alloc.c: Ditto. * langhooks.c: Ditto. * function.c: Ditto. * tree-vectorizer.c: Ditto. * gcse.c: Ditto. * ipa-type-escape.c: Ditto. * alias.c: Ditto. * tree-if-conv.c: Ditto. * profile.c: Ditto. * ipa.c: Ditto. * tree-data-ref.c: Ditto. * loop-unroll.c: Ditto. * treelang/treetree.c: Ditto. * calls.c: Ditto. * bt-load.c: Ditto. * ggc-common.c: Ditto. * except.c: Ditto. * coverage.c: Ditto. * cselib.c: Ditto. * tree-cfgcleanup.c: Ditto. * tree-ssa-pre.c: Ditto. * cfgcleanup.c: Ditto. * loop-invariant.c: Ditto. * loop-iv.c: Ditto. * ipa-prop.c: Ditto. * print-tree.c: Ditto. * conflict.c: Ditto. * ggc-page.c: Ditto. * sched-deps.c: Ditto. * regclass.c: Ditto. * tree-object-size.c: Ditto. * combine.c: Ditto. * bb-reorder.c: Ditto. * resource.c: Ditto. * var-tracking.c: Ditto. * cfgloop.c: Ditto. * df-problems.c: Ditto. * reg-stack.c: Ditto. * tlink.c: Ditto. * gccspec.c: Ditto. * sched-rgn.c: Ditto. * tree-ssa-structalias.c: Ditto. * tree-ssa-reassoc.c: Ditto. * config/darwin-c.c: Ditto. * config/darwin.c: Ditto. * config/arm/arm.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * reload1.c: Ditto. From-SVN: r110446
2006-01-31 20:56:55 +01:00
node_order = XNEWVEC (int, g->num_nodes);
mii = 1; /* Need to pass some estimate of mii. */
rec_mii = sms_order_nodes (g, mii, node_order, &max_asap);
mii = MAX (res_MII (g), rec_mii);
maxii = MAX (max_asap, MAXII_FACTOR * mii);
tree-vrp.c (execute_vrp): Do not pass dump argument to. * tree-vrp.c (execute_vrp): Do not pass dump argument to. loop_optimizer_init and loop_optimizer_finalize * tree-ssa-sink.c (execute_sink_code): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init, tree_ssa_loop_done): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Ditto. * sched-ebb.c: Include output.h. (schedule_ebbs): Do not use dump argument. * value-prof.h (struct profile_hooks): Remove profile_dump_file. * loop.c (loop_dump_stream): Removed. (loop_optimize, rest_of_handle_loop_optimize): Do not use dump argument. (scan_loop, move_movables, find_and_verify_loops, mark_loop_jump, emit_prefetch_instructions, loop_bivs_find, loop_bivs_check, final_biv_value, loop_biv_eliminable_p, loop_givs_rescan, loop_iterations, strength_reduce, record_biv, record_giv, final_giv_value, check_final_value, check_ext_dependent_givs, combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems, try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use dump_file instead of loop_dump_stream. * ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call argument dump_file. * reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use dump argument. * flow.c (life_analysis, rest_of_handle_life): Ditto. * haifa-sched.c: Include output.h (schedule_insns, sched_init): Do not use dump argument. * mode-switching.c (optimize_mode_switching): Ditto. * modulo-sched.c (stats_file): Removed. (print_node_sched_params): Do not call argument dump_file. (sms_schedule_by_order, loop_canon_p, sms_schedule, rest_of_handle_sms): Do not use dump argument. Use dump_file instead of stats_file. * cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not use dump argument. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize, rtl_loop_init, rtl_loop_done): Ditto. * global.c (global_alloc, rest_of_handle_global_alloc): Ditto. * predict.c (combine_predictions_for_bb, tree_estimate_probability): Ditto. * recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto. * lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto. * regmove.c (fixup_match_1, fixup_match_2, regmove_optimize, rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto. * emit-rtl.c (renumber_insns): Ditto. * cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr, expand_gimple_basic_block, tree_expand_cfg): Ditto. * regclass.c (regclass): Ditto. * tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts, remove_ssa_form, rewrite_out_of_ssa): Ditto. * reg-stack.c (compensate_edge, compensate_edges, convert_regs_1, convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs): Ditto. * sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto. * local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file to regclass. * gcse.c (gcse_file, debug_stderr): Removed. (gcse_main, bypass_jumps, rest_of_handle_jump_bypass, rest_of_handle_gcse): Do not use dump argument. (cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets, one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb, pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass, compute_code_hoist_vbeinout, compute_code_hoist_data, one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores, compute_store_table, build_store_vectors, insert_insn_start_bb, insert_store, remove_reachable_equiv_notes, replace_store_insn, store_motion): Use dump_file instead of gcse_file. * ipa-type-escape.c (type_escape_execute): Remove debugging comments. * profile.c (profile_dump_file): Removed. (branch_prob): Use dump_file instead of profile_dump_file. * ipa.c (cgraph_remove_unreachable_nodes): Do not call argument dump_file. * tree-ssa-copy.c (dump_copy_of): Ditto. * rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass dump file to life_analysis. * bt-load.c (branch_target_load_optimize): Ditto. * cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to renumber_insns. * rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs, regclass, dbr_schedule): Declaration changed. * sched-int.h (sched_init): Declaration changed. * tree-profile.c (tree_profile_dump_file): Removed. (tree_profile_hooks): Removed profile_dump_file hook. * rtl-profile (rtl_profile_dump_file): Removed. (rtl_profile_hooks): emoved profile_dump_file hook. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * c-gimplify.c (c_genericize): Do not call local variable dump_file. * tree-cfg.c (build_tree_cfg): Ditto. * Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency. * basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm): Declaration changed. * config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to life_analysis and schedule_insns. * config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to life_analysis. * config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to dbr_schedule. * config/mips/mips.c (mips_reorg): Ditto. * config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to schedule_ebbs. From-SVN: r110656
2006-02-06 19:20:47 +01:00
if (dump_file)
fprintf (dump_file, "SMS iis %d %d %d (rec_mii, mii, maxii)\n",
rec_mii, mii, maxii);
for (;;)
2011-08-03 09:59:23 +02:00
{
set_node_sched_params (g);
stage_count = 0;
opt_sc_p = false;
ps = sms_schedule_by_order (g, mii, maxii, node_order);
if (ps)
2011-08-03 09:59:23 +02:00
{
/* Try to achieve optimized SC by normalizing the partial
schedule (having the cycles start from cycle zero).
The branch location must be placed in row ii-1 in the
final scheduling. If failed, shift all instructions to
position the branch in row ii-1. */
opt_sc_p = optimize_sc (ps, g);
if (opt_sc_p)
stage_count = calculate_stage_count (ps, 0);
else
{
/* Bring the branch to cycle ii-1. */
int amount = (SCHED_TIME (g->closing_branch->cuid)
- (ps->ii - 1));
if (dump_file)
fprintf (dump_file, "SMS schedule branch at cycle ii-1\n");
stage_count = calculate_stage_count (ps, amount);
}
gcc_assert (stage_count >= 1);
2011-08-03 09:59:23 +02:00
}
/* The default value of PARAM_SMS_MIN_SC is 2 as stage count of
1 means that there is no interleaving between iterations thus
we let the scheduling passes do the job in this case. */
if (stage_count < PARAM_VALUE (PARAM_SMS_MIN_SC)
|| (count_init && (loop_count <= stage_count))
|| (flag_branch_probabilities && (trip_count <= stage_count)))
{
if (dump_file)
{
fprintf (dump_file, "SMS failed... \n");
fprintf (dump_file, "SMS sched-failed (stage-count=%d,"
" loop-count=", stage_count);
fprintf (dump_file, "%" PRId64, loop_count);
fprintf (dump_file, ", trip-count=");
fprintf (dump_file, "%" PRId64, trip_count);
fprintf (dump_file, ")\n");
}
break;
}
2011-08-03 09:59:23 +02:00
if (!opt_sc_p)
{
/* Rotate the partial schedule to have the branch in row ii-1. */
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
int amount = SCHED_TIME (g->closing_branch->cuid) - (ps->ii - 1);
2011-08-03 09:59:23 +02:00
reset_sched_times (ps, amount);
rotate_partial_schedule (ps, amount);
}
set_columns_for_ps (ps);
min_cycle = PS_MIN_CYCLE (ps) - SMODULO (PS_MIN_CYCLE (ps), ps->ii);
if (!schedule_reg_moves (ps))
{
mii = ps->ii + 1;
free_partial_schedule (ps);
continue;
}
/* Moves that handle incoming values might have been added
to a new first stage. Bump the stage count if so.
??? Perhaps we could consider rotating the schedule here
instead? */
if (PS_MIN_CYCLE (ps) < min_cycle)
{
reset_sched_times (ps, 0);
stage_count++;
}
/* The stage count should now be correct without rotation. */
gcc_checking_assert (stage_count == calculate_stage_count (ps, 0));
PS_STAGE_COUNT (ps) = stage_count;
canon_loop (loop);
if (dump_file)
{
Integrate lexical block into source_location. gcc: 2012-09-19 Dehao Chen <dehao@google.com> * toplev.c (general_init): Init block_locations. * tree.c (tree_set_block): New. (tree_block): Change to use LOCATION_BLOCK. * tree.h (TREE_SET_BLOCK): New. * final.c (reemit_insn_block_notes): Change to use LOCATION_BLOCK. (final_start_function): Likewise. * input.c (expand_location_1): Likewise. * input.h (LOCATION_LOCUS): New. (LOCATION_BLOCK): New. (IS_UNKNOWN_LOCATION): New. * fold-const.c (expr_location_or): Change to use new location. * reorg.c (emit_delay_sequence): Likewise. (try_merge_delay_insns): Likewise. * modulo-sched.c (dump_insn_location): Likewise. * lto-streamer-out.c (lto_output_location_bitpack): Likewise. * lto-cgraph.c (output_node_opt_summary): Likewise. * jump.c (rtx_renumbered_equal_p): Likewise. * ifcvt.c (noce_try_move): Likewise. (noce_try_store_flag): Likewise. (noce_try_store_flag_constants): Likewise. (noce_try_addcc): Likewise. (noce_try_store_flag_mask): Likewise. (noce_try_cmove): Likewise. (noce_try_cmove_arith): Likewise. (noce_try_minmax): Likewise. (noce_try_abs): Likewise. (noce_try_sign_mask): Likewise. (noce_try_bitop): Likewise. (noce_process_if_block): Likewise. (cond_move_process_if_block): Likewise. (find_cond_trap): Likewise. * ipa-prop.c (ipa_set_jf_constant): Likewise. (ipa_write_jump_function): Likewise. * dwarf2out.c (add_src_coords_attributes): Likewise. * expr.c (expand_expr_real): Likewise. * tree-parloops.c (create_loop_fn): Likewise. * recog.c (peep2_attempt): Likewise. * function.c (free_after_compilation): Likewise. (expand_function_end): Likewise. (set_insn_locations): Likewise. (thread_prologue_and_epilogue_insns): Likewise. * print-rtl.c (print_rtx): Likewise. * profile.c (branch_prob): Likewise. * trans-mem.c (ipa_tm_scan_irr_block): Likewise. * gimplify.c (gimplify_call_expr): Likewise. * except.c (duplicate_eh_regions_1): Likewise. * emit-rtl.c (try_split): Likewise. (make_insn_raw): Likewise. (make_debug_insn_raw): Likewise. (make_jump_insn_raw): Likewise. (make_call_insn_raw): Likewise. (emit_pattern_after_setloc): Likewise. (emit_pattern_after): Likewise. (emit_debug_insn_after): Likewise. (emit_pattern_before): Likewise. (emit_insn_before_setloc): Likewise. (emit_jump_insn_before): Likewise. (emit_call_insn_before_setloc): Likewise. (emit_call_insn_before): Likeise. (emit_debug_insn_before_setloc): Likewise. (emit_copy_of_insn_after): Likewise. (insn_locators_alloc): Remove. (insn_locators_finalize): Remove. (insn_locators_free): Remove. (set_curr_insn_source_location): Remove. (get_curr_insn_source_location): Remove. (set_curr_insn_block): Remove. (get_curr_insn_block): Remove. (locator_scope): Remove. (insn_scope): Change to use new location. (locator_location): Remove. (insn_line): Change to use new location. (locator_file): Remove. (insn_file): Change to use new location. (locator_eq): Remove. (insn_locations_init): New. (insn_locations_finalize): New. (set_curr_insn_location): New. (curr_insn_location): New. * cfgexpand.c (gimple_assign_rhs_to_tree): Change to use new location. (expand_gimple_cond): Likewise. (expand_call_stmt): Likewise. (expand_gimple_stmt_1): Likewise. (expand_gimple_basic_block): Likewise. (construct_exit_block): Likewise. (gimple_expand_cfg): Likewise. * cfgcleanup.c (try_forward_edges): Likewise. * tree-ssa-live.c (remove_unused_scope_block_p): Likewise. (dump_scope_block): Likewise. (remove_unused_locals): Likewise. * rtl.c (rtx_equal_p_cb): Likewise. (rtx_equal_p): Likewise. * rtl.h (XUINT): New. (INSN_LOCATOR): Remove. (CURR_INSN_LOCATION): Remove. (INSN_LOCATION): New. (INSN_HAS_LOCATION): New. * tree-inline.c (remap_gimple_op_r): Change to use new location. (copy_tree_body_r): Likewise. (copy_phis_for_bb): Likewise. (expand_call_inline): Likewise. * tree-streamer-in.c (lto_input_ts_exp_tree_pointers): Likewise. * tree-streamer-out.c (write_ts_decl_minimal_tree_pointers): Likewise. * gimple-streamer-out.c (output_gimple_stmt): Likewise. * combine.c (try_combine): Likewise. * tree-outof-ssa.c (set_location_for_edge): Likewise. (insert_partition_copy_on_edge): Likewise. (insert_value_copy_on_edge): Likewise. (insert_rtx_to_part_on_edge): Likewise. (insert_part_to_rtx_on_edge): Likewise. * basic-block.h (edge_def): Remove field. * gimple.h (gimple_statement_base): Remove field. (gimple_bb): Change to use new location. (gimple_set_block): Likewise. (gimple_has_location): Likewise. * tree-cfg.c (make_cond_expr_edges): Likewise. (make_goto_expr_edges): Likewise. (gimple_can_merge_blocks_p): Likewise. (move_stmt_op): Likewise. (move_block_to_fn): Likewise. * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/i386/i386.c (x86_output_mi_thunk): Likewise. * config/tilegx/tilegx.c (tilegx_output_mi_thunk): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/ia64/ia64.c (ia64_output_mi_thunk): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/score/score.c (score_output_mi_thunk): Likewise. * config/tilepro/tilepro.c (tilepro_asm_output_mi_thunk): Likewise. * config/mips/mips.c (mips_output_mi_thunk): Likewise. * cfgrtl.c (unique_locus_on_edge_between_p): Likewise. (unique_locus_on_edge_between_p): Likewise. (emit_nop_for_unique_locus_between): Likewise. (force_nonfallthru_and_redirect): Likewise. (fixup_reorder_chain): Likewise. (cfg_layout_merge_blocks): Likewise. * stmt.c (emit_case_nodes): Likewise. gcc/lto: 2012-09-19 Dehao Chen <dehao@google.com> * lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field. libcpp: 2012-09-19 Dehao Chen <dehao@google.com> * include/line-map.h (MAX_SOURCE_LOCATION): New value. (location_adhoc_data_fini): New. (get_combined_adhoc_loc): New. (get_data_from_adhoc_loc): New. (get_location_from_adhoc_loc): New. (location_adhoc_data_map): New. (COMBINE_LOCATION_DATA): New. (IS_ADHOC_LOC): New. (expanded_location): New field. (line_maps): New field. * line-map.c (location_adhoc_data): New. (location_adhoc_data_hash): New. (location_adhoc_data_eq): New. (location_adhoc_data_update): New. (get_combined_adhoc_loc): New. (get_data_from_adhoc_loc): New. (get_location_from_adhoc_loc): New. (location_adhoc_data_init): New. (location_adhoc_data_fini): New. (linemap_init): Initialize location_adhoc_data. (linemap_lookup): Change to use new location. (linemap_ordinary_map_lookup): Likewise. (linemap_macro_map_lookup): Likewise. (linemap_macro_map_loc_to_def_point): Likewise. (linemap_macro_map_loc_unwind_toward_spel): Likewise. (linemap_get_expansion_line): Likewise. (linemap_get_expansion_filename): Likewise. (linemap_location_in_system_header_p): Likewise. (linemap_location_from_macro_expansion_p): Likewise. (linemap_macro_loc_to_spelling_point): Likewise. (linemap_macro_loc_to_def_point): Likewise. (linemap_macro_loc_to_exp_point): Likewise. (linemap_resolve_location): Likewise. (linemap_unwind_toward_expansion): Likewise. (linemap_unwind_to_first_non_reserved_loc): Likewise. (linemap_expand_location): Likewise. (linemap_dump_location): Likewise. (linemap_line_start): Likewise. From-SVN: r191494
2012-09-19 21:56:42 +02:00
dump_insn_location (tail);
fprintf (dump_file, " SMS succeeded %d %d (with ii, sc)\n",
ps->ii, stage_count);
tree-vrp.c (execute_vrp): Do not pass dump argument to. * tree-vrp.c (execute_vrp): Do not pass dump argument to. loop_optimizer_init and loop_optimizer_finalize * tree-ssa-sink.c (execute_sink_code): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init, tree_ssa_loop_done): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Ditto. * sched-ebb.c: Include output.h. (schedule_ebbs): Do not use dump argument. * value-prof.h (struct profile_hooks): Remove profile_dump_file. * loop.c (loop_dump_stream): Removed. (loop_optimize, rest_of_handle_loop_optimize): Do not use dump argument. (scan_loop, move_movables, find_and_verify_loops, mark_loop_jump, emit_prefetch_instructions, loop_bivs_find, loop_bivs_check, final_biv_value, loop_biv_eliminable_p, loop_givs_rescan, loop_iterations, strength_reduce, record_biv, record_giv, final_giv_value, check_final_value, check_ext_dependent_givs, combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems, try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use dump_file instead of loop_dump_stream. * ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call argument dump_file. * reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use dump argument. * flow.c (life_analysis, rest_of_handle_life): Ditto. * haifa-sched.c: Include output.h (schedule_insns, sched_init): Do not use dump argument. * mode-switching.c (optimize_mode_switching): Ditto. * modulo-sched.c (stats_file): Removed. (print_node_sched_params): Do not call argument dump_file. (sms_schedule_by_order, loop_canon_p, sms_schedule, rest_of_handle_sms): Do not use dump argument. Use dump_file instead of stats_file. * cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not use dump argument. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize, rtl_loop_init, rtl_loop_done): Ditto. * global.c (global_alloc, rest_of_handle_global_alloc): Ditto. * predict.c (combine_predictions_for_bb, tree_estimate_probability): Ditto. * recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto. * lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto. * regmove.c (fixup_match_1, fixup_match_2, regmove_optimize, rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto. * emit-rtl.c (renumber_insns): Ditto. * cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr, expand_gimple_basic_block, tree_expand_cfg): Ditto. * regclass.c (regclass): Ditto. * tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts, remove_ssa_form, rewrite_out_of_ssa): Ditto. * reg-stack.c (compensate_edge, compensate_edges, convert_regs_1, convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs): Ditto. * sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto. * local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file to regclass. * gcse.c (gcse_file, debug_stderr): Removed. (gcse_main, bypass_jumps, rest_of_handle_jump_bypass, rest_of_handle_gcse): Do not use dump argument. (cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets, one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb, pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass, compute_code_hoist_vbeinout, compute_code_hoist_data, one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores, compute_store_table, build_store_vectors, insert_insn_start_bb, insert_store, remove_reachable_equiv_notes, replace_store_insn, store_motion): Use dump_file instead of gcse_file. * ipa-type-escape.c (type_escape_execute): Remove debugging comments. * profile.c (profile_dump_file): Removed. (branch_prob): Use dump_file instead of profile_dump_file. * ipa.c (cgraph_remove_unreachable_nodes): Do not call argument dump_file. * tree-ssa-copy.c (dump_copy_of): Ditto. * rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass dump file to life_analysis. * bt-load.c (branch_target_load_optimize): Ditto. * cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to renumber_insns. * rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs, regclass, dbr_schedule): Declaration changed. * sched-int.h (sched_init): Declaration changed. * tree-profile.c (tree_profile_dump_file): Removed. (tree_profile_hooks): Removed profile_dump_file hook. * rtl-profile (rtl_profile_dump_file): Removed. (rtl_profile_hooks): emoved profile_dump_file hook. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * c-gimplify.c (c_genericize): Do not call local variable dump_file. * tree-cfg.c (build_tree_cfg): Ditto. * Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency. * basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm): Declaration changed. * config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to life_analysis and schedule_insns. * config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to life_analysis. * config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to dbr_schedule. * config/mips/mips.c (mips_reorg): Ditto. * config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to schedule_ebbs. From-SVN: r110656
2006-02-06 19:20:47 +01:00
print_partial_schedule (ps, dump_file);
}
/* case the BCT count is not known , Do loop-versioning */
if (count_reg && ! count_init)
{
rtx comp_rtx = gen_rtx_GT (VOIDmode, count_reg,
gen_int_mode (stage_count,
GET_MODE (count_reg)));
unsigned prob = (PROB_SMS_ENOUGH_ITERATIONS
* REG_BR_PROB_BASE) / 100;
loop_version (loop, comp_rtx, &condition_bb,
prob, REG_BR_PROB_BASE - prob,
prob, REG_BR_PROB_BASE - prob,
true);
}
/* Set new iteration count of loop kernel. */
if (count_reg && count_init)
SET_SRC (single_set (count_init)) = GEN_INT (loop_count
- stage_count + 1);
/* Now apply the scheduled kernel to the RTL of the loop. */
permute_partial_schedule (ps, g->closing_branch->first_note);
/* Mark this loop as software pipelined so the later
scheduling passes don't touch it. */
if (! flag_resched_modulo_sched)
mark_loop_unsched (loop);
/* The life-info is not valid any more. */
df_set_bb_dirty (g->bb);
apply_reg_moves (ps);
if (dump_file)
print_node_sched_params (dump_file, g->num_nodes, ps);
/* Generate prolog and epilog. */
generate_prolog_epilog (ps, loop, count_reg, count_init);
break;
}
free_partial_schedule (ps);
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
node_sched_param_vec.release ();
free (node_order);
free_ddg (g);
}
free (g_arr);
/* Release scheduler data, needed until now because of DFA. */
sel-sched.h, [...]: New files. 2008-08-31 Andrey Belevantsev <abel@ispras.ru> Dmitry Melnik <dm@ispras.ru> Dmitry Zhurikhin <zhur@ispras.ru> Alexander Monakov <amonakov@ispras.ru> Maxim Kuvyrkov <maxim@codesourcery.com> * sel-sched.h, sel-sched-dump.h, sel-sched-ir.h, sel-sched.c, sel-sched-dump.c, sel-sched-ir.c: New files. * Makefile.in (OBJS-common): Add selective scheduling object files. (sel-sched.o, sel-sched-dump.o, sel-sched-ir.o): New entries. (SEL_SCHED_IR_H, SEL_SCHED_DUMP_H): New entries. (sched-vis.o): Add dependency on $(INSN_ATTR_H). * cfghooks.h (get_cfg_hooks, set_cfg_hooks): New prototypes. * cfghooks.c (get_cfg_hooks, set_cfg_hooks): New functions. (make_forwarder_block): Update loop latch if we have redirected the loop latch edge. * cfgloop.c (get_loop_body_in_custom_order): New function. * cfgloop.h (LOOPS_HAVE_FALLTHRU_PREHEADERS): New enum field. (CP_FALLTHRU_PREHEADERS): Likewise. (get_loop_body_in_custom_order): Declare. * cfgloopmanip.c (has_preds_from_loop): New. (create_preheader): Honor CP_FALLTHRU_PREHEADERS. Assert that the preheader edge will be fall thru when it is set. * common.opt (fsel-sched-bookkeeping, fsel-sched-pipelining, fsel-sched-pipelining-outer-loops, fsel-sched-renaming, fsel-sched-substitution, fselective-scheduling): New flags. * cse.c (hash_rtx_cb): New. (hash_rtx): Use it. * dbgcnt.def (sel_sched_cnt, sel_sched_region_cnt, sel_sched_insn_cnt): New counters. * final.c (compute_alignments): Export. Free dominance info after loop_optimizer_finalize. * genattr.c (main): Output maximal_insn_latency prototype. * genautomata.c (output_default_latencies): New. Factor its code from ... (output_internal_insn_latency_func): ... here. (output_internal_maximal_insn_latency_func): New. (output_maximal_insn_latency_func): New. * hard-reg-set.h (UHOST_BITS_PER_WIDE_INT): Define unconditionally. (struct hard_reg_set_iterator): New. (hard_reg_set_iter_init, hard_reg_set_iter_set, hard_reg_set_iter_next): New functions. (EXECUTE_IF_SET_IN_HARD_REG_SET): New macro. * lists.c (remove_free_INSN_LIST_node, remove_free_EXPR_LIST_node): New functions. * loop-init.c (loop_optimizer_init): When LOOPS_HAVE_FALLTHRU_PREHEADERS, set CP_FALLTHRU_PREHEADERS when calling create_preheaders. (loop_optimizer_finalize): Do not verify flow info after reload. * recog.c (validate_replace_rtx_1): New parameter simplify. Default it to true. Update all uses. Factor out simplifying code to ... (simplify_while_replacing): ... this new function. (validate_replace_rtx_part, validate_replace_rtx_part_nosimplify): New. * recog.h (validate_replace_rtx_part, validate_replace_rtx_part_nosimplify): Declare. * rtl.c (rtx_equal_p_cb): New. (rtx_equal_p): Use it. * rtl.h (rtx_equal_p_cb, hash_rtx_cb): Declare. (remove_free_INSN_LIST_NODE, remove_free_EXPR_LIST_node, debug_bb_n_slim, debug_bb_slim, print_rtl_slim): Likewise. * vecprim.h: Add a vector type for unsigned int. * haifa-sched.c: Include vecprim.h and cfgloop.h. (issue_rate, sched_verbose_param, note_list, dfa_state_size, ready_try, cycle_issued_insns, spec_info): Make global. (readyp): Initialize. (dfa_lookahead): New global variable. (old_max_uid, old_last_basic_block): Remove. (h_i_d): Make it a vector. (INSN_TICK, INTER_TICK, QUEUE_INDEX, INSN_COST): Make them work through HID macro. (after_recovery, adding_bb_to_current_region_p): New variables to handle correct insertion of the recovery code. (struct ready_list): Move declaration to sched-int.h. (rgn_n_insns): Removed. (rtx_vec_t): Move to sched-int.h. (find_insn_reg_weight): Remove. (find_insn_reg_weight1): Rename to find_insn_reg_weight. (haifa_init_h_i_d, haifa_finish_h_i_d): New functions to initialize / finalize haifa instruction data. (extend_h_i_d, init_h_i_d): Rewrite. (unlink_other_notes): Move logic to add_to_note_list. Handle selective scheduler. (ready_lastpos, ready_element, ready_sort, reemit_notes, find_fallthru_edge): Make global, remove static prototypes. (max_issue): Make global. Add privileged_n and state parameters. Use them. (extend_global, extend_all): Removed. (init_before_recovery): Add new param. Fix the handling of the case when we insert a recovery code before the EXIT which has a predecessor with a fallthrough edge to it. (create_recovery_block): Make global. Rename to sched_create_recovery_block. Update. (change_pattern): Rename to sched_change_pattern. Make global. (speculate_insn): Rename to sched_speculate_insn. Make global. Split haifa-specific functionality into ... (haifa_change_pattern): New static function. (sched_extend_bb): New static function. (sched_init_bbs): New function. (current_sched_info): Change type to struct haifa_sched_info. (insn_cost): Adjust for selective scheduling. (dep_cost_1): New function. Move logic from ... (dep_cost): ... here. (dep_cost): Use dep_cost_1. (contributes_to_priority_p): Use sched_deps_info instead of current_sched_info. (priority): Adjust to work with selective scheduling. Process the corner case when all dependencies don't contribute to priority. (rank_for_schedule): Use ds_weak instead of dep_weak. (advance_state): New function. Move logic from ... (advance_one_cycle): ... here. (add_to_note_list, concat_note_lists): New functions. (rm_other_notes): Make static. Adjust for selective scheduling. (remove_notes, restore_other_notes): New functions. (move_insn): Add two arguments. Update assert. Don't call reemit_notes. (choose_ready): Remove lookahead variable, use dfa_lookahead. Remove more_issue, max_points. Move the code to initialize max_lookahead_tries to max_issue. (schedule_block): Remove rgn_n_insns1 parameter. Don't allocate ready. Adjust use of move_insn. Call restore_other_notes. (luid): Remove. (sched_init, sched_finish): Move Haifa-specific initialization/ finalization to ... (haifa_sched_init, haifa_sched_finish): ... respectively. New functions. (setup_sched_dump): New function. (haifa_init_only_bb): New static function. (haifa_speculate_insn): New static function. (try_ready): Use haifa_* instead of speculate_insn and change_pattern. (extend_ready, extend_all): Remove. (sched_extend_ready_list, sched_finish_ready_list): New functions. (create_check_block_twin, add_to_speculative_block): Use haifa_insns_init instead of extend_global. Update to use new initialization functions. Change parameter. Factor out code from create_check_block_twin to ... (sched_create_recovery_edges) ... this new function. (add_block): Remove. (sched_scan_info): New. (extend_bb): Use sched_scan_info. (init_bb, extend_insn, init_insn, init_insns_in_bb, sched_scan): New static functions for walking through scheduling region. (sched_luids): New vector variable to replace uid_to_luid. (luids_extend_insn): New function. (sched_max_luid): New variable. (luids_init_insn): New function. (sched_init_luids, sched_finish_luids): New functions. (insn_luid): New debug function. (sched_extend_target): New function. (haifa_init_insn): New static function. (sched_init_only_bb): New hook. (sched_split_block): New hook. (sched_split_block_1): New function. (sched_create_empty_bb): New hook. (sched_create_empty_bb_1): New function. (common_sched_info, ready): New global variables. (current_sched_info_var): Remove. (move_block_after_check): Use common_sched_info. (haifa_luid_for_non_insn): New static function. (init_before_recovery): Use haifa_init_only_bb instead of add_block. (increase_insn_priority): New. * modulo-sched.c: (issue_rate): Remove static declaration. (sms_sched_info): Change type to haifa_sched_info. (sms_sched_deps_info, sms_common_sched_info): New variables. (setup_sched_infos): New. (sms_schedule): Initialize them. Call haifa_sched_init/finish. Do not call regstat_free_calls_crossed. (sms_print_insn): Use const_rtx. * params.def (PARAM_MAX_PIPELINE_REGION_BLOCKS, PARAM_MAX_PIPELINE_REGION_INSNS, PARAM_SELSCHED_MAX_LOOKAHEAD, PARAM_SELSCHED_MAX_SCHED_TIMES, PARAM_SELSCHED_INSNS_TO_RENAME, PARAM_SCHED_MEM_TRUE_DEP_COST): New. * sched-deps.c (sched_deps_info): New. Update all relevant uses of current_sched_info to use it. (enum reg_pending_barrier_mode): Move to sched-int.h. (h_d_i_d): New variable. Initialize to NULL. ({true, output, anti, spec, forward}_dependency_cache): Initialize to NULL. (estimate_dep_weak): Remove static declaration. (sched_has_condition_p): New function. Adjust users of sched_get_condition to use it instead. (conditions_mutex_p): Add arguments indicating which conditions are reversed. Use them. (sched_get_condition_with_rev): Rename from sched_get_condition. Add argument to indicate whether returned condition is reversed. Do not generate new rtx when condition should be reversed; indicate it by setting new argument instead. (add_dependence_list_and_free): Add deps parameter. Update all users. Do not free dependence list when deps context is readonly. (add_insn_mem_dependence, flush_pending_lists): Adjust for readonly contexts. (remove_from_dependence_list, remove_from_both_dependence_lists): New. (remove_from_deps): New. Use the above functions. (cur_insn, can_start_lhs_rhs_p): New static variables. (add_or_update_back_dep_1): Initialize present_dep_type. (haifa_start_insn, haifa_finish_insn, haifa_note_reg_set, haifa_note_reg_clobber, haifa_note_reg_use, haifa_note_mem_dep, haifa_note_dep): New functions implementing dependence hooks for the Haifa scheduler. (note_reg_use, note_reg_set, note_reg_clobber, note_mem_dep, note_dep): New functions. (ds_to_dt, extend_deps_reg_info, maybe_extend_reg_info_p): New functions. (init_deps): Initialize last_reg_pending_barrier and deps->readonly. (free_deps): Initialize deps->reg_last. (sched_analyze_reg, sched_analyze_1, sched_analyze_2, sched_analyze_insn): Update to use dependency hooks infrastructure and readonly contexts. (deps_analyze_insn): New function. Move part of logic from ... (sched_analyze): ... here. Also move some logic to ... (deps_start_bb): ... here. New function. (add_forw_dep, delete_forw_dep): Guard use of INSN_DEP_COUNT with sel_sched_p. (sched_deps_init): New function. Move code from ... (init_dependency_caches): ... here. Remove. (init_deps_data_vector): New. (sched_deps_finish): New function. Move code from ... (free_dependency_caches): ... here. Remove. (init_deps_global, finish_deps_global): Adjust for use with selective scheduling. (get_dep_weak): Move logic to ... (get_dep_weak_1): New function. (ds_merge): Move logic to ... (ds_merge_1): New static function. (ds_full_merge, ds_max_merge, ds_get_speculation_types): New functions. (ds_get_max_dep_weak): New function. * sched-ebb.c (sched_n_insns): Rename to sched_rgn_n_insns. (n_insns): Rename to rgn_n_insns. (debug_ebb_dependencies): New function. (init_ready_list): Use it. (begin_schedule_ready): Use sched_init_only_bb. (ebb_print_insn): Indicate when an insn starts a new cycle. (contributes_to_priority, compute_jump_reg_dependencies, add_remove_insn, fix_recovery_cfg): Add ebb_ prefix to function names. (add_block1): Remove to ebb_add_block. (ebb_sched_deps_info, ebb_common_sched_info): New variables. (schedule_ebb): Initialize them. Use remove_notes instead of rm_other_notes. Use haifa_local_init/finish. (schedule_ebbs): Use haifa_sched_init/finish. * sched-int.h: Include vecprim.h, remove rtl.h. (struct ready_list): Delete declaration. (sched_verbose_param, enum sched_pass_id_t, bb_vec_t, insn_vec_t, rtx_vec_t): New. (struct sched_scan_info_def): New structure. (sched_scan_info, sched_scan, sched_init_bbs, sched_init_luids, sched_finish_luids, sched_extend_target, haifa_init_h_i_d, haifa_finish_h_i_d): Declare. (struct common_sched_info_def): New. (common_sched_info, haifa_common_sched_info, sched_emulate_haifa_p): Declare. (sel_sched_p): New. (sched_luids): Declare. (INSN_LUID, LUID_BY_UID, SET_INSN_LUID): Declare. (sched_max_luid, insn_luid): Declare. (note_list, remove_notes, restore_other_notes, bb_note): Declare. (sched_insns_init, sched_insns_finish, xrecalloc, reemit_notes, print_insn, print_pattern, print_value, haifa_classify_insn, sel_find_rgns, sel_mark_hard_insn, dfa_state_size, advance_state, setup_sched_dump, sched_init, sched_finish, sel_insn_is_speculation_check): Export. (struct ready_list): Move from haifa-sched.c. (ready_try, ready, max_issue): Export. (ebb_compute_jump_reg_dependencies, find_fallthru_edge, sched_init_only_bb, sched_split_block, sched_split_block_1, sched_create_empty_bb, sched_create_empty_bb_1, sched_create_recovery_block, sched_create_recovery_edges): Export. (enum reg_pending_barrier_mode): Export. (struct deps): New fields `last_reg_pending_barrier' and `readonly'. (deps_t): New. (struct sched_info): Rename to haifa_sched_info. Use const_rtx for print_insn field. Move add_block and fix_recovery_cfg to common_sched_info_def. Move compute_jump_reg_dependencies, use_cselib ... (struct sched_deps_info_def): ... this new structure. (sched_deps_info): Declare. (struct spec_info_def): Remove weakness_cutoff, add data_weakness_cutoff and control_weakness_cutoff. (spec_info): Declare. (struct _haifa_deps_insn_data): Split from haifa_insn_data. Add dep_count field. (struct haifa_insn_data): Rename to struct _haifa_insn_data. (haifa_insn_data_def, haifa_insn_data_t): New typedefs. (current_sched_info): Change type to struct haifa_sched_info. (haifa_deps_insn_data_def, haifa_deps_insn_data_t): New typedefs. (h_d_i_d): New variable. (HDID): New accessor macro. (h_i_d): Change type to VEC (haifa_insn_data_def, heap) *. (HID): New accessor macro. Rewrite h_i_d accessor macros through HID and HDID. (IS_SPECULATION_CHECK_P): Update for selective scheduler. (enum SCHED_FLAGS): Update for selective scheduler. (enum SPEC_SCHED_FLAGS): New flag SEL_SCHED_SPEC_DONT_CHECK_CONTROL. (init_dependency_caches, free_dependency_caches): Delete declarations. (deps_analyze_insn, remove_from_deps, get_dep_weak_1, estimate_dep_weak, ds_full_merge, ds_max_merge, ds_weak, ds_get_speculation_types, ds_get_max_dep_weak, sched_deps_init, sched_deps_finish, haifa_note_reg_set, haifa_note_reg_use, haifa_note_reg_clobber, maybe_extend_reg_info_p, deps_start_bb, ds_to_dt): Export. (rm_other_notes): Delete declaration. (schedule_block): Remove one argument. (cycle_issued_insns, issue_rate, dfa_lookahead, ready_sort, ready_element, ready_lastpos, sched_extend_ready_list, sched_finish_ready_list, sched_change_pattern, sched_speculate_insn, concat_note_lists): Export. (struct region): Move from sched-rgn.h. (nr_regions, rgn_table, rgn_bb_table, block_to_bb, containing_rgn, RGN_NR_BLOCKS, RGN_BLOCKS, RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB, BLOCK_TO_BB, CONTAINING_RGN): Export. (ebb_head, BB_TO_BLOCK, EBB_FIRST_BB, EBB_LAST_BB, INSN_BB): Likewise. (current_nr_blocks, current_blocks, target_bb): Likewise. (dep_cost_1, sched_is_disabled_for_current_region_p, sched_rgn_init, sched_rgn_finish, rgn_setup_region, sched_rgn_compute_dependencies, sched_rgn_local_init, extend_regions, rgn_make_new_region_out_of_new_block, compute_priorities, debug_rgn_dependencies, free_rgn_deps, contributes_to_priority, extend_rgns, deps_join rgn_setup_common_sched_info, rgn_setup_sched_infos, debug_regions, debug_region, dump_region_dot, dump_region_dot_file, haifa_sched_init, haifa_sched_finish): Export. (get_rgn_sched_max_insns_priority, sel_add_to_insn_priority, increase_insn_priority): Likewise. * sched-rgn.c: Include sel-sched.h. (ref_counts): New static variable. Use it ... (INSN_REF_COUNT): ... here. Rewrite and move closer to uses. (FED_BY_SPEC_LOAD, IS_LOAD_INSN): Rewrite to use HID accessor macro. (sched_is_disabled_for_current_region_p): Delete static declaration. (struct region): Move to sched-int.h. (nr_regions, rgn_table, rgn_bb_table, block_to_bb, containing_rgn, ebb_head): Define and initialize. (RGN_NR_BLOCKS, RGN_BLOCKS, RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB, BLOCK_TO_BB, CONTAINING_RGN, debug_regions, extend_regions, BB_TO_BLOCK, EBB_FIRST_BB, EBB_LAST_BB): Move to sched-int.h. (find_single_block_region): Add new argument to indicate that EBB regions should be constructed. (debug_live): Delete declaration. (current_nr_blocks, current_blocks, target_bb): Remove static qualifiers. (compute_dom_prob_ps, check_live, update_live, set_spec_fed): Delete declaration. (init_regions): Delete declaration. (debug_region, bb_in_region_p, dump_region_dot_file, dump_region_dot, rgn_estimate_number_of_insns): New. (too_large): Use estimate_number_of_insns. (haifa_find_rgns): New. Move the code from ... (find_rgns): ... here. Call either sel_find_rgns or haifa_find_rgns. (free_trg_info): New. (compute_trg_info): Allocate candidate tables here instead of ... (init_ready_list): ... here. (rgn_print_insn): Use const_rtx. (contributes_to_priority, extend_regions): Delete static declaration. (add_remove_insn, fix_recovery_cfg): Add rgn_ to function names. (add_block1): Rename to rgn_add_block. (debug_rgn_dependencies): Delete static qualifier. (new_ready): Use sched_deps_info. Simplify. (rgn_common_sched_info, rgn_const_sched_deps_info, rgn_const_sel_sched_deps_info, rgn_sched_deps_info, rgn_sched_info): New. (region_sched_info): Rename to rgn_const_sched_info. (deps_join): New, extracted from ... (propagate_deps): ... here. (compute_block_dependences, debug_dependencies): Update for selective scheduling. (free_rgn_deps, compute_priorities): New functions. (sched_rgn_init, sched_rgn_finish, rgn_setup_region, sched_rgn_compute_dependencies): New functions. (schedule_region): Use them. (sched_rgn_local_init, sched_rgn_local_free, sched_rgn_local_finish, rgn_setup_common_sched_info, rgn_setup_sched_infos): New functions. (schedule_insns): Call new functions that were split out. (rgn_make_new_region_out_of_new_block): New. (get_rgn_sched_max_insns_priority): New. (rest_of_handle_sched, rest_of_handle_sched2): Call selective scheduling when appropriate. * sched-vis.c: Include insn-attr.h. (print_value, print_pattern): Make global. (print_rtl_slim, debug_bb_slim, debug_bb_n_slim): New functions. * target-def.h (TARGET_SCHED_ADJUST_COST_2, TARGET_SCHED_ALLOC_SCHED_CONTEXT, TARGET_SCHED_INIT_SCHED_CONTEXT, TARGET_SCHED_SET_SCHED_CONTEXT, TARGET_SCHED_CLEAR_SCHED_CONTEXT, TARGET_SCHED_FREE_SCHED_CONTEXT, TARGET_SCHED_GET_INSN_CHECKED_DS, TARGET_SCHED_GET_INSN_SPEC_DS, TARGET_SCHED_SKIP_RTX_P): New target hooks. Initialize them to 0. (TARGET_SCHED_GEN_CHECK): Rename to TARGET_SCHED_GEN_SPEC_CHECK. * target.h (struct gcc_target): Add them. Rename gen_check field to gen_spec_check. * flags.h (sel_sched_switch_set): Declare. * opts.c (sel_sched_switch_set): New variable. (decode_options): Unset flag_sel_sched_pipelining_outer_loops if pipelining is disabled from command line. (common_handle_option): Record whether selective scheduling is requested from command line. * doc/invoke.texi: Document new flags and parameters. * doc/tm.texi: Document new target hooks. * config/ia64/ia64.c (TARGET_SCHED_GEN_SPEC_CHECK): Define to ia64_gen_check. (dfa_state_size): Do not declare locally. * config/ia64/ia64.opt (msched-ar-data-spec): Default to 0. * config/rs6000/rs6000.c (rs6000_init_sched_context, rs6000_alloc_sched_context, rs6000_set_sched_context, rs6000_free_sched_context): New functions. (struct _rs6000_sched_context): New. (rs6000_sched_reorder2): Do not modify INSN_PRIORITY for selective scheduling. (rs6000_sched_finish): Do not run for selective scheduling. Co-Authored-By: Alexander Monakov <amonakov@ispras.ru> Co-Authored-By: Dmitry Melnik <dm@ispras.ru> Co-Authored-By: Dmitry Zhurikhin <zhur@ispras.ru> Co-Authored-By: Maxim Kuvyrkov <maxim@codesourcery.com> From-SVN: r139854
2008-09-01 10:57:00 +02:00
haifa_sched_finish ();
tree-vrp.c (execute_vrp): Do not update current_loops. * tree-vrp.c (execute_vrp): Do not update current_loops. * loop-unswitch.c (unswitch_loop): Do not use loop_split_edge_with. * doc/loop.texi: Remove documentation for cancelled functions. * tree-ssa-loop-im.c (loop_commit_inserts): Removed. (move_computations, determine_lsm): Use bsi_commit_edge_inserts instead. * cfgloopmanip.c (remove_bbs): Do not update loops explicitly. (remove_path): Ensure that in delete_basic_blocks, the loops are still allocated. (add_loop): Work on valid loop structures. (loopify): Modify call of add_loop. (mfb_update_loops): Removed. (create_preheader): Do not update loops explicitly. (force_single_succ_latches, loop_version): Do not use loop_split_edge_with. (loop_split_edge_with): Removed. * tree-ssa-loop-manip.c (create_iv, determine_exit_conditions): Do not use bsi_insert_on_edge_immediate_loop. (split_loop_exit_edge, tree_unroll_loop): Do not use loop_split_edge_with. (bsi_insert_on_edge_immediate_loop): Removed. * tree-ssa-loop-ch.c (copy_loop_headers): Use current_loops. Do not use loop_split_edge_with. * cfghooks.c: Include cfgloop.h. (verify_flow_info): Verify that loop_father is filled iff current_loops are available. (redirect_edge_and_branch_force, split_block, delete_basic_block, split_edge, merge_blocks, make_forwarder_block, duplicate_block): Update cfg. * cfgloopanal.c (mark_irreducible_loops): Work if the function contains no loops. * modulo-sched.c (generate_prolog_epilog, canon_loop): Do not use loop_split_edge_with. (sms_schedule): Use current_loops. * tree-ssa-dom.c (tree_ssa_dominator_optimize): Use current_loops. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize): Set current_loops. (rtl_loop_init, rtl_loop_done): Do not set current_loops. * tree-ssa-sink.c (execute_sink_code): Use current_loops. * ifcvt.c (if_convert): Ditto. * predict.c (predict_loops): Do not clear current_loops. (tree_estimate_probability): Use current_loops. (propagate_freq): Receive head of the region to propagate instead of loop. (estimate_loops_at_level): Do not use shared to_visit bitmap. (estimate_loops): New function. Handle case current_loops == NULL. (estimate_bb_frequencies): Do not allocate tovisit. Use estimate_loops. * tree-ssa-loop.c (current_loops): Removed. (tree_loop_optimizer_init): Do not return loops. (tree_ssa_loop_init, tree_ssa_loop_done): Do not set current_loops. * tree-vectorizer.c (slpeel_update_phi_nodes_for_guard1, slpeel_update_phi_nodes_for_guard2, slpeel_tree_peel_loop_to_edge): Do not update loops explicitly. * function.h (struct function): Add x_current_loops field. (current_loops): New macro. * tree-if-conv.c (combine_blocks): Do not update loops explicitly. * loop-unroll.c (split_edge_and_insert): New function. (unroll_loop_runtime_iterations, analyze_insns_in_loop): Do not use loop_split_edge_with. * loop-doloop.c (add_test, doloop_modify): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Do not set current_loops. * cfglayout.c (copy_bbs): Do not update loops explicitly. * lambda-code.c (perfect_nestify): Do not use loop_split_edge_with. * tree-vect-transform.c (vect_transform_loop): Do not update loops explicitly. * cfgloop.c (flow_loops_cfg_dump): Do not dump dfs_order and rc_order. (flow_loops_free): Do not free dfs_order and rc_order. (flow_loops_find): Do not set dfs_order and rc_order in loops structure. Do not call loops and flow info verification. (add_bb_to_loop, remove_bb_from_loops): Check whether the block already belongs to some loop. * cfgloop.h (struct loops): Remove struct cfg. (current_loops, loop_split_edge_with): Declaration removed. (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * tree-flow.h (loop_commit_inserts, bsi_insert_on_edge_immediate_loop): Declaration removed. * Makefile.in (cfghooks.o): Add CFGLOOP_H dependency. * basic-block.h (split_edge_and_insert): Declare. * tree-cfg.c (remove_bb): Do not update loops explicitly. From-SVN: r118931
2006-11-17 12:29:17 +01:00
loop_optimizer_finalize ();
}
/* The SMS scheduling algorithm itself
-----------------------------------
Input: 'O' an ordered list of insns of a loop.
Output: A scheduling of the loop - kernel, prolog, and epilogue.
'Q' is the empty Set
'PS' is the partial schedule; it holds the currently scheduled nodes with
their cycle/slot.
'PSP' previously scheduled predecessors.
'PSS' previously scheduled successors.
't(u)' the cycle where u is scheduled.
'l(u)' is the latency of u.
'd(v,u)' is the dependence distance from v to u.
'ASAP(u)' the earliest time at which u could be scheduled as computed in
the node ordering phase.
'check_hardware_resources_conflicts(u, PS, c)'
run a trace around cycle/slot through DFA model
to check resource conflicts involving instruction u
at cycle c given the partial schedule PS.
'add_to_partial_schedule_at_time(u, PS, c)'
Add the node/instruction u to the partial schedule
PS at time c.
'calculate_register_pressure(PS)'
Given a schedule of instructions, calculate the register
pressure it implies. One implementation could be the
maximum number of overlapping live ranges.
'maxRP' The maximum allowed register pressure, it is usually derived from the number
registers available in the hardware.
1. II = MII.
2. PS = empty list
3. for each node u in O in pre-computed order
4. if (PSP(u) != Q && PSS(u) == Q) then
5. Early_start(u) = max ( t(v) + l(v) - d(v,u)*II ) over all every v in PSP(u).
6. start = Early_start; end = Early_start + II - 1; step = 1
11. else if (PSP(u) == Q && PSS(u) != Q) then
12. Late_start(u) = min ( t(v) - l(v) + d(v,u)*II ) over all every v in PSS(u).
13. start = Late_start; end = Late_start - II + 1; step = -1
14. else if (PSP(u) != Q && PSS(u) != Q) then
15. Early_start(u) = max ( t(v) + l(v) - d(v,u)*II ) over all every v in PSP(u).
16. Late_start(u) = min ( t(v) - l(v) + d(v,u)*II ) over all every v in PSS(u).
17. start = Early_start;
18. end = min(Early_start + II - 1 , Late_start);
19. step = 1
20. else "if (PSP(u) == Q && PSS(u) == Q)"
21. start = ASAP(u); end = start + II - 1; step = 1
22. endif
23. success = false
24. for (c = start ; c != end ; c += step)
25. if check_hardware_resources_conflicts(u, PS, c) then
26. add_to_partial_schedule_at_time(u, PS, c)
27. success = true
28. break
29. endif
30. endfor
31. if (success == false) then
32. II = II + 1
33. if (II > maxII) then
34. finish - failed to schedule
35. endif
36. goto 2.
37. endif
38. endfor
39. if (calculate_register_pressure(PS) > maxRP) then
40. goto 32.
41. endif
42. compute epilogue & prologue
43. finish - succeeded to schedule
??? The algorithm restricts the scheduling window to II cycles.
In rare cases, it may be better to allow windows of II+1 cycles.
The window would then start and end on the same row, but with
different "must precede" and "must follow" requirements. */
/* A limit on the number of cycles that resource conflicts can span. ??? Should
be provided by DFA, and be dependent on the type of insn scheduled. Currently
set to 0 to save compile time. */
#define DFA_HISTORY SMS_DFA_HISTORY
/* A threshold for the number of repeated unsuccessful attempts to insert
an empty row, before we flush the partial schedule and start over. */
#define MAX_SPLIT_NUM 10
/* Given the partial schedule PS, this function calculates and returns the
cycles in which we can schedule the node with the given index I.
NOTE: Here we do the backtracking in SMS, in some special cases. We have
noticed that there are several cases in which we fail to SMS the loop
because the sched window of a node is empty due to tight data-deps. In
such cases we want to unschedule some of the predecessors/successors
until we get non-empty scheduling window. It returns -1 if the
scheduling window is empty and zero otherwise. */
static int
2011-08-03 09:59:23 +02:00
get_sched_window (partial_schedule_ptr ps, ddg_node_ptr u_node,
sbitmap sched_nodes, int ii, int *start_p, int *step_p,
int *end_p)
{
int start, step, end;
int early_start, late_start;
ddg_edge_ptr e;
use auto_sbitmap in various places gcc/ChangeLog: 2016-07-26 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * bt-load.c (compute_out): Use auto_sbitmap class. (link_btr_uses): Likewise. * cfganal.c (mark_dfs_back_edges): Likewise. (post_order_compute): Likewise. (inverted_post_order_compute): Likewise. (pre_and_rev_post_order_compute_fn): Likewise. (single_pred_before_succ_order): Likewise. * cfgexpand.c (pass_expand::execute): Likewise. * cfgloop.c (verify_loop_structure): Likewise. * cfgloopmanip.c (fix_bb_placements): Likewise. (remove_path): Likewise. (update_dominators_in_loop): Likewise. * cfgrtl.c (break_superblocks): Likewise. * ddg.c (check_sccs): Likewise. (create_ddg_all_sccs): Likewise. * df-core.c (df_worklist_dataflow): Likewise. * dse.c (dse_step3): Likewise. * except.c (eh_region_outermost): Likewise. * function.c (thread_prologue_and_epilogue_insns): Likewise. * gcse.c (prune_expressions): Likewise. (prune_insertions_deletions): Likewise. * gimple-ssa-backprop.c (backprop::~backprop): Likewise. * graph.c (draw_cfg_nodes_no_loops): Likewise. * ira-lives.c (remove_some_program_points_and_update_live_ranges): Likewise. * lcm.c (compute_earliest): Likewise. (compute_farthest): Likewise. * loop-unroll.c (unroll_loop_constant_iterations): Likewise. (unroll_loop_runtime_iterations): Likewise. (unroll_loop_stupid): Likewise. * lower-subreg.c (decompose_multiword_subregs): Likewise. * lra-lives.c: Likewise. * lra.c (lra): Likewise. * modulo-sched.c (schedule_reg_moves): Likewise. (optimize_sc): Likewise. (get_sched_window): Likewise. (sms_schedule_by_order): Likewise. (check_nodes_order): Likewise. (order_nodes_of_sccs): Likewise. (order_nodes_in_scc): Likewise. * recog.c (split_all_insns): Likewise. * regcprop.c (pass_cprop_hardreg::execute): Likewise. * reload1.c (reload): Likewise. * sched-rgn.c (haifa_find_rgns): Likewise. (split_edges): Likewise. (compute_trg_info): Likewise. * sel-sched.c (init_seqno): Likewise. * store-motion.c (remove_reachable_equiv_notes): Likewise. * tree-into-ssa.c (update_ssa): Likewise. * tree-ssa-live.c (live_worklist): Likewise. * tree-ssa-loop-im.c (fill_always_executed_in): Likewise. * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): * Likewise. (try_peel_loop): Likewise. * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): * Likewise. * tree-ssa-pre.c (compute_antic): Likewise. * tree-ssa-reassoc.c (undistribute_ops_list): Likewise. * tree-stdarg.c (reachable_at_most_once): Likewise. * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Likewise. * var-tracking.c (vt_find_locations): Likewise. From-SVN: r238748
2016-07-26 12:44:08 +02:00
auto_sbitmap psp (ps->g->num_nodes);
auto_sbitmap pss (ps->g->num_nodes);
sbitmap u_node_preds = NODE_PREDECESSORS (u_node);
sbitmap u_node_succs = NODE_SUCCESSORS (u_node);
int psp_not_empty;
int pss_not_empty;
int count_preds;
int count_succs;
/* 1. compute sched window for u (start, end, step). */
This patch implements the unification of the *bitmap interfaces as discussed. Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
2012-10-30 01:02:55 +01:00
bitmap_clear (psp);
bitmap_clear (pss);
psp_not_empty = bitmap_and (psp, u_node_preds, sched_nodes);
pss_not_empty = bitmap_and (pss, u_node_succs, sched_nodes);
/* We first compute a forward range (start <= end), then decide whether
to reverse it. */
early_start = INT_MIN;
late_start = INT_MAX;
start = INT_MIN;
end = INT_MAX;
step = 1;
count_preds = 0;
count_succs = 0;
2007-10-10 11:48:18 +02:00
if (dump_file && (psp_not_empty || pss_not_empty))
{
fprintf (dump_file, "\nAnalyzing dependencies for node %d (INSN %d)"
"; ii = %d\n\n", u_node->cuid, INSN_UID (u_node->insn), ii);
fprintf (dump_file, "%11s %11s %11s %11s %5s\n",
"start", "early start", "late start", "end", "time");
fprintf (dump_file, "=========== =========== =========== ==========="
" =====\n");
}
/* Calculate early_start and limit end. Both bounds are inclusive. */
if (psp_not_empty)
for (e = u_node->in; e != 0; e = e->next_in)
{
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
int v = e->src->cuid;
This patch normalizes more bitmap function names. sbitmap.h TEST_BIT -> bitmap_bit_p SET_BIT -> bitmap_set_bit SET_BIT_WITH_POPCOUNT -> bitmap_set_bit_with_popcount RESET_BIT -> bitmap_clear_bit RESET_BIT_WITH_POPCOUNT -> bitmap_clear_bit_with_popcount basic-block.h sbitmap_intersection_of_succs -> bitmap_intersection_of_succs sbitmap_intersection_of_preds -> bitmap_intersection_of_preds sbitmap_union_of_succs -> bitmap_union_of_succs sbitmap_union_of_preds -> bitmap_union_of_preds The sbitmap.h functions also needed their numeric paramter changed from unsigned int to int to match the bitmap functions. Callers updated to match. Tested on x86-64, config-list.mk testing. Index: gcc/ChangeLog 2012-11-01 Lawrence Crowl <crowl@google.com> * sbitmap.h (TEST_BIT): Rename bitmap_bit_p, normalizing parameter type. Update callers to match. (SET_BIT): Rename bitmap_set_bit, normalizing parameter type. Update callers to match. (SET_BIT_WITH_POPCOUNT): Rename bitmap_set_bit_with_popcount, normalizing parameter type. Update callers to match. (RESET_BIT): Rename bitmap_clear_bit, normalizing parameter type. Update callers to match. (RESET_BIT_WITH_POPCOUNT): Rename bitmap_clear_bit_with_popcount, normalizing parameter type. Update callers to match. * basic-block.h (sbitmap_intersection_of_succs): Rename bitmap_intersection_of_succs. Update callers to match. * basic-block.h (sbitmap_intersection_of_preds): Rename bitmap_intersection_of_preds. Update callers to match. * basic-block.h (sbitmap_union_of_succs): Rename bitmap_union_of_succs. Update callers to match. * basic-block.h (sbitmap_union_of_preds): Rename bitmap_union_of_preds. Update callers to match. From-SVN: r193066
2012-11-01 20:23:35 +01:00
if (bitmap_bit_p (sched_nodes, v))
{
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
int p_st = SCHED_TIME (v);
int earliest = p_st + e->latency - (e->distance * ii);
int latest = (e->data_type == MEM_DEP ? p_st + ii - 1 : INT_MAX);
if (dump_file)
{
fprintf (dump_file, "%11s %11d %11s %11d %5d",
"", earliest, "", latest, p_st);
print_ddg_edge (dump_file, e);
fprintf (dump_file, "\n");
}
early_start = MAX (early_start, earliest);
end = MIN (end, latest);
if (e->type == TRUE_DEP && e->data_type == REG_DEP)
count_preds++;
}
}
/* Calculate late_start and limit start. Both bounds are inclusive. */
if (pss_not_empty)
for (e = u_node->out; e != 0; e = e->next_out)
{
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
int v = e->dest->cuid;
2007-10-10 11:48:18 +02:00
This patch normalizes more bitmap function names. sbitmap.h TEST_BIT -> bitmap_bit_p SET_BIT -> bitmap_set_bit SET_BIT_WITH_POPCOUNT -> bitmap_set_bit_with_popcount RESET_BIT -> bitmap_clear_bit RESET_BIT_WITH_POPCOUNT -> bitmap_clear_bit_with_popcount basic-block.h sbitmap_intersection_of_succs -> bitmap_intersection_of_succs sbitmap_intersection_of_preds -> bitmap_intersection_of_preds sbitmap_union_of_succs -> bitmap_union_of_succs sbitmap_union_of_preds -> bitmap_union_of_preds The sbitmap.h functions also needed their numeric paramter changed from unsigned int to int to match the bitmap functions. Callers updated to match. Tested on x86-64, config-list.mk testing. Index: gcc/ChangeLog 2012-11-01 Lawrence Crowl <crowl@google.com> * sbitmap.h (TEST_BIT): Rename bitmap_bit_p, normalizing parameter type. Update callers to match. (SET_BIT): Rename bitmap_set_bit, normalizing parameter type. Update callers to match. (SET_BIT_WITH_POPCOUNT): Rename bitmap_set_bit_with_popcount, normalizing parameter type. Update callers to match. (RESET_BIT): Rename bitmap_clear_bit, normalizing parameter type. Update callers to match. (RESET_BIT_WITH_POPCOUNT): Rename bitmap_clear_bit_with_popcount, normalizing parameter type. Update callers to match. * basic-block.h (sbitmap_intersection_of_succs): Rename bitmap_intersection_of_succs. Update callers to match. * basic-block.h (sbitmap_intersection_of_preds): Rename bitmap_intersection_of_preds. Update callers to match. * basic-block.h (sbitmap_union_of_succs): Rename bitmap_union_of_succs. Update callers to match. * basic-block.h (sbitmap_union_of_preds): Rename bitmap_union_of_preds. Update callers to match. From-SVN: r193066
2012-11-01 20:23:35 +01:00
if (bitmap_bit_p (sched_nodes, v))
{
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
int s_st = SCHED_TIME (v);
int earliest = (e->data_type == MEM_DEP ? s_st - ii + 1 : INT_MIN);
int latest = s_st - e->latency + (e->distance * ii);
if (dump_file)
{
fprintf (dump_file, "%11d %11s %11d %11s %5d",
earliest, "", latest, "", s_st);
print_ddg_edge (dump_file, e);
fprintf (dump_file, "\n");
}
start = MAX (start, earliest);
late_start = MIN (late_start, latest);
2007-10-10 11:48:18 +02:00
if (e->type == TRUE_DEP && e->data_type == REG_DEP)
count_succs++;
}
}
2007-10-10 11:48:18 +02:00
if (dump_file && (psp_not_empty || pss_not_empty))
{
fprintf (dump_file, "----------- ----------- ----------- -----------"
" -----\n");
fprintf (dump_file, "%11d %11d %11d %11d %5s %s\n",
start, early_start, late_start, end, "",
"(max, max, min, min)");
}
/* Get a target scheduling window no bigger than ii. */
if (early_start == INT_MIN && late_start == INT_MAX)
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
early_start = NODE_ASAP (u_node);
else if (early_start == INT_MIN)
early_start = late_start - (ii - 1);
late_start = MIN (late_start, early_start + (ii - 1));
2007-10-10 11:48:18 +02:00
/* Apply memory dependence limits. */
start = MAX (start, early_start);
end = MIN (end, late_start);
if (dump_file && (psp_not_empty || pss_not_empty))
fprintf (dump_file, "%11s %11d %11d %11s %5s final window\n",
"", start, end, "", "");
/* If there are at least as many successors as predecessors, schedule the
node close to its successors. */
if (pss_not_empty && count_succs >= count_preds)
{
Use std::swap instead of manual swaps. gcc/ * auto-inc-dec.c (reverse_mem, reverse_inc): Remove. (parse_add_or_inc): Use std::swap instead of reverse_{mem,inc}. (find_inc): Likewise. * combine.c (combine_simplify_rtx): Use std::swap instead of manually swapping. * df-core.c (df_worklist_dataflow_doublequeue): Likewise. * df-scan.c (df_swap_refs): Remove. (df_sort_and_compress_refs): Use std::swap instead of df_swap_refs. * dominance.c (link_roots): Use std::swap instead of manually swapping. * expr.c (expand_expr_real_2, do_store_flag): Likewise. * fold-const.c (fold_relational_const): Likewise. * genattrtab.c (simplify_test_exp): Likewise. * gimple-match-head.c (gimple_resimplify2, gimple_resimplify3, gimple_simplify): Likewise. * ifcvt.c (noce_try_abs, find_if_header): Likewise. * internal-fn.c (expand_addsub_overflow, expand_mul_overflow): Likewise. * ipa-devirt.c (add_type_duplicate): Likewise. * loop-iv.c (get_biv_step_1, iv_number_of_iterations): Likewise. * lra-lives.c (lra_setup_reload_pseudo_preferenced_hard_reg): Likewise. * lra.c (lra_create_copy): Likewise. * lto-streamer-out.c (DFS::DFS): Likewise. * modulo-sched.c (get_sched_window): Likewise. * omega.c (omega_pretty_print_problem): Likewise. * optabs.c (prepare_float_lib_cmp, expand_mult_highpart): Likewise. * reload1.c (reloads_unique_chain_p): Likewise. * sel-sched-ir.c (exchange_lv_sets, exchange_av_sets): Remove. (exchange_data_sets): Move logic from exchange_{av,lv}_sets here and use std::swap. * simplify-rtx.c (simplify_unary_operation_1): Use std::swap instead of manually swapping. * tree-if-conv.c (is_cond_scalar_reduction, predicate_scalar_phi, predicate_mem_writes): Likewise. * tree-loop-distribution.c (pg_add_dependence_edges): Likewise. * tree-predcom.c (combine_chains): Likewise. * tree-ssa-alias.c (nonoverlapping_component_refs_p, refs_may_alias_p_1): Likewise. * tree-ssa-ifcombine.c (recognize_if_then_else): Likewise. * tree-ssa-loop-ivopts.c (extract_cond_operands): Likewise. * tree-ssa-loop-niter.c (refine_bounds_using_guard, number_of_iterations_cond): Likewise. * tree-ssa-phiopt.c (tree_ssa_phiopt_worker): Likewise. * tree-ssa-sccvn.c (vn_nary_op_compute_hash): Likewise. * tree-vect-slp.c (vect_build_slp_tree): Likewise. * tree-vect-stmts.c (supportable_widening_operation): Likewise. * tree-vrp.c (extract_range_from_binary_expr_1, extract_range_from_unary_expr_1): Likewise. gcc/cp/ * pt.c (maybe_adjust_types_for_deduction): Use std::swap instead of manually swapping. * semantics.c (finish_omp_atomic): Likewise. * typeck.c (cp_build_array_ref): Likewise. gcc/c-family/ * c-common.c (scalar_to_vector): Use std::swap instead of manually swapping. From-SVN: r224718
2015-06-22 04:54:11 +02:00
std::swap (start, end);
step = -1;
}
/* Now that we've finalized the window, make END an exclusive rather
than an inclusive bound. */
end += step;
*start_p = start;
*step_p = step;
*end_p = end;
if ((start >= end && step == 1) || (start <= end && step == -1))
{
if (dump_file)
fprintf (dump_file, "\nEmpty window: start=%d, end=%d, step=%d\n",
start, end, step);
return -1;
}
return 0;
}
/* Calculate MUST_PRECEDE/MUST_FOLLOW bitmaps of U_NODE; which is the
node currently been scheduled. At the end of the calculation
MUST_PRECEDE/MUST_FOLLOW contains all predecessors/successors of
U_NODE which are (1) already scheduled in the first/last row of
U_NODE's scheduling window, (2) whose dependence inequality with U
becomes an equality when U is scheduled in this same row, and (3)
whose dependence latency is zero.
The first and last rows are calculated using the following parameters:
START/END rows - The cycles that begins/ends the traversal on the window;
searching for an empty cycle to schedule U_NODE.
STEP - The direction in which we traverse the window.
II - The initiation interval. */
static void
calculate_must_precede_follow (ddg_node_ptr u_node, int start, int end,
int step, int ii, sbitmap sched_nodes,
sbitmap must_precede, sbitmap must_follow)
{
ddg_edge_ptr e;
int first_cycle_in_window, last_cycle_in_window;
gcc_assert (must_precede && must_follow);
/* Consider the following scheduling window:
{first_cycle_in_window, first_cycle_in_window+1, ...,
last_cycle_in_window}. If step is 1 then the following will be
the order we traverse the window: {start=first_cycle_in_window,
first_cycle_in_window+1, ..., end=last_cycle_in_window+1},
or {start=last_cycle_in_window, last_cycle_in_window-1, ...,
end=first_cycle_in_window-1} if step is -1. */
first_cycle_in_window = (step == 1) ? start : end - step;
last_cycle_in_window = (step == 1) ? end - step : start;
This patch implements the unification of the *bitmap interfaces as discussed. Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
2012-10-30 01:02:55 +01:00
bitmap_clear (must_precede);
bitmap_clear (must_follow);
if (dump_file)
fprintf (dump_file, "\nmust_precede: ");
/* Instead of checking if:
(SMODULO (SCHED_TIME (e->src), ii) == first_row_in_window)
&& ((SCHED_TIME (e->src) + e->latency - (e->distance * ii)) ==
first_cycle_in_window)
&& e->latency == 0
we use the fact that latency is non-negative:
SCHED_TIME (e->src) - (e->distance * ii) <=
SCHED_TIME (e->src) + e->latency - (e->distance * ii)) <=
first_cycle_in_window
and check only if
SCHED_TIME (e->src) - (e->distance * ii) == first_cycle_in_window */
for (e = u_node->in; e != 0; e = e->next_in)
This patch normalizes more bitmap function names. sbitmap.h TEST_BIT -> bitmap_bit_p SET_BIT -> bitmap_set_bit SET_BIT_WITH_POPCOUNT -> bitmap_set_bit_with_popcount RESET_BIT -> bitmap_clear_bit RESET_BIT_WITH_POPCOUNT -> bitmap_clear_bit_with_popcount basic-block.h sbitmap_intersection_of_succs -> bitmap_intersection_of_succs sbitmap_intersection_of_preds -> bitmap_intersection_of_preds sbitmap_union_of_succs -> bitmap_union_of_succs sbitmap_union_of_preds -> bitmap_union_of_preds The sbitmap.h functions also needed their numeric paramter changed from unsigned int to int to match the bitmap functions. Callers updated to match. Tested on x86-64, config-list.mk testing. Index: gcc/ChangeLog 2012-11-01 Lawrence Crowl <crowl@google.com> * sbitmap.h (TEST_BIT): Rename bitmap_bit_p, normalizing parameter type. Update callers to match. (SET_BIT): Rename bitmap_set_bit, normalizing parameter type. Update callers to match. (SET_BIT_WITH_POPCOUNT): Rename bitmap_set_bit_with_popcount, normalizing parameter type. Update callers to match. (RESET_BIT): Rename bitmap_clear_bit, normalizing parameter type. Update callers to match. (RESET_BIT_WITH_POPCOUNT): Rename bitmap_clear_bit_with_popcount, normalizing parameter type. Update callers to match. * basic-block.h (sbitmap_intersection_of_succs): Rename bitmap_intersection_of_succs. Update callers to match. * basic-block.h (sbitmap_intersection_of_preds): Rename bitmap_intersection_of_preds. Update callers to match. * basic-block.h (sbitmap_union_of_succs): Rename bitmap_union_of_succs. Update callers to match. * basic-block.h (sbitmap_union_of_preds): Rename bitmap_union_of_preds. Update callers to match. From-SVN: r193066
2012-11-01 20:23:35 +01:00
if (bitmap_bit_p (sched_nodes, e->src->cuid)
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
&& ((SCHED_TIME (e->src->cuid) - (e->distance * ii)) ==
first_cycle_in_window))
{
if (dump_file)
fprintf (dump_file, "%d ", e->src->cuid);
This patch normalizes more bitmap function names. sbitmap.h TEST_BIT -> bitmap_bit_p SET_BIT -> bitmap_set_bit SET_BIT_WITH_POPCOUNT -> bitmap_set_bit_with_popcount RESET_BIT -> bitmap_clear_bit RESET_BIT_WITH_POPCOUNT -> bitmap_clear_bit_with_popcount basic-block.h sbitmap_intersection_of_succs -> bitmap_intersection_of_succs sbitmap_intersection_of_preds -> bitmap_intersection_of_preds sbitmap_union_of_succs -> bitmap_union_of_succs sbitmap_union_of_preds -> bitmap_union_of_preds The sbitmap.h functions also needed their numeric paramter changed from unsigned int to int to match the bitmap functions. Callers updated to match. Tested on x86-64, config-list.mk testing. Index: gcc/ChangeLog 2012-11-01 Lawrence Crowl <crowl@google.com> * sbitmap.h (TEST_BIT): Rename bitmap_bit_p, normalizing parameter type. Update callers to match. (SET_BIT): Rename bitmap_set_bit, normalizing parameter type. Update callers to match. (SET_BIT_WITH_POPCOUNT): Rename bitmap_set_bit_with_popcount, normalizing parameter type. Update callers to match. (RESET_BIT): Rename bitmap_clear_bit, normalizing parameter type. Update callers to match. (RESET_BIT_WITH_POPCOUNT): Rename bitmap_clear_bit_with_popcount, normalizing parameter type. Update callers to match. * basic-block.h (sbitmap_intersection_of_succs): Rename bitmap_intersection_of_succs. Update callers to match. * basic-block.h (sbitmap_intersection_of_preds): Rename bitmap_intersection_of_preds. Update callers to match. * basic-block.h (sbitmap_union_of_succs): Rename bitmap_union_of_succs. Update callers to match. * basic-block.h (sbitmap_union_of_preds): Rename bitmap_union_of_preds. Update callers to match. From-SVN: r193066
2012-11-01 20:23:35 +01:00
bitmap_set_bit (must_precede, e->src->cuid);
}
if (dump_file)
fprintf (dump_file, "\nmust_follow: ");
/* Instead of checking if:
(SMODULO (SCHED_TIME (e->dest), ii) == last_row_in_window)
&& ((SCHED_TIME (e->dest) - e->latency + (e->distance * ii)) ==
last_cycle_in_window)
&& e->latency == 0
we use the fact that latency is non-negative:
SCHED_TIME (e->dest) + (e->distance * ii) >=
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: 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-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.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. * 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. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: 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-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.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-live.h: 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-operands.h: 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-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.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-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
SCHED_TIME (e->dest) - e->latency + (e->distance * ii)) >=
last_cycle_in_window
and check only if
SCHED_TIME (e->dest) + (e->distance * ii) == last_cycle_in_window */
for (e = u_node->out; e != 0; e = e->next_out)
This patch normalizes more bitmap function names. sbitmap.h TEST_BIT -> bitmap_bit_p SET_BIT -> bitmap_set_bit SET_BIT_WITH_POPCOUNT -> bitmap_set_bit_with_popcount RESET_BIT -> bitmap_clear_bit RESET_BIT_WITH_POPCOUNT -> bitmap_clear_bit_with_popcount basic-block.h sbitmap_intersection_of_succs -> bitmap_intersection_of_succs sbitmap_intersection_of_preds -> bitmap_intersection_of_preds sbitmap_union_of_succs -> bitmap_union_of_succs sbitmap_union_of_preds -> bitmap_union_of_preds The sbitmap.h functions also needed their numeric paramter changed from unsigned int to int to match the bitmap functions. Callers updated to match. Tested on x86-64, config-list.mk testing. Index: gcc/ChangeLog 2012-11-01 Lawrence Crowl <crowl@google.com> * sbitmap.h (TEST_BIT): Rename bitmap_bit_p, normalizing parameter type. Update callers to match. (SET_BIT): Rename bitmap_set_bit, normalizing parameter type. Update callers to match. (SET_BIT_WITH_POPCOUNT): Rename bitmap_set_bit_with_popcount, normalizing parameter type. Update callers to match. (RESET_BIT): Rename bitmap_clear_bit, normalizing parameter type. Update callers to match. (RESET_BIT_WITH_POPCOUNT): Rename bitmap_clear_bit_with_popcount, normalizing parameter type. Update callers to match. * basic-block.h (sbitmap_intersection_of_succs): Rename bitmap_intersection_of_succs. Update callers to match. * basic-block.h (sbitmap_intersection_of_preds): Rename bitmap_intersection_of_preds. Update callers to match. * basic-block.h (sbitmap_union_of_succs): Rename bitmap_union_of_succs. Update callers to match. * basic-block.h (sbitmap_union_of_preds): Rename bitmap_union_of_preds. Update callers to match. From-SVN: r193066
2012-11-01 20:23:35 +01:00
if (bitmap_bit_p (sched_nodes, e->dest->cuid)
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
&& ((SCHED_TIME (e->dest->cuid) + (e->distance * ii)) ==
last_cycle_in_window))
{
if (dump_file)
fprintf (dump_file, "%d ", e->dest->cuid);
This patch normalizes more bitmap function names. sbitmap.h TEST_BIT -> bitmap_bit_p SET_BIT -> bitmap_set_bit SET_BIT_WITH_POPCOUNT -> bitmap_set_bit_with_popcount RESET_BIT -> bitmap_clear_bit RESET_BIT_WITH_POPCOUNT -> bitmap_clear_bit_with_popcount basic-block.h sbitmap_intersection_of_succs -> bitmap_intersection_of_succs sbitmap_intersection_of_preds -> bitmap_intersection_of_preds sbitmap_union_of_succs -> bitmap_union_of_succs sbitmap_union_of_preds -> bitmap_union_of_preds The sbitmap.h functions also needed their numeric paramter changed from unsigned int to int to match the bitmap functions. Callers updated to match. Tested on x86-64, config-list.mk testing. Index: gcc/ChangeLog 2012-11-01 Lawrence Crowl <crowl@google.com> * sbitmap.h (TEST_BIT): Rename bitmap_bit_p, normalizing parameter type. Update callers to match. (SET_BIT): Rename bitmap_set_bit, normalizing parameter type. Update callers to match. (SET_BIT_WITH_POPCOUNT): Rename bitmap_set_bit_with_popcount, normalizing parameter type. Update callers to match. (RESET_BIT): Rename bitmap_clear_bit, normalizing parameter type. Update callers to match. (RESET_BIT_WITH_POPCOUNT): Rename bitmap_clear_bit_with_popcount, normalizing parameter type. Update callers to match. * basic-block.h (sbitmap_intersection_of_succs): Rename bitmap_intersection_of_succs. Update callers to match. * basic-block.h (sbitmap_intersection_of_preds): Rename bitmap_intersection_of_preds. Update callers to match. * basic-block.h (sbitmap_union_of_succs): Rename bitmap_union_of_succs. Update callers to match. * basic-block.h (sbitmap_union_of_preds): Rename bitmap_union_of_preds. Update callers to match. From-SVN: r193066
2012-11-01 20:23:35 +01:00
bitmap_set_bit (must_follow, e->dest->cuid);
}
if (dump_file)
fprintf (dump_file, "\n");
}
/* Return 1 if U_NODE can be scheduled in CYCLE. Use the following
parameters to decide if that's possible:
PS - The partial schedule.
U - The serial number of U_NODE.
cgraph.c: Fix typos in comments. gcc/ * cgraph.c: Fix typos in comments. (cgraph_availability_names): Fix string typo. * fold-const.c: Fix typos in comments. (fold_binary): Fix typo in warning. * genautomata.c: Fix typos in comments. (check_presence_pattern_sets): Fix typo in local variable. (output_description): Fix typo in output. * ggc-zone.c (ggc_pch_finish): Fix typo in error message. * hwint.h: Likewise. * matrix-reorg.c (check_allocation_function): Likewise. * omega.c (smooth_weird_equations): Likewise. * auto-inc-dec.c: Fix typos in comments. * bb-reorder.c: Likewise. * builtins.c: Likewise. * c-common.c: Likewise. * c-cppbuiltin.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfglayout.c: Likewise. * cfgloopmanip.c: Likewise. * cgraphunit.c: Likewise. * coverage.c: Likewise. * dbxout.c: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dfp.c: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * dse.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * function.c: Likewise. * function.h: Likewise. * gcc.c: Likewise. * gcov-io.c: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattrtab.c: Likewise. * ggc-page.c: Likewise. * gimplify.c: Likewise. * gthr-lynx.h: Likewise. * haifa-sched.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.h: Likewise. * ipa-pure-const.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa.c: Likewise. * loop-doloop.c: Likewise. * mips-tfile.c: Likewise. * mkmap-flat.awk: Likewise. * mkmap-symver.awk: Likewise. * modulo-sched.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts.c: Likewise. * passes.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * pretty-print.h: Likewise. * profile.c: Likewise. * protoize.c: Likewise. * ra-conflict.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * regclass.c: Likewise. * regs.h: Likewise. * reload.c: Likewise. * rtl-error.c: Likewise. * rtlanal.c: Likewise. * scan.h: Likewise. * sched-rgn.c: Likewise. * see.c: Likewise. * stmt.c: Likewise. * target.h: Likewise. * tree-dfa.c: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-alias-warnings.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.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-ivopts.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa.c: Likewise. * tree-vect-analyze.c: Likewise. * tree-vect-transform.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vn.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * unwind-dw2-fde.c: Likewise. * unwind.inc: Likewise. * value-prof.c: Likewise. * vmsdbgout.c: Likewise. From-SVN: r136425
2008-06-06 07:42:00 +02:00
NUM_SPLITS - The number of row splits made so far.
MUST_PRECEDE - The nodes that must precede U_NODE. (only valid at
the first row of the scheduling window)
MUST_FOLLOW - The nodes that must follow U_NODE. (only valid at the
last row of the scheduling window) */
static bool
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
try_scheduling_node_in_cycle (partial_schedule_ptr ps,
int u, int cycle, sbitmap sched_nodes,
int *num_splits, sbitmap must_precede,
sbitmap must_follow)
{
ps_insn_ptr psi;
bool success = 0;
verify_partial_schedule (ps, sched_nodes);
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
psi = ps_add_node_check_conflicts (ps, u, cycle, must_precede, must_follow);
if (psi)
{
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
SCHED_TIME (u) = cycle;
This patch normalizes more bitmap function names. sbitmap.h TEST_BIT -> bitmap_bit_p SET_BIT -> bitmap_set_bit SET_BIT_WITH_POPCOUNT -> bitmap_set_bit_with_popcount RESET_BIT -> bitmap_clear_bit RESET_BIT_WITH_POPCOUNT -> bitmap_clear_bit_with_popcount basic-block.h sbitmap_intersection_of_succs -> bitmap_intersection_of_succs sbitmap_intersection_of_preds -> bitmap_intersection_of_preds sbitmap_union_of_succs -> bitmap_union_of_succs sbitmap_union_of_preds -> bitmap_union_of_preds The sbitmap.h functions also needed their numeric paramter changed from unsigned int to int to match the bitmap functions. Callers updated to match. Tested on x86-64, config-list.mk testing. Index: gcc/ChangeLog 2012-11-01 Lawrence Crowl <crowl@google.com> * sbitmap.h (TEST_BIT): Rename bitmap_bit_p, normalizing parameter type. Update callers to match. (SET_BIT): Rename bitmap_set_bit, normalizing parameter type. Update callers to match. (SET_BIT_WITH_POPCOUNT): Rename bitmap_set_bit_with_popcount, normalizing parameter type. Update callers to match. (RESET_BIT): Rename bitmap_clear_bit, normalizing parameter type. Update callers to match. (RESET_BIT_WITH_POPCOUNT): Rename bitmap_clear_bit_with_popcount, normalizing parameter type. Update callers to match. * basic-block.h (sbitmap_intersection_of_succs): Rename bitmap_intersection_of_succs. Update callers to match. * basic-block.h (sbitmap_intersection_of_preds): Rename bitmap_intersection_of_preds. Update callers to match. * basic-block.h (sbitmap_union_of_succs): Rename bitmap_union_of_succs. Update callers to match. * basic-block.h (sbitmap_union_of_preds): Rename bitmap_union_of_preds. Update callers to match. From-SVN: r193066
2012-11-01 20:23:35 +01:00
bitmap_set_bit (sched_nodes, u);
success = 1;
*num_splits = 0;
if (dump_file)
fprintf (dump_file, "Scheduled w/o split in %d\n", cycle);
}
return success;
}
/* This function implements the scheduling algorithm for SMS according to the
above algorithm. */
static partial_schedule_ptr
tree-vrp.c (execute_vrp): Do not pass dump argument to. * tree-vrp.c (execute_vrp): Do not pass dump argument to. loop_optimizer_init and loop_optimizer_finalize * tree-ssa-sink.c (execute_sink_code): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init, tree_ssa_loop_done): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Ditto. * sched-ebb.c: Include output.h. (schedule_ebbs): Do not use dump argument. * value-prof.h (struct profile_hooks): Remove profile_dump_file. * loop.c (loop_dump_stream): Removed. (loop_optimize, rest_of_handle_loop_optimize): Do not use dump argument. (scan_loop, move_movables, find_and_verify_loops, mark_loop_jump, emit_prefetch_instructions, loop_bivs_find, loop_bivs_check, final_biv_value, loop_biv_eliminable_p, loop_givs_rescan, loop_iterations, strength_reduce, record_biv, record_giv, final_giv_value, check_final_value, check_ext_dependent_givs, combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems, try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use dump_file instead of loop_dump_stream. * ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call argument dump_file. * reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use dump argument. * flow.c (life_analysis, rest_of_handle_life): Ditto. * haifa-sched.c: Include output.h (schedule_insns, sched_init): Do not use dump argument. * mode-switching.c (optimize_mode_switching): Ditto. * modulo-sched.c (stats_file): Removed. (print_node_sched_params): Do not call argument dump_file. (sms_schedule_by_order, loop_canon_p, sms_schedule, rest_of_handle_sms): Do not use dump argument. Use dump_file instead of stats_file. * cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not use dump argument. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize, rtl_loop_init, rtl_loop_done): Ditto. * global.c (global_alloc, rest_of_handle_global_alloc): Ditto. * predict.c (combine_predictions_for_bb, tree_estimate_probability): Ditto. * recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto. * lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto. * regmove.c (fixup_match_1, fixup_match_2, regmove_optimize, rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto. * emit-rtl.c (renumber_insns): Ditto. * cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr, expand_gimple_basic_block, tree_expand_cfg): Ditto. * regclass.c (regclass): Ditto. * tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts, remove_ssa_form, rewrite_out_of_ssa): Ditto. * reg-stack.c (compensate_edge, compensate_edges, convert_regs_1, convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs): Ditto. * sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto. * local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file to regclass. * gcse.c (gcse_file, debug_stderr): Removed. (gcse_main, bypass_jumps, rest_of_handle_jump_bypass, rest_of_handle_gcse): Do not use dump argument. (cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets, one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb, pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass, compute_code_hoist_vbeinout, compute_code_hoist_data, one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores, compute_store_table, build_store_vectors, insert_insn_start_bb, insert_store, remove_reachable_equiv_notes, replace_store_insn, store_motion): Use dump_file instead of gcse_file. * ipa-type-escape.c (type_escape_execute): Remove debugging comments. * profile.c (profile_dump_file): Removed. (branch_prob): Use dump_file instead of profile_dump_file. * ipa.c (cgraph_remove_unreachable_nodes): Do not call argument dump_file. * tree-ssa-copy.c (dump_copy_of): Ditto. * rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass dump file to life_analysis. * bt-load.c (branch_target_load_optimize): Ditto. * cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to renumber_insns. * rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs, regclass, dbr_schedule): Declaration changed. * sched-int.h (sched_init): Declaration changed. * tree-profile.c (tree_profile_dump_file): Removed. (tree_profile_hooks): Removed profile_dump_file hook. * rtl-profile (rtl_profile_dump_file): Removed. (rtl_profile_hooks): emoved profile_dump_file hook. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * c-gimplify.c (c_genericize): Do not call local variable dump_file. * tree-cfg.c (build_tree_cfg): Ditto. * Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency. * basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm): Declaration changed. * config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to life_analysis and schedule_insns. * config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to life_analysis. * config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to dbr_schedule. * config/mips/mips.c (mips_reorg): Ditto. * config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to schedule_ebbs. From-SVN: r110656
2006-02-06 19:20:47 +01:00
sms_schedule_by_order (ddg_ptr g, int mii, int maxii, int *nodes_order)
{
int ii = mii;
int i, c, success, num_splits = 0;
int flush_and_start_over = true;
int num_nodes = g->num_nodes;
int start, end, step; /* Place together into one struct? */
use auto_sbitmap in various places gcc/ChangeLog: 2016-07-26 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * bt-load.c (compute_out): Use auto_sbitmap class. (link_btr_uses): Likewise. * cfganal.c (mark_dfs_back_edges): Likewise. (post_order_compute): Likewise. (inverted_post_order_compute): Likewise. (pre_and_rev_post_order_compute_fn): Likewise. (single_pred_before_succ_order): Likewise. * cfgexpand.c (pass_expand::execute): Likewise. * cfgloop.c (verify_loop_structure): Likewise. * cfgloopmanip.c (fix_bb_placements): Likewise. (remove_path): Likewise. (update_dominators_in_loop): Likewise. * cfgrtl.c (break_superblocks): Likewise. * ddg.c (check_sccs): Likewise. (create_ddg_all_sccs): Likewise. * df-core.c (df_worklist_dataflow): Likewise. * dse.c (dse_step3): Likewise. * except.c (eh_region_outermost): Likewise. * function.c (thread_prologue_and_epilogue_insns): Likewise. * gcse.c (prune_expressions): Likewise. (prune_insertions_deletions): Likewise. * gimple-ssa-backprop.c (backprop::~backprop): Likewise. * graph.c (draw_cfg_nodes_no_loops): Likewise. * ira-lives.c (remove_some_program_points_and_update_live_ranges): Likewise. * lcm.c (compute_earliest): Likewise. (compute_farthest): Likewise. * loop-unroll.c (unroll_loop_constant_iterations): Likewise. (unroll_loop_runtime_iterations): Likewise. (unroll_loop_stupid): Likewise. * lower-subreg.c (decompose_multiword_subregs): Likewise. * lra-lives.c: Likewise. * lra.c (lra): Likewise. * modulo-sched.c (schedule_reg_moves): Likewise. (optimize_sc): Likewise. (get_sched_window): Likewise. (sms_schedule_by_order): Likewise. (check_nodes_order): Likewise. (order_nodes_of_sccs): Likewise. (order_nodes_in_scc): Likewise. * recog.c (split_all_insns): Likewise. * regcprop.c (pass_cprop_hardreg::execute): Likewise. * reload1.c (reload): Likewise. * sched-rgn.c (haifa_find_rgns): Likewise. (split_edges): Likewise. (compute_trg_info): Likewise. * sel-sched.c (init_seqno): Likewise. * store-motion.c (remove_reachable_equiv_notes): Likewise. * tree-into-ssa.c (update_ssa): Likewise. * tree-ssa-live.c (live_worklist): Likewise. * tree-ssa-loop-im.c (fill_always_executed_in): Likewise. * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): * Likewise. (try_peel_loop): Likewise. * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): * Likewise. * tree-ssa-pre.c (compute_antic): Likewise. * tree-ssa-reassoc.c (undistribute_ops_list): Likewise. * tree-stdarg.c (reachable_at_most_once): Likewise. * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Likewise. * var-tracking.c (vt_find_locations): Likewise. From-SVN: r238748
2016-07-26 12:44:08 +02:00
auto_sbitmap sched_nodes (num_nodes);
auto_sbitmap must_precede (num_nodes);
auto_sbitmap must_follow (num_nodes);
auto_sbitmap tobe_scheduled (num_nodes);
partial_schedule_ptr ps = create_partial_schedule (ii, g, DFA_HISTORY);
This patch implements the unification of the *bitmap interfaces as discussed. Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
2012-10-30 01:02:55 +01:00
bitmap_ones (tobe_scheduled);
bitmap_clear (sched_nodes);
while (flush_and_start_over && (ii < maxii))
{
if (dump_file)
fprintf (dump_file, "Starting with ii=%d\n", ii);
flush_and_start_over = false;
This patch implements the unification of the *bitmap interfaces as discussed. Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
2012-10-30 01:02:55 +01:00
bitmap_clear (sched_nodes);
for (i = 0; i < num_nodes; i++)
{
int u = nodes_order[i];
ddg_node_ptr u_node = &ps->g->nodes[u];
change local vars to rtx_insn * gcc/ChangeLog: 2015-05-02 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * builtins.c (expand_builtin_trap): Change type of local variable to rtx_insn *. * config/arc/arc.md: Likewise. * config/arm/arm.c (arm_barrier_cost): Likewise. * config/avr/avr.c (avr_reorg): Likewise. * config/bfin/bfin.c (workaround_speculation): Likewise. (add_sched_insns_for_speculation): Likewise. * config/i386/i386.c (ix86_init_pic_reg): Likewise. (ix86_emit_save_regs): Likewise. (get_scratch_register_on_entry): Likewise. (ix86_emit_restore_reg_using_pop): Likewise. (ix86_emit_leave): Likewise. (ix86_emit_restore_regs_using_mov): Likewise. (ix86_expand_epilogue): Likewise. * config/rl78/rl78.c (rl78_alloc_physical_registers_cmp): Likewise. (rl78_alloc_physical_registers_umul): Likewise. * config/sh/sh.md: Likewise. * cselib.c (discard_useless_locs): Likewise. (cselib_invalidate_regno): Likewise. (cselib_invalidate_mem): Likewise. * function.c (expand_function_start): Likewise. (emit_use_return_register_into_block): Likewise. * gcse.c: Likewise. * haifa-sched.c (ok_for_early_queue_removal): Likewise. * ifcvt.c (noce_get_alt_condition): Likewise. * loop-doloop.c (doloop_condition_get): Likewise. * lra-constraints.c (inherit_in_ebb): Likewise. * modulo-sched.c (sms_schedule_by_order): Likewise. * recog.c (next_insn_tests_no_inequality): Likewise. * reorg.c (emit_delay_sequence): Likewise. (update_reg_dead_notes): Likewise. (fix_reg_dead_note): Likewise. (fill_slots_from_thread): Likewise. (delete_computation): Likewise. From-SVN: r222730
2015-05-02 23:03:53 +02:00
rtx_insn *insn = u_node->insn;
invoke.texi (-fvar-tracking-assignments): New. gcc/ChangeLog: * doc/invoke.texi (-fvar-tracking-assignments): New. (-fvar-tracking-assignments-toggle): New. (-fdump-final-insns=file): Mark filename as optional. (--param min-nondebug-insn-uid): New. (-gdwarf-@{version}): Mention version 4. * opts.c (common_handle_option): Accept it. * tree-vrp.c (find_assert_locations_1): Skip debug stmts. * regrename.c (regrename_optimize): Drop last. Don't count debug insns as uses. Don't reject change because of debug insn. (do_replace): Reject DEBUG_INSN as chain starter. Take base_regno from the chain starter, and check for inexact matches in DEBUG_INSNS. (scan_rtx_reg): Accept inexact matches in DEBUG_INSNs. (build_def_use): Simplify and fix the marking of DEBUG_INSNs. * sched-ebb.c (schedule_ebbs): Skip boundary debug insns. * fwprop.c (forward_propagate_and_simplify): ...into debug insns. * doc/gimple.texi (is_gimple_debug): New. (gimple_debug_bind_p): New. (is_gimple_call, gimple_assign_cast_p): End sentence with period. * doc/install.texi (bootstrap-debug): More details. (bootstrap-debug-big, bootstrap-debug-lean): Document. (bootstrap-debug-lib): More details. (bootstrap-debug-ckovw): Update. (bootstrap-time): New. * tree-into-ssa.c (mark_def_sites): Skip debug stmts. (insert_phi_nodes_for): Insert debug stmts. (rewrite_stmt): Take iterator. Insert debug stmts. (rewrite_enter_block): Adjust. (maybe_replace_use_in_debug_stmt): New. (rewrite_update_stmt): Use it. (mark_use_interesting): Return early for debug stmts. * tree-ssa-loop-im.c (rewrite_bittest): Propagate DEFs into debug stmts before replacing stmt. (move_computations_stmt): Likewise. * ira-conflicts.c (add_copies): Skip debug insns. * regstat.c (regstat_init_n_sets_and_refs): Discount debug insns. (regstat_bb_compute_ri): Skip debug insns. * tree-ssa-threadupdate.c (redirection_block_p): Skip debug stmts. * tree-ssa-loop-manip.c (find_uses_to_rename_stmt, check_loop_closed_ssa_stmt): Skip debug stmts. * tree-tailcall.c (find_tail_calls): Likewise. * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Likewise. * tree.h (MAY_HAVE_DEBUG_STMTS): New. (build_var_debug_value_stat): Declare. (build_var_debug_value): Define. (target_for_debug_bind): Declare. * reload.c (find_equiv_reg): Skip debug insns. * rtlanal.c (reg_used_between_p): Skip debug insns. (side_effects_p): Likewise. (canonicalize_condition): Likewise. * ddg.c (create_ddg_dep_from_intra_loop_link): Check that non-debug insns never depend on debug insns. (create_ddg_dep_no_link): Likewise. (add_cross_iteration_register_deps): Use ANTI_DEP for debug insns. Don't add inter-loop dependencies for debug insns. (build_intra_loop_deps): Likewise. (create_ddg): Count debug insns. * ddg.h (struct ddg::num_debug): New. (num_backargs): Pair up with previous int field. * diagnostic.c (diagnostic_report_diagnostic): Skip notes on -fcompare-debug-second. * final.c (get_attr_length_1): Skip debug insns. (rest_of_clean-state): Don't dump CFA_RESTORE_STATE. * gcc.c (invoke_as): Call compare-debug-dump-opt. (driver_self_specs): Map -fdump-final-insns to -fdump-final-insns=.. (get_local_tick): New. (compare_debug_dump_opt_spec_function): Test for . argument and compute output name. Compute temp output spec without flag name. Compute -frandom-seed. (OPT): Undef after use. * cfgloopanal.c (num_loop_insns): Skip debug insns. (average_num_loop_insns): Likewise. * params.h (MIN_NONDEBUG_INSN_UID): New. * gimple.def (GIMPLE_DEBUG): New. * ipa-reference.c (scan_stmt_for_static_refs): Skip debug stmts. * auto-inc-dec.c (merge_in_block): Skip debug insns. (merge_in_block): Fix whitespace. * toplev.c (flag_var_tracking): Update comment. (flag_var_tracking_assignments): New. (flag_var_tracking_assignments_toggle): New. (process_options): Don't open final insns dump file if we're not going to write to it. Compute defaults for var_tracking. * df-scan.c (df_insn_rescan_debug_internal): New. (df_uses_record): Handle debug insns. * haifa-sched.c (ready): Initialize n_debug. (contributes_to_priority): Skip debug insns. (dep_list_size): New. (priority): Use it. (rank_for_schedule): Likewise. Schedule debug insns as soon as they're ready. Disregard previous debug insns to make decisions. (queue_insn): Never queue debug insns. (ready_add, ready_remove_first, ready_remove): Count debug insns. (schedule_insn): Don't reject debug insns because of issue rate. (get_ebb_head_tail, no_real_insns_p): Skip boundary debug insns. (queue_to_ready): Skip and discount debug insns. (choose_ready): Let debug insns through. (schedule_block): Check boundary debug insns. Discount debug insns, schedule them early. Adjust whitespace. (set_priorities): Check for boundary debug insns. (add_jump_dependencies): Use dep_list_size. (prev_non_location_insn): New. (check_cfg): Use it. * tree-ssa-loop-ivopts.c (find-interesting_users): Skip debug stmts. (remove_unused_ivs): Reset debug stmts. * modulo-sched.c (const_iteration_count): Skip debug insns. (res_MII): Discount debug insns. (loop_single_full_bb_p): Skip debug insns. (sms_schedule): Likewise. (sms_schedule_by_order): Likewise. (ps_has_conflicts): Likewise. * caller-save.c (refmarker_fn): New. (save_call_clobbered_regs): Replace regs with saved mem in debug insns. (mark_referenced_regs): Take pointer, mark and arg. Adjust. Call refmarker_fn mark for hardregnos. (mark_reg_as_referenced): New. (replace_reg_with_saved_mem): New. * ipa-pure-const.c (check_stmt): Skip debug stmts. * cse.c (cse_insn): Canonicalize debug insns. Skip them when searching back. (cse_extended_basic_block): Skip debug insns. (count_reg_usage): Likewise. (is_dead_reg): New, split out of... (set_live_p): ... here. (insn_live_p): Use it for debug insns. * tree-stdarg.c (check_all_va_list_escapes): Skip debug stmts. (execute_optimize_stdarg): Likewise. * tree-ssa-dom.c (propagate_rhs_into_lhs): Likewise. * tree-ssa-propagate.c (substitute_and_fold): Don't regard changes in debug stmts as changes. * sel-sched.c (moving_insn_creates_bookkeeping_block_p): New. (moveup_expr): Don't move across debug insns. Don't move debug insn if it would create a bookkeeping block. (moveup_expr_cached): Don't use cache for debug insns that are heads of blocks. (compute_av_set_inside_bb): Skip debug insns. (sel_rank_for_schedule): Schedule debug insns first. Remove dead code. (block_valid_for_bookkeeping_p); Support lax searches. (create_block_for_bookkeeping): Adjust block numbers when encountering debug-only blocks. (find_place_for_bookkeeping): Deal with debug-only blocks. (generate_bookkeeping_insn): Accept no place to insert. (remove_temp_moveop_nops): New argument full_tidying. (prepare_place_to_insert): Deal with debug insns. (advance_state_on_fence): Debug insns don't start cycles. (update_boundaries): Take fence as argument. Deal with debug insns. (schedule_expr_on_boundary): No full_tidying on debug insns. (fill_insns): Deal with debug insns. (track_scheduled_insns_and_blocks): Don't count debug insns. (need_nop_to_preserve_insn_bb): New, split out of... (remove_insn_from_stream): ... this. (fur_orig_expr_not_found): Skip debug insns. * rtl.def (VALUE): Move up. (DEBUG_INSN): New. * tree-ssa-sink.c (all_immediate_uses_same_place): Skip debug stmts. (nearest_common_dominator_of_uses): Take debug_stmts argument. Set it if debug stmts are found. (statement_sink_location): Skip debug stmts. Propagate moving defs into debug stmts. * ifcvt.c (first_active_insn): Skip debug insns. (last_active_insns): Likewise. (cond_exec_process_insns): Likewise. (noce_process_if_block): Likewise. (check_cond_move_block): Likewise. (cond_move_convert_if_block): Likewise. (block_jumps_and_fallthru_p): Likewise. (dead_or_predicable): Likewise. * dwarf2out.c (debug_str_hash_forced): New. (find_AT_string): Add comment. (gen_label_for_indirect_string): New. (get_debug_string_label): New. (AT_string_form): Use it. (mem_loc_descriptor): Handle non-TLS symbols. Handle MINUS , DIV, MOD, AND, IOR, XOR, NOT, ABS, NEG, and CONST_STRING. Accept but discard COMPARE, IF_THEN_ELSE, ROTATE, ROTATERT, TRUNCATE and several operations that cannot be represented with DWARF opcodes. (loc_descriptor): Ignore SIGN_EXTEND and ZERO_EXTEND. Require dwarf_version 4 for DW_OP_implicit_value and DW_OP_stack_value. (dwarf2out_var_location): Take during-call mark into account. (output_indirect_string): Update comment. Output if there are label and references. (prune_indirect_string): New. (prune_unused_types): Call it if debug_str_hash_forced. More in dwarf2out.c, from Jakub Jelinek <jakub@redhat.com>: (dw_long_long_const): Remove. (struct dw_val_struct): Change val_long_long type to rtx. (print_die, attr_checksum, same_dw_val_p, loc_descriptor): Adjust for val_long_long change to CONST_DOUBLE rtx from a long hi/lo pair. (output_die): Likewise. Use HOST_BITS_PER_WIDE_INT size of each component instead of HOST_BITS_PER_LONG. (output_loc_operands): Likewise. For const8* assert HOST_BITS_PER_WIDE_INT rather than HOST_BITS_PER_LONG is >= 64. (output_loc_operands_raw): For const8* assert HOST_BITS_PER_WIDE_INT rather than HOST_BITS_PER_LONG is >= 64. (add_AT_long_long): Remove val_hi and val_lo arguments, add val_const_double. (size_of_die): Use HOST_BITS_PER_WIDE_INT size multiplier instead of HOST_BITS_PER_LONG for dw_val_class_long_long. (add_const_value_attribute): Adjust add_AT_long_long caller. Don't handle TLS SYMBOL_REFs. If CONST wraps a constant, tail recurse. (dwarf_stack_op_name): Handle DW_OP_implicit_value and DW_OP_stack_value. (size_of_loc_descr, output_loc_operands, output_loc_operands_raw): Handle DW_OP_implicit_value. (extract_int): Move prototype earlier. (mem_loc_descriptor): For SUBREG punt if inner mode size is wider than DWARF2_ADDR_SIZE. Handle SIGN_EXTEND and ZERO_EXTEND by DW_OP_shl and DW_OP_shr{a,}. Handle EQ, NE, GT, GE, LT, LE, GTU, GEU, LTU, LEU, SMIN, SMAX, UMIN, UMAX, SIGN_EXTRACT, ZERO_EXTRACT. (loc_descriptor): Compare mode size with DWARF2_ADDR_SIZE instead of Pmode size. (loc_descriptor): Add MODE argument. Handle CONST_INT, CONST_DOUBLE, CONST_VECTOR, CONST, LABEL_REF and SYMBOL_REF if mode != VOIDmode, attempt to handle other expressions. Don't handle TLS SYMBOL_REFs. (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor_from_tree_1): Adjust loc_descriptor callers. (add_location_or_const_value_attribute): Likewise. For single location loc_lists attempt to use add_const_value_attribute for constant decls. Add DW_AT_const_value even if NOTE_VAR_LOCATION is VAR_LOCATION with CONSTANT_P or CONST_STRING in its expression. * cfgbuild.c (inside_basic_block_p): Handle debug insns. (control_flow_insn_p): Likewise. * tree-parloops.c (eliminate_local_variables_stmt): Handle debug stmt. (separate_decls_in_region_debug_bind): New. (separate_decls_in_region): Process debug bind stmts afterwards. * recog.c (verify_changes): Handle debug insns. (extract_insn): Likewise. (peephole2_optimize): Skip debug insns. * dse.c (scan_insn): Skip debug insns. * sel-sched-ir.c (return_nop_to_pool): Take full_tidying argument. Pass it on. (setup_id_for_insn): Handle debug insns. (maybe_tidy_empty_bb): Adjust whitespace. (tidy_control_flow): Skip debug insns. (sel_remove_insn): Adjust for debug insns. (sel_estimate_number_of_insns): Skip debug insns. (create_insn_rtx_from_pattern): Handle debug insns. (create_copy_of_insn_rtx): Likewise. * sel-sched-.h (sel_bb_end): Declare. (sel_bb_empty_or_nop_p): New. (get_all_loop_exits): Use it. (_eligible_successor_edge_p): Likewise. (return_nop_to_pool): Adjust. * tree-eh.c (tre_empty_eh_handler_p): Skip debug stmts. * ira-lives.c (process_bb_node_lives): Skip debug insns. * gimple-pretty-print.c (dump_gimple_debug): New. (dump_gimple_stmt): Use it. (dump_bb_header): Skip gimple debug stmts. * regmove.c (optimize_reg_copy_1): Discount debug insns. (fixup_match_2): Likewise. (regmove_backward_pass): Likewise. Simplify combined replacement. Handle debug insns. * function.c (instantiate_virtual_regs): Handle debug insns. * function.h (struct emit_status): Add x_cur_debug_insn_uid. * print-rtl.h: Include cselib.h. (print_rtx): Print VALUEs. Split out and recurse for VAR_LOCATIONs. * df.h (df_inns_rescan_debug_internal): Declare. * gcse.c (alloc_hash_table): Estimate n_insns. (cprop_insn): Don't regard debug insns as changes. (bypass_conditional_jumps): Skip debug insns. (one_pre_gcse_pass): Adjust. (one_code_hoisting_pass): Likewise. (compute_ld_motion_mems): Skip debug insns. (one_cprop_pass): Adjust. * tree-if-conv.c (tree_if_convert_stmt): Reset debug stmts. (if_convertible_stmt_p): Handle debug stmts. * init-regs.c (initialize_uninitialized_regs): Skip debug insns. * tree-vect-loop.c (vect_is_simple_reduction): Skip debug stmts. * ira-build.c (create_bb_allocnos): Skip debug insns. * tree-flow-inline.h (has_zero_uses): Discount debug stmts. (has_single_use): Likewise. (single_imm_use): Likewise. (num_imm_uses): Likewise. * tree-ssa-phiopt.c (empty_block_p): Skip debug stmts. * tree-ssa-coalesce.c (build_ssa_conflict_graph): Skip debug stmts. (create_outofssa_var_map): Likewise. * lower-subreg.c (adjust_decomposed_uses): New. (resolve_debug): New. (decompose_multiword_subregs): Use it. * tree-dfa.c (find_referenced_vars): Skip debug stmts. * emit-rtl.c: Include params.h. (cur_debug_insn_uid): Define. (set_new_first_and_last_insn): Set cur_debug_insn_uid too. (copy_rtx_if_shared_1): Handle debug insns. (reset_used_flags): Likewise. (set_used_flags): LIkewise. (get_max_insn_count): New. (next_nondebug_insn): New. (prev_nondebug_insn): New. (make_debug_insn_raw): New. (emit_insn_before_noloc): Handle debug insns. (emit_jump_insn_before_noloc): Likewise. (emit_call_insn_before_noloc): Likewise. (emit_debug_insn_before_noloc): New. (emit_insn_after_noloc): Handle debug insns. (emit_jump_insn_after_noloc): Likewise. (emit_call_insn_after_noloc): Likewise. (emit_debug_insn_after_noloc): Likewise. (emit_insn_after): Take loc from earlier non-debug insn. (emit_jump_insn_after): Likewise. (emit_call_insn_after): Likewise. (emit_debug_insn_after_setloc): New. (emit_debug_insn_after): New. (emit_insn_before): Take loc from later non-debug insn. (emit_jump_insn_before): Likewise. (emit_call_insn_before): Likewise. (emit_debug_insn_before_setloc): New. (emit_debug_insn_before): New. (emit_insn): Handle debug insns. (emit_debug_insn): New. (emit_jump_insn): Handle debug insns. (emit_call_insn): Likewise. (emit): Likewise. (init_emit): Take min-nondebug-insn-uid into account. Initialize cur_debug_insn_uid. (emit_copy_of_insn_after): Handle debug insns. * cfgexpand.c (gimple_assign_rhs_to_tree): Do not overwrite location of single rhs in place. (maybe_dump_rtl_for_gimple_stmt): Dump lineno. (floor_sdiv_adjust): New. (cell_sdiv_adjust): New. (cell_udiv_adjust): New. (round_sdiv_adjust): New. (round_udiv_adjust): New. (wrap_constant): Moved from cselib. (unwrap_constant): New. (expand_debug_expr): New. (expand_debug_locations): New. (expand_gimple_basic_block): Drop hiding redeclaration. Expand debug bind stmts. (gimple_expand_cfg): Expand debug locations. * cselib.c: Include tree-pass.h. (struct expand_value_data): New. (cselib_record_sets_hook): New. (PRESERVED_VALUE_P, LONG_TERM_PRESERVED_VALUE_P): New. (cselib_clear_table): Move, and implemnet in terms of... (cselib_reset_table_with_next_value): ... this. (cselib_get_next_unknown_value): New. (discard_useless_locs): Don't discard preserved values. (cselib_preserve_value): New. (cselib_preserved_value_p): New. (cselib_preserve_definitely): New. (cselib_clear_preserve): New. (cselib_preserve_only_values): New. (new_cselib_val): Take rtx argument. Dump it in details. (cselib_lookup_mem): Adjust. (expand_loc): Take regs_active in struct. Adjust. Silence dumps unless details are requested. (cselib_expand_value_rtx_cb): New. (cselib_expand_value_rtx): Rename and reimplment in terms of... (cselib_expand_value_rtx_1): ... this. Adjust. Silence dumps without details. Copy more subregs. Try to resolve values using a callback. Wrap constants. (cselib_subst_to_values): Adjust. (cselib_log_lookup): New. (cselib_lookup): Call it. (cselib_invalidate_regno): Don't count preserved values as useless. (cselib_invalidate_mem): Likewise. (cselib_record_set): Likewise. (struct set): Renamed to cselib_set, moved to cselib.h. (cselib_record_sets): Adjust. Call hook. (cselib_process_insn): Reset table when it would be cleared. (dump_cselib_val): New. (dump_cselib_table): New. * tree-cfgcleanup.c (tree_forwarded_block_p): Skip debug stmts. (remove_forwarder_block): Support moving debug stmts. * cselib.h (cselib_record_sets_hook): Declare. (cselib_expand_callback): New type. (cselib_expand_value_rtx_cb): Declare. (cselib_reset_table_with_next_value): Declare. (cselib_get_next_unknown_value): Declare. (cselib_preserve_value): Declare. (cselib_preserved_value_p): Declare. (cselib_preserve_only_values): Declare. (dump_cselib_table): Declare. * cfgcleanup.c (flow_find_cross_jump): Skip debug insns. (try_crossjump_to_edge): Likewise. (delete_unreachable_blocks): Remove dominant GIMPLE blocks after dominated blocks when debug stmts are present. * simplify-rtx.c (delegitimize_mem_from_attrs): New. * tree-ssa-live.c (remove_unused_locals): Skip debug stmts. (set_var_live_on_entry): Likewise. * loop-invariant.c (find_invariants_bb): Skip debug insns. * cfglayout.c (curr_location, last_location): Make static. (set_curr_insn_source_location): Don't avoid bouncing. (get_curr_insn_source_location): New. (get_curr_insn_block): New. (duplicate_insn_chain): Handle debug insns. * tree-ssa-forwprop.c (forward_propagate_addr_expr): Propagate into debug stmts. * common.opt (fcompare-debug): Move to sort order. (fdump-unnumbered-links): Likewise. (fvar-tracking-assignments): New. (fvar-tracking-assignments-toggle): New. * tree-ssa-dce.c (mark_stmt_necessary): Don't mark blocks because of debug stmts. (mark_stmt_if_obviously_necessary): Mark debug stmts. (eliminate_unnecessary_stmts): Walk dominated blocks before dominators. * tree-ssa-ter.c (find_replaceable_in_bb): Skip debug stmts. * ira.c (memref_used_between_p): Skip debug insns. (update_equiv_regs): Likewise. * sched-deps.c (sd_lists_size): Accept empty list. (sd_init_insn): Mark debug insns. (sd_finish_insn): Unmark them. (sd_add_dep): Reject non-debug deps on debug insns. (fixup_sched_groups): Give debug insns group treatment. Skip debug insns. (sched_analyze_reg): Don't mark debug insns for sched before call. (sched_analyze_2): Handle debug insns. (sched_analyze_insn): Compute next non-debug insn. Handle debug insns. (deps_analyze_insn): Handle debug insns. (deps_start_bb): Skip debug insns. (init_deps): Initialize last_debug_insn. * tree-ssa.c (target_for_debug_bind): New. (find_released_ssa_name): New. (propagate_var_def_into_debug_stmts): New. (propagate_defs_into_debug_stmts): New. (verify_ssa): Skip debug bind stmts without values. (warn_uninialized_vars): Skip debug stmts. * target-def.h (TARGET_DELEGITIMIZE_ADDRESS): Set default. * rtl.c (rtx_equal_p_cb): Handle VALUEs. (rtx_equal_p): Likewise. * ira-costs.c (scan_one_insn): Skip debug insns. (process_bb_node_for_hard_reg_moves): Likewise. * rtl.h (DEBUG_INSN_P): New. (NONDEBUG_INSN_P): New. (MAY_HAVE_DEBUG_INSNS): New. (INSN_P): Accept debug insns. (RTX_FRAME_RELATED_P): Likewise. (INSN_DELETED_P): Likewise (PAT_VAR_LOCATION_DECL): New. (PAT_VAR_LOCATION_LOC): New. (PAT_VAR_OCATION_STATUS): New. (NOTE_VAR_LOCATION_DECL): Reimplement. (NOTE_VAR_LOCATION_LOC): Likewise. (NOTE_VAR_LOCATION_STATUS): Likewise. (INSN_VAR_LOCATION): New. (INSN_VAR_LOCATION_DECL): New. (INSN_VAR_LOCATION_LOC): New. (INSN_VAR_LOCATION_STATUS): New. (gen_rtx_UNKNOWN_VAR_LOC): New. (VAR_LOC_UNKNOWN_P): New. (NOTE_DURING_CALL_P): New. (SCHED_GROUP_P): Accept debug insns. (emit_debug_insn_before): Declare. (emit_debug_insn_before_noloc): Declare. (emit_debug_insn_beore_setloc): Declare. (emit_debug_insn_after): Declare. (emit_debug_insn_after_noloc): Declare. (emit_debug_insn_after_setloc): Declare. (emit_debug_insn): Declare. (make_debug_insn_raw): Declare. (prev_nondebug_insn): Declare. (next_nondebug_insn): Declare. (delegitimize_mem_from_attrs): Declare. (get_max_insn_count): Declare. (wrap_constant): Declare. (unwrap_constant): Declare. (get_curr_insn_source_location): Declare. (get_curr_insn_block): Declare. * tree-inline.c (insert_debug_decl_map): New. (processing_debug_stmt): New. (remap_decl): Don't create new mappings in debug stmts. (remap_gimple_op_r): Don't add references in debug stmts. (copy_tree_body_r): Likewise. (remap_gimple_stmt): Handle debug bind stmts. (copy_bb): Skip debug stmts. (copy_edges_for_bb): Likewise. (copy_debug_stmt): New. (copy_debug_stmts): New. (copy_body): Copy debug stmts at the end. (insert_init_debug_bind): New. (insert_init_stmt): Take id. Skip and emit debug stmts. (setup_one_parameter): Remap variable earlier, register debug mapping. (estimate_num_insns): Skip debug stmts. (expand_call_inline): Preserve debug_map. (optimize_inline_calls): Check for no debug_stmts left-overs. (unsave_expr_now): Preserve debug_map. (copy_gimple_seq_and_replace_locals): Likewise. (tree_function_versioning): Check for no debug_stmts left-overs. Init and destroy debug_map as needed. Split edges unconditionally. (build_duplicate_type): Init and destroy debug_map as needed. * tree-inline.h: Include gimple.h instead of pointer-set.h. (struct copy_body_data): Add debug_stmts and debug_map. * sched-int.h (struct ready_list): Add n_debug. (struct deps): Add last_debug_insn. (DEBUG_INSN_SCHED_P): New. (BOUNDARY_DEBUG_INSN_P): New. (SCHEDULE_DEBUG_INSN_P): New. (sd_iterator_cond): Accept empty list. * combine.c (create_log_links): Skip debug insns. (combine_instructions): Likewise. (cleanup_auto_inc_dec): New. From Jakub Jelinek: Make sure the return value is always unshared. (struct rtx_subst_pair): New. (auto_adjust_pair): New. (propagate_for_debug_subst): New. (propagate_for_debug): New. (try_combine): Skip debug insns. Propagate removed defs into debug insns. (next_nonnote_nondebug_insn): New. (distribute_notes): Use it. Skip debug insns. (distribute_links): Skip debug insns. * tree-outof-ssa.c (set_location_for_edge): Likewise. * resource.c (mark_target_live_regs): Likewise. * var-tracking.c: Include cselib.h and target.h. (enum micro_operation_type): Add MO_VAL_USE, MO_VAL_LOC, and MO_VAL_SET. (micro_operation_type_name): New. (enum emit_note_where): Add EMIT_NOTE_AFTER_CALL_INSN. (struct micro_operation_def): Update comments. (decl_or_value): New type. Use instead of decls. (struct emit_note_data_def): Add vars. (struct attrs_def): Use decl_or_value. (struct variable_tracking_info_def): Add permp, flooded. (struct location_chain_def): Update comment. (struct variable_part_def): Use decl_or_value. (struct variable_def): Make var_part a variable length array. (valvar_pool): New. (scratch_regs): New. (cselib_hook_called): New. (dv_is_decl_p): New. (dv_is_value_p): New. (dv_as_decl): New. (dv_as_value): New. (dv_as_opaque): New. (dv_onepart_p): New. (dv_pool): New. (IS_DECL_CODE): New. (check_value_is_not_decl): New. (dv_from_decl): New. (dv_from_value): New. (dv_htab_hash): New. (variable_htab_hash): Use it. (variable_htab_eq): Support values. (variable_htab_free): Free from the right pool. (attrs_list_member, attrs_list_insert): Use decl_or_value. (attrs_list_union): Adjust. (attrs_list_mpdv_union): New. (tie_break_pointers): New. (canon_value_cmp): New. (unshare_variable): Return possibly-modified slot. (vars_copy_1): Adjust. (var_reg_decl_set): Adjust. Split out of... (var_reg_set): ... this. (get_init_value): Adjust. (var_reg_delete_and_set): Adjust. (var_reg_delete): Adjust. (var_regno_delete): Adjust. (var_mem_decl_set): Split out of... (var_mem_set): ... this. (var_mem_delete_and_set): Adjust. (var_mem_delete): Adjust. (val_store): New. (val_reset): New. (val_resolve): New. (variable_union): Adjust. Speed up merge of 1-part vars. (variable_canonicalize): Use unshared slot. (VALUED_RECURSED_INTO): New. (find_loc_in_1pdv): New. (struct dfset_merge): New. (insert_into_intersection): New. (intersect_loc_chains): New. (loc_cmp): New. (canonicalize_loc_order_check): New. (canonicalize_values_mark): New. (canonicalize_values_star): New. (variable_merge_over_cur): New. (variable_merge_over_src): New. (dataflow_set_merge): New. (dataflow_set_equiv_regs): New. (remove_duplicate_values): New. (struct dfset_post_merge): New. (variable_post_merge_new_vals): New. (variable_post_merge_perm_vals): New. (dataflow_post_merge_adjust): New. (find_mem_expr_in_1pdv): New. (dataflow_set_preserve_mem_locs): New. (dataflow_set_remove_mem_locs): New. (dataflow_set_clear_at_call): New. (onepart_variable_different_p): New. (variable_different_p): Use it. (dataflow_set_different_1): Adjust. Make detailed dump more verbose. (track_expr_p): Add need_rtl parameter. Don't generate rtl if not needed. (track_loc_p): Pass it true. (struct count_use_info): New. (find_use_val): New. (replace_expr_with_values): New. (log_op_type): New. (use_type): New, partially split out of... (count_uses): ... this. Count new micro-ops. (count_uses_1): Adjust. (count_stores): Adjust. (count_with_sets): New. (VAL_NEEDS_RESOLUTION): New. (VAL_HOLDS_TRACK_EXPR): New. (VAL_EXPR_IS_COPIED): New. (VAL_EXPR_IS_CLOBBERED): New. (add_uses): Adjust. Generate new micro-ops. (add_uses_1): Adjust. (add_stores): Generate new micro-ops. (add_with_sets): New. (find_src_status): Adjust. (find_src_set_src): Adjust. (compute_bb_dataflow): Use dataflow_set_clear_at_call. Handle new micro-ops. Canonicalize value equivalances. (vt_find_locations): Compute total size of hash tables for dumping. Perform merge for var-tracking-assignments. Don't disregard single-block loops. (dump_attrs_list): Handle decl_or_value. (dump_variable): Take variable. Deal with decl_or_value. (dump_variable_slot): New. (dump_vars): Use it. (dump_dataflow_sets): Adjust. (set_slot_part): New, extended to support one-part variables after splitting out of... (set_variable_part): ... this. (clobber_slot_part): New, split out of... (clobber_variable_part): ... this. (delete_slot_part): New, split out of... (delete_variable_part): .... this. (check_wrap_constant): New. (vt_expand_loc_callback): New. (vt_expand_loc): New. (emit_note_insn_var_location): Adjust. Handle values. Handle EMIT_NOTE_AFTER_CALL_INSN. (emit_notes_for_differences_1): Adjust. Handle values. (emit_notes_for_differences_2): Likewise. (emit_notes_for_differences): Adjust. (emit_notes_in_bb): Take pointer to set. Emit AFTER_CALL_INSN notes. Adjust. Handle new micro-ops. (vt_add_function_parameters): Adjust. Create and bind values. (vt_initialize): Adjust. Initialize scratch_regs and valvar_pool, flooded and perm.. Initialize and use cselib. Log operations. Move some code to count_with_sets and add_with_sets. (delete_debug_insns): New. (vt_debug_insns_local): New. (vt_finalize): Release permp, valvar_pool, scratch_regs. Finish cselib. (var_tracking_main): If var-tracking-assignments is enabled but var-tracking isn't, delete debug insns and leave. Likewise if we exceed limits or fail the stack adjustments tests, and after all var-tracking processing. More in var-tracking, from Jakub Jelinek <jakub@redhat.com>: (dataflow_set): Add traversed_vars. (value_chain, const_value_chain): New typedefs. (value_chain_pool, value_chains): New variables. (value_chain_htab_hash, value_chain_htab_eq, add_value_chain, add_value_chains, add_cselib_value_chains, remove_value_chain, remove_value_chains, remove_cselib_value_chains): New functions. (shared_hash_find_slot_unshare_1, shared_hash_find_slot_1, shared_hash_find_slot_noinsert_1, shared_hash_find_1): New static inlines. (shared_hash_find_slot_unshare, shared_hash_find_slot, shared_hash_find_slot_noinsert, shared_hash_find): Update. (dst_can_be_shared): New variable. (unshare_variable): Unshare set->vars if shared, use shared_hash_*. Clear dst_can_be_shared. If set->traversed_vars is non-NULL and different from set->vars, look up slot again instead of using the passed in slot. (dataflow_set_init): Initialize traversed_vars. (variable_union): Use shared_hash_*. Use initially NO_INSERT lookup if set->vars is shared. Don't keep slot cleared before calling unshare_variable. Unshare set->vars if needed. Adjust unshare_variable callers. Clear dst_can_be_shared if needed. Even ->refcount == 1 vars must be unshared if set->vars is shared and var needs to be modified. (dataflow_set_union): Set traversed_vars during canonicalization. (VALUE_CHANGED, DECL_CHANGED): Define. (set_dv_changed, dv_changed_p): New static inlines. (track_expr_p): Clear DECL_CHANGED. (dump_dataflow_sets): Set it. (variable_was_changed): Call set_dv_changed. (emit_note_insn_var_location): Likewise. (changed_variables_stack): New variable. (check_changed_vars_1, check_changed_vars_2): New functions. (emit_notes_for_changes): Do nothing if changed_variables is empty. Traverse changed_variables with check_changed_vars_1, call check_changed_vars_2 on each changed_variables_stack entry. (emit_notes_in_bb): Add SET argument. Just clear it at the beginning, use it instead of local &set, don't destroy it at the end. (vt_emit_notes): Call dataflow_set_clear early on all VTI(bb)->out sets, never use them, instead use emit_notes_in_bb computed set, dataflow_set_clear also VTI(bb)->in when we are done with the basic block. Initialize changed_variables_stack, free it afterwards. If ENABLE_CHECKING verify that after noting differences to an empty set value_chains hash table is empty. (vt_initialize): Initialize value_chains and value_chain_pool. (vt_finalize): Delete value_chains htab, free value_chain_pool. (variable_tracking_main): Call dump_dataflow_sets before calling vt_emit_notes, not after it. * tree-flow.h (propagate_defs_into_debug_stmts): Declare. (propagate_var_def_into_debug_stmts): Declare. * df-problems.c (df_lr_bb_local_compute): Skip debug insns. (df_set_note): Reject debug insns. (df_whole_mw_reg_dead_p): Take added_notes_p argument. Don't add notes to debug insns. (df_note_bb_compute): Adjust. Likewise. (df_simulate_uses): Skip debug insns. (df_simulate_initialize_backwards): Likewise. * reg-stack.c (subst_stack_regs_in_debug_insn): New. (subst_stack_regs_pat): Reject debug insns. (convert_regs_1): Handle debug insns. * Makefile.in (TREE_INLINE_H): Take pointer-set.h from GIMPLE_H. (print-rtl.o): Depend on cselib.h. (cselib.o): Depend on TREE_PASS_H. (var-tracking.o): Depend on cselib.h and TARGET_H. * sched-rgn.c (rgn_estimate_number_of_insns): Discount debug insns. (init_ready_list): Skip boundary debug insns. (add_branch_dependences): Skip debug insns. (free_block_dependencies): Check for blocks with only debug insns. (compute_priorities): Likewise. * gimple.c (gss_for_code): Handle GIMPLE_DEBUG. (gimple_build_with_ops_stat): Take subcode as unsigned. Adjust all callers. (gimple_build_debug_bind_stat): New. (empty_body_p): Skip debug stmts. (gimple_has_side_effects): Likewise. (gimple_rhs_has_side_effects): Likewise. * gimple.h (enum gimple_debug_subcode, GIMPLE_DEBUG_BIND): New. (gimple_build_debug_bind_stat): Declare. (gimple_build_debug_bind): Define. (is_gimple_debug): New. (gimple_debug_bind_p): New. (gimple_debug_bind_get_var): New. (gimple_debug_bind_get_value): New. (gimple_debug_bind_get_value_ptr): New. (gimple_debug_bind_set_var): New. (gimple_debug_bind_set_value): New. (GIMPLE_DEBUG_BIND_NOVALUE): New internal temporary macro. (gimple_debug_bind_reset_value): New. (gimple_debug_bind_has_value_p): New. (gsi_next_nondebug): New. (gsi_prev_nondebug): New. (gsi_start_nondebug_bb): New. (gsi_last_nondebug_bb): New. * sched-vis.c (print_pattern): Handle VAR_LOCATION. (print_insn): Handle DEBUG_INSN. * tree-cfg.c (remove_bb): Walk stmts backwards. Let loc of first insn prevail. (first_stmt): Skip debug stmts. (first_non_label_stmt): Likewise. (last_stmt): Likewise. (has_zero_uses_1): New. (single_imm_use_1): New. (verify_gimple_debug): New. (verify_types_in_gimple_stmt): Handle debug stmts. (verify_stmt): Likewise. (debug_loop_num): Skip debug stmts. (remove_edge_and_dominated_blocks): Remove dominators last. * tree-ssa-reasssoc.c (rewrite_expr_tree): Propagate into debug stmts. (linearize_expr): Likewise. * config/i386/i386.c (ix86_delegitimize_address): Call default implementation. * config/ia64/ia64.c (ia64_safe_itanium_class): Handle debug insns. (group_barrier_needed): Skip debug insns. (emit_insn_group_barriers): Likewise. (emit_all_insn_group_barriers): Likewise. (ia64_variable_issue): Handle debug insns. (ia64_dfa_new_cycle): Likewise. (final_emit_insn_group_barriers): Skip debug insns. (ia64_dwarf2out_def_steady_cfa): Take frame argument. Don't def cfa without frame. (process_set): Likewise. (process_for_unwind_directive): Pass frame on. * config/rs6000/rs6000.c (TARGET_DELEGITIMIZE_ADDRESS): Define. (rs6000_delegitimize_address): New. (rs6000_debug_adjust_cost): Handle debug insns. (is_microcoded_insn): Likewise. (is_cracked_insn): Likewise. (is_nonpipeline_insn): Likewise. (insn_must_be_first_in_group): Likewise. (insn_must_be_last_in_group): Likewise. (force_new_group): Likewise. * cfgrtl.c (rtl_split_block): Emit INSN_DELETED note if block contains only debug insns. (rtl_merge_blocks): Skip debug insns. (purge_dead_edges): Likewise. (rtl_block_ends_with_call_p): Skip debug insns. * dce.c (deletable_insn_p): Handle VAR_LOCATION. (mark_reg_dependencies): Skip debug insns. * params.def (PARAM_MIN_NONDEBUG_INSN_UID): New. * tree-ssanames.c (release_ssa_name): Propagate def into debug stmts. * tree-ssa-threadedge.c (record_temporary_equivalences_from_stmts): Skip debug stmts. * regcprop.c (replace_oldest_value_addr): Skip debug insns. (replace_oldest_value_mem): Use ALL_REGS for debug insns. (copyprop_hardreg_forward_1): Handle debug insns. * reload1.c (reload): Skip debug insns. Replace unassigned pseudos in debug insns with their equivalences. (eliminate_regs_in_insn): Skip debug insns. (emit_input_reload_insns): Skip debug insns at first, adjust them later. * tree-ssa-operands.c (add_virtual_operand): Reject debug stmts. (get_indirect_ref_operands): Pass opf_no_vops on. (get_expr_operands): Likewise. Skip debug stmts. (parse_ssa_operands): Scan debug insns with opf_no_vops. gcc/testsuite/ChangeLog: * gcc.dg/guality/guality.c: New. * gcc.dg/guality/guality.h: New. * gcc.dg/guality/guality.exp: New. * gcc.dg/guality/example.c: New. * lib/gcc-dg.exp (cleanup-dump): Remove .gk files. (cleanup-saved-temps): Likewise, .gkd files too. gcc/cp/ChangeLog: * cp-tree.h (TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS): New. * cp-lang.c (cxx_dwarf_name): Pass it. * error.c (count_non_default_template_args): Take flags as argument. Adjust all callers. Skip counting of default arguments if the new flag is given. ChangeLog: * Makefile.tpl (BUILD_CONFIG): Default to bootstrap-debug. * Makefile.in: Rebuilt. contrib/ChangeLog: * compare-debug: Look for .gkd files and compare them. config/ChangeLog: * bootstrap-debug.mk: Add comments. * bootstrap-debug-big.mk: New. * bootstrap-debug-lean.mk: New. * bootstrap-debug-ckovw.mk: Add comments. * bootstrap-debug-lib.mk: Drop CFLAGS for stages. Use -g0 for TFLAGS in stage1. Drop -fvar-tracking-assignments-toggle. From-SVN: r151312
2009-09-02 04:42:21 +02:00
if (!NONDEBUG_INSN_P (insn))
{
This patch normalizes more bitmap function names. sbitmap.h TEST_BIT -> bitmap_bit_p SET_BIT -> bitmap_set_bit SET_BIT_WITH_POPCOUNT -> bitmap_set_bit_with_popcount RESET_BIT -> bitmap_clear_bit RESET_BIT_WITH_POPCOUNT -> bitmap_clear_bit_with_popcount basic-block.h sbitmap_intersection_of_succs -> bitmap_intersection_of_succs sbitmap_intersection_of_preds -> bitmap_intersection_of_preds sbitmap_union_of_succs -> bitmap_union_of_succs sbitmap_union_of_preds -> bitmap_union_of_preds The sbitmap.h functions also needed their numeric paramter changed from unsigned int to int to match the bitmap functions. Callers updated to match. Tested on x86-64, config-list.mk testing. Index: gcc/ChangeLog 2012-11-01 Lawrence Crowl <crowl@google.com> * sbitmap.h (TEST_BIT): Rename bitmap_bit_p, normalizing parameter type. Update callers to match. (SET_BIT): Rename bitmap_set_bit, normalizing parameter type. Update callers to match. (SET_BIT_WITH_POPCOUNT): Rename bitmap_set_bit_with_popcount, normalizing parameter type. Update callers to match. (RESET_BIT): Rename bitmap_clear_bit, normalizing parameter type. Update callers to match. (RESET_BIT_WITH_POPCOUNT): Rename bitmap_clear_bit_with_popcount, normalizing parameter type. Update callers to match. * basic-block.h (sbitmap_intersection_of_succs): Rename bitmap_intersection_of_succs. Update callers to match. * basic-block.h (sbitmap_intersection_of_preds): Rename bitmap_intersection_of_preds. Update callers to match. * basic-block.h (sbitmap_union_of_succs): Rename bitmap_union_of_succs. Update callers to match. * basic-block.h (sbitmap_union_of_preds): Rename bitmap_union_of_preds. Update callers to match. From-SVN: r193066
2012-11-01 20:23:35 +01:00
bitmap_clear_bit (tobe_scheduled, u);
continue;
}
This patch normalizes more bitmap function names. sbitmap.h TEST_BIT -> bitmap_bit_p SET_BIT -> bitmap_set_bit SET_BIT_WITH_POPCOUNT -> bitmap_set_bit_with_popcount RESET_BIT -> bitmap_clear_bit RESET_BIT_WITH_POPCOUNT -> bitmap_clear_bit_with_popcount basic-block.h sbitmap_intersection_of_succs -> bitmap_intersection_of_succs sbitmap_intersection_of_preds -> bitmap_intersection_of_preds sbitmap_union_of_succs -> bitmap_union_of_succs sbitmap_union_of_preds -> bitmap_union_of_preds The sbitmap.h functions also needed their numeric paramter changed from unsigned int to int to match the bitmap functions. Callers updated to match. Tested on x86-64, config-list.mk testing. Index: gcc/ChangeLog 2012-11-01 Lawrence Crowl <crowl@google.com> * sbitmap.h (TEST_BIT): Rename bitmap_bit_p, normalizing parameter type. Update callers to match. (SET_BIT): Rename bitmap_set_bit, normalizing parameter type. Update callers to match. (SET_BIT_WITH_POPCOUNT): Rename bitmap_set_bit_with_popcount, normalizing parameter type. Update callers to match. (RESET_BIT): Rename bitmap_clear_bit, normalizing parameter type. Update callers to match. (RESET_BIT_WITH_POPCOUNT): Rename bitmap_clear_bit_with_popcount, normalizing parameter type. Update callers to match. * basic-block.h (sbitmap_intersection_of_succs): Rename bitmap_intersection_of_succs. Update callers to match. * basic-block.h (sbitmap_intersection_of_preds): Rename bitmap_intersection_of_preds. Update callers to match. * basic-block.h (sbitmap_union_of_succs): Rename bitmap_union_of_succs. Update callers to match. * basic-block.h (sbitmap_union_of_preds): Rename bitmap_union_of_preds. Update callers to match. From-SVN: r193066
2012-11-01 20:23:35 +01:00
if (bitmap_bit_p (sched_nodes, u))
continue;
/* Try to get non-empty scheduling window. */
success = 0;
2011-08-03 09:59:23 +02:00
if (get_sched_window (ps, u_node, sched_nodes, ii, &start,
&step, &end) == 0)
{
if (dump_file)
fprintf (dump_file, "\nTrying to schedule node %d "
"INSN = %d in (%d .. %d) step %d\n", u, (INSN_UID
(g->nodes[u].insn)), start, end, step);
gcc_assert ((step > 0 && start < end)
|| (step < 0 && start > end));
calculate_must_precede_follow (u_node, start, end, step, ii,
sched_nodes, must_precede,
must_follow);
for (c = start; c != end; c += step)
{
2011-08-03 09:59:23 +02:00
sbitmap tmp_precede, tmp_follow;
2011-08-03 09:59:23 +02:00
set_must_precede_follow (&tmp_follow, must_follow,
&tmp_precede, must_precede,
c, start, end, step);
success =
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
try_scheduling_node_in_cycle (ps, u, c,
sched_nodes,
&num_splits, tmp_precede,
tmp_follow);
if (success)
break;
}
verify_partial_schedule (ps, sched_nodes);
}
if (!success)
{
int split_row;
if (ii++ == maxii)
break;
if (num_splits >= MAX_SPLIT_NUM)
{
num_splits = 0;
flush_and_start_over = true;
verify_partial_schedule (ps, sched_nodes);
reset_partial_schedule (ps, ii);
verify_partial_schedule (ps, sched_nodes);
break;
}
num_splits++;
/* The scheduling window is exclusive of 'end'
whereas compute_split_window() expects an inclusive,
ordered range. */
if (step == 1)
split_row = compute_split_row (sched_nodes, start, end - 1,
ps->ii, u_node);
else
split_row = compute_split_row (sched_nodes, end + 1, start,
ps->ii, u_node);
ps_insert_empty_row (ps, split_row, sched_nodes);
i--; /* Go back and retry node i. */
if (dump_file)
fprintf (dump_file, "num_splits=%d\n", num_splits);
}
/* ??? If (success), check register pressure estimates. */
} /* Continue with next node. */
} /* While flush_and_start_over. */
if (ii >= maxii)
{
free_partial_schedule (ps);
ps = NULL;
}
else
This patch implements the unification of the *bitmap interfaces as discussed. Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
2012-10-30 01:02:55 +01:00
gcc_assert (bitmap_equal_p (tobe_scheduled, sched_nodes));
return ps;
}
/* This function inserts a new empty row into PS at the position
according to SPLITROW, keeping all already scheduled instructions
intact and updating their SCHED_TIME and cycle accordingly. */
static void
ps_insert_empty_row (partial_schedule_ptr ps, int split_row,
sbitmap sched_nodes)
{
ps_insn_ptr crr_insn;
ps_insn_ptr *rows_new;
int ii = ps->ii;
int new_ii = ii + 1;
int row;
int *rows_length_new;
verify_partial_schedule (ps, sched_nodes);
/* We normalize sched_time and rotate ps to have only non-negative sched
times, for simplicity of updating cycles after inserting new row. */
split_row -= ps->min_cycle;
split_row = SMODULO (split_row, ii);
if (dump_file)
fprintf (dump_file, "split_row=%d\n", split_row);
reset_sched_times (ps, PS_MIN_CYCLE (ps));
rotate_partial_schedule (ps, PS_MIN_CYCLE (ps));
rows_new = (ps_insn_ptr *) xcalloc (new_ii, sizeof (ps_insn_ptr));
rows_length_new = (int *) xcalloc (new_ii, sizeof (int));
for (row = 0; row < split_row; row++)
{
rows_new[row] = ps->rows[row];
rows_length_new[row] = ps->rows_length[row];
ps->rows[row] = NULL;
for (crr_insn = rows_new[row];
crr_insn; crr_insn = crr_insn->next_in_row)
{
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
int u = crr_insn->id;
int new_time = SCHED_TIME (u) + (SCHED_TIME (u) / ii);
SCHED_TIME (u) = new_time;
crr_insn->cycle = new_time;
SCHED_ROW (u) = new_time % new_ii;
SCHED_STAGE (u) = new_time / new_ii;
}
}
rows_new[split_row] = NULL;
for (row = split_row; row < ii; row++)
{
rows_new[row + 1] = ps->rows[row];
rows_length_new[row + 1] = ps->rows_length[row];
ps->rows[row] = NULL;
for (crr_insn = rows_new[row + 1];
crr_insn; crr_insn = crr_insn->next_in_row)
{
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
int u = crr_insn->id;
int new_time = SCHED_TIME (u) + (SCHED_TIME (u) / ii) + 1;
SCHED_TIME (u) = new_time;
crr_insn->cycle = new_time;
SCHED_ROW (u) = new_time % new_ii;
SCHED_STAGE (u) = new_time / new_ii;
}
}
/* Updating ps. */
ps->min_cycle = ps->min_cycle + ps->min_cycle / ii
+ (SMODULO (ps->min_cycle, ii) >= split_row ? 1 : 0);
ps->max_cycle = ps->max_cycle + ps->max_cycle / ii
+ (SMODULO (ps->max_cycle, ii) >= split_row ? 1 : 0);
free (ps->rows);
ps->rows = rows_new;
free (ps->rows_length);
ps->rows_length = rows_length_new;
ps->ii = new_ii;
gcc_assert (ps->min_cycle >= 0);
verify_partial_schedule (ps, sched_nodes);
if (dump_file)
fprintf (dump_file, "min_cycle=%d, max_cycle=%d\n", ps->min_cycle,
ps->max_cycle);
}
/* Given U_NODE which is the node that failed to be scheduled; LOW and
UP which are the boundaries of it's scheduling window; compute using
SCHED_NODES and II a row in the partial schedule that can be split
which will separate a critical predecessor from a critical successor
thereby expanding the window, and return it. */
static int
compute_split_row (sbitmap sched_nodes, int low, int up, int ii,
ddg_node_ptr u_node)
{
ddg_edge_ptr e;
int lower = INT_MIN, upper = INT_MAX;
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
int crit_pred = -1;
int crit_succ = -1;
int crit_cycle;
for (e = u_node->in; e != 0; e = e->next_in)
{
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
int v = e->src->cuid;
This patch normalizes more bitmap function names. sbitmap.h TEST_BIT -> bitmap_bit_p SET_BIT -> bitmap_set_bit SET_BIT_WITH_POPCOUNT -> bitmap_set_bit_with_popcount RESET_BIT -> bitmap_clear_bit RESET_BIT_WITH_POPCOUNT -> bitmap_clear_bit_with_popcount basic-block.h sbitmap_intersection_of_succs -> bitmap_intersection_of_succs sbitmap_intersection_of_preds -> bitmap_intersection_of_preds sbitmap_union_of_succs -> bitmap_union_of_succs sbitmap_union_of_preds -> bitmap_union_of_preds The sbitmap.h functions also needed their numeric paramter changed from unsigned int to int to match the bitmap functions. Callers updated to match. Tested on x86-64, config-list.mk testing. Index: gcc/ChangeLog 2012-11-01 Lawrence Crowl <crowl@google.com> * sbitmap.h (TEST_BIT): Rename bitmap_bit_p, normalizing parameter type. Update callers to match. (SET_BIT): Rename bitmap_set_bit, normalizing parameter type. Update callers to match. (SET_BIT_WITH_POPCOUNT): Rename bitmap_set_bit_with_popcount, normalizing parameter type. Update callers to match. (RESET_BIT): Rename bitmap_clear_bit, normalizing parameter type. Update callers to match. (RESET_BIT_WITH_POPCOUNT): Rename bitmap_clear_bit_with_popcount, normalizing parameter type. Update callers to match. * basic-block.h (sbitmap_intersection_of_succs): Rename bitmap_intersection_of_succs. Update callers to match. * basic-block.h (sbitmap_intersection_of_preds): Rename bitmap_intersection_of_preds. Update callers to match. * basic-block.h (sbitmap_union_of_succs): Rename bitmap_union_of_succs. Update callers to match. * basic-block.h (sbitmap_union_of_preds): Rename bitmap_union_of_preds. Update callers to match. From-SVN: r193066
2012-11-01 20:23:35 +01:00
if (bitmap_bit_p (sched_nodes, v)
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
&& (low == SCHED_TIME (v) + e->latency - (e->distance * ii)))
if (SCHED_TIME (v) > lower)
{
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
crit_pred = v;
lower = SCHED_TIME (v);
}
}
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
if (crit_pred >= 0)
{
crit_cycle = SCHED_TIME (crit_pred) + 1;
return SMODULO (crit_cycle, ii);
}
for (e = u_node->out; e != 0; e = e->next_out)
{
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
int v = e->dest->cuid;
This patch normalizes more bitmap function names. sbitmap.h TEST_BIT -> bitmap_bit_p SET_BIT -> bitmap_set_bit SET_BIT_WITH_POPCOUNT -> bitmap_set_bit_with_popcount RESET_BIT -> bitmap_clear_bit RESET_BIT_WITH_POPCOUNT -> bitmap_clear_bit_with_popcount basic-block.h sbitmap_intersection_of_succs -> bitmap_intersection_of_succs sbitmap_intersection_of_preds -> bitmap_intersection_of_preds sbitmap_union_of_succs -> bitmap_union_of_succs sbitmap_union_of_preds -> bitmap_union_of_preds The sbitmap.h functions also needed their numeric paramter changed from unsigned int to int to match the bitmap functions. Callers updated to match. Tested on x86-64, config-list.mk testing. Index: gcc/ChangeLog 2012-11-01 Lawrence Crowl <crowl@google.com> * sbitmap.h (TEST_BIT): Rename bitmap_bit_p, normalizing parameter type. Update callers to match. (SET_BIT): Rename bitmap_set_bit, normalizing parameter type. Update callers to match. (SET_BIT_WITH_POPCOUNT): Rename bitmap_set_bit_with_popcount, normalizing parameter type. Update callers to match. (RESET_BIT): Rename bitmap_clear_bit, normalizing parameter type. Update callers to match. (RESET_BIT_WITH_POPCOUNT): Rename bitmap_clear_bit_with_popcount, normalizing parameter type. Update callers to match. * basic-block.h (sbitmap_intersection_of_succs): Rename bitmap_intersection_of_succs. Update callers to match. * basic-block.h (sbitmap_intersection_of_preds): Rename bitmap_intersection_of_preds. Update callers to match. * basic-block.h (sbitmap_union_of_succs): Rename bitmap_union_of_succs. Update callers to match. * basic-block.h (sbitmap_union_of_preds): Rename bitmap_union_of_preds. Update callers to match. From-SVN: r193066
2012-11-01 20:23:35 +01:00
if (bitmap_bit_p (sched_nodes, v)
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
&& (up == SCHED_TIME (v) - e->latency + (e->distance * ii)))
if (SCHED_TIME (v) < upper)
{
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
crit_succ = v;
upper = SCHED_TIME (v);
}
}
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
if (crit_succ >= 0)
{
crit_cycle = SCHED_TIME (crit_succ);
return SMODULO (crit_cycle, ii);
}
if (dump_file)
fprintf (dump_file, "Both crit_pred and crit_succ are NULL\n");
return SMODULO ((low + up + 1) / 2, ii);
}
static void
verify_partial_schedule (partial_schedule_ptr ps, sbitmap sched_nodes)
{
int row;
ps_insn_ptr crr_insn;
for (row = 0; row < ps->ii; row++)
{
int length = 0;
for (crr_insn = ps->rows[row]; crr_insn; crr_insn = crr_insn->next_in_row)
{
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
int u = crr_insn->id;
length++;
This patch normalizes more bitmap function names. sbitmap.h TEST_BIT -> bitmap_bit_p SET_BIT -> bitmap_set_bit SET_BIT_WITH_POPCOUNT -> bitmap_set_bit_with_popcount RESET_BIT -> bitmap_clear_bit RESET_BIT_WITH_POPCOUNT -> bitmap_clear_bit_with_popcount basic-block.h sbitmap_intersection_of_succs -> bitmap_intersection_of_succs sbitmap_intersection_of_preds -> bitmap_intersection_of_preds sbitmap_union_of_succs -> bitmap_union_of_succs sbitmap_union_of_preds -> bitmap_union_of_preds The sbitmap.h functions also needed their numeric paramter changed from unsigned int to int to match the bitmap functions. Callers updated to match. Tested on x86-64, config-list.mk testing. Index: gcc/ChangeLog 2012-11-01 Lawrence Crowl <crowl@google.com> * sbitmap.h (TEST_BIT): Rename bitmap_bit_p, normalizing parameter type. Update callers to match. (SET_BIT): Rename bitmap_set_bit, normalizing parameter type. Update callers to match. (SET_BIT_WITH_POPCOUNT): Rename bitmap_set_bit_with_popcount, normalizing parameter type. Update callers to match. (RESET_BIT): Rename bitmap_clear_bit, normalizing parameter type. Update callers to match. (RESET_BIT_WITH_POPCOUNT): Rename bitmap_clear_bit_with_popcount, normalizing parameter type. Update callers to match. * basic-block.h (sbitmap_intersection_of_succs): Rename bitmap_intersection_of_succs. Update callers to match. * basic-block.h (sbitmap_intersection_of_preds): Rename bitmap_intersection_of_preds. Update callers to match. * basic-block.h (sbitmap_union_of_succs): Rename bitmap_union_of_succs. Update callers to match. * basic-block.h (sbitmap_union_of_preds): Rename bitmap_union_of_preds. Update callers to match. From-SVN: r193066
2012-11-01 20:23:35 +01:00
gcc_assert (bitmap_bit_p (sched_nodes, u));
/* ??? Test also that all nodes of sched_nodes are in ps, perhaps by
popcount (sched_nodes) == number of insns in ps. */
gcc_assert (SCHED_TIME (u) >= ps->min_cycle);
gcc_assert (SCHED_TIME (u) <= ps->max_cycle);
}
gcc_assert (ps->rows_length[row] == length);
}
}
/* This page implements the algorithm for ordering the nodes of a DDG
for modulo scheduling, activated through the
"int sms_order_nodes (ddg_ptr, int mii, int * result)" API. */
#define ORDER_PARAMS(x) ((struct node_order_params *) (x)->aux.info)
#define ASAP(x) (ORDER_PARAMS ((x))->asap)
#define ALAP(x) (ORDER_PARAMS ((x))->alap)
#define HEIGHT(x) (ORDER_PARAMS ((x))->height)
#define MOB(x) (ALAP ((x)) - ASAP ((x)))
#define DEPTH(x) (ASAP ((x)))
typedef struct node_order_params * nopa;
static void order_nodes_of_sccs (ddg_all_sccs_ptr, int * result);
static int order_nodes_in_scc (ddg_ptr, sbitmap, sbitmap, int*, int);
static nopa calculate_order_params (ddg_ptr, int, int *);
static int find_max_asap (ddg_ptr, sbitmap);
static int find_max_hv_min_mob (ddg_ptr, sbitmap);
static int find_max_dv_min_mob (ddg_ptr, sbitmap);
enum sms_direction {BOTTOMUP, TOPDOWN};
struct node_order_params
{
int asap;
int alap;
int height;
};
/* Check if NODE_ORDER contains a permutation of 0 .. NUM_NODES-1. */
static void
check_nodes_order (int *node_order, int num_nodes)
{
int i;
use auto_sbitmap in various places gcc/ChangeLog: 2016-07-26 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * bt-load.c (compute_out): Use auto_sbitmap class. (link_btr_uses): Likewise. * cfganal.c (mark_dfs_back_edges): Likewise. (post_order_compute): Likewise. (inverted_post_order_compute): Likewise. (pre_and_rev_post_order_compute_fn): Likewise. (single_pred_before_succ_order): Likewise. * cfgexpand.c (pass_expand::execute): Likewise. * cfgloop.c (verify_loop_structure): Likewise. * cfgloopmanip.c (fix_bb_placements): Likewise. (remove_path): Likewise. (update_dominators_in_loop): Likewise. * cfgrtl.c (break_superblocks): Likewise. * ddg.c (check_sccs): Likewise. (create_ddg_all_sccs): Likewise. * df-core.c (df_worklist_dataflow): Likewise. * dse.c (dse_step3): Likewise. * except.c (eh_region_outermost): Likewise. * function.c (thread_prologue_and_epilogue_insns): Likewise. * gcse.c (prune_expressions): Likewise. (prune_insertions_deletions): Likewise. * gimple-ssa-backprop.c (backprop::~backprop): Likewise. * graph.c (draw_cfg_nodes_no_loops): Likewise. * ira-lives.c (remove_some_program_points_and_update_live_ranges): Likewise. * lcm.c (compute_earliest): Likewise. (compute_farthest): Likewise. * loop-unroll.c (unroll_loop_constant_iterations): Likewise. (unroll_loop_runtime_iterations): Likewise. (unroll_loop_stupid): Likewise. * lower-subreg.c (decompose_multiword_subregs): Likewise. * lra-lives.c: Likewise. * lra.c (lra): Likewise. * modulo-sched.c (schedule_reg_moves): Likewise. (optimize_sc): Likewise. (get_sched_window): Likewise. (sms_schedule_by_order): Likewise. (check_nodes_order): Likewise. (order_nodes_of_sccs): Likewise. (order_nodes_in_scc): Likewise. * recog.c (split_all_insns): Likewise. * regcprop.c (pass_cprop_hardreg::execute): Likewise. * reload1.c (reload): Likewise. * sched-rgn.c (haifa_find_rgns): Likewise. (split_edges): Likewise. (compute_trg_info): Likewise. * sel-sched.c (init_seqno): Likewise. * store-motion.c (remove_reachable_equiv_notes): Likewise. * tree-into-ssa.c (update_ssa): Likewise. * tree-ssa-live.c (live_worklist): Likewise. * tree-ssa-loop-im.c (fill_always_executed_in): Likewise. * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): * Likewise. (try_peel_loop): Likewise. * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): * Likewise. * tree-ssa-pre.c (compute_antic): Likewise. * tree-ssa-reassoc.c (undistribute_ops_list): Likewise. * tree-stdarg.c (reachable_at_most_once): Likewise. * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Likewise. * var-tracking.c (vt_find_locations): Likewise. From-SVN: r238748
2016-07-26 12:44:08 +02:00
auto_sbitmap tmp (num_nodes);
This patch implements the unification of the *bitmap interfaces as discussed. Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
2012-10-30 01:02:55 +01:00
bitmap_clear (tmp);
2007-10-10 11:48:18 +02:00
if (dump_file)
fprintf (dump_file, "SMS final nodes order: \n");
for (i = 0; i < num_nodes; i++)
{
int u = node_order[i];
2007-10-10 11:48:18 +02:00
if (dump_file)
fprintf (dump_file, "%d ", u);
This patch normalizes more bitmap function names. sbitmap.h TEST_BIT -> bitmap_bit_p SET_BIT -> bitmap_set_bit SET_BIT_WITH_POPCOUNT -> bitmap_set_bit_with_popcount RESET_BIT -> bitmap_clear_bit RESET_BIT_WITH_POPCOUNT -> bitmap_clear_bit_with_popcount basic-block.h sbitmap_intersection_of_succs -> bitmap_intersection_of_succs sbitmap_intersection_of_preds -> bitmap_intersection_of_preds sbitmap_union_of_succs -> bitmap_union_of_succs sbitmap_union_of_preds -> bitmap_union_of_preds The sbitmap.h functions also needed their numeric paramter changed from unsigned int to int to match the bitmap functions. Callers updated to match. Tested on x86-64, config-list.mk testing. Index: gcc/ChangeLog 2012-11-01 Lawrence Crowl <crowl@google.com> * sbitmap.h (TEST_BIT): Rename bitmap_bit_p, normalizing parameter type. Update callers to match. (SET_BIT): Rename bitmap_set_bit, normalizing parameter type. Update callers to match. (SET_BIT_WITH_POPCOUNT): Rename bitmap_set_bit_with_popcount, normalizing parameter type. Update callers to match. (RESET_BIT): Rename bitmap_clear_bit, normalizing parameter type. Update callers to match. (RESET_BIT_WITH_POPCOUNT): Rename bitmap_clear_bit_with_popcount, normalizing parameter type. Update callers to match. * basic-block.h (sbitmap_intersection_of_succs): Rename bitmap_intersection_of_succs. Update callers to match. * basic-block.h (sbitmap_intersection_of_preds): Rename bitmap_intersection_of_preds. Update callers to match. * basic-block.h (sbitmap_union_of_succs): Rename bitmap_union_of_succs. Update callers to match. * basic-block.h (sbitmap_union_of_preds): Rename bitmap_union_of_preds. Update callers to match. From-SVN: r193066
2012-11-01 20:23:35 +01:00
gcc_assert (u < num_nodes && u >= 0 && !bitmap_bit_p (tmp, u));
This patch normalizes more bitmap function names. sbitmap.h TEST_BIT -> bitmap_bit_p SET_BIT -> bitmap_set_bit SET_BIT_WITH_POPCOUNT -> bitmap_set_bit_with_popcount RESET_BIT -> bitmap_clear_bit RESET_BIT_WITH_POPCOUNT -> bitmap_clear_bit_with_popcount basic-block.h sbitmap_intersection_of_succs -> bitmap_intersection_of_succs sbitmap_intersection_of_preds -> bitmap_intersection_of_preds sbitmap_union_of_succs -> bitmap_union_of_succs sbitmap_union_of_preds -> bitmap_union_of_preds The sbitmap.h functions also needed their numeric paramter changed from unsigned int to int to match the bitmap functions. Callers updated to match. Tested on x86-64, config-list.mk testing. Index: gcc/ChangeLog 2012-11-01 Lawrence Crowl <crowl@google.com> * sbitmap.h (TEST_BIT): Rename bitmap_bit_p, normalizing parameter type. Update callers to match. (SET_BIT): Rename bitmap_set_bit, normalizing parameter type. Update callers to match. (SET_BIT_WITH_POPCOUNT): Rename bitmap_set_bit_with_popcount, normalizing parameter type. Update callers to match. (RESET_BIT): Rename bitmap_clear_bit, normalizing parameter type. Update callers to match. (RESET_BIT_WITH_POPCOUNT): Rename bitmap_clear_bit_with_popcount, normalizing parameter type. Update callers to match. * basic-block.h (sbitmap_intersection_of_succs): Rename bitmap_intersection_of_succs. Update callers to match. * basic-block.h (sbitmap_intersection_of_preds): Rename bitmap_intersection_of_preds. Update callers to match. * basic-block.h (sbitmap_union_of_succs): Rename bitmap_union_of_succs. Update callers to match. * basic-block.h (sbitmap_union_of_preds): Rename bitmap_union_of_preds. Update callers to match. From-SVN: r193066
2012-11-01 20:23:35 +01:00
bitmap_set_bit (tmp, u);
}
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: 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-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.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. * 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. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: 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-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.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-live.h: 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-operands.h: 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-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.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-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
2007-10-10 11:48:18 +02:00
if (dump_file)
fprintf (dump_file, "\n");
}
/* Order the nodes of G for scheduling and pass the result in
NODE_ORDER. Also set aux.count of each node to ASAP.
Put maximal ASAP to PMAX_ASAP. Return the recMII for the given DDG. */
static int
sms_order_nodes (ddg_ptr g, int mii, int * node_order, int *pmax_asap)
{
int i;
int rec_mii = 0;
ddg_all_sccs_ptr sccs = create_ddg_all_sccs (g);
nopa nops = calculate_order_params (g, mii, pmax_asap);
if (dump_file)
print_sccs (dump_file, sccs, g);
order_nodes_of_sccs (sccs, node_order);
if (sccs->num_sccs > 0)
/* First SCC has the largest recurrence_length. */
rec_mii = sccs->sccs[0]->recurrence_length;
/* Save ASAP before destroying node_order_params. */
for (i = 0; i < g->num_nodes; i++)
{
ddg_node_ptr v = &g->nodes[i];
v->aux.count = ASAP (v);
}
free (nops);
free_ddg_all_sccs (sccs);
check_nodes_order (node_order, g->num_nodes);
return rec_mii;
}
static void
order_nodes_of_sccs (ddg_all_sccs_ptr all_sccs, int * node_order)
{
int i, pos = 0;
ddg_ptr g = all_sccs->ddg;
int num_nodes = g->num_nodes;
use auto_sbitmap in various places gcc/ChangeLog: 2016-07-26 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * bt-load.c (compute_out): Use auto_sbitmap class. (link_btr_uses): Likewise. * cfganal.c (mark_dfs_back_edges): Likewise. (post_order_compute): Likewise. (inverted_post_order_compute): Likewise. (pre_and_rev_post_order_compute_fn): Likewise. (single_pred_before_succ_order): Likewise. * cfgexpand.c (pass_expand::execute): Likewise. * cfgloop.c (verify_loop_structure): Likewise. * cfgloopmanip.c (fix_bb_placements): Likewise. (remove_path): Likewise. (update_dominators_in_loop): Likewise. * cfgrtl.c (break_superblocks): Likewise. * ddg.c (check_sccs): Likewise. (create_ddg_all_sccs): Likewise. * df-core.c (df_worklist_dataflow): Likewise. * dse.c (dse_step3): Likewise. * except.c (eh_region_outermost): Likewise. * function.c (thread_prologue_and_epilogue_insns): Likewise. * gcse.c (prune_expressions): Likewise. (prune_insertions_deletions): Likewise. * gimple-ssa-backprop.c (backprop::~backprop): Likewise. * graph.c (draw_cfg_nodes_no_loops): Likewise. * ira-lives.c (remove_some_program_points_and_update_live_ranges): Likewise. * lcm.c (compute_earliest): Likewise. (compute_farthest): Likewise. * loop-unroll.c (unroll_loop_constant_iterations): Likewise. (unroll_loop_runtime_iterations): Likewise. (unroll_loop_stupid): Likewise. * lower-subreg.c (decompose_multiword_subregs): Likewise. * lra-lives.c: Likewise. * lra.c (lra): Likewise. * modulo-sched.c (schedule_reg_moves): Likewise. (optimize_sc): Likewise. (get_sched_window): Likewise. (sms_schedule_by_order): Likewise. (check_nodes_order): Likewise. (order_nodes_of_sccs): Likewise. (order_nodes_in_scc): Likewise. * recog.c (split_all_insns): Likewise. * regcprop.c (pass_cprop_hardreg::execute): Likewise. * reload1.c (reload): Likewise. * sched-rgn.c (haifa_find_rgns): Likewise. (split_edges): Likewise. (compute_trg_info): Likewise. * sel-sched.c (init_seqno): Likewise. * store-motion.c (remove_reachable_equiv_notes): Likewise. * tree-into-ssa.c (update_ssa): Likewise. * tree-ssa-live.c (live_worklist): Likewise. * tree-ssa-loop-im.c (fill_always_executed_in): Likewise. * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): * Likewise. (try_peel_loop): Likewise. * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): * Likewise. * tree-ssa-pre.c (compute_antic): Likewise. * tree-ssa-reassoc.c (undistribute_ops_list): Likewise. * tree-stdarg.c (reachable_at_most_once): Likewise. * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Likewise. * var-tracking.c (vt_find_locations): Likewise. From-SVN: r238748
2016-07-26 12:44:08 +02:00
auto_sbitmap prev_sccs (num_nodes);
auto_sbitmap on_path (num_nodes);
auto_sbitmap tmp (num_nodes);
auto_sbitmap ones (num_nodes);
This patch implements the unification of the *bitmap interfaces as discussed. Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
2012-10-30 01:02:55 +01:00
bitmap_clear (prev_sccs);
bitmap_ones (ones);
cgraph.c: Fix typos in comments. gcc/ * cgraph.c: Fix typos in comments. (cgraph_availability_names): Fix string typo. * fold-const.c: Fix typos in comments. (fold_binary): Fix typo in warning. * genautomata.c: Fix typos in comments. (check_presence_pattern_sets): Fix typo in local variable. (output_description): Fix typo in output. * ggc-zone.c (ggc_pch_finish): Fix typo in error message. * hwint.h: Likewise. * matrix-reorg.c (check_allocation_function): Likewise. * omega.c (smooth_weird_equations): Likewise. * auto-inc-dec.c: Fix typos in comments. * bb-reorder.c: Likewise. * builtins.c: Likewise. * c-common.c: Likewise. * c-cppbuiltin.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfglayout.c: Likewise. * cfgloopmanip.c: Likewise. * cgraphunit.c: Likewise. * coverage.c: Likewise. * dbxout.c: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dfp.c: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * dse.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * function.c: Likewise. * function.h: Likewise. * gcc.c: Likewise. * gcov-io.c: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattrtab.c: Likewise. * ggc-page.c: Likewise. * gimplify.c: Likewise. * gthr-lynx.h: Likewise. * haifa-sched.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.h: Likewise. * ipa-pure-const.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa.c: Likewise. * loop-doloop.c: Likewise. * mips-tfile.c: Likewise. * mkmap-flat.awk: Likewise. * mkmap-symver.awk: Likewise. * modulo-sched.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts.c: Likewise. * passes.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * pretty-print.h: Likewise. * profile.c: Likewise. * protoize.c: Likewise. * ra-conflict.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * regclass.c: Likewise. * regs.h: Likewise. * reload.c: Likewise. * rtl-error.c: Likewise. * rtlanal.c: Likewise. * scan.h: Likewise. * sched-rgn.c: Likewise. * see.c: Likewise. * stmt.c: Likewise. * target.h: Likewise. * tree-dfa.c: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-alias-warnings.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.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-ivopts.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa.c: Likewise. * tree-vect-analyze.c: Likewise. * tree-vect-transform.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vn.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * unwind-dw2-fde.c: Likewise. * unwind.inc: Likewise. * value-prof.c: Likewise. * vmsdbgout.c: Likewise. From-SVN: r136425
2008-06-06 07:42:00 +02:00
/* Perform the node ordering starting from the SCC with the highest recMII.
For each SCC order the nodes according to their ASAP/ALAP/HEIGHT etc. */
for (i = 0; i < all_sccs->num_sccs; i++)
{
ddg_scc_ptr scc = all_sccs->sccs[i];
/* Add nodes on paths from previous SCCs to the current SCC. */
find_nodes_on_paths (on_path, g, prev_sccs, scc->nodes);
This patch implements the unification of the *bitmap interfaces as discussed. Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
2012-10-30 01:02:55 +01:00
bitmap_ior (tmp, scc->nodes, on_path);
/* Add nodes on paths from the current SCC to previous SCCs. */
find_nodes_on_paths (on_path, g, scc->nodes, prev_sccs);
This patch implements the unification of the *bitmap interfaces as discussed. Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
2012-10-30 01:02:55 +01:00
bitmap_ior (tmp, tmp, on_path);
/* Remove nodes of previous SCCs from current extended SCC. */
This patch implements the unification of the *bitmap interfaces as discussed. Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
2012-10-30 01:02:55 +01:00
bitmap_and_compl (tmp, tmp, prev_sccs);
pos = order_nodes_in_scc (g, prev_sccs, tmp, node_order, pos);
/* Above call to order_nodes_in_scc updated prev_sccs |= tmp. */
}
/* Handle the remaining nodes that do not belong to any scc. Each call
to order_nodes_in_scc handles a single connected component. */
while (pos < g->num_nodes)
{
This patch implements the unification of the *bitmap interfaces as discussed. Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
2012-10-30 01:02:55 +01:00
bitmap_and_compl (tmp, ones, prev_sccs);
pos = order_nodes_in_scc (g, prev_sccs, tmp, node_order, pos);
}
}
/* MII is needed if we consider backarcs (that do not close recursive cycles). */
static struct node_order_params *
calculate_order_params (ddg_ptr g, int mii ATTRIBUTE_UNUSED, int *pmax_asap)
{
int u;
int max_asap;
int num_nodes = g->num_nodes;
ddg_edge_ptr e;
/* Allocate a place to hold ordering params for each node in the DDG. */
nopa node_order_params_arr;
/* Initialize of ASAP/ALAP/HEIGHT to zero. */
node_order_params_arr = (nopa) xcalloc (num_nodes,
sizeof (struct node_order_params));
/* Set the aux pointer of each node to point to its order_params structure. */
for (u = 0; u < num_nodes; u++)
g->nodes[u].aux.info = &node_order_params_arr[u];
/* Disregarding a backarc from each recursive cycle to obtain a DAG,
calculate ASAP, ALAP, mobility, distance, and height for each node
in the dependence (direct acyclic) graph. */
/* We assume that the nodes in the array are in topological order. */
max_asap = 0;
for (u = 0; u < num_nodes; u++)
{
ddg_node_ptr u_node = &g->nodes[u];
ASAP (u_node) = 0;
for (e = u_node->in; e; e = e->next_in)
if (e->distance == 0)
ASAP (u_node) = MAX (ASAP (u_node),
ASAP (e->src) + e->latency);
max_asap = MAX (max_asap, ASAP (u_node));
}
for (u = num_nodes - 1; u > -1; u--)
{
ddg_node_ptr u_node = &g->nodes[u];
ALAP (u_node) = max_asap;
HEIGHT (u_node) = 0;
for (e = u_node->out; e; e = e->next_out)
if (e->distance == 0)
{
ALAP (u_node) = MIN (ALAP (u_node),
ALAP (e->dest) - e->latency);
HEIGHT (u_node) = MAX (HEIGHT (u_node),
HEIGHT (e->dest) + e->latency);
}
}
2007-10-10 11:48:18 +02:00
if (dump_file)
{
fprintf (dump_file, "\nOrder params\n");
for (u = 0; u < num_nodes; u++)
{
ddg_node_ptr u_node = &g->nodes[u];
fprintf (dump_file, "node %d, ASAP: %d, ALAP: %d, HEIGHT: %d\n", u,
ASAP (u_node), ALAP (u_node), HEIGHT (u_node));
}
}
*pmax_asap = max_asap;
return node_order_params_arr;
}
static int
find_max_asap (ddg_ptr g, sbitmap nodes)
{
unsigned int u = 0;
int max_asap = -1;
int result = -1;
sbitmap_iterator sbi;
This patch renames sbitmap iterators to unify them with the bitmap iterators. Remove the unused EXECUTE_IF_SET_IN_SBITMAP_REV, which has an unconventional interface. Rename the sbitmap_iter_* functions to match bitmap's bmp_iter_* functions. Add an additional parameter to the initialization and next functions to match the interface in bmp_iter_*. This extra parameter is mostly hidden by the use of the EXECUTE_IF macros. Rename the EXECUTE_IF_SET_IN_SBITMAP macro to EXECUTE_IF_SET_IN_BITMAP. Its implementation is now identical to that in bitmap.h. To prevent redefinition errors, both definitions are now guarded by #ifndef. An alternate strategy is to simply include bitmap.h from sbitmap.h. As this would increase build time, I have elected to use the #ifndef version. I do not have a strong preference here. The sbitmap_iterator type is still distinctly named because it is often declared in contexts where the bitmap type is not obvious. There are less than 40 uses of this type, so the burden to modify it when changing bitmap types is not large. Tested on x86-64, config-list.mk testing. Index: gcc/ChangeLog 2012-10-31 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_iter_init): Rename bmp_iter_set_init and add unused parameter to match bitmap iterator. Update callers. (sbitmap_iter_cond): Rename bmp_iter_set. Update callers. (sbitmap_iter_next): Rename bmp_iter_next and add unused parameter to match bitmap iterator. Update callers. (EXECUTE_IF_SET_IN_SBITMAP_REV): Remove unused. (EXECUTE_IF_SET_IN_SBITMAP): Rename EXECUTE_IF_SET_IN_BITMAP and adjust to be identical to the definition in bitmap.h. Conditionalize the definition based on not having been defined. Update callers. * bitmap.h (EXECUTE_IF_SET_IN_BITMAP): Conditionalize the definition based on not having been defined. (To match the above.) From-SVN: r193069
2012-11-01 22:02:15 +01:00
EXECUTE_IF_SET_IN_BITMAP (nodes, 0, u, sbi)
{
ddg_node_ptr u_node = &g->nodes[u];
if (max_asap < ASAP (u_node))
{
max_asap = ASAP (u_node);
result = u;
}
}
return result;
}
static int
find_max_hv_min_mob (ddg_ptr g, sbitmap nodes)
{
unsigned int u = 0;
int max_hv = -1;
int min_mob = INT_MAX;
int result = -1;
sbitmap_iterator sbi;
This patch renames sbitmap iterators to unify them with the bitmap iterators. Remove the unused EXECUTE_IF_SET_IN_SBITMAP_REV, which has an unconventional interface. Rename the sbitmap_iter_* functions to match bitmap's bmp_iter_* functions. Add an additional parameter to the initialization and next functions to match the interface in bmp_iter_*. This extra parameter is mostly hidden by the use of the EXECUTE_IF macros. Rename the EXECUTE_IF_SET_IN_SBITMAP macro to EXECUTE_IF_SET_IN_BITMAP. Its implementation is now identical to that in bitmap.h. To prevent redefinition errors, both definitions are now guarded by #ifndef. An alternate strategy is to simply include bitmap.h from sbitmap.h. As this would increase build time, I have elected to use the #ifndef version. I do not have a strong preference here. The sbitmap_iterator type is still distinctly named because it is often declared in contexts where the bitmap type is not obvious. There are less than 40 uses of this type, so the burden to modify it when changing bitmap types is not large. Tested on x86-64, config-list.mk testing. Index: gcc/ChangeLog 2012-10-31 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_iter_init): Rename bmp_iter_set_init and add unused parameter to match bitmap iterator. Update callers. (sbitmap_iter_cond): Rename bmp_iter_set. Update callers. (sbitmap_iter_next): Rename bmp_iter_next and add unused parameter to match bitmap iterator. Update callers. (EXECUTE_IF_SET_IN_SBITMAP_REV): Remove unused. (EXECUTE_IF_SET_IN_SBITMAP): Rename EXECUTE_IF_SET_IN_BITMAP and adjust to be identical to the definition in bitmap.h. Conditionalize the definition based on not having been defined. Update callers. * bitmap.h (EXECUTE_IF_SET_IN_BITMAP): Conditionalize the definition based on not having been defined. (To match the above.) From-SVN: r193069
2012-11-01 22:02:15 +01:00
EXECUTE_IF_SET_IN_BITMAP (nodes, 0, u, sbi)
{
ddg_node_ptr u_node = &g->nodes[u];
if (max_hv < HEIGHT (u_node))
{
max_hv = HEIGHT (u_node);
min_mob = MOB (u_node);
result = u;
}
else if ((max_hv == HEIGHT (u_node))
&& (min_mob > MOB (u_node)))
{
min_mob = MOB (u_node);
result = u;
}
}
return result;
}
static int
find_max_dv_min_mob (ddg_ptr g, sbitmap nodes)
{
unsigned int u = 0;
int max_dv = -1;
int min_mob = INT_MAX;
int result = -1;
sbitmap_iterator sbi;
This patch renames sbitmap iterators to unify them with the bitmap iterators. Remove the unused EXECUTE_IF_SET_IN_SBITMAP_REV, which has an unconventional interface. Rename the sbitmap_iter_* functions to match bitmap's bmp_iter_* functions. Add an additional parameter to the initialization and next functions to match the interface in bmp_iter_*. This extra parameter is mostly hidden by the use of the EXECUTE_IF macros. Rename the EXECUTE_IF_SET_IN_SBITMAP macro to EXECUTE_IF_SET_IN_BITMAP. Its implementation is now identical to that in bitmap.h. To prevent redefinition errors, both definitions are now guarded by #ifndef. An alternate strategy is to simply include bitmap.h from sbitmap.h. As this would increase build time, I have elected to use the #ifndef version. I do not have a strong preference here. The sbitmap_iterator type is still distinctly named because it is often declared in contexts where the bitmap type is not obvious. There are less than 40 uses of this type, so the burden to modify it when changing bitmap types is not large. Tested on x86-64, config-list.mk testing. Index: gcc/ChangeLog 2012-10-31 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_iter_init): Rename bmp_iter_set_init and add unused parameter to match bitmap iterator. Update callers. (sbitmap_iter_cond): Rename bmp_iter_set. Update callers. (sbitmap_iter_next): Rename bmp_iter_next and add unused parameter to match bitmap iterator. Update callers. (EXECUTE_IF_SET_IN_SBITMAP_REV): Remove unused. (EXECUTE_IF_SET_IN_SBITMAP): Rename EXECUTE_IF_SET_IN_BITMAP and adjust to be identical to the definition in bitmap.h. Conditionalize the definition based on not having been defined. Update callers. * bitmap.h (EXECUTE_IF_SET_IN_BITMAP): Conditionalize the definition based on not having been defined. (To match the above.) From-SVN: r193069
2012-11-01 22:02:15 +01:00
EXECUTE_IF_SET_IN_BITMAP (nodes, 0, u, sbi)
{
ddg_node_ptr u_node = &g->nodes[u];
if (max_dv < DEPTH (u_node))
{
max_dv = DEPTH (u_node);
min_mob = MOB (u_node);
result = u;
}
else if ((max_dv == DEPTH (u_node))
&& (min_mob > MOB (u_node)))
{
min_mob = MOB (u_node);
result = u;
}
}
return result;
}
/* Places the nodes of SCC into the NODE_ORDER array starting
at position POS, according to the SMS ordering algorithm.
NODES_ORDERED (in&out parameter) holds the bitset of all nodes in
the NODE_ORDER array, starting from position zero. */
static int
order_nodes_in_scc (ddg_ptr g, sbitmap nodes_ordered, sbitmap scc,
int * node_order, int pos)
{
enum sms_direction dir;
int num_nodes = g->num_nodes;
use auto_sbitmap in various places gcc/ChangeLog: 2016-07-26 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * bt-load.c (compute_out): Use auto_sbitmap class. (link_btr_uses): Likewise. * cfganal.c (mark_dfs_back_edges): Likewise. (post_order_compute): Likewise. (inverted_post_order_compute): Likewise. (pre_and_rev_post_order_compute_fn): Likewise. (single_pred_before_succ_order): Likewise. * cfgexpand.c (pass_expand::execute): Likewise. * cfgloop.c (verify_loop_structure): Likewise. * cfgloopmanip.c (fix_bb_placements): Likewise. (remove_path): Likewise. (update_dominators_in_loop): Likewise. * cfgrtl.c (break_superblocks): Likewise. * ddg.c (check_sccs): Likewise. (create_ddg_all_sccs): Likewise. * df-core.c (df_worklist_dataflow): Likewise. * dse.c (dse_step3): Likewise. * except.c (eh_region_outermost): Likewise. * function.c (thread_prologue_and_epilogue_insns): Likewise. * gcse.c (prune_expressions): Likewise. (prune_insertions_deletions): Likewise. * gimple-ssa-backprop.c (backprop::~backprop): Likewise. * graph.c (draw_cfg_nodes_no_loops): Likewise. * ira-lives.c (remove_some_program_points_and_update_live_ranges): Likewise. * lcm.c (compute_earliest): Likewise. (compute_farthest): Likewise. * loop-unroll.c (unroll_loop_constant_iterations): Likewise. (unroll_loop_runtime_iterations): Likewise. (unroll_loop_stupid): Likewise. * lower-subreg.c (decompose_multiword_subregs): Likewise. * lra-lives.c: Likewise. * lra.c (lra): Likewise. * modulo-sched.c (schedule_reg_moves): Likewise. (optimize_sc): Likewise. (get_sched_window): Likewise. (sms_schedule_by_order): Likewise. (check_nodes_order): Likewise. (order_nodes_of_sccs): Likewise. (order_nodes_in_scc): Likewise. * recog.c (split_all_insns): Likewise. * regcprop.c (pass_cprop_hardreg::execute): Likewise. * reload1.c (reload): Likewise. * sched-rgn.c (haifa_find_rgns): Likewise. (split_edges): Likewise. (compute_trg_info): Likewise. * sel-sched.c (init_seqno): Likewise. * store-motion.c (remove_reachable_equiv_notes): Likewise. * tree-into-ssa.c (update_ssa): Likewise. * tree-ssa-live.c (live_worklist): Likewise. * tree-ssa-loop-im.c (fill_always_executed_in): Likewise. * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): * Likewise. (try_peel_loop): Likewise. * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): * Likewise. * tree-ssa-pre.c (compute_antic): Likewise. * tree-ssa-reassoc.c (undistribute_ops_list): Likewise. * tree-stdarg.c (reachable_at_most_once): Likewise. * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Likewise. * var-tracking.c (vt_find_locations): Likewise. From-SVN: r238748
2016-07-26 12:44:08 +02:00
auto_sbitmap workset (num_nodes);
auto_sbitmap tmp (num_nodes);
sbitmap zero_bitmap = sbitmap_alloc (num_nodes);
use auto_sbitmap in various places gcc/ChangeLog: 2016-07-26 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * bt-load.c (compute_out): Use auto_sbitmap class. (link_btr_uses): Likewise. * cfganal.c (mark_dfs_back_edges): Likewise. (post_order_compute): Likewise. (inverted_post_order_compute): Likewise. (pre_and_rev_post_order_compute_fn): Likewise. (single_pred_before_succ_order): Likewise. * cfgexpand.c (pass_expand::execute): Likewise. * cfgloop.c (verify_loop_structure): Likewise. * cfgloopmanip.c (fix_bb_placements): Likewise. (remove_path): Likewise. (update_dominators_in_loop): Likewise. * cfgrtl.c (break_superblocks): Likewise. * ddg.c (check_sccs): Likewise. (create_ddg_all_sccs): Likewise. * df-core.c (df_worklist_dataflow): Likewise. * dse.c (dse_step3): Likewise. * except.c (eh_region_outermost): Likewise. * function.c (thread_prologue_and_epilogue_insns): Likewise. * gcse.c (prune_expressions): Likewise. (prune_insertions_deletions): Likewise. * gimple-ssa-backprop.c (backprop::~backprop): Likewise. * graph.c (draw_cfg_nodes_no_loops): Likewise. * ira-lives.c (remove_some_program_points_and_update_live_ranges): Likewise. * lcm.c (compute_earliest): Likewise. (compute_farthest): Likewise. * loop-unroll.c (unroll_loop_constant_iterations): Likewise. (unroll_loop_runtime_iterations): Likewise. (unroll_loop_stupid): Likewise. * lower-subreg.c (decompose_multiword_subregs): Likewise. * lra-lives.c: Likewise. * lra.c (lra): Likewise. * modulo-sched.c (schedule_reg_moves): Likewise. (optimize_sc): Likewise. (get_sched_window): Likewise. (sms_schedule_by_order): Likewise. (check_nodes_order): Likewise. (order_nodes_of_sccs): Likewise. (order_nodes_in_scc): Likewise. * recog.c (split_all_insns): Likewise. * regcprop.c (pass_cprop_hardreg::execute): Likewise. * reload1.c (reload): Likewise. * sched-rgn.c (haifa_find_rgns): Likewise. (split_edges): Likewise. (compute_trg_info): Likewise. * sel-sched.c (init_seqno): Likewise. * store-motion.c (remove_reachable_equiv_notes): Likewise. * tree-into-ssa.c (update_ssa): Likewise. * tree-ssa-live.c (live_worklist): Likewise. * tree-ssa-loop-im.c (fill_always_executed_in): Likewise. * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): * Likewise. (try_peel_loop): Likewise. * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): * Likewise. * tree-ssa-pre.c (compute_antic): Likewise. * tree-ssa-reassoc.c (undistribute_ops_list): Likewise. * tree-stdarg.c (reachable_at_most_once): Likewise. * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Likewise. * var-tracking.c (vt_find_locations): Likewise. From-SVN: r238748
2016-07-26 12:44:08 +02:00
auto_sbitmap predecessors (num_nodes);
auto_sbitmap successors (num_nodes);
This patch implements the unification of the *bitmap interfaces as discussed. Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
2012-10-30 01:02:55 +01:00
bitmap_clear (predecessors);
find_predecessors (predecessors, g, nodes_ordered);
This patch implements the unification of the *bitmap interfaces as discussed. Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
2012-10-30 01:02:55 +01:00
bitmap_clear (successors);
find_successors (successors, g, nodes_ordered);
This patch implements the unification of the *bitmap interfaces as discussed. Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
2012-10-30 01:02:55 +01:00
bitmap_clear (tmp);
if (bitmap_and (tmp, predecessors, scc))
{
This patch implements the unification of the *bitmap interfaces as discussed. Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
2012-10-30 01:02:55 +01:00
bitmap_copy (workset, tmp);
dir = BOTTOMUP;
}
This patch implements the unification of the *bitmap interfaces as discussed. Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
2012-10-30 01:02:55 +01:00
else if (bitmap_and (tmp, successors, scc))
{
This patch implements the unification of the *bitmap interfaces as discussed. Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
2012-10-30 01:02:55 +01:00
bitmap_copy (workset, tmp);
dir = TOPDOWN;
}
else
{
int u;
This patch implements the unification of the *bitmap interfaces as discussed. Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
2012-10-30 01:02:55 +01:00
bitmap_clear (workset);
if ((u = find_max_asap (g, scc)) >= 0)
This patch normalizes more bitmap function names. sbitmap.h TEST_BIT -> bitmap_bit_p SET_BIT -> bitmap_set_bit SET_BIT_WITH_POPCOUNT -> bitmap_set_bit_with_popcount RESET_BIT -> bitmap_clear_bit RESET_BIT_WITH_POPCOUNT -> bitmap_clear_bit_with_popcount basic-block.h sbitmap_intersection_of_succs -> bitmap_intersection_of_succs sbitmap_intersection_of_preds -> bitmap_intersection_of_preds sbitmap_union_of_succs -> bitmap_union_of_succs sbitmap_union_of_preds -> bitmap_union_of_preds The sbitmap.h functions also needed their numeric paramter changed from unsigned int to int to match the bitmap functions. Callers updated to match. Tested on x86-64, config-list.mk testing. Index: gcc/ChangeLog 2012-11-01 Lawrence Crowl <crowl@google.com> * sbitmap.h (TEST_BIT): Rename bitmap_bit_p, normalizing parameter type. Update callers to match. (SET_BIT): Rename bitmap_set_bit, normalizing parameter type. Update callers to match. (SET_BIT_WITH_POPCOUNT): Rename bitmap_set_bit_with_popcount, normalizing parameter type. Update callers to match. (RESET_BIT): Rename bitmap_clear_bit, normalizing parameter type. Update callers to match. (RESET_BIT_WITH_POPCOUNT): Rename bitmap_clear_bit_with_popcount, normalizing parameter type. Update callers to match. * basic-block.h (sbitmap_intersection_of_succs): Rename bitmap_intersection_of_succs. Update callers to match. * basic-block.h (sbitmap_intersection_of_preds): Rename bitmap_intersection_of_preds. Update callers to match. * basic-block.h (sbitmap_union_of_succs): Rename bitmap_union_of_succs. Update callers to match. * basic-block.h (sbitmap_union_of_preds): Rename bitmap_union_of_preds. Update callers to match. From-SVN: r193066
2012-11-01 20:23:35 +01:00
bitmap_set_bit (workset, u);
dir = BOTTOMUP;
}
This patch implements the unification of the *bitmap interfaces as discussed. Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
2012-10-30 01:02:55 +01:00
bitmap_clear (zero_bitmap);
while (!bitmap_equal_p (workset, zero_bitmap))
{
int v;
ddg_node_ptr v_node;
sbitmap v_node_preds;
sbitmap v_node_succs;
if (dir == TOPDOWN)
{
This patch implements the unification of the *bitmap interfaces as discussed. Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
2012-10-30 01:02:55 +01:00
while (!bitmap_equal_p (workset, zero_bitmap))
{
v = find_max_hv_min_mob (g, workset);
v_node = &g->nodes[v];
node_order[pos++] = v;
v_node_succs = NODE_SUCCESSORS (v_node);
This patch implements the unification of the *bitmap interfaces as discussed. Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
2012-10-30 01:02:55 +01:00
bitmap_and (tmp, v_node_succs, scc);
/* Don't consider the already ordered successors again. */
This patch implements the unification of the *bitmap interfaces as discussed. Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
2012-10-30 01:02:55 +01:00
bitmap_and_compl (tmp, tmp, nodes_ordered);
bitmap_ior (workset, workset, tmp);
This patch normalizes more bitmap function names. sbitmap.h TEST_BIT -> bitmap_bit_p SET_BIT -> bitmap_set_bit SET_BIT_WITH_POPCOUNT -> bitmap_set_bit_with_popcount RESET_BIT -> bitmap_clear_bit RESET_BIT_WITH_POPCOUNT -> bitmap_clear_bit_with_popcount basic-block.h sbitmap_intersection_of_succs -> bitmap_intersection_of_succs sbitmap_intersection_of_preds -> bitmap_intersection_of_preds sbitmap_union_of_succs -> bitmap_union_of_succs sbitmap_union_of_preds -> bitmap_union_of_preds The sbitmap.h functions also needed their numeric paramter changed from unsigned int to int to match the bitmap functions. Callers updated to match. Tested on x86-64, config-list.mk testing. Index: gcc/ChangeLog 2012-11-01 Lawrence Crowl <crowl@google.com> * sbitmap.h (TEST_BIT): Rename bitmap_bit_p, normalizing parameter type. Update callers to match. (SET_BIT): Rename bitmap_set_bit, normalizing parameter type. Update callers to match. (SET_BIT_WITH_POPCOUNT): Rename bitmap_set_bit_with_popcount, normalizing parameter type. Update callers to match. (RESET_BIT): Rename bitmap_clear_bit, normalizing parameter type. Update callers to match. (RESET_BIT_WITH_POPCOUNT): Rename bitmap_clear_bit_with_popcount, normalizing parameter type. Update callers to match. * basic-block.h (sbitmap_intersection_of_succs): Rename bitmap_intersection_of_succs. Update callers to match. * basic-block.h (sbitmap_intersection_of_preds): Rename bitmap_intersection_of_preds. Update callers to match. * basic-block.h (sbitmap_union_of_succs): Rename bitmap_union_of_succs. Update callers to match. * basic-block.h (sbitmap_union_of_preds): Rename bitmap_union_of_preds. Update callers to match. From-SVN: r193066
2012-11-01 20:23:35 +01:00
bitmap_clear_bit (workset, v);
bitmap_set_bit (nodes_ordered, v);
}
dir = BOTTOMUP;
This patch implements the unification of the *bitmap interfaces as discussed. Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
2012-10-30 01:02:55 +01:00
bitmap_clear (predecessors);
find_predecessors (predecessors, g, nodes_ordered);
This patch implements the unification of the *bitmap interfaces as discussed. Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
2012-10-30 01:02:55 +01:00
bitmap_and (workset, predecessors, scc);
}
else
{
This patch implements the unification of the *bitmap interfaces as discussed. Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
2012-10-30 01:02:55 +01:00
while (!bitmap_equal_p (workset, zero_bitmap))
{
v = find_max_dv_min_mob (g, workset);
v_node = &g->nodes[v];
node_order[pos++] = v;
v_node_preds = NODE_PREDECESSORS (v_node);
This patch implements the unification of the *bitmap interfaces as discussed. Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
2012-10-30 01:02:55 +01:00
bitmap_and (tmp, v_node_preds, scc);
/* Don't consider the already ordered predecessors again. */
This patch implements the unification of the *bitmap interfaces as discussed. Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
2012-10-30 01:02:55 +01:00
bitmap_and_compl (tmp, tmp, nodes_ordered);
bitmap_ior (workset, workset, tmp);
This patch normalizes more bitmap function names. sbitmap.h TEST_BIT -> bitmap_bit_p SET_BIT -> bitmap_set_bit SET_BIT_WITH_POPCOUNT -> bitmap_set_bit_with_popcount RESET_BIT -> bitmap_clear_bit RESET_BIT_WITH_POPCOUNT -> bitmap_clear_bit_with_popcount basic-block.h sbitmap_intersection_of_succs -> bitmap_intersection_of_succs sbitmap_intersection_of_preds -> bitmap_intersection_of_preds sbitmap_union_of_succs -> bitmap_union_of_succs sbitmap_union_of_preds -> bitmap_union_of_preds The sbitmap.h functions also needed their numeric paramter changed from unsigned int to int to match the bitmap functions. Callers updated to match. Tested on x86-64, config-list.mk testing. Index: gcc/ChangeLog 2012-11-01 Lawrence Crowl <crowl@google.com> * sbitmap.h (TEST_BIT): Rename bitmap_bit_p, normalizing parameter type. Update callers to match. (SET_BIT): Rename bitmap_set_bit, normalizing parameter type. Update callers to match. (SET_BIT_WITH_POPCOUNT): Rename bitmap_set_bit_with_popcount, normalizing parameter type. Update callers to match. (RESET_BIT): Rename bitmap_clear_bit, normalizing parameter type. Update callers to match. (RESET_BIT_WITH_POPCOUNT): Rename bitmap_clear_bit_with_popcount, normalizing parameter type. Update callers to match. * basic-block.h (sbitmap_intersection_of_succs): Rename bitmap_intersection_of_succs. Update callers to match. * basic-block.h (sbitmap_intersection_of_preds): Rename bitmap_intersection_of_preds. Update callers to match. * basic-block.h (sbitmap_union_of_succs): Rename bitmap_union_of_succs. Update callers to match. * basic-block.h (sbitmap_union_of_preds): Rename bitmap_union_of_preds. Update callers to match. From-SVN: r193066
2012-11-01 20:23:35 +01:00
bitmap_clear_bit (workset, v);
bitmap_set_bit (nodes_ordered, v);
}
dir = TOPDOWN;
This patch implements the unification of the *bitmap interfaces as discussed. Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
2012-10-30 01:02:55 +01:00
bitmap_clear (successors);
find_successors (successors, g, nodes_ordered);
This patch implements the unification of the *bitmap interfaces as discussed. Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
2012-10-30 01:02:55 +01:00
bitmap_and (workset, successors, scc);
}
}
sbitmap_free (zero_bitmap);
return pos;
}
/* This page contains functions for manipulating partial-schedules during
modulo scheduling. */
/* Create a partial schedule and allocate a memory to hold II rows. */
static partial_schedule_ptr
create_partial_schedule (int ii, ddg_ptr g, int history)
{
tree-vrp.c: Use XNEW/XCNEW allocation wrappers. 2006-01-31 Marcin Dalecki <martin@dalecki.de> * tree-vrp.c: Use XNEW/XCNEW allocation wrappers. * regrename.c: Ditto. * tree-ssa-loop-im.c: Ditto. * tree-dump.c: Ditto. * tree-complex.c: Ditto. * genrecog.c: Ditto. * tree-ssa-threadupdate.c: Ditto. * tracer.c: Ditto. * java/class.c: Ditto. * java/jcf-parse.c: Ditto. * java/resource.c: Ditto. * java/except.c: Ditto. * java/jvspec.c: Ditto. * java/jcf-write.c: Ditto. * java/jcf-path.c: Ditto. * java/gjavah.c: Ditto. * java/zextract.c: Ditto. * java/jcf-io.c: Ditto. * java/jcf.h: Ditto. * java/buffer.c: Ditto. * java/lang.c: Ditto. * java/parse-scan.y: Ditto. * java/lex.c: Ditto. * java/lex.h: Ditto. * cfgloopmanip.c: Ditto. * postreload-gcse.c: Ditto. * tree-ssa-loop-manip.c: Ditto. * postreload.c: Ditto. * tree-ssa-loop-ch.c: Ditto. * loop.c: Ditto. * ipa-cp.c: Ditto. * cppspec.c: Ditto. * diagnostic.c: Ditto. * final.c: Ditto. * genoutput.c: Ditto. * gcc.c: Ditto. * cfghooks.c: Ditto. * cfgloopanal.c: Ditto. * objc/objc-act.c: Ditto. * gcov.c: Ditto. * genextract.c: Ditto. * genautomata.c: Ditto. * pretty-print.c: Ditto. * genemit.c: Ditto. * cgraphunit.c: Ditto. * flow.c: Ditto. * df-scan.c: Ditto. * haifa-sched.c: Ditto. * dominance.c: Ditto. * dbxout.c: Ditto. * tree-ssa-loop-ivopts.c: Ditto. * df-core.c: Ditto. * mode-switching.c: Ditto. * modulo-sched.c: Ditto. * graph.c: Ditto. * ipa-pure-const.c: Ditto. * cse.c: Ditto. * fix-header.c: Ditto. * web.c: Ditto. * tree-stdarg.c: Ditto. * ipa-utils.c: Ditto. * loop-init.c: Ditto. * ipa-inline.c: Ditto. * cfganal.c: Ditto. * global.c: Ditto. * alloc-pool.c: Ditto. * dwarf2out.c: Ditto. * opts.c: Ditto. * genattrtab.c: Ditto. * tree-ssa-loop-ivcanon.c: Ditto. * predict.c: Ditto. * timevar.c: Ditto. * lcm.c: Ditto. * fortran/gfortranspec.c: Ditto. * regmove.c: Ditto. * local-alloc.c: Ditto. * langhooks.c: Ditto. * function.c: Ditto. * tree-vectorizer.c: Ditto. * gcse.c: Ditto. * ipa-type-escape.c: Ditto. * alias.c: Ditto. * tree-if-conv.c: Ditto. * profile.c: Ditto. * ipa.c: Ditto. * tree-data-ref.c: Ditto. * loop-unroll.c: Ditto. * treelang/treetree.c: Ditto. * calls.c: Ditto. * bt-load.c: Ditto. * ggc-common.c: Ditto. * except.c: Ditto. * coverage.c: Ditto. * cselib.c: Ditto. * tree-cfgcleanup.c: Ditto. * tree-ssa-pre.c: Ditto. * cfgcleanup.c: Ditto. * loop-invariant.c: Ditto. * loop-iv.c: Ditto. * ipa-prop.c: Ditto. * print-tree.c: Ditto. * conflict.c: Ditto. * ggc-page.c: Ditto. * sched-deps.c: Ditto. * regclass.c: Ditto. * tree-object-size.c: Ditto. * combine.c: Ditto. * bb-reorder.c: Ditto. * resource.c: Ditto. * var-tracking.c: Ditto. * cfgloop.c: Ditto. * df-problems.c: Ditto. * reg-stack.c: Ditto. * tlink.c: Ditto. * gccspec.c: Ditto. * sched-rgn.c: Ditto. * tree-ssa-structalias.c: Ditto. * tree-ssa-reassoc.c: Ditto. * config/darwin-c.c: Ditto. * config/darwin.c: Ditto. * config/arm/arm.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * reload1.c: Ditto. From-SVN: r110446
2006-01-31 20:56:55 +01:00
partial_schedule_ptr ps = XNEW (struct partial_schedule);
ps->rows = (ps_insn_ptr *) xcalloc (ii, sizeof (ps_insn_ptr));
ps->rows_length = (int *) xcalloc (ii, sizeof (int));
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
ps->reg_moves.create (0);
ps->ii = ii;
ps->history = history;
ps->min_cycle = INT_MAX;
ps->max_cycle = INT_MIN;
ps->g = g;
return ps;
}
/* Free the PS_INSNs in rows array of the given partial schedule.
??? Consider caching the PS_INSN's. */
static void
free_ps_insns (partial_schedule_ptr ps)
{
int i;
for (i = 0; i < ps->ii; i++)
{
while (ps->rows[i])
{
ps_insn_ptr ps_insn = ps->rows[i]->next_in_row;
free (ps->rows[i]);
ps->rows[i] = ps_insn;
}
ps->rows[i] = NULL;
}
}
/* Free all the memory allocated to the partial schedule. */
static void
free_partial_schedule (partial_schedule_ptr ps)
{
ps_reg_move_info *move;
unsigned int i;
if (!ps)
return;
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
FOR_EACH_VEC_ELT (ps->reg_moves, i, move)
sbitmap_free (move->uses);
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
ps->reg_moves.release ();
free_ps_insns (ps);
free (ps->rows);
free (ps->rows_length);
free (ps);
}
/* Clear the rows array with its PS_INSNs, and create a new one with
NEW_II rows. */
static void
reset_partial_schedule (partial_schedule_ptr ps, int new_ii)
{
if (!ps)
return;
free_ps_insns (ps);
if (new_ii == ps->ii)
return;
ps->rows = (ps_insn_ptr *) xrealloc (ps->rows, new_ii
* sizeof (ps_insn_ptr));
memset (ps->rows, 0, new_ii * sizeof (ps_insn_ptr));
ps->rows_length = (int *) xrealloc (ps->rows_length, new_ii * sizeof (int));
memset (ps->rows_length, 0, new_ii * sizeof (int));
ps->ii = new_ii;
ps->min_cycle = INT_MAX;
ps->max_cycle = INT_MIN;
}
/* Prints the partial schedule as an ii rows array, for each rows
print the ids of the insns in it. */
void
print_partial_schedule (partial_schedule_ptr ps, FILE *dump)
{
int i;
for (i = 0; i < ps->ii; i++)
{
ps_insn_ptr ps_i = ps->rows[i];
fprintf (dump, "\n[ROW %d ]: ", i);
while (ps_i)
{
rtx_insn *insn = ps_rtl_insn (ps, ps_i->id);
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
if (JUMP_P (insn))
fprintf (dump, "%d (branch), ", INSN_UID (insn));
2011-07-31 12:21:01 +02:00
else
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
fprintf (dump, "%d, ", INSN_UID (insn));
2011-07-31 12:21:01 +02:00
ps_i = ps_i->next_in_row;
}
}
}
/* Creates an object of PS_INSN and initializes it to the given parameters. */
static ps_insn_ptr
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
create_ps_insn (int id, int cycle)
{
tree-vrp.c: Use XNEW/XCNEW allocation wrappers. 2006-01-31 Marcin Dalecki <martin@dalecki.de> * tree-vrp.c: Use XNEW/XCNEW allocation wrappers. * regrename.c: Ditto. * tree-ssa-loop-im.c: Ditto. * tree-dump.c: Ditto. * tree-complex.c: Ditto. * genrecog.c: Ditto. * tree-ssa-threadupdate.c: Ditto. * tracer.c: Ditto. * java/class.c: Ditto. * java/jcf-parse.c: Ditto. * java/resource.c: Ditto. * java/except.c: Ditto. * java/jvspec.c: Ditto. * java/jcf-write.c: Ditto. * java/jcf-path.c: Ditto. * java/gjavah.c: Ditto. * java/zextract.c: Ditto. * java/jcf-io.c: Ditto. * java/jcf.h: Ditto. * java/buffer.c: Ditto. * java/lang.c: Ditto. * java/parse-scan.y: Ditto. * java/lex.c: Ditto. * java/lex.h: Ditto. * cfgloopmanip.c: Ditto. * postreload-gcse.c: Ditto. * tree-ssa-loop-manip.c: Ditto. * postreload.c: Ditto. * tree-ssa-loop-ch.c: Ditto. * loop.c: Ditto. * ipa-cp.c: Ditto. * cppspec.c: Ditto. * diagnostic.c: Ditto. * final.c: Ditto. * genoutput.c: Ditto. * gcc.c: Ditto. * cfghooks.c: Ditto. * cfgloopanal.c: Ditto. * objc/objc-act.c: Ditto. * gcov.c: Ditto. * genextract.c: Ditto. * genautomata.c: Ditto. * pretty-print.c: Ditto. * genemit.c: Ditto. * cgraphunit.c: Ditto. * flow.c: Ditto. * df-scan.c: Ditto. * haifa-sched.c: Ditto. * dominance.c: Ditto. * dbxout.c: Ditto. * tree-ssa-loop-ivopts.c: Ditto. * df-core.c: Ditto. * mode-switching.c: Ditto. * modulo-sched.c: Ditto. * graph.c: Ditto. * ipa-pure-const.c: Ditto. * cse.c: Ditto. * fix-header.c: Ditto. * web.c: Ditto. * tree-stdarg.c: Ditto. * ipa-utils.c: Ditto. * loop-init.c: Ditto. * ipa-inline.c: Ditto. * cfganal.c: Ditto. * global.c: Ditto. * alloc-pool.c: Ditto. * dwarf2out.c: Ditto. * opts.c: Ditto. * genattrtab.c: Ditto. * tree-ssa-loop-ivcanon.c: Ditto. * predict.c: Ditto. * timevar.c: Ditto. * lcm.c: Ditto. * fortran/gfortranspec.c: Ditto. * regmove.c: Ditto. * local-alloc.c: Ditto. * langhooks.c: Ditto. * function.c: Ditto. * tree-vectorizer.c: Ditto. * gcse.c: Ditto. * ipa-type-escape.c: Ditto. * alias.c: Ditto. * tree-if-conv.c: Ditto. * profile.c: Ditto. * ipa.c: Ditto. * tree-data-ref.c: Ditto. * loop-unroll.c: Ditto. * treelang/treetree.c: Ditto. * calls.c: Ditto. * bt-load.c: Ditto. * ggc-common.c: Ditto. * except.c: Ditto. * coverage.c: Ditto. * cselib.c: Ditto. * tree-cfgcleanup.c: Ditto. * tree-ssa-pre.c: Ditto. * cfgcleanup.c: Ditto. * loop-invariant.c: Ditto. * loop-iv.c: Ditto. * ipa-prop.c: Ditto. * print-tree.c: Ditto. * conflict.c: Ditto. * ggc-page.c: Ditto. * sched-deps.c: Ditto. * regclass.c: Ditto. * tree-object-size.c: Ditto. * combine.c: Ditto. * bb-reorder.c: Ditto. * resource.c: Ditto. * var-tracking.c: Ditto. * cfgloop.c: Ditto. * df-problems.c: Ditto. * reg-stack.c: Ditto. * tlink.c: Ditto. * gccspec.c: Ditto. * sched-rgn.c: Ditto. * tree-ssa-structalias.c: Ditto. * tree-ssa-reassoc.c: Ditto. * config/darwin-c.c: Ditto. * config/darwin.c: Ditto. * config/arm/arm.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * reload1.c: Ditto. From-SVN: r110446
2006-01-31 20:56:55 +01:00
ps_insn_ptr ps_i = XNEW (struct ps_insn);
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
ps_i->id = id;
ps_i->next_in_row = NULL;
ps_i->prev_in_row = NULL;
ps_i->cycle = cycle;
return ps_i;
}
/* Removes the given PS_INSN from the partial schedule. */
static void
remove_node_from_ps (partial_schedule_ptr ps, ps_insn_ptr ps_i)
{
int row;
gcc_assert (ps && ps_i);
row = SMODULO (ps_i->cycle, ps->ii);
if (! ps_i->prev_in_row)
{
gcc_assert (ps_i == ps->rows[row]);
ps->rows[row] = ps_i->next_in_row;
if (ps->rows[row])
ps->rows[row]->prev_in_row = NULL;
}
else
{
ps_i->prev_in_row->next_in_row = ps_i->next_in_row;
if (ps_i->next_in_row)
ps_i->next_in_row->prev_in_row = ps_i->prev_in_row;
}
ps->rows_length[row] -= 1;
free (ps_i);
return;
}
/* Unlike what literature describes for modulo scheduling (which focuses
on VLIW machines) the order of the instructions inside a cycle is
important. Given the bitmaps MUST_FOLLOW and MUST_PRECEDE we know
where the current instruction should go relative to the already
scheduled instructions in the given cycle. Go over these
instructions and find the first possible column to put it in. */
static bool
ps_insn_find_column (partial_schedule_ptr ps, ps_insn_ptr ps_i,
sbitmap must_precede, sbitmap must_follow)
{
ps_insn_ptr next_ps_i;
ps_insn_ptr first_must_follow = NULL;
ps_insn_ptr last_must_precede = NULL;
ps_insn_ptr last_in_row = NULL;
int row;
if (! ps_i)
return false;
row = SMODULO (ps_i->cycle, ps->ii);
/* Find the first must follow and the last must precede
and insert the node immediately after the must precede
but make sure that it there is no must follow after it. */
for (next_ps_i = ps->rows[row];
next_ps_i;
next_ps_i = next_ps_i->next_in_row)
{
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
if (must_follow
This patch normalizes more bitmap function names. sbitmap.h TEST_BIT -> bitmap_bit_p SET_BIT -> bitmap_set_bit SET_BIT_WITH_POPCOUNT -> bitmap_set_bit_with_popcount RESET_BIT -> bitmap_clear_bit RESET_BIT_WITH_POPCOUNT -> bitmap_clear_bit_with_popcount basic-block.h sbitmap_intersection_of_succs -> bitmap_intersection_of_succs sbitmap_intersection_of_preds -> bitmap_intersection_of_preds sbitmap_union_of_succs -> bitmap_union_of_succs sbitmap_union_of_preds -> bitmap_union_of_preds The sbitmap.h functions also needed their numeric paramter changed from unsigned int to int to match the bitmap functions. Callers updated to match. Tested on x86-64, config-list.mk testing. Index: gcc/ChangeLog 2012-11-01 Lawrence Crowl <crowl@google.com> * sbitmap.h (TEST_BIT): Rename bitmap_bit_p, normalizing parameter type. Update callers to match. (SET_BIT): Rename bitmap_set_bit, normalizing parameter type. Update callers to match. (SET_BIT_WITH_POPCOUNT): Rename bitmap_set_bit_with_popcount, normalizing parameter type. Update callers to match. (RESET_BIT): Rename bitmap_clear_bit, normalizing parameter type. Update callers to match. (RESET_BIT_WITH_POPCOUNT): Rename bitmap_clear_bit_with_popcount, normalizing parameter type. Update callers to match. * basic-block.h (sbitmap_intersection_of_succs): Rename bitmap_intersection_of_succs. Update callers to match. * basic-block.h (sbitmap_intersection_of_preds): Rename bitmap_intersection_of_preds. Update callers to match. * basic-block.h (sbitmap_union_of_succs): Rename bitmap_union_of_succs. Update callers to match. * basic-block.h (sbitmap_union_of_preds): Rename bitmap_union_of_preds. Update callers to match. From-SVN: r193066
2012-11-01 20:23:35 +01:00
&& bitmap_bit_p (must_follow, next_ps_i->id)
&& ! first_must_follow)
first_must_follow = next_ps_i;
This patch normalizes more bitmap function names. sbitmap.h TEST_BIT -> bitmap_bit_p SET_BIT -> bitmap_set_bit SET_BIT_WITH_POPCOUNT -> bitmap_set_bit_with_popcount RESET_BIT -> bitmap_clear_bit RESET_BIT_WITH_POPCOUNT -> bitmap_clear_bit_with_popcount basic-block.h sbitmap_intersection_of_succs -> bitmap_intersection_of_succs sbitmap_intersection_of_preds -> bitmap_intersection_of_preds sbitmap_union_of_succs -> bitmap_union_of_succs sbitmap_union_of_preds -> bitmap_union_of_preds The sbitmap.h functions also needed their numeric paramter changed from unsigned int to int to match the bitmap functions. Callers updated to match. Tested on x86-64, config-list.mk testing. Index: gcc/ChangeLog 2012-11-01 Lawrence Crowl <crowl@google.com> * sbitmap.h (TEST_BIT): Rename bitmap_bit_p, normalizing parameter type. Update callers to match. (SET_BIT): Rename bitmap_set_bit, normalizing parameter type. Update callers to match. (SET_BIT_WITH_POPCOUNT): Rename bitmap_set_bit_with_popcount, normalizing parameter type. Update callers to match. (RESET_BIT): Rename bitmap_clear_bit, normalizing parameter type. Update callers to match. (RESET_BIT_WITH_POPCOUNT): Rename bitmap_clear_bit_with_popcount, normalizing parameter type. Update callers to match. * basic-block.h (sbitmap_intersection_of_succs): Rename bitmap_intersection_of_succs. Update callers to match. * basic-block.h (sbitmap_intersection_of_preds): Rename bitmap_intersection_of_preds. Update callers to match. * basic-block.h (sbitmap_union_of_succs): Rename bitmap_union_of_succs. Update callers to match. * basic-block.h (sbitmap_union_of_preds): Rename bitmap_union_of_preds. Update callers to match. From-SVN: r193066
2012-11-01 20:23:35 +01:00
if (must_precede && bitmap_bit_p (must_precede, next_ps_i->id))
{
/* If we have already met a node that must follow, then
there is no possible column. */
if (first_must_follow)
return false;
else
last_must_precede = next_ps_i;
}
/* The closing branch must be the last in the row. */
if (must_precede
This patch normalizes more bitmap function names. sbitmap.h TEST_BIT -> bitmap_bit_p SET_BIT -> bitmap_set_bit SET_BIT_WITH_POPCOUNT -> bitmap_set_bit_with_popcount RESET_BIT -> bitmap_clear_bit RESET_BIT_WITH_POPCOUNT -> bitmap_clear_bit_with_popcount basic-block.h sbitmap_intersection_of_succs -> bitmap_intersection_of_succs sbitmap_intersection_of_preds -> bitmap_intersection_of_preds sbitmap_union_of_succs -> bitmap_union_of_succs sbitmap_union_of_preds -> bitmap_union_of_preds The sbitmap.h functions also needed their numeric paramter changed from unsigned int to int to match the bitmap functions. Callers updated to match. Tested on x86-64, config-list.mk testing. Index: gcc/ChangeLog 2012-11-01 Lawrence Crowl <crowl@google.com> * sbitmap.h (TEST_BIT): Rename bitmap_bit_p, normalizing parameter type. Update callers to match. (SET_BIT): Rename bitmap_set_bit, normalizing parameter type. Update callers to match. (SET_BIT_WITH_POPCOUNT): Rename bitmap_set_bit_with_popcount, normalizing parameter type. Update callers to match. (RESET_BIT): Rename bitmap_clear_bit, normalizing parameter type. Update callers to match. (RESET_BIT_WITH_POPCOUNT): Rename bitmap_clear_bit_with_popcount, normalizing parameter type. Update callers to match. * basic-block.h (sbitmap_intersection_of_succs): Rename bitmap_intersection_of_succs. Update callers to match. * basic-block.h (sbitmap_intersection_of_preds): Rename bitmap_intersection_of_preds. Update callers to match. * basic-block.h (sbitmap_union_of_succs): Rename bitmap_union_of_succs. Update callers to match. * basic-block.h (sbitmap_union_of_preds): Rename bitmap_union_of_preds. Update callers to match. From-SVN: r193066
2012-11-01 20:23:35 +01:00
&& bitmap_bit_p (must_precede, next_ps_i->id)
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
&& JUMP_P (ps_rtl_insn (ps, next_ps_i->id)))
return false;
last_in_row = next_ps_i;
}
/* The closing branch is scheduled as well. Make sure there is no
dependent instruction after it as the branch should be the last
instruction in the row. */
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
if (JUMP_P (ps_rtl_insn (ps, ps_i->id)))
{
if (first_must_follow)
return false;
if (last_in_row)
{
/* Make the branch the last in the row. New instructions
will be inserted at the beginning of the row or after the
last must_precede instruction thus the branch is guaranteed
to remain the last instruction in the row. */
last_in_row->next_in_row = ps_i;
ps_i->prev_in_row = last_in_row;
ps_i->next_in_row = NULL;
}
else
ps->rows[row] = ps_i;
return true;
}
/* Now insert the node after INSERT_AFTER_PSI. */
if (! last_must_precede)
{
ps_i->next_in_row = ps->rows[row];
ps_i->prev_in_row = NULL;
if (ps_i->next_in_row)
ps_i->next_in_row->prev_in_row = ps_i;
ps->rows[row] = ps_i;
}
else
{
ps_i->next_in_row = last_must_precede->next_in_row;
last_must_precede->next_in_row = ps_i;
ps_i->prev_in_row = last_must_precede;
if (ps_i->next_in_row)
ps_i->next_in_row->prev_in_row = ps_i;
}
return true;
}
/* Advances the PS_INSN one column in its current row; returns false
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: 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-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.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. * 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. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: 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-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.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-live.h: 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-operands.h: 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-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.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-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
in failure and true in success. Bit N is set in MUST_FOLLOW if
the node with cuid N must be come after the node pointed to by
PS_I when scheduled in the same cycle. */
static int
ps_insn_advance_column (partial_schedule_ptr ps, ps_insn_ptr ps_i,
sbitmap must_follow)
{
ps_insn_ptr prev, next;
int row;
if (!ps || !ps_i)
return false;
row = SMODULO (ps_i->cycle, ps->ii);
if (! ps_i->next_in_row)
return false;
/* Check if next_in_row is dependent on ps_i, both having same sched
times (typically ANTI_DEP). If so, ps_i cannot skip over it. */
This patch normalizes more bitmap function names. sbitmap.h TEST_BIT -> bitmap_bit_p SET_BIT -> bitmap_set_bit SET_BIT_WITH_POPCOUNT -> bitmap_set_bit_with_popcount RESET_BIT -> bitmap_clear_bit RESET_BIT_WITH_POPCOUNT -> bitmap_clear_bit_with_popcount basic-block.h sbitmap_intersection_of_succs -> bitmap_intersection_of_succs sbitmap_intersection_of_preds -> bitmap_intersection_of_preds sbitmap_union_of_succs -> bitmap_union_of_succs sbitmap_union_of_preds -> bitmap_union_of_preds The sbitmap.h functions also needed their numeric paramter changed from unsigned int to int to match the bitmap functions. Callers updated to match. Tested on x86-64, config-list.mk testing. Index: gcc/ChangeLog 2012-11-01 Lawrence Crowl <crowl@google.com> * sbitmap.h (TEST_BIT): Rename bitmap_bit_p, normalizing parameter type. Update callers to match. (SET_BIT): Rename bitmap_set_bit, normalizing parameter type. Update callers to match. (SET_BIT_WITH_POPCOUNT): Rename bitmap_set_bit_with_popcount, normalizing parameter type. Update callers to match. (RESET_BIT): Rename bitmap_clear_bit, normalizing parameter type. Update callers to match. (RESET_BIT_WITH_POPCOUNT): Rename bitmap_clear_bit_with_popcount, normalizing parameter type. Update callers to match. * basic-block.h (sbitmap_intersection_of_succs): Rename bitmap_intersection_of_succs. Update callers to match. * basic-block.h (sbitmap_intersection_of_preds): Rename bitmap_intersection_of_preds. Update callers to match. * basic-block.h (sbitmap_union_of_succs): Rename bitmap_union_of_succs. Update callers to match. * basic-block.h (sbitmap_union_of_preds): Rename bitmap_union_of_preds. Update callers to match. From-SVN: r193066
2012-11-01 20:23:35 +01:00
if (must_follow && bitmap_bit_p (must_follow, ps_i->next_in_row->id))
return false;
/* Advance PS_I over its next_in_row in the doubly linked list. */
prev = ps_i->prev_in_row;
next = ps_i->next_in_row;
if (ps_i == ps->rows[row])
ps->rows[row] = next;
ps_i->next_in_row = next->next_in_row;
if (next->next_in_row)
next->next_in_row->prev_in_row = ps_i;
next->next_in_row = ps_i;
ps_i->prev_in_row = next;
next->prev_in_row = prev;
if (prev)
prev->next_in_row = next;
return true;
}
/* Inserts a DDG_NODE to the given partial schedule at the given cycle.
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: 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-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.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. * 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. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: 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-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.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-live.h: 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-operands.h: 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-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.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-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
Returns 0 if this is not possible and a PS_INSN otherwise. Bit N is
set in MUST_PRECEDE/MUST_FOLLOW if the node with cuid N must be come
before/after (respectively) the node pointed to by PS_I when scheduled
in the same cycle. */
static ps_insn_ptr
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
add_node_to_ps (partial_schedule_ptr ps, int id, int cycle,
sbitmap must_precede, sbitmap must_follow)
{
ps_insn_ptr ps_i;
int row = SMODULO (cycle, ps->ii);
if (ps->rows_length[row] >= issue_rate)
return NULL;
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
ps_i = create_ps_insn (id, cycle);
/* Finds and inserts PS_I according to MUST_FOLLOW and
MUST_PRECEDE. */
if (! ps_insn_find_column (ps, ps_i, must_precede, must_follow))
{
free (ps_i);
return NULL;
}
ps->rows_length[row] += 1;
return ps_i;
}
/* Advance time one cycle. Assumes DFA is being used. */
static void
advance_one_cycle (void)
{
genattr.c (struct range, [...]): Remove them. 2004-07-19 Paolo Bonzini <bonzini@gnu.org> * genattr.c (struct range, struct function_unit, write_units, extend_range, init_range): Remove them. (main): Remove code dealing with DEFINE_FUNCTION_UNIT. Output "#define INSN_SCHEDULING" here. * genattrtab.c (struct range, struct function_unit_op, struct function_unit, struct dimension, enum operator, operate_exp, expand_units, simplify_knowing, encode_units_mask, simplify_by_exploding, find_and_mark_used_attributes, unmark_used_attributes, add_values_to_cover, increment_current_value, test_for_current_value, simplify_with_current_value, simplify_with_current_value_aux, gen_unit, write_unit_name, write_function_unit_info, write_complex_function, write_toplevel_expr, find_single_value, extend_range): Remove. (write_attr_get): Do not handle common_av->value being an FFS. (struct attr_desc): Remove func_units_p and blockage_p. (write_attr_valueq): Do not handle them. (find_attr): Do not clear them. (make_internal_attr): Do not initialize them. (main): Remove code dealing with DEFINE_FUNCTION_UNIT. * sched-vis.c (init_target_units, insn_print_units, init_block_visualization, print_block_visualization, visualize_scheduled_insns, visualize_no_unit, visualize_stall_cycles, visualize_alloc, visualize_free, target_units, get_visual_tbl_length, MAX_VISUAL_LINES, INSN_LEN, n_visual_lines, visual_tbl_line_length, visual_tbl, n_vis_no_unit, MAX_VISUAL_NO_UNIT, vis_no_unit): Remove. * haifa-sched.c (blockage_range, clear_units, schedule_unit, actual_hazard, potential_hazard, insn_unit, unit_last_insn, unit_tick, actual_hazard_this_instance, potential_hazard, schedule_unit, max_insn_queue_index_value): Remove. (MAX_INSN_QUEUE_INDEX): Removed, renamed throughout to max_insn_queue_index. * rtl.def (DEFINE_FUNCTION_UNIT): Remove. * doc/md.texi (Processor pipeline description): Remove references to old pipeline descriptions. (Automaton pipeline description): Merge with the above. (Old pipeline description, Comparison of the two descriptions): Remove. * bt-load.c (migrate_btr_def): Remove references to use_pipeline_interface. * haifa-sched.c (insn_cost, schedule_insn, schedule_block, advance_one_cycle, sched_init, queue_to_ready, sched_finish): Likewise. * modulo-sched.c (sms_schedule, advance_one_cycle, ps_has_conflicts): Likewise. * sched-rgn.c (init_ready): Likewise. (debug_dependencies): Likewise, and remove an "if (1)". * target.h (use_dfa_pipeline_interface): Remove. * config/alpha/alpha.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/arc/arc.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/arm/arm.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/c4x/c4x.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/frv/frv.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/i386/i386.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/ia64/ia64.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/iq2000/iq2000.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/m32r/m32r.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/mcore/mcore.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/mips/mips.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/pa/pa.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/rs6000/rs6000.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/s390/s390.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/sh/sh.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/sparc/sparc.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/v850/v850.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/xtensa/xtensa.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * doc/tm.texi (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. From-SVN: r84944
2004-07-20 09:27:18 +02:00
if (targetm.sched.dfa_pre_cycle_insn)
state_transition (curr_state,
targetm.sched.dfa_pre_cycle_insn ());
genattr.c (struct range, [...]): Remove them. 2004-07-19 Paolo Bonzini <bonzini@gnu.org> * genattr.c (struct range, struct function_unit, write_units, extend_range, init_range): Remove them. (main): Remove code dealing with DEFINE_FUNCTION_UNIT. Output "#define INSN_SCHEDULING" here. * genattrtab.c (struct range, struct function_unit_op, struct function_unit, struct dimension, enum operator, operate_exp, expand_units, simplify_knowing, encode_units_mask, simplify_by_exploding, find_and_mark_used_attributes, unmark_used_attributes, add_values_to_cover, increment_current_value, test_for_current_value, simplify_with_current_value, simplify_with_current_value_aux, gen_unit, write_unit_name, write_function_unit_info, write_complex_function, write_toplevel_expr, find_single_value, extend_range): Remove. (write_attr_get): Do not handle common_av->value being an FFS. (struct attr_desc): Remove func_units_p and blockage_p. (write_attr_valueq): Do not handle them. (find_attr): Do not clear them. (make_internal_attr): Do not initialize them. (main): Remove code dealing with DEFINE_FUNCTION_UNIT. * sched-vis.c (init_target_units, insn_print_units, init_block_visualization, print_block_visualization, visualize_scheduled_insns, visualize_no_unit, visualize_stall_cycles, visualize_alloc, visualize_free, target_units, get_visual_tbl_length, MAX_VISUAL_LINES, INSN_LEN, n_visual_lines, visual_tbl_line_length, visual_tbl, n_vis_no_unit, MAX_VISUAL_NO_UNIT, vis_no_unit): Remove. * haifa-sched.c (blockage_range, clear_units, schedule_unit, actual_hazard, potential_hazard, insn_unit, unit_last_insn, unit_tick, actual_hazard_this_instance, potential_hazard, schedule_unit, max_insn_queue_index_value): Remove. (MAX_INSN_QUEUE_INDEX): Removed, renamed throughout to max_insn_queue_index. * rtl.def (DEFINE_FUNCTION_UNIT): Remove. * doc/md.texi (Processor pipeline description): Remove references to old pipeline descriptions. (Automaton pipeline description): Merge with the above. (Old pipeline description, Comparison of the two descriptions): Remove. * bt-load.c (migrate_btr_def): Remove references to use_pipeline_interface. * haifa-sched.c (insn_cost, schedule_insn, schedule_block, advance_one_cycle, sched_init, queue_to_ready, sched_finish): Likewise. * modulo-sched.c (sms_schedule, advance_one_cycle, ps_has_conflicts): Likewise. * sched-rgn.c (init_ready): Likewise. (debug_dependencies): Likewise, and remove an "if (1)". * target.h (use_dfa_pipeline_interface): Remove. * config/alpha/alpha.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/arc/arc.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/arm/arm.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/c4x/c4x.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/frv/frv.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/i386/i386.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/ia64/ia64.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/iq2000/iq2000.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/m32r/m32r.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/mcore/mcore.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/mips/mips.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/pa/pa.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/rs6000/rs6000.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/s390/s390.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/sh/sh.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/sparc/sparc.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/v850/v850.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/xtensa/xtensa.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * doc/tm.texi (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. From-SVN: r84944
2004-07-20 09:27:18 +02:00
state_transition (curr_state, NULL);
genattr.c (struct range, [...]): Remove them. 2004-07-19 Paolo Bonzini <bonzini@gnu.org> * genattr.c (struct range, struct function_unit, write_units, extend_range, init_range): Remove them. (main): Remove code dealing with DEFINE_FUNCTION_UNIT. Output "#define INSN_SCHEDULING" here. * genattrtab.c (struct range, struct function_unit_op, struct function_unit, struct dimension, enum operator, operate_exp, expand_units, simplify_knowing, encode_units_mask, simplify_by_exploding, find_and_mark_used_attributes, unmark_used_attributes, add_values_to_cover, increment_current_value, test_for_current_value, simplify_with_current_value, simplify_with_current_value_aux, gen_unit, write_unit_name, write_function_unit_info, write_complex_function, write_toplevel_expr, find_single_value, extend_range): Remove. (write_attr_get): Do not handle common_av->value being an FFS. (struct attr_desc): Remove func_units_p and blockage_p. (write_attr_valueq): Do not handle them. (find_attr): Do not clear them. (make_internal_attr): Do not initialize them. (main): Remove code dealing with DEFINE_FUNCTION_UNIT. * sched-vis.c (init_target_units, insn_print_units, init_block_visualization, print_block_visualization, visualize_scheduled_insns, visualize_no_unit, visualize_stall_cycles, visualize_alloc, visualize_free, target_units, get_visual_tbl_length, MAX_VISUAL_LINES, INSN_LEN, n_visual_lines, visual_tbl_line_length, visual_tbl, n_vis_no_unit, MAX_VISUAL_NO_UNIT, vis_no_unit): Remove. * haifa-sched.c (blockage_range, clear_units, schedule_unit, actual_hazard, potential_hazard, insn_unit, unit_last_insn, unit_tick, actual_hazard_this_instance, potential_hazard, schedule_unit, max_insn_queue_index_value): Remove. (MAX_INSN_QUEUE_INDEX): Removed, renamed throughout to max_insn_queue_index. * rtl.def (DEFINE_FUNCTION_UNIT): Remove. * doc/md.texi (Processor pipeline description): Remove references to old pipeline descriptions. (Automaton pipeline description): Merge with the above. (Old pipeline description, Comparison of the two descriptions): Remove. * bt-load.c (migrate_btr_def): Remove references to use_pipeline_interface. * haifa-sched.c (insn_cost, schedule_insn, schedule_block, advance_one_cycle, sched_init, queue_to_ready, sched_finish): Likewise. * modulo-sched.c (sms_schedule, advance_one_cycle, ps_has_conflicts): Likewise. * sched-rgn.c (init_ready): Likewise. (debug_dependencies): Likewise, and remove an "if (1)". * target.h (use_dfa_pipeline_interface): Remove. * config/alpha/alpha.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/arc/arc.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/arm/arm.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/c4x/c4x.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/frv/frv.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/i386/i386.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/ia64/ia64.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/iq2000/iq2000.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/m32r/m32r.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/mcore/mcore.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/mips/mips.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/pa/pa.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/rs6000/rs6000.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/s390/s390.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/sh/sh.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/sparc/sparc.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/v850/v850.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/xtensa/xtensa.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * doc/tm.texi (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. From-SVN: r84944
2004-07-20 09:27:18 +02:00
if (targetm.sched.dfa_post_cycle_insn)
state_transition (curr_state,
targetm.sched.dfa_post_cycle_insn ());
}
/* Checks if PS has resource conflicts according to DFA, starting from
FROM cycle to TO cycle; returns true if there are conflicts and false
if there are no conflicts. Assumes DFA is being used. */
static int
ps_has_conflicts (partial_schedule_ptr ps, int from, int to)
{
int cycle;
state_reset (curr_state);
for (cycle = from; cycle <= to; cycle++)
{
ps_insn_ptr crr_insn;
/* Holds the remaining issue slots in the current row. */
int can_issue_more = issue_rate;
/* Walk through the DFA for the current row. */
for (crr_insn = ps->rows[SMODULO (cycle, ps->ii)];
crr_insn;
crr_insn = crr_insn->next_in_row)
{
rtx_insn *insn = ps_rtl_insn (ps, crr_insn->id);
invoke.texi (-fvar-tracking-assignments): New. gcc/ChangeLog: * doc/invoke.texi (-fvar-tracking-assignments): New. (-fvar-tracking-assignments-toggle): New. (-fdump-final-insns=file): Mark filename as optional. (--param min-nondebug-insn-uid): New. (-gdwarf-@{version}): Mention version 4. * opts.c (common_handle_option): Accept it. * tree-vrp.c (find_assert_locations_1): Skip debug stmts. * regrename.c (regrename_optimize): Drop last. Don't count debug insns as uses. Don't reject change because of debug insn. (do_replace): Reject DEBUG_INSN as chain starter. Take base_regno from the chain starter, and check for inexact matches in DEBUG_INSNS. (scan_rtx_reg): Accept inexact matches in DEBUG_INSNs. (build_def_use): Simplify and fix the marking of DEBUG_INSNs. * sched-ebb.c (schedule_ebbs): Skip boundary debug insns. * fwprop.c (forward_propagate_and_simplify): ...into debug insns. * doc/gimple.texi (is_gimple_debug): New. (gimple_debug_bind_p): New. (is_gimple_call, gimple_assign_cast_p): End sentence with period. * doc/install.texi (bootstrap-debug): More details. (bootstrap-debug-big, bootstrap-debug-lean): Document. (bootstrap-debug-lib): More details. (bootstrap-debug-ckovw): Update. (bootstrap-time): New. * tree-into-ssa.c (mark_def_sites): Skip debug stmts. (insert_phi_nodes_for): Insert debug stmts. (rewrite_stmt): Take iterator. Insert debug stmts. (rewrite_enter_block): Adjust. (maybe_replace_use_in_debug_stmt): New. (rewrite_update_stmt): Use it. (mark_use_interesting): Return early for debug stmts. * tree-ssa-loop-im.c (rewrite_bittest): Propagate DEFs into debug stmts before replacing stmt. (move_computations_stmt): Likewise. * ira-conflicts.c (add_copies): Skip debug insns. * regstat.c (regstat_init_n_sets_and_refs): Discount debug insns. (regstat_bb_compute_ri): Skip debug insns. * tree-ssa-threadupdate.c (redirection_block_p): Skip debug stmts. * tree-ssa-loop-manip.c (find_uses_to_rename_stmt, check_loop_closed_ssa_stmt): Skip debug stmts. * tree-tailcall.c (find_tail_calls): Likewise. * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Likewise. * tree.h (MAY_HAVE_DEBUG_STMTS): New. (build_var_debug_value_stat): Declare. (build_var_debug_value): Define. (target_for_debug_bind): Declare. * reload.c (find_equiv_reg): Skip debug insns. * rtlanal.c (reg_used_between_p): Skip debug insns. (side_effects_p): Likewise. (canonicalize_condition): Likewise. * ddg.c (create_ddg_dep_from_intra_loop_link): Check that non-debug insns never depend on debug insns. (create_ddg_dep_no_link): Likewise. (add_cross_iteration_register_deps): Use ANTI_DEP for debug insns. Don't add inter-loop dependencies for debug insns. (build_intra_loop_deps): Likewise. (create_ddg): Count debug insns. * ddg.h (struct ddg::num_debug): New. (num_backargs): Pair up with previous int field. * diagnostic.c (diagnostic_report_diagnostic): Skip notes on -fcompare-debug-second. * final.c (get_attr_length_1): Skip debug insns. (rest_of_clean-state): Don't dump CFA_RESTORE_STATE. * gcc.c (invoke_as): Call compare-debug-dump-opt. (driver_self_specs): Map -fdump-final-insns to -fdump-final-insns=.. (get_local_tick): New. (compare_debug_dump_opt_spec_function): Test for . argument and compute output name. Compute temp output spec without flag name. Compute -frandom-seed. (OPT): Undef after use. * cfgloopanal.c (num_loop_insns): Skip debug insns. (average_num_loop_insns): Likewise. * params.h (MIN_NONDEBUG_INSN_UID): New. * gimple.def (GIMPLE_DEBUG): New. * ipa-reference.c (scan_stmt_for_static_refs): Skip debug stmts. * auto-inc-dec.c (merge_in_block): Skip debug insns. (merge_in_block): Fix whitespace. * toplev.c (flag_var_tracking): Update comment. (flag_var_tracking_assignments): New. (flag_var_tracking_assignments_toggle): New. (process_options): Don't open final insns dump file if we're not going to write to it. Compute defaults for var_tracking. * df-scan.c (df_insn_rescan_debug_internal): New. (df_uses_record): Handle debug insns. * haifa-sched.c (ready): Initialize n_debug. (contributes_to_priority): Skip debug insns. (dep_list_size): New. (priority): Use it. (rank_for_schedule): Likewise. Schedule debug insns as soon as they're ready. Disregard previous debug insns to make decisions. (queue_insn): Never queue debug insns. (ready_add, ready_remove_first, ready_remove): Count debug insns. (schedule_insn): Don't reject debug insns because of issue rate. (get_ebb_head_tail, no_real_insns_p): Skip boundary debug insns. (queue_to_ready): Skip and discount debug insns. (choose_ready): Let debug insns through. (schedule_block): Check boundary debug insns. Discount debug insns, schedule them early. Adjust whitespace. (set_priorities): Check for boundary debug insns. (add_jump_dependencies): Use dep_list_size. (prev_non_location_insn): New. (check_cfg): Use it. * tree-ssa-loop-ivopts.c (find-interesting_users): Skip debug stmts. (remove_unused_ivs): Reset debug stmts. * modulo-sched.c (const_iteration_count): Skip debug insns. (res_MII): Discount debug insns. (loop_single_full_bb_p): Skip debug insns. (sms_schedule): Likewise. (sms_schedule_by_order): Likewise. (ps_has_conflicts): Likewise. * caller-save.c (refmarker_fn): New. (save_call_clobbered_regs): Replace regs with saved mem in debug insns. (mark_referenced_regs): Take pointer, mark and arg. Adjust. Call refmarker_fn mark for hardregnos. (mark_reg_as_referenced): New. (replace_reg_with_saved_mem): New. * ipa-pure-const.c (check_stmt): Skip debug stmts. * cse.c (cse_insn): Canonicalize debug insns. Skip them when searching back. (cse_extended_basic_block): Skip debug insns. (count_reg_usage): Likewise. (is_dead_reg): New, split out of... (set_live_p): ... here. (insn_live_p): Use it for debug insns. * tree-stdarg.c (check_all_va_list_escapes): Skip debug stmts. (execute_optimize_stdarg): Likewise. * tree-ssa-dom.c (propagate_rhs_into_lhs): Likewise. * tree-ssa-propagate.c (substitute_and_fold): Don't regard changes in debug stmts as changes. * sel-sched.c (moving_insn_creates_bookkeeping_block_p): New. (moveup_expr): Don't move across debug insns. Don't move debug insn if it would create a bookkeeping block. (moveup_expr_cached): Don't use cache for debug insns that are heads of blocks. (compute_av_set_inside_bb): Skip debug insns. (sel_rank_for_schedule): Schedule debug insns first. Remove dead code. (block_valid_for_bookkeeping_p); Support lax searches. (create_block_for_bookkeeping): Adjust block numbers when encountering debug-only blocks. (find_place_for_bookkeeping): Deal with debug-only blocks. (generate_bookkeeping_insn): Accept no place to insert. (remove_temp_moveop_nops): New argument full_tidying. (prepare_place_to_insert): Deal with debug insns. (advance_state_on_fence): Debug insns don't start cycles. (update_boundaries): Take fence as argument. Deal with debug insns. (schedule_expr_on_boundary): No full_tidying on debug insns. (fill_insns): Deal with debug insns. (track_scheduled_insns_and_blocks): Don't count debug insns. (need_nop_to_preserve_insn_bb): New, split out of... (remove_insn_from_stream): ... this. (fur_orig_expr_not_found): Skip debug insns. * rtl.def (VALUE): Move up. (DEBUG_INSN): New. * tree-ssa-sink.c (all_immediate_uses_same_place): Skip debug stmts. (nearest_common_dominator_of_uses): Take debug_stmts argument. Set it if debug stmts are found. (statement_sink_location): Skip debug stmts. Propagate moving defs into debug stmts. * ifcvt.c (first_active_insn): Skip debug insns. (last_active_insns): Likewise. (cond_exec_process_insns): Likewise. (noce_process_if_block): Likewise. (check_cond_move_block): Likewise. (cond_move_convert_if_block): Likewise. (block_jumps_and_fallthru_p): Likewise. (dead_or_predicable): Likewise. * dwarf2out.c (debug_str_hash_forced): New. (find_AT_string): Add comment. (gen_label_for_indirect_string): New. (get_debug_string_label): New. (AT_string_form): Use it. (mem_loc_descriptor): Handle non-TLS symbols. Handle MINUS , DIV, MOD, AND, IOR, XOR, NOT, ABS, NEG, and CONST_STRING. Accept but discard COMPARE, IF_THEN_ELSE, ROTATE, ROTATERT, TRUNCATE and several operations that cannot be represented with DWARF opcodes. (loc_descriptor): Ignore SIGN_EXTEND and ZERO_EXTEND. Require dwarf_version 4 for DW_OP_implicit_value and DW_OP_stack_value. (dwarf2out_var_location): Take during-call mark into account. (output_indirect_string): Update comment. Output if there are label and references. (prune_indirect_string): New. (prune_unused_types): Call it if debug_str_hash_forced. More in dwarf2out.c, from Jakub Jelinek <jakub@redhat.com>: (dw_long_long_const): Remove. (struct dw_val_struct): Change val_long_long type to rtx. (print_die, attr_checksum, same_dw_val_p, loc_descriptor): Adjust for val_long_long change to CONST_DOUBLE rtx from a long hi/lo pair. (output_die): Likewise. Use HOST_BITS_PER_WIDE_INT size of each component instead of HOST_BITS_PER_LONG. (output_loc_operands): Likewise. For const8* assert HOST_BITS_PER_WIDE_INT rather than HOST_BITS_PER_LONG is >= 64. (output_loc_operands_raw): For const8* assert HOST_BITS_PER_WIDE_INT rather than HOST_BITS_PER_LONG is >= 64. (add_AT_long_long): Remove val_hi and val_lo arguments, add val_const_double. (size_of_die): Use HOST_BITS_PER_WIDE_INT size multiplier instead of HOST_BITS_PER_LONG for dw_val_class_long_long. (add_const_value_attribute): Adjust add_AT_long_long caller. Don't handle TLS SYMBOL_REFs. If CONST wraps a constant, tail recurse. (dwarf_stack_op_name): Handle DW_OP_implicit_value and DW_OP_stack_value. (size_of_loc_descr, output_loc_operands, output_loc_operands_raw): Handle DW_OP_implicit_value. (extract_int): Move prototype earlier. (mem_loc_descriptor): For SUBREG punt if inner mode size is wider than DWARF2_ADDR_SIZE. Handle SIGN_EXTEND and ZERO_EXTEND by DW_OP_shl and DW_OP_shr{a,}. Handle EQ, NE, GT, GE, LT, LE, GTU, GEU, LTU, LEU, SMIN, SMAX, UMIN, UMAX, SIGN_EXTRACT, ZERO_EXTRACT. (loc_descriptor): Compare mode size with DWARF2_ADDR_SIZE instead of Pmode size. (loc_descriptor): Add MODE argument. Handle CONST_INT, CONST_DOUBLE, CONST_VECTOR, CONST, LABEL_REF and SYMBOL_REF if mode != VOIDmode, attempt to handle other expressions. Don't handle TLS SYMBOL_REFs. (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor_from_tree_1): Adjust loc_descriptor callers. (add_location_or_const_value_attribute): Likewise. For single location loc_lists attempt to use add_const_value_attribute for constant decls. Add DW_AT_const_value even if NOTE_VAR_LOCATION is VAR_LOCATION with CONSTANT_P or CONST_STRING in its expression. * cfgbuild.c (inside_basic_block_p): Handle debug insns. (control_flow_insn_p): Likewise. * tree-parloops.c (eliminate_local_variables_stmt): Handle debug stmt. (separate_decls_in_region_debug_bind): New. (separate_decls_in_region): Process debug bind stmts afterwards. * recog.c (verify_changes): Handle debug insns. (extract_insn): Likewise. (peephole2_optimize): Skip debug insns. * dse.c (scan_insn): Skip debug insns. * sel-sched-ir.c (return_nop_to_pool): Take full_tidying argument. Pass it on. (setup_id_for_insn): Handle debug insns. (maybe_tidy_empty_bb): Adjust whitespace. (tidy_control_flow): Skip debug insns. (sel_remove_insn): Adjust for debug insns. (sel_estimate_number_of_insns): Skip debug insns. (create_insn_rtx_from_pattern): Handle debug insns. (create_copy_of_insn_rtx): Likewise. * sel-sched-.h (sel_bb_end): Declare. (sel_bb_empty_or_nop_p): New. (get_all_loop_exits): Use it. (_eligible_successor_edge_p): Likewise. (return_nop_to_pool): Adjust. * tree-eh.c (tre_empty_eh_handler_p): Skip debug stmts. * ira-lives.c (process_bb_node_lives): Skip debug insns. * gimple-pretty-print.c (dump_gimple_debug): New. (dump_gimple_stmt): Use it. (dump_bb_header): Skip gimple debug stmts. * regmove.c (optimize_reg_copy_1): Discount debug insns. (fixup_match_2): Likewise. (regmove_backward_pass): Likewise. Simplify combined replacement. Handle debug insns. * function.c (instantiate_virtual_regs): Handle debug insns. * function.h (struct emit_status): Add x_cur_debug_insn_uid. * print-rtl.h: Include cselib.h. (print_rtx): Print VALUEs. Split out and recurse for VAR_LOCATIONs. * df.h (df_inns_rescan_debug_internal): Declare. * gcse.c (alloc_hash_table): Estimate n_insns. (cprop_insn): Don't regard debug insns as changes. (bypass_conditional_jumps): Skip debug insns. (one_pre_gcse_pass): Adjust. (one_code_hoisting_pass): Likewise. (compute_ld_motion_mems): Skip debug insns. (one_cprop_pass): Adjust. * tree-if-conv.c (tree_if_convert_stmt): Reset debug stmts. (if_convertible_stmt_p): Handle debug stmts. * init-regs.c (initialize_uninitialized_regs): Skip debug insns. * tree-vect-loop.c (vect_is_simple_reduction): Skip debug stmts. * ira-build.c (create_bb_allocnos): Skip debug insns. * tree-flow-inline.h (has_zero_uses): Discount debug stmts. (has_single_use): Likewise. (single_imm_use): Likewise. (num_imm_uses): Likewise. * tree-ssa-phiopt.c (empty_block_p): Skip debug stmts. * tree-ssa-coalesce.c (build_ssa_conflict_graph): Skip debug stmts. (create_outofssa_var_map): Likewise. * lower-subreg.c (adjust_decomposed_uses): New. (resolve_debug): New. (decompose_multiword_subregs): Use it. * tree-dfa.c (find_referenced_vars): Skip debug stmts. * emit-rtl.c: Include params.h. (cur_debug_insn_uid): Define. (set_new_first_and_last_insn): Set cur_debug_insn_uid too. (copy_rtx_if_shared_1): Handle debug insns. (reset_used_flags): Likewise. (set_used_flags): LIkewise. (get_max_insn_count): New. (next_nondebug_insn): New. (prev_nondebug_insn): New. (make_debug_insn_raw): New. (emit_insn_before_noloc): Handle debug insns. (emit_jump_insn_before_noloc): Likewise. (emit_call_insn_before_noloc): Likewise. (emit_debug_insn_before_noloc): New. (emit_insn_after_noloc): Handle debug insns. (emit_jump_insn_after_noloc): Likewise. (emit_call_insn_after_noloc): Likewise. (emit_debug_insn_after_noloc): Likewise. (emit_insn_after): Take loc from earlier non-debug insn. (emit_jump_insn_after): Likewise. (emit_call_insn_after): Likewise. (emit_debug_insn_after_setloc): New. (emit_debug_insn_after): New. (emit_insn_before): Take loc from later non-debug insn. (emit_jump_insn_before): Likewise. (emit_call_insn_before): Likewise. (emit_debug_insn_before_setloc): New. (emit_debug_insn_before): New. (emit_insn): Handle debug insns. (emit_debug_insn): New. (emit_jump_insn): Handle debug insns. (emit_call_insn): Likewise. (emit): Likewise. (init_emit): Take min-nondebug-insn-uid into account. Initialize cur_debug_insn_uid. (emit_copy_of_insn_after): Handle debug insns. * cfgexpand.c (gimple_assign_rhs_to_tree): Do not overwrite location of single rhs in place. (maybe_dump_rtl_for_gimple_stmt): Dump lineno. (floor_sdiv_adjust): New. (cell_sdiv_adjust): New. (cell_udiv_adjust): New. (round_sdiv_adjust): New. (round_udiv_adjust): New. (wrap_constant): Moved from cselib. (unwrap_constant): New. (expand_debug_expr): New. (expand_debug_locations): New. (expand_gimple_basic_block): Drop hiding redeclaration. Expand debug bind stmts. (gimple_expand_cfg): Expand debug locations. * cselib.c: Include tree-pass.h. (struct expand_value_data): New. (cselib_record_sets_hook): New. (PRESERVED_VALUE_P, LONG_TERM_PRESERVED_VALUE_P): New. (cselib_clear_table): Move, and implemnet in terms of... (cselib_reset_table_with_next_value): ... this. (cselib_get_next_unknown_value): New. (discard_useless_locs): Don't discard preserved values. (cselib_preserve_value): New. (cselib_preserved_value_p): New. (cselib_preserve_definitely): New. (cselib_clear_preserve): New. (cselib_preserve_only_values): New. (new_cselib_val): Take rtx argument. Dump it in details. (cselib_lookup_mem): Adjust. (expand_loc): Take regs_active in struct. Adjust. Silence dumps unless details are requested. (cselib_expand_value_rtx_cb): New. (cselib_expand_value_rtx): Rename and reimplment in terms of... (cselib_expand_value_rtx_1): ... this. Adjust. Silence dumps without details. Copy more subregs. Try to resolve values using a callback. Wrap constants. (cselib_subst_to_values): Adjust. (cselib_log_lookup): New. (cselib_lookup): Call it. (cselib_invalidate_regno): Don't count preserved values as useless. (cselib_invalidate_mem): Likewise. (cselib_record_set): Likewise. (struct set): Renamed to cselib_set, moved to cselib.h. (cselib_record_sets): Adjust. Call hook. (cselib_process_insn): Reset table when it would be cleared. (dump_cselib_val): New. (dump_cselib_table): New. * tree-cfgcleanup.c (tree_forwarded_block_p): Skip debug stmts. (remove_forwarder_block): Support moving debug stmts. * cselib.h (cselib_record_sets_hook): Declare. (cselib_expand_callback): New type. (cselib_expand_value_rtx_cb): Declare. (cselib_reset_table_with_next_value): Declare. (cselib_get_next_unknown_value): Declare. (cselib_preserve_value): Declare. (cselib_preserved_value_p): Declare. (cselib_preserve_only_values): Declare. (dump_cselib_table): Declare. * cfgcleanup.c (flow_find_cross_jump): Skip debug insns. (try_crossjump_to_edge): Likewise. (delete_unreachable_blocks): Remove dominant GIMPLE blocks after dominated blocks when debug stmts are present. * simplify-rtx.c (delegitimize_mem_from_attrs): New. * tree-ssa-live.c (remove_unused_locals): Skip debug stmts. (set_var_live_on_entry): Likewise. * loop-invariant.c (find_invariants_bb): Skip debug insns. * cfglayout.c (curr_location, last_location): Make static. (set_curr_insn_source_location): Don't avoid bouncing. (get_curr_insn_source_location): New. (get_curr_insn_block): New. (duplicate_insn_chain): Handle debug insns. * tree-ssa-forwprop.c (forward_propagate_addr_expr): Propagate into debug stmts. * common.opt (fcompare-debug): Move to sort order. (fdump-unnumbered-links): Likewise. (fvar-tracking-assignments): New. (fvar-tracking-assignments-toggle): New. * tree-ssa-dce.c (mark_stmt_necessary): Don't mark blocks because of debug stmts. (mark_stmt_if_obviously_necessary): Mark debug stmts. (eliminate_unnecessary_stmts): Walk dominated blocks before dominators. * tree-ssa-ter.c (find_replaceable_in_bb): Skip debug stmts. * ira.c (memref_used_between_p): Skip debug insns. (update_equiv_regs): Likewise. * sched-deps.c (sd_lists_size): Accept empty list. (sd_init_insn): Mark debug insns. (sd_finish_insn): Unmark them. (sd_add_dep): Reject non-debug deps on debug insns. (fixup_sched_groups): Give debug insns group treatment. Skip debug insns. (sched_analyze_reg): Don't mark debug insns for sched before call. (sched_analyze_2): Handle debug insns. (sched_analyze_insn): Compute next non-debug insn. Handle debug insns. (deps_analyze_insn): Handle debug insns. (deps_start_bb): Skip debug insns. (init_deps): Initialize last_debug_insn. * tree-ssa.c (target_for_debug_bind): New. (find_released_ssa_name): New. (propagate_var_def_into_debug_stmts): New. (propagate_defs_into_debug_stmts): New. (verify_ssa): Skip debug bind stmts without values. (warn_uninialized_vars): Skip debug stmts. * target-def.h (TARGET_DELEGITIMIZE_ADDRESS): Set default. * rtl.c (rtx_equal_p_cb): Handle VALUEs. (rtx_equal_p): Likewise. * ira-costs.c (scan_one_insn): Skip debug insns. (process_bb_node_for_hard_reg_moves): Likewise. * rtl.h (DEBUG_INSN_P): New. (NONDEBUG_INSN_P): New. (MAY_HAVE_DEBUG_INSNS): New. (INSN_P): Accept debug insns. (RTX_FRAME_RELATED_P): Likewise. (INSN_DELETED_P): Likewise (PAT_VAR_LOCATION_DECL): New. (PAT_VAR_LOCATION_LOC): New. (PAT_VAR_OCATION_STATUS): New. (NOTE_VAR_LOCATION_DECL): Reimplement. (NOTE_VAR_LOCATION_LOC): Likewise. (NOTE_VAR_LOCATION_STATUS): Likewise. (INSN_VAR_LOCATION): New. (INSN_VAR_LOCATION_DECL): New. (INSN_VAR_LOCATION_LOC): New. (INSN_VAR_LOCATION_STATUS): New. (gen_rtx_UNKNOWN_VAR_LOC): New. (VAR_LOC_UNKNOWN_P): New. (NOTE_DURING_CALL_P): New. (SCHED_GROUP_P): Accept debug insns. (emit_debug_insn_before): Declare. (emit_debug_insn_before_noloc): Declare. (emit_debug_insn_beore_setloc): Declare. (emit_debug_insn_after): Declare. (emit_debug_insn_after_noloc): Declare. (emit_debug_insn_after_setloc): Declare. (emit_debug_insn): Declare. (make_debug_insn_raw): Declare. (prev_nondebug_insn): Declare. (next_nondebug_insn): Declare. (delegitimize_mem_from_attrs): Declare. (get_max_insn_count): Declare. (wrap_constant): Declare. (unwrap_constant): Declare. (get_curr_insn_source_location): Declare. (get_curr_insn_block): Declare. * tree-inline.c (insert_debug_decl_map): New. (processing_debug_stmt): New. (remap_decl): Don't create new mappings in debug stmts. (remap_gimple_op_r): Don't add references in debug stmts. (copy_tree_body_r): Likewise. (remap_gimple_stmt): Handle debug bind stmts. (copy_bb): Skip debug stmts. (copy_edges_for_bb): Likewise. (copy_debug_stmt): New. (copy_debug_stmts): New. (copy_body): Copy debug stmts at the end. (insert_init_debug_bind): New. (insert_init_stmt): Take id. Skip and emit debug stmts. (setup_one_parameter): Remap variable earlier, register debug mapping. (estimate_num_insns): Skip debug stmts. (expand_call_inline): Preserve debug_map. (optimize_inline_calls): Check for no debug_stmts left-overs. (unsave_expr_now): Preserve debug_map. (copy_gimple_seq_and_replace_locals): Likewise. (tree_function_versioning): Check for no debug_stmts left-overs. Init and destroy debug_map as needed. Split edges unconditionally. (build_duplicate_type): Init and destroy debug_map as needed. * tree-inline.h: Include gimple.h instead of pointer-set.h. (struct copy_body_data): Add debug_stmts and debug_map. * sched-int.h (struct ready_list): Add n_debug. (struct deps): Add last_debug_insn. (DEBUG_INSN_SCHED_P): New. (BOUNDARY_DEBUG_INSN_P): New. (SCHEDULE_DEBUG_INSN_P): New. (sd_iterator_cond): Accept empty list. * combine.c (create_log_links): Skip debug insns. (combine_instructions): Likewise. (cleanup_auto_inc_dec): New. From Jakub Jelinek: Make sure the return value is always unshared. (struct rtx_subst_pair): New. (auto_adjust_pair): New. (propagate_for_debug_subst): New. (propagate_for_debug): New. (try_combine): Skip debug insns. Propagate removed defs into debug insns. (next_nonnote_nondebug_insn): New. (distribute_notes): Use it. Skip debug insns. (distribute_links): Skip debug insns. * tree-outof-ssa.c (set_location_for_edge): Likewise. * resource.c (mark_target_live_regs): Likewise. * var-tracking.c: Include cselib.h and target.h. (enum micro_operation_type): Add MO_VAL_USE, MO_VAL_LOC, and MO_VAL_SET. (micro_operation_type_name): New. (enum emit_note_where): Add EMIT_NOTE_AFTER_CALL_INSN. (struct micro_operation_def): Update comments. (decl_or_value): New type. Use instead of decls. (struct emit_note_data_def): Add vars. (struct attrs_def): Use decl_or_value. (struct variable_tracking_info_def): Add permp, flooded. (struct location_chain_def): Update comment. (struct variable_part_def): Use decl_or_value. (struct variable_def): Make var_part a variable length array. (valvar_pool): New. (scratch_regs): New. (cselib_hook_called): New. (dv_is_decl_p): New. (dv_is_value_p): New. (dv_as_decl): New. (dv_as_value): New. (dv_as_opaque): New. (dv_onepart_p): New. (dv_pool): New. (IS_DECL_CODE): New. (check_value_is_not_decl): New. (dv_from_decl): New. (dv_from_value): New. (dv_htab_hash): New. (variable_htab_hash): Use it. (variable_htab_eq): Support values. (variable_htab_free): Free from the right pool. (attrs_list_member, attrs_list_insert): Use decl_or_value. (attrs_list_union): Adjust. (attrs_list_mpdv_union): New. (tie_break_pointers): New. (canon_value_cmp): New. (unshare_variable): Return possibly-modified slot. (vars_copy_1): Adjust. (var_reg_decl_set): Adjust. Split out of... (var_reg_set): ... this. (get_init_value): Adjust. (var_reg_delete_and_set): Adjust. (var_reg_delete): Adjust. (var_regno_delete): Adjust. (var_mem_decl_set): Split out of... (var_mem_set): ... this. (var_mem_delete_and_set): Adjust. (var_mem_delete): Adjust. (val_store): New. (val_reset): New. (val_resolve): New. (variable_union): Adjust. Speed up merge of 1-part vars. (variable_canonicalize): Use unshared slot. (VALUED_RECURSED_INTO): New. (find_loc_in_1pdv): New. (struct dfset_merge): New. (insert_into_intersection): New. (intersect_loc_chains): New. (loc_cmp): New. (canonicalize_loc_order_check): New. (canonicalize_values_mark): New. (canonicalize_values_star): New. (variable_merge_over_cur): New. (variable_merge_over_src): New. (dataflow_set_merge): New. (dataflow_set_equiv_regs): New. (remove_duplicate_values): New. (struct dfset_post_merge): New. (variable_post_merge_new_vals): New. (variable_post_merge_perm_vals): New. (dataflow_post_merge_adjust): New. (find_mem_expr_in_1pdv): New. (dataflow_set_preserve_mem_locs): New. (dataflow_set_remove_mem_locs): New. (dataflow_set_clear_at_call): New. (onepart_variable_different_p): New. (variable_different_p): Use it. (dataflow_set_different_1): Adjust. Make detailed dump more verbose. (track_expr_p): Add need_rtl parameter. Don't generate rtl if not needed. (track_loc_p): Pass it true. (struct count_use_info): New. (find_use_val): New. (replace_expr_with_values): New. (log_op_type): New. (use_type): New, partially split out of... (count_uses): ... this. Count new micro-ops. (count_uses_1): Adjust. (count_stores): Adjust. (count_with_sets): New. (VAL_NEEDS_RESOLUTION): New. (VAL_HOLDS_TRACK_EXPR): New. (VAL_EXPR_IS_COPIED): New. (VAL_EXPR_IS_CLOBBERED): New. (add_uses): Adjust. Generate new micro-ops. (add_uses_1): Adjust. (add_stores): Generate new micro-ops. (add_with_sets): New. (find_src_status): Adjust. (find_src_set_src): Adjust. (compute_bb_dataflow): Use dataflow_set_clear_at_call. Handle new micro-ops. Canonicalize value equivalances. (vt_find_locations): Compute total size of hash tables for dumping. Perform merge for var-tracking-assignments. Don't disregard single-block loops. (dump_attrs_list): Handle decl_or_value. (dump_variable): Take variable. Deal with decl_or_value. (dump_variable_slot): New. (dump_vars): Use it. (dump_dataflow_sets): Adjust. (set_slot_part): New, extended to support one-part variables after splitting out of... (set_variable_part): ... this. (clobber_slot_part): New, split out of... (clobber_variable_part): ... this. (delete_slot_part): New, split out of... (delete_variable_part): .... this. (check_wrap_constant): New. (vt_expand_loc_callback): New. (vt_expand_loc): New. (emit_note_insn_var_location): Adjust. Handle values. Handle EMIT_NOTE_AFTER_CALL_INSN. (emit_notes_for_differences_1): Adjust. Handle values. (emit_notes_for_differences_2): Likewise. (emit_notes_for_differences): Adjust. (emit_notes_in_bb): Take pointer to set. Emit AFTER_CALL_INSN notes. Adjust. Handle new micro-ops. (vt_add_function_parameters): Adjust. Create and bind values. (vt_initialize): Adjust. Initialize scratch_regs and valvar_pool, flooded and perm.. Initialize and use cselib. Log operations. Move some code to count_with_sets and add_with_sets. (delete_debug_insns): New. (vt_debug_insns_local): New. (vt_finalize): Release permp, valvar_pool, scratch_regs. Finish cselib. (var_tracking_main): If var-tracking-assignments is enabled but var-tracking isn't, delete debug insns and leave. Likewise if we exceed limits or fail the stack adjustments tests, and after all var-tracking processing. More in var-tracking, from Jakub Jelinek <jakub@redhat.com>: (dataflow_set): Add traversed_vars. (value_chain, const_value_chain): New typedefs. (value_chain_pool, value_chains): New variables. (value_chain_htab_hash, value_chain_htab_eq, add_value_chain, add_value_chains, add_cselib_value_chains, remove_value_chain, remove_value_chains, remove_cselib_value_chains): New functions. (shared_hash_find_slot_unshare_1, shared_hash_find_slot_1, shared_hash_find_slot_noinsert_1, shared_hash_find_1): New static inlines. (shared_hash_find_slot_unshare, shared_hash_find_slot, shared_hash_find_slot_noinsert, shared_hash_find): Update. (dst_can_be_shared): New variable. (unshare_variable): Unshare set->vars if shared, use shared_hash_*. Clear dst_can_be_shared. If set->traversed_vars is non-NULL and different from set->vars, look up slot again instead of using the passed in slot. (dataflow_set_init): Initialize traversed_vars. (variable_union): Use shared_hash_*. Use initially NO_INSERT lookup if set->vars is shared. Don't keep slot cleared before calling unshare_variable. Unshare set->vars if needed. Adjust unshare_variable callers. Clear dst_can_be_shared if needed. Even ->refcount == 1 vars must be unshared if set->vars is shared and var needs to be modified. (dataflow_set_union): Set traversed_vars during canonicalization. (VALUE_CHANGED, DECL_CHANGED): Define. (set_dv_changed, dv_changed_p): New static inlines. (track_expr_p): Clear DECL_CHANGED. (dump_dataflow_sets): Set it. (variable_was_changed): Call set_dv_changed. (emit_note_insn_var_location): Likewise. (changed_variables_stack): New variable. (check_changed_vars_1, check_changed_vars_2): New functions. (emit_notes_for_changes): Do nothing if changed_variables is empty. Traverse changed_variables with check_changed_vars_1, call check_changed_vars_2 on each changed_variables_stack entry. (emit_notes_in_bb): Add SET argument. Just clear it at the beginning, use it instead of local &set, don't destroy it at the end. (vt_emit_notes): Call dataflow_set_clear early on all VTI(bb)->out sets, never use them, instead use emit_notes_in_bb computed set, dataflow_set_clear also VTI(bb)->in when we are done with the basic block. Initialize changed_variables_stack, free it afterwards. If ENABLE_CHECKING verify that after noting differences to an empty set value_chains hash table is empty. (vt_initialize): Initialize value_chains and value_chain_pool. (vt_finalize): Delete value_chains htab, free value_chain_pool. (variable_tracking_main): Call dump_dataflow_sets before calling vt_emit_notes, not after it. * tree-flow.h (propagate_defs_into_debug_stmts): Declare. (propagate_var_def_into_debug_stmts): Declare. * df-problems.c (df_lr_bb_local_compute): Skip debug insns. (df_set_note): Reject debug insns. (df_whole_mw_reg_dead_p): Take added_notes_p argument. Don't add notes to debug insns. (df_note_bb_compute): Adjust. Likewise. (df_simulate_uses): Skip debug insns. (df_simulate_initialize_backwards): Likewise. * reg-stack.c (subst_stack_regs_in_debug_insn): New. (subst_stack_regs_pat): Reject debug insns. (convert_regs_1): Handle debug insns. * Makefile.in (TREE_INLINE_H): Take pointer-set.h from GIMPLE_H. (print-rtl.o): Depend on cselib.h. (cselib.o): Depend on TREE_PASS_H. (var-tracking.o): Depend on cselib.h and TARGET_H. * sched-rgn.c (rgn_estimate_number_of_insns): Discount debug insns. (init_ready_list): Skip boundary debug insns. (add_branch_dependences): Skip debug insns. (free_block_dependencies): Check for blocks with only debug insns. (compute_priorities): Likewise. * gimple.c (gss_for_code): Handle GIMPLE_DEBUG. (gimple_build_with_ops_stat): Take subcode as unsigned. Adjust all callers. (gimple_build_debug_bind_stat): New. (empty_body_p): Skip debug stmts. (gimple_has_side_effects): Likewise. (gimple_rhs_has_side_effects): Likewise. * gimple.h (enum gimple_debug_subcode, GIMPLE_DEBUG_BIND): New. (gimple_build_debug_bind_stat): Declare. (gimple_build_debug_bind): Define. (is_gimple_debug): New. (gimple_debug_bind_p): New. (gimple_debug_bind_get_var): New. (gimple_debug_bind_get_value): New. (gimple_debug_bind_get_value_ptr): New. (gimple_debug_bind_set_var): New. (gimple_debug_bind_set_value): New. (GIMPLE_DEBUG_BIND_NOVALUE): New internal temporary macro. (gimple_debug_bind_reset_value): New. (gimple_debug_bind_has_value_p): New. (gsi_next_nondebug): New. (gsi_prev_nondebug): New. (gsi_start_nondebug_bb): New. (gsi_last_nondebug_bb): New. * sched-vis.c (print_pattern): Handle VAR_LOCATION. (print_insn): Handle DEBUG_INSN. * tree-cfg.c (remove_bb): Walk stmts backwards. Let loc of first insn prevail. (first_stmt): Skip debug stmts. (first_non_label_stmt): Likewise. (last_stmt): Likewise. (has_zero_uses_1): New. (single_imm_use_1): New. (verify_gimple_debug): New. (verify_types_in_gimple_stmt): Handle debug stmts. (verify_stmt): Likewise. (debug_loop_num): Skip debug stmts. (remove_edge_and_dominated_blocks): Remove dominators last. * tree-ssa-reasssoc.c (rewrite_expr_tree): Propagate into debug stmts. (linearize_expr): Likewise. * config/i386/i386.c (ix86_delegitimize_address): Call default implementation. * config/ia64/ia64.c (ia64_safe_itanium_class): Handle debug insns. (group_barrier_needed): Skip debug insns. (emit_insn_group_barriers): Likewise. (emit_all_insn_group_barriers): Likewise. (ia64_variable_issue): Handle debug insns. (ia64_dfa_new_cycle): Likewise. (final_emit_insn_group_barriers): Skip debug insns. (ia64_dwarf2out_def_steady_cfa): Take frame argument. Don't def cfa without frame. (process_set): Likewise. (process_for_unwind_directive): Pass frame on. * config/rs6000/rs6000.c (TARGET_DELEGITIMIZE_ADDRESS): Define. (rs6000_delegitimize_address): New. (rs6000_debug_adjust_cost): Handle debug insns. (is_microcoded_insn): Likewise. (is_cracked_insn): Likewise. (is_nonpipeline_insn): Likewise. (insn_must_be_first_in_group): Likewise. (insn_must_be_last_in_group): Likewise. (force_new_group): Likewise. * cfgrtl.c (rtl_split_block): Emit INSN_DELETED note if block contains only debug insns. (rtl_merge_blocks): Skip debug insns. (purge_dead_edges): Likewise. (rtl_block_ends_with_call_p): Skip debug insns. * dce.c (deletable_insn_p): Handle VAR_LOCATION. (mark_reg_dependencies): Skip debug insns. * params.def (PARAM_MIN_NONDEBUG_INSN_UID): New. * tree-ssanames.c (release_ssa_name): Propagate def into debug stmts. * tree-ssa-threadedge.c (record_temporary_equivalences_from_stmts): Skip debug stmts. * regcprop.c (replace_oldest_value_addr): Skip debug insns. (replace_oldest_value_mem): Use ALL_REGS for debug insns. (copyprop_hardreg_forward_1): Handle debug insns. * reload1.c (reload): Skip debug insns. Replace unassigned pseudos in debug insns with their equivalences. (eliminate_regs_in_insn): Skip debug insns. (emit_input_reload_insns): Skip debug insns at first, adjust them later. * tree-ssa-operands.c (add_virtual_operand): Reject debug stmts. (get_indirect_ref_operands): Pass opf_no_vops on. (get_expr_operands): Likewise. Skip debug stmts. (parse_ssa_operands): Scan debug insns with opf_no_vops. gcc/testsuite/ChangeLog: * gcc.dg/guality/guality.c: New. * gcc.dg/guality/guality.h: New. * gcc.dg/guality/guality.exp: New. * gcc.dg/guality/example.c: New. * lib/gcc-dg.exp (cleanup-dump): Remove .gk files. (cleanup-saved-temps): Likewise, .gkd files too. gcc/cp/ChangeLog: * cp-tree.h (TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS): New. * cp-lang.c (cxx_dwarf_name): Pass it. * error.c (count_non_default_template_args): Take flags as argument. Adjust all callers. Skip counting of default arguments if the new flag is given. ChangeLog: * Makefile.tpl (BUILD_CONFIG): Default to bootstrap-debug. * Makefile.in: Rebuilt. contrib/ChangeLog: * compare-debug: Look for .gkd files and compare them. config/ChangeLog: * bootstrap-debug.mk: Add comments. * bootstrap-debug-big.mk: New. * bootstrap-debug-lean.mk: New. * bootstrap-debug-ckovw.mk: Add comments. * bootstrap-debug-lib.mk: Drop CFLAGS for stages. Use -g0 for TFLAGS in stage1. Drop -fvar-tracking-assignments-toggle. From-SVN: r151312
2009-09-02 04:42:21 +02:00
if (!NONDEBUG_INSN_P (insn))
continue;
/* Check if there is room for the current insn. */
if (!can_issue_more || state_dead_lock_p (curr_state))
return true;
/* Update the DFA state and return with failure if the DFA found
cgraph.c: Fix typos in comments. gcc/ * cgraph.c: Fix typos in comments. (cgraph_availability_names): Fix string typo. * fold-const.c: Fix typos in comments. (fold_binary): Fix typo in warning. * genautomata.c: Fix typos in comments. (check_presence_pattern_sets): Fix typo in local variable. (output_description): Fix typo in output. * ggc-zone.c (ggc_pch_finish): Fix typo in error message. * hwint.h: Likewise. * matrix-reorg.c (check_allocation_function): Likewise. * omega.c (smooth_weird_equations): Likewise. * auto-inc-dec.c: Fix typos in comments. * bb-reorder.c: Likewise. * builtins.c: Likewise. * c-common.c: Likewise. * c-cppbuiltin.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfglayout.c: Likewise. * cfgloopmanip.c: Likewise. * cgraphunit.c: Likewise. * coverage.c: Likewise. * dbxout.c: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dfp.c: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * dse.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * function.c: Likewise. * function.h: Likewise. * gcc.c: Likewise. * gcov-io.c: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattrtab.c: Likewise. * ggc-page.c: Likewise. * gimplify.c: Likewise. * gthr-lynx.h: Likewise. * haifa-sched.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.h: Likewise. * ipa-pure-const.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa.c: Likewise. * loop-doloop.c: Likewise. * mips-tfile.c: Likewise. * mkmap-flat.awk: Likewise. * mkmap-symver.awk: Likewise. * modulo-sched.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts.c: Likewise. * passes.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * pretty-print.h: Likewise. * profile.c: Likewise. * protoize.c: Likewise. * ra-conflict.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * regclass.c: Likewise. * regs.h: Likewise. * reload.c: Likewise. * rtl-error.c: Likewise. * rtlanal.c: Likewise. * scan.h: Likewise. * sched-rgn.c: Likewise. * see.c: Likewise. * stmt.c: Likewise. * target.h: Likewise. * tree-dfa.c: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-alias-warnings.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.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-ivopts.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa.c: Likewise. * tree-vect-analyze.c: Likewise. * tree-vect-transform.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vn.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * unwind-dw2-fde.c: Likewise. * unwind.inc: Likewise. * value-prof.c: Likewise. * vmsdbgout.c: Likewise. From-SVN: r136425
2008-06-06 07:42:00 +02:00
resource conflicts. */
if (state_transition (curr_state, insn) >= 0)
return true;
if (targetm.sched.variable_issue)
can_issue_more =
targetm.sched.variable_issue (sched_dump, sched_verbose,
insn, can_issue_more);
/* A naked CLOBBER or USE generates no instruction, so don't
let them consume issue slots. */
else if (GET_CODE (PATTERN (insn)) != USE
&& GET_CODE (PATTERN (insn)) != CLOBBER)
can_issue_more--;
}
/* Advance the DFA to the next cycle. */
advance_one_cycle ();
}
return false;
}
/* Checks if the given node causes resource conflicts when added to PS at
cycle C. If not the node is added to PS and returned; otherwise zero
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: 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-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.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. * 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. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: 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-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.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-live.h: 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-operands.h: 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-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.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-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
is returned. Bit N is set in MUST_PRECEDE/MUST_FOLLOW if the node with
cuid N must be come before/after (respectively) the node pointed to by
PS_I when scheduled in the same cycle. */
ps_insn_ptr
modulo-sched.c (ps_insn): Replace node field with an identifier. gcc/ * modulo-sched.c (ps_insn): Replace node field with an identifier. (SCHED_ASAP): Replace with.. (NODE_ASAP): ...this macro. (SCHED_PARAMS): New macro. (SCHED_TIME, SCHED_FIRST_REG_MOVE, SCHED_NREG_MOVES, SCHED_ROW) (SCHED_STAGE, SCHED_COLUMN): Redefine using SCHED_PARAMS. (node_sched_params): Remove asap. (ps_rtl_insn, ps_first_note): New functions. (set_node_sched_params): Use XCNEWVEC. Don't copy across the asap values. (print_node_sched_params): Use SCHED_PARAMS and NODE_ASAP. (generate_reg_moves): Pass ids to the SCHED_* macros. (update_node_sched_params): Take a ps insn identifier rather than a node as parameter. Use ps_rtl_insn. (set_columns_for_ps): Update for above field and SCHED_* macro changes. (permute_partial_schedule): Use ps_rtl_insn and ps_first_note. (optimize_sc): Update for above field and SCHED_* macro changes. Update calls to try_scheduling_node_in_cycle and update_node_sched_params. (duplicate_insns_of_cycles): Adjust for above field and SCHED_* macro changes. Use ps_rtl_insn and ps_first_note. (sms_schedule): Pass ids to the SCHED_* macros. (get_sched_window): Adjust for above field and SCHED_* macro changes. Use NODE_ASAP instead of SCHED_ASAP. (try_scheduling_node_in_cycle): Remove node parameter. Update call to ps_add_node_check_conflicts. Pass ids to the SCHED_* macros. (sms_schedule_by_order): Update call to try_scheduling_node_in_cycle. (ps_insert_empty_row): Adjust for above field changes. (compute_split_row): Use ids rather than nodes. (verify_partial_schedule): Adjust for above field changes. (print_partial_schedule): Use ps_rtl_insn. (create_ps_insn): Take an id rather than a node. (ps_insn_find_column): Adjust for above field changes. Use ps_rtl_insn. (ps_insn_advance_column): Adjust for above field changes. (add_node_to_ps): Remove node parameter. Update call to create_ps_insn. (ps_has_conflicts): Use ps_rtl_insn. (ps_add_node_check_conflicts): Replace node parameter than an id. From-SVN: r179742
2011-10-10 13:42:21 +02:00
ps_add_node_check_conflicts (partial_schedule_ptr ps, int n,
int c, sbitmap must_precede,
sbitmap must_follow)
{
int has_conflicts = 0;
ps_insn_ptr ps_i;
/* First add the node to the PS, if this succeeds check for
conflicts, trying different issue slots in the same row. */
if (! (ps_i = add_node_to_ps (ps, n, c, must_precede, must_follow)))
return NULL; /* Failed to insert the node at the given cycle. */
has_conflicts = ps_has_conflicts (ps, c, c)
|| (ps->history > 0
&& ps_has_conflicts (ps,
c - ps->history,
c + ps->history));
/* Try different issue slots to find one that the given node can be
scheduled in without conflicts. */
while (has_conflicts)
{
if (! ps_insn_advance_column (ps, ps_i, must_follow))
break;
has_conflicts = ps_has_conflicts (ps, c, c)
|| (ps->history > 0
&& ps_has_conflicts (ps,
c - ps->history,
c + ps->history));
}
if (has_conflicts)
{
remove_node_from_ps (ps, ps_i);
return NULL;
}
ps->min_cycle = MIN (ps->min_cycle, c);
ps->max_cycle = MAX (ps->max_cycle, c);
return ps_i;
}
/* Calculate the stage count of the partial schedule PS. The calculation
2011-08-03 09:59:23 +02:00
takes into account the rotation amount passed in ROTATION_AMOUNT. */
int
2011-08-03 09:59:23 +02:00
calculate_stage_count (partial_schedule_ptr ps, int rotation_amount)
{
int new_min_cycle = PS_MIN_CYCLE (ps) - rotation_amount;
int new_max_cycle = PS_MAX_CYCLE (ps) - rotation_amount;
int stage_count = CALC_STAGE_COUNT (-1, new_min_cycle, ps->ii);
/* The calculation of stage count is done adding the number of stages
before cycle zero and after cycle zero. */
stage_count += CALC_STAGE_COUNT (new_max_cycle, 0, ps->ii);
return stage_count;
}
/* Rotate the rows of PS such that insns scheduled at time
START_CYCLE will appear in row 0. Updates max/min_cycles. */
void
rotate_partial_schedule (partial_schedule_ptr ps, int start_cycle)
{
int i, row, backward_rotates;
int last_row = ps->ii - 1;
if (start_cycle == 0)
return;
backward_rotates = SMODULO (start_cycle, ps->ii);
/* Revisit later and optimize this into a single loop. */
for (i = 0; i < backward_rotates; i++)
{
ps_insn_ptr first_row = ps->rows[0];
int first_row_length = ps->rows_length[0];
for (row = 0; row < last_row; row++)
{
ps->rows[row] = ps->rows[row + 1];
ps->rows_length[row] = ps->rows_length[row + 1];
}
ps->rows[last_row] = first_row;
ps->rows_length[last_row] = first_row_length;
}
ps->max_cycle -= start_cycle;
ps->min_cycle -= start_cycle;
}
Makefile.in: Adjust dependencies. 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in: Adjust dependencies. * tree-pass.h: Add new passes and passes formerly in tree-optimize.c. * basic-block.h (duplicate_computed_gotos): Remove, it is now static. * alias.c (rest_of_handle_cfg, pass_cfg): New. * bb-reorder.c (duplicate_computed_gotos): Make it static. * cfgexpand.c (tree_expand_cfg): Add code formerly at the beginning of rest_of_compilation. * bb-reorder.c (gate_duplicate_computed_gotos, pass_duplicate_computed_gotos, gate_handle_reorder_blocks, rest_of_handle_reorder_blocks, pass_reorder_blocks, gate_handle_partition_blocks, rest_of_handle_partition_blocks, pass_partition_blocks): New. * bt-load.c (gate_handle_branch_target_load_optimize, rest_of_handle_branch_target_load_optimize, pass_branch_target_load_optimize): New. * cfgcleanup.c (rest_of_handle_jump, pass_jump, rest_of_handle_jump2, pass_jump2): New. * cfglayout.c (pass_insn_locators_initialize): New. * cfgrtl.c (pass_free_cfg): New. * combine.c (gate_handle_combine, rest_of_handle_combine, pass_combine): New. * cse.c (gate_handle_cse, rest_of_handle_cse, pass_cse, gate_handle_cse2, rest_of_handle_cse2, pass_cse2): New. * emit-rtl.c (pass_unshare_all_rtl, pass_remove_unnecessary_notes): New. * except.c (pass_set_nothrow_function_flags, pass_convert_to_eh_region_ranges, gate_handle_eh, rest_of_handle_eh, pass_rtl_eh): New. * final.c (pass_compute_alignments, rest_of_handle_final, pass_final, rest_of_handle_shorten_branches, pass_shorten_branches, rest_of_clean_state, pass_clean_state): New. * flow.c (pass_recompute_reg_usage, gate_remove_death_notes, rest_of_handle_remove_death_notes, pass_remove_death_notes, rest_of_handle_life, pass_life, rest_of_handle_flow2, pass_flow2): New. * function.c (pass_instantiate_virtual_regs, pass_init_function, rest_of_handle_check_leaf_regs, pass_leaf_regs): New. * gcse.c (gate_handle_jump_bypass, rest_of_handle_jump_bypass, pass_jump_bypass, gate_handle_gcse, rest_of_handle_gcse, pass_gcse): New. * global.c (rest_of_handle_global_alloc, pass_global_alloc): New. * ifcvt.c (gate_handle_if_conversion, rest_of_handle_if_conversion, pass_rtl_ifcvt, gate_handle_if_after_combine, rest_of_handle_if_after_combine, pass_if_after_combine, gate_handle_if_after_reload, rest_of_handle_if_after_reload, pass_if_after_reload): New. * integrate.c (pass_initial_value_sets): New. * jump.c (pass_cleanup_barriers, purge_line_number_notes, pass_purge_lineno_notes): New. * mode-switching.c (rest_of_handle_mode_switching, pass_mode_switching): New. * local-alloc.c (rest_of_handle_local_alloc, pass_local_alloc): New. * loop-init.c (gate_handle_loop2, rest_of_handle_loop2, pass_loop2): New. * loop.c (gate_handle_loop_optimize, rest_of_handle_loop_optimize, pass_loop_optimize): New. * modulo-sched.c (gate_handle_sms, rest_of_handle_sms, pass_sms): New. * postreload-gcse.c (gate_handle_gcse2, rest_of_handle_gcse2, pass_gcse2): New. * postreload.c (gate_handle_postreload, rest_of_handle_postreload, pass_postreload_cse): New. * profile.c (gate_handle_profiling, pass_profiling, rest_of_handle_branch_prob, pass_branch_prob): New. * recog.c (pass pass_split_for_shorten_branches, gate_do_final_split, pass_split_before_regstack, gate_handle_split_before_regstack, gate_handle_peephole2, rest_of_handle_peephole2, pass_peephole2, rest_of_handle_split_all_insns, pass_split_all_insns): New. * reg-stack.c (gate_handle_stack_regs, rest_of_handle_stack_regs, pass_stack_regs): New. * regmove.c (gate_handle_regmove, rest_of_handle_regmove, pass_regmove, gate_handle_stack_adjustments, rest_of_handle_stack_adjustments, pass_stack_adjustments): New. * regrename.c (gate_handle_regrename, rest_of_handle_regrename, pass_regrename): New. * reorg.c (gate_handle_delay_slots, rest_of_handle_delay_slots, pass_delay_slots, gate_handle_machine_reorg, rest_of_handle_machine_reorg, pass_machine_reorg): New. * rtl.h (extern void purge_line_number_notes): New. * sched-rgn.c (gate_handle_sched, rest_of_handle_sched, gate_handle_sched2, rest_of_handle_sched2, pass_sched, pass_sched2): New. * tracer.c (gate_handle_tracer, rest_of_handle_tracer, pass_tracer): New. * value-prof.c (gate_handle_value_profile_transformations, rest_of_handle_value_profile_transformations, pass_value_profile_transformations): New. * var-tracking.c (gate_handle_var_tracking, pass_variable_tracking): New. * web.c (gate_handle_web, rest_of_handle_web, pass_web): New. * passes.c (open_dump_file, close_dump_file, rest_of_handle_final, rest_of_handle_delay_slots, rest_of_handle_stack_regs, rest_of_handle_variable_tracking, rest_of_handle_machine_reorg, rest_of_handle_old_regalloc, rest_of_handle_regrename, rest_of_handle_reorder_blocks, rest_of_handle_partition_blocks, rest_of_handle_sms, rest_of_handle_sched, rest_of_handle_sched2, rest_of_handle_gcse2, rest_of_handle_regmove, rest_of_handle_tracer, rest_of_handle_if_conversion, rest_of_handle_if_after_combine, rest_of_handle_if_after_reload, rest_of_handle_web, rest_of_handle_branch_prob, rest_of_handle_value_profile_transformations, rest_of_handle_cfg, rest_of_handle_jump_bypass, rest_of_handle_combine, rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2, rest_of_handle_gcse, rest_of_handle_loop_optimize, rest_of_handle_loop2, rest_of_handle_branch_target_load_optimize, rest_of_handle_mode_switching, rest_of_handle_jump, rest_of_handle_eh, rest_of_handle_stack_adjustments, rest_of_handle_flow2, rest_of_handle_jump2, rest_of_handle_peephole2, rest_of_handle_postreload, rest_of_handle_shorten_branches, rest_of_clean_state, rest_of_compilation): Remove. * cgraphunit.c (ipa_passes): Moved from tree-optimize.c. * passes.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list): Moved from tree-optimize.c. (init_optimization_passes): Moved from tree-optimize.c, adding the RTL optimizations. * tree-dump.h (dump_info_p, dump_flag): Moved from tree.h. * tree-optimize.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list, init_tree_optimization_passes, ipa_passes): Delete. * tree-pass.h (enum tree_dump_index): Moved from tree.h, removing the RTL dumps. (TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved from tree.h. (ipa_passes): Remove. (all_passes, all_ipa_passes, all_lowering_passes): Now extern. * tree.h (enum tree_dump_index, TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved to tree-pass.h. (dump_info_p, dump_flag): Moved to tree-dump.h. * Makefile.in: Adjust dependencies for tree-pretty-print.c, cgraph.c, opts.c. * passes.c (finish_optimization_passes): Use dump_begin and dump_end, TDI_end. (gate_rest_of_compilation): New. (pass_rest_of_compilation): Use it. (gate_postreload, pass_postreload): New. * toplev.c (general_init): Rename init_tree_optimization_passes. * toplev.h (init_tree_optimization_passes): Rename to init_optimizations_passes. * tree-dump.c (dump_flag): Make static. (dump_files): Remove RTL dumps. * tree-optimize.c (pass_all_optimizations, pass_early_local_passes, pass_cleanup_cfg, pass_free_cfg_annotations, pass_cleanup_cfg_post_optimizing, pass_free_datastructures, pass_init_datastructures, pass_fixup_cfg): Make non-static. * tree-pretty-print.c: Include tree-pass.h. * cgraph.c: Include tree-dump.h. cp: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (class.o, decl2.o): Adjust dependencies. * class.c: Include tree-dump.h. * decl2.c: Include tree-dump.h. java: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (parse.o): Adjust dependencies. * parse.y: Include tree-dump.h. From-SVN: r101627
2005-07-05 18:20:53 +02:00
#endif /* INSN_SCHEDULING */
/* Run instruction scheduler. */
/* Perform SMS module scheduling. */
Automated conversion of passes to C++ classes gcc/ Patch autogenerated by refactor_passes.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 03fe39476a4c4ea450b49e087cfa817b5f92021e * asan.c (pass_asan): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_asan): ...new pass_data instance and... (make_pass_asan): ...new function. (pass_asan_O0): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_asan_O0): ...new pass_data instance and... (make_pass_asan_O0): ...new function. * auto-inc-dec.c (pass_inc_dec): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_inc_dec): ...new pass_data instance and... (make_pass_inc_dec): ...new function. * bb-reorder.c (pass_reorder_blocks): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_reorder_blocks): ...new pass_data instance and... (make_pass_reorder_blocks): ...new function. (pass_duplicate_computed_gotos): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_duplicate_computed_gotos): ...new pass_data instance and... (make_pass_duplicate_computed_gotos): ...new function. (pass_partition_blocks): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_partition_blocks): ...new pass_data instance and... (make_pass_partition_blocks): ...new function. * bt-load.c (pass_branch_target_load_optimize1): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_branch_target_load_optimize1): ...new pass_data instance and... (make_pass_branch_target_load_optimize1): ...new function. (pass_branch_target_load_optimize2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_branch_target_load_optimize2): ...new pass_data instance and... (make_pass_branch_target_load_optimize2): ...new function. * cfgcleanup.c (pass_jump): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_jump): ...new pass_data instance and... (make_pass_jump): ...new function. (pass_jump2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_jump2): ...new pass_data instance and... (make_pass_jump2): ...new function. * cfgexpand.c (pass_expand): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_expand): ...new pass_data instance and... (make_pass_expand): ...new function. * cfgrtl.c (pass_free_cfg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_free_cfg): ...new pass_data instance and... (make_pass_free_cfg): ...new function. (pass_into_cfg_layout_mode): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_into_cfg_layout_mode): ...new pass_data instance and... (make_pass_into_cfg_layout_mode): ...new function. (pass_outof_cfg_layout_mode): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_outof_cfg_layout_mode): ...new pass_data instance and... (make_pass_outof_cfg_layout_mode): ...new function. * cgraphbuild.c (pass_build_cgraph_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_cgraph_edges): ...new pass_data instance and... (make_pass_build_cgraph_edges): ...new function. (pass_rebuild_cgraph_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_rebuild_cgraph_edges): ...new pass_data instance and... (make_pass_rebuild_cgraph_edges): ...new function. (pass_remove_cgraph_callee_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_remove_cgraph_callee_edges): ...new pass_data instance and... (make_pass_remove_cgraph_callee_edges): ...new function. * combine-stack-adj.c (pass_stack_adjustments): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_adjustments): ...new pass_data instance and... (make_pass_stack_adjustments): ...new function. * combine.c (pass_combine): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_combine): ...new pass_data instance and... (make_pass_combine): ...new function. * compare-elim.c (pass_compare_elim_after_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_compare_elim_after_reload): ...new pass_data instance and... (make_pass_compare_elim_after_reload): ...new function. * cprop.c (pass_rtl_cprop): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_cprop): ...new pass_data instance and... (make_pass_rtl_cprop): ...new function. * cse.c (pass_cse): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cse): ...new pass_data instance and... (make_pass_cse): ...new function. (pass_cse2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cse2): ...new pass_data instance and... (make_pass_cse2): ...new function. (pass_cse_after_global_opts): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cse_after_global_opts): ...new pass_data instance and... (make_pass_cse_after_global_opts): ...new function. * dce.c (pass_ud_rtl_dce): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_ud_rtl_dce): ...new pass_data instance and... (make_pass_ud_rtl_dce): ...new function. (pass_fast_rtl_dce): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_fast_rtl_dce): ...new pass_data instance and... (make_pass_fast_rtl_dce): ...new function. * df-core.c (pass_df_initialize_opt): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_df_initialize_opt): ...new pass_data instance and... (make_pass_df_initialize_opt): ...new function. (pass_df_initialize_no_opt): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_df_initialize_no_opt): ...new pass_data instance and... (make_pass_df_initialize_no_opt): ...new function. (pass_df_finish): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_df_finish): ...new pass_data instance and... (make_pass_df_finish): ...new function. * dse.c (pass_rtl_dse1): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_dse1): ...new pass_data instance and... (make_pass_rtl_dse1): ...new function. (pass_rtl_dse2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_dse2): ...new pass_data instance and... (make_pass_rtl_dse2): ...new function. * dwarf2cfi.c (pass_dwarf2_frame): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_dwarf2_frame): ...new pass_data instance and... (make_pass_dwarf2_frame): ...new function. * except.c (pass_set_nothrow_function_flags): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_set_nothrow_function_flags): ...new pass_data instance and... (make_pass_set_nothrow_function_flags): ...new function. (pass_convert_to_eh_region_ranges): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_convert_to_eh_region_ranges): ...new pass_data instance and... (make_pass_convert_to_eh_region_ranges): ...new function. * final.c (pass_compute_alignments): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_compute_alignments): ...new pass_data instance and... (make_pass_compute_alignments): ...new function. (pass_final): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_final): ...new pass_data instance and... (make_pass_final): ...new function. (pass_shorten_branches): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_shorten_branches): ...new pass_data instance and... (make_pass_shorten_branches): ...new function. (pass_clean_state): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_clean_state): ...new pass_data instance and... (make_pass_clean_state): ...new function. * function.c (pass_instantiate_virtual_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_instantiate_virtual_regs): ...new pass_data instance and... (make_pass_instantiate_virtual_regs): ...new function. (pass_leaf_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_leaf_regs): ...new pass_data instance and... (make_pass_leaf_regs): ...new function. (pass_thread_prologue_and_epilogue): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_thread_prologue_and_epilogue): ...new pass_data instance and... (make_pass_thread_prologue_and_epilogue): ...new function. (pass_match_asm_constraints): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_match_asm_constraints): ...new pass_data instance and... (make_pass_match_asm_constraints): ...new function. * fwprop.c (pass_rtl_fwprop): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_fwprop): ...new pass_data instance and... (make_pass_rtl_fwprop): ...new function. (pass_rtl_fwprop_addr): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_fwprop_addr): ...new pass_data instance and... (make_pass_rtl_fwprop_addr): ...new function. * gcse.c (pass_rtl_pre): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_pre): ...new pass_data instance and... (make_pass_rtl_pre): ...new function. (pass_rtl_hoist): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_hoist): ...new pass_data instance and... (make_pass_rtl_hoist): ...new function. * gimple-low.c (pass_lower_cf): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_cf): ...new pass_data instance and... (make_pass_lower_cf): ...new function. * gimple-ssa-strength-reduction.c (pass_strength_reduction): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_strength_reduction): ...new pass_data instance and... (make_pass_strength_reduction): ...new function. * ifcvt.c (pass_rtl_ifcvt): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_ifcvt): ...new pass_data instance and... (make_pass_rtl_ifcvt): ...new function. (pass_if_after_combine): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_if_after_combine): ...new pass_data instance and... (make_pass_if_after_combine): ...new function. (pass_if_after_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_if_after_reload): ...new pass_data instance and... (make_pass_if_after_reload): ...new function. * init-regs.c (pass_initialize_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_initialize_regs): ...new pass_data instance and... (make_pass_initialize_regs): ...new function. * ipa-cp.c (pass_ipa_cp): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_cp): ...new pass_data instance and... (make_pass_ipa_cp): ...new function. * ipa-inline-analysis.c (pass_inline_parameters): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_inline_parameters): ...new pass_data instance and... (make_pass_inline_parameters): ...new function. * ipa-inline.c (pass_early_inline): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_early_inline): ...new pass_data instance and... (make_pass_early_inline): ...new function. (pass_ipa_inline): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_inline): ...new pass_data instance and... (make_pass_ipa_inline): ...new function. * ipa-pure-const.c (pass_local_pure_const): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_local_pure_const): ...new pass_data instance and... (make_pass_local_pure_const): ...new function. (pass_ipa_pure_const): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_pure_const): ...new pass_data instance and... (make_pass_ipa_pure_const): ...new function. * ipa-reference.c (pass_ipa_reference): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_reference): ...new pass_data instance and... (make_pass_ipa_reference): ...new function. * ipa-split.c (pass_split_functions): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_split_functions): ...new pass_data instance and... (make_pass_split_functions): ...new function. (pass_feedback_split_functions): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_feedback_split_functions): ...new pass_data instance and... (make_pass_feedback_split_functions): ...new function. * ipa.c (pass_ipa_function_and_variable_visibility): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_function_and_variable_visibility): ...new pass_data instance and... (make_pass_ipa_function_and_variable_visibility): ...new function. (pass_ipa_free_inline_summary): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_free_inline_summary): ...new pass_data instance and... (make_pass_ipa_free_inline_summary): ...new function. (pass_ipa_whole_program_visibility): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_whole_program_visibility): ...new pass_data instance and... (make_pass_ipa_whole_program_visibility): ...new function. (pass_ipa_profile): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_profile): ...new pass_data instance and... (make_pass_ipa_profile): ...new function. (pass_ipa_cdtor_merge): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_cdtor_merge): ...new pass_data instance and... (make_pass_ipa_cdtor_merge): ...new function. * ira.c (pass_ira): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_ira): ...new pass_data instance and... (make_pass_ira): ...new function. (pass_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_reload): ...new pass_data instance and... (make_pass_reload): ...new function. * jump.c (pass_cleanup_barriers): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cleanup_barriers): ...new pass_data instance and... (make_pass_cleanup_barriers): ...new function. * loop-init.c (pass_loop2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_loop2): ...new pass_data instance and... (make_pass_loop2): ...new function. (pass_rtl_loop_init): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_loop_init): ...new pass_data instance and... (make_pass_rtl_loop_init): ...new function. (pass_rtl_loop_done): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_loop_done): ...new pass_data instance and... (make_pass_rtl_loop_done): ...new function. (pass_rtl_move_loop_invariants): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_move_loop_invariants): ...new pass_data instance and... (make_pass_rtl_move_loop_invariants): ...new function. (pass_rtl_unswitch): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_unswitch): ...new pass_data instance and... (make_pass_rtl_unswitch): ...new function. (pass_rtl_unroll_and_peel_loops): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_unroll_and_peel_loops): ...new pass_data instance and... (make_pass_rtl_unroll_and_peel_loops): ...new function. (pass_rtl_doloop): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_doloop): ...new pass_data instance and... (make_pass_rtl_doloop): ...new function. * lower-subreg.c (pass_lower_subreg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_lower_subreg): ...new pass_data instance and... (make_pass_lower_subreg): ...new function. (pass_lower_subreg2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_lower_subreg2): ...new pass_data instance and... (make_pass_lower_subreg2): ...new function. * lto-streamer-out.c (pass_ipa_lto_gimple_out): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_lto_gimple_out): ...new pass_data instance and... (make_pass_ipa_lto_gimple_out): ...new function. (pass_ipa_lto_finish_out): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_lto_finish_out): ...new pass_data instance and... (make_pass_ipa_lto_finish_out): ...new function. * mode-switching.c (pass_mode_switching): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_mode_switching): ...new pass_data instance and... (make_pass_mode_switching): ...new function. * modulo-sched.c (pass_sms): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_sms): ...new pass_data instance and... (make_pass_sms): ...new function. * omp-low.c (pass_expand_omp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_expand_omp): ...new pass_data instance and... (make_pass_expand_omp): ...new function. (pass_lower_omp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_omp): ...new pass_data instance and... (make_pass_lower_omp): ...new function. (pass_diagnose_omp_blocks): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_diagnose_omp_blocks): ...new pass_data instance and... (make_pass_diagnose_omp_blocks): ...new function. * passes.c (pass_early_local_passes): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_early_local_passes): ...new pass_data instance and... (make_pass_early_local_passes): ...new function. (pass_all_early_optimizations): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_all_early_optimizations): ...new pass_data instance and... (make_pass_all_early_optimizations): ...new function. (pass_all_optimizations): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_all_optimizations): ...new pass_data instance and... (make_pass_all_optimizations): ...new function. (pass_all_optimizations_g): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_all_optimizations_g): ...new pass_data instance and... (make_pass_all_optimizations_g): ...new function. (pass_rest_of_compilation): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rest_of_compilation): ...new pass_data instance and... (make_pass_rest_of_compilation): ...new function. (pass_postreload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_postreload): ...new pass_data instance and... (make_pass_postreload): ...new function. * postreload-gcse.c (pass_gcse2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_gcse2): ...new pass_data instance and... (make_pass_gcse2): ...new function. * postreload.c (pass_postreload_cse): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_postreload_cse): ...new pass_data instance and... (make_pass_postreload_cse): ...new function. * predict.c (pass_profile): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_profile): ...new pass_data instance and... (make_pass_profile): ...new function. (pass_strip_predict_hints): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_strip_predict_hints): ...new pass_data instance and... (make_pass_strip_predict_hints): ...new function. * recog.c (pass_peephole2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_peephole2): ...new pass_data instance and... (make_pass_peephole2): ...new function. (pass_split_all_insns): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_all_insns): ...new pass_data instance and... (make_pass_split_all_insns): ...new function. (pass_split_after_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_after_reload): ...new pass_data instance and... (make_pass_split_after_reload): ...new function. (pass_split_before_regstack): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_before_regstack): ...new pass_data instance and... (make_pass_split_before_regstack): ...new function. (pass_split_before_sched2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_before_sched2): ...new pass_data instance and... (make_pass_split_before_sched2): ...new function. (pass_split_for_shorten_branches): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_for_shorten_branches): ...new pass_data instance and... (make_pass_split_for_shorten_branches): ...new function. * ree.c (pass_ree): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_ree): ...new pass_data instance and... (make_pass_ree): ...new function. * reg-stack.c (pass_stack_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_regs): ...new pass_data instance and... (make_pass_stack_regs): ...new function. (pass_stack_regs_run): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_regs_run): ...new pass_data instance and... (make_pass_stack_regs_run): ...new function. * regcprop.c (pass_cprop_hardreg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cprop_hardreg): ...new pass_data instance and... (make_pass_cprop_hardreg): ...new function. * reginfo.c (pass_reginfo_init): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_reginfo_init): ...new pass_data instance and... (make_pass_reginfo_init): ...new function. * regmove.c (pass_regmove): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_regmove): ...new pass_data instance and... (make_pass_regmove): ...new function. * regrename.c (pass_regrename): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_regrename): ...new pass_data instance and... (make_pass_regrename): ...new function. * reorg.c (pass_delay_slots): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_delay_slots): ...new pass_data instance and... (make_pass_delay_slots): ...new function. (pass_machine_reorg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_machine_reorg): ...new pass_data instance and... (make_pass_machine_reorg): ...new function. * sched-rgn.c (pass_sched): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_sched): ...new pass_data instance and... (make_pass_sched): ...new function. (pass_sched2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_sched2): ...new pass_data instance and... (make_pass_sched2): ...new function. * stack-ptr-mod.c (pass_stack_ptr_mod): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_ptr_mod): ...new pass_data instance and... (make_pass_stack_ptr_mod): ...new function. * store-motion.c (pass_rtl_store_motion): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_store_motion): ...new pass_data instance and... (make_pass_rtl_store_motion): ...new function. * tracer.c (pass_tracer): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tracer): ...new pass_data instance and... (make_pass_tracer): ...new function. * trans-mem.c (pass_diagnose_tm_blocks): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_diagnose_tm_blocks): ...new pass_data instance and... (make_pass_diagnose_tm_blocks): ...new function. (pass_lower_tm): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_tm): ...new pass_data instance and... (make_pass_lower_tm): ...new function. (pass_tm_init): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_init): ...new pass_data instance and... (make_pass_tm_init): ...new function. (pass_tm_mark): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_mark): ...new pass_data instance and... (make_pass_tm_mark): ...new function. (pass_tm_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_edges): ...new pass_data instance and... (make_pass_tm_edges): ...new function. (pass_tm_memopt): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_memopt): ...new pass_data instance and... (make_pass_tm_memopt): ...new function. (pass_ipa_tm): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_tm): ...new pass_data instance and... (make_pass_ipa_tm): ...new function. * tree-call-cdce.c (pass_call_cdce): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_call_cdce): ...new pass_data instance and... (make_pass_call_cdce): ...new function. * tree-cfg.c (pass_build_cfg): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_cfg): ...new pass_data instance and... (make_pass_build_cfg): ...new function. (pass_split_crit_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_split_crit_edges): ...new pass_data instance and... (make_pass_split_crit_edges): ...new function. (pass_warn_function_return): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_function_return): ...new pass_data instance and... (make_pass_warn_function_return): ...new function. (pass_warn_function_noreturn): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_function_noreturn): ...new pass_data instance and... (make_pass_warn_function_noreturn): ...new function. (pass_warn_unused_result): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_unused_result): ...new pass_data instance and... (make_pass_warn_unused_result): ...new function. * tree-cfgcleanup.c (pass_merge_phi): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_merge_phi): ...new pass_data instance and... (make_pass_merge_phi): ...new function. * tree-complex.c (pass_lower_complex): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_complex): ...new pass_data instance and... (make_pass_lower_complex): ...new function. (pass_lower_complex_O0): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_complex_O0): ...new pass_data instance and... (make_pass_lower_complex_O0): ...new function. * tree-eh.c (pass_lower_eh): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_eh): ...new pass_data instance and... (make_pass_lower_eh): ...new function. (pass_refactor_eh): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_refactor_eh): ...new pass_data instance and... (make_pass_refactor_eh): ...new function. (pass_lower_resx): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_resx): ...new pass_data instance and... (make_pass_lower_resx): ...new function. (pass_lower_eh_dispatch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_eh_dispatch): ...new pass_data instance and... (make_pass_lower_eh_dispatch): ...new function. (pass_cleanup_eh): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cleanup_eh): ...new pass_data instance and... (make_pass_cleanup_eh): ...new function. * tree-emutls.c (pass_ipa_lower_emutls): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_lower_emutls): ...new pass_data instance and... (make_pass_ipa_lower_emutls): ...new function. * tree-if-conv.c (pass_if_conversion): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_if_conversion): ...new pass_data instance and... (make_pass_if_conversion): ...new function. * tree-into-ssa.c (pass_build_ssa): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_ssa): ...new pass_data instance and... (make_pass_build_ssa): ...new function. * tree-loop-distribution.c (pass_loop_distribution): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_loop_distribution): ...new pass_data instance and... (make_pass_loop_distribution): ...new function. * tree-mudflap.c (pass_mudflap_1): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_1): ...new pass_data instance and... (make_pass_mudflap_1): ...new function. (pass_mudflap_2): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_2): ...new pass_data instance and... (make_pass_mudflap_2): ...new function. * tree-nomudflap.c (pass_mudflap_1): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_1): ...new pass_data instance and... (make_pass_mudflap_1): ...new function. (pass_mudflap_2): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_2): ...new pass_data instance and... (make_pass_mudflap_2): ...new function. * tree-nrv.c (pass_nrv): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_nrv): ...new pass_data instance and... (make_pass_nrv): ...new function. (pass_return_slot): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_return_slot): ...new pass_data instance and... (make_pass_return_slot): ...new function. * tree-object-size.c (pass_object_sizes): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_object_sizes): ...new pass_data instance and... (make_pass_object_sizes): ...new function. * tree-optimize.c (pass_cleanup_cfg_post_optimizing): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cleanup_cfg_post_optimizing): ...new pass_data instance and... (make_pass_cleanup_cfg_post_optimizing): ...new function. (pass_fixup_cfg): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_fixup_cfg): ...new pass_data instance and... (make_pass_fixup_cfg): ...new function. * tree-pass.h (pass_mudflap_1): Replace declaration with that of... (make_pass_mudflap_1): ...new function. (pass_mudflap_2): Replace declaration with that of... (make_pass_mudflap_2): ...new function. (pass_asan): Replace declaration with that of... (make_pass_asan): ...new function. (pass_asan_O0): Replace declaration with that of... (make_pass_asan_O0): ...new function. (pass_tsan): Replace declaration with that of... (make_pass_tsan): ...new function. (pass_tsan_O0): Replace declaration with that of... (make_pass_tsan_O0): ...new function. (pass_lower_cf): Replace declaration with that of... (make_pass_lower_cf): ...new function. (pass_refactor_eh): Replace declaration with that of... (make_pass_refactor_eh): ...new function. (pass_lower_eh): Replace declaration with that of... (make_pass_lower_eh): ...new function. (pass_lower_eh_dispatch): Replace declaration with that of... (make_pass_lower_eh_dispatch): ...new function. (pass_lower_resx): Replace declaration with that of... (make_pass_lower_resx): ...new function. (pass_build_cfg): Replace declaration with that of... (make_pass_build_cfg): ...new function. (pass_early_tree_profile): Replace declaration with that of... (make_pass_early_tree_profile): ...new function. (pass_cleanup_eh): Replace declaration with that of... (make_pass_cleanup_eh): ...new function. (pass_sra): Replace declaration with that of... (make_pass_sra): ...new function. (pass_sra_early): Replace declaration with that of... (make_pass_sra_early): ...new function. (pass_early_ipa_sra): Replace declaration with that of... (make_pass_early_ipa_sra): ...new function. (pass_tail_recursion): Replace declaration with that of... (make_pass_tail_recursion): ...new function. (pass_tail_calls): Replace declaration with that of... (make_pass_tail_calls): ...new function. (pass_tree_loop): Replace declaration with that of... (make_pass_tree_loop): ...new function. (pass_tree_loop_init): Replace declaration with that of... (make_pass_tree_loop_init): ...new function. (pass_lim): Replace declaration with that of... (make_pass_lim): ...new function. (pass_tree_unswitch): Replace declaration with that of... (make_pass_tree_unswitch): ...new function. (pass_predcom): Replace declaration with that of... (make_pass_predcom): ...new function. (pass_iv_canon): Replace declaration with that of... (make_pass_iv_canon): ...new function. (pass_scev_cprop): Replace declaration with that of... (make_pass_scev_cprop): ...new function. (pass_empty_loop): Replace declaration with that of... (make_pass_empty_loop): ...new function. (pass_record_bounds): Replace declaration with that of... (make_pass_record_bounds): ...new function. (pass_graphite): Replace declaration with that of... (make_pass_graphite): ...new function. (pass_graphite_transforms): Replace declaration with that of... (make_pass_graphite_transforms): ...new function. (pass_if_conversion): Replace declaration with that of... (make_pass_if_conversion): ...new function. (pass_loop_distribution): Replace declaration with that of... (make_pass_loop_distribution): ...new function. (pass_vectorize): Replace declaration with that of... (make_pass_vectorize): ...new function. (pass_slp_vectorize): Replace declaration with that of... (make_pass_slp_vectorize): ...new function. (pass_complete_unroll): Replace declaration with that of... (make_pass_complete_unroll): ...new function. (pass_complete_unrolli): Replace declaration with that of... (make_pass_complete_unrolli): ...new function. (pass_parallelize_loops): Replace declaration with that of... (make_pass_parallelize_loops): ...new function. (pass_loop_prefetch): Replace declaration with that of... (make_pass_loop_prefetch): ...new function. (pass_iv_optimize): Replace declaration with that of... (make_pass_iv_optimize): ...new function. (pass_tree_loop_done): Replace declaration with that of... (make_pass_tree_loop_done): ...new function. (pass_ch): Replace declaration with that of... (make_pass_ch): ...new function. (pass_ccp): Replace declaration with that of... (make_pass_ccp): ...new function. (pass_phi_only_cprop): Replace declaration with that of... (make_pass_phi_only_cprop): ...new function. (pass_build_ssa): Replace declaration with that of... (make_pass_build_ssa): ...new function. (pass_build_alias): Replace declaration with that of... (make_pass_build_alias): ...new function. (pass_build_ealias): Replace declaration with that of... (make_pass_build_ealias): ...new function. (pass_dominator): Replace declaration with that of... (make_pass_dominator): ...new function. (pass_dce): Replace declaration with that of... (make_pass_dce): ...new function. (pass_dce_loop): Replace declaration with that of... (make_pass_dce_loop): ...new function. (pass_cd_dce): Replace declaration with that of... (make_pass_cd_dce): ...new function. (pass_call_cdce): Replace declaration with that of... (make_pass_call_cdce): ...new function. (pass_merge_phi): Replace declaration with that of... (make_pass_merge_phi): ...new function. (pass_split_crit_edges): Replace declaration with that of... (make_pass_split_crit_edges): ...new function. (pass_pre): Replace declaration with that of... (make_pass_pre): ...new function. (pass_profile): Replace declaration with that of... (make_pass_profile): ...new function. (pass_strip_predict_hints): Replace declaration with that of... (make_pass_strip_predict_hints): ...new function. (pass_lower_complex_O0): Replace declaration with that of... (make_pass_lower_complex_O0): ...new function. (pass_lower_complex): Replace declaration with that of... (make_pass_lower_complex): ...new function. (pass_lower_vector): Replace declaration with that of... (make_pass_lower_vector): ...new function. (pass_lower_vector_ssa): Replace declaration with that of... (make_pass_lower_vector_ssa): ...new function. (pass_lower_omp): Replace declaration with that of... (make_pass_lower_omp): ...new function. (pass_diagnose_omp_blocks): Replace declaration with that of... (make_pass_diagnose_omp_blocks): ...new function. (pass_expand_omp): Replace declaration with that of... (make_pass_expand_omp): ...new function. (pass_expand_omp_ssa): Replace declaration with that of... (make_pass_expand_omp_ssa): ...new function. (pass_object_sizes): Replace declaration with that of... (make_pass_object_sizes): ...new function. (pass_strlen): Replace declaration with that of... (make_pass_strlen): ...new function. (pass_fold_builtins): Replace declaration with that of... (make_pass_fold_builtins): ...new function. (pass_stdarg): Replace declaration with that of... (make_pass_stdarg): ...new function. (pass_early_warn_uninitialized): Replace declaration with that of... (make_pass_early_warn_uninitialized): ...new function. (pass_late_warn_uninitialized): Replace declaration with that of... (make_pass_late_warn_uninitialized): ...new function. (pass_cse_reciprocals): Replace declaration with that of... (make_pass_cse_reciprocals): ...new function. (pass_cse_sincos): Replace declaration with that of... (make_pass_cse_sincos): ...new function. (pass_optimize_bswap): Replace declaration with that of... (make_pass_optimize_bswap): ...new function. (pass_optimize_widening_mul): Replace declaration with that of... (make_pass_optimize_widening_mul): ...new function. (pass_warn_function_return): Replace declaration with that of... (make_pass_warn_function_return): ...new function. (pass_warn_function_noreturn): Replace declaration with that of... (make_pass_warn_function_noreturn): ...new function. (pass_cselim): Replace declaration with that of... (make_pass_cselim): ...new function. (pass_phiopt): Replace declaration with that of... (make_pass_phiopt): ...new function. (pass_forwprop): Replace declaration with that of... (make_pass_forwprop): ...new function. (pass_phiprop): Replace declaration with that of... (make_pass_phiprop): ...new function. (pass_tree_ifcombine): Replace declaration with that of... (make_pass_tree_ifcombine): ...new function. (pass_dse): Replace declaration with that of... (make_pass_dse): ...new function. (pass_nrv): Replace declaration with that of... (make_pass_nrv): ...new function. (pass_rename_ssa_copies): Replace declaration with that of... (make_pass_rename_ssa_copies): ...new function. (pass_sink_code): Replace declaration with that of... (make_pass_sink_code): ...new function. (pass_fre): Replace declaration with that of... (make_pass_fre): ...new function. (pass_check_data_deps): Replace declaration with that of... (make_pass_check_data_deps): ...new function. (pass_copy_prop): Replace declaration with that of... (make_pass_copy_prop): ...new function. (pass_vrp): Replace declaration with that of... (make_pass_vrp): ...new function. (pass_uncprop): Replace declaration with that of... (make_pass_uncprop): ...new function. (pass_return_slot): Replace declaration with that of... (make_pass_return_slot): ...new function. (pass_reassoc): Replace declaration with that of... (make_pass_reassoc): ...new function. (pass_rebuild_cgraph_edges): Replace declaration with that of... (make_pass_rebuild_cgraph_edges): ...new function. (pass_remove_cgraph_callee_edges): Replace declaration with that of... (make_pass_remove_cgraph_callee_edges): ...new function. (pass_build_cgraph_edges): Replace declaration with that of... (make_pass_build_cgraph_edges): ...new function. (pass_local_pure_const): Replace declaration with that of... (make_pass_local_pure_const): ...new function. (pass_tracer): Replace declaration with that of... (make_pass_tracer): ...new function. (pass_warn_unused_result): Replace declaration with that of... (make_pass_warn_unused_result): ...new function. (pass_diagnose_tm_blocks): Replace declaration with that of... (make_pass_diagnose_tm_blocks): ...new function. (pass_lower_tm): Replace declaration with that of... (make_pass_lower_tm): ...new function. (pass_tm_init): Replace declaration with that of... (make_pass_tm_init): ...new function. (pass_tm_mark): Replace declaration with that of... (make_pass_tm_mark): ...new function. (pass_tm_memopt): Replace declaration with that of... (make_pass_tm_memopt): ...new function. (pass_tm_edges): Replace declaration with that of... (make_pass_tm_edges): ...new function. (pass_split_functions): Replace declaration with that of... (make_pass_split_functions): ...new function. (pass_feedback_split_functions): Replace declaration with that of... (make_pass_feedback_split_functions): ...new function. (pass_strength_reduction): Replace declaration with that of... (make_pass_strength_reduction): ...new function. (pass_ipa_lower_emutls): Replace declaration with that of... (make_pass_ipa_lower_emutls): ...new function. (pass_ipa_function_and_variable_visibility): Replace declaration with that of... (make_pass_ipa_function_and_variable_visibility): ...new function. (pass_ipa_tree_profile): Replace declaration with that of... (make_pass_ipa_tree_profile): ...new function. (pass_early_local_passes): Replace declaration with that of... (make_pass_early_local_passes): ...new function. (pass_ipa_whole_program_visibility): Replace declaration with that of... (make_pass_ipa_whole_program_visibility): ...new function. (pass_ipa_lto_gimple_out): Replace declaration with that of... (make_pass_ipa_lto_gimple_out): ...new function. (pass_ipa_increase_alignment): Replace declaration with that of... (make_pass_ipa_increase_alignment): ...new function. (pass_ipa_inline): Replace declaration with that of... (make_pass_ipa_inline): ...new function. (pass_ipa_free_lang_data): Replace declaration with that of... (make_pass_ipa_free_lang_data): ...new function. (pass_ipa_free_inline_summary): Replace declaration with that of... (make_pass_ipa_free_inline_summary): ...new function. (pass_ipa_cp): Replace declaration with that of... (make_pass_ipa_cp): ...new function. (pass_ipa_reference): Replace declaration with that of... (make_pass_ipa_reference): ...new function. (pass_ipa_pure_const): Replace declaration with that of... (make_pass_ipa_pure_const): ...new function. (pass_ipa_pta): Replace declaration with that of... (make_pass_ipa_pta): ...new function. (pass_ipa_lto_finish_out): Replace declaration with that of... (make_pass_ipa_lto_finish_out): ...new function. (pass_ipa_tm): Replace declaration with that of... (make_pass_ipa_tm): ...new function. (pass_ipa_profile): Replace declaration with that of... (make_pass_ipa_profile): ...new function. (pass_ipa_cdtor_merge): Replace declaration with that of... (make_pass_ipa_cdtor_merge): ...new function. (pass_cleanup_cfg_post_optimizing): Replace declaration with that of... (make_pass_cleanup_cfg_post_optimizing): ...new function. (pass_init_datastructures): Replace declaration with that of... (make_pass_init_datastructures): ...new function. (pass_fixup_cfg): Replace declaration with that of... (make_pass_fixup_cfg): ...new function. (pass_expand): Replace declaration with that of... (make_pass_expand): ...new function. (pass_instantiate_virtual_regs): Replace declaration with that of... (make_pass_instantiate_virtual_regs): ...new function. (pass_rtl_fwprop): Replace declaration with that of... (make_pass_rtl_fwprop): ...new function. (pass_rtl_fwprop_addr): Replace declaration with that of... (make_pass_rtl_fwprop_addr): ...new function. (pass_jump): Replace declaration with that of... (make_pass_jump): ...new function. (pass_jump2): Replace declaration with that of... (make_pass_jump2): ...new function. (pass_lower_subreg): Replace declaration with that of... (make_pass_lower_subreg): ...new function. (pass_cse): Replace declaration with that of... (make_pass_cse): ...new function. (pass_fast_rtl_dce): Replace declaration with that of... (make_pass_fast_rtl_dce): ...new function. (pass_ud_rtl_dce): Replace declaration with that of... (make_pass_ud_rtl_dce): ...new function. (pass_rtl_dce): Replace declaration with that of... (make_pass_rtl_dce): ...new function. (pass_rtl_dse1): Replace declaration with that of... (make_pass_rtl_dse1): ...new function. (pass_rtl_dse2): Replace declaration with that of... (make_pass_rtl_dse2): ...new function. (pass_rtl_dse3): Replace declaration with that of... (make_pass_rtl_dse3): ...new function. (pass_rtl_cprop): Replace declaration with that of... (make_pass_rtl_cprop): ...new function. (pass_rtl_pre): Replace declaration with that of... (make_pass_rtl_pre): ...new function. (pass_rtl_hoist): Replace declaration with that of... (make_pass_rtl_hoist): ...new function. (pass_rtl_store_motion): Replace declaration with that of... (make_pass_rtl_store_motion): ...new function. (pass_cse_after_global_opts): Replace declaration with that of... (make_pass_cse_after_global_opts): ...new function. (pass_rtl_ifcvt): Replace declaration with that of... (make_pass_rtl_ifcvt): ...new function. (pass_into_cfg_layout_mode): Replace declaration with that of... (make_pass_into_cfg_layout_mode): ...new function. (pass_outof_cfg_layout_mode): Replace declaration with that of... (make_pass_outof_cfg_layout_mode): ...new function. (pass_loop2): Replace declaration with that of... (make_pass_loop2): ...new function. (pass_rtl_loop_init): Replace declaration with that of... (make_pass_rtl_loop_init): ...new function. (pass_rtl_move_loop_invariants): Replace declaration with that of... (make_pass_rtl_move_loop_invariants): ...new function. (pass_rtl_unswitch): Replace declaration with that of... (make_pass_rtl_unswitch): ...new function. (pass_rtl_unroll_and_peel_loops): Replace declaration with that of... (make_pass_rtl_unroll_and_peel_loops): ...new function. (pass_rtl_doloop): Replace declaration with that of... (make_pass_rtl_doloop): ...new function. (pass_rtl_loop_done): Replace declaration with that of... (make_pass_rtl_loop_done): ...new function. (pass_web): Replace declaration with that of... (make_pass_web): ...new function. (pass_cse2): Replace declaration with that of... (make_pass_cse2): ...new function. (pass_df_initialize_opt): Replace declaration with that of... (make_pass_df_initialize_opt): ...new function. (pass_df_initialize_no_opt): Replace declaration with that of... (make_pass_df_initialize_no_opt): ...new function. (pass_reginfo_init): Replace declaration with that of... (make_pass_reginfo_init): ...new function. (pass_inc_dec): Replace declaration with that of... (make_pass_inc_dec): ...new function. (pass_stack_ptr_mod): Replace declaration with that of... (make_pass_stack_ptr_mod): ...new function. (pass_initialize_regs): Replace declaration with that of... (make_pass_initialize_regs): ...new function. (pass_combine): Replace declaration with that of... (make_pass_combine): ...new function. (pass_if_after_combine): Replace declaration with that of... (make_pass_if_after_combine): ...new function. (pass_ree): Replace declaration with that of... (make_pass_ree): ...new function. (pass_partition_blocks): Replace declaration with that of... (make_pass_partition_blocks): ...new function. (pass_match_asm_constraints): Replace declaration with that of... (make_pass_match_asm_constraints): ...new function. (pass_regmove): Replace declaration with that of... (make_pass_regmove): ...new function. (pass_split_all_insns): Replace declaration with that of... (make_pass_split_all_insns): ...new function. (pass_fast_rtl_byte_dce): Replace declaration with that of... (make_pass_fast_rtl_byte_dce): ...new function. (pass_lower_subreg2): Replace declaration with that of... (make_pass_lower_subreg2): ...new function. (pass_mode_switching): Replace declaration with that of... (make_pass_mode_switching): ...new function. (pass_sms): Replace declaration with that of... (make_pass_sms): ...new function. (pass_sched): Replace declaration with that of... (make_pass_sched): ...new function. (pass_ira): Replace declaration with that of... (make_pass_ira): ...new function. (pass_reload): Replace declaration with that of... (make_pass_reload): ...new function. (pass_clean_state): Replace declaration with that of... (make_pass_clean_state): ...new function. (pass_branch_prob): Replace declaration with that of... (make_pass_branch_prob): ...new function. (pass_value_profile_transformations): Replace declaration with that of... (make_pass_value_profile_transformations): ...new function. (pass_postreload_cse): Replace declaration with that of... (make_pass_postreload_cse): ...new function. (pass_gcse2): Replace declaration with that of... (make_pass_gcse2): ...new function. (pass_split_after_reload): Replace declaration with that of... (make_pass_split_after_reload): ...new function. (pass_branch_target_load_optimize1): Replace declaration with that of... (make_pass_branch_target_load_optimize1): ...new function. (pass_thread_prologue_and_epilogue): Replace declaration with that of... (make_pass_thread_prologue_and_epilogue): ...new function. (pass_stack_adjustments): Replace declaration with that of... (make_pass_stack_adjustments): ...new function. (pass_peephole2): Replace declaration with that of... (make_pass_peephole2): ...new function. (pass_if_after_reload): Replace declaration with that of... (make_pass_if_after_reload): ...new function. (pass_regrename): Replace declaration with that of... (make_pass_regrename): ...new function. (pass_cprop_hardreg): Replace declaration with that of... (make_pass_cprop_hardreg): ...new function. (pass_reorder_blocks): Replace declaration with that of... (make_pass_reorder_blocks): ...new function. (pass_branch_target_load_optimize2): Replace declaration with that of... (make_pass_branch_target_load_optimize2): ...new function. (pass_leaf_regs): Replace declaration with that of... (make_pass_leaf_regs): ...new function. (pass_split_before_sched2): Replace declaration with that of... (make_pass_split_before_sched2): ...new function. (pass_compare_elim_after_reload): Replace declaration with that of... (make_pass_compare_elim_after_reload): ...new function. (pass_sched2): Replace declaration with that of... (make_pass_sched2): ...new function. (pass_stack_regs): Replace declaration with that of... (make_pass_stack_regs): ...new function. (pass_stack_regs_run): Replace declaration with that of... (make_pass_stack_regs_run): ...new function. (pass_df_finish): Replace declaration with that of... (make_pass_df_finish): ...new function. (pass_compute_alignments): Replace declaration with that of... (make_pass_compute_alignments): ...new function. (pass_duplicate_computed_gotos): Replace declaration with that of... (make_pass_duplicate_computed_gotos): ...new function. (pass_variable_tracking): Replace declaration with that of... (make_pass_variable_tracking): ...new function. (pass_free_cfg): Replace declaration with that of... (make_pass_free_cfg): ...new function. (pass_machine_reorg): Replace declaration with that of... (make_pass_machine_reorg): ...new function. (pass_cleanup_barriers): Replace declaration with that of... (make_pass_cleanup_barriers): ...new function. (pass_delay_slots): Replace declaration with that of... (make_pass_delay_slots): ...new function. (pass_split_for_shorten_branches): Replace declaration with that of... (make_pass_split_for_shorten_branches): ...new function. (pass_split_before_regstack): Replace declaration with that of... (make_pass_split_before_regstack): ...new function. (pass_convert_to_eh_region_ranges): Replace declaration with that of... (make_pass_convert_to_eh_region_ranges): ...new function. (pass_shorten_branches): Replace declaration with that of... (make_pass_shorten_branches): ...new function. (pass_set_nothrow_function_flags): Replace declaration with that of... (make_pass_set_nothrow_function_flags): ...new function. (pass_dwarf2_frame): Replace declaration with that of... (make_pass_dwarf2_frame): ...new function. (pass_final): Replace declaration with that of... (make_pass_final): ...new function. (pass_rtl_seqabstr): Replace declaration with that of... (make_pass_rtl_seqabstr): ...new function. (pass_release_ssa_names): Replace declaration with that of... (make_pass_release_ssa_names): ...new function. (pass_early_inline): Replace declaration with that of... (make_pass_early_inline): ...new function. (pass_inline_parameters): Replace declaration with that of... (make_pass_inline_parameters): ...new function. (pass_update_address_taken): Replace declaration with that of... (make_pass_update_address_taken): ...new function. (pass_convert_switch): Replace declaration with that of... (make_pass_convert_switch): ...new function. * tree-profile.c (pass_ipa_tree_profile): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_tree_profile): ...new pass_data instance and... (make_pass_ipa_tree_profile): ...new function. * tree-sra.c (pass_sra_early): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_sra_early): ...new pass_data instance and... (make_pass_sra_early): ...new function. (pass_sra): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_sra): ...new pass_data instance and... (make_pass_sra): ...new function. (pass_early_ipa_sra): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_early_ipa_sra): ...new pass_data instance and... (make_pass_early_ipa_sra): ...new function. * tree-ssa-ccp.c (pass_ccp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_ccp): ...new pass_data instance and... (make_pass_ccp): ...new function. (pass_fold_builtins): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_fold_builtins): ...new pass_data instance and... (make_pass_fold_builtins): ...new function. * tree-ssa-copy.c (pass_copy_prop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_copy_prop): ...new pass_data instance and... (make_pass_copy_prop): ...new function. * tree-ssa-copyrename.c (pass_rename_ssa_copies): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_rename_ssa_copies): ...new pass_data instance and... (make_pass_rename_ssa_copies): ...new function. * tree-ssa-dce.c (pass_dce): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dce): ...new pass_data instance and... (make_pass_dce): ...new function. (pass_dce_loop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dce_loop): ...new pass_data instance and... (make_pass_dce_loop): ...new function. (pass_cd_dce): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cd_dce): ...new pass_data instance and... (make_pass_cd_dce): ...new function. * tree-ssa-dom.c (pass_dominator): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dominator): ...new pass_data instance and... (make_pass_dominator): ...new function. (pass_phi_only_cprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_phi_only_cprop): ...new pass_data instance and... (make_pass_phi_only_cprop): ...new function. * tree-ssa-dse.c (pass_dse): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dse): ...new pass_data instance and... (make_pass_dse): ...new function. * tree-ssa-forwprop.c (pass_forwprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_forwprop): ...new pass_data instance and... (make_pass_forwprop): ...new function. * tree-ssa-ifcombine.c (pass_tree_ifcombine): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_ifcombine): ...new pass_data instance and... (make_pass_tree_ifcombine): ...new function. * tree-ssa-loop-ch.c (pass_ch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_ch): ...new pass_data instance and... (make_pass_ch): ...new function. * tree-ssa-loop.c (pass_tree_loop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_loop): ...new pass_data instance and... (make_pass_tree_loop): ...new function. (pass_tree_loop_init): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_loop_init): ...new pass_data instance and... (make_pass_tree_loop_init): ...new function. (pass_lim): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lim): ...new pass_data instance and... (make_pass_lim): ...new function. (pass_tree_unswitch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_unswitch): ...new pass_data instance and... (make_pass_tree_unswitch): ...new function. (pass_predcom): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_predcom): ...new pass_data instance and... (make_pass_predcom): ...new function. (pass_vectorize): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_vectorize): ...new pass_data instance and... (make_pass_vectorize): ...new function. (pass_graphite): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_graphite): ...new pass_data instance and... (make_pass_graphite): ...new function. (pass_graphite_transforms): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_graphite_transforms): ...new pass_data instance and... (make_pass_graphite_transforms): ...new function. (pass_check_data_deps): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_check_data_deps): ...new pass_data instance and... (make_pass_check_data_deps): ...new function. (pass_iv_canon): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_iv_canon): ...new pass_data instance and... (make_pass_iv_canon): ...new function. (pass_scev_cprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_scev_cprop): ...new pass_data instance and... (make_pass_scev_cprop): ...new function. (pass_record_bounds): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_record_bounds): ...new pass_data instance and... (make_pass_record_bounds): ...new function. (pass_complete_unroll): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_complete_unroll): ...new pass_data instance and... (make_pass_complete_unroll): ...new function. (pass_complete_unrolli): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_complete_unrolli): ...new pass_data instance and... (make_pass_complete_unrolli): ...new function. (pass_parallelize_loops): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_parallelize_loops): ...new pass_data instance and... (make_pass_parallelize_loops): ...new function. (pass_loop_prefetch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_loop_prefetch): ...new pass_data instance and... (make_pass_loop_prefetch): ...new function. (pass_iv_optimize): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_iv_optimize): ...new pass_data instance and... (make_pass_iv_optimize): ...new function. (pass_tree_loop_done): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_loop_done): ...new pass_data instance and... (make_pass_tree_loop_done): ...new function. * tree-ssa-math-opts.c (pass_cse_reciprocals): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cse_reciprocals): ...new pass_data instance and... (make_pass_cse_reciprocals): ...new function. (pass_cse_sincos): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cse_sincos): ...new pass_data instance and... (make_pass_cse_sincos): ...new function. (pass_optimize_bswap): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_optimize_bswap): ...new pass_data instance and... (make_pass_optimize_bswap): ...new function. (pass_optimize_widening_mul): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_optimize_widening_mul): ...new pass_data instance and... (make_pass_optimize_widening_mul): ...new function. * tree-ssa-phiopt.c (pass_phiopt): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_phiopt): ...new pass_data instance and... (make_pass_phiopt): ...new function. (pass_cselim): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cselim): ...new pass_data instance and... (make_pass_cselim): ...new function. * tree-ssa-phiprop.c (pass_phiprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_phiprop): ...new pass_data instance and... (make_pass_phiprop): ...new function. * tree-ssa-pre.c (pass_pre): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_pre): ...new pass_data instance and... (make_pass_pre): ...new function. (pass_fre): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_fre): ...new pass_data instance and... (make_pass_fre): ...new function. * tree-ssa-reassoc.c (pass_reassoc): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_reassoc): ...new pass_data instance and... (make_pass_reassoc): ...new function. * tree-ssa-sink.c (pass_sink_code): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_sink_code): ...new pass_data instance and... (make_pass_sink_code): ...new function. * tree-ssa-strlen.c (pass_strlen): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_strlen): ...new pass_data instance and... (make_pass_strlen): ...new function. * tree-ssa-structalias.c (pass_build_alias): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_alias): ...new pass_data instance and... (make_pass_build_alias): ...new function. (pass_build_ealias): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_ealias): ...new pass_data instance and... (make_pass_build_ealias): ...new function. (pass_ipa_pta): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_pta): ...new pass_data instance and... (make_pass_ipa_pta): ...new function. * tree-ssa-uncprop.c (pass_uncprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_uncprop): ...new pass_data instance and... (make_pass_uncprop): ...new function. * tree-ssa-uninit.c (pass_late_warn_uninitialized): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_late_warn_uninitialized): ...new pass_data instance and... (make_pass_late_warn_uninitialized): ...new function. * tree-ssa.c (pass_init_datastructures): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_init_datastructures): ...new pass_data instance and... (make_pass_init_datastructures): ...new function. (pass_early_warn_uninitialized): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_early_warn_uninitialized): ...new pass_data instance and... (make_pass_early_warn_uninitialized): ...new function. (pass_update_address_taken): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_update_address_taken): ...new pass_data instance and... (make_pass_update_address_taken): ...new function. * tree-ssanames.c (pass_release_ssa_names): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_release_ssa_names): ...new pass_data instance and... (make_pass_release_ssa_names): ...new function. * tree-stdarg.c (pass_stdarg): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_stdarg): ...new pass_data instance and... (make_pass_stdarg): ...new function. * tree-switch-conversion.c (pass_convert_switch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_convert_switch): ...new pass_data instance and... (make_pass_convert_switch): ...new function. * tree-tailcall.c (pass_tail_recursion): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tail_recursion): ...new pass_data instance and... (make_pass_tail_recursion): ...new function. (pass_tail_calls): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tail_calls): ...new pass_data instance and... (make_pass_tail_calls): ...new function. * tree-vect-generic.c (pass_lower_vector): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_vector): ...new pass_data instance and... (make_pass_lower_vector): ...new function. (pass_lower_vector_ssa): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_vector_ssa): ...new pass_data instance and... (make_pass_lower_vector_ssa): ...new function. * tree-vectorizer.c (pass_slp_vectorize): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_slp_vectorize): ...new pass_data instance and... (make_pass_slp_vectorize): ...new function. (pass_ipa_increase_alignment): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_increase_alignment): ...new pass_data instance and... (make_pass_ipa_increase_alignment): ...new function. * tree-vrp.c (pass_vrp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_vrp): ...new pass_data instance and... (make_pass_vrp): ...new function. * tree.c (pass_ipa_free_lang_data): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_free_lang_data): ...new pass_data instance and... (make_pass_ipa_free_lang_data): ...new function. * tsan.c (pass_tsan): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tsan): ...new pass_data instance and... (make_pass_tsan): ...new function. (pass_tsan_O0): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tsan_O0): ...new pass_data instance and... (make_pass_tsan_O0): ...new function. * var-tracking.c (pass_variable_tracking): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_variable_tracking): ...new pass_data instance and... (make_pass_variable_tracking): ...new function. * web.c (pass_web): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_web): ...new pass_data instance and... (make_pass_web): ...new function. * config/epiphany/epiphany.h (pass_mode_switch_use): Replace declaration with that of... (make_pass_mode_switch_use): ...new function. (pass_resolve_sw_modes): Replace declaration with that of... (make_pass_resolve_sw_modes): ...new function. * config/epiphany/mode-switch-use.c (pass_mode_switch_use): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_mode_switch_use): ...new pass_data instance and... (make_pass_mode_switch_use): ...new function. * config/epiphany/resolve-sw-modes.c (pass_resolve_sw_modes): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_resolve_sw_modes): ...new pass_data instance and... (make_pass_resolve_sw_modes): ...new function. * config/i386/i386.c (pass_insert_vzeroupper): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_insert_vzeroupper): ...new pass_data instance and... (make_pass_insert_vzeroupper): ...new function. * config/sparc/sparc.c (pass_work_around_errata): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_work_around_errata): ...new pass_data instance and... (make_pass_work_around_errata): ...new function. * config/mips/mips.c (pass_mips_machine_reorg2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_mips_machine_reorg2): ...new pass_data instance and... (make_pass_mips_machine_reorg2): ...new function. gcc/testsuite/ Patch autogenerated by refactor_passes.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 03fe39476a4c4ea450b49e087cfa817b5f92021e * gcc.dg/plugin/one_time_plugin.c (one_pass): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_one_pass): ...new pass_data instance and... (make_one_pass): ...new function. * gcc.dg/plugin/selfassign.c (pass_warn_self_assign): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_self_assign): ...new pass_data instance and... (make_pass_warn_self_assign): ...new function. * g++.dg/plugin/dumb_plugin.c (pass_dumb_plugin_example): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dumb_plugin_example): ...new pass_data instance and... (make_pass_dumb_plugin_example): ...new function. * g++.dg/plugin/selfassign.c (pass_warn_self_assign): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_self_assign): ...new pass_data instance and... (make_pass_warn_self_assign): ...new function. From-SVN: r201508
2013-08-05 22:16:05 +02:00
namespace {
const pass_data pass_data_sms =
{
RTL_PASS, /* type */
"sms", /* name */
OPTGROUP_NONE, /* optinfo_flags */
TV_SMS, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
tree-pass.h (TODO_verify_ssa, [...]): Remove. 2014-05-06 Richard Biener <rguenther@suse.de> * tree-pass.h (TODO_verify_ssa, TODO_verify_flow, TODO_verify_stmts, TODO_verify_rtl_sharing): Remove. (TODO_verify_all): Adjust. * asan.c: Remove references to TODO_verify_ssa, TODO_verify_flow, TODO_verify_stmts and TODO_verify_rtl_sharing. * bb-reorder.c: Likewise. * cfgexpand.c: Likewise. * cprop.c: Likewise. * cse.c: Likewise. * function.c: Likewise. * fwprop.c: Likewise. * gcse.c: Likewise. * gimple-ssa-isolate-paths.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * ipa-split.c: Likewise. * loop-init.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * modulo-sched.c: Likewise. * postreload-gcse.c: Likewise. * predict.c: Likewise. * recog.c: Likewise. * sched-rgn.c: Likewise. * store-motion.c: Likewise. * tracer.c: Likewise. * trans-mem.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-complex.c: Likewise. * tree-eh.c: Likewise. * tree-emutls.c: Likewise. * tree-if-conv.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-object-size.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-sra.c: Likewise. * tree-ssa-ccp.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-loop-ch.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-strlen.c: Likewise. * tree-ssa-tail-merge.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vrp.c: Likewise. * tsan.c: Likewise. * var-tracking.c: Likewise. * bt-load.c: Likewise. * cfgcleanup.c: Likewise. * combine-stack-adj.c: Likewise. * combine.c: Likewise. * compare-elim.c: Likewise. * config/epiphany/resolve-sw-modes.c: Likewise. * config/i386/i386.c: Likewise. * config/mips/mips.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh_treg_combine.cc: Likewise. * config/sparc/sparc.c: Likewise. * dce.c: Likewise. * dse.c: Likewise. * final.c: Likewise. * ifcvt.c: Likewise. * mode-switching.c: Likewise. * passes.c: Likewise. * postreload.c: Likewise. * ree.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * regrename.c: Likewise. * web.c: Likewise. From-SVN: r210106
2014-05-06 15:35:40 +02:00
TODO_df_finish, /* todo_flags_finish */
Makefile.in: Adjust dependencies. 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in: Adjust dependencies. * tree-pass.h: Add new passes and passes formerly in tree-optimize.c. * basic-block.h (duplicate_computed_gotos): Remove, it is now static. * alias.c (rest_of_handle_cfg, pass_cfg): New. * bb-reorder.c (duplicate_computed_gotos): Make it static. * cfgexpand.c (tree_expand_cfg): Add code formerly at the beginning of rest_of_compilation. * bb-reorder.c (gate_duplicate_computed_gotos, pass_duplicate_computed_gotos, gate_handle_reorder_blocks, rest_of_handle_reorder_blocks, pass_reorder_blocks, gate_handle_partition_blocks, rest_of_handle_partition_blocks, pass_partition_blocks): New. * bt-load.c (gate_handle_branch_target_load_optimize, rest_of_handle_branch_target_load_optimize, pass_branch_target_load_optimize): New. * cfgcleanup.c (rest_of_handle_jump, pass_jump, rest_of_handle_jump2, pass_jump2): New. * cfglayout.c (pass_insn_locators_initialize): New. * cfgrtl.c (pass_free_cfg): New. * combine.c (gate_handle_combine, rest_of_handle_combine, pass_combine): New. * cse.c (gate_handle_cse, rest_of_handle_cse, pass_cse, gate_handle_cse2, rest_of_handle_cse2, pass_cse2): New. * emit-rtl.c (pass_unshare_all_rtl, pass_remove_unnecessary_notes): New. * except.c (pass_set_nothrow_function_flags, pass_convert_to_eh_region_ranges, gate_handle_eh, rest_of_handle_eh, pass_rtl_eh): New. * final.c (pass_compute_alignments, rest_of_handle_final, pass_final, rest_of_handle_shorten_branches, pass_shorten_branches, rest_of_clean_state, pass_clean_state): New. * flow.c (pass_recompute_reg_usage, gate_remove_death_notes, rest_of_handle_remove_death_notes, pass_remove_death_notes, rest_of_handle_life, pass_life, rest_of_handle_flow2, pass_flow2): New. * function.c (pass_instantiate_virtual_regs, pass_init_function, rest_of_handle_check_leaf_regs, pass_leaf_regs): New. * gcse.c (gate_handle_jump_bypass, rest_of_handle_jump_bypass, pass_jump_bypass, gate_handle_gcse, rest_of_handle_gcse, pass_gcse): New. * global.c (rest_of_handle_global_alloc, pass_global_alloc): New. * ifcvt.c (gate_handle_if_conversion, rest_of_handle_if_conversion, pass_rtl_ifcvt, gate_handle_if_after_combine, rest_of_handle_if_after_combine, pass_if_after_combine, gate_handle_if_after_reload, rest_of_handle_if_after_reload, pass_if_after_reload): New. * integrate.c (pass_initial_value_sets): New. * jump.c (pass_cleanup_barriers, purge_line_number_notes, pass_purge_lineno_notes): New. * mode-switching.c (rest_of_handle_mode_switching, pass_mode_switching): New. * local-alloc.c (rest_of_handle_local_alloc, pass_local_alloc): New. * loop-init.c (gate_handle_loop2, rest_of_handle_loop2, pass_loop2): New. * loop.c (gate_handle_loop_optimize, rest_of_handle_loop_optimize, pass_loop_optimize): New. * modulo-sched.c (gate_handle_sms, rest_of_handle_sms, pass_sms): New. * postreload-gcse.c (gate_handle_gcse2, rest_of_handle_gcse2, pass_gcse2): New. * postreload.c (gate_handle_postreload, rest_of_handle_postreload, pass_postreload_cse): New. * profile.c (gate_handle_profiling, pass_profiling, rest_of_handle_branch_prob, pass_branch_prob): New. * recog.c (pass pass_split_for_shorten_branches, gate_do_final_split, pass_split_before_regstack, gate_handle_split_before_regstack, gate_handle_peephole2, rest_of_handle_peephole2, pass_peephole2, rest_of_handle_split_all_insns, pass_split_all_insns): New. * reg-stack.c (gate_handle_stack_regs, rest_of_handle_stack_regs, pass_stack_regs): New. * regmove.c (gate_handle_regmove, rest_of_handle_regmove, pass_regmove, gate_handle_stack_adjustments, rest_of_handle_stack_adjustments, pass_stack_adjustments): New. * regrename.c (gate_handle_regrename, rest_of_handle_regrename, pass_regrename): New. * reorg.c (gate_handle_delay_slots, rest_of_handle_delay_slots, pass_delay_slots, gate_handle_machine_reorg, rest_of_handle_machine_reorg, pass_machine_reorg): New. * rtl.h (extern void purge_line_number_notes): New. * sched-rgn.c (gate_handle_sched, rest_of_handle_sched, gate_handle_sched2, rest_of_handle_sched2, pass_sched, pass_sched2): New. * tracer.c (gate_handle_tracer, rest_of_handle_tracer, pass_tracer): New. * value-prof.c (gate_handle_value_profile_transformations, rest_of_handle_value_profile_transformations, pass_value_profile_transformations): New. * var-tracking.c (gate_handle_var_tracking, pass_variable_tracking): New. * web.c (gate_handle_web, rest_of_handle_web, pass_web): New. * passes.c (open_dump_file, close_dump_file, rest_of_handle_final, rest_of_handle_delay_slots, rest_of_handle_stack_regs, rest_of_handle_variable_tracking, rest_of_handle_machine_reorg, rest_of_handle_old_regalloc, rest_of_handle_regrename, rest_of_handle_reorder_blocks, rest_of_handle_partition_blocks, rest_of_handle_sms, rest_of_handle_sched, rest_of_handle_sched2, rest_of_handle_gcse2, rest_of_handle_regmove, rest_of_handle_tracer, rest_of_handle_if_conversion, rest_of_handle_if_after_combine, rest_of_handle_if_after_reload, rest_of_handle_web, rest_of_handle_branch_prob, rest_of_handle_value_profile_transformations, rest_of_handle_cfg, rest_of_handle_jump_bypass, rest_of_handle_combine, rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2, rest_of_handle_gcse, rest_of_handle_loop_optimize, rest_of_handle_loop2, rest_of_handle_branch_target_load_optimize, rest_of_handle_mode_switching, rest_of_handle_jump, rest_of_handle_eh, rest_of_handle_stack_adjustments, rest_of_handle_flow2, rest_of_handle_jump2, rest_of_handle_peephole2, rest_of_handle_postreload, rest_of_handle_shorten_branches, rest_of_clean_state, rest_of_compilation): Remove. * cgraphunit.c (ipa_passes): Moved from tree-optimize.c. * passes.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list): Moved from tree-optimize.c. (init_optimization_passes): Moved from tree-optimize.c, adding the RTL optimizations. * tree-dump.h (dump_info_p, dump_flag): Moved from tree.h. * tree-optimize.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list, init_tree_optimization_passes, ipa_passes): Delete. * tree-pass.h (enum tree_dump_index): Moved from tree.h, removing the RTL dumps. (TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved from tree.h. (ipa_passes): Remove. (all_passes, all_ipa_passes, all_lowering_passes): Now extern. * tree.h (enum tree_dump_index, TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved to tree-pass.h. (dump_info_p, dump_flag): Moved to tree-dump.h. * Makefile.in: Adjust dependencies for tree-pretty-print.c, cgraph.c, opts.c. * passes.c (finish_optimization_passes): Use dump_begin and dump_end, TDI_end. (gate_rest_of_compilation): New. (pass_rest_of_compilation): Use it. (gate_postreload, pass_postreload): New. * toplev.c (general_init): Rename init_tree_optimization_passes. * toplev.h (init_tree_optimization_passes): Rename to init_optimizations_passes. * tree-dump.c (dump_flag): Make static. (dump_files): Remove RTL dumps. * tree-optimize.c (pass_all_optimizations, pass_early_local_passes, pass_cleanup_cfg, pass_free_cfg_annotations, pass_cleanup_cfg_post_optimizing, pass_free_datastructures, pass_init_datastructures, pass_fixup_cfg): Make non-static. * tree-pretty-print.c: Include tree-pass.h. * cgraph.c: Include tree-dump.h. cp: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (class.o, decl2.o): Adjust dependencies. * class.c: Include tree-dump.h. * decl2.c: Include tree-dump.h. java: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (parse.o): Adjust dependencies. * parse.y: Include tree-dump.h. From-SVN: r101627
2005-07-05 18:20:53 +02:00
};
Automated conversion of passes to C++ classes gcc/ Patch autogenerated by refactor_passes.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 03fe39476a4c4ea450b49e087cfa817b5f92021e * asan.c (pass_asan): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_asan): ...new pass_data instance and... (make_pass_asan): ...new function. (pass_asan_O0): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_asan_O0): ...new pass_data instance and... (make_pass_asan_O0): ...new function. * auto-inc-dec.c (pass_inc_dec): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_inc_dec): ...new pass_data instance and... (make_pass_inc_dec): ...new function. * bb-reorder.c (pass_reorder_blocks): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_reorder_blocks): ...new pass_data instance and... (make_pass_reorder_blocks): ...new function. (pass_duplicate_computed_gotos): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_duplicate_computed_gotos): ...new pass_data instance and... (make_pass_duplicate_computed_gotos): ...new function. (pass_partition_blocks): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_partition_blocks): ...new pass_data instance and... (make_pass_partition_blocks): ...new function. * bt-load.c (pass_branch_target_load_optimize1): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_branch_target_load_optimize1): ...new pass_data instance and... (make_pass_branch_target_load_optimize1): ...new function. (pass_branch_target_load_optimize2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_branch_target_load_optimize2): ...new pass_data instance and... (make_pass_branch_target_load_optimize2): ...new function. * cfgcleanup.c (pass_jump): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_jump): ...new pass_data instance and... (make_pass_jump): ...new function. (pass_jump2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_jump2): ...new pass_data instance and... (make_pass_jump2): ...new function. * cfgexpand.c (pass_expand): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_expand): ...new pass_data instance and... (make_pass_expand): ...new function. * cfgrtl.c (pass_free_cfg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_free_cfg): ...new pass_data instance and... (make_pass_free_cfg): ...new function. (pass_into_cfg_layout_mode): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_into_cfg_layout_mode): ...new pass_data instance and... (make_pass_into_cfg_layout_mode): ...new function. (pass_outof_cfg_layout_mode): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_outof_cfg_layout_mode): ...new pass_data instance and... (make_pass_outof_cfg_layout_mode): ...new function. * cgraphbuild.c (pass_build_cgraph_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_cgraph_edges): ...new pass_data instance and... (make_pass_build_cgraph_edges): ...new function. (pass_rebuild_cgraph_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_rebuild_cgraph_edges): ...new pass_data instance and... (make_pass_rebuild_cgraph_edges): ...new function. (pass_remove_cgraph_callee_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_remove_cgraph_callee_edges): ...new pass_data instance and... (make_pass_remove_cgraph_callee_edges): ...new function. * combine-stack-adj.c (pass_stack_adjustments): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_adjustments): ...new pass_data instance and... (make_pass_stack_adjustments): ...new function. * combine.c (pass_combine): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_combine): ...new pass_data instance and... (make_pass_combine): ...new function. * compare-elim.c (pass_compare_elim_after_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_compare_elim_after_reload): ...new pass_data instance and... (make_pass_compare_elim_after_reload): ...new function. * cprop.c (pass_rtl_cprop): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_cprop): ...new pass_data instance and... (make_pass_rtl_cprop): ...new function. * cse.c (pass_cse): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cse): ...new pass_data instance and... (make_pass_cse): ...new function. (pass_cse2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cse2): ...new pass_data instance and... (make_pass_cse2): ...new function. (pass_cse_after_global_opts): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cse_after_global_opts): ...new pass_data instance and... (make_pass_cse_after_global_opts): ...new function. * dce.c (pass_ud_rtl_dce): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_ud_rtl_dce): ...new pass_data instance and... (make_pass_ud_rtl_dce): ...new function. (pass_fast_rtl_dce): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_fast_rtl_dce): ...new pass_data instance and... (make_pass_fast_rtl_dce): ...new function. * df-core.c (pass_df_initialize_opt): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_df_initialize_opt): ...new pass_data instance and... (make_pass_df_initialize_opt): ...new function. (pass_df_initialize_no_opt): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_df_initialize_no_opt): ...new pass_data instance and... (make_pass_df_initialize_no_opt): ...new function. (pass_df_finish): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_df_finish): ...new pass_data instance and... (make_pass_df_finish): ...new function. * dse.c (pass_rtl_dse1): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_dse1): ...new pass_data instance and... (make_pass_rtl_dse1): ...new function. (pass_rtl_dse2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_dse2): ...new pass_data instance and... (make_pass_rtl_dse2): ...new function. * dwarf2cfi.c (pass_dwarf2_frame): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_dwarf2_frame): ...new pass_data instance and... (make_pass_dwarf2_frame): ...new function. * except.c (pass_set_nothrow_function_flags): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_set_nothrow_function_flags): ...new pass_data instance and... (make_pass_set_nothrow_function_flags): ...new function. (pass_convert_to_eh_region_ranges): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_convert_to_eh_region_ranges): ...new pass_data instance and... (make_pass_convert_to_eh_region_ranges): ...new function. * final.c (pass_compute_alignments): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_compute_alignments): ...new pass_data instance and... (make_pass_compute_alignments): ...new function. (pass_final): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_final): ...new pass_data instance and... (make_pass_final): ...new function. (pass_shorten_branches): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_shorten_branches): ...new pass_data instance and... (make_pass_shorten_branches): ...new function. (pass_clean_state): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_clean_state): ...new pass_data instance and... (make_pass_clean_state): ...new function. * function.c (pass_instantiate_virtual_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_instantiate_virtual_regs): ...new pass_data instance and... (make_pass_instantiate_virtual_regs): ...new function. (pass_leaf_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_leaf_regs): ...new pass_data instance and... (make_pass_leaf_regs): ...new function. (pass_thread_prologue_and_epilogue): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_thread_prologue_and_epilogue): ...new pass_data instance and... (make_pass_thread_prologue_and_epilogue): ...new function. (pass_match_asm_constraints): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_match_asm_constraints): ...new pass_data instance and... (make_pass_match_asm_constraints): ...new function. * fwprop.c (pass_rtl_fwprop): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_fwprop): ...new pass_data instance and... (make_pass_rtl_fwprop): ...new function. (pass_rtl_fwprop_addr): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_fwprop_addr): ...new pass_data instance and... (make_pass_rtl_fwprop_addr): ...new function. * gcse.c (pass_rtl_pre): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_pre): ...new pass_data instance and... (make_pass_rtl_pre): ...new function. (pass_rtl_hoist): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_hoist): ...new pass_data instance and... (make_pass_rtl_hoist): ...new function. * gimple-low.c (pass_lower_cf): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_cf): ...new pass_data instance and... (make_pass_lower_cf): ...new function. * gimple-ssa-strength-reduction.c (pass_strength_reduction): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_strength_reduction): ...new pass_data instance and... (make_pass_strength_reduction): ...new function. * ifcvt.c (pass_rtl_ifcvt): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_ifcvt): ...new pass_data instance and... (make_pass_rtl_ifcvt): ...new function. (pass_if_after_combine): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_if_after_combine): ...new pass_data instance and... (make_pass_if_after_combine): ...new function. (pass_if_after_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_if_after_reload): ...new pass_data instance and... (make_pass_if_after_reload): ...new function. * init-regs.c (pass_initialize_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_initialize_regs): ...new pass_data instance and... (make_pass_initialize_regs): ...new function. * ipa-cp.c (pass_ipa_cp): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_cp): ...new pass_data instance and... (make_pass_ipa_cp): ...new function. * ipa-inline-analysis.c (pass_inline_parameters): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_inline_parameters): ...new pass_data instance and... (make_pass_inline_parameters): ...new function. * ipa-inline.c (pass_early_inline): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_early_inline): ...new pass_data instance and... (make_pass_early_inline): ...new function. (pass_ipa_inline): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_inline): ...new pass_data instance and... (make_pass_ipa_inline): ...new function. * ipa-pure-const.c (pass_local_pure_const): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_local_pure_const): ...new pass_data instance and... (make_pass_local_pure_const): ...new function. (pass_ipa_pure_const): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_pure_const): ...new pass_data instance and... (make_pass_ipa_pure_const): ...new function. * ipa-reference.c (pass_ipa_reference): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_reference): ...new pass_data instance and... (make_pass_ipa_reference): ...new function. * ipa-split.c (pass_split_functions): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_split_functions): ...new pass_data instance and... (make_pass_split_functions): ...new function. (pass_feedback_split_functions): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_feedback_split_functions): ...new pass_data instance and... (make_pass_feedback_split_functions): ...new function. * ipa.c (pass_ipa_function_and_variable_visibility): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_function_and_variable_visibility): ...new pass_data instance and... (make_pass_ipa_function_and_variable_visibility): ...new function. (pass_ipa_free_inline_summary): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_free_inline_summary): ...new pass_data instance and... (make_pass_ipa_free_inline_summary): ...new function. (pass_ipa_whole_program_visibility): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_whole_program_visibility): ...new pass_data instance and... (make_pass_ipa_whole_program_visibility): ...new function. (pass_ipa_profile): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_profile): ...new pass_data instance and... (make_pass_ipa_profile): ...new function. (pass_ipa_cdtor_merge): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_cdtor_merge): ...new pass_data instance and... (make_pass_ipa_cdtor_merge): ...new function. * ira.c (pass_ira): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_ira): ...new pass_data instance and... (make_pass_ira): ...new function. (pass_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_reload): ...new pass_data instance and... (make_pass_reload): ...new function. * jump.c (pass_cleanup_barriers): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cleanup_barriers): ...new pass_data instance and... (make_pass_cleanup_barriers): ...new function. * loop-init.c (pass_loop2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_loop2): ...new pass_data instance and... (make_pass_loop2): ...new function. (pass_rtl_loop_init): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_loop_init): ...new pass_data instance and... (make_pass_rtl_loop_init): ...new function. (pass_rtl_loop_done): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_loop_done): ...new pass_data instance and... (make_pass_rtl_loop_done): ...new function. (pass_rtl_move_loop_invariants): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_move_loop_invariants): ...new pass_data instance and... (make_pass_rtl_move_loop_invariants): ...new function. (pass_rtl_unswitch): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_unswitch): ...new pass_data instance and... (make_pass_rtl_unswitch): ...new function. (pass_rtl_unroll_and_peel_loops): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_unroll_and_peel_loops): ...new pass_data instance and... (make_pass_rtl_unroll_and_peel_loops): ...new function. (pass_rtl_doloop): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_doloop): ...new pass_data instance and... (make_pass_rtl_doloop): ...new function. * lower-subreg.c (pass_lower_subreg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_lower_subreg): ...new pass_data instance and... (make_pass_lower_subreg): ...new function. (pass_lower_subreg2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_lower_subreg2): ...new pass_data instance and... (make_pass_lower_subreg2): ...new function. * lto-streamer-out.c (pass_ipa_lto_gimple_out): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_lto_gimple_out): ...new pass_data instance and... (make_pass_ipa_lto_gimple_out): ...new function. (pass_ipa_lto_finish_out): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_lto_finish_out): ...new pass_data instance and... (make_pass_ipa_lto_finish_out): ...new function. * mode-switching.c (pass_mode_switching): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_mode_switching): ...new pass_data instance and... (make_pass_mode_switching): ...new function. * modulo-sched.c (pass_sms): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_sms): ...new pass_data instance and... (make_pass_sms): ...new function. * omp-low.c (pass_expand_omp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_expand_omp): ...new pass_data instance and... (make_pass_expand_omp): ...new function. (pass_lower_omp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_omp): ...new pass_data instance and... (make_pass_lower_omp): ...new function. (pass_diagnose_omp_blocks): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_diagnose_omp_blocks): ...new pass_data instance and... (make_pass_diagnose_omp_blocks): ...new function. * passes.c (pass_early_local_passes): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_early_local_passes): ...new pass_data instance and... (make_pass_early_local_passes): ...new function. (pass_all_early_optimizations): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_all_early_optimizations): ...new pass_data instance and... (make_pass_all_early_optimizations): ...new function. (pass_all_optimizations): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_all_optimizations): ...new pass_data instance and... (make_pass_all_optimizations): ...new function. (pass_all_optimizations_g): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_all_optimizations_g): ...new pass_data instance and... (make_pass_all_optimizations_g): ...new function. (pass_rest_of_compilation): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rest_of_compilation): ...new pass_data instance and... (make_pass_rest_of_compilation): ...new function. (pass_postreload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_postreload): ...new pass_data instance and... (make_pass_postreload): ...new function. * postreload-gcse.c (pass_gcse2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_gcse2): ...new pass_data instance and... (make_pass_gcse2): ...new function. * postreload.c (pass_postreload_cse): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_postreload_cse): ...new pass_data instance and... (make_pass_postreload_cse): ...new function. * predict.c (pass_profile): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_profile): ...new pass_data instance and... (make_pass_profile): ...new function. (pass_strip_predict_hints): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_strip_predict_hints): ...new pass_data instance and... (make_pass_strip_predict_hints): ...new function. * recog.c (pass_peephole2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_peephole2): ...new pass_data instance and... (make_pass_peephole2): ...new function. (pass_split_all_insns): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_all_insns): ...new pass_data instance and... (make_pass_split_all_insns): ...new function. (pass_split_after_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_after_reload): ...new pass_data instance and... (make_pass_split_after_reload): ...new function. (pass_split_before_regstack): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_before_regstack): ...new pass_data instance and... (make_pass_split_before_regstack): ...new function. (pass_split_before_sched2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_before_sched2): ...new pass_data instance and... (make_pass_split_before_sched2): ...new function. (pass_split_for_shorten_branches): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_for_shorten_branches): ...new pass_data instance and... (make_pass_split_for_shorten_branches): ...new function. * ree.c (pass_ree): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_ree): ...new pass_data instance and... (make_pass_ree): ...new function. * reg-stack.c (pass_stack_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_regs): ...new pass_data instance and... (make_pass_stack_regs): ...new function. (pass_stack_regs_run): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_regs_run): ...new pass_data instance and... (make_pass_stack_regs_run): ...new function. * regcprop.c (pass_cprop_hardreg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cprop_hardreg): ...new pass_data instance and... (make_pass_cprop_hardreg): ...new function. * reginfo.c (pass_reginfo_init): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_reginfo_init): ...new pass_data instance and... (make_pass_reginfo_init): ...new function. * regmove.c (pass_regmove): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_regmove): ...new pass_data instance and... (make_pass_regmove): ...new function. * regrename.c (pass_regrename): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_regrename): ...new pass_data instance and... (make_pass_regrename): ...new function. * reorg.c (pass_delay_slots): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_delay_slots): ...new pass_data instance and... (make_pass_delay_slots): ...new function. (pass_machine_reorg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_machine_reorg): ...new pass_data instance and... (make_pass_machine_reorg): ...new function. * sched-rgn.c (pass_sched): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_sched): ...new pass_data instance and... (make_pass_sched): ...new function. (pass_sched2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_sched2): ...new pass_data instance and... (make_pass_sched2): ...new function. * stack-ptr-mod.c (pass_stack_ptr_mod): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_ptr_mod): ...new pass_data instance and... (make_pass_stack_ptr_mod): ...new function. * store-motion.c (pass_rtl_store_motion): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_store_motion): ...new pass_data instance and... (make_pass_rtl_store_motion): ...new function. * tracer.c (pass_tracer): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tracer): ...new pass_data instance and... (make_pass_tracer): ...new function. * trans-mem.c (pass_diagnose_tm_blocks): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_diagnose_tm_blocks): ...new pass_data instance and... (make_pass_diagnose_tm_blocks): ...new function. (pass_lower_tm): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_tm): ...new pass_data instance and... (make_pass_lower_tm): ...new function. (pass_tm_init): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_init): ...new pass_data instance and... (make_pass_tm_init): ...new function. (pass_tm_mark): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_mark): ...new pass_data instance and... (make_pass_tm_mark): ...new function. (pass_tm_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_edges): ...new pass_data instance and... (make_pass_tm_edges): ...new function. (pass_tm_memopt): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_memopt): ...new pass_data instance and... (make_pass_tm_memopt): ...new function. (pass_ipa_tm): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_tm): ...new pass_data instance and... (make_pass_ipa_tm): ...new function. * tree-call-cdce.c (pass_call_cdce): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_call_cdce): ...new pass_data instance and... (make_pass_call_cdce): ...new function. * tree-cfg.c (pass_build_cfg): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_cfg): ...new pass_data instance and... (make_pass_build_cfg): ...new function. (pass_split_crit_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_split_crit_edges): ...new pass_data instance and... (make_pass_split_crit_edges): ...new function. (pass_warn_function_return): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_function_return): ...new pass_data instance and... (make_pass_warn_function_return): ...new function. (pass_warn_function_noreturn): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_function_noreturn): ...new pass_data instance and... (make_pass_warn_function_noreturn): ...new function. (pass_warn_unused_result): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_unused_result): ...new pass_data instance and... (make_pass_warn_unused_result): ...new function. * tree-cfgcleanup.c (pass_merge_phi): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_merge_phi): ...new pass_data instance and... (make_pass_merge_phi): ...new function. * tree-complex.c (pass_lower_complex): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_complex): ...new pass_data instance and... (make_pass_lower_complex): ...new function. (pass_lower_complex_O0): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_complex_O0): ...new pass_data instance and... (make_pass_lower_complex_O0): ...new function. * tree-eh.c (pass_lower_eh): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_eh): ...new pass_data instance and... (make_pass_lower_eh): ...new function. (pass_refactor_eh): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_refactor_eh): ...new pass_data instance and... (make_pass_refactor_eh): ...new function. (pass_lower_resx): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_resx): ...new pass_data instance and... (make_pass_lower_resx): ...new function. (pass_lower_eh_dispatch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_eh_dispatch): ...new pass_data instance and... (make_pass_lower_eh_dispatch): ...new function. (pass_cleanup_eh): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cleanup_eh): ...new pass_data instance and... (make_pass_cleanup_eh): ...new function. * tree-emutls.c (pass_ipa_lower_emutls): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_lower_emutls): ...new pass_data instance and... (make_pass_ipa_lower_emutls): ...new function. * tree-if-conv.c (pass_if_conversion): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_if_conversion): ...new pass_data instance and... (make_pass_if_conversion): ...new function. * tree-into-ssa.c (pass_build_ssa): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_ssa): ...new pass_data instance and... (make_pass_build_ssa): ...new function. * tree-loop-distribution.c (pass_loop_distribution): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_loop_distribution): ...new pass_data instance and... (make_pass_loop_distribution): ...new function. * tree-mudflap.c (pass_mudflap_1): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_1): ...new pass_data instance and... (make_pass_mudflap_1): ...new function. (pass_mudflap_2): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_2): ...new pass_data instance and... (make_pass_mudflap_2): ...new function. * tree-nomudflap.c (pass_mudflap_1): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_1): ...new pass_data instance and... (make_pass_mudflap_1): ...new function. (pass_mudflap_2): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_2): ...new pass_data instance and... (make_pass_mudflap_2): ...new function. * tree-nrv.c (pass_nrv): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_nrv): ...new pass_data instance and... (make_pass_nrv): ...new function. (pass_return_slot): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_return_slot): ...new pass_data instance and... (make_pass_return_slot): ...new function. * tree-object-size.c (pass_object_sizes): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_object_sizes): ...new pass_data instance and... (make_pass_object_sizes): ...new function. * tree-optimize.c (pass_cleanup_cfg_post_optimizing): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cleanup_cfg_post_optimizing): ...new pass_data instance and... (make_pass_cleanup_cfg_post_optimizing): ...new function. (pass_fixup_cfg): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_fixup_cfg): ...new pass_data instance and... (make_pass_fixup_cfg): ...new function. * tree-pass.h (pass_mudflap_1): Replace declaration with that of... (make_pass_mudflap_1): ...new function. (pass_mudflap_2): Replace declaration with that of... (make_pass_mudflap_2): ...new function. (pass_asan): Replace declaration with that of... (make_pass_asan): ...new function. (pass_asan_O0): Replace declaration with that of... (make_pass_asan_O0): ...new function. (pass_tsan): Replace declaration with that of... (make_pass_tsan): ...new function. (pass_tsan_O0): Replace declaration with that of... (make_pass_tsan_O0): ...new function. (pass_lower_cf): Replace declaration with that of... (make_pass_lower_cf): ...new function. (pass_refactor_eh): Replace declaration with that of... (make_pass_refactor_eh): ...new function. (pass_lower_eh): Replace declaration with that of... (make_pass_lower_eh): ...new function. (pass_lower_eh_dispatch): Replace declaration with that of... (make_pass_lower_eh_dispatch): ...new function. (pass_lower_resx): Replace declaration with that of... (make_pass_lower_resx): ...new function. (pass_build_cfg): Replace declaration with that of... (make_pass_build_cfg): ...new function. (pass_early_tree_profile): Replace declaration with that of... (make_pass_early_tree_profile): ...new function. (pass_cleanup_eh): Replace declaration with that of... (make_pass_cleanup_eh): ...new function. (pass_sra): Replace declaration with that of... (make_pass_sra): ...new function. (pass_sra_early): Replace declaration with that of... (make_pass_sra_early): ...new function. (pass_early_ipa_sra): Replace declaration with that of... (make_pass_early_ipa_sra): ...new function. (pass_tail_recursion): Replace declaration with that of... (make_pass_tail_recursion): ...new function. (pass_tail_calls): Replace declaration with that of... (make_pass_tail_calls): ...new function. (pass_tree_loop): Replace declaration with that of... (make_pass_tree_loop): ...new function. (pass_tree_loop_init): Replace declaration with that of... (make_pass_tree_loop_init): ...new function. (pass_lim): Replace declaration with that of... (make_pass_lim): ...new function. (pass_tree_unswitch): Replace declaration with that of... (make_pass_tree_unswitch): ...new function. (pass_predcom): Replace declaration with that of... (make_pass_predcom): ...new function. (pass_iv_canon): Replace declaration with that of... (make_pass_iv_canon): ...new function. (pass_scev_cprop): Replace declaration with that of... (make_pass_scev_cprop): ...new function. (pass_empty_loop): Replace declaration with that of... (make_pass_empty_loop): ...new function. (pass_record_bounds): Replace declaration with that of... (make_pass_record_bounds): ...new function. (pass_graphite): Replace declaration with that of... (make_pass_graphite): ...new function. (pass_graphite_transforms): Replace declaration with that of... (make_pass_graphite_transforms): ...new function. (pass_if_conversion): Replace declaration with that of... (make_pass_if_conversion): ...new function. (pass_loop_distribution): Replace declaration with that of... (make_pass_loop_distribution): ...new function. (pass_vectorize): Replace declaration with that of... (make_pass_vectorize): ...new function. (pass_slp_vectorize): Replace declaration with that of... (make_pass_slp_vectorize): ...new function. (pass_complete_unroll): Replace declaration with that of... (make_pass_complete_unroll): ...new function. (pass_complete_unrolli): Replace declaration with that of... (make_pass_complete_unrolli): ...new function. (pass_parallelize_loops): Replace declaration with that of... (make_pass_parallelize_loops): ...new function. (pass_loop_prefetch): Replace declaration with that of... (make_pass_loop_prefetch): ...new function. (pass_iv_optimize): Replace declaration with that of... (make_pass_iv_optimize): ...new function. (pass_tree_loop_done): Replace declaration with that of... (make_pass_tree_loop_done): ...new function. (pass_ch): Replace declaration with that of... (make_pass_ch): ...new function. (pass_ccp): Replace declaration with that of... (make_pass_ccp): ...new function. (pass_phi_only_cprop): Replace declaration with that of... (make_pass_phi_only_cprop): ...new function. (pass_build_ssa): Replace declaration with that of... (make_pass_build_ssa): ...new function. (pass_build_alias): Replace declaration with that of... (make_pass_build_alias): ...new function. (pass_build_ealias): Replace declaration with that of... (make_pass_build_ealias): ...new function. (pass_dominator): Replace declaration with that of... (make_pass_dominator): ...new function. (pass_dce): Replace declaration with that of... (make_pass_dce): ...new function. (pass_dce_loop): Replace declaration with that of... (make_pass_dce_loop): ...new function. (pass_cd_dce): Replace declaration with that of... (make_pass_cd_dce): ...new function. (pass_call_cdce): Replace declaration with that of... (make_pass_call_cdce): ...new function. (pass_merge_phi): Replace declaration with that of... (make_pass_merge_phi): ...new function. (pass_split_crit_edges): Replace declaration with that of... (make_pass_split_crit_edges): ...new function. (pass_pre): Replace declaration with that of... (make_pass_pre): ...new function. (pass_profile): Replace declaration with that of... (make_pass_profile): ...new function. (pass_strip_predict_hints): Replace declaration with that of... (make_pass_strip_predict_hints): ...new function. (pass_lower_complex_O0): Replace declaration with that of... (make_pass_lower_complex_O0): ...new function. (pass_lower_complex): Replace declaration with that of... (make_pass_lower_complex): ...new function. (pass_lower_vector): Replace declaration with that of... (make_pass_lower_vector): ...new function. (pass_lower_vector_ssa): Replace declaration with that of... (make_pass_lower_vector_ssa): ...new function. (pass_lower_omp): Replace declaration with that of... (make_pass_lower_omp): ...new function. (pass_diagnose_omp_blocks): Replace declaration with that of... (make_pass_diagnose_omp_blocks): ...new function. (pass_expand_omp): Replace declaration with that of... (make_pass_expand_omp): ...new function. (pass_expand_omp_ssa): Replace declaration with that of... (make_pass_expand_omp_ssa): ...new function. (pass_object_sizes): Replace declaration with that of... (make_pass_object_sizes): ...new function. (pass_strlen): Replace declaration with that of... (make_pass_strlen): ...new function. (pass_fold_builtins): Replace declaration with that of... (make_pass_fold_builtins): ...new function. (pass_stdarg): Replace declaration with that of... (make_pass_stdarg): ...new function. (pass_early_warn_uninitialized): Replace declaration with that of... (make_pass_early_warn_uninitialized): ...new function. (pass_late_warn_uninitialized): Replace declaration with that of... (make_pass_late_warn_uninitialized): ...new function. (pass_cse_reciprocals): Replace declaration with that of... (make_pass_cse_reciprocals): ...new function. (pass_cse_sincos): Replace declaration with that of... (make_pass_cse_sincos): ...new function. (pass_optimize_bswap): Replace declaration with that of... (make_pass_optimize_bswap): ...new function. (pass_optimize_widening_mul): Replace declaration with that of... (make_pass_optimize_widening_mul): ...new function. (pass_warn_function_return): Replace declaration with that of... (make_pass_warn_function_return): ...new function. (pass_warn_function_noreturn): Replace declaration with that of... (make_pass_warn_function_noreturn): ...new function. (pass_cselim): Replace declaration with that of... (make_pass_cselim): ...new function. (pass_phiopt): Replace declaration with that of... (make_pass_phiopt): ...new function. (pass_forwprop): Replace declaration with that of... (make_pass_forwprop): ...new function. (pass_phiprop): Replace declaration with that of... (make_pass_phiprop): ...new function. (pass_tree_ifcombine): Replace declaration with that of... (make_pass_tree_ifcombine): ...new function. (pass_dse): Replace declaration with that of... (make_pass_dse): ...new function. (pass_nrv): Replace declaration with that of... (make_pass_nrv): ...new function. (pass_rename_ssa_copies): Replace declaration with that of... (make_pass_rename_ssa_copies): ...new function. (pass_sink_code): Replace declaration with that of... (make_pass_sink_code): ...new function. (pass_fre): Replace declaration with that of... (make_pass_fre): ...new function. (pass_check_data_deps): Replace declaration with that of... (make_pass_check_data_deps): ...new function. (pass_copy_prop): Replace declaration with that of... (make_pass_copy_prop): ...new function. (pass_vrp): Replace declaration with that of... (make_pass_vrp): ...new function. (pass_uncprop): Replace declaration with that of... (make_pass_uncprop): ...new function. (pass_return_slot): Replace declaration with that of... (make_pass_return_slot): ...new function. (pass_reassoc): Replace declaration with that of... (make_pass_reassoc): ...new function. (pass_rebuild_cgraph_edges): Replace declaration with that of... (make_pass_rebuild_cgraph_edges): ...new function. (pass_remove_cgraph_callee_edges): Replace declaration with that of... (make_pass_remove_cgraph_callee_edges): ...new function. (pass_build_cgraph_edges): Replace declaration with that of... (make_pass_build_cgraph_edges): ...new function. (pass_local_pure_const): Replace declaration with that of... (make_pass_local_pure_const): ...new function. (pass_tracer): Replace declaration with that of... (make_pass_tracer): ...new function. (pass_warn_unused_result): Replace declaration with that of... (make_pass_warn_unused_result): ...new function. (pass_diagnose_tm_blocks): Replace declaration with that of... (make_pass_diagnose_tm_blocks): ...new function. (pass_lower_tm): Replace declaration with that of... (make_pass_lower_tm): ...new function. (pass_tm_init): Replace declaration with that of... (make_pass_tm_init): ...new function. (pass_tm_mark): Replace declaration with that of... (make_pass_tm_mark): ...new function. (pass_tm_memopt): Replace declaration with that of... (make_pass_tm_memopt): ...new function. (pass_tm_edges): Replace declaration with that of... (make_pass_tm_edges): ...new function. (pass_split_functions): Replace declaration with that of... (make_pass_split_functions): ...new function. (pass_feedback_split_functions): Replace declaration with that of... (make_pass_feedback_split_functions): ...new function. (pass_strength_reduction): Replace declaration with that of... (make_pass_strength_reduction): ...new function. (pass_ipa_lower_emutls): Replace declaration with that of... (make_pass_ipa_lower_emutls): ...new function. (pass_ipa_function_and_variable_visibility): Replace declaration with that of... (make_pass_ipa_function_and_variable_visibility): ...new function. (pass_ipa_tree_profile): Replace declaration with that of... (make_pass_ipa_tree_profile): ...new function. (pass_early_local_passes): Replace declaration with that of... (make_pass_early_local_passes): ...new function. (pass_ipa_whole_program_visibility): Replace declaration with that of... (make_pass_ipa_whole_program_visibility): ...new function. (pass_ipa_lto_gimple_out): Replace declaration with that of... (make_pass_ipa_lto_gimple_out): ...new function. (pass_ipa_increase_alignment): Replace declaration with that of... (make_pass_ipa_increase_alignment): ...new function. (pass_ipa_inline): Replace declaration with that of... (make_pass_ipa_inline): ...new function. (pass_ipa_free_lang_data): Replace declaration with that of... (make_pass_ipa_free_lang_data): ...new function. (pass_ipa_free_inline_summary): Replace declaration with that of... (make_pass_ipa_free_inline_summary): ...new function. (pass_ipa_cp): Replace declaration with that of... (make_pass_ipa_cp): ...new function. (pass_ipa_reference): Replace declaration with that of... (make_pass_ipa_reference): ...new function. (pass_ipa_pure_const): Replace declaration with that of... (make_pass_ipa_pure_const): ...new function. (pass_ipa_pta): Replace declaration with that of... (make_pass_ipa_pta): ...new function. (pass_ipa_lto_finish_out): Replace declaration with that of... (make_pass_ipa_lto_finish_out): ...new function. (pass_ipa_tm): Replace declaration with that of... (make_pass_ipa_tm): ...new function. (pass_ipa_profile): Replace declaration with that of... (make_pass_ipa_profile): ...new function. (pass_ipa_cdtor_merge): Replace declaration with that of... (make_pass_ipa_cdtor_merge): ...new function. (pass_cleanup_cfg_post_optimizing): Replace declaration with that of... (make_pass_cleanup_cfg_post_optimizing): ...new function. (pass_init_datastructures): Replace declaration with that of... (make_pass_init_datastructures): ...new function. (pass_fixup_cfg): Replace declaration with that of... (make_pass_fixup_cfg): ...new function. (pass_expand): Replace declaration with that of... (make_pass_expand): ...new function. (pass_instantiate_virtual_regs): Replace declaration with that of... (make_pass_instantiate_virtual_regs): ...new function. (pass_rtl_fwprop): Replace declaration with that of... (make_pass_rtl_fwprop): ...new function. (pass_rtl_fwprop_addr): Replace declaration with that of... (make_pass_rtl_fwprop_addr): ...new function. (pass_jump): Replace declaration with that of... (make_pass_jump): ...new function. (pass_jump2): Replace declaration with that of... (make_pass_jump2): ...new function. (pass_lower_subreg): Replace declaration with that of... (make_pass_lower_subreg): ...new function. (pass_cse): Replace declaration with that of... (make_pass_cse): ...new function. (pass_fast_rtl_dce): Replace declaration with that of... (make_pass_fast_rtl_dce): ...new function. (pass_ud_rtl_dce): Replace declaration with that of... (make_pass_ud_rtl_dce): ...new function. (pass_rtl_dce): Replace declaration with that of... (make_pass_rtl_dce): ...new function. (pass_rtl_dse1): Replace declaration with that of... (make_pass_rtl_dse1): ...new function. (pass_rtl_dse2): Replace declaration with that of... (make_pass_rtl_dse2): ...new function. (pass_rtl_dse3): Replace declaration with that of... (make_pass_rtl_dse3): ...new function. (pass_rtl_cprop): Replace declaration with that of... (make_pass_rtl_cprop): ...new function. (pass_rtl_pre): Replace declaration with that of... (make_pass_rtl_pre): ...new function. (pass_rtl_hoist): Replace declaration with that of... (make_pass_rtl_hoist): ...new function. (pass_rtl_store_motion): Replace declaration with that of... (make_pass_rtl_store_motion): ...new function. (pass_cse_after_global_opts): Replace declaration with that of... (make_pass_cse_after_global_opts): ...new function. (pass_rtl_ifcvt): Replace declaration with that of... (make_pass_rtl_ifcvt): ...new function. (pass_into_cfg_layout_mode): Replace declaration with that of... (make_pass_into_cfg_layout_mode): ...new function. (pass_outof_cfg_layout_mode): Replace declaration with that of... (make_pass_outof_cfg_layout_mode): ...new function. (pass_loop2): Replace declaration with that of... (make_pass_loop2): ...new function. (pass_rtl_loop_init): Replace declaration with that of... (make_pass_rtl_loop_init): ...new function. (pass_rtl_move_loop_invariants): Replace declaration with that of... (make_pass_rtl_move_loop_invariants): ...new function. (pass_rtl_unswitch): Replace declaration with that of... (make_pass_rtl_unswitch): ...new function. (pass_rtl_unroll_and_peel_loops): Replace declaration with that of... (make_pass_rtl_unroll_and_peel_loops): ...new function. (pass_rtl_doloop): Replace declaration with that of... (make_pass_rtl_doloop): ...new function. (pass_rtl_loop_done): Replace declaration with that of... (make_pass_rtl_loop_done): ...new function. (pass_web): Replace declaration with that of... (make_pass_web): ...new function. (pass_cse2): Replace declaration with that of... (make_pass_cse2): ...new function. (pass_df_initialize_opt): Replace declaration with that of... (make_pass_df_initialize_opt): ...new function. (pass_df_initialize_no_opt): Replace declaration with that of... (make_pass_df_initialize_no_opt): ...new function. (pass_reginfo_init): Replace declaration with that of... (make_pass_reginfo_init): ...new function. (pass_inc_dec): Replace declaration with that of... (make_pass_inc_dec): ...new function. (pass_stack_ptr_mod): Replace declaration with that of... (make_pass_stack_ptr_mod): ...new function. (pass_initialize_regs): Replace declaration with that of... (make_pass_initialize_regs): ...new function. (pass_combine): Replace declaration with that of... (make_pass_combine): ...new function. (pass_if_after_combine): Replace declaration with that of... (make_pass_if_after_combine): ...new function. (pass_ree): Replace declaration with that of... (make_pass_ree): ...new function. (pass_partition_blocks): Replace declaration with that of... (make_pass_partition_blocks): ...new function. (pass_match_asm_constraints): Replace declaration with that of... (make_pass_match_asm_constraints): ...new function. (pass_regmove): Replace declaration with that of... (make_pass_regmove): ...new function. (pass_split_all_insns): Replace declaration with that of... (make_pass_split_all_insns): ...new function. (pass_fast_rtl_byte_dce): Replace declaration with that of... (make_pass_fast_rtl_byte_dce): ...new function. (pass_lower_subreg2): Replace declaration with that of... (make_pass_lower_subreg2): ...new function. (pass_mode_switching): Replace declaration with that of... (make_pass_mode_switching): ...new function. (pass_sms): Replace declaration with that of... (make_pass_sms): ...new function. (pass_sched): Replace declaration with that of... (make_pass_sched): ...new function. (pass_ira): Replace declaration with that of... (make_pass_ira): ...new function. (pass_reload): Replace declaration with that of... (make_pass_reload): ...new function. (pass_clean_state): Replace declaration with that of... (make_pass_clean_state): ...new function. (pass_branch_prob): Replace declaration with that of... (make_pass_branch_prob): ...new function. (pass_value_profile_transformations): Replace declaration with that of... (make_pass_value_profile_transformations): ...new function. (pass_postreload_cse): Replace declaration with that of... (make_pass_postreload_cse): ...new function. (pass_gcse2): Replace declaration with that of... (make_pass_gcse2): ...new function. (pass_split_after_reload): Replace declaration with that of... (make_pass_split_after_reload): ...new function. (pass_branch_target_load_optimize1): Replace declaration with that of... (make_pass_branch_target_load_optimize1): ...new function. (pass_thread_prologue_and_epilogue): Replace declaration with that of... (make_pass_thread_prologue_and_epilogue): ...new function. (pass_stack_adjustments): Replace declaration with that of... (make_pass_stack_adjustments): ...new function. (pass_peephole2): Replace declaration with that of... (make_pass_peephole2): ...new function. (pass_if_after_reload): Replace declaration with that of... (make_pass_if_after_reload): ...new function. (pass_regrename): Replace declaration with that of... (make_pass_regrename): ...new function. (pass_cprop_hardreg): Replace declaration with that of... (make_pass_cprop_hardreg): ...new function. (pass_reorder_blocks): Replace declaration with that of... (make_pass_reorder_blocks): ...new function. (pass_branch_target_load_optimize2): Replace declaration with that of... (make_pass_branch_target_load_optimize2): ...new function. (pass_leaf_regs): Replace declaration with that of... (make_pass_leaf_regs): ...new function. (pass_split_before_sched2): Replace declaration with that of... (make_pass_split_before_sched2): ...new function. (pass_compare_elim_after_reload): Replace declaration with that of... (make_pass_compare_elim_after_reload): ...new function. (pass_sched2): Replace declaration with that of... (make_pass_sched2): ...new function. (pass_stack_regs): Replace declaration with that of... (make_pass_stack_regs): ...new function. (pass_stack_regs_run): Replace declaration with that of... (make_pass_stack_regs_run): ...new function. (pass_df_finish): Replace declaration with that of... (make_pass_df_finish): ...new function. (pass_compute_alignments): Replace declaration with that of... (make_pass_compute_alignments): ...new function. (pass_duplicate_computed_gotos): Replace declaration with that of... (make_pass_duplicate_computed_gotos): ...new function. (pass_variable_tracking): Replace declaration with that of... (make_pass_variable_tracking): ...new function. (pass_free_cfg): Replace declaration with that of... (make_pass_free_cfg): ...new function. (pass_machine_reorg): Replace declaration with that of... (make_pass_machine_reorg): ...new function. (pass_cleanup_barriers): Replace declaration with that of... (make_pass_cleanup_barriers): ...new function. (pass_delay_slots): Replace declaration with that of... (make_pass_delay_slots): ...new function. (pass_split_for_shorten_branches): Replace declaration with that of... (make_pass_split_for_shorten_branches): ...new function. (pass_split_before_regstack): Replace declaration with that of... (make_pass_split_before_regstack): ...new function. (pass_convert_to_eh_region_ranges): Replace declaration with that of... (make_pass_convert_to_eh_region_ranges): ...new function. (pass_shorten_branches): Replace declaration with that of... (make_pass_shorten_branches): ...new function. (pass_set_nothrow_function_flags): Replace declaration with that of... (make_pass_set_nothrow_function_flags): ...new function. (pass_dwarf2_frame): Replace declaration with that of... (make_pass_dwarf2_frame): ...new function. (pass_final): Replace declaration with that of... (make_pass_final): ...new function. (pass_rtl_seqabstr): Replace declaration with that of... (make_pass_rtl_seqabstr): ...new function. (pass_release_ssa_names): Replace declaration with that of... (make_pass_release_ssa_names): ...new function. (pass_early_inline): Replace declaration with that of... (make_pass_early_inline): ...new function. (pass_inline_parameters): Replace declaration with that of... (make_pass_inline_parameters): ...new function. (pass_update_address_taken): Replace declaration with that of... (make_pass_update_address_taken): ...new function. (pass_convert_switch): Replace declaration with that of... (make_pass_convert_switch): ...new function. * tree-profile.c (pass_ipa_tree_profile): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_tree_profile): ...new pass_data instance and... (make_pass_ipa_tree_profile): ...new function. * tree-sra.c (pass_sra_early): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_sra_early): ...new pass_data instance and... (make_pass_sra_early): ...new function. (pass_sra): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_sra): ...new pass_data instance and... (make_pass_sra): ...new function. (pass_early_ipa_sra): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_early_ipa_sra): ...new pass_data instance and... (make_pass_early_ipa_sra): ...new function. * tree-ssa-ccp.c (pass_ccp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_ccp): ...new pass_data instance and... (make_pass_ccp): ...new function. (pass_fold_builtins): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_fold_builtins): ...new pass_data instance and... (make_pass_fold_builtins): ...new function. * tree-ssa-copy.c (pass_copy_prop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_copy_prop): ...new pass_data instance and... (make_pass_copy_prop): ...new function. * tree-ssa-copyrename.c (pass_rename_ssa_copies): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_rename_ssa_copies): ...new pass_data instance and... (make_pass_rename_ssa_copies): ...new function. * tree-ssa-dce.c (pass_dce): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dce): ...new pass_data instance and... (make_pass_dce): ...new function. (pass_dce_loop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dce_loop): ...new pass_data instance and... (make_pass_dce_loop): ...new function. (pass_cd_dce): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cd_dce): ...new pass_data instance and... (make_pass_cd_dce): ...new function. * tree-ssa-dom.c (pass_dominator): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dominator): ...new pass_data instance and... (make_pass_dominator): ...new function. (pass_phi_only_cprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_phi_only_cprop): ...new pass_data instance and... (make_pass_phi_only_cprop): ...new function. * tree-ssa-dse.c (pass_dse): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dse): ...new pass_data instance and... (make_pass_dse): ...new function. * tree-ssa-forwprop.c (pass_forwprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_forwprop): ...new pass_data instance and... (make_pass_forwprop): ...new function. * tree-ssa-ifcombine.c (pass_tree_ifcombine): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_ifcombine): ...new pass_data instance and... (make_pass_tree_ifcombine): ...new function. * tree-ssa-loop-ch.c (pass_ch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_ch): ...new pass_data instance and... (make_pass_ch): ...new function. * tree-ssa-loop.c (pass_tree_loop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_loop): ...new pass_data instance and... (make_pass_tree_loop): ...new function. (pass_tree_loop_init): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_loop_init): ...new pass_data instance and... (make_pass_tree_loop_init): ...new function. (pass_lim): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lim): ...new pass_data instance and... (make_pass_lim): ...new function. (pass_tree_unswitch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_unswitch): ...new pass_data instance and... (make_pass_tree_unswitch): ...new function. (pass_predcom): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_predcom): ...new pass_data instance and... (make_pass_predcom): ...new function. (pass_vectorize): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_vectorize): ...new pass_data instance and... (make_pass_vectorize): ...new function. (pass_graphite): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_graphite): ...new pass_data instance and... (make_pass_graphite): ...new function. (pass_graphite_transforms): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_graphite_transforms): ...new pass_data instance and... (make_pass_graphite_transforms): ...new function. (pass_check_data_deps): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_check_data_deps): ...new pass_data instance and... (make_pass_check_data_deps): ...new function. (pass_iv_canon): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_iv_canon): ...new pass_data instance and... (make_pass_iv_canon): ...new function. (pass_scev_cprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_scev_cprop): ...new pass_data instance and... (make_pass_scev_cprop): ...new function. (pass_record_bounds): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_record_bounds): ...new pass_data instance and... (make_pass_record_bounds): ...new function. (pass_complete_unroll): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_complete_unroll): ...new pass_data instance and... (make_pass_complete_unroll): ...new function. (pass_complete_unrolli): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_complete_unrolli): ...new pass_data instance and... (make_pass_complete_unrolli): ...new function. (pass_parallelize_loops): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_parallelize_loops): ...new pass_data instance and... (make_pass_parallelize_loops): ...new function. (pass_loop_prefetch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_loop_prefetch): ...new pass_data instance and... (make_pass_loop_prefetch): ...new function. (pass_iv_optimize): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_iv_optimize): ...new pass_data instance and... (make_pass_iv_optimize): ...new function. (pass_tree_loop_done): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_loop_done): ...new pass_data instance and... (make_pass_tree_loop_done): ...new function. * tree-ssa-math-opts.c (pass_cse_reciprocals): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cse_reciprocals): ...new pass_data instance and... (make_pass_cse_reciprocals): ...new function. (pass_cse_sincos): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cse_sincos): ...new pass_data instance and... (make_pass_cse_sincos): ...new function. (pass_optimize_bswap): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_optimize_bswap): ...new pass_data instance and... (make_pass_optimize_bswap): ...new function. (pass_optimize_widening_mul): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_optimize_widening_mul): ...new pass_data instance and... (make_pass_optimize_widening_mul): ...new function. * tree-ssa-phiopt.c (pass_phiopt): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_phiopt): ...new pass_data instance and... (make_pass_phiopt): ...new function. (pass_cselim): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cselim): ...new pass_data instance and... (make_pass_cselim): ...new function. * tree-ssa-phiprop.c (pass_phiprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_phiprop): ...new pass_data instance and... (make_pass_phiprop): ...new function. * tree-ssa-pre.c (pass_pre): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_pre): ...new pass_data instance and... (make_pass_pre): ...new function. (pass_fre): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_fre): ...new pass_data instance and... (make_pass_fre): ...new function. * tree-ssa-reassoc.c (pass_reassoc): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_reassoc): ...new pass_data instance and... (make_pass_reassoc): ...new function. * tree-ssa-sink.c (pass_sink_code): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_sink_code): ...new pass_data instance and... (make_pass_sink_code): ...new function. * tree-ssa-strlen.c (pass_strlen): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_strlen): ...new pass_data instance and... (make_pass_strlen): ...new function. * tree-ssa-structalias.c (pass_build_alias): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_alias): ...new pass_data instance and... (make_pass_build_alias): ...new function. (pass_build_ealias): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_ealias): ...new pass_data instance and... (make_pass_build_ealias): ...new function. (pass_ipa_pta): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_pta): ...new pass_data instance and... (make_pass_ipa_pta): ...new function. * tree-ssa-uncprop.c (pass_uncprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_uncprop): ...new pass_data instance and... (make_pass_uncprop): ...new function. * tree-ssa-uninit.c (pass_late_warn_uninitialized): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_late_warn_uninitialized): ...new pass_data instance and... (make_pass_late_warn_uninitialized): ...new function. * tree-ssa.c (pass_init_datastructures): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_init_datastructures): ...new pass_data instance and... (make_pass_init_datastructures): ...new function. (pass_early_warn_uninitialized): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_early_warn_uninitialized): ...new pass_data instance and... (make_pass_early_warn_uninitialized): ...new function. (pass_update_address_taken): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_update_address_taken): ...new pass_data instance and... (make_pass_update_address_taken): ...new function. * tree-ssanames.c (pass_release_ssa_names): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_release_ssa_names): ...new pass_data instance and... (make_pass_release_ssa_names): ...new function. * tree-stdarg.c (pass_stdarg): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_stdarg): ...new pass_data instance and... (make_pass_stdarg): ...new function. * tree-switch-conversion.c (pass_convert_switch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_convert_switch): ...new pass_data instance and... (make_pass_convert_switch): ...new function. * tree-tailcall.c (pass_tail_recursion): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tail_recursion): ...new pass_data instance and... (make_pass_tail_recursion): ...new function. (pass_tail_calls): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tail_calls): ...new pass_data instance and... (make_pass_tail_calls): ...new function. * tree-vect-generic.c (pass_lower_vector): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_vector): ...new pass_data instance and... (make_pass_lower_vector): ...new function. (pass_lower_vector_ssa): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_vector_ssa): ...new pass_data instance and... (make_pass_lower_vector_ssa): ...new function. * tree-vectorizer.c (pass_slp_vectorize): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_slp_vectorize): ...new pass_data instance and... (make_pass_slp_vectorize): ...new function. (pass_ipa_increase_alignment): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_increase_alignment): ...new pass_data instance and... (make_pass_ipa_increase_alignment): ...new function. * tree-vrp.c (pass_vrp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_vrp): ...new pass_data instance and... (make_pass_vrp): ...new function. * tree.c (pass_ipa_free_lang_data): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_free_lang_data): ...new pass_data instance and... (make_pass_ipa_free_lang_data): ...new function. * tsan.c (pass_tsan): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tsan): ...new pass_data instance and... (make_pass_tsan): ...new function. (pass_tsan_O0): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tsan_O0): ...new pass_data instance and... (make_pass_tsan_O0): ...new function. * var-tracking.c (pass_variable_tracking): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_variable_tracking): ...new pass_data instance and... (make_pass_variable_tracking): ...new function. * web.c (pass_web): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_web): ...new pass_data instance and... (make_pass_web): ...new function. * config/epiphany/epiphany.h (pass_mode_switch_use): Replace declaration with that of... (make_pass_mode_switch_use): ...new function. (pass_resolve_sw_modes): Replace declaration with that of... (make_pass_resolve_sw_modes): ...new function. * config/epiphany/mode-switch-use.c (pass_mode_switch_use): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_mode_switch_use): ...new pass_data instance and... (make_pass_mode_switch_use): ...new function. * config/epiphany/resolve-sw-modes.c (pass_resolve_sw_modes): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_resolve_sw_modes): ...new pass_data instance and... (make_pass_resolve_sw_modes): ...new function. * config/i386/i386.c (pass_insert_vzeroupper): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_insert_vzeroupper): ...new pass_data instance and... (make_pass_insert_vzeroupper): ...new function. * config/sparc/sparc.c (pass_work_around_errata): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_work_around_errata): ...new pass_data instance and... (make_pass_work_around_errata): ...new function. * config/mips/mips.c (pass_mips_machine_reorg2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_mips_machine_reorg2): ...new pass_data instance and... (make_pass_mips_machine_reorg2): ...new function. gcc/testsuite/ Patch autogenerated by refactor_passes.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 03fe39476a4c4ea450b49e087cfa817b5f92021e * gcc.dg/plugin/one_time_plugin.c (one_pass): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_one_pass): ...new pass_data instance and... (make_one_pass): ...new function. * gcc.dg/plugin/selfassign.c (pass_warn_self_assign): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_self_assign): ...new pass_data instance and... (make_pass_warn_self_assign): ...new function. * g++.dg/plugin/dumb_plugin.c (pass_dumb_plugin_example): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dumb_plugin_example): ...new pass_data instance and... (make_pass_dumb_plugin_example): ...new function. * g++.dg/plugin/selfassign.c (pass_warn_self_assign): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_self_assign): ...new pass_data instance and... (make_pass_warn_self_assign): ...new function. From-SVN: r201508
2013-08-05 22:16:05 +02:00
class pass_sms : public rtl_opt_pass
{
public:
alloc-pool.c, [...]: Add missing whitespace before "(". gcc/ * alloc-pool.c, asan.c, auto-inc-dec.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, bt-load.c, builtins.c, calls.c, cfgcleanup.c, cfgexpand.c, cfghooks.c, cfgloop.c, cfgloopmanip.c, cfgrtl.c, cgraph.c, cgraph.h, cgraphbuild.c, cgraphclones.c, cgraphunit.c, collect2.c, combine-stack-adj.c, combine.c, compare-elim.c, context.c, context.h, cprop.c, cse.c, cselib.c, dbxout.c, dce.c, defaults.h, df-core.c, df-problems.c, df-scan.c, df.h, diagnostic.c, double-int.c, dse.c, dumpfile.c, dwarf2asm.c, dwarf2cfi.c, dwarf2out.c, emit-rtl.c, errors.c, except.c, expmed.c, expr.c, file-find.c, final.c, fixed-value.c, fold-const.c, function.c, fwprop.c, gcc-ar.c, gcc.c, gcov-io.c, gcov-io.h, gcov.c, gcse.c, genattr-common.c, genattr.c, genattrtab.c, genautomata.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, gengtype-state.c, gengtype.c, genmodes.c, genopinit.c, genoutput.c, genpeep.c, genpreds.c, genrecog.c, gensupport.c, ggc-common.c, ggc-page.c, gimple-fold.c, gimple-low.c, gimple-pretty-print.c, gimple-ssa-strength-reduction.c, gimple.c, gimple.h, godump.c, graphite-clast-to-gimple.c, graphite-optimize-isl.c, graphite-poly.h, graphite-sese-to-poly.c, graphite.c, haifa-sched.c, hash-table.c, hash-table.h, hwint.c, hwint.h, ifcvt.c, incpath.c, init-regs.c, input.h, intl.c, intl.h, ipa-cp.c, ipa-devirt.c, ipa-inline-analysis.c, ipa-inline.c, ipa-profile.c, ipa-pure-const.c, ipa-reference.c, ipa-split.c, ipa-utils.c, ipa.c, ira-build.c, ira.c, jump.c, loop-doloop.c, loop-init.c, loop-invariant.c, loop-iv.c, lower-subreg.c, lto-cgraph.c, lto-streamer-in.c, lto-streamer-out.c, lto-wrapper.c, mcf.c, mode-switching.c, modulo-sched.c, omp-low.c, optabs.c, opts.c, pass_manager.h, passes.c, plugin.c, postreload-gcse.c, postreload.c, predict.c, prefix.c, pretty-print.c, print-rtl.c, print-tree.c, profile.c, read-md.c, real.c, real.h, recog.c, ree.c, reg-stack.c, regcprop.c, reginfo.c, regmove.c, regrename.c, regs.h, regstat.c, reload1.c, reorg.c, rtl.c, rtl.h, rtlanal.c, sbitmap.c, sched-rgn.c, sdbout.c, sel-sched-ir.c, sel-sched.c, sparseset.c, stack-ptr-mod.c, statistics.c, stmt.c, stor-layout.c, store-motion.c, streamer-hooks.h, system.h, target-hooks-macros.h, targhooks.c, targhooks.h, toplev.c, tracer.c, trans-mem.c, tree-browser.c, tree-call-cdce.c, tree-cfg.c, tree-cfgcleanup.c, tree-complex.c, tree-data-ref.c, tree-data-ref.h, tree-eh.c, tree-emutls.c, tree-flow.h, tree-if-conv.c, tree-into-ssa.c, tree-iterator.c, tree-loop-distribution.c, tree-mudflap.c, tree-nested.c, tree-nomudflap.c, tree-nrv.c, tree-object-size.c, tree-optimize.c, tree-pass.h, tree-pretty-print.c, tree-profile.c, tree-scalar-evolution.c, tree-sra.c, tree-ssa-ccp.c, tree-ssa-coalesce.c, tree-ssa-copy.c, tree-ssa-copyrename.c, tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c, tree-ssa-ifcombine.c, tree-ssa-live.c, tree-ssa-loop-ch.c, tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-prefetch.c, tree-ssa-loop.c, tree-ssa-math-opts.c, tree-ssa-operands.c, tree-ssa-phiopt.c, tree-ssa-phiprop.c, tree-ssa-pre.c, tree-ssa-reassoc.c, tree-ssa-sink.c, tree-ssa-strlen.c, tree-ssa-structalias.c, tree-ssa-threadedge.c, tree-ssa-threadupdate.c, tree-ssa-uncprop.c, tree-ssa-uninit.c, tree-ssa.c, tree-ssanames.c, tree-stdarg.c, tree-switch-conversion.c, tree-tailcall.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop-manip.c, tree-vect-stmts.c, tree-vectorizer.c, tree-vectorizer.h, tree-vrp.c, tree.c, tree.h, tsan.c, tsystem.h, value-prof.c, var-tracking.c, varasm.c, vec.h, vmsdbgout.c, vtable-verify.c, web.c: Add missing whitespace before "(". From-SVN: r203004
2013-09-28 10:42:34 +02:00
pass_sms (gcc::context *ctxt)
: rtl_opt_pass (pass_data_sms, ctxt)
Automated conversion of passes to C++ classes gcc/ Patch autogenerated by refactor_passes.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 03fe39476a4c4ea450b49e087cfa817b5f92021e * asan.c (pass_asan): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_asan): ...new pass_data instance and... (make_pass_asan): ...new function. (pass_asan_O0): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_asan_O0): ...new pass_data instance and... (make_pass_asan_O0): ...new function. * auto-inc-dec.c (pass_inc_dec): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_inc_dec): ...new pass_data instance and... (make_pass_inc_dec): ...new function. * bb-reorder.c (pass_reorder_blocks): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_reorder_blocks): ...new pass_data instance and... (make_pass_reorder_blocks): ...new function. (pass_duplicate_computed_gotos): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_duplicate_computed_gotos): ...new pass_data instance and... (make_pass_duplicate_computed_gotos): ...new function. (pass_partition_blocks): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_partition_blocks): ...new pass_data instance and... (make_pass_partition_blocks): ...new function. * bt-load.c (pass_branch_target_load_optimize1): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_branch_target_load_optimize1): ...new pass_data instance and... (make_pass_branch_target_load_optimize1): ...new function. (pass_branch_target_load_optimize2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_branch_target_load_optimize2): ...new pass_data instance and... (make_pass_branch_target_load_optimize2): ...new function. * cfgcleanup.c (pass_jump): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_jump): ...new pass_data instance and... (make_pass_jump): ...new function. (pass_jump2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_jump2): ...new pass_data instance and... (make_pass_jump2): ...new function. * cfgexpand.c (pass_expand): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_expand): ...new pass_data instance and... (make_pass_expand): ...new function. * cfgrtl.c (pass_free_cfg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_free_cfg): ...new pass_data instance and... (make_pass_free_cfg): ...new function. (pass_into_cfg_layout_mode): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_into_cfg_layout_mode): ...new pass_data instance and... (make_pass_into_cfg_layout_mode): ...new function. (pass_outof_cfg_layout_mode): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_outof_cfg_layout_mode): ...new pass_data instance and... (make_pass_outof_cfg_layout_mode): ...new function. * cgraphbuild.c (pass_build_cgraph_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_cgraph_edges): ...new pass_data instance and... (make_pass_build_cgraph_edges): ...new function. (pass_rebuild_cgraph_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_rebuild_cgraph_edges): ...new pass_data instance and... (make_pass_rebuild_cgraph_edges): ...new function. (pass_remove_cgraph_callee_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_remove_cgraph_callee_edges): ...new pass_data instance and... (make_pass_remove_cgraph_callee_edges): ...new function. * combine-stack-adj.c (pass_stack_adjustments): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_adjustments): ...new pass_data instance and... (make_pass_stack_adjustments): ...new function. * combine.c (pass_combine): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_combine): ...new pass_data instance and... (make_pass_combine): ...new function. * compare-elim.c (pass_compare_elim_after_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_compare_elim_after_reload): ...new pass_data instance and... (make_pass_compare_elim_after_reload): ...new function. * cprop.c (pass_rtl_cprop): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_cprop): ...new pass_data instance and... (make_pass_rtl_cprop): ...new function. * cse.c (pass_cse): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cse): ...new pass_data instance and... (make_pass_cse): ...new function. (pass_cse2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cse2): ...new pass_data instance and... (make_pass_cse2): ...new function. (pass_cse_after_global_opts): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cse_after_global_opts): ...new pass_data instance and... (make_pass_cse_after_global_opts): ...new function. * dce.c (pass_ud_rtl_dce): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_ud_rtl_dce): ...new pass_data instance and... (make_pass_ud_rtl_dce): ...new function. (pass_fast_rtl_dce): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_fast_rtl_dce): ...new pass_data instance and... (make_pass_fast_rtl_dce): ...new function. * df-core.c (pass_df_initialize_opt): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_df_initialize_opt): ...new pass_data instance and... (make_pass_df_initialize_opt): ...new function. (pass_df_initialize_no_opt): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_df_initialize_no_opt): ...new pass_data instance and... (make_pass_df_initialize_no_opt): ...new function. (pass_df_finish): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_df_finish): ...new pass_data instance and... (make_pass_df_finish): ...new function. * dse.c (pass_rtl_dse1): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_dse1): ...new pass_data instance and... (make_pass_rtl_dse1): ...new function. (pass_rtl_dse2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_dse2): ...new pass_data instance and... (make_pass_rtl_dse2): ...new function. * dwarf2cfi.c (pass_dwarf2_frame): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_dwarf2_frame): ...new pass_data instance and... (make_pass_dwarf2_frame): ...new function. * except.c (pass_set_nothrow_function_flags): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_set_nothrow_function_flags): ...new pass_data instance and... (make_pass_set_nothrow_function_flags): ...new function. (pass_convert_to_eh_region_ranges): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_convert_to_eh_region_ranges): ...new pass_data instance and... (make_pass_convert_to_eh_region_ranges): ...new function. * final.c (pass_compute_alignments): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_compute_alignments): ...new pass_data instance and... (make_pass_compute_alignments): ...new function. (pass_final): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_final): ...new pass_data instance and... (make_pass_final): ...new function. (pass_shorten_branches): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_shorten_branches): ...new pass_data instance and... (make_pass_shorten_branches): ...new function. (pass_clean_state): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_clean_state): ...new pass_data instance and... (make_pass_clean_state): ...new function. * function.c (pass_instantiate_virtual_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_instantiate_virtual_regs): ...new pass_data instance and... (make_pass_instantiate_virtual_regs): ...new function. (pass_leaf_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_leaf_regs): ...new pass_data instance and... (make_pass_leaf_regs): ...new function. (pass_thread_prologue_and_epilogue): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_thread_prologue_and_epilogue): ...new pass_data instance and... (make_pass_thread_prologue_and_epilogue): ...new function. (pass_match_asm_constraints): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_match_asm_constraints): ...new pass_data instance and... (make_pass_match_asm_constraints): ...new function. * fwprop.c (pass_rtl_fwprop): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_fwprop): ...new pass_data instance and... (make_pass_rtl_fwprop): ...new function. (pass_rtl_fwprop_addr): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_fwprop_addr): ...new pass_data instance and... (make_pass_rtl_fwprop_addr): ...new function. * gcse.c (pass_rtl_pre): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_pre): ...new pass_data instance and... (make_pass_rtl_pre): ...new function. (pass_rtl_hoist): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_hoist): ...new pass_data instance and... (make_pass_rtl_hoist): ...new function. * gimple-low.c (pass_lower_cf): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_cf): ...new pass_data instance and... (make_pass_lower_cf): ...new function. * gimple-ssa-strength-reduction.c (pass_strength_reduction): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_strength_reduction): ...new pass_data instance and... (make_pass_strength_reduction): ...new function. * ifcvt.c (pass_rtl_ifcvt): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_ifcvt): ...new pass_data instance and... (make_pass_rtl_ifcvt): ...new function. (pass_if_after_combine): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_if_after_combine): ...new pass_data instance and... (make_pass_if_after_combine): ...new function. (pass_if_after_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_if_after_reload): ...new pass_data instance and... (make_pass_if_after_reload): ...new function. * init-regs.c (pass_initialize_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_initialize_regs): ...new pass_data instance and... (make_pass_initialize_regs): ...new function. * ipa-cp.c (pass_ipa_cp): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_cp): ...new pass_data instance and... (make_pass_ipa_cp): ...new function. * ipa-inline-analysis.c (pass_inline_parameters): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_inline_parameters): ...new pass_data instance and... (make_pass_inline_parameters): ...new function. * ipa-inline.c (pass_early_inline): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_early_inline): ...new pass_data instance and... (make_pass_early_inline): ...new function. (pass_ipa_inline): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_inline): ...new pass_data instance and... (make_pass_ipa_inline): ...new function. * ipa-pure-const.c (pass_local_pure_const): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_local_pure_const): ...new pass_data instance and... (make_pass_local_pure_const): ...new function. (pass_ipa_pure_const): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_pure_const): ...new pass_data instance and... (make_pass_ipa_pure_const): ...new function. * ipa-reference.c (pass_ipa_reference): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_reference): ...new pass_data instance and... (make_pass_ipa_reference): ...new function. * ipa-split.c (pass_split_functions): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_split_functions): ...new pass_data instance and... (make_pass_split_functions): ...new function. (pass_feedback_split_functions): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_feedback_split_functions): ...new pass_data instance and... (make_pass_feedback_split_functions): ...new function. * ipa.c (pass_ipa_function_and_variable_visibility): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_function_and_variable_visibility): ...new pass_data instance and... (make_pass_ipa_function_and_variable_visibility): ...new function. (pass_ipa_free_inline_summary): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_free_inline_summary): ...new pass_data instance and... (make_pass_ipa_free_inline_summary): ...new function. (pass_ipa_whole_program_visibility): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_whole_program_visibility): ...new pass_data instance and... (make_pass_ipa_whole_program_visibility): ...new function. (pass_ipa_profile): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_profile): ...new pass_data instance and... (make_pass_ipa_profile): ...new function. (pass_ipa_cdtor_merge): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_cdtor_merge): ...new pass_data instance and... (make_pass_ipa_cdtor_merge): ...new function. * ira.c (pass_ira): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_ira): ...new pass_data instance and... (make_pass_ira): ...new function. (pass_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_reload): ...new pass_data instance and... (make_pass_reload): ...new function. * jump.c (pass_cleanup_barriers): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cleanup_barriers): ...new pass_data instance and... (make_pass_cleanup_barriers): ...new function. * loop-init.c (pass_loop2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_loop2): ...new pass_data instance and... (make_pass_loop2): ...new function. (pass_rtl_loop_init): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_loop_init): ...new pass_data instance and... (make_pass_rtl_loop_init): ...new function. (pass_rtl_loop_done): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_loop_done): ...new pass_data instance and... (make_pass_rtl_loop_done): ...new function. (pass_rtl_move_loop_invariants): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_move_loop_invariants): ...new pass_data instance and... (make_pass_rtl_move_loop_invariants): ...new function. (pass_rtl_unswitch): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_unswitch): ...new pass_data instance and... (make_pass_rtl_unswitch): ...new function. (pass_rtl_unroll_and_peel_loops): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_unroll_and_peel_loops): ...new pass_data instance and... (make_pass_rtl_unroll_and_peel_loops): ...new function. (pass_rtl_doloop): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_doloop): ...new pass_data instance and... (make_pass_rtl_doloop): ...new function. * lower-subreg.c (pass_lower_subreg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_lower_subreg): ...new pass_data instance and... (make_pass_lower_subreg): ...new function. (pass_lower_subreg2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_lower_subreg2): ...new pass_data instance and... (make_pass_lower_subreg2): ...new function. * lto-streamer-out.c (pass_ipa_lto_gimple_out): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_lto_gimple_out): ...new pass_data instance and... (make_pass_ipa_lto_gimple_out): ...new function. (pass_ipa_lto_finish_out): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_lto_finish_out): ...new pass_data instance and... (make_pass_ipa_lto_finish_out): ...new function. * mode-switching.c (pass_mode_switching): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_mode_switching): ...new pass_data instance and... (make_pass_mode_switching): ...new function. * modulo-sched.c (pass_sms): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_sms): ...new pass_data instance and... (make_pass_sms): ...new function. * omp-low.c (pass_expand_omp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_expand_omp): ...new pass_data instance and... (make_pass_expand_omp): ...new function. (pass_lower_omp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_omp): ...new pass_data instance and... (make_pass_lower_omp): ...new function. (pass_diagnose_omp_blocks): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_diagnose_omp_blocks): ...new pass_data instance and... (make_pass_diagnose_omp_blocks): ...new function. * passes.c (pass_early_local_passes): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_early_local_passes): ...new pass_data instance and... (make_pass_early_local_passes): ...new function. (pass_all_early_optimizations): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_all_early_optimizations): ...new pass_data instance and... (make_pass_all_early_optimizations): ...new function. (pass_all_optimizations): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_all_optimizations): ...new pass_data instance and... (make_pass_all_optimizations): ...new function. (pass_all_optimizations_g): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_all_optimizations_g): ...new pass_data instance and... (make_pass_all_optimizations_g): ...new function. (pass_rest_of_compilation): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rest_of_compilation): ...new pass_data instance and... (make_pass_rest_of_compilation): ...new function. (pass_postreload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_postreload): ...new pass_data instance and... (make_pass_postreload): ...new function. * postreload-gcse.c (pass_gcse2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_gcse2): ...new pass_data instance and... (make_pass_gcse2): ...new function. * postreload.c (pass_postreload_cse): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_postreload_cse): ...new pass_data instance and... (make_pass_postreload_cse): ...new function. * predict.c (pass_profile): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_profile): ...new pass_data instance and... (make_pass_profile): ...new function. (pass_strip_predict_hints): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_strip_predict_hints): ...new pass_data instance and... (make_pass_strip_predict_hints): ...new function. * recog.c (pass_peephole2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_peephole2): ...new pass_data instance and... (make_pass_peephole2): ...new function. (pass_split_all_insns): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_all_insns): ...new pass_data instance and... (make_pass_split_all_insns): ...new function. (pass_split_after_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_after_reload): ...new pass_data instance and... (make_pass_split_after_reload): ...new function. (pass_split_before_regstack): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_before_regstack): ...new pass_data instance and... (make_pass_split_before_regstack): ...new function. (pass_split_before_sched2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_before_sched2): ...new pass_data instance and... (make_pass_split_before_sched2): ...new function. (pass_split_for_shorten_branches): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_for_shorten_branches): ...new pass_data instance and... (make_pass_split_for_shorten_branches): ...new function. * ree.c (pass_ree): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_ree): ...new pass_data instance and... (make_pass_ree): ...new function. * reg-stack.c (pass_stack_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_regs): ...new pass_data instance and... (make_pass_stack_regs): ...new function. (pass_stack_regs_run): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_regs_run): ...new pass_data instance and... (make_pass_stack_regs_run): ...new function. * regcprop.c (pass_cprop_hardreg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cprop_hardreg): ...new pass_data instance and... (make_pass_cprop_hardreg): ...new function. * reginfo.c (pass_reginfo_init): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_reginfo_init): ...new pass_data instance and... (make_pass_reginfo_init): ...new function. * regmove.c (pass_regmove): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_regmove): ...new pass_data instance and... (make_pass_regmove): ...new function. * regrename.c (pass_regrename): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_regrename): ...new pass_data instance and... (make_pass_regrename): ...new function. * reorg.c (pass_delay_slots): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_delay_slots): ...new pass_data instance and... (make_pass_delay_slots): ...new function. (pass_machine_reorg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_machine_reorg): ...new pass_data instance and... (make_pass_machine_reorg): ...new function. * sched-rgn.c (pass_sched): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_sched): ...new pass_data instance and... (make_pass_sched): ...new function. (pass_sched2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_sched2): ...new pass_data instance and... (make_pass_sched2): ...new function. * stack-ptr-mod.c (pass_stack_ptr_mod): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_ptr_mod): ...new pass_data instance and... (make_pass_stack_ptr_mod): ...new function. * store-motion.c (pass_rtl_store_motion): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_store_motion): ...new pass_data instance and... (make_pass_rtl_store_motion): ...new function. * tracer.c (pass_tracer): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tracer): ...new pass_data instance and... (make_pass_tracer): ...new function. * trans-mem.c (pass_diagnose_tm_blocks): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_diagnose_tm_blocks): ...new pass_data instance and... (make_pass_diagnose_tm_blocks): ...new function. (pass_lower_tm): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_tm): ...new pass_data instance and... (make_pass_lower_tm): ...new function. (pass_tm_init): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_init): ...new pass_data instance and... (make_pass_tm_init): ...new function. (pass_tm_mark): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_mark): ...new pass_data instance and... (make_pass_tm_mark): ...new function. (pass_tm_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_edges): ...new pass_data instance and... (make_pass_tm_edges): ...new function. (pass_tm_memopt): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_memopt): ...new pass_data instance and... (make_pass_tm_memopt): ...new function. (pass_ipa_tm): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_tm): ...new pass_data instance and... (make_pass_ipa_tm): ...new function. * tree-call-cdce.c (pass_call_cdce): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_call_cdce): ...new pass_data instance and... (make_pass_call_cdce): ...new function. * tree-cfg.c (pass_build_cfg): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_cfg): ...new pass_data instance and... (make_pass_build_cfg): ...new function. (pass_split_crit_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_split_crit_edges): ...new pass_data instance and... (make_pass_split_crit_edges): ...new function. (pass_warn_function_return): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_function_return): ...new pass_data instance and... (make_pass_warn_function_return): ...new function. (pass_warn_function_noreturn): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_function_noreturn): ...new pass_data instance and... (make_pass_warn_function_noreturn): ...new function. (pass_warn_unused_result): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_unused_result): ...new pass_data instance and... (make_pass_warn_unused_result): ...new function. * tree-cfgcleanup.c (pass_merge_phi): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_merge_phi): ...new pass_data instance and... (make_pass_merge_phi): ...new function. * tree-complex.c (pass_lower_complex): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_complex): ...new pass_data instance and... (make_pass_lower_complex): ...new function. (pass_lower_complex_O0): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_complex_O0): ...new pass_data instance and... (make_pass_lower_complex_O0): ...new function. * tree-eh.c (pass_lower_eh): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_eh): ...new pass_data instance and... (make_pass_lower_eh): ...new function. (pass_refactor_eh): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_refactor_eh): ...new pass_data instance and... (make_pass_refactor_eh): ...new function. (pass_lower_resx): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_resx): ...new pass_data instance and... (make_pass_lower_resx): ...new function. (pass_lower_eh_dispatch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_eh_dispatch): ...new pass_data instance and... (make_pass_lower_eh_dispatch): ...new function. (pass_cleanup_eh): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cleanup_eh): ...new pass_data instance and... (make_pass_cleanup_eh): ...new function. * tree-emutls.c (pass_ipa_lower_emutls): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_lower_emutls): ...new pass_data instance and... (make_pass_ipa_lower_emutls): ...new function. * tree-if-conv.c (pass_if_conversion): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_if_conversion): ...new pass_data instance and... (make_pass_if_conversion): ...new function. * tree-into-ssa.c (pass_build_ssa): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_ssa): ...new pass_data instance and... (make_pass_build_ssa): ...new function. * tree-loop-distribution.c (pass_loop_distribution): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_loop_distribution): ...new pass_data instance and... (make_pass_loop_distribution): ...new function. * tree-mudflap.c (pass_mudflap_1): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_1): ...new pass_data instance and... (make_pass_mudflap_1): ...new function. (pass_mudflap_2): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_2): ...new pass_data instance and... (make_pass_mudflap_2): ...new function. * tree-nomudflap.c (pass_mudflap_1): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_1): ...new pass_data instance and... (make_pass_mudflap_1): ...new function. (pass_mudflap_2): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_2): ...new pass_data instance and... (make_pass_mudflap_2): ...new function. * tree-nrv.c (pass_nrv): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_nrv): ...new pass_data instance and... (make_pass_nrv): ...new function. (pass_return_slot): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_return_slot): ...new pass_data instance and... (make_pass_return_slot): ...new function. * tree-object-size.c (pass_object_sizes): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_object_sizes): ...new pass_data instance and... (make_pass_object_sizes): ...new function. * tree-optimize.c (pass_cleanup_cfg_post_optimizing): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cleanup_cfg_post_optimizing): ...new pass_data instance and... (make_pass_cleanup_cfg_post_optimizing): ...new function. (pass_fixup_cfg): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_fixup_cfg): ...new pass_data instance and... (make_pass_fixup_cfg): ...new function. * tree-pass.h (pass_mudflap_1): Replace declaration with that of... (make_pass_mudflap_1): ...new function. (pass_mudflap_2): Replace declaration with that of... (make_pass_mudflap_2): ...new function. (pass_asan): Replace declaration with that of... (make_pass_asan): ...new function. (pass_asan_O0): Replace declaration with that of... (make_pass_asan_O0): ...new function. (pass_tsan): Replace declaration with that of... (make_pass_tsan): ...new function. (pass_tsan_O0): Replace declaration with that of... (make_pass_tsan_O0): ...new function. (pass_lower_cf): Replace declaration with that of... (make_pass_lower_cf): ...new function. (pass_refactor_eh): Replace declaration with that of... (make_pass_refactor_eh): ...new function. (pass_lower_eh): Replace declaration with that of... (make_pass_lower_eh): ...new function. (pass_lower_eh_dispatch): Replace declaration with that of... (make_pass_lower_eh_dispatch): ...new function. (pass_lower_resx): Replace declaration with that of... (make_pass_lower_resx): ...new function. (pass_build_cfg): Replace declaration with that of... (make_pass_build_cfg): ...new function. (pass_early_tree_profile): Replace declaration with that of... (make_pass_early_tree_profile): ...new function. (pass_cleanup_eh): Replace declaration with that of... (make_pass_cleanup_eh): ...new function. (pass_sra): Replace declaration with that of... (make_pass_sra): ...new function. (pass_sra_early): Replace declaration with that of... (make_pass_sra_early): ...new function. (pass_early_ipa_sra): Replace declaration with that of... (make_pass_early_ipa_sra): ...new function. (pass_tail_recursion): Replace declaration with that of... (make_pass_tail_recursion): ...new function. (pass_tail_calls): Replace declaration with that of... (make_pass_tail_calls): ...new function. (pass_tree_loop): Replace declaration with that of... (make_pass_tree_loop): ...new function. (pass_tree_loop_init): Replace declaration with that of... (make_pass_tree_loop_init): ...new function. (pass_lim): Replace declaration with that of... (make_pass_lim): ...new function. (pass_tree_unswitch): Replace declaration with that of... (make_pass_tree_unswitch): ...new function. (pass_predcom): Replace declaration with that of... (make_pass_predcom): ...new function. (pass_iv_canon): Replace declaration with that of... (make_pass_iv_canon): ...new function. (pass_scev_cprop): Replace declaration with that of... (make_pass_scev_cprop): ...new function. (pass_empty_loop): Replace declaration with that of... (make_pass_empty_loop): ...new function. (pass_record_bounds): Replace declaration with that of... (make_pass_record_bounds): ...new function. (pass_graphite): Replace declaration with that of... (make_pass_graphite): ...new function. (pass_graphite_transforms): Replace declaration with that of... (make_pass_graphite_transforms): ...new function. (pass_if_conversion): Replace declaration with that of... (make_pass_if_conversion): ...new function. (pass_loop_distribution): Replace declaration with that of... (make_pass_loop_distribution): ...new function. (pass_vectorize): Replace declaration with that of... (make_pass_vectorize): ...new function. (pass_slp_vectorize): Replace declaration with that of... (make_pass_slp_vectorize): ...new function. (pass_complete_unroll): Replace declaration with that of... (make_pass_complete_unroll): ...new function. (pass_complete_unrolli): Replace declaration with that of... (make_pass_complete_unrolli): ...new function. (pass_parallelize_loops): Replace declaration with that of... (make_pass_parallelize_loops): ...new function. (pass_loop_prefetch): Replace declaration with that of... (make_pass_loop_prefetch): ...new function. (pass_iv_optimize): Replace declaration with that of... (make_pass_iv_optimize): ...new function. (pass_tree_loop_done): Replace declaration with that of... (make_pass_tree_loop_done): ...new function. (pass_ch): Replace declaration with that of... (make_pass_ch): ...new function. (pass_ccp): Replace declaration with that of... (make_pass_ccp): ...new function. (pass_phi_only_cprop): Replace declaration with that of... (make_pass_phi_only_cprop): ...new function. (pass_build_ssa): Replace declaration with that of... (make_pass_build_ssa): ...new function. (pass_build_alias): Replace declaration with that of... (make_pass_build_alias): ...new function. (pass_build_ealias): Replace declaration with that of... (make_pass_build_ealias): ...new function. (pass_dominator): Replace declaration with that of... (make_pass_dominator): ...new function. (pass_dce): Replace declaration with that of... (make_pass_dce): ...new function. (pass_dce_loop): Replace declaration with that of... (make_pass_dce_loop): ...new function. (pass_cd_dce): Replace declaration with that of... (make_pass_cd_dce): ...new function. (pass_call_cdce): Replace declaration with that of... (make_pass_call_cdce): ...new function. (pass_merge_phi): Replace declaration with that of... (make_pass_merge_phi): ...new function. (pass_split_crit_edges): Replace declaration with that of... (make_pass_split_crit_edges): ...new function. (pass_pre): Replace declaration with that of... (make_pass_pre): ...new function. (pass_profile): Replace declaration with that of... (make_pass_profile): ...new function. (pass_strip_predict_hints): Replace declaration with that of... (make_pass_strip_predict_hints): ...new function. (pass_lower_complex_O0): Replace declaration with that of... (make_pass_lower_complex_O0): ...new function. (pass_lower_complex): Replace declaration with that of... (make_pass_lower_complex): ...new function. (pass_lower_vector): Replace declaration with that of... (make_pass_lower_vector): ...new function. (pass_lower_vector_ssa): Replace declaration with that of... (make_pass_lower_vector_ssa): ...new function. (pass_lower_omp): Replace declaration with that of... (make_pass_lower_omp): ...new function. (pass_diagnose_omp_blocks): Replace declaration with that of... (make_pass_diagnose_omp_blocks): ...new function. (pass_expand_omp): Replace declaration with that of... (make_pass_expand_omp): ...new function. (pass_expand_omp_ssa): Replace declaration with that of... (make_pass_expand_omp_ssa): ...new function. (pass_object_sizes): Replace declaration with that of... (make_pass_object_sizes): ...new function. (pass_strlen): Replace declaration with that of... (make_pass_strlen): ...new function. (pass_fold_builtins): Replace declaration with that of... (make_pass_fold_builtins): ...new function. (pass_stdarg): Replace declaration with that of... (make_pass_stdarg): ...new function. (pass_early_warn_uninitialized): Replace declaration with that of... (make_pass_early_warn_uninitialized): ...new function. (pass_late_warn_uninitialized): Replace declaration with that of... (make_pass_late_warn_uninitialized): ...new function. (pass_cse_reciprocals): Replace declaration with that of... (make_pass_cse_reciprocals): ...new function. (pass_cse_sincos): Replace declaration with that of... (make_pass_cse_sincos): ...new function. (pass_optimize_bswap): Replace declaration with that of... (make_pass_optimize_bswap): ...new function. (pass_optimize_widening_mul): Replace declaration with that of... (make_pass_optimize_widening_mul): ...new function. (pass_warn_function_return): Replace declaration with that of... (make_pass_warn_function_return): ...new function. (pass_warn_function_noreturn): Replace declaration with that of... (make_pass_warn_function_noreturn): ...new function. (pass_cselim): Replace declaration with that of... (make_pass_cselim): ...new function. (pass_phiopt): Replace declaration with that of... (make_pass_phiopt): ...new function. (pass_forwprop): Replace declaration with that of... (make_pass_forwprop): ...new function. (pass_phiprop): Replace declaration with that of... (make_pass_phiprop): ...new function. (pass_tree_ifcombine): Replace declaration with that of... (make_pass_tree_ifcombine): ...new function. (pass_dse): Replace declaration with that of... (make_pass_dse): ...new function. (pass_nrv): Replace declaration with that of... (make_pass_nrv): ...new function. (pass_rename_ssa_copies): Replace declaration with that of... (make_pass_rename_ssa_copies): ...new function. (pass_sink_code): Replace declaration with that of... (make_pass_sink_code): ...new function. (pass_fre): Replace declaration with that of... (make_pass_fre): ...new function. (pass_check_data_deps): Replace declaration with that of... (make_pass_check_data_deps): ...new function. (pass_copy_prop): Replace declaration with that of... (make_pass_copy_prop): ...new function. (pass_vrp): Replace declaration with that of... (make_pass_vrp): ...new function. (pass_uncprop): Replace declaration with that of... (make_pass_uncprop): ...new function. (pass_return_slot): Replace declaration with that of... (make_pass_return_slot): ...new function. (pass_reassoc): Replace declaration with that of... (make_pass_reassoc): ...new function. (pass_rebuild_cgraph_edges): Replace declaration with that of... (make_pass_rebuild_cgraph_edges): ...new function. (pass_remove_cgraph_callee_edges): Replace declaration with that of... (make_pass_remove_cgraph_callee_edges): ...new function. (pass_build_cgraph_edges): Replace declaration with that of... (make_pass_build_cgraph_edges): ...new function. (pass_local_pure_const): Replace declaration with that of... (make_pass_local_pure_const): ...new function. (pass_tracer): Replace declaration with that of... (make_pass_tracer): ...new function. (pass_warn_unused_result): Replace declaration with that of... (make_pass_warn_unused_result): ...new function. (pass_diagnose_tm_blocks): Replace declaration with that of... (make_pass_diagnose_tm_blocks): ...new function. (pass_lower_tm): Replace declaration with that of... (make_pass_lower_tm): ...new function. (pass_tm_init): Replace declaration with that of... (make_pass_tm_init): ...new function. (pass_tm_mark): Replace declaration with that of... (make_pass_tm_mark): ...new function. (pass_tm_memopt): Replace declaration with that of... (make_pass_tm_memopt): ...new function. (pass_tm_edges): Replace declaration with that of... (make_pass_tm_edges): ...new function. (pass_split_functions): Replace declaration with that of... (make_pass_split_functions): ...new function. (pass_feedback_split_functions): Replace declaration with that of... (make_pass_feedback_split_functions): ...new function. (pass_strength_reduction): Replace declaration with that of... (make_pass_strength_reduction): ...new function. (pass_ipa_lower_emutls): Replace declaration with that of... (make_pass_ipa_lower_emutls): ...new function. (pass_ipa_function_and_variable_visibility): Replace declaration with that of... (make_pass_ipa_function_and_variable_visibility): ...new function. (pass_ipa_tree_profile): Replace declaration with that of... (make_pass_ipa_tree_profile): ...new function. (pass_early_local_passes): Replace declaration with that of... (make_pass_early_local_passes): ...new function. (pass_ipa_whole_program_visibility): Replace declaration with that of... (make_pass_ipa_whole_program_visibility): ...new function. (pass_ipa_lto_gimple_out): Replace declaration with that of... (make_pass_ipa_lto_gimple_out): ...new function. (pass_ipa_increase_alignment): Replace declaration with that of... (make_pass_ipa_increase_alignment): ...new function. (pass_ipa_inline): Replace declaration with that of... (make_pass_ipa_inline): ...new function. (pass_ipa_free_lang_data): Replace declaration with that of... (make_pass_ipa_free_lang_data): ...new function. (pass_ipa_free_inline_summary): Replace declaration with that of... (make_pass_ipa_free_inline_summary): ...new function. (pass_ipa_cp): Replace declaration with that of... (make_pass_ipa_cp): ...new function. (pass_ipa_reference): Replace declaration with that of... (make_pass_ipa_reference): ...new function. (pass_ipa_pure_const): Replace declaration with that of... (make_pass_ipa_pure_const): ...new function. (pass_ipa_pta): Replace declaration with that of... (make_pass_ipa_pta): ...new function. (pass_ipa_lto_finish_out): Replace declaration with that of... (make_pass_ipa_lto_finish_out): ...new function. (pass_ipa_tm): Replace declaration with that of... (make_pass_ipa_tm): ...new function. (pass_ipa_profile): Replace declaration with that of... (make_pass_ipa_profile): ...new function. (pass_ipa_cdtor_merge): Replace declaration with that of... (make_pass_ipa_cdtor_merge): ...new function. (pass_cleanup_cfg_post_optimizing): Replace declaration with that of... (make_pass_cleanup_cfg_post_optimizing): ...new function. (pass_init_datastructures): Replace declaration with that of... (make_pass_init_datastructures): ...new function. (pass_fixup_cfg): Replace declaration with that of... (make_pass_fixup_cfg): ...new function. (pass_expand): Replace declaration with that of... (make_pass_expand): ...new function. (pass_instantiate_virtual_regs): Replace declaration with that of... (make_pass_instantiate_virtual_regs): ...new function. (pass_rtl_fwprop): Replace declaration with that of... (make_pass_rtl_fwprop): ...new function. (pass_rtl_fwprop_addr): Replace declaration with that of... (make_pass_rtl_fwprop_addr): ...new function. (pass_jump): Replace declaration with that of... (make_pass_jump): ...new function. (pass_jump2): Replace declaration with that of... (make_pass_jump2): ...new function. (pass_lower_subreg): Replace declaration with that of... (make_pass_lower_subreg): ...new function. (pass_cse): Replace declaration with that of... (make_pass_cse): ...new function. (pass_fast_rtl_dce): Replace declaration with that of... (make_pass_fast_rtl_dce): ...new function. (pass_ud_rtl_dce): Replace declaration with that of... (make_pass_ud_rtl_dce): ...new function. (pass_rtl_dce): Replace declaration with that of... (make_pass_rtl_dce): ...new function. (pass_rtl_dse1): Replace declaration with that of... (make_pass_rtl_dse1): ...new function. (pass_rtl_dse2): Replace declaration with that of... (make_pass_rtl_dse2): ...new function. (pass_rtl_dse3): Replace declaration with that of... (make_pass_rtl_dse3): ...new function. (pass_rtl_cprop): Replace declaration with that of... (make_pass_rtl_cprop): ...new function. (pass_rtl_pre): Replace declaration with that of... (make_pass_rtl_pre): ...new function. (pass_rtl_hoist): Replace declaration with that of... (make_pass_rtl_hoist): ...new function. (pass_rtl_store_motion): Replace declaration with that of... (make_pass_rtl_store_motion): ...new function. (pass_cse_after_global_opts): Replace declaration with that of... (make_pass_cse_after_global_opts): ...new function. (pass_rtl_ifcvt): Replace declaration with that of... (make_pass_rtl_ifcvt): ...new function. (pass_into_cfg_layout_mode): Replace declaration with that of... (make_pass_into_cfg_layout_mode): ...new function. (pass_outof_cfg_layout_mode): Replace declaration with that of... (make_pass_outof_cfg_layout_mode): ...new function. (pass_loop2): Replace declaration with that of... (make_pass_loop2): ...new function. (pass_rtl_loop_init): Replace declaration with that of... (make_pass_rtl_loop_init): ...new function. (pass_rtl_move_loop_invariants): Replace declaration with that of... (make_pass_rtl_move_loop_invariants): ...new function. (pass_rtl_unswitch): Replace declaration with that of... (make_pass_rtl_unswitch): ...new function. (pass_rtl_unroll_and_peel_loops): Replace declaration with that of... (make_pass_rtl_unroll_and_peel_loops): ...new function. (pass_rtl_doloop): Replace declaration with that of... (make_pass_rtl_doloop): ...new function. (pass_rtl_loop_done): Replace declaration with that of... (make_pass_rtl_loop_done): ...new function. (pass_web): Replace declaration with that of... (make_pass_web): ...new function. (pass_cse2): Replace declaration with that of... (make_pass_cse2): ...new function. (pass_df_initialize_opt): Replace declaration with that of... (make_pass_df_initialize_opt): ...new function. (pass_df_initialize_no_opt): Replace declaration with that of... (make_pass_df_initialize_no_opt): ...new function. (pass_reginfo_init): Replace declaration with that of... (make_pass_reginfo_init): ...new function. (pass_inc_dec): Replace declaration with that of... (make_pass_inc_dec): ...new function. (pass_stack_ptr_mod): Replace declaration with that of... (make_pass_stack_ptr_mod): ...new function. (pass_initialize_regs): Replace declaration with that of... (make_pass_initialize_regs): ...new function. (pass_combine): Replace declaration with that of... (make_pass_combine): ...new function. (pass_if_after_combine): Replace declaration with that of... (make_pass_if_after_combine): ...new function. (pass_ree): Replace declaration with that of... (make_pass_ree): ...new function. (pass_partition_blocks): Replace declaration with that of... (make_pass_partition_blocks): ...new function. (pass_match_asm_constraints): Replace declaration with that of... (make_pass_match_asm_constraints): ...new function. (pass_regmove): Replace declaration with that of... (make_pass_regmove): ...new function. (pass_split_all_insns): Replace declaration with that of... (make_pass_split_all_insns): ...new function. (pass_fast_rtl_byte_dce): Replace declaration with that of... (make_pass_fast_rtl_byte_dce): ...new function. (pass_lower_subreg2): Replace declaration with that of... (make_pass_lower_subreg2): ...new function. (pass_mode_switching): Replace declaration with that of... (make_pass_mode_switching): ...new function. (pass_sms): Replace declaration with that of... (make_pass_sms): ...new function. (pass_sched): Replace declaration with that of... (make_pass_sched): ...new function. (pass_ira): Replace declaration with that of... (make_pass_ira): ...new function. (pass_reload): Replace declaration with that of... (make_pass_reload): ...new function. (pass_clean_state): Replace declaration with that of... (make_pass_clean_state): ...new function. (pass_branch_prob): Replace declaration with that of... (make_pass_branch_prob): ...new function. (pass_value_profile_transformations): Replace declaration with that of... (make_pass_value_profile_transformations): ...new function. (pass_postreload_cse): Replace declaration with that of... (make_pass_postreload_cse): ...new function. (pass_gcse2): Replace declaration with that of... (make_pass_gcse2): ...new function. (pass_split_after_reload): Replace declaration with that of... (make_pass_split_after_reload): ...new function. (pass_branch_target_load_optimize1): Replace declaration with that of... (make_pass_branch_target_load_optimize1): ...new function. (pass_thread_prologue_and_epilogue): Replace declaration with that of... (make_pass_thread_prologue_and_epilogue): ...new function. (pass_stack_adjustments): Replace declaration with that of... (make_pass_stack_adjustments): ...new function. (pass_peephole2): Replace declaration with that of... (make_pass_peephole2): ...new function. (pass_if_after_reload): Replace declaration with that of... (make_pass_if_after_reload): ...new function. (pass_regrename): Replace declaration with that of... (make_pass_regrename): ...new function. (pass_cprop_hardreg): Replace declaration with that of... (make_pass_cprop_hardreg): ...new function. (pass_reorder_blocks): Replace declaration with that of... (make_pass_reorder_blocks): ...new function. (pass_branch_target_load_optimize2): Replace declaration with that of... (make_pass_branch_target_load_optimize2): ...new function. (pass_leaf_regs): Replace declaration with that of... (make_pass_leaf_regs): ...new function. (pass_split_before_sched2): Replace declaration with that of... (make_pass_split_before_sched2): ...new function. (pass_compare_elim_after_reload): Replace declaration with that of... (make_pass_compare_elim_after_reload): ...new function. (pass_sched2): Replace declaration with that of... (make_pass_sched2): ...new function. (pass_stack_regs): Replace declaration with that of... (make_pass_stack_regs): ...new function. (pass_stack_regs_run): Replace declaration with that of... (make_pass_stack_regs_run): ...new function. (pass_df_finish): Replace declaration with that of... (make_pass_df_finish): ...new function. (pass_compute_alignments): Replace declaration with that of... (make_pass_compute_alignments): ...new function. (pass_duplicate_computed_gotos): Replace declaration with that of... (make_pass_duplicate_computed_gotos): ...new function. (pass_variable_tracking): Replace declaration with that of... (make_pass_variable_tracking): ...new function. (pass_free_cfg): Replace declaration with that of... (make_pass_free_cfg): ...new function. (pass_machine_reorg): Replace declaration with that of... (make_pass_machine_reorg): ...new function. (pass_cleanup_barriers): Replace declaration with that of... (make_pass_cleanup_barriers): ...new function. (pass_delay_slots): Replace declaration with that of... (make_pass_delay_slots): ...new function. (pass_split_for_shorten_branches): Replace declaration with that of... (make_pass_split_for_shorten_branches): ...new function. (pass_split_before_regstack): Replace declaration with that of... (make_pass_split_before_regstack): ...new function. (pass_convert_to_eh_region_ranges): Replace declaration with that of... (make_pass_convert_to_eh_region_ranges): ...new function. (pass_shorten_branches): Replace declaration with that of... (make_pass_shorten_branches): ...new function. (pass_set_nothrow_function_flags): Replace declaration with that of... (make_pass_set_nothrow_function_flags): ...new function. (pass_dwarf2_frame): Replace declaration with that of... (make_pass_dwarf2_frame): ...new function. (pass_final): Replace declaration with that of... (make_pass_final): ...new function. (pass_rtl_seqabstr): Replace declaration with that of... (make_pass_rtl_seqabstr): ...new function. (pass_release_ssa_names): Replace declaration with that of... (make_pass_release_ssa_names): ...new function. (pass_early_inline): Replace declaration with that of... (make_pass_early_inline): ...new function. (pass_inline_parameters): Replace declaration with that of... (make_pass_inline_parameters): ...new function. (pass_update_address_taken): Replace declaration with that of... (make_pass_update_address_taken): ...new function. (pass_convert_switch): Replace declaration with that of... (make_pass_convert_switch): ...new function. * tree-profile.c (pass_ipa_tree_profile): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_tree_profile): ...new pass_data instance and... (make_pass_ipa_tree_profile): ...new function. * tree-sra.c (pass_sra_early): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_sra_early): ...new pass_data instance and... (make_pass_sra_early): ...new function. (pass_sra): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_sra): ...new pass_data instance and... (make_pass_sra): ...new function. (pass_early_ipa_sra): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_early_ipa_sra): ...new pass_data instance and... (make_pass_early_ipa_sra): ...new function. * tree-ssa-ccp.c (pass_ccp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_ccp): ...new pass_data instance and... (make_pass_ccp): ...new function. (pass_fold_builtins): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_fold_builtins): ...new pass_data instance and... (make_pass_fold_builtins): ...new function. * tree-ssa-copy.c (pass_copy_prop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_copy_prop): ...new pass_data instance and... (make_pass_copy_prop): ...new function. * tree-ssa-copyrename.c (pass_rename_ssa_copies): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_rename_ssa_copies): ...new pass_data instance and... (make_pass_rename_ssa_copies): ...new function. * tree-ssa-dce.c (pass_dce): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dce): ...new pass_data instance and... (make_pass_dce): ...new function. (pass_dce_loop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dce_loop): ...new pass_data instance and... (make_pass_dce_loop): ...new function. (pass_cd_dce): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cd_dce): ...new pass_data instance and... (make_pass_cd_dce): ...new function. * tree-ssa-dom.c (pass_dominator): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dominator): ...new pass_data instance and... (make_pass_dominator): ...new function. (pass_phi_only_cprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_phi_only_cprop): ...new pass_data instance and... (make_pass_phi_only_cprop): ...new function. * tree-ssa-dse.c (pass_dse): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dse): ...new pass_data instance and... (make_pass_dse): ...new function. * tree-ssa-forwprop.c (pass_forwprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_forwprop): ...new pass_data instance and... (make_pass_forwprop): ...new function. * tree-ssa-ifcombine.c (pass_tree_ifcombine): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_ifcombine): ...new pass_data instance and... (make_pass_tree_ifcombine): ...new function. * tree-ssa-loop-ch.c (pass_ch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_ch): ...new pass_data instance and... (make_pass_ch): ...new function. * tree-ssa-loop.c (pass_tree_loop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_loop): ...new pass_data instance and... (make_pass_tree_loop): ...new function. (pass_tree_loop_init): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_loop_init): ...new pass_data instance and... (make_pass_tree_loop_init): ...new function. (pass_lim): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lim): ...new pass_data instance and... (make_pass_lim): ...new function. (pass_tree_unswitch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_unswitch): ...new pass_data instance and... (make_pass_tree_unswitch): ...new function. (pass_predcom): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_predcom): ...new pass_data instance and... (make_pass_predcom): ...new function. (pass_vectorize): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_vectorize): ...new pass_data instance and... (make_pass_vectorize): ...new function. (pass_graphite): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_graphite): ...new pass_data instance and... (make_pass_graphite): ...new function. (pass_graphite_transforms): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_graphite_transforms): ...new pass_data instance and... (make_pass_graphite_transforms): ...new function. (pass_check_data_deps): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_check_data_deps): ...new pass_data instance and... (make_pass_check_data_deps): ...new function. (pass_iv_canon): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_iv_canon): ...new pass_data instance and... (make_pass_iv_canon): ...new function. (pass_scev_cprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_scev_cprop): ...new pass_data instance and... (make_pass_scev_cprop): ...new function. (pass_record_bounds): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_record_bounds): ...new pass_data instance and... (make_pass_record_bounds): ...new function. (pass_complete_unroll): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_complete_unroll): ...new pass_data instance and... (make_pass_complete_unroll): ...new function. (pass_complete_unrolli): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_complete_unrolli): ...new pass_data instance and... (make_pass_complete_unrolli): ...new function. (pass_parallelize_loops): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_parallelize_loops): ...new pass_data instance and... (make_pass_parallelize_loops): ...new function. (pass_loop_prefetch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_loop_prefetch): ...new pass_data instance and... (make_pass_loop_prefetch): ...new function. (pass_iv_optimize): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_iv_optimize): ...new pass_data instance and... (make_pass_iv_optimize): ...new function. (pass_tree_loop_done): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_loop_done): ...new pass_data instance and... (make_pass_tree_loop_done): ...new function. * tree-ssa-math-opts.c (pass_cse_reciprocals): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cse_reciprocals): ...new pass_data instance and... (make_pass_cse_reciprocals): ...new function. (pass_cse_sincos): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cse_sincos): ...new pass_data instance and... (make_pass_cse_sincos): ...new function. (pass_optimize_bswap): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_optimize_bswap): ...new pass_data instance and... (make_pass_optimize_bswap): ...new function. (pass_optimize_widening_mul): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_optimize_widening_mul): ...new pass_data instance and... (make_pass_optimize_widening_mul): ...new function. * tree-ssa-phiopt.c (pass_phiopt): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_phiopt): ...new pass_data instance and... (make_pass_phiopt): ...new function. (pass_cselim): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cselim): ...new pass_data instance and... (make_pass_cselim): ...new function. * tree-ssa-phiprop.c (pass_phiprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_phiprop): ...new pass_data instance and... (make_pass_phiprop): ...new function. * tree-ssa-pre.c (pass_pre): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_pre): ...new pass_data instance and... (make_pass_pre): ...new function. (pass_fre): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_fre): ...new pass_data instance and... (make_pass_fre): ...new function. * tree-ssa-reassoc.c (pass_reassoc): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_reassoc): ...new pass_data instance and... (make_pass_reassoc): ...new function. * tree-ssa-sink.c (pass_sink_code): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_sink_code): ...new pass_data instance and... (make_pass_sink_code): ...new function. * tree-ssa-strlen.c (pass_strlen): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_strlen): ...new pass_data instance and... (make_pass_strlen): ...new function. * tree-ssa-structalias.c (pass_build_alias): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_alias): ...new pass_data instance and... (make_pass_build_alias): ...new function. (pass_build_ealias): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_ealias): ...new pass_data instance and... (make_pass_build_ealias): ...new function. (pass_ipa_pta): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_pta): ...new pass_data instance and... (make_pass_ipa_pta): ...new function. * tree-ssa-uncprop.c (pass_uncprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_uncprop): ...new pass_data instance and... (make_pass_uncprop): ...new function. * tree-ssa-uninit.c (pass_late_warn_uninitialized): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_late_warn_uninitialized): ...new pass_data instance and... (make_pass_late_warn_uninitialized): ...new function. * tree-ssa.c (pass_init_datastructures): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_init_datastructures): ...new pass_data instance and... (make_pass_init_datastructures): ...new function. (pass_early_warn_uninitialized): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_early_warn_uninitialized): ...new pass_data instance and... (make_pass_early_warn_uninitialized): ...new function. (pass_update_address_taken): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_update_address_taken): ...new pass_data instance and... (make_pass_update_address_taken): ...new function. * tree-ssanames.c (pass_release_ssa_names): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_release_ssa_names): ...new pass_data instance and... (make_pass_release_ssa_names): ...new function. * tree-stdarg.c (pass_stdarg): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_stdarg): ...new pass_data instance and... (make_pass_stdarg): ...new function. * tree-switch-conversion.c (pass_convert_switch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_convert_switch): ...new pass_data instance and... (make_pass_convert_switch): ...new function. * tree-tailcall.c (pass_tail_recursion): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tail_recursion): ...new pass_data instance and... (make_pass_tail_recursion): ...new function. (pass_tail_calls): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tail_calls): ...new pass_data instance and... (make_pass_tail_calls): ...new function. * tree-vect-generic.c (pass_lower_vector): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_vector): ...new pass_data instance and... (make_pass_lower_vector): ...new function. (pass_lower_vector_ssa): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_vector_ssa): ...new pass_data instance and... (make_pass_lower_vector_ssa): ...new function. * tree-vectorizer.c (pass_slp_vectorize): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_slp_vectorize): ...new pass_data instance and... (make_pass_slp_vectorize): ...new function. (pass_ipa_increase_alignment): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_increase_alignment): ...new pass_data instance and... (make_pass_ipa_increase_alignment): ...new function. * tree-vrp.c (pass_vrp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_vrp): ...new pass_data instance and... (make_pass_vrp): ...new function. * tree.c (pass_ipa_free_lang_data): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_free_lang_data): ...new pass_data instance and... (make_pass_ipa_free_lang_data): ...new function. * tsan.c (pass_tsan): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tsan): ...new pass_data instance and... (make_pass_tsan): ...new function. (pass_tsan_O0): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tsan_O0): ...new pass_data instance and... (make_pass_tsan_O0): ...new function. * var-tracking.c (pass_variable_tracking): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_variable_tracking): ...new pass_data instance and... (make_pass_variable_tracking): ...new function. * web.c (pass_web): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_web): ...new pass_data instance and... (make_pass_web): ...new function. * config/epiphany/epiphany.h (pass_mode_switch_use): Replace declaration with that of... (make_pass_mode_switch_use): ...new function. (pass_resolve_sw_modes): Replace declaration with that of... (make_pass_resolve_sw_modes): ...new function. * config/epiphany/mode-switch-use.c (pass_mode_switch_use): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_mode_switch_use): ...new pass_data instance and... (make_pass_mode_switch_use): ...new function. * config/epiphany/resolve-sw-modes.c (pass_resolve_sw_modes): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_resolve_sw_modes): ...new pass_data instance and... (make_pass_resolve_sw_modes): ...new function. * config/i386/i386.c (pass_insert_vzeroupper): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_insert_vzeroupper): ...new pass_data instance and... (make_pass_insert_vzeroupper): ...new function. * config/sparc/sparc.c (pass_work_around_errata): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_work_around_errata): ...new pass_data instance and... (make_pass_work_around_errata): ...new function. * config/mips/mips.c (pass_mips_machine_reorg2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_mips_machine_reorg2): ...new pass_data instance and... (make_pass_mips_machine_reorg2): ...new function. gcc/testsuite/ Patch autogenerated by refactor_passes.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 03fe39476a4c4ea450b49e087cfa817b5f92021e * gcc.dg/plugin/one_time_plugin.c (one_pass): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_one_pass): ...new pass_data instance and... (make_one_pass): ...new function. * gcc.dg/plugin/selfassign.c (pass_warn_self_assign): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_self_assign): ...new pass_data instance and... (make_pass_warn_self_assign): ...new function. * g++.dg/plugin/dumb_plugin.c (pass_dumb_plugin_example): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dumb_plugin_example): ...new pass_data instance and... (make_pass_dumb_plugin_example): ...new function. * g++.dg/plugin/selfassign.c (pass_warn_self_assign): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_self_assign): ...new pass_data instance and... (make_pass_warn_self_assign): ...new function. From-SVN: r201508
2013-08-05 22:16:05 +02:00
{}
/* opt_pass methods: */
pass current function to opt_pass::gate () gcc/ * passes.c (opt_pass::gate): Take function * argument. (gate_all_early_local_passes): Merge into (early_local_passes::gate): this. (gate_all_early_optimizations): Merge into (all_early_optimizations::gate): this. (gate_all_optimizations): Mege into (all_optimizations::gate): this. (gate_all_optimizations_g): Merge into (all_optimizations_g::gate): this. (gate_rest_of_compilation): Mege into (rest_of_compilation::gate): this. (gate_postreload): Merge into (postreload::gate): this. (dump_one_pass): Pass cfun to the pass's gate method. (execute_ipa_summary_passes): Likewise. (execute_one_pass): Likewise. (ipa_write_summaries_2): Likewise. (ipa_write_optimization_summaries_1): Likewise. (ipa_read_summaries_1): Likewise. (ipa_read_optimization_summaries_1): Likewise. (execute_ipa_stmt_fixups): Likewise. * tree-pass.h (opt_pass::gate): Add function * argument. * asan.c, auto-inc-dec.c, bb-reorder.c, bt-load.c, combine-stack-adj.c, combine.c, compare-elim.c, config/epiphany/resolve-sw-modes.c, config/i386/i386.c, config/rl78/rl78.c, config/sh/sh_optimize_sett_clrt.cc, config/sh/sh_treg_combine.cc, config/sparc/sparc.c, cprop.c, cse.c, dce.c, df-core.c, dse.c, dwarf2cfi.c, except.c, fwprop.c, gcse.c, gimple-ssa-isolate-paths.c, gimple-ssa-strength-reduction.c, graphite.c, ifcvt.c, init-regs.c, ipa-cp.c, ipa-devirt.c, ipa-profile.c, ipa-pure-const.c, ipa-reference.c, ipa-split.c, ipa.c, loop-init.c, lower-subreg.c, mode-switching.c, modulo-sched.c, omp-low.c, postreload-gcse.c, postreload.c, predict.c, recog.c, ree.c, reg-stack.c, regcprop.c, regrename.c, reorg.c, sched-rgn.c, store-motion.c, tracer.c, trans-mem.c, tree-call-cdce.c, tree-cfg.c, tree-cfgcleanup.c, tree-complex.c, tree-eh.c, tree-emutls.c, tree-if-conv.c, tree-into-ssa.c, tree-loop-distribution.c, tree-nrv.c, tree-parloops.c, tree-predcom.c, tree-profile.c, tree-sra.c, tree-ssa-ccp.c, tree-ssa-copy.c, tree-ssa-copyrename.c, tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c, tree-ssa-ifcombine.c, tree-ssa-loop-ch.c, tree-ssa-loop-im.c, tree-ssa-loop-ivcanon.c, tree-ssa-loop-prefetch.c, tree-ssa-loop-unswitch.c, tree-ssa-loop.c, tree-ssa-math-opts.c, tree-ssa-phiopt.c, tree-ssa-phiprop.c, tree-ssa-pre.c, tree-ssa-reassoc.c, tree-ssa-sink.c, tree-ssa-strlen.c, tree-ssa-structalias.c, tree-ssa-uncprop.c, tree-ssa-uninit.c, tree-ssa.c, tree-stdarg.c, tree-switch-conversion.c, tree-tailcall.c, tree-vect-generic.c, tree-vectorizer.c, tree-vrp.c, tsan.c, ubsan.c, var-tracking.c, vtable-verify.c, web.c: Adjust. gcc/testsuite/ * g++.dg/plugin/dumb_plugin.c, g++.dg/plugin/selfasign.c, gcc.dg/plugin/one_time_plugin.c, gcc.dg/plugin/selfasign.c: Adjust. From-SVN: r209481
2014-04-17 14:37:16 +02:00
virtual bool gate (function *)
{
return (optimize > 0 && flag_modulo_sched);
}
pass cfun to pass::execute gcc/ * passes.c (opt_pass::execute): Adjust. (pass_manager::execute_pass_mode_switching): Likewise. (early_local_passes::execute): Likewise. (execute_one_pass): Pass cfun to the pass's execute method. * tree-pass.h (opt_pass::execute): Add function * argument. * asan.c, auto-inc-dec.c, bb-reorder.c, bt-load.c, cfgcleanup.c, cfgexpand.c, cfgrtl.c, cgraphbuild.c, combine-stack-adj.c, combine.c, compare-elim.c, config/arc/arc.c, config/epiphany/mode-switch-use.c, config/epiphany/resolve-sw-modes.c, config/i386/i386.c, config/mips/mips.c, config/rl78/rl78.c, config/s390/s390.c, config/sparc/sparc.c, cprop.c, dce.c, df-core.c, dse.c, dwarf2cfi.c, except.c, final.c, function.c, fwprop.c, gcse.c, gimple-low.c, gimple-ssa-isolate-paths.c, gimple-ssa-strength-reduction.c, graphite.c, ifcvt.c, init-regs.c, ipa-cp.c, ipa-devirt.c, ipa-inline-analysis.c, ipa-inline.c, ipa-profile.c, ipa-pure-const.c, ipa-reference.c, ipa-split.c, ipa.c, ira.c, jump.c, loop-init.c, lower-subreg.c, mode-switching.c, omp-low.c, postreload-gcse.c, postreload.c, predict.c, recog.c, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, reorg.c, sched-rgn.c, stack-ptr-mod.c, store-motion.c, tracer.c, trans-mem.c, tree-call-cdce.c, tree-cfg.c, tree-cfgcleanup.c, tree-complex.c, tree-eh.c, tree-emutls.c, tree-if-conv.c, tree-into-ssa.c, tree-loop-distribution.c, tree-nrv.c, tree-object-size.c, tree-parloops.c, tree-predcom.c, tree-ssa-ccp.c, tree-ssa-copy.c, tree-ssa-copyrename.c, tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c, tree-ssa-ifcombine.c, tree-ssa-loop-ch.c, tree-ssa-loop-im.c, tree-ssa-loop-ivcanon.c, tree-ssa-loop-prefetch.c, tree-ssa-loop-unswitch.c, tree-ssa-loop.c, tree-ssa-math-opts.c, tree-ssa-phiopt.c, tree-ssa-phiprop.c, tree-ssa-pre.c, tree-ssa-reassoc.c, tree-ssa-sink.c, tree-ssa-strlen.c, tree-ssa-structalias.c, tree-ssa-uncprop.c, tree-ssa-uninit.c, tree-ssa.c, tree-ssanames.c, tree-stdarg.c, tree-switch-conversion.c, tree-tailcall.c, tree-vect-generic.c, tree-vectorizer.c, tree-vrp.c, tree.c, tsan.c, ubsan.c, var-tracking.c, vtable-verify.c, web.c: Adjust. From-SVN: r209482
2014-04-17 14:37:34 +02:00
virtual unsigned int execute (function *);
Automated conversion of passes to C++ classes gcc/ Patch autogenerated by refactor_passes.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 03fe39476a4c4ea450b49e087cfa817b5f92021e * asan.c (pass_asan): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_asan): ...new pass_data instance and... (make_pass_asan): ...new function. (pass_asan_O0): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_asan_O0): ...new pass_data instance and... (make_pass_asan_O0): ...new function. * auto-inc-dec.c (pass_inc_dec): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_inc_dec): ...new pass_data instance and... (make_pass_inc_dec): ...new function. * bb-reorder.c (pass_reorder_blocks): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_reorder_blocks): ...new pass_data instance and... (make_pass_reorder_blocks): ...new function. (pass_duplicate_computed_gotos): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_duplicate_computed_gotos): ...new pass_data instance and... (make_pass_duplicate_computed_gotos): ...new function. (pass_partition_blocks): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_partition_blocks): ...new pass_data instance and... (make_pass_partition_blocks): ...new function. * bt-load.c (pass_branch_target_load_optimize1): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_branch_target_load_optimize1): ...new pass_data instance and... (make_pass_branch_target_load_optimize1): ...new function. (pass_branch_target_load_optimize2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_branch_target_load_optimize2): ...new pass_data instance and... (make_pass_branch_target_load_optimize2): ...new function. * cfgcleanup.c (pass_jump): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_jump): ...new pass_data instance and... (make_pass_jump): ...new function. (pass_jump2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_jump2): ...new pass_data instance and... (make_pass_jump2): ...new function. * cfgexpand.c (pass_expand): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_expand): ...new pass_data instance and... (make_pass_expand): ...new function. * cfgrtl.c (pass_free_cfg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_free_cfg): ...new pass_data instance and... (make_pass_free_cfg): ...new function. (pass_into_cfg_layout_mode): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_into_cfg_layout_mode): ...new pass_data instance and... (make_pass_into_cfg_layout_mode): ...new function. (pass_outof_cfg_layout_mode): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_outof_cfg_layout_mode): ...new pass_data instance and... (make_pass_outof_cfg_layout_mode): ...new function. * cgraphbuild.c (pass_build_cgraph_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_cgraph_edges): ...new pass_data instance and... (make_pass_build_cgraph_edges): ...new function. (pass_rebuild_cgraph_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_rebuild_cgraph_edges): ...new pass_data instance and... (make_pass_rebuild_cgraph_edges): ...new function. (pass_remove_cgraph_callee_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_remove_cgraph_callee_edges): ...new pass_data instance and... (make_pass_remove_cgraph_callee_edges): ...new function. * combine-stack-adj.c (pass_stack_adjustments): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_adjustments): ...new pass_data instance and... (make_pass_stack_adjustments): ...new function. * combine.c (pass_combine): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_combine): ...new pass_data instance and... (make_pass_combine): ...new function. * compare-elim.c (pass_compare_elim_after_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_compare_elim_after_reload): ...new pass_data instance and... (make_pass_compare_elim_after_reload): ...new function. * cprop.c (pass_rtl_cprop): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_cprop): ...new pass_data instance and... (make_pass_rtl_cprop): ...new function. * cse.c (pass_cse): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cse): ...new pass_data instance and... (make_pass_cse): ...new function. (pass_cse2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cse2): ...new pass_data instance and... (make_pass_cse2): ...new function. (pass_cse_after_global_opts): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cse_after_global_opts): ...new pass_data instance and... (make_pass_cse_after_global_opts): ...new function. * dce.c (pass_ud_rtl_dce): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_ud_rtl_dce): ...new pass_data instance and... (make_pass_ud_rtl_dce): ...new function. (pass_fast_rtl_dce): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_fast_rtl_dce): ...new pass_data instance and... (make_pass_fast_rtl_dce): ...new function. * df-core.c (pass_df_initialize_opt): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_df_initialize_opt): ...new pass_data instance and... (make_pass_df_initialize_opt): ...new function. (pass_df_initialize_no_opt): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_df_initialize_no_opt): ...new pass_data instance and... (make_pass_df_initialize_no_opt): ...new function. (pass_df_finish): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_df_finish): ...new pass_data instance and... (make_pass_df_finish): ...new function. * dse.c (pass_rtl_dse1): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_dse1): ...new pass_data instance and... (make_pass_rtl_dse1): ...new function. (pass_rtl_dse2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_dse2): ...new pass_data instance and... (make_pass_rtl_dse2): ...new function. * dwarf2cfi.c (pass_dwarf2_frame): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_dwarf2_frame): ...new pass_data instance and... (make_pass_dwarf2_frame): ...new function. * except.c (pass_set_nothrow_function_flags): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_set_nothrow_function_flags): ...new pass_data instance and... (make_pass_set_nothrow_function_flags): ...new function. (pass_convert_to_eh_region_ranges): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_convert_to_eh_region_ranges): ...new pass_data instance and... (make_pass_convert_to_eh_region_ranges): ...new function. * final.c (pass_compute_alignments): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_compute_alignments): ...new pass_data instance and... (make_pass_compute_alignments): ...new function. (pass_final): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_final): ...new pass_data instance and... (make_pass_final): ...new function. (pass_shorten_branches): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_shorten_branches): ...new pass_data instance and... (make_pass_shorten_branches): ...new function. (pass_clean_state): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_clean_state): ...new pass_data instance and... (make_pass_clean_state): ...new function. * function.c (pass_instantiate_virtual_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_instantiate_virtual_regs): ...new pass_data instance and... (make_pass_instantiate_virtual_regs): ...new function. (pass_leaf_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_leaf_regs): ...new pass_data instance and... (make_pass_leaf_regs): ...new function. (pass_thread_prologue_and_epilogue): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_thread_prologue_and_epilogue): ...new pass_data instance and... (make_pass_thread_prologue_and_epilogue): ...new function. (pass_match_asm_constraints): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_match_asm_constraints): ...new pass_data instance and... (make_pass_match_asm_constraints): ...new function. * fwprop.c (pass_rtl_fwprop): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_fwprop): ...new pass_data instance and... (make_pass_rtl_fwprop): ...new function. (pass_rtl_fwprop_addr): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_fwprop_addr): ...new pass_data instance and... (make_pass_rtl_fwprop_addr): ...new function. * gcse.c (pass_rtl_pre): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_pre): ...new pass_data instance and... (make_pass_rtl_pre): ...new function. (pass_rtl_hoist): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_hoist): ...new pass_data instance and... (make_pass_rtl_hoist): ...new function. * gimple-low.c (pass_lower_cf): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_cf): ...new pass_data instance and... (make_pass_lower_cf): ...new function. * gimple-ssa-strength-reduction.c (pass_strength_reduction): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_strength_reduction): ...new pass_data instance and... (make_pass_strength_reduction): ...new function. * ifcvt.c (pass_rtl_ifcvt): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_ifcvt): ...new pass_data instance and... (make_pass_rtl_ifcvt): ...new function. (pass_if_after_combine): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_if_after_combine): ...new pass_data instance and... (make_pass_if_after_combine): ...new function. (pass_if_after_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_if_after_reload): ...new pass_data instance and... (make_pass_if_after_reload): ...new function. * init-regs.c (pass_initialize_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_initialize_regs): ...new pass_data instance and... (make_pass_initialize_regs): ...new function. * ipa-cp.c (pass_ipa_cp): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_cp): ...new pass_data instance and... (make_pass_ipa_cp): ...new function. * ipa-inline-analysis.c (pass_inline_parameters): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_inline_parameters): ...new pass_data instance and... (make_pass_inline_parameters): ...new function. * ipa-inline.c (pass_early_inline): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_early_inline): ...new pass_data instance and... (make_pass_early_inline): ...new function. (pass_ipa_inline): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_inline): ...new pass_data instance and... (make_pass_ipa_inline): ...new function. * ipa-pure-const.c (pass_local_pure_const): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_local_pure_const): ...new pass_data instance and... (make_pass_local_pure_const): ...new function. (pass_ipa_pure_const): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_pure_const): ...new pass_data instance and... (make_pass_ipa_pure_const): ...new function. * ipa-reference.c (pass_ipa_reference): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_reference): ...new pass_data instance and... (make_pass_ipa_reference): ...new function. * ipa-split.c (pass_split_functions): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_split_functions): ...new pass_data instance and... (make_pass_split_functions): ...new function. (pass_feedback_split_functions): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_feedback_split_functions): ...new pass_data instance and... (make_pass_feedback_split_functions): ...new function. * ipa.c (pass_ipa_function_and_variable_visibility): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_function_and_variable_visibility): ...new pass_data instance and... (make_pass_ipa_function_and_variable_visibility): ...new function. (pass_ipa_free_inline_summary): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_free_inline_summary): ...new pass_data instance and... (make_pass_ipa_free_inline_summary): ...new function. (pass_ipa_whole_program_visibility): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_whole_program_visibility): ...new pass_data instance and... (make_pass_ipa_whole_program_visibility): ...new function. (pass_ipa_profile): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_profile): ...new pass_data instance and... (make_pass_ipa_profile): ...new function. (pass_ipa_cdtor_merge): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_cdtor_merge): ...new pass_data instance and... (make_pass_ipa_cdtor_merge): ...new function. * ira.c (pass_ira): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_ira): ...new pass_data instance and... (make_pass_ira): ...new function. (pass_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_reload): ...new pass_data instance and... (make_pass_reload): ...new function. * jump.c (pass_cleanup_barriers): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cleanup_barriers): ...new pass_data instance and... (make_pass_cleanup_barriers): ...new function. * loop-init.c (pass_loop2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_loop2): ...new pass_data instance and... (make_pass_loop2): ...new function. (pass_rtl_loop_init): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_loop_init): ...new pass_data instance and... (make_pass_rtl_loop_init): ...new function. (pass_rtl_loop_done): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_loop_done): ...new pass_data instance and... (make_pass_rtl_loop_done): ...new function. (pass_rtl_move_loop_invariants): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_move_loop_invariants): ...new pass_data instance and... (make_pass_rtl_move_loop_invariants): ...new function. (pass_rtl_unswitch): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_unswitch): ...new pass_data instance and... (make_pass_rtl_unswitch): ...new function. (pass_rtl_unroll_and_peel_loops): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_unroll_and_peel_loops): ...new pass_data instance and... (make_pass_rtl_unroll_and_peel_loops): ...new function. (pass_rtl_doloop): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_doloop): ...new pass_data instance and... (make_pass_rtl_doloop): ...new function. * lower-subreg.c (pass_lower_subreg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_lower_subreg): ...new pass_data instance and... (make_pass_lower_subreg): ...new function. (pass_lower_subreg2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_lower_subreg2): ...new pass_data instance and... (make_pass_lower_subreg2): ...new function. * lto-streamer-out.c (pass_ipa_lto_gimple_out): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_lto_gimple_out): ...new pass_data instance and... (make_pass_ipa_lto_gimple_out): ...new function. (pass_ipa_lto_finish_out): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_lto_finish_out): ...new pass_data instance and... (make_pass_ipa_lto_finish_out): ...new function. * mode-switching.c (pass_mode_switching): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_mode_switching): ...new pass_data instance and... (make_pass_mode_switching): ...new function. * modulo-sched.c (pass_sms): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_sms): ...new pass_data instance and... (make_pass_sms): ...new function. * omp-low.c (pass_expand_omp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_expand_omp): ...new pass_data instance and... (make_pass_expand_omp): ...new function. (pass_lower_omp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_omp): ...new pass_data instance and... (make_pass_lower_omp): ...new function. (pass_diagnose_omp_blocks): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_diagnose_omp_blocks): ...new pass_data instance and... (make_pass_diagnose_omp_blocks): ...new function. * passes.c (pass_early_local_passes): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_early_local_passes): ...new pass_data instance and... (make_pass_early_local_passes): ...new function. (pass_all_early_optimizations): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_all_early_optimizations): ...new pass_data instance and... (make_pass_all_early_optimizations): ...new function. (pass_all_optimizations): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_all_optimizations): ...new pass_data instance and... (make_pass_all_optimizations): ...new function. (pass_all_optimizations_g): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_all_optimizations_g): ...new pass_data instance and... (make_pass_all_optimizations_g): ...new function. (pass_rest_of_compilation): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rest_of_compilation): ...new pass_data instance and... (make_pass_rest_of_compilation): ...new function. (pass_postreload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_postreload): ...new pass_data instance and... (make_pass_postreload): ...new function. * postreload-gcse.c (pass_gcse2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_gcse2): ...new pass_data instance and... (make_pass_gcse2): ...new function. * postreload.c (pass_postreload_cse): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_postreload_cse): ...new pass_data instance and... (make_pass_postreload_cse): ...new function. * predict.c (pass_profile): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_profile): ...new pass_data instance and... (make_pass_profile): ...new function. (pass_strip_predict_hints): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_strip_predict_hints): ...new pass_data instance and... (make_pass_strip_predict_hints): ...new function. * recog.c (pass_peephole2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_peephole2): ...new pass_data instance and... (make_pass_peephole2): ...new function. (pass_split_all_insns): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_all_insns): ...new pass_data instance and... (make_pass_split_all_insns): ...new function. (pass_split_after_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_after_reload): ...new pass_data instance and... (make_pass_split_after_reload): ...new function. (pass_split_before_regstack): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_before_regstack): ...new pass_data instance and... (make_pass_split_before_regstack): ...new function. (pass_split_before_sched2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_before_sched2): ...new pass_data instance and... (make_pass_split_before_sched2): ...new function. (pass_split_for_shorten_branches): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_for_shorten_branches): ...new pass_data instance and... (make_pass_split_for_shorten_branches): ...new function. * ree.c (pass_ree): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_ree): ...new pass_data instance and... (make_pass_ree): ...new function. * reg-stack.c (pass_stack_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_regs): ...new pass_data instance and... (make_pass_stack_regs): ...new function. (pass_stack_regs_run): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_regs_run): ...new pass_data instance and... (make_pass_stack_regs_run): ...new function. * regcprop.c (pass_cprop_hardreg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cprop_hardreg): ...new pass_data instance and... (make_pass_cprop_hardreg): ...new function. * reginfo.c (pass_reginfo_init): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_reginfo_init): ...new pass_data instance and... (make_pass_reginfo_init): ...new function. * regmove.c (pass_regmove): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_regmove): ...new pass_data instance and... (make_pass_regmove): ...new function. * regrename.c (pass_regrename): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_regrename): ...new pass_data instance and... (make_pass_regrename): ...new function. * reorg.c (pass_delay_slots): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_delay_slots): ...new pass_data instance and... (make_pass_delay_slots): ...new function. (pass_machine_reorg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_machine_reorg): ...new pass_data instance and... (make_pass_machine_reorg): ...new function. * sched-rgn.c (pass_sched): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_sched): ...new pass_data instance and... (make_pass_sched): ...new function. (pass_sched2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_sched2): ...new pass_data instance and... (make_pass_sched2): ...new function. * stack-ptr-mod.c (pass_stack_ptr_mod): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_ptr_mod): ...new pass_data instance and... (make_pass_stack_ptr_mod): ...new function. * store-motion.c (pass_rtl_store_motion): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_store_motion): ...new pass_data instance and... (make_pass_rtl_store_motion): ...new function. * tracer.c (pass_tracer): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tracer): ...new pass_data instance and... (make_pass_tracer): ...new function. * trans-mem.c (pass_diagnose_tm_blocks): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_diagnose_tm_blocks): ...new pass_data instance and... (make_pass_diagnose_tm_blocks): ...new function. (pass_lower_tm): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_tm): ...new pass_data instance and... (make_pass_lower_tm): ...new function. (pass_tm_init): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_init): ...new pass_data instance and... (make_pass_tm_init): ...new function. (pass_tm_mark): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_mark): ...new pass_data instance and... (make_pass_tm_mark): ...new function. (pass_tm_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_edges): ...new pass_data instance and... (make_pass_tm_edges): ...new function. (pass_tm_memopt): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_memopt): ...new pass_data instance and... (make_pass_tm_memopt): ...new function. (pass_ipa_tm): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_tm): ...new pass_data instance and... (make_pass_ipa_tm): ...new function. * tree-call-cdce.c (pass_call_cdce): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_call_cdce): ...new pass_data instance and... (make_pass_call_cdce): ...new function. * tree-cfg.c (pass_build_cfg): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_cfg): ...new pass_data instance and... (make_pass_build_cfg): ...new function. (pass_split_crit_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_split_crit_edges): ...new pass_data instance and... (make_pass_split_crit_edges): ...new function. (pass_warn_function_return): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_function_return): ...new pass_data instance and... (make_pass_warn_function_return): ...new function. (pass_warn_function_noreturn): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_function_noreturn): ...new pass_data instance and... (make_pass_warn_function_noreturn): ...new function. (pass_warn_unused_result): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_unused_result): ...new pass_data instance and... (make_pass_warn_unused_result): ...new function. * tree-cfgcleanup.c (pass_merge_phi): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_merge_phi): ...new pass_data instance and... (make_pass_merge_phi): ...new function. * tree-complex.c (pass_lower_complex): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_complex): ...new pass_data instance and... (make_pass_lower_complex): ...new function. (pass_lower_complex_O0): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_complex_O0): ...new pass_data instance and... (make_pass_lower_complex_O0): ...new function. * tree-eh.c (pass_lower_eh): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_eh): ...new pass_data instance and... (make_pass_lower_eh): ...new function. (pass_refactor_eh): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_refactor_eh): ...new pass_data instance and... (make_pass_refactor_eh): ...new function. (pass_lower_resx): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_resx): ...new pass_data instance and... (make_pass_lower_resx): ...new function. (pass_lower_eh_dispatch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_eh_dispatch): ...new pass_data instance and... (make_pass_lower_eh_dispatch): ...new function. (pass_cleanup_eh): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cleanup_eh): ...new pass_data instance and... (make_pass_cleanup_eh): ...new function. * tree-emutls.c (pass_ipa_lower_emutls): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_lower_emutls): ...new pass_data instance and... (make_pass_ipa_lower_emutls): ...new function. * tree-if-conv.c (pass_if_conversion): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_if_conversion): ...new pass_data instance and... (make_pass_if_conversion): ...new function. * tree-into-ssa.c (pass_build_ssa): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_ssa): ...new pass_data instance and... (make_pass_build_ssa): ...new function. * tree-loop-distribution.c (pass_loop_distribution): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_loop_distribution): ...new pass_data instance and... (make_pass_loop_distribution): ...new function. * tree-mudflap.c (pass_mudflap_1): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_1): ...new pass_data instance and... (make_pass_mudflap_1): ...new function. (pass_mudflap_2): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_2): ...new pass_data instance and... (make_pass_mudflap_2): ...new function. * tree-nomudflap.c (pass_mudflap_1): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_1): ...new pass_data instance and... (make_pass_mudflap_1): ...new function. (pass_mudflap_2): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_2): ...new pass_data instance and... (make_pass_mudflap_2): ...new function. * tree-nrv.c (pass_nrv): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_nrv): ...new pass_data instance and... (make_pass_nrv): ...new function. (pass_return_slot): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_return_slot): ...new pass_data instance and... (make_pass_return_slot): ...new function. * tree-object-size.c (pass_object_sizes): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_object_sizes): ...new pass_data instance and... (make_pass_object_sizes): ...new function. * tree-optimize.c (pass_cleanup_cfg_post_optimizing): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cleanup_cfg_post_optimizing): ...new pass_data instance and... (make_pass_cleanup_cfg_post_optimizing): ...new function. (pass_fixup_cfg): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_fixup_cfg): ...new pass_data instance and... (make_pass_fixup_cfg): ...new function. * tree-pass.h (pass_mudflap_1): Replace declaration with that of... (make_pass_mudflap_1): ...new function. (pass_mudflap_2): Replace declaration with that of... (make_pass_mudflap_2): ...new function. (pass_asan): Replace declaration with that of... (make_pass_asan): ...new function. (pass_asan_O0): Replace declaration with that of... (make_pass_asan_O0): ...new function. (pass_tsan): Replace declaration with that of... (make_pass_tsan): ...new function. (pass_tsan_O0): Replace declaration with that of... (make_pass_tsan_O0): ...new function. (pass_lower_cf): Replace declaration with that of... (make_pass_lower_cf): ...new function. (pass_refactor_eh): Replace declaration with that of... (make_pass_refactor_eh): ...new function. (pass_lower_eh): Replace declaration with that of... (make_pass_lower_eh): ...new function. (pass_lower_eh_dispatch): Replace declaration with that of... (make_pass_lower_eh_dispatch): ...new function. (pass_lower_resx): Replace declaration with that of... (make_pass_lower_resx): ...new function. (pass_build_cfg): Replace declaration with that of... (make_pass_build_cfg): ...new function. (pass_early_tree_profile): Replace declaration with that of... (make_pass_early_tree_profile): ...new function. (pass_cleanup_eh): Replace declaration with that of... (make_pass_cleanup_eh): ...new function. (pass_sra): Replace declaration with that of... (make_pass_sra): ...new function. (pass_sra_early): Replace declaration with that of... (make_pass_sra_early): ...new function. (pass_early_ipa_sra): Replace declaration with that of... (make_pass_early_ipa_sra): ...new function. (pass_tail_recursion): Replace declaration with that of... (make_pass_tail_recursion): ...new function. (pass_tail_calls): Replace declaration with that of... (make_pass_tail_calls): ...new function. (pass_tree_loop): Replace declaration with that of... (make_pass_tree_loop): ...new function. (pass_tree_loop_init): Replace declaration with that of... (make_pass_tree_loop_init): ...new function. (pass_lim): Replace declaration with that of... (make_pass_lim): ...new function. (pass_tree_unswitch): Replace declaration with that of... (make_pass_tree_unswitch): ...new function. (pass_predcom): Replace declaration with that of... (make_pass_predcom): ...new function. (pass_iv_canon): Replace declaration with that of... (make_pass_iv_canon): ...new function. (pass_scev_cprop): Replace declaration with that of... (make_pass_scev_cprop): ...new function. (pass_empty_loop): Replace declaration with that of... (make_pass_empty_loop): ...new function. (pass_record_bounds): Replace declaration with that of... (make_pass_record_bounds): ...new function. (pass_graphite): Replace declaration with that of... (make_pass_graphite): ...new function. (pass_graphite_transforms): Replace declaration with that of... (make_pass_graphite_transforms): ...new function. (pass_if_conversion): Replace declaration with that of... (make_pass_if_conversion): ...new function. (pass_loop_distribution): Replace declaration with that of... (make_pass_loop_distribution): ...new function. (pass_vectorize): Replace declaration with that of... (make_pass_vectorize): ...new function. (pass_slp_vectorize): Replace declaration with that of... (make_pass_slp_vectorize): ...new function. (pass_complete_unroll): Replace declaration with that of... (make_pass_complete_unroll): ...new function. (pass_complete_unrolli): Replace declaration with that of... (make_pass_complete_unrolli): ...new function. (pass_parallelize_loops): Replace declaration with that of... (make_pass_parallelize_loops): ...new function. (pass_loop_prefetch): Replace declaration with that of... (make_pass_loop_prefetch): ...new function. (pass_iv_optimize): Replace declaration with that of... (make_pass_iv_optimize): ...new function. (pass_tree_loop_done): Replace declaration with that of... (make_pass_tree_loop_done): ...new function. (pass_ch): Replace declaration with that of... (make_pass_ch): ...new function. (pass_ccp): Replace declaration with that of... (make_pass_ccp): ...new function. (pass_phi_only_cprop): Replace declaration with that of... (make_pass_phi_only_cprop): ...new function. (pass_build_ssa): Replace declaration with that of... (make_pass_build_ssa): ...new function. (pass_build_alias): Replace declaration with that of... (make_pass_build_alias): ...new function. (pass_build_ealias): Replace declaration with that of... (make_pass_build_ealias): ...new function. (pass_dominator): Replace declaration with that of... (make_pass_dominator): ...new function. (pass_dce): Replace declaration with that of... (make_pass_dce): ...new function. (pass_dce_loop): Replace declaration with that of... (make_pass_dce_loop): ...new function. (pass_cd_dce): Replace declaration with that of... (make_pass_cd_dce): ...new function. (pass_call_cdce): Replace declaration with that of... (make_pass_call_cdce): ...new function. (pass_merge_phi): Replace declaration with that of... (make_pass_merge_phi): ...new function. (pass_split_crit_edges): Replace declaration with that of... (make_pass_split_crit_edges): ...new function. (pass_pre): Replace declaration with that of... (make_pass_pre): ...new function. (pass_profile): Replace declaration with that of... (make_pass_profile): ...new function. (pass_strip_predict_hints): Replace declaration with that of... (make_pass_strip_predict_hints): ...new function. (pass_lower_complex_O0): Replace declaration with that of... (make_pass_lower_complex_O0): ...new function. (pass_lower_complex): Replace declaration with that of... (make_pass_lower_complex): ...new function. (pass_lower_vector): Replace declaration with that of... (make_pass_lower_vector): ...new function. (pass_lower_vector_ssa): Replace declaration with that of... (make_pass_lower_vector_ssa): ...new function. (pass_lower_omp): Replace declaration with that of... (make_pass_lower_omp): ...new function. (pass_diagnose_omp_blocks): Replace declaration with that of... (make_pass_diagnose_omp_blocks): ...new function. (pass_expand_omp): Replace declaration with that of... (make_pass_expand_omp): ...new function. (pass_expand_omp_ssa): Replace declaration with that of... (make_pass_expand_omp_ssa): ...new function. (pass_object_sizes): Replace declaration with that of... (make_pass_object_sizes): ...new function. (pass_strlen): Replace declaration with that of... (make_pass_strlen): ...new function. (pass_fold_builtins): Replace declaration with that of... (make_pass_fold_builtins): ...new function. (pass_stdarg): Replace declaration with that of... (make_pass_stdarg): ...new function. (pass_early_warn_uninitialized): Replace declaration with that of... (make_pass_early_warn_uninitialized): ...new function. (pass_late_warn_uninitialized): Replace declaration with that of... (make_pass_late_warn_uninitialized): ...new function. (pass_cse_reciprocals): Replace declaration with that of... (make_pass_cse_reciprocals): ...new function. (pass_cse_sincos): Replace declaration with that of... (make_pass_cse_sincos): ...new function. (pass_optimize_bswap): Replace declaration with that of... (make_pass_optimize_bswap): ...new function. (pass_optimize_widening_mul): Replace declaration with that of... (make_pass_optimize_widening_mul): ...new function. (pass_warn_function_return): Replace declaration with that of... (make_pass_warn_function_return): ...new function. (pass_warn_function_noreturn): Replace declaration with that of... (make_pass_warn_function_noreturn): ...new function. (pass_cselim): Replace declaration with that of... (make_pass_cselim): ...new function. (pass_phiopt): Replace declaration with that of... (make_pass_phiopt): ...new function. (pass_forwprop): Replace declaration with that of... (make_pass_forwprop): ...new function. (pass_phiprop): Replace declaration with that of... (make_pass_phiprop): ...new function. (pass_tree_ifcombine): Replace declaration with that of... (make_pass_tree_ifcombine): ...new function. (pass_dse): Replace declaration with that of... (make_pass_dse): ...new function. (pass_nrv): Replace declaration with that of... (make_pass_nrv): ...new function. (pass_rename_ssa_copies): Replace declaration with that of... (make_pass_rename_ssa_copies): ...new function. (pass_sink_code): Replace declaration with that of... (make_pass_sink_code): ...new function. (pass_fre): Replace declaration with that of... (make_pass_fre): ...new function. (pass_check_data_deps): Replace declaration with that of... (make_pass_check_data_deps): ...new function. (pass_copy_prop): Replace declaration with that of... (make_pass_copy_prop): ...new function. (pass_vrp): Replace declaration with that of... (make_pass_vrp): ...new function. (pass_uncprop): Replace declaration with that of... (make_pass_uncprop): ...new function. (pass_return_slot): Replace declaration with that of... (make_pass_return_slot): ...new function. (pass_reassoc): Replace declaration with that of... (make_pass_reassoc): ...new function. (pass_rebuild_cgraph_edges): Replace declaration with that of... (make_pass_rebuild_cgraph_edges): ...new function. (pass_remove_cgraph_callee_edges): Replace declaration with that of... (make_pass_remove_cgraph_callee_edges): ...new function. (pass_build_cgraph_edges): Replace declaration with that of... (make_pass_build_cgraph_edges): ...new function. (pass_local_pure_const): Replace declaration with that of... (make_pass_local_pure_const): ...new function. (pass_tracer): Replace declaration with that of... (make_pass_tracer): ...new function. (pass_warn_unused_result): Replace declaration with that of... (make_pass_warn_unused_result): ...new function. (pass_diagnose_tm_blocks): Replace declaration with that of... (make_pass_diagnose_tm_blocks): ...new function. (pass_lower_tm): Replace declaration with that of... (make_pass_lower_tm): ...new function. (pass_tm_init): Replace declaration with that of... (make_pass_tm_init): ...new function. (pass_tm_mark): Replace declaration with that of... (make_pass_tm_mark): ...new function. (pass_tm_memopt): Replace declaration with that of... (make_pass_tm_memopt): ...new function. (pass_tm_edges): Replace declaration with that of... (make_pass_tm_edges): ...new function. (pass_split_functions): Replace declaration with that of... (make_pass_split_functions): ...new function. (pass_feedback_split_functions): Replace declaration with that of... (make_pass_feedback_split_functions): ...new function. (pass_strength_reduction): Replace declaration with that of... (make_pass_strength_reduction): ...new function. (pass_ipa_lower_emutls): Replace declaration with that of... (make_pass_ipa_lower_emutls): ...new function. (pass_ipa_function_and_variable_visibility): Replace declaration with that of... (make_pass_ipa_function_and_variable_visibility): ...new function. (pass_ipa_tree_profile): Replace declaration with that of... (make_pass_ipa_tree_profile): ...new function. (pass_early_local_passes): Replace declaration with that of... (make_pass_early_local_passes): ...new function. (pass_ipa_whole_program_visibility): Replace declaration with that of... (make_pass_ipa_whole_program_visibility): ...new function. (pass_ipa_lto_gimple_out): Replace declaration with that of... (make_pass_ipa_lto_gimple_out): ...new function. (pass_ipa_increase_alignment): Replace declaration with that of... (make_pass_ipa_increase_alignment): ...new function. (pass_ipa_inline): Replace declaration with that of... (make_pass_ipa_inline): ...new function. (pass_ipa_free_lang_data): Replace declaration with that of... (make_pass_ipa_free_lang_data): ...new function. (pass_ipa_free_inline_summary): Replace declaration with that of... (make_pass_ipa_free_inline_summary): ...new function. (pass_ipa_cp): Replace declaration with that of... (make_pass_ipa_cp): ...new function. (pass_ipa_reference): Replace declaration with that of... (make_pass_ipa_reference): ...new function. (pass_ipa_pure_const): Replace declaration with that of... (make_pass_ipa_pure_const): ...new function. (pass_ipa_pta): Replace declaration with that of... (make_pass_ipa_pta): ...new function. (pass_ipa_lto_finish_out): Replace declaration with that of... (make_pass_ipa_lto_finish_out): ...new function. (pass_ipa_tm): Replace declaration with that of... (make_pass_ipa_tm): ...new function. (pass_ipa_profile): Replace declaration with that of... (make_pass_ipa_profile): ...new function. (pass_ipa_cdtor_merge): Replace declaration with that of... (make_pass_ipa_cdtor_merge): ...new function. (pass_cleanup_cfg_post_optimizing): Replace declaration with that of... (make_pass_cleanup_cfg_post_optimizing): ...new function. (pass_init_datastructures): Replace declaration with that of... (make_pass_init_datastructures): ...new function. (pass_fixup_cfg): Replace declaration with that of... (make_pass_fixup_cfg): ...new function. (pass_expand): Replace declaration with that of... (make_pass_expand): ...new function. (pass_instantiate_virtual_regs): Replace declaration with that of... (make_pass_instantiate_virtual_regs): ...new function. (pass_rtl_fwprop): Replace declaration with that of... (make_pass_rtl_fwprop): ...new function. (pass_rtl_fwprop_addr): Replace declaration with that of... (make_pass_rtl_fwprop_addr): ...new function. (pass_jump): Replace declaration with that of... (make_pass_jump): ...new function. (pass_jump2): Replace declaration with that of... (make_pass_jump2): ...new function. (pass_lower_subreg): Replace declaration with that of... (make_pass_lower_subreg): ...new function. (pass_cse): Replace declaration with that of... (make_pass_cse): ...new function. (pass_fast_rtl_dce): Replace declaration with that of... (make_pass_fast_rtl_dce): ...new function. (pass_ud_rtl_dce): Replace declaration with that of... (make_pass_ud_rtl_dce): ...new function. (pass_rtl_dce): Replace declaration with that of... (make_pass_rtl_dce): ...new function. (pass_rtl_dse1): Replace declaration with that of... (make_pass_rtl_dse1): ...new function. (pass_rtl_dse2): Replace declaration with that of... (make_pass_rtl_dse2): ...new function. (pass_rtl_dse3): Replace declaration with that of... (make_pass_rtl_dse3): ...new function. (pass_rtl_cprop): Replace declaration with that of... (make_pass_rtl_cprop): ...new function. (pass_rtl_pre): Replace declaration with that of... (make_pass_rtl_pre): ...new function. (pass_rtl_hoist): Replace declaration with that of... (make_pass_rtl_hoist): ...new function. (pass_rtl_store_motion): Replace declaration with that of... (make_pass_rtl_store_motion): ...new function. (pass_cse_after_global_opts): Replace declaration with that of... (make_pass_cse_after_global_opts): ...new function. (pass_rtl_ifcvt): Replace declaration with that of... (make_pass_rtl_ifcvt): ...new function. (pass_into_cfg_layout_mode): Replace declaration with that of... (make_pass_into_cfg_layout_mode): ...new function. (pass_outof_cfg_layout_mode): Replace declaration with that of... (make_pass_outof_cfg_layout_mode): ...new function. (pass_loop2): Replace declaration with that of... (make_pass_loop2): ...new function. (pass_rtl_loop_init): Replace declaration with that of... (make_pass_rtl_loop_init): ...new function. (pass_rtl_move_loop_invariants): Replace declaration with that of... (make_pass_rtl_move_loop_invariants): ...new function. (pass_rtl_unswitch): Replace declaration with that of... (make_pass_rtl_unswitch): ...new function. (pass_rtl_unroll_and_peel_loops): Replace declaration with that of... (make_pass_rtl_unroll_and_peel_loops): ...new function. (pass_rtl_doloop): Replace declaration with that of... (make_pass_rtl_doloop): ...new function. (pass_rtl_loop_done): Replace declaration with that of... (make_pass_rtl_loop_done): ...new function. (pass_web): Replace declaration with that of... (make_pass_web): ...new function. (pass_cse2): Replace declaration with that of... (make_pass_cse2): ...new function. (pass_df_initialize_opt): Replace declaration with that of... (make_pass_df_initialize_opt): ...new function. (pass_df_initialize_no_opt): Replace declaration with that of... (make_pass_df_initialize_no_opt): ...new function. (pass_reginfo_init): Replace declaration with that of... (make_pass_reginfo_init): ...new function. (pass_inc_dec): Replace declaration with that of... (make_pass_inc_dec): ...new function. (pass_stack_ptr_mod): Replace declaration with that of... (make_pass_stack_ptr_mod): ...new function. (pass_initialize_regs): Replace declaration with that of... (make_pass_initialize_regs): ...new function. (pass_combine): Replace declaration with that of... (make_pass_combine): ...new function. (pass_if_after_combine): Replace declaration with that of... (make_pass_if_after_combine): ...new function. (pass_ree): Replace declaration with that of... (make_pass_ree): ...new function. (pass_partition_blocks): Replace declaration with that of... (make_pass_partition_blocks): ...new function. (pass_match_asm_constraints): Replace declaration with that of... (make_pass_match_asm_constraints): ...new function. (pass_regmove): Replace declaration with that of... (make_pass_regmove): ...new function. (pass_split_all_insns): Replace declaration with that of... (make_pass_split_all_insns): ...new function. (pass_fast_rtl_byte_dce): Replace declaration with that of... (make_pass_fast_rtl_byte_dce): ...new function. (pass_lower_subreg2): Replace declaration with that of... (make_pass_lower_subreg2): ...new function. (pass_mode_switching): Replace declaration with that of... (make_pass_mode_switching): ...new function. (pass_sms): Replace declaration with that of... (make_pass_sms): ...new function. (pass_sched): Replace declaration with that of... (make_pass_sched): ...new function. (pass_ira): Replace declaration with that of... (make_pass_ira): ...new function. (pass_reload): Replace declaration with that of... (make_pass_reload): ...new function. (pass_clean_state): Replace declaration with that of... (make_pass_clean_state): ...new function. (pass_branch_prob): Replace declaration with that of... (make_pass_branch_prob): ...new function. (pass_value_profile_transformations): Replace declaration with that of... (make_pass_value_profile_transformations): ...new function. (pass_postreload_cse): Replace declaration with that of... (make_pass_postreload_cse): ...new function. (pass_gcse2): Replace declaration with that of... (make_pass_gcse2): ...new function. (pass_split_after_reload): Replace declaration with that of... (make_pass_split_after_reload): ...new function. (pass_branch_target_load_optimize1): Replace declaration with that of... (make_pass_branch_target_load_optimize1): ...new function. (pass_thread_prologue_and_epilogue): Replace declaration with that of... (make_pass_thread_prologue_and_epilogue): ...new function. (pass_stack_adjustments): Replace declaration with that of... (make_pass_stack_adjustments): ...new function. (pass_peephole2): Replace declaration with that of... (make_pass_peephole2): ...new function. (pass_if_after_reload): Replace declaration with that of... (make_pass_if_after_reload): ...new function. (pass_regrename): Replace declaration with that of... (make_pass_regrename): ...new function. (pass_cprop_hardreg): Replace declaration with that of... (make_pass_cprop_hardreg): ...new function. (pass_reorder_blocks): Replace declaration with that of... (make_pass_reorder_blocks): ...new function. (pass_branch_target_load_optimize2): Replace declaration with that of... (make_pass_branch_target_load_optimize2): ...new function. (pass_leaf_regs): Replace declaration with that of... (make_pass_leaf_regs): ...new function. (pass_split_before_sched2): Replace declaration with that of... (make_pass_split_before_sched2): ...new function. (pass_compare_elim_after_reload): Replace declaration with that of... (make_pass_compare_elim_after_reload): ...new function. (pass_sched2): Replace declaration with that of... (make_pass_sched2): ...new function. (pass_stack_regs): Replace declaration with that of... (make_pass_stack_regs): ...new function. (pass_stack_regs_run): Replace declaration with that of... (make_pass_stack_regs_run): ...new function. (pass_df_finish): Replace declaration with that of... (make_pass_df_finish): ...new function. (pass_compute_alignments): Replace declaration with that of... (make_pass_compute_alignments): ...new function. (pass_duplicate_computed_gotos): Replace declaration with that of... (make_pass_duplicate_computed_gotos): ...new function. (pass_variable_tracking): Replace declaration with that of... (make_pass_variable_tracking): ...new function. (pass_free_cfg): Replace declaration with that of... (make_pass_free_cfg): ...new function. (pass_machine_reorg): Replace declaration with that of... (make_pass_machine_reorg): ...new function. (pass_cleanup_barriers): Replace declaration with that of... (make_pass_cleanup_barriers): ...new function. (pass_delay_slots): Replace declaration with that of... (make_pass_delay_slots): ...new function. (pass_split_for_shorten_branches): Replace declaration with that of... (make_pass_split_for_shorten_branches): ...new function. (pass_split_before_regstack): Replace declaration with that of... (make_pass_split_before_regstack): ...new function. (pass_convert_to_eh_region_ranges): Replace declaration with that of... (make_pass_convert_to_eh_region_ranges): ...new function. (pass_shorten_branches): Replace declaration with that of... (make_pass_shorten_branches): ...new function. (pass_set_nothrow_function_flags): Replace declaration with that of... (make_pass_set_nothrow_function_flags): ...new function. (pass_dwarf2_frame): Replace declaration with that of... (make_pass_dwarf2_frame): ...new function. (pass_final): Replace declaration with that of... (make_pass_final): ...new function. (pass_rtl_seqabstr): Replace declaration with that of... (make_pass_rtl_seqabstr): ...new function. (pass_release_ssa_names): Replace declaration with that of... (make_pass_release_ssa_names): ...new function. (pass_early_inline): Replace declaration with that of... (make_pass_early_inline): ...new function. (pass_inline_parameters): Replace declaration with that of... (make_pass_inline_parameters): ...new function. (pass_update_address_taken): Replace declaration with that of... (make_pass_update_address_taken): ...new function. (pass_convert_switch): Replace declaration with that of... (make_pass_convert_switch): ...new function. * tree-profile.c (pass_ipa_tree_profile): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_tree_profile): ...new pass_data instance and... (make_pass_ipa_tree_profile): ...new function. * tree-sra.c (pass_sra_early): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_sra_early): ...new pass_data instance and... (make_pass_sra_early): ...new function. (pass_sra): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_sra): ...new pass_data instance and... (make_pass_sra): ...new function. (pass_early_ipa_sra): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_early_ipa_sra): ...new pass_data instance and... (make_pass_early_ipa_sra): ...new function. * tree-ssa-ccp.c (pass_ccp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_ccp): ...new pass_data instance and... (make_pass_ccp): ...new function. (pass_fold_builtins): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_fold_builtins): ...new pass_data instance and... (make_pass_fold_builtins): ...new function. * tree-ssa-copy.c (pass_copy_prop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_copy_prop): ...new pass_data instance and... (make_pass_copy_prop): ...new function. * tree-ssa-copyrename.c (pass_rename_ssa_copies): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_rename_ssa_copies): ...new pass_data instance and... (make_pass_rename_ssa_copies): ...new function. * tree-ssa-dce.c (pass_dce): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dce): ...new pass_data instance and... (make_pass_dce): ...new function. (pass_dce_loop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dce_loop): ...new pass_data instance and... (make_pass_dce_loop): ...new function. (pass_cd_dce): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cd_dce): ...new pass_data instance and... (make_pass_cd_dce): ...new function. * tree-ssa-dom.c (pass_dominator): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dominator): ...new pass_data instance and... (make_pass_dominator): ...new function. (pass_phi_only_cprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_phi_only_cprop): ...new pass_data instance and... (make_pass_phi_only_cprop): ...new function. * tree-ssa-dse.c (pass_dse): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dse): ...new pass_data instance and... (make_pass_dse): ...new function. * tree-ssa-forwprop.c (pass_forwprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_forwprop): ...new pass_data instance and... (make_pass_forwprop): ...new function. * tree-ssa-ifcombine.c (pass_tree_ifcombine): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_ifcombine): ...new pass_data instance and... (make_pass_tree_ifcombine): ...new function. * tree-ssa-loop-ch.c (pass_ch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_ch): ...new pass_data instance and... (make_pass_ch): ...new function. * tree-ssa-loop.c (pass_tree_loop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_loop): ...new pass_data instance and... (make_pass_tree_loop): ...new function. (pass_tree_loop_init): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_loop_init): ...new pass_data instance and... (make_pass_tree_loop_init): ...new function. (pass_lim): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lim): ...new pass_data instance and... (make_pass_lim): ...new function. (pass_tree_unswitch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_unswitch): ...new pass_data instance and... (make_pass_tree_unswitch): ...new function. (pass_predcom): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_predcom): ...new pass_data instance and... (make_pass_predcom): ...new function. (pass_vectorize): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_vectorize): ...new pass_data instance and... (make_pass_vectorize): ...new function. (pass_graphite): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_graphite): ...new pass_data instance and... (make_pass_graphite): ...new function. (pass_graphite_transforms): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_graphite_transforms): ...new pass_data instance and... (make_pass_graphite_transforms): ...new function. (pass_check_data_deps): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_check_data_deps): ...new pass_data instance and... (make_pass_check_data_deps): ...new function. (pass_iv_canon): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_iv_canon): ...new pass_data instance and... (make_pass_iv_canon): ...new function. (pass_scev_cprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_scev_cprop): ...new pass_data instance and... (make_pass_scev_cprop): ...new function. (pass_record_bounds): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_record_bounds): ...new pass_data instance and... (make_pass_record_bounds): ...new function. (pass_complete_unroll): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_complete_unroll): ...new pass_data instance and... (make_pass_complete_unroll): ...new function. (pass_complete_unrolli): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_complete_unrolli): ...new pass_data instance and... (make_pass_complete_unrolli): ...new function. (pass_parallelize_loops): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_parallelize_loops): ...new pass_data instance and... (make_pass_parallelize_loops): ...new function. (pass_loop_prefetch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_loop_prefetch): ...new pass_data instance and... (make_pass_loop_prefetch): ...new function. (pass_iv_optimize): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_iv_optimize): ...new pass_data instance and... (make_pass_iv_optimize): ...new function. (pass_tree_loop_done): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_loop_done): ...new pass_data instance and... (make_pass_tree_loop_done): ...new function. * tree-ssa-math-opts.c (pass_cse_reciprocals): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cse_reciprocals): ...new pass_data instance and... (make_pass_cse_reciprocals): ...new function. (pass_cse_sincos): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cse_sincos): ...new pass_data instance and... (make_pass_cse_sincos): ...new function. (pass_optimize_bswap): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_optimize_bswap): ...new pass_data instance and... (make_pass_optimize_bswap): ...new function. (pass_optimize_widening_mul): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_optimize_widening_mul): ...new pass_data instance and... (make_pass_optimize_widening_mul): ...new function. * tree-ssa-phiopt.c (pass_phiopt): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_phiopt): ...new pass_data instance and... (make_pass_phiopt): ...new function. (pass_cselim): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cselim): ...new pass_data instance and... (make_pass_cselim): ...new function. * tree-ssa-phiprop.c (pass_phiprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_phiprop): ...new pass_data instance and... (make_pass_phiprop): ...new function. * tree-ssa-pre.c (pass_pre): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_pre): ...new pass_data instance and... (make_pass_pre): ...new function. (pass_fre): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_fre): ...new pass_data instance and... (make_pass_fre): ...new function. * tree-ssa-reassoc.c (pass_reassoc): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_reassoc): ...new pass_data instance and... (make_pass_reassoc): ...new function. * tree-ssa-sink.c (pass_sink_code): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_sink_code): ...new pass_data instance and... (make_pass_sink_code): ...new function. * tree-ssa-strlen.c (pass_strlen): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_strlen): ...new pass_data instance and... (make_pass_strlen): ...new function. * tree-ssa-structalias.c (pass_build_alias): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_alias): ...new pass_data instance and... (make_pass_build_alias): ...new function. (pass_build_ealias): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_ealias): ...new pass_data instance and... (make_pass_build_ealias): ...new function. (pass_ipa_pta): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_pta): ...new pass_data instance and... (make_pass_ipa_pta): ...new function. * tree-ssa-uncprop.c (pass_uncprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_uncprop): ...new pass_data instance and... (make_pass_uncprop): ...new function. * tree-ssa-uninit.c (pass_late_warn_uninitialized): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_late_warn_uninitialized): ...new pass_data instance and... (make_pass_late_warn_uninitialized): ...new function. * tree-ssa.c (pass_init_datastructures): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_init_datastructures): ...new pass_data instance and... (make_pass_init_datastructures): ...new function. (pass_early_warn_uninitialized): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_early_warn_uninitialized): ...new pass_data instance and... (make_pass_early_warn_uninitialized): ...new function. (pass_update_address_taken): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_update_address_taken): ...new pass_data instance and... (make_pass_update_address_taken): ...new function. * tree-ssanames.c (pass_release_ssa_names): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_release_ssa_names): ...new pass_data instance and... (make_pass_release_ssa_names): ...new function. * tree-stdarg.c (pass_stdarg): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_stdarg): ...new pass_data instance and... (make_pass_stdarg): ...new function. * tree-switch-conversion.c (pass_convert_switch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_convert_switch): ...new pass_data instance and... (make_pass_convert_switch): ...new function. * tree-tailcall.c (pass_tail_recursion): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tail_recursion): ...new pass_data instance and... (make_pass_tail_recursion): ...new function. (pass_tail_calls): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tail_calls): ...new pass_data instance and... (make_pass_tail_calls): ...new function. * tree-vect-generic.c (pass_lower_vector): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_vector): ...new pass_data instance and... (make_pass_lower_vector): ...new function. (pass_lower_vector_ssa): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_vector_ssa): ...new pass_data instance and... (make_pass_lower_vector_ssa): ...new function. * tree-vectorizer.c (pass_slp_vectorize): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_slp_vectorize): ...new pass_data instance and... (make_pass_slp_vectorize): ...new function. (pass_ipa_increase_alignment): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_increase_alignment): ...new pass_data instance and... (make_pass_ipa_increase_alignment): ...new function. * tree-vrp.c (pass_vrp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_vrp): ...new pass_data instance and... (make_pass_vrp): ...new function. * tree.c (pass_ipa_free_lang_data): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_free_lang_data): ...new pass_data instance and... (make_pass_ipa_free_lang_data): ...new function. * tsan.c (pass_tsan): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tsan): ...new pass_data instance and... (make_pass_tsan): ...new function. (pass_tsan_O0): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tsan_O0): ...new pass_data instance and... (make_pass_tsan_O0): ...new function. * var-tracking.c (pass_variable_tracking): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_variable_tracking): ...new pass_data instance and... (make_pass_variable_tracking): ...new function. * web.c (pass_web): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_web): ...new pass_data instance and... (make_pass_web): ...new function. * config/epiphany/epiphany.h (pass_mode_switch_use): Replace declaration with that of... (make_pass_mode_switch_use): ...new function. (pass_resolve_sw_modes): Replace declaration with that of... (make_pass_resolve_sw_modes): ...new function. * config/epiphany/mode-switch-use.c (pass_mode_switch_use): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_mode_switch_use): ...new pass_data instance and... (make_pass_mode_switch_use): ...new function. * config/epiphany/resolve-sw-modes.c (pass_resolve_sw_modes): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_resolve_sw_modes): ...new pass_data instance and... (make_pass_resolve_sw_modes): ...new function. * config/i386/i386.c (pass_insert_vzeroupper): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_insert_vzeroupper): ...new pass_data instance and... (make_pass_insert_vzeroupper): ...new function. * config/sparc/sparc.c (pass_work_around_errata): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_work_around_errata): ...new pass_data instance and... (make_pass_work_around_errata): ...new function. * config/mips/mips.c (pass_mips_machine_reorg2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_mips_machine_reorg2): ...new pass_data instance and... (make_pass_mips_machine_reorg2): ...new function. gcc/testsuite/ Patch autogenerated by refactor_passes.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 03fe39476a4c4ea450b49e087cfa817b5f92021e * gcc.dg/plugin/one_time_plugin.c (one_pass): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_one_pass): ...new pass_data instance and... (make_one_pass): ...new function. * gcc.dg/plugin/selfassign.c (pass_warn_self_assign): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_self_assign): ...new pass_data instance and... (make_pass_warn_self_assign): ...new function. * g++.dg/plugin/dumb_plugin.c (pass_dumb_plugin_example): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dumb_plugin_example): ...new pass_data instance and... (make_pass_dumb_plugin_example): ...new function. * g++.dg/plugin/selfassign.c (pass_warn_self_assign): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_self_assign): ...new pass_data instance and... (make_pass_warn_self_assign): ...new function. From-SVN: r201508
2013-08-05 22:16:05 +02:00
}; // class pass_sms
pass cfun to pass::execute gcc/ * passes.c (opt_pass::execute): Adjust. (pass_manager::execute_pass_mode_switching): Likewise. (early_local_passes::execute): Likewise. (execute_one_pass): Pass cfun to the pass's execute method. * tree-pass.h (opt_pass::execute): Add function * argument. * asan.c, auto-inc-dec.c, bb-reorder.c, bt-load.c, cfgcleanup.c, cfgexpand.c, cfgrtl.c, cgraphbuild.c, combine-stack-adj.c, combine.c, compare-elim.c, config/arc/arc.c, config/epiphany/mode-switch-use.c, config/epiphany/resolve-sw-modes.c, config/i386/i386.c, config/mips/mips.c, config/rl78/rl78.c, config/s390/s390.c, config/sparc/sparc.c, cprop.c, dce.c, df-core.c, dse.c, dwarf2cfi.c, except.c, final.c, function.c, fwprop.c, gcse.c, gimple-low.c, gimple-ssa-isolate-paths.c, gimple-ssa-strength-reduction.c, graphite.c, ifcvt.c, init-regs.c, ipa-cp.c, ipa-devirt.c, ipa-inline-analysis.c, ipa-inline.c, ipa-profile.c, ipa-pure-const.c, ipa-reference.c, ipa-split.c, ipa.c, ira.c, jump.c, loop-init.c, lower-subreg.c, mode-switching.c, omp-low.c, postreload-gcse.c, postreload.c, predict.c, recog.c, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, reorg.c, sched-rgn.c, stack-ptr-mod.c, store-motion.c, tracer.c, trans-mem.c, tree-call-cdce.c, tree-cfg.c, tree-cfgcleanup.c, tree-complex.c, tree-eh.c, tree-emutls.c, tree-if-conv.c, tree-into-ssa.c, tree-loop-distribution.c, tree-nrv.c, tree-object-size.c, tree-parloops.c, tree-predcom.c, tree-ssa-ccp.c, tree-ssa-copy.c, tree-ssa-copyrename.c, tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c, tree-ssa-ifcombine.c, tree-ssa-loop-ch.c, tree-ssa-loop-im.c, tree-ssa-loop-ivcanon.c, tree-ssa-loop-prefetch.c, tree-ssa-loop-unswitch.c, tree-ssa-loop.c, tree-ssa-math-opts.c, tree-ssa-phiopt.c, tree-ssa-phiprop.c, tree-ssa-pre.c, tree-ssa-reassoc.c, tree-ssa-sink.c, tree-ssa-strlen.c, tree-ssa-structalias.c, tree-ssa-uncprop.c, tree-ssa-uninit.c, tree-ssa.c, tree-ssanames.c, tree-stdarg.c, tree-switch-conversion.c, tree-tailcall.c, tree-vect-generic.c, tree-vectorizer.c, tree-vrp.c, tree.c, tsan.c, ubsan.c, var-tracking.c, vtable-verify.c, web.c: Adjust. From-SVN: r209482
2014-04-17 14:37:34 +02:00
unsigned int
pass_sms::execute (function *fun ATTRIBUTE_UNUSED)
{
#ifdef INSN_SCHEDULING
basic_block bb;
/* Collect loop information to be used in SMS. */
cfg_layout_initialize (0);
sms_schedule ();
/* Update the life information, because we add pseudos. */
max_regno = max_reg_num ();
/* Finalize layout changes. */
FOR_EACH_BB_FN (bb, fun)
if (bb->next_bb != EXIT_BLOCK_PTR_FOR_FN (fun))
bb->aux = bb->next_bb;
free_dominance_info (CDI_DOMINATORS);
cfg_layout_finalize ();
#endif /* INSN_SCHEDULING */
return 0;
}
Automated conversion of passes to C++ classes gcc/ Patch autogenerated by refactor_passes.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 03fe39476a4c4ea450b49e087cfa817b5f92021e * asan.c (pass_asan): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_asan): ...new pass_data instance and... (make_pass_asan): ...new function. (pass_asan_O0): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_asan_O0): ...new pass_data instance and... (make_pass_asan_O0): ...new function. * auto-inc-dec.c (pass_inc_dec): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_inc_dec): ...new pass_data instance and... (make_pass_inc_dec): ...new function. * bb-reorder.c (pass_reorder_blocks): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_reorder_blocks): ...new pass_data instance and... (make_pass_reorder_blocks): ...new function. (pass_duplicate_computed_gotos): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_duplicate_computed_gotos): ...new pass_data instance and... (make_pass_duplicate_computed_gotos): ...new function. (pass_partition_blocks): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_partition_blocks): ...new pass_data instance and... (make_pass_partition_blocks): ...new function. * bt-load.c (pass_branch_target_load_optimize1): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_branch_target_load_optimize1): ...new pass_data instance and... (make_pass_branch_target_load_optimize1): ...new function. (pass_branch_target_load_optimize2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_branch_target_load_optimize2): ...new pass_data instance and... (make_pass_branch_target_load_optimize2): ...new function. * cfgcleanup.c (pass_jump): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_jump): ...new pass_data instance and... (make_pass_jump): ...new function. (pass_jump2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_jump2): ...new pass_data instance and... (make_pass_jump2): ...new function. * cfgexpand.c (pass_expand): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_expand): ...new pass_data instance and... (make_pass_expand): ...new function. * cfgrtl.c (pass_free_cfg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_free_cfg): ...new pass_data instance and... (make_pass_free_cfg): ...new function. (pass_into_cfg_layout_mode): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_into_cfg_layout_mode): ...new pass_data instance and... (make_pass_into_cfg_layout_mode): ...new function. (pass_outof_cfg_layout_mode): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_outof_cfg_layout_mode): ...new pass_data instance and... (make_pass_outof_cfg_layout_mode): ...new function. * cgraphbuild.c (pass_build_cgraph_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_cgraph_edges): ...new pass_data instance and... (make_pass_build_cgraph_edges): ...new function. (pass_rebuild_cgraph_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_rebuild_cgraph_edges): ...new pass_data instance and... (make_pass_rebuild_cgraph_edges): ...new function. (pass_remove_cgraph_callee_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_remove_cgraph_callee_edges): ...new pass_data instance and... (make_pass_remove_cgraph_callee_edges): ...new function. * combine-stack-adj.c (pass_stack_adjustments): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_adjustments): ...new pass_data instance and... (make_pass_stack_adjustments): ...new function. * combine.c (pass_combine): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_combine): ...new pass_data instance and... (make_pass_combine): ...new function. * compare-elim.c (pass_compare_elim_after_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_compare_elim_after_reload): ...new pass_data instance and... (make_pass_compare_elim_after_reload): ...new function. * cprop.c (pass_rtl_cprop): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_cprop): ...new pass_data instance and... (make_pass_rtl_cprop): ...new function. * cse.c (pass_cse): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cse): ...new pass_data instance and... (make_pass_cse): ...new function. (pass_cse2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cse2): ...new pass_data instance and... (make_pass_cse2): ...new function. (pass_cse_after_global_opts): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cse_after_global_opts): ...new pass_data instance and... (make_pass_cse_after_global_opts): ...new function. * dce.c (pass_ud_rtl_dce): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_ud_rtl_dce): ...new pass_data instance and... (make_pass_ud_rtl_dce): ...new function. (pass_fast_rtl_dce): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_fast_rtl_dce): ...new pass_data instance and... (make_pass_fast_rtl_dce): ...new function. * df-core.c (pass_df_initialize_opt): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_df_initialize_opt): ...new pass_data instance and... (make_pass_df_initialize_opt): ...new function. (pass_df_initialize_no_opt): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_df_initialize_no_opt): ...new pass_data instance and... (make_pass_df_initialize_no_opt): ...new function. (pass_df_finish): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_df_finish): ...new pass_data instance and... (make_pass_df_finish): ...new function. * dse.c (pass_rtl_dse1): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_dse1): ...new pass_data instance and... (make_pass_rtl_dse1): ...new function. (pass_rtl_dse2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_dse2): ...new pass_data instance and... (make_pass_rtl_dse2): ...new function. * dwarf2cfi.c (pass_dwarf2_frame): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_dwarf2_frame): ...new pass_data instance and... (make_pass_dwarf2_frame): ...new function. * except.c (pass_set_nothrow_function_flags): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_set_nothrow_function_flags): ...new pass_data instance and... (make_pass_set_nothrow_function_flags): ...new function. (pass_convert_to_eh_region_ranges): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_convert_to_eh_region_ranges): ...new pass_data instance and... (make_pass_convert_to_eh_region_ranges): ...new function. * final.c (pass_compute_alignments): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_compute_alignments): ...new pass_data instance and... (make_pass_compute_alignments): ...new function. (pass_final): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_final): ...new pass_data instance and... (make_pass_final): ...new function. (pass_shorten_branches): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_shorten_branches): ...new pass_data instance and... (make_pass_shorten_branches): ...new function. (pass_clean_state): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_clean_state): ...new pass_data instance and... (make_pass_clean_state): ...new function. * function.c (pass_instantiate_virtual_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_instantiate_virtual_regs): ...new pass_data instance and... (make_pass_instantiate_virtual_regs): ...new function. (pass_leaf_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_leaf_regs): ...new pass_data instance and... (make_pass_leaf_regs): ...new function. (pass_thread_prologue_and_epilogue): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_thread_prologue_and_epilogue): ...new pass_data instance and... (make_pass_thread_prologue_and_epilogue): ...new function. (pass_match_asm_constraints): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_match_asm_constraints): ...new pass_data instance and... (make_pass_match_asm_constraints): ...new function. * fwprop.c (pass_rtl_fwprop): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_fwprop): ...new pass_data instance and... (make_pass_rtl_fwprop): ...new function. (pass_rtl_fwprop_addr): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_fwprop_addr): ...new pass_data instance and... (make_pass_rtl_fwprop_addr): ...new function. * gcse.c (pass_rtl_pre): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_pre): ...new pass_data instance and... (make_pass_rtl_pre): ...new function. (pass_rtl_hoist): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_hoist): ...new pass_data instance and... (make_pass_rtl_hoist): ...new function. * gimple-low.c (pass_lower_cf): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_cf): ...new pass_data instance and... (make_pass_lower_cf): ...new function. * gimple-ssa-strength-reduction.c (pass_strength_reduction): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_strength_reduction): ...new pass_data instance and... (make_pass_strength_reduction): ...new function. * ifcvt.c (pass_rtl_ifcvt): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_ifcvt): ...new pass_data instance and... (make_pass_rtl_ifcvt): ...new function. (pass_if_after_combine): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_if_after_combine): ...new pass_data instance and... (make_pass_if_after_combine): ...new function. (pass_if_after_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_if_after_reload): ...new pass_data instance and... (make_pass_if_after_reload): ...new function. * init-regs.c (pass_initialize_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_initialize_regs): ...new pass_data instance and... (make_pass_initialize_regs): ...new function. * ipa-cp.c (pass_ipa_cp): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_cp): ...new pass_data instance and... (make_pass_ipa_cp): ...new function. * ipa-inline-analysis.c (pass_inline_parameters): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_inline_parameters): ...new pass_data instance and... (make_pass_inline_parameters): ...new function. * ipa-inline.c (pass_early_inline): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_early_inline): ...new pass_data instance and... (make_pass_early_inline): ...new function. (pass_ipa_inline): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_inline): ...new pass_data instance and... (make_pass_ipa_inline): ...new function. * ipa-pure-const.c (pass_local_pure_const): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_local_pure_const): ...new pass_data instance and... (make_pass_local_pure_const): ...new function. (pass_ipa_pure_const): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_pure_const): ...new pass_data instance and... (make_pass_ipa_pure_const): ...new function. * ipa-reference.c (pass_ipa_reference): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_reference): ...new pass_data instance and... (make_pass_ipa_reference): ...new function. * ipa-split.c (pass_split_functions): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_split_functions): ...new pass_data instance and... (make_pass_split_functions): ...new function. (pass_feedback_split_functions): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_feedback_split_functions): ...new pass_data instance and... (make_pass_feedback_split_functions): ...new function. * ipa.c (pass_ipa_function_and_variable_visibility): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_function_and_variable_visibility): ...new pass_data instance and... (make_pass_ipa_function_and_variable_visibility): ...new function. (pass_ipa_free_inline_summary): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_free_inline_summary): ...new pass_data instance and... (make_pass_ipa_free_inline_summary): ...new function. (pass_ipa_whole_program_visibility): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_whole_program_visibility): ...new pass_data instance and... (make_pass_ipa_whole_program_visibility): ...new function. (pass_ipa_profile): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_profile): ...new pass_data instance and... (make_pass_ipa_profile): ...new function. (pass_ipa_cdtor_merge): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_cdtor_merge): ...new pass_data instance and... (make_pass_ipa_cdtor_merge): ...new function. * ira.c (pass_ira): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_ira): ...new pass_data instance and... (make_pass_ira): ...new function. (pass_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_reload): ...new pass_data instance and... (make_pass_reload): ...new function. * jump.c (pass_cleanup_barriers): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cleanup_barriers): ...new pass_data instance and... (make_pass_cleanup_barriers): ...new function. * loop-init.c (pass_loop2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_loop2): ...new pass_data instance and... (make_pass_loop2): ...new function. (pass_rtl_loop_init): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_loop_init): ...new pass_data instance and... (make_pass_rtl_loop_init): ...new function. (pass_rtl_loop_done): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_loop_done): ...new pass_data instance and... (make_pass_rtl_loop_done): ...new function. (pass_rtl_move_loop_invariants): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_move_loop_invariants): ...new pass_data instance and... (make_pass_rtl_move_loop_invariants): ...new function. (pass_rtl_unswitch): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_unswitch): ...new pass_data instance and... (make_pass_rtl_unswitch): ...new function. (pass_rtl_unroll_and_peel_loops): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_unroll_and_peel_loops): ...new pass_data instance and... (make_pass_rtl_unroll_and_peel_loops): ...new function. (pass_rtl_doloop): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_doloop): ...new pass_data instance and... (make_pass_rtl_doloop): ...new function. * lower-subreg.c (pass_lower_subreg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_lower_subreg): ...new pass_data instance and... (make_pass_lower_subreg): ...new function. (pass_lower_subreg2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_lower_subreg2): ...new pass_data instance and... (make_pass_lower_subreg2): ...new function. * lto-streamer-out.c (pass_ipa_lto_gimple_out): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_lto_gimple_out): ...new pass_data instance and... (make_pass_ipa_lto_gimple_out): ...new function. (pass_ipa_lto_finish_out): Convert from a global struct to a subclass of ipa_opt_pass_d along with... (pass_data_ipa_lto_finish_out): ...new pass_data instance and... (make_pass_ipa_lto_finish_out): ...new function. * mode-switching.c (pass_mode_switching): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_mode_switching): ...new pass_data instance and... (make_pass_mode_switching): ...new function. * modulo-sched.c (pass_sms): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_sms): ...new pass_data instance and... (make_pass_sms): ...new function. * omp-low.c (pass_expand_omp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_expand_omp): ...new pass_data instance and... (make_pass_expand_omp): ...new function. (pass_lower_omp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_omp): ...new pass_data instance and... (make_pass_lower_omp): ...new function. (pass_diagnose_omp_blocks): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_diagnose_omp_blocks): ...new pass_data instance and... (make_pass_diagnose_omp_blocks): ...new function. * passes.c (pass_early_local_passes): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_early_local_passes): ...new pass_data instance and... (make_pass_early_local_passes): ...new function. (pass_all_early_optimizations): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_all_early_optimizations): ...new pass_data instance and... (make_pass_all_early_optimizations): ...new function. (pass_all_optimizations): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_all_optimizations): ...new pass_data instance and... (make_pass_all_optimizations): ...new function. (pass_all_optimizations_g): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_all_optimizations_g): ...new pass_data instance and... (make_pass_all_optimizations_g): ...new function. (pass_rest_of_compilation): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rest_of_compilation): ...new pass_data instance and... (make_pass_rest_of_compilation): ...new function. (pass_postreload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_postreload): ...new pass_data instance and... (make_pass_postreload): ...new function. * postreload-gcse.c (pass_gcse2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_gcse2): ...new pass_data instance and... (make_pass_gcse2): ...new function. * postreload.c (pass_postreload_cse): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_postreload_cse): ...new pass_data instance and... (make_pass_postreload_cse): ...new function. * predict.c (pass_profile): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_profile): ...new pass_data instance and... (make_pass_profile): ...new function. (pass_strip_predict_hints): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_strip_predict_hints): ...new pass_data instance and... (make_pass_strip_predict_hints): ...new function. * recog.c (pass_peephole2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_peephole2): ...new pass_data instance and... (make_pass_peephole2): ...new function. (pass_split_all_insns): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_all_insns): ...new pass_data instance and... (make_pass_split_all_insns): ...new function. (pass_split_after_reload): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_after_reload): ...new pass_data instance and... (make_pass_split_after_reload): ...new function. (pass_split_before_regstack): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_before_regstack): ...new pass_data instance and... (make_pass_split_before_regstack): ...new function. (pass_split_before_sched2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_before_sched2): ...new pass_data instance and... (make_pass_split_before_sched2): ...new function. (pass_split_for_shorten_branches): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_split_for_shorten_branches): ...new pass_data instance and... (make_pass_split_for_shorten_branches): ...new function. * ree.c (pass_ree): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_ree): ...new pass_data instance and... (make_pass_ree): ...new function. * reg-stack.c (pass_stack_regs): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_regs): ...new pass_data instance and... (make_pass_stack_regs): ...new function. (pass_stack_regs_run): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_regs_run): ...new pass_data instance and... (make_pass_stack_regs_run): ...new function. * regcprop.c (pass_cprop_hardreg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_cprop_hardreg): ...new pass_data instance and... (make_pass_cprop_hardreg): ...new function. * reginfo.c (pass_reginfo_init): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_reginfo_init): ...new pass_data instance and... (make_pass_reginfo_init): ...new function. * regmove.c (pass_regmove): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_regmove): ...new pass_data instance and... (make_pass_regmove): ...new function. * regrename.c (pass_regrename): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_regrename): ...new pass_data instance and... (make_pass_regrename): ...new function. * reorg.c (pass_delay_slots): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_delay_slots): ...new pass_data instance and... (make_pass_delay_slots): ...new function. (pass_machine_reorg): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_machine_reorg): ...new pass_data instance and... (make_pass_machine_reorg): ...new function. * sched-rgn.c (pass_sched): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_sched): ...new pass_data instance and... (make_pass_sched): ...new function. (pass_sched2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_sched2): ...new pass_data instance and... (make_pass_sched2): ...new function. * stack-ptr-mod.c (pass_stack_ptr_mod): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_stack_ptr_mod): ...new pass_data instance and... (make_pass_stack_ptr_mod): ...new function. * store-motion.c (pass_rtl_store_motion): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_rtl_store_motion): ...new pass_data instance and... (make_pass_rtl_store_motion): ...new function. * tracer.c (pass_tracer): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tracer): ...new pass_data instance and... (make_pass_tracer): ...new function. * trans-mem.c (pass_diagnose_tm_blocks): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_diagnose_tm_blocks): ...new pass_data instance and... (make_pass_diagnose_tm_blocks): ...new function. (pass_lower_tm): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_tm): ...new pass_data instance and... (make_pass_lower_tm): ...new function. (pass_tm_init): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_init): ...new pass_data instance and... (make_pass_tm_init): ...new function. (pass_tm_mark): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_mark): ...new pass_data instance and... (make_pass_tm_mark): ...new function. (pass_tm_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_edges): ...new pass_data instance and... (make_pass_tm_edges): ...new function. (pass_tm_memopt): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tm_memopt): ...new pass_data instance and... (make_pass_tm_memopt): ...new function. (pass_ipa_tm): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_tm): ...new pass_data instance and... (make_pass_ipa_tm): ...new function. * tree-call-cdce.c (pass_call_cdce): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_call_cdce): ...new pass_data instance and... (make_pass_call_cdce): ...new function. * tree-cfg.c (pass_build_cfg): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_cfg): ...new pass_data instance and... (make_pass_build_cfg): ...new function. (pass_split_crit_edges): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_split_crit_edges): ...new pass_data instance and... (make_pass_split_crit_edges): ...new function. (pass_warn_function_return): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_function_return): ...new pass_data instance and... (make_pass_warn_function_return): ...new function. (pass_warn_function_noreturn): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_function_noreturn): ...new pass_data instance and... (make_pass_warn_function_noreturn): ...new function. (pass_warn_unused_result): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_unused_result): ...new pass_data instance and... (make_pass_warn_unused_result): ...new function. * tree-cfgcleanup.c (pass_merge_phi): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_merge_phi): ...new pass_data instance and... (make_pass_merge_phi): ...new function. * tree-complex.c (pass_lower_complex): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_complex): ...new pass_data instance and... (make_pass_lower_complex): ...new function. (pass_lower_complex_O0): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_complex_O0): ...new pass_data instance and... (make_pass_lower_complex_O0): ...new function. * tree-eh.c (pass_lower_eh): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_eh): ...new pass_data instance and... (make_pass_lower_eh): ...new function. (pass_refactor_eh): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_refactor_eh): ...new pass_data instance and... (make_pass_refactor_eh): ...new function. (pass_lower_resx): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_resx): ...new pass_data instance and... (make_pass_lower_resx): ...new function. (pass_lower_eh_dispatch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_eh_dispatch): ...new pass_data instance and... (make_pass_lower_eh_dispatch): ...new function. (pass_cleanup_eh): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cleanup_eh): ...new pass_data instance and... (make_pass_cleanup_eh): ...new function. * tree-emutls.c (pass_ipa_lower_emutls): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_lower_emutls): ...new pass_data instance and... (make_pass_ipa_lower_emutls): ...new function. * tree-if-conv.c (pass_if_conversion): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_if_conversion): ...new pass_data instance and... (make_pass_if_conversion): ...new function. * tree-into-ssa.c (pass_build_ssa): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_ssa): ...new pass_data instance and... (make_pass_build_ssa): ...new function. * tree-loop-distribution.c (pass_loop_distribution): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_loop_distribution): ...new pass_data instance and... (make_pass_loop_distribution): ...new function. * tree-mudflap.c (pass_mudflap_1): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_1): ...new pass_data instance and... (make_pass_mudflap_1): ...new function. (pass_mudflap_2): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_2): ...new pass_data instance and... (make_pass_mudflap_2): ...new function. * tree-nomudflap.c (pass_mudflap_1): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_1): ...new pass_data instance and... (make_pass_mudflap_1): ...new function. (pass_mudflap_2): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_mudflap_2): ...new pass_data instance and... (make_pass_mudflap_2): ...new function. * tree-nrv.c (pass_nrv): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_nrv): ...new pass_data instance and... (make_pass_nrv): ...new function. (pass_return_slot): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_return_slot): ...new pass_data instance and... (make_pass_return_slot): ...new function. * tree-object-size.c (pass_object_sizes): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_object_sizes): ...new pass_data instance and... (make_pass_object_sizes): ...new function. * tree-optimize.c (pass_cleanup_cfg_post_optimizing): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cleanup_cfg_post_optimizing): ...new pass_data instance and... (make_pass_cleanup_cfg_post_optimizing): ...new function. (pass_fixup_cfg): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_fixup_cfg): ...new pass_data instance and... (make_pass_fixup_cfg): ...new function. * tree-pass.h (pass_mudflap_1): Replace declaration with that of... (make_pass_mudflap_1): ...new function. (pass_mudflap_2): Replace declaration with that of... (make_pass_mudflap_2): ...new function. (pass_asan): Replace declaration with that of... (make_pass_asan): ...new function. (pass_asan_O0): Replace declaration with that of... (make_pass_asan_O0): ...new function. (pass_tsan): Replace declaration with that of... (make_pass_tsan): ...new function. (pass_tsan_O0): Replace declaration with that of... (make_pass_tsan_O0): ...new function. (pass_lower_cf): Replace declaration with that of... (make_pass_lower_cf): ...new function. (pass_refactor_eh): Replace declaration with that of... (make_pass_refactor_eh): ...new function. (pass_lower_eh): Replace declaration with that of... (make_pass_lower_eh): ...new function. (pass_lower_eh_dispatch): Replace declaration with that of... (make_pass_lower_eh_dispatch): ...new function. (pass_lower_resx): Replace declaration with that of... (make_pass_lower_resx): ...new function. (pass_build_cfg): Replace declaration with that of... (make_pass_build_cfg): ...new function. (pass_early_tree_profile): Replace declaration with that of... (make_pass_early_tree_profile): ...new function. (pass_cleanup_eh): Replace declaration with that of... (make_pass_cleanup_eh): ...new function. (pass_sra): Replace declaration with that of... (make_pass_sra): ...new function. (pass_sra_early): Replace declaration with that of... (make_pass_sra_early): ...new function. (pass_early_ipa_sra): Replace declaration with that of... (make_pass_early_ipa_sra): ...new function. (pass_tail_recursion): Replace declaration with that of... (make_pass_tail_recursion): ...new function. (pass_tail_calls): Replace declaration with that of... (make_pass_tail_calls): ...new function. (pass_tree_loop): Replace declaration with that of... (make_pass_tree_loop): ...new function. (pass_tree_loop_init): Replace declaration with that of... (make_pass_tree_loop_init): ...new function. (pass_lim): Replace declaration with that of... (make_pass_lim): ...new function. (pass_tree_unswitch): Replace declaration with that of... (make_pass_tree_unswitch): ...new function. (pass_predcom): Replace declaration with that of... (make_pass_predcom): ...new function. (pass_iv_canon): Replace declaration with that of... (make_pass_iv_canon): ...new function. (pass_scev_cprop): Replace declaration with that of... (make_pass_scev_cprop): ...new function. (pass_empty_loop): Replace declaration with that of... (make_pass_empty_loop): ...new function. (pass_record_bounds): Replace declaration with that of... (make_pass_record_bounds): ...new function. (pass_graphite): Replace declaration with that of... (make_pass_graphite): ...new function. (pass_graphite_transforms): Replace declaration with that of... (make_pass_graphite_transforms): ...new function. (pass_if_conversion): Replace declaration with that of... (make_pass_if_conversion): ...new function. (pass_loop_distribution): Replace declaration with that of... (make_pass_loop_distribution): ...new function. (pass_vectorize): Replace declaration with that of... (make_pass_vectorize): ...new function. (pass_slp_vectorize): Replace declaration with that of... (make_pass_slp_vectorize): ...new function. (pass_complete_unroll): Replace declaration with that of... (make_pass_complete_unroll): ...new function. (pass_complete_unrolli): Replace declaration with that of... (make_pass_complete_unrolli): ...new function. (pass_parallelize_loops): Replace declaration with that of... (make_pass_parallelize_loops): ...new function. (pass_loop_prefetch): Replace declaration with that of... (make_pass_loop_prefetch): ...new function. (pass_iv_optimize): Replace declaration with that of... (make_pass_iv_optimize): ...new function. (pass_tree_loop_done): Replace declaration with that of... (make_pass_tree_loop_done): ...new function. (pass_ch): Replace declaration with that of... (make_pass_ch): ...new function. (pass_ccp): Replace declaration with that of... (make_pass_ccp): ...new function. (pass_phi_only_cprop): Replace declaration with that of... (make_pass_phi_only_cprop): ...new function. (pass_build_ssa): Replace declaration with that of... (make_pass_build_ssa): ...new function. (pass_build_alias): Replace declaration with that of... (make_pass_build_alias): ...new function. (pass_build_ealias): Replace declaration with that of... (make_pass_build_ealias): ...new function. (pass_dominator): Replace declaration with that of... (make_pass_dominator): ...new function. (pass_dce): Replace declaration with that of... (make_pass_dce): ...new function. (pass_dce_loop): Replace declaration with that of... (make_pass_dce_loop): ...new function. (pass_cd_dce): Replace declaration with that of... (make_pass_cd_dce): ...new function. (pass_call_cdce): Replace declaration with that of... (make_pass_call_cdce): ...new function. (pass_merge_phi): Replace declaration with that of... (make_pass_merge_phi): ...new function. (pass_split_crit_edges): Replace declaration with that of... (make_pass_split_crit_edges): ...new function. (pass_pre): Replace declaration with that of... (make_pass_pre): ...new function. (pass_profile): Replace declaration with that of... (make_pass_profile): ...new function. (pass_strip_predict_hints): Replace declaration with that of... (make_pass_strip_predict_hints): ...new function. (pass_lower_complex_O0): Replace declaration with that of... (make_pass_lower_complex_O0): ...new function. (pass_lower_complex): Replace declaration with that of... (make_pass_lower_complex): ...new function. (pass_lower_vector): Replace declaration with that of... (make_pass_lower_vector): ...new function. (pass_lower_vector_ssa): Replace declaration with that of... (make_pass_lower_vector_ssa): ...new function. (pass_lower_omp): Replace declaration with that of... (make_pass_lower_omp): ...new function. (pass_diagnose_omp_blocks): Replace declaration with that of... (make_pass_diagnose_omp_blocks): ...new function. (pass_expand_omp): Replace declaration with that of... (make_pass_expand_omp): ...new function. (pass_expand_omp_ssa): Replace declaration with that of... (make_pass_expand_omp_ssa): ...new function. (pass_object_sizes): Replace declaration with that of... (make_pass_object_sizes): ...new function. (pass_strlen): Replace declaration with that of... (make_pass_strlen): ...new function. (pass_fold_builtins): Replace declaration with that of... (make_pass_fold_builtins): ...new function. (pass_stdarg): Replace declaration with that of... (make_pass_stdarg): ...new function. (pass_early_warn_uninitialized): Replace declaration with that of... (make_pass_early_warn_uninitialized): ...new function. (pass_late_warn_uninitialized): Replace declaration with that of... (make_pass_late_warn_uninitialized): ...new function. (pass_cse_reciprocals): Replace declaration with that of... (make_pass_cse_reciprocals): ...new function. (pass_cse_sincos): Replace declaration with that of... (make_pass_cse_sincos): ...new function. (pass_optimize_bswap): Replace declaration with that of... (make_pass_optimize_bswap): ...new function. (pass_optimize_widening_mul): Replace declaration with that of... (make_pass_optimize_widening_mul): ...new function. (pass_warn_function_return): Replace declaration with that of... (make_pass_warn_function_return): ...new function. (pass_warn_function_noreturn): Replace declaration with that of... (make_pass_warn_function_noreturn): ...new function. (pass_cselim): Replace declaration with that of... (make_pass_cselim): ...new function. (pass_phiopt): Replace declaration with that of... (make_pass_phiopt): ...new function. (pass_forwprop): Replace declaration with that of... (make_pass_forwprop): ...new function. (pass_phiprop): Replace declaration with that of... (make_pass_phiprop): ...new function. (pass_tree_ifcombine): Replace declaration with that of... (make_pass_tree_ifcombine): ...new function. (pass_dse): Replace declaration with that of... (make_pass_dse): ...new function. (pass_nrv): Replace declaration with that of... (make_pass_nrv): ...new function. (pass_rename_ssa_copies): Replace declaration with that of... (make_pass_rename_ssa_copies): ...new function. (pass_sink_code): Replace declaration with that of... (make_pass_sink_code): ...new function. (pass_fre): Replace declaration with that of... (make_pass_fre): ...new function. (pass_check_data_deps): Replace declaration with that of... (make_pass_check_data_deps): ...new function. (pass_copy_prop): Replace declaration with that of... (make_pass_copy_prop): ...new function. (pass_vrp): Replace declaration with that of... (make_pass_vrp): ...new function. (pass_uncprop): Replace declaration with that of... (make_pass_uncprop): ...new function. (pass_return_slot): Replace declaration with that of... (make_pass_return_slot): ...new function. (pass_reassoc): Replace declaration with that of... (make_pass_reassoc): ...new function. (pass_rebuild_cgraph_edges): Replace declaration with that of... (make_pass_rebuild_cgraph_edges): ...new function. (pass_remove_cgraph_callee_edges): Replace declaration with that of... (make_pass_remove_cgraph_callee_edges): ...new function. (pass_build_cgraph_edges): Replace declaration with that of... (make_pass_build_cgraph_edges): ...new function. (pass_local_pure_const): Replace declaration with that of... (make_pass_local_pure_const): ...new function. (pass_tracer): Replace declaration with that of... (make_pass_tracer): ...new function. (pass_warn_unused_result): Replace declaration with that of... (make_pass_warn_unused_result): ...new function. (pass_diagnose_tm_blocks): Replace declaration with that of... (make_pass_diagnose_tm_blocks): ...new function. (pass_lower_tm): Replace declaration with that of... (make_pass_lower_tm): ...new function. (pass_tm_init): Replace declaration with that of... (make_pass_tm_init): ...new function. (pass_tm_mark): Replace declaration with that of... (make_pass_tm_mark): ...new function. (pass_tm_memopt): Replace declaration with that of... (make_pass_tm_memopt): ...new function. (pass_tm_edges): Replace declaration with that of... (make_pass_tm_edges): ...new function. (pass_split_functions): Replace declaration with that of... (make_pass_split_functions): ...new function. (pass_feedback_split_functions): Replace declaration with that of... (make_pass_feedback_split_functions): ...new function. (pass_strength_reduction): Replace declaration with that of... (make_pass_strength_reduction): ...new function. (pass_ipa_lower_emutls): Replace declaration with that of... (make_pass_ipa_lower_emutls): ...new function. (pass_ipa_function_and_variable_visibility): Replace declaration with that of... (make_pass_ipa_function_and_variable_visibility): ...new function. (pass_ipa_tree_profile): Replace declaration with that of... (make_pass_ipa_tree_profile): ...new function. (pass_early_local_passes): Replace declaration with that of... (make_pass_early_local_passes): ...new function. (pass_ipa_whole_program_visibility): Replace declaration with that of... (make_pass_ipa_whole_program_visibility): ...new function. (pass_ipa_lto_gimple_out): Replace declaration with that of... (make_pass_ipa_lto_gimple_out): ...new function. (pass_ipa_increase_alignment): Replace declaration with that of... (make_pass_ipa_increase_alignment): ...new function. (pass_ipa_inline): Replace declaration with that of... (make_pass_ipa_inline): ...new function. (pass_ipa_free_lang_data): Replace declaration with that of... (make_pass_ipa_free_lang_data): ...new function. (pass_ipa_free_inline_summary): Replace declaration with that of... (make_pass_ipa_free_inline_summary): ...new function. (pass_ipa_cp): Replace declaration with that of... (make_pass_ipa_cp): ...new function. (pass_ipa_reference): Replace declaration with that of... (make_pass_ipa_reference): ...new function. (pass_ipa_pure_const): Replace declaration with that of... (make_pass_ipa_pure_const): ...new function. (pass_ipa_pta): Replace declaration with that of... (make_pass_ipa_pta): ...new function. (pass_ipa_lto_finish_out): Replace declaration with that of... (make_pass_ipa_lto_finish_out): ...new function. (pass_ipa_tm): Replace declaration with that of... (make_pass_ipa_tm): ...new function. (pass_ipa_profile): Replace declaration with that of... (make_pass_ipa_profile): ...new function. (pass_ipa_cdtor_merge): Replace declaration with that of... (make_pass_ipa_cdtor_merge): ...new function. (pass_cleanup_cfg_post_optimizing): Replace declaration with that of... (make_pass_cleanup_cfg_post_optimizing): ...new function. (pass_init_datastructures): Replace declaration with that of... (make_pass_init_datastructures): ...new function. (pass_fixup_cfg): Replace declaration with that of... (make_pass_fixup_cfg): ...new function. (pass_expand): Replace declaration with that of... (make_pass_expand): ...new function. (pass_instantiate_virtual_regs): Replace declaration with that of... (make_pass_instantiate_virtual_regs): ...new function. (pass_rtl_fwprop): Replace declaration with that of... (make_pass_rtl_fwprop): ...new function. (pass_rtl_fwprop_addr): Replace declaration with that of... (make_pass_rtl_fwprop_addr): ...new function. (pass_jump): Replace declaration with that of... (make_pass_jump): ...new function. (pass_jump2): Replace declaration with that of... (make_pass_jump2): ...new function. (pass_lower_subreg): Replace declaration with that of... (make_pass_lower_subreg): ...new function. (pass_cse): Replace declaration with that of... (make_pass_cse): ...new function. (pass_fast_rtl_dce): Replace declaration with that of... (make_pass_fast_rtl_dce): ...new function. (pass_ud_rtl_dce): Replace declaration with that of... (make_pass_ud_rtl_dce): ...new function. (pass_rtl_dce): Replace declaration with that of... (make_pass_rtl_dce): ...new function. (pass_rtl_dse1): Replace declaration with that of... (make_pass_rtl_dse1): ...new function. (pass_rtl_dse2): Replace declaration with that of... (make_pass_rtl_dse2): ...new function. (pass_rtl_dse3): Replace declaration with that of... (make_pass_rtl_dse3): ...new function. (pass_rtl_cprop): Replace declaration with that of... (make_pass_rtl_cprop): ...new function. (pass_rtl_pre): Replace declaration with that of... (make_pass_rtl_pre): ...new function. (pass_rtl_hoist): Replace declaration with that of... (make_pass_rtl_hoist): ...new function. (pass_rtl_store_motion): Replace declaration with that of... (make_pass_rtl_store_motion): ...new function. (pass_cse_after_global_opts): Replace declaration with that of... (make_pass_cse_after_global_opts): ...new function. (pass_rtl_ifcvt): Replace declaration with that of... (make_pass_rtl_ifcvt): ...new function. (pass_into_cfg_layout_mode): Replace declaration with that of... (make_pass_into_cfg_layout_mode): ...new function. (pass_outof_cfg_layout_mode): Replace declaration with that of... (make_pass_outof_cfg_layout_mode): ...new function. (pass_loop2): Replace declaration with that of... (make_pass_loop2): ...new function. (pass_rtl_loop_init): Replace declaration with that of... (make_pass_rtl_loop_init): ...new function. (pass_rtl_move_loop_invariants): Replace declaration with that of... (make_pass_rtl_move_loop_invariants): ...new function. (pass_rtl_unswitch): Replace declaration with that of... (make_pass_rtl_unswitch): ...new function. (pass_rtl_unroll_and_peel_loops): Replace declaration with that of... (make_pass_rtl_unroll_and_peel_loops): ...new function. (pass_rtl_doloop): Replace declaration with that of... (make_pass_rtl_doloop): ...new function. (pass_rtl_loop_done): Replace declaration with that of... (make_pass_rtl_loop_done): ...new function. (pass_web): Replace declaration with that of... (make_pass_web): ...new function. (pass_cse2): Replace declaration with that of... (make_pass_cse2): ...new function. (pass_df_initialize_opt): Replace declaration with that of... (make_pass_df_initialize_opt): ...new function. (pass_df_initialize_no_opt): Replace declaration with that of... (make_pass_df_initialize_no_opt): ...new function. (pass_reginfo_init): Replace declaration with that of... (make_pass_reginfo_init): ...new function. (pass_inc_dec): Replace declaration with that of... (make_pass_inc_dec): ...new function. (pass_stack_ptr_mod): Replace declaration with that of... (make_pass_stack_ptr_mod): ...new function. (pass_initialize_regs): Replace declaration with that of... (make_pass_initialize_regs): ...new function. (pass_combine): Replace declaration with that of... (make_pass_combine): ...new function. (pass_if_after_combine): Replace declaration with that of... (make_pass_if_after_combine): ...new function. (pass_ree): Replace declaration with that of... (make_pass_ree): ...new function. (pass_partition_blocks): Replace declaration with that of... (make_pass_partition_blocks): ...new function. (pass_match_asm_constraints): Replace declaration with that of... (make_pass_match_asm_constraints): ...new function. (pass_regmove): Replace declaration with that of... (make_pass_regmove): ...new function. (pass_split_all_insns): Replace declaration with that of... (make_pass_split_all_insns): ...new function. (pass_fast_rtl_byte_dce): Replace declaration with that of... (make_pass_fast_rtl_byte_dce): ...new function. (pass_lower_subreg2): Replace declaration with that of... (make_pass_lower_subreg2): ...new function. (pass_mode_switching): Replace declaration with that of... (make_pass_mode_switching): ...new function. (pass_sms): Replace declaration with that of... (make_pass_sms): ...new function. (pass_sched): Replace declaration with that of... (make_pass_sched): ...new function. (pass_ira): Replace declaration with that of... (make_pass_ira): ...new function. (pass_reload): Replace declaration with that of... (make_pass_reload): ...new function. (pass_clean_state): Replace declaration with that of... (make_pass_clean_state): ...new function. (pass_branch_prob): Replace declaration with that of... (make_pass_branch_prob): ...new function. (pass_value_profile_transformations): Replace declaration with that of... (make_pass_value_profile_transformations): ...new function. (pass_postreload_cse): Replace declaration with that of... (make_pass_postreload_cse): ...new function. (pass_gcse2): Replace declaration with that of... (make_pass_gcse2): ...new function. (pass_split_after_reload): Replace declaration with that of... (make_pass_split_after_reload): ...new function. (pass_branch_target_load_optimize1): Replace declaration with that of... (make_pass_branch_target_load_optimize1): ...new function. (pass_thread_prologue_and_epilogue): Replace declaration with that of... (make_pass_thread_prologue_and_epilogue): ...new function. (pass_stack_adjustments): Replace declaration with that of... (make_pass_stack_adjustments): ...new function. (pass_peephole2): Replace declaration with that of... (make_pass_peephole2): ...new function. (pass_if_after_reload): Replace declaration with that of... (make_pass_if_after_reload): ...new function. (pass_regrename): Replace declaration with that of... (make_pass_regrename): ...new function. (pass_cprop_hardreg): Replace declaration with that of... (make_pass_cprop_hardreg): ...new function. (pass_reorder_blocks): Replace declaration with that of... (make_pass_reorder_blocks): ...new function. (pass_branch_target_load_optimize2): Replace declaration with that of... (make_pass_branch_target_load_optimize2): ...new function. (pass_leaf_regs): Replace declaration with that of... (make_pass_leaf_regs): ...new function. (pass_split_before_sched2): Replace declaration with that of... (make_pass_split_before_sched2): ...new function. (pass_compare_elim_after_reload): Replace declaration with that of... (make_pass_compare_elim_after_reload): ...new function. (pass_sched2): Replace declaration with that of... (make_pass_sched2): ...new function. (pass_stack_regs): Replace declaration with that of... (make_pass_stack_regs): ...new function. (pass_stack_regs_run): Replace declaration with that of... (make_pass_stack_regs_run): ...new function. (pass_df_finish): Replace declaration with that of... (make_pass_df_finish): ...new function. (pass_compute_alignments): Replace declaration with that of... (make_pass_compute_alignments): ...new function. (pass_duplicate_computed_gotos): Replace declaration with that of... (make_pass_duplicate_computed_gotos): ...new function. (pass_variable_tracking): Replace declaration with that of... (make_pass_variable_tracking): ...new function. (pass_free_cfg): Replace declaration with that of... (make_pass_free_cfg): ...new function. (pass_machine_reorg): Replace declaration with that of... (make_pass_machine_reorg): ...new function. (pass_cleanup_barriers): Replace declaration with that of... (make_pass_cleanup_barriers): ...new function. (pass_delay_slots): Replace declaration with that of... (make_pass_delay_slots): ...new function. (pass_split_for_shorten_branches): Replace declaration with that of... (make_pass_split_for_shorten_branches): ...new function. (pass_split_before_regstack): Replace declaration with that of... (make_pass_split_before_regstack): ...new function. (pass_convert_to_eh_region_ranges): Replace declaration with that of... (make_pass_convert_to_eh_region_ranges): ...new function. (pass_shorten_branches): Replace declaration with that of... (make_pass_shorten_branches): ...new function. (pass_set_nothrow_function_flags): Replace declaration with that of... (make_pass_set_nothrow_function_flags): ...new function. (pass_dwarf2_frame): Replace declaration with that of... (make_pass_dwarf2_frame): ...new function. (pass_final): Replace declaration with that of... (make_pass_final): ...new function. (pass_rtl_seqabstr): Replace declaration with that of... (make_pass_rtl_seqabstr): ...new function. (pass_release_ssa_names): Replace declaration with that of... (make_pass_release_ssa_names): ...new function. (pass_early_inline): Replace declaration with that of... (make_pass_early_inline): ...new function. (pass_inline_parameters): Replace declaration with that of... (make_pass_inline_parameters): ...new function. (pass_update_address_taken): Replace declaration with that of... (make_pass_update_address_taken): ...new function. (pass_convert_switch): Replace declaration with that of... (make_pass_convert_switch): ...new function. * tree-profile.c (pass_ipa_tree_profile): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_tree_profile): ...new pass_data instance and... (make_pass_ipa_tree_profile): ...new function. * tree-sra.c (pass_sra_early): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_sra_early): ...new pass_data instance and... (make_pass_sra_early): ...new function. (pass_sra): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_sra): ...new pass_data instance and... (make_pass_sra): ...new function. (pass_early_ipa_sra): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_early_ipa_sra): ...new pass_data instance and... (make_pass_early_ipa_sra): ...new function. * tree-ssa-ccp.c (pass_ccp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_ccp): ...new pass_data instance and... (make_pass_ccp): ...new function. (pass_fold_builtins): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_fold_builtins): ...new pass_data instance and... (make_pass_fold_builtins): ...new function. * tree-ssa-copy.c (pass_copy_prop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_copy_prop): ...new pass_data instance and... (make_pass_copy_prop): ...new function. * tree-ssa-copyrename.c (pass_rename_ssa_copies): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_rename_ssa_copies): ...new pass_data instance and... (make_pass_rename_ssa_copies): ...new function. * tree-ssa-dce.c (pass_dce): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dce): ...new pass_data instance and... (make_pass_dce): ...new function. (pass_dce_loop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dce_loop): ...new pass_data instance and... (make_pass_dce_loop): ...new function. (pass_cd_dce): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cd_dce): ...new pass_data instance and... (make_pass_cd_dce): ...new function. * tree-ssa-dom.c (pass_dominator): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dominator): ...new pass_data instance and... (make_pass_dominator): ...new function. (pass_phi_only_cprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_phi_only_cprop): ...new pass_data instance and... (make_pass_phi_only_cprop): ...new function. * tree-ssa-dse.c (pass_dse): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dse): ...new pass_data instance and... (make_pass_dse): ...new function. * tree-ssa-forwprop.c (pass_forwprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_forwprop): ...new pass_data instance and... (make_pass_forwprop): ...new function. * tree-ssa-ifcombine.c (pass_tree_ifcombine): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_ifcombine): ...new pass_data instance and... (make_pass_tree_ifcombine): ...new function. * tree-ssa-loop-ch.c (pass_ch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_ch): ...new pass_data instance and... (make_pass_ch): ...new function. * tree-ssa-loop.c (pass_tree_loop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_loop): ...new pass_data instance and... (make_pass_tree_loop): ...new function. (pass_tree_loop_init): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_loop_init): ...new pass_data instance and... (make_pass_tree_loop_init): ...new function. (pass_lim): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lim): ...new pass_data instance and... (make_pass_lim): ...new function. (pass_tree_unswitch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_unswitch): ...new pass_data instance and... (make_pass_tree_unswitch): ...new function. (pass_predcom): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_predcom): ...new pass_data instance and... (make_pass_predcom): ...new function. (pass_vectorize): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_vectorize): ...new pass_data instance and... (make_pass_vectorize): ...new function. (pass_graphite): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_graphite): ...new pass_data instance and... (make_pass_graphite): ...new function. (pass_graphite_transforms): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_graphite_transforms): ...new pass_data instance and... (make_pass_graphite_transforms): ...new function. (pass_check_data_deps): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_check_data_deps): ...new pass_data instance and... (make_pass_check_data_deps): ...new function. (pass_iv_canon): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_iv_canon): ...new pass_data instance and... (make_pass_iv_canon): ...new function. (pass_scev_cprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_scev_cprop): ...new pass_data instance and... (make_pass_scev_cprop): ...new function. (pass_record_bounds): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_record_bounds): ...new pass_data instance and... (make_pass_record_bounds): ...new function. (pass_complete_unroll): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_complete_unroll): ...new pass_data instance and... (make_pass_complete_unroll): ...new function. (pass_complete_unrolli): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_complete_unrolli): ...new pass_data instance and... (make_pass_complete_unrolli): ...new function. (pass_parallelize_loops): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_parallelize_loops): ...new pass_data instance and... (make_pass_parallelize_loops): ...new function. (pass_loop_prefetch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_loop_prefetch): ...new pass_data instance and... (make_pass_loop_prefetch): ...new function. (pass_iv_optimize): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_iv_optimize): ...new pass_data instance and... (make_pass_iv_optimize): ...new function. (pass_tree_loop_done): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tree_loop_done): ...new pass_data instance and... (make_pass_tree_loop_done): ...new function. * tree-ssa-math-opts.c (pass_cse_reciprocals): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cse_reciprocals): ...new pass_data instance and... (make_pass_cse_reciprocals): ...new function. (pass_cse_sincos): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cse_sincos): ...new pass_data instance and... (make_pass_cse_sincos): ...new function. (pass_optimize_bswap): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_optimize_bswap): ...new pass_data instance and... (make_pass_optimize_bswap): ...new function. (pass_optimize_widening_mul): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_optimize_widening_mul): ...new pass_data instance and... (make_pass_optimize_widening_mul): ...new function. * tree-ssa-phiopt.c (pass_phiopt): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_phiopt): ...new pass_data instance and... (make_pass_phiopt): ...new function. (pass_cselim): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_cselim): ...new pass_data instance and... (make_pass_cselim): ...new function. * tree-ssa-phiprop.c (pass_phiprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_phiprop): ...new pass_data instance and... (make_pass_phiprop): ...new function. * tree-ssa-pre.c (pass_pre): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_pre): ...new pass_data instance and... (make_pass_pre): ...new function. (pass_fre): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_fre): ...new pass_data instance and... (make_pass_fre): ...new function. * tree-ssa-reassoc.c (pass_reassoc): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_reassoc): ...new pass_data instance and... (make_pass_reassoc): ...new function. * tree-ssa-sink.c (pass_sink_code): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_sink_code): ...new pass_data instance and... (make_pass_sink_code): ...new function. * tree-ssa-strlen.c (pass_strlen): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_strlen): ...new pass_data instance and... (make_pass_strlen): ...new function. * tree-ssa-structalias.c (pass_build_alias): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_alias): ...new pass_data instance and... (make_pass_build_alias): ...new function. (pass_build_ealias): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_build_ealias): ...new pass_data instance and... (make_pass_build_ealias): ...new function. (pass_ipa_pta): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_pta): ...new pass_data instance and... (make_pass_ipa_pta): ...new function. * tree-ssa-uncprop.c (pass_uncprop): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_uncprop): ...new pass_data instance and... (make_pass_uncprop): ...new function. * tree-ssa-uninit.c (pass_late_warn_uninitialized): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_late_warn_uninitialized): ...new pass_data instance and... (make_pass_late_warn_uninitialized): ...new function. * tree-ssa.c (pass_init_datastructures): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_init_datastructures): ...new pass_data instance and... (make_pass_init_datastructures): ...new function. (pass_early_warn_uninitialized): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_early_warn_uninitialized): ...new pass_data instance and... (make_pass_early_warn_uninitialized): ...new function. (pass_update_address_taken): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_update_address_taken): ...new pass_data instance and... (make_pass_update_address_taken): ...new function. * tree-ssanames.c (pass_release_ssa_names): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_release_ssa_names): ...new pass_data instance and... (make_pass_release_ssa_names): ...new function. * tree-stdarg.c (pass_stdarg): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_stdarg): ...new pass_data instance and... (make_pass_stdarg): ...new function. * tree-switch-conversion.c (pass_convert_switch): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_convert_switch): ...new pass_data instance and... (make_pass_convert_switch): ...new function. * tree-tailcall.c (pass_tail_recursion): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tail_recursion): ...new pass_data instance and... (make_pass_tail_recursion): ...new function. (pass_tail_calls): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tail_calls): ...new pass_data instance and... (make_pass_tail_calls): ...new function. * tree-vect-generic.c (pass_lower_vector): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_vector): ...new pass_data instance and... (make_pass_lower_vector): ...new function. (pass_lower_vector_ssa): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_lower_vector_ssa): ...new pass_data instance and... (make_pass_lower_vector_ssa): ...new function. * tree-vectorizer.c (pass_slp_vectorize): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_slp_vectorize): ...new pass_data instance and... (make_pass_slp_vectorize): ...new function. (pass_ipa_increase_alignment): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_increase_alignment): ...new pass_data instance and... (make_pass_ipa_increase_alignment): ...new function. * tree-vrp.c (pass_vrp): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_vrp): ...new pass_data instance and... (make_pass_vrp): ...new function. * tree.c (pass_ipa_free_lang_data): Convert from a global struct to a subclass of simple_ipa_opt_pass along with... (pass_data_ipa_free_lang_data): ...new pass_data instance and... (make_pass_ipa_free_lang_data): ...new function. * tsan.c (pass_tsan): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tsan): ...new pass_data instance and... (make_pass_tsan): ...new function. (pass_tsan_O0): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_tsan_O0): ...new pass_data instance and... (make_pass_tsan_O0): ...new function. * var-tracking.c (pass_variable_tracking): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_variable_tracking): ...new pass_data instance and... (make_pass_variable_tracking): ...new function. * web.c (pass_web): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_web): ...new pass_data instance and... (make_pass_web): ...new function. * config/epiphany/epiphany.h (pass_mode_switch_use): Replace declaration with that of... (make_pass_mode_switch_use): ...new function. (pass_resolve_sw_modes): Replace declaration with that of... (make_pass_resolve_sw_modes): ...new function. * config/epiphany/mode-switch-use.c (pass_mode_switch_use): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_mode_switch_use): ...new pass_data instance and... (make_pass_mode_switch_use): ...new function. * config/epiphany/resolve-sw-modes.c (pass_resolve_sw_modes): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_resolve_sw_modes): ...new pass_data instance and... (make_pass_resolve_sw_modes): ...new function. * config/i386/i386.c (pass_insert_vzeroupper): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_insert_vzeroupper): ...new pass_data instance and... (make_pass_insert_vzeroupper): ...new function. * config/sparc/sparc.c (pass_work_around_errata): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_work_around_errata): ...new pass_data instance and... (make_pass_work_around_errata): ...new function. * config/mips/mips.c (pass_mips_machine_reorg2): Convert from a global struct to a subclass of rtl_opt_pass along with... (pass_data_mips_machine_reorg2): ...new pass_data instance and... (make_pass_mips_machine_reorg2): ...new function. gcc/testsuite/ Patch autogenerated by refactor_passes.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 03fe39476a4c4ea450b49e087cfa817b5f92021e * gcc.dg/plugin/one_time_plugin.c (one_pass): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_one_pass): ...new pass_data instance and... (make_one_pass): ...new function. * gcc.dg/plugin/selfassign.c (pass_warn_self_assign): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_self_assign): ...new pass_data instance and... (make_pass_warn_self_assign): ...new function. * g++.dg/plugin/dumb_plugin.c (pass_dumb_plugin_example): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_dumb_plugin_example): ...new pass_data instance and... (make_pass_dumb_plugin_example): ...new function. * g++.dg/plugin/selfassign.c (pass_warn_self_assign): Convert from a global struct to a subclass of gimple_opt_pass along with... (pass_data_warn_self_assign): ...new pass_data instance and... (make_pass_warn_self_assign): ...new function. From-SVN: r201508
2013-08-05 22:16:05 +02:00
} // anon namespace
rtl_opt_pass *
make_pass_sms (gcc::context *ctxt)
{
return new pass_sms (ctxt);
}