Commit Graph

767 Commits

Author SHA1 Message Date
Uros Bizjak 6f23a2d089 sh.c: Do not include algorithm.
* config/sh/sh.c: Do not include algorithm.
	(sh_emit_scc_to_t): Replace open-coded swap with std::swap
	to swap values.
	(sh_emit_compare_and_branch): Ditto.
	(sh_emit_compare_and_set): Ditto.
	* config/sh/sh.md (replacement peephole2): Ditto.
	(cstore4_media): Ditto.
	(*fmasf4): Ditto.

From-SVN: r217626
2014-11-16 12:50:29 +01:00
Jan-Benedict Glaw 0caee3cadf sh.c (emit_fpu_switch): Drop unused automatic variable.
2014-11-04  Jan-Benedict Glaw  <jbglaw@lug-owl.de>

	* config/sh/sh.c (emit_fpu_switch): Drop unused automatic variable.

From-SVN: r217082
2014-11-04 12:41:23 +00:00
Andrew MacLeod b0710fe1b1 2014-11-01 Andrew MacLeod <amacleod@redhat,com>
* optabs.h: Flatten insn-codes.h to source files.  Move some prototypes
	and structs to genopinit.c.  Adjust protyoptypes to match optabs.c.
	* genopinit.c (main): Emit prototypes and structs into insn-opinit.h.
	* optabs.c: (gen_move_insn): Move to expr.c.
	* expr.h: Move protypes and enums to optabs.h.
	* expr.c: (gen_move_insn): Relocate from optabs.c.
	* genemit.c (main): Include insn-codes.h.
	* gengtype.c (open_base_files): Include insn-codes.h.
	* asan.c: Include insn-codes.h.
	* bb-reorder.c: Ditto.
	* builtins.c: Ditto.
	* calls.c: Ditto.
	* cfgexpand.c: Ditto.
	* cilk-common.c: Ditto.
	* combine.c: Ditto.
	* dojump.c: Ditto.
	* dse.c: Ditto.
	* except.c: Ditto.
	* explow.c: Ditto.
	* expmed.c: Ditto.
	* function.c: Ditto.
	* ifcvt.c: Ditto.
	* internal-fn.c: Ditto.
	* loop-unroll.c: Ditto.
	* lra.c: Ditto.
	* modulo-sched.c: Ditto.
	* omp-low.c: Ditto.
	* postreload.c: Ditto.
	* ree.c: Ditto.
	* reload.c: Ditto.
	* reload1.c: Ditto.
	* shrink-wrap.c: Ditto.
	* simplify-rtx.c: Ditto.
	* stmt.c: Ditto.
	* target-globals.c: Ditto.
	* targhooks.c: Ditto.
	* toplev.c: Ditto.
	* tree-if-conv.c: Ditto.
	* tree-ssa-forwprop.c: Ditto.
	* tree-ssa-loop-prefetch.c: Ditto.
	* tree-ssa-math-opts.c: Ditto.
	* tree-ssa-phiopt.c: Ditto.
	* tree-ssa-reassoc.c: Ditto.
	* tree-switch-conversion.c: Ditto.
	* tree-vect-data-refs.c: Ditto.
	* tree-vect-generic.c: Ditto.
	* tree-vect-loop.c: Ditto.
	* tree-vect-patterns.c: Ditto.
	* tree-vect-slp.c: Ditto.
	* tree-vect-stmts.c: Ditto.
	* tree-vrp.c: Ditto.
	* value-prof.c: Ditto.
	* config/aarch64/aarch64-builtins.c: Ditto.
	* config/alpha/alpha.c: Ditto.
	* config/arm/arm.c: Ditto.
	* config/cris/cris.c: Ditto.
	* config/epiphany/epiphany.c: Ditto.
	* config/frv/frv.c: Ditto.
	* config/h8300/h8300.c: Ditto.
	* config/ia64/ia64.c: Ditto.
	* config/iq2000/iq2000.c: Ditto.
	* config/m32c/m32c.c: Ditto.
	* config/mep/mep.c: Ditto.
	* config/microblaze/microblaze.c: Ditto.
	* config/mips/mips.c: Ditto.
	* config/mn10300/mn10300.c: Ditto.
	* config/moxie/moxie.c: Ditto.
	* config/msp430/msp430.c: Ditto.
	* config/nios2/nios2.c: Ditto.
	* config/pa/pa.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.c: Ditto.
	* config/sh/sh_treg_combine.cc: Ditto.
	* config/spu/spu.c: Ditto.
	* config/stormy16/stormy16.c: Ditto.
	* config/tilegx/mul-tables.c: Ditto.
	* config/tilegx/tilegx.c: Ditto.
	* config/tilepro/mul-tables.c: Ditto.
	* config/tilepro/tilepro.c: Ditto.
	* config/vax/vax.c: Ditto.

From-SVN: r217005
2014-11-01 13:34:15 +00:00
James Greenhalgh ae59bd31fe [Patch 4/7 sh] Deprecate *_BY_PIECES_P, move to hookized version
gcc/

	* config/sh/sh.c (TARGET_USE_BY_PIECES_INFRASTRUCTURE_P): New.
	(sh_use_by_pieces_infrastructure_p): Likewise.
	* config/sh/sh.h (MOVE_BY_PIECES_P): Remove.
	(STORE_BY_PIECES_P): Likewise.
	(SET_BY_PIECES_P): Likewise.

From-SVN: r217001
2014-11-01 10:12:24 +00:00
Richard Sandiford ef4bddc299 decl.c, [...]: Remove redundant enum from machine_mode.
gcc/ada/
	* gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c,
	gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c:
	Remove redundant enum from machine_mode.

gcc/c-family/
	* c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
	enum from machine_mode.

gcc/c/
	* c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
	machine_mode.

gcc/cp/
	* constexpr.c: Remove redundant enum from machine_mode.

gcc/fortran/
	* trans-types.c, trans-types.h: Remove redundant enum from
	machine_mode.

gcc/go/
	* go-lang.c: Remove redundant enum from machine_mode.

gcc/java/
	* builtins.c, java-tree.h, typeck.c: Remove redundant enum from
	machine_mode.

gcc/lto/
	* lto-lang.c: Remove redundant enum from machine_mode.

gcc/
	* addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c,
	builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h,
	cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c,
	config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md,
	config/aarch64/aarch64.c, config/aarch64/aarch64.h,
	config/aarch64/aarch64.md, config/alpha/alpha-protos.h,
	config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c,
	config/arc/arc.h, config/arc/predicates.md,
	config/arm/aarch-common-protos.h, config/arm/aarch-common.c,
	config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h,
	config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md,
	config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c,
	config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c,
	config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md,
	config/cr16/cr16-protos.h, config/cr16/cr16.c,
	config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md,
	config/darwin-protos.h, config/darwin.c,
	config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c,
	config/epiphany/epiphany.md, config/fr30/fr30.c,
	config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md,
	config/h8300/h8300-protos.h, config/h8300/h8300.c,
	config/i386/i386-builtin-types.awk, config/i386/i386-protos.h,
	config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md,
	config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h,
	config/ia64/ia64.c, config/iq2000/iq2000-protos.h,
	config/iq2000/iq2000.c, config/iq2000/iq2000.md,
	config/lm32/lm32-protos.h, config/lm32/lm32.c,
	config/m32c/m32c-protos.h, config/m32c/m32c.c,
	config/m32r/m32r-protos.h, config/m32r/m32r.c,
	config/m68k/m68k-protos.h, config/m68k/m68k.c,
	config/mcore/mcore-protos.h, config/mcore/mcore.c,
	config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c,
	config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c,
	config/mips/mips-protos.h, config/mips/mips.c,
	config/mmix/mmix-protos.h, config/mmix/mmix.c,
	config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c,
	config/moxie/moxie.c, config/msp430/msp430-protos.h,
	config/msp430/msp430.c, config/nds32/nds32-cost.c,
	config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c,
	config/nds32/nds32-protos.h, config/nds32/nds32.c,
	config/nios2/nios2-protos.h, config/nios2/nios2.c,
	config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h,
	config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c,
	config/rs6000/altivec.md, config/rs6000/rs6000-c.c,
	config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c,
	config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c,
	config/s390/predicates.md, config/s390/s390-protos.h,
	config/s390/s390.c, config/s390/s390.h, config/s390/s390.md,
	config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c,
	config/sh/sh.md, config/sparc/predicates.md,
	config/sparc/sparc-protos.h, config/sparc/sparc.c,
	config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c,
	config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c,
	config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c,
	config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h,
	config/tilepro/tilepro.c, config/v850/v850-protos.h,
	config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h,
	config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h,
	config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h,
	dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi,
	doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c,
	dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h,
	except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c,
	fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h,
	fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c,
	genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c,
	graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c,
	internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c,
	ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h,
	libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c,
	loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c,
	lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c,
	lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h,
	output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h,
	recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c,
	regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h,
	rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c,
	sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c,
	simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def,
	targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c,
	tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c,
	tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c,
	tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c,
	tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c,
	tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c,
	tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c,
	tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c,
	tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c,
	tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c,
	var-tracking.c, varasm.c: Remove redundant enum from
	machine_mode.
gcc/
	* gengtype.c (main): Treat machine_mode as a scalar typedef.
	* genmodes.c (emit_insn_modes_h): Hide inline functions if
	USED_FOR_TARGET.

From-SVN: r216834
2014-10-29 12:02:45 +00:00
Andrew MacLeod 60393bbc61 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 12:41:01 +00:00
Richard Sandiford 2caafc4476 sh.c (sh_contains_memref_p_1): Delete.
gcc/
	* config/sh/sh.c (sh_contains_memref_p_1): Delete.
	(sh_contains_memref_p): Use FOR_EACH_SUBRTX.

From-SVN: r216702
2014-10-26 10:40:22 +00:00
Richard Sandiford 5dabe5a94e sh-protos.h (shmedia_cleanup_truncate): Take an rtx as argument and return the number of changes.
gcc/
	* config/sh/sh-protos.h (shmedia_cleanup_truncate): Take an
	rtx as argument and return the number of changes.
	* config/sh/sh.c: Include rtl-iter.h.
	(shmedia_cleanup_truncate): Take an rtx as argument and iterate
	over all subrtxes.  Return the number of changes made.
	* config/sh/sh.md: Update caller accordingly.

From-SVN: r216701
2014-10-26 10:40:15 +00:00
Oleg Endo fe3e478fb1 re PR target/53513 ([SH] Add support for fpchg insn and improve fenv support)
gcc/
	PR target/53513
	* config/sh/sh-modes.def (PSI): Remove.
	* config/sh/sh-protos.h (get_fpscr_rtx): Remove.
	* config/sh/sh.c (fpscr_rtx, get_fpscr_rtx): Remove.
	(sh_reorg): Remove commented out FPSCR code.
	(fpscr_set_from_mem): Use SImode instead of PSImode.  Emit lds_fpscr
	insn instead of move insn.
	(sh_hard_regno_mode_ok): Return SImode for FPSCR.
	(sh_legitimate_address_p, sh_legitimize_reload_address): Remove PSImode
	handling.
	(sh_emit_mode_set): Emit lds_fpscr and sts_fpscr insns.
	(sh1_builtin_p): Uncomment.
	(SH_BLTIN_UV 25, SH_BLTIN_VU 26): New macros.
	(bdesc): Add __builtin_sh_get_fpscr and __builtin_sh_set_fpscr.
	* config/sh/sh/predicates.md (fpscr_operand): Simplify.
	(fpscr_movsrc_operand, fpscr_movdst_operand): New predicates.
	(general_movsrc_operand, general_movdst_operand): Disallow
	fpscr_operand.
	* config/sh/sh.md (FPSCR_FR): New constant.
	(push_fpscr): Emit sts_fpscr insn.
	(pop_fpscr): Emit lds_fpscr_insn.
	(movsi_ie): Disallow FPSCR operands.
	(fpu_switch, unnamed related split, extend_psi_si,
	truncate_si_psi): Remove insns.
	(lds_fpscr, sts_fpscr): New insns.
	(toggle_sz, toggle_pr): Use SImode for FPSCR_REG instead of PSImode.

From-SVN: r216424
2014-10-18 10:51:08 +00:00
Andrew MacLeod 8368551493 function.h: Flatten file.
2014-10-16  Andrew MacLeod  <amacleod@redhat.com>

	* function.h: Flatten file.  Remove includes, adjust prototypes to 
	reflect only what is in function.h.
	(enum direction, struct args_size, struct locate_and_pad_arg_data,
	ADD_PARM_SIZE, SUB_PARM_SIZE, ARGS_SIZE_TREE, ARGS_SIZE_RTX): Relocate
	from expr.h.
	(ASLK_REDUCE_ALIGN, ASLK_RECORD_PAD): Relocate from rtl.h.
	(optimize_function_for_size_p, optimize_function_for_speed_p): Move
	prototypes to predict.h.
	(init_varasm_status): Move prototype to varasm.h.
	* expr.h: Adjust include files.
	(enum direction, struct args_size, struct locate_and_pad_arg_data,
	ADD_PARM_SIZE, SUB_PARM_SIZE, ARGS_SIZE_TREE, ARGS_SIZE_RTX): Move
	to function.h.
	(locate_and_pad_parm): Move prototype to function.h.
	* rtl.h: (assign_stack_local, ASLK_REDUCE_ALIGN, ASLK_RECORD_PAD,
	assign_stack_local_1, assign_stack_temp, assign_stack_temp_for_type,
	assign_temp, reposition_prologue_and_epilogue_notes,
	prologue_epilogue_contains, sibcall_epilogue_contains,
	update_temp_slot_address, maybe_copy_prologue_epilogue_insn,
	set_return_jump_label): Move prototypes to function.h.
	* predict.h (optimize_function_for_size_p,
	optimize_function_for_speed_p): Relocate prototypes from function.h.
	* shrink-wrap.h (emit_return_into_block, active_insn_between,
	convert_jumps_to_returns, emit_return_for_exit): Move prototypes to
	function.h.
	* varasm.h (init_varasm_status): Relocate prototype from function.h.
	* genattrtab.c (write_header): Add predict.h to include list.
	* genconditions.c (write_header): Add predict.h to include list.
	* genemit.c (main): Adjust header file includes.
	* gengtype.c (ifiles): Add flattened function.h header files.
	* genoutput.c (output_prologue): Add predict.h to include list.
	* genpreds.c (write_insn_preds_c): Adjust header file includes.
	* genrecog.c (write_header): Add flattened function.h header files.
	* alias.c: Adjust include files.
	* auto-inc-dec.c: Likewise.
	* basic-block.h: Likewise.
	* bb-reorder.c: Likewise.
	* bt-load.c: Likewise.
	* builtins.c: Likewise.
	* caller-save.c: Likewise.
	* calls.c: Likewise.
	* cfgbuild.c: Likewise.
	* cfgcleanup.c: Likewise.
	* cfgexpand.c: Likewise.
	* cfgloop.c: Likewise.
	* cfgloop.h: Likewise.
	* cfgrtl.c: Likewise.
	* cgraph.h: Likewise.
	* cgraphclones.c: Likewise.
	* cgraphunit.c: Likewise.
	* combine-stack-adj.c: Likewise.
	* combine.c: Likewise.
	* coverage.c: Likewise.
	* cprop.c: Likewise.
	* cse.c: Likewise.
	* cselib.c: Likewise.
	* dbxout.c: Likewise.
	* ddg.c: Likewise.
	* df-core.c: Likewise.
	* df-problems.c: Likewise.
	* df-scan.c: Likewise.
	* dojump.c: Likewise.
	* dwarf2cfi.c: Likewise.
	* dwarf2out.c: Likewise.
	* emit-rtl.c: Likewise.
	* except.c: Likewise.
	* explow.c: Likewise.
	* expr.c: Likewise.
	* final.c: Likewise.
	* function.c: Likewise.
	* gcse.c: Likewise.
	* gimple-fold.c: Likewise.
	* gimple-low.c: Likewise.
	* gimple-streamer.h: Likewise.
	* haifa-sched.c: Likewise.
	* ifcvt.c: Likewise.
	* ira.c: Likewise.
	* jump.c: Likewise.
	* lcm.c: Likewise.
	* loop-invariant.c: Likewise.
	* lra-assigns.c: Likewise.
	* lra-coalesce.c: Likewise.
	* lra-constraints.c: Likewise.
	* lra-eliminations.c: Likewise.
	* lra-lives.c: Likewise.
	* lra-spills.c: Likewise.
	* lra.c: Likewise.
	* lto-cgraph.c: Likewise.
	* lto-section-in.c: Likewise.
	* lto-section-out.c: Likewise.
	* lto-streamer-in.c: Likewise.
	* lto-streamer-out.c: Likewise.
	* mode-switching.c: Likewise.
	* modulo-sched.c: Likewise.
	* omp-low.c: Likewise.
	* optabs.c: Likewise.
	* passes.c: Likewise.
	* postreload-gcse.c: Likewise.
	* postreload.c: Likewise.
	* predict.c: Likewise.
	* profile.c: Likewise.
	* recog.c: Likewise.
	* ree.c: Likewise.
	* reg-stack.c: Likewise.
	* regcprop.c: Likewise.
	* reginfo.c: Likewise.
	* regrename.c: Likewise.
	* reload.c: Likewise.
	* reload1.c: Likewise.
	* reorg.c: Likewise.
	* resource.c: Likewise.
	* rtlanal.c: Likewise.
	* sched-deps.c: Likewise.
	* sched-ebb.c: Likewise.
	* sched-rgn.c: Likewise.
	* sel-sched-dump.c: Likewise.
	* sel-sched-ir.c: Likewise.
	* sel-sched.c: Likewise.
	* shrink-wrap.c: Likewise.
	* simplify-rtx.c: Likewise.
	* statistics.c: Likewise.
	* stmt.c: Likewise.
	* stor-layout.c: Likewise.
	* store-motion.c: Likewise.
	* symtab.c: Likewise.
	* targhooks.c: Likewise.
	* toplev.c: Likewise.
	* trans-mem.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-cfgcleanup.c: Likewise.
	* tree-dfa.c: Likewise.
	* tree-eh.c: Likewise.
	* tree-inline.c: Likewise.
	* tree-into-ssa.c: Likewise.
	* tree-nested.c: Likewise.
	* tree-nrv.c: Likewise.
	* tree-profile.c: Likewise.
	* tree-ssa-alias.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-copy.c: Likewise.
	* tree-ssa-copyrename.c: Likewise.
	* tree-ssa-dom.c: Likewise.
	* tree-ssa-operands.c: Likewise.
	* tree-ssa-propagate.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-stdarg.c: Likewise.
	* tree-tailcall.c: Likewise.
	* tree.c: Likewise.
	* tsan.c: Likewise.
	* valtrack.c: Likewise.
	* varasm.c: Likewise.
	* vmsdbgout.c: Likewise.
	* web.c: Likewise.
	* testsuite/g++.dg/plugin/pragma_plugin.c: Adjust include files.
	* config/aarch64/aarch64.c: Add flattened includes from function.h.
	* config/alpha/alpha.c: Likewise.
	* config/arc/arc.c: Likewise.
	* config/arm/arm.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: 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/h8300/h8300.c: Likewise.
	* config/i386/i386.c: Likewise.
	* config/ia64/ia64.c: Likewise.
	* config/iq2000/iq2000.c: Likewise.
	* config/lm32/lm32.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: 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: 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/pa/pa.c: Likewise.
	* config/pdp11/pdp11.c: Likewise.
	* config/rl78/rl78.c: Likewise.
	* config/rs6000/rs6000.c: Likewise.
	* config/rx/rx.c: Likewise.
	* config/s390/s390.c: Likewise.
	* config/score/score.c: Likewise.
	* config/sh/sh.c: Likewise.
	* config/sparc/sparc.c: Likewise.
	* config/spu/spu.c: Likewise.
	* config/stormy16/stormy16.c: Likewise.
	* config/tilegx/tilegx.c: Likewise.
	* config/tilepro/tilepro.c: Likewise.
	* config/v850/v850.c: Likewise.
	* config/vax/vax.c: Likewise.
	* config/xtensa/xtensa.c: Likewise.


2014-10-16  Andrew MacLeod  <amacleod@redhat.com>

	* ada/gcc-interface/misc.c: Adjust include files.

2014-10-16  Andrew MacLeod  <amacleod@redhat.com>

	* c/c-decl.c: Adjust include files.

2014-10-16  Andrew MacLeod  <amacleod@redhat.com>

	* c-family/c-pragma.c: Adjust include files.
	* c-family/c-semantics.c: Likewise.

2014-10-16  Andrew MacLeod  <amacleod@redhat.com>

	* cp/cp-tree.h: Adjust include files.

2014-10-16  Andrew MacLeod  <amacleod@redhat.com>

	* fortran/f95-lang.c: Adjust include files.
	* fortran/trans-decl.c: Likewise.

2014-10-16  Andrew MacLeod  <amacleod@redhat.com>

	* java/class.c: Adjust include files.
	* java/resource.c: Likewise.

2014-10-16  Andrew MacLeod  <amacleod@redhat.com>

	* objc/objc-act.c: Adjust include files.

From-SVN: r216337
2014-10-16 16:37:19 +00:00
Oleg Endo ddfe2bdb13 sh-protos.h (fldi_ok): Remove.
gcc/
	* config/sh/sh-protos.h (fldi_ok): Remove.
	* config/sh/sh.c (fldi_ok): Likewise.
	(sh_secondary_reload): Don't use fldi_ok.
	* config/sh/constraints.md (G constraint, H constraint): Don't use
	fldi_ok.

From-SVN: r216320
2014-10-16 13:17:12 +00:00
Oleg Endo 3a2317d15b re PR target/53513 ([SH] Add support for fpchg insn and improve fenv support)
gcc/
	PR target/53513
	* config/sh/sh-protos.h (emit_sf_insn, emit_df_insn, expand_sf_unop,
	expand_sf_binop, expand_df_unop, expand_df_binop): Remove.

	* config/sh/sh.c (sh_emit_set_t_insn): Adjust generated insn pattern
	to match fp insn patterns.
	(calc_live_regs): Add FPSCR_MODES_REG and FPSCR_STAT_REG to the ignore
	list.
	(emit_sf_insn, emit_df_insn, expand_sf_unop, expand_sf_binop,
	expand_df_unop, expand_df_binop): Remove.
	(sh_conditional_register_usage): Mark FPSCR_MODES_REG and
	FPSCR_STAT_REG as not call clobbered.
	(sh_emit_mode_set): Emit fpscr store-modify-load sequence instead of
	invoking fpscr_set_from_mem.

	* config/sh/sh.h (MAX_REGISTER_NAME_LENGTH): Increase to 6.
	(SH_REGISTER_NAMES_INITIALIZER): Add names for FPSCR_MODES_REG and
	FPSCR_STAT_REG.
	(REGISTER_NAMES): Adjust.
	(SPECIAL_REGISTER_P): Add FPSCR_MODES_REG and FPSCR_STAT_REG.
	(FIRST_PSEUDO_REGISTER): Increase to 156.
	(DWARF_FRAME_REGISTERS): Define as 153 to keep the original value.
	(FIXED_REGISTERS, CALL_USED_REGISTERS): Add FPSCR_MODES_REG and
	FPSCR_STAT_REG.
	(REG_CLASS_CONTENTS): Adjust ALL_REGS bit mask to include
	FPSCR_MODES_REG and FPSCR_STAT_REG.
	(REG_ALLOC_ORDER): Add FPSCR_MODES_REG and FPSCR_STAT_REG.

	* config/sh/sh.md (FPSCR_MODES_REG, FPSCR_STAT_REG, FPSCR_PR,
	FPSCR_SZ): Add new constants.
	(UNSPECV_FPSCR_MODES, UNSPECV_FPSCR_STAT): Add new unspecv constants.

	(movpsi): Use TARGET_FPU_ANY condition, invoke gen_fpu_switch.
	(fpu_switch): Add use and set of FPSCR_STAT_REG and FPSCR_MODES_REG.
	Use TARGET_FPU_ANY condition.
	(fpu_switch peephole2): Remove.
	(fpu_switch split): Use simple_mem_operand to capture the mem and
	adjust split implementation.
	(extend_psi_si, truncate_si_psi): New insns.
	(toggle_sz, toggle_pr): Use FPSCR_SZ, FPSCR_PR constants.  Add
	set of FPSCR_MODES_REG.

	(push_e, push_4, pop_e, pop_4, movdf_i4, reload_indf__frn, movsf_ie,
	reload_insf__frn, force_mode_for_call, calli, calli_tbr_rel,
	calli_pcrel, call_pcrel, call_compact, call_compact_rettramp,
	call_valuei, call_valuei_tbr_rel, call_valuei_pcrel, call_value_pcrel,
	call_value_compact, call_value_compact_rettramp, call,
	call_pop_compact, call_pop_compact_rettramp, call_value, sibcalli,
	sibcalli_pcrel, sibcalli_thunk, sibcall_pcrel, sibcall_compact,
	sibcall, sibcall_valuei, sibcall_valuei_pcrel, sibcall_value_pcrel,
	sibcall_value_compact, sibcall_value, call_value_pop_compact,
	call_value_pop_compact_rettramp, various unnamed splits):
	Replace use of FPSCR_REG with use of FPSCR_MODES_REG.  Adjust gen_*
	function uses.

	(floatsisf2_i4, *floatsisf2_ie): Merge into floatsisf2_i4.
	(fix_truncsfsi2_i4, *fixsfsi): Merge into fix_truncsfsi2_i4.
	(cmpgtsf_t, cmpgtsf_t_i4): Merge into cmpgtsf_t.
	(cmpeqsf_t, cmpeqsf_t_i4): Merge into cmpeqsf_t.
	(ieee_ccmpeqsf_t, *ieee_ccmpeqsf_t_4): Merge into ieee_ccmpeqsf_t.

	(udivsi3_i4, divsi3_i4, addsf3_i, subsf3_i, mulsf3_i, fmasf4_i,
	*fmasf4, divsf3_i, floatsisf2_i4, fix_truncsfsi2_i4, cmpgtsf_t,
	cmpeqsf_t, ieee_ccmpeqsf_t, sqrtsf2_i, rsqrtsf2, fsca, adddf3_i,
	subdf3_i, muldf3_i, divdf3_i, floatsidf2_i, fix_truncdfsi2_i,
	cmpgtdf_t, cmpeqdf_t, *ieee_ccmpeqdf_t, sqrtdf2_i, extendsfdf2_i4,
	truncdfsf2_i4): Replace use of FPSCR_REG with clobber of FPSCR_STAT_REG
	and use of FPSCR_MODES_REG.  Adjust gen_* function uses.

gcc/testsuite/
	PR target/53513
	* gcc.target/sh/pr54680.c: Adjust matching of lds insn.

From-SVN: r216307
2014-10-16 10:58:36 +00:00
Oleg Endo 4eac9c2b02 re PR target/59401 ([SH] GBR addressing mode optimization produces wrong code)
gcc/
	PR target/59401
	* config/sh/sh-protos (sh_find_equiv_gbr_addr): Use rtx_insn* instead
	of rtx.
	* config/sh/sh.c (sh_find_equiv_gbr_addr): Use def chains instead of
	insn walking.
	(sh_find_equiv_gbr_addr): Do nothing if input mem is already a GBR
	address.  Use def chains to handle GBR clobbering call insns.

gcc/testsuite/
	PR target/59401
	PR target/54760
	* gcc.target/pr54760-5.c: New.
	* gcc.target/pr54760-6.c: New.
	* gcc.target/sh/pr59401-1.c: New.

From-SVN: r216128
2014-10-12 23:14:07 +00:00
Oleg Endo f3ca7111fb sh.h (TARGET_SH4A_ARCH): Remove macro.
gcc/
	* config/sh/sh.h (TARGET_SH4A_ARCH): Remove macro.
	* config/sh/sh.h: Replace uses of TARGET_SH4A_ARCH with TARGET_SH4A.
	* config/sh/sh.c: Likewise.
	* config/sh/sh-mem.cc: Likewise.
	* config/sh/sh.md: Likewise.
	* config/sh/predicates.md: Likewise.
	* config/sh/sync.md: Likewise.

From-SVN: r216119
2014-10-11 13:11:58 +00:00
Trevor Saunders 4654c0cf4a Replace INSN_DELETED_P with rtx_insn member functions
gcc/

	* cfgrtl.c, combine.c, config/arc/arc.c, config/mcore/mcore.c,
	config/rs6000/rs6000.c, config/sh/sh.c, cprop.c, dwarf2out.c,
	emit-rtl.c, final.c, function.c, gcse.c, jump.c, reg-stack.c,
	reload1.c, reorg.c, resource.c, sel-sched-ir.c: Replace INSN_DELETED_P
	macro with statically checked member functions.
	* rtl.h (rtx_insn::deleted): New method.
	(rtx_insn::set_deleted): Likewise.
	(rtx_insn::set_undeleted): Likewise.
	(INSN_DELETED_P): Remove.

From-SVN: r215282
2014-09-16 01:23:42 +00:00
David Malcolm 84034c69b3 Instruction attributes take an rtx_insn *
gcc/ChangeLog:
	* config/arc/arc-protos.h (arc_attr_type): Strengthen param from
	rtx to rtx_insn *.
	(arc_sets_cc_p): Likewise.
	* config/arc/arc.c (arc_print_operand): Use methods of
	"final_sequence" for clarity, and to enable strengthening of
	locals "jump" and "delay" from rtx to rtx_insn *.
	(arc_adjust_insn_length): Strengthen local "prev" from rtx to
	rtx_insn *; use method of rtx_sequence for typesafety.
	(arc_get_insn_variants): Use insn method of rtx_sequence for
	typesafety.
	(arc_pad_return): Likewise.
	(arc_attr_type): Strengthen param from rtx to rtx_insn *.
	(arc_sets_cc_p): Likewise.  Also, convert a GET_CODE check to a
	dyn_cast to rtx_sequence *, using insn method for typesafety.
	* config/arc/arc.h (ADJUST_INSN_LENGTH): Add checked casts to
	rtx_sequence * and use insn method when invoking get_attr_length.
	* config/bfin/bfin.c (type_for_anomaly): Strengthen param from rtx
	to rtx_insn *.  Replace a GET_CODE check with a dyn_cast to
	rtx_sequence *, introducing a local "seq", using its insn method
	from typesafety and clarity.
	(add_sched_insns_for_speculation): Strengthen local "next" from
	rtx to rtx_insn *.
	* config/c6x/c6x.c (get_insn_side): Likewise for param "insn".
	(predicate_insn): Likewise.
	* config/cris/cris-protos.h (cris_notice_update_cc): Likewise for
	second param.
	* config/cris/cris.c (cris_notice_update_cc): Likewise.
	* config/epiphany/epiphany-protos.h
	(extern void epiphany_insert_mode_switch_use): Likewise for param
	"insn".
	(get_attr_sched_use_fpu): Likewise for param.
	* config/epiphany/epiphany.c (epiphany_insert_mode_switch_use):
	Likewise for param "insn".
	* config/epiphany/mode-switch-use.c (insert_uses): Likewise for
	param "insn" of "target_insert_mode_switch_use" callback.
	* config/frv/frv.c (frv_insn_unit): Likewise for param "insn".
	(frv_issues_to_branch_unit_p): Likewise.
	(frv_pack_insn_p): Likewise.
	(frv_compare_insns): Strengthen locals "insn1" and "insn2" from
	const rtx * (i.e. mutable rtx_def * const *) to
	rtx_insn * const *.
	* config/i386/i386-protos.h (standard_sse_constant_opcode):
	Strengthen first param from rtx to rtx_insn *.
	(output_fix_trunc): Likewise.
	* config/i386/i386.c (standard_sse_constant_opcode): Likewise.
	(output_fix_trunc): Likewise.
	(core2i7_first_cycle_multipass_filter_ready_try): Likewise for
	local "insn".
	(min_insn_size): Likewise for param "insn".
	(get_mem_group): Likewise.
	(is_cmp): Likewise.
	(get_insn_path): Likewise.
	(get_insn_group): Likewise.
	(count_num_restricted): Likewise.
	(fits_dispatch_window): Likewise.
	(add_insn_window): Likewise.
	(add_to_dispatch_window): Likewise.
	(debug_insn_dispatch_info_file): Likewise.
	* config/m32c/m32c-protos.h (m32c_output_compare): Likewise for
	first param.
	* config/m32c/m32c.c (m32c_compare_redundant): Likewise for param
	"cmp" and local "prev".
	(m32c_output_compare): Likewise for param "insn".
	* config/m32r/predicates.md (define_predicate "small_insn_p"): Add
	a checked cast to rtx_insn * on "op" after we know it's an INSN_P.
	(define_predicate "large_insn_p"): Likewise.
	* config/m68k/m68k-protos.h (m68k_sched_attr_size): Strengthen
	param from rtx to rtx_insn *.
	(attr_op_mem m68k_sched_attr_op_mem): Likewise.
	* config/m68k/m68k.c (sched_get_attr_size_int): Likewise.
	(m68k_sched_attr_size): Likewise.
	(sched_get_opxy_mem_type): Likewise for param "insn".
	(m68k_sched_attr_op_mem): Likewise.
	(sched_mem_operand_p): Likewise.
	* config/mep/mep-protos.h (mep_multi_slot): Likewise for param.
	* config/mep/mep.c (mep_multi_slot): Likewise.
	* config/mips/mips-protos.h (mips_output_sync_loop): Likewise for
	first param.
	(mips_sync_loop_insns): Likewise.
	* config/mips/mips.c (mips_print_operand_punctuation): Use insn
	method of "final_sequence" for typesafety.
	(mips_process_sync_loop): Strengthen param "insn" from rtx to
	rtx_insn *.
	(mips_output_sync_loop): Likewise.
	(mips_sync_loop_insns): Likewise.
	(mips_74k_agen_init): Likewise.
	(mips_sched_init): Use NULL rather than NULL_RTX when working with
	insns.
	* config/nds32/nds32-fp-as-gp.c (nds32_symbol_load_store_p):
	Strengthen param "insn" from rtx to rtx_insn *.
	* config/nds32/nds32.c (nds32_target_alignment): Likewise for
	local "insn".
	* config/pa/pa-protos.h (pa_insn_refs_are_delayed): Likewise for
	param.
	* config/pa/pa.c (pa_output_function_epilogue): Likewise for local
	"insn".  Use method of rtx_sequence for typesafety.
	(branch_to_delay_slot_p): Strengthen param "insn" from rtx to
	rtx_insn *.
	(branch_needs_nop_p): Likewise.
	(use_skip_p): Likewise.
	(pa_insn_refs_are_delayed): Likewise.
	* config/rl78/rl78.c (rl78_propogate_register_origins): Likewise
	for locals "insn", "ninsn".
	* config/rs6000/rs6000.c (is_microcoded_insn): Likewise for param
	"insn".
	(is_cracked_insn): Likewise.
	(is_branch_slot_insn): Likewise.
	(is_nonpipeline_insn): Likewise.
	(insn_terminates_group_p): Likewise.
	(insn_must_be_first_in_group): Likewise.
	(insn_must_be_last_in_group): Likewise.
	(force_new_group): Likewise for param "next_insn".
	* config/s390/s390.c (s390_get_sched_attrmask): Likewise for param
	"insn".
	(s390_sched_score): Likewise.
	* config/sh/sh-protos.h (output_branch): Likewise for param 2.
	(rtx sfunc_uses_reg): Likewise for sole param.
	* config/sh/sh.c (sh_print_operand): Use insn method of
	final_sequence for typesafety.
	(output_branch): Strengthen param "insn" from rtx to rtx_insn *.
	Use insn method of final_sequence for typesafety.
	(sfunc_uses_reg): Strengthen param "insn" from rtx to rtx_insn *.
	* config/sparc/sparc-protos.h (eligible_for_call_delay): Likewise
	for param.
	(eligible_for_return_delay): Likewise.
	(eligible_for_sibcall_delay): Likewise.
	* config/sparc/sparc.c (eligible_for_call_delay): Likewise.
	(eligible_for_return_delay): Likewise.
	(eligible_for_sibcall_delay): Likewise.
	* config/stormy16/stormy16-protos.h
	(xstormy16_output_cbranch_hi): Likewise for final param.
	(xstormy16_output_cbranch_si): Likewise.
	* config/stormy16/stormy16.c (xstormy16_output_cbranch_hi): LIkewise.
	(xstormy16_output_cbranch_si): Likewise.
	* config/v850/v850-protos.h (notice_update_cc): Likewise.
	* config/v850/v850.c (notice_update_cc): Likewise.

	* final.c (get_attr_length_1): Strengthen param "insn" and param
	of "fallback_fn" from rtx to rtx_insn *, eliminating a checked cast.
	(get_attr_length): Strengthen param "insn" from rtx to rtx_insn *.
	(get_attr_min_length): Likewise.
	(shorten_branches): Likewise for signature of locals "length_fun"
	and "inner_length_fun".  Introduce local rtx_sequence * "seqn"
	from a checked cast and use its methods for clarity and to enable
	strengthening local "inner_insn" from rtx to rtx_insn *.
	* genattr.c (gen_attr): When writing out the prototypes of the
	various generated "get_attr_" functions, strengthen the params of
	the non-const functions from rtx to rtx_insn *.
	Similarly, strengthen the params of insn_default_length,
	insn_min_length, insn_variable_length_p, insn_current_length.
	(main): Similarly, strengthen the param of num_delay_slots,
	internal_dfa_insn_code, insn_default_latency, bypass_p,
	insn_latency, min_issue_delay, print_reservation,
	insn_has_dfa_reservation_p and of the "internal_dfa_insn_code" and
	"insn_default_latency" callbacks.  Rename hook_int_rtx_unreachable
	to hook_int_rtx_insn_unreachable.
	* genattrtab.c (write_attr_get): When writing out the generated
	"get_attr_" functions, strengthen the param "insn" from rtx to
	rtx_insn *, eliminating a checked cast.
	(make_automaton_attrs): When writing out prototypes of
	"internal_dfa_insn_code_", "insn_default_latency_" functions
	and the "internal_dfa_insn_code" and "insn_default_latency"
	callbacks, strengthen their params from rtx to rtx_insn *
	* genautomata.c (output_internal_insn_code_evaluation): When
	writing out code, add a checked cast from rtx to rtx_insn * when
	invoking DFA_INSN_CODE_FUNC_NAME aka dfa_insn_code.
	(output_dfa_insn_code_func): Strengthen param of generated
	function "dfa_insn_code_enlarge" from rtx to rtx_insn *.
	(output_trans_func): Likewise for generated function
	"state_transition".
	(output_internal_insn_latency_func): When writing out generated
	function "internal_insn_latency", rename params from "insn" and
	"insn2" to "insn_or_const0" and "insn2_or_const0".  Reintroduce
	locals "insn" and "insn2" as rtx_insn * with checked casts once
	we've proven that we're not dealing with const0_rtx.
	(output_insn_latency_func):  Strengthen param of generated
	function "insn_latency" from rtx to rtx_insn *.
	(output_print_reservation_func): Likewise for generated function
	"print_reservation".
	(output_insn_has_dfa_reservation_p): Likewise for generated
	function "insn_has_dfa_reservation_p".
	* hooks.c (hook_int_rtx_unreachable): Rename to...
	(hook_int_rtx_insn_unreachable): ...this, and strengthen param
	from rtx to rtx_insn *.
	* hooks.h (hook_int_rtx_unreachable): Likewise.
	(extern int hook_int_rtx_insn_unreachable): Likewise.
	* output.h (get_attr_length): Strengthen param from rtx to rtx_insn *.
	(get_attr_min_length): Likewise.
	* recog.c (get_enabled_alternatives): Likewise.
	* recog.h (alternative_mask get_enabled_alternatives): Likewise.
	* reorg.c (find_end_label): Introduce local rtx "pat" and
	strengthen local "insn" from rtx to rtx_insn *.
	(redundant_insn): Use insn method of "seq" rather than element for
	typesafety; strengthen local "control" from rtx to rtx_insn *.
	* resource.c (mark_referenced_resources): Add checked cast to
	rtx_insn * within INSN/JUMP_INSN case.
	(mark_set_resources): Likewise.
	* sel-sched.c (estimate_insn_cost): Strengthen param "insn" from
	rtx to rtx_insn *.

From-SVN: r215271
2014-09-15 16:14:15 +00:00
David Malcolm a5d567ec32 params 2 and 3 of reg_set_between_p
gcc/ChangeLog:
	* config/alpha/alpha.c (alpha_ra_ever_killed): Replace NULL_RTX
	with NULL when dealing with an insn.
	* config/sh/sh.c (sh_reorg): Strengthen local "last_float_move"
	from rtx to rtx_insn *.
	* rtl.h (reg_set_between_p): Strengthen params 2 and 3 from
	const_rtx to const rtx_insn *.
	* rtlanal.c (reg_set_between_p): Likewise, removing a checked cast.

From-SVN: r215222
2014-09-12 14:04:35 +00:00
David Malcolm e8a54173bc 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 17:02:34 +00:00
David Malcolm 647d790d2f recog_memoized works on an rtx_insn *
gcc/ChangeLog:
2014-09-09  David Malcolm  <dmalcolm@redhat.com>

	* caller-save.c (rtx saveinsn): Strengthen this variable from rtx
	to rtx_insn *.
	(restinsn): Likewise.
	* config/aarch64/aarch64-protos.h (aarch64_simd_attr_length_move):
	Likewise for param.
	* config/aarch64/aarch64.c (aarch64_simd_attr_length_move):
	Likewise.
	* config/arc/arc-protos.h (arc_adjust_insn_length): Likewise for
	first param.
	(arc_hazard): Likewise for both params.
	* config/arc/arc.c (arc600_corereg_hazard): Likewise, adding
	checked casts to rtx_sequence * and uses of the insn method for
	type-safety.
	(arc_hazard): Strengthen both params from rtx to rtx_insn *.
	(arc_adjust_insn_length): Likewise for param "insn".
	(struct insn_length_parameters_s): Likewise for first param of
	"get_variants" callback field.
	(arc_get_insn_variants): Likewise for first param and local
	"inner".  Replace a check of GET_CODE with a dyn_cast to
	rtx_sequence *, using methods for type-safety and clarity.
	* config/arc/arc.h (ADJUST_INSN_LENGTH): Use casts to
	rtx_sequence * and uses of the insn method for type-safety when
	invoking arc_adjust_insn_length.
	* config/arm/arm-protos.h (arm_attr_length_move_neon): Likewise
	for param.
	(arm_address_offset_is_imm): Likewise.
	(struct tune_params): Likewise for params 1 and 3 of the
	"sched_adjust_cost" callback field.
	* config/arm/arm.c (cortex_a9_sched_adjust_cost): Likewise for
	params 1 and 3 ("insn" and "dep").
	(xscale_sched_adjust_cost): Likewise.
	(fa726te_sched_adjust_cost): Likewise.
	(cortexa7_older_only): Likewise for param "insn".
	(cortexa7_younger): Likewise.
	(arm_attr_length_move_neon): Likewise.
	(arm_address_offset_is_imm): Likewise.
	* config/avr/avr-protos.h (avr_notice_update_cc): Likewise.
	* config/avr/avr.c (avr_notice_update_cc): Likewise.
	* config/bfin/bfin.c (hwloop_pattern_reg): Likewise.
	(workaround_speculation): Likewise for local "last_condjump".
	* config/c6x/c6x.c (shadow_p): Likewise for param "insn".
	(shadow_or_blockage_p): Likewise.
	(get_unit_reqs): Likewise.
	(get_unit_operand_masks): Likewise.
	(c6x_registers_update): Likewise.
	(returning_call_p): Likewise.
	(can_use_callp): Likewise.
	(convert_to_callp): Likewise.
	(find_last_same_clock): Likwise for local "t".
	(reorg_split_calls): Likewise for local "shadow".
	(hwloop_pattern_reg): Likewise for param "insn".
	* config/frv/frv-protos.h (frv_final_prescan_insn): Likewise.
	* config/frv/frv.c (frv_final_prescan_insn): Likewise.
	(frv_extract_membar): Likewise.
	(frv_optimize_membar_local): Strengthen param "last_membar" from
	rtx * to rtx_insn **.
	(frv_optimize_membar_global): Strengthen param "membar" from rtx
	to rtx_insn *.
	(frv_optimize_membar): Strengthen local "last_membar" from rtx *
	to rtx_insn **.
	* config/ia64/ia64-protos.h (ia64_st_address_bypass_p): Strengthen
	both params from rtx to rtx_insn *.
	(ia64_ld_address_bypass_p): Likewise.
	* config/ia64/ia64.c (ia64_safe_itanium_class): Likewise for param
	"insn".
	(ia64_safe_type): Likewise.
	(group_barrier_needed): Likewise.
	(safe_group_barrier_needed): Likewise.
	(ia64_single_set): Likewise.
	(is_load_p): Likewise.
	(record_memory_reference): Likewise.
	(get_mode_no_for_insn): Likewise.
	(important_for_bundling_p): Likewise.
	(unknown_for_bundling_p): Likewise.
	(ia64_st_address_bypass_p): Likewise for both params.
	(ia64_ld_address_bypass_p): Likewise.
	(expand_vselect): Introduce new local rtx_insn * "insn", using it
	in place of rtx "x" after the emit_insn call.
	* config/i386/i386-protos.h (x86_extended_QIreg_mentioned_p):
	Strengthen param from rtx to rtx_insn *.
	(ix86_agi_dependent): Likewise for both params.
	(ix86_attr_length_immediate_default): Likewise for param 1.
	(ix86_attr_length_address_default): Likewise for param.
	(ix86_attr_length_vex_default): Likewise for param 1.
	* config/i386/i386.c (ix86_attr_length_immediate_default):
	Likewise for param "insn".
	(ix86_attr_length_address_default): Likewise.
	(ix86_attr_length_vex_default): Likewise.
	(ix86_agi_dependent): Likewise for both params.
	(x86_extended_QIreg_mentioned_p): Likewise for param "insn".
	(vselect_insn): Likewise for this variable.
	* config/m68k/m68k-protos.h (m68k_sched_attr_opx_type): Likewise
	for param 1.
	(m68k_sched_attr_opy_type): Likewise.
	* config/m68k/m68k.c (sched_get_operand): Likewise.
	(sched_attr_op_type): Likewise.
	(m68k_sched_attr_opx_type): Likewise.
	(m68k_sched_attr_opy_type): Likewise.
	(sched_get_reg_operand): Likewise.
	(sched_get_mem_operand): Likewise.
	(m68k_sched_address_bypass_p): Likewise for both params.
	(sched_get_indexed_address_scale): Likewise.
	(m68k_sched_indexed_address_bypass_p): Likewise.
	* config/m68k/m68k.h (m68k_sched_address_bypass_p): Likewise.
	(m68k_sched_indexed_address_bypass_p): Likewise.
	* config/mep/mep.c (mep_jmp_return_reorg): Strengthen locals
	"label", "ret" from rtx to rtx_insn *, adding a checked cast and
	removing another.
	* config/mips/mips-protos.h (mips_linked_madd_p): Strengthen both
	params from rtx to rtx_insn *.
	(mips_fmadd_bypass): Likewise.
	* config/mips/mips.c (mips_fmadd_bypass): Likewise.
	(mips_linked_madd_p): Likewise.
	(mips_macc_chains_last_hilo): Likewise for this variable.
	(mips_macc_chains_record): Likewise for param.
	(vr4130_last_insn): Likewise for this variable.
	(vr4130_swap_insns_p): Likewise for both params.
	(mips_ls2_variable_issue): Likewise for param.
	(mips_need_noat_wrapper_p): Likewise for param "insn".
	(mips_expand_vselect): Add a new local rtx_insn * "insn", using it
	in place of "x" after the emit_insn.
	* config/pa/pa-protos.h (pa_fpstore_bypass_p): Strengthen both
	params from rtx to rtx_insn *.
	* config/pa/pa.c (pa_fpstore_bypass_p): Likewise.
	(pa_combine_instructions): Introduce local "par" for result of
	gen_rtx_PARALLEL, moving decl and usage of new_rtx for after call
	to make_insn_raw.
	(pa_can_combine_p): Strengthen param "new_rtx" from rtx to rtx_insn *.
	* config/rl78/rl78.c (insn_ok_now): Likewise for param "insn".
	(rl78_alloc_physical_registers_op1): Likewise.
	(rl78_alloc_physical_registers_op2): Likewise.
	(rl78_alloc_physical_registers_ro1): Likewise.
	(rl78_alloc_physical_registers_cmp): Likewise.
	(rl78_alloc_physical_registers_umul): Likewise.
	(rl78_alloc_address_registers_macax): Likewise.
	(rl78_alloc_physical_registers): Likewise for locals "insn", "curr".
	* config/s390/predicates.md (execute_operation): Likewise for
	local "insn".
	* config/s390/s390-protos.h (s390_agen_dep_p): Likewise for both
	params.
	* config/s390/s390.c (s390_safe_attr_type): Likewise for param.
	(addr_generation_dependency_p): Likewise for param "insn".
	(s390_agen_dep_p): Likewise for both params.
	(s390_fpload_toreg): Likewise for param "insn".
	* config/sh/sh-protos.h (sh_loop_align): Likewise for param.
	* config/sh/sh.c (sh_loop_align): Likewise for param and local
	"next".
	* config/sh/sh.md (define_peephole2): Likewise for local "insn2".
	* config/sh/sh_treg_combine.cc
	(sh_treg_combine::make_inv_ccreg_insn): Likewise for return type
	and local "i".
	(sh_treg_combine::try_eliminate_cstores): Likewise for local "i".
	* config/stormy16/stormy16.c (combine_bnp): Likewise for locals
	"and_insn", "load", "shift".
	* config/tilegx/tilegx.c (match_pcrel_step2): Likewise for param
	"insn".
	* final.c (final_scan_insn): Introduce local rtx_insn * "other"
	for XEXP (note, 0) of the REG_CC_SETTER note.
	(cleanup_subreg_operands): Strengthen param "insn" from rtx to
	rtx_insn *, eliminating a checked cast made redundant by this.
	* gcse.c (process_insert_insn): Strengthen local "insn" from rtx
	to rtx_insn *.
	* genattr.c (main): When writing out the prototype to
	const_num_delay_slots, strengthen the param from rtx to
	rtx_insn *.
	* genattrtab.c (write_const_num_delay_slots): Likewise when
	writing out the implementation of const_num_delay_slots.
	* hw-doloop.h (struct hw_doloop_hooks): Strengthen the param
	"insn" of callback field "end_pattern_reg" from rtx to rtx_insn *.
	* ifcvt.c (noce_emit_store_flag): Eliminate local rtx "tmp" in
	favor of new rtx locals "src" and "set" and new local rtx_insn *
	"insn" and "seq".
	(noce_emit_move_insn): Strengthen locals "seq" and "insn" from rtx
	to rtx_insn *.
	(noce_emit_cmove): Eliminate local rtx "tmp" in favor of new rtx
	locals "cond", "if_then_else", "set" and new rtx_insn * locals
	"insn" and "seq".
	(noce_try_cmove_arith): Strengthen locals "insn_a" and "insn_b",
	"last" from rtx to rtx_insn *.  Likewise for a local "tmp",
	renaming to "tmp_insn".  Eliminate the other local rtx "tmp" from
	the top-level scope, replacing with new more tightly-scoped rtx
	locals "reg", "pat", "mem" and rtx_insn * "insn", "copy_of_a",
	"new_insn", "copy_of_insn_b", and make local rtx "set" more
	tightly-scoped.
	* ira-int.h (ira_setup_alts): Strengthen param "insn" from rtx to
	rtx_insn *.
	* ira.c (setup_prohibited_mode_move_regs): Likewise for local
	"move_insn".
	(ira_setup_alts): Likewise for param "insn".
	* lra-constraints.c (emit_inc): Likewise for local "add_insn".
	* lra.c (emit_add3_insn): Split local rtx "insn" in two, an rtx
	and an rtx_insn *.
	(lra_emit_add): Eliminate top-level local rtx "insn" in favor of
	new more-tightly scoped rtx locals "add3_insn", "insn",
	"add2_insn" and rtx_insn * "move_insn".
	* postreload-gcse.c (eliminate_partially_redundant_load): Add
	checked cast on result of gen_move_insn when invoking
	extract_insn.
	* recog.c (insn_invalid_p): Strengthen param "insn" from rtx to
	rtx_insn *.
	(verify_changes): Add a checked cast on "object" when invoking
	insn_invalid_p.
	(extract_insn_cached): Strengthen param "insn" from rtx to
	rtx_insn *.
	(extract_constrain_insn_cached): Likewise.
	(extract_insn): Likewise.
	* recog.h (insn_invalid_p): Likewise for param 1.
	(recog_memoized): Likewise for param.
	(extract_insn): Likewise.
	(extract_constrain_insn_cached): Likewise.
	(extract_insn_cached): Likewise.
	* reload.c (can_reload_into): Likewise for local "test_insn".
	* reload.h (cleanup_subreg_operands): Likewise for param.
	* reload1.c (emit_insn_if_valid_for_reload): Rename param from
	"insn" to "pat", reintroducing "insn" as an rtx_insn * on the
	result of emit_insn.  Remove a checked cast made redundant by this
	change.
	* sel-sched-ir.c (sel_insn_rtx_cost): Strengthen param "insn" from
	rtx to rtx_insn *.
	* sel-sched.c (get_reg_class): Likewise.

From-SVN: r215087
2014-09-09 16:34:56 +00:00
David Malcolm 7fa55ff675 Drop uncast_insn from param 1 of final_scan_insn
gcc/ChangeLog
2014-09-05  David Malcolm  <dmalcolm@redhat.com>

	* output.h (final_scan_insn): Strengthen first param from rtx to
	rtx_insn *.

	* final.c (final_scan_insn): Likewise, renaming it back from
	"uncast_insn" to "insn", eliminating the checked cast.

	* config/h8300/h8300.md (define_insn "jump"): Replace local rtx
	"vec" with an rtx_sequence * "seq", taking a copy of
	"final_sequence", and using methods of "seq" for clarity, and for
	type-safety in the calls to final_scan_insn.
	* config/mips/mips.c (mips_output_conditional_branch): Use methods
	of "final_sequence" for clarity, and for type-safety in the call to
	final_scan_insn.
	* config/sh/sh.c (print_slot): Strengthen param from rtx to
	rtx_sequence * and rename from "insn" to "seq".

From-SVN: r214961
2014-09-05 14:04:46 +00:00
Trevor Saunders e60365d30e use rtx_insn * a little more
gcc/ChangeLog:

2014-09-04  Trevor Saunders  <tsaunders@mozilla.com>

	* config/bfin/bfin.c, config/c6x/c6x.c, config/m32c/m32c.c,
	config/mn10300/mn10300.c, config/s390/s390.c, config/sh/sh.c,
	ifcvt.c, reorg.c: Change types of variables from rtx to rtx_insn *.

From-SVN: r214923
2014-09-04 21:11:34 +00:00
Trevor Saunders 19f8b22971 use rtx_code_label more
gcc/

	* asan.c, cfgexpand.c, config/alpha/alpha.md, config/arm/arm.c,
	config/epiphany/epiphany.md, config/h8300/h8300.c, config/i386/i386.md,
	config/m32r/m32r.c, config/mcore/mcore.md, config/mips/mips.c,
	config/mips/mips.md, config/nios2/nios2.c, config/pa/pa.c,
	config/s390/s390.c, config/s390/s390.md, config/sh/sh-mem.cc,
	config/sh/sh.c, config/sparc/sparc.c, dojump.c, function.c, optabs.c,
	stmt.c: Assign the result of gen_label_rtx to rtx_code_label * instead
	of rtx.

From-SVN: r214841
2014-09-03 00:52:11 +00:00
David Malcolm 17f385d8da Make insn_addresses_new require an rtx_insn
gcc/
2014-08-28  David Malcolm  <dmalcolm@redhat.com>

	* insn-addr.h (insn_addresses_new): Strengthen param "insn" from
	rtx to rtx_insn *.
	* config/s390/s390.c (s390_split_branches): Eliminate top-level
	local rtx "tmp", in favor of new local rtx "mem" and rtx_insn *
	"set_insn".
	(s390_mainpool_finish): In three places, split out a local rtx
	"insn" into a local rtx - "set" or "pat" - and a rtx_insn *
	"insn".  Strengthen local "pool_end" from rtx to rtx_code_label *
	 and split another local rtx "insn" out into rtx "pat" and
	rtx_insn * "insn".
	* config/sh/sh.c (output_branchy_insn): Rather than working
	directly on operands[9], introduce local rtx_code_label *
	variables named "lab" in two places, working on them, and then
	assigning them to operands[9], so that the intervening operations
	are known by the type system to be on insns.

From-SVN: r214701
2014-08-29 00:07:51 +00:00
David Malcolm b32d518945 NEXT_INSN and PREV_INSN take a const rtx_insn
gcc/
2014-08-28  David Malcolm  <dmalcolm@redhat.com>

	* rtl.h (RTX_PREV): Added checked casts to uses of PREV_INSN and
	NEXT_INSN.
	(PREV_INSN): Strengthen param from const_rtx to const rtx_insn *.
	(NEXT_INSN): Likewise.
	(JUMP_LABEL_AS_INSN): Add a "const" modifier to param.
	(reg_used_between_p): Strengthen params 2 and 3 from const_rtx to
	const rtx_insn *.
	(no_labels_between_p): Likewise for both params.

	* config/aarch64/aarch64.c (aarch64_output_casesi): Add a checked
	cast when using NEXT_INSN on operands[2].
	* config/alpha/alpha.c (alpha_set_memflags): Strengthen local
	"insn" from rtx to rtx_insn *, adding a checked cast.
	(alpha_handle_trap_shadows): Strengthen locals "i", "n" from rtx to
	rtx_insn *.
	* config/arc/arc-protos.h (arc_ccfsm_record_condition): Likewise
	for third param.
	(arc_text_label): Likewise for param "insn".
	* config/arc/arc.c (arc_expand_epilogue): Likewise for local
	"insn".
	(arc_ccfsm_record_condition): Likewise for param "jump".
	(arc_text_label): Likewise for local "label".
	* config/arc/arc.md (doloop_begin_i): Likewise for local "scan".
	Introduce a local "seq" via a dyn_cast to rtx_sequence *, and use
	a method for typesafety.  Add a checked cast.
	* config/arc/constraints.md (Clb): Add a checked cast when getting
	the CODE_LABEL from a LABEL_REF.
	* config/arm/arm.c (require_pic_register): Strengthen locals
	"seq", "insn" from rtx to rtx_insn *.
	(create_fix_barrier): Likewise for locals "selected", "next".
	(thumb1_reorg): Likewise for locals "prev", "insn".
	(arm_expand_prologue): Likewise for local "last".
	(thumb1_output_casesi): Add a checked cast when using NEXT_INSN on
	operands[0].
	(thumb2_output_casesi): Likewise for operands[2].
	* config/avr/avr-log.c (avr_log_vadump): Within 'L' case,
	strengthen local "insn" from rtx to rtx_insn *.
	* config/bfin/bfin.c (find_next_insn_start): Likewise for return
	type and param "insn".
	(find_prev_insn_start): Likewise.
	(hwloop_optimize): Likewise for locals "insn", "last_insn",
	"prev".
	(gen_one_bundle): Likewise for loal "t".
	(find_load): Likewise for param "insn".
	(workaround_speculation): Likewise for locals "insn", "next",
	"target", "next_tgt".
	* config/c6x/c6x.c (assign_reservations): Likewise for both params
	and for locals "insn", "within", "last".
	(count_unit_reqs): Likewise for params "head", "tail" and local
	"insn".
	(try_rename_operands): Likewise for params "head", "tail".
	(reshuffle_units): Likewise for locals "head", "tail", "insn".
	(struct c6x_sched_context): Likewise for fields
	"last_scheduled_insn", "last_scheduled_iter0".
	(init_sched_state): Replace NULL_RTX with NULL.
	(reorg_split_calls): Strengthen local "new_cycle_first" from rtx
	to rtx_insn *.
	(undo_split_delayed_nonbranch): Likewise for param and for local
	"prev".
	(conditionalize_after_sched): Likewise for local "insn".
	(bb_earliest_end_cycle): Likewise.
	(filter_insns_above): Likewise for locals "insn", "next".
	(hwloop_optimize): Remove redundant checked cast.
	(hwloop_fail): Strengthen local "t" from rtx to rtx_insn *.
	* config/cris/cris.c (cris_initial_frame_pointer_offset): Replace
	NULL_RTX with NULL.
	(cris_simple_epilogue): Likewise.
	(cris_expand_prologue): Likewise.
	(cris_expand_epilogue): Likewise.
	* config/frv/frv.c (frv_function_contains_far_jump): Strengthen
	local "insn" from rtx to rtx_insn *.
	(frv_ifcvt_modify_tests): Likewise for locals "last_insn", "insn".
	(struct frv_packet_group): Likewise for the elements within array
	fields "insns", "sorted", and for field "nop".
	(frv_packet): Likewise for the elements within array field
	"insns".
	(frv_add_insn_to_packet): Likewise for param "insn".
	(frv_insert_nop_in_packet): Likewise for param "insn" and local
	"last".
	(frv_for_each_packet): Likewise for locals "insn", "next_insn".
	(frv_sort_insn_group_1): Likewise for local "insn".
	(frv_optimize_membar_local): Likewise.
	(frv_align_label): Likewise for locals "x", "last", "barrier",
	"label".
	* config/ia64/ia64.c (last_scheduled_insn): Likewise for this
	local.
	(ia64_sched_init): Likewise for local "insn".
	(scheduled_good_insn): Likewise for param "last".
	(struct _ia64_sched_context): Likewise for field
	"last_scheduled_insn".
	(ia64_init_sched_context): Replace NULL_RTX with NULL.
	(struct bundle_state): Likewise for field "insn".
	(issue_nops_and_insn): Likewise for param "insn".
	(get_next_important_insn): Likewise for return type and both
	params.
	(ia64_add_bundle_selector_before): Likewise for param "insn".
	(bundling): Likewise for params "prev_head_insn", "tail" and
	locals "insn", "next_insn", "b".  Eliminate top-level local rtx
	"nop" in favor of new locals rtx "nop_pat" and rtx_insn *nop;
	* config/iq2000/iq2000-protos.h (iq2000_fill_delay_slot):
	Strengthen final param from rtx to rtx_insn *.
	(iq2000_move_1word): Likewise for second param.
	* config/iq2000/iq2000.c (iq2000_fill_delay_slot): Likewise for
	param "cur_insn" and local "next_insn".
	(iq2000_move_1word): Likewise for param "insn".
	* config/iq2000/iq2000.md (insn before ADDR_DIFF_VEC): Add checked
	casts when using NEXT_INSN on operands[1].
	* config/m32c/m32c.c (m32c_function_needs_enter): Strengthen local
	"insn" from rtx to rtx_insn *.
	* config/m68k/m68k.c (m68k_jump_table_ref_p): Split out uses of
	"x", introducing local rtx_insn * "insn" for when working with the
	CODE_LABEL of the LABEL_REF.
	(m68k_sched_md_init_global): Strengthen local "insn" from rtx to
	rtx_insn *.
	* config/mcore/mcore-protos.h (mcore_is_dead): Likewise for first
	param.
	* config/mcore/mcore.c (emit_new_cond_insn): Likewise for return
	type.
	(conditionalize_block): Likewise for return type and param.
	(mcore_is_dead): Likewise for param "first" and local "insn".
	(emit_new_cond_insn): Likewise for return type.
	(conditionalize_block): Likewise for return type, param, and
	locals "insn", "blk_1_br", "end_blk_2_insn", "start_blk_3_lab",
	"newinsn".
	(conditionalize_optimization): Likewise for local "insn".
	* config/mep/mep.c (mep_jmp_return_reorg): Add checked cast when
	using NEXT_INSN.
	* config/microblaze/microblaze.md: Add checked casts when using
	NEXT_INSN.
	* config/mips/mips.c (mips_expand_prologue): Eliminate top-level
	rtx "insn" in favor of various more tightly-scoped rtx "insn" and
	and rtx_insn * "insn".
	* config/mips/mips.md (casesi_internal_mips16_<mode>): Add a
	checked cast when using NEXT_INSN on operands[2].
	* config/mn10300/mn10300.c (mn10300_insert_setlb_lcc): Strengthen
	local "insn" from rtx to rtx_insn *.
	* config/nds32/nds32-fp-as-gp.c (nds32_fp_as_gp_check_available):
	Likewise.
	* config/nds32/nds32-md-auxiliary.c (nds32_output_casesi_pc_relative):
	Add a checked cast when using NEXT_INSN on operands[1].
	* config/pa/pa-protos.h (pa_following_call): Strengthen param from
	rtx to rtx_insn *.
	(pa_output_cbranch): Likewise for final param.
	(pa_output_lbranch): Likewise for second param.
	(pa_output_bb): Likewise for third param.
	(pa_output_bvb): Likewise.
	(pa_output_dbra): Likewise for second param.
	(pa_output_movb): Likewise.
	(pa_output_parallel_movb): Likewise.
	(pa_output_parallel_addb): Likewise.
	(pa_output_millicode_call): Likewise for first param.
	(pa_output_mul_insn): Likewise for second param.
	(pa_output_div_insn): Likewise for third param.
	(pa_output_mod_insn): Likewise for second param.
	(pa_jump_in_call_delay): Likewise for param.
	* config/pa/pa.c (pa_output_mul_insn): Likewise for param "insn".
	(pa_output_div_insn): Likewise.
	(pa_output_mod_insn): Likewise.
	(pa_output_cbranch): Likewise.
	(pa_output_lbranch): Likewise.
	(pa_output_bb): Likewise.
	(pa_output_bvb): Likewise.
	(pa_output_dbra): Likewise.
	(pa_output_movb): Likewise.
	(pa_output_millicode_call): Likewise; use method of rtx_sequence *
	to simplify and for typesafety.
	(pa_output_call): Use method of rtx_sequence *.
	(forward_branch_p): Strengthen param "insn" from rtx to rtx_insn *.
	(pa_jump_in_call_delay): Likewise.
	(pa_output_parallel_movb): Likewise.
	(pa_output_parallel_addb): Likewise.
	(pa_following_call): Likewise.
	(pa_combine_instructions): Likewise for locals "anchor",
	"floater".
	(pa_can_combine_p): Likewise for params "anchor", "floater" and
	locals "start", "end".
	* config/picochip/picochip.c (picochip_reset_vliw): Likewise for
	param "insn" and local "local_insn".
	(picochip_final_prescan_insn): Likewise for local "local_insn".
	* config/rs6000/rs6000.c (compute_save_world_info): Likewise for
	local "insn".
	(uses_TOC): Likewise.
	* config/s390/s390.c (get_some_local_dynamic_name): Likewise.
	(s390_mainpool_finish): Eliminate top-level local rtx "insn",
	splitting out to more tightly-scoped locals, 3 as rtx and one as
	rtx_insn *.
	(s390_optimize_nonescaping_tx): Strengthen local "tmp" from rtx
	to rtx_insn *.
	(s390_emit_prologue): Introduce a local "insn" to be an rtx_insn *
	where needed.
	* config/sh/sh-protos.h (barrier_align): Strenghten param from rtx
	to rtx_insn *.
	(fixup_addr_diff_vecs): Likewise.
	(reg_unused_after): Likewise for param 2.
	(sh_can_redirect_branch): Likewise for both params.
	(check_use_sfunc_addr): Likewise for param 1.
	* config/sh/sh.c (fixup_mova): Likewise for local "worker".
	(find_barrier): Likewise for local "last_got".
	(gen_block_redirect): Likewise for return type, param "jump" and
	locals "prev", "scan", "next", "insn".
	(struct far_branch): Likewise for fields "near_label",
	"insert_place", "far_label".
	(gen_far_branch): Likewise for local "jump".
	(fixup_addr_diff_vecs): Likewise for param "first" and locals
	"insn", "prev".
	(barrier_align): Likewise for param and for locals "prev", "x".
	Introduce local rtx_sequence * "prev_seq" and use insn method for
	typesafety and clarity.
	(sh_reorg): Strengthen local "scan" from rtx to rtx_insn *.
	(get_dest_uid): Likewise for local "dest".
	(split_branches): Likewise for locals "next", "beyond", "label",
	"block", "far_label".  Add checked casts when assigning to
	bp->far_label and "far_label".
	(reg_unused_after): Strengthen param "scan" from rtx to rtx_insn *.
	(sequence_insn_p): Likewise.
	(mark_constant_pool_use): Likewise for locals "insn", "lab".  Add a
	more loop-scoped rtx "insn" when walking LABEL_REFS.
	(sh_can_redirect_branch): Strengthen both params from rtx to
	rtx_insn *.
	(check_use_sfunc_addr): Likewise for param "insn".  Introduce a
	new local rtx_sequence * "seq" via a dyn_cast, and use a method
	for clarity and typesafety.
	* config/sh/sh.md (define_expand "epilogue"): Strengthen local
	"insn" from rtx to rtx_insn *.
	(define_insn "casesi_worker_1"): Add a checked cast to rtx_insn *
	when using NEXT_INSN on the CODE_LABEL in operands[2].
	(define_insn "casesi_worker_2"): Likewise.
	(define_insn "casesi_shift_media"): Likewise.
	(define_insn "casesi_load_media"): Likewise for the CODE_LABEL in
	operands[3].
	* config/sh/sh_optimize_sett_clrt.cc (struct ccreg_value):
	Strengthen field "insn" from rtx to rtx_insn *.
	(sh_optimize_sett_clrt::execute): Likewise for locals "next_i", "i".
	(sh_optimize_sett_clrt::find_last_ccreg_values): Likewise for
	param "start_insn" and local "start_insn".
	* config/sh/sh_treg_combine.cc (struct set_of_reg): Likewise for
	field "insn".
	(find_set_of_reg_bb): Likewise for param "insn".
	(trace_reg_uses_1): Likewise for param "start_insn" and local "i".
	(trace_reg_uses): Likewise for param "start_insn".
	(sh_treg_combine::cbranch_trace): Likewise for field
	"cbranch_insn".
	(sh_treg_combine::cbranch_trace::cbranch_trace): Likewise for
	param "insn".
	(sh_treg_combine::record_set_of_reg): Likewise for param
	"start_insn" and local "i".
	(sh_treg_combine::can_remove_cstore): Likewise for local
	"prev_insn".
	(sh_treg_combine::try_optimize_cbranch): Likewise for param
	"insn".
	(sh_treg_combine::execute): Likewise for local "i".
	* config/sparc/sparc-protos.h (empty_delay_slot): Likewise for
	param.
	(sparc_check_64): Likewise for second param.
	* config/sparc/sparc.c (sparc_do_work_around_errata): Likewise for
	locals "insn", "next".  Introduce local rtx_sequence * "seq" via a
	dyn_cast, using its insn method for typesafety and clarity.
	(empty_delay_slot): Strengthen param "insn" from rtx to
	rtx_insn *.
	(set_extends): Likewise.
	(sparc_check_64): Likewise.
	* config/stormy16/stormy16.c (xstormy16_split_cbranch): Likewise
	for locals "seq", "last_insn".
	(combine_bnp): Likewise for param "insn".
	(xstormy16_reorg): Likewise for local "insn".
	* config/v850/v850.c (substitute_ep_register): Likewise for params
	"first_insn", "last_insn" and local "insn".
	(v850_reorg): Likewise for fields "first_insn", "last_insn" within
	elements of "regs" array, and local "insn".
	* except.c (emit_note_eh_region_end): Likewise for param "insn".
	* final.c (final_sequence): Strengthen this global from rtx to
	rtx_sequence *.
	(shorten_branches): Strenthen locals "rel_lab", "prev" from rtx to
	rtx_insn *.
	(final_scan_insn): Update assignment to "final_sequence" to be
	from "seq", the cast version of "body", for type-safety.
	* function.c (assign_parm_setup_reg): Strengthen locals "insn",
	"insns" from rtx to rtx_insn *.
	(thread_prologue_and_epilogue_insns): Likewise for local "seq".
	* genattr.c (main): When writing out generated insn-attr.h,
	strengthen params 1 and 3 of eligible_for_delay,
	eligible_for_annul_true, eligible_for_annul_false from rtx to
	rtx_insn *.
	* genattrtab.c (write_eligible_delay): Likewise when writing out
	generated insn-attrtab.c; also local "insn" the generated
	functions.
	* hw-doloop.c (discover_loops): Strengthen local "insn" from rtx
	to rtx_insn *.
	* hw-doloop.h (struct GTY hwloop_info_d): Strengthen field
	"start_label" from rtx to rtx_insn *.
	* ira.c (decrease_live_ranges_number): Likewise for local "p".
	(ira_update_equiv_info_by_shuffle_insn): Likewise for param
	"insns" and local "insn".
	(validate_equiv_mem): Likewise for param "start" and local "insn".
	(memref_used_between_p): Likewise for params "start", "end" and
	local "insn".
	* ira.h (ira_update_equiv_info_by_shuffle_insn): Likewise for
	final param.
	* loop-doloop.c (doloop_optimize): Within region guarded by
	INSN_P (doloop_pat), introduce a new local rtx_insn *
	"doloop_insn" via a checked cast, and use it for typesafety,
	eventually writing the value back into doloop_pat.
	* output.h (final_sequence): Strengthen this global from rtx to
	rtx_sequence *.
	* recog.c (peep2_attempt): Rename param "insn" to "uncast_insn",
	reintroducing "insn" as an rtx_insn * via a checked cast.
	Strengthen param "attempt" and local "new_insn"from rtx to
	rtx_insn *.
	(peephole2_optimize): Strengthen locals "insn", "attempt" from rtx
	to rtx_insn *.
	* ree.c (emit_note_eh_region_end): Likewise for local "insn".
	* reload1.c (reload_as_needed): Eliminate top-level locals "x" and
	"p" in favor of more tightly-scoped replacements, sometimes rtx
	and sometimes rtx_insn *, as appropriate.
	(delete_output_reload): Eliminate top-level rtx "i1", splitting
	into two loop-scoped locals, one an rtx, the other an rtx_insn *.
	* reorg.c (delete_scheduled_jump): Add checked cast.  Strengthen
	local "trial" from rtx to rtx_insn *.
	(redirect_with_delay_slots_safe_p): Strengthen param "jump" from
	rtx to rtx_insn *.  Strenghten local "pat" from rtx to
	rtx_sequence * and use methods for clarity and typesafety.
	(redirect_with_delay_list_safe_p): Strengthen param "jump" from
	rtx to rtx_insn *.  Strenghten local "li" from rtx to
	rtx_insn_list * and use its methods for clarity and typesafety.
	(steal_delay_list_from_target): Strengthen param "insn" from rtx
	to rtx_insn *.
	(steal_delay_list_from_fallthrough): Likewise.
	(try_merge_delay_insns): Likewise for param "thread" and locals
	"trial", "next_trial", "delay_insn".
	(redundant_insn): Likewise for param "target" and local "trial".
	(own_thread_p): Likewise for param "thread" and locals
	"active_insn", "insn".
	(get_label_before): Likewise for param "insn".
	(fill_simple_delay_slots): Likewise for local "new_label"; use
	JUMP_LABEL_AS_INSN as necessary when calling own_thread_p.
	(label_before_next_insn): Strengthen return type and local "insn"
	from rtx to rtx_insn *.
	(relax_delay_slots): Likewise for locals "other", "tmp".
	(make_return_insns): Likewise for param "first" and locals "insn",
	"jump_insn", "prev".  Move declaration of "pat" to its assignment
	and strengthen from rtx to rtx_sequence *.  Use its methods for
	clarity and typesafety.
	* rtlanal.c (no_labels_between_p): Strengthen params from
	const_rtx to const rtx_insn *.  Strengthen local "p" from rtx to
	rtx_insn *.
	(reg_used_between_p): Strengthen params "from_insn", "to_insn"
	from const_rtx to const rtx_insn *.
	(reg_set_between_p): Rename param "from_insn" to
	"uncast_from_insn", and reintroduce "from_insn" as a
	const rtx_insn * via a checked cast.
	(modified_between_p): Likewise for param "start" as "uncast_start".
	(tablejump_p): Add a cast when invoking NEXT_INSN on "label".
	* sel-sched-ir.c (get_seqno_by_preds): Strengthen param and locals
	"tmp", head" from rtx to rtx_insn *.
	(recompute_rev_top_order): Likewise for local "insn".
	* sel-sched-ir.h (get_seqno_by_preds): Likewise for param.
	* store-motion.c (build_store_vectors): Likewise for local "insn".
	Strengthen local "st" from rtx to rtx_insn_list * and use methods
	for clarity and typesafety.
	* tree-ssa-loop-ivopts.c (seq_cost): Strengthen param "seq" from
	rtx to rtx_insn *.
	(computation_cost): Likewise for local "seq".
	(get_address_cost): Likewise.

/
2014-08-28  David Malcolm  <dmalcolm@redhat.com>

	* rtx-classes-status.txt (TODO): NEXT_INSN/PREV_INSN are done.

From-SVN: r214698
2014-08-28 21:29:38 +00:00
David Malcolm ac44248e6a Use rtx_insn for various target.def hooks
gcc/
2014-08-27  David Malcolm  <dmalcolm@redhat.com>

	* target.def (unwind_emit): Strengthen param "insn" from rtx to
	rtx_insn *.
	(final_postscan_insn): Likewise.
	(adjust_cost): Likewise.
	(adjust_priority): Likewise.
	(variable_issue): Likewise.
	(macro_fusion_pair_p): Likewise.
	(dfa_post_cycle_insn): Likewise.
	(first_cycle_multipass_dfa_lookahead_guard): Likewise.
	(first_cycle_multipass_issue): Likewise.
	(dfa_new_cycle): Likewise.
	(adjust_cost_2): Likewise for params "insn" and "dep_insn".
	(speculate_insn): Likewise for param "insn".
	(gen_spec_check): Likewise for params "insn" and "label".
	(get_insn_spec_ds): Likewise for param "insn".
	(get_insn_checked_ds): Likewise.
	(dispatch_do): Likewise.
	(dispatch): Likewise.
	(cannot_copy_insn_p): Likewise.
	(invalid_within_doloop): Likewise.
	(legitimate_combined_insn): Likewise.
	(needed): Likewise.
	(after): Likewise.

	* doc/tm.texi: Automatically updated to reflect changes to
	target.def.

	* haifa-sched.c (choose_ready): Convert NULL_RTX to NULL when
	working with insn.
	(schedule_block): Likewise.
	(sched_init): Likewise.
	(sched_speculate_insn): Strengthen param "insn" from rtx to
	rtx_insn *.
	(ready_remove_first_dispatch): Convert NULL_RTX to NULL when
	working with insn.
	* hooks.c (hook_bool_rtx_true): Rename to...
	hook_bool_rtx_insn_true): ...this, and strengthen first param from
	rtx to rtx_insn *.
	(hook_constcharptr_const_rtx_null): Rename to...
	(hook_constcharptr_const_rtx_insn_null): ...this, and strengthen
	first param from const_rtx to const rtx_insn *.
	(hook_bool_rtx_int_false): Rename to...
	(hook_bool_rtx_insn_int_false): ...this, and strengthen first
	param from rtx to rtx_insn *.
	(hook_void_rtx_int): Rename to...
	(hook_void_rtx_insn_int): ...this, and strengthen first param from
	rtx to rtx_insn *.

	* hooks.h (hook_bool_rtx_true): Rename to...
	(hook_bool_rtx_insn_true): ...this, and strengthen first param from
	rtx to rtx_insn *.
	(hook_bool_rtx_int_false): Rename to...
	(hook_bool_rtx_insn_int_false): ...this, and strengthen first
	param from rtx to rtx_insn *.
	(hook_void_rtx_int): Rename to...
	(hook_void_rtx_insn_int): ...this, and strengthen first param from
	rtx to rtx_insn *.
	(hook_constcharptr_const_rtx_null): Rename to...
	(hook_constcharptr_const_rtx_insn_null): ...this, and strengthen
	first param from const_rtx to const rtx_insn *.

	* sched-deps.c (sched_macro_fuse_insns): Strengthen param "insn"
	and local "prev" from rtx to rtx_insn *.

	* sched-int.h (sched_speculate_insn): Strengthen first param from
	rtx to rtx_insn *.

	* sel-sched.c (create_speculation_check): Likewise for local "label".
	* targhooks.c (default_invalid_within_doloop): Strengthen param
	"insn" from const_rtx to const rtx_insn *.
	* targhooks.h (default_invalid_within_doloop): Strengthen param
	from const_rtx to const rtx_insn *.

	* config/alpha/alpha.c (alpha_cannot_copy_insn_p): Likewise.
	(alpha_adjust_cost): Likewise for params "insn", "dep_insn".

	* config/arc/arc.c (arc_sched_adjust_priority): Likewise for param
	"insn".
	(arc_invalid_within_doloop): Likewise, with const.

	* config/arm/arm.c (arm_adjust_cost): Likewise for params "insn", "dep".
	(arm_cannot_copy_insn_p): Likewise for param "insn".
	(arm_unwind_emit): Likewise.

	* config/bfin/bfin.c (bfin_adjust_cost): Likewise for params "insn",
	"dep_insn".

	* config/c6x/c6x.c (c6x_dfa_new_cycle): Likewise for param "insn".
	(c6x_variable_issue): Likewise.  Removed now-redundant checked
	cast.
	(c6x_adjust_cost): Likewise for params "insn", "dep_insn".

	* config/epiphany/epiphany-protos.h (epiphany_mode_needed):
	Likewise for param "insn".
	(epiphany_mode_after): Likewise.
	* config/epiphany/epiphany.c (epiphany_adjust_cost): Likewise for
	params "insn", "dep_insn".
	(epiphany_mode_needed): Likewise for param "insn".
	(epiphany_mode_after): Likewise.

	* config/i386/i386-protos.h (i386_pe_seh_unwind_emit): Likewise.
	* config/i386/i386.c (ix86_legitimate_combined_insn): Likewise.
	(ix86_avx_u128_mode_needed): Likewise.
	(ix86_i387_mode_needed): Likewise.
	(ix86_mode_needed): Likewise.
	(ix86_avx_u128_mode_after): Likewise.
	(ix86_mode_after): Likewise.
	(ix86_adjust_cost): Likewise for params "insn", "dep_insn".
	(ix86_macro_fusion_pair_p): Likewise for params "condgen", "condjmp".
	(ix86_adjust_priority): Likewise for param "insn".
	(core2i7_first_cycle_multipass_issue): Likewise for param "insn".
	(do_dispatch): Likewise.
	(has_dispatch): Likewise.
	* config/i386/winnt.c (i386_pe_seh_unwind_emit): Likewise.

	* config/ia64/ia64.c (TARGET_INVALID_WITHIN_DOLOOP): Update to
	reflect renaming of default hook implementation from
	hook_constcharptr_const_rtx_null to
	hook_constcharptr_const_rtx_insn_null.
	(ia64_adjust_cost_2): Strengthen params "insn", "dep_insn" from
	rtx to rtx_insn *.
	(ia64_variable_issue): Likewise for param "insn".
	(ia64_first_cycle_multipass_dfa_lookahead_guard): Likewise.
	(ia64_dfa_new_cycle): Likewise.
	(ia64_get_insn_spec_ds): Likewise.
	(ia64_get_insn_checked_ds): Likewise.
	(ia64_speculate_insn): Likewise.
	(ia64_gen_spec_check): Likewise for params "insn", "label".
	(ia64_asm_unwind_emit): Likewise for param "insn".

	* config/m32r/m32r.c (m32r_adjust_priority): Likewise.

	* config/m68k/m68k.c (m68k_sched_adjust_cost): Likewise for params
	"insn", "def_insn".
	(m68k_sched_variable_issue): Likewise for param "insn".

	* config/mep/mep.c (mep_adjust_cost): Likewise for params "insn",
	"def_insn".

	* config/microblaze/microblaze.c (microblaze_adjust_cost):
	Likewise for params "insn", "dep".

	* config/mips/mips.c (mips_adjust_cost): Likewise.
	(mips_variable_issue): Likewise for param "insn".
	(mips_final_postscan_insn): Likewise.

	* config/mn10300/mn10300.c (mn10300_adjust_sched_cost): Likewise
	for params "insn", "dep".

	* config/pa/pa.c (pa_adjust_cost): Likewise for params "insn",
	"dep_insn".
	(pa_adjust_priority): Likewise for param "insn".

	* config/picochip/picochip.c (picochip_sched_adjust_cost):
	Likewise for params "insn", "dep_insn".

	* config/rs6000/rs6000.c (rs6000_variable_issue_1): Likewise for
	param "insn".
	(rs6000_variable_issue): Likewise.
	(rs6000_adjust_cost): Likewise for params "insn", "dep_insn".
	(rs6000_debug_adjust_cost): Likewise.
	(rs6000_adjust_priority): Likewise for param "insn".
	(rs6000_use_sched_lookahead_guard): Likewise.
	(get_next_active_insn): Likewise for return type and both params.
	(redefine_groups): Likewise for params "prev_head_insn", "tail"
	and locals "insn", "next_insn".
	(pad_groups): Likewise.

	* config/s390/s390.c (s390_adjust_priority): Likewise for param
	"insn".
	(s390_cannot_copy_insn_p): Likewise.
	(s390_sched_variable_issue): Likewise for third param, eliminating
	checked cast.
	(TARGET_INVALID_WITHIN_DOLOOP): Update to reflect renaming of
	default hook implementation from hook_constcharptr_const_rtx_null
	to hook_constcharptr_const_rtx_insn_null.

	* config/sh/sh.c (sh_cannot_copy_insn_p): Strengthen param "insn"
	from rtx to rtx_insn *.
	(sh_adjust_cost): Likewise for params "insn", "dep_insn".
	(sh_variable_issue): Likewise for param "insn".
	(sh_dfa_new_cycle): Likewise.
	(sh_mode_needed): Likewise.
	(sh_mode_after): Likewise.

	* config/sparc/sparc.c (supersparc_adjust_cost): Likewise for
	params "insn", "dep_insn".
	(hypersparc_adjust_cost): Likewise.
	(sparc_adjust_cost): Likewise.

	* config/spu/spu.c (spu_sched_variable_issue): Likewise for third
	param, eliminated checked cast.
	(spu_sched_adjust_cost): Likewise for first and third params.

	* config/tilegx/tilegx.c (tilegx_sched_adjust_cost): Strengthen
	params "insn" and "dep_insn" from rtx to rtx_insn *.

	* config/tilepro/tilepro.c (tilepro_sched_adjust_cost): Likewise.

From-SVN: r214584
2014-08-27 19:34:13 +00:00
David Malcolm ce1ce33a03 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 21:19:23 +00:00
David Malcolm 6cb7eb4173 config/sh: Use rtx_insn and rtx_code_label
gcc/
	* config/sh/sh-protos.h (output_ieee_ccmpeq): Strengthen param 1
	from rtx to rtx_insn *.
	(output_branchy_insn): Likewise for param 3.
	(output_far_jump): Likewise for param 1.
	(final_prescan_insn): Likewise.
	(sh_insn_length_adjustment): Likewise for sole param.

	* config/sh/sh.c (expand_cbranchsi4): Likewise for local "jump".
	(expand_cbranchdi4): Strengthen local "skip_label" from rtx to
	rtx_code_label *.
	(sh_emit_compare_and_set): Likewise for local "lab".
	(output_far_jump): Strengthen param "insn" and local "prev" from
	rtx to rtx_insn *.
	(output_branchy_insn): Likewise for param "insn" and local
	"next_insn".
	(output_ieee_ccmpeq): Likewise for param "insn".
	(struct label_ref_list_d): Strengthen field "label" from rtx to
	rtx_code_label *.
	(pool_node): Likewise.
	(pool_window_label): Likewise for this global.
	(add_constant): Likewise for return type and locals "lab", "new_rtx".
	(dump_table): Strengthen params "start", "barrier" and local
	"scan" from rtx to rtx_insn *.
	(broken_move): Likewise for param "insn".
	(untangle_mova): Likewise for params "first_mova" and "new_mova".
	Strengthen param "first_mova" from rtx * to rtx_insn **.
	(mova_p): Likewise for param "insn".
	(fixup_mova): Likewise for param "mova".
	(find_barrier): Likewise for return type, params "mova" and
	"from", and locals "barrier_before_mova", "found_barrier",
	"good_barrier", "orig", "last_symoff", "next".  Strengthen local
	"label" from rtx to rtx_code_label *.
	(sh_loop_align): Strengthen locals "first", "insn", "mova" from
	rtx to rtx_insn *.
	(sh_reorg): Likewise for locals "link", "scan", "barrier".
	(split_branches): Likewise for param "first" and local "insn".
	(final_prescan_insn): Likewise for param "insn".
	(sequence_insn_p): Likewise for locals "prev", "next".
	(sh_insn_length_adjustment): Likewise for param "insn".
	(sh_can_redirect_branch): Likewise for local "insn".
	(find_r0_life_regions): Likewise for locals "end", "insn".
	(sh_output_mi_thunk): Likewise for local "insns".

From-SVN: r214459
2014-08-25 19:22:04 +00:00
Oleg Endo 37c5f877a4 re PR target/61996 ([SH] -musermode conflicts with -matomic-model=soft-imask)
gcc/
	PR target/61996
	* config/sh/sh.opt (musermode): Allow negative form.
	* config/sh/sh.c (sh_option_override): Disable TARGET_USERMODE for
	targets that don't support it.
	* doc/invoke.texi (SH Options): Rename sh-*-linux* to sh*-*-linux*.
	Document -mno-usermode option.

gcc/testsuite

	PR target/61996
	* gcc.target/sh/pr61996.c: New.

From-SVN: r214406
2014-08-24 10:46:25 +00:00
David Malcolm 52d251b522 get_ebb_head_tail works with rtx_insn
gcc/
	* sched-int.h (get_ebb_head_tail): Strengthen params "headp" and
	"tailp" from rtx * to rtx_insn **.

	* ddg.c (build_intra_loop_deps): Strengthen locals head", "tail"
	from rtx to rtx_insn *.
	* haifa-sched.c (get_ebb_head_tail): Strengthen params "headp" and
	"tailp" from rtx * to rtx_insn **.  Strengthen locals "beg_head",
	"beg_tail", "end_head", "end_tail", "note", "next", "prev" from
	rtx to rtx_insn *.
	* modulo-sched.c (const_iteration_count): Strengthen return type
	and locals "insn", "head", "tail" from rtx to rtx_insn *.  Replace
	use of NULL_RTX with NULL when working with insns.
	(loop_single_full_bb_p): Strengthen locals "head", "tail" from rtx
	to rtx_insn *.
	(sms_schedule): Likewise.
	* sched-rgn.c (init_ready_list): Likewise, also for locals
	"src_head" and "src_next_tail".
	(compute_block_dependences): Likewise.
	(free_block_dependencies): Likewise.
	(debug_rgn_dependencies): Likewise.
	(free_rgn_deps): Likewise.
	(compute_priorities): Likewise.
	(schedule_region): Likewise.
	* sel-sched.c (find_ebb_boundaries): Likewise.

	* config/sh/sh.c (find_insn_regmode_weight): Strengthen locals
	"insn", "next_tail", "head", "tail" from rtx to rtx_insn *.

From-SVN: r214352
2014-08-22 18:47:27 +00:00
David Malcolm cd459bf87c emit_* functions return rtx_insn
2014-08-19  David Malcolm  <dmalcolm@redhat.com>

	* emit-rtl.h (emit_copy_of_insn_after): Strengthen return type
	from rtx to rtx_insn *.

	* rtl.h (emit_insn_before): Likewise.
	(emit_insn_before_noloc): Likewise.
	(emit_insn_before_setloc): Likewise.
	(emit_jump_insn_before): Likewise.
	(emit_jump_insn_before_noloc): Likewise.
	(emit_jump_insn_before_setloc): Likewise.
	(emit_call_insn_before): Likewise.
	(emit_call_insn_before_noloc): Likewise.
	(emit_call_insn_before_setloc): Likewise.
	(emit_debug_insn_before): Likewise.
	(emit_debug_insn_before_noloc): Likewise.
	(emit_debug_insn_before_setloc): Likewise.
	(emit_label_before): Likewise.
	(emit_insn_after): Likewise.
	(emit_insn_after_noloc): Likewise.
	(emit_insn_after_setloc): Likewise.
	(emit_jump_insn_after): Likewise.
	(emit_jump_insn_after_noloc): Likewise.
	(emit_jump_insn_after_setloc): Likewise.
	(emit_call_insn_after): Likewise.
	(emit_call_insn_after_noloc): Likewise.
	(emit_call_insn_after_setloc): Likewise.
	(emit_debug_insn_after): Likewise.
	(emit_debug_insn_after_noloc): Likewise.
	(emit_debug_insn_after_setloc): Likewise.
	(emit_label_after): Likewise.
	(emit_insn): Likewise.
	(emit_debug_insn): Likewise.
	(emit_jump_insn): Likewise.
	(emit_call_insn): Likewise.
	(emit_label): Likewise.
	(gen_clobber): Likewise.
	(emit_clobber): Likewise.
	(gen_use): Likewise.
	(emit_use): Likewise.
	(emit): Likewise.

	(emit_barrier_before): Strengthen return type from rtx to
	rtx_barrier *.
	(emit_barrier_after): Likewise.
	(emit_barrier): Likewise.

	* emit-rtl.c (emit_pattern_before_noloc):  Strengthen return type
	from rtx to rtx_insn *.  Add checked casts for now when converting
	"last" from rtx to rtx_insn *.
	(emit_insn_before_noloc): Likewise for return type.
	(emit_jump_insn_before_noloc): Likewise.
	(emit_call_insn_before_noloc): Likewise.
	(emit_debug_insn_before_noloc): Likewise.
	(emit_barrier_before): Strengthen return type and local "insn"
	from rtx to rtx_barrier *.
	(emit_label_before): Strengthen return type from rtx to
	rtx_insn *.  Add checked cast for now when returning param
	(emit_pattern_after_noloc): Strengthen return type from rtx to
	rtx_insn *.  Add checked casts for now when converting "last" from
	rtx to rtx_insn *.
	(emit_insn_after_noloc): Strengthen return type from rtx to
	rtx_insn *.
	(emit_jump_insn_after_noloc): Likewise.
	(emit_call_insn_after_noloc): Likewise.
	(emit_debug_insn_after_noloc): Likewise.
	(emit_barrier_after): Strengthen return type from rtx to
	rtx_barrier *.
	(emit_label_after): Strengthen return type from rtx to rtx_insn *.
	Add checked cast for now when converting "label" from rtx to
	rtx_insn *.
	(emit_pattern_after_setloc): Strengthen return type from rtx to
	rtx_insn *.  Add checked casts for now when converting "last" from
	rtx to rtx_insn *.
	(emit_pattern_after): Strengthen return type from rtx to
	rtx_insn *.
	(emit_insn_after_setloc): Likewise.
	(emit_insn_after): Likewise.
	(emit_jump_insn_after_setloc): Likewise.
	(emit_jump_insn_after): Likewise.
	(emit_call_insn_after_setloc): Likewise.
	(emit_call_insn_after): Likewise.
	(emit_debug_insn_after_setloc): Likewise.
	(emit_debug_insn_after): Likewise.
	(emit_pattern_before_setloc): Likewise.  Add checked casts for now
	when converting "last" from rtx to rtx_insn *.
	(emit_pattern_before): Strengthen return type from rtx to
	rtx_insn *.
	(emit_insn_before_setloc): Likewise.
	(emit_insn_before): Likewise.
	(emit_jump_insn_before_setloc): Likewise.
	(emit_jump_insn_before): Likewise.
	(emit_call_insn_before_setloc): Likewise.
	(emit_call_insn_before): Likewise.
	(emit_debug_insn_before_setloc): Likewise.
	(emit_debug_insn_before): Likewise.
	(emit_insn): Strengthen return type and locals "last", "insn",
	"next" from rtx to rtx_insn *.  Add checked cast to rtx_insn
	within cases where we know we have an insn.
	(emit_debug_insn): Likewise.
	(emit_jump_insn): Likewise.
	(emit_call_insn): Strengthen return type and local "insn" from rtx
	to rtx_insn *.
	(emit_label): Strengthen return type from rtx to rtx_insn *.  Add
	a checked cast to rtx_insn * for now on "label".
	(emit_barrier): Strengthen return type from rtx to rtx_barrier *.
	(emit_clobber): Strengthen return type from rtx to rtx_insn *.
	(emit_use): Likewise.
	(gen_use): Likewise, also for local "seq".
	(emit): Likewise for return type and local "insn".
	(rtx_insn): Likewise for return type and local "new_rtx".

	* cfgrtl.c (emit_barrier_after_bb): Strengthen local "barrier"
	from rtx to rtx_barrier *.

	* config/sh/sh.c (output_stack_adjust): Since emit_insn has
	changed return type from rtx to rtx_insn *, we must update
	"emit_fn" type, and this in turn means updating...
	(frame_insn): ...this.  Strengthen return type from rtx to
	rtx_insn *.  Introduce a new local "insn" of the appropriate type.

From-SVN: r214194
2014-08-19 20:36:20 +00:00
David Malcolm eb51c837dd Strengthen return types of various {next|prev}_*insn from rtx to rtx_insn *
2014-08-19  David Malcolm  <dmalcolm@redhat.com>

	* rtl.h (previous_insn): Strengthen return type from rtx to
	rtx_insn *.
	(next_insn): Likewise.
	(prev_nonnote_insn): Likewise.
	(prev_nonnote_insn_bb): Likewise.
	(next_nonnote_insn): Likewise.
	(next_nonnote_insn_bb): Likewise.
	(prev_nondebug_insn): Likewise.
	(next_nondebug_insn): Likewise.
	(prev_nonnote_nondebug_insn): Likewise.
	(next_nonnote_nondebug_insn): Likewise.
	(prev_real_insn): Likewise.
	(next_real_insn): Likewise.
	(prev_active_insn): Likewise.
	(next_active_insn): Likewise.

	* emit-rtl.c (next_insn): Strengthen return type from rtx to
	rtx_insn *, adding a checked cast.
	(previous_insn): Likewise.
	(next_nonnote_insn): Likewise.
	(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.

	* config/sh/sh-protos.h (sh_find_set_of_reg): Convert function ptr
	param "stepfunc" so that it returns an rtx_insn * rather than an
	rtx, to track the change to prev_nonnote_insn_bb, which is the
	only function this is called with.
	* config/sh/sh.c (sh_find_set_of_reg): Likewise.

From-SVN: r214178
2014-08-19 17:39:08 +00:00
Trevor Saunders 9f25a338f9 remove pointer-set.[ch]
gcc/

	* Makefile.in: Remove references to pointer-set.c and pointer-set.h.
	* alias.c, cfgexpand.c, cgraphbuild.c,
	config/aarch64/aarch64-builtins.c, config/aarch64/aarch64.c,
	config/alpha/alpha.c, config/darwin.c, config/i386/i386.c,
	config/i386/winnt.c, config/ia64/ia64.c, config/m32c/m32c.c,
	config/mep/mep.c, config/mips/mips.c, config/rs6000/rs6000.c,
	config/s390/s390.c, config/sh/sh.c, config/sparc/sparc.c,
	config/spu/spu.c, config/stormy16/stormy16.c, config/tilegx/tilegx.c,
	config/tilepro/tilepro.c, config/xtensa/xtensa.c, dominance.c,
	dse.c, except.c, gengtype.c, gimple-expr.c,
	gimple-ssa-strength-reduction.c, gimplify.c, ifcvt.c,
	ipa-visibility.c, lto-streamer.h, omp-low.c, predict.c, stmt.c,
	tree-affine.c, tree-cfg.c, tree-eh.c, tree-inline.c, tree-nested.c,
	tree-scalar-evolution.c, tree-ssa-loop-im.c, tree-ssa-loop-niter.c,
	tree-ssa-phiopt.c, tree-ssa-structalias.c, tree-ssa-uninit.c,
	tree-ssa.c, tree.c, var-tracking.c, varpool.c: Remove includes of
	pointer-set.h.
	* pointer-set.c: Remove file.
	* pointer-set.h: Remove file.

gcc/c-family/

	* c-gimplify.c, cilk.c: Remove includes of pointer-set.h.

gcc/c/

	* c-typeck.c: Remove include of pointer-set.h.

gcc/cp/

	* class.c, cp-gimplify.c, decl.c, decl2.c, error.c, method.c,
	optimize.c, pt.c, semantics.c: Remove includes of pointer-set.h.

From-SVN: r213738
2014-08-07 20:52:50 +00:00
Oleg Endo 79a1fe43fb re PR target/61844 (ICE when building libgcc for sh64 cross-compiler)
gcc/
	PR target/61844
	* config/sh/sh.c (sh_legitimate_address_p,
	sh_legitimize_reload_address): Handle reg+reg address modes when
	ALLOW_INDEXED_ADDRESS is false.
	* config/sh/predicates.md (general_movsrc_operand,
	general_movdst_operand): Likewise.

From-SVN: r213381
2014-07-31 16:27:56 +00:00
Christian Bruel cbb1e3d98c Support mode toggle.
* mode-switching.c (struct bb_info): Add mode_out, mode_in caches.
(make_preds_opaque): Delete.
(clear_mode_bit, mode_bit_p, set_mode_bit): New macros.
(commit_mode_sets): New function.
(optimize_mode_switching): Handle current_mode to mode_switching_emit.
Process all modes at once.
* basic-block.h (pre_edge_lcm_avs): Declare.
* lcm.c (pre_edge_lcm_avs): Renamed from pre_edge_lcm.
Call clear_aux_for_edges. Fix comments.
(pre_edge_lcm): New wrapper function to call pre_edge_lcm_avs.
(pre_edge_rev_lcm): Idem.
* config/epiphany/epiphany.c (emit_set_fp_mode): Add prev_mode parameter.
* config/epiphany/epiphany-protos.h (emit_set_fp_mode): Idem.
* config/epiphany/resolve-sw-modes.c (pass_resolve_sw_modes::execute): Idem.
* config/i386/i386.c (x96_emit_mode_set): Idem.
* config/sh/sh.c (sh_emit_mode_set): Likewise. Handle PR toggle.
* config/sh/sh.md (toggle_pr): 	Defined if TARGET_FPU_SINGLE.
(fpscr_toggle) Disallow from delay slot.
* target.def (emit_mode_set): Add prev_mode parameter.
* doc/tm.texi: Regenerate.

From-SVN: r212230
2014-07-02 15:03:14 +02:00
Kaz Kojima be6b0becc0 re PR target/61550 ([SH] build failure with ICE in gen_reg_rtx, at emit-rtl.c:943)
PR target/61550
	* config/sh/sh.c (prepare_move_operands): Don't process TLS
	addresses here if reload in progress or completed.

From-SVN: r211807
2014-06-18 22:11:55 +00:00
Andrew MacLeod 9b2b72791e expr.h: Remove prototypes of functions defined in builtins.c.
* expr.h: Remove prototypes of functions defined in builtins.c.
	* tree.h: (build_call_expr_*, build_string_literal): Add prototypes.
	Remove prototypes of functions defined in builtins.c.
	* builtins.h: Update prototype list to include all exported functions.
	* builtins.c: (default_libc_has_function, gnu_libc_has_function,
	no_c99_libc_has_function): Move to targhooks.c
	(build_string_literal, build_call_expr_loc_array,
	build_call_expr_loc_vec, build_call_expr_loc, build_call_expr): Move
	to tree.c.
	(expand_builtin_object_size, fold_builtin_object_size): Make static.
	* targhooks.c (default_libc_has_function, gnu_libc_has_function,
	no_c99_libc_has_function): Relocate from builtins.c.
	* tree.c: Include builtins.h.
	(build_call_expr_loc_array, build_call_expr_loc_vec,
	build_call_expr_loc, build_call_expr, build_string_literal): Relocate
	from builtins.c.
	* fold-const.h (fold_fma): Move prototype to builtins.h.
	* realmpfr.h (do_mpc_arg2): Move prototype to builtins.h.

	* fortran/trans.c (trans_runtime_error_vararg): Call
	fold_build_call_array_loc instead of fold_builtin_call_array.

	* asan.c: Include builtins.h.
	* cfgexpand.c: Likewise.
	* convert.c: Likewise.
	* emit-rtl.c: Likewise.
	* except.c: Likewise.
	* expr.c: Likewise.
	* fold-const.c: Likewise.
	* gimple-fold.c: Likewise.
	* gimple-ssa-strength-reduction.c: Likewise.
	* gimplify.c: Likewise.
	* ipa-inline.c: Likewise.
	* ipa-prop.c: Likewise.
	* lto-streamer-out.c: Likewise.
	* stmt.c: Likewise.
	* tree-inline.c: Likewise.
	* tree-object-size.c: Likewise.
	* tree-sra.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-forwprop.c: Likewise.
	* tree-ssa-loop-ivcanon.c: Likewise.
	* tree-ssa-loop-ivopts.c: Likewise.
	* tree-ssa-math-opts.c: Likewise.
	* tree-ssa-reassoc.c: Likewise.
	* tree-ssa-threadedge.c: Likewise.
	* tree-streamer-in.c: Likewise.
	* tree-vect-data-refs.c: Likewise.
	* tree-vect-patterns.c: Likewise.
	* tree-vect-stmts.c: Likewise.

	c
	* c-decl.c: Include builtins.h.
	* c-parser.c: Likewise.

	cp
	* decl.c: Include builtins.h.
	* semantics.c: Likewise.

	go
	* go-gcc.cc: Include builtins.h.

	lto
	* lto-symtab.c: Include builtins.h.

	config
	* aarch64/aarch64.c: Include builtins.h.
	* alpha/alpha.c: Likewise.
	* arc/arc.c: Likewise.
	* arm/arm.c: Likewise.
	* avr/avr.c: Likewise.
	* bfin/bfin.c: Likewise.
	* c6x/c6x.c: Likewise.
	* cr16/cr16.c: Likewise.
	* cris/cris.c: Likewise.
	* epiphany/epiphany.c: Likewise.
	* fr30/fr30.c: Likewise.
	* frv/frv.c: Likewise.
	* h8300/h8300.c: Likewise.
	* i386/i386.c: Likewise.
	* i386/winnt.c: Likewise.
	* ia64/ia64.c: Likewise.
	* iq2000/iq2000.c: Likewise.
	* lm32/lm32.c: Likewise.
	* m32c/m32c.c: Likewise.
	* m32r/m32r.c: Likewise.
	* m68k/m68k.c: Likewise.
	* mcore/mcore.c: Likewise.
	* mep/mep.c: Likewise.
	* microblaze/microblaze.c: Likewise.
	* mips/mips.c: Likewise.
	* mmix/mmix.c: Likewise.
	* mn10300/mn10300.c: Likewise.
	* moxie/moxie.c: Likewise.
	* msp430/msp430.c: Likewise.
	* nds32/nds32.c: Likewise.
	* pa/pa.c: Likewise.
	* pdp11/pdp11.c: Likewise.
	* picochip/picochip.c: Likewise.
	* rl78/rl78.c: Likewise.
	* rs6000/rs6000.c: Likewise.
	* rx/rx.c: Likewise.
	* s390/s390.c: Likewise.
	* score/score.c: Likewise.
	* sh/sh.c: Likewise.
	* sparc/sparc.c: Likewise.
	* spu/spu.c: Likewise.
	* stormy16/stormy16.c: Likewise.
	* tilegx/tilegx.c: Likewise.
	* tilepro/tilepro.c: Likewise.
	* v850/v850.c: Likewise.
	* vax/vax.c: Likewise.
	* xtensa/xtensa.c: Likewise.

From-SVN: r211145
2014-06-02 20:13:44 +00:00
Richard Biener a9243bfced 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 10:42:43 +00:00
Oleg Endo 48d8568e1f re PR target/51244 ([SH] Inefficient conditional branch and code around T bit)
gcc/
	PR target/51244
	* config/sh/sh.c (sh_eval_treg_value): Handle t_reg_operand and
	negt_reg_operand cases.
	* config/sh/sh.md (*cset_zero): Likewise by using cbranch_treg_value
	predicate.
	* config/sh/predicates.md (cbranch_treg_value): Simplify.

From-SVN: r210535
2014-05-16 22:54:32 +00:00
Oleg Endo d580af0f7a sh.c (sh_option_override): Set branch cost to 2 for all target variants.
gcc/
	* config/sh/sh.c (sh_option_override): Set branch cost to 2 for all
	target variants.

From-SVN: r210534
2014-05-16 22:21:52 +00:00
Christian Bruel 06b9060214 target.def (mode_switching): New hook vector.
2014-05-13  Christian Bruel  <christian.bruel@st.com>

	* target.def (mode_switching): New hook vector.
	(mode_emit, mode_needed, mode_after, mode_entry): New hooks.
	(mode_exit, modepriority_to_mode): Likewise.
	* mode-switching.c (MODE_NEEDED, MODE_AFTER, MODE_ENTRY): Hookify.
	(MODE_EXIT, MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
	(default_priority_to_mode): Define.
	* targhooks.h (default_priority_to_mode): Declare.
	* target.h: Include tm.h and hard-reg-set.h.
	* doc/tm.texi.in (EMIT_MODE_SET, MODE_NEEDED, MODE_AFTER, MODE_ENTRY)
	(MODE_EXIT, MODE_PRIORITY_TO_MODE): Delete and hookify.
	* doc/tm.texi Regenerate.
	* config/sh/sh.h (MODE_NEEDED, MODE_AFTER, MODE_ENTRY): Delete
	(MODE_EXIT, MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
	* config/sh/sh.c (sh_emit_mode_set, sh_mode_priority): Hookify.
	(sh_mode_needed, sh_mode_after, sh_mode_entry, sh_mode_exit): Likewise.
	* config/i386/i386.h (MODE_NEEDED, MODE_AFTER, MODE_ENTRY): Delete
	(MODE_EXIT, MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
	* config/i386/i386-protos.h (ix86_mode_needed, ix86_mode_after)
	(ix86_mode_entrym, ix86_emit_mode_set): Remove external declaration.
	* config/i386/i386.c (ix86_mode_needed, ix86_mode_after, ix86_mode_exit,
	(ix86_mode_entry, ix86_mode_priority, ix86_emit_mode_set): Hookify.
	* config/epiphany/epiphany.h (MODE_NEEDED, MODE_AFTER, MODE_ENTRY):
	Delete
	(MODE_EXIT, MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
	* config/sh/sh.h (MODE_NEEDED, MODE_AFTER, MODE_ENTRY): Delete
	(MODE_EXIT, MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
	* config/sh/sh.c (sh4_emit_mode_set, sh4_mode_needed): Hookify.
	(sh4_mode_after, sh4_mode_entry, sh4_mode_exit): Likewise.
	* config/epiphany/epiphany-protos.h (epiphany_mode_needed)
	(emit_set_fp_mode, epiphany_mode_entry_exit, epiphany_mode_after)
	(epiphany_mode_priority_to_mode): Remove declaration.
	* config/epiphany/epiphany.c (emit_set_fp_mode): Hookify.
	(epiphany_mode_needed, epiphany_mode_priority_to_mode): Likewise.
	(epiphany_mode_entry, epiphany_mode_exit, epiphany_mode_after):
	Likewise.
	(epiphany_mode_priority_to_mode): Change priority type. Hookify.
	(epiphany_mode_needed, epiphany_mode_entry_exit): Hookify.
	(epiphany_mode_after, epiphany_mode_entry, emit_set_fp_mode): Hookify.

From-SVN: r210354
2014-05-13 10:50:51 +02:00
Oleg Endo f6982a08ca sh.h (ROUND_ADVANCE): Delete macro.
* config/sh/sh.h (ROUND_ADVANCE): Delete macro.
	(ROUND_REG, PASS_IN_REG_P): Move and rename macros to ...
	* config/sh/sh.c (sh_round_reg, sh_pass_in_reg_p): ... these new
	functions.
	(sh_arg_partial_bytes, sh_function_arg, sh_function_arg_advance,
	sh_setup_incoming_varargs): Replace usage of PASS_IN_REG_P with
	sh_pass_in_reg_p.
	Replace usage of ROUND_REG with sh_round_reg.
	Use CEIL instead of ROUND_ADVANCE.

From-SVN: r210032
2014-05-03 09:42:52 +00:00
Oleg Endo 0bcf70f851 re PR target/61026 (sh-rtems4.11 build of 4.9.0 fails on FreeBSD 10 c++ (clang).)
PR target/61026
	* config/sh/sh.c: Include stdlib headers before everything else.

From-SVN: r210028
2014-05-03 07:51:02 +00:00
Richard Sandiford 23a5b65a92 Update copyright years in gcc/
From-SVN: r206289
2014-01-02 22:23:26 +00:00
David Malcolm 4f42035e38 Eliminate FOR_EACH_BB_REVERSE macro.
gcc/
	* basic-block.h (FOR_EACH_BB_REVERSE): Eliminate macro.

	* cfghooks.c (verify_flow_info): Replace uses of FOR_EACH_BB_REVERSE
	with FOR_EACH_BB_REVERSE_FN, making uses of cfun explicit.
	* cfgrtl.c (print_rtl_with_bb, rtl_verify_edges,
	rtl_verify_bb_insns, rtl_verify_bb_pointers,
	rtl_verify_bb_insn_chain, rtl_verify_fallthru): Likewise.
	* config/ia64/ia64.c (emit_predicate_relation_info): Likewise.
	* config/sh/sh.c (sh_md_init_global): Likewise.
	* config/sh/sh_optimize_sett_clrt.cc
	(sh_optimize_sett_clrt::execute): Likewise.
	* dce.c (reset_unmarked_insns_debug_uses, delete_unmarked_insns):
	Likewise.
	* dominance.c (calc_dfs_tree): Likewise.
	* final.c (final): Likewise.
	* function.c (thread_prologue_and_epilogue_insns): Likewise.
	* gcse.c (compute_code_hoist_vbeinout): Likewise.
	* ira.c (update_equiv_regs, build_insn_chain): Likewise.
	* lcm.c (compute_antinout_edge): Likewise.
	* mode-switching.c (optimize_mode_switching): Likewise.
	* postreload.c (reload_combine): Likewise.
	* recog.c (split_all_insns, peephole2_optimize): Likewise.
	* tree-ssa-live.c (live_worklist): Likewise.

From-SVN: r205829
2013-12-09 21:16:25 +00:00
Oleg Endo 7337ddf4bf re PR target/52898 (SH Target: Inefficient DImode comparisons)
PR target/52898
	PR target/51697
	* common/config/sh/sh-common.c (sh_option_optimization_table): Remove
	OPT_mcbranchdi entry.
	* config/sh/sh.opt (mcbranchdi, mcmpeqdi): Mark as undocumented and
	emit a warning.
	* config/sh/sh.c (sh_option_override): Initialize TARGET_CBRANCHDI4
	and TARGET_CMPEQDI_T variables.
	* doc/invoke.texi (SH options): Undocument -mcbranchdi and -mcmpeqdi.

	PR target/52898
	PR target/51697
	* gcc.target/sh/pr51697.c: New.

From-SVN: r205794
2013-12-08 22:15:59 +00:00
Oleg Endo 91f65b12bb re PR target/58314 (SH4 error: 'asm' operand requires impossible reload)
PR target/58314
	PR target/50751
	* config/sh/sh.c (max_mov_insn_displacement, disp_addr_displacement):
	Prefix function names with 'sh_'.  Make them non-static.
	* config/sh/sh-protos.h (sh_disp_addr_displacement,
	sh_max_mov_insn_displacement): Add declarations.
	* config/sh/constraints.md (Q): Reject QImode.
	(Sdd): Use match_code "mem".
	(Snd): Fix erroneous matching of non-memory operands.
	* config/sh/predicates.md (short_displacement_mem_operand): New
	predicate.
	(general_movsrc_operand): Disallow PC relative QImode loads.
	* config/sh/sh.md (*mov<mode>_reg_reg): Remove it.
	(*movqi, *movhi): Merge both insns into...
	(*mov<mode>): ... this new insn.  Replace generic 'm' constraints with
	'Snd' and 'Sdd' constraints.  Calculate insn length dynamically based
	on the operand types.

From-SVN: r205390
2013-11-26 11:48:16 +00:00
Andrew MacLeod 2fb9a547b4 gimple.h: Remove all includes.
* gimple.h: Remove all includes.
	(recalculate_side_effects): Move prototype to gimplify.h.
	* Makefile.in (PLUGIN_HEADERS): Add flattened gimple.h includes.
	* gengtype.c (open_base_files): Add gimple.h include list.
	* gimplify.h (recalculate_side_effects): Relocate prototype here.
	* gimple.c: Adjust include list.
	(recalculate_side_effects): Move to gimplify.c.
	* gimplify.c: Adjust include list.
	(recalculate_side_effects): Relocate from gimple.c.
	* alias.c: Add required include files removed from gimple.h.
	* asan.c: Likewise.
	* builtins.c: Likewise.
	* calls.c: Likewise.
	* cfgexpand.c: Likewise.
	* cfgloop.c: Likewise.
	* cfgloopmanip.c: Likewise.
	* cgraphbuild.c: Likewise.
	* cgraph.c: Likewise.
	* cgraphclones.c: Likewise.
	* cgraphunit.c: Likewise.
	* cilk-common.c: Likewise.
	* data-streamer.c: Likewise.
	* data-streamer-in.c: Likewise.
	* data-streamer-out.c: Likewise.
	* dse.c: Likewise.
	* dwarf2out.c: Likewise.
	* emit-rtl.c: Likewise.
	* except.c: Likewise.
	* expr.c: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.
	* gimple-builder.c: Likewise.
	* gimple-expr.c: Likewise.
	* gimple-fold.c: Likewise.
	* gimple-iterator.c: Likewise.
	* gimple-low.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.
	* gimplify-me.c: Likewise.
	* graphite-blocking.c: Likewise.
	* graphite.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-scop-detection.c: Likewise.
	* graphite-sese-to-poly.c: Likewise.
	* internal-fn.c: Likewise.
	* ipa.c: Likewise.
	* ipa-cp.c: Likewise.
	* ipa-devirt.c: Likewise.
	* ipa-inline-analysis.c: Likewise.
	* ipa-inline.c: Likewise.
	* ipa-profile.c: Likewise.
	* ipa-prop.c: Likewise.
	* ipa-pure-const.c: Likewise.
	* ipa-reference.c: Likewise.
	* ipa-split.c: Likewise.
	* ipa-utils.c: Likewise.
	* langhooks.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.c: Likewise.
	* lto-streamer-in.c: Likewise.
	* lto-streamer-out.c: Likewise.
	* omp-low.c: Likewise.
	* opts-global.c: Likewise.
	* passes.c: Likewise.
	* predict.c: Likewise.
	* profile.c: Likewise.
	* sese.c: Likewise.
	* stmt.c: Likewise.
	* stor-layout.c: Likewise.
	* symtab.c: Likewise.
	* targhooks.c: Likewise.
	* toplev.c: Likewise.
	* tracer.c: Likewise.
	* trans-mem.c: Likewise.
	* tree-affine.c: Likewise.
	* tree.c: Likewise.
	* tree-call-cdce.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-cfgcleanup.c: Likewise.
	* tree-chrec.c: Likewise.
	* tree-complex.c: Likewise.
	* tree-data-ref.c: Likewise.
	* tree-dfa.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-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.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.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-math-opts.c: Likewise.
	* tree-ssanames.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-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-stdarg.c: Likewise.
	* tree-streamer.c: Likewise.
	* tree-streamer-in.c: Likewise.
	* tree-streamer-out.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.c: Likewise.
	* tree-vect-loop-manip.c: Likewise.
	* tree-vectorizer.c: Likewise.
	* tree-vect-patterns.c: Likewise.
	* tree-vect-slp.c: Likewise.
	* tree-vect-stmts.c: Likewise.
	* tree-vrp.c: Likewise.
	* tsan.c: Likewise.
	* ubsan.c: Likewise.
	* value-prof.c: Likewise.
	* varpool.c: Likewise.
	* var-tracking.c: Likewise.
	* vtable-verify.c: Likewise.

	* ada/gcc-interface/trans.c: Add required include files from gimple.h.

	* c/c-typeck.c: Add required include files from gimple.h.

	* c-family/c-common.c: Add required include files from gimple.h.
	* c-family/c-gimplify.c: Likewise
	* c-family/cilk.c: Likewise

	* cp/class.c: Add required include files from gimple.h.
	* cp/cp-gimplify.c: Likewise
	* cp/decl2.c: Likewise
	* cp/init.c: Likewise
	* cp/optimize.c: Likewise
	* cp/pt.c: Likewise
	* cp/semantics.c: Likewise
	* cp/tree.c: Likewise
	* cp/typeck.c: Likewise
	* cp/vtable-class-hierarchy.c: Likewise

	* fortran/trans.c: Add required include files from gimple.h.
	* fortran/trans-expr.c: Likewise
	* fortran/trans-openmp.c: Likewise

	* go/gofrontend/expressions.cc: Add required include files from
	gimple.h.
	* go/gofrontend/gogo-tree.cc: Likewise
	* go/gofrontend/types.cc: Likewise
	* go/go-gcc.cc: Likewise
	* go/go-lang.c: Likewise

	* java/java-gimplify.c: Add required include files from gimple.h.

	* lto/lto.c: Add required include files from gimple.h.
	* lto/lto-lang.c: Likewise
	* lto/lto-object.c: Likewise
	* lto/lto-partition.c: Likewise
	* lto/lto-symtab.c: Likewise

	* objc/objc-act.c: Add required include files from gimple.h.

	* config/darwin.c: Add required include files removed from gimple.h.
	* config/aarch64/aarch64-builtins.c: Likewise.
	* config/aarch64/aarch64.c: Likewise.
	* config/alpha/alpha.c: Likewise.
	* config/i386/i386.c: Likewise.
	* config/i386/winnt.c: Likewise.
	* config/ia64/ia64.c: Likewise.
	* config/m32c/m32c.c: Likewise.
	* config/mep/mep.c: Likewise.
	* config/mips/mips.c: Likewise.
	* config/rs6000/rs6000.c: Likewise.
	* config/s390/s390.c: Likewise.
	* config/sh/sh.c: Likewise.
	* config/sparc/sparc.c: Likewise.
	* config/spu/spu.c: Likewise.
	* config/stormy16/stormy16.c: Likewise.
	* config/tilegx/tilegx.c: Likewise.
	* config/tilepro/tilepro.c: Likewise.
	* config/xtensa/xtensa.c: Likewise.

	* testsuite/gcc.dg/plugin/finish_unit_plugin.c: Add required include
	files removed from gimple.h.
	* testsuite/gcc.dg/plugin/ggcplug.c: Likewise.
	* testsuite/gcc.dg/plugin/one_time_plugin.c: Likewise.
	* testsuite/gcc.dg/plugin/selfassign.c: Likewise.
	* testsuite/gcc.dg/plugin/start_unit_plugin.c: Likewise.
	* testsuite/g++.dg/plugin/selfassign.c: Likewise.

From-SVN: r205272
2013-11-22 15:58:51 +00:00
Oleg Endo ac9733752c re PR target/53976 ([SH] Unnecessary clrt/sett after bt/bf)
PR target/53976
	* config/sh/sh_optimize_sett_clrt.cc: New SH specific RTL pass.
	* config/sh/sh.c (register_sh_passes): Add sh_optimize_sett_clrt pass.
	* config/sh/sh/t-sh (sh_optimize_sett_clrt pass.o): New entry.
	* config.gcc (sh[123456789lbe]*-*-* | sh-*-*): Add
	sh_optimize_sett_clrt pass.o to	extra_objs.

	PR target/53976
	* gcc.target/sh/pr53976-1.c: New.

From-SVN: r205191
2013-11-21 08:19:38 +00:00
Diego Novillo d8a2d370dc Factor unrelated declarations out of tree.h.
This patch applies the rule that functions defined in FOO.c must be
declared in FOO.h. One of the worst offenders in the code base is
tree.h, unsurprisingly.

The patch creates several new headers: attribs.h calls.h fold-const.h
gcc-symtab.h print-rtl.h print-tree.h stmt.h stor-layout.h stringpool.h
tree-nested.h tree-object-size.h varasm.h.

Functions in each corresponding .c file got moved to those headers and
others that already existed. I wanted to make this patch as mechanical
as possible, so I made no attempt to fix problems like having
build_addr defined in tree-inline.c. I left that for later.

There were some declarations that I could not move out of tree.h
because of header poisoning or the use of target macros. We forbid the
inclusion of things like expr.h from FE files. While that's a
reasonable idea, the FE file *still* manage to at expr.c functionality
because the declarations they want to use were defined in tree.h.

The affected files are builtins.h, emit-rtl.h and expr.h.

If that functionality is allowed to be accessed from the FEs,
then I will later move those functions out of expr.c into tree.c.
I have moved these declarations to the bottom of tree.h so they
are easy to identify later.

There is a namespace collision with libcpp. The file gcc/symtab.c
cannot use gcc/symtab.h because the #include command picks up
libcpp/include/symtab.h first. So I named this file gcc-symtab.h
for now.

Finally, I added a new header to PLUGIN_HEADERS to account for the
tree.h refactoring. I did not add all headers factored out of tree.h
because it is unclear (and impossible to tell) what plugins need.
This adds the one header used by the plugins in the testsuite.

This will be changing quite dramatically as we progress with the header
refactoring.

This patch should offer some minimal incremental build advantages
by reducing the size of tree.h. Changes that would otherwise
affected tree.h, will now go to other headers which are less
frequently included.

	* tree.h: Include fold-const.h.
	(aggregate_value_p): Moved to function.h.
	(alloca_call_p): Moved to calls.h.
	(allocate_struct_function): Moved to function.h.
	(apply_tm_attr): Moved to attribs.h.
	(array_at_struct_end_p): Moved to expr.h.
	(array_ref_element_size): Moved to tree-dfa.h.
	(array_ref_low_bound): Moved to tree-dfa.h.
	(array_ref_up_bound): Moved to tree.h.
	(assemble_alias): Moved to cgraph.h.
	(bit_from_pos): Moved to stor-layout.h.
	(build_addr): Moved to tree-nested.h.
	(build_duplicate_type): Moved to tree-inline.h.
	(build_fold_addr_expr): Moved to fold-const.h.
	(build_fold_addr_expr_with_type): Moved to fold-const.h.
	(build_fold_addr_expr_with_type_loc): Moved to fold-const.h.
	(build_fold_indirect_ref): Moved to fold-const.h.
	(build_fold_indirect_ref_loc): Moved to fold-const.h.
	(build_personality_function): Moved to tree.h.
	(build_range_check): Moved to fold-const.h.
	(build_simple_mem_ref): Moved to fold-const.h.
	(build_simple_mem_ref_loc): Moved to fold-const.h.
	(build_tm_abort_call): Moved to trans-mem.h.
	(byte_from_pos): Moved to stor-layout.h.
	(call_expr_flags): Moved to calls.h.
	(can_move_by_pieces): Moved to expr.h.
	(categorize_ctor_elements): Moved to expr.h.
	(change_decl_assembler_name): Moved to gcc-symtab.h.
	(combine_comparisons): Moved to fold-const.h.
	(complete_ctor_at_level_p): Moved to tree.h.
	(component_ref_field_offset): Moved to tree-dfa.h.
	(compute_builtin_object_size): Moved to tree-object-size.h.
	(compute_record_mode): Moved to stor-layout.h.
	(constant_boolean_node): Moved to fold-const.h.
	(constructor_static_from_elts_p): Moved to varasm.h.
	(cxx11_attribute_p): Moved to attribs.h.
	(debug_body): Moved to print-tree.h.
	(debug_find_tree): Moved to tree-inline.h.
	(debug_fold_checksum): Moved to fold-const.h.
	(debug_head): Moved to print-tree.h.
	(debug_head): Moved to print-tree.h.
	(debug_raw): Moved to print-tree.h.
	(debug_tree): Moved to print-tree.h.
	(debug_vec_tree): Moved to print-tree.h.
	(debug_verbose): Moved to print-tree.h.
	(debug_verbose): Moved to print-tree.h.
	(decl_attributes): Moved to attribs.h.
	(decl_binds_to_current_def_p): Moved to varasm.h.
	(decl_default_tls_model): Moved to varasm.h.
	(decl_replaceable_p): Moved to varasm.h.
	(div_if_zero_remainder): Moved to fold-const.h.
	(double_int mem_ref_offset): Moved to fold-const.h.
	(dump_addr): Moved to print-tree.h.
	(element_precision): Moved to machmode.h.
	(expand_dummy_function_end): Moved to function.h.
	(expand_function_end): Moved to function.h.
	(expand_function_start): Moved to function.h.
	(expand_label): Moved to stmt.h.
	(expr_first): Moved to tree-iterator.h.
	(expr_last): Moved to tree-iterator.h.
	(finalize_size_functions): Moved to stor-layout.h.
	(finish_builtin_struct): Moved to stor-layout.h.
	(finish_record_layout): Moved to stor-layout.h.
	(fixup_signed_type): Moved to stor-layout.h.
	(fixup_unsigned_type): Moved to stor-layout.h.
	(flags_from_decl_or_type): Moved to calls.h.
	(fold): Moved to fold-const.h.
	(fold_abs_const): Moved to fold-const.h.
	(fold_binary): Moved to fold-const.h.
	(fold_binary_loc): Moved to fold-const.h.
	(fold_binary_to_constant): Moved to fold-const.h.
	(fold_build1): Moved to fold-const.h.
	(fold_build1_initializer_loc): Moved to fold-const.h.
	(fold_build1_loc): Moved to fold-const.h.
	(fold_build1_stat_loc): Moved to fold-const.h.
	(fold_build2): Moved to fold-const.h.
	(fold_build2_initializer_loc): Moved to fold-const.h.
	(fold_build2_loc): Moved to fold-const.h.
	(fold_build2_stat_loc): Moved to fold-const.h.
	(fold_build3): Moved to fold-const.h.
	(fold_build3_loc): Moved to fold-const.h.
	(fold_build3_stat_loc): Moved to fold-const.h.
	(fold_build_call_array): Moved to fold-const.h.
	(fold_build_call_array_initializer): Moved to fold-const.h.
	(fold_build_call_array_initializer_loc): Moved to fold-const.h.
	(fold_build_call_array_loc): Moved to fold-const.h.
	(fold_build_cleanup_point_expr): Moved to fold-const.h.
	(fold_convert): Moved to fold-const.h.
	(fold_convert_loc): Moved to fold-const.h.
	(fold_convertible_p): Moved to fold-const.h.
	(fold_defer_overflow_warnings): Moved to fold-const.h.
	(fold_deferring_overflow_warnings_p): Moved to fold-const.h.
	(fold_fma): Moved to fold-const.h.
	(fold_ignored_result): Moved to fold-const.h.
	(fold_indirect_ref): Moved to fold-const.h.
	(fold_indirect_ref_1): Moved to fold-const.h.
	(fold_indirect_ref_loc): Moved to fold-const.h.
	(fold_read_from_constant_string): Moved to fold-const.h.
	(fold_real_zero_addition_p): Moved to fold-const.h.
	(fold_single_bit_test): Moved to fold-const.h.
	(fold_strip_sign_ops): Moved to fold-const.h.
	(fold_ternary): Moved to fold-const.h.
	(fold_ternary_loc): Moved to fold-const.h.
	(fold_unary): Moved to tree-data-ref.h.
	(fold_unary_ignore_overflow): Moved to fold-const.h.
	(fold_unary_ignore_overflow_loc): Moved to fold-const.h.
	(fold_unary_loc): Moved to fold-const.h.
	(fold_unary_to_constant): Moved to fold-const.h.
	(fold_undefer_and_ignore_overflow_warnings): Moved to fold-const.h.
	(fold_undefer_overflow_warnings): Moved to fold-const.h.
	(folding_initializer): Moved to fold-const.h.
	(free_temp_slots): Moved to function.h.
	(generate_setjmp_warnings): Moved to function.h.
	(get_attribute_name): Moved to attribs.h.
	(get_identifier): Moved to stringpool.h.
	(get_identifier_with_length): Moved to stringpool.h.
	(get_inner_reference): Moved to tree.h.
	(gimple_alloca_call_p): Moved to calls.h.
	(gimplify_parameters): Moved to function.h.
	(highest_pow2_factor): Moved to expr.h.
	(indent_to): Moved to print-tree.h.
	(init_attributes): Moved to attribs.h.
	(init_dummy_function_start): Moved to function.h.
	(init_function_start): Moved to function.h.
	(init_inline_once): Moved to tree-inline.h.
	(init_object_sizes): Moved to tree-object-size.h.
	(init_temp_slots): Moved to function.h.
	(init_tree_optimization_optabs): Moved to optabs.h.
	(initialize_sizetypes): Moved to stor-layout.h.
	(initializer_constant_valid_for_bitfield_p): Moved to varasm.h.
	(initializer_constant_valid_p): Moved to varasm.h.
	(int_const_binop): Moved to fold-const.h.
	(internal_reference_types): Moved to stor-layout.h.
	(invert_tree_comparison): Moved to fold-const.h.
	(invert_truthvalue): Moved to fold-const.h.
	(invert_truthvalue_loc): Moved to fold-const.h.
	(is_tm_ending_fndecl): Moved to trans-mem.h.
	(is_tm_may_cancel_outer): Moved to trans-mem.h.
	(is_tm_pure): Moved to trans-mem.h.
	(is_tm_safe): Moved to trans-mem.h.
	(layout_decl): Moved to stor-layout.h.
	(layout_type): Moved to stor-layout.h.
	(lookup_attribute_spec): Moved to attribs.h.
	(make_accum_type): Moved to stor-layout.h.
	(make_decl_one_only): Moved to varasm.h.
	(make_decl_rtl): Moved to tree.h.
	(make_decl_rtl_for_debug): Moved to varasm.h.
	(make_fract_type): Moved to stor-layout.h.
	(make_or_reuse_sat_signed_accum_type): Moved to stor-layout.h.
	(make_or_reuse_sat_signed_fract_type): Moved to stor-layout.h.
	(make_or_reuse_sat_unsigned_accum_type): Moved to stor-layout.h.
	(make_or_reuse_sat_unsigned_fract_type): Moved to stor-layout.h.
	(make_or_reuse_signed_accum_type): Moved to stor-layout.h.
	(make_or_reuse_signed_fract_type): Moved to stor-layout.h.
	(make_or_reuse_unsigned_accum_type): Moved to stor-layout.h.
	(make_or_reuse_unsigned_fract_type): Moved to stor-layout.h.
	(make_range): Moved to fold-const.h.
	(make_range_step): Moved to fold-const.h.
	(make_sat_signed_accum_type): Moved to stor-layout.h.
	(make_sat_signed_fract_type): Moved to stor-layout.h.
	(make_sat_unsigned_accum_type): Moved to stor-layout.h.
	(make_sat_unsigned_fract_type): Moved to stor-layout.h.
	(make_signed_accum_type): Moved to stor-layout.h.
	(make_signed_fract_type): Moved to stor-layout.h.
	(make_signed_type): Moved to stor-layout.h.
	(make_unsigned_accum_type): Moved to stor-layout.h.
	(make_unsigned_fract_type): Moved to stor-layout.h.
	(make_unsigned_type): Moved to stor-layout.h.
	(mark_decl_referenced): Moved to varasm.h.
	(mark_referenced): Moved to varasm.h.
	(may_negate_without_overflow_p): Moved to fold-const.h.
	(maybe_get_identifier): Moved to stringpool.h.
	(merge_ranges): Moved to fold-const.h.
	(merge_weak): Moved to varasm.h.
	(mode_for_size_tree): Moved to stor-layout.h.
	(multiple_of_p): Moved to fold-const.h.
	(must_pass_in_stack_var_size): Moved to calls.h.
	(must_pass_in_stack_var_size_or_pad): Moved to calls.h.
	(native_encode_expr): Moved to fold-const.h.
	(native_interpret_expr): Moved to fold-const.h.
	(non_lvalue): Moved to fold-const.h.
	(non_lvalue_loc): Moved to fold-const.h.
	(normalize_offset): Moved to stor-layout.h.
	(normalize_rli): Moved to stor-layout.h.
	(notice_global_symbol): Moved to varasm.h.
	(omit_one_operand): Moved to fold-const.h.
	(omit_one_operand_loc): Moved to fold-const.h.
	(omit_two_operands): Moved to fold-const.h.
	(omit_two_operands_loc): Moved to fold-const.h.
	(operand_equal_p): Moved to tree-data-ref.h.
	(parse_input_constraint): Moved to stmt.h.
	(parse_output_constraint): Moved to stmt.h.
	(place_field): Moved to stor-layout.h.
	(pop_function_context): Moved to function.h.
	(pop_temp_slots): Moved to function.h.
	(pos_from_bit): Moved to stor-layout.h.
	(preserve_temp_slots): Moved to function.h.
	(print_node): Moved to print-tree.h.
	(print_node_brief): Moved to print-tree.h.
	(print_rtl): Moved to rtl.h.
	(process_pending_assemble_externals): Moved to varasm.h.
	(ptr_difference_const): Moved to fold-const.h.
	(push_function_context): Moved to function.h.
	(push_struct_function): Moved to function.h.
	(push_temp_slots): Moved to function.h.
	(record_tm_replacement): Moved to trans-mem.h.
	(relayout_decl): Moved to stor-layout.h.
	(resolve_asm_operand_names): Moved to stmt.h.
	(resolve_unique_section): Moved to varasm.h.
	(rli_size_so_far): Moved to stor-layout.h.
	(rli_size_unit_so_far): Moved to stor-layout.h.
	(round_down): Moved to fold-const.h.
	(round_down_loc): Moved to fold-const.h.
	(round_up): Moved to fold-const.h.
	(round_up_loc): Moved to fold-const.h.
	(set_decl_incoming_rtl): Moved to emit-rtl.h.
	(set_decl_rtl): Moved to tree.h.
	(set_min_and_max_values_for_integral_type): Moved to stor-layout.h.
	(set_user_assembler_name): Moved to varasm.h.
	(setjmp_call_p): Moved to calls.h.
	(size_binop): Moved to fold-const.h.
	(size_binop_loc): Moved to fold-const.h.
	(size_diffop): Moved to fold-const.h.
	(size_diffop_loc): Moved to fold-const.h.
	(size_int_kind): Moved to fold-const.h.
	(stack_protect_epilogue): Moved to function.h.
	(start_record_layout): Moved to stor-layout.h.
	(supports_one_only): Moved to varasm.h.
	(swap_tree_comparison): Moved to fold-const.h.
	(tm_malloc_replacement): Moved to trans-mem.h.
	(tree build_fold_addr_expr_loc): Moved to fold-const.h.
	(tree build_invariant_address): Moved to fold-const.h.
	(tree_binary_nonnegative_warnv_p): Moved to fold-const.h.
	(tree_binary_nonzero_warnv_p): Moved to fold-const.h.
	(tree_call_nonnegative_warnv_p): Moved to fold-const.h.
	(tree_expr_nonnegative_p): Moved to fold-const.h.
	(tree_expr_nonnegative_warnv_p): Moved to fold-const.h.
	(tree_output_constant_def): Moved to varasm.h.
	(tree_overlaps_hard_reg_set): Moved to stmt.h.
	(tree_single_nonnegative_warnv_p): Moved to fold-const.h.
	(tree_single_nonzero_warnv_p): Moved to fold-const.h.
	(tree_swap_operands_p): Moved to fold-const.h.
	(tree_unary_nonnegative_warnv_p): Moved to fold-const.h.
	(tree_unary_nonzero_warnv_p): Moved to fold-const.h.
	(update_alignment_for_field): Moved to stor-layout.h.
	(use_register_for_decl): Moved to function.h.
	(variable_size): Moved to rtl.h.
	(vector_type_mode): Moved to stor-layout.h.
	* cgraph.h: Corresponding changes.
	* emit-rtl.h: Corresponding changes.
	* expr.h: Corresponding changes.
	* function.h: Corresponding changes.
	* optabs.h: Corresponding changes.
	* trans-mem.h: Corresponding changes.
	Protect against multiple inclusion.
	* tree-inline.h: Corresponding changes.
	* tree-iterator.h: Corresponding changes.
	* tree-dfa.h: Include expr.h.
	* tree-ssanames.h: Include stringpool.h.
	* attribs.h: New file.
	* calls.h: New file.
	* fold-const.h: New file.
	* gcc-symtab.h: New file.
	* print-rtl.h: New file.
	* print-tree.h: New file.
	* stmt.h: New file.
	* stor-layout.h: New file.
	* strinpool.h: New file.
	* tree-nested.h: New file
	* tree-object-size.h: New file.
	* varasm.h: New file.
	* Makefile.in (PLUGIN_HEADERS): Add stringpool.h.

	* alias.c: Include varasm.h.
	Include expr.h.
	* asan.c: Include calls.h.
	Include stor-layout.h.
	Include varasm.h.
	* attribs.c: Include stringpool.h.
	Include attribs.h.
	Include stor-layout.h.
	* builtins.c: Include stringpool.h.
	Include stor-layout.h.
	Include calls.h.
	Include varasm.h.
	Include tree-object-size.h.
	* calls.c: Include stor-layout.h.
	Include varasm.h.
	Include stringpool.h.
	Include attribs.h.
	* cfgexpand.c: Include stringpool.h.
	Include varasm.h.
	Include stor-layout.h.
	Include stmt.h.
	Include print-tree.h.
	* cgraph.c: Include varasm.h.
	Include calls.h.
	Include print-tree.h.
	* cgraphclones.c: Include stringpool.h.
	Include function.h.
	Include emit-rtl.h.
	Move inclusion of rtl.h earlier in the file.
	* cgraphunit.c: Include varasm.h.
	Include stor-layout.h.
	Include stringpool.h.
	* cilk-common.c: Include stringpool.h.
	Include stor-layout.h.
	* combine.c: Include stor-layout.h.
	* config/aarch64/aarch64-builtins.c: Include stor-layout.h.
	Include stringpool.h.
	Include calls.h.
	* config/aarch64/aarch64.c: Include stringpool.h.
	Include stor-layout.h.
	Include calls.h.
	Include varasm.h.
	* config/alpha/alpha.c: Include stor-layout.h.
	Include calls.h.
	Include varasm.h.
	* config/arc/arc.c: Include varasm.h.
	Include stor-layout.h.
	Include stringpool.h.
	Include calls.h.
	* config/arm/arm.c: Include stringpool.h.
	Include stor-layout.h.
	Include calls.h.
	Include varasm.h.
	* config/avr/avr-c.c: Include stor-layout.h.
	* config/avr/avr-log.c: Include print-tree.h.
	* config/avr/avr.c: Include print-tree.h.
	Include calls.h.
	Include stor-layout.h.
	Include stringpool.h.
	* config/bfin/bfin.c: Include varasm.h.
	Include calls.h.
	* config/c6x/c6x.c: Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	Include stringpool.h.
	* config/cr16/cr16.c: Include stor-layout.h.
	Include calls.h.
	* config/cris/cris.c: Include varasm.h.
	Include stor-layout.h.
	Include calls.h.
	Include stmt.h.
	* config/darwin.c: Include stringpool.h.
	Include varasm.h.
	Include stor-layout.h.
	* config/epiphany/epiphany.c: Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	Include stringpool.h.
	* config/fr30/fr30.c: Include stor-layout.h.
	Include varasm.h.
	* config/frv/frv.c: Include varasm.h.
	Include stor-layout.h.
	Include stringpool.h.
	* config/h8300/h8300.c: Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	Include stringpool.h.
	* config/i386/i386.c: Include stringpool.h.
	Include attribs.h.
	Include calls.h.
	Include stor-layout.h.
	Include varasm.h.
	* config/i386/winnt-cxx.c: Include stringpool.h.
	Include attribs.h.
	* config/i386/winnt.c: Include stringpool.h.
	Include varasm.h.
	* config/ia64/ia64-c.c: Include stringpool.h.
	* config/ia64/ia64.c: Include stringpool.h.
	Include stor-layout.h.
	Include calls.h.
	Include varasm.h.
	* config/iq2000/iq2000.c: Include stor-layout.h.
	Include calls.h.
	Include varasm.h.
	* config/lm32/lm32.c: Include calls.h.
	* config/m32c/m32c.c: Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	* config/m32r/m32r.c: Include stor-layout.h.
	Include varasm.h.
	Include stringpool.h.
	Include calls.h.
	* config/m68k/m68k.c: Include calls.h.
	Include stor-layout.h.
	Include varasm.h.
	* config/mcore/mcore.c: Include stor-layout.h.
	Include varasm.h.
	Include stringpool.h.
	Include calls.h.
	* config/mep/mep.c: Include varasm.h.
	Include calls.h.
	Include stringpool.h.
	Include stor-layout.h.
	* config/microblaze/microblaze.c: Include varasm.h.
	Include stor-layout.h.
	Include calls.h.
	* config/mips/mips.c: Include varasm.h.
	Include stringpool.h.
	Include stor-layout.h.
	Include calls.h.
	* config/mmix/mmix.c: Include varasm.h.
	Include stor-layout.h.
	Include calls.h.
	* config/mn10300/mn10300.c: Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	* config/moxie/moxie.c: Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	* config/msp430/msp430.c: Include stor-layout.h.
	Include calls.h.
	* config/nds32/nds32.c: Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	* config/pa/pa.c: Include stor-layout.h.
	Include stringpool.h.
	Include varasm.h.
	Include calls.h.
	* config/pdp11/pdp11.c: Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	* config/picochip/picochip.c: Include calls.h.
	Include stor-layout.h.
	Include stringpool.h.
	Include varasm.h.
	* config/rl78/rl78.c: Include varasm.h.
	Include stor-layout.h.
	Include calls.h.
	* config/rs6000/rs6000-c.c: Include stor-layout.h.
	Include stringpool.h.
	* config/rs6000/rs6000.c: Include stringpool.h.
	Include stor-layout.h.
	Include calls.h.
	Include print-tree.h.
	Include varasm.h.
	* config/rx/rx.c: Include varasm.h.
	Include stor-layout.h.
	Include calls.h.
	* config/s390/s390.c: Include print-tree.h.
	Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	* config/score/score.c: Include stringpool.h.
	Include calls.h.
	Include varasm.h.
	Include stor-layout.h.
	* config/sh/sh-c.c: Include stringpool.h.
	Include attribs.h.h.
	* config/sh/sh.c: Include stringpool.h.
	Include stor-layout.h.
	Include calls.h.
	Include varasm.h.
	* config/sol2-c.c: Include stringpool.h.
	Include attribs.h.
	* config/sol2-cxx.c: Include stringpool.h.
	* config/sol2.c: Include stringpool.h.
	Include varasm.h.
	* config/sparc/sparc.c: Include stringpool.h.
	Include stor-layout.h.
	Include calls.h.
	Include varasm.h.
	* config/spu/spu-c.c: Include stringpool.h.
	* config/spu/spu.c: Include stringpool.h.
	Include stor-layout.h.
	Include calls.h.
	Include varasm.h.
	* config/stormy16/stormy16.c: Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	* config/tilegx/tilegx.c: Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	* config/tilepro/tilepro.c: Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	* config/v850/v850-c.c: Include stringpool.h.
	Include attribs.h.
	* config/v850/v850.c: Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	Include calls.h.
	* config/vax/vax.c: Include calls.h.
	Include varasm.h.
	* config/vms/vms.c: Include stringpool.h.
	* config/vxworks.c: Include stringpool.h.
	* config/xtensa/xtensa.c: Include stringpool.h.
	Include stor-layout.h.
	Include calls.h.
	Include varasm.h.
	* convert.c: Include stor-layout.h.
	* coverage.c: Include stringpool.h.
	Include stor-layout.h.
	* dbxout.c: Include varasm.h.
	Include stor-layout.h.
	* dojump.c: Include stor-layout.h.
	* dse.c: Include stor-layout.h.
	* dwarf2asm.c: Include stringpool.h.
	Include varasm.h.
	* dwarf2cfi.c: Include stor-layout.h.
	* dwarf2out.c: Include rtl.h.
	Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	Include function.h.
	Include emit-rtl.h.
	Move inclusion of rtl.h earlier in the file.
	* emit-rtl.c: Include varasm.h.
	* except.c: Include stringpool.h.
	Include stor-layout.h.
	* explow.c: Include stor-layout.h.
	* expmed.c: Include stor-layout.h.
	* expr.c: Include stringpool.h.
	Include stor-layout.h.
	Include attribs.h.
	Include varasm.h.
	* final.c: Include varasm.h.
	* fold-const.c: Include stor-layout.h.
	Include calls.h.
	Include tree-iterator.h.
	* function.c: Include stor-layout.h.
	Include varasm.h.
	Include stringpool.h.
	* genattrtab.c (write_header): Emit includes for varasm.h,
	stor-layout.h and calls.h.
	* genautomata.c (main): Likewise.
	* genemit.c: Likewise.
	* genopinit.c: Likewise.
	* genoutput.c (output_prologue): Likewise.
	* genpeep.c: Likewise.
	* genpreds.c (write_insn_preds_c): Likewise.
	* gengtype.c (open_base_files): Add stringpool.h.
	* gimple-expr.c: Include stringpool.h.
	Include stor-layout.h.
	* gimple-fold.c: Include stringpool.h.
	Include expr.h.
	Include stmt.h.
	Include stor-layout.h.
	* gimple-low.c: Include tree-nested.h.
	Include calls.h.
	* gimple-pretty-print.c: Include stringpool.h.
	* gimple-ssa-strength-reduction.c: Include stor-layout.h.
	Include expr.h.
	* gimple-walk.c: Include stmt.h.
	* gimple.c: Include calls.h.
	Include stmt.h.
	Include stor-layout.h.
	* gimplify.c: Include stringpool.h.
	Include calls.h.
	Include varasm.h.
	Include stor-layout.h.
	Include stmt.h.
	Include print-tree.h.
	Include expr.h.
	* gimplify-me.c: Include stmt.h
	Include stor-layout.h
	* internal-fn.c: Include stor-layout.h.
	* ipa-devirt.c: Include print-tree.h.
	Include calls.h.
	* ipa-inline-analysis.c: Include stor-layout.h.
	Include stringpool.h.
	Include print-tree.h.
	* ipa-inline.c: Include trans-mem.h.
	Include calls.h.
	* ipa-prop.c: Include expr.h.
	Include stor-layout.h.
	Include print-tree.h.
	* ipa-pure-const.c: Include print-tree.h.
	Include calls.h.
	* ipa-reference.c: Include calls.h.
	* ipa-split.c: Include stringpool.h.
	Include expr.h.
	Include calls.h.
	* ipa.c: Include calls.h.
	Include stringpool.h.
	* langhooks.c: Include stringpool.h.
	Include attribs.h.
	* lto-cgraph.c: Include stringpool.h.
	* lto-streamer-in.c: Include stringpool.h.
	* lto-streamer-out.c: Include stor-layout.h.
	Include stringpool.h.
	* omp-low.c: Include stringpool.h.
	Include stor-layout.h.
	Include expr.h.
	* optabs.c: Include stor-layout.h.
	Include stringpool.h.
	Include varasm.h.
	* passes.c: Include varasm.h.
	* predict.c: Include calls.h.
	* print-rtl.c: Include print-tree.h.
	* print-tree.c: Include varasm.h.
	Include print-rtl.h.
	Include stor-layout.h.
	* realmpfr.c: Include stor-layout.h.
	* reg-stack.c: Include varasm.h.
	* sdbout.c: Include varasm.h.
	Include stor-layout.h.
	* simplify-rtx.c: Include varasm.h.
	* stmt.c: Include varasm.h.
	Include stor-layout.h.
	* stor-layout.c: Include stor-layout.h.
	Include stringpool.h.
	Include varasm.h.
	Include print-tree.h.
	* symtab.c: Include rtl.h.
	Include print-tree.h.
	Include varasm.h.
	Include function.h.
	Include emit-rtl.h.
	* targhooks.c: Include stor-layout.h.
	Include varasm.h.
	* toplev.c: Include varasm.h.
	Include tree-inline.h.
	* trans-mem.c: Include calls.h.
	Include function.h.
	Include rtl.h.
	Include emit-rtl.h.
	* tree-affine.c: Include expr.h.
	* tree-browser.c: Include print-tree.h.
	* tree-call-cdce.c: Include stor-layout.h.
	* tree-cfg.c: Include trans-mem.h.
	Include stor-layout.h.
	Include print-tree.h.
	* tree-complex.c: Include stor-layout.h.
	* tree-data-ref.c: Include expr.h.
	* tree-dfa.c: Include stor-layout.h.
	* tree-eh.c: Include expr.h.
	Include calls.h.
	* tree-emutls.c: Include stor-layout.h.
	Include varasm.h.
	* tree-if-conv.c: Include stor-layout.h.
	* tree-inline.c: Include stor-layout.h.
	Include calls.h.
	* tree-loop-distribution.c: Include stor-layout.h.
	* tree-nested.c: Include stringpool.h.
	Include stor-layout.h.
	* tree-object-size.c: Include tree-object-size.h.
	* tree-outof-ssa.c: Include stor-layout.h.
	* tree-parloops.c: Include stor-layout.h.
	Include tree-nested.h.
	* tree-pretty-print.c: Include stor-layout.h.
	Include expr.h.
	* tree-profile.c: Include varasm.h.
	Include tree-nested.h.
	* tree-scalar-evolution.c: Include expr.h.
	* tree-sra.c: Include stor-layout.h.
	* tree-ssa-address.c: Include stor-layout.h.
	* tree-ssa-ccp.c: Include stor-layout.h.
	* tree-ssa-dce.c: Include calls.h.
	* tree-ssa-dom.c: Include stor-layout.h.
	* tree-ssa-forwprop.c: Include stor-layout.h.
	* tree-ssa-ifcombine.c: Include stor-layout.h.
	* tree-ssa-loop-ivopts.c: Include stor-layout.h.
	* tree-ssa-loop-niter.c: Include calls.h.
	Include expr.h.
	* tree-ssa-loop-prefetch.c: Include stor-layout.h.
	* tree-ssa-math-opts.c: Include stor-layout.h.
	* tree-ssa-operands.c: Include stmt.h.
	Include print-tree.h.
	* tree-ssa-phiopt.c: Include stor-layout.h.
	* tree-ssa-reassoc.c: Include stor-layout.h.
	* tree-ssa-sccvn.c: Include stor-layout.h.
	* tree-ssa-sink.c: Include stor-layout.h.
	* tree-ssa-strlen.c: Include stor-layout.h.
	* tree-ssa-structalias.c: Include stor-layout.h.
	Include stmt.h.
	* tree-ssa-tail-merge.c: Include stor-layout.h.
	Include trans-mem.h.
	* tree-ssa-uncprop.c: Include stor-layout.h.
	* tree-ssa.c: Include stor-layout.h.
	* tree-ssanames.c: Include stor-layout.h.
	* tree-streamer-in.c: Include stringpool.h.
	* tree-streamer-out.c: Include stor-layout.h.
	* tree-switch-conversion.c: Include varasm.h.
	Include stor-layout.h.
	* tree-tailcall.c: Include stor-layout.h.
	* tree-vect-data-refs.c: Include stor-layout.h.
	* tree-vect-generic.c: Include stor-layout.h.
	* tree-vect-loop.c: Include stor-layout.h.
	* tree-vect-patterns.c: Include stor-layout.h.
	* tree-vect-slp.c: Include stor-layout.h.
	* tree-vect-stmts.c: Include stor-layout.h.
	* tree-vectorizer.c: Include stor-layout.h.
	* tree-vrp.c: Include stor-layout.h.
	Include calls.h.
	* tree.c: Include stor-layout.h.
	Include calls.h.
	Include attribs.h.
	Include varasm.h.
	* tsan.c: Include expr.h.
	* ubsan.c: Include stor-layout.h.
	Include stringpool.h.
	* value-prof.c: Include tree-nested.h.
	Include calls.h.
	* var-tracking.c: Include varasm.h.
	Include stor-layout.h.
	* varasm.c: Include stor-layout.h.
	Include stringpool.h.
	Include gcc-symtab.h.
	Include varasm.h.
	* varpool.c: Include varasm.h.
	* vmsdbgout.c: Include varasm.h.
	* xcoffout.c: Include varasm.h.

ada/ChangeLog

	* gcc-interface/decl.c: Include stringpool.h
	Include stor-layout.h
	* gcc-interface/misc.c: Include stor-layout.h
	Include print-tree.h
	* gcc-interface/trans.c: Include stringpool.h
	Include stor-layout.h
	Include stmt.h
	Include varasm.h
	* gcc-interface/utils.c: Include stringpool.h
	Include stor-layout.h
	Include attribs.h
	Include varasm.h
	* gcc-interface/utils2.c: Include stringpool.h
	Include stor-layout.h
	Include attribs.h
	Include varasm.h

c-family/ChangeLog

	* c-common.c: Include fold-const.h.
	Include stor-layout.h.
	Include calls.h.
	Include stringpool.h.
	Include attribs.h.
	Include varasm.h.
	Include trans-mem.h.
	* c-cppbuiltin.c: Include stor-layout.h.
	Include stringpool.h.
	* c-format.c: Include stringpool.h.
	* c-lex.c: Include stringpool.h.
	Include stor-layout.h.
	* c-pragma.c: Include stringpool.h.
	Include attribs.h.
	Include varasm.h.
	Include gcc-symtab.h.
	* c-pretty-print.c: Include stor-layout.h.
	Include attribs.h.
	* cilk.c: Include stringpool.h.
	Include calls.h.

c/ChangeLog

	* c-decl.c: Include print-tree.h.
	Include stor-layout.h.
	Include varasm.h.
	Include attribs.h.
	Include stringpool.h.
	* c-lang.c: Include fold-const.h.
	* c-parser.c: Include stringpool.h.
	Include attribs.h.
	Include stor-layout.h.
	Include varasm.h.
	Include trans-mem.h.
	* c-typeck.c: Include stor-layout.h.
	Include trans-mem.h.
	Include varasm.h.
	Include stmt.h.

cp/ChangeLog

	* call.c: Include stor-layout.h.
	Include trans-mem.h.
	Include stringpool.h.
	* class.c: Include stringpool.h.
	Include stor-layout.h.
	Include attribs.h.
	* cp-gimplify.c: Include stor-layout.h.
	* cvt.c: Include stor-layout.h.
	* decl.c: Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	Include attribs.h.
	Include calls.h.
	* decl2.c: Include stringpool.h.
	Include varasm.h.
	Include attribs.h.
	Include stor-layout.h.
	Include calls.h.
	* error.c: Include stringpool.h.
	* except.c: Include stringpool.h.
	Include trans-mem.h.
	Include attribs.h.
	* init.c: Include stringpool.h.
	Include varasm.h.
	* lambda.c: Include stringpool.h.
	* lex.c: Include stringpool.h.
	* mangle.c: Include stor-layout.h.
	Include stringpool.h.
	* method.c: Include stringpool.h.
	Include varasm.h.
	* name-lookup.c: Include stringpool.h.
	Include print-tree.h.
	Include attribs.h.
	* optimize.c: Include stringpool.h.
	* parser.c: Include print-tree.h.
	Include stringpool.h.
	Include attribs.h.
	Include trans-mem.h.
	* pt.c: Include stringpool.h.
	Include varasm.h.
	Include attribs.h.
	Include stor-layout.h.
	* ptree.c: Include print-tree.h.
	* repo.c: Include stringpool.h.
	* rtti.c: Include stringpool.h.
	Include stor-layout.h.
	* semantics.c: Include stmt.h.
	Include varasm.h.
	Include stor-layout.h.
	Include stringpool.h.
	* tree.c: Include stor-layout.h.
	Include print-tree.h.
	Include tree-iterator.h.
	* typeck.c: Include stor-layout.h.
	Include varasm.h.
	* typeck2.c: Include stor-layout.h.
	Include varasm.h.
	* vtable-class-hierarchy.c: Include stringpool.h.
	Include stor-layout.h.

fortran/ChangeLog

	* decl.c: Include stringpool.h.
	* iresolve.c: Include stringpool.h.
	* match.c: Include stringpool.h.
	* module.c: Include stringpool.h.
	* target-memory.c: Include stor-layout.h.
	* trans-common.c: Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	* trans-const.c: Include stor-layout.h.
	* trans-decl.c: Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	Include attribs.h.
	* trans-expr.c: Include stringpool.h.
	* trans-intrinsic.c: Include stringpool.h.
	Include tree-nested.h.
	Include stor-layout.h.
	* trans-io.c: Include stringpool.h.
	Include stor-layout.h.
	* trans-openmp.c: Include stringpool.h.
	* trans-stmt.c: Include stringpool.h.
	* trans-types.c: Include stor-layout.h.
	Include stringpool.h.
	* trans.c: Include stringpool.h.

go/ChangeLog

	* go-backend.c: Include stor-layout.h.
	* go-gcc.cc: Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	* go-lang.c: Include stor-layout.h.

java/ChangeLog

	* builtins.c: Include stor-layout.h.
	Include stringpool.h.
	* class.c: Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	* constants.c: Include stringpool.h.
	Include stor-layout.h.
	* decl.c: Include stor-layout.h.
	Include stringpool.h.
	Include varasm.h.
	* except.c: Include stringpool.h.
	Include stor-layout.h.
	* expr.c: Include stringpool.h.
	Include stor-layout.h.
	* jcf-parse.c: Include stringpool.h.
	* mangle.c: Include stringpool.h.
	* resource.c: Include stringpool.h.
	Include stor-layout.h.
	* typeck.c: Include stor-layout.h.
	Include stringpool.h.
	* verify-glue.c: Include stringpool.h.

lto/ChangeLog
	* lto-lang.c: Include stringpool.h.
	Include stor-layout.h.
	* lto-partition.c: Include gcc-symtab.h.
	* lto.c: Include stor-layout.h.

objc/ChangeLog
	* objc-act.c: Include stringpool.h.
	Include stor-layout.h.
	Include attribs.h.
	* objc-encoding.c: Include stringpool.h.
	Include stor-layout.h.
	* objc-gnu-runtime-abi-01.c: Include stringpool.h.
	* objc-next-runtime-abi-01.c:
	Include stringpool.h.
	* objc-next-runtime-abi-02.c: Include stringpool.h.
	* objc-runtime-shared-support.c: Include stringpool.h.

testsuite/ChangeLog

	* gcc.dg/plugin/selfassign.c: Include stringpool.h.
	* gcc.dg/plugin/start_unit_plugin.c: Likewise.

From-SVN: r205023
2013-11-19 07:31:09 -05:00
Kaz Kojima d7be3fcdae sh.c (barrier_align): Return 0 when barrier_or_label is null.
* config/sh/sh.c (barrier_align): Return 0 when barrier_or_label
	is null.

From-SVN: r204865
2013-11-15 22:01:33 +00:00