gcc/gcc/rtlanal.c

6041 lines
164 KiB
C
Raw Normal View History

/* Analyze RTL for GNU compiler.
Copyright (C) 1987-2015 Free Software Foundation, Inc.
1991-12-01 06:13:56 +01:00
Makefile.in, [...]: replace "GNU CC" with "GCC". * Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, builtin-types.def, builtins.c, builtins.def, c-aux-info.c, c-common.c, c-common.def, c-common.h, c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c, c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in, c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c, caller-save.c, calls.c, collect2.c, collect2.h, combine.c, conditions.h, config.gcc, configure.frag, configure.in, conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c, cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h, dependence.c, df.c, df.h, diagnostic.c, diagnostic.h, doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c, dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c, emit-rtl.c, errors.c, errors.h, except.c, except.h, exgettext, explow.c, expmed.c, expr.c, expr.h, final.c, fixproto, flags.h, flow.c, fold-const.c, fp-test.c, function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp, gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c, gencheck.c, gencodes.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, genmultilib, genopinit.c, genoutput.c, genpeep.c, genrecog.c, gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c, ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c, graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h, gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h, gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h, hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h, integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c, libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h, machmode.def, machmode.h, main.c, mbchar.c, mbchar.h, mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk, mkmap-symver.awk, optabs.c, output.h, params.c, params.def, params.h, predict.c, predict.def, predict.h, prefix.c, prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c, read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c, regclass.c, regmove.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c, rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h, sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c, sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c, ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c, stringpool.c, system.h, timevar.c, timevar.def, timevar.h, tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h, tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h, unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h, unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c, xcoffout.h: replace "GNU CC" with "GCC". From-SVN: r45105
2001-08-22 16:35:51 +02:00
This file is part of GCC.
1991-12-01 06:13:56 +01:00
Makefile.in, [...]: replace "GNU CC" with "GCC". * Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, builtin-types.def, builtins.c, builtins.def, c-aux-info.c, c-common.c, c-common.def, c-common.h, c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c, c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in, c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c, caller-save.c, calls.c, collect2.c, collect2.h, combine.c, conditions.h, config.gcc, configure.frag, configure.in, conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c, cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h, dependence.c, df.c, df.h, diagnostic.c, diagnostic.h, doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c, dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c, emit-rtl.c, errors.c, errors.h, except.c, except.h, exgettext, explow.c, expmed.c, expr.c, expr.h, final.c, fixproto, flags.h, flow.c, fold-const.c, fp-test.c, function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp, gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c, gencheck.c, gencodes.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, genmultilib, genopinit.c, genoutput.c, genpeep.c, genrecog.c, gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c, ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c, graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h, gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h, gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h, hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h, integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c, libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h, machmode.def, machmode.h, main.c, mbchar.c, mbchar.h, mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk, mkmap-symver.awk, optabs.c, output.h, params.c, params.def, params.h, predict.c, predict.def, predict.h, prefix.c, prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c, read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c, regclass.c, regmove.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c, rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h, sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c, sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c, ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c, stringpool.c, system.h, timevar.c, timevar.def, timevar.h, tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h, tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h, unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h, unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c, xcoffout.h: replace "GNU CC" with "GCC". From-SVN: r45105
2001-08-22 16:35:51 +02:00
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
Makefile.in, [...]: replace "GNU CC" with "GCC". * Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, builtin-types.def, builtins.c, builtins.def, c-aux-info.c, c-common.c, c-common.def, c-common.h, c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c, c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in, c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c, caller-save.c, calls.c, collect2.c, collect2.h, combine.c, conditions.h, config.gcc, configure.frag, configure.in, conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c, cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h, dependence.c, df.c, df.h, diagnostic.c, diagnostic.h, doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c, dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c, emit-rtl.c, errors.c, errors.h, except.c, except.h, exgettext, explow.c, expmed.c, expr.c, expr.h, final.c, fixproto, flags.h, flow.c, fold-const.c, fp-test.c, function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp, gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c, gencheck.c, gencodes.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, genmultilib, genopinit.c, genoutput.c, genpeep.c, genrecog.c, gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c, ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c, graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h, gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h, gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h, hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h, integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c, libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h, machmode.def, machmode.h, main.c, mbchar.c, mbchar.h, mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk, mkmap-symver.awk, optabs.c, output.h, params.c, params.def, params.h, predict.c, predict.def, predict.h, prefix.c, prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c, read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c, regclass.c, regmove.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c, rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h, sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c, sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c, ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c, stringpool.c, system.h, timevar.c, timevar.def, timevar.h, tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h, tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h, unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h, unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c, xcoffout.h: replace "GNU CC" with "GCC". From-SVN: r45105
2001-08-22 16:35:51 +02:00
version.
1991-12-01 06:13:56 +01:00
Makefile.in, [...]: replace "GNU CC" with "GCC". * Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, builtin-types.def, builtins.c, builtins.def, c-aux-info.c, c-common.c, c-common.def, c-common.h, c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c, c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in, c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c, caller-save.c, calls.c, collect2.c, collect2.h, combine.c, conditions.h, config.gcc, configure.frag, configure.in, conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c, cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h, dependence.c, df.c, df.h, diagnostic.c, diagnostic.h, doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c, dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c, emit-rtl.c, errors.c, errors.h, except.c, except.h, exgettext, explow.c, expmed.c, expr.c, expr.h, final.c, fixproto, flags.h, flow.c, fold-const.c, fp-test.c, function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp, gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c, gencheck.c, gencodes.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, genmultilib, genopinit.c, genoutput.c, genpeep.c, genrecog.c, gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c, ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c, graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h, gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h, gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h, hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h, integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c, libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h, machmode.def, machmode.h, main.c, mbchar.c, mbchar.h, mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk, mkmap-symver.awk, optabs.c, output.h, params.c, params.def, params.h, predict.c, predict.def, predict.h, prefix.c, prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c, read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c, regclass.c, regmove.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c, rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h, sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c, sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c, ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c, stringpool.c, system.h, timevar.c, timevar.def, timevar.h, tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h, tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h, unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h, unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c, xcoffout.h: replace "GNU CC" with "GCC". From-SVN: r45105
2001-08-22 16:35:51 +02:00
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
1991-12-01 06:13:56 +01:00
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
1991-12-01 06:13:56 +01:00
#include "config.h"
Major cutover to using system.h: * Makefile.in (alias.o, bitmap.o, c-aux-info.o, c-common.o, c-decl.o, c-iterate.o, c-lang.o, c-lex.o, c-pragma.o, c-typeck.o, caller-save.o, calls.o, collect2.o, combine.o, cse.o, dbxout.o, dwarf2out.o, dwarfout.o, emit-rtl.o, except.o, explow.o, expmed.o, expr.o, final.o, flow.o, function.o, getpwd.o, global.o, integrate.o, jump.o, local-alloc.o, loop.o, optabs.o, pexecute.o, prefix.o, print-rtl.o, print-tree.o, profile.o, real.o, recog.o, reg-stack.o, regclass.o, regmove.o, reload.o, reload1.o, reorg.o, rtl.o, rtlanal.o, sdbout.o, stmt.o, stor-layout.o, stupid.o, tlink.o, toplev.o, tree.o, unroll.o, varasm.o, xcoffout.o): Depend on system.h. * alias.c, bitmap.c, c-aux-info.c, c-common.c, c-decl.c, c-iterate.c, c-lang.c, c-lex.c, c-pragma.c, c-typeck.c, caller-save.c, calls.c, collect2.c, combine.c, cse.c, dbxout.c, dwarf2out.c, dwarfout.c, emit-rtl.c, except.c, explow.c, expmed.c, expr.c, final.c, flow.c, function.c, gcc.c, getpwd.c, global.c, integrate.c, jump.c, local-alloc.c, loop.c, optabs.c, pexecute.c, prefix.c, print-rtl.c, print-tree.c, profile.c, real.c, recog.c, reg-stack.c, regclass.c, regmove.c, reload.c, reload1.c, reorg.c, rtl.c, rtlanal.c, sched.c, sdbout.c, stmt.c, stor-layout.c, stupid.c, tlink.c, toplev.c, tree.c, unroll.c, varasm.c, xcoffout.c: Include system.h. Organize include ordering so that stdarg/varargs comes before other system headers. Remove spurious casts of functions assured of a prototype in system.h. From-SVN: r18726
1998-03-20 15:58:42 +01:00
#include "system.h"
#include "coretypes.h"
#include "tm.h"
toplev.h: Do not include diagnostic-core.h. 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org> * toplev.h: Do not include diagnostic-core.h. Include diagnostic-core.h in every file that includes toplev.h. * c-tree.h: Do not include toplev.h. * pretty-print.h: Update comment. * Makefile.in: Update dependencies. * alias.c: Include diagnostic-core.h in every file that includes toplev.h. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfghooks.c: Likewise. * cfgloop.c: Likewise. * combine.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arc/arc.c: Likewise. * config/arm/arm.c: Likewise. * config/arm/pe.c: Likewise. * config/avr/avr.c: Likewise. * config/bfin/bfin.c: Likewise. * config/cris/cris.c: Likewise. * config/crx/crx.c: Likewise. * config/darwin-c.c: Likewise. * config/darwin.c: Likewise. * config/fr30/fr30.c: Likewise. * config/frv/frv.c: Likewise. * config/h8300/h8300.c: Likewise. * config/host-darwin.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/netware.c: Likewise. * config/i386/nwld.c: Likewise. * config/i386/winnt-cxx.c: Likewise. * config/i386/winnt-stubs.c: Likewise. * config/i386/winnt.c: Likewise. * config/ia64/ia64-c.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/lm32/lm32.c: Likewise. * config/m32c/m32c-pragma.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32r/m32r.c: Likewise. * config/m68hc11/m68hc11.c: Likewise. * config/m68k/m68k.c: Likewise. * config/mcore/mcore.c: Likewise. * config/mep/mep-pragma.c: Likewise. * config/mep/mep.c: Likewise. * config/mmix/mmix.c: Likewise. * config/mn10300/mn10300.c: Likewise. * config/moxie/moxie.c: Likewise. * config/pa/pa.c: Likewise. * config/pdp11/pdp11.c: Likewise. * config/picochip/picochip.c: Likewise. * config/rs6000/rs6000-c.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rx/rx.c: Likewise. * config/s390/s390.c: Likewise. * config/score/score.c: Likewise. * config/score/score3.c: Likewise. * config/score/score7.c: Likewise. * config/sh/sh.c: Likewise. * config/sh/symbian-base.c: Likewise. * config/sh/symbian-c.c: Likewise. * config/sh/symbian-cxx.c: Likewise. * config/sol2-c.c: Likewise. * config/sol2.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/v850/v850-c.c: Likewise. * config/v850/v850.c: Likewise. * config/vax/vax.c: Likewise. * config/vxworks.c: Likewise. * config/xtensa/xtensa.c: Likewise. * convert.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbxout.c: Likewise. * ddg.c: Likewise. * dominance.c: Likewise. * emit-rtl.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * fixed-value.c: Likewise. * fold-const.c: Likewise. * fwprop.c: Likewise. * gcse.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * gimple-low.c: Likewise. * gimplify.c: Likewise. * graph.c: Likewise. * haifa-sched.c: Likewise. * ifcvt.c: Likewise. * implicit-zee.c: Likewise. * integrate.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-iv.c: Likewise. * lto-opts.c: Likewise. * lto-symtab.c: Likewise. * main.c: Likewise. * modulo-sched.c: Likewise. * optabs.c: Likewise. * params.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * profile.c: Likewise. * real.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtlanal.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-ir.c: Likewise. * simplify-rtx.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * targhooks.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-dump.c: Likewise. * tree-eh.c: Likewise. * tree-inline.c: Likewise. * tree-nomudflap.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-phinodes.c: Likewise. * tree-profile.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssa.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vrp.c: Likewise. * varasm.c: Likewise. * vec.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. c-family/ * c-common.h: Include diagnostic-core.h. Error if already included. * c-semantics.c: Do not define GCC_DIAG_STYLE here. cp/ * cp-tree.h: Do not include toplev.h. java/ * boehm.c: Include diagnostic-core.h in every file that includes toplev.h. * class.c: Likewise. * constants.c: Likewise. * decl.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * jcf-parse.c: Likewise. * mangle.c: Likewise. * mangle_name.c: Likewise. * resource.c: Likewise. * typeck.c: Likewise. * verify-glue.c: Likewise. ada/ * gcc-interface/utils.c: Include diagnostic-core.h in every file that includes toplev.h. lto/ * lto-coff.c: Include diagnostic-core.h in every file that includes toplev.h. * lto-elf.c: Likewise. * lto-lang.c: Likewise. * lto-macho.c: Likewise. From-SVN: r161943
2010-07-08 06:22:54 +02:00
#include "diagnostic-core.h"
#include "hard-reg-set.h"
#include "rtl.h"
#include "insn-config.h"
#include "recog.h"
#include "target.h"
#include "output.h"
#include "tm_p.h"
#include "flags.h"
alias.c (record_set): Use hard_regno_nregs. * alias.c (record_set): Use hard_regno_nregs. * bt-load.c (find_btr_reference, note_btr_set): Likewise. * builtins.c (apply_args_size): Likewise. * caller-save.c (setup_save_areas, save_call_clobbered_regs, mark_set_regs, add_stored_regs, mark_referenced_regs, insert_restore, insert_save, insert_one_insn): Likewise. * cfgcleanup.c: Include regs.h (mark_effect, mentions_nonequal_regs): Likewise. * cfgrtl.c (mark_killed_regs): Likewise * combine.c (update_table_tick, record_value_for_reg, record_dead_and_set_regs, get_last_value_validate, use_crosses_set_p, reg_dead_at_p_1, reg_dead_at_p, mark_used_regs_combine, move_deaths, reg_bitfield_target_p, distribute_notes): Likewise. * cse.c (mention_regs, insert, invalidate, invalidate_for_call, exp_equiv_p, cse_insn): Likewise. * cselib.c (cselib_lookup): Likewise. (cselib_invalidate_regno, cselib_record_set): Likewise. * df.c (df_ref_record): Likewise. * dwarf2out.c (reg_loc_descriptor, multiple_reg_loc_descriptor): Likewise. * flow.c (mark_reg, insn_dead_p, mark_set_1, mark_used_reg, count_or_remove_death_notes_bb): Likewise. * function.c (aggregate_value_p, keep_stack_depressed): Likewise. * gloval.c (global_alloc, find_reg, mark_reg_store, mark_reg_conflicts, mark_reg_death, set_preference, reg_becomes_live, reg_dies): Likewise. * integrate.c (mark_stores): Likewise. * jump.c (delete_prior_computation): Likewise. * lcm.c (reg_dies, reg_becomes_live): Likewise. * local-alloc.c (combine_regs, find_free_reg, post_mark_life): Likewise. * loop.c (LOOP_REGNO_NREGS): Likewise. * postreload.c (reload_combine, reload_combine_note_store, reload_combine_note_use, reload_cse_move2add, move2add_note_store): Likewise. * ra-colorize.c (combine, color_usable_p, get_free_reg, calculate_dont_begin, calculate_dont_begin, colorize_one_web, try_recolor_web, insert_coalesced_conflicts, check_colors, break_precolored_alias): Likewise. * ra-debug.c: Include regs.h (ra_print_rtx_object): Likewise. * ra-rewrite (choose_spill_colors): Likewise. (spill_same_color_p, update_spill_colors, spill_is_free): Likewise. * ra.c (init_ra): Likewise. * recog.c (reg_fits_class_p, peep2_reg_dead_p, peep2_find_free_register): Likewise. * reg-stack.c (subst_stack_regs_pat, convert_regs_exit): Likewise. * regclass.c (hard_regno_nregs): New array. (init_reg_modes_once): Initialize it. (choose_hard_reg_mode): Use it. (record_reg_classes): Likewise. * regmove.c (mark_flags_life_zones): Likewise. * regrename.c (note_sets, clear_dead_regs, regrename_optimize, scan_rtx_reg, dump_def_use_chain, kill_value, set_value_regno, copy_value, maybe_mode_change, find_oldest_value_reg, copyprop_hardreg_forward_1): * regs.h (hard_regno_nregs): Declare. * realod.c (reload_inner_reg_of_subreg): Use it. (push_reload, combine_reloads, find_dummy_reload, hard_reg_set_here_p, operands_match_p, decompose, find_reloads, refers_to_regno_for_reload_p, find_equiv_reg, regno_clobbered_p, reload_adjust_reg_for_mode): Likewise. * reload1.c (compute_use_by_pseudos, count_pseudo, count_spilled_pseudo, find_reg, find_reload_regs, mark_home_live, spill_hard_reg, forget_old_reloads_1, mark_reload_reg_in_use, clear_reload_reg_in_use, reload_reg_free_for_value_p, free_for_value_p allocate_reload_reg, choose_reload_regs, emit_reload_insns, delete_output_reload): Likewise. * resource.c (update_live_status, mark_referenced_resources, mark_set_resources, mark_target_live_regs): Likewise. * rtlanal.c: Include regs.h (refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_regno_note, find_reg_fusage, subreg_regno_offset, subreg_offset_representable_p, hoist_test_store): Likewise. * sched-deps.c (sched_analyze_1, sched_analyze_2): Likewise. * sched-rgn.c (check_live_1, update_live_1): Likewise. * stmt.c: Include regs.h (decl_conflicts_with_clobbers_p): Likewise. * varasm.c (make_decl_rtl): Likewise. * Makefile.in (cfgcleanup.o, rtlanal.o, ra-debug.o): Add regs.h dependnecy. From-SVN: r77088
2004-02-02 01:17:18 +01:00
#include "regs.h"
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 18:37:19 +02:00
#include "hashtab.h"
#include "hash-set.h"
#include "vec.h"
#include "machmode.h"
#include "input.h"
#include "function.h"
ggcplug.c: Shuffle includes to include gcc-plugin.h earlier. 2014-10-27 Andrew MacLeod <amacleod@redhat.com> * testsuite/gcc.dg/plugin/ggcplug.c: Shuffle includes to include gcc-plugin.h earlier. 2014-10-27 Andrew MacLeod <amacleod@redhat.com> * c/c-typeck.c: Adjust include files. 2014-10-27 Andrew MacLeod <amacleod@redhat.com> * c-family/c-gimplify.c: Adjust include files. 2014-10-27 Andrew MacLeod <amacleod@redhat.com> * cp/cp-gimplify.c: Adjust include files. 2014-10-27 Andrew MacLeod <amacleod@redhat.com> * go/go-gcc.cc: Adjust include files. * go/go-lang.c: Ditto. 2014-10-27 Andrew MacLeod <amacleod@redhat.com> * java/java-gimplify.c: Adjust include files. 2014-10-27 Andrew MacLeod <amacleod@redhat.com> * lto/lto-lang.c: Adjust include files. * lto/lto-object.c: Ditto. * lto/lto-partition.c: Ditto. * lto/lto-symtab.c: Ditto. * lto/lto.c: Ditto. 2014-10-27 Andrew MacLeod <amacleod@redhat.com> * basic-block.h: Remove all includes. (enum profile_status_d, struct control_flow_graph): Move to cfg.h * cfg.h (profile_status_d, struct control_flow_graph): Relocate here. * Makefile.in (GTFILES): Add cfg.h to list. * cgraph.h (symbol_table::create_empty): Move to cgraph.c. * cgraph.c (symbol_table::create_empty): Relocate from cgraph.h. * genconditions.c (write_header): Add predict.h and basic-block.h to lits of includes. * genemit.c (main): Ditto. * genpreds.c (write_insn_preds_c): Ditto. * genrecog.c (write_header): Ditto. * gengtype.c (open_base_files): Add predict.h, basic-block.h, and cfg.h to list of includes. * alias.c: Adjust include files. * asan.c: Ditto. * auto-inc-dec.c: Ditto. * auto-profile.c: Ditto. * bb-reorder.c: Ditto. * bt-load.c: Ditto. * builtins.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfganal.c: Ditto. * cfgbuild.c: Ditto. * cfgcleanup.c: Ditto. * cfgexpand.c: Ditto. * cfghooks.c: Ditto. * cfgloop.c: Ditto. * cfgloopanal.c: Ditto. * cfgloopmanip.c: Ditto. * cfgrtl.c: Ditto. * cgraphbuild.c: Ditto. * cgraphclones.c: Ditto. * cgraphunit.c: Ditto. * combine-stack-adj.c: Ditto. * combine.c: Ditto. * compare-elim.c: Ditto. * coverage.c: Ditto. * cprop.c: Ditto. * cse.c: Ditto. * cselib.c: Ditto. * data-streamer-in.c: Ditto. * data-streamer-out.c: Ditto. * data-streamer.c: Ditto. * dce.c: Ditto. * ddg.c: Ditto. * ddg.h: Ditto. * df-core.c: Ditto. * df-problems.c: Ditto. * df-scan.c: Ditto. * df.h: Ditto. * dojump.c: Ditto. * dominance.c: Ditto. * domwalk.c: Ditto. * dse.c: Ditto. * dwarf2cfi.c: Ditto. * emit-rtl.c: Ditto. * et-forest.c: Ditto. * except.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * fwprop.c: Ditto. * gcc-plugin.h: Ditto. * gcse.c: Ditto. * generic-match-head.c: Ditto. * ggc-page.c: Ditto. * gimple-builder.c: Ditto. * gimple-expr.c: Ditto. * gimple-fold.c: Ditto. * gimple-iterator.c: Ditto. * gimple-low.c: Ditto. * gimple-match-head.c: Ditto. * gimple-pretty-print.c: Ditto. * gimple-ssa-isolate-paths.c: Ditto. * gimple-ssa-strength-reduction.c: Ditto. * gimple-streamer-in.c: Ditto. * gimple-streamer-out.c: Ditto. * gimple-streamer.h: Ditto. * gimple-walk.c: Ditto. * gimple.c: Ditto. * gimplify-me.c: Ditto. * gimplify.c: Ditto. * graph.c: Ditto. * graphite-blocking.c: Ditto. * graphite-clast-to-gimple.c: Ditto. * graphite-dependences.c: Ditto. * graphite-interchange.c: Ditto. * graphite-isl-ast-to-gimple.c: Ditto. * graphite-optimize-isl.c: Ditto. * graphite-poly.c: Ditto. * graphite-scop-detection.c: Ditto. * graphite-sese-to-poly.c: Ditto. * graphite.c: Ditto. * haifa-sched.c: Ditto. * hw-doloop.c: Ditto. * ifcvt.c: Ditto. * init-regs.c: Ditto. * internal-fn.c: Ditto. * ipa-cp.c: Ditto. * ipa-devirt.c: Ditto. * ipa-icf-gimple.c: Ditto. * ipa-icf.c: Ditto. * ipa-inline-analysis.c: Ditto. * ipa-inline.c: Ditto. * ipa-polymorphic-call.c: Ditto. * ipa-profile.c: Ditto. * ipa-prop.c: Ditto. * ipa-pure-const.c: Ditto. * ipa-reference.c: Ditto. * ipa-split.c: Ditto. * ipa-utils.c: Ditto. * ipa.c: Ditto. * ira-build.c: Ditto. * ira-color.c: Ditto. * ira-conflicts.c: Ditto. * ira-costs.c: Ditto. * ira-emit.c: Ditto. * ira-lives.c: Ditto. * ira.c: Ditto. * jump.c: Ditto. * lcm.c: Ditto. * loop-doloop.c: Ditto. * loop-init.c: Ditto. * loop-invariant.c: Ditto. * loop-iv.c: Ditto. * loop-unroll.c: Ditto. * lower-subreg.c: Ditto. * lra-assigns.c: Ditto. * lra-coalesce.c: Ditto. * lra-constraints.c: Ditto. * lra-eliminations.c: Ditto. * lra-lives.c: Ditto. * lra-spills.c: Ditto. * lra.c: Ditto. * lto-cgraph.c: Ditto. * lto-compress.c: Ditto. * lto-opts.c: Ditto. * lto-section-in.c: Ditto. * lto-section-out.c: Ditto. * lto-streamer-in.c: Ditto. * lto-streamer-out.c: Ditto. * lto-streamer.c: Ditto. * mcf.c: Ditto. * mode-switching.c: Ditto. * modulo-sched.c: Ditto. * omp-low.c: Ditto. * optabs.c: Ditto. * opts-global.c: Ditto. * passes.c: Ditto. * postreload-gcse.c: Ditto. * postreload.c: Ditto. * predict.c: Ditto. * print-rtl.c: Ditto. * profile.c: Ditto. * recog.c: Ditto. * ree.c: Ditto. * reg-stack.c: Ditto. * regcprop.c: Ditto. * regcprop.h: Ditto. * reginfo.c: Ditto. * regrename.c: Ditto. * regstat.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtlanal.c: Ditto. * sched-deps.c: Ditto. * sched-ebb.c: Ditto. * sched-int.h: Ditto. * sched-rgn.c: Ditto. * sched-vis.c: Ditto. * sel-sched-dump.c: Ditto. * sel-sched-ir.c: Ditto. * sel-sched-ir.h: Ditto. * sel-sched.c: Ditto. * sese.c: Ditto. * shrink-wrap.c: Ditto. * stack-ptr-mod.c: Ditto. * stmt.c: Ditto. * store-motion.c: Ditto. * symtab.c: Ditto. * toplev.c: Ditto. * tracer.c: Ditto. * trans-mem.c: Ditto. * tree-affine.c: Ditto. * tree-call-cdce.c: Ditto. * tree-cfg.c: Ditto. * tree-cfgcleanup.c: Ditto. * tree-chrec.c: Ditto. * tree-complex.c: Ditto. * tree-data-ref.c: Ditto. * tree-dfa.c: Ditto. * tree-eh.c: Ditto. * tree-emutls.c: Ditto. * tree-if-conv.c: Ditto. * tree-inline.c: Ditto. * tree-into-ssa.c: Ditto. * tree-loop-distribution.c: Ditto. * tree-nested.c: Ditto. * tree-nrv.c: Ditto. * tree-object-size.c: Ditto. * tree-outof-ssa.c: Ditto. * tree-parloops.c: Ditto. * tree-phinodes.c: Ditto. * tree-predcom.c: Ditto. * tree-pretty-print.c: Ditto. * tree-profile.c: Ditto. * tree-scalar-evolution.c: Ditto. * tree-sra.c: Ditto. * tree-ssa-address.c: Ditto. * tree-ssa-alias.c: Ditto. * tree-ssa-ccp.c: Ditto. * tree-ssa-coalesce.c: Ditto. * tree-ssa-copy.c: Ditto. * tree-ssa-copyrename.c: Ditto. * tree-ssa-dce.c: Ditto. * tree-ssa-dom.c: Ditto. * tree-ssa-dse.c: Ditto. * tree-ssa-forwprop.c: Ditto. * tree-ssa-ifcombine.c: Ditto. * tree-ssa-live.c: Ditto. * tree-ssa-loop-ch.c: Ditto. * tree-ssa-loop-im.c: Ditto. * tree-ssa-loop-ivcanon.c: Ditto. * tree-ssa-loop-ivopts.c: Ditto. * tree-ssa-loop-manip.c: Ditto. * tree-ssa-loop-niter.c: Ditto. * tree-ssa-loop-prefetch.c: Ditto. * tree-ssa-loop-unswitch.c: Ditto. * tree-ssa-loop.c: Ditto. * tree-ssa-math-opts.c: Ditto. * tree-ssa-operands.c: Ditto. * tree-ssa-phiopt.c: Ditto. * tree-ssa-phiprop.c: Ditto. * tree-ssa-pre.c: Ditto. * tree-ssa-propagate.c: Ditto. * tree-ssa-reassoc.c: Ditto. * tree-ssa-sccvn.c: Ditto. * tree-ssa-sink.c: Ditto. * tree-ssa-strlen.c: Ditto. * tree-ssa-structalias.c: Ditto. * tree-ssa-tail-merge.c: Ditto. * tree-ssa-ter.c: Ditto. * tree-ssa-threadedge.c: Ditto. * tree-ssa-threadupdate.c: Ditto. * tree-ssa-uncprop.c: Ditto. * tree-ssa-uninit.c: Ditto. * tree-ssa.c: Ditto. * tree-ssanames.c: Ditto. * tree-stdarg.c: Ditto. * tree-streamer-in.c: Ditto. * tree-streamer-out.c: Ditto. * tree-streamer.c: Ditto. * tree-switch-conversion.c: Ditto. * tree-tailcall.c: Ditto. * tree-vect-data-refs.c: Ditto. * tree-vect-generic.c: Ditto. * tree-vect-loop-manip.c: Ditto. * tree-vect-loop.c: Ditto. * tree-vect-patterns.c: Ditto. * tree-vect-slp.c: Ditto. * tree-vect-stmts.c: Ditto. * tree-vectorizer.c: Ditto. * tree-vrp.c: Ditto. * tree.c: Ditto. * tsan.c: Ditto. * ubsan.c: Ditto. * valtrack.c: Ditto. * valtrack.h: Ditto. * value-prof.c: Ditto. * var-tracking.c: Ditto. * varasm.c: Ditto. * varpool.c: Ditto. * vtable-verify.c: Ditto. * web.c: Ditto. * config/aarch64/aarch64-builtins.c: Ditto. * config/aarch64/aarch64.c: Ditto. * config/alpha/alpha.c: Ditto. * config/arc/arc.c: Ditto. * config/arm/arm.c: Ditto. * config/avr/avr.c: Ditto. * config/bfin/bfin.c: Ditto. * config/c6x/c6x.c: Ditto. * config/cr16/cr16.c: Ditto. * config/cris/cris.c: Ditto. * config/darwin-c.c: Ditto. * config/darwin.c: Ditto. * config/epiphany/epiphany.c: Ditto. * config/epiphany/mode-switch-use.c: Ditto. * config/epiphany/resolve-sw-modes.c: Ditto. * config/fr30/fr30.c: Ditto. * config/frv/frv.c: Ditto. * config/h8300/h8300.c: Ditto. * config/i386/i386.c: Ditto. * config/i386/winnt.c: Ditto. * config/ia64/ia64.c: Ditto. * config/iq2000/iq2000.c: Ditto. * config/lm32/lm32.c: Ditto. * config/m32c/m32c.c: Ditto. * config/m32r/m32r.c: Ditto. * config/m68k/m68k.c: Ditto. * config/mcore/mcore.c: Ditto. * config/mep/mep.c: Ditto. * config/microblaze/microblaze.c: Ditto. * config/mips/mips.c: Ditto. * config/mmix/mmix.c: Ditto. * config/mn10300/mn10300.c: Ditto. * config/moxie/moxie.c: Ditto. * config/msp430/msp430.c: Ditto. * config/nds32/nds32-cost.c: Ditto. * config/nds32/nds32-fp-as-gp.c: Ditto. * config/nds32/nds32-intrinsic.c: Ditto. * config/nds32/nds32-isr.c: Ditto. * config/nds32/nds32-md-auxiliary.c: Ditto. * config/nds32/nds32-memory-manipulation.c: Ditto. * config/nds32/nds32-pipelines-auxiliary.c: Ditto. * config/nds32/nds32-predicates.c: Ditto. * config/nds32/nds32.c: Ditto. * config/nios2/nios2.c: Ditto. * config/pa/pa.c: Ditto. * config/pdp11/pdp11.c: Ditto. * config/rl78/rl78.c: Ditto. * config/rs6000/rs6000.c: Ditto. * config/rx/rx.c: Ditto. * config/s390/s390.c: Ditto. * config/sh/sh-mem.cc: Ditto. * config/sh/sh.c: Ditto. * config/sh/sh_optimize_sett_clrt.cc: Ditto. * config/sh/sh_treg_combine.cc: Ditto. * config/sparc/sparc.c: Ditto. * config/spu/spu.c: Ditto. * config/stormy16/stormy16.c: Ditto. * config/tilegx/tilegx.c: Ditto. * config/tilepro/tilepro.c: Ditto. * config/v850/v850.c: Ditto. * config/vax/vax.c: Ditto. * config/xtensa/xtensa.c: Ditto. From-SVN: r216735
2014-10-27 13:41:01 +01:00
#include "predict.h"
#include "basic-block.h"
#include "df.h"
genattrtab.c (write_header): Include hash-set.h... 2015-01-09 Michael Collison <michael.collison@linaro.org> * genattrtab.c (write_header): Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating insn-attrtab.c. * genautomata.c (main) : Include hash-set.h, macInclude hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating insn-automata.c. * genemit.c (main): Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating insn-emit.c. * gengtype.c (open_base_files): Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating gtype-desc.c. * genopinit.c (main): Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating insn-opinit.c. * genoutput.c (output_prologue): Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating insn-output.c. * genpeep.c (main): Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating insn-peep.c. * genpreds.c (write_insn_preds_c): Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating insn-preds.c. * optc-save-gen-awk: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h when generating options-save.c. * opth-gen.awk: Change include guard from GCC_C_COMMON_H to GCC_C_COMMON_C when generating options.h. * ada/gcc-interface/cuintp.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ada/gcc-interface/decl.c: ditto. * ada/gcc-interface/misc.c: ditto. * ada/gcc-interface/targtyps.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ada/gcc-interface/trans.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, real.h, fold-const.h, wide-int.h, inchash.h due to flattening of tree.h. * ada/gcc-interface/utils.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ada/gcc-interface/utils2.c: ditto. * alias.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * asan.c: ditto. * attribs.c: ditto. * auto-inc-dec.c: ditto. * auto-profile.c: ditto * bb-reorder.c: ditto. * bt-load.c: Include symtab.h due to flattening of tree.h. * builtins.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * c/c-array-notation.c: ditto. * c/c-aux-info.c: ditto. * c/c-convert.c: ditto. * c/c-decl.c: ditto. * c/c-errors.c: ditto. * c/c-lang.c: dittoxs. * c/c-objc-common.c: ditto. * c/c-parser.c: ditto. * c/c-typeck.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, inchash.h, real.h and fixed-value.h due to flattening of tree.h. * calls.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ccmp.c: ditto. * c-family/array-notation-common.c: ditto. * c-family/c-ada-spec.c: ditto. * c-family/c-cilkplus.c: ditto. * c-family/c-common.c: Include input.h due to flattening of tree.h. Define macro GCC_C_COMMON_C. * c-family/c-common.h: Flatten tree.h header files into c-common.h. Remove include of tree-core.h. * c-family/c-cppbuiltin.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * c-family/c-dump.c: ditto. * c-family/c-format.c: Flatten tree.h header files into c-common.h. * c-family/c-cppbuiltin.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * c-family/c-dump.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * c-family/c-format.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * c-family/c-gimplify.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * c-family/cilk.c: ditto. * c-family/c-lex.c: ditto. * c-family/c-omp.c: ditto. * c-family/c-opts.c: ditto. * c-family/c-pch.c: ditto. * c-family/c-ppoutput.c: ditto. * c-family/c-pragma.c: ditto. * c-family/c-pretty-print.c: ditto. * c-family/c-semantics.c: ditto. * c-family/c-ubsan.c: ditto. * c-family/stub-objc.c: ditto. * cfgbuild.c: ditto. * cfg.c: ditto. * cfgcleanup.c: ditto. * cfgexpand.c: ditto. * cfghooks.c: ditto. * cfgloop.c: Include symtab.h, fold-const.h, and inchash.h due to flattening of tree.h. * cfgloopmanip.c: ditto. * cfgrtl.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * cgraphbuild.c: ditto. * cgraph.c: ditto. * cgraphclones.c: ditto. * cgraphunit.c: ditto. * cilk-common.c: ditto. * combine.c: ditto. * combine-stack-adj.c: Include symbol.h due to flattening of tree.h. * config/aarch64/aarch64-builtins.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/aarch64/aarch64.c: ditto. * config/alpha/alpha.c: ditto. * config/arc/arc.c: ditto. * config/arm/aarch-common.c: ditto. * config/arm/arm-builtins.c: ditto. * config/arm/arm.c: ditto. * config/arm/arm-c.c: ditto. * config/avr/avr.c: ditto. * config/avr/avr-c.c: ditto. * config/avr/avr-log.c: ditto. * config/bfin/bfin.c: ditto. * config/c6x/c6x.c: ditto. * config/cr16/cr16.c: ditto. * config/cris/cris.c: ditto. * config/darwin.c: ditto. * config/darwin-c.c: ditto. * config/default-c.c: ditto. * config/epiphany/epiphany.c: ditto. * config/fr30/fr30.c: ditto. * config/frv/frv.c: ditto. * config/glibc-c.c: ditto. * config/h8300/h8300.c: ditto. * config/i386/i386.c: ditto. * config/i386/i386-c.c: ditto. * config/i386/msformat.c: ditto. * config/i386/winnt.c: ditto. * config/i386/winnt-cxx.c: ditto. * config/i386/winnt-stubs.c: ditto. * config/ia64/ia64.c: ditto. * config/ia64/ia64-c.c: ditto. * config/iq2000/iq2000.c: ditto. * config/lm32/lm32.c: Include symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/m32c/m32c.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/m32c/m32c-pragma.c: ditto. * config/m32c/m32cr.c: ditto. * config/m68/m68k.c: ditto. * config/mcore/mcore.c: ditto. * config/mep/mep.c: ditto. * config/mep/mep-pragma.c: ditto. * config/microblaze/microblaze.c: ditto. * config/microblaze/microblaze-c.c: ditto. * config/mips/mips.c: ditto. * config/mmix/mmix.c: Include symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/mn10300/mn10300.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/moxie/moxie.c: ditto. * config/msp430/msp430.c: ditto. * config/msp430/msp430-c.c: ditto. * config/nds32/nds32.c: ditto. * config/nds32/nds32-cost.c: ditto. * config/nds32/nds32-fp-as-gp.c: ditto. * config/nds32/nds32-intrinsic.c: ditto. * config/nds32/nds32-isr.c: ditto. * config/nds32/nds32-md-auxillary.c: ditto. * config/nds32/nds32-memory-manipulationx.c: ditto. * config/nds32/nds32-pipelines-auxillary.c: ditto. * config/nds32/nds32-predicates.c: ditto. * config/nios2/nios2.c: ditto. * config/nvptx/nvptx.c: ditto. * config/pa/pa.c: ditto. * config/pdp11/pdp11x.c: Include symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/rl78/rl78.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/rl78/rl78-cx.c: ditto. * config/rs6000/rs6000.c: ditto. * config/rs6000/rs6000-c.c: ditto. * config/rx/rx.c: ditto. * config/s390/s390.c: ditto. * config/sh/sh.c: ditto. * config/sh/sc.c: ditto. * config/sh/sh-mem.cc: ditto. * config/sh/sh_treg_combine.cc: Include symtab.h, inchash.h and tree.h due to flattening of tree.h. Remove include of tree-core.h. * config/sol2.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/sol2-c.c: ditto. * config/sol2-cxx.c: ditto. * config/sol2-stubs.c: ditto. * config/sparc/sparc.c: ditto. * config/sparc/sparc-cx.c: ditto. * config/spu/spu.c: ditto. * config/spu/spu-c.c: ditto * config/storym16/stormy16.c: ditto. * config/tilegx/tilegx.c: Include symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/tilepro/gen-mul-tables.cc: Include symtab.h in generated file. * config/tilegx/tilegx-c.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/tilepro/tilepro.c: Include symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/tilepro/tilepro-c.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * config/v850/v850.c: ditto. * config/v850/v850-c.c: ditto. * config/vax/vax.c: ditto. * config/vms/vms.c: ditto. * config/vms/vms-c.c: ditto. * config/vxworks.c: ditto. * config/winnt-c.c: ditto. * config/xtensa/xtensa.c: Include symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * convert.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * coverage.c: ditto. * cp/call.c: ditto. * cp/class.c: ditto. * cp/constexpr.c: ditto. * cp/cp-array-notation.c: ditto. * cp/cp-gimplify.c: ditto. * cp/cp-lang.c: ditto. * cp/cp-objcp-common.c: ditto. * cp/cvt.c: ditto. * cp/decl2.c: ditto. * cp/decl.c: ditto. * cp/dump.c: ditto. * cp/error.c: ditto. * cp/except.c: ditto. * cp/expr.c: ditto. * cp/friend.c: ditto. * cp/init.c: ditto. * cp/lambda.c: ditto. * cp/lex.c: ditto. * cp/mangle.c: ditto. * cp/name-lookup.c: ditto. * cp/optimize.c: ditto. * cp/parser.c: ditto. * cp/pt.c: ditto. * cp/ptree.c: ditto. * cp/repo.c: ditto. * cp/rtti.c: ditto. * cp/search.c: ditto. * cp/semantics.c: ditto. * cp/tree.c: ditto. * cp/typeck2.c: ditto. * cp/typeck.c: ditto. * cppbuiltin.c: ditto. * cprop.c: ditto. * cse.c: Add include of symtab.h due to flattening of tree.h. * cselib.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * data-streamer.c: ditto. * data-streamer-in.c: ditto. * data-streamer-out.c: ditto. * dbxout.c: ditto. * dce.c: ditto. * ddg.c: Add include of symtab.h due to flattening of tree.h. * debug.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * dfp.c: ditto. * df-scan.c: ditto. * dojump.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * double-int.c: ditto. * dse.c: ditto. * dumpfile.c: ditto. * dwarf2asm.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * dwarf2cfi.c: ditto. * dwarf2out.c: ditto. * emit-rtl.c: ditto. * except.c: ditto. * explow.c: ditto. * expmed.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * expr.c: ditto. * final.c: ditto. * fixed-value.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and fixed-value.h due to flattening of tree.h. * fold-const.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. Relocate inline function convert_to_ptrofftype_loc from tree.h. Relocate inline function fold_build_pointer_plus_loc from tree.h. Relocate inline function fold_build_pointer_plus_hwi_loc from tree.h. * fold-const.h: Relocate macro convert_to_ptrofftype from tree.h. Relocate macro fold_build_pointer_plus to relocate from tree.h.h. Relocate macro fold_build_pointer_plus_hwi from tree.h. Add prototype for convert_to_ptrofftype_loc relocated from tree.h. Add prototype for fold_build_pointer_plus_loc relocated from tree.h. Add prototype for fold_build_pointer_plus_hwi_loc relocated from tree.h. * fortran/convert.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/cpp.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/decl.c: ditto. * fortran/f95.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/iresolve.c: ditto. * fortran/match.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/module.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/options.c: ditto. * fortran/target-memory.c: Include hash-set.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/trans-array.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/trans.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/trans-common.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/trans-const.c: ditto. * fortran/trans-decl.c: ditto. * fortran/trans-expr.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/trans-intrinsic.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * fortran/trans-io.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * fortran/trans-openmp.c: ditto. * fortran/trans-stmt.c: ditto. * fortran/trans-types.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * function.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * gcc-plugin.h: Include statistics.h, double-int.h, real.h, fixed-value.h, alias.h, flags.h, and symtab.h due to flattening of tree.h * gcse.c: ditto. * generic-match-head.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ggc-page.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * gimple-builder.c: ditto. * gimple.c: ditto. * gimple-expr.c: ditto. * gimple-fold.c: ditto. * gimple-iterator.c: ditto. * gimple-low.c: ditto. * gimple-match-head.c: ditto. * gimple-pretty-print.c: ditto. * generic-ssa-isolate-paths.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * gimple-ssa-strength-reduction.c: ditto. * gimple-streamer-in.c: ditto. * gimple-streamer-out.c: ditto. * gimple-walk.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * gimplify.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * gimplify-me.c: ditto. * go/go-gcc.cc: ditto. * go/go-lang.c: ditto. * go/gdump.c: ditto. * graphite-blocking.c: ditto. * graphite.c: ditto. * graphite-dependencies.c: ditto. * graphite-interchange.c: ditto. * graphite-isl-ast-to-gimple.c: ditto. * graphite-optimize-isl.c: ditto. * graphite-poly.c: ditto. * graphite-scop-detection.c: ditto. * graphite-sese-to-poly.c: ditto. * hw-doloop.c: Include symtab.h due to flattening of tree.h. * ifcvt.c: ditto. * init-regs.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * internal-fc.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h,options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa.c: ditto. * ipa-chkp.c: ditto. * ipa-comdats.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa-cp.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h,options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa-devirt.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa-icf.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h,options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa-icf-gimple.c: ditto. * ipa-inline-analysis.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa-inline.c: ditto. * ipa-inline-transform.c: ditto. * ipa-polymorhpic-call.c: ditto. * ipa-profile.c: ditto. * ipa-prop.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa-pure-const.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa-ref.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ipa-reference.c: ditto. * ipa-split.c: ditto. * ipa-utils.c: ditto. * ipa-visbility.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ira.c: ditto. * ira-color.c: Include hash-set.h due to flattening of tree.h. * ira-costs.c: ditto. * ira-emit.c: ditto. * java/boehm.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * java/builtins.c: ditto. * java/class.c: ditto. * java/constants.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * java/decl.c: ditto. * java/except.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * java/expr.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h,inchash.h and real.h due to flattening of tree.h. * java/gimplify.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * java/jcf-dump.c: ditto. * java/jcf-io.c: ditto. * java/jcf-parse.c: ditto. * java/jvgenmain.c: ditto. * java/lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * java/mangle.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * java/mangle_name.c: ditto. * java/resource.c: ditto. * java/typeck.c: ditto. * java/verify-glue.c: ditto. * java/verify-impl.c: ditto. * jump.c: Include symtab.h due to flattening of tree.h. * langhooks.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * loop-doloop.c: Include symtab.h due to flattening of tree.h. * loop-init.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * loop-invariant.c: Include symtab.h due to flattening of tree.h. * loop-iv.c: ditto. * loop-unroll.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * lower-subreg.c: ditto. * lra-assigns.c: Include symtab.h due to flattening of tree.h. * lra.c: Include symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * lra-coalesce.c: Include symtab.h due to flattening of tree.h. * lra-constraints.c: ditto. * lra-eliminations.c: ditto. * lra-livesc: ditto. * lra-remat.c: ditto. * lra-spills.c: ditto. * lto/lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * lto/lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * lto/lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * lto/lto-partition.c: ditto. * lto/lto-symtab.c: ditto. * lto-cgraph.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * lto-compress.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * lto-opts.c: ditto. * lto-section-in.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * lto-section-out.c: ditto. * lto-streamer.c: ditto. * lto-streamer-in.c: ditto. * lto-streamer-out.c: ditto. * modulo-sched.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * objc/objc-act.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * objc/objc-encoding.c: ditto. * objc/objc-gnu-runtime-abi-01.c: ditto. * objc/objc-lang.c: ditto. * objc/objc-map.c: ditto. * objc/objc-next-runtime-abi-01.c: ditto. * objc/objc-next-runtime-abi-02.c: ditto. * objc/objc-runtime-shared-support.c: ditto. * objcp/objcp-decl.c: ditto. * objcp/objcp-lang.c: ditto. * omega.c: ditto. * omega-low.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * optabs.c: ditto. * opts-global.c: ditto. * passes.c: ditto. * plugin.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * postreload.c: Include symtab.h due to flattening of tree.h. * postreload-gcse.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * predict.c: ditto. * print-rtl.c: ditto. * print-tree.c: ditto. * profile.c: Include symtab.h, fold-const.h and inchash.h due to flattening of tree.h. * real.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * realmpfr.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * recog.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * ree.c: ditto. * reginfo.c: ditto. * reg-stack.c: ditto. * reload1.c: Include symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * reload.c: Include symtab.h due to flattening of tree.h. * reorg.c: ditto. * rtlanal.c: Include symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * rtl-chkp.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * rtlhooks.c: Include symtab.h due to flattening of tree.h. * sanopt.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * sched-deps.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * sched-vis.c: ditto. * sdbout.c: ditto. * sel-sched.c: Include symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * sel-sched-ir.c: ditto. * sese.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * shrink-wrap.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * simplify-rtx.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * stack-ptr-mod.c: ditto. * stmt.c: ditto. * store-motion.c: ditto. * store-layout.c: ditto. * stringpool.c: ditto. * symtab.c: ditto. * target-globals.c: ditto. * targhooks.c: ditto. * toplev.c: ditto. * tracer.c: ditto. * trans-mem.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree-affine.c: ditto. * tree-browser.c: ditto. * tree.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree-call-cdce.c: Include symtab.h, alias.h, double-int.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * tree-cfg.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree-cfgcleanup.c: ditto. * tree-chkp.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree-chkp-opt.c: ditto. * tree-chrec.c: ditto. * tree-chkp-opt.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * tree-core.h: Flatten header file by removing all #include statements. * tree-data-ref.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree-dfa.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * tree-diagnostic.c: ditto. * tree-dump.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h, real.h and fixed-value.h due to flattening of tree.h. * tree-dfa.c: ditto. * tree-eh.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * tree-emutls.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree.h: Flatten header files by removing all includes except tree-core.h. Remove inline function convert_to_ptrofftype_loc to relocate to fold-const.c. Remove macro convert_to_ptrofftype to relocate to fold-const.h. Remove inline function fold_build_pointer_plus_loc to relocate to fold-const.c. Remove macro fold_build_pointer_plus to relocate to fold-const.h. Remove inline function fold_build_pointer_plus_hwi_loc to relocate to fold-const.c. Remove macro fold_build_pointer_plus_hwi to relocate to fold-const.h. * tree-if-conv.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h, real.h and fixed-value.h due to flattening of tree.h. * tree-inline.c: ditto. * tree-into-ssa.c: ditto. * tree-iterator.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree-loop-distribution.c: ditto. * tree-nested.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-nrv.c: ditto. * tree-object-size.c: ditto. * tree-outof-ssa.c: ditto. * tree-parloops.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree-phinodes.c: ditto. * tree-predcom.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-pretty-print.c: ditto. * tree-profile.c: double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-scalar-evolution.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-sra.c: Include vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. * tree-ssa-alias.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-ssa.c: ditto. * tree-ssa-ccp.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * tree-ssa-coalesce.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-ssa-copy.c: ditto. * tree-ssa-copyrename.c: ditto. * tree-ssa-dce.c: ditto. * tree-ssa-dom.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and real.h due to flattening of tree.h. * tree-ssa-dse.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-ssa-forwprop.c: ditto. * tree-ssa-ifcombine.c: ditto. * tree-ssa-live.c: ditto. * tree-ssa-loop.c: ditto. * tree-ssa-loop-ch.c: ditto. * tree-ssa-loop-im.c: ditto. * tree-ssa-loop-ivcanon.c: ditto. * tree-ssa-loop-ivopts.c: ditto. * tree-ssa-loop-manip.c: ditto. * tree-ssa-loop-niter.c: ditto. * tree-ssa-loop-prefetch.c: ditto. * tree-ssa-loop-unswitch.c: ditto. * tree-ssa-loop-math-opts.c: ditto. * tree-ssanames.c: ditto. * tree-ssa-operands.c: ditto. * tree-ssa-phiopt.c: ditto. * tree-ssa-phiprop.c: ditto. * tree-ssa-pre.c: ditto. * tree-ssa-propagate.c: ditto. * tree-ssa-reassoc.c: ditto. * tree-ssa-sccvn.c: ditto. * tree-ssa-sink.c: ditto. * tree-ssa-strlen.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-ssa-structalias.c: double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-ssa-tail-merge.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-ssa-ter.c: ditto. * tree-ssa-threadedge.c: ditto. * tree-ssa-threadupdate.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-ssa-uncprop.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-ssa-uninit.c: ditto. * tree-stdarg.c: Include vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-streamer.c: Include vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-streamer-in.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, inchash.h, real.h and fixed-value.h due to flattening of tree.h. * tree-streamer-out.c: dittoo. * tree-switch-conversion.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-tailcall.c: ditto. * tree-vect-data-refs.c: ditto. * tree-vect-generic.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-vect-loop.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * tree-vect-loop-manip.c: ditto. * tree-vectorizer.c: ditto. * tree-vect-patterns.c: ditto. * tree-vect-slp.c: ditto. * tree-vect-stmts.c: ditto. * tree-vrp.c: ditto. * tsan.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * ubsan.c: ditto. * value-prof.c.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * varasm.c: ditto. * varpool.c: ditto. * var-tracking.c: ditto. * vmsdbgout.c: ditto. * vtable-verify.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * wide-int.cc: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. * xcoffout.c: ditto. * libcc1/plugin.cc: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h due to flattening of tree.h. From-SVN: r219402
2015-01-09 21:18:42 +01:00
#include "symtab.h"
#include "wide-int.h"
#include "inchash.h"
#include "tree.h"
fwprop.c: Make emit-rtl.h include last. * fwprop.c: Make emit-rtl.h include last. * rtlanal.c: Include emit-rtl.h. * genautomata.c: Output emit-rtl include into insn-automata.c * df-scan.c: Include emit-rtl.h. * haifa-sched.c: Indlude emit-rtl.h. * mode-switching.c: Indlude emit-rtl.h. * graph.c: Indlude emit-rtl.h. * sel-sched.c: Include emit-rtl.h. * sel-sched-ir.c: Include emit-rtl.h. * ira-build.c: Include emit-rtl.h. * emit-rtl.c: (first_insn, last_insn): Remove defines. (get_insns, set_first_insn, get_last_insn, set_last_insn, get_max_uid): Move to emit-rtl.h. (set_new_first_and_last_insn, get_last_insn_anywhere, get_first_nonnote_insn, get_last_nonnote_insn, try_split, make_call_insn_raw, add_insn_after, add_insn_before, remove_insn, delete_insns_since, reorder_insns_nobb, emit_insn_after_1, emit_debug_insn_before, emit_insn, start_sequence, push_to_sequence, push_to_sequence2, push_topmost_sequence, end_sequence, copy_insn): Use accessor functions. * emit-rtl.h (gen_blockage, gen_rtvec, copy_insn_1, copy_insn, gen_int_mode, emit_copy_of_insn_after, set_reg_attrs_from_value, set_reg_attrs_for_parm, set_reg_attrs_for_decl_rtl, adjust_reg_mode, mem_expr_equal_p): Move here from rtl.h (get_insns, set_first-insn, get_last_insn, set_last_insn, get_max_uid): Move here from emit-rtl.c; make inline. * cfglayout.h: Include emit-rtl.h * rtl.h (gen_blockage, gen_rtvec, copy_insn_1, copy_insn, gen_int_mode, emit_copy_of_insn_after, set_reg_attrs_from_value, set_reg_attrs_for_parm, set_reg_attrs_for_decl_rtl, adjust_reg_mode, mem_expr_equal_p, get_insns, set_first-insn, get_last_insn, set_last_insn, get_max_uid): Move to emit-rtl.h. * reg-stack.c: Include emit-rtl.h * dce.c: Likewise. From-SVN: r160111
2010-06-01 17:49:37 +02:00
#include "emit-rtl.h" /* FIXME: Can go away once crtl is moved to rtl.h. */
#include "addresses.h"
#include "rtl-iter.h"
1991-12-01 06:13:56 +01:00
/* Forward declarations */
alias.c (record_set, [...]): Constify. * alias.c (record_set, memory_modified_1): Constify. * bt-load.c (note_btr_set): Likewise. * caller-save.c (mark_set_regs, add_stored_regs): Likewise. * combine.c (set_nonzero_bits_and_sign_copies, expand_field_assignment, record_dead_and_set_regs_1, use_crosses_set_p, reg_dead_at_p_1, can_combine_p, likely_spilled_retval_1): Likewise. * config/frv/frv.c (frv_registers_update_1, frv_io_check_address, frv_io_handle_set): Likewise. * config/mips/mips.c (mips_sim_record_set, vr4130_true_reg_dependence_p_1): Likewise. * config/mt/mt.c (insn_dependent_p_1): Likewise. * config/s390/s390.c (s390_reg_clobbered_rtx): Likewise. * config/sh/sh.c (flow_dependent_p_1): Likewise. * cselib.c (cselib_invalidate_rtx_note_stores): Likewise. * dce.c (mark_nonreg_stores_1, mark_nonreg_stores_2): Likewise. * ddg.c (mark_mem_store): Likewise. * df-problems.c (df_urec_mark_reg_change): Likewise. * function.c (update_epilogue_consts): Likewise. * gcse.c (record_set_info, record_last_set_info, mems_conflict_for_gcse_p, canon_list_insert, reg_set_info, reg_clear_last_set): Likewise. * global.c (mark_reg_store, mark_reg_clobber, reg_becomes_live): Likewise. * jump.c (reversed_comparison_code_parts): Likewise. * local-alloc.c (validate_equiv_mem_from_store, no_equiv, reg_is_set): Likewise. * loop-iv.c (mark_altered): Likewise. * mode-switching.c (reg_becomes_live): Likewise. * optabs.c (no_conflict_move_test): Likewise. * postreload-gcse.c (record_last_set_info, find_mem_conflicts): Likewise. * postreload.c (reload_combine_note_store, move2add_note_store): Likewise. * regmove.c (flags_set_1): Likewise. * regrename.c (note_sets, kill_clobbered_value, kill_set_value): Likewise. * reload1.c (mark_not_eliminable, forget_old_reloads_1): Likewise. * resource.c (update_live_status): Likewise. * rtl.h (set_of, note_stores): Likewise. * rtlanal.c (set_of_1, parms_set, struct set_of_data, set_of, note_stores, parms_set): Likewise. * sched-rgn.c (sets_likely_spilled_1): Likewise. * stack-ptr-mod.c (notice_stack_pointer_modification_1): Likewise. * var-tracking.c (count_stores, add_stores): Likewise. From-SVN: r127065
2007-07-30 18:30:18 +02:00
static void set_of_1 (rtx, const_rtx, void *);
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
static bool covers_regno_p (const_rtx, unsigned int);
static bool covers_regno_no_parallel_p (const_rtx, unsigned int);
static int computed_jump_p_1 (const_rtx);
alias.c (record_set, [...]): Constify. * alias.c (record_set, memory_modified_1): Constify. * bt-load.c (note_btr_set): Likewise. * caller-save.c (mark_set_regs, add_stored_regs): Likewise. * combine.c (set_nonzero_bits_and_sign_copies, expand_field_assignment, record_dead_and_set_regs_1, use_crosses_set_p, reg_dead_at_p_1, can_combine_p, likely_spilled_retval_1): Likewise. * config/frv/frv.c (frv_registers_update_1, frv_io_check_address, frv_io_handle_set): Likewise. * config/mips/mips.c (mips_sim_record_set, vr4130_true_reg_dependence_p_1): Likewise. * config/mt/mt.c (insn_dependent_p_1): Likewise. * config/s390/s390.c (s390_reg_clobbered_rtx): Likewise. * config/sh/sh.c (flow_dependent_p_1): Likewise. * cselib.c (cselib_invalidate_rtx_note_stores): Likewise. * dce.c (mark_nonreg_stores_1, mark_nonreg_stores_2): Likewise. * ddg.c (mark_mem_store): Likewise. * df-problems.c (df_urec_mark_reg_change): Likewise. * function.c (update_epilogue_consts): Likewise. * gcse.c (record_set_info, record_last_set_info, mems_conflict_for_gcse_p, canon_list_insert, reg_set_info, reg_clear_last_set): Likewise. * global.c (mark_reg_store, mark_reg_clobber, reg_becomes_live): Likewise. * jump.c (reversed_comparison_code_parts): Likewise. * local-alloc.c (validate_equiv_mem_from_store, no_equiv, reg_is_set): Likewise. * loop-iv.c (mark_altered): Likewise. * mode-switching.c (reg_becomes_live): Likewise. * optabs.c (no_conflict_move_test): Likewise. * postreload-gcse.c (record_last_set_info, find_mem_conflicts): Likewise. * postreload.c (reload_combine_note_store, move2add_note_store): Likewise. * regmove.c (flags_set_1): Likewise. * regrename.c (note_sets, kill_clobbered_value, kill_set_value): Likewise. * reload1.c (mark_not_eliminable, forget_old_reloads_1): Likewise. * resource.c (update_live_status): Likewise. * rtl.h (set_of, note_stores): Likewise. * rtlanal.c (set_of_1, parms_set, struct set_of_data, set_of, note_stores, parms_set): Likewise. * sched-rgn.c (sets_likely_spilled_1): Likewise. * stack-ptr-mod.c (notice_stack_pointer_modification_1): Likewise. * var-tracking.c (count_stores, add_stores): Likewise. From-SVN: r127065
2007-07-30 18:30:18 +02:00
static void parms_set (rtx, const_rtx, void *);
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 13:02:45 +01:00
static unsigned HOST_WIDE_INT cached_nonzero_bits (const_rtx, machine_mode,
const_rtx, machine_mode,
unsigned HOST_WIDE_INT);
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 13:02:45 +01:00
static unsigned HOST_WIDE_INT nonzero_bits1 (const_rtx, machine_mode,
const_rtx, machine_mode,
unsigned HOST_WIDE_INT);
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 13:02:45 +01:00
static unsigned int cached_num_sign_bit_copies (const_rtx, machine_mode, const_rtx,
machine_mode,
unsigned int);
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 13:02:45 +01:00
static unsigned int num_sign_bit_copies1 (const_rtx, machine_mode, const_rtx,
machine_mode, unsigned int);
rtx_subrtx_bound_info rtx_all_subrtx_bounds[NUM_RTX_CODE];
rtx_subrtx_bound_info rtx_nonconst_subrtx_bounds[NUM_RTX_CODE];
/* Truncation narrows the mode from SOURCE mode to DESTINATION mode.
If TARGET_MODE_REP_EXTENDED (DESTINATION, DESTINATION_REP) is
SIGN_EXTEND then while narrowing we also have to enforce the
representation and sign-extend the value to mode DESTINATION_REP.
If the value is already sign-extended to DESTINATION_REP mode we
can just switch to DESTINATION mode on it. For each pair of
integral modes SOURCE and DESTINATION, when truncating from SOURCE
to DESTINATION, NUM_SIGN_BIT_COPIES_IN_REP[SOURCE][DESTINATION]
contains the number of high-order bits in SOURCE that have to be
copies of the sign-bit so that we can do this mode-switch to
DESTINATION. */
static unsigned int
num_sign_bit_copies_in_rep[MAX_MODE_INT + 1][MAX_MODE_INT + 1];
1991-12-01 06:13:56 +01:00
/* Store X into index I of ARRAY. ARRAY is known to have at least I
elements. Return the new base of ARRAY. */
template <typename T>
typename T::value_type *
generic_subrtx_iterator <T>::add_single_to_queue (array_type &array,
value_type *base,
size_t i, value_type x)
{
if (base == array.stack)
{
if (i < LOCAL_ELEMS)
{
base[i] = x;
return base;
}
gcc_checking_assert (i == LOCAL_ELEMS);
vec_safe_grow (array.heap, i + 1);
base = array.heap->address ();
memcpy (base, array.stack, sizeof (array.stack));
base[LOCAL_ELEMS] = x;
return base;
}
unsigned int length = array.heap->length ();
if (length > i)
{
gcc_checking_assert (base == array.heap->address ());
base[i] = x;
return base;
}
else
{
gcc_checking_assert (i == length);
vec_safe_push (array.heap, x);
return array.heap->address ();
}
}
/* Add the subrtxes of X to worklist ARRAY, starting at END. Return the
number of elements added to the worklist. */
template <typename T>
size_t
generic_subrtx_iterator <T>::add_subrtxes_to_queue (array_type &array,
value_type *base,
size_t end, rtx_type x)
{
enum rtx_code code = GET_CODE (x);
const char *format = GET_RTX_FORMAT (code);
size_t orig_end = end;
if (__builtin_expect (INSN_P (x), false))
{
/* Put the pattern at the top of the queue, since that's what
we're likely to want most. It also allows for the SEQUENCE
code below. */
for (int i = GET_RTX_LENGTH (GET_CODE (x)) - 1; i >= 0; --i)
if (format[i] == 'e')
{
value_type subx = T::get_value (x->u.fld[i].rt_rtx);
if (__builtin_expect (end < LOCAL_ELEMS, true))
base[end++] = subx;
else
base = add_single_to_queue (array, base, end++, subx);
}
}
else
for (int i = 0; format[i]; ++i)
if (format[i] == 'e')
{
value_type subx = T::get_value (x->u.fld[i].rt_rtx);
if (__builtin_expect (end < LOCAL_ELEMS, true))
base[end++] = subx;
else
base = add_single_to_queue (array, base, end++, subx);
}
else if (format[i] == 'E')
{
unsigned int length = GET_NUM_ELEM (x->u.fld[i].rt_rtvec);
rtx *vec = x->u.fld[i].rt_rtvec->elem;
if (__builtin_expect (end + length <= LOCAL_ELEMS, true))
for (unsigned int j = 0; j < length; j++)
base[end++] = T::get_value (vec[j]);
else
for (unsigned int j = 0; j < length; j++)
base = add_single_to_queue (array, base, end++,
T::get_value (vec[j]));
if (code == SEQUENCE && end == length)
/* If the subrtxes of the sequence fill the entire array then
we know that no other parts of a containing insn are queued.
The caller is therefore iterating over the sequence as a
PATTERN (...), so we also want the patterns of the
subinstructions. */
for (unsigned int j = 0; j < length; j++)
{
typename T::rtx_type x = T::get_rtx (base[j]);
if (INSN_P (x))
base[j] = T::get_value (PATTERN (x));
}
}
return end - orig_end;
}
template <typename T>
void
generic_subrtx_iterator <T>::free_array (array_type &array)
{
vec_free (array.heap);
}
template <typename T>
const size_t generic_subrtx_iterator <T>::LOCAL_ELEMS;
template class generic_subrtx_iterator <const_rtx_accessor>;
template class generic_subrtx_iterator <rtx_var_accessor>;
template class generic_subrtx_iterator <rtx_ptr_accessor>;
1991-12-01 06:13:56 +01:00
/* Return 1 if the value of X is unstable
(would be different at a different point in the program).
The frame pointer, arg pointer, etc. are considered stable
(within one function) and so is anything marked `unchanging'. */
int
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
rtx_unstable_p (const_rtx x)
1991-12-01 06:13:56 +01:00
{
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
const RTX_CODE code = GET_CODE (x);
alias.c: Remove uses of "register" specifier in declarations of arguments and local... 2001-10-10 Stan Shebs <shebs@apple.com> * alias.c: Remove uses of "register" specifier in declarations of arguments and local variables. * c-common.c: Ditto. * c-convert.c: Ditto. * c-decl.c: Ditto. * c-format.c: Ditto. * c-semantics.c: Ditto. * c-typeck.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfgbuild.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * combine.c: Ditto. * convert.c: Ditto. * cppexp.c: Ditto. * cppfiles.c: Ditto. * cse.c: Ditto. * dbxout.c: Ditto. * defaults.h: Ditto. * df.c: Ditto. * dwarf2out.c: Ditto. * dwarfout.c: Ditto. * emit-rtl.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fix-header.c: Ditto. * floatlib.c: Ditto. * flow.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * gcc.c: Ditto. * gcse.c: Ditto. * gen-protos.c: Ditto. * genattrtab.c: Ditto. * gencheck.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * gengenrtl.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * gensupport.c: Ditto. * global.c: Ditto. * gmon.c: Ditto. * graph.c: Ditto. * haifa-sched.c: Ditto. * hard-reg-set.h: Ditto. * hash.c: Ditto. * integrate.c: Ditto. * jump.c: Ditto. * lists.c: Ditto. * local-alloc.c: Ditto. * loop.c: Ditto. * mips-tdump.c: Ditto. * mips-tfile.c: Ditto. * optabs.c: Ditto. * prefix.c: Ditto. * print-rtl.c: Ditto. * read-rtl.c: Ditto. * real.c: Ditto. * recog.c: Ditto. * reg-stack.c: Ditto. * regclass.c: Ditto. * regmove.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtl.c: Ditto. * rtlanal.c: Ditto. * scan.c: Ditto. * sched-deps.c: Ditto. * sched-rgn.c: Ditto. * sdbout.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tradcif.y: Ditto. * tradcpp.c: Ditto. * tree.c: Ditto. * unroll.c: Ditto. * varasm.c: Ditto. * xcoffout.c: Ditto. From-SVN: r46173
2001-10-11 05:16:15 +02:00
int i;
const char *fmt;
1991-12-01 06:13:56 +01:00
switch (code)
{
case MEM:
rtl.h (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * rtl.h (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * alias.c (true_dependence): Update to match new semantics. (canon_true_dependence, write_dependence_p): Likewise. (anti_dependence, output_dependence): Update write_dependence_p args. (unchanging_anti_dependence): Remove. * calls.c (purge_mem_unchanging_flag): Remove. (fixup_tail_calls): Don't call it. (expand_call): Don't add unchanging memory to function usage. * expr.c (emit_block_move_via_libcall): Likewise. (clear_storage_via_libcall): Don't clobber RTX_UNCHANGING_P mems. (get_subtarget): Don't use RTX_UNCHANGING_P. (expand_assignment, store_constructor, expand_expr_real_1): Likewise. (do_tablejump): Set MEM_READONLY_P, not RTX_UNCHANGING_P. * combine.c (get_last_value_validate): Use MEM_READONLY_P. * cse.c (insert): Don't use RTX_UNCHANGING_P. (cse_insn, canon_hash): Use MEM_READONLY_P. * emit-rtl.c (set_mem_attributes_minus_bitpos): Use MEM_READONLY_P instead of RTX_UNCHANGING_P. * explow.c (maybe_set_unchanging): Remove. * expr.h (maybe_set_unchanging): Remove. * flow.c (insn_dead_p, mark_used_regs): Use anti_dependence. * function.c (assign_stack_temp_for_type): Don't use RTX_UNCHANGING_P. (assign_parm_setup_reg, expand_function_start): Likewise. * integrate.c (copy_rtx_and_substitute): Likewise. * ra-rewrite.c (emit_colors): Likewise. * regmove.c (copy_src_to_dest, regmove_optimize): Likewise. (fixup_match_1): Likewise. * reload1.c (reload, alter_reg): Likewise. * local-alloc.c (validate_equiv_mem): Check MEM_READONLY_P, not RTX_UNCHANGING_P. (equiv_init_varies_p): Likewise. * loop-invariant.c (check_maybe_invariant): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * loop.c (note_addr_stored): Likewise. (prescan_loop): Likewise. Don't check function usage for clobbered unchanging memory. * rtlanal.c (rtx_unstable_p): Check MEM_READONLY_P, not RTX_UNCHANGING_P. (rtx_varies_p, modified_between_p, modified_in_p): Likewise. * varasm.c (force_const_mem): Likewise. * stmt.c (expand_decl): Don't set RTX_UNCHANGING_P. * web.c (entry_register): Likewise. * tree-gimple.h (get_base_address): Move decl ... * tree.h: ... here. * doc/rtl.texi (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * config/alpha/alpha.c (alpha_set_memflags_1): Rewrite to be called via for_each_rtx. Copy MEM_SCALAR_P, MEM_NOTRAP_P too. (alpha_set_memflags): Update to match. * config/darwin.c (machopic_indirect_data_reference): Set MEM_READONLY_P instead of RTX_UNCHANGING_P. (machopic_indirect_call_target): Likewise. (machopic_legitimize_pic_address): Likewise. * config/arm/arm.c (legitimize_pic_address, arm_gen_load_multiple, arm_gen_store_multiple, arm_gen_movmemqi): Likewise. * config/arm/arm.md (load_multiple, store_multiple): Likewise. * config/frv/frv.md (symGOT2reg): Likewise. * config/i386/i386.c (legitimize_pic_address, legitimize_tls_address, ix86_split_to_parts): Likewise. * config/ia64/ia64.c (ia64_expand_tls_address): Likewise. * config/ia64/ia64.md (load_fptr): Likewise. * config/m32r/m32r.c (m32r_legitimize_pic_address): Likewise. * config/m68k/m68k.c (legitimize_pic_address): Likewise. * config/mcore/mcore.c (block_move_sequence): Likewise. * config/mn10300/mn10300.md (symGOT2reg): Likewise. * config/pa/pa.c (legitimize_pic_address): Likewise. * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Likewise. (rs6000_emit_move): Likewise. * config/s390/s390.c (legitimize_pic_address): Likewise. (legitimize_tls_address): Likewise. * config/s390/s390.md (casesi): Likewise. * config/sh/sh.c (prepare_move_operands, sh_reorg): Likewise. * config/sh/sh.md (symGOT2reg): Likewise. * config/sparc/sparc.c (legitimize_pic_address): Likewise. * config/v850/v850.md (casesi): Likewise. * config/ia64/ia64.c (gen_thread_pointer): Don't set RTX_UNCHANGING_P. * config/iq2000/iq2000.c (save_restore_insns): Likewise. * config/mips/mips.c (mips_restore_gp): Likewise. (mips_save_restore_reg, mips16_gp_pseudo_reg): Likewise. * config/sh/sh.c (sh_reorg): Likewise. From-SVN: r86178
2004-08-18 10:25:01 +02:00
return !MEM_READONLY_P (x) || rtx_unstable_p (XEXP (x, 0));
1991-12-01 06:13:56 +01:00
case CONST:
alias.c (rtx_equal_for_memref_p): Convert constant cases. 2012-08-23 Kenneth Zadeck <zadeck@naturalbridge.com> * alias.c (rtx_equal_for_memref_p): Convert constant cases. * combine.c (find_single_use_1, mark_used_regs_combine): Convert to CASE_CONST_ANY. * cse.c (exp_equiv_p, canon_reg, fold_rtx, cse_process_notes_1, count_reg_usage): Convert constant cases. * cselib.c (cselib_expand_value_rtx_1): Convert to CASE_CONST_ANY. (cselib_subst_to_values): Convert constant cases. * df-scan.c (df_uses_record): Ditto. * dse.c (const_or_frame_p): Convert case statements to explicit if-then-else using mode classes. * emit-rtl.c (verify_rtx_sharing, copy_insn_1): Convert constant cases. * explow.c (convert_memory_address_addr_space): Ditto. * gcse.c (want_to_gcse_p, oprs_unchanged_p, compute_transp): Ditto. * genattrtab.c (attr_copy_rtx, clear_struct_flag): Ditto. * ira.c (equiv_init_varies_p, contains_replace_regs, memref_referenced_p, rtx_moveable_p): Ditto. * jump.c (mark_jump_label_1): Remove constant cases. (rtx_renumbered_equal_p): Convert to CASE_CONST_UNIQUE. * loop-invariant.c (check_maybe_invariant, hash_invariant_expr_1, invariant_expr_equal_p): Convert to CASE_CONST_ANY. * postreload-gcse.c (oprs_unchanged_p): Convert constant cases. * reginfo.c (reg_scan_mark_refs): Ditto. * regrename.c (scan_rtx): Ditto. * reload1.c (eliminate_regs_1, elimination_effects, scan_paradoxical_subregs): Ditto. * reload.c (operands_match_p, subst_reg_equivs): Ditto. * resource.c (mark_referenced_resources, mark_set_resources): Ditto. * rtlanal.c (rtx_unstable_p, rtx_varies_p, count_occurrences) (reg_mentioned_p, modified_between_p, modified_in_p) (volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, inequality_comparisons_p, computed_jump_p_1): Ditto. * rtl.c (copy_rtx, rtx_equal_p_cb, rtx_equal_p): Ditto. * sched-deps.c (sched_analyze_2): Ditto. * valtrack.c (cleanup_auto_inc_dec): Ditto. * rtl.h: (CASE_CONST_SCALAR_INT, CASE_CONST_UNIQUE, CASE_CONST_ANY): New macros. From-SVN: r190627
2012-08-23 20:46:18 +02:00
CASE_CONST_ANY:
case SYMBOL_REF:
case LABEL_REF:
return 0;
1991-12-01 06:13:56 +01:00
case REG:
/* As in rtx_varies_p, we have to use the actual rtx, not reg number. */
if (x == frame_pointer_rtx || x == hard_frame_pointer_rtx
/* The arg pointer varies if it is not a fixed register. */
rtl.h (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * rtl.h (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * alias.c (true_dependence): Update to match new semantics. (canon_true_dependence, write_dependence_p): Likewise. (anti_dependence, output_dependence): Update write_dependence_p args. (unchanging_anti_dependence): Remove. * calls.c (purge_mem_unchanging_flag): Remove. (fixup_tail_calls): Don't call it. (expand_call): Don't add unchanging memory to function usage. * expr.c (emit_block_move_via_libcall): Likewise. (clear_storage_via_libcall): Don't clobber RTX_UNCHANGING_P mems. (get_subtarget): Don't use RTX_UNCHANGING_P. (expand_assignment, store_constructor, expand_expr_real_1): Likewise. (do_tablejump): Set MEM_READONLY_P, not RTX_UNCHANGING_P. * combine.c (get_last_value_validate): Use MEM_READONLY_P. * cse.c (insert): Don't use RTX_UNCHANGING_P. (cse_insn, canon_hash): Use MEM_READONLY_P. * emit-rtl.c (set_mem_attributes_minus_bitpos): Use MEM_READONLY_P instead of RTX_UNCHANGING_P. * explow.c (maybe_set_unchanging): Remove. * expr.h (maybe_set_unchanging): Remove. * flow.c (insn_dead_p, mark_used_regs): Use anti_dependence. * function.c (assign_stack_temp_for_type): Don't use RTX_UNCHANGING_P. (assign_parm_setup_reg, expand_function_start): Likewise. * integrate.c (copy_rtx_and_substitute): Likewise. * ra-rewrite.c (emit_colors): Likewise. * regmove.c (copy_src_to_dest, regmove_optimize): Likewise. (fixup_match_1): Likewise. * reload1.c (reload, alter_reg): Likewise. * local-alloc.c (validate_equiv_mem): Check MEM_READONLY_P, not RTX_UNCHANGING_P. (equiv_init_varies_p): Likewise. * loop-invariant.c (check_maybe_invariant): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * loop.c (note_addr_stored): Likewise. (prescan_loop): Likewise. Don't check function usage for clobbered unchanging memory. * rtlanal.c (rtx_unstable_p): Check MEM_READONLY_P, not RTX_UNCHANGING_P. (rtx_varies_p, modified_between_p, modified_in_p): Likewise. * varasm.c (force_const_mem): Likewise. * stmt.c (expand_decl): Don't set RTX_UNCHANGING_P. * web.c (entry_register): Likewise. * tree-gimple.h (get_base_address): Move decl ... * tree.h: ... here. * doc/rtl.texi (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * config/alpha/alpha.c (alpha_set_memflags_1): Rewrite to be called via for_each_rtx. Copy MEM_SCALAR_P, MEM_NOTRAP_P too. (alpha_set_memflags): Update to match. * config/darwin.c (machopic_indirect_data_reference): Set MEM_READONLY_P instead of RTX_UNCHANGING_P. (machopic_indirect_call_target): Likewise. (machopic_legitimize_pic_address): Likewise. * config/arm/arm.c (legitimize_pic_address, arm_gen_load_multiple, arm_gen_store_multiple, arm_gen_movmemqi): Likewise. * config/arm/arm.md (load_multiple, store_multiple): Likewise. * config/frv/frv.md (symGOT2reg): Likewise. * config/i386/i386.c (legitimize_pic_address, legitimize_tls_address, ix86_split_to_parts): Likewise. * config/ia64/ia64.c (ia64_expand_tls_address): Likewise. * config/ia64/ia64.md (load_fptr): Likewise. * config/m32r/m32r.c (m32r_legitimize_pic_address): Likewise. * config/m68k/m68k.c (legitimize_pic_address): Likewise. * config/mcore/mcore.c (block_move_sequence): Likewise. * config/mn10300/mn10300.md (symGOT2reg): Likewise. * config/pa/pa.c (legitimize_pic_address): Likewise. * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Likewise. (rs6000_emit_move): Likewise. * config/s390/s390.c (legitimize_pic_address): Likewise. (legitimize_tls_address): Likewise. * config/s390/s390.md (casesi): Likewise. * config/sh/sh.c (prepare_move_operands, sh_reorg): Likewise. * config/sh/sh.md (symGOT2reg): Likewise. * config/sparc/sparc.c (legitimize_pic_address): Likewise. * config/v850/v850.md (casesi): Likewise. * config/ia64/ia64.c (gen_thread_pointer): Don't set RTX_UNCHANGING_P. * config/iq2000/iq2000.c (save_restore_insns): Likewise. * config/mips/mips.c (mips_restore_gp): Likewise. (mips_save_restore_reg, mips16_gp_pseudo_reg): Likewise. * config/sh/sh.c (sh_reorg): Likewise. From-SVN: r86178
2004-08-18 10:25:01 +02:00
|| (x == arg_pointer_rtx && fixed_regs[ARG_POINTER_REGNUM]))
return 0;
/* ??? When call-clobbered, the value is stable modulo the restore
that must happen after a call. This currently screws up local-alloc
into believing that the restore is not needed. */
if (!PIC_OFFSET_TABLE_REG_CALL_CLOBBERED && x == pic_offset_table_rtx)
return 0;
return 1;
case ASM_OPERANDS:
if (MEM_VOLATILE_P (x))
return 1;
/* Fall through. */
default:
break;
}
1991-12-01 06:13:56 +01:00
fmt = GET_RTX_FORMAT (code);
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
if (fmt[i] == 'e')
{
if (rtx_unstable_p (XEXP (x, i)))
return 1;
}
else if (fmt[i] == 'E')
{
int j;
for (j = 0; j < XVECLEN (x, i); j++)
if (rtx_unstable_p (XVECEXP (x, i, j)))
return 1;
}
1991-12-01 06:13:56 +01:00
return 0;
}
/* Return 1 if X has a value that can vary even between two
executions of the program. 0 means X can be compared reliably
against certain constants or near-constants.
FOR_ALIAS is nonzero if we are called from alias analysis; if it is
zero, we are slightly more conservative.
1991-12-01 06:13:56 +01:00
The frame pointer and the arg pointer are considered constant. */
alias.c (mems_in_disjoint_alias_sets_p, [...]): Constify. * alias.c (mems_in_disjoint_alias_sets_p, fixed_scalar_and_varying_struct_p, aliases_everything_p, nonoverlapping_component_refs_p, nonoverlapping_memrefs_p, write_dependence_p, mems_in_disjoint_alias_sets_p, read_dependence, true_dependence, canon_true_dependence, anti_dependence, output_dependence): Constify. * combine.c (extended_count): Likewise. * cse.c (cse_rtx_varies_p, hash_rtx, exp_equiv_p): Likewise. * cselib.c (get_value_hash, references_value_p, cselib_reg_set_mode, cselib_rtx_varies_p): Likewise. * cselib.h (cselib_reg_set_mode, references_value_p): Likewise. * emit-rtl.c (mem_expr_equal_p, active_insn_p): Likewise. * function.c (contains, prologue_epilogue_contains, sibcall_epilogue_contains): Likewise. * jump.c (simplejump_p, condjump_p, condjump_in_parallel_p, pc_set, any_uncondjump_p, any_condjump_p, onlyjump_p, only_sets_cc0_p, sets_cc0_p, rtx_renumbered_equal_p, true_regnum, reg_or_subregno): Likewise. * recog.c (asm_noperands): Likewise. * reload1.c (function_invariant_p): Likewise. * rtl.h (mem_expr_equal_p, active_insn_p, rtx_varies_p, rtx_addr_varies_p, asm_noperands, exp_equiv_p, hash_rtx, condjump_p, any_condjump_p, any_uncondjump_p, pc_set, simplejump_p, onlyjump_p, only_sets_cc0_p, sets_cc0_p, true_regnum, reg_or_subregno, condjump_in_parallel_p, extended_count, prologue_epilogue_contains, sibcall_epilogue_contains, function_invariant_p, true_dependence, canon_true_dependence, read_dependence, anti_dependence, output_dependence): Likewise. * rtlanal.c (rtx_varies_p, rtx_addr_varies_p): Likewise. java: * jcf-io.c (find_class): Fix -Wcast-qual warnings. From-SVN: r127063
2007-07-30 17:35:02 +02:00
bool
rtx_varies_p (const_rtx x, bool for_alias)
1991-12-01 06:13:56 +01:00
{
RTX_CODE code;
alias.c: Remove uses of "register" specifier in declarations of arguments and local... 2001-10-10 Stan Shebs <shebs@apple.com> * alias.c: Remove uses of "register" specifier in declarations of arguments and local variables. * c-common.c: Ditto. * c-convert.c: Ditto. * c-decl.c: Ditto. * c-format.c: Ditto. * c-semantics.c: Ditto. * c-typeck.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfgbuild.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * combine.c: Ditto. * convert.c: Ditto. * cppexp.c: Ditto. * cppfiles.c: Ditto. * cse.c: Ditto. * dbxout.c: Ditto. * defaults.h: Ditto. * df.c: Ditto. * dwarf2out.c: Ditto. * dwarfout.c: Ditto. * emit-rtl.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fix-header.c: Ditto. * floatlib.c: Ditto. * flow.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * gcc.c: Ditto. * gcse.c: Ditto. * gen-protos.c: Ditto. * genattrtab.c: Ditto. * gencheck.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * gengenrtl.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * gensupport.c: Ditto. * global.c: Ditto. * gmon.c: Ditto. * graph.c: Ditto. * haifa-sched.c: Ditto. * hard-reg-set.h: Ditto. * hash.c: Ditto. * integrate.c: Ditto. * jump.c: Ditto. * lists.c: Ditto. * local-alloc.c: Ditto. * loop.c: Ditto. * mips-tdump.c: Ditto. * mips-tfile.c: Ditto. * optabs.c: Ditto. * prefix.c: Ditto. * print-rtl.c: Ditto. * read-rtl.c: Ditto. * real.c: Ditto. * recog.c: Ditto. * reg-stack.c: Ditto. * regclass.c: Ditto. * regmove.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtl.c: Ditto. * rtlanal.c: Ditto. * scan.c: Ditto. * sched-deps.c: Ditto. * sched-rgn.c: Ditto. * sdbout.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tradcif.y: Ditto. * tradcpp.c: Ditto. * tree.c: Ditto. * unroll.c: Ditto. * varasm.c: Ditto. * xcoffout.c: Ditto. From-SVN: r46173
2001-10-11 05:16:15 +02:00
int i;
const char *fmt;
1991-12-01 06:13:56 +01:00
if (!x)
return 0;
code = GET_CODE (x);
1991-12-01 06:13:56 +01:00
switch (code)
{
case MEM:
rtl.h (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * rtl.h (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * alias.c (true_dependence): Update to match new semantics. (canon_true_dependence, write_dependence_p): Likewise. (anti_dependence, output_dependence): Update write_dependence_p args. (unchanging_anti_dependence): Remove. * calls.c (purge_mem_unchanging_flag): Remove. (fixup_tail_calls): Don't call it. (expand_call): Don't add unchanging memory to function usage. * expr.c (emit_block_move_via_libcall): Likewise. (clear_storage_via_libcall): Don't clobber RTX_UNCHANGING_P mems. (get_subtarget): Don't use RTX_UNCHANGING_P. (expand_assignment, store_constructor, expand_expr_real_1): Likewise. (do_tablejump): Set MEM_READONLY_P, not RTX_UNCHANGING_P. * combine.c (get_last_value_validate): Use MEM_READONLY_P. * cse.c (insert): Don't use RTX_UNCHANGING_P. (cse_insn, canon_hash): Use MEM_READONLY_P. * emit-rtl.c (set_mem_attributes_minus_bitpos): Use MEM_READONLY_P instead of RTX_UNCHANGING_P. * explow.c (maybe_set_unchanging): Remove. * expr.h (maybe_set_unchanging): Remove. * flow.c (insn_dead_p, mark_used_regs): Use anti_dependence. * function.c (assign_stack_temp_for_type): Don't use RTX_UNCHANGING_P. (assign_parm_setup_reg, expand_function_start): Likewise. * integrate.c (copy_rtx_and_substitute): Likewise. * ra-rewrite.c (emit_colors): Likewise. * regmove.c (copy_src_to_dest, regmove_optimize): Likewise. (fixup_match_1): Likewise. * reload1.c (reload, alter_reg): Likewise. * local-alloc.c (validate_equiv_mem): Check MEM_READONLY_P, not RTX_UNCHANGING_P. (equiv_init_varies_p): Likewise. * loop-invariant.c (check_maybe_invariant): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * loop.c (note_addr_stored): Likewise. (prescan_loop): Likewise. Don't check function usage for clobbered unchanging memory. * rtlanal.c (rtx_unstable_p): Check MEM_READONLY_P, not RTX_UNCHANGING_P. (rtx_varies_p, modified_between_p, modified_in_p): Likewise. * varasm.c (force_const_mem): Likewise. * stmt.c (expand_decl): Don't set RTX_UNCHANGING_P. * web.c (entry_register): Likewise. * tree-gimple.h (get_base_address): Move decl ... * tree.h: ... here. * doc/rtl.texi (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * config/alpha/alpha.c (alpha_set_memflags_1): Rewrite to be called via for_each_rtx. Copy MEM_SCALAR_P, MEM_NOTRAP_P too. (alpha_set_memflags): Update to match. * config/darwin.c (machopic_indirect_data_reference): Set MEM_READONLY_P instead of RTX_UNCHANGING_P. (machopic_indirect_call_target): Likewise. (machopic_legitimize_pic_address): Likewise. * config/arm/arm.c (legitimize_pic_address, arm_gen_load_multiple, arm_gen_store_multiple, arm_gen_movmemqi): Likewise. * config/arm/arm.md (load_multiple, store_multiple): Likewise. * config/frv/frv.md (symGOT2reg): Likewise. * config/i386/i386.c (legitimize_pic_address, legitimize_tls_address, ix86_split_to_parts): Likewise. * config/ia64/ia64.c (ia64_expand_tls_address): Likewise. * config/ia64/ia64.md (load_fptr): Likewise. * config/m32r/m32r.c (m32r_legitimize_pic_address): Likewise. * config/m68k/m68k.c (legitimize_pic_address): Likewise. * config/mcore/mcore.c (block_move_sequence): Likewise. * config/mn10300/mn10300.md (symGOT2reg): Likewise. * config/pa/pa.c (legitimize_pic_address): Likewise. * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Likewise. (rs6000_emit_move): Likewise. * config/s390/s390.c (legitimize_pic_address): Likewise. (legitimize_tls_address): Likewise. * config/s390/s390.md (casesi): Likewise. * config/sh/sh.c (prepare_move_operands, sh_reorg): Likewise. * config/sh/sh.md (symGOT2reg): Likewise. * config/sparc/sparc.c (legitimize_pic_address): Likewise. * config/v850/v850.md (casesi): Likewise. * config/ia64/ia64.c (gen_thread_pointer): Don't set RTX_UNCHANGING_P. * config/iq2000/iq2000.c (save_restore_insns): Likewise. * config/mips/mips.c (mips_restore_gp): Likewise. (mips_save_restore_reg, mips16_gp_pseudo_reg): Likewise. * config/sh/sh.c (sh_reorg): Likewise. From-SVN: r86178
2004-08-18 10:25:01 +02:00
return !MEM_READONLY_P (x) || rtx_varies_p (XEXP (x, 0), for_alias);
1991-12-01 06:13:56 +01:00
case CONST:
alias.c (rtx_equal_for_memref_p): Convert constant cases. 2012-08-23 Kenneth Zadeck <zadeck@naturalbridge.com> * alias.c (rtx_equal_for_memref_p): Convert constant cases. * combine.c (find_single_use_1, mark_used_regs_combine): Convert to CASE_CONST_ANY. * cse.c (exp_equiv_p, canon_reg, fold_rtx, cse_process_notes_1, count_reg_usage): Convert constant cases. * cselib.c (cselib_expand_value_rtx_1): Convert to CASE_CONST_ANY. (cselib_subst_to_values): Convert constant cases. * df-scan.c (df_uses_record): Ditto. * dse.c (const_or_frame_p): Convert case statements to explicit if-then-else using mode classes. * emit-rtl.c (verify_rtx_sharing, copy_insn_1): Convert constant cases. * explow.c (convert_memory_address_addr_space): Ditto. * gcse.c (want_to_gcse_p, oprs_unchanged_p, compute_transp): Ditto. * genattrtab.c (attr_copy_rtx, clear_struct_flag): Ditto. * ira.c (equiv_init_varies_p, contains_replace_regs, memref_referenced_p, rtx_moveable_p): Ditto. * jump.c (mark_jump_label_1): Remove constant cases. (rtx_renumbered_equal_p): Convert to CASE_CONST_UNIQUE. * loop-invariant.c (check_maybe_invariant, hash_invariant_expr_1, invariant_expr_equal_p): Convert to CASE_CONST_ANY. * postreload-gcse.c (oprs_unchanged_p): Convert constant cases. * reginfo.c (reg_scan_mark_refs): Ditto. * regrename.c (scan_rtx): Ditto. * reload1.c (eliminate_regs_1, elimination_effects, scan_paradoxical_subregs): Ditto. * reload.c (operands_match_p, subst_reg_equivs): Ditto. * resource.c (mark_referenced_resources, mark_set_resources): Ditto. * rtlanal.c (rtx_unstable_p, rtx_varies_p, count_occurrences) (reg_mentioned_p, modified_between_p, modified_in_p) (volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, inequality_comparisons_p, computed_jump_p_1): Ditto. * rtl.c (copy_rtx, rtx_equal_p_cb, rtx_equal_p): Ditto. * sched-deps.c (sched_analyze_2): Ditto. * valtrack.c (cleanup_auto_inc_dec): Ditto. * rtl.h: (CASE_CONST_SCALAR_INT, CASE_CONST_UNIQUE, CASE_CONST_ANY): New macros. From-SVN: r190627
2012-08-23 20:46:18 +02:00
CASE_CONST_ANY:
1991-12-01 06:13:56 +01:00
case SYMBOL_REF:
case LABEL_REF:
return 0;
case REG:
/* Note that we have to test for the actual rtx used for the frame
and arg pointers and not just the register number in case we have
eliminated the frame and/or arg pointer and are using it
for pseudos. */
if (x == frame_pointer_rtx || x == hard_frame_pointer_rtx
/* The arg pointer varies if it is not a fixed register. */
|| (x == arg_pointer_rtx && fixed_regs[ARG_POINTER_REGNUM]))
return 0;
if (x == pic_offset_table_rtx
/* ??? When call-clobbered, the value is stable modulo the restore
that must happen after a call. This currently screws up
local-alloc into believing that the restore is not needed, so we
must return 0 only if we are called from alias analysis. */
&& (!PIC_OFFSET_TABLE_REG_CALL_CLOBBERED || for_alias))
return 0;
return 1;
1991-12-01 06:13:56 +01:00
case LO_SUM:
/* The operand 0 of a LO_SUM is considered constant
(in fact it is related specifically to operand 1)
during alias analysis. */
return (! for_alias && rtx_varies_p (XEXP (x, 0), for_alias))
|| rtx_varies_p (XEXP (x, 1), for_alias);
case ASM_OPERANDS:
if (MEM_VOLATILE_P (x))
return 1;
/* Fall through. */
default:
break;
1991-12-01 06:13:56 +01:00
}
fmt = GET_RTX_FORMAT (code);
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
if (fmt[i] == 'e')
{
if (rtx_varies_p (XEXP (x, i), for_alias))
return 1;
}
else if (fmt[i] == 'E')
{
int j;
for (j = 0; j < XVECLEN (x, i); j++)
if (rtx_varies_p (XVECEXP (x, i, j), for_alias))
return 1;
}
1991-12-01 06:13:56 +01:00
return 0;
}
/* Return nonzero if the use of X+OFFSET as an address in a MEM with SIZE
bytes can cause a trap. MODE is the mode of the MEM (not that of X) and
UNALIGNED_MEMS controls whether nonzero is returned for unaligned memory
references on strict alignment machines. */
1991-12-01 06:13:56 +01:00
static int
rtx_addr_can_trap_p_1 (const_rtx x, HOST_WIDE_INT offset, HOST_WIDE_INT size,
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 13:02:45 +01:00
machine_mode mode, bool unaligned_mems)
1991-12-01 06:13:56 +01:00
{
alias.c: Remove uses of "register" specifier in declarations of arguments and local... 2001-10-10 Stan Shebs <shebs@apple.com> * alias.c: Remove uses of "register" specifier in declarations of arguments and local variables. * c-common.c: Ditto. * c-convert.c: Ditto. * c-decl.c: Ditto. * c-format.c: Ditto. * c-semantics.c: Ditto. * c-typeck.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfgbuild.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * combine.c: Ditto. * convert.c: Ditto. * cppexp.c: Ditto. * cppfiles.c: Ditto. * cse.c: Ditto. * dbxout.c: Ditto. * defaults.h: Ditto. * df.c: Ditto. * dwarf2out.c: Ditto. * dwarfout.c: Ditto. * emit-rtl.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fix-header.c: Ditto. * floatlib.c: Ditto. * flow.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * gcc.c: Ditto. * gcse.c: Ditto. * gen-protos.c: Ditto. * genattrtab.c: Ditto. * gencheck.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * gengenrtl.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * gensupport.c: Ditto. * global.c: Ditto. * gmon.c: Ditto. * graph.c: Ditto. * haifa-sched.c: Ditto. * hard-reg-set.h: Ditto. * hash.c: Ditto. * integrate.c: Ditto. * jump.c: Ditto. * lists.c: Ditto. * local-alloc.c: Ditto. * loop.c: Ditto. * mips-tdump.c: Ditto. * mips-tfile.c: Ditto. * optabs.c: Ditto. * prefix.c: Ditto. * print-rtl.c: Ditto. * read-rtl.c: Ditto. * real.c: Ditto. * recog.c: Ditto. * reg-stack.c: Ditto. * regclass.c: Ditto. * regmove.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtl.c: Ditto. * rtlanal.c: Ditto. * scan.c: Ditto. * sched-deps.c: Ditto. * sched-rgn.c: Ditto. * sdbout.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tradcif.y: Ditto. * tradcpp.c: Ditto. * tree.c: Ditto. * unroll.c: Ditto. * varasm.c: Ditto. * xcoffout.c: Ditto. From-SVN: r46173
2001-10-11 05:16:15 +02:00
enum rtx_code code = GET_CODE (x);
1991-12-01 06:13:56 +01:00
/* The offset must be a multiple of the mode size if we are considering
unaligned memory references on strict alignment machines. */
if (STRICT_ALIGNMENT && unaligned_mems && GET_MODE_SIZE (mode) != 0)
{
HOST_WIDE_INT actual_offset = offset;
#ifdef SPARC_STACK_BOUNDARY_HACK
/* ??? The SPARC port may claim a STACK_BOUNDARY higher than
the real alignment of %sp. However, when it does this, the
alignment of %sp+STACK_POINTER_OFFSET is STACK_BOUNDARY. */
if (SPARC_STACK_BOUNDARY_HACK
&& (x == stack_pointer_rtx || x == hard_frame_pointer_rtx))
actual_offset -= STACK_POINTER_OFFSET;
#endif
if (actual_offset % GET_MODE_SIZE (mode) != 0)
return 1;
}
1991-12-01 06:13:56 +01:00
switch (code)
{
case SYMBOL_REF:
if (SYMBOL_REF_WEAK (x))
return 1;
if (!CONSTANT_POOL_ADDRESS_P (x))
{
tree decl;
HOST_WIDE_INT decl_size;
if (offset < 0)
return 1;
if (size == 0)
size = GET_MODE_SIZE (mode);
if (size == 0)
return offset != 0;
/* If the size of the access or of the symbol is unknown,
assume the worst. */
decl = SYMBOL_REF_DECL (x);
/* Else check that the access is in bounds. TODO: restructure
expr_size/tree_expr_size/int_expr_size and just use the latter. */
if (!decl)
decl_size = -1;
else if (DECL_P (decl) && DECL_SIZE_UNIT (decl))
cuintp.c: Replace host_integerp (..., 0) with tree_fits_shwi_p throughout. gcc/ada/ * gcc-interface/cuintp.c: Replace host_integerp (..., 0) with tree_fits_shwi_p throughout. gcc/c-family/ * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace host_integerp (..., 0) with tree_fits_shwi_p throughout. gcc/c/ * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p throughout. gcc/cp/ * error.c, init.c, parser.c, semantics.c: Replace host_integerp (..., 0) with tree_fits_shwi_p throughout. gcc/go/ * gofrontend/expressions.cc: Replace host_integerp (..., 0) with tree_fits_shwi_p throughout. gcc/java/ * class.c, expr.c: Replace host_integerp (..., 0) with tree_fits_shwi_p throughout. gcc/ * builtins.c, config/alpha/alpha.c, config/c6x/predicates.md, config/ia64/predicates.md, config/iq2000/iq2000.c, config/mips/mips.c, config/s390/s390.c, dbxout.c, dwarf2out.c, except.c, explow.c, expr.c, expr.h, fold-const.c, gimple-fold.c, gimple-ssa-strength-reduction.c, gimple.c, godump.c, graphite-scop-detection.c, graphite-sese-to-poly.c, omp-low.c, predict.c, rtlanal.c, sdbout.c, simplify-rtx.c, stor-layout.c, tree-data-ref.c, tree-dfa.c, tree-pretty-print.c, tree-sra.c, tree-ssa-alias.c, tree-ssa-forwprop.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-phiopt.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-ssa-strlen.c, tree-ssa-structalias.c, tree-vect-data-refs.c, tree-vect-patterns.c, tree-vectorizer.h, tree.c, var-tracking.c, varasm.c: Replace host_integerp (..., 0) with tree_fits_shwi_p throughout. From-SVN: r204955
2013-11-18 15:51:10 +01:00
decl_size = (tree_fits_shwi_p (DECL_SIZE_UNIT (decl))
? tree_to_shwi (DECL_SIZE_UNIT (decl))
: -1);
else if (TREE_CODE (decl) == STRING_CST)
decl_size = TREE_STRING_LENGTH (decl);
else if (TYPE_SIZE_UNIT (TREE_TYPE (decl)))
decl_size = int_size_in_bytes (TREE_TYPE (decl));
else
decl_size = -1;
return (decl_size <= 0 ? offset != 0 : offset + size > decl_size);
}
return 0;
1991-12-01 06:13:56 +01:00
case LABEL_REF:
return 0;
case REG:
/* Stack references are assumed not to trap, but we need to deal with
nonsensical offsets. */
if (x == frame_pointer_rtx)
{
HOST_WIDE_INT adj_offset = offset - STARTING_FRAME_OFFSET;
if (size == 0)
size = GET_MODE_SIZE (mode);
if (FRAME_GROWS_DOWNWARD)
{
if (adj_offset < frame_offset || adj_offset + size - 1 >= 0)
return 1;
}
else
{
if (adj_offset < 0 || adj_offset + size - 1 >= frame_offset)
return 1;
}
return 0;
}
/* ??? Need to add a similar guard for nonsensical offsets. */
if (x == hard_frame_pointer_rtx
|| x == stack_pointer_rtx
/* The arg pointer varies if it is not a fixed register. */
|| (x == arg_pointer_rtx && fixed_regs[ARG_POINTER_REGNUM]))
return 0;
/* All of the virtual frame registers are stack references. */
if (REGNO (x) >= FIRST_VIRTUAL_REGISTER
&& REGNO (x) <= LAST_VIRTUAL_REGISTER)
return 0;
return 1;
1991-12-01 06:13:56 +01:00
case CONST:
return rtx_addr_can_trap_p_1 (XEXP (x, 0), offset, size,
mode, unaligned_mems);
1991-12-01 06:13:56 +01:00
case PLUS:
/* An address is assumed not to trap if:
- it is the pic register plus a constant. */
if (XEXP (x, 0) == pic_offset_table_rtx && CONSTANT_P (XEXP (x, 1)))
return 0;
/* - or it is an address that can't trap plus a constant integer. */
if (CONST_INT_P (XEXP (x, 1))
&& !rtx_addr_can_trap_p_1 (XEXP (x, 0), offset + INTVAL (XEXP (x, 1)),
size, mode, unaligned_mems))
return 0;
return 1;
1991-12-01 06:13:56 +01:00
case LO_SUM:
case PRE_MODIFY:
return rtx_addr_can_trap_p_1 (XEXP (x, 1), offset, size,
mode, unaligned_mems);
case PRE_DEC:
case PRE_INC:
case POST_DEC:
case POST_INC:
case POST_MODIFY:
return rtx_addr_can_trap_p_1 (XEXP (x, 0), offset, size,
mode, unaligned_mems);
default:
break;
1991-12-01 06:13:56 +01:00
}
/* If it isn't one of the case above, it can cause a trap. */
return 1;
}
/* Return nonzero if the use of X as an address in a MEM can cause a trap. */
int
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
rtx_addr_can_trap_p (const_rtx x)
{
return rtx_addr_can_trap_p_1 (x, 0, 0, VOIDmode, false);
}
/* Return true if X is an address that is known to not be zero. */
bool
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
nonzero_address_p (const_rtx x)
{
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
const enum rtx_code code = GET_CODE (x);
switch (code)
{
case SYMBOL_REF:
return !SYMBOL_REF_WEAK (x);
case LABEL_REF:
return true;
case REG:
/* As in rtx_varies_p, we have to use the actual rtx, not reg number. */
if (x == frame_pointer_rtx || x == hard_frame_pointer_rtx
|| x == stack_pointer_rtx
|| (x == arg_pointer_rtx && fixed_regs[ARG_POINTER_REGNUM]))
return true;
/* All of the virtual frame registers are stack references. */
if (REGNO (x) >= FIRST_VIRTUAL_REGISTER
&& REGNO (x) <= LAST_VIRTUAL_REGISTER)
return true;
return false;
case CONST:
return nonzero_address_p (XEXP (x, 0));
case PLUS:
/* Handle PIC references. */
if (XEXP (x, 0) == pic_offset_table_rtx
&& CONSTANT_P (XEXP (x, 1)))
return true;
return false;
case PRE_MODIFY:
/* Similar to the above; allow positive offsets. Further, since
auto-inc is only allowed in memories, the register must be a
pointer. */
if (CONST_INT_P (XEXP (x, 1))
&& INTVAL (XEXP (x, 1)) > 0)
return true;
return nonzero_address_p (XEXP (x, 0));
case PRE_INC:
/* Similarly. Further, the offset is always positive. */
return true;
case PRE_DEC:
case POST_DEC:
case POST_INC:
case POST_MODIFY:
return nonzero_address_p (XEXP (x, 0));
case LO_SUM:
return nonzero_address_p (XEXP (x, 1));
default:
break;
}
/* If it isn't one of the case above, might be zero. */
return false;
}
/* Return 1 if X refers to a memory location whose address
1991-12-01 06:13:56 +01:00
cannot be compared reliably with constant addresses,
or if X refers to a BLKmode memory object.
FOR_ALIAS is nonzero if we are called from alias analysis; if it is
zero, we are slightly more conservative. */
1991-12-01 06:13:56 +01:00
alias.c (mems_in_disjoint_alias_sets_p, [...]): Constify. * alias.c (mems_in_disjoint_alias_sets_p, fixed_scalar_and_varying_struct_p, aliases_everything_p, nonoverlapping_component_refs_p, nonoverlapping_memrefs_p, write_dependence_p, mems_in_disjoint_alias_sets_p, read_dependence, true_dependence, canon_true_dependence, anti_dependence, output_dependence): Constify. * combine.c (extended_count): Likewise. * cse.c (cse_rtx_varies_p, hash_rtx, exp_equiv_p): Likewise. * cselib.c (get_value_hash, references_value_p, cselib_reg_set_mode, cselib_rtx_varies_p): Likewise. * cselib.h (cselib_reg_set_mode, references_value_p): Likewise. * emit-rtl.c (mem_expr_equal_p, active_insn_p): Likewise. * function.c (contains, prologue_epilogue_contains, sibcall_epilogue_contains): Likewise. * jump.c (simplejump_p, condjump_p, condjump_in_parallel_p, pc_set, any_uncondjump_p, any_condjump_p, onlyjump_p, only_sets_cc0_p, sets_cc0_p, rtx_renumbered_equal_p, true_regnum, reg_or_subregno): Likewise. * recog.c (asm_noperands): Likewise. * reload1.c (function_invariant_p): Likewise. * rtl.h (mem_expr_equal_p, active_insn_p, rtx_varies_p, rtx_addr_varies_p, asm_noperands, exp_equiv_p, hash_rtx, condjump_p, any_condjump_p, any_uncondjump_p, pc_set, simplejump_p, onlyjump_p, only_sets_cc0_p, sets_cc0_p, true_regnum, reg_or_subregno, condjump_in_parallel_p, extended_count, prologue_epilogue_contains, sibcall_epilogue_contains, function_invariant_p, true_dependence, canon_true_dependence, read_dependence, anti_dependence, output_dependence): Likewise. * rtlanal.c (rtx_varies_p, rtx_addr_varies_p): Likewise. java: * jcf-io.c (find_class): Fix -Wcast-qual warnings. From-SVN: r127063
2007-07-30 17:35:02 +02:00
bool
rtx_addr_varies_p (const_rtx x, bool for_alias)
1991-12-01 06:13:56 +01:00
{
alias.c: Remove uses of "register" specifier in declarations of arguments and local... 2001-10-10 Stan Shebs <shebs@apple.com> * alias.c: Remove uses of "register" specifier in declarations of arguments and local variables. * c-common.c: Ditto. * c-convert.c: Ditto. * c-decl.c: Ditto. * c-format.c: Ditto. * c-semantics.c: Ditto. * c-typeck.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfgbuild.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * combine.c: Ditto. * convert.c: Ditto. * cppexp.c: Ditto. * cppfiles.c: Ditto. * cse.c: Ditto. * dbxout.c: Ditto. * defaults.h: Ditto. * df.c: Ditto. * dwarf2out.c: Ditto. * dwarfout.c: Ditto. * emit-rtl.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fix-header.c: Ditto. * floatlib.c: Ditto. * flow.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * gcc.c: Ditto. * gcse.c: Ditto. * gen-protos.c: Ditto. * genattrtab.c: Ditto. * gencheck.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * gengenrtl.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * gensupport.c: Ditto. * global.c: Ditto. * gmon.c: Ditto. * graph.c: Ditto. * haifa-sched.c: Ditto. * hard-reg-set.h: Ditto. * hash.c: Ditto. * integrate.c: Ditto. * jump.c: Ditto. * lists.c: Ditto. * local-alloc.c: Ditto. * loop.c: Ditto. * mips-tdump.c: Ditto. * mips-tfile.c: Ditto. * optabs.c: Ditto. * prefix.c: Ditto. * print-rtl.c: Ditto. * read-rtl.c: Ditto. * real.c: Ditto. * recog.c: Ditto. * reg-stack.c: Ditto. * regclass.c: Ditto. * regmove.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtl.c: Ditto. * rtlanal.c: Ditto. * scan.c: Ditto. * sched-deps.c: Ditto. * sched-rgn.c: Ditto. * sdbout.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tradcif.y: Ditto. * tradcpp.c: Ditto. * tree.c: Ditto. * unroll.c: Ditto. * varasm.c: Ditto. * xcoffout.c: Ditto. From-SVN: r46173
2001-10-11 05:16:15 +02:00
enum rtx_code code;
int i;
const char *fmt;
1991-12-01 06:13:56 +01:00
if (x == 0)
return 0;
code = GET_CODE (x);
if (code == MEM)
return GET_MODE (x) == BLKmode || rtx_varies_p (XEXP (x, 0), for_alias);
1991-12-01 06:13:56 +01:00
fmt = GET_RTX_FORMAT (code);
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
if (fmt[i] == 'e')
{
if (rtx_addr_varies_p (XEXP (x, i), for_alias))
return 1;
}
else if (fmt[i] == 'E')
{
int j;
for (j = 0; j < XVECLEN (x, i); j++)
if (rtx_addr_varies_p (XVECEXP (x, i, j), for_alias))
return 1;
}
1991-12-01 06:13:56 +01:00
return 0;
}
/* Return the CALL in X if there is one. */
rtx
get_call_rtx_from (rtx x)
{
if (INSN_P (x))
x = PATTERN (x);
if (GET_CODE (x) == PARALLEL)
x = XVECEXP (x, 0, 0);
if (GET_CODE (x) == SET)
x = SET_SRC (x);
if (GET_CODE (x) == CALL && MEM_P (XEXP (x, 0)))
return x;
return NULL_RTX;
}
1991-12-01 06:13:56 +01:00
/* Return the value of the integer term in X, if one is apparent;
otherwise return 0.
Only obvious integer terms are detected.
This is used in cse.c with the `related_value' field. */
1991-12-01 06:13:56 +01:00
1992-07-06 22:15:06 +02:00
HOST_WIDE_INT
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
get_integer_term (const_rtx x)
1991-12-01 06:13:56 +01:00
{
if (GET_CODE (x) == CONST)
x = XEXP (x, 0);
if (GET_CODE (x) == MINUS
&& CONST_INT_P (XEXP (x, 1)))
1991-12-01 06:13:56 +01:00
return - INTVAL (XEXP (x, 1));
if (GET_CODE (x) == PLUS
&& CONST_INT_P (XEXP (x, 1)))
1991-12-01 06:13:56 +01:00
return INTVAL (XEXP (x, 1));
return 0;
}
/* If X is a constant, return the value sans apparent integer term;
otherwise return 0.
Only obvious integer terms are detected. */
rtx
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
get_related_value (const_rtx x)
1991-12-01 06:13:56 +01:00
{
if (GET_CODE (x) != CONST)
return 0;
x = XEXP (x, 0);
if (GET_CODE (x) == PLUS
&& CONST_INT_P (XEXP (x, 1)))
1991-12-01 06:13:56 +01:00
return XEXP (x, 0);
else if (GET_CODE (x) == MINUS
&& CONST_INT_P (XEXP (x, 1)))
1991-12-01 06:13:56 +01:00
return XEXP (x, 0);
return 0;
}
/* Return true if SYMBOL is a SYMBOL_REF and OFFSET + SYMBOL points
to somewhere in the same object or object_block as SYMBOL. */
bool
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
offset_within_block_p (const_rtx symbol, HOST_WIDE_INT offset)
{
tree decl;
if (GET_CODE (symbol) != SYMBOL_REF)
return false;
if (offset == 0)
return true;
if (offset > 0)
{
if (CONSTANT_POOL_ADDRESS_P (symbol)
&& offset < (int) GET_MODE_SIZE (get_pool_mode (symbol)))
return true;
decl = SYMBOL_REF_DECL (symbol);
if (decl && offset < int_size_in_bytes (TREE_TYPE (decl)))
return true;
}
if (SYMBOL_REF_HAS_BLOCK_INFO_P (symbol)
&& SYMBOL_REF_BLOCK (symbol)
&& SYMBOL_REF_BLOCK_OFFSET (symbol) >= 0
&& ((unsigned HOST_WIDE_INT) offset + SYMBOL_REF_BLOCK_OFFSET (symbol)
< (unsigned HOST_WIDE_INT) SYMBOL_REF_BLOCK (symbol)->size))
return true;
return false;
}
/* Split X into a base and a constant offset, storing them in *BASE_OUT
and *OFFSET_OUT respectively. */
void
split_const (rtx x, rtx *base_out, rtx *offset_out)
{
if (GET_CODE (x) == CONST)
{
x = XEXP (x, 0);
if (GET_CODE (x) == PLUS && CONST_INT_P (XEXP (x, 1)))
{
*base_out = XEXP (x, 0);
*offset_out = XEXP (x, 1);
return;
}
}
*base_out = x;
*offset_out = const0_rtx;
}
cse.c (canon_hash): Handle PRE_MODIFY/POST_MODIFY. * cse.c (canon_hash): Handle PRE_MODIFY/POST_MODIFY. (cse_insn): Likewise. (addr_affects_sp_p): Likewise. * expr.c (move_by_pieces): Likewise. (clear_by_pieces): Likewise. * gcse.c (oprs_unchanged_p): Likewise. * haifa-sched.c (sched_analyze_2): Likewise. * recog.c (offsettable_address_p): Likewise. * regclass.c (record_address_regs): Likewise. * reload.c (find_reusable_reload): Likewise. (push_reload): Likewise. (operands_match_p): Likewise. (decompose): Likewise. (find_reloads_address_1): Likewise. (find_inc_amount): Likewise. * reload1.c (elimination_effects): Likewise. * resource.c (mark_set_resources): Likewise. * flow.c (attempt_auto_inc): New function; mostly broken out of find_auto_inc. (find_auto_inc): Split into two functions and enhanced to generate POST_MODIFY. * rtl.def (PRE_MODIFY, POST_MODIFY): Adjust comment. * rtl.h (count_all_occurrences): Declare. (HAVE_{PRE,POST}_MODIFY_{DISP,REG}): Provide default of 0 if not defined. * rtlanal.c (count_all_occurrences): New function. * tm.texi (HAVE_POST_MODIFY_DISP, HAVE_PRE_MODIFY_DISP, HAVE_POST_MODIFY_REG, HAVE_PRE_MODIFY_REG): Document. * config/ia64/ia64-protos.h (destination_operand): Declare. * config/ia64/ia64.c (destination_operand): New function. (ia64_print_operand): Handle POST_MODIFY. (rtx_needs_barrier): Likewise. * config/ia64/ia64.h (HAVE_POST_MODIFY_DISP): Define to 1. (HAVE_POST_MODIFY_REG): Define to 1. (MAX_REGS_PER_ADDRESS): Change to 2. (GO_IF_LEGITIMATE_ADDRESS): Accept POST_MODIFY too. (LEGITIMATE_ADDRESS_REG): New helper macro. (LEGITIMATE_ADDRESS_DISP): Likewise. (PREDICATE_CODES): Add entry for destination_operand. * config/ia64/ia64.md (all mov patterns): Use destination_operand predicate for operand 0. From-SVN: r35321
2000-07-28 19:46:18 +02:00
/* Return the number of places FIND appears within X. If COUNT_DEST is
zero, we do not count occurrences inside the destination of a SET. */
int
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
count_occurrences (const_rtx x, const_rtx find, int count_dest)
cse.c (canon_hash): Handle PRE_MODIFY/POST_MODIFY. * cse.c (canon_hash): Handle PRE_MODIFY/POST_MODIFY. (cse_insn): Likewise. (addr_affects_sp_p): Likewise. * expr.c (move_by_pieces): Likewise. (clear_by_pieces): Likewise. * gcse.c (oprs_unchanged_p): Likewise. * haifa-sched.c (sched_analyze_2): Likewise. * recog.c (offsettable_address_p): Likewise. * regclass.c (record_address_regs): Likewise. * reload.c (find_reusable_reload): Likewise. (push_reload): Likewise. (operands_match_p): Likewise. (decompose): Likewise. (find_reloads_address_1): Likewise. (find_inc_amount): Likewise. * reload1.c (elimination_effects): Likewise. * resource.c (mark_set_resources): Likewise. * flow.c (attempt_auto_inc): New function; mostly broken out of find_auto_inc. (find_auto_inc): Split into two functions and enhanced to generate POST_MODIFY. * rtl.def (PRE_MODIFY, POST_MODIFY): Adjust comment. * rtl.h (count_all_occurrences): Declare. (HAVE_{PRE,POST}_MODIFY_{DISP,REG}): Provide default of 0 if not defined. * rtlanal.c (count_all_occurrences): New function. * tm.texi (HAVE_POST_MODIFY_DISP, HAVE_PRE_MODIFY_DISP, HAVE_POST_MODIFY_REG, HAVE_PRE_MODIFY_REG): Document. * config/ia64/ia64-protos.h (destination_operand): Declare. * config/ia64/ia64.c (destination_operand): New function. (ia64_print_operand): Handle POST_MODIFY. (rtx_needs_barrier): Likewise. * config/ia64/ia64.h (HAVE_POST_MODIFY_DISP): Define to 1. (HAVE_POST_MODIFY_REG): Define to 1. (MAX_REGS_PER_ADDRESS): Change to 2. (GO_IF_LEGITIMATE_ADDRESS): Accept POST_MODIFY too. (LEGITIMATE_ADDRESS_REG): New helper macro. (LEGITIMATE_ADDRESS_DISP): Likewise. (PREDICATE_CODES): Add entry for destination_operand. * config/ia64/ia64.md (all mov patterns): Use destination_operand predicate for operand 0. From-SVN: r35321
2000-07-28 19:46:18 +02:00
{
int i, j;
enum rtx_code code;
const char *format_ptr;
int count;
if (x == find)
return 1;
code = GET_CODE (x);
switch (code)
{
case REG:
alias.c (rtx_equal_for_memref_p): Convert constant cases. 2012-08-23 Kenneth Zadeck <zadeck@naturalbridge.com> * alias.c (rtx_equal_for_memref_p): Convert constant cases. * combine.c (find_single_use_1, mark_used_regs_combine): Convert to CASE_CONST_ANY. * cse.c (exp_equiv_p, canon_reg, fold_rtx, cse_process_notes_1, count_reg_usage): Convert constant cases. * cselib.c (cselib_expand_value_rtx_1): Convert to CASE_CONST_ANY. (cselib_subst_to_values): Convert constant cases. * df-scan.c (df_uses_record): Ditto. * dse.c (const_or_frame_p): Convert case statements to explicit if-then-else using mode classes. * emit-rtl.c (verify_rtx_sharing, copy_insn_1): Convert constant cases. * explow.c (convert_memory_address_addr_space): Ditto. * gcse.c (want_to_gcse_p, oprs_unchanged_p, compute_transp): Ditto. * genattrtab.c (attr_copy_rtx, clear_struct_flag): Ditto. * ira.c (equiv_init_varies_p, contains_replace_regs, memref_referenced_p, rtx_moveable_p): Ditto. * jump.c (mark_jump_label_1): Remove constant cases. (rtx_renumbered_equal_p): Convert to CASE_CONST_UNIQUE. * loop-invariant.c (check_maybe_invariant, hash_invariant_expr_1, invariant_expr_equal_p): Convert to CASE_CONST_ANY. * postreload-gcse.c (oprs_unchanged_p): Convert constant cases. * reginfo.c (reg_scan_mark_refs): Ditto. * regrename.c (scan_rtx): Ditto. * reload1.c (eliminate_regs_1, elimination_effects, scan_paradoxical_subregs): Ditto. * reload.c (operands_match_p, subst_reg_equivs): Ditto. * resource.c (mark_referenced_resources, mark_set_resources): Ditto. * rtlanal.c (rtx_unstable_p, rtx_varies_p, count_occurrences) (reg_mentioned_p, modified_between_p, modified_in_p) (volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, inequality_comparisons_p, computed_jump_p_1): Ditto. * rtl.c (copy_rtx, rtx_equal_p_cb, rtx_equal_p): Ditto. * sched-deps.c (sched_analyze_2): Ditto. * valtrack.c (cleanup_auto_inc_dec): Ditto. * rtl.h: (CASE_CONST_SCALAR_INT, CASE_CONST_UNIQUE, CASE_CONST_ANY): New macros. From-SVN: r190627
2012-08-23 20:46:18 +02:00
CASE_CONST_ANY:
cse.c (canon_hash): Handle PRE_MODIFY/POST_MODIFY. * cse.c (canon_hash): Handle PRE_MODIFY/POST_MODIFY. (cse_insn): Likewise. (addr_affects_sp_p): Likewise. * expr.c (move_by_pieces): Likewise. (clear_by_pieces): Likewise. * gcse.c (oprs_unchanged_p): Likewise. * haifa-sched.c (sched_analyze_2): Likewise. * recog.c (offsettable_address_p): Likewise. * regclass.c (record_address_regs): Likewise. * reload.c (find_reusable_reload): Likewise. (push_reload): Likewise. (operands_match_p): Likewise. (decompose): Likewise. (find_reloads_address_1): Likewise. (find_inc_amount): Likewise. * reload1.c (elimination_effects): Likewise. * resource.c (mark_set_resources): Likewise. * flow.c (attempt_auto_inc): New function; mostly broken out of find_auto_inc. (find_auto_inc): Split into two functions and enhanced to generate POST_MODIFY. * rtl.def (PRE_MODIFY, POST_MODIFY): Adjust comment. * rtl.h (count_all_occurrences): Declare. (HAVE_{PRE,POST}_MODIFY_{DISP,REG}): Provide default of 0 if not defined. * rtlanal.c (count_all_occurrences): New function. * tm.texi (HAVE_POST_MODIFY_DISP, HAVE_PRE_MODIFY_DISP, HAVE_POST_MODIFY_REG, HAVE_PRE_MODIFY_REG): Document. * config/ia64/ia64-protos.h (destination_operand): Declare. * config/ia64/ia64.c (destination_operand): New function. (ia64_print_operand): Handle POST_MODIFY. (rtx_needs_barrier): Likewise. * config/ia64/ia64.h (HAVE_POST_MODIFY_DISP): Define to 1. (HAVE_POST_MODIFY_REG): Define to 1. (MAX_REGS_PER_ADDRESS): Change to 2. (GO_IF_LEGITIMATE_ADDRESS): Accept POST_MODIFY too. (LEGITIMATE_ADDRESS_REG): New helper macro. (LEGITIMATE_ADDRESS_DISP): Likewise. (PREDICATE_CODES): Add entry for destination_operand. * config/ia64/ia64.md (all mov patterns): Use destination_operand predicate for operand 0. From-SVN: r35321
2000-07-28 19:46:18 +02:00
case SYMBOL_REF:
case CODE_LABEL:
case PC:
case CC0:
return 0;
case EXPR_LIST:
count = count_occurrences (XEXP (x, 0), find, count_dest);
if (XEXP (x, 1))
count += count_occurrences (XEXP (x, 1), find, count_dest);
return count;
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
cse.c (canon_hash): Handle PRE_MODIFY/POST_MODIFY. * cse.c (canon_hash): Handle PRE_MODIFY/POST_MODIFY. (cse_insn): Likewise. (addr_affects_sp_p): Likewise. * expr.c (move_by_pieces): Likewise. (clear_by_pieces): Likewise. * gcse.c (oprs_unchanged_p): Likewise. * haifa-sched.c (sched_analyze_2): Likewise. * recog.c (offsettable_address_p): Likewise. * regclass.c (record_address_regs): Likewise. * reload.c (find_reusable_reload): Likewise. (push_reload): Likewise. (operands_match_p): Likewise. (decompose): Likewise. (find_reloads_address_1): Likewise. (find_inc_amount): Likewise. * reload1.c (elimination_effects): Likewise. * resource.c (mark_set_resources): Likewise. * flow.c (attempt_auto_inc): New function; mostly broken out of find_auto_inc. (find_auto_inc): Split into two functions and enhanced to generate POST_MODIFY. * rtl.def (PRE_MODIFY, POST_MODIFY): Adjust comment. * rtl.h (count_all_occurrences): Declare. (HAVE_{PRE,POST}_MODIFY_{DISP,REG}): Provide default of 0 if not defined. * rtlanal.c (count_all_occurrences): New function. * tm.texi (HAVE_POST_MODIFY_DISP, HAVE_PRE_MODIFY_DISP, HAVE_POST_MODIFY_REG, HAVE_PRE_MODIFY_REG): Document. * config/ia64/ia64-protos.h (destination_operand): Declare. * config/ia64/ia64.c (destination_operand): New function. (ia64_print_operand): Handle POST_MODIFY. (rtx_needs_barrier): Likewise. * config/ia64/ia64.h (HAVE_POST_MODIFY_DISP): Define to 1. (HAVE_POST_MODIFY_REG): Define to 1. (MAX_REGS_PER_ADDRESS): Change to 2. (GO_IF_LEGITIMATE_ADDRESS): Accept POST_MODIFY too. (LEGITIMATE_ADDRESS_REG): New helper macro. (LEGITIMATE_ADDRESS_DISP): Likewise. (PREDICATE_CODES): Add entry for destination_operand. * config/ia64/ia64.md (all mov patterns): Use destination_operand predicate for operand 0. From-SVN: r35321
2000-07-28 19:46:18 +02:00
case MEM:
alias.c (get_alias_set, [...]): Use MEM_P. 2004-07-01 Jerry Quinn <jlquinn@optonline.net> * alias.c (get_alias_set, canon_rtx, get_addr, nonoverlapping_memrefs_p, nonlocal_referenced_p_1, memory_modified_1): Use MEM_P. * builtins.c (expand_builtin_prefetch, expand_builtin_profile_func, expand_builtin): Likewise. * calls.c (expand_call, emit_library_call_value_1, store_one_arg): Likewise. * combine.c (can_combine_p, combinable_i3pat, try_combine, find_split_point, combine_simplify_rtx, simplify_set, make_extraction, rtx_equal_for_field_assignment_p, gen_lowpart_for_combine, record_dead_and_set_regs_1, get_last_value_validate, mark_used_regs_combine, move_deaths, unmentioned_reg_p_1): Likewise. * cse.c (check_dependence, canon_hash, equiv_constant, gen_lowpart_if_possible, cse_insn, invalidate_from_clobbers, cse_around_loop, cse_check_loop_start, cse_set_around_loop, count_reg_usage): Likewise. * cselib.c (rtx_equal_for_cselib_p, add_mem_for_addr, cselib_lookup, cselib_invalidate_mem, cselib_invalidate_rtx, cselib_record_set, cselib_record_sets): Likewise. * dbxout.c (PARM_PASSED_IN_MEMORY, dbxout_symbol, dbxout_symbol_location, dbxout_parms, dbxout_reg_parms): Likewise. * ddg.c (mark_mem_use, mark_mem_store, rtx_mem_access_p): Likewise. * df.c (df_uses_record): Likewise. * dojump (do_jump): Likewise. * dwarf2out.c (stack_adjust_offset, mem_loc_descriptor, loc_descriptor_from_tree, rtl_for_decl_location, add_bound_info, decl_start_label): Likewise. * emit-rtl.c (gen_complex_constant_part, gen_highpart, operand_subword, change_address_1, make_safe_from): Likewise. * explow.c (break_out_memory_refs, copy_all_regs, validize_mem, stabilize, force_not_mem): Likewise. * expmed.c (store_bit_field, store_split_bit_field, extract_bit_field, expand_mult_const, expand_divmod, emit_store_flag): Likewise. * expr.c (convert_move, convert_modes, emit_block_move, emit_group_load, emit_group_store, clear_storage, emit_move_insn, emit_move_insn_1, expand_assignment, store_expr, store_constructor_field, store_constructor, store_field, force_operand, safe_from_p, expand_expr_real_1, expand_increment): Likewise. * final.c (cleanup_subreg_operands, alter_subreg, get_mem_expr_from_op): Likewise. * flow.c (notice_stack_pointer_modification_1, init_propagate_block_info, insn_dead_p, mark_set_1, mark_used_regs): Likewise. * function.c (mark_temp_addr_taken, preserve_temp_slots, preserve_rtl_expr_result, put_var_into_stack, fixup_var_refs_1, optimize_bit_field, flush_addressof, purge_addressof_1, instantiate_decl, instantiate_virtual_regs_1, assign_parms, setjmp_protect, setjmp_protect_args, fix_lexical_addr, keep_stack_depressed): Likewise. * ifcvt.c (noce_try_cmove_arith, noce_try_abs, noce_operand_ok, noce_process_if_block, find_memory): Likewise. * integrate.c (subst_constants, allocate_initial_values): Likewise. * local-alloc.c (validate_equiv_mem_from_store, memref_referenced_p, update_equiv_regs): Likewise. * loop.c (scan_loop, prescan_loop, note_addr_stored, check_store, maybe_eliminate_biv_1, find_mem_in_note_1): Likewise. * optabs.c (expand_abs, emit_unop_insn): Likewise. * passes.c (rest_of_handle_final): Likewise. * postreload.c (reload_cse_simplify_set, reload_cse_simplify_operands, move2add_note_store): Likewise. * ra-build.c (detect_remat_webs): Likewise. * ra-debug.c (dump_static_insn_cost): Likewise. * ra-rewrite.c (slots_overlap_p, insert_stores): Likewise. * recog.c (validate_change, apply_change_group, cancel_changes, validate_replace_rtx_1, general_operand, register_operand, nonmemory_operand, push_operand, pop_operand, memory_operand, indirect_operand, asm_operand_ok, offsettable_memref_p, offsettable_nonstrict_memref_p, constrain_operands, store_data_bypass_p): Likewise. * reg-stack.c (subst_stack_regs_pat): Likewise. * regclass.c (record_operand_costs, scan_one_insn, record_reg_classes, copy_cost, reg_scan_mark_refs): Likewise. * regmove.c (optimize_reg_copy_3, stack_memref_p, combine_stack_adjustments_for_block): Likewise. * regrename.c (copyprop_hardreg_forward_1): Likewise. * reload.c (can_reload_into, push_reload, decompose, immune_p, find_reloads, find_reloads_address, find_reloads_address_1, reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p, find_equiv_reg): Likewise. * reload1.c (reload, eliminate_regs, eliminate_regs_in_insn, reload_as_needed, choose_reload_regs, emit_input_reload_insns, do_input_reload, emit_reload_insns, gen_reload, delete_output_reload, delete_address_reloads): Likewise. * resource.c (mark_referenced_resources): Likewise. * rtlanal.c (get_jump_table_offset, count_occurrences, reg_referenced_p, reg_set_p, set_of_1, set_noop_p, reg_overlap_mentioned_p, note_uses, replace_regs, nonzero_bits1, num_sign_bit_copies1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sched-deps.c (sched_analyze_1, sched_analyze_2): Likewise. * sdbout.c (PARM_PASSED_IN_MEMORY, sdbout_symbol, sdbout_toplevel_data, sdbout_parms, sdbout_reg_parms, sdbout_global_decl): Likewise. * simplify-rtx.c (simplify_subreg): Likewise. * stmt.c (expand_asm_operands, expand_expr_stmt_value, expand_decl, expand_anon_union_decl, expand_end_case_type): Likewise. * unroll.c (calculate_giv_inc): Likewise. * var-tracking.c (stack_adjust_offset_pre_post, bb_stack_adjust_offset, track_expr_p, count_uses, add_uses, add_stores, compute_bb_dataflow, vt_get_decl_and_offset, vt_add_function_parameters): Likewise. * varasm.c (make_var_volatile, notice_global_symbol, assemble_external, decode_addr_const, mark_weak, default_encode_section_info): Likewise. From-SVN: r83980
2004-07-01 14:52:53 +02:00
if (MEM_P (find) && rtx_equal_p (x, find))
cse.c (canon_hash): Handle PRE_MODIFY/POST_MODIFY. * cse.c (canon_hash): Handle PRE_MODIFY/POST_MODIFY. (cse_insn): Likewise. (addr_affects_sp_p): Likewise. * expr.c (move_by_pieces): Likewise. (clear_by_pieces): Likewise. * gcse.c (oprs_unchanged_p): Likewise. * haifa-sched.c (sched_analyze_2): Likewise. * recog.c (offsettable_address_p): Likewise. * regclass.c (record_address_regs): Likewise. * reload.c (find_reusable_reload): Likewise. (push_reload): Likewise. (operands_match_p): Likewise. (decompose): Likewise. (find_reloads_address_1): Likewise. (find_inc_amount): Likewise. * reload1.c (elimination_effects): Likewise. * resource.c (mark_set_resources): Likewise. * flow.c (attempt_auto_inc): New function; mostly broken out of find_auto_inc. (find_auto_inc): Split into two functions and enhanced to generate POST_MODIFY. * rtl.def (PRE_MODIFY, POST_MODIFY): Adjust comment. * rtl.h (count_all_occurrences): Declare. (HAVE_{PRE,POST}_MODIFY_{DISP,REG}): Provide default of 0 if not defined. * rtlanal.c (count_all_occurrences): New function. * tm.texi (HAVE_POST_MODIFY_DISP, HAVE_PRE_MODIFY_DISP, HAVE_POST_MODIFY_REG, HAVE_PRE_MODIFY_REG): Document. * config/ia64/ia64-protos.h (destination_operand): Declare. * config/ia64/ia64.c (destination_operand): New function. (ia64_print_operand): Handle POST_MODIFY. (rtx_needs_barrier): Likewise. * config/ia64/ia64.h (HAVE_POST_MODIFY_DISP): Define to 1. (HAVE_POST_MODIFY_REG): Define to 1. (MAX_REGS_PER_ADDRESS): Change to 2. (GO_IF_LEGITIMATE_ADDRESS): Accept POST_MODIFY too. (LEGITIMATE_ADDRESS_REG): New helper macro. (LEGITIMATE_ADDRESS_DISP): Likewise. (PREDICATE_CODES): Add entry for destination_operand. * config/ia64/ia64.md (all mov patterns): Use destination_operand predicate for operand 0. From-SVN: r35321
2000-07-28 19:46:18 +02:00
return 1;
break;
case SET:
if (SET_DEST (x) == find && ! count_dest)
return count_occurrences (SET_SRC (x), find, count_dest);
break;
default:
break;
}
format_ptr = GET_RTX_FORMAT (code);
count = 0;
for (i = 0; i < GET_RTX_LENGTH (code); i++)
{
switch (*format_ptr++)
{
case 'e':
count += count_occurrences (XEXP (x, i), find, count_dest);
break;
case 'E':
for (j = 0; j < XVECLEN (x, i); j++)
count += count_occurrences (XVECEXP (x, i, j), find, count_dest);
break;
}
}
return count;
}
/* Return TRUE if OP is a register or subreg of a register that
holds an unsigned quantity. Otherwise, return FALSE. */
bool
unsigned_reg_p (rtx op)
{
if (REG_P (op)
&& REG_EXPR (op)
&& TYPE_UNSIGNED (TREE_TYPE (REG_EXPR (op))))
return true;
if (GET_CODE (op) == SUBREG
calls.c (precompute_arguments): Use new SUBREG_PROMOTED_SET instead of SUBREG_PROMOTED_UNSIGNED_SET. gcc/ 2014-08-08 Kugan Vivekanandarajah <kuganv@linaro.org> * calls.c (precompute_arguments): Use new SUBREG_PROMOTED_SET instead of SUBREG_PROMOTED_UNSIGNED_SET. (expand_call): Likewise. * cfgexpand.c (expand_gimple_stmt_1): Use SUBREG_PROMOTED_SIGN to get promoted mode. * combine.c (record_promoted_value): Skip > 0 comparison with SUBREG_PROMOTED_UNSIGNED_P as it now returns only 0 or 1. * expr.c (convert_move): Use SUBREG_CHECK_PROMOTED_SIGN instead of SUBREG_PROMOTED_UNSIGNED_P. (convert_modes): Likewise. (store_expr): Use SUBREG_PROMOTED_SIGN to get promoted mode. Use SUBREG_CHECK_PROMOTED_SIGN instead of SUBREG_PROMOTED_UNSIGNED_P. (expand_expr_real_1): Use new SUBREG_PROMOTED_SET instead of SUBREG_PROMOTED_UNSIGNED_SET. * function.c (assign_parm_setup_reg): Use new SUBREG_PROMOTED_SET instead of SUBREG_PROMOTED_UNSIGNED_SET. * ifcvt.c (noce_emit_cmove): Updated to use SUBREG_PROMOTED_GET and SUBREG_PROMOTED_SET. * internal-fn.c (ubsan_expand_si_overflow_mul_check): Use SUBREG_PROMOTED_SET instead of SUBREG_PROMOTED_UNSIGNED_SET. * optabs.c (widen_operand): Use SUBREG_CHECK_PROMOTED_SIGN instead of SUBREG_PROMOTED_UNSIGNED_P. * rtl.h (SUBREG_PROMOTED_UNSIGNED_SET): Remove. (SUBREG_PROMOTED_SET): New define. (SUBREG_PROMOTED_GET): Likewise. (SUBREG_PROMOTED_SIGN): Likewise. (SUBREG_PROMOTED_SIGNED_P): Likewise. (SUBREG_CHECK_PROMOTED_SIGN): Likewise. (SUBREG_PROMOTED_UNSIGNED_P): Updated. * rtlanal.c (unsigned_reg_p): Use new SUBREG_PROMOTED_GET instead of SUBREG_PROMOTED_UNSIGNED_GET. (nonzero_bits1): Skip > 0 comparison with the results as SUBREG_PROMOTED_UNSIGNED_P now returns only 0 or 1. (num_sign_bit_copies1): Use SUBREG_PROMOTED_SIGNED_P instead of !SUBREG_PROMOTED_UNSIGNED_P. * simplify-rtx.c (simplify_unary_operation_1): Use new SUBREG_PROMOTED_SIGNED_P instead of !SUBREG_PROMOTED_UNSIGNED_P. (simplify_subreg): Use new SUBREG_PROMOTED_SIGNED_P, SUBREG_PROMOTED_UNSIGNED_P and SUBREG_PROMOTED_SET instead of SUBREG_PROMOTED_UNSIGNED_P and SUBREG_PROMOTED_UNSIGNED_SET. From-SVN: r213749
2014-08-08 07:24:12 +02:00
&& SUBREG_PROMOTED_SIGN (op))
return true;
return false;
}
cse.c (canon_hash): Handle PRE_MODIFY/POST_MODIFY. * cse.c (canon_hash): Handle PRE_MODIFY/POST_MODIFY. (cse_insn): Likewise. (addr_affects_sp_p): Likewise. * expr.c (move_by_pieces): Likewise. (clear_by_pieces): Likewise. * gcse.c (oprs_unchanged_p): Likewise. * haifa-sched.c (sched_analyze_2): Likewise. * recog.c (offsettable_address_p): Likewise. * regclass.c (record_address_regs): Likewise. * reload.c (find_reusable_reload): Likewise. (push_reload): Likewise. (operands_match_p): Likewise. (decompose): Likewise. (find_reloads_address_1): Likewise. (find_inc_amount): Likewise. * reload1.c (elimination_effects): Likewise. * resource.c (mark_set_resources): Likewise. * flow.c (attempt_auto_inc): New function; mostly broken out of find_auto_inc. (find_auto_inc): Split into two functions and enhanced to generate POST_MODIFY. * rtl.def (PRE_MODIFY, POST_MODIFY): Adjust comment. * rtl.h (count_all_occurrences): Declare. (HAVE_{PRE,POST}_MODIFY_{DISP,REG}): Provide default of 0 if not defined. * rtlanal.c (count_all_occurrences): New function. * tm.texi (HAVE_POST_MODIFY_DISP, HAVE_PRE_MODIFY_DISP, HAVE_POST_MODIFY_REG, HAVE_PRE_MODIFY_REG): Document. * config/ia64/ia64-protos.h (destination_operand): Declare. * config/ia64/ia64.c (destination_operand): New function. (ia64_print_operand): Handle POST_MODIFY. (rtx_needs_barrier): Likewise. * config/ia64/ia64.h (HAVE_POST_MODIFY_DISP): Define to 1. (HAVE_POST_MODIFY_REG): Define to 1. (MAX_REGS_PER_ADDRESS): Change to 2. (GO_IF_LEGITIMATE_ADDRESS): Accept POST_MODIFY too. (LEGITIMATE_ADDRESS_REG): New helper macro. (LEGITIMATE_ADDRESS_DISP): Likewise. (PREDICATE_CODES): Add entry for destination_operand. * config/ia64/ia64.md (all mov patterns): Use destination_operand predicate for operand 0. From-SVN: r35321
2000-07-28 19:46:18 +02:00
1991-12-01 06:13:56 +01:00
/* Nonzero if register REG appears somewhere within IN.
Also works if REG is not a register; in this case it checks
for a subexpression of IN that is Lisp "equal" to REG. */
int
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
reg_mentioned_p (const_rtx reg, const_rtx in)
1991-12-01 06:13:56 +01:00
{
alias.c: Remove uses of "register" specifier in declarations of arguments and local... 2001-10-10 Stan Shebs <shebs@apple.com> * alias.c: Remove uses of "register" specifier in declarations of arguments and local variables. * c-common.c: Ditto. * c-convert.c: Ditto. * c-decl.c: Ditto. * c-format.c: Ditto. * c-semantics.c: Ditto. * c-typeck.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfgbuild.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * combine.c: Ditto. * convert.c: Ditto. * cppexp.c: Ditto. * cppfiles.c: Ditto. * cse.c: Ditto. * dbxout.c: Ditto. * defaults.h: Ditto. * df.c: Ditto. * dwarf2out.c: Ditto. * dwarfout.c: Ditto. * emit-rtl.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fix-header.c: Ditto. * floatlib.c: Ditto. * flow.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * gcc.c: Ditto. * gcse.c: Ditto. * gen-protos.c: Ditto. * genattrtab.c: Ditto. * gencheck.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * gengenrtl.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * gensupport.c: Ditto. * global.c: Ditto. * gmon.c: Ditto. * graph.c: Ditto. * haifa-sched.c: Ditto. * hard-reg-set.h: Ditto. * hash.c: Ditto. * integrate.c: Ditto. * jump.c: Ditto. * lists.c: Ditto. * local-alloc.c: Ditto. * loop.c: Ditto. * mips-tdump.c: Ditto. * mips-tfile.c: Ditto. * optabs.c: Ditto. * prefix.c: Ditto. * print-rtl.c: Ditto. * read-rtl.c: Ditto. * real.c: Ditto. * recog.c: Ditto. * reg-stack.c: Ditto. * regclass.c: Ditto. * regmove.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtl.c: Ditto. * rtlanal.c: Ditto. * scan.c: Ditto. * sched-deps.c: Ditto. * sched-rgn.c: Ditto. * sdbout.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tradcif.y: Ditto. * tradcpp.c: Ditto. * tree.c: Ditto. * unroll.c: Ditto. * varasm.c: Ditto. * xcoffout.c: Ditto. From-SVN: r46173
2001-10-11 05:16:15 +02:00
const char *fmt;
int i;
enum rtx_code code;
1991-12-01 06:13:56 +01:00
if (in == 0)
return 0;
if (reg == in)
return 1;
if (GET_CODE (in) == LABEL_REF)
Introduce LABEL_REF_LABEL gcc/ChangeLog: 2014-09-11 David Malcolm <dmalcolm@redhat.com> * rtl.h (LABEL_REF_LABEL): New macro. * alias.c (rtx_equal_for_memref_p): Use LABEL_REF_LABEL in place of XEXP (, 0), where we know that we have a LABEL_REF. * cfgbuild.c (make_edges): Likewise. (purge_dead_tablejump_edges): Likewise. * cfgexpand.c (convert_debug_memory_address): Likewise. * cfgrtl.c (patch_jump_insn): Likewise. * combine.c (distribute_notes): Likewise. * cse.c (hash_rtx_cb): Likewise. (exp_equiv_p): Likewise. (fold_rtx): Likewise. (check_for_label_ref): Likewise. * cselib.c (rtx_equal_for_cselib_1): Likewise. (cselib_hash_rtx): Likewise. * emit-rtl.c (mark_label_nuses): Likewise. * explow.c (convert_memory_address_addr_space): Likewise. * final.c (output_asm_label): Likewise. (output_addr_const): Likewise. * gcse.c (add_label_notes): Likewise. * genconfig.c (walk_insn_part): Likewise. * genrecog.c (validate_pattern): Likewise. * ifcvt.c (cond_exec_get_condition): Likewise. (noce_emit_store_flag): Likewise. (noce_get_alt_condition): Likewise. (noce_get_condition): Likewise. * jump.c (maybe_propagate_label_ref): Likewise. (mark_jump_label_1): Likewise. (redirect_exp_1): Likewise. (rtx_renumbered_equal_p): Likewise. * lra-constraints.c (operands_match_p): Likewise. * reload.c (operands_match_p): Likewise. (find_reloads): Likewise. * reload1.c (set_label_offsets): Likewise. * reorg.c (get_branch_condition): Likewise. * rtl.c (rtx_equal_p_cb): Likewise. (rtx_equal_p): Likewise. * rtlanal.c (reg_mentioned_p): Likewise. (rtx_referenced_p): Likewise. (get_condition): Likewise. * sched-vis.c (print_value): Likewise. * varasm.c (const_hash_1): Likewise. (compare_constant): Likewise. (const_rtx_hash_1): Likewise. (output_constant_pool_1): Likewise. From-SVN: r215190
2014-09-11 22:47:39 +02:00
return reg == LABEL_REF_LABEL (in);
1991-12-01 06:13:56 +01:00
code = GET_CODE (in);
switch (code)
{
/* Compare registers by number. */
case REG:
alias.c (record_set, [...]): Use REG_P. 2004-06-15 Jerry Quinn <jlquinn@optonline.net> * alias.c (record_set, record_base_value, canon_rtx, get_addr, nonlocal_mentioned_p_1, init_alias_analysis): Use REG_P. * bt-load.c (find_btr_reference, insn_sets_btr_p, note_btr_set): Likewise. * builtins.c (expand_builtin_setjmp, expand_builtin_apply, expand_builtin_mathfn, expand_builtin_strlen, expand_builtin_memcmp, expand_builtin_strcmp, expand_builtin_strncmp, expand_builtin_frame_address): Likewise. * caller-save.c (mark_set_regs, add_stored_regs, mark_referenced_regs, insert_one_insn): Likewise. * calls.c (prepare_call_address, precompute_register_parameters, precompute_arguments, expand_call, emit_library_call_value_1): Likewise. * cfganal.c (flow_active_insn_p): Likewise. * combine.c (set_nonzero_bits_and_sign_copies, can_combine_p, combinable_i3pat, try_combine, find_split_point, COMBINE_RTX_EQUAL_P, subst, combine_simplify_rtx, simplify_if_then_else, simplify_set, make_extraction, recog_for_combine, gen_lowpart_for_combine, simplify_comparison, record_dead_and_set_regs_1, record_dead_and_set_regs, record_promoted_value, check_promoted_subreg, get_last_value_validate, get_last_value, reg_dead_at_p_1, reg_bitfield_target_p, distribute_notes, unmentioned_reg_p_1): Likewise. * conflict.c (mark_reg): Likewise. * cse.c (HASH, COST, COST_IN, approx_reg_cost_1, notreg_cost, mention_regs, insert_regs, lookup, lookup_for_remove, insert, merge_equiv_classes, flush_hash_table, invalidate, remove_invalid_refs, remove_invalid_subreg_refs, rehash_using_reg, invalidate_for_call, use_related_value, canon_hash, exp_equiv_p, cse_rtx_varies_p, canon_reg, find_best_addr, fold_rtx, equiv_constant, record_jump_cond, cse_insn, addr_affects_sp_p, invalidate_from_clobbers, cse_process_notes, cse_around_loop, cse_set_around_loop, count_reg_usage, set_live_p, cse_change_cc_mode, cse_cc_succs, cse_condition_code_reg): Likewise. * cselib.c (cselib_reg_set_mode, rtx_equal_for_cselib_p, cselib_lookup, cselib_invalidate_regno, cselib_invalidate_rtx, cselib_record_set, cselib_record_sets): Likewise. * dbxout.c (dbxout_symbol_location, dbxout_parms, dbxout_reg_parms, dbxout_block): Likewise. * df.c (df_ref_record, df_def_record_1, df_uses_record): Likewise. * dojump.c (do_jump): Likewise. * dwarf2out.c (dwarf2out_frame_debug_expr, is_pseudo_reg, is_based_loc, rtl_for_decl_location): Likewise. * emit-rtl.c (set_reg_attrs_for_parm, set_decl_rtl, set_decl_incoming_rtl, mark_user_reg): Likewise. * explow.c (copy_all_regs, copy_all_regs, memory_address, force_reg, copy_to_suggested_reg, allocate_dynamic_stack_space, probe_stack_range, hard_function_value): Likewise. * expmed.c (store_bit_field, store_fixed_bit_field, store_split_bit_field, extract_bit_field, extract_fixed_bit_field, extract_split_bit_field, expand_divmod, emit_store_flag_force): Likewise. * expr.c (convert_move, convert_modes, block_move_libcall_safe_for_call_parm, emit_group_load, use_reg, use_group_regs, emit_move_insn, emit_move_insn_1, compress_float_constant, push_block, emit_single_push_insn, emit_push_insn, get_subtarget, expand_assignment, store_expr, store_constructor, store_field, force_operand, safe_from_p, expand_expr_real_1, expand_increment, do_store_flag, do_tablejump): Likewise. * final.c (profile_function, final_scan_insn, alter_subreg, get_mem_expr_from_op, output_asm_operand_names, output_operand, only_leaf_regs_used, leaf_renumber_regs_insn): Likewise. * flow.c (verify_wide_reg_1, mark_regs_live_at_end, find_regno_partial, propagate_one_insn, init_propagate_block_info, insn_dead_p, libcall_dead_p, mark_set_1, not_reg_cond, attempt_auto_inc, find_auto_inc, mark_used_regs, count_or_remove_death_notes_bb): Likewise. * function.c (find_temp_slot_from_address, update_temp_slot_address, preserve_temp_slots, put_var_into_stack, fixup_var_refs_insn, fixup_var_refs_1, fixup_stack_1, optimize_bit_field, flush_addressof, put_addressof_into_stack, purge_addressof_1, insns_for_mem_walk, purge_single_hard_subreg_set, instantiate_decl, instantiate_virtual_regs_1, aggregate_value_p, assign_parms, promoted_input_arg, setjmp_vars_warning, setjmp_args_warning, setjmp_protect, setjmp_protect_args, fix_lexical_addr, expand_function_start, diddle_return_value, clobber_return_register, expand_function_end, keep_stack_depressed, handle_epilogue_set, update_epilogue_consts): Likewise. * genemit.c (gen_exp, gen_insn): Likewise. * genrecog.c (make_insn_sequence): Likewise. * global.c (global_conflicts, expand_preferences, mark_reg_store, mark_reg_conflicts, set_preference, reg_becomes_live, build_insn_chain, mark_reg_change): Likewise. * haifa_sched.c (CONST_BASED_ADDRESS_P, find_set_reg_weight): Likewise. * ifcvt.c (noce_try_abs, noce_get_condition, noce_process_if_block): Likewise. * integrate.c (copy_rtx_and_substitute, try_constants, subst_constants, mark_stores, allocate_initial_values): Likewise. * jump.c (reversed_comparison_code_parts, delete_prior_computation, delete_computation, rtx_renumbered_equal_p, true_regnum, reg_or_subregno): Likewise. * lcm.c (reg_dies, reg_becomes_live): Likewise. * local-alloc.c (validate_equiv_mem_from_store, validate_equiv_mem, update_equiv_regs, no_equiv, block_alloc, combine_regs, reg_is_set, wipe_dead_reg, no_conflict_p): Likewise. * loop-iv.c (simple_reg_p, simple_set_p, kill_sets, iv_get_reaching_def, iv_analyze_biv, altered_reg_used, mark_altered, simple_rhs_p, simplify_using_assignment, implies_p): Likewise. * loop.c (scan_loop, combine_movables, rtx_equal_for_loop_p, move_movables, note_set_pseudo_multiple_uses, consec_sets_invariant_p, find_single_use_in_loop, count_one_set, loop_bivs_init_find, loop_givs_rescan, check_insn_for_bivs, check_insn_for_givs, valid_initial_value_p, simplify_giv_expr, consec_sets_giv, loop_regs_update, check_dbra_loop, maybe_eliminate_biv, maybe_eliminate_biv_1, record_initial, update_reg_last_use, canonicalize_condition, loop_regs_scan, load_mems, try_copy_prop, try_swap_copy_prop): Likewise. * optabs.c (expand_binop, expand_vector_binop, expand_vector_unop, expand_abs, emit_no_conflict_block, emit_libcall_block, expand_float): Likewise. * postreload.c (reload_cse_simplify, reload_cse_simplify_set, reload_cse_simplify_operands, reload_combine, reload_combine_note_store, reload_combine_note_use, reload_cse_move2add, move2add_note_store): Likewise. * print-rtl.c (print_rtx): Likewise. * ra-build.c (copy_insn_p, remember_move, init_one_web_common, contains_pseudo, handle_asm_insn): Likewise. * ra-debug.c (ra_print_rtx_object, dump_constraints, dump_static_insn_cost): Likewise. * ra-rewrite.c (slots_overlap_p, emit_colors, remove_suspicious_death_notes): Likewise. * recog.c (validate_replace_rtx_1, find_single_use_1, find_single_use, register_operand, scratch_operand, nonmemory_operand, constrain_operands): Likewise. * reg-stack (check_asm_stack_operands, remove_regno_note, emit_swap_insn, swap_rtx_condition, subst_stack_regs_pat, subst_asm_stack_regs): Likewise. * regclass.c (scan_one_insn, record_reg_classes, copy_cost, record_address_regs, reg_scan_mark_refs): Likewise. * regmove.c (discover_flags_reg, replacement_quality, copy_src_to_dest, reg_is_remote_constant_p, regmove_optimize, fixup_match_1): Likewise. * regrename.c (note_sets, clear_dead_regs, build_def_use, kill_value, kill_set_value, copyprop_hardreg_forward_1): Likewise. * reload.c (MATCHES, push_secondary_reload, find_reusable_reload, reload_inner_reg_of_subreg, can_reload_into, push_reload, combine_reloads, find_dummy_reload, hard_reg_set_here_p, operands_match_p, decompose, find_reloads, find_reloads_toplev, find_reloads_address, subst_indexed_address, find_reloads_address_1, find_reloads_subreg_address, find_replacement, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p, find_equiv_reg, regno_clobbered_p): Likewise. * reload1.c (replace_pseudos_in, reload, calculate_needs_all_insns, find_reg, delete_dead_insn, alter_reg, eliminate_regs, elimination_effects, eliminate_regs_in_insn, scan_paradoxical_subregs, forget_old_reloads_1, reload_reg_free_for_value_p, choose_reload_regs, emit_input_reload_insns, emit_output_reload_insns, do_input_reload, do_output_reload, emit_reload_insns, gen_reload, delete_address_reloads_1, inc_for_reload): Likewise. * reorg.c (update_reg_dead_notes, fix_reg_dead_note, update_reg_unused_notes, fill_slots_from_thread): Likewise. * resource.c (update_live_status, mark_referenced_resources, mark_set_resources, mark_target_live_regs): Likewise. * rtlanal.c (nonzero_address_p, get_jump_table_offset, global_reg_mentioned_p_1, reg_mentioned_p, reg_referenced_p, reg_set_p, set_noop_p, find_last_value, refers_to_regno_p, note_stores, dead_or_set_p, dead_or_set_regno_p, find_regno_note, find_reg_fusage, find_regno_fusage, replace_regs, regno_use_in, parms_set, find_first_parameter_load, keep_with_call_p, hoist_test_store, hoist_update_store, address_cost, nonzero_bits1, num_sign_bit_copies1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sched-deps.c (deps_may_trap_p, sched_analyze_1, sched_analyze_insn, sched_analyze): Likewise. * sched-rgn.c (check_live_1, update_live_1, sets_likely_spilled_1): Likewise. * sdbout.c (sdbout_symbol, sdbout_parms, sdbout_reg_parms): Likewise. * simplify-rtx.c (simplify_replace_rtx, simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_subreg): Likewise. * stmt.c (decl_conflicts_with_clobbers_p, expand_asm_operands, expand_end_stmt_expr, expand_return, expand_decl, expand_anon_union_decl): Likewise. * unroll.c (precondition_loop_p, calculate_giv_inc, copy_loop_body, find_splittable_regs, find_splittable_givs, find_common_reg_term, loop_iterations): Likewise. * var-tracking.c (variable_union, variable_part_different_p, variable_different_p, count_uses, add_uses, add_stores, compute_bb_dataflow, set_variable_part, delete_variable_part, emit_notes_in_bb, vt_get_decl_and_offset, vt_add_function_parameters): Likewise. * varasm.c (assemble_variable): Likewise. From-SVN: r83195
2004-06-15 20:02:40 +02:00
return REG_P (reg) && REGNO (in) == REGNO (reg);
1991-12-01 06:13:56 +01:00
/* These codes have no constituent expressions
and are unique. */
case SCRATCH:
case CC0:
case PC:
return 0;
alias.c (rtx_equal_for_memref_p): Convert constant cases. 2012-08-23 Kenneth Zadeck <zadeck@naturalbridge.com> * alias.c (rtx_equal_for_memref_p): Convert constant cases. * combine.c (find_single_use_1, mark_used_regs_combine): Convert to CASE_CONST_ANY. * cse.c (exp_equiv_p, canon_reg, fold_rtx, cse_process_notes_1, count_reg_usage): Convert constant cases. * cselib.c (cselib_expand_value_rtx_1): Convert to CASE_CONST_ANY. (cselib_subst_to_values): Convert constant cases. * df-scan.c (df_uses_record): Ditto. * dse.c (const_or_frame_p): Convert case statements to explicit if-then-else using mode classes. * emit-rtl.c (verify_rtx_sharing, copy_insn_1): Convert constant cases. * explow.c (convert_memory_address_addr_space): Ditto. * gcse.c (want_to_gcse_p, oprs_unchanged_p, compute_transp): Ditto. * genattrtab.c (attr_copy_rtx, clear_struct_flag): Ditto. * ira.c (equiv_init_varies_p, contains_replace_regs, memref_referenced_p, rtx_moveable_p): Ditto. * jump.c (mark_jump_label_1): Remove constant cases. (rtx_renumbered_equal_p): Convert to CASE_CONST_UNIQUE. * loop-invariant.c (check_maybe_invariant, hash_invariant_expr_1, invariant_expr_equal_p): Convert to CASE_CONST_ANY. * postreload-gcse.c (oprs_unchanged_p): Convert constant cases. * reginfo.c (reg_scan_mark_refs): Ditto. * regrename.c (scan_rtx): Ditto. * reload1.c (eliminate_regs_1, elimination_effects, scan_paradoxical_subregs): Ditto. * reload.c (operands_match_p, subst_reg_equivs): Ditto. * resource.c (mark_referenced_resources, mark_set_resources): Ditto. * rtlanal.c (rtx_unstable_p, rtx_varies_p, count_occurrences) (reg_mentioned_p, modified_between_p, modified_in_p) (volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, inequality_comparisons_p, computed_jump_p_1): Ditto. * rtl.c (copy_rtx, rtx_equal_p_cb, rtx_equal_p): Ditto. * sched-deps.c (sched_analyze_2): Ditto. * valtrack.c (cleanup_auto_inc_dec): Ditto. * rtl.h: (CASE_CONST_SCALAR_INT, CASE_CONST_UNIQUE, CASE_CONST_ANY): New macros. From-SVN: r190627
2012-08-23 20:46:18 +02:00
CASE_CONST_ANY:
1991-12-01 06:13:56 +01:00
/* These are kept unique for a given value. */
return 0;
default:
break;
1991-12-01 06:13:56 +01:00
}
if (GET_CODE (reg) == code && rtx_equal_p (reg, in))
return 1;
fmt = GET_RTX_FORMAT (code);
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
{
if (fmt[i] == 'E')
{
alias.c: Remove uses of "register" specifier in declarations of arguments and local... 2001-10-10 Stan Shebs <shebs@apple.com> * alias.c: Remove uses of "register" specifier in declarations of arguments and local variables. * c-common.c: Ditto. * c-convert.c: Ditto. * c-decl.c: Ditto. * c-format.c: Ditto. * c-semantics.c: Ditto. * c-typeck.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfgbuild.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * combine.c: Ditto. * convert.c: Ditto. * cppexp.c: Ditto. * cppfiles.c: Ditto. * cse.c: Ditto. * dbxout.c: Ditto. * defaults.h: Ditto. * df.c: Ditto. * dwarf2out.c: Ditto. * dwarfout.c: Ditto. * emit-rtl.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fix-header.c: Ditto. * floatlib.c: Ditto. * flow.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * gcc.c: Ditto. * gcse.c: Ditto. * gen-protos.c: Ditto. * genattrtab.c: Ditto. * gencheck.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * gengenrtl.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * gensupport.c: Ditto. * global.c: Ditto. * gmon.c: Ditto. * graph.c: Ditto. * haifa-sched.c: Ditto. * hard-reg-set.h: Ditto. * hash.c: Ditto. * integrate.c: Ditto. * jump.c: Ditto. * lists.c: Ditto. * local-alloc.c: Ditto. * loop.c: Ditto. * mips-tdump.c: Ditto. * mips-tfile.c: Ditto. * optabs.c: Ditto. * prefix.c: Ditto. * print-rtl.c: Ditto. * read-rtl.c: Ditto. * real.c: Ditto. * recog.c: Ditto. * reg-stack.c: Ditto. * regclass.c: Ditto. * regmove.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtl.c: Ditto. * rtlanal.c: Ditto. * scan.c: Ditto. * sched-deps.c: Ditto. * sched-rgn.c: Ditto. * sdbout.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tradcif.y: Ditto. * tradcpp.c: Ditto. * tree.c: Ditto. * unroll.c: Ditto. * varasm.c: Ditto. * xcoffout.c: Ditto. From-SVN: r46173
2001-10-11 05:16:15 +02:00
int j;
1991-12-01 06:13:56 +01:00
for (j = XVECLEN (in, i) - 1; j >= 0; j--)
if (reg_mentioned_p (reg, XVECEXP (in, i, j)))
return 1;
}
else if (fmt[i] == 'e'
&& reg_mentioned_p (reg, XEXP (in, i)))
return 1;
}
return 0;
}
/* Return 1 if in between BEG and END, exclusive of BEG and END, there is
no CODE_LABEL insn. */
int
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 23:29:38 +02:00
no_labels_between_p (const rtx_insn *beg, const rtx_insn *end)
1991-12-01 06:13:56 +01:00
{
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 23:29:38 +02:00
rtx_insn *p;
if (beg == end)
return 0;
1991-12-01 06:13:56 +01:00
for (p = NEXT_INSN (beg); p != end; p = NEXT_INSN (p))
alias.c (nonlocal_mentioned_p, [...]): Use, LABEL_P, JUMP_P, CALL_P, NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P. 2004-07-08 Jerry Quinn <jlquinn@optonline.net> * alias.c (nonlocal_mentioned_p, nonlocal_referenced_p, nonlocal_set_p, init_alias_analysis): Use, LABEL_P, JUMP_P, CALL_P, NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P. * bb-reorder.c (mark_bb_for_unlikely_executed_section, add_labels_and_missing_jumps, find_jump_block, fix_crossing_unconditional_branches, add_reg_crossing_jump_notes): Likewise. * bt-load.c (btr_referenced_p, compute_defs_uses_and_gen, link_btr_uses, move_btr_def): Likewise. * builtins.c (expand_builtin_longjmp, expand_builtin_nonlocal_goto, expand_builtin_expect_jump): Likewise. * caller-save.c (save_call_clobbered_regs, insert_one_insn): Likewise. * calls.c (expand_call, emit_library_call_value_1): Likewise. * cfganal.c (forwarder_block_p): Likewise. * cfgbuild.c (inside_basic_block_p, count_basic_blocks, make_label_edge, rtl_make_eh_edge, make_edges, find_basic_blocks_1, find_bb_boundaries): Likewise. * cfgcleanup.c (try_simplify_condjump, try_forward_edges, merge_blocks_move_predecessor_nojumps, merge_blocks_move_successor_nojumps, insns_match_p, flow_find_cross_jump, outgoing_edges_match, try_crossjump_to_edge, try_optimize_cfg): Likewise. * cfgexpand.c (expand_block, construct_exit_block): Likewise. * cfglayout.c (skip_insns_after_block, label_for_bb, record_effective_endpoints, insn_locators_initialize, fixup_reorder_chain, update_unlikely_executed_notes): Likewise. * cfgmainloop.c (create_loop_notes): Likewise. * cfgrtl.c (delete_insn, delete_insn_chain, create_basic_block_structure, rtl_delete_block, free_bb_for_insn, update_bb_for_insn, rtl_merge_blocks, rtl_can_merge_blocks, block_label, try_redirect_by_replacing_jump, last_loop_beg_note, redirect_branch_edge, force_nonfallthru_and_redirect, rtl_tidy_fallthru_edge, back_edge_of_syntactic_loop_p, rtl_split_edge, commit_one_edge_insertion, print_rtl_with_bb, update_br_prob_note, rtl_verify_flow_info_1, rtl_verify_flow_info, purge_dead_edges, cfg_layout_redirect_edge_and_branch, cfg_layout_delete_block, cfg_layout_can_merge_blocks_p, cfg_layout_merge_blocks, rtl_block_ends_with_call_p, need_fake_edge_p, rtl_flow_call_edges_add): Likewise. * combine.c (combine_instructions, can_combine_p, try_combine, find_split_point, record_dead_and_set_regs, reg_dead_at_p, distribute_notes, distribute_links, insn_cuid): Likewise. * cse.c (fold_rtx, cse_insn, cse_around_loop, invalidate_skipped_block, cse_set_around_loop, cse_end_of_basic_block, cse_main, cse_basic_block, cse_condition_code_reg): Likewise. * cselib.c (cselib_process_insn): Likewise. * ddg.c (create_ddg): Likewise. * df.c (df_insn_refs_record, df_bb_rd_local_compute, df_insns_modify): Likewise. * dwarf2out.c (dwarf2out_stack_adjust, dwarf2out_frame_debug, gen_label_die, dwarf2out_var_location): Likewise. * emit-rtl.c (get_first_nonnote_insn, get_last_nonnote_insn, next_insn, previous_insn, next_nonnote_insn, prev_nonnote_insn, last_call_insn, active_insn_p, next_label, prev_label, link_cc0_insns, next_cc0_user, try_split, add_insn_after, add_insn_before, remove_insn, add_function_usage_to, reorder_insns, find_line_note, remove_unnecessary_notes, emit_insn_after_1, classify_insn): Likewise. * except.c (convert_from_eh_region_ranges_1, emit_to_new_bb_before, connect_post_landing_pads, sjlj_mark_call_sites, sjlj_emit_function_enter, sjlj_emit_function_exit, reachable_handlers, can_throw_internal, can_throw_external, set_nothrow_function_flags, convert_to_eh_region_ranges): Likewise. * explow.c (optimize_save_area_alloca): Likewise. * expr.c (expand_expr_real): Likewise. * final.c (insn_current_reference_address, compute_alignments, shorten_branches, final, scan_ahead_for_unlikely_executed_note, final_scan_insn, output_asm_label, leaf_function_p): Likewise. * flow.c (first_insn_after_basic_block_note, delete_dead_jumptables, propagate_block_delete_insn, propagate_one_insn, init_propagate_block_info, propagate_block, libcall_dead_p, mark_set_1, attempt_auto_inc, find_auto_inc, try_pre_increment): Likewise. * function.c (instantiate_virtual_regs, reorder_blocks_1, expand_function_start, expand_function_end, contains, thread_prologue_and_epilogue_insns, reposition_prologue_and_epilogue_notes): Likewise. * gcse.c (constprop_register, bypass_conditional_jumps, insert_insn_end_bb, gcse_after_reload): Likewise. * genemit.c (gen_expand, gen_split): Likewise. * genpeep.c (gen_peephole, main): Likewise. * global.c (build_insn_chain): Likewise. * graph.c (node_data, print_rtl_graph_with_bb): Likewise. * haifa-sched.c (unlink_other_notes, unlink_line_notes, get_block_head_tail, no_real_insns_p, rm_line_notes, save_line_notes, restore_line_notes, rm_redundant_line_notes, rm_other_notes, ok_for_early_queue_removal, set_priorities, sched_init): Likewise. * ifcvt.c (count_bb_insns, first_active_insn, last_active_insn, cond_exec_process_insns, end_ifcvt_sequence, noce_process_if_block, merge_if_block, block_jumps_and_fallthru_p, find_if_block, dead_or_predicable): Likewise. * integrate.c (try_constants): Likewise. * jump.c (rebuild_jump_labels, cleanup_barriers, purge_line_number_notes, init_label_info, mark_all_labels, squeeze_notes, get_label_before, get_label_after, reversed_comparison_code_parts, simplejump_p, pc_set, returnjump_p, onlyjump_p, follow_jumps, mark_jump_label, delete_barrier, delete_prior_computation, delete_computation, delete_related_insns, delete_for_peephole, redirect_jump): Likewise. * lcm.c (optimize_mode_switching): Likewise. * local-alloc.c (validate_equiv_mem, update_equiv_regs, block_alloc): Likewise. * loop-doloop.c (doloop_valid_p, doloop_optimize): Likewise. * loop-invariant.c (find_exits, find_invariants_bb): Likewise. * loop-iv.c (simplify_using_assignment): Likewise. * loop.c (compute_luids, loop_optimize, scan_loop, libcall_other_reg, libcall_benefit, skip_consec_insns, move_movables, prescan_loop, find_and_verify_loops, labels_in_range_p, for_each_insn_in_loop, loop_bivs_init_find, strength_reduce, check_insn_for_bivs, check_insn_for_givs, check_final_value, update_giv_derive, basic_induction_var, product_cheap_p, check_dbra_loop, loop_insn_first_p, last_use_this_basic_block, canonicalize_condition, get_condition, loop_regs_scan, load_mems, try_copy_prop, LOOP_BLOCK_NUM, loop_dump_aux): Likewise. * modulo-sched.c (doloop_register_get, find_line_note, sms_schedule, sms_schedule_by_order): Likewise. * optabs.c (emit_no_conflict_block, emit_libcall_block): Likewise. * postreload.c (reload_cse_simplify_operands, reload_combine, reload_cse_move2add): Likewise. * predict.c (can_predict_insn_p, estimate_probability, expected_value_to_br_prob, process_note_predictions): Likewise. * print-rtl.c (print_rtx, print_rtl, print_rtl_single): Likewise. * profile.c (branch_prob): Likewise. * ra-build.c (live_out_1, livethrough_conflicts_bb, detect_webs_set_in_cond_jump): Likewise. * ra-debug.c (ra_print_rtx_object, ra_debug_insns, ra_print_rtl_with_bb): Likewise. * ra-rewrite.c (insert_stores, rewrite_program2): Likewise. * recog.c (next_insn_tests_no_inequality, find_single_use, split_all_insns, peephole2_optimize, if_test_bypass_p): Likewise. * reg-stack.c (next_flags_user, record_label_references, emit_swap_insn, swap_rtx_condition, subst_stack_regs, compensate_edge, convert_regs_1): Likewise. * regclass.c (scan_one_insn): Likewise. * regmove.c (optimize_reg_copy_1, optimize_reg_copy_2, fixup_match_2, regmove_optimize, fixup_match_1, single_set_for_csa, combine_stack_adjustments_for_block): Likewise. * regrename.c (build_def_use, copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads, find_reloads_address_1, subst_reloads, find_equiv_reg): Likewise. * reload1.c (reload, calculate_needs_all_insns, set_label_offsets, reload_as_needed, emit_input_reload_insns, do_output_reload, delete_output_reload, delete_address_reloads_1, fixup_abnormal_edges): Likewise. * reorg.c (find_end_label, emit_delay_sequence, delete_from_delay_slot, delete_scheduled_jump, optimize_skip, get_jump_flags, rare_destination, mostly_true_jump, try_merge_delay_insns, redundant_insn, own_thread_p, fill_simple_delay_slots, fill_slots_from_thread, fill_eager_delay_slots, relax_delay_slots, make_return_insns, dbr_schedule): Likewise. * resource.c (find_basic_block, next_insn_no_annul, find_dead_or_set_registers, mark_target_live_regs): Likewise. * rtl.h (RTX_PREV): Likewise. * rtlanal.c (global_reg_mentioned_p, no_labels_between_p, no_jumps_between_p, reg_used_between_p, reg_referenced_between_p, reg_set_p, find_last_value, dead_or_set_regno_p, find_reg_fusage, find_regno_fusage, pure_call_p, replace_label, rtx_referenced_p_1, tablejump_p, computed_jump_p, insns_safe_to_move_p, find_first_parameter_load, can_hoist_insn_p): Likewise. * sched-deps.c (get_condition, add_dependence, sched_analyze_2, sched_analyze_insn, sched_analyze, add_forward_dependence): Likewise. * sched-ebb.c (fix_basic_block_boundaries, add_deps_for_risky_insns, schedule_ebbs): Likewise. * sched-rgn.c (is_cfg_nonregular, find_conditional_protection, is_conditionally_protected, can_schedule_ready_p, add_branch_dependences, debug_dependencies): Likewise. * stmt.c (emit_nop, expand_start_case, emit_jump_if_reachable): Likewise. * unroll.c (unroll_loop, copy_loop_body, back_branch_in_range_p, reg_dead_after_loop, loop_find_equiv_value, loop_iterations, set_dominates_use, ujump_to_loop_cont): Likewise. * var-tracking.c (prologue_stack_adjust, vt_initialize): Likewise. * varasm.c (output_constant_pool_1): Likewise. From-SVN: r84341
2004-07-09 05:29:35 +02:00
if (LABEL_P (p))
1991-12-01 06:13:56 +01:00
return 0;
return 1;
}
/* Nonzero if register REG is used in an insn between
FROM_INSN and TO_INSN (exclusive of those two). */
int
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 23:29:38 +02:00
reg_used_between_p (const_rtx reg, const rtx_insn *from_insn,
const rtx_insn *to_insn)
1991-12-01 06:13:56 +01:00
{
rtx_insn *insn;
1991-12-01 06:13:56 +01:00
if (from_insn == to_insn)
return 0;
for (insn = NEXT_INSN (from_insn); insn != to_insn; insn = NEXT_INSN (insn))
invoke.texi (-fvar-tracking-assignments): New. gcc/ChangeLog: * doc/invoke.texi (-fvar-tracking-assignments): New. (-fvar-tracking-assignments-toggle): New. (-fdump-final-insns=file): Mark filename as optional. (--param min-nondebug-insn-uid): New. (-gdwarf-@{version}): Mention version 4. * opts.c (common_handle_option): Accept it. * tree-vrp.c (find_assert_locations_1): Skip debug stmts. * regrename.c (regrename_optimize): Drop last. Don't count debug insns as uses. Don't reject change because of debug insn. (do_replace): Reject DEBUG_INSN as chain starter. Take base_regno from the chain starter, and check for inexact matches in DEBUG_INSNS. (scan_rtx_reg): Accept inexact matches in DEBUG_INSNs. (build_def_use): Simplify and fix the marking of DEBUG_INSNs. * sched-ebb.c (schedule_ebbs): Skip boundary debug insns. * fwprop.c (forward_propagate_and_simplify): ...into debug insns. * doc/gimple.texi (is_gimple_debug): New. (gimple_debug_bind_p): New. (is_gimple_call, gimple_assign_cast_p): End sentence with period. * doc/install.texi (bootstrap-debug): More details. (bootstrap-debug-big, bootstrap-debug-lean): Document. (bootstrap-debug-lib): More details. (bootstrap-debug-ckovw): Update. (bootstrap-time): New. * tree-into-ssa.c (mark_def_sites): Skip debug stmts. (insert_phi_nodes_for): Insert debug stmts. (rewrite_stmt): Take iterator. Insert debug stmts. (rewrite_enter_block): Adjust. (maybe_replace_use_in_debug_stmt): New. (rewrite_update_stmt): Use it. (mark_use_interesting): Return early for debug stmts. * tree-ssa-loop-im.c (rewrite_bittest): Propagate DEFs into debug stmts before replacing stmt. (move_computations_stmt): Likewise. * ira-conflicts.c (add_copies): Skip debug insns. * regstat.c (regstat_init_n_sets_and_refs): Discount debug insns. (regstat_bb_compute_ri): Skip debug insns. * tree-ssa-threadupdate.c (redirection_block_p): Skip debug stmts. * tree-ssa-loop-manip.c (find_uses_to_rename_stmt, check_loop_closed_ssa_stmt): Skip debug stmts. * tree-tailcall.c (find_tail_calls): Likewise. * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Likewise. * tree.h (MAY_HAVE_DEBUG_STMTS): New. (build_var_debug_value_stat): Declare. (build_var_debug_value): Define. (target_for_debug_bind): Declare. * reload.c (find_equiv_reg): Skip debug insns. * rtlanal.c (reg_used_between_p): Skip debug insns. (side_effects_p): Likewise. (canonicalize_condition): Likewise. * ddg.c (create_ddg_dep_from_intra_loop_link): Check that non-debug insns never depend on debug insns. (create_ddg_dep_no_link): Likewise. (add_cross_iteration_register_deps): Use ANTI_DEP for debug insns. Don't add inter-loop dependencies for debug insns. (build_intra_loop_deps): Likewise. (create_ddg): Count debug insns. * ddg.h (struct ddg::num_debug): New. (num_backargs): Pair up with previous int field. * diagnostic.c (diagnostic_report_diagnostic): Skip notes on -fcompare-debug-second. * final.c (get_attr_length_1): Skip debug insns. (rest_of_clean-state): Don't dump CFA_RESTORE_STATE. * gcc.c (invoke_as): Call compare-debug-dump-opt. (driver_self_specs): Map -fdump-final-insns to -fdump-final-insns=.. (get_local_tick): New. (compare_debug_dump_opt_spec_function): Test for . argument and compute output name. Compute temp output spec without flag name. Compute -frandom-seed. (OPT): Undef after use. * cfgloopanal.c (num_loop_insns): Skip debug insns. (average_num_loop_insns): Likewise. * params.h (MIN_NONDEBUG_INSN_UID): New. * gimple.def (GIMPLE_DEBUG): New. * ipa-reference.c (scan_stmt_for_static_refs): Skip debug stmts. * auto-inc-dec.c (merge_in_block): Skip debug insns. (merge_in_block): Fix whitespace. * toplev.c (flag_var_tracking): Update comment. (flag_var_tracking_assignments): New. (flag_var_tracking_assignments_toggle): New. (process_options): Don't open final insns dump file if we're not going to write to it. Compute defaults for var_tracking. * df-scan.c (df_insn_rescan_debug_internal): New. (df_uses_record): Handle debug insns. * haifa-sched.c (ready): Initialize n_debug. (contributes_to_priority): Skip debug insns. (dep_list_size): New. (priority): Use it. (rank_for_schedule): Likewise. Schedule debug insns as soon as they're ready. Disregard previous debug insns to make decisions. (queue_insn): Never queue debug insns. (ready_add, ready_remove_first, ready_remove): Count debug insns. (schedule_insn): Don't reject debug insns because of issue rate. (get_ebb_head_tail, no_real_insns_p): Skip boundary debug insns. (queue_to_ready): Skip and discount debug insns. (choose_ready): Let debug insns through. (schedule_block): Check boundary debug insns. Discount debug insns, schedule them early. Adjust whitespace. (set_priorities): Check for boundary debug insns. (add_jump_dependencies): Use dep_list_size. (prev_non_location_insn): New. (check_cfg): Use it. * tree-ssa-loop-ivopts.c (find-interesting_users): Skip debug stmts. (remove_unused_ivs): Reset debug stmts. * modulo-sched.c (const_iteration_count): Skip debug insns. (res_MII): Discount debug insns. (loop_single_full_bb_p): Skip debug insns. (sms_schedule): Likewise. (sms_schedule_by_order): Likewise. (ps_has_conflicts): Likewise. * caller-save.c (refmarker_fn): New. (save_call_clobbered_regs): Replace regs with saved mem in debug insns. (mark_referenced_regs): Take pointer, mark and arg. Adjust. Call refmarker_fn mark for hardregnos. (mark_reg_as_referenced): New. (replace_reg_with_saved_mem): New. * ipa-pure-const.c (check_stmt): Skip debug stmts. * cse.c (cse_insn): Canonicalize debug insns. Skip them when searching back. (cse_extended_basic_block): Skip debug insns. (count_reg_usage): Likewise. (is_dead_reg): New, split out of... (set_live_p): ... here. (insn_live_p): Use it for debug insns. * tree-stdarg.c (check_all_va_list_escapes): Skip debug stmts. (execute_optimize_stdarg): Likewise. * tree-ssa-dom.c (propagate_rhs_into_lhs): Likewise. * tree-ssa-propagate.c (substitute_and_fold): Don't regard changes in debug stmts as changes. * sel-sched.c (moving_insn_creates_bookkeeping_block_p): New. (moveup_expr): Don't move across debug insns. Don't move debug insn if it would create a bookkeeping block. (moveup_expr_cached): Don't use cache for debug insns that are heads of blocks. (compute_av_set_inside_bb): Skip debug insns. (sel_rank_for_schedule): Schedule debug insns first. Remove dead code. (block_valid_for_bookkeeping_p); Support lax searches. (create_block_for_bookkeeping): Adjust block numbers when encountering debug-only blocks. (find_place_for_bookkeeping): Deal with debug-only blocks. (generate_bookkeeping_insn): Accept no place to insert. (remove_temp_moveop_nops): New argument full_tidying. (prepare_place_to_insert): Deal with debug insns. (advance_state_on_fence): Debug insns don't start cycles. (update_boundaries): Take fence as argument. Deal with debug insns. (schedule_expr_on_boundary): No full_tidying on debug insns. (fill_insns): Deal with debug insns. (track_scheduled_insns_and_blocks): Don't count debug insns. (need_nop_to_preserve_insn_bb): New, split out of... (remove_insn_from_stream): ... this. (fur_orig_expr_not_found): Skip debug insns. * rtl.def (VALUE): Move up. (DEBUG_INSN): New. * tree-ssa-sink.c (all_immediate_uses_same_place): Skip debug stmts. (nearest_common_dominator_of_uses): Take debug_stmts argument. Set it if debug stmts are found. (statement_sink_location): Skip debug stmts. Propagate moving defs into debug stmts. * ifcvt.c (first_active_insn): Skip debug insns. (last_active_insns): Likewise. (cond_exec_process_insns): Likewise. (noce_process_if_block): Likewise. (check_cond_move_block): Likewise. (cond_move_convert_if_block): Likewise. (block_jumps_and_fallthru_p): Likewise. (dead_or_predicable): Likewise. * dwarf2out.c (debug_str_hash_forced): New. (find_AT_string): Add comment. (gen_label_for_indirect_string): New. (get_debug_string_label): New. (AT_string_form): Use it. (mem_loc_descriptor): Handle non-TLS symbols. Handle MINUS , DIV, MOD, AND, IOR, XOR, NOT, ABS, NEG, and CONST_STRING. Accept but discard COMPARE, IF_THEN_ELSE, ROTATE, ROTATERT, TRUNCATE and several operations that cannot be represented with DWARF opcodes. (loc_descriptor): Ignore SIGN_EXTEND and ZERO_EXTEND. Require dwarf_version 4 for DW_OP_implicit_value and DW_OP_stack_value. (dwarf2out_var_location): Take during-call mark into account. (output_indirect_string): Update comment. Output if there are label and references. (prune_indirect_string): New. (prune_unused_types): Call it if debug_str_hash_forced. More in dwarf2out.c, from Jakub Jelinek <jakub@redhat.com>: (dw_long_long_const): Remove. (struct dw_val_struct): Change val_long_long type to rtx. (print_die, attr_checksum, same_dw_val_p, loc_descriptor): Adjust for val_long_long change to CONST_DOUBLE rtx from a long hi/lo pair. (output_die): Likewise. Use HOST_BITS_PER_WIDE_INT size of each component instead of HOST_BITS_PER_LONG. (output_loc_operands): Likewise. For const8* assert HOST_BITS_PER_WIDE_INT rather than HOST_BITS_PER_LONG is >= 64. (output_loc_operands_raw): For const8* assert HOST_BITS_PER_WIDE_INT rather than HOST_BITS_PER_LONG is >= 64. (add_AT_long_long): Remove val_hi and val_lo arguments, add val_const_double. (size_of_die): Use HOST_BITS_PER_WIDE_INT size multiplier instead of HOST_BITS_PER_LONG for dw_val_class_long_long. (add_const_value_attribute): Adjust add_AT_long_long caller. Don't handle TLS SYMBOL_REFs. If CONST wraps a constant, tail recurse. (dwarf_stack_op_name): Handle DW_OP_implicit_value and DW_OP_stack_value. (size_of_loc_descr, output_loc_operands, output_loc_operands_raw): Handle DW_OP_implicit_value. (extract_int): Move prototype earlier. (mem_loc_descriptor): For SUBREG punt if inner mode size is wider than DWARF2_ADDR_SIZE. Handle SIGN_EXTEND and ZERO_EXTEND by DW_OP_shl and DW_OP_shr{a,}. Handle EQ, NE, GT, GE, LT, LE, GTU, GEU, LTU, LEU, SMIN, SMAX, UMIN, UMAX, SIGN_EXTRACT, ZERO_EXTRACT. (loc_descriptor): Compare mode size with DWARF2_ADDR_SIZE instead of Pmode size. (loc_descriptor): Add MODE argument. Handle CONST_INT, CONST_DOUBLE, CONST_VECTOR, CONST, LABEL_REF and SYMBOL_REF if mode != VOIDmode, attempt to handle other expressions. Don't handle TLS SYMBOL_REFs. (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor_from_tree_1): Adjust loc_descriptor callers. (add_location_or_const_value_attribute): Likewise. For single location loc_lists attempt to use add_const_value_attribute for constant decls. Add DW_AT_const_value even if NOTE_VAR_LOCATION is VAR_LOCATION with CONSTANT_P or CONST_STRING in its expression. * cfgbuild.c (inside_basic_block_p): Handle debug insns. (control_flow_insn_p): Likewise. * tree-parloops.c (eliminate_local_variables_stmt): Handle debug stmt. (separate_decls_in_region_debug_bind): New. (separate_decls_in_region): Process debug bind stmts afterwards. * recog.c (verify_changes): Handle debug insns. (extract_insn): Likewise. (peephole2_optimize): Skip debug insns. * dse.c (scan_insn): Skip debug insns. * sel-sched-ir.c (return_nop_to_pool): Take full_tidying argument. Pass it on. (setup_id_for_insn): Handle debug insns. (maybe_tidy_empty_bb): Adjust whitespace. (tidy_control_flow): Skip debug insns. (sel_remove_insn): Adjust for debug insns. (sel_estimate_number_of_insns): Skip debug insns. (create_insn_rtx_from_pattern): Handle debug insns. (create_copy_of_insn_rtx): Likewise. * sel-sched-.h (sel_bb_end): Declare. (sel_bb_empty_or_nop_p): New. (get_all_loop_exits): Use it. (_eligible_successor_edge_p): Likewise. (return_nop_to_pool): Adjust. * tree-eh.c (tre_empty_eh_handler_p): Skip debug stmts. * ira-lives.c (process_bb_node_lives): Skip debug insns. * gimple-pretty-print.c (dump_gimple_debug): New. (dump_gimple_stmt): Use it. (dump_bb_header): Skip gimple debug stmts. * regmove.c (optimize_reg_copy_1): Discount debug insns. (fixup_match_2): Likewise. (regmove_backward_pass): Likewise. Simplify combined replacement. Handle debug insns. * function.c (instantiate_virtual_regs): Handle debug insns. * function.h (struct emit_status): Add x_cur_debug_insn_uid. * print-rtl.h: Include cselib.h. (print_rtx): Print VALUEs. Split out and recurse for VAR_LOCATIONs. * df.h (df_inns_rescan_debug_internal): Declare. * gcse.c (alloc_hash_table): Estimate n_insns. (cprop_insn): Don't regard debug insns as changes. (bypass_conditional_jumps): Skip debug insns. (one_pre_gcse_pass): Adjust. (one_code_hoisting_pass): Likewise. (compute_ld_motion_mems): Skip debug insns. (one_cprop_pass): Adjust. * tree-if-conv.c (tree_if_convert_stmt): Reset debug stmts. (if_convertible_stmt_p): Handle debug stmts. * init-regs.c (initialize_uninitialized_regs): Skip debug insns. * tree-vect-loop.c (vect_is_simple_reduction): Skip debug stmts. * ira-build.c (create_bb_allocnos): Skip debug insns. * tree-flow-inline.h (has_zero_uses): Discount debug stmts. (has_single_use): Likewise. (single_imm_use): Likewise. (num_imm_uses): Likewise. * tree-ssa-phiopt.c (empty_block_p): Skip debug stmts. * tree-ssa-coalesce.c (build_ssa_conflict_graph): Skip debug stmts. (create_outofssa_var_map): Likewise. * lower-subreg.c (adjust_decomposed_uses): New. (resolve_debug): New. (decompose_multiword_subregs): Use it. * tree-dfa.c (find_referenced_vars): Skip debug stmts. * emit-rtl.c: Include params.h. (cur_debug_insn_uid): Define. (set_new_first_and_last_insn): Set cur_debug_insn_uid too. (copy_rtx_if_shared_1): Handle debug insns. (reset_used_flags): Likewise. (set_used_flags): LIkewise. (get_max_insn_count): New. (next_nondebug_insn): New. (prev_nondebug_insn): New. (make_debug_insn_raw): New. (emit_insn_before_noloc): Handle debug insns. (emit_jump_insn_before_noloc): Likewise. (emit_call_insn_before_noloc): Likewise. (emit_debug_insn_before_noloc): New. (emit_insn_after_noloc): Handle debug insns. (emit_jump_insn_after_noloc): Likewise. (emit_call_insn_after_noloc): Likewise. (emit_debug_insn_after_noloc): Likewise. (emit_insn_after): Take loc from earlier non-debug insn. (emit_jump_insn_after): Likewise. (emit_call_insn_after): Likewise. (emit_debug_insn_after_setloc): New. (emit_debug_insn_after): New. (emit_insn_before): Take loc from later non-debug insn. (emit_jump_insn_before): Likewise. (emit_call_insn_before): Likewise. (emit_debug_insn_before_setloc): New. (emit_debug_insn_before): New. (emit_insn): Handle debug insns. (emit_debug_insn): New. (emit_jump_insn): Handle debug insns. (emit_call_insn): Likewise. (emit): Likewise. (init_emit): Take min-nondebug-insn-uid into account. Initialize cur_debug_insn_uid. (emit_copy_of_insn_after): Handle debug insns. * cfgexpand.c (gimple_assign_rhs_to_tree): Do not overwrite location of single rhs in place. (maybe_dump_rtl_for_gimple_stmt): Dump lineno. (floor_sdiv_adjust): New. (cell_sdiv_adjust): New. (cell_udiv_adjust): New. (round_sdiv_adjust): New. (round_udiv_adjust): New. (wrap_constant): Moved from cselib. (unwrap_constant): New. (expand_debug_expr): New. (expand_debug_locations): New. (expand_gimple_basic_block): Drop hiding redeclaration. Expand debug bind stmts. (gimple_expand_cfg): Expand debug locations. * cselib.c: Include tree-pass.h. (struct expand_value_data): New. (cselib_record_sets_hook): New. (PRESERVED_VALUE_P, LONG_TERM_PRESERVED_VALUE_P): New. (cselib_clear_table): Move, and implemnet in terms of... (cselib_reset_table_with_next_value): ... this. (cselib_get_next_unknown_value): New. (discard_useless_locs): Don't discard preserved values. (cselib_preserve_value): New. (cselib_preserved_value_p): New. (cselib_preserve_definitely): New. (cselib_clear_preserve): New. (cselib_preserve_only_values): New. (new_cselib_val): Take rtx argument. Dump it in details. (cselib_lookup_mem): Adjust. (expand_loc): Take regs_active in struct. Adjust. Silence dumps unless details are requested. (cselib_expand_value_rtx_cb): New. (cselib_expand_value_rtx): Rename and reimplment in terms of... (cselib_expand_value_rtx_1): ... this. Adjust. Silence dumps without details. Copy more subregs. Try to resolve values using a callback. Wrap constants. (cselib_subst_to_values): Adjust. (cselib_log_lookup): New. (cselib_lookup): Call it. (cselib_invalidate_regno): Don't count preserved values as useless. (cselib_invalidate_mem): Likewise. (cselib_record_set): Likewise. (struct set): Renamed to cselib_set, moved to cselib.h. (cselib_record_sets): Adjust. Call hook. (cselib_process_insn): Reset table when it would be cleared. (dump_cselib_val): New. (dump_cselib_table): New. * tree-cfgcleanup.c (tree_forwarded_block_p): Skip debug stmts. (remove_forwarder_block): Support moving debug stmts. * cselib.h (cselib_record_sets_hook): Declare. (cselib_expand_callback): New type. (cselib_expand_value_rtx_cb): Declare. (cselib_reset_table_with_next_value): Declare. (cselib_get_next_unknown_value): Declare. (cselib_preserve_value): Declare. (cselib_preserved_value_p): Declare. (cselib_preserve_only_values): Declare. (dump_cselib_table): Declare. * cfgcleanup.c (flow_find_cross_jump): Skip debug insns. (try_crossjump_to_edge): Likewise. (delete_unreachable_blocks): Remove dominant GIMPLE blocks after dominated blocks when debug stmts are present. * simplify-rtx.c (delegitimize_mem_from_attrs): New. * tree-ssa-live.c (remove_unused_locals): Skip debug stmts. (set_var_live_on_entry): Likewise. * loop-invariant.c (find_invariants_bb): Skip debug insns. * cfglayout.c (curr_location, last_location): Make static. (set_curr_insn_source_location): Don't avoid bouncing. (get_curr_insn_source_location): New. (get_curr_insn_block): New. (duplicate_insn_chain): Handle debug insns. * tree-ssa-forwprop.c (forward_propagate_addr_expr): Propagate into debug stmts. * common.opt (fcompare-debug): Move to sort order. (fdump-unnumbered-links): Likewise. (fvar-tracking-assignments): New. (fvar-tracking-assignments-toggle): New. * tree-ssa-dce.c (mark_stmt_necessary): Don't mark blocks because of debug stmts. (mark_stmt_if_obviously_necessary): Mark debug stmts. (eliminate_unnecessary_stmts): Walk dominated blocks before dominators. * tree-ssa-ter.c (find_replaceable_in_bb): Skip debug stmts. * ira.c (memref_used_between_p): Skip debug insns. (update_equiv_regs): Likewise. * sched-deps.c (sd_lists_size): Accept empty list. (sd_init_insn): Mark debug insns. (sd_finish_insn): Unmark them. (sd_add_dep): Reject non-debug deps on debug insns. (fixup_sched_groups): Give debug insns group treatment. Skip debug insns. (sched_analyze_reg): Don't mark debug insns for sched before call. (sched_analyze_2): Handle debug insns. (sched_analyze_insn): Compute next non-debug insn. Handle debug insns. (deps_analyze_insn): Handle debug insns. (deps_start_bb): Skip debug insns. (init_deps): Initialize last_debug_insn. * tree-ssa.c (target_for_debug_bind): New. (find_released_ssa_name): New. (propagate_var_def_into_debug_stmts): New. (propagate_defs_into_debug_stmts): New. (verify_ssa): Skip debug bind stmts without values. (warn_uninialized_vars): Skip debug stmts. * target-def.h (TARGET_DELEGITIMIZE_ADDRESS): Set default. * rtl.c (rtx_equal_p_cb): Handle VALUEs. (rtx_equal_p): Likewise. * ira-costs.c (scan_one_insn): Skip debug insns. (process_bb_node_for_hard_reg_moves): Likewise. * rtl.h (DEBUG_INSN_P): New. (NONDEBUG_INSN_P): New. (MAY_HAVE_DEBUG_INSNS): New. (INSN_P): Accept debug insns. (RTX_FRAME_RELATED_P): Likewise. (INSN_DELETED_P): Likewise (PAT_VAR_LOCATION_DECL): New. (PAT_VAR_LOCATION_LOC): New. (PAT_VAR_OCATION_STATUS): New. (NOTE_VAR_LOCATION_DECL): Reimplement. (NOTE_VAR_LOCATION_LOC): Likewise. (NOTE_VAR_LOCATION_STATUS): Likewise. (INSN_VAR_LOCATION): New. (INSN_VAR_LOCATION_DECL): New. (INSN_VAR_LOCATION_LOC): New. (INSN_VAR_LOCATION_STATUS): New. (gen_rtx_UNKNOWN_VAR_LOC): New. (VAR_LOC_UNKNOWN_P): New. (NOTE_DURING_CALL_P): New. (SCHED_GROUP_P): Accept debug insns. (emit_debug_insn_before): Declare. (emit_debug_insn_before_noloc): Declare. (emit_debug_insn_beore_setloc): Declare. (emit_debug_insn_after): Declare. (emit_debug_insn_after_noloc): Declare. (emit_debug_insn_after_setloc): Declare. (emit_debug_insn): Declare. (make_debug_insn_raw): Declare. (prev_nondebug_insn): Declare. (next_nondebug_insn): Declare. (delegitimize_mem_from_attrs): Declare. (get_max_insn_count): Declare. (wrap_constant): Declare. (unwrap_constant): Declare. (get_curr_insn_source_location): Declare. (get_curr_insn_block): Declare. * tree-inline.c (insert_debug_decl_map): New. (processing_debug_stmt): New. (remap_decl): Don't create new mappings in debug stmts. (remap_gimple_op_r): Don't add references in debug stmts. (copy_tree_body_r): Likewise. (remap_gimple_stmt): Handle debug bind stmts. (copy_bb): Skip debug stmts. (copy_edges_for_bb): Likewise. (copy_debug_stmt): New. (copy_debug_stmts): New. (copy_body): Copy debug stmts at the end. (insert_init_debug_bind): New. (insert_init_stmt): Take id. Skip and emit debug stmts. (setup_one_parameter): Remap variable earlier, register debug mapping. (estimate_num_insns): Skip debug stmts. (expand_call_inline): Preserve debug_map. (optimize_inline_calls): Check for no debug_stmts left-overs. (unsave_expr_now): Preserve debug_map. (copy_gimple_seq_and_replace_locals): Likewise. (tree_function_versioning): Check for no debug_stmts left-overs. Init and destroy debug_map as needed. Split edges unconditionally. (build_duplicate_type): Init and destroy debug_map as needed. * tree-inline.h: Include gimple.h instead of pointer-set.h. (struct copy_body_data): Add debug_stmts and debug_map. * sched-int.h (struct ready_list): Add n_debug. (struct deps): Add last_debug_insn. (DEBUG_INSN_SCHED_P): New. (BOUNDARY_DEBUG_INSN_P): New. (SCHEDULE_DEBUG_INSN_P): New. (sd_iterator_cond): Accept empty list. * combine.c (create_log_links): Skip debug insns. (combine_instructions): Likewise. (cleanup_auto_inc_dec): New. From Jakub Jelinek: Make sure the return value is always unshared. (struct rtx_subst_pair): New. (auto_adjust_pair): New. (propagate_for_debug_subst): New. (propagate_for_debug): New. (try_combine): Skip debug insns. Propagate removed defs into debug insns. (next_nonnote_nondebug_insn): New. (distribute_notes): Use it. Skip debug insns. (distribute_links): Skip debug insns. * tree-outof-ssa.c (set_location_for_edge): Likewise. * resource.c (mark_target_live_regs): Likewise. * var-tracking.c: Include cselib.h and target.h. (enum micro_operation_type): Add MO_VAL_USE, MO_VAL_LOC, and MO_VAL_SET. (micro_operation_type_name): New. (enum emit_note_where): Add EMIT_NOTE_AFTER_CALL_INSN. (struct micro_operation_def): Update comments. (decl_or_value): New type. Use instead of decls. (struct emit_note_data_def): Add vars. (struct attrs_def): Use decl_or_value. (struct variable_tracking_info_def): Add permp, flooded. (struct location_chain_def): Update comment. (struct variable_part_def): Use decl_or_value. (struct variable_def): Make var_part a variable length array. (valvar_pool): New. (scratch_regs): New. (cselib_hook_called): New. (dv_is_decl_p): New. (dv_is_value_p): New. (dv_as_decl): New. (dv_as_value): New. (dv_as_opaque): New. (dv_onepart_p): New. (dv_pool): New. (IS_DECL_CODE): New. (check_value_is_not_decl): New. (dv_from_decl): New. (dv_from_value): New. (dv_htab_hash): New. (variable_htab_hash): Use it. (variable_htab_eq): Support values. (variable_htab_free): Free from the right pool. (attrs_list_member, attrs_list_insert): Use decl_or_value. (attrs_list_union): Adjust. (attrs_list_mpdv_union): New. (tie_break_pointers): New. (canon_value_cmp): New. (unshare_variable): Return possibly-modified slot. (vars_copy_1): Adjust. (var_reg_decl_set): Adjust. Split out of... (var_reg_set): ... this. (get_init_value): Adjust. (var_reg_delete_and_set): Adjust. (var_reg_delete): Adjust. (var_regno_delete): Adjust. (var_mem_decl_set): Split out of... (var_mem_set): ... this. (var_mem_delete_and_set): Adjust. (var_mem_delete): Adjust. (val_store): New. (val_reset): New. (val_resolve): New. (variable_union): Adjust. Speed up merge of 1-part vars. (variable_canonicalize): Use unshared slot. (VALUED_RECURSED_INTO): New. (find_loc_in_1pdv): New. (struct dfset_merge): New. (insert_into_intersection): New. (intersect_loc_chains): New. (loc_cmp): New. (canonicalize_loc_order_check): New. (canonicalize_values_mark): New. (canonicalize_values_star): New. (variable_merge_over_cur): New. (variable_merge_over_src): New. (dataflow_set_merge): New. (dataflow_set_equiv_regs): New. (remove_duplicate_values): New. (struct dfset_post_merge): New. (variable_post_merge_new_vals): New. (variable_post_merge_perm_vals): New. (dataflow_post_merge_adjust): New. (find_mem_expr_in_1pdv): New. (dataflow_set_preserve_mem_locs): New. (dataflow_set_remove_mem_locs): New. (dataflow_set_clear_at_call): New. (onepart_variable_different_p): New. (variable_different_p): Use it. (dataflow_set_different_1): Adjust. Make detailed dump more verbose. (track_expr_p): Add need_rtl parameter. Don't generate rtl if not needed. (track_loc_p): Pass it true. (struct count_use_info): New. (find_use_val): New. (replace_expr_with_values): New. (log_op_type): New. (use_type): New, partially split out of... (count_uses): ... this. Count new micro-ops. (count_uses_1): Adjust. (count_stores): Adjust. (count_with_sets): New. (VAL_NEEDS_RESOLUTION): New. (VAL_HOLDS_TRACK_EXPR): New. (VAL_EXPR_IS_COPIED): New. (VAL_EXPR_IS_CLOBBERED): New. (add_uses): Adjust. Generate new micro-ops. (add_uses_1): Adjust. (add_stores): Generate new micro-ops. (add_with_sets): New. (find_src_status): Adjust. (find_src_set_src): Adjust. (compute_bb_dataflow): Use dataflow_set_clear_at_call. Handle new micro-ops. Canonicalize value equivalances. (vt_find_locations): Compute total size of hash tables for dumping. Perform merge for var-tracking-assignments. Don't disregard single-block loops. (dump_attrs_list): Handle decl_or_value. (dump_variable): Take variable. Deal with decl_or_value. (dump_variable_slot): New. (dump_vars): Use it. (dump_dataflow_sets): Adjust. (set_slot_part): New, extended to support one-part variables after splitting out of... (set_variable_part): ... this. (clobber_slot_part): New, split out of... (clobber_variable_part): ... this. (delete_slot_part): New, split out of... (delete_variable_part): .... this. (check_wrap_constant): New. (vt_expand_loc_callback): New. (vt_expand_loc): New. (emit_note_insn_var_location): Adjust. Handle values. Handle EMIT_NOTE_AFTER_CALL_INSN. (emit_notes_for_differences_1): Adjust. Handle values. (emit_notes_for_differences_2): Likewise. (emit_notes_for_differences): Adjust. (emit_notes_in_bb): Take pointer to set. Emit AFTER_CALL_INSN notes. Adjust. Handle new micro-ops. (vt_add_function_parameters): Adjust. Create and bind values. (vt_initialize): Adjust. Initialize scratch_regs and valvar_pool, flooded and perm.. Initialize and use cselib. Log operations. Move some code to count_with_sets and add_with_sets. (delete_debug_insns): New. (vt_debug_insns_local): New. (vt_finalize): Release permp, valvar_pool, scratch_regs. Finish cselib. (var_tracking_main): If var-tracking-assignments is enabled but var-tracking isn't, delete debug insns and leave. Likewise if we exceed limits or fail the stack adjustments tests, and after all var-tracking processing. More in var-tracking, from Jakub Jelinek <jakub@redhat.com>: (dataflow_set): Add traversed_vars. (value_chain, const_value_chain): New typedefs. (value_chain_pool, value_chains): New variables. (value_chain_htab_hash, value_chain_htab_eq, add_value_chain, add_value_chains, add_cselib_value_chains, remove_value_chain, remove_value_chains, remove_cselib_value_chains): New functions. (shared_hash_find_slot_unshare_1, shared_hash_find_slot_1, shared_hash_find_slot_noinsert_1, shared_hash_find_1): New static inlines. (shared_hash_find_slot_unshare, shared_hash_find_slot, shared_hash_find_slot_noinsert, shared_hash_find): Update. (dst_can_be_shared): New variable. (unshare_variable): Unshare set->vars if shared, use shared_hash_*. Clear dst_can_be_shared. If set->traversed_vars is non-NULL and different from set->vars, look up slot again instead of using the passed in slot. (dataflow_set_init): Initialize traversed_vars. (variable_union): Use shared_hash_*. Use initially NO_INSERT lookup if set->vars is shared. Don't keep slot cleared before calling unshare_variable. Unshare set->vars if needed. Adjust unshare_variable callers. Clear dst_can_be_shared if needed. Even ->refcount == 1 vars must be unshared if set->vars is shared and var needs to be modified. (dataflow_set_union): Set traversed_vars during canonicalization. (VALUE_CHANGED, DECL_CHANGED): Define. (set_dv_changed, dv_changed_p): New static inlines. (track_expr_p): Clear DECL_CHANGED. (dump_dataflow_sets): Set it. (variable_was_changed): Call set_dv_changed. (emit_note_insn_var_location): Likewise. (changed_variables_stack): New variable. (check_changed_vars_1, check_changed_vars_2): New functions. (emit_notes_for_changes): Do nothing if changed_variables is empty. Traverse changed_variables with check_changed_vars_1, call check_changed_vars_2 on each changed_variables_stack entry. (emit_notes_in_bb): Add SET argument. Just clear it at the beginning, use it instead of local &set, don't destroy it at the end. (vt_emit_notes): Call dataflow_set_clear early on all VTI(bb)->out sets, never use them, instead use emit_notes_in_bb computed set, dataflow_set_clear also VTI(bb)->in when we are done with the basic block. Initialize changed_variables_stack, free it afterwards. If ENABLE_CHECKING verify that after noting differences to an empty set value_chains hash table is empty. (vt_initialize): Initialize value_chains and value_chain_pool. (vt_finalize): Delete value_chains htab, free value_chain_pool. (variable_tracking_main): Call dump_dataflow_sets before calling vt_emit_notes, not after it. * tree-flow.h (propagate_defs_into_debug_stmts): Declare. (propagate_var_def_into_debug_stmts): Declare. * df-problems.c (df_lr_bb_local_compute): Skip debug insns. (df_set_note): Reject debug insns. (df_whole_mw_reg_dead_p): Take added_notes_p argument. Don't add notes to debug insns. (df_note_bb_compute): Adjust. Likewise. (df_simulate_uses): Skip debug insns. (df_simulate_initialize_backwards): Likewise. * reg-stack.c (subst_stack_regs_in_debug_insn): New. (subst_stack_regs_pat): Reject debug insns. (convert_regs_1): Handle debug insns. * Makefile.in (TREE_INLINE_H): Take pointer-set.h from GIMPLE_H. (print-rtl.o): Depend on cselib.h. (cselib.o): Depend on TREE_PASS_H. (var-tracking.o): Depend on cselib.h and TARGET_H. * sched-rgn.c (rgn_estimate_number_of_insns): Discount debug insns. (init_ready_list): Skip boundary debug insns. (add_branch_dependences): Skip debug insns. (free_block_dependencies): Check for blocks with only debug insns. (compute_priorities): Likewise. * gimple.c (gss_for_code): Handle GIMPLE_DEBUG. (gimple_build_with_ops_stat): Take subcode as unsigned. Adjust all callers. (gimple_build_debug_bind_stat): New. (empty_body_p): Skip debug stmts. (gimple_has_side_effects): Likewise. (gimple_rhs_has_side_effects): Likewise. * gimple.h (enum gimple_debug_subcode, GIMPLE_DEBUG_BIND): New. (gimple_build_debug_bind_stat): Declare. (gimple_build_debug_bind): Define. (is_gimple_debug): New. (gimple_debug_bind_p): New. (gimple_debug_bind_get_var): New. (gimple_debug_bind_get_value): New. (gimple_debug_bind_get_value_ptr): New. (gimple_debug_bind_set_var): New. (gimple_debug_bind_set_value): New. (GIMPLE_DEBUG_BIND_NOVALUE): New internal temporary macro. (gimple_debug_bind_reset_value): New. (gimple_debug_bind_has_value_p): New. (gsi_next_nondebug): New. (gsi_prev_nondebug): New. (gsi_start_nondebug_bb): New. (gsi_last_nondebug_bb): New. * sched-vis.c (print_pattern): Handle VAR_LOCATION. (print_insn): Handle DEBUG_INSN. * tree-cfg.c (remove_bb): Walk stmts backwards. Let loc of first insn prevail. (first_stmt): Skip debug stmts. (first_non_label_stmt): Likewise. (last_stmt): Likewise. (has_zero_uses_1): New. (single_imm_use_1): New. (verify_gimple_debug): New. (verify_types_in_gimple_stmt): Handle debug stmts. (verify_stmt): Likewise. (debug_loop_num): Skip debug stmts. (remove_edge_and_dominated_blocks): Remove dominators last. * tree-ssa-reasssoc.c (rewrite_expr_tree): Propagate into debug stmts. (linearize_expr): Likewise. * config/i386/i386.c (ix86_delegitimize_address): Call default implementation. * config/ia64/ia64.c (ia64_safe_itanium_class): Handle debug insns. (group_barrier_needed): Skip debug insns. (emit_insn_group_barriers): Likewise. (emit_all_insn_group_barriers): Likewise. (ia64_variable_issue): Handle debug insns. (ia64_dfa_new_cycle): Likewise. (final_emit_insn_group_barriers): Skip debug insns. (ia64_dwarf2out_def_steady_cfa): Take frame argument. Don't def cfa without frame. (process_set): Likewise. (process_for_unwind_directive): Pass frame on. * config/rs6000/rs6000.c (TARGET_DELEGITIMIZE_ADDRESS): Define. (rs6000_delegitimize_address): New. (rs6000_debug_adjust_cost): Handle debug insns. (is_microcoded_insn): Likewise. (is_cracked_insn): Likewise. (is_nonpipeline_insn): Likewise. (insn_must_be_first_in_group): Likewise. (insn_must_be_last_in_group): Likewise. (force_new_group): Likewise. * cfgrtl.c (rtl_split_block): Emit INSN_DELETED note if block contains only debug insns. (rtl_merge_blocks): Skip debug insns. (purge_dead_edges): Likewise. (rtl_block_ends_with_call_p): Skip debug insns. * dce.c (deletable_insn_p): Handle VAR_LOCATION. (mark_reg_dependencies): Skip debug insns. * params.def (PARAM_MIN_NONDEBUG_INSN_UID): New. * tree-ssanames.c (release_ssa_name): Propagate def into debug stmts. * tree-ssa-threadedge.c (record_temporary_equivalences_from_stmts): Skip debug stmts. * regcprop.c (replace_oldest_value_addr): Skip debug insns. (replace_oldest_value_mem): Use ALL_REGS for debug insns. (copyprop_hardreg_forward_1): Handle debug insns. * reload1.c (reload): Skip debug insns. Replace unassigned pseudos in debug insns with their equivalences. (eliminate_regs_in_insn): Skip debug insns. (emit_input_reload_insns): Skip debug insns at first, adjust them later. * tree-ssa-operands.c (add_virtual_operand): Reject debug stmts. (get_indirect_ref_operands): Pass opf_no_vops on. (get_expr_operands): Likewise. Skip debug stmts. (parse_ssa_operands): Scan debug insns with opf_no_vops. gcc/testsuite/ChangeLog: * gcc.dg/guality/guality.c: New. * gcc.dg/guality/guality.h: New. * gcc.dg/guality/guality.exp: New. * gcc.dg/guality/example.c: New. * lib/gcc-dg.exp (cleanup-dump): Remove .gk files. (cleanup-saved-temps): Likewise, .gkd files too. gcc/cp/ChangeLog: * cp-tree.h (TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS): New. * cp-lang.c (cxx_dwarf_name): Pass it. * error.c (count_non_default_template_args): Take flags as argument. Adjust all callers. Skip counting of default arguments if the new flag is given. ChangeLog: * Makefile.tpl (BUILD_CONFIG): Default to bootstrap-debug. * Makefile.in: Rebuilt. contrib/ChangeLog: * compare-debug: Look for .gkd files and compare them. config/ChangeLog: * bootstrap-debug.mk: Add comments. * bootstrap-debug-big.mk: New. * bootstrap-debug-lean.mk: New. * bootstrap-debug-ckovw.mk: Add comments. * bootstrap-debug-lib.mk: Drop CFLAGS for stages. Use -g0 for TFLAGS in stage1. Drop -fvar-tracking-assignments-toggle. From-SVN: r151312
2009-09-02 04:42:21 +02:00
if (NONDEBUG_INSN_P (insn)
&& (reg_overlap_mentioned_p (reg, PATTERN (insn))
|| (CALL_P (insn) && find_reg_fusage (insn, USE, reg))))
1991-12-01 06:13:56 +01:00
return 1;
return 0;
}
/* Nonzero if the old value of X, a register, is referenced in BODY. If X
is entirely replaced by a new value and the only use is as a SET_DEST,
we do not consider it a reference. */
int
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
reg_referenced_p (const_rtx x, const_rtx body)
1991-12-01 06:13:56 +01:00
{
int i;
switch (GET_CODE (body))
{
case SET:
if (reg_overlap_mentioned_p (x, SET_SRC (body)))
return 1;
/* If the destination is anything other than CC0, PC, a REG or a SUBREG
of a REG that occupies all of the REG, the insn references X if
it is mentioned in the destination. */
if (GET_CODE (SET_DEST (body)) != CC0
&& GET_CODE (SET_DEST (body)) != PC
alias.c (record_set, [...]): Use REG_P. 2004-06-15 Jerry Quinn <jlquinn@optonline.net> * alias.c (record_set, record_base_value, canon_rtx, get_addr, nonlocal_mentioned_p_1, init_alias_analysis): Use REG_P. * bt-load.c (find_btr_reference, insn_sets_btr_p, note_btr_set): Likewise. * builtins.c (expand_builtin_setjmp, expand_builtin_apply, expand_builtin_mathfn, expand_builtin_strlen, expand_builtin_memcmp, expand_builtin_strcmp, expand_builtin_strncmp, expand_builtin_frame_address): Likewise. * caller-save.c (mark_set_regs, add_stored_regs, mark_referenced_regs, insert_one_insn): Likewise. * calls.c (prepare_call_address, precompute_register_parameters, precompute_arguments, expand_call, emit_library_call_value_1): Likewise. * cfganal.c (flow_active_insn_p): Likewise. * combine.c (set_nonzero_bits_and_sign_copies, can_combine_p, combinable_i3pat, try_combine, find_split_point, COMBINE_RTX_EQUAL_P, subst, combine_simplify_rtx, simplify_if_then_else, simplify_set, make_extraction, recog_for_combine, gen_lowpart_for_combine, simplify_comparison, record_dead_and_set_regs_1, record_dead_and_set_regs, record_promoted_value, check_promoted_subreg, get_last_value_validate, get_last_value, reg_dead_at_p_1, reg_bitfield_target_p, distribute_notes, unmentioned_reg_p_1): Likewise. * conflict.c (mark_reg): Likewise. * cse.c (HASH, COST, COST_IN, approx_reg_cost_1, notreg_cost, mention_regs, insert_regs, lookup, lookup_for_remove, insert, merge_equiv_classes, flush_hash_table, invalidate, remove_invalid_refs, remove_invalid_subreg_refs, rehash_using_reg, invalidate_for_call, use_related_value, canon_hash, exp_equiv_p, cse_rtx_varies_p, canon_reg, find_best_addr, fold_rtx, equiv_constant, record_jump_cond, cse_insn, addr_affects_sp_p, invalidate_from_clobbers, cse_process_notes, cse_around_loop, cse_set_around_loop, count_reg_usage, set_live_p, cse_change_cc_mode, cse_cc_succs, cse_condition_code_reg): Likewise. * cselib.c (cselib_reg_set_mode, rtx_equal_for_cselib_p, cselib_lookup, cselib_invalidate_regno, cselib_invalidate_rtx, cselib_record_set, cselib_record_sets): Likewise. * dbxout.c (dbxout_symbol_location, dbxout_parms, dbxout_reg_parms, dbxout_block): Likewise. * df.c (df_ref_record, df_def_record_1, df_uses_record): Likewise. * dojump.c (do_jump): Likewise. * dwarf2out.c (dwarf2out_frame_debug_expr, is_pseudo_reg, is_based_loc, rtl_for_decl_location): Likewise. * emit-rtl.c (set_reg_attrs_for_parm, set_decl_rtl, set_decl_incoming_rtl, mark_user_reg): Likewise. * explow.c (copy_all_regs, copy_all_regs, memory_address, force_reg, copy_to_suggested_reg, allocate_dynamic_stack_space, probe_stack_range, hard_function_value): Likewise. * expmed.c (store_bit_field, store_fixed_bit_field, store_split_bit_field, extract_bit_field, extract_fixed_bit_field, extract_split_bit_field, expand_divmod, emit_store_flag_force): Likewise. * expr.c (convert_move, convert_modes, block_move_libcall_safe_for_call_parm, emit_group_load, use_reg, use_group_regs, emit_move_insn, emit_move_insn_1, compress_float_constant, push_block, emit_single_push_insn, emit_push_insn, get_subtarget, expand_assignment, store_expr, store_constructor, store_field, force_operand, safe_from_p, expand_expr_real_1, expand_increment, do_store_flag, do_tablejump): Likewise. * final.c (profile_function, final_scan_insn, alter_subreg, get_mem_expr_from_op, output_asm_operand_names, output_operand, only_leaf_regs_used, leaf_renumber_regs_insn): Likewise. * flow.c (verify_wide_reg_1, mark_regs_live_at_end, find_regno_partial, propagate_one_insn, init_propagate_block_info, insn_dead_p, libcall_dead_p, mark_set_1, not_reg_cond, attempt_auto_inc, find_auto_inc, mark_used_regs, count_or_remove_death_notes_bb): Likewise. * function.c (find_temp_slot_from_address, update_temp_slot_address, preserve_temp_slots, put_var_into_stack, fixup_var_refs_insn, fixup_var_refs_1, fixup_stack_1, optimize_bit_field, flush_addressof, put_addressof_into_stack, purge_addressof_1, insns_for_mem_walk, purge_single_hard_subreg_set, instantiate_decl, instantiate_virtual_regs_1, aggregate_value_p, assign_parms, promoted_input_arg, setjmp_vars_warning, setjmp_args_warning, setjmp_protect, setjmp_protect_args, fix_lexical_addr, expand_function_start, diddle_return_value, clobber_return_register, expand_function_end, keep_stack_depressed, handle_epilogue_set, update_epilogue_consts): Likewise. * genemit.c (gen_exp, gen_insn): Likewise. * genrecog.c (make_insn_sequence): Likewise. * global.c (global_conflicts, expand_preferences, mark_reg_store, mark_reg_conflicts, set_preference, reg_becomes_live, build_insn_chain, mark_reg_change): Likewise. * haifa_sched.c (CONST_BASED_ADDRESS_P, find_set_reg_weight): Likewise. * ifcvt.c (noce_try_abs, noce_get_condition, noce_process_if_block): Likewise. * integrate.c (copy_rtx_and_substitute, try_constants, subst_constants, mark_stores, allocate_initial_values): Likewise. * jump.c (reversed_comparison_code_parts, delete_prior_computation, delete_computation, rtx_renumbered_equal_p, true_regnum, reg_or_subregno): Likewise. * lcm.c (reg_dies, reg_becomes_live): Likewise. * local-alloc.c (validate_equiv_mem_from_store, validate_equiv_mem, update_equiv_regs, no_equiv, block_alloc, combine_regs, reg_is_set, wipe_dead_reg, no_conflict_p): Likewise. * loop-iv.c (simple_reg_p, simple_set_p, kill_sets, iv_get_reaching_def, iv_analyze_biv, altered_reg_used, mark_altered, simple_rhs_p, simplify_using_assignment, implies_p): Likewise. * loop.c (scan_loop, combine_movables, rtx_equal_for_loop_p, move_movables, note_set_pseudo_multiple_uses, consec_sets_invariant_p, find_single_use_in_loop, count_one_set, loop_bivs_init_find, loop_givs_rescan, check_insn_for_bivs, check_insn_for_givs, valid_initial_value_p, simplify_giv_expr, consec_sets_giv, loop_regs_update, check_dbra_loop, maybe_eliminate_biv, maybe_eliminate_biv_1, record_initial, update_reg_last_use, canonicalize_condition, loop_regs_scan, load_mems, try_copy_prop, try_swap_copy_prop): Likewise. * optabs.c (expand_binop, expand_vector_binop, expand_vector_unop, expand_abs, emit_no_conflict_block, emit_libcall_block, expand_float): Likewise. * postreload.c (reload_cse_simplify, reload_cse_simplify_set, reload_cse_simplify_operands, reload_combine, reload_combine_note_store, reload_combine_note_use, reload_cse_move2add, move2add_note_store): Likewise. * print-rtl.c (print_rtx): Likewise. * ra-build.c (copy_insn_p, remember_move, init_one_web_common, contains_pseudo, handle_asm_insn): Likewise. * ra-debug.c (ra_print_rtx_object, dump_constraints, dump_static_insn_cost): Likewise. * ra-rewrite.c (slots_overlap_p, emit_colors, remove_suspicious_death_notes): Likewise. * recog.c (validate_replace_rtx_1, find_single_use_1, find_single_use, register_operand, scratch_operand, nonmemory_operand, constrain_operands): Likewise. * reg-stack (check_asm_stack_operands, remove_regno_note, emit_swap_insn, swap_rtx_condition, subst_stack_regs_pat, subst_asm_stack_regs): Likewise. * regclass.c (scan_one_insn, record_reg_classes, copy_cost, record_address_regs, reg_scan_mark_refs): Likewise. * regmove.c (discover_flags_reg, replacement_quality, copy_src_to_dest, reg_is_remote_constant_p, regmove_optimize, fixup_match_1): Likewise. * regrename.c (note_sets, clear_dead_regs, build_def_use, kill_value, kill_set_value, copyprop_hardreg_forward_1): Likewise. * reload.c (MATCHES, push_secondary_reload, find_reusable_reload, reload_inner_reg_of_subreg, can_reload_into, push_reload, combine_reloads, find_dummy_reload, hard_reg_set_here_p, operands_match_p, decompose, find_reloads, find_reloads_toplev, find_reloads_address, subst_indexed_address, find_reloads_address_1, find_reloads_subreg_address, find_replacement, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p, find_equiv_reg, regno_clobbered_p): Likewise. * reload1.c (replace_pseudos_in, reload, calculate_needs_all_insns, find_reg, delete_dead_insn, alter_reg, eliminate_regs, elimination_effects, eliminate_regs_in_insn, scan_paradoxical_subregs, forget_old_reloads_1, reload_reg_free_for_value_p, choose_reload_regs, emit_input_reload_insns, emit_output_reload_insns, do_input_reload, do_output_reload, emit_reload_insns, gen_reload, delete_address_reloads_1, inc_for_reload): Likewise. * reorg.c (update_reg_dead_notes, fix_reg_dead_note, update_reg_unused_notes, fill_slots_from_thread): Likewise. * resource.c (update_live_status, mark_referenced_resources, mark_set_resources, mark_target_live_regs): Likewise. * rtlanal.c (nonzero_address_p, get_jump_table_offset, global_reg_mentioned_p_1, reg_mentioned_p, reg_referenced_p, reg_set_p, set_noop_p, find_last_value, refers_to_regno_p, note_stores, dead_or_set_p, dead_or_set_regno_p, find_regno_note, find_reg_fusage, find_regno_fusage, replace_regs, regno_use_in, parms_set, find_first_parameter_load, keep_with_call_p, hoist_test_store, hoist_update_store, address_cost, nonzero_bits1, num_sign_bit_copies1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sched-deps.c (deps_may_trap_p, sched_analyze_1, sched_analyze_insn, sched_analyze): Likewise. * sched-rgn.c (check_live_1, update_live_1, sets_likely_spilled_1): Likewise. * sdbout.c (sdbout_symbol, sdbout_parms, sdbout_reg_parms): Likewise. * simplify-rtx.c (simplify_replace_rtx, simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_subreg): Likewise. * stmt.c (decl_conflicts_with_clobbers_p, expand_asm_operands, expand_end_stmt_expr, expand_return, expand_decl, expand_anon_union_decl): Likewise. * unroll.c (precondition_loop_p, calculate_giv_inc, copy_loop_body, find_splittable_regs, find_splittable_givs, find_common_reg_term, loop_iterations): Likewise. * var-tracking.c (variable_union, variable_part_different_p, variable_different_p, count_uses, add_uses, add_stores, compute_bb_dataflow, set_variable_part, delete_variable_part, emit_notes_in_bb, vt_get_decl_and_offset, vt_add_function_parameters): Likewise. * varasm.c (assemble_variable): Likewise. From-SVN: r83195
2004-06-15 20:02:40 +02:00
&& !REG_P (SET_DEST (body))
1991-12-01 06:13:56 +01:00
&& ! (GET_CODE (SET_DEST (body)) == SUBREG
alias.c (record_set, [...]): Use REG_P. 2004-06-15 Jerry Quinn <jlquinn@optonline.net> * alias.c (record_set, record_base_value, canon_rtx, get_addr, nonlocal_mentioned_p_1, init_alias_analysis): Use REG_P. * bt-load.c (find_btr_reference, insn_sets_btr_p, note_btr_set): Likewise. * builtins.c (expand_builtin_setjmp, expand_builtin_apply, expand_builtin_mathfn, expand_builtin_strlen, expand_builtin_memcmp, expand_builtin_strcmp, expand_builtin_strncmp, expand_builtin_frame_address): Likewise. * caller-save.c (mark_set_regs, add_stored_regs, mark_referenced_regs, insert_one_insn): Likewise. * calls.c (prepare_call_address, precompute_register_parameters, precompute_arguments, expand_call, emit_library_call_value_1): Likewise. * cfganal.c (flow_active_insn_p): Likewise. * combine.c (set_nonzero_bits_and_sign_copies, can_combine_p, combinable_i3pat, try_combine, find_split_point, COMBINE_RTX_EQUAL_P, subst, combine_simplify_rtx, simplify_if_then_else, simplify_set, make_extraction, recog_for_combine, gen_lowpart_for_combine, simplify_comparison, record_dead_and_set_regs_1, record_dead_and_set_regs, record_promoted_value, check_promoted_subreg, get_last_value_validate, get_last_value, reg_dead_at_p_1, reg_bitfield_target_p, distribute_notes, unmentioned_reg_p_1): Likewise. * conflict.c (mark_reg): Likewise. * cse.c (HASH, COST, COST_IN, approx_reg_cost_1, notreg_cost, mention_regs, insert_regs, lookup, lookup_for_remove, insert, merge_equiv_classes, flush_hash_table, invalidate, remove_invalid_refs, remove_invalid_subreg_refs, rehash_using_reg, invalidate_for_call, use_related_value, canon_hash, exp_equiv_p, cse_rtx_varies_p, canon_reg, find_best_addr, fold_rtx, equiv_constant, record_jump_cond, cse_insn, addr_affects_sp_p, invalidate_from_clobbers, cse_process_notes, cse_around_loop, cse_set_around_loop, count_reg_usage, set_live_p, cse_change_cc_mode, cse_cc_succs, cse_condition_code_reg): Likewise. * cselib.c (cselib_reg_set_mode, rtx_equal_for_cselib_p, cselib_lookup, cselib_invalidate_regno, cselib_invalidate_rtx, cselib_record_set, cselib_record_sets): Likewise. * dbxout.c (dbxout_symbol_location, dbxout_parms, dbxout_reg_parms, dbxout_block): Likewise. * df.c (df_ref_record, df_def_record_1, df_uses_record): Likewise. * dojump.c (do_jump): Likewise. * dwarf2out.c (dwarf2out_frame_debug_expr, is_pseudo_reg, is_based_loc, rtl_for_decl_location): Likewise. * emit-rtl.c (set_reg_attrs_for_parm, set_decl_rtl, set_decl_incoming_rtl, mark_user_reg): Likewise. * explow.c (copy_all_regs, copy_all_regs, memory_address, force_reg, copy_to_suggested_reg, allocate_dynamic_stack_space, probe_stack_range, hard_function_value): Likewise. * expmed.c (store_bit_field, store_fixed_bit_field, store_split_bit_field, extract_bit_field, extract_fixed_bit_field, extract_split_bit_field, expand_divmod, emit_store_flag_force): Likewise. * expr.c (convert_move, convert_modes, block_move_libcall_safe_for_call_parm, emit_group_load, use_reg, use_group_regs, emit_move_insn, emit_move_insn_1, compress_float_constant, push_block, emit_single_push_insn, emit_push_insn, get_subtarget, expand_assignment, store_expr, store_constructor, store_field, force_operand, safe_from_p, expand_expr_real_1, expand_increment, do_store_flag, do_tablejump): Likewise. * final.c (profile_function, final_scan_insn, alter_subreg, get_mem_expr_from_op, output_asm_operand_names, output_operand, only_leaf_regs_used, leaf_renumber_regs_insn): Likewise. * flow.c (verify_wide_reg_1, mark_regs_live_at_end, find_regno_partial, propagate_one_insn, init_propagate_block_info, insn_dead_p, libcall_dead_p, mark_set_1, not_reg_cond, attempt_auto_inc, find_auto_inc, mark_used_regs, count_or_remove_death_notes_bb): Likewise. * function.c (find_temp_slot_from_address, update_temp_slot_address, preserve_temp_slots, put_var_into_stack, fixup_var_refs_insn, fixup_var_refs_1, fixup_stack_1, optimize_bit_field, flush_addressof, put_addressof_into_stack, purge_addressof_1, insns_for_mem_walk, purge_single_hard_subreg_set, instantiate_decl, instantiate_virtual_regs_1, aggregate_value_p, assign_parms, promoted_input_arg, setjmp_vars_warning, setjmp_args_warning, setjmp_protect, setjmp_protect_args, fix_lexical_addr, expand_function_start, diddle_return_value, clobber_return_register, expand_function_end, keep_stack_depressed, handle_epilogue_set, update_epilogue_consts): Likewise. * genemit.c (gen_exp, gen_insn): Likewise. * genrecog.c (make_insn_sequence): Likewise. * global.c (global_conflicts, expand_preferences, mark_reg_store, mark_reg_conflicts, set_preference, reg_becomes_live, build_insn_chain, mark_reg_change): Likewise. * haifa_sched.c (CONST_BASED_ADDRESS_P, find_set_reg_weight): Likewise. * ifcvt.c (noce_try_abs, noce_get_condition, noce_process_if_block): Likewise. * integrate.c (copy_rtx_and_substitute, try_constants, subst_constants, mark_stores, allocate_initial_values): Likewise. * jump.c (reversed_comparison_code_parts, delete_prior_computation, delete_computation, rtx_renumbered_equal_p, true_regnum, reg_or_subregno): Likewise. * lcm.c (reg_dies, reg_becomes_live): Likewise. * local-alloc.c (validate_equiv_mem_from_store, validate_equiv_mem, update_equiv_regs, no_equiv, block_alloc, combine_regs, reg_is_set, wipe_dead_reg, no_conflict_p): Likewise. * loop-iv.c (simple_reg_p, simple_set_p, kill_sets, iv_get_reaching_def, iv_analyze_biv, altered_reg_used, mark_altered, simple_rhs_p, simplify_using_assignment, implies_p): Likewise. * loop.c (scan_loop, combine_movables, rtx_equal_for_loop_p, move_movables, note_set_pseudo_multiple_uses, consec_sets_invariant_p, find_single_use_in_loop, count_one_set, loop_bivs_init_find, loop_givs_rescan, check_insn_for_bivs, check_insn_for_givs, valid_initial_value_p, simplify_giv_expr, consec_sets_giv, loop_regs_update, check_dbra_loop, maybe_eliminate_biv, maybe_eliminate_biv_1, record_initial, update_reg_last_use, canonicalize_condition, loop_regs_scan, load_mems, try_copy_prop, try_swap_copy_prop): Likewise. * optabs.c (expand_binop, expand_vector_binop, expand_vector_unop, expand_abs, emit_no_conflict_block, emit_libcall_block, expand_float): Likewise. * postreload.c (reload_cse_simplify, reload_cse_simplify_set, reload_cse_simplify_operands, reload_combine, reload_combine_note_store, reload_combine_note_use, reload_cse_move2add, move2add_note_store): Likewise. * print-rtl.c (print_rtx): Likewise. * ra-build.c (copy_insn_p, remember_move, init_one_web_common, contains_pseudo, handle_asm_insn): Likewise. * ra-debug.c (ra_print_rtx_object, dump_constraints, dump_static_insn_cost): Likewise. * ra-rewrite.c (slots_overlap_p, emit_colors, remove_suspicious_death_notes): Likewise. * recog.c (validate_replace_rtx_1, find_single_use_1, find_single_use, register_operand, scratch_operand, nonmemory_operand, constrain_operands): Likewise. * reg-stack (check_asm_stack_operands, remove_regno_note, emit_swap_insn, swap_rtx_condition, subst_stack_regs_pat, subst_asm_stack_regs): Likewise. * regclass.c (scan_one_insn, record_reg_classes, copy_cost, record_address_regs, reg_scan_mark_refs): Likewise. * regmove.c (discover_flags_reg, replacement_quality, copy_src_to_dest, reg_is_remote_constant_p, regmove_optimize, fixup_match_1): Likewise. * regrename.c (note_sets, clear_dead_regs, build_def_use, kill_value, kill_set_value, copyprop_hardreg_forward_1): Likewise. * reload.c (MATCHES, push_secondary_reload, find_reusable_reload, reload_inner_reg_of_subreg, can_reload_into, push_reload, combine_reloads, find_dummy_reload, hard_reg_set_here_p, operands_match_p, decompose, find_reloads, find_reloads_toplev, find_reloads_address, subst_indexed_address, find_reloads_address_1, find_reloads_subreg_address, find_replacement, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p, find_equiv_reg, regno_clobbered_p): Likewise. * reload1.c (replace_pseudos_in, reload, calculate_needs_all_insns, find_reg, delete_dead_insn, alter_reg, eliminate_regs, elimination_effects, eliminate_regs_in_insn, scan_paradoxical_subregs, forget_old_reloads_1, reload_reg_free_for_value_p, choose_reload_regs, emit_input_reload_insns, emit_output_reload_insns, do_input_reload, do_output_reload, emit_reload_insns, gen_reload, delete_address_reloads_1, inc_for_reload): Likewise. * reorg.c (update_reg_dead_notes, fix_reg_dead_note, update_reg_unused_notes, fill_slots_from_thread): Likewise. * resource.c (update_live_status, mark_referenced_resources, mark_set_resources, mark_target_live_regs): Likewise. * rtlanal.c (nonzero_address_p, get_jump_table_offset, global_reg_mentioned_p_1, reg_mentioned_p, reg_referenced_p, reg_set_p, set_noop_p, find_last_value, refers_to_regno_p, note_stores, dead_or_set_p, dead_or_set_regno_p, find_regno_note, find_reg_fusage, find_regno_fusage, replace_regs, regno_use_in, parms_set, find_first_parameter_load, keep_with_call_p, hoist_test_store, hoist_update_store, address_cost, nonzero_bits1, num_sign_bit_copies1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sched-deps.c (deps_may_trap_p, sched_analyze_1, sched_analyze_insn, sched_analyze): Likewise. * sched-rgn.c (check_live_1, update_live_1, sets_likely_spilled_1): Likewise. * sdbout.c (sdbout_symbol, sdbout_parms, sdbout_reg_parms): Likewise. * simplify-rtx.c (simplify_replace_rtx, simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_subreg): Likewise. * stmt.c (decl_conflicts_with_clobbers_p, expand_asm_operands, expand_end_stmt_expr, expand_return, expand_decl, expand_anon_union_decl): Likewise. * unroll.c (precondition_loop_p, calculate_giv_inc, copy_loop_body, find_splittable_regs, find_splittable_givs, find_common_reg_term, loop_iterations): Likewise. * var-tracking.c (variable_union, variable_part_different_p, variable_different_p, count_uses, add_uses, add_stores, compute_bb_dataflow, set_variable_part, delete_variable_part, emit_notes_in_bb, vt_get_decl_and_offset, vt_add_function_parameters): Likewise. * varasm.c (assemble_variable): Likewise. From-SVN: r83195
2004-06-15 20:02:40 +02:00
&& REG_P (SUBREG_REG (SET_DEST (body)))
1991-12-01 06:13:56 +01:00
&& (((GET_MODE_SIZE (GET_MODE (SUBREG_REG (SET_DEST (body))))
+ (UNITS_PER_WORD - 1)) / UNITS_PER_WORD)
== ((GET_MODE_SIZE (GET_MODE (SET_DEST (body)))
+ (UNITS_PER_WORD - 1)) / UNITS_PER_WORD)))
&& reg_overlap_mentioned_p (x, SET_DEST (body)))
return 1;
return 0;
1991-12-01 06:13:56 +01:00
case ASM_OPERANDS:
for (i = ASM_OPERANDS_INPUT_LENGTH (body) - 1; i >= 0; i--)
if (reg_overlap_mentioned_p (x, ASM_OPERANDS_INPUT (body, i)))
return 1;
return 0;
1991-12-01 06:13:56 +01:00
case CALL:
case USE:
[multiple changes] Fri Oct 29 15:25:07 1999 Arnaud Charlet <charlet@ACT-Europe.FR> * gcov.c (DIR_SEPARATOR): Provide default. (output_data): Add test for MS-DOS format absolute filename. (fancy_abort): Correct program name. (open_files): Open all files in binary mode. * libgcc2.c (__bb_exit_func): Likewise. * profile.c (init_branch_prob): Specify binary when opening files. * flags.h (flag_unwind_tables): New decl. * toplev.c (flag_unwind_table): New definition. (f_options): Add -funwind-tables. (decode_g_option): Clarify warning when unknown -g option is given. (rest_of_compilation): If inside an inlined external function, pretend we are just being declared. * dwarf2out.c (dwarf2out_do_frame): Check -funwind_tables. (dwarf2out_frame_finish): Likewise. Fri Oct 29 06:32:44 1999 Geoffrey Keating <geoffk@cygnus.com> * flow.c (propagate_block): When the last reference to a label before an ADDR_VEC is deleted because the reference is a dead store, delete the ADDR_VEC. Fri Oct 29 07:44:26 1999 Vasco Pedro <vp@di.fct.unl.pt> * fold-const.c (merge_ranges): In not in0, but in1, handle upper bounds equal like subset case. Thu Oct 28 19:22:24 1999 Douglas Rupp <rupp@gnat.com> * dbxout.c (dbxout_parms): Generate a second stabs line for parameters passed in a register but moved to the stack. Thu Oct 28 19:12:57 1999 Sam Tardieu <tardieu@act-europe.fr> * gcc.c (pass_exit_codes, greatest_status): New variables. (struct option_map): Add entry for "--pass-exit-codes". (execute): Update greatest_status if error. (display_help): Add documentation for -pass-exit-codes. (process_command): Handle -pass-exit-codes. (main): Look at pass_exit_codes and greatest_status on call to exit. Thu Oct 28 18:06:50 1999 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * reload.c (find_reloads): Refine test for no input reload case to not includes reloads emitted after insn. * function.c (find_temp_slots_from_address): Handle sum involving a register that points to a temp slot. (update_temp_slot_address): Make recursive call if both old and new are PLUS with a common operand. * calls.c (expand_call): Mark temp slot for result as having address taken. * rtlanal.c (reg_referenced_p, case IF_THEN_ELSE): New case. * gcc.c (process_command): Add standard_exec_prefix with "GCC" component as well as "BINUTILS". * integrate.h (copy_rtx_and_substitute): New arg, FOR_LHS. * integrate.c (copy_rtx_and_substitute): Likewise. (expand_inline_function, integrate_parm_decls, integrate_decl_tree): All callers changed. * unroll.c (inital_reg_note_copy, copy_loop_body): Likewise. * dbxout.c (dbxout_type, case INTEGER_TYPE_NODE): If can use gdb extensions, write size of type; also be more consistent in using references when this is a subtype. * pa.md (extv, extzv, insv): Use define_expand to reject constant that is out of range. * loop.c (unknown_constant_address_altered): New variable. (prescan_loop): Initialize it. (note_addr_stored): Set it for RTX_UNCHANGING_P MEM. (invariant_p, case MEM): Remove handling for volatile and readony; check new variable if readonly. (check_dbra_loop): Chdeck unknown_constant_address_altered. * cse.c (canon_hash, case MEM): Do not record if BLKmode. (addr_affects_sp_p): Removed from note_mem_written and only define #ifdef AUTO_INC_DEC. * alpha.c (input_operand, case ADDRESSOF): Treat as REG. * regclass.c (record_reg_classes): Properly handle register move directions. * varasm.c (initializer_constant_valid_p, case MINUS_EXPR): Don't think valid if both operands are invalid. (struct constant_descriptor): New field RTL. (mark_const_hash_entry): Mark it. (record_constant{,_rtx}): Initialize it. (output_constant_def): Allocate RTL in permanent obstack and save in table. ({record,compare}_constant_1): Modes must match for CONSTRUCTOR of ARRAY_TYPE. * c-common.h (initializer_constant_valid_p): Delete decl from here. * output.h (initializer_constant_valid_p): Move decl to here. * c-common.c (initializer_constant_valid_p): Delete function from here. * varasm.c (initializer_constant_valid_p): Move function to here. * tree.h (STRIP_SIGN_NOPS): New macro. * fold-const.c (optimize_minmax_comparison): New function. (invert_truthvalue, case WITH_RECORD_EXPR): New case. (fold): Use STRIP_SIGN_NOPS instead of STRIP_TYPE_NOPS. (fold, case EQ_EXPR): Call optimize_minmax_comparison and add cases with ABS_EXPR, NEGATE_EXPR, PLUS_EXPR, MINUS_EXPR, and widening conversions. (fold, case LE_EXPR): Rework changing unsigned to signed comparisons to look at size of mode, not precision of type; also add missing cases. (optimize_bit_field_compare, decode_field_reference): Don't try to optimize COMPONENT_REF of a PLACEHOLDER_EXPR. * dwarf2out.c (ctype.h): Include. (dwarf2out_set_demangle_name_func): New function. (size_of_line_info): Deleted. (output_line_info): Compute size of line info table from difference of labels. (base_type_die, add_name_attribute): Call demangle function, if any. (field_byte_offset): Use bits per word for variable length fields. (gen_array_type_die): Add array name. (gen_subprogram_die): Ignore DECL_INLINE if -fno-inline. (dwarf2out_add_library_unit_info): New function. * explow.c (set_stack_check_libfunc): New function. (stack_check_libfunc): New static variable. (probe_stack_range): Allow front-end to set up a libfunc to call. * combine.c (simplify_comparison): When making comparison in wider mode, check for having commuted an AND and a SUBREG. (contains_muldiv): New function. (try_combine): Call it when dividing a PARALLEL. (simplify_rtx, case TRUNCATE): Don't remove for umulsi3_highpart. (simplify_comparison, case ASHIFTRT): Recognize sign-extension of a PLUS. (record_value_for_reg): If TEM is a binary operation with two CLOBBERs, use one of the CLOBBERs instead. (if_then_else_cond): If comparing against zero, just return thing being compared. * optabs.c (expand_abs): If machine has MAX, ABS (x) is MAX (x, -x). Don't generate shifts and subtract if have conditional arithmetic. * rtl.h (delete_barrier): New declaration. * jump.c (jump_optimize): Set up to handle conditional call. In conditional arithmetic case, handle CALL_INSN followed by a BARRIER. (delete_barrier): New function. * rtl.c (read_rtx): Call fatal if bad RTL code; check for bad mode. * recog.c (nonmemory_operand): Accept ADDRESSOF. * tree.c (build_type_attribute_variant): Push to obstack of ttype around type_hash_canon call. * expr.c (placeholder_list): Move decl to file scope. (expand_expr): Don't force access to volatile just because its address is taken. If ignoring reference operations, just expand the operands. (expand_expr, case COMPONENT_REF): Propagate EXPAND_CONST_ADDRESS to recursive call when expanding inner. Refine test for using bitfield operations vs pointer punning. (expand_expr, case CONVERT_EXPR): If converting to BLKmode UNION_TYPE from BLKmode, just return inner object. Use proper mode in store_field call. Properly set sizes of object to store and total size in store_field call for convert to union. (expand_expr, case ARRAY_REF): If OP0 is in a register, put it in memory (like for ADDR_EXPR). Also, don't put constant in register if we'll want it in memory. (readonly_fields_p): New function. (expand_expr, case INDIRECT_REF): Call it if LHS. (expand_assignment): Handle a RESULT_DECL where DECL_RTL is a PARALLEL. (do_jump, case WITH_RECORD_EXPR): New case. (get_inner_reference): Always go inside a CONVERT_EXPR and NOP_EXPR if both modes are the same. (store_field): Use bitfield operations if size of bitsize is not same as size of RHS's type. Check for bitpos not a multiple of alignment in BLKmode case. Do block move in largest possible alignment. (store_constructor): Set BITSIZE to -1 for variable size and properly in case of array of BLKmode. (expand_expr_unaligned): New function. (do_compare_and_jump): Call it. * mips/iris5.h (SWITCHES_NEED_SPACES): New macro. * collect2.c (main): Only allow -ofoo if SWITCHES_NEED_SPACES does not include 'o'. * function.c (instantiate_virtual_regs_1, case SET): Handle case where both SET_DEST and SET_SRC reference a virtual register. (gen_mem_addressof): Copy RTX_UNCHANGING_P from new REG to old REG. * integrate.c (expand_inline_function): Handle case of setting virtual stack vars register (from built in setjmp); when parameter lives in memory, expand virtual_{stack_vars,incoming_args}_rtx early. (subst_constant): Add new parm, MEMONLY. (expand_inline_function, integrate_parm_decls): Pass new parm. (integrate_decl_tree): Likewise. (copy_rtx_and_substitute, case MEM): Do copy RTX_UNCHANGING_P. (try_constants): Call subst_constants twice, with MEMONLY 0 and 1. (copy_rtx_and_substitute, case SET): Add explicit calls to copy_rtx_and_substitute for both sides. * stmt.c (expand_asm_operands): Don't use TREE_STRING_LENGTH for constraints. (pushcase{,_range}): Convert to NOMINAL_TYPE after checking for within INDEX_TYPE, instead of before. (fixup_gotos): Use f->target_rtl, not the next insn, since latter may be from a later fixup. (expand_value_return): Correctly convert VAL when promoting function return; support RETURN_REG being a PARALLEL. (expand_return): When checking for result in regs and having cleanup, consider PARALLEL in DECL_RTL as being in regs. From-SVN: r30299
1999-11-01 02:11:22 +01:00
case IF_THEN_ELSE:
1991-12-01 06:13:56 +01:00
return reg_overlap_mentioned_p (x, body);
case TRAP_IF:
return reg_overlap_mentioned_p (x, TRAP_CONDITION (body));
case PREFETCH:
return reg_overlap_mentioned_p (x, XEXP (body, 0));
case UNSPEC:
case UNSPEC_VOLATILE:
for (i = XVECLEN (body, 0) - 1; i >= 0; i--)
if (reg_overlap_mentioned_p (x, XVECEXP (body, 0, i)))
return 1;
return 0;
1991-12-01 06:13:56 +01:00
case PARALLEL:
for (i = XVECLEN (body, 0) - 1; i >= 0; i--)
if (reg_referenced_p (x, XVECEXP (body, 0, i)))
return 1;
return 0;
case CLOBBER:
alias.c (get_alias_set, [...]): Use MEM_P. 2004-07-01 Jerry Quinn <jlquinn@optonline.net> * alias.c (get_alias_set, canon_rtx, get_addr, nonoverlapping_memrefs_p, nonlocal_referenced_p_1, memory_modified_1): Use MEM_P. * builtins.c (expand_builtin_prefetch, expand_builtin_profile_func, expand_builtin): Likewise. * calls.c (expand_call, emit_library_call_value_1, store_one_arg): Likewise. * combine.c (can_combine_p, combinable_i3pat, try_combine, find_split_point, combine_simplify_rtx, simplify_set, make_extraction, rtx_equal_for_field_assignment_p, gen_lowpart_for_combine, record_dead_and_set_regs_1, get_last_value_validate, mark_used_regs_combine, move_deaths, unmentioned_reg_p_1): Likewise. * cse.c (check_dependence, canon_hash, equiv_constant, gen_lowpart_if_possible, cse_insn, invalidate_from_clobbers, cse_around_loop, cse_check_loop_start, cse_set_around_loop, count_reg_usage): Likewise. * cselib.c (rtx_equal_for_cselib_p, add_mem_for_addr, cselib_lookup, cselib_invalidate_mem, cselib_invalidate_rtx, cselib_record_set, cselib_record_sets): Likewise. * dbxout.c (PARM_PASSED_IN_MEMORY, dbxout_symbol, dbxout_symbol_location, dbxout_parms, dbxout_reg_parms): Likewise. * ddg.c (mark_mem_use, mark_mem_store, rtx_mem_access_p): Likewise. * df.c (df_uses_record): Likewise. * dojump (do_jump): Likewise. * dwarf2out.c (stack_adjust_offset, mem_loc_descriptor, loc_descriptor_from_tree, rtl_for_decl_location, add_bound_info, decl_start_label): Likewise. * emit-rtl.c (gen_complex_constant_part, gen_highpart, operand_subword, change_address_1, make_safe_from): Likewise. * explow.c (break_out_memory_refs, copy_all_regs, validize_mem, stabilize, force_not_mem): Likewise. * expmed.c (store_bit_field, store_split_bit_field, extract_bit_field, expand_mult_const, expand_divmod, emit_store_flag): Likewise. * expr.c (convert_move, convert_modes, emit_block_move, emit_group_load, emit_group_store, clear_storage, emit_move_insn, emit_move_insn_1, expand_assignment, store_expr, store_constructor_field, store_constructor, store_field, force_operand, safe_from_p, expand_expr_real_1, expand_increment): Likewise. * final.c (cleanup_subreg_operands, alter_subreg, get_mem_expr_from_op): Likewise. * flow.c (notice_stack_pointer_modification_1, init_propagate_block_info, insn_dead_p, mark_set_1, mark_used_regs): Likewise. * function.c (mark_temp_addr_taken, preserve_temp_slots, preserve_rtl_expr_result, put_var_into_stack, fixup_var_refs_1, optimize_bit_field, flush_addressof, purge_addressof_1, instantiate_decl, instantiate_virtual_regs_1, assign_parms, setjmp_protect, setjmp_protect_args, fix_lexical_addr, keep_stack_depressed): Likewise. * ifcvt.c (noce_try_cmove_arith, noce_try_abs, noce_operand_ok, noce_process_if_block, find_memory): Likewise. * integrate.c (subst_constants, allocate_initial_values): Likewise. * local-alloc.c (validate_equiv_mem_from_store, memref_referenced_p, update_equiv_regs): Likewise. * loop.c (scan_loop, prescan_loop, note_addr_stored, check_store, maybe_eliminate_biv_1, find_mem_in_note_1): Likewise. * optabs.c (expand_abs, emit_unop_insn): Likewise. * passes.c (rest_of_handle_final): Likewise. * postreload.c (reload_cse_simplify_set, reload_cse_simplify_operands, move2add_note_store): Likewise. * ra-build.c (detect_remat_webs): Likewise. * ra-debug.c (dump_static_insn_cost): Likewise. * ra-rewrite.c (slots_overlap_p, insert_stores): Likewise. * recog.c (validate_change, apply_change_group, cancel_changes, validate_replace_rtx_1, general_operand, register_operand, nonmemory_operand, push_operand, pop_operand, memory_operand, indirect_operand, asm_operand_ok, offsettable_memref_p, offsettable_nonstrict_memref_p, constrain_operands, store_data_bypass_p): Likewise. * reg-stack.c (subst_stack_regs_pat): Likewise. * regclass.c (record_operand_costs, scan_one_insn, record_reg_classes, copy_cost, reg_scan_mark_refs): Likewise. * regmove.c (optimize_reg_copy_3, stack_memref_p, combine_stack_adjustments_for_block): Likewise. * regrename.c (copyprop_hardreg_forward_1): Likewise. * reload.c (can_reload_into, push_reload, decompose, immune_p, find_reloads, find_reloads_address, find_reloads_address_1, reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p, find_equiv_reg): Likewise. * reload1.c (reload, eliminate_regs, eliminate_regs_in_insn, reload_as_needed, choose_reload_regs, emit_input_reload_insns, do_input_reload, emit_reload_insns, gen_reload, delete_output_reload, delete_address_reloads): Likewise. * resource.c (mark_referenced_resources): Likewise. * rtlanal.c (get_jump_table_offset, count_occurrences, reg_referenced_p, reg_set_p, set_of_1, set_noop_p, reg_overlap_mentioned_p, note_uses, replace_regs, nonzero_bits1, num_sign_bit_copies1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sched-deps.c (sched_analyze_1, sched_analyze_2): Likewise. * sdbout.c (PARM_PASSED_IN_MEMORY, sdbout_symbol, sdbout_toplevel_data, sdbout_parms, sdbout_reg_parms, sdbout_global_decl): Likewise. * simplify-rtx.c (simplify_subreg): Likewise. * stmt.c (expand_asm_operands, expand_expr_stmt_value, expand_decl, expand_anon_union_decl, expand_end_case_type): Likewise. * unroll.c (calculate_giv_inc): Likewise. * var-tracking.c (stack_adjust_offset_pre_post, bb_stack_adjust_offset, track_expr_p, count_uses, add_uses, add_stores, compute_bb_dataflow, vt_get_decl_and_offset, vt_add_function_parameters): Likewise. * varasm.c (make_var_volatile, notice_global_symbol, assemble_external, decode_addr_const, mark_weak, default_encode_section_info): Likewise. From-SVN: r83980
2004-07-01 14:52:53 +02:00
if (MEM_P (XEXP (body, 0)))
if (reg_overlap_mentioned_p (x, XEXP (XEXP (body, 0), 0)))
return 1;
return 0;
case COND_EXEC:
if (reg_overlap_mentioned_p (x, COND_EXEC_TEST (body)))
return 1;
return reg_referenced_p (x, COND_EXEC_CODE (body));
default:
return 0;
1991-12-01 06:13:56 +01:00
}
}
/* Nonzero if register REG is set or clobbered in an insn between
FROM_INSN and TO_INSN (exclusive of those two). */
int
reg_set_between_p (const_rtx reg, const rtx_insn *from_insn,
const rtx_insn *to_insn)
1991-12-01 06:13:56 +01:00
{
const rtx_insn *insn;
1991-12-01 06:13:56 +01:00
if (from_insn == to_insn)
return 0;
for (insn = NEXT_INSN (from_insn); insn != to_insn; insn = NEXT_INSN (insn))
alias.c (mark_constant_function): Use INSN_P. * alias.c (mark_constant_function): Use INSN_P. (init_alias_analysis): Likewise. * combine.c (combine_instructions): Use INSN_P. (can_combine_p): Likewise. (try_combine): Likewise. (distribute_notes): Likewise. (distribute_links): Likewise. * cse.c (cse_around_loop): Use INSN_P. (invalidate_skipped_block): Likewise. (cse_set_around_loop): Likewise. (cse_end_of_basic_block): Likewise. (delete_trivially_dead_insns): Likewise. * emit-rtl.c (unshare_all_rtl_again): Use INSN_P. (unshare_all_rtl_1): Likewise. (next_cc0_user): Likewise. (try_split make_insn_raw): Likewise. (remove_unnecessary_notes): Likewise. * final.c (shorten_branches): Use INSN_P. (leaf_renumber_regs): Likewise. (leaf_renumber_regs_insn): Likewise. * flow.c (find_label_refs): Use INSN_P. (verify_wide_reg): Likewise. (notice_stack_pointer_modification): Likewise. (count_or_remove_death_notes): Likewise. (verify_flow_info): Likewise. (clear_log_links): Likewise. * function.c (fixup_var_refs_insns): Use INSN_P. (compute_insns_for_mem): Likewise. * gcse.c (alloc_gcse_mem): Use INSN_P. (compute_sets): Likewise. (compute_hash_table): Likewise. (classic_gcse): Likewise. (cprop): Likewise. (insert_insn_end_bb): Likewise. (delete_null_pointer_checks_1): Likewise. * global.c (expand_preferences): Use INSN_P. (build_insn_chain): Likewise. * graph.c (node_data): Use INSN_P. * haifa-sched.c (priority): Use INSN_P. (rm_line_notes): Likewise. (rm_other_notes): Likewise. (find_insn_reg_weight): Likewise. (init_target_units): Likewise. (schedule_block): Likewise. (compute_block_forward_dependences): Likewise. (debug_dependencies): Likewise. (set_priorities): Likewise. * integrate.c (function_cannot_inline_p): Use INSN_P. (save_parm_insns): Likewise. (copy_insn_list): Likewise. * jump.c (mark_all_labels): Use INSN_P. (never_reached_warning): Likewise. * lcm.c (optimize_mode_switching): Use INSN_P. * local-alloc.c (validate_equiv_mem): Use INSN_P. (memref_used_between_p): Likewise. (update_equiv_regs): Likewise. (block_alloc): Likewise. (no_conflict_p): Likewise. * loop.c (scan_loop): Use INSN_P. (find_and_verify_loops): Likewise. (count_loop_regs_set): Likewise. (loop_reg_used_before_p): Likewise. (strength_reduce): Likewise. (recombine_givs): Likewise. (check_dbra_loop): Likewise. (load_mems): Likewise. (try_copy_prop): Likewise. * print-rtl.c (print_rtx): Use INSN_P. * recog.c (find_single_use): Use INSN_P. * reg-stack.c (stack_regs_mentioned): Use INSN_P. (next_flags_user): Likewise. (swap_rtx_condition): Likewise. * regmove.c (mark_flags_life_zones): Use INSN_P. (optimize_reg_copy_1): Likewise. (optimize_reg_copy_2): Likewise. (optimize_reg_copy_3): Likewise. (reg_is_remote_constant_p): Likewise. (fixup_match_2): Likewise. (regmove_optimize): Likewise. (fixup_match_1): Likewise. * regrename.c (build_def_use): Use INSN_P. (replace_reg_in_block): Likewise. (consider_use): Likewise. * reload.c (find_equiv_reg): Use INSN_P. * reload1.c (reload): Use INSN_P. (maybe_fix_stack_asms): Likewise. (calculate_needs_all_insns): Likewise. (reload_as_needed): Likewise. (emit_output_reload_insns): Likewise. (delete_address_reloads_1): Likewise. (reload_cse_regs_1): Likewise. (reload_combine): Likewise. (reload_cse_move2add): Likewise. * reorg.c (redundant_insn): Use INSN_P. (dbr_schedule): Likewise. * resource.c (find_dead_or_set_registers): Use INSN_P. (mark_target_live_regs): Likewise. * rtlanal.c (reg_used_between_p): Use INSN_P. (reg_referenced_between_p): Likewise. (reg_set_between_p): Likewise. (reg_set_p): Likewise. (single_set): Likewise. (multiple_sets): Likewise. (find_last_value): Likewise. (reg_set_last): Likewise. (find_reg_note): Likewise. (find_regno_note): Likewise. * sibcall.c (sequence_uses_addressof): Use INSN_P. * simplify-rtx.c (cselib_process_insn): Use INSN_P. * ssa.c (find_evaluations): Use INSN_P. (rename_block): Likewise. (rename_equivalent_regs): Likewise. * unroll.c (loop_find_equiv_value): Use INSN_P. (set_dominates_use): Likewise. * varasm.c (mark_constant_pool): Use INSN_P. (mark_constants): Likewise. * config/alpha/alpha.c (alpha_does_function_need_gp): Use INSN_P. (alphaev4_next_group): Likewise. (alphaev5_next_group): Likewise. * config/c4x/c4x.c (c4x_process_after_reload): Use INSN_P. (c4x_rptb_rpts_p): Likewise. * config/mips/mips.c (mips16_optimize_gp): Use INSN_P. * config/rs6000/rs6000.c (uses_TOC): Use INSN_P. (rs6000_adjust_priority): Likewise. * config/sh/sh.c (sh_loop_align): Use INSN_P. (machine_dependent_reorg): Likewise. (split_branches): Likewise. * config/tahoe/tahoe.c (tahoe_cmp_check): Use INSN_P. From-SVN: r35494
2000-08-04 22:28:08 +02:00
if (INSN_P (insn) && reg_set_p (reg, insn))
1991-12-01 06:13:56 +01:00
return 1;
return 0;
}
/* Internals of reg_set_between_p. */
int
alias.c (rtx_equal_for_memref_p): Constify. * alias.c (rtx_equal_for_memref_p): Constify. * basic-block.h (const_edge, const_basic_block): New. (reg_set_to_hard_reg_set, dfs_enumerate_from, single_succ_p, single_pred_p, single_succ_edge, single_pred_edge, single_succ, single_pred, maybe_hot_bb_p, probably_cold_bb_p, probably_never_executed_bb_p, edge_probability_reliable_p, br_prob_note_reliable_p, forwarder_block_p, flow_nodes_print, inside_basic_block_p, control_flow_insn_p, dominated_by_p): Likewise. * bb-reorder.c (better_edge_p, push_to_next_round_p): Likewise. * bt-load.c (basic_block_freq, insn_sets_btr_p, can_move_up): Likewise. * cfganal.c (flow_active_insn_p, forwarder_block_p, flow_nodes_print, dfs_enumerate_from): Likewise. * cfgbuild.c (count_basic_blocks, inside_basic_block_p, control_flow_insn_p, count_basic_blocks): Likewise. * cfgloop.c (flow_bb_inside_loop_p, glb_enum_p, get_loop_body_with_size, loop_exit_edge_p): Likewise. * cfgloop.h (flow_bb_inside_loop_p, num_loop_insns, average_num_loop_insns, loop_exit_edge_p, just_once_each_iteration_p, can_duplicate_loop_p): Likewise. * cfgloopanal.c (just_once_each_iteration_p, num_loop_insns, average_num_loop_insns, seq_cost): Likewise. * cfgloopmanip.c (rpe_enum_p, can_duplicate_loop_p): Likewise. * dominance.c (dominated_by_p): Likewise. * emit-rtl.c (validate_subreg): Likewise. * except.c (can_throw_internal, can_throw_external): Likewise. * except.h (can_throw_internal, can_throw_external): Likewise. * gcse.c (gcse_constant_p, oprs_unchanged_p, oprs_anticipatable_p, oprs_available_p, hash_expr, expr_equiv_p, oprs_not_set_p, compute_transp, load_killed_in_block_p, reg_killed_on_edge, simple_mem, store_ops_ok, load_kills_store, find_loads, store_killed_in_insn, store_killed_after, store_killed_before, gcse_mem_operand, implicit_set_cond_p, store_killed_in_pat): Likewise. * ifcvt.c (count_bb_insns, cheap_bb_rtx_cost_p, noce_operand_ok, noce_mem_write_may_trap_or_fault_p): Likewise. * pointer-set.c (pointer_set_contains, pointer_map_contains): Likewise. * pointer-set.h (pointer_set_contains, pointer_map_contains): Likewise. * predict.c (can_predict_insn_p, maybe_hot_bb_p, probably_cold_bb_p, probably_never_executed_bb_p, edge_probability_reliable_p, br_prob_note_reliable_p, can_predict_insn_p): Likewise. * regclass.c (reg_set_to_hard_reg_set): Likewise. * resource.c (return_insn_p): Likewise. * rtl.h (reg_set_between_p, reg_set_p, validate_subreg): Likewise. * rtlanal.c (reg_set_between_p, reg_set_p): Likewise. * tracer.c (count_insns, ignore_bb_p, better_p): Likewise. * tree-cfg.c (verify_gimple_unary_expr, verify_gimple_binary_expr, verify_gimple_modify_stmt): Likewise. * tree-chrec.c (is_not_constant_evolution, is_multivariate_chrec_rec, is_multivariate_chrec, chrec_contains_symbols, chrec_contains_undetermined, tree_contains_chrecs, evolution_function_is_affine_multivariate_p, evolution_function_is_univariate_p, avoid_arithmetics_in_type_p, eq_evolutions_p, scev_direction): Likewise. * tree-chrec.h (automatically_generated_chrec_p, tree_is_chrec, eq_evolutions_p, is_multivariate_chrec, chrec_contains_symbols, chrec_contains_symbols_defined_in_loop, chrec_contains_undetermined, tree_contains_chrecs, evolution_function_is_affine_multivariate_p, evolution_function_is_univariate_p, chrec_zerop, evolution_function_is_constant_p, evolution_function_is_affine_p, evolution_function_is_affine_or_constant_p, tree_does_not_contain_chrecs, chrec_type): Likewise. * tree-data-ref.c (tree_fold_divides_p, object_address_invariant_in_loop_p, dr_may_alias_p, ziv_subscript_p, siv_subscript_p, gcd_of_steps_may_divide_p, same_access_functions, constant_access_functions, access_functions_are_affine_or_constant_p, find_vertex_for_stmt): Likewise. * tree-flow.h (scev_direction): Likewise. * tree-gimple.c (is_gimple_stmt): Likewise. * tree-outof-ssa.c (identical_copies_p, identical_stmt_lists_p): Likewise. * tree-pretty-print.c (op_prio): Likewise. * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop, analyzable_condition, backedge_phi_arg_p): Likewise. * tree-scalar-evolution.h (get_chrec_loop): Likewise. * tree-ssa-operands.c (get_name_decl, operand_build_cmp): Likewise. * tree-ssa-threadupdate.c (dbds_continue_enumeration_p): Likewise. From-SVN: r127404
2007-08-14 06:44:35 +02:00
reg_set_p (const_rtx reg, const_rtx insn)
1991-12-01 06:13:56 +01:00
{
/* After delay slot handling, call and branch insns might be in a
sequence. Check all the elements there. */
if (INSN_P (insn) && GET_CODE (PATTERN (insn)) == SEQUENCE)
{
for (int i = 0; i < XVECLEN (PATTERN (insn), 0); ++i)
if (reg_set_p (reg, XVECEXP (PATTERN (insn), 0, i)))
return true;
return false;
}
1991-12-01 06:13:56 +01:00
/* We can be passed an insn or part of one. If we are passed an insn,
check if a side-effect of the insn clobbers REG. */
if (INSN_P (insn)
&& (FIND_REG_INC_NOTE (insn, reg)
alias.c (nonlocal_mentioned_p, [...]): Use, LABEL_P, JUMP_P, CALL_P, NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P. 2004-07-08 Jerry Quinn <jlquinn@optonline.net> * alias.c (nonlocal_mentioned_p, nonlocal_referenced_p, nonlocal_set_p, init_alias_analysis): Use, LABEL_P, JUMP_P, CALL_P, NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P. * bb-reorder.c (mark_bb_for_unlikely_executed_section, add_labels_and_missing_jumps, find_jump_block, fix_crossing_unconditional_branches, add_reg_crossing_jump_notes): Likewise. * bt-load.c (btr_referenced_p, compute_defs_uses_and_gen, link_btr_uses, move_btr_def): Likewise. * builtins.c (expand_builtin_longjmp, expand_builtin_nonlocal_goto, expand_builtin_expect_jump): Likewise. * caller-save.c (save_call_clobbered_regs, insert_one_insn): Likewise. * calls.c (expand_call, emit_library_call_value_1): Likewise. * cfganal.c (forwarder_block_p): Likewise. * cfgbuild.c (inside_basic_block_p, count_basic_blocks, make_label_edge, rtl_make_eh_edge, make_edges, find_basic_blocks_1, find_bb_boundaries): Likewise. * cfgcleanup.c (try_simplify_condjump, try_forward_edges, merge_blocks_move_predecessor_nojumps, merge_blocks_move_successor_nojumps, insns_match_p, flow_find_cross_jump, outgoing_edges_match, try_crossjump_to_edge, try_optimize_cfg): Likewise. * cfgexpand.c (expand_block, construct_exit_block): Likewise. * cfglayout.c (skip_insns_after_block, label_for_bb, record_effective_endpoints, insn_locators_initialize, fixup_reorder_chain, update_unlikely_executed_notes): Likewise. * cfgmainloop.c (create_loop_notes): Likewise. * cfgrtl.c (delete_insn, delete_insn_chain, create_basic_block_structure, rtl_delete_block, free_bb_for_insn, update_bb_for_insn, rtl_merge_blocks, rtl_can_merge_blocks, block_label, try_redirect_by_replacing_jump, last_loop_beg_note, redirect_branch_edge, force_nonfallthru_and_redirect, rtl_tidy_fallthru_edge, back_edge_of_syntactic_loop_p, rtl_split_edge, commit_one_edge_insertion, print_rtl_with_bb, update_br_prob_note, rtl_verify_flow_info_1, rtl_verify_flow_info, purge_dead_edges, cfg_layout_redirect_edge_and_branch, cfg_layout_delete_block, cfg_layout_can_merge_blocks_p, cfg_layout_merge_blocks, rtl_block_ends_with_call_p, need_fake_edge_p, rtl_flow_call_edges_add): Likewise. * combine.c (combine_instructions, can_combine_p, try_combine, find_split_point, record_dead_and_set_regs, reg_dead_at_p, distribute_notes, distribute_links, insn_cuid): Likewise. * cse.c (fold_rtx, cse_insn, cse_around_loop, invalidate_skipped_block, cse_set_around_loop, cse_end_of_basic_block, cse_main, cse_basic_block, cse_condition_code_reg): Likewise. * cselib.c (cselib_process_insn): Likewise. * ddg.c (create_ddg): Likewise. * df.c (df_insn_refs_record, df_bb_rd_local_compute, df_insns_modify): Likewise. * dwarf2out.c (dwarf2out_stack_adjust, dwarf2out_frame_debug, gen_label_die, dwarf2out_var_location): Likewise. * emit-rtl.c (get_first_nonnote_insn, get_last_nonnote_insn, next_insn, previous_insn, next_nonnote_insn, prev_nonnote_insn, last_call_insn, active_insn_p, next_label, prev_label, link_cc0_insns, next_cc0_user, try_split, add_insn_after, add_insn_before, remove_insn, add_function_usage_to, reorder_insns, find_line_note, remove_unnecessary_notes, emit_insn_after_1, classify_insn): Likewise. * except.c (convert_from_eh_region_ranges_1, emit_to_new_bb_before, connect_post_landing_pads, sjlj_mark_call_sites, sjlj_emit_function_enter, sjlj_emit_function_exit, reachable_handlers, can_throw_internal, can_throw_external, set_nothrow_function_flags, convert_to_eh_region_ranges): Likewise. * explow.c (optimize_save_area_alloca): Likewise. * expr.c (expand_expr_real): Likewise. * final.c (insn_current_reference_address, compute_alignments, shorten_branches, final, scan_ahead_for_unlikely_executed_note, final_scan_insn, output_asm_label, leaf_function_p): Likewise. * flow.c (first_insn_after_basic_block_note, delete_dead_jumptables, propagate_block_delete_insn, propagate_one_insn, init_propagate_block_info, propagate_block, libcall_dead_p, mark_set_1, attempt_auto_inc, find_auto_inc, try_pre_increment): Likewise. * function.c (instantiate_virtual_regs, reorder_blocks_1, expand_function_start, expand_function_end, contains, thread_prologue_and_epilogue_insns, reposition_prologue_and_epilogue_notes): Likewise. * gcse.c (constprop_register, bypass_conditional_jumps, insert_insn_end_bb, gcse_after_reload): Likewise. * genemit.c (gen_expand, gen_split): Likewise. * genpeep.c (gen_peephole, main): Likewise. * global.c (build_insn_chain): Likewise. * graph.c (node_data, print_rtl_graph_with_bb): Likewise. * haifa-sched.c (unlink_other_notes, unlink_line_notes, get_block_head_tail, no_real_insns_p, rm_line_notes, save_line_notes, restore_line_notes, rm_redundant_line_notes, rm_other_notes, ok_for_early_queue_removal, set_priorities, sched_init): Likewise. * ifcvt.c (count_bb_insns, first_active_insn, last_active_insn, cond_exec_process_insns, end_ifcvt_sequence, noce_process_if_block, merge_if_block, block_jumps_and_fallthru_p, find_if_block, dead_or_predicable): Likewise. * integrate.c (try_constants): Likewise. * jump.c (rebuild_jump_labels, cleanup_barriers, purge_line_number_notes, init_label_info, mark_all_labels, squeeze_notes, get_label_before, get_label_after, reversed_comparison_code_parts, simplejump_p, pc_set, returnjump_p, onlyjump_p, follow_jumps, mark_jump_label, delete_barrier, delete_prior_computation, delete_computation, delete_related_insns, delete_for_peephole, redirect_jump): Likewise. * lcm.c (optimize_mode_switching): Likewise. * local-alloc.c (validate_equiv_mem, update_equiv_regs, block_alloc): Likewise. * loop-doloop.c (doloop_valid_p, doloop_optimize): Likewise. * loop-invariant.c (find_exits, find_invariants_bb): Likewise. * loop-iv.c (simplify_using_assignment): Likewise. * loop.c (compute_luids, loop_optimize, scan_loop, libcall_other_reg, libcall_benefit, skip_consec_insns, move_movables, prescan_loop, find_and_verify_loops, labels_in_range_p, for_each_insn_in_loop, loop_bivs_init_find, strength_reduce, check_insn_for_bivs, check_insn_for_givs, check_final_value, update_giv_derive, basic_induction_var, product_cheap_p, check_dbra_loop, loop_insn_first_p, last_use_this_basic_block, canonicalize_condition, get_condition, loop_regs_scan, load_mems, try_copy_prop, LOOP_BLOCK_NUM, loop_dump_aux): Likewise. * modulo-sched.c (doloop_register_get, find_line_note, sms_schedule, sms_schedule_by_order): Likewise. * optabs.c (emit_no_conflict_block, emit_libcall_block): Likewise. * postreload.c (reload_cse_simplify_operands, reload_combine, reload_cse_move2add): Likewise. * predict.c (can_predict_insn_p, estimate_probability, expected_value_to_br_prob, process_note_predictions): Likewise. * print-rtl.c (print_rtx, print_rtl, print_rtl_single): Likewise. * profile.c (branch_prob): Likewise. * ra-build.c (live_out_1, livethrough_conflicts_bb, detect_webs_set_in_cond_jump): Likewise. * ra-debug.c (ra_print_rtx_object, ra_debug_insns, ra_print_rtl_with_bb): Likewise. * ra-rewrite.c (insert_stores, rewrite_program2): Likewise. * recog.c (next_insn_tests_no_inequality, find_single_use, split_all_insns, peephole2_optimize, if_test_bypass_p): Likewise. * reg-stack.c (next_flags_user, record_label_references, emit_swap_insn, swap_rtx_condition, subst_stack_regs, compensate_edge, convert_regs_1): Likewise. * regclass.c (scan_one_insn): Likewise. * regmove.c (optimize_reg_copy_1, optimize_reg_copy_2, fixup_match_2, regmove_optimize, fixup_match_1, single_set_for_csa, combine_stack_adjustments_for_block): Likewise. * regrename.c (build_def_use, copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads, find_reloads_address_1, subst_reloads, find_equiv_reg): Likewise. * reload1.c (reload, calculate_needs_all_insns, set_label_offsets, reload_as_needed, emit_input_reload_insns, do_output_reload, delete_output_reload, delete_address_reloads_1, fixup_abnormal_edges): Likewise. * reorg.c (find_end_label, emit_delay_sequence, delete_from_delay_slot, delete_scheduled_jump, optimize_skip, get_jump_flags, rare_destination, mostly_true_jump, try_merge_delay_insns, redundant_insn, own_thread_p, fill_simple_delay_slots, fill_slots_from_thread, fill_eager_delay_slots, relax_delay_slots, make_return_insns, dbr_schedule): Likewise. * resource.c (find_basic_block, next_insn_no_annul, find_dead_or_set_registers, mark_target_live_regs): Likewise. * rtl.h (RTX_PREV): Likewise. * rtlanal.c (global_reg_mentioned_p, no_labels_between_p, no_jumps_between_p, reg_used_between_p, reg_referenced_between_p, reg_set_p, find_last_value, dead_or_set_regno_p, find_reg_fusage, find_regno_fusage, pure_call_p, replace_label, rtx_referenced_p_1, tablejump_p, computed_jump_p, insns_safe_to_move_p, find_first_parameter_load, can_hoist_insn_p): Likewise. * sched-deps.c (get_condition, add_dependence, sched_analyze_2, sched_analyze_insn, sched_analyze, add_forward_dependence): Likewise. * sched-ebb.c (fix_basic_block_boundaries, add_deps_for_risky_insns, schedule_ebbs): Likewise. * sched-rgn.c (is_cfg_nonregular, find_conditional_protection, is_conditionally_protected, can_schedule_ready_p, add_branch_dependences, debug_dependencies): Likewise. * stmt.c (emit_nop, expand_start_case, emit_jump_if_reachable): Likewise. * unroll.c (unroll_loop, copy_loop_body, back_branch_in_range_p, reg_dead_after_loop, loop_find_equiv_value, loop_iterations, set_dominates_use, ujump_to_loop_cont): Likewise. * var-tracking.c (prologue_stack_adjust, vt_initialize): Likewise. * varasm.c (output_constant_pool_1): Likewise. From-SVN: r84341
2004-07-09 05:29:35 +02:00
|| (CALL_P (insn)
alias.c (record_set, [...]): Use REG_P. 2004-06-15 Jerry Quinn <jlquinn@optonline.net> * alias.c (record_set, record_base_value, canon_rtx, get_addr, nonlocal_mentioned_p_1, init_alias_analysis): Use REG_P. * bt-load.c (find_btr_reference, insn_sets_btr_p, note_btr_set): Likewise. * builtins.c (expand_builtin_setjmp, expand_builtin_apply, expand_builtin_mathfn, expand_builtin_strlen, expand_builtin_memcmp, expand_builtin_strcmp, expand_builtin_strncmp, expand_builtin_frame_address): Likewise. * caller-save.c (mark_set_regs, add_stored_regs, mark_referenced_regs, insert_one_insn): Likewise. * calls.c (prepare_call_address, precompute_register_parameters, precompute_arguments, expand_call, emit_library_call_value_1): Likewise. * cfganal.c (flow_active_insn_p): Likewise. * combine.c (set_nonzero_bits_and_sign_copies, can_combine_p, combinable_i3pat, try_combine, find_split_point, COMBINE_RTX_EQUAL_P, subst, combine_simplify_rtx, simplify_if_then_else, simplify_set, make_extraction, recog_for_combine, gen_lowpart_for_combine, simplify_comparison, record_dead_and_set_regs_1, record_dead_and_set_regs, record_promoted_value, check_promoted_subreg, get_last_value_validate, get_last_value, reg_dead_at_p_1, reg_bitfield_target_p, distribute_notes, unmentioned_reg_p_1): Likewise. * conflict.c (mark_reg): Likewise. * cse.c (HASH, COST, COST_IN, approx_reg_cost_1, notreg_cost, mention_regs, insert_regs, lookup, lookup_for_remove, insert, merge_equiv_classes, flush_hash_table, invalidate, remove_invalid_refs, remove_invalid_subreg_refs, rehash_using_reg, invalidate_for_call, use_related_value, canon_hash, exp_equiv_p, cse_rtx_varies_p, canon_reg, find_best_addr, fold_rtx, equiv_constant, record_jump_cond, cse_insn, addr_affects_sp_p, invalidate_from_clobbers, cse_process_notes, cse_around_loop, cse_set_around_loop, count_reg_usage, set_live_p, cse_change_cc_mode, cse_cc_succs, cse_condition_code_reg): Likewise. * cselib.c (cselib_reg_set_mode, rtx_equal_for_cselib_p, cselib_lookup, cselib_invalidate_regno, cselib_invalidate_rtx, cselib_record_set, cselib_record_sets): Likewise. * dbxout.c (dbxout_symbol_location, dbxout_parms, dbxout_reg_parms, dbxout_block): Likewise. * df.c (df_ref_record, df_def_record_1, df_uses_record): Likewise. * dojump.c (do_jump): Likewise. * dwarf2out.c (dwarf2out_frame_debug_expr, is_pseudo_reg, is_based_loc, rtl_for_decl_location): Likewise. * emit-rtl.c (set_reg_attrs_for_parm, set_decl_rtl, set_decl_incoming_rtl, mark_user_reg): Likewise. * explow.c (copy_all_regs, copy_all_regs, memory_address, force_reg, copy_to_suggested_reg, allocate_dynamic_stack_space, probe_stack_range, hard_function_value): Likewise. * expmed.c (store_bit_field, store_fixed_bit_field, store_split_bit_field, extract_bit_field, extract_fixed_bit_field, extract_split_bit_field, expand_divmod, emit_store_flag_force): Likewise. * expr.c (convert_move, convert_modes, block_move_libcall_safe_for_call_parm, emit_group_load, use_reg, use_group_regs, emit_move_insn, emit_move_insn_1, compress_float_constant, push_block, emit_single_push_insn, emit_push_insn, get_subtarget, expand_assignment, store_expr, store_constructor, store_field, force_operand, safe_from_p, expand_expr_real_1, expand_increment, do_store_flag, do_tablejump): Likewise. * final.c (profile_function, final_scan_insn, alter_subreg, get_mem_expr_from_op, output_asm_operand_names, output_operand, only_leaf_regs_used, leaf_renumber_regs_insn): Likewise. * flow.c (verify_wide_reg_1, mark_regs_live_at_end, find_regno_partial, propagate_one_insn, init_propagate_block_info, insn_dead_p, libcall_dead_p, mark_set_1, not_reg_cond, attempt_auto_inc, find_auto_inc, mark_used_regs, count_or_remove_death_notes_bb): Likewise. * function.c (find_temp_slot_from_address, update_temp_slot_address, preserve_temp_slots, put_var_into_stack, fixup_var_refs_insn, fixup_var_refs_1, fixup_stack_1, optimize_bit_field, flush_addressof, put_addressof_into_stack, purge_addressof_1, insns_for_mem_walk, purge_single_hard_subreg_set, instantiate_decl, instantiate_virtual_regs_1, aggregate_value_p, assign_parms, promoted_input_arg, setjmp_vars_warning, setjmp_args_warning, setjmp_protect, setjmp_protect_args, fix_lexical_addr, expand_function_start, diddle_return_value, clobber_return_register, expand_function_end, keep_stack_depressed, handle_epilogue_set, update_epilogue_consts): Likewise. * genemit.c (gen_exp, gen_insn): Likewise. * genrecog.c (make_insn_sequence): Likewise. * global.c (global_conflicts, expand_preferences, mark_reg_store, mark_reg_conflicts, set_preference, reg_becomes_live, build_insn_chain, mark_reg_change): Likewise. * haifa_sched.c (CONST_BASED_ADDRESS_P, find_set_reg_weight): Likewise. * ifcvt.c (noce_try_abs, noce_get_condition, noce_process_if_block): Likewise. * integrate.c (copy_rtx_and_substitute, try_constants, subst_constants, mark_stores, allocate_initial_values): Likewise. * jump.c (reversed_comparison_code_parts, delete_prior_computation, delete_computation, rtx_renumbered_equal_p, true_regnum, reg_or_subregno): Likewise. * lcm.c (reg_dies, reg_becomes_live): Likewise. * local-alloc.c (validate_equiv_mem_from_store, validate_equiv_mem, update_equiv_regs, no_equiv, block_alloc, combine_regs, reg_is_set, wipe_dead_reg, no_conflict_p): Likewise. * loop-iv.c (simple_reg_p, simple_set_p, kill_sets, iv_get_reaching_def, iv_analyze_biv, altered_reg_used, mark_altered, simple_rhs_p, simplify_using_assignment, implies_p): Likewise. * loop.c (scan_loop, combine_movables, rtx_equal_for_loop_p, move_movables, note_set_pseudo_multiple_uses, consec_sets_invariant_p, find_single_use_in_loop, count_one_set, loop_bivs_init_find, loop_givs_rescan, check_insn_for_bivs, check_insn_for_givs, valid_initial_value_p, simplify_giv_expr, consec_sets_giv, loop_regs_update, check_dbra_loop, maybe_eliminate_biv, maybe_eliminate_biv_1, record_initial, update_reg_last_use, canonicalize_condition, loop_regs_scan, load_mems, try_copy_prop, try_swap_copy_prop): Likewise. * optabs.c (expand_binop, expand_vector_binop, expand_vector_unop, expand_abs, emit_no_conflict_block, emit_libcall_block, expand_float): Likewise. * postreload.c (reload_cse_simplify, reload_cse_simplify_set, reload_cse_simplify_operands, reload_combine, reload_combine_note_store, reload_combine_note_use, reload_cse_move2add, move2add_note_store): Likewise. * print-rtl.c (print_rtx): Likewise. * ra-build.c (copy_insn_p, remember_move, init_one_web_common, contains_pseudo, handle_asm_insn): Likewise. * ra-debug.c (ra_print_rtx_object, dump_constraints, dump_static_insn_cost): Likewise. * ra-rewrite.c (slots_overlap_p, emit_colors, remove_suspicious_death_notes): Likewise. * recog.c (validate_replace_rtx_1, find_single_use_1, find_single_use, register_operand, scratch_operand, nonmemory_operand, constrain_operands): Likewise. * reg-stack (check_asm_stack_operands, remove_regno_note, emit_swap_insn, swap_rtx_condition, subst_stack_regs_pat, subst_asm_stack_regs): Likewise. * regclass.c (scan_one_insn, record_reg_classes, copy_cost, record_address_regs, reg_scan_mark_refs): Likewise. * regmove.c (discover_flags_reg, replacement_quality, copy_src_to_dest, reg_is_remote_constant_p, regmove_optimize, fixup_match_1): Likewise. * regrename.c (note_sets, clear_dead_regs, build_def_use, kill_value, kill_set_value, copyprop_hardreg_forward_1): Likewise. * reload.c (MATCHES, push_secondary_reload, find_reusable_reload, reload_inner_reg_of_subreg, can_reload_into, push_reload, combine_reloads, find_dummy_reload, hard_reg_set_here_p, operands_match_p, decompose, find_reloads, find_reloads_toplev, find_reloads_address, subst_indexed_address, find_reloads_address_1, find_reloads_subreg_address, find_replacement, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p, find_equiv_reg, regno_clobbered_p): Likewise. * reload1.c (replace_pseudos_in, reload, calculate_needs_all_insns, find_reg, delete_dead_insn, alter_reg, eliminate_regs, elimination_effects, eliminate_regs_in_insn, scan_paradoxical_subregs, forget_old_reloads_1, reload_reg_free_for_value_p, choose_reload_regs, emit_input_reload_insns, emit_output_reload_insns, do_input_reload, do_output_reload, emit_reload_insns, gen_reload, delete_address_reloads_1, inc_for_reload): Likewise. * reorg.c (update_reg_dead_notes, fix_reg_dead_note, update_reg_unused_notes, fill_slots_from_thread): Likewise. * resource.c (update_live_status, mark_referenced_resources, mark_set_resources, mark_target_live_regs): Likewise. * rtlanal.c (nonzero_address_p, get_jump_table_offset, global_reg_mentioned_p_1, reg_mentioned_p, reg_referenced_p, reg_set_p, set_noop_p, find_last_value, refers_to_regno_p, note_stores, dead_or_set_p, dead_or_set_regno_p, find_regno_note, find_reg_fusage, find_regno_fusage, replace_regs, regno_use_in, parms_set, find_first_parameter_load, keep_with_call_p, hoist_test_store, hoist_update_store, address_cost, nonzero_bits1, num_sign_bit_copies1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sched-deps.c (deps_may_trap_p, sched_analyze_1, sched_analyze_insn, sched_analyze): Likewise. * sched-rgn.c (check_live_1, update_live_1, sets_likely_spilled_1): Likewise. * sdbout.c (sdbout_symbol, sdbout_parms, sdbout_reg_parms): Likewise. * simplify-rtx.c (simplify_replace_rtx, simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_subreg): Likewise. * stmt.c (decl_conflicts_with_clobbers_p, expand_asm_operands, expand_end_stmt_expr, expand_return, expand_decl, expand_anon_union_decl): Likewise. * unroll.c (precondition_loop_p, calculate_giv_inc, copy_loop_body, find_splittable_regs, find_splittable_givs, find_common_reg_term, loop_iterations): Likewise. * var-tracking.c (variable_union, variable_part_different_p, variable_different_p, count_uses, add_uses, add_stores, compute_bb_dataflow, set_variable_part, delete_variable_part, emit_notes_in_bb, vt_get_decl_and_offset, vt_add_function_parameters): Likewise. * varasm.c (assemble_variable): Likewise. From-SVN: r83195
2004-06-15 20:02:40 +02:00
&& ((REG_P (reg)
&& REGNO (reg) < FIRST_PSEUDO_REGISTER
&& overlaps_hard_reg_set_p (regs_invalidated_by_call,
GET_MODE (reg), REGNO (reg)))
alias.c (get_alias_set, [...]): Use MEM_P. 2004-07-01 Jerry Quinn <jlquinn@optonline.net> * alias.c (get_alias_set, canon_rtx, get_addr, nonoverlapping_memrefs_p, nonlocal_referenced_p_1, memory_modified_1): Use MEM_P. * builtins.c (expand_builtin_prefetch, expand_builtin_profile_func, expand_builtin): Likewise. * calls.c (expand_call, emit_library_call_value_1, store_one_arg): Likewise. * combine.c (can_combine_p, combinable_i3pat, try_combine, find_split_point, combine_simplify_rtx, simplify_set, make_extraction, rtx_equal_for_field_assignment_p, gen_lowpart_for_combine, record_dead_and_set_regs_1, get_last_value_validate, mark_used_regs_combine, move_deaths, unmentioned_reg_p_1): Likewise. * cse.c (check_dependence, canon_hash, equiv_constant, gen_lowpart_if_possible, cse_insn, invalidate_from_clobbers, cse_around_loop, cse_check_loop_start, cse_set_around_loop, count_reg_usage): Likewise. * cselib.c (rtx_equal_for_cselib_p, add_mem_for_addr, cselib_lookup, cselib_invalidate_mem, cselib_invalidate_rtx, cselib_record_set, cselib_record_sets): Likewise. * dbxout.c (PARM_PASSED_IN_MEMORY, dbxout_symbol, dbxout_symbol_location, dbxout_parms, dbxout_reg_parms): Likewise. * ddg.c (mark_mem_use, mark_mem_store, rtx_mem_access_p): Likewise. * df.c (df_uses_record): Likewise. * dojump (do_jump): Likewise. * dwarf2out.c (stack_adjust_offset, mem_loc_descriptor, loc_descriptor_from_tree, rtl_for_decl_location, add_bound_info, decl_start_label): Likewise. * emit-rtl.c (gen_complex_constant_part, gen_highpart, operand_subword, change_address_1, make_safe_from): Likewise. * explow.c (break_out_memory_refs, copy_all_regs, validize_mem, stabilize, force_not_mem): Likewise. * expmed.c (store_bit_field, store_split_bit_field, extract_bit_field, expand_mult_const, expand_divmod, emit_store_flag): Likewise. * expr.c (convert_move, convert_modes, emit_block_move, emit_group_load, emit_group_store, clear_storage, emit_move_insn, emit_move_insn_1, expand_assignment, store_expr, store_constructor_field, store_constructor, store_field, force_operand, safe_from_p, expand_expr_real_1, expand_increment): Likewise. * final.c (cleanup_subreg_operands, alter_subreg, get_mem_expr_from_op): Likewise. * flow.c (notice_stack_pointer_modification_1, init_propagate_block_info, insn_dead_p, mark_set_1, mark_used_regs): Likewise. * function.c (mark_temp_addr_taken, preserve_temp_slots, preserve_rtl_expr_result, put_var_into_stack, fixup_var_refs_1, optimize_bit_field, flush_addressof, purge_addressof_1, instantiate_decl, instantiate_virtual_regs_1, assign_parms, setjmp_protect, setjmp_protect_args, fix_lexical_addr, keep_stack_depressed): Likewise. * ifcvt.c (noce_try_cmove_arith, noce_try_abs, noce_operand_ok, noce_process_if_block, find_memory): Likewise. * integrate.c (subst_constants, allocate_initial_values): Likewise. * local-alloc.c (validate_equiv_mem_from_store, memref_referenced_p, update_equiv_regs): Likewise. * loop.c (scan_loop, prescan_loop, note_addr_stored, check_store, maybe_eliminate_biv_1, find_mem_in_note_1): Likewise. * optabs.c (expand_abs, emit_unop_insn): Likewise. * passes.c (rest_of_handle_final): Likewise. * postreload.c (reload_cse_simplify_set, reload_cse_simplify_operands, move2add_note_store): Likewise. * ra-build.c (detect_remat_webs): Likewise. * ra-debug.c (dump_static_insn_cost): Likewise. * ra-rewrite.c (slots_overlap_p, insert_stores): Likewise. * recog.c (validate_change, apply_change_group, cancel_changes, validate_replace_rtx_1, general_operand, register_operand, nonmemory_operand, push_operand, pop_operand, memory_operand, indirect_operand, asm_operand_ok, offsettable_memref_p, offsettable_nonstrict_memref_p, constrain_operands, store_data_bypass_p): Likewise. * reg-stack.c (subst_stack_regs_pat): Likewise. * regclass.c (record_operand_costs, scan_one_insn, record_reg_classes, copy_cost, reg_scan_mark_refs): Likewise. * regmove.c (optimize_reg_copy_3, stack_memref_p, combine_stack_adjustments_for_block): Likewise. * regrename.c (copyprop_hardreg_forward_1): Likewise. * reload.c (can_reload_into, push_reload, decompose, immune_p, find_reloads, find_reloads_address, find_reloads_address_1, reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p, find_equiv_reg): Likewise. * reload1.c (reload, eliminate_regs, eliminate_regs_in_insn, reload_as_needed, choose_reload_regs, emit_input_reload_insns, do_input_reload, emit_reload_insns, gen_reload, delete_output_reload, delete_address_reloads): Likewise. * resource.c (mark_referenced_resources): Likewise. * rtlanal.c (get_jump_table_offset, count_occurrences, reg_referenced_p, reg_set_p, set_of_1, set_noop_p, reg_overlap_mentioned_p, note_uses, replace_regs, nonzero_bits1, num_sign_bit_copies1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sched-deps.c (sched_analyze_1, sched_analyze_2): Likewise. * sdbout.c (PARM_PASSED_IN_MEMORY, sdbout_symbol, sdbout_toplevel_data, sdbout_parms, sdbout_reg_parms, sdbout_global_decl): Likewise. * simplify-rtx.c (simplify_subreg): Likewise. * stmt.c (expand_asm_operands, expand_expr_stmt_value, expand_decl, expand_anon_union_decl, expand_end_case_type): Likewise. * unroll.c (calculate_giv_inc): Likewise. * var-tracking.c (stack_adjust_offset_pre_post, bb_stack_adjust_offset, track_expr_p, count_uses, add_uses, add_stores, compute_bb_dataflow, vt_get_decl_and_offset, vt_add_function_parameters): Likewise. * varasm.c (make_var_volatile, notice_global_symbol, assemble_external, decode_addr_const, mark_weak, default_encode_section_info): Likewise. From-SVN: r83980
2004-07-01 14:52:53 +02:00
|| MEM_P (reg)
|| find_reg_fusage (insn, CLOBBER, reg)))))
return true;
1991-12-01 06:13:56 +01:00
return set_of (reg, insn) != NULL_RTX;
1991-12-01 06:13:56 +01:00
}
/* Similar to reg_set_between_p, but check all registers in X. Return 0
only if none of them are modified between START and END. Return 1 if
cgraph.c: Fix typos in comments. gcc/ * cgraph.c: Fix typos in comments. (cgraph_availability_names): Fix string typo. * fold-const.c: Fix typos in comments. (fold_binary): Fix typo in warning. * genautomata.c: Fix typos in comments. (check_presence_pattern_sets): Fix typo in local variable. (output_description): Fix typo in output. * ggc-zone.c (ggc_pch_finish): Fix typo in error message. * hwint.h: Likewise. * matrix-reorg.c (check_allocation_function): Likewise. * omega.c (smooth_weird_equations): Likewise. * auto-inc-dec.c: Fix typos in comments. * bb-reorder.c: Likewise. * builtins.c: Likewise. * c-common.c: Likewise. * c-cppbuiltin.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfglayout.c: Likewise. * cfgloopmanip.c: Likewise. * cgraphunit.c: Likewise. * coverage.c: Likewise. * dbxout.c: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dfp.c: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * dse.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * function.c: Likewise. * function.h: Likewise. * gcc.c: Likewise. * gcov-io.c: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattrtab.c: Likewise. * ggc-page.c: Likewise. * gimplify.c: Likewise. * gthr-lynx.h: Likewise. * haifa-sched.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.h: Likewise. * ipa-pure-const.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa.c: Likewise. * loop-doloop.c: Likewise. * mips-tfile.c: Likewise. * mkmap-flat.awk: Likewise. * mkmap-symver.awk: Likewise. * modulo-sched.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts.c: Likewise. * passes.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * pretty-print.h: Likewise. * profile.c: Likewise. * protoize.c: Likewise. * ra-conflict.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * regclass.c: Likewise. * regs.h: Likewise. * reload.c: Likewise. * rtl-error.c: Likewise. * rtlanal.c: Likewise. * scan.h: Likewise. * sched-rgn.c: Likewise. * see.c: Likewise. * stmt.c: Likewise. * target.h: Likewise. * tree-dfa.c: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-alias-warnings.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa.c: Likewise. * tree-vect-analyze.c: Likewise. * tree-vect-transform.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vn.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * unwind-dw2-fde.c: Likewise. * unwind.inc: Likewise. * value-prof.c: Likewise. * vmsdbgout.c: Likewise. From-SVN: r136425
2008-06-06 07:42:00 +02:00
X contains a MEM; this routine does use memory aliasing. */
1991-12-01 06:13:56 +01:00
int
modified_between_p (const_rtx x, const rtx_insn *start, const rtx_insn *end)
1991-12-01 06:13:56 +01:00
{
alias.c (memory_modified_1, [...]): Constify. * alias.c (memory_modified_1, memory_modified_in_insn_p): Constify. * basic-block.h (tree_predicted_by_p, rtl_predicted_by_p): Likewise. * bb-reorder.c (copy_bb_p): Likewise. * cfghooks.c (can_remove_branch_p, can_merge_blocks_p, predicted_by_p, can_duplicate_block_p, block_ends_with_call_p, block_ends_with_condjump_p): Likewise. * cfghooks.h (can_remove_branch_p, can_merge_blocks_p, predicted_by_p, can_duplicate_block_p, block_ends_with_call_p, block_ends_with_condjump_p): Likewise. * cfglayout.c (cfg_layout_can_duplicate_bb_p): Likewise. * cfgrtl.c (can_delete_note_p, can_delete_label_p, rtl_can_merge_blocks, cfg_layout_can_merge_blocks_p, rtl_block_ends_with_call_p, rtl_block_ends_with_condjump_p, need_fake_edge_p, rtl_can_remove_branch_p): Likewise. * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Use debug_true_const_tree instad of debug_true_tree. * debug.c (do_nothing_debug_hooks): Likewise. * debug.h (ignore_block, debug_true_const_tree): Constify. * dwarf2out.c (stack_adjust_offset, clobbers_queued_reg_save, dwarf2out_ignore_block, is_pseudo_reg, is_tagged_type, decl_ultimate_origin, block_ultimate_origin, lookup_decl_loc, same_dw_val_p, add_ranges, is_subrange_type, type_is_enum, dbx_reg_number, is_based_loc, field_type, simple_type_align_in_bits, simple_decl_align_in_bits, simple_type_size_in_bits, field_byte_offset, insert_float, type_tag, member_declared_type, is_redundant_typedef, secname_for_decl, is_inlined_entry_point): Likewise. * emit-rtl.c (const_next_insn, const_previous_insn, const_next_nonnote_insn, const_prev_nonnote_insn, const_next_real_insn, const_prev_real_insn, const_next_active_insn, const_prev_active_insn, const_next_label, const_prev_label): Likewise. * except.h (lookup_stmt_eh_region_fn, lookup_stmt_eh_region): Likewise. * haifa-sched.c (may_trap_exp, haifa_classify_insn, find_set_reg_weight, no_real_insns_p, find_set_reg_weight, sched_insn_is_legitimate_for_speculation_p): Likewise. * jump.c (reversed_comparison_code_parts, reversed_comparison_code, reversed_comparison, condjump_label): Likewise. * predict.c (rtl_predicted_by_p, tree_predicted_by_p): Likewise. * reg-stack.c (stack_regs_mentioned_p, stack_regs_mentioned): Likewise. * rtl.h (const_previous_insn, const_next_insn, const_prev_nonnote_insn, const_next_nonnote_insn, const_prev_real_insn, const_next_real_insn, const_prev_active_insn, const_next_active_insn, const_prev_label, const_next_label, modified_between_p, modified_in_p, const_note_storeskeep_with_call_p, condjump_label, reversed_comparison, reversed_comparison_code, reversed_comparison_code_parts, memory_modified_in_insn_p, stack_regs_mentioned): Likewise. * rtlanal.c (modified_between_p, modified_in_p, const_note_stores, keep_with_call_p): Likewise. * sched-deps.c (deps_may_trap_p, sched_get_condition, conditions_mutex_p, sched_insns_conditions_mutex_psd_next_list, sd_lists_size, sd_lists_empty_p): Likewise. * sched-int.h (sched_insns_conditions_mutex_p, haifa_classify_insn, no_real_insns_p, sched_insn_is_legitimate_for_speculation_p, sd_next_list, sd_lists_size, sd_lists_empty_p): Likewise. * sdbout.c (sdb_debug_hooks): Likewise. * tree-cfg.c (tree_can_merge_blocks_p, is_ctrl_altering_stmt, stmt_ends_bb_p, tree_can_remove_branch_p, tree_can_duplicate_bb_p, -tree_block_ends_with_call_p, tree_block_ends_with_condjump_p): Likewise. * tree-eh.c (lookup_stmt_eh_region_fn, lookup_stmt_eh_region, tree_can_throw_internal): Likewise. * tree-flow-inline.h (phi_nodes): Likewise. * tree-flow.h (phi_nodesstmt_ends_bb_p, is_ctrl_altering_stmt, tree_can_throw_internal, lookup_stmt_eh_region): Likewise. * tree-gimple.c (const_get_call_expr_in): Likewise. * tree-gimple.h (const_get_call_expr_in): Likewise. * tree.c (const_lookup_attribute, attribute_list_equal, attribute_list_contained): Likewise. * tree.h (attribute_list_equal, attribute_list_contained, const_lookup_attribute): Likewise. * vmsdbgout.c (vmsdbgout_ignore_block): Likewise. From-SVN: r127824
2007-08-27 05:45:06 +02:00
const enum rtx_code code = GET_CODE (x);
rtl.h (rtx_format): Constify a char*. * rtl.h (rtx_format): Constify a char*. * rtl.c (rtx_format): Likewise. (copy_rtx, copy_most_rtx, read_rtx): Likewise. (init_rtl): Use accessor macro, not `rtx_format'. * alias.c (rtx_equal_for_memref_p, find_symbolic_term): Constify a char*. * caller-save.c (mark_referenced_regs): Likewise. * combine.c (subst, make_compound_operation, known_cond, gen_rtx_combine, update_table_tick, get_last_value_validate, use_crosses_set_p, mark_used_regs_combine, move_deaths): Likewise. * cse.c (rtx_cost, mention_regs, canon_hash, exp_equiv_p, refers_to_p, canon_reg, fold_rtx, cse_process_notes, count_reg_usage): Likewise. * emit-rtl.c (gen_rtx, copy_rtx_if_shared, reset_used_flags): Likewise. * final.c (leaf_renumber_regs_insn): Likewise. * flow.c (mark_used_regs, find_use_as_address, dump_flow_info, dump_edge_info, count_reg_references): Likewise. * function.c (fixup_var_refs_1, walk_fixup_memory_subreg, fixup_stack_1, purge_addressof_1, instantiate_virtual_regs_1): Likewise. * gcse.c (oprs_unchanged_p, hash_expr_1, expr_equiv_p, oprs_not_set_p, expr_killed_p, compute_transp, find_used_regs, add_label_notes): Likewise. * genattrtab.c (attr_rtx, attr_copy_rtx, encode_units_mask, clear_struct_flag, count_sub_rtxs, count_alternatives, compares_alternatives_p, contained_in_p, walk_attr_value, write_expr_attr_cache): Likewise. * genconfig.c (walk_insn_part): Likewise. * genemit.c (max_operand_1, gen_exp): Likewise. * genextract.c (walk_rtx): Likewise. * genflags.c (num_operands): Likewise. * genoutput.c (scan_operands): Likewise. * genpeep.c (match_rtx): Likewise. * genrecog.c (add_to_sequence): Likewise. * haifa-sched.c (may_trap_exp, sched_analyze_2, attach_deaths): Likewise. * integrate.c (save_constants, copy_for_inline, copy_rtx_and_substitute, subst_constants, restore_constants): Likewise. * jump.c (mark_jump_label, invert_exp, redirect_exp, rtx_renumbered_equal_p, rtx_equal_for_thread_p): Likewise. * local-alloc.c (contains_replace_regs, memref_referenced_p): Likewise. * loop.c (record_excess_regs, rtx_equal_for_loop_p, add_label_notes, replace_call_address, count_nonfixed_reads, invariant_p, find_single_use_in_loop, find_mem_givs, find_life_end, maybe_eliminate_biv_1, update_reg_last_use): Likewise. * print-rtl.c (reg_names, print_rtx): Likewise. * recog.c (validate_replace_rtx_1, find_single_use_1): Likewise. * reg-stack.c (stack_regs_mentioned_p, record_label_references, record_reg_life_pat, swap_rtx_condition, goto_block_pat, print_blocks): Likewise. * regclass.c (fix_register, record_address_regs, reg_scan_mark_refs): Likewise. * regmove.c (stable_but_for_p): Likewise. * reload.c (loc_mentioned_in_p, operands_match_p, find_reloads_toplevsubst_reg_equivs, find_reloads_address_1, copy_replacements, refers_to_regno_for_reload_p, refers_to_mem_for_reload_p, find_inc_amount, regno_clobbered_p, reload_when_needed_name, reg_class_names, debug_reload_to_stream): Likewise. * reload1.c (eliminate_regs, scan_paradoxical_subregs, delete_address_reloads_1, count_occurrences, reload_cse_mem_conflict_p, reload_combine_note_use, add_auto_inc_notes): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * rtlanal.c (rtx_unstable_p, rtx_varies_p, rtx_addr_varies_p, reg_mentioned_p, regs_set_between_p, modified_between_p, modified_in_p, refers_to_regno_p, reg_overlap_mentioned_p, rtx_equal_p, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p, inequality_comparisons_p, replace_rtx, replace_regs, jmp_uses_reg_or_mem, for_each_rtx, regno_use_in): Likewise. * sched.c (sched_analyze_2, attach_deaths): Likewise. * stupid.c (stupid_mark_refs): Likewise. * unroll.c (remap_split_bivs): Likewise. * varasm.c (mark_constants): Likewise. * a29k/a29k.c (uses_local_reg_p): Likewise. * alpha/alpha.c (summarize_insn): Likewise. * arm/arm.c (symbol_mentioned_p, label_mentioned_p, eliminate_lr2ip): Likewise. * arm/thumb.c (symbol_mentioned_p, label_mentioned_p): Likewise. * i386/i386.c (symbolic_reference_mentioned_p, copy_all_rtx, reg_mentioned_in_mem): Likewise. * ns32k/ns32k.c (global_symbolic_reference_mentioned_p, symbolic_reference_mentioned_p): Likewise. * romp/romp.c (unsigned_comparisons_p, hash_rtx): Likewise. * sh/sh.c (regs_used, mark_use): Likewise. * vax/vax.c (vax_rtx_cost): Likewise. From-SVN: r28784
1999-08-21 01:05:25 +02:00
const char *fmt;
int i, j;
rtx_insn *insn;
if (start == end)
return 0;
1991-12-01 06:13:56 +01:00
switch (code)
{
alias.c (rtx_equal_for_memref_p): Convert constant cases. 2012-08-23 Kenneth Zadeck <zadeck@naturalbridge.com> * alias.c (rtx_equal_for_memref_p): Convert constant cases. * combine.c (find_single_use_1, mark_used_regs_combine): Convert to CASE_CONST_ANY. * cse.c (exp_equiv_p, canon_reg, fold_rtx, cse_process_notes_1, count_reg_usage): Convert constant cases. * cselib.c (cselib_expand_value_rtx_1): Convert to CASE_CONST_ANY. (cselib_subst_to_values): Convert constant cases. * df-scan.c (df_uses_record): Ditto. * dse.c (const_or_frame_p): Convert case statements to explicit if-then-else using mode classes. * emit-rtl.c (verify_rtx_sharing, copy_insn_1): Convert constant cases. * explow.c (convert_memory_address_addr_space): Ditto. * gcse.c (want_to_gcse_p, oprs_unchanged_p, compute_transp): Ditto. * genattrtab.c (attr_copy_rtx, clear_struct_flag): Ditto. * ira.c (equiv_init_varies_p, contains_replace_regs, memref_referenced_p, rtx_moveable_p): Ditto. * jump.c (mark_jump_label_1): Remove constant cases. (rtx_renumbered_equal_p): Convert to CASE_CONST_UNIQUE. * loop-invariant.c (check_maybe_invariant, hash_invariant_expr_1, invariant_expr_equal_p): Convert to CASE_CONST_ANY. * postreload-gcse.c (oprs_unchanged_p): Convert constant cases. * reginfo.c (reg_scan_mark_refs): Ditto. * regrename.c (scan_rtx): Ditto. * reload1.c (eliminate_regs_1, elimination_effects, scan_paradoxical_subregs): Ditto. * reload.c (operands_match_p, subst_reg_equivs): Ditto. * resource.c (mark_referenced_resources, mark_set_resources): Ditto. * rtlanal.c (rtx_unstable_p, rtx_varies_p, count_occurrences) (reg_mentioned_p, modified_between_p, modified_in_p) (volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, inequality_comparisons_p, computed_jump_p_1): Ditto. * rtl.c (copy_rtx, rtx_equal_p_cb, rtx_equal_p): Ditto. * sched-deps.c (sched_analyze_2): Ditto. * valtrack.c (cleanup_auto_inc_dec): Ditto. * rtl.h: (CASE_CONST_SCALAR_INT, CASE_CONST_UNIQUE, CASE_CONST_ANY): New macros. From-SVN: r190627
2012-08-23 20:46:18 +02:00
CASE_CONST_ANY:
1991-12-01 06:13:56 +01:00
case CONST:
case SYMBOL_REF:
case LABEL_REF:
return 0;
case PC:
case CC0:
return 1;
case MEM:
if (modified_between_p (XEXP (x, 0), start, end))
1991-12-01 06:13:56 +01:00
return 1;
if (MEM_READONLY_P (x))
return 0;
for (insn = NEXT_INSN (start); insn != end; insn = NEXT_INSN (insn))
if (memory_modified_in_insn_p (x, insn))
return 1;
return 0;
1991-12-01 06:13:56 +01:00
break;
case REG:
return reg_set_between_p (x, start, end);
default:
break;
1991-12-01 06:13:56 +01:00
}
fmt = GET_RTX_FORMAT (code);
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
{
if (fmt[i] == 'e' && modified_between_p (XEXP (x, i), start, end))
return 1;
else if (fmt[i] == 'E')
for (j = XVECLEN (x, i) - 1; j >= 0; j--)
if (modified_between_p (XVECEXP (x, i, j), start, end))
return 1;
}
return 0;
}
/* Similar to reg_set_p, but check all registers in X. Return 0 only if none
of them are modified in INSN. Return 1 if X contains a MEM; this routine
does use memory aliasing. */
int
alias.c (memory_modified_1, [...]): Constify. * alias.c (memory_modified_1, memory_modified_in_insn_p): Constify. * basic-block.h (tree_predicted_by_p, rtl_predicted_by_p): Likewise. * bb-reorder.c (copy_bb_p): Likewise. * cfghooks.c (can_remove_branch_p, can_merge_blocks_p, predicted_by_p, can_duplicate_block_p, block_ends_with_call_p, block_ends_with_condjump_p): Likewise. * cfghooks.h (can_remove_branch_p, can_merge_blocks_p, predicted_by_p, can_duplicate_block_p, block_ends_with_call_p, block_ends_with_condjump_p): Likewise. * cfglayout.c (cfg_layout_can_duplicate_bb_p): Likewise. * cfgrtl.c (can_delete_note_p, can_delete_label_p, rtl_can_merge_blocks, cfg_layout_can_merge_blocks_p, rtl_block_ends_with_call_p, rtl_block_ends_with_condjump_p, need_fake_edge_p, rtl_can_remove_branch_p): Likewise. * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Use debug_true_const_tree instad of debug_true_tree. * debug.c (do_nothing_debug_hooks): Likewise. * debug.h (ignore_block, debug_true_const_tree): Constify. * dwarf2out.c (stack_adjust_offset, clobbers_queued_reg_save, dwarf2out_ignore_block, is_pseudo_reg, is_tagged_type, decl_ultimate_origin, block_ultimate_origin, lookup_decl_loc, same_dw_val_p, add_ranges, is_subrange_type, type_is_enum, dbx_reg_number, is_based_loc, field_type, simple_type_align_in_bits, simple_decl_align_in_bits, simple_type_size_in_bits, field_byte_offset, insert_float, type_tag, member_declared_type, is_redundant_typedef, secname_for_decl, is_inlined_entry_point): Likewise. * emit-rtl.c (const_next_insn, const_previous_insn, const_next_nonnote_insn, const_prev_nonnote_insn, const_next_real_insn, const_prev_real_insn, const_next_active_insn, const_prev_active_insn, const_next_label, const_prev_label): Likewise. * except.h (lookup_stmt_eh_region_fn, lookup_stmt_eh_region): Likewise. * haifa-sched.c (may_trap_exp, haifa_classify_insn, find_set_reg_weight, no_real_insns_p, find_set_reg_weight, sched_insn_is_legitimate_for_speculation_p): Likewise. * jump.c (reversed_comparison_code_parts, reversed_comparison_code, reversed_comparison, condjump_label): Likewise. * predict.c (rtl_predicted_by_p, tree_predicted_by_p): Likewise. * reg-stack.c (stack_regs_mentioned_p, stack_regs_mentioned): Likewise. * rtl.h (const_previous_insn, const_next_insn, const_prev_nonnote_insn, const_next_nonnote_insn, const_prev_real_insn, const_next_real_insn, const_prev_active_insn, const_next_active_insn, const_prev_label, const_next_label, modified_between_p, modified_in_p, const_note_storeskeep_with_call_p, condjump_label, reversed_comparison, reversed_comparison_code, reversed_comparison_code_parts, memory_modified_in_insn_p, stack_regs_mentioned): Likewise. * rtlanal.c (modified_between_p, modified_in_p, const_note_stores, keep_with_call_p): Likewise. * sched-deps.c (deps_may_trap_p, sched_get_condition, conditions_mutex_p, sched_insns_conditions_mutex_psd_next_list, sd_lists_size, sd_lists_empty_p): Likewise. * sched-int.h (sched_insns_conditions_mutex_p, haifa_classify_insn, no_real_insns_p, sched_insn_is_legitimate_for_speculation_p, sd_next_list, sd_lists_size, sd_lists_empty_p): Likewise. * sdbout.c (sdb_debug_hooks): Likewise. * tree-cfg.c (tree_can_merge_blocks_p, is_ctrl_altering_stmt, stmt_ends_bb_p, tree_can_remove_branch_p, tree_can_duplicate_bb_p, -tree_block_ends_with_call_p, tree_block_ends_with_condjump_p): Likewise. * tree-eh.c (lookup_stmt_eh_region_fn, lookup_stmt_eh_region, tree_can_throw_internal): Likewise. * tree-flow-inline.h (phi_nodes): Likewise. * tree-flow.h (phi_nodesstmt_ends_bb_p, is_ctrl_altering_stmt, tree_can_throw_internal, lookup_stmt_eh_region): Likewise. * tree-gimple.c (const_get_call_expr_in): Likewise. * tree-gimple.h (const_get_call_expr_in): Likewise. * tree.c (const_lookup_attribute, attribute_list_equal, attribute_list_contained): Likewise. * tree.h (attribute_list_equal, attribute_list_contained, const_lookup_attribute): Likewise. * vmsdbgout.c (vmsdbgout_ignore_block): Likewise. From-SVN: r127824
2007-08-27 05:45:06 +02:00
modified_in_p (const_rtx x, const_rtx insn)
{
alias.c (memory_modified_1, [...]): Constify. * alias.c (memory_modified_1, memory_modified_in_insn_p): Constify. * basic-block.h (tree_predicted_by_p, rtl_predicted_by_p): Likewise. * bb-reorder.c (copy_bb_p): Likewise. * cfghooks.c (can_remove_branch_p, can_merge_blocks_p, predicted_by_p, can_duplicate_block_p, block_ends_with_call_p, block_ends_with_condjump_p): Likewise. * cfghooks.h (can_remove_branch_p, can_merge_blocks_p, predicted_by_p, can_duplicate_block_p, block_ends_with_call_p, block_ends_with_condjump_p): Likewise. * cfglayout.c (cfg_layout_can_duplicate_bb_p): Likewise. * cfgrtl.c (can_delete_note_p, can_delete_label_p, rtl_can_merge_blocks, cfg_layout_can_merge_blocks_p, rtl_block_ends_with_call_p, rtl_block_ends_with_condjump_p, need_fake_edge_p, rtl_can_remove_branch_p): Likewise. * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Use debug_true_const_tree instad of debug_true_tree. * debug.c (do_nothing_debug_hooks): Likewise. * debug.h (ignore_block, debug_true_const_tree): Constify. * dwarf2out.c (stack_adjust_offset, clobbers_queued_reg_save, dwarf2out_ignore_block, is_pseudo_reg, is_tagged_type, decl_ultimate_origin, block_ultimate_origin, lookup_decl_loc, same_dw_val_p, add_ranges, is_subrange_type, type_is_enum, dbx_reg_number, is_based_loc, field_type, simple_type_align_in_bits, simple_decl_align_in_bits, simple_type_size_in_bits, field_byte_offset, insert_float, type_tag, member_declared_type, is_redundant_typedef, secname_for_decl, is_inlined_entry_point): Likewise. * emit-rtl.c (const_next_insn, const_previous_insn, const_next_nonnote_insn, const_prev_nonnote_insn, const_next_real_insn, const_prev_real_insn, const_next_active_insn, const_prev_active_insn, const_next_label, const_prev_label): Likewise. * except.h (lookup_stmt_eh_region_fn, lookup_stmt_eh_region): Likewise. * haifa-sched.c (may_trap_exp, haifa_classify_insn, find_set_reg_weight, no_real_insns_p, find_set_reg_weight, sched_insn_is_legitimate_for_speculation_p): Likewise. * jump.c (reversed_comparison_code_parts, reversed_comparison_code, reversed_comparison, condjump_label): Likewise. * predict.c (rtl_predicted_by_p, tree_predicted_by_p): Likewise. * reg-stack.c (stack_regs_mentioned_p, stack_regs_mentioned): Likewise. * rtl.h (const_previous_insn, const_next_insn, const_prev_nonnote_insn, const_next_nonnote_insn, const_prev_real_insn, const_next_real_insn, const_prev_active_insn, const_next_active_insn, const_prev_label, const_next_label, modified_between_p, modified_in_p, const_note_storeskeep_with_call_p, condjump_label, reversed_comparison, reversed_comparison_code, reversed_comparison_code_parts, memory_modified_in_insn_p, stack_regs_mentioned): Likewise. * rtlanal.c (modified_between_p, modified_in_p, const_note_stores, keep_with_call_p): Likewise. * sched-deps.c (deps_may_trap_p, sched_get_condition, conditions_mutex_p, sched_insns_conditions_mutex_psd_next_list, sd_lists_size, sd_lists_empty_p): Likewise. * sched-int.h (sched_insns_conditions_mutex_p, haifa_classify_insn, no_real_insns_p, sched_insn_is_legitimate_for_speculation_p, sd_next_list, sd_lists_size, sd_lists_empty_p): Likewise. * sdbout.c (sdb_debug_hooks): Likewise. * tree-cfg.c (tree_can_merge_blocks_p, is_ctrl_altering_stmt, stmt_ends_bb_p, tree_can_remove_branch_p, tree_can_duplicate_bb_p, -tree_block_ends_with_call_p, tree_block_ends_with_condjump_p): Likewise. * tree-eh.c (lookup_stmt_eh_region_fn, lookup_stmt_eh_region, tree_can_throw_internal): Likewise. * tree-flow-inline.h (phi_nodes): Likewise. * tree-flow.h (phi_nodesstmt_ends_bb_p, is_ctrl_altering_stmt, tree_can_throw_internal, lookup_stmt_eh_region): Likewise. * tree-gimple.c (const_get_call_expr_in): Likewise. * tree-gimple.h (const_get_call_expr_in): Likewise. * tree.c (const_lookup_attribute, attribute_list_equal, attribute_list_contained): Likewise. * tree.h (attribute_list_equal, attribute_list_contained, const_lookup_attribute): Likewise. * vmsdbgout.c (vmsdbgout_ignore_block): Likewise. From-SVN: r127824
2007-08-27 05:45:06 +02:00
const enum rtx_code code = GET_CODE (x);
rtl.h (rtx_format): Constify a char*. * rtl.h (rtx_format): Constify a char*. * rtl.c (rtx_format): Likewise. (copy_rtx, copy_most_rtx, read_rtx): Likewise. (init_rtl): Use accessor macro, not `rtx_format'. * alias.c (rtx_equal_for_memref_p, find_symbolic_term): Constify a char*. * caller-save.c (mark_referenced_regs): Likewise. * combine.c (subst, make_compound_operation, known_cond, gen_rtx_combine, update_table_tick, get_last_value_validate, use_crosses_set_p, mark_used_regs_combine, move_deaths): Likewise. * cse.c (rtx_cost, mention_regs, canon_hash, exp_equiv_p, refers_to_p, canon_reg, fold_rtx, cse_process_notes, count_reg_usage): Likewise. * emit-rtl.c (gen_rtx, copy_rtx_if_shared, reset_used_flags): Likewise. * final.c (leaf_renumber_regs_insn): Likewise. * flow.c (mark_used_regs, find_use_as_address, dump_flow_info, dump_edge_info, count_reg_references): Likewise. * function.c (fixup_var_refs_1, walk_fixup_memory_subreg, fixup_stack_1, purge_addressof_1, instantiate_virtual_regs_1): Likewise. * gcse.c (oprs_unchanged_p, hash_expr_1, expr_equiv_p, oprs_not_set_p, expr_killed_p, compute_transp, find_used_regs, add_label_notes): Likewise. * genattrtab.c (attr_rtx, attr_copy_rtx, encode_units_mask, clear_struct_flag, count_sub_rtxs, count_alternatives, compares_alternatives_p, contained_in_p, walk_attr_value, write_expr_attr_cache): Likewise. * genconfig.c (walk_insn_part): Likewise. * genemit.c (max_operand_1, gen_exp): Likewise. * genextract.c (walk_rtx): Likewise. * genflags.c (num_operands): Likewise. * genoutput.c (scan_operands): Likewise. * genpeep.c (match_rtx): Likewise. * genrecog.c (add_to_sequence): Likewise. * haifa-sched.c (may_trap_exp, sched_analyze_2, attach_deaths): Likewise. * integrate.c (save_constants, copy_for_inline, copy_rtx_and_substitute, subst_constants, restore_constants): Likewise. * jump.c (mark_jump_label, invert_exp, redirect_exp, rtx_renumbered_equal_p, rtx_equal_for_thread_p): Likewise. * local-alloc.c (contains_replace_regs, memref_referenced_p): Likewise. * loop.c (record_excess_regs, rtx_equal_for_loop_p, add_label_notes, replace_call_address, count_nonfixed_reads, invariant_p, find_single_use_in_loop, find_mem_givs, find_life_end, maybe_eliminate_biv_1, update_reg_last_use): Likewise. * print-rtl.c (reg_names, print_rtx): Likewise. * recog.c (validate_replace_rtx_1, find_single_use_1): Likewise. * reg-stack.c (stack_regs_mentioned_p, record_label_references, record_reg_life_pat, swap_rtx_condition, goto_block_pat, print_blocks): Likewise. * regclass.c (fix_register, record_address_regs, reg_scan_mark_refs): Likewise. * regmove.c (stable_but_for_p): Likewise. * reload.c (loc_mentioned_in_p, operands_match_p, find_reloads_toplevsubst_reg_equivs, find_reloads_address_1, copy_replacements, refers_to_regno_for_reload_p, refers_to_mem_for_reload_p, find_inc_amount, regno_clobbered_p, reload_when_needed_name, reg_class_names, debug_reload_to_stream): Likewise. * reload1.c (eliminate_regs, scan_paradoxical_subregs, delete_address_reloads_1, count_occurrences, reload_cse_mem_conflict_p, reload_combine_note_use, add_auto_inc_notes): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * rtlanal.c (rtx_unstable_p, rtx_varies_p, rtx_addr_varies_p, reg_mentioned_p, regs_set_between_p, modified_between_p, modified_in_p, refers_to_regno_p, reg_overlap_mentioned_p, rtx_equal_p, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p, inequality_comparisons_p, replace_rtx, replace_regs, jmp_uses_reg_or_mem, for_each_rtx, regno_use_in): Likewise. * sched.c (sched_analyze_2, attach_deaths): Likewise. * stupid.c (stupid_mark_refs): Likewise. * unroll.c (remap_split_bivs): Likewise. * varasm.c (mark_constants): Likewise. * a29k/a29k.c (uses_local_reg_p): Likewise. * alpha/alpha.c (summarize_insn): Likewise. * arm/arm.c (symbol_mentioned_p, label_mentioned_p, eliminate_lr2ip): Likewise. * arm/thumb.c (symbol_mentioned_p, label_mentioned_p): Likewise. * i386/i386.c (symbolic_reference_mentioned_p, copy_all_rtx, reg_mentioned_in_mem): Likewise. * ns32k/ns32k.c (global_symbolic_reference_mentioned_p, symbolic_reference_mentioned_p): Likewise. * romp/romp.c (unsigned_comparisons_p, hash_rtx): Likewise. * sh/sh.c (regs_used, mark_use): Likewise. * vax/vax.c (vax_rtx_cost): Likewise. From-SVN: r28784
1999-08-21 01:05:25 +02:00
const char *fmt;
int i, j;
switch (code)
{
alias.c (rtx_equal_for_memref_p): Convert constant cases. 2012-08-23 Kenneth Zadeck <zadeck@naturalbridge.com> * alias.c (rtx_equal_for_memref_p): Convert constant cases. * combine.c (find_single_use_1, mark_used_regs_combine): Convert to CASE_CONST_ANY. * cse.c (exp_equiv_p, canon_reg, fold_rtx, cse_process_notes_1, count_reg_usage): Convert constant cases. * cselib.c (cselib_expand_value_rtx_1): Convert to CASE_CONST_ANY. (cselib_subst_to_values): Convert constant cases. * df-scan.c (df_uses_record): Ditto. * dse.c (const_or_frame_p): Convert case statements to explicit if-then-else using mode classes. * emit-rtl.c (verify_rtx_sharing, copy_insn_1): Convert constant cases. * explow.c (convert_memory_address_addr_space): Ditto. * gcse.c (want_to_gcse_p, oprs_unchanged_p, compute_transp): Ditto. * genattrtab.c (attr_copy_rtx, clear_struct_flag): Ditto. * ira.c (equiv_init_varies_p, contains_replace_regs, memref_referenced_p, rtx_moveable_p): Ditto. * jump.c (mark_jump_label_1): Remove constant cases. (rtx_renumbered_equal_p): Convert to CASE_CONST_UNIQUE. * loop-invariant.c (check_maybe_invariant, hash_invariant_expr_1, invariant_expr_equal_p): Convert to CASE_CONST_ANY. * postreload-gcse.c (oprs_unchanged_p): Convert constant cases. * reginfo.c (reg_scan_mark_refs): Ditto. * regrename.c (scan_rtx): Ditto. * reload1.c (eliminate_regs_1, elimination_effects, scan_paradoxical_subregs): Ditto. * reload.c (operands_match_p, subst_reg_equivs): Ditto. * resource.c (mark_referenced_resources, mark_set_resources): Ditto. * rtlanal.c (rtx_unstable_p, rtx_varies_p, count_occurrences) (reg_mentioned_p, modified_between_p, modified_in_p) (volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, inequality_comparisons_p, computed_jump_p_1): Ditto. * rtl.c (copy_rtx, rtx_equal_p_cb, rtx_equal_p): Ditto. * sched-deps.c (sched_analyze_2): Ditto. * valtrack.c (cleanup_auto_inc_dec): Ditto. * rtl.h: (CASE_CONST_SCALAR_INT, CASE_CONST_UNIQUE, CASE_CONST_ANY): New macros. From-SVN: r190627
2012-08-23 20:46:18 +02:00
CASE_CONST_ANY:
case CONST:
case SYMBOL_REF:
case LABEL_REF:
return 0;
case PC:
case CC0:
1991-12-01 06:13:56 +01:00
return 1;
case MEM:
if (modified_in_p (XEXP (x, 0), insn))
return 1;
if (MEM_READONLY_P (x))
return 0;
if (memory_modified_in_insn_p (x, insn))
return 1;
return 0;
break;
case REG:
return reg_set_p (x, insn);
default:
break;
}
fmt = GET_RTX_FORMAT (code);
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
{
if (fmt[i] == 'e' && modified_in_p (XEXP (x, i), insn))
return 1;
else if (fmt[i] == 'E')
for (j = XVECLEN (x, i) - 1; j >= 0; j--)
if (modified_in_p (XVECEXP (x, i, j), insn))
return 1;
}
1991-12-01 06:13:56 +01:00
return 0;
}
/* Helper function for set_of. */
struct set_of_data
{
alias.c (record_set, [...]): Constify. * alias.c (record_set, memory_modified_1): Constify. * bt-load.c (note_btr_set): Likewise. * caller-save.c (mark_set_regs, add_stored_regs): Likewise. * combine.c (set_nonzero_bits_and_sign_copies, expand_field_assignment, record_dead_and_set_regs_1, use_crosses_set_p, reg_dead_at_p_1, can_combine_p, likely_spilled_retval_1): Likewise. * config/frv/frv.c (frv_registers_update_1, frv_io_check_address, frv_io_handle_set): Likewise. * config/mips/mips.c (mips_sim_record_set, vr4130_true_reg_dependence_p_1): Likewise. * config/mt/mt.c (insn_dependent_p_1): Likewise. * config/s390/s390.c (s390_reg_clobbered_rtx): Likewise. * config/sh/sh.c (flow_dependent_p_1): Likewise. * cselib.c (cselib_invalidate_rtx_note_stores): Likewise. * dce.c (mark_nonreg_stores_1, mark_nonreg_stores_2): Likewise. * ddg.c (mark_mem_store): Likewise. * df-problems.c (df_urec_mark_reg_change): Likewise. * function.c (update_epilogue_consts): Likewise. * gcse.c (record_set_info, record_last_set_info, mems_conflict_for_gcse_p, canon_list_insert, reg_set_info, reg_clear_last_set): Likewise. * global.c (mark_reg_store, mark_reg_clobber, reg_becomes_live): Likewise. * jump.c (reversed_comparison_code_parts): Likewise. * local-alloc.c (validate_equiv_mem_from_store, no_equiv, reg_is_set): Likewise. * loop-iv.c (mark_altered): Likewise. * mode-switching.c (reg_becomes_live): Likewise. * optabs.c (no_conflict_move_test): Likewise. * postreload-gcse.c (record_last_set_info, find_mem_conflicts): Likewise. * postreload.c (reload_combine_note_store, move2add_note_store): Likewise. * regmove.c (flags_set_1): Likewise. * regrename.c (note_sets, kill_clobbered_value, kill_set_value): Likewise. * reload1.c (mark_not_eliminable, forget_old_reloads_1): Likewise. * resource.c (update_live_status): Likewise. * rtl.h (set_of, note_stores): Likewise. * rtlanal.c (set_of_1, parms_set, struct set_of_data, set_of, note_stores, parms_set): Likewise. * sched-rgn.c (sets_likely_spilled_1): Likewise. * stack-ptr-mod.c (notice_stack_pointer_modification_1): Likewise. * var-tracking.c (count_stores, add_stores): Likewise. From-SVN: r127065
2007-07-30 18:30:18 +02:00
const_rtx found;
const_rtx pat;
};
static void
alias.c (record_set, [...]): Constify. * alias.c (record_set, memory_modified_1): Constify. * bt-load.c (note_btr_set): Likewise. * caller-save.c (mark_set_regs, add_stored_regs): Likewise. * combine.c (set_nonzero_bits_and_sign_copies, expand_field_assignment, record_dead_and_set_regs_1, use_crosses_set_p, reg_dead_at_p_1, can_combine_p, likely_spilled_retval_1): Likewise. * config/frv/frv.c (frv_registers_update_1, frv_io_check_address, frv_io_handle_set): Likewise. * config/mips/mips.c (mips_sim_record_set, vr4130_true_reg_dependence_p_1): Likewise. * config/mt/mt.c (insn_dependent_p_1): Likewise. * config/s390/s390.c (s390_reg_clobbered_rtx): Likewise. * config/sh/sh.c (flow_dependent_p_1): Likewise. * cselib.c (cselib_invalidate_rtx_note_stores): Likewise. * dce.c (mark_nonreg_stores_1, mark_nonreg_stores_2): Likewise. * ddg.c (mark_mem_store): Likewise. * df-problems.c (df_urec_mark_reg_change): Likewise. * function.c (update_epilogue_consts): Likewise. * gcse.c (record_set_info, record_last_set_info, mems_conflict_for_gcse_p, canon_list_insert, reg_set_info, reg_clear_last_set): Likewise. * global.c (mark_reg_store, mark_reg_clobber, reg_becomes_live): Likewise. * jump.c (reversed_comparison_code_parts): Likewise. * local-alloc.c (validate_equiv_mem_from_store, no_equiv, reg_is_set): Likewise. * loop-iv.c (mark_altered): Likewise. * mode-switching.c (reg_becomes_live): Likewise. * optabs.c (no_conflict_move_test): Likewise. * postreload-gcse.c (record_last_set_info, find_mem_conflicts): Likewise. * postreload.c (reload_combine_note_store, move2add_note_store): Likewise. * regmove.c (flags_set_1): Likewise. * regrename.c (note_sets, kill_clobbered_value, kill_set_value): Likewise. * reload1.c (mark_not_eliminable, forget_old_reloads_1): Likewise. * resource.c (update_live_status): Likewise. * rtl.h (set_of, note_stores): Likewise. * rtlanal.c (set_of_1, parms_set, struct set_of_data, set_of, note_stores, parms_set): Likewise. * sched-rgn.c (sets_likely_spilled_1): Likewise. * stack-ptr-mod.c (notice_stack_pointer_modification_1): Likewise. * var-tracking.c (count_stores, add_stores): Likewise. From-SVN: r127065
2007-07-30 18:30:18 +02:00
set_of_1 (rtx x, const_rtx pat, void *data1)
{
alias.c (record_set, [...]): Constify. * alias.c (record_set, memory_modified_1): Constify. * bt-load.c (note_btr_set): Likewise. * caller-save.c (mark_set_regs, add_stored_regs): Likewise. * combine.c (set_nonzero_bits_and_sign_copies, expand_field_assignment, record_dead_and_set_regs_1, use_crosses_set_p, reg_dead_at_p_1, can_combine_p, likely_spilled_retval_1): Likewise. * config/frv/frv.c (frv_registers_update_1, frv_io_check_address, frv_io_handle_set): Likewise. * config/mips/mips.c (mips_sim_record_set, vr4130_true_reg_dependence_p_1): Likewise. * config/mt/mt.c (insn_dependent_p_1): Likewise. * config/s390/s390.c (s390_reg_clobbered_rtx): Likewise. * config/sh/sh.c (flow_dependent_p_1): Likewise. * cselib.c (cselib_invalidate_rtx_note_stores): Likewise. * dce.c (mark_nonreg_stores_1, mark_nonreg_stores_2): Likewise. * ddg.c (mark_mem_store): Likewise. * df-problems.c (df_urec_mark_reg_change): Likewise. * function.c (update_epilogue_consts): Likewise. * gcse.c (record_set_info, record_last_set_info, mems_conflict_for_gcse_p, canon_list_insert, reg_set_info, reg_clear_last_set): Likewise. * global.c (mark_reg_store, mark_reg_clobber, reg_becomes_live): Likewise. * jump.c (reversed_comparison_code_parts): Likewise. * local-alloc.c (validate_equiv_mem_from_store, no_equiv, reg_is_set): Likewise. * loop-iv.c (mark_altered): Likewise. * mode-switching.c (reg_becomes_live): Likewise. * optabs.c (no_conflict_move_test): Likewise. * postreload-gcse.c (record_last_set_info, find_mem_conflicts): Likewise. * postreload.c (reload_combine_note_store, move2add_note_store): Likewise. * regmove.c (flags_set_1): Likewise. * regrename.c (note_sets, kill_clobbered_value, kill_set_value): Likewise. * reload1.c (mark_not_eliminable, forget_old_reloads_1): Likewise. * resource.c (update_live_status): Likewise. * rtl.h (set_of, note_stores): Likewise. * rtlanal.c (set_of_1, parms_set, struct set_of_data, set_of, note_stores, parms_set): Likewise. * sched-rgn.c (sets_likely_spilled_1): Likewise. * stack-ptr-mod.c (notice_stack_pointer_modification_1): Likewise. * var-tracking.c (count_stores, add_stores): Likewise. From-SVN: r127065
2007-07-30 18:30:18 +02:00
struct set_of_data *const data = (struct set_of_data *) (data1);
if (rtx_equal_p (x, data->pat)
|| (!MEM_P (x) && reg_overlap_mentioned_p (data->pat, x)))
data->found = pat;
}
/* Give an INSN, return a SET or CLOBBER expression that does modify PAT
(either directly or via STRICT_LOW_PART and similar modifiers). */
alias.c (record_set, [...]): Constify. * alias.c (record_set, memory_modified_1): Constify. * bt-load.c (note_btr_set): Likewise. * caller-save.c (mark_set_regs, add_stored_regs): Likewise. * combine.c (set_nonzero_bits_and_sign_copies, expand_field_assignment, record_dead_and_set_regs_1, use_crosses_set_p, reg_dead_at_p_1, can_combine_p, likely_spilled_retval_1): Likewise. * config/frv/frv.c (frv_registers_update_1, frv_io_check_address, frv_io_handle_set): Likewise. * config/mips/mips.c (mips_sim_record_set, vr4130_true_reg_dependence_p_1): Likewise. * config/mt/mt.c (insn_dependent_p_1): Likewise. * config/s390/s390.c (s390_reg_clobbered_rtx): Likewise. * config/sh/sh.c (flow_dependent_p_1): Likewise. * cselib.c (cselib_invalidate_rtx_note_stores): Likewise. * dce.c (mark_nonreg_stores_1, mark_nonreg_stores_2): Likewise. * ddg.c (mark_mem_store): Likewise. * df-problems.c (df_urec_mark_reg_change): Likewise. * function.c (update_epilogue_consts): Likewise. * gcse.c (record_set_info, record_last_set_info, mems_conflict_for_gcse_p, canon_list_insert, reg_set_info, reg_clear_last_set): Likewise. * global.c (mark_reg_store, mark_reg_clobber, reg_becomes_live): Likewise. * jump.c (reversed_comparison_code_parts): Likewise. * local-alloc.c (validate_equiv_mem_from_store, no_equiv, reg_is_set): Likewise. * loop-iv.c (mark_altered): Likewise. * mode-switching.c (reg_becomes_live): Likewise. * optabs.c (no_conflict_move_test): Likewise. * postreload-gcse.c (record_last_set_info, find_mem_conflicts): Likewise. * postreload.c (reload_combine_note_store, move2add_note_store): Likewise. * regmove.c (flags_set_1): Likewise. * regrename.c (note_sets, kill_clobbered_value, kill_set_value): Likewise. * reload1.c (mark_not_eliminable, forget_old_reloads_1): Likewise. * resource.c (update_live_status): Likewise. * rtl.h (set_of, note_stores): Likewise. * rtlanal.c (set_of_1, parms_set, struct set_of_data, set_of, note_stores, parms_set): Likewise. * sched-rgn.c (sets_likely_spilled_1): Likewise. * stack-ptr-mod.c (notice_stack_pointer_modification_1): Likewise. * var-tracking.c (count_stores, add_stores): Likewise. From-SVN: r127065
2007-07-30 18:30:18 +02:00
const_rtx
set_of (const_rtx pat, const_rtx insn)
{
struct set_of_data data;
data.found = NULL_RTX;
data.pat = pat;
note_stores (INSN_P (insn) ? PATTERN (insn) : insn, set_of_1, &data);
return data.found;
}
reg-notes.def (DEP_CONTROL): New. * reg-notes.def (DEP_CONTROL): New. * sched-ebb.c (add_deps_for_risky_insns): Add a REG_DEP_CONTROL when not doing speculation. * rtlanal.c (record_hard_reg_sets, find_all_hard_reg_sets, record_hard_reg_uses_1, record_hard_reg_uses): New functions. * function.c (record_hard_reg_sets, record_hard_reg_uses, record_hard_reg_uses_1): Remove; move to rtlanal.c. * lists.c (copy_INSN_LIST, concat_INSN_LIST): New functions. * haifa-sched.c: Swap includes of "rtl.h" and "hard-reg-set.h". (MUST_RECOMPUTE_SPEC_P): New macro. (real_insn_for_shadow): New function. (cond_clobbered_p, recompute_todo_spec, check_clobbered_conditions, toggle_cancelled_flags): New static functions. (schedule_insn): Relax an assert to only check for empty hard back dependencies. Skip cancelled dependencies. Call check_clobbered_conditions. (copy_insn_list): Remove function, renamed moved to lists.c. (save_backtrack_point): Use new spelling copy_INSN_LIST. (unschedule_insns_until): Ensure TODO_SPEC is reset properly. (restore_last_backtrack_point): Likewise. Call toggle_cancelled_flags. (estimate_insn_tick): Ignore cancelled dependencies. (haifa_speculate_insn): Move declaration. (try_ready): Move code into recompute_todo_spec and call it. Tweak some asserts. Ensure predicated patterns are restored if necessary. Dump DEP_CONTROL flag. (haifa_change_pattern): Merge with sched_change_pattern. (sched_change_pattern): Remove function. * sched-deps.c (NON_FLUSH_JUMP_KIND, NON_FLUSH_JUMP): Remove. All uses changed to simply not test NON_FLUSH_JUMP_P. (ds_to_dk, dk_to_ds, dump_dep, ds_to_dt, dump_ds, check_dep): Handle REG_DEP_CONTROL. (dep_spec_p): If DO_PREDICATION, REG_DEP_CONTROL is speculative. (reg_pending_control_uses, control_dependency_cache): New static variables. (sched_get_reverse_condition_uncached): New function. (sd_find_dep_between): Remove pointless assert. Look in control_dependency_cache. (ask_dependency_caches, set_dependency_caches, sd_delete_dep, extend_dependency_caches, sched_deps_finish): Handle REG_DEP_CONTROL and control_dependency_cache. (sd_unresolve_dep): Use dep_spec_p. (add_dependence): Now a wrapper around add_dependence_1, handling REG_DEP_CONTROL specially. (flush_pending_lists): Clear pending_jump_insns. (sched_analyze_1): Handle pending_jump_insns like a memory flush. (sched_analyze_2): Unconditionally add to pending memory flushes, keep previous behaviour but apply it to pending_jump_insns instead. (sched_analyze_insn): Defer adding jump reg dependencies using reg_pending_control_uses; add them to the control_uses list. Handle pending_jump_insns and control_uses when adding dependence lists. (deps_analyze_insn): Update INSN_COND_DEPS. (deps_analyze_insn): Add jumps to pending_jump_insns rather than last_pending_memory_flush. (init_deps): Initialize pending_jump_insns. (free_deps): Free control_uses. (remove_from_deps): Remove from pending_jump_insns. (init_deps_global): Allocate reg_pending_control_uses). (finish_deps_global): Free it. (add_dependence_1): Renamed from add_dependence. Handle REG_DEP_CONTROL. * rtl.h (record_hard_reg_uses, find_all_hard_reg_sets): Declare. (copy_INSN_LIST, concat_INSN_LIST): Declare. * sched-int.h (struct deps_reg): Add control_uses. (struct deps_desc): Add pending_jump_insns. (struct _haifa_deps_insn_data): Add cond_deps. (struct _haifa_insn_data): Add must_recompute_spec and predicated_pat. (INSN_COND_DEPS, PREDICATED_PAT): New macros. (BITS_PER_DEP_WEAK): Adjust for two extra bits in the word. (DEP_CONTROL): New macro. (DEP_TYPES): Include it. (HARD_DEP): Adjust definition. (DEP_CANCELLED): New macro. (enum SCHED_FLAGS): Add DO_PREDICATION. (sched_get_reverse_condition_uncached, real_insn_for_shadow): Declare. * sched-rgn.c (concat_INSN_LIST): Remove function. (deps_join): Handle pending_jump_insns. (free_pending_lists): Likewise. * config/c6x/c6x.c (c6x_set_sched_flags): Set DO_PREDICATION for final schedule. From-SVN: r180302
2011-10-21 15:35:44 +02:00
/* Add all hard register in X to *PSET. */
void
find_all_hard_regs (const_rtx x, HARD_REG_SET *pset)
{
subrtx_iterator::array_type array;
FOR_EACH_SUBRTX (iter, array, x, NONCONST)
{
const_rtx x = *iter;
if (REG_P (x) && REGNO (x) < FIRST_PSEUDO_REGISTER)
add_to_hard_reg_set (pset, GET_MODE (x), REGNO (x));
}
}
reg-notes.def (DEP_CONTROL): New. * reg-notes.def (DEP_CONTROL): New. * sched-ebb.c (add_deps_for_risky_insns): Add a REG_DEP_CONTROL when not doing speculation. * rtlanal.c (record_hard_reg_sets, find_all_hard_reg_sets, record_hard_reg_uses_1, record_hard_reg_uses): New functions. * function.c (record_hard_reg_sets, record_hard_reg_uses, record_hard_reg_uses_1): Remove; move to rtlanal.c. * lists.c (copy_INSN_LIST, concat_INSN_LIST): New functions. * haifa-sched.c: Swap includes of "rtl.h" and "hard-reg-set.h". (MUST_RECOMPUTE_SPEC_P): New macro. (real_insn_for_shadow): New function. (cond_clobbered_p, recompute_todo_spec, check_clobbered_conditions, toggle_cancelled_flags): New static functions. (schedule_insn): Relax an assert to only check for empty hard back dependencies. Skip cancelled dependencies. Call check_clobbered_conditions. (copy_insn_list): Remove function, renamed moved to lists.c. (save_backtrack_point): Use new spelling copy_INSN_LIST. (unschedule_insns_until): Ensure TODO_SPEC is reset properly. (restore_last_backtrack_point): Likewise. Call toggle_cancelled_flags. (estimate_insn_tick): Ignore cancelled dependencies. (haifa_speculate_insn): Move declaration. (try_ready): Move code into recompute_todo_spec and call it. Tweak some asserts. Ensure predicated patterns are restored if necessary. Dump DEP_CONTROL flag. (haifa_change_pattern): Merge with sched_change_pattern. (sched_change_pattern): Remove function. * sched-deps.c (NON_FLUSH_JUMP_KIND, NON_FLUSH_JUMP): Remove. All uses changed to simply not test NON_FLUSH_JUMP_P. (ds_to_dk, dk_to_ds, dump_dep, ds_to_dt, dump_ds, check_dep): Handle REG_DEP_CONTROL. (dep_spec_p): If DO_PREDICATION, REG_DEP_CONTROL is speculative. (reg_pending_control_uses, control_dependency_cache): New static variables. (sched_get_reverse_condition_uncached): New function. (sd_find_dep_between): Remove pointless assert. Look in control_dependency_cache. (ask_dependency_caches, set_dependency_caches, sd_delete_dep, extend_dependency_caches, sched_deps_finish): Handle REG_DEP_CONTROL and control_dependency_cache. (sd_unresolve_dep): Use dep_spec_p. (add_dependence): Now a wrapper around add_dependence_1, handling REG_DEP_CONTROL specially. (flush_pending_lists): Clear pending_jump_insns. (sched_analyze_1): Handle pending_jump_insns like a memory flush. (sched_analyze_2): Unconditionally add to pending memory flushes, keep previous behaviour but apply it to pending_jump_insns instead. (sched_analyze_insn): Defer adding jump reg dependencies using reg_pending_control_uses; add them to the control_uses list. Handle pending_jump_insns and control_uses when adding dependence lists. (deps_analyze_insn): Update INSN_COND_DEPS. (deps_analyze_insn): Add jumps to pending_jump_insns rather than last_pending_memory_flush. (init_deps): Initialize pending_jump_insns. (free_deps): Free control_uses. (remove_from_deps): Remove from pending_jump_insns. (init_deps_global): Allocate reg_pending_control_uses). (finish_deps_global): Free it. (add_dependence_1): Renamed from add_dependence. Handle REG_DEP_CONTROL. * rtl.h (record_hard_reg_uses, find_all_hard_reg_sets): Declare. (copy_INSN_LIST, concat_INSN_LIST): Declare. * sched-int.h (struct deps_reg): Add control_uses. (struct deps_desc): Add pending_jump_insns. (struct _haifa_deps_insn_data): Add cond_deps. (struct _haifa_insn_data): Add must_recompute_spec and predicated_pat. (INSN_COND_DEPS, PREDICATED_PAT): New macros. (BITS_PER_DEP_WEAK): Adjust for two extra bits in the word. (DEP_CONTROL): New macro. (DEP_TYPES): Include it. (HARD_DEP): Adjust definition. (DEP_CANCELLED): New macro. (enum SCHED_FLAGS): Add DO_PREDICATION. (sched_get_reverse_condition_uncached, real_insn_for_shadow): Declare. * sched-rgn.c (concat_INSN_LIST): Remove function. (deps_join): Handle pending_jump_insns. (free_pending_lists): Likewise. * config/c6x/c6x.c (c6x_set_sched_flags): Set DO_PREDICATION for final schedule. From-SVN: r180302
2011-10-21 15:35:44 +02:00
/* This function, called through note_stores, collects sets and
clobbers of hard registers in a HARD_REG_SET, which is pointed to
by DATA. */
void
record_hard_reg_sets (rtx x, const_rtx pat ATTRIBUTE_UNUSED, void *data)
{
HARD_REG_SET *pset = (HARD_REG_SET *)data;
if (REG_P (x) && HARD_REGISTER_P (x))
add_to_hard_reg_set (pset, GET_MODE (x), REGNO (x));
}
/* Examine INSN, and compute the set of hard registers written by it.
Store it in *PSET. Should only be called after reload. */
void
find_all_hard_reg_sets (const rtx_insn *insn, HARD_REG_SET *pset, bool implicit)
reg-notes.def (DEP_CONTROL): New. * reg-notes.def (DEP_CONTROL): New. * sched-ebb.c (add_deps_for_risky_insns): Add a REG_DEP_CONTROL when not doing speculation. * rtlanal.c (record_hard_reg_sets, find_all_hard_reg_sets, record_hard_reg_uses_1, record_hard_reg_uses): New functions. * function.c (record_hard_reg_sets, record_hard_reg_uses, record_hard_reg_uses_1): Remove; move to rtlanal.c. * lists.c (copy_INSN_LIST, concat_INSN_LIST): New functions. * haifa-sched.c: Swap includes of "rtl.h" and "hard-reg-set.h". (MUST_RECOMPUTE_SPEC_P): New macro. (real_insn_for_shadow): New function. (cond_clobbered_p, recompute_todo_spec, check_clobbered_conditions, toggle_cancelled_flags): New static functions. (schedule_insn): Relax an assert to only check for empty hard back dependencies. Skip cancelled dependencies. Call check_clobbered_conditions. (copy_insn_list): Remove function, renamed moved to lists.c. (save_backtrack_point): Use new spelling copy_INSN_LIST. (unschedule_insns_until): Ensure TODO_SPEC is reset properly. (restore_last_backtrack_point): Likewise. Call toggle_cancelled_flags. (estimate_insn_tick): Ignore cancelled dependencies. (haifa_speculate_insn): Move declaration. (try_ready): Move code into recompute_todo_spec and call it. Tweak some asserts. Ensure predicated patterns are restored if necessary. Dump DEP_CONTROL flag. (haifa_change_pattern): Merge with sched_change_pattern. (sched_change_pattern): Remove function. * sched-deps.c (NON_FLUSH_JUMP_KIND, NON_FLUSH_JUMP): Remove. All uses changed to simply not test NON_FLUSH_JUMP_P. (ds_to_dk, dk_to_ds, dump_dep, ds_to_dt, dump_ds, check_dep): Handle REG_DEP_CONTROL. (dep_spec_p): If DO_PREDICATION, REG_DEP_CONTROL is speculative. (reg_pending_control_uses, control_dependency_cache): New static variables. (sched_get_reverse_condition_uncached): New function. (sd_find_dep_between): Remove pointless assert. Look in control_dependency_cache. (ask_dependency_caches, set_dependency_caches, sd_delete_dep, extend_dependency_caches, sched_deps_finish): Handle REG_DEP_CONTROL and control_dependency_cache. (sd_unresolve_dep): Use dep_spec_p. (add_dependence): Now a wrapper around add_dependence_1, handling REG_DEP_CONTROL specially. (flush_pending_lists): Clear pending_jump_insns. (sched_analyze_1): Handle pending_jump_insns like a memory flush. (sched_analyze_2): Unconditionally add to pending memory flushes, keep previous behaviour but apply it to pending_jump_insns instead. (sched_analyze_insn): Defer adding jump reg dependencies using reg_pending_control_uses; add them to the control_uses list. Handle pending_jump_insns and control_uses when adding dependence lists. (deps_analyze_insn): Update INSN_COND_DEPS. (deps_analyze_insn): Add jumps to pending_jump_insns rather than last_pending_memory_flush. (init_deps): Initialize pending_jump_insns. (free_deps): Free control_uses. (remove_from_deps): Remove from pending_jump_insns. (init_deps_global): Allocate reg_pending_control_uses). (finish_deps_global): Free it. (add_dependence_1): Renamed from add_dependence. Handle REG_DEP_CONTROL. * rtl.h (record_hard_reg_uses, find_all_hard_reg_sets): Declare. (copy_INSN_LIST, concat_INSN_LIST): Declare. * sched-int.h (struct deps_reg): Add control_uses. (struct deps_desc): Add pending_jump_insns. (struct _haifa_deps_insn_data): Add cond_deps. (struct _haifa_insn_data): Add must_recompute_spec and predicated_pat. (INSN_COND_DEPS, PREDICATED_PAT): New macros. (BITS_PER_DEP_WEAK): Adjust for two extra bits in the word. (DEP_CONTROL): New macro. (DEP_TYPES): Include it. (HARD_DEP): Adjust definition. (DEP_CANCELLED): New macro. (enum SCHED_FLAGS): Add DO_PREDICATION. (sched_get_reverse_condition_uncached, real_insn_for_shadow): Declare. * sched-rgn.c (concat_INSN_LIST): Remove function. (deps_join): Handle pending_jump_insns. (free_pending_lists): Likewise. * config/c6x/c6x.c (c6x_set_sched_flags): Set DO_PREDICATION for final schedule. From-SVN: r180302
2011-10-21 15:35:44 +02:00
{
rtx link;
CLEAR_HARD_REG_SET (*pset);
note_stores (PATTERN (insn), record_hard_reg_sets, pset);
if (CALL_P (insn))
{
if (implicit)
IOR_HARD_REG_SET (*pset, call_used_reg_set);
for (link = CALL_INSN_FUNCTION_USAGE (insn); link; link = XEXP (link, 1))
record_hard_reg_sets (XEXP (link, 0), NULL, pset);
}
reg-notes.def (DEP_CONTROL): New. * reg-notes.def (DEP_CONTROL): New. * sched-ebb.c (add_deps_for_risky_insns): Add a REG_DEP_CONTROL when not doing speculation. * rtlanal.c (record_hard_reg_sets, find_all_hard_reg_sets, record_hard_reg_uses_1, record_hard_reg_uses): New functions. * function.c (record_hard_reg_sets, record_hard_reg_uses, record_hard_reg_uses_1): Remove; move to rtlanal.c. * lists.c (copy_INSN_LIST, concat_INSN_LIST): New functions. * haifa-sched.c: Swap includes of "rtl.h" and "hard-reg-set.h". (MUST_RECOMPUTE_SPEC_P): New macro. (real_insn_for_shadow): New function. (cond_clobbered_p, recompute_todo_spec, check_clobbered_conditions, toggle_cancelled_flags): New static functions. (schedule_insn): Relax an assert to only check for empty hard back dependencies. Skip cancelled dependencies. Call check_clobbered_conditions. (copy_insn_list): Remove function, renamed moved to lists.c. (save_backtrack_point): Use new spelling copy_INSN_LIST. (unschedule_insns_until): Ensure TODO_SPEC is reset properly. (restore_last_backtrack_point): Likewise. Call toggle_cancelled_flags. (estimate_insn_tick): Ignore cancelled dependencies. (haifa_speculate_insn): Move declaration. (try_ready): Move code into recompute_todo_spec and call it. Tweak some asserts. Ensure predicated patterns are restored if necessary. Dump DEP_CONTROL flag. (haifa_change_pattern): Merge with sched_change_pattern. (sched_change_pattern): Remove function. * sched-deps.c (NON_FLUSH_JUMP_KIND, NON_FLUSH_JUMP): Remove. All uses changed to simply not test NON_FLUSH_JUMP_P. (ds_to_dk, dk_to_ds, dump_dep, ds_to_dt, dump_ds, check_dep): Handle REG_DEP_CONTROL. (dep_spec_p): If DO_PREDICATION, REG_DEP_CONTROL is speculative. (reg_pending_control_uses, control_dependency_cache): New static variables. (sched_get_reverse_condition_uncached): New function. (sd_find_dep_between): Remove pointless assert. Look in control_dependency_cache. (ask_dependency_caches, set_dependency_caches, sd_delete_dep, extend_dependency_caches, sched_deps_finish): Handle REG_DEP_CONTROL and control_dependency_cache. (sd_unresolve_dep): Use dep_spec_p. (add_dependence): Now a wrapper around add_dependence_1, handling REG_DEP_CONTROL specially. (flush_pending_lists): Clear pending_jump_insns. (sched_analyze_1): Handle pending_jump_insns like a memory flush. (sched_analyze_2): Unconditionally add to pending memory flushes, keep previous behaviour but apply it to pending_jump_insns instead. (sched_analyze_insn): Defer adding jump reg dependencies using reg_pending_control_uses; add them to the control_uses list. Handle pending_jump_insns and control_uses when adding dependence lists. (deps_analyze_insn): Update INSN_COND_DEPS. (deps_analyze_insn): Add jumps to pending_jump_insns rather than last_pending_memory_flush. (init_deps): Initialize pending_jump_insns. (free_deps): Free control_uses. (remove_from_deps): Remove from pending_jump_insns. (init_deps_global): Allocate reg_pending_control_uses). (finish_deps_global): Free it. (add_dependence_1): Renamed from add_dependence. Handle REG_DEP_CONTROL. * rtl.h (record_hard_reg_uses, find_all_hard_reg_sets): Declare. (copy_INSN_LIST, concat_INSN_LIST): Declare. * sched-int.h (struct deps_reg): Add control_uses. (struct deps_desc): Add pending_jump_insns. (struct _haifa_deps_insn_data): Add cond_deps. (struct _haifa_insn_data): Add must_recompute_spec and predicated_pat. (INSN_COND_DEPS, PREDICATED_PAT): New macros. (BITS_PER_DEP_WEAK): Adjust for two extra bits in the word. (DEP_CONTROL): New macro. (DEP_TYPES): Include it. (HARD_DEP): Adjust definition. (DEP_CANCELLED): New macro. (enum SCHED_FLAGS): Add DO_PREDICATION. (sched_get_reverse_condition_uncached, real_insn_for_shadow): Declare. * sched-rgn.c (concat_INSN_LIST): Remove function. (deps_join): Handle pending_jump_insns. (free_pending_lists): Likewise. * config/c6x/c6x.c (c6x_set_sched_flags): Set DO_PREDICATION for final schedule. From-SVN: r180302
2011-10-21 15:35:44 +02:00
for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
if (REG_NOTE_KIND (link) == REG_INC)
record_hard_reg_sets (XEXP (link, 0), NULL, pset);
}
/* Like record_hard_reg_sets, but called through note_uses. */
void
record_hard_reg_uses (rtx *px, void *data)
{
find_all_hard_regs (*px, (HARD_REG_SET *) data);
reg-notes.def (DEP_CONTROL): New. * reg-notes.def (DEP_CONTROL): New. * sched-ebb.c (add_deps_for_risky_insns): Add a REG_DEP_CONTROL when not doing speculation. * rtlanal.c (record_hard_reg_sets, find_all_hard_reg_sets, record_hard_reg_uses_1, record_hard_reg_uses): New functions. * function.c (record_hard_reg_sets, record_hard_reg_uses, record_hard_reg_uses_1): Remove; move to rtlanal.c. * lists.c (copy_INSN_LIST, concat_INSN_LIST): New functions. * haifa-sched.c: Swap includes of "rtl.h" and "hard-reg-set.h". (MUST_RECOMPUTE_SPEC_P): New macro. (real_insn_for_shadow): New function. (cond_clobbered_p, recompute_todo_spec, check_clobbered_conditions, toggle_cancelled_flags): New static functions. (schedule_insn): Relax an assert to only check for empty hard back dependencies. Skip cancelled dependencies. Call check_clobbered_conditions. (copy_insn_list): Remove function, renamed moved to lists.c. (save_backtrack_point): Use new spelling copy_INSN_LIST. (unschedule_insns_until): Ensure TODO_SPEC is reset properly. (restore_last_backtrack_point): Likewise. Call toggle_cancelled_flags. (estimate_insn_tick): Ignore cancelled dependencies. (haifa_speculate_insn): Move declaration. (try_ready): Move code into recompute_todo_spec and call it. Tweak some asserts. Ensure predicated patterns are restored if necessary. Dump DEP_CONTROL flag. (haifa_change_pattern): Merge with sched_change_pattern. (sched_change_pattern): Remove function. * sched-deps.c (NON_FLUSH_JUMP_KIND, NON_FLUSH_JUMP): Remove. All uses changed to simply not test NON_FLUSH_JUMP_P. (ds_to_dk, dk_to_ds, dump_dep, ds_to_dt, dump_ds, check_dep): Handle REG_DEP_CONTROL. (dep_spec_p): If DO_PREDICATION, REG_DEP_CONTROL is speculative. (reg_pending_control_uses, control_dependency_cache): New static variables. (sched_get_reverse_condition_uncached): New function. (sd_find_dep_between): Remove pointless assert. Look in control_dependency_cache. (ask_dependency_caches, set_dependency_caches, sd_delete_dep, extend_dependency_caches, sched_deps_finish): Handle REG_DEP_CONTROL and control_dependency_cache. (sd_unresolve_dep): Use dep_spec_p. (add_dependence): Now a wrapper around add_dependence_1, handling REG_DEP_CONTROL specially. (flush_pending_lists): Clear pending_jump_insns. (sched_analyze_1): Handle pending_jump_insns like a memory flush. (sched_analyze_2): Unconditionally add to pending memory flushes, keep previous behaviour but apply it to pending_jump_insns instead. (sched_analyze_insn): Defer adding jump reg dependencies using reg_pending_control_uses; add them to the control_uses list. Handle pending_jump_insns and control_uses when adding dependence lists. (deps_analyze_insn): Update INSN_COND_DEPS. (deps_analyze_insn): Add jumps to pending_jump_insns rather than last_pending_memory_flush. (init_deps): Initialize pending_jump_insns. (free_deps): Free control_uses. (remove_from_deps): Remove from pending_jump_insns. (init_deps_global): Allocate reg_pending_control_uses). (finish_deps_global): Free it. (add_dependence_1): Renamed from add_dependence. Handle REG_DEP_CONTROL. * rtl.h (record_hard_reg_uses, find_all_hard_reg_sets): Declare. (copy_INSN_LIST, concat_INSN_LIST): Declare. * sched-int.h (struct deps_reg): Add control_uses. (struct deps_desc): Add pending_jump_insns. (struct _haifa_deps_insn_data): Add cond_deps. (struct _haifa_insn_data): Add must_recompute_spec and predicated_pat. (INSN_COND_DEPS, PREDICATED_PAT): New macros. (BITS_PER_DEP_WEAK): Adjust for two extra bits in the word. (DEP_CONTROL): New macro. (DEP_TYPES): Include it. (HARD_DEP): Adjust definition. (DEP_CANCELLED): New macro. (enum SCHED_FLAGS): Add DO_PREDICATION. (sched_get_reverse_condition_uncached, real_insn_for_shadow): Declare. * sched-rgn.c (concat_INSN_LIST): Remove function. (deps_join): Handle pending_jump_insns. (free_pending_lists): Likewise. * config/c6x/c6x.c (c6x_set_sched_flags): Set DO_PREDICATION for final schedule. From-SVN: r180302
2011-10-21 15:35:44 +02:00
}
1991-12-01 06:13:56 +01:00
/* Given an INSN, return a SET expression if this insn has only a single SET.
It may also have CLOBBERs, USEs, or SET whose output
will not be used, which we ignore. */
rtx
single_set takes an insn gcc/ChangeLog: 2014-09-09 David Malcolm <dmalcolm@redhat.com> * rtl.h (single_set_2): Strengthen first param from const_rtx to const rtx_insn *, and move prototype to above... (single_set): ...this. Convert this from a macro to an inline function, enforcing the requirement that the param is a const rtx_insn *. (find_args_size_adjust): Strengthen param from rtx to rtx_insn *. * config/arm/aarch-common-protos.h (aarch_crypto_can_dual_issue): Strengthen both params from rtx to rtx_insn *. * config/arm/aarch-common.c (aarch_crypto_can_dual_issue): Likewise; introduce locals "producer_set", "consumer_set", using them in place of "producer" and "consumer" when dealing with SET rather than insn. * config/avr/avr.c (avr_out_plus): Add checked cast to rtx_insn * when invoking single_set in region guarded by INSN_P. (avr_out_bitop): Likewise. (_reg_unused_after): Introduce local rtx_sequence * "seq" in region guarded by GET_CODE check, using methods to strengthen local "this_insn" from rtx to rtx_insn *, and for clarity. * config/avr/avr.md (define_insn_and_split "xload8<mode>_A"): Strengthen local "insn" from rtx to rtx_insn *. (define_insn_and_split "xload<mode>_A"): Likewise. * config/bfin/bfin.c (trapping_loads_p): Likewise for param "insn". (find_load): Likewise for return type. (workaround_speculation): Likewise for both locals named "load_insn". * config/cris/cris.c (cris_cc0_user_requires_cmp): Likewise for local "cc0_user". * config/cris/cris.md (define_peephole2 ; moversideqi): Likewise for local "prev". * config/h8300/h8300-protos.h (notice_update_cc): Likewise for param 2. * config/h8300/h8300.c (notice_update_cc): Likewise. * config/i386/i386.c (ix86_flags_dependent): Likewise for params "insn" and "dep_insn". (exact_store_load_dependency): Likewise for both params. (ix86_macro_fusion_pair_p): Eliminate local named "single_set" since this now clashes with inline function. Instead, delay calling single_set until the point where its needed, and then assign the result to "compare_set" and rework the conditional that follows. * config/ia64/ia64.md (define_expand "tablejump"): Strengthen local "last" from rtx to rtx_insn *. * config/mips/mips-protos.h (mips_load_store_insns): Likewise for second param. (mips_store_data_bypass_p): Likewise for both params. * config/mips/mips.c (mips_load_store_insns): Likewise for second param. (mips_store_data_bypass_p): Likewise for both params. (mips_orphaned_high_part_p): Likewise for param "insn". * config/mn10300/mn10300.c (extract_bundle): Likewise. (mn10300_bundle_liw): Likewise for locals "r", "insn1", "insn2". Introduce local rtx "insn2_pat". * config/rl78/rl78.c (move_elim_pass): Likewise for locals "insn", "ninsn". (rl78_remove_unused_sets): Likewise for locals "insn", "ninsn". Introduce local rtx "set", using it in place of "insn" for the result of single_set. This appears to fix a bug, since the call to find_regno_note on a SET does nothing. * config/rs6000/rs6000.c (set_to_load_agen): Strengthen both params from rtx to rtx_insn *. (set_to_load_agen): Likewise. * config/s390/s390.c (s390_label_align): Likewise for local "prev_insn". Introduce new rtx locals "set" and "src", using them in place of "prev_insn" for the results of single_set and SET_SRC respectively. (s390_swap_cmp): Strengthen local "jump" from rtx to rtx_insn *. Introduce new rtx local "set" using in place of "jump" for the result of single_set. Use SET_SRC (set) rather than plain XEXP (set, 1). * config/sh/sh.c (noncall_uses_reg): Strengthen param 2from rtx to rtx_insn *. (noncall_uses_reg): Likewise. (reg_unused_after): Introduce local rtx_sequence * "seq" in region guarded by GET_CODE check, using its methods for clarity, and to enable strengthening local "this_insn" from rtx to rtx_insn *. * config/sh/sh.md (define_expand "mulhisi3"): Strengthen local "insn" from rtx to rtx_insn *. (define_expand "umulhisi3"): Likewise. (define_expand "smulsi3_highpart"): Likewise. (define_expand "umulsi3_highpart"): Likewise. * config/sparc/sparc.c (sparc_do_work_around_errata): Likewise for local "after". Replace GET_CODE check with a dyn_cast, introducing new local rtx_sequence * "seq", using insn method for typesafety. * dwarf2cfi.c (dwarf2out_frame_debug): Strengthen param "insn" from rtx to rtx_insn *. Introduce local rtx "pat", using it in place of "insn" once we're dealing with patterns rather than the input insn. (scan_insn_after): Strengthen param "insn" from rtx to rtx_insn *. (scan_trace): Likewise for local "elt", updating lookups within sequence to use insn method rather than element method. * expr.c (find_args_size_adjust): Strengthen param "insn" from rtx to rtx_insn *. * gcse.c (gcse_emit_move_after): Likewise for local "new_rtx". * ifcvt.c (noce_try_abs): Likewise for local "insn". * ira.c (fix_reg_equiv_init): Add checked cast to rtx_insn * when invoking single_set. * lra-constraints.c (insn_rhs_dead_pseudo_p): Strengthen param "insn" from rtx to rtx_insn *. (skip_usage_debug_insns): Likewise for return type, adding a checked cast. (check_secondary_memory_needed_p): Likewise for local "insn". (inherit_reload_reg): Likewise. * modulo-sched.c (sms_schedule): Likewise for local "count_init". * recog.c (peep2_attempt): Likewise for local "old_insn", adding checked casts. (store_data_bypass_p): Likewise for both params. (if_test_bypass_p): Likewise. * recog.h (store_data_bypass_p): Likewise for both params. (if_test_bypass_p): Likewise. * reload.c (find_equiv_reg): Likewise for local "where". * reorg.c (delete_jump): Likewise for param "insn". * rtlanal.c (single_set_2): Strenghen param "insn" from const_rtx to const rtx_insn *. * store-motion.c (replace_store_insn): Likewise for param "del". (delete_store): Strengthen local "i" from rtx to rtx_insn_list *, and use its methods for clarity, and to strengthen local "del" from rtx to rtx_insn *. (build_store_vectors): Use insn method of "st" when calling replace_store_insn for typesafety and clarity. From-SVN: r215089
2014-09-09 19:02:34 +02:00
single_set_2 (const rtx_insn *insn, const_rtx pat)
1991-12-01 06:13:56 +01:00
{
rtx set = NULL;
int set_verified = 1;
1991-12-01 06:13:56 +01:00
int i;
if (GET_CODE (pat) == PARALLEL)
1991-12-01 06:13:56 +01:00
{
for (i = 0; i < XVECLEN (pat, 0); i++)
{
rtx sub = XVECEXP (pat, 0, i);
switch (GET_CODE (sub))
{
case USE:
case CLOBBER:
break;
case SET:
/* We can consider insns having multiple sets, where all
but one are dead as single set insns. In common case
only single set is present in the pattern so we want
to avoid checking for REG_UNUSED notes unless necessary.
When we reach set first time, we just expect this is
the single set we are looking for and only when more
sets are found in the insn, we check them. */
if (!set_verified)
{
if (find_reg_note (insn, REG_UNUSED, SET_DEST (set))
&& !side_effects_p (set))
set = NULL;
else
set_verified = 1;
}
if (!set)
set = sub, set_verified = 0;
else if (!find_reg_note (insn, REG_UNUSED, SET_DEST (sub))
|| side_effects_p (sub))
return NULL_RTX;
break;
default:
return NULL_RTX;
}
}
1991-12-01 06:13:56 +01:00
}
return set;
1991-12-01 06:13:56 +01:00
}
/* Given an INSN, return nonzero if it has more than one SET, else return
zero. */
int
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
multiple_sets (const_rtx insn)
{
int found;
int i;
/* INSN must be an insn. */
alias.c (mark_constant_function): Use INSN_P. * alias.c (mark_constant_function): Use INSN_P. (init_alias_analysis): Likewise. * combine.c (combine_instructions): Use INSN_P. (can_combine_p): Likewise. (try_combine): Likewise. (distribute_notes): Likewise. (distribute_links): Likewise. * cse.c (cse_around_loop): Use INSN_P. (invalidate_skipped_block): Likewise. (cse_set_around_loop): Likewise. (cse_end_of_basic_block): Likewise. (delete_trivially_dead_insns): Likewise. * emit-rtl.c (unshare_all_rtl_again): Use INSN_P. (unshare_all_rtl_1): Likewise. (next_cc0_user): Likewise. (try_split make_insn_raw): Likewise. (remove_unnecessary_notes): Likewise. * final.c (shorten_branches): Use INSN_P. (leaf_renumber_regs): Likewise. (leaf_renumber_regs_insn): Likewise. * flow.c (find_label_refs): Use INSN_P. (verify_wide_reg): Likewise. (notice_stack_pointer_modification): Likewise. (count_or_remove_death_notes): Likewise. (verify_flow_info): Likewise. (clear_log_links): Likewise. * function.c (fixup_var_refs_insns): Use INSN_P. (compute_insns_for_mem): Likewise. * gcse.c (alloc_gcse_mem): Use INSN_P. (compute_sets): Likewise. (compute_hash_table): Likewise. (classic_gcse): Likewise. (cprop): Likewise. (insert_insn_end_bb): Likewise. (delete_null_pointer_checks_1): Likewise. * global.c (expand_preferences): Use INSN_P. (build_insn_chain): Likewise. * graph.c (node_data): Use INSN_P. * haifa-sched.c (priority): Use INSN_P. (rm_line_notes): Likewise. (rm_other_notes): Likewise. (find_insn_reg_weight): Likewise. (init_target_units): Likewise. (schedule_block): Likewise. (compute_block_forward_dependences): Likewise. (debug_dependencies): Likewise. (set_priorities): Likewise. * integrate.c (function_cannot_inline_p): Use INSN_P. (save_parm_insns): Likewise. (copy_insn_list): Likewise. * jump.c (mark_all_labels): Use INSN_P. (never_reached_warning): Likewise. * lcm.c (optimize_mode_switching): Use INSN_P. * local-alloc.c (validate_equiv_mem): Use INSN_P. (memref_used_between_p): Likewise. (update_equiv_regs): Likewise. (block_alloc): Likewise. (no_conflict_p): Likewise. * loop.c (scan_loop): Use INSN_P. (find_and_verify_loops): Likewise. (count_loop_regs_set): Likewise. (loop_reg_used_before_p): Likewise. (strength_reduce): Likewise. (recombine_givs): Likewise. (check_dbra_loop): Likewise. (load_mems): Likewise. (try_copy_prop): Likewise. * print-rtl.c (print_rtx): Use INSN_P. * recog.c (find_single_use): Use INSN_P. * reg-stack.c (stack_regs_mentioned): Use INSN_P. (next_flags_user): Likewise. (swap_rtx_condition): Likewise. * regmove.c (mark_flags_life_zones): Use INSN_P. (optimize_reg_copy_1): Likewise. (optimize_reg_copy_2): Likewise. (optimize_reg_copy_3): Likewise. (reg_is_remote_constant_p): Likewise. (fixup_match_2): Likewise. (regmove_optimize): Likewise. (fixup_match_1): Likewise. * regrename.c (build_def_use): Use INSN_P. (replace_reg_in_block): Likewise. (consider_use): Likewise. * reload.c (find_equiv_reg): Use INSN_P. * reload1.c (reload): Use INSN_P. (maybe_fix_stack_asms): Likewise. (calculate_needs_all_insns): Likewise. (reload_as_needed): Likewise. (emit_output_reload_insns): Likewise. (delete_address_reloads_1): Likewise. (reload_cse_regs_1): Likewise. (reload_combine): Likewise. (reload_cse_move2add): Likewise. * reorg.c (redundant_insn): Use INSN_P. (dbr_schedule): Likewise. * resource.c (find_dead_or_set_registers): Use INSN_P. (mark_target_live_regs): Likewise. * rtlanal.c (reg_used_between_p): Use INSN_P. (reg_referenced_between_p): Likewise. (reg_set_between_p): Likewise. (reg_set_p): Likewise. (single_set): Likewise. (multiple_sets): Likewise. (find_last_value): Likewise. (reg_set_last): Likewise. (find_reg_note): Likewise. (find_regno_note): Likewise. * sibcall.c (sequence_uses_addressof): Use INSN_P. * simplify-rtx.c (cselib_process_insn): Use INSN_P. * ssa.c (find_evaluations): Use INSN_P. (rename_block): Likewise. (rename_equivalent_regs): Likewise. * unroll.c (loop_find_equiv_value): Use INSN_P. (set_dominates_use): Likewise. * varasm.c (mark_constant_pool): Use INSN_P. (mark_constants): Likewise. * config/alpha/alpha.c (alpha_does_function_need_gp): Use INSN_P. (alphaev4_next_group): Likewise. (alphaev5_next_group): Likewise. * config/c4x/c4x.c (c4x_process_after_reload): Use INSN_P. (c4x_rptb_rpts_p): Likewise. * config/mips/mips.c (mips16_optimize_gp): Use INSN_P. * config/rs6000/rs6000.c (uses_TOC): Use INSN_P. (rs6000_adjust_priority): Likewise. * config/sh/sh.c (sh_loop_align): Use INSN_P. (machine_dependent_reorg): Likewise. (split_branches): Likewise. * config/tahoe/tahoe.c (tahoe_cmp_check): Use INSN_P. From-SVN: r35494
2000-08-04 22:28:08 +02:00
if (! INSN_P (insn))
return 0;
/* Only a PARALLEL can have multiple SETs. */
if (GET_CODE (PATTERN (insn)) == PARALLEL)
{
for (i = 0, found = 0; i < XVECLEN (PATTERN (insn), 0); i++)
if (GET_CODE (XVECEXP (PATTERN (insn), 0, i)) == SET)
{
/* If we have already found a SET, then return now. */
if (found)
return 1;
else
found = 1;
}
}
/* Either zero or one SET. */
return 0;
}
1991-12-01 06:13:56 +01:00
/* Return nonzero if the destination of SET equals the source
and there are no side effects. */
int
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
set_noop_p (const_rtx set)
{
rtx src = SET_SRC (set);
rtx dst = SET_DEST (set);
if (dst == pc_rtx && src == pc_rtx)
return 1;
alias.c (get_alias_set, [...]): Use MEM_P. 2004-07-01 Jerry Quinn <jlquinn@optonline.net> * alias.c (get_alias_set, canon_rtx, get_addr, nonoverlapping_memrefs_p, nonlocal_referenced_p_1, memory_modified_1): Use MEM_P. * builtins.c (expand_builtin_prefetch, expand_builtin_profile_func, expand_builtin): Likewise. * calls.c (expand_call, emit_library_call_value_1, store_one_arg): Likewise. * combine.c (can_combine_p, combinable_i3pat, try_combine, find_split_point, combine_simplify_rtx, simplify_set, make_extraction, rtx_equal_for_field_assignment_p, gen_lowpart_for_combine, record_dead_and_set_regs_1, get_last_value_validate, mark_used_regs_combine, move_deaths, unmentioned_reg_p_1): Likewise. * cse.c (check_dependence, canon_hash, equiv_constant, gen_lowpart_if_possible, cse_insn, invalidate_from_clobbers, cse_around_loop, cse_check_loop_start, cse_set_around_loop, count_reg_usage): Likewise. * cselib.c (rtx_equal_for_cselib_p, add_mem_for_addr, cselib_lookup, cselib_invalidate_mem, cselib_invalidate_rtx, cselib_record_set, cselib_record_sets): Likewise. * dbxout.c (PARM_PASSED_IN_MEMORY, dbxout_symbol, dbxout_symbol_location, dbxout_parms, dbxout_reg_parms): Likewise. * ddg.c (mark_mem_use, mark_mem_store, rtx_mem_access_p): Likewise. * df.c (df_uses_record): Likewise. * dojump (do_jump): Likewise. * dwarf2out.c (stack_adjust_offset, mem_loc_descriptor, loc_descriptor_from_tree, rtl_for_decl_location, add_bound_info, decl_start_label): Likewise. * emit-rtl.c (gen_complex_constant_part, gen_highpart, operand_subword, change_address_1, make_safe_from): Likewise. * explow.c (break_out_memory_refs, copy_all_regs, validize_mem, stabilize, force_not_mem): Likewise. * expmed.c (store_bit_field, store_split_bit_field, extract_bit_field, expand_mult_const, expand_divmod, emit_store_flag): Likewise. * expr.c (convert_move, convert_modes, emit_block_move, emit_group_load, emit_group_store, clear_storage, emit_move_insn, emit_move_insn_1, expand_assignment, store_expr, store_constructor_field, store_constructor, store_field, force_operand, safe_from_p, expand_expr_real_1, expand_increment): Likewise. * final.c (cleanup_subreg_operands, alter_subreg, get_mem_expr_from_op): Likewise. * flow.c (notice_stack_pointer_modification_1, init_propagate_block_info, insn_dead_p, mark_set_1, mark_used_regs): Likewise. * function.c (mark_temp_addr_taken, preserve_temp_slots, preserve_rtl_expr_result, put_var_into_stack, fixup_var_refs_1, optimize_bit_field, flush_addressof, purge_addressof_1, instantiate_decl, instantiate_virtual_regs_1, assign_parms, setjmp_protect, setjmp_protect_args, fix_lexical_addr, keep_stack_depressed): Likewise. * ifcvt.c (noce_try_cmove_arith, noce_try_abs, noce_operand_ok, noce_process_if_block, find_memory): Likewise. * integrate.c (subst_constants, allocate_initial_values): Likewise. * local-alloc.c (validate_equiv_mem_from_store, memref_referenced_p, update_equiv_regs): Likewise. * loop.c (scan_loop, prescan_loop, note_addr_stored, check_store, maybe_eliminate_biv_1, find_mem_in_note_1): Likewise. * optabs.c (expand_abs, emit_unop_insn): Likewise. * passes.c (rest_of_handle_final): Likewise. * postreload.c (reload_cse_simplify_set, reload_cse_simplify_operands, move2add_note_store): Likewise. * ra-build.c (detect_remat_webs): Likewise. * ra-debug.c (dump_static_insn_cost): Likewise. * ra-rewrite.c (slots_overlap_p, insert_stores): Likewise. * recog.c (validate_change, apply_change_group, cancel_changes, validate_replace_rtx_1, general_operand, register_operand, nonmemory_operand, push_operand, pop_operand, memory_operand, indirect_operand, asm_operand_ok, offsettable_memref_p, offsettable_nonstrict_memref_p, constrain_operands, store_data_bypass_p): Likewise. * reg-stack.c (subst_stack_regs_pat): Likewise. * regclass.c (record_operand_costs, scan_one_insn, record_reg_classes, copy_cost, reg_scan_mark_refs): Likewise. * regmove.c (optimize_reg_copy_3, stack_memref_p, combine_stack_adjustments_for_block): Likewise. * regrename.c (copyprop_hardreg_forward_1): Likewise. * reload.c (can_reload_into, push_reload, decompose, immune_p, find_reloads, find_reloads_address, find_reloads_address_1, reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p, find_equiv_reg): Likewise. * reload1.c (reload, eliminate_regs, eliminate_regs_in_insn, reload_as_needed, choose_reload_regs, emit_input_reload_insns, do_input_reload, emit_reload_insns, gen_reload, delete_output_reload, delete_address_reloads): Likewise. * resource.c (mark_referenced_resources): Likewise. * rtlanal.c (get_jump_table_offset, count_occurrences, reg_referenced_p, reg_set_p, set_of_1, set_noop_p, reg_overlap_mentioned_p, note_uses, replace_regs, nonzero_bits1, num_sign_bit_copies1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sched-deps.c (sched_analyze_1, sched_analyze_2): Likewise. * sdbout.c (PARM_PASSED_IN_MEMORY, sdbout_symbol, sdbout_toplevel_data, sdbout_parms, sdbout_reg_parms, sdbout_global_decl): Likewise. * simplify-rtx.c (simplify_subreg): Likewise. * stmt.c (expand_asm_operands, expand_expr_stmt_value, expand_decl, expand_anon_union_decl, expand_end_case_type): Likewise. * unroll.c (calculate_giv_inc): Likewise. * var-tracking.c (stack_adjust_offset_pre_post, bb_stack_adjust_offset, track_expr_p, count_uses, add_uses, add_stores, compute_bb_dataflow, vt_get_decl_and_offset, vt_add_function_parameters): Likewise. * varasm.c (make_var_volatile, notice_global_symbol, assemble_external, decode_addr_const, mark_weak, default_encode_section_info): Likewise. From-SVN: r83980
2004-07-01 14:52:53 +02:00
if (MEM_P (dst) && MEM_P (src))
return rtx_equal_p (dst, src) && !side_effects_p (dst);
if (GET_CODE (dst) == ZERO_EXTRACT)
return rtx_equal_p (XEXP (dst, 0), src)
&& ! BYTES_BIG_ENDIAN && XEXP (dst, 2) == const0_rtx
&& !side_effects_p (src);
if (GET_CODE (dst) == STRICT_LOW_PART)
dst = XEXP (dst, 0);
if (GET_CODE (src) == SUBREG && GET_CODE (dst) == SUBREG)
{
if (SUBREG_BYTE (src) != SUBREG_BYTE (dst))
return 0;
src = SUBREG_REG (src);
dst = SUBREG_REG (dst);
}
/* It is a NOOP if destination overlaps with selected src vector
elements. */
if (GET_CODE (src) == VEC_SELECT
&& REG_P (XEXP (src, 0)) && REG_P (dst)
&& HARD_REGISTER_P (XEXP (src, 0))
&& HARD_REGISTER_P (dst))
{
int i;
rtx par = XEXP (src, 1);
rtx src0 = XEXP (src, 0);
int c0 = INTVAL (XVECEXP (par, 0, 0));
HOST_WIDE_INT offset = GET_MODE_UNIT_SIZE (GET_MODE (src0)) * c0;
for (i = 1; i < XVECLEN (par, 0); i++)
if (INTVAL (XVECEXP (par, 0, i)) != c0 + i)
return 0;
return
simplify_subreg_regno (REGNO (src0), GET_MODE (src0),
offset, GET_MODE (dst)) == (int) REGNO (dst);
}
alias.c (record_set, [...]): Use REG_P. 2004-06-15 Jerry Quinn <jlquinn@optonline.net> * alias.c (record_set, record_base_value, canon_rtx, get_addr, nonlocal_mentioned_p_1, init_alias_analysis): Use REG_P. * bt-load.c (find_btr_reference, insn_sets_btr_p, note_btr_set): Likewise. * builtins.c (expand_builtin_setjmp, expand_builtin_apply, expand_builtin_mathfn, expand_builtin_strlen, expand_builtin_memcmp, expand_builtin_strcmp, expand_builtin_strncmp, expand_builtin_frame_address): Likewise. * caller-save.c (mark_set_regs, add_stored_regs, mark_referenced_regs, insert_one_insn): Likewise. * calls.c (prepare_call_address, precompute_register_parameters, precompute_arguments, expand_call, emit_library_call_value_1): Likewise. * cfganal.c (flow_active_insn_p): Likewise. * combine.c (set_nonzero_bits_and_sign_copies, can_combine_p, combinable_i3pat, try_combine, find_split_point, COMBINE_RTX_EQUAL_P, subst, combine_simplify_rtx, simplify_if_then_else, simplify_set, make_extraction, recog_for_combine, gen_lowpart_for_combine, simplify_comparison, record_dead_and_set_regs_1, record_dead_and_set_regs, record_promoted_value, check_promoted_subreg, get_last_value_validate, get_last_value, reg_dead_at_p_1, reg_bitfield_target_p, distribute_notes, unmentioned_reg_p_1): Likewise. * conflict.c (mark_reg): Likewise. * cse.c (HASH, COST, COST_IN, approx_reg_cost_1, notreg_cost, mention_regs, insert_regs, lookup, lookup_for_remove, insert, merge_equiv_classes, flush_hash_table, invalidate, remove_invalid_refs, remove_invalid_subreg_refs, rehash_using_reg, invalidate_for_call, use_related_value, canon_hash, exp_equiv_p, cse_rtx_varies_p, canon_reg, find_best_addr, fold_rtx, equiv_constant, record_jump_cond, cse_insn, addr_affects_sp_p, invalidate_from_clobbers, cse_process_notes, cse_around_loop, cse_set_around_loop, count_reg_usage, set_live_p, cse_change_cc_mode, cse_cc_succs, cse_condition_code_reg): Likewise. * cselib.c (cselib_reg_set_mode, rtx_equal_for_cselib_p, cselib_lookup, cselib_invalidate_regno, cselib_invalidate_rtx, cselib_record_set, cselib_record_sets): Likewise. * dbxout.c (dbxout_symbol_location, dbxout_parms, dbxout_reg_parms, dbxout_block): Likewise. * df.c (df_ref_record, df_def_record_1, df_uses_record): Likewise. * dojump.c (do_jump): Likewise. * dwarf2out.c (dwarf2out_frame_debug_expr, is_pseudo_reg, is_based_loc, rtl_for_decl_location): Likewise. * emit-rtl.c (set_reg_attrs_for_parm, set_decl_rtl, set_decl_incoming_rtl, mark_user_reg): Likewise. * explow.c (copy_all_regs, copy_all_regs, memory_address, force_reg, copy_to_suggested_reg, allocate_dynamic_stack_space, probe_stack_range, hard_function_value): Likewise. * expmed.c (store_bit_field, store_fixed_bit_field, store_split_bit_field, extract_bit_field, extract_fixed_bit_field, extract_split_bit_field, expand_divmod, emit_store_flag_force): Likewise. * expr.c (convert_move, convert_modes, block_move_libcall_safe_for_call_parm, emit_group_load, use_reg, use_group_regs, emit_move_insn, emit_move_insn_1, compress_float_constant, push_block, emit_single_push_insn, emit_push_insn, get_subtarget, expand_assignment, store_expr, store_constructor, store_field, force_operand, safe_from_p, expand_expr_real_1, expand_increment, do_store_flag, do_tablejump): Likewise. * final.c (profile_function, final_scan_insn, alter_subreg, get_mem_expr_from_op, output_asm_operand_names, output_operand, only_leaf_regs_used, leaf_renumber_regs_insn): Likewise. * flow.c (verify_wide_reg_1, mark_regs_live_at_end, find_regno_partial, propagate_one_insn, init_propagate_block_info, insn_dead_p, libcall_dead_p, mark_set_1, not_reg_cond, attempt_auto_inc, find_auto_inc, mark_used_regs, count_or_remove_death_notes_bb): Likewise. * function.c (find_temp_slot_from_address, update_temp_slot_address, preserve_temp_slots, put_var_into_stack, fixup_var_refs_insn, fixup_var_refs_1, fixup_stack_1, optimize_bit_field, flush_addressof, put_addressof_into_stack, purge_addressof_1, insns_for_mem_walk, purge_single_hard_subreg_set, instantiate_decl, instantiate_virtual_regs_1, aggregate_value_p, assign_parms, promoted_input_arg, setjmp_vars_warning, setjmp_args_warning, setjmp_protect, setjmp_protect_args, fix_lexical_addr, expand_function_start, diddle_return_value, clobber_return_register, expand_function_end, keep_stack_depressed, handle_epilogue_set, update_epilogue_consts): Likewise. * genemit.c (gen_exp, gen_insn): Likewise. * genrecog.c (make_insn_sequence): Likewise. * global.c (global_conflicts, expand_preferences, mark_reg_store, mark_reg_conflicts, set_preference, reg_becomes_live, build_insn_chain, mark_reg_change): Likewise. * haifa_sched.c (CONST_BASED_ADDRESS_P, find_set_reg_weight): Likewise. * ifcvt.c (noce_try_abs, noce_get_condition, noce_process_if_block): Likewise. * integrate.c (copy_rtx_and_substitute, try_constants, subst_constants, mark_stores, allocate_initial_values): Likewise. * jump.c (reversed_comparison_code_parts, delete_prior_computation, delete_computation, rtx_renumbered_equal_p, true_regnum, reg_or_subregno): Likewise. * lcm.c (reg_dies, reg_becomes_live): Likewise. * local-alloc.c (validate_equiv_mem_from_store, validate_equiv_mem, update_equiv_regs, no_equiv, block_alloc, combine_regs, reg_is_set, wipe_dead_reg, no_conflict_p): Likewise. * loop-iv.c (simple_reg_p, simple_set_p, kill_sets, iv_get_reaching_def, iv_analyze_biv, altered_reg_used, mark_altered, simple_rhs_p, simplify_using_assignment, implies_p): Likewise. * loop.c (scan_loop, combine_movables, rtx_equal_for_loop_p, move_movables, note_set_pseudo_multiple_uses, consec_sets_invariant_p, find_single_use_in_loop, count_one_set, loop_bivs_init_find, loop_givs_rescan, check_insn_for_bivs, check_insn_for_givs, valid_initial_value_p, simplify_giv_expr, consec_sets_giv, loop_regs_update, check_dbra_loop, maybe_eliminate_biv, maybe_eliminate_biv_1, record_initial, update_reg_last_use, canonicalize_condition, loop_regs_scan, load_mems, try_copy_prop, try_swap_copy_prop): Likewise. * optabs.c (expand_binop, expand_vector_binop, expand_vector_unop, expand_abs, emit_no_conflict_block, emit_libcall_block, expand_float): Likewise. * postreload.c (reload_cse_simplify, reload_cse_simplify_set, reload_cse_simplify_operands, reload_combine, reload_combine_note_store, reload_combine_note_use, reload_cse_move2add, move2add_note_store): Likewise. * print-rtl.c (print_rtx): Likewise. * ra-build.c (copy_insn_p, remember_move, init_one_web_common, contains_pseudo, handle_asm_insn): Likewise. * ra-debug.c (ra_print_rtx_object, dump_constraints, dump_static_insn_cost): Likewise. * ra-rewrite.c (slots_overlap_p, emit_colors, remove_suspicious_death_notes): Likewise. * recog.c (validate_replace_rtx_1, find_single_use_1, find_single_use, register_operand, scratch_operand, nonmemory_operand, constrain_operands): Likewise. * reg-stack (check_asm_stack_operands, remove_regno_note, emit_swap_insn, swap_rtx_condition, subst_stack_regs_pat, subst_asm_stack_regs): Likewise. * regclass.c (scan_one_insn, record_reg_classes, copy_cost, record_address_regs, reg_scan_mark_refs): Likewise. * regmove.c (discover_flags_reg, replacement_quality, copy_src_to_dest, reg_is_remote_constant_p, regmove_optimize, fixup_match_1): Likewise. * regrename.c (note_sets, clear_dead_regs, build_def_use, kill_value, kill_set_value, copyprop_hardreg_forward_1): Likewise. * reload.c (MATCHES, push_secondary_reload, find_reusable_reload, reload_inner_reg_of_subreg, can_reload_into, push_reload, combine_reloads, find_dummy_reload, hard_reg_set_here_p, operands_match_p, decompose, find_reloads, find_reloads_toplev, find_reloads_address, subst_indexed_address, find_reloads_address_1, find_reloads_subreg_address, find_replacement, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p, find_equiv_reg, regno_clobbered_p): Likewise. * reload1.c (replace_pseudos_in, reload, calculate_needs_all_insns, find_reg, delete_dead_insn, alter_reg, eliminate_regs, elimination_effects, eliminate_regs_in_insn, scan_paradoxical_subregs, forget_old_reloads_1, reload_reg_free_for_value_p, choose_reload_regs, emit_input_reload_insns, emit_output_reload_insns, do_input_reload, do_output_reload, emit_reload_insns, gen_reload, delete_address_reloads_1, inc_for_reload): Likewise. * reorg.c (update_reg_dead_notes, fix_reg_dead_note, update_reg_unused_notes, fill_slots_from_thread): Likewise. * resource.c (update_live_status, mark_referenced_resources, mark_set_resources, mark_target_live_regs): Likewise. * rtlanal.c (nonzero_address_p, get_jump_table_offset, global_reg_mentioned_p_1, reg_mentioned_p, reg_referenced_p, reg_set_p, set_noop_p, find_last_value, refers_to_regno_p, note_stores, dead_or_set_p, dead_or_set_regno_p, find_regno_note, find_reg_fusage, find_regno_fusage, replace_regs, regno_use_in, parms_set, find_first_parameter_load, keep_with_call_p, hoist_test_store, hoist_update_store, address_cost, nonzero_bits1, num_sign_bit_copies1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sched-deps.c (deps_may_trap_p, sched_analyze_1, sched_analyze_insn, sched_analyze): Likewise. * sched-rgn.c (check_live_1, update_live_1, sets_likely_spilled_1): Likewise. * sdbout.c (sdbout_symbol, sdbout_parms, sdbout_reg_parms): Likewise. * simplify-rtx.c (simplify_replace_rtx, simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_subreg): Likewise. * stmt.c (decl_conflicts_with_clobbers_p, expand_asm_operands, expand_end_stmt_expr, expand_return, expand_decl, expand_anon_union_decl): Likewise. * unroll.c (precondition_loop_p, calculate_giv_inc, copy_loop_body, find_splittable_regs, find_splittable_givs, find_common_reg_term, loop_iterations): Likewise. * var-tracking.c (variable_union, variable_part_different_p, variable_different_p, count_uses, add_uses, add_stores, compute_bb_dataflow, set_variable_part, delete_variable_part, emit_notes_in_bb, vt_get_decl_and_offset, vt_add_function_parameters): Likewise. * varasm.c (assemble_variable): Likewise. From-SVN: r83195
2004-06-15 20:02:40 +02:00
return (REG_P (src) && REG_P (dst)
&& REGNO (src) == REGNO (dst));
}
/* Return nonzero if an insn consists only of SETs, each of which only sets a
value to itself. */
int
noop_move_p (const rtx_insn *insn)
{
rtx pat = PATTERN (insn);
if (INSN_CODE (insn) == NOOP_MOVE_INSN_CODE)
return 1;
/* Insns carrying these notes are useful later on. */
if (find_reg_note (insn, REG_EQUAL, NULL_RTX))
return 0;
/* Check the code to be executed for COND_EXEC. */
if (GET_CODE (pat) == COND_EXEC)
pat = COND_EXEC_CODE (pat);
if (GET_CODE (pat) == SET && set_noop_p (pat))
return 1;
if (GET_CODE (pat) == PARALLEL)
{
int i;
/* If nothing but SETs of registers to themselves,
this insn can also be deleted. */
for (i = 0; i < XVECLEN (pat, 0); i++)
{
rtx tem = XVECEXP (pat, 0, i);
if (GET_CODE (tem) == USE
|| GET_CODE (tem) == CLOBBER)
continue;
if (GET_CODE (tem) != SET || ! set_noop_p (tem))
return 0;
}
return 1;
}
return 0;
}
1991-12-01 06:13:56 +01:00
/* Return nonzero if register in range [REGNO, ENDREGNO)
appears either explicitly or implicitly in X
other than being stored into.
References contained within the substructure at LOC do not count.
LOC may be zero, meaning don't ignore anything. */
bool
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
refers_to_regno_p (unsigned int regno, unsigned int endregno, const_rtx x,
rtx *loc)
1991-12-01 06:13:56 +01:00
{
* Rework fields used to describe positions of bitfields and modify sizes to be unsigned and use HOST_WIDE_INT. * alias.c (reg_known_value_size): Now unsigned. * c-typeck.c (build_unary_op, case ADDR_EXPR): Use byte_position. (really_start_incremental_init): Use bitsize_zero_node. (push_init_level, pop_init_level, output_init_element): Likewise. Use bitsize_unit_node and bitsize_one_node. (output_pending_init_elements, process_init_element): Likewise. * combine.c (combine_max_regno, reg_sign_bit_copies): Now unsigned. (make_extraction): Position and length HOST_WIDE_INT and unsigned HOST_WIDE_INT, respectively. (get_pos_from_mask): Passed in value is unsigned HOST_WIDE_INT. (num_sign_bit_copies): Returns unsigned. BITWIDTH now unsigned; rework arithmetic. Remove recursive call from arg to MAX. (combine_instructions, init_reg_last_arrays): NREGS now unsigned. (setup_incoming_promotions, can_combine_p, try_combine, simplify_set): REGNO now unsigned. (set_nonzero_bit_and_sign_copies): NUM now unsigned. (find_split_point, expand_compound_operation, make_extraction): LEN now unsigned HOST_WIDE_INT, POS now HOST_WIDE_INT. (make_field_assignment): Likewise. (combine_simplify_rtx): Add cast. (expand_compound_operation): MODEWIDTH now unsigned; rework arithmetic. (force_to_mode): WIDTH now unsigned; add cast. (if_then_else_cond): SIZE now unsigned. (nonzero_bits): MODE_WIDTH, RESULT_WIDTH, and WIDTH now unsigned. (extended_count): Now returns unsigned. (simplify_shift_const): COUNT unsigned; arg is now INPUT_COUNT. Add SIGNED_COUNT variable; MODE_WORDS and FIRST_COUNT now unsigned. (simplify_comparison): MODE_WIDTH now unsigned. (update_table_tick): REGNO and ENDREGNO now unsigned; new var R. (mark_used_regs_combine): Likewise; rework arithmetic. (record_value_for_reg): REGNO, ENDREGNO, and I now unsigned. (record_dead_and_set_regs, reg_dead_at_p, distribute_notes): Likewise. (record_promoted_value): REGNO now unsigned. (get_last_value_validate): REGNO, ENDREGNO, and J now unsigned. (get_last_value): REGNO now unsigned. (use_crosses_set_p): REGNO and ENDREGNO now unsigned. (reg_dead_regno, reg_dead_endregno): Now unsigned. (remove_death): Arg REGNO now unsigned. (move_deaths): REGNO, DEADREGNO, DEADEND, OUREND, and I now unsigned. (reg_bitfield_target_p): REGNO, REGNO, ENDREGNO, and ENDTREGNO now unsigned. * convert.c (convert_to_integer): INPREC and OUTPREC now unsigned. * cse.c (struct qty_table_elem): FIRST_REG and LAST_REG now unsigned. (struct cse_reg_info): REGNO now unsigned. (cached_regno): Now unsigned. (REGNO_QTY_VALID_P): Add cast. (make_new_qty, make_regs_eqv, delete_reg_eqiv): Regno args unsigned. (remove_invalid_regs): Likewise. (remove_invalid_subreg_refs): Likewise; arg WORD also unsigned as are variables END and I. (get_cse_reg_info, insert): Likewise. (mention_regs, invalidate_for_call): REGNO, ENDREGNO, and I unsigned. (canon_hash): Likewise. (insert_regs, lookup_for_remove): REGNO now unsigned. (invalidate): REGNO, ENDREGNO, TREGNO, and TENDREGNO now unsigned. New variable RN. * dbxout.c (dbxout_parms, dbxout_reg_parms): Don't check for REGNO < 0. * dwarf2out.c (dwarf2ou_frame_debug_expr): Remove cast. * emit-rtl.c (subreg_realpart_p): Add cast. (operand_subword): Arg I is now unsigned as is var PARTWORDS. (operand_subword_force): Arg I is now unsigned. * except.c (eh_regs): Variable I is now unsigned. * explow.c (hard_function_value): BYTES is unsigned HOST_WIDE_INT. * expmed.c (store_fixed_bit_field): Position is HOST_WIDE_INT; length is unsigned HOST_WIDE_INT; likewise for internal variables. (store_split_bit_field, extract_fixed_bit_field): Likewise. (extract_split_bit_field, store_bit_field, extract_bit_field): Likewise. * expr.c (store_constructor_fields, store_constructor, store_field): Positions are HOST_WIDE_INT and lengths are unsigned HOST_WIDE_INT. (expand_assignment, expand_expr, expand_expr_unaligned): Likewise. (do_jump): Likewise. (move_by_pieces, move_by_pieces_ninsns, clear_by_pieces): MAX_SIZE is now unsigned. (emit_group_load): BYTEPOS is HOST_WIDE_INT; BYTELEN is unsigned. (emit_group_store): Likewise. (emit_move_insn): I now unsigned. (store_constructor): Use host_integerp, tree_low_cst, and bitsize_unit_node. (get_inner_reference): Return bitpos and bitsize as HOST_WIDE_INT. Rework all calculations to use trees and new fields. * expr.h (promoted_input_arg): Regno now unsigned. (store_bit_field, extract_bit_field): Adjust types of pos and size. (mark_seen_cases): Arg is HOST_WIDE_INT. * flow.c (verify_wide_reg_1): REGNO now unsigned. * fold-const.c (decode_field_reference): Size and pos HOST_WIDE_INT; precisions and alignments are unsigned. (optimize_bit_field_compare, fold_truthop): Likewise. (int_const_binop): Adjust threshold for size_int_type_wide call. (fold_convert): Likewise. (size_int_type_wide): Make table larger and fix thinko that only had half of table used. (all_ones_mask_p, fold): Precisions are unsigned. * function.c (put_reg_info_stack): REGNO is unsigned. (instantiate_decl): Size is HOST_WIDE_INT. (instantiate_virtual_regs): I is unsigned. (assign_parms): REGNO, REGNOI, and REGNOR are unsigned. (promoted_input_arg): REGNO is unsigned. * function.h (struct function): x_max_parm_reg is now unsigned. * gcse.c (max_gcse_regno): Now unsigned. (struct null_pointer_info): min_reg and max_reg now unsigned. (lookup_set, next_set): REGNO arg now unsigned. (compute_hash_table): REGNO and I now unsigned. (handle_avail_expr): regnum_for_replacing now unsigned. (cprop_insn): REGNO now unsigned. (delete_null_pointer_checks_1): BLOCK_REG now pointer to unsigned. * ggc-common.c (ggc_mark_tree_children, case FIELD_DECL): New case. * global.c (set_preference): SRC_REGNO, DEST_REGNO, and I now unsigned. * hard-reg-set.h (reg_class_size): Now unsigned. * integrate.c (mark_stores): LAST_REG and I now unsigned; new UREGNO. * jump.c (mark_modified_reg): I now unsigned; add cast. (rtx_equal_for_thread_p): Add cast. * loop.c (max_reg_before_loop): Now unsigned. (struct_movable): REGNO now unsigned. (try_copy_prop): REGNO arg unsigned. (regs_match_p): XN and YN now unsigned. (consec_sets_invariant_p, maybe_eliminate_biv): REGNO now unsigned. (strength_reduce): Likewise; NREGS also unsigned. (first_increment_giv, last_increment_giv unsigned): Now unsigned. * loop.h (struct iv_class): REGNO now unsigned. (max_reg_before_loop, first_increment_giv, last_increment_giv): Now unsigned. * machmode.h (mode_size, mode_unit_size): Now unsigned. (mode_for_size, smallest_mode_for_size): Pass size as unsigned. * optabs.c (expand_binop): I and NWORDS now unsigned. (expand_unop): I now unsigned. * print-tree.c (print_node): Don't print DECL_FIELD_BITPOS, but do print DECL_FIELD_OFFSET and DECL_FIELD_BIT_OFFSET. * real.c (significand_size): Now returns unsigned. * real.h (significand_size): Likewise. * regclass.c (reg_class_size): Now unsigned. (choose_hard_reg_mode): Both operands now unsigned. (record_reg_classes): REGNO and NR now unsigned. (reg_scan): NREGS now unsigned. (reg_scan_update): old_max_regno now unsigned. (reg_scan_mark_refs): Arg MIN_REGNO and var REGNO now unsigned. * reload.c (find_valid_class): BEST_SIZE now unsigned. (find_dummy_reload): REGNO, NWORDS, and I now unsigned. (hard_reg_set_here_p): Args BEG_REGNO and END_REGNO now unsigned. Likewise for variable R. (refers_to_regno_for_reload_p): Args REGNO and END_REGNO now unsigned, as are variables INNER_REGNO and INNER_ENDREGNO; add new variable R. (find_equiv_reg): Add casts. (regno_clobbered_p): Arg REGNO now unsigned. * reload.h (struct reload): NREGS now unsigned. (refers_to_regno_for_reload_p): Regno args are unsigned. (regno_clobbered_p): Likewise. * reload1.c (reg_max_ref_width, spill_stack_slot_width): Now unsigned. (compute_use_by_pseudos): REGNO now unsigned. (find_reg): I and J now unsigned, new variable K, and change loop variables accordingly; THIS_NREGS now unsigned. (alter_reg): INHERENT_SIZE and TOTAL_SIZE now unsigned. (spill_hard_reg): REGNO arg now unsigned; add casts. (forget_old_reloads_1): REGNO, NR, and I now unsigned. (mark_reload_reg_in_use): Arg REGNO and vars NREGS and I now unsigned. (clear_reload_reg_in_use): Arg REGNO and vars NREGS, START_REGNO, END_REGNO, CONFLICT_START, and CONFLICT_END now unsigned. (reload_reg_free_p, reload_reg_reaches_end_p): Arg REGNO now unsigned. (choose_reload_regs): MAX_GROUP_SIZE now unsigned. (emit_reload_insns): REGNO now unsigned. (reload_cse_move2add): Add cast. (move2add_note_store): REGNO and I now unsigned; new variable ENDREGNO and rework loop. * resource.c (mark_referenced_resources, mark_set_resources): New variable R; REGNO and LAST_REGNO now unsigned. (mark_target_live_regs): J and REGNO now unsigned. * rtl.c (mode_size, mode_unit_size): Now unsigned. * rtl.h (union rtunion_def): New field rtuint. (XCUINT): New macro. (ADDRESSOF_REGNO, REGNO, SUBREG_WORD): New XCUINT. (operand_subword, operand_subword_force): Word number is unsigned. (choose_hard_reg_mode): Operands are unsigned. (refers_to-regno_p, dead_or_set_regno_p): Regno arg is unsigned. (find_regno_note, find_regno_fusage, replace_regs): Likewise. (regno_use_in, combine_instructions, remove_death): Likewise. (reg_scan, reg_scan_update): Likewise. (extended_count): Return is unsigned. * rtlanal.c (refers_to_regno_p): Args REGNO and ENDREGNO and vars I, INNER_REGNO, and INNER_ENDREGNO now unsigned; new variable X_REGNO. (reg_overlap_mentioned_p): REGNO and ENDREGNO now unsigned. (reg_set_last_first_regno, reg_set_last_last_regno): Now unsigned. (reg_reg_last_1): FIRS and LAST now unsigned. (dead_or_set_p): REGNO, LAST_REGNO, and I now unsigned. (dead_or_set_regno_p): Arg TEST_REGNO and vars REGNO and ENDREGNO now unsigned. (find_regno_note, regno_use_in): Arg REGNO now unsigned. (find_regno_fusage): Likewise; also var REGNOTE now unsigned. (find_reg_fusage): Variables REGNO, END_REGNO, and I now unsigned. (replace_regs): Arg NREGS now unsigned. * sdbout.c (sdbout_parms, sdbout_reg_parms): Don't check REGNO < 0. * simplify-rtx.c (simplify_unary_operation): WIDTH now unsigned. (simplify_binary_operation): Likewise. (cselib_invalidate_regno): Arg REGNO and variables ENDREGNO, I, and THIS_LAST now unsigned. (cselib_record_set): Add cast. * ssa.c (ssa_max_reg_num): Now unsigned. (rename_block): REGNO now unsigned. * stmt.c (expand_return): Bit positions unsigned HOST_WIDE_INT; sizes now unsigned. (all_cases_count): Just return -1 not -2. COUNT, MINVAL, and LASTVAL now HOST_WIDE_INT. Rework tests to use trees whenever possible. Use host_integerp and tree_low_cst. (mark_seen_cases): COUNT arg now HOST_WIDE_INT; Likewise variable NEXT_NODE_OFFSET; XLO now unsigned. (check_for_full_enumeration_handing): BYTES_NEEDED, I to HOST_WIDE_INT. * stor-layout.c (mode_for_size): SIZE arg now unsigned. (smallest_mode_for_size): Likewise. (layout_decl): Simplify handing of a specified DECL_SIZE_UNIT. KNOWN_ALIGN is now an alignment, so simplify code. Don't turn off DECL_BIT_FIELD if field is BLKmode, but not type. (start_record_layout): Renamed from new_record_layout_info. Update to new fields. (debug_rli, normalize_rli, rli_size_unit_so_far, rli_size_so_far): New functions. (place_union_field): Renamed from layout_union_field. Update to use new fields in rli. (place_field): Renamed from layout_field. Major rewrite to use new fields in rli; pass alignment to layout_decl. (finalize_record_size): Rework to use new fields in rli and handle union. (compute_record_mode): Rework to simplify and to use new DECL fields. (finalize_type_size): Make rounding more consistent. (finish_union_layout): Deleted. (layout_type, case VOID_TYPE): Don't set TYPE_SIZE_UNIT either. (layout_type, case RECORD_TYPE): Call new function names. (initialize_sizetypes): Set TYPE_IS_SIZETYPE. (set_sizetype): Set TYPE_IS_SIZETYPE earlier. (get_best_mode): UNIT is now unsigned; remove casts. * tree.c (bit_position): Compute from new fields. (byte_position, int_byte_position): New functions. (print_type_hash_statistics): Cast to remove warning. (build_range_type): Use host_integerp and tree_low_cst to try to hash. (build_index_type): Likewise; make subtype of sizetype. (build_index_2_type): Pass sizetype to build_range_type. (build_common_tree_nodes): Use size_int and bitsize_int to initialize nodes; add bitsize_{zero,one,unit}_node. * tree.h (DECL_FIELD_CONTEXT): Use FIELD_DECL_CHECK. (DECL_BIT_FIELD_TYPE, DECL_QUALIFIER, DECL_FCONTEXT): Likewise. (DECL_PACKED, DECL_BIT_FIELD): Likewise. (DECL_FIELD_BITPOS): Deleted. (DECL_FIELD_OFFSET, DECL_FIELD_BIT_OFFSET): New fields. (DECL_RESULT, DECL_SAVED_INSNS): Use FUNCTION_DECL_CHECK. (DECL_FRAME_SIZE, DECL_FUNCTION_CODE, DECL_NO_STATIC_CHAIN): Likewise. (DECL_INLINE, DECL_BUILT_IN_NONANSI, DECL_IS_MALLOC): Likewise. (DECL_BUILT_IN_CLASS, DECL_STATIC_CONSTRUCTOR): Likewise. (DECL_STATIC_DESTRUCTOR, DECL_NO_CHECK_MEMORY_USAGE): Likewise. (DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT, DECL_NO_LIMIT_STACK) Likewise. (DECL_ORIGINAL_TYPE, TYPE_DECL_SUPPRESS_DEBUG): Use TYPE_DECL_CHECK. (DECL_ARG_TYPE_AS_WRITEN, DECL_ARG_TYPE): Use PARM_DECL_CHECK. (DECL_INCOMING_RTL, DECL_TRANSPARENT_UNION): Likewise. (DECL_ALIGN): Adjust to new field in union. (DECL_OFFSET_ALIGN): New field. (DECL_ERROR_ISSUED, DECL_TOO_LATE): Use LABEL_DECL_CHECK. (DECL_IN_TEXT_SECTION): Use VAR_DECL_CHECK. (union tree_decl): Add struct for both aligns. (enum tree_index): Add TI_BITSIZE_{ZERO,ONE,UNIT}. (bitsize_zero_node, bitsize_one_node, bitsize_unit_node): Added. (struct record_layout_info): Rework fields to have offset alignment and byte and bit position. (start_record_layout, place_field): Renamed from old names. (rli_size_so_far, rli_size_unit_so_far, normalize_rli): New decls. (byte_position, int_byte_position): Likewise. (get_inner_reference): Change types of position and length. * unroll.c (unroll_loop): New variable R; use for some loops. MAX_LOCAL_REGNUM and MAXREGNUM now unsigned. (calculate_giv_inc): Arg REGNO now unsigned. (copy_loop_body): REGNO and SRC_REGNO now unsigned. * varasm.c (assemble_variable): Clean up handling of size using host_integerp and tree_low_cst. (decode_addr_const): Use byte, not bit, position. (output_constructor): bitpos and offsets are HOST_WIDE_INT; use tree_low_cst and int_bit_position. * objc/objc-act.c (build_ivar_list_initializer): Use byte_position. * ch/actions.c (check_missing_cases): BYTES_NEEDED is HOST_WIDE_INT. * ch/typeck.c (expand_constant_to_buffer): Use int_byte_position. (extract_constant_from_buffer): Likewise. * cp/class.c (build_vbase_pointer_fields): layout_field now place_field. (get_vfield_offset): Use byte_position. (set_rtti_entry): Set OFFSET to ssizetype zero. (get_binfo_offset_as_int): Deleted. (dfs_record_base_offsets): Use tree_low_cst. (dfs_search_base_offsets): Likewise. (layout_nonempty_base_or_field): Reflect changes in RLI format and call byte_position. (layout_empty_base): Convert offset to ssizetype. (build_base_field): use rli_size_unit_so_far. (dfs_propagate_binfo_offsets): Do computation in proper type. (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets. (layout_class_type): Reflect changes in RLI names and fields. (finish_struct_1): Set DECL_FIELD_OFFSET. * cp/dump.c (dequeue_and_dump): Call bit_position. * cp/expr.c (cplus_expand_constant): Use byte_position. * cp/rtti.c (expand_class_desc): Use bitsize_one_node. * cp/typeck.c (build_component_addr): Use byte_position and don't special case for zero offset. * f/com.c (ffecom_tree_canonize_ptr_): Use bitsize_zero_node. (ffecom_tree_canonize_ref_): Likewise. * java/class.c (make_field_value): Use byte_position. * java/expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position. (java_array_data_offset): Likewise. * java/java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to bzero call. From-SVN: r32742
2000-03-25 19:34:13 +01:00
int i;
unsigned int x_regno;
RTX_CODE code;
const char *fmt;
1991-12-01 06:13:56 +01:00
repeat:
/* The contents of a REG_NONNEG note is always zero, so we must come here
upon repeat in case the last REG_NOTE is a REG_NONNEG note. */
if (x == 0)
return false;
1991-12-01 06:13:56 +01:00
code = GET_CODE (x);
switch (code)
{
case REG:
* Rework fields used to describe positions of bitfields and modify sizes to be unsigned and use HOST_WIDE_INT. * alias.c (reg_known_value_size): Now unsigned. * c-typeck.c (build_unary_op, case ADDR_EXPR): Use byte_position. (really_start_incremental_init): Use bitsize_zero_node. (push_init_level, pop_init_level, output_init_element): Likewise. Use bitsize_unit_node and bitsize_one_node. (output_pending_init_elements, process_init_element): Likewise. * combine.c (combine_max_regno, reg_sign_bit_copies): Now unsigned. (make_extraction): Position and length HOST_WIDE_INT and unsigned HOST_WIDE_INT, respectively. (get_pos_from_mask): Passed in value is unsigned HOST_WIDE_INT. (num_sign_bit_copies): Returns unsigned. BITWIDTH now unsigned; rework arithmetic. Remove recursive call from arg to MAX. (combine_instructions, init_reg_last_arrays): NREGS now unsigned. (setup_incoming_promotions, can_combine_p, try_combine, simplify_set): REGNO now unsigned. (set_nonzero_bit_and_sign_copies): NUM now unsigned. (find_split_point, expand_compound_operation, make_extraction): LEN now unsigned HOST_WIDE_INT, POS now HOST_WIDE_INT. (make_field_assignment): Likewise. (combine_simplify_rtx): Add cast. (expand_compound_operation): MODEWIDTH now unsigned; rework arithmetic. (force_to_mode): WIDTH now unsigned; add cast. (if_then_else_cond): SIZE now unsigned. (nonzero_bits): MODE_WIDTH, RESULT_WIDTH, and WIDTH now unsigned. (extended_count): Now returns unsigned. (simplify_shift_const): COUNT unsigned; arg is now INPUT_COUNT. Add SIGNED_COUNT variable; MODE_WORDS and FIRST_COUNT now unsigned. (simplify_comparison): MODE_WIDTH now unsigned. (update_table_tick): REGNO and ENDREGNO now unsigned; new var R. (mark_used_regs_combine): Likewise; rework arithmetic. (record_value_for_reg): REGNO, ENDREGNO, and I now unsigned. (record_dead_and_set_regs, reg_dead_at_p, distribute_notes): Likewise. (record_promoted_value): REGNO now unsigned. (get_last_value_validate): REGNO, ENDREGNO, and J now unsigned. (get_last_value): REGNO now unsigned. (use_crosses_set_p): REGNO and ENDREGNO now unsigned. (reg_dead_regno, reg_dead_endregno): Now unsigned. (remove_death): Arg REGNO now unsigned. (move_deaths): REGNO, DEADREGNO, DEADEND, OUREND, and I now unsigned. (reg_bitfield_target_p): REGNO, REGNO, ENDREGNO, and ENDTREGNO now unsigned. * convert.c (convert_to_integer): INPREC and OUTPREC now unsigned. * cse.c (struct qty_table_elem): FIRST_REG and LAST_REG now unsigned. (struct cse_reg_info): REGNO now unsigned. (cached_regno): Now unsigned. (REGNO_QTY_VALID_P): Add cast. (make_new_qty, make_regs_eqv, delete_reg_eqiv): Regno args unsigned. (remove_invalid_regs): Likewise. (remove_invalid_subreg_refs): Likewise; arg WORD also unsigned as are variables END and I. (get_cse_reg_info, insert): Likewise. (mention_regs, invalidate_for_call): REGNO, ENDREGNO, and I unsigned. (canon_hash): Likewise. (insert_regs, lookup_for_remove): REGNO now unsigned. (invalidate): REGNO, ENDREGNO, TREGNO, and TENDREGNO now unsigned. New variable RN. * dbxout.c (dbxout_parms, dbxout_reg_parms): Don't check for REGNO < 0. * dwarf2out.c (dwarf2ou_frame_debug_expr): Remove cast. * emit-rtl.c (subreg_realpart_p): Add cast. (operand_subword): Arg I is now unsigned as is var PARTWORDS. (operand_subword_force): Arg I is now unsigned. * except.c (eh_regs): Variable I is now unsigned. * explow.c (hard_function_value): BYTES is unsigned HOST_WIDE_INT. * expmed.c (store_fixed_bit_field): Position is HOST_WIDE_INT; length is unsigned HOST_WIDE_INT; likewise for internal variables. (store_split_bit_field, extract_fixed_bit_field): Likewise. (extract_split_bit_field, store_bit_field, extract_bit_field): Likewise. * expr.c (store_constructor_fields, store_constructor, store_field): Positions are HOST_WIDE_INT and lengths are unsigned HOST_WIDE_INT. (expand_assignment, expand_expr, expand_expr_unaligned): Likewise. (do_jump): Likewise. (move_by_pieces, move_by_pieces_ninsns, clear_by_pieces): MAX_SIZE is now unsigned. (emit_group_load): BYTEPOS is HOST_WIDE_INT; BYTELEN is unsigned. (emit_group_store): Likewise. (emit_move_insn): I now unsigned. (store_constructor): Use host_integerp, tree_low_cst, and bitsize_unit_node. (get_inner_reference): Return bitpos and bitsize as HOST_WIDE_INT. Rework all calculations to use trees and new fields. * expr.h (promoted_input_arg): Regno now unsigned. (store_bit_field, extract_bit_field): Adjust types of pos and size. (mark_seen_cases): Arg is HOST_WIDE_INT. * flow.c (verify_wide_reg_1): REGNO now unsigned. * fold-const.c (decode_field_reference): Size and pos HOST_WIDE_INT; precisions and alignments are unsigned. (optimize_bit_field_compare, fold_truthop): Likewise. (int_const_binop): Adjust threshold for size_int_type_wide call. (fold_convert): Likewise. (size_int_type_wide): Make table larger and fix thinko that only had half of table used. (all_ones_mask_p, fold): Precisions are unsigned. * function.c (put_reg_info_stack): REGNO is unsigned. (instantiate_decl): Size is HOST_WIDE_INT. (instantiate_virtual_regs): I is unsigned. (assign_parms): REGNO, REGNOI, and REGNOR are unsigned. (promoted_input_arg): REGNO is unsigned. * function.h (struct function): x_max_parm_reg is now unsigned. * gcse.c (max_gcse_regno): Now unsigned. (struct null_pointer_info): min_reg and max_reg now unsigned. (lookup_set, next_set): REGNO arg now unsigned. (compute_hash_table): REGNO and I now unsigned. (handle_avail_expr): regnum_for_replacing now unsigned. (cprop_insn): REGNO now unsigned. (delete_null_pointer_checks_1): BLOCK_REG now pointer to unsigned. * ggc-common.c (ggc_mark_tree_children, case FIELD_DECL): New case. * global.c (set_preference): SRC_REGNO, DEST_REGNO, and I now unsigned. * hard-reg-set.h (reg_class_size): Now unsigned. * integrate.c (mark_stores): LAST_REG and I now unsigned; new UREGNO. * jump.c (mark_modified_reg): I now unsigned; add cast. (rtx_equal_for_thread_p): Add cast. * loop.c (max_reg_before_loop): Now unsigned. (struct_movable): REGNO now unsigned. (try_copy_prop): REGNO arg unsigned. (regs_match_p): XN and YN now unsigned. (consec_sets_invariant_p, maybe_eliminate_biv): REGNO now unsigned. (strength_reduce): Likewise; NREGS also unsigned. (first_increment_giv, last_increment_giv unsigned): Now unsigned. * loop.h (struct iv_class): REGNO now unsigned. (max_reg_before_loop, first_increment_giv, last_increment_giv): Now unsigned. * machmode.h (mode_size, mode_unit_size): Now unsigned. (mode_for_size, smallest_mode_for_size): Pass size as unsigned. * optabs.c (expand_binop): I and NWORDS now unsigned. (expand_unop): I now unsigned. * print-tree.c (print_node): Don't print DECL_FIELD_BITPOS, but do print DECL_FIELD_OFFSET and DECL_FIELD_BIT_OFFSET. * real.c (significand_size): Now returns unsigned. * real.h (significand_size): Likewise. * regclass.c (reg_class_size): Now unsigned. (choose_hard_reg_mode): Both operands now unsigned. (record_reg_classes): REGNO and NR now unsigned. (reg_scan): NREGS now unsigned. (reg_scan_update): old_max_regno now unsigned. (reg_scan_mark_refs): Arg MIN_REGNO and var REGNO now unsigned. * reload.c (find_valid_class): BEST_SIZE now unsigned. (find_dummy_reload): REGNO, NWORDS, and I now unsigned. (hard_reg_set_here_p): Args BEG_REGNO and END_REGNO now unsigned. Likewise for variable R. (refers_to_regno_for_reload_p): Args REGNO and END_REGNO now unsigned, as are variables INNER_REGNO and INNER_ENDREGNO; add new variable R. (find_equiv_reg): Add casts. (regno_clobbered_p): Arg REGNO now unsigned. * reload.h (struct reload): NREGS now unsigned. (refers_to_regno_for_reload_p): Regno args are unsigned. (regno_clobbered_p): Likewise. * reload1.c (reg_max_ref_width, spill_stack_slot_width): Now unsigned. (compute_use_by_pseudos): REGNO now unsigned. (find_reg): I and J now unsigned, new variable K, and change loop variables accordingly; THIS_NREGS now unsigned. (alter_reg): INHERENT_SIZE and TOTAL_SIZE now unsigned. (spill_hard_reg): REGNO arg now unsigned; add casts. (forget_old_reloads_1): REGNO, NR, and I now unsigned. (mark_reload_reg_in_use): Arg REGNO and vars NREGS and I now unsigned. (clear_reload_reg_in_use): Arg REGNO and vars NREGS, START_REGNO, END_REGNO, CONFLICT_START, and CONFLICT_END now unsigned. (reload_reg_free_p, reload_reg_reaches_end_p): Arg REGNO now unsigned. (choose_reload_regs): MAX_GROUP_SIZE now unsigned. (emit_reload_insns): REGNO now unsigned. (reload_cse_move2add): Add cast. (move2add_note_store): REGNO and I now unsigned; new variable ENDREGNO and rework loop. * resource.c (mark_referenced_resources, mark_set_resources): New variable R; REGNO and LAST_REGNO now unsigned. (mark_target_live_regs): J and REGNO now unsigned. * rtl.c (mode_size, mode_unit_size): Now unsigned. * rtl.h (union rtunion_def): New field rtuint. (XCUINT): New macro. (ADDRESSOF_REGNO, REGNO, SUBREG_WORD): New XCUINT. (operand_subword, operand_subword_force): Word number is unsigned. (choose_hard_reg_mode): Operands are unsigned. (refers_to-regno_p, dead_or_set_regno_p): Regno arg is unsigned. (find_regno_note, find_regno_fusage, replace_regs): Likewise. (regno_use_in, combine_instructions, remove_death): Likewise. (reg_scan, reg_scan_update): Likewise. (extended_count): Return is unsigned. * rtlanal.c (refers_to_regno_p): Args REGNO and ENDREGNO and vars I, INNER_REGNO, and INNER_ENDREGNO now unsigned; new variable X_REGNO. (reg_overlap_mentioned_p): REGNO and ENDREGNO now unsigned. (reg_set_last_first_regno, reg_set_last_last_regno): Now unsigned. (reg_reg_last_1): FIRS and LAST now unsigned. (dead_or_set_p): REGNO, LAST_REGNO, and I now unsigned. (dead_or_set_regno_p): Arg TEST_REGNO and vars REGNO and ENDREGNO now unsigned. (find_regno_note, regno_use_in): Arg REGNO now unsigned. (find_regno_fusage): Likewise; also var REGNOTE now unsigned. (find_reg_fusage): Variables REGNO, END_REGNO, and I now unsigned. (replace_regs): Arg NREGS now unsigned. * sdbout.c (sdbout_parms, sdbout_reg_parms): Don't check REGNO < 0. * simplify-rtx.c (simplify_unary_operation): WIDTH now unsigned. (simplify_binary_operation): Likewise. (cselib_invalidate_regno): Arg REGNO and variables ENDREGNO, I, and THIS_LAST now unsigned. (cselib_record_set): Add cast. * ssa.c (ssa_max_reg_num): Now unsigned. (rename_block): REGNO now unsigned. * stmt.c (expand_return): Bit positions unsigned HOST_WIDE_INT; sizes now unsigned. (all_cases_count): Just return -1 not -2. COUNT, MINVAL, and LASTVAL now HOST_WIDE_INT. Rework tests to use trees whenever possible. Use host_integerp and tree_low_cst. (mark_seen_cases): COUNT arg now HOST_WIDE_INT; Likewise variable NEXT_NODE_OFFSET; XLO now unsigned. (check_for_full_enumeration_handing): BYTES_NEEDED, I to HOST_WIDE_INT. * stor-layout.c (mode_for_size): SIZE arg now unsigned. (smallest_mode_for_size): Likewise. (layout_decl): Simplify handing of a specified DECL_SIZE_UNIT. KNOWN_ALIGN is now an alignment, so simplify code. Don't turn off DECL_BIT_FIELD if field is BLKmode, but not type. (start_record_layout): Renamed from new_record_layout_info. Update to new fields. (debug_rli, normalize_rli, rli_size_unit_so_far, rli_size_so_far): New functions. (place_union_field): Renamed from layout_union_field. Update to use new fields in rli. (place_field): Renamed from layout_field. Major rewrite to use new fields in rli; pass alignment to layout_decl. (finalize_record_size): Rework to use new fields in rli and handle union. (compute_record_mode): Rework to simplify and to use new DECL fields. (finalize_type_size): Make rounding more consistent. (finish_union_layout): Deleted. (layout_type, case VOID_TYPE): Don't set TYPE_SIZE_UNIT either. (layout_type, case RECORD_TYPE): Call new function names. (initialize_sizetypes): Set TYPE_IS_SIZETYPE. (set_sizetype): Set TYPE_IS_SIZETYPE earlier. (get_best_mode): UNIT is now unsigned; remove casts. * tree.c (bit_position): Compute from new fields. (byte_position, int_byte_position): New functions. (print_type_hash_statistics): Cast to remove warning. (build_range_type): Use host_integerp and tree_low_cst to try to hash. (build_index_type): Likewise; make subtype of sizetype. (build_index_2_type): Pass sizetype to build_range_type. (build_common_tree_nodes): Use size_int and bitsize_int to initialize nodes; add bitsize_{zero,one,unit}_node. * tree.h (DECL_FIELD_CONTEXT): Use FIELD_DECL_CHECK. (DECL_BIT_FIELD_TYPE, DECL_QUALIFIER, DECL_FCONTEXT): Likewise. (DECL_PACKED, DECL_BIT_FIELD): Likewise. (DECL_FIELD_BITPOS): Deleted. (DECL_FIELD_OFFSET, DECL_FIELD_BIT_OFFSET): New fields. (DECL_RESULT, DECL_SAVED_INSNS): Use FUNCTION_DECL_CHECK. (DECL_FRAME_SIZE, DECL_FUNCTION_CODE, DECL_NO_STATIC_CHAIN): Likewise. (DECL_INLINE, DECL_BUILT_IN_NONANSI, DECL_IS_MALLOC): Likewise. (DECL_BUILT_IN_CLASS, DECL_STATIC_CONSTRUCTOR): Likewise. (DECL_STATIC_DESTRUCTOR, DECL_NO_CHECK_MEMORY_USAGE): Likewise. (DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT, DECL_NO_LIMIT_STACK) Likewise. (DECL_ORIGINAL_TYPE, TYPE_DECL_SUPPRESS_DEBUG): Use TYPE_DECL_CHECK. (DECL_ARG_TYPE_AS_WRITEN, DECL_ARG_TYPE): Use PARM_DECL_CHECK. (DECL_INCOMING_RTL, DECL_TRANSPARENT_UNION): Likewise. (DECL_ALIGN): Adjust to new field in union. (DECL_OFFSET_ALIGN): New field. (DECL_ERROR_ISSUED, DECL_TOO_LATE): Use LABEL_DECL_CHECK. (DECL_IN_TEXT_SECTION): Use VAR_DECL_CHECK. (union tree_decl): Add struct for both aligns. (enum tree_index): Add TI_BITSIZE_{ZERO,ONE,UNIT}. (bitsize_zero_node, bitsize_one_node, bitsize_unit_node): Added. (struct record_layout_info): Rework fields to have offset alignment and byte and bit position. (start_record_layout, place_field): Renamed from old names. (rli_size_so_far, rli_size_unit_so_far, normalize_rli): New decls. (byte_position, int_byte_position): Likewise. (get_inner_reference): Change types of position and length. * unroll.c (unroll_loop): New variable R; use for some loops. MAX_LOCAL_REGNUM and MAXREGNUM now unsigned. (calculate_giv_inc): Arg REGNO now unsigned. (copy_loop_body): REGNO and SRC_REGNO now unsigned. * varasm.c (assemble_variable): Clean up handling of size using host_integerp and tree_low_cst. (decode_addr_const): Use byte, not bit, position. (output_constructor): bitpos and offsets are HOST_WIDE_INT; use tree_low_cst and int_bit_position. * objc/objc-act.c (build_ivar_list_initializer): Use byte_position. * ch/actions.c (check_missing_cases): BYTES_NEEDED is HOST_WIDE_INT. * ch/typeck.c (expand_constant_to_buffer): Use int_byte_position. (extract_constant_from_buffer): Likewise. * cp/class.c (build_vbase_pointer_fields): layout_field now place_field. (get_vfield_offset): Use byte_position. (set_rtti_entry): Set OFFSET to ssizetype zero. (get_binfo_offset_as_int): Deleted. (dfs_record_base_offsets): Use tree_low_cst. (dfs_search_base_offsets): Likewise. (layout_nonempty_base_or_field): Reflect changes in RLI format and call byte_position. (layout_empty_base): Convert offset to ssizetype. (build_base_field): use rli_size_unit_so_far. (dfs_propagate_binfo_offsets): Do computation in proper type. (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets. (layout_class_type): Reflect changes in RLI names and fields. (finish_struct_1): Set DECL_FIELD_OFFSET. * cp/dump.c (dequeue_and_dump): Call bit_position. * cp/expr.c (cplus_expand_constant): Use byte_position. * cp/rtti.c (expand_class_desc): Use bitsize_one_node. * cp/typeck.c (build_component_addr): Use byte_position and don't special case for zero offset. * f/com.c (ffecom_tree_canonize_ptr_): Use bitsize_zero_node. (ffecom_tree_canonize_ref_): Likewise. * java/class.c (make_field_value): Use byte_position. * java/expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position. (java_array_data_offset): Likewise. * java/java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to bzero call. From-SVN: r32742
2000-03-25 19:34:13 +01:00
x_regno = REGNO (x);
/* If we modifying the stack, frame, or argument pointer, it will
clobber a virtual register. In fact, we could be more precise,
but it isn't worth it. */
* Rework fields used to describe positions of bitfields and modify sizes to be unsigned and use HOST_WIDE_INT. * alias.c (reg_known_value_size): Now unsigned. * c-typeck.c (build_unary_op, case ADDR_EXPR): Use byte_position. (really_start_incremental_init): Use bitsize_zero_node. (push_init_level, pop_init_level, output_init_element): Likewise. Use bitsize_unit_node and bitsize_one_node. (output_pending_init_elements, process_init_element): Likewise. * combine.c (combine_max_regno, reg_sign_bit_copies): Now unsigned. (make_extraction): Position and length HOST_WIDE_INT and unsigned HOST_WIDE_INT, respectively. (get_pos_from_mask): Passed in value is unsigned HOST_WIDE_INT. (num_sign_bit_copies): Returns unsigned. BITWIDTH now unsigned; rework arithmetic. Remove recursive call from arg to MAX. (combine_instructions, init_reg_last_arrays): NREGS now unsigned. (setup_incoming_promotions, can_combine_p, try_combine, simplify_set): REGNO now unsigned. (set_nonzero_bit_and_sign_copies): NUM now unsigned. (find_split_point, expand_compound_operation, make_extraction): LEN now unsigned HOST_WIDE_INT, POS now HOST_WIDE_INT. (make_field_assignment): Likewise. (combine_simplify_rtx): Add cast. (expand_compound_operation): MODEWIDTH now unsigned; rework arithmetic. (force_to_mode): WIDTH now unsigned; add cast. (if_then_else_cond): SIZE now unsigned. (nonzero_bits): MODE_WIDTH, RESULT_WIDTH, and WIDTH now unsigned. (extended_count): Now returns unsigned. (simplify_shift_const): COUNT unsigned; arg is now INPUT_COUNT. Add SIGNED_COUNT variable; MODE_WORDS and FIRST_COUNT now unsigned. (simplify_comparison): MODE_WIDTH now unsigned. (update_table_tick): REGNO and ENDREGNO now unsigned; new var R. (mark_used_regs_combine): Likewise; rework arithmetic. (record_value_for_reg): REGNO, ENDREGNO, and I now unsigned. (record_dead_and_set_regs, reg_dead_at_p, distribute_notes): Likewise. (record_promoted_value): REGNO now unsigned. (get_last_value_validate): REGNO, ENDREGNO, and J now unsigned. (get_last_value): REGNO now unsigned. (use_crosses_set_p): REGNO and ENDREGNO now unsigned. (reg_dead_regno, reg_dead_endregno): Now unsigned. (remove_death): Arg REGNO now unsigned. (move_deaths): REGNO, DEADREGNO, DEADEND, OUREND, and I now unsigned. (reg_bitfield_target_p): REGNO, REGNO, ENDREGNO, and ENDTREGNO now unsigned. * convert.c (convert_to_integer): INPREC and OUTPREC now unsigned. * cse.c (struct qty_table_elem): FIRST_REG and LAST_REG now unsigned. (struct cse_reg_info): REGNO now unsigned. (cached_regno): Now unsigned. (REGNO_QTY_VALID_P): Add cast. (make_new_qty, make_regs_eqv, delete_reg_eqiv): Regno args unsigned. (remove_invalid_regs): Likewise. (remove_invalid_subreg_refs): Likewise; arg WORD also unsigned as are variables END and I. (get_cse_reg_info, insert): Likewise. (mention_regs, invalidate_for_call): REGNO, ENDREGNO, and I unsigned. (canon_hash): Likewise. (insert_regs, lookup_for_remove): REGNO now unsigned. (invalidate): REGNO, ENDREGNO, TREGNO, and TENDREGNO now unsigned. New variable RN. * dbxout.c (dbxout_parms, dbxout_reg_parms): Don't check for REGNO < 0. * dwarf2out.c (dwarf2ou_frame_debug_expr): Remove cast. * emit-rtl.c (subreg_realpart_p): Add cast. (operand_subword): Arg I is now unsigned as is var PARTWORDS. (operand_subword_force): Arg I is now unsigned. * except.c (eh_regs): Variable I is now unsigned. * explow.c (hard_function_value): BYTES is unsigned HOST_WIDE_INT. * expmed.c (store_fixed_bit_field): Position is HOST_WIDE_INT; length is unsigned HOST_WIDE_INT; likewise for internal variables. (store_split_bit_field, extract_fixed_bit_field): Likewise. (extract_split_bit_field, store_bit_field, extract_bit_field): Likewise. * expr.c (store_constructor_fields, store_constructor, store_field): Positions are HOST_WIDE_INT and lengths are unsigned HOST_WIDE_INT. (expand_assignment, expand_expr, expand_expr_unaligned): Likewise. (do_jump): Likewise. (move_by_pieces, move_by_pieces_ninsns, clear_by_pieces): MAX_SIZE is now unsigned. (emit_group_load): BYTEPOS is HOST_WIDE_INT; BYTELEN is unsigned. (emit_group_store): Likewise. (emit_move_insn): I now unsigned. (store_constructor): Use host_integerp, tree_low_cst, and bitsize_unit_node. (get_inner_reference): Return bitpos and bitsize as HOST_WIDE_INT. Rework all calculations to use trees and new fields. * expr.h (promoted_input_arg): Regno now unsigned. (store_bit_field, extract_bit_field): Adjust types of pos and size. (mark_seen_cases): Arg is HOST_WIDE_INT. * flow.c (verify_wide_reg_1): REGNO now unsigned. * fold-const.c (decode_field_reference): Size and pos HOST_WIDE_INT; precisions and alignments are unsigned. (optimize_bit_field_compare, fold_truthop): Likewise. (int_const_binop): Adjust threshold for size_int_type_wide call. (fold_convert): Likewise. (size_int_type_wide): Make table larger and fix thinko that only had half of table used. (all_ones_mask_p, fold): Precisions are unsigned. * function.c (put_reg_info_stack): REGNO is unsigned. (instantiate_decl): Size is HOST_WIDE_INT. (instantiate_virtual_regs): I is unsigned. (assign_parms): REGNO, REGNOI, and REGNOR are unsigned. (promoted_input_arg): REGNO is unsigned. * function.h (struct function): x_max_parm_reg is now unsigned. * gcse.c (max_gcse_regno): Now unsigned. (struct null_pointer_info): min_reg and max_reg now unsigned. (lookup_set, next_set): REGNO arg now unsigned. (compute_hash_table): REGNO and I now unsigned. (handle_avail_expr): regnum_for_replacing now unsigned. (cprop_insn): REGNO now unsigned. (delete_null_pointer_checks_1): BLOCK_REG now pointer to unsigned. * ggc-common.c (ggc_mark_tree_children, case FIELD_DECL): New case. * global.c (set_preference): SRC_REGNO, DEST_REGNO, and I now unsigned. * hard-reg-set.h (reg_class_size): Now unsigned. * integrate.c (mark_stores): LAST_REG and I now unsigned; new UREGNO. * jump.c (mark_modified_reg): I now unsigned; add cast. (rtx_equal_for_thread_p): Add cast. * loop.c (max_reg_before_loop): Now unsigned. (struct_movable): REGNO now unsigned. (try_copy_prop): REGNO arg unsigned. (regs_match_p): XN and YN now unsigned. (consec_sets_invariant_p, maybe_eliminate_biv): REGNO now unsigned. (strength_reduce): Likewise; NREGS also unsigned. (first_increment_giv, last_increment_giv unsigned): Now unsigned. * loop.h (struct iv_class): REGNO now unsigned. (max_reg_before_loop, first_increment_giv, last_increment_giv): Now unsigned. * machmode.h (mode_size, mode_unit_size): Now unsigned. (mode_for_size, smallest_mode_for_size): Pass size as unsigned. * optabs.c (expand_binop): I and NWORDS now unsigned. (expand_unop): I now unsigned. * print-tree.c (print_node): Don't print DECL_FIELD_BITPOS, but do print DECL_FIELD_OFFSET and DECL_FIELD_BIT_OFFSET. * real.c (significand_size): Now returns unsigned. * real.h (significand_size): Likewise. * regclass.c (reg_class_size): Now unsigned. (choose_hard_reg_mode): Both operands now unsigned. (record_reg_classes): REGNO and NR now unsigned. (reg_scan): NREGS now unsigned. (reg_scan_update): old_max_regno now unsigned. (reg_scan_mark_refs): Arg MIN_REGNO and var REGNO now unsigned. * reload.c (find_valid_class): BEST_SIZE now unsigned. (find_dummy_reload): REGNO, NWORDS, and I now unsigned. (hard_reg_set_here_p): Args BEG_REGNO and END_REGNO now unsigned. Likewise for variable R. (refers_to_regno_for_reload_p): Args REGNO and END_REGNO now unsigned, as are variables INNER_REGNO and INNER_ENDREGNO; add new variable R. (find_equiv_reg): Add casts. (regno_clobbered_p): Arg REGNO now unsigned. * reload.h (struct reload): NREGS now unsigned. (refers_to_regno_for_reload_p): Regno args are unsigned. (regno_clobbered_p): Likewise. * reload1.c (reg_max_ref_width, spill_stack_slot_width): Now unsigned. (compute_use_by_pseudos): REGNO now unsigned. (find_reg): I and J now unsigned, new variable K, and change loop variables accordingly; THIS_NREGS now unsigned. (alter_reg): INHERENT_SIZE and TOTAL_SIZE now unsigned. (spill_hard_reg): REGNO arg now unsigned; add casts. (forget_old_reloads_1): REGNO, NR, and I now unsigned. (mark_reload_reg_in_use): Arg REGNO and vars NREGS and I now unsigned. (clear_reload_reg_in_use): Arg REGNO and vars NREGS, START_REGNO, END_REGNO, CONFLICT_START, and CONFLICT_END now unsigned. (reload_reg_free_p, reload_reg_reaches_end_p): Arg REGNO now unsigned. (choose_reload_regs): MAX_GROUP_SIZE now unsigned. (emit_reload_insns): REGNO now unsigned. (reload_cse_move2add): Add cast. (move2add_note_store): REGNO and I now unsigned; new variable ENDREGNO and rework loop. * resource.c (mark_referenced_resources, mark_set_resources): New variable R; REGNO and LAST_REGNO now unsigned. (mark_target_live_regs): J and REGNO now unsigned. * rtl.c (mode_size, mode_unit_size): Now unsigned. * rtl.h (union rtunion_def): New field rtuint. (XCUINT): New macro. (ADDRESSOF_REGNO, REGNO, SUBREG_WORD): New XCUINT. (operand_subword, operand_subword_force): Word number is unsigned. (choose_hard_reg_mode): Operands are unsigned. (refers_to-regno_p, dead_or_set_regno_p): Regno arg is unsigned. (find_regno_note, find_regno_fusage, replace_regs): Likewise. (regno_use_in, combine_instructions, remove_death): Likewise. (reg_scan, reg_scan_update): Likewise. (extended_count): Return is unsigned. * rtlanal.c (refers_to_regno_p): Args REGNO and ENDREGNO and vars I, INNER_REGNO, and INNER_ENDREGNO now unsigned; new variable X_REGNO. (reg_overlap_mentioned_p): REGNO and ENDREGNO now unsigned. (reg_set_last_first_regno, reg_set_last_last_regno): Now unsigned. (reg_reg_last_1): FIRS and LAST now unsigned. (dead_or_set_p): REGNO, LAST_REGNO, and I now unsigned. (dead_or_set_regno_p): Arg TEST_REGNO and vars REGNO and ENDREGNO now unsigned. (find_regno_note, regno_use_in): Arg REGNO now unsigned. (find_regno_fusage): Likewise; also var REGNOTE now unsigned. (find_reg_fusage): Variables REGNO, END_REGNO, and I now unsigned. (replace_regs): Arg NREGS now unsigned. * sdbout.c (sdbout_parms, sdbout_reg_parms): Don't check REGNO < 0. * simplify-rtx.c (simplify_unary_operation): WIDTH now unsigned. (simplify_binary_operation): Likewise. (cselib_invalidate_regno): Arg REGNO and variables ENDREGNO, I, and THIS_LAST now unsigned. (cselib_record_set): Add cast. * ssa.c (ssa_max_reg_num): Now unsigned. (rename_block): REGNO now unsigned. * stmt.c (expand_return): Bit positions unsigned HOST_WIDE_INT; sizes now unsigned. (all_cases_count): Just return -1 not -2. COUNT, MINVAL, and LASTVAL now HOST_WIDE_INT. Rework tests to use trees whenever possible. Use host_integerp and tree_low_cst. (mark_seen_cases): COUNT arg now HOST_WIDE_INT; Likewise variable NEXT_NODE_OFFSET; XLO now unsigned. (check_for_full_enumeration_handing): BYTES_NEEDED, I to HOST_WIDE_INT. * stor-layout.c (mode_for_size): SIZE arg now unsigned. (smallest_mode_for_size): Likewise. (layout_decl): Simplify handing of a specified DECL_SIZE_UNIT. KNOWN_ALIGN is now an alignment, so simplify code. Don't turn off DECL_BIT_FIELD if field is BLKmode, but not type. (start_record_layout): Renamed from new_record_layout_info. Update to new fields. (debug_rli, normalize_rli, rli_size_unit_so_far, rli_size_so_far): New functions. (place_union_field): Renamed from layout_union_field. Update to use new fields in rli. (place_field): Renamed from layout_field. Major rewrite to use new fields in rli; pass alignment to layout_decl. (finalize_record_size): Rework to use new fields in rli and handle union. (compute_record_mode): Rework to simplify and to use new DECL fields. (finalize_type_size): Make rounding more consistent. (finish_union_layout): Deleted. (layout_type, case VOID_TYPE): Don't set TYPE_SIZE_UNIT either. (layout_type, case RECORD_TYPE): Call new function names. (initialize_sizetypes): Set TYPE_IS_SIZETYPE. (set_sizetype): Set TYPE_IS_SIZETYPE earlier. (get_best_mode): UNIT is now unsigned; remove casts. * tree.c (bit_position): Compute from new fields. (byte_position, int_byte_position): New functions. (print_type_hash_statistics): Cast to remove warning. (build_range_type): Use host_integerp and tree_low_cst to try to hash. (build_index_type): Likewise; make subtype of sizetype. (build_index_2_type): Pass sizetype to build_range_type. (build_common_tree_nodes): Use size_int and bitsize_int to initialize nodes; add bitsize_{zero,one,unit}_node. * tree.h (DECL_FIELD_CONTEXT): Use FIELD_DECL_CHECK. (DECL_BIT_FIELD_TYPE, DECL_QUALIFIER, DECL_FCONTEXT): Likewise. (DECL_PACKED, DECL_BIT_FIELD): Likewise. (DECL_FIELD_BITPOS): Deleted. (DECL_FIELD_OFFSET, DECL_FIELD_BIT_OFFSET): New fields. (DECL_RESULT, DECL_SAVED_INSNS): Use FUNCTION_DECL_CHECK. (DECL_FRAME_SIZE, DECL_FUNCTION_CODE, DECL_NO_STATIC_CHAIN): Likewise. (DECL_INLINE, DECL_BUILT_IN_NONANSI, DECL_IS_MALLOC): Likewise. (DECL_BUILT_IN_CLASS, DECL_STATIC_CONSTRUCTOR): Likewise. (DECL_STATIC_DESTRUCTOR, DECL_NO_CHECK_MEMORY_USAGE): Likewise. (DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT, DECL_NO_LIMIT_STACK) Likewise. (DECL_ORIGINAL_TYPE, TYPE_DECL_SUPPRESS_DEBUG): Use TYPE_DECL_CHECK. (DECL_ARG_TYPE_AS_WRITEN, DECL_ARG_TYPE): Use PARM_DECL_CHECK. (DECL_INCOMING_RTL, DECL_TRANSPARENT_UNION): Likewise. (DECL_ALIGN): Adjust to new field in union. (DECL_OFFSET_ALIGN): New field. (DECL_ERROR_ISSUED, DECL_TOO_LATE): Use LABEL_DECL_CHECK. (DECL_IN_TEXT_SECTION): Use VAR_DECL_CHECK. (union tree_decl): Add struct for both aligns. (enum tree_index): Add TI_BITSIZE_{ZERO,ONE,UNIT}. (bitsize_zero_node, bitsize_one_node, bitsize_unit_node): Added. (struct record_layout_info): Rework fields to have offset alignment and byte and bit position. (start_record_layout, place_field): Renamed from old names. (rli_size_so_far, rli_size_unit_so_far, normalize_rli): New decls. (byte_position, int_byte_position): Likewise. (get_inner_reference): Change types of position and length. * unroll.c (unroll_loop): New variable R; use for some loops. MAX_LOCAL_REGNUM and MAXREGNUM now unsigned. (calculate_giv_inc): Arg REGNO now unsigned. (copy_loop_body): REGNO and SRC_REGNO now unsigned. * varasm.c (assemble_variable): Clean up handling of size using host_integerp and tree_low_cst. (decode_addr_const): Use byte, not bit, position. (output_constructor): bitpos and offsets are HOST_WIDE_INT; use tree_low_cst and int_bit_position. * objc/objc-act.c (build_ivar_list_initializer): Use byte_position. * ch/actions.c (check_missing_cases): BYTES_NEEDED is HOST_WIDE_INT. * ch/typeck.c (expand_constant_to_buffer): Use int_byte_position. (extract_constant_from_buffer): Likewise. * cp/class.c (build_vbase_pointer_fields): layout_field now place_field. (get_vfield_offset): Use byte_position. (set_rtti_entry): Set OFFSET to ssizetype zero. (get_binfo_offset_as_int): Deleted. (dfs_record_base_offsets): Use tree_low_cst. (dfs_search_base_offsets): Likewise. (layout_nonempty_base_or_field): Reflect changes in RLI format and call byte_position. (layout_empty_base): Convert offset to ssizetype. (build_base_field): use rli_size_unit_so_far. (dfs_propagate_binfo_offsets): Do computation in proper type. (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets. (layout_class_type): Reflect changes in RLI names and fields. (finish_struct_1): Set DECL_FIELD_OFFSET. * cp/dump.c (dequeue_and_dump): Call bit_position. * cp/expr.c (cplus_expand_constant): Use byte_position. * cp/rtti.c (expand_class_desc): Use bitsize_one_node. * cp/typeck.c (build_component_addr): Use byte_position and don't special case for zero offset. * f/com.c (ffecom_tree_canonize_ptr_): Use bitsize_zero_node. (ffecom_tree_canonize_ref_): Likewise. * java/class.c (make_field_value): Use byte_position. * java/expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position. (java_array_data_offset): Likewise. * java/java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to bzero call. From-SVN: r32742
2000-03-25 19:34:13 +01:00
if ((x_regno == STACK_POINTER_REGNUM
#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
* Rework fields used to describe positions of bitfields and modify sizes to be unsigned and use HOST_WIDE_INT. * alias.c (reg_known_value_size): Now unsigned. * c-typeck.c (build_unary_op, case ADDR_EXPR): Use byte_position. (really_start_incremental_init): Use bitsize_zero_node. (push_init_level, pop_init_level, output_init_element): Likewise. Use bitsize_unit_node and bitsize_one_node. (output_pending_init_elements, process_init_element): Likewise. * combine.c (combine_max_regno, reg_sign_bit_copies): Now unsigned. (make_extraction): Position and length HOST_WIDE_INT and unsigned HOST_WIDE_INT, respectively. (get_pos_from_mask): Passed in value is unsigned HOST_WIDE_INT. (num_sign_bit_copies): Returns unsigned. BITWIDTH now unsigned; rework arithmetic. Remove recursive call from arg to MAX. (combine_instructions, init_reg_last_arrays): NREGS now unsigned. (setup_incoming_promotions, can_combine_p, try_combine, simplify_set): REGNO now unsigned. (set_nonzero_bit_and_sign_copies): NUM now unsigned. (find_split_point, expand_compound_operation, make_extraction): LEN now unsigned HOST_WIDE_INT, POS now HOST_WIDE_INT. (make_field_assignment): Likewise. (combine_simplify_rtx): Add cast. (expand_compound_operation): MODEWIDTH now unsigned; rework arithmetic. (force_to_mode): WIDTH now unsigned; add cast. (if_then_else_cond): SIZE now unsigned. (nonzero_bits): MODE_WIDTH, RESULT_WIDTH, and WIDTH now unsigned. (extended_count): Now returns unsigned. (simplify_shift_const): COUNT unsigned; arg is now INPUT_COUNT. Add SIGNED_COUNT variable; MODE_WORDS and FIRST_COUNT now unsigned. (simplify_comparison): MODE_WIDTH now unsigned. (update_table_tick): REGNO and ENDREGNO now unsigned; new var R. (mark_used_regs_combine): Likewise; rework arithmetic. (record_value_for_reg): REGNO, ENDREGNO, and I now unsigned. (record_dead_and_set_regs, reg_dead_at_p, distribute_notes): Likewise. (record_promoted_value): REGNO now unsigned. (get_last_value_validate): REGNO, ENDREGNO, and J now unsigned. (get_last_value): REGNO now unsigned. (use_crosses_set_p): REGNO and ENDREGNO now unsigned. (reg_dead_regno, reg_dead_endregno): Now unsigned. (remove_death): Arg REGNO now unsigned. (move_deaths): REGNO, DEADREGNO, DEADEND, OUREND, and I now unsigned. (reg_bitfield_target_p): REGNO, REGNO, ENDREGNO, and ENDTREGNO now unsigned. * convert.c (convert_to_integer): INPREC and OUTPREC now unsigned. * cse.c (struct qty_table_elem): FIRST_REG and LAST_REG now unsigned. (struct cse_reg_info): REGNO now unsigned. (cached_regno): Now unsigned. (REGNO_QTY_VALID_P): Add cast. (make_new_qty, make_regs_eqv, delete_reg_eqiv): Regno args unsigned. (remove_invalid_regs): Likewise. (remove_invalid_subreg_refs): Likewise; arg WORD also unsigned as are variables END and I. (get_cse_reg_info, insert): Likewise. (mention_regs, invalidate_for_call): REGNO, ENDREGNO, and I unsigned. (canon_hash): Likewise. (insert_regs, lookup_for_remove): REGNO now unsigned. (invalidate): REGNO, ENDREGNO, TREGNO, and TENDREGNO now unsigned. New variable RN. * dbxout.c (dbxout_parms, dbxout_reg_parms): Don't check for REGNO < 0. * dwarf2out.c (dwarf2ou_frame_debug_expr): Remove cast. * emit-rtl.c (subreg_realpart_p): Add cast. (operand_subword): Arg I is now unsigned as is var PARTWORDS. (operand_subword_force): Arg I is now unsigned. * except.c (eh_regs): Variable I is now unsigned. * explow.c (hard_function_value): BYTES is unsigned HOST_WIDE_INT. * expmed.c (store_fixed_bit_field): Position is HOST_WIDE_INT; length is unsigned HOST_WIDE_INT; likewise for internal variables. (store_split_bit_field, extract_fixed_bit_field): Likewise. (extract_split_bit_field, store_bit_field, extract_bit_field): Likewise. * expr.c (store_constructor_fields, store_constructor, store_field): Positions are HOST_WIDE_INT and lengths are unsigned HOST_WIDE_INT. (expand_assignment, expand_expr, expand_expr_unaligned): Likewise. (do_jump): Likewise. (move_by_pieces, move_by_pieces_ninsns, clear_by_pieces): MAX_SIZE is now unsigned. (emit_group_load): BYTEPOS is HOST_WIDE_INT; BYTELEN is unsigned. (emit_group_store): Likewise. (emit_move_insn): I now unsigned. (store_constructor): Use host_integerp, tree_low_cst, and bitsize_unit_node. (get_inner_reference): Return bitpos and bitsize as HOST_WIDE_INT. Rework all calculations to use trees and new fields. * expr.h (promoted_input_arg): Regno now unsigned. (store_bit_field, extract_bit_field): Adjust types of pos and size. (mark_seen_cases): Arg is HOST_WIDE_INT. * flow.c (verify_wide_reg_1): REGNO now unsigned. * fold-const.c (decode_field_reference): Size and pos HOST_WIDE_INT; precisions and alignments are unsigned. (optimize_bit_field_compare, fold_truthop): Likewise. (int_const_binop): Adjust threshold for size_int_type_wide call. (fold_convert): Likewise. (size_int_type_wide): Make table larger and fix thinko that only had half of table used. (all_ones_mask_p, fold): Precisions are unsigned. * function.c (put_reg_info_stack): REGNO is unsigned. (instantiate_decl): Size is HOST_WIDE_INT. (instantiate_virtual_regs): I is unsigned. (assign_parms): REGNO, REGNOI, and REGNOR are unsigned. (promoted_input_arg): REGNO is unsigned. * function.h (struct function): x_max_parm_reg is now unsigned. * gcse.c (max_gcse_regno): Now unsigned. (struct null_pointer_info): min_reg and max_reg now unsigned. (lookup_set, next_set): REGNO arg now unsigned. (compute_hash_table): REGNO and I now unsigned. (handle_avail_expr): regnum_for_replacing now unsigned. (cprop_insn): REGNO now unsigned. (delete_null_pointer_checks_1): BLOCK_REG now pointer to unsigned. * ggc-common.c (ggc_mark_tree_children, case FIELD_DECL): New case. * global.c (set_preference): SRC_REGNO, DEST_REGNO, and I now unsigned. * hard-reg-set.h (reg_class_size): Now unsigned. * integrate.c (mark_stores): LAST_REG and I now unsigned; new UREGNO. * jump.c (mark_modified_reg): I now unsigned; add cast. (rtx_equal_for_thread_p): Add cast. * loop.c (max_reg_before_loop): Now unsigned. (struct_movable): REGNO now unsigned. (try_copy_prop): REGNO arg unsigned. (regs_match_p): XN and YN now unsigned. (consec_sets_invariant_p, maybe_eliminate_biv): REGNO now unsigned. (strength_reduce): Likewise; NREGS also unsigned. (first_increment_giv, last_increment_giv unsigned): Now unsigned. * loop.h (struct iv_class): REGNO now unsigned. (max_reg_before_loop, first_increment_giv, last_increment_giv): Now unsigned. * machmode.h (mode_size, mode_unit_size): Now unsigned. (mode_for_size, smallest_mode_for_size): Pass size as unsigned. * optabs.c (expand_binop): I and NWORDS now unsigned. (expand_unop): I now unsigned. * print-tree.c (print_node): Don't print DECL_FIELD_BITPOS, but do print DECL_FIELD_OFFSET and DECL_FIELD_BIT_OFFSET. * real.c (significand_size): Now returns unsigned. * real.h (significand_size): Likewise. * regclass.c (reg_class_size): Now unsigned. (choose_hard_reg_mode): Both operands now unsigned. (record_reg_classes): REGNO and NR now unsigned. (reg_scan): NREGS now unsigned. (reg_scan_update): old_max_regno now unsigned. (reg_scan_mark_refs): Arg MIN_REGNO and var REGNO now unsigned. * reload.c (find_valid_class): BEST_SIZE now unsigned. (find_dummy_reload): REGNO, NWORDS, and I now unsigned. (hard_reg_set_here_p): Args BEG_REGNO and END_REGNO now unsigned. Likewise for variable R. (refers_to_regno_for_reload_p): Args REGNO and END_REGNO now unsigned, as are variables INNER_REGNO and INNER_ENDREGNO; add new variable R. (find_equiv_reg): Add casts. (regno_clobbered_p): Arg REGNO now unsigned. * reload.h (struct reload): NREGS now unsigned. (refers_to_regno_for_reload_p): Regno args are unsigned. (regno_clobbered_p): Likewise. * reload1.c (reg_max_ref_width, spill_stack_slot_width): Now unsigned. (compute_use_by_pseudos): REGNO now unsigned. (find_reg): I and J now unsigned, new variable K, and change loop variables accordingly; THIS_NREGS now unsigned. (alter_reg): INHERENT_SIZE and TOTAL_SIZE now unsigned. (spill_hard_reg): REGNO arg now unsigned; add casts. (forget_old_reloads_1): REGNO, NR, and I now unsigned. (mark_reload_reg_in_use): Arg REGNO and vars NREGS and I now unsigned. (clear_reload_reg_in_use): Arg REGNO and vars NREGS, START_REGNO, END_REGNO, CONFLICT_START, and CONFLICT_END now unsigned. (reload_reg_free_p, reload_reg_reaches_end_p): Arg REGNO now unsigned. (choose_reload_regs): MAX_GROUP_SIZE now unsigned. (emit_reload_insns): REGNO now unsigned. (reload_cse_move2add): Add cast. (move2add_note_store): REGNO and I now unsigned; new variable ENDREGNO and rework loop. * resource.c (mark_referenced_resources, mark_set_resources): New variable R; REGNO and LAST_REGNO now unsigned. (mark_target_live_regs): J and REGNO now unsigned. * rtl.c (mode_size, mode_unit_size): Now unsigned. * rtl.h (union rtunion_def): New field rtuint. (XCUINT): New macro. (ADDRESSOF_REGNO, REGNO, SUBREG_WORD): New XCUINT. (operand_subword, operand_subword_force): Word number is unsigned. (choose_hard_reg_mode): Operands are unsigned. (refers_to-regno_p, dead_or_set_regno_p): Regno arg is unsigned. (find_regno_note, find_regno_fusage, replace_regs): Likewise. (regno_use_in, combine_instructions, remove_death): Likewise. (reg_scan, reg_scan_update): Likewise. (extended_count): Return is unsigned. * rtlanal.c (refers_to_regno_p): Args REGNO and ENDREGNO and vars I, INNER_REGNO, and INNER_ENDREGNO now unsigned; new variable X_REGNO. (reg_overlap_mentioned_p): REGNO and ENDREGNO now unsigned. (reg_set_last_first_regno, reg_set_last_last_regno): Now unsigned. (reg_reg_last_1): FIRS and LAST now unsigned. (dead_or_set_p): REGNO, LAST_REGNO, and I now unsigned. (dead_or_set_regno_p): Arg TEST_REGNO and vars REGNO and ENDREGNO now unsigned. (find_regno_note, regno_use_in): Arg REGNO now unsigned. (find_regno_fusage): Likewise; also var REGNOTE now unsigned. (find_reg_fusage): Variables REGNO, END_REGNO, and I now unsigned. (replace_regs): Arg NREGS now unsigned. * sdbout.c (sdbout_parms, sdbout_reg_parms): Don't check REGNO < 0. * simplify-rtx.c (simplify_unary_operation): WIDTH now unsigned. (simplify_binary_operation): Likewise. (cselib_invalidate_regno): Arg REGNO and variables ENDREGNO, I, and THIS_LAST now unsigned. (cselib_record_set): Add cast. * ssa.c (ssa_max_reg_num): Now unsigned. (rename_block): REGNO now unsigned. * stmt.c (expand_return): Bit positions unsigned HOST_WIDE_INT; sizes now unsigned. (all_cases_count): Just return -1 not -2. COUNT, MINVAL, and LASTVAL now HOST_WIDE_INT. Rework tests to use trees whenever possible. Use host_integerp and tree_low_cst. (mark_seen_cases): COUNT arg now HOST_WIDE_INT; Likewise variable NEXT_NODE_OFFSET; XLO now unsigned. (check_for_full_enumeration_handing): BYTES_NEEDED, I to HOST_WIDE_INT. * stor-layout.c (mode_for_size): SIZE arg now unsigned. (smallest_mode_for_size): Likewise. (layout_decl): Simplify handing of a specified DECL_SIZE_UNIT. KNOWN_ALIGN is now an alignment, so simplify code. Don't turn off DECL_BIT_FIELD if field is BLKmode, but not type. (start_record_layout): Renamed from new_record_layout_info. Update to new fields. (debug_rli, normalize_rli, rli_size_unit_so_far, rli_size_so_far): New functions. (place_union_field): Renamed from layout_union_field. Update to use new fields in rli. (place_field): Renamed from layout_field. Major rewrite to use new fields in rli; pass alignment to layout_decl. (finalize_record_size): Rework to use new fields in rli and handle union. (compute_record_mode): Rework to simplify and to use new DECL fields. (finalize_type_size): Make rounding more consistent. (finish_union_layout): Deleted. (layout_type, case VOID_TYPE): Don't set TYPE_SIZE_UNIT either. (layout_type, case RECORD_TYPE): Call new function names. (initialize_sizetypes): Set TYPE_IS_SIZETYPE. (set_sizetype): Set TYPE_IS_SIZETYPE earlier. (get_best_mode): UNIT is now unsigned; remove casts. * tree.c (bit_position): Compute from new fields. (byte_position, int_byte_position): New functions. (print_type_hash_statistics): Cast to remove warning. (build_range_type): Use host_integerp and tree_low_cst to try to hash. (build_index_type): Likewise; make subtype of sizetype. (build_index_2_type): Pass sizetype to build_range_type. (build_common_tree_nodes): Use size_int and bitsize_int to initialize nodes; add bitsize_{zero,one,unit}_node. * tree.h (DECL_FIELD_CONTEXT): Use FIELD_DECL_CHECK. (DECL_BIT_FIELD_TYPE, DECL_QUALIFIER, DECL_FCONTEXT): Likewise. (DECL_PACKED, DECL_BIT_FIELD): Likewise. (DECL_FIELD_BITPOS): Deleted. (DECL_FIELD_OFFSET, DECL_FIELD_BIT_OFFSET): New fields. (DECL_RESULT, DECL_SAVED_INSNS): Use FUNCTION_DECL_CHECK. (DECL_FRAME_SIZE, DECL_FUNCTION_CODE, DECL_NO_STATIC_CHAIN): Likewise. (DECL_INLINE, DECL_BUILT_IN_NONANSI, DECL_IS_MALLOC): Likewise. (DECL_BUILT_IN_CLASS, DECL_STATIC_CONSTRUCTOR): Likewise. (DECL_STATIC_DESTRUCTOR, DECL_NO_CHECK_MEMORY_USAGE): Likewise. (DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT, DECL_NO_LIMIT_STACK) Likewise. (DECL_ORIGINAL_TYPE, TYPE_DECL_SUPPRESS_DEBUG): Use TYPE_DECL_CHECK. (DECL_ARG_TYPE_AS_WRITEN, DECL_ARG_TYPE): Use PARM_DECL_CHECK. (DECL_INCOMING_RTL, DECL_TRANSPARENT_UNION): Likewise. (DECL_ALIGN): Adjust to new field in union. (DECL_OFFSET_ALIGN): New field. (DECL_ERROR_ISSUED, DECL_TOO_LATE): Use LABEL_DECL_CHECK. (DECL_IN_TEXT_SECTION): Use VAR_DECL_CHECK. (union tree_decl): Add struct for both aligns. (enum tree_index): Add TI_BITSIZE_{ZERO,ONE,UNIT}. (bitsize_zero_node, bitsize_one_node, bitsize_unit_node): Added. (struct record_layout_info): Rework fields to have offset alignment and byte and bit position. (start_record_layout, place_field): Renamed from old names. (rli_size_so_far, rli_size_unit_so_far, normalize_rli): New decls. (byte_position, int_byte_position): Likewise. (get_inner_reference): Change types of position and length. * unroll.c (unroll_loop): New variable R; use for some loops. MAX_LOCAL_REGNUM and MAXREGNUM now unsigned. (calculate_giv_inc): Arg REGNO now unsigned. (copy_loop_body): REGNO and SRC_REGNO now unsigned. * varasm.c (assemble_variable): Clean up handling of size using host_integerp and tree_low_cst. (decode_addr_const): Use byte, not bit, position. (output_constructor): bitpos and offsets are HOST_WIDE_INT; use tree_low_cst and int_bit_position. * objc/objc-act.c (build_ivar_list_initializer): Use byte_position. * ch/actions.c (check_missing_cases): BYTES_NEEDED is HOST_WIDE_INT. * ch/typeck.c (expand_constant_to_buffer): Use int_byte_position. (extract_constant_from_buffer): Likewise. * cp/class.c (build_vbase_pointer_fields): layout_field now place_field. (get_vfield_offset): Use byte_position. (set_rtti_entry): Set OFFSET to ssizetype zero. (get_binfo_offset_as_int): Deleted. (dfs_record_base_offsets): Use tree_low_cst. (dfs_search_base_offsets): Likewise. (layout_nonempty_base_or_field): Reflect changes in RLI format and call byte_position. (layout_empty_base): Convert offset to ssizetype. (build_base_field): use rli_size_unit_so_far. (dfs_propagate_binfo_offsets): Do computation in proper type. (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets. (layout_class_type): Reflect changes in RLI names and fields. (finish_struct_1): Set DECL_FIELD_OFFSET. * cp/dump.c (dequeue_and_dump): Call bit_position. * cp/expr.c (cplus_expand_constant): Use byte_position. * cp/rtti.c (expand_class_desc): Use bitsize_one_node. * cp/typeck.c (build_component_addr): Use byte_position and don't special case for zero offset. * f/com.c (ffecom_tree_canonize_ptr_): Use bitsize_zero_node. (ffecom_tree_canonize_ref_): Likewise. * java/class.c (make_field_value): Use byte_position. * java/expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position. (java_array_data_offset): Likewise. * java/java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to bzero call. From-SVN: r32742
2000-03-25 19:34:13 +01:00
|| x_regno == ARG_POINTER_REGNUM
#endif
* Rework fields used to describe positions of bitfields and modify sizes to be unsigned and use HOST_WIDE_INT. * alias.c (reg_known_value_size): Now unsigned. * c-typeck.c (build_unary_op, case ADDR_EXPR): Use byte_position. (really_start_incremental_init): Use bitsize_zero_node. (push_init_level, pop_init_level, output_init_element): Likewise. Use bitsize_unit_node and bitsize_one_node. (output_pending_init_elements, process_init_element): Likewise. * combine.c (combine_max_regno, reg_sign_bit_copies): Now unsigned. (make_extraction): Position and length HOST_WIDE_INT and unsigned HOST_WIDE_INT, respectively. (get_pos_from_mask): Passed in value is unsigned HOST_WIDE_INT. (num_sign_bit_copies): Returns unsigned. BITWIDTH now unsigned; rework arithmetic. Remove recursive call from arg to MAX. (combine_instructions, init_reg_last_arrays): NREGS now unsigned. (setup_incoming_promotions, can_combine_p, try_combine, simplify_set): REGNO now unsigned. (set_nonzero_bit_and_sign_copies): NUM now unsigned. (find_split_point, expand_compound_operation, make_extraction): LEN now unsigned HOST_WIDE_INT, POS now HOST_WIDE_INT. (make_field_assignment): Likewise. (combine_simplify_rtx): Add cast. (expand_compound_operation): MODEWIDTH now unsigned; rework arithmetic. (force_to_mode): WIDTH now unsigned; add cast. (if_then_else_cond): SIZE now unsigned. (nonzero_bits): MODE_WIDTH, RESULT_WIDTH, and WIDTH now unsigned. (extended_count): Now returns unsigned. (simplify_shift_const): COUNT unsigned; arg is now INPUT_COUNT. Add SIGNED_COUNT variable; MODE_WORDS and FIRST_COUNT now unsigned. (simplify_comparison): MODE_WIDTH now unsigned. (update_table_tick): REGNO and ENDREGNO now unsigned; new var R. (mark_used_regs_combine): Likewise; rework arithmetic. (record_value_for_reg): REGNO, ENDREGNO, and I now unsigned. (record_dead_and_set_regs, reg_dead_at_p, distribute_notes): Likewise. (record_promoted_value): REGNO now unsigned. (get_last_value_validate): REGNO, ENDREGNO, and J now unsigned. (get_last_value): REGNO now unsigned. (use_crosses_set_p): REGNO and ENDREGNO now unsigned. (reg_dead_regno, reg_dead_endregno): Now unsigned. (remove_death): Arg REGNO now unsigned. (move_deaths): REGNO, DEADREGNO, DEADEND, OUREND, and I now unsigned. (reg_bitfield_target_p): REGNO, REGNO, ENDREGNO, and ENDTREGNO now unsigned. * convert.c (convert_to_integer): INPREC and OUTPREC now unsigned. * cse.c (struct qty_table_elem): FIRST_REG and LAST_REG now unsigned. (struct cse_reg_info): REGNO now unsigned. (cached_regno): Now unsigned. (REGNO_QTY_VALID_P): Add cast. (make_new_qty, make_regs_eqv, delete_reg_eqiv): Regno args unsigned. (remove_invalid_regs): Likewise. (remove_invalid_subreg_refs): Likewise; arg WORD also unsigned as are variables END and I. (get_cse_reg_info, insert): Likewise. (mention_regs, invalidate_for_call): REGNO, ENDREGNO, and I unsigned. (canon_hash): Likewise. (insert_regs, lookup_for_remove): REGNO now unsigned. (invalidate): REGNO, ENDREGNO, TREGNO, and TENDREGNO now unsigned. New variable RN. * dbxout.c (dbxout_parms, dbxout_reg_parms): Don't check for REGNO < 0. * dwarf2out.c (dwarf2ou_frame_debug_expr): Remove cast. * emit-rtl.c (subreg_realpart_p): Add cast. (operand_subword): Arg I is now unsigned as is var PARTWORDS. (operand_subword_force): Arg I is now unsigned. * except.c (eh_regs): Variable I is now unsigned. * explow.c (hard_function_value): BYTES is unsigned HOST_WIDE_INT. * expmed.c (store_fixed_bit_field): Position is HOST_WIDE_INT; length is unsigned HOST_WIDE_INT; likewise for internal variables. (store_split_bit_field, extract_fixed_bit_field): Likewise. (extract_split_bit_field, store_bit_field, extract_bit_field): Likewise. * expr.c (store_constructor_fields, store_constructor, store_field): Positions are HOST_WIDE_INT and lengths are unsigned HOST_WIDE_INT. (expand_assignment, expand_expr, expand_expr_unaligned): Likewise. (do_jump): Likewise. (move_by_pieces, move_by_pieces_ninsns, clear_by_pieces): MAX_SIZE is now unsigned. (emit_group_load): BYTEPOS is HOST_WIDE_INT; BYTELEN is unsigned. (emit_group_store): Likewise. (emit_move_insn): I now unsigned. (store_constructor): Use host_integerp, tree_low_cst, and bitsize_unit_node. (get_inner_reference): Return bitpos and bitsize as HOST_WIDE_INT. Rework all calculations to use trees and new fields. * expr.h (promoted_input_arg): Regno now unsigned. (store_bit_field, extract_bit_field): Adjust types of pos and size. (mark_seen_cases): Arg is HOST_WIDE_INT. * flow.c (verify_wide_reg_1): REGNO now unsigned. * fold-const.c (decode_field_reference): Size and pos HOST_WIDE_INT; precisions and alignments are unsigned. (optimize_bit_field_compare, fold_truthop): Likewise. (int_const_binop): Adjust threshold for size_int_type_wide call. (fold_convert): Likewise. (size_int_type_wide): Make table larger and fix thinko that only had half of table used. (all_ones_mask_p, fold): Precisions are unsigned. * function.c (put_reg_info_stack): REGNO is unsigned. (instantiate_decl): Size is HOST_WIDE_INT. (instantiate_virtual_regs): I is unsigned. (assign_parms): REGNO, REGNOI, and REGNOR are unsigned. (promoted_input_arg): REGNO is unsigned. * function.h (struct function): x_max_parm_reg is now unsigned. * gcse.c (max_gcse_regno): Now unsigned. (struct null_pointer_info): min_reg and max_reg now unsigned. (lookup_set, next_set): REGNO arg now unsigned. (compute_hash_table): REGNO and I now unsigned. (handle_avail_expr): regnum_for_replacing now unsigned. (cprop_insn): REGNO now unsigned. (delete_null_pointer_checks_1): BLOCK_REG now pointer to unsigned. * ggc-common.c (ggc_mark_tree_children, case FIELD_DECL): New case. * global.c (set_preference): SRC_REGNO, DEST_REGNO, and I now unsigned. * hard-reg-set.h (reg_class_size): Now unsigned. * integrate.c (mark_stores): LAST_REG and I now unsigned; new UREGNO. * jump.c (mark_modified_reg): I now unsigned; add cast. (rtx_equal_for_thread_p): Add cast. * loop.c (max_reg_before_loop): Now unsigned. (struct_movable): REGNO now unsigned. (try_copy_prop): REGNO arg unsigned. (regs_match_p): XN and YN now unsigned. (consec_sets_invariant_p, maybe_eliminate_biv): REGNO now unsigned. (strength_reduce): Likewise; NREGS also unsigned. (first_increment_giv, last_increment_giv unsigned): Now unsigned. * loop.h (struct iv_class): REGNO now unsigned. (max_reg_before_loop, first_increment_giv, last_increment_giv): Now unsigned. * machmode.h (mode_size, mode_unit_size): Now unsigned. (mode_for_size, smallest_mode_for_size): Pass size as unsigned. * optabs.c (expand_binop): I and NWORDS now unsigned. (expand_unop): I now unsigned. * print-tree.c (print_node): Don't print DECL_FIELD_BITPOS, but do print DECL_FIELD_OFFSET and DECL_FIELD_BIT_OFFSET. * real.c (significand_size): Now returns unsigned. * real.h (significand_size): Likewise. * regclass.c (reg_class_size): Now unsigned. (choose_hard_reg_mode): Both operands now unsigned. (record_reg_classes): REGNO and NR now unsigned. (reg_scan): NREGS now unsigned. (reg_scan_update): old_max_regno now unsigned. (reg_scan_mark_refs): Arg MIN_REGNO and var REGNO now unsigned. * reload.c (find_valid_class): BEST_SIZE now unsigned. (find_dummy_reload): REGNO, NWORDS, and I now unsigned. (hard_reg_set_here_p): Args BEG_REGNO and END_REGNO now unsigned. Likewise for variable R. (refers_to_regno_for_reload_p): Args REGNO and END_REGNO now unsigned, as are variables INNER_REGNO and INNER_ENDREGNO; add new variable R. (find_equiv_reg): Add casts. (regno_clobbered_p): Arg REGNO now unsigned. * reload.h (struct reload): NREGS now unsigned. (refers_to_regno_for_reload_p): Regno args are unsigned. (regno_clobbered_p): Likewise. * reload1.c (reg_max_ref_width, spill_stack_slot_width): Now unsigned. (compute_use_by_pseudos): REGNO now unsigned. (find_reg): I and J now unsigned, new variable K, and change loop variables accordingly; THIS_NREGS now unsigned. (alter_reg): INHERENT_SIZE and TOTAL_SIZE now unsigned. (spill_hard_reg): REGNO arg now unsigned; add casts. (forget_old_reloads_1): REGNO, NR, and I now unsigned. (mark_reload_reg_in_use): Arg REGNO and vars NREGS and I now unsigned. (clear_reload_reg_in_use): Arg REGNO and vars NREGS, START_REGNO, END_REGNO, CONFLICT_START, and CONFLICT_END now unsigned. (reload_reg_free_p, reload_reg_reaches_end_p): Arg REGNO now unsigned. (choose_reload_regs): MAX_GROUP_SIZE now unsigned. (emit_reload_insns): REGNO now unsigned. (reload_cse_move2add): Add cast. (move2add_note_store): REGNO and I now unsigned; new variable ENDREGNO and rework loop. * resource.c (mark_referenced_resources, mark_set_resources): New variable R; REGNO and LAST_REGNO now unsigned. (mark_target_live_regs): J and REGNO now unsigned. * rtl.c (mode_size, mode_unit_size): Now unsigned. * rtl.h (union rtunion_def): New field rtuint. (XCUINT): New macro. (ADDRESSOF_REGNO, REGNO, SUBREG_WORD): New XCUINT. (operand_subword, operand_subword_force): Word number is unsigned. (choose_hard_reg_mode): Operands are unsigned. (refers_to-regno_p, dead_or_set_regno_p): Regno arg is unsigned. (find_regno_note, find_regno_fusage, replace_regs): Likewise. (regno_use_in, combine_instructions, remove_death): Likewise. (reg_scan, reg_scan_update): Likewise. (extended_count): Return is unsigned. * rtlanal.c (refers_to_regno_p): Args REGNO and ENDREGNO and vars I, INNER_REGNO, and INNER_ENDREGNO now unsigned; new variable X_REGNO. (reg_overlap_mentioned_p): REGNO and ENDREGNO now unsigned. (reg_set_last_first_regno, reg_set_last_last_regno): Now unsigned. (reg_reg_last_1): FIRS and LAST now unsigned. (dead_or_set_p): REGNO, LAST_REGNO, and I now unsigned. (dead_or_set_regno_p): Arg TEST_REGNO and vars REGNO and ENDREGNO now unsigned. (find_regno_note, regno_use_in): Arg REGNO now unsigned. (find_regno_fusage): Likewise; also var REGNOTE now unsigned. (find_reg_fusage): Variables REGNO, END_REGNO, and I now unsigned. (replace_regs): Arg NREGS now unsigned. * sdbout.c (sdbout_parms, sdbout_reg_parms): Don't check REGNO < 0. * simplify-rtx.c (simplify_unary_operation): WIDTH now unsigned. (simplify_binary_operation): Likewise. (cselib_invalidate_regno): Arg REGNO and variables ENDREGNO, I, and THIS_LAST now unsigned. (cselib_record_set): Add cast. * ssa.c (ssa_max_reg_num): Now unsigned. (rename_block): REGNO now unsigned. * stmt.c (expand_return): Bit positions unsigned HOST_WIDE_INT; sizes now unsigned. (all_cases_count): Just return -1 not -2. COUNT, MINVAL, and LASTVAL now HOST_WIDE_INT. Rework tests to use trees whenever possible. Use host_integerp and tree_low_cst. (mark_seen_cases): COUNT arg now HOST_WIDE_INT; Likewise variable NEXT_NODE_OFFSET; XLO now unsigned. (check_for_full_enumeration_handing): BYTES_NEEDED, I to HOST_WIDE_INT. * stor-layout.c (mode_for_size): SIZE arg now unsigned. (smallest_mode_for_size): Likewise. (layout_decl): Simplify handing of a specified DECL_SIZE_UNIT. KNOWN_ALIGN is now an alignment, so simplify code. Don't turn off DECL_BIT_FIELD if field is BLKmode, but not type. (start_record_layout): Renamed from new_record_layout_info. Update to new fields. (debug_rli, normalize_rli, rli_size_unit_so_far, rli_size_so_far): New functions. (place_union_field): Renamed from layout_union_field. Update to use new fields in rli. (place_field): Renamed from layout_field. Major rewrite to use new fields in rli; pass alignment to layout_decl. (finalize_record_size): Rework to use new fields in rli and handle union. (compute_record_mode): Rework to simplify and to use new DECL fields. (finalize_type_size): Make rounding more consistent. (finish_union_layout): Deleted. (layout_type, case VOID_TYPE): Don't set TYPE_SIZE_UNIT either. (layout_type, case RECORD_TYPE): Call new function names. (initialize_sizetypes): Set TYPE_IS_SIZETYPE. (set_sizetype): Set TYPE_IS_SIZETYPE earlier. (get_best_mode): UNIT is now unsigned; remove casts. * tree.c (bit_position): Compute from new fields. (byte_position, int_byte_position): New functions. (print_type_hash_statistics): Cast to remove warning. (build_range_type): Use host_integerp and tree_low_cst to try to hash. (build_index_type): Likewise; make subtype of sizetype. (build_index_2_type): Pass sizetype to build_range_type. (build_common_tree_nodes): Use size_int and bitsize_int to initialize nodes; add bitsize_{zero,one,unit}_node. * tree.h (DECL_FIELD_CONTEXT): Use FIELD_DECL_CHECK. (DECL_BIT_FIELD_TYPE, DECL_QUALIFIER, DECL_FCONTEXT): Likewise. (DECL_PACKED, DECL_BIT_FIELD): Likewise. (DECL_FIELD_BITPOS): Deleted. (DECL_FIELD_OFFSET, DECL_FIELD_BIT_OFFSET): New fields. (DECL_RESULT, DECL_SAVED_INSNS): Use FUNCTION_DECL_CHECK. (DECL_FRAME_SIZE, DECL_FUNCTION_CODE, DECL_NO_STATIC_CHAIN): Likewise. (DECL_INLINE, DECL_BUILT_IN_NONANSI, DECL_IS_MALLOC): Likewise. (DECL_BUILT_IN_CLASS, DECL_STATIC_CONSTRUCTOR): Likewise. (DECL_STATIC_DESTRUCTOR, DECL_NO_CHECK_MEMORY_USAGE): Likewise. (DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT, DECL_NO_LIMIT_STACK) Likewise. (DECL_ORIGINAL_TYPE, TYPE_DECL_SUPPRESS_DEBUG): Use TYPE_DECL_CHECK. (DECL_ARG_TYPE_AS_WRITEN, DECL_ARG_TYPE): Use PARM_DECL_CHECK. (DECL_INCOMING_RTL, DECL_TRANSPARENT_UNION): Likewise. (DECL_ALIGN): Adjust to new field in union. (DECL_OFFSET_ALIGN): New field. (DECL_ERROR_ISSUED, DECL_TOO_LATE): Use LABEL_DECL_CHECK. (DECL_IN_TEXT_SECTION): Use VAR_DECL_CHECK. (union tree_decl): Add struct for both aligns. (enum tree_index): Add TI_BITSIZE_{ZERO,ONE,UNIT}. (bitsize_zero_node, bitsize_one_node, bitsize_unit_node): Added. (struct record_layout_info): Rework fields to have offset alignment and byte and bit position. (start_record_layout, place_field): Renamed from old names. (rli_size_so_far, rli_size_unit_so_far, normalize_rli): New decls. (byte_position, int_byte_position): Likewise. (get_inner_reference): Change types of position and length. * unroll.c (unroll_loop): New variable R; use for some loops. MAX_LOCAL_REGNUM and MAXREGNUM now unsigned. (calculate_giv_inc): Arg REGNO now unsigned. (copy_loop_body): REGNO and SRC_REGNO now unsigned. * varasm.c (assemble_variable): Clean up handling of size using host_integerp and tree_low_cst. (decode_addr_const): Use byte, not bit, position. (output_constructor): bitpos and offsets are HOST_WIDE_INT; use tree_low_cst and int_bit_position. * objc/objc-act.c (build_ivar_list_initializer): Use byte_position. * ch/actions.c (check_missing_cases): BYTES_NEEDED is HOST_WIDE_INT. * ch/typeck.c (expand_constant_to_buffer): Use int_byte_position. (extract_constant_from_buffer): Likewise. * cp/class.c (build_vbase_pointer_fields): layout_field now place_field. (get_vfield_offset): Use byte_position. (set_rtti_entry): Set OFFSET to ssizetype zero. (get_binfo_offset_as_int): Deleted. (dfs_record_base_offsets): Use tree_low_cst. (dfs_search_base_offsets): Likewise. (layout_nonempty_base_or_field): Reflect changes in RLI format and call byte_position. (layout_empty_base): Convert offset to ssizetype. (build_base_field): use rli_size_unit_so_far. (dfs_propagate_binfo_offsets): Do computation in proper type. (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets. (layout_class_type): Reflect changes in RLI names and fields. (finish_struct_1): Set DECL_FIELD_OFFSET. * cp/dump.c (dequeue_and_dump): Call bit_position. * cp/expr.c (cplus_expand_constant): Use byte_position. * cp/rtti.c (expand_class_desc): Use bitsize_one_node. * cp/typeck.c (build_component_addr): Use byte_position and don't special case for zero offset. * f/com.c (ffecom_tree_canonize_ptr_): Use bitsize_zero_node. (ffecom_tree_canonize_ref_): Likewise. * java/class.c (make_field_value): Use byte_position. * java/expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position. (java_array_data_offset): Likewise. * java/java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to bzero call. From-SVN: r32742
2000-03-25 19:34:13 +01:00
|| x_regno == FRAME_POINTER_REGNUM)
&& regno >= FIRST_VIRTUAL_REGISTER && regno <= LAST_VIRTUAL_REGISTER)
return true;
regs.h (end_hard_regno): New function. gcc/ * regs.h (end_hard_regno): New function. (END_HARD_REGNO, END_REGNO): New macros. (add_to_hard_reg_set): New function. (remove_from_hard_reg_set): Likewise. (in_hard_reg_set_p): Likewise. (overlaps_hard_reg_set_p): Likewise. * bt-load.c (find_btr_reference): Use overlaps_hard_reg_set_p. (note_btr_set): Use END_HARD_REGNO. * caller-save.c (setup_save_areas): Use end_hard_regno. (mark_set_regs): Use END_HARD_REGNO. (add_stored_regs): Use end_hard_regno. (mark_referenced_regs): Use add_to_hard_reg_set. * combine.c (update_table_tick): Use END_REGNO. (record_value_for_reg): Likewise. (record_dead_and_set_regs): Likewise. (get_last_value_validate): Likewise. (use_crosses_set_p): Likewise. (reg_dead_at_p_1): Likewise. (reg_dead_at_p): Likewise. (mark_used_regs_combine): Use add_to_hard_reg_set. (move_deaths): Use END_HARD_REGNO. (reg_bitfield_target_p): Use end_hard_regno. (distribute_notes): Use END_HARD_REGNO. * cse.c (mention_regs): Use END_REGNO. (insert): Use add_to_hard_reg_set. (invalidate): Use END_HARD_REGNO. (invalidate_for_call): Likewise. (exp_equiv_p): Use END_REGNO. (cse_insn): Likewise. * cselib.c (cselib_invalidate_regno): Use end_hard_regno. * df-problems.c (df_urec_mark_reg_change): Use END_HARD_REGNO. * df-scan.c (df_ref_record): Use END_HARD_REGNO. * function.c (keep_stack_depressed): Use end_hard_regno. * global.c (global_alloc): Use end_hard_regno. (global_conflicts): Use add_to_hard_reg_set instead of mark_reg_live_nc. (find_reg): Likewise. (mark_reg_store): Likewise. (mark_reg_conflicts): Likewise. (mark_reg_death): Use remove_from_hard_reg_set. (mark_reg_live_nc): Delete. (set_preference): Use end_hard_regno. * local-alloc.c (mark_life): Use add_to_hard_reg_set and remove_from_hard_reg_set. (post_mark_life): Use add_to_hard_reg_set. * mode-switching.c (reg_dies): Use remove_from_hard_reg_set. (reg_becomes_live): Use add_to_hard_reg_set. * recog.c (reg_fits_class_p): Use in_hard_reg_set_p. (peep2_find_free_register): Use add_to_hard_reg_set. * reg-stack.c (convert_regs_exit): Use END_HARD_REGNO. * regclass.c (record_reg_classes): Use in_hard_reg_set_p. * regrename.c (note_sets): Use add_to_hard_reg_set. (clear_dead_regs): Use remove_from_hard_reg_set. (regrename_optimize): Use add_to_hard_reg_set. (find_oldest_value_reg): Use in_hard_reg_set_p. * reload.c (push_reload): Use in_hard_reg_set_p and end_hard_regno. (hard_reg_set_here_p): Use end_hard_regno. (decompose): Likewise. (reg_overlap_mentioned_for_reload_p): Use END_HARD_REGNO. (find_equiv_reg): Use in_hard_reg_set_p and end_hard_regno. * reload1.c (compute_use_by_pseudos): Use add_to_hard_reg_set. (mark_home_live): Use end_hard_regno. (spill_hard_reg): Likewise. (clear_reload_reg_in_use): Likewise. * reorg.c (delete_prior_computation): Use END_REGNO. * resource.c (update_live_status): Use END_HARD_REGNO. (mark_referenced_resources): Use add_to_hard_reg_set. (mark_set_resources): Likewise. (mark_target_live_regs): Likewise. Use remove_from_hard_reg_set. * rtlanal.c (refers_to_regno_p): Use END_REGNO. (reg_overlap_mentioned_p): Likewise. (dead_or_set_p): Likewise. Use an exclusive upper loop bound. (covers_regno_no_parallel_p): Use END_REGNO. (find_regno_note): Likewise. (find_reg_fusage): Use END_HARD_REGNO. * stmt.c (decl_overlaps_hard_reg_set_p): Use overlaps_hard_reg_set_p. * var-tracking.c (emit_note_insn_var_location): Use end_hard_regno. From-SVN: r124961
2007-05-22 22:52:39 +02:00
return endregno > x_regno && regno < END_REGNO (x);
1991-12-01 06:13:56 +01:00
case SUBREG:
/* If this is a SUBREG of a hard reg, we can see exactly which
registers are being modified. Otherwise, handle normally. */
alias.c (record_set, [...]): Use REG_P. 2004-06-15 Jerry Quinn <jlquinn@optonline.net> * alias.c (record_set, record_base_value, canon_rtx, get_addr, nonlocal_mentioned_p_1, init_alias_analysis): Use REG_P. * bt-load.c (find_btr_reference, insn_sets_btr_p, note_btr_set): Likewise. * builtins.c (expand_builtin_setjmp, expand_builtin_apply, expand_builtin_mathfn, expand_builtin_strlen, expand_builtin_memcmp, expand_builtin_strcmp, expand_builtin_strncmp, expand_builtin_frame_address): Likewise. * caller-save.c (mark_set_regs, add_stored_regs, mark_referenced_regs, insert_one_insn): Likewise. * calls.c (prepare_call_address, precompute_register_parameters, precompute_arguments, expand_call, emit_library_call_value_1): Likewise. * cfganal.c (flow_active_insn_p): Likewise. * combine.c (set_nonzero_bits_and_sign_copies, can_combine_p, combinable_i3pat, try_combine, find_split_point, COMBINE_RTX_EQUAL_P, subst, combine_simplify_rtx, simplify_if_then_else, simplify_set, make_extraction, recog_for_combine, gen_lowpart_for_combine, simplify_comparison, record_dead_and_set_regs_1, record_dead_and_set_regs, record_promoted_value, check_promoted_subreg, get_last_value_validate, get_last_value, reg_dead_at_p_1, reg_bitfield_target_p, distribute_notes, unmentioned_reg_p_1): Likewise. * conflict.c (mark_reg): Likewise. * cse.c (HASH, COST, COST_IN, approx_reg_cost_1, notreg_cost, mention_regs, insert_regs, lookup, lookup_for_remove, insert, merge_equiv_classes, flush_hash_table, invalidate, remove_invalid_refs, remove_invalid_subreg_refs, rehash_using_reg, invalidate_for_call, use_related_value, canon_hash, exp_equiv_p, cse_rtx_varies_p, canon_reg, find_best_addr, fold_rtx, equiv_constant, record_jump_cond, cse_insn, addr_affects_sp_p, invalidate_from_clobbers, cse_process_notes, cse_around_loop, cse_set_around_loop, count_reg_usage, set_live_p, cse_change_cc_mode, cse_cc_succs, cse_condition_code_reg): Likewise. * cselib.c (cselib_reg_set_mode, rtx_equal_for_cselib_p, cselib_lookup, cselib_invalidate_regno, cselib_invalidate_rtx, cselib_record_set, cselib_record_sets): Likewise. * dbxout.c (dbxout_symbol_location, dbxout_parms, dbxout_reg_parms, dbxout_block): Likewise. * df.c (df_ref_record, df_def_record_1, df_uses_record): Likewise. * dojump.c (do_jump): Likewise. * dwarf2out.c (dwarf2out_frame_debug_expr, is_pseudo_reg, is_based_loc, rtl_for_decl_location): Likewise. * emit-rtl.c (set_reg_attrs_for_parm, set_decl_rtl, set_decl_incoming_rtl, mark_user_reg): Likewise. * explow.c (copy_all_regs, copy_all_regs, memory_address, force_reg, copy_to_suggested_reg, allocate_dynamic_stack_space, probe_stack_range, hard_function_value): Likewise. * expmed.c (store_bit_field, store_fixed_bit_field, store_split_bit_field, extract_bit_field, extract_fixed_bit_field, extract_split_bit_field, expand_divmod, emit_store_flag_force): Likewise. * expr.c (convert_move, convert_modes, block_move_libcall_safe_for_call_parm, emit_group_load, use_reg, use_group_regs, emit_move_insn, emit_move_insn_1, compress_float_constant, push_block, emit_single_push_insn, emit_push_insn, get_subtarget, expand_assignment, store_expr, store_constructor, store_field, force_operand, safe_from_p, expand_expr_real_1, expand_increment, do_store_flag, do_tablejump): Likewise. * final.c (profile_function, final_scan_insn, alter_subreg, get_mem_expr_from_op, output_asm_operand_names, output_operand, only_leaf_regs_used, leaf_renumber_regs_insn): Likewise. * flow.c (verify_wide_reg_1, mark_regs_live_at_end, find_regno_partial, propagate_one_insn, init_propagate_block_info, insn_dead_p, libcall_dead_p, mark_set_1, not_reg_cond, attempt_auto_inc, find_auto_inc, mark_used_regs, count_or_remove_death_notes_bb): Likewise. * function.c (find_temp_slot_from_address, update_temp_slot_address, preserve_temp_slots, put_var_into_stack, fixup_var_refs_insn, fixup_var_refs_1, fixup_stack_1, optimize_bit_field, flush_addressof, put_addressof_into_stack, purge_addressof_1, insns_for_mem_walk, purge_single_hard_subreg_set, instantiate_decl, instantiate_virtual_regs_1, aggregate_value_p, assign_parms, promoted_input_arg, setjmp_vars_warning, setjmp_args_warning, setjmp_protect, setjmp_protect_args, fix_lexical_addr, expand_function_start, diddle_return_value, clobber_return_register, expand_function_end, keep_stack_depressed, handle_epilogue_set, update_epilogue_consts): Likewise. * genemit.c (gen_exp, gen_insn): Likewise. * genrecog.c (make_insn_sequence): Likewise. * global.c (global_conflicts, expand_preferences, mark_reg_store, mark_reg_conflicts, set_preference, reg_becomes_live, build_insn_chain, mark_reg_change): Likewise. * haifa_sched.c (CONST_BASED_ADDRESS_P, find_set_reg_weight): Likewise. * ifcvt.c (noce_try_abs, noce_get_condition, noce_process_if_block): Likewise. * integrate.c (copy_rtx_and_substitute, try_constants, subst_constants, mark_stores, allocate_initial_values): Likewise. * jump.c (reversed_comparison_code_parts, delete_prior_computation, delete_computation, rtx_renumbered_equal_p, true_regnum, reg_or_subregno): Likewise. * lcm.c (reg_dies, reg_becomes_live): Likewise. * local-alloc.c (validate_equiv_mem_from_store, validate_equiv_mem, update_equiv_regs, no_equiv, block_alloc, combine_regs, reg_is_set, wipe_dead_reg, no_conflict_p): Likewise. * loop-iv.c (simple_reg_p, simple_set_p, kill_sets, iv_get_reaching_def, iv_analyze_biv, altered_reg_used, mark_altered, simple_rhs_p, simplify_using_assignment, implies_p): Likewise. * loop.c (scan_loop, combine_movables, rtx_equal_for_loop_p, move_movables, note_set_pseudo_multiple_uses, consec_sets_invariant_p, find_single_use_in_loop, count_one_set, loop_bivs_init_find, loop_givs_rescan, check_insn_for_bivs, check_insn_for_givs, valid_initial_value_p, simplify_giv_expr, consec_sets_giv, loop_regs_update, check_dbra_loop, maybe_eliminate_biv, maybe_eliminate_biv_1, record_initial, update_reg_last_use, canonicalize_condition, loop_regs_scan, load_mems, try_copy_prop, try_swap_copy_prop): Likewise. * optabs.c (expand_binop, expand_vector_binop, expand_vector_unop, expand_abs, emit_no_conflict_block, emit_libcall_block, expand_float): Likewise. * postreload.c (reload_cse_simplify, reload_cse_simplify_set, reload_cse_simplify_operands, reload_combine, reload_combine_note_store, reload_combine_note_use, reload_cse_move2add, move2add_note_store): Likewise. * print-rtl.c (print_rtx): Likewise. * ra-build.c (copy_insn_p, remember_move, init_one_web_common, contains_pseudo, handle_asm_insn): Likewise. * ra-debug.c (ra_print_rtx_object, dump_constraints, dump_static_insn_cost): Likewise. * ra-rewrite.c (slots_overlap_p, emit_colors, remove_suspicious_death_notes): Likewise. * recog.c (validate_replace_rtx_1, find_single_use_1, find_single_use, register_operand, scratch_operand, nonmemory_operand, constrain_operands): Likewise. * reg-stack (check_asm_stack_operands, remove_regno_note, emit_swap_insn, swap_rtx_condition, subst_stack_regs_pat, subst_asm_stack_regs): Likewise. * regclass.c (scan_one_insn, record_reg_classes, copy_cost, record_address_regs, reg_scan_mark_refs): Likewise. * regmove.c (discover_flags_reg, replacement_quality, copy_src_to_dest, reg_is_remote_constant_p, regmove_optimize, fixup_match_1): Likewise. * regrename.c (note_sets, clear_dead_regs, build_def_use, kill_value, kill_set_value, copyprop_hardreg_forward_1): Likewise. * reload.c (MATCHES, push_secondary_reload, find_reusable_reload, reload_inner_reg_of_subreg, can_reload_into, push_reload, combine_reloads, find_dummy_reload, hard_reg_set_here_p, operands_match_p, decompose, find_reloads, find_reloads_toplev, find_reloads_address, subst_indexed_address, find_reloads_address_1, find_reloads_subreg_address, find_replacement, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p, find_equiv_reg, regno_clobbered_p): Likewise. * reload1.c (replace_pseudos_in, reload, calculate_needs_all_insns, find_reg, delete_dead_insn, alter_reg, eliminate_regs, elimination_effects, eliminate_regs_in_insn, scan_paradoxical_subregs, forget_old_reloads_1, reload_reg_free_for_value_p, choose_reload_regs, emit_input_reload_insns, emit_output_reload_insns, do_input_reload, do_output_reload, emit_reload_insns, gen_reload, delete_address_reloads_1, inc_for_reload): Likewise. * reorg.c (update_reg_dead_notes, fix_reg_dead_note, update_reg_unused_notes, fill_slots_from_thread): Likewise. * resource.c (update_live_status, mark_referenced_resources, mark_set_resources, mark_target_live_regs): Likewise. * rtlanal.c (nonzero_address_p, get_jump_table_offset, global_reg_mentioned_p_1, reg_mentioned_p, reg_referenced_p, reg_set_p, set_noop_p, find_last_value, refers_to_regno_p, note_stores, dead_or_set_p, dead_or_set_regno_p, find_regno_note, find_reg_fusage, find_regno_fusage, replace_regs, regno_use_in, parms_set, find_first_parameter_load, keep_with_call_p, hoist_test_store, hoist_update_store, address_cost, nonzero_bits1, num_sign_bit_copies1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sched-deps.c (deps_may_trap_p, sched_analyze_1, sched_analyze_insn, sched_analyze): Likewise. * sched-rgn.c (check_live_1, update_live_1, sets_likely_spilled_1): Likewise. * sdbout.c (sdbout_symbol, sdbout_parms, sdbout_reg_parms): Likewise. * simplify-rtx.c (simplify_replace_rtx, simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_subreg): Likewise. * stmt.c (decl_conflicts_with_clobbers_p, expand_asm_operands, expand_end_stmt_expr, expand_return, expand_decl, expand_anon_union_decl): Likewise. * unroll.c (precondition_loop_p, calculate_giv_inc, copy_loop_body, find_splittable_regs, find_splittable_givs, find_common_reg_term, loop_iterations): Likewise. * var-tracking.c (variable_union, variable_part_different_p, variable_different_p, count_uses, add_uses, add_stores, compute_bb_dataflow, set_variable_part, delete_variable_part, emit_notes_in_bb, vt_get_decl_and_offset, vt_add_function_parameters): Likewise. * varasm.c (assemble_variable): Likewise. From-SVN: r83195
2004-06-15 20:02:40 +02:00
if (REG_P (SUBREG_REG (x))
1991-12-01 06:13:56 +01:00
&& REGNO (SUBREG_REG (x)) < FIRST_PSEUDO_REGISTER)
{
Use byte offsets in SUBREGs instead of words. 2001-04-03 Jakub Jelinek <jakub@redhat.com> David S. Miller <davem@pierdol.cobaltmicro.com> Andrew MacLeod <amacleod@redhat.com> Use byte offsets in SUBREGs instead of words. * alias.c (nonlocal_mentioned_p): Use subreg_regno function. * caller-save.c (mark_set_regs): Change callers of subreg_hard_regno to pass new argument. (add_stored_regs): Use subreg_regno_offset function. * calls.c (expand_call): For non-paradoxical SUBREG take endianess into account. (precompute_arguments): Use gen_lowpart_SUBREG. * combine.c (try_combine): Replace explicit XEXP with SUBREG_REG. (combine_simplify_rtx): Rework to use SUBREG_BYTE. (simplify_set): Rework to use SUBREG_BYTE. (expand_field_assignment): Use SUBREG_BYTE. (make_extraction): Use SUBREG_BYTE. (if_then_else_cond): Use SUBREG_BYTE. (apply_distributive_law): Use SUBREG_BYTE and fixup subreg comments. (gen_lowpart_for_combine): Compute full byte offset. * cse.c (mention_regs): Use SUBREG_BYTE. (remove_invalid_subreg_refs): Rework to use SUBREG_BYTE. (canon_hash): Use SUBREG_BYTE. (fold_rtx): Pass SUBREG_BYTE div UNITS_PER_WORD to operand_subword. (gen_lowpart_if_possible): Formatting. * dbxout.c (dbxout_symbol_location): Compute SUBREG hard regnos correctly. * dwarf2out.c (is_pseudo_reg): Fixup explicit XEXP into SUBREG_REG (mem_loc_descriptor): Fixup explicit XEXP into SUBREG_REG (loc_descriptor): Fixup explicit XEXP into SUBREG_REG * dwarfout.c (is_pseudo_reg): Fixup explicit XEXP into SUBREG_REG (output_mem_loc_descriptor): Fixup explicit XEXP into SUBREG_REG (output_loc_descriptor): Fixup explicit XEXP into SUBREG_REG * emit-rtl.c (gen_rtx_SUBREG): New function, used to verify certain invariants about SUBREGs the compiler creates. (gen_lowpart_SUBREG): New function. (subreg_hard_regno): New function to get the final register number. (gen_lowpart_common): Use SUBREG_BYTE. (gen_imagpart): Spacing nits. (subreg_realpart_p): Use SUBREG_BYTE. (gen_highpart): Use SUBREG_BYTE. (subreg_lowpart_p): Always compute endian corrected goal offset, even at the byte level, then compare against that. (constant_subword): New function, pulled out all constant cases from operand_subword and changed second argument name to offset. (operand_subword): Detect non REG/SUBREG/CONCAT/MEM cases early and call constant_subword to do the work. Return const0_rtx if looking for a word outside of OP. (operand_subword_force): Change second arg name to offset. * expmed.c (store_bit_field): Use SUBREG_BYTE. (store_split_bit_field): Use SUBREG_BYTE. (extract_bit_field): Use SUBREG_BYTE. (extract_split_bit_field): Use SUBREG_BYTE. (expand_shift): Use SUBREG_BYTE. * expr.c (store_expr, expand_expr): Use gen_lowpart_SUBREG. * final.c (alter_subreg) Use subreg_hard_regno and SUBREG_BYTE. * flow.c (set_noop_p): Use SUBREG_BYTE. (mark_set_1): Remove ALTER_HARD_SUBREG. Use subreg_regno_offset instead. * function.c (fixup_var_refs_1): Fixup explicit XEXP into a SUBREG_REG. (fixup_memory_subreg): Use SUBREG_BYTE and remove byte endian correction code. (optimize_bit_field): Use SUBREG_BYTE. (purge_addressof_1): Use SUBREG_BYTE. (purge_single_hard_subreg_set): Use subreg_regno_offset function. (assign_params): Mark arguments SUBREG_PROMOTED_VAR_P if they are actually promoted by the caller and PROMOTE_FOR_CALLS_ONLY is true. * gengenrtl.c (special_rtx): Add SUBREG. * global.c (mark_reg_store): Use SUBREG_BYTE. (set_preference): Rework to use subreg_regno_offset and SUBREG_BYTE. * ifcvt (noce_emit_move_insn): Use SUBREG_BYTE. * integrate.c (copy_rtx_and_substitute): Use SUBREG_BYTE and make sure final byte offset is congruent to subreg's mode size. (subst_constants): Use SUBREG_BYTE. (mark_stores): Use subreg_regno_offset function. * jump.c (rtx_renumbered_equal_p, true_regnum): Use subreg_regno_offset function and SUBREG_BYTE. * local-alloc.c (combine_regs): Use subreg_regno_offset function. (reg_is_born): Use subreg_hard_regno. * recog.c (valid_replace_rtx_1): Use SUBREG_BYTE and remove byte endian correction code. Don't combine subregs unless resulting offset aligns with type. Fix subreg constant extraction for DImode. Simplify SUBREG of VOIDmode CONST_DOUBLE. (general_operand): Remove dead mode_altering_drug code. (indirect_operand): Use SUBREG_BYTE. (constrain_operands): Use subreg_regno_offset function. * reg-stack.c (get_true_reg): Use subreg_regno_offset function. * regmove.c (regmove_optimize): Use SUBREG_BYTE. (optimize_reg_copy_3): Use gen_lowpart_SUBREG. * regs.h (REG_SIZE): Allow target to override. (REGMODE_NATURAL_SIZE): New macro which target can override. * reload.c (reload_inner_reg_of_subreg): subreg_regno should be used on the entire subreg rtx. (push_reload): Use SUBREG_BYTE in comments and code. (find_dummy_reload): Use subreg_regno_offset. Only adjust offsets for hard registers inside subregs. (operands_match_p): Use subreg_regno_offset. (find_reloads): Use SUBREG_BYTE and only advance offset for subregs containing hard regs. (find_reload_toplev): Use SUBREG_BYTE. Remove byte endian corrections when fixing up MEM subregs. (find_reloads_address_1): Use SUBREG_BYTE, subreg_regno, and subreg_regno_offset where appropriate. (find_reloads_subreg_address): Use SUBREG_BYTE. Remove byte endian corrections when fixing up MEM subregs. (subst_reloads): When combining two subregs, make sure final offset is congruent to subreg's mode size. (find_replacement): Use SUBREG_BYTE and subreg_regno_offset. (refers_to_regno_for_reload_p): Use subreg_regno. (reg_overlap_mentioned_for_reload_p): Use subreg_regno_offset. * reload1.c (eliminate_regs) Use SUBREG_BYTE. Remove byte endian correction code for memory subreg fixups. (forget_old_reload_1): Use subreg_regno_offset. (choose_reload_regs): Use subreg_regno. (emit_input_reload_insns): Use SUBREG_BYTE. (reload_combine_note_store): Use subreg_regno_offset. (move2add_note_store): Use subreg_regno_offset. * resource.c (update_live_status, mark_referenced_resources): Use subreg_regno function. (mark_set_resources): Use subreg_regno function. * rtl.h (SUBREG_WORD): Rename to SUBREG_BYTE. (subreg_regno_offset, subreg_regno): Define prototypes. (subreg_hard_regno, constant_subword, gen_rtx_SUBREG): Newi functions. (gen_lowpart_SUBREG): Add prototype. * rtl.texi (subreg): Update to reflect new byte offset representation. Add mentioning of the effect that BYTES_BIG_ENDIAN has on subregs now. * rtlanal.c (refers_to_regno_p): Use subreg_regno. (reg_overlap_mentioned_p): Use subreg_regno. (replace_regs); Make sure final offset of combined subreg is congruent to size of subreg's mode. (subreg_regno_offset): New function. (subreg_regno): New function. * sched-vis.c (print_value): Change SUBREG_WORD to SUBREG_BYTE. * sdbout.c (sdbout_symbol): Compute offset using alter_subreg. * stmt.c (expand_anon_union_decl): Use gen_lowpart_SUBREG. * tm.texi (ALTER_HARD_SUBREG): Remove, it is now dead. (SUBREG_REGNO_OFFSET): Describe SUBREG_REGNO_OFFSET overrides. * config/a29k/a29k.c (gpc_reg_operand): Use subreg_regno. (a29k_get_reloaded_address): Use SUBREG_BYTE. (print_operand): Use SUBREG_BYTE. * config/alpha/alpha.c (print_operand_address): Use SUBREG_BYTE. * config/arm/arm.c (arm_reload_in_hi): Use SUBREG_BYTE. (arm_reload_out_hi): Use SUBREG_BYTE. * config/d30v/d30v.c (d30v_split_double): Use subreg_regno_offset instead of SUBREG_WORD. (d30v_print_operand_memory_reference): Use subreg_regno_offset. * config/dsp16xx/dsp16xx.md (extendqihi2, zero_extendqihi2): Fix SUBREG creation to use byte offset. * config/h8300/h8300.md (Unnamed HImode zero extraction and 16bit inverted load insns): Fix explicit rtl subregs to use byte offsets. * config/i370/i370.md (cmpstrsi, movstrsi, mulsi3, divsi3, udivsi3, umodsi3): Generate SUBREGs with byte offsets. * config/i860/i860.c (single_insn_src_p): Use SUBREG_BYTE. * config/i860/i860.md (mulsi3_big): Fixup explicit SUBREGs in rtl to use byte offsets. (unnamed fmlow.dd insn): Fixup SUBREGS to use byte offsets. * config/i960/i960.md (extendhisi2): Generate SUBREGs with byte offsets, also make sure it is congruent to SUBREG's mode size. (extendqisi2, extendqihi2, zero_extendhisi2, zero_extendqisi2, unnamed ldob insn): Generate SUBREGs with byte offset. (zero_extendqihi2): SUBREG's are byte offsets. * config/m68hc11/m68hc11.c (m68hc11_gen_lowpart): Use SUBREG_BYTE. (m68hc11_gen_highpart): Use SUBREG_BYTE. * config/m68k/m68k.md (zero_extendhisi2, zero_extendqihi2, zero-extendqisi2): Generate SUBREGs with byte offset. (umulsidi3, mulsidi3, subreghi1ashrdi_const32, subregsi1ashrdi_const32, subreg1lshrdi_const32): Fixup explicit subregs in rtl to use byte offsets. * config/m88k/m88k.md (extendsidi2): fixup subregs to use byte offset. * config/mips/mips.c (mips_move_1word): Use subreg_regno_offset. (mips_move_2words): Use subreg_regno_offset. (mips_secondary_reload_class): Use subreg_regno_offset. * config/mips/mips.md (DImode plus, minus, move, and logical op splits): Fixup explicit subregs in rtl to use byte offsets. * config/mn10200/mn10200.c (print_operand): Use subreg_regno function. * config/mn10300/mn10300.c (print_operand): Use subreg_regno function. * config/ns32k/ns32k.md (udivmoddisi4): Fix explicit subregs in rtl to use byte offsets. * config/pa/pa.c (emit_move_sequence): Use SUBREG_BYTE. * config/pa/pa.md (floatunssisf2, floatunssidf2, mulsi3): fix explicit subregs to use byte offsets. * config/pdp11/pdp11.md (zero_extendhisi2, modhi3, modhi3+1): Fixup explicit subregs in rtl to use byte offsets. * config/romp/romp.c (memory_offset_in_range_p): Use SUBREG_BYTE and remove byte endian correction code. * config/sh/sh.c (output_movedouble): Use subreg_regno. (gen_ashift_hi): Use SUBREG_BYTE. (regs_used): Use subreg_regno_offset. (machine_dependent_reorg): Use subreg_regno_offset. * config/sh/sh.h (INDEX_REGISTER_RTX_P): Use SUBREG_BYTE. * config/sh/sh.md (DImode and DFmode move splits): Use subreg_regno. (movdf_i4): Subregs are byte offsets now. * config/sparc/sparc.c (ultra_find_type): Use SUBREG_BYTE. * config/sparc/sparc.h (ALTER_HARD_SUBREG): Removed. (REGMODE_NATURAL_SIZE): Override. (REG_SIZE): For SUBREG check float mode on SUBREG_REG's mode. * config/sparc/sparc.md (TFmode move splits): Generate SUBREGs with byte offsets. (zero_extendhisi2, zero_extendqidi2_insn, extendhisi2, extendqihi2, sign_extendqihi2_insn, sign_extendqisi2_insn, extendqidi2): Generate SUBREGs with byte offsets, also make sure it is congruent to SUBREG's mode size. (smulsi3_highpart_v8plus): Fix explicit subregs in rtl to use byte offsets. (cmp_siqi_trunc, cmp_siqi_trunc_set, cmp_diqi_trunc, cmp_diqi_trunc_set, lshrdi3_v8plus+1, lshrdi3_v8plus+2, lshrdi3_v8plus+3, lshrdi3_v8plus+4): Use proper SUBREG_BYTE offset for non-paradoxical subregs in patterns. * config/v850/v850.c (print_operand, output_move_double): Use subreg_regno function. Co-Authored-By: Andrew MacLeod <amacleod@redhat.com> Co-Authored-By: David S. Miller <davem@pierdol.cobaltmicro.com> From-SVN: r41058
2001-04-03 17:06:12 +02:00
unsigned int inner_regno = subreg_regno (x);
* Rework fields used to describe positions of bitfields and modify sizes to be unsigned and use HOST_WIDE_INT. * alias.c (reg_known_value_size): Now unsigned. * c-typeck.c (build_unary_op, case ADDR_EXPR): Use byte_position. (really_start_incremental_init): Use bitsize_zero_node. (push_init_level, pop_init_level, output_init_element): Likewise. Use bitsize_unit_node and bitsize_one_node. (output_pending_init_elements, process_init_element): Likewise. * combine.c (combine_max_regno, reg_sign_bit_copies): Now unsigned. (make_extraction): Position and length HOST_WIDE_INT and unsigned HOST_WIDE_INT, respectively. (get_pos_from_mask): Passed in value is unsigned HOST_WIDE_INT. (num_sign_bit_copies): Returns unsigned. BITWIDTH now unsigned; rework arithmetic. Remove recursive call from arg to MAX. (combine_instructions, init_reg_last_arrays): NREGS now unsigned. (setup_incoming_promotions, can_combine_p, try_combine, simplify_set): REGNO now unsigned. (set_nonzero_bit_and_sign_copies): NUM now unsigned. (find_split_point, expand_compound_operation, make_extraction): LEN now unsigned HOST_WIDE_INT, POS now HOST_WIDE_INT. (make_field_assignment): Likewise. (combine_simplify_rtx): Add cast. (expand_compound_operation): MODEWIDTH now unsigned; rework arithmetic. (force_to_mode): WIDTH now unsigned; add cast. (if_then_else_cond): SIZE now unsigned. (nonzero_bits): MODE_WIDTH, RESULT_WIDTH, and WIDTH now unsigned. (extended_count): Now returns unsigned. (simplify_shift_const): COUNT unsigned; arg is now INPUT_COUNT. Add SIGNED_COUNT variable; MODE_WORDS and FIRST_COUNT now unsigned. (simplify_comparison): MODE_WIDTH now unsigned. (update_table_tick): REGNO and ENDREGNO now unsigned; new var R. (mark_used_regs_combine): Likewise; rework arithmetic. (record_value_for_reg): REGNO, ENDREGNO, and I now unsigned. (record_dead_and_set_regs, reg_dead_at_p, distribute_notes): Likewise. (record_promoted_value): REGNO now unsigned. (get_last_value_validate): REGNO, ENDREGNO, and J now unsigned. (get_last_value): REGNO now unsigned. (use_crosses_set_p): REGNO and ENDREGNO now unsigned. (reg_dead_regno, reg_dead_endregno): Now unsigned. (remove_death): Arg REGNO now unsigned. (move_deaths): REGNO, DEADREGNO, DEADEND, OUREND, and I now unsigned. (reg_bitfield_target_p): REGNO, REGNO, ENDREGNO, and ENDTREGNO now unsigned. * convert.c (convert_to_integer): INPREC and OUTPREC now unsigned. * cse.c (struct qty_table_elem): FIRST_REG and LAST_REG now unsigned. (struct cse_reg_info): REGNO now unsigned. (cached_regno): Now unsigned. (REGNO_QTY_VALID_P): Add cast. (make_new_qty, make_regs_eqv, delete_reg_eqiv): Regno args unsigned. (remove_invalid_regs): Likewise. (remove_invalid_subreg_refs): Likewise; arg WORD also unsigned as are variables END and I. (get_cse_reg_info, insert): Likewise. (mention_regs, invalidate_for_call): REGNO, ENDREGNO, and I unsigned. (canon_hash): Likewise. (insert_regs, lookup_for_remove): REGNO now unsigned. (invalidate): REGNO, ENDREGNO, TREGNO, and TENDREGNO now unsigned. New variable RN. * dbxout.c (dbxout_parms, dbxout_reg_parms): Don't check for REGNO < 0. * dwarf2out.c (dwarf2ou_frame_debug_expr): Remove cast. * emit-rtl.c (subreg_realpart_p): Add cast. (operand_subword): Arg I is now unsigned as is var PARTWORDS. (operand_subword_force): Arg I is now unsigned. * except.c (eh_regs): Variable I is now unsigned. * explow.c (hard_function_value): BYTES is unsigned HOST_WIDE_INT. * expmed.c (store_fixed_bit_field): Position is HOST_WIDE_INT; length is unsigned HOST_WIDE_INT; likewise for internal variables. (store_split_bit_field, extract_fixed_bit_field): Likewise. (extract_split_bit_field, store_bit_field, extract_bit_field): Likewise. * expr.c (store_constructor_fields, store_constructor, store_field): Positions are HOST_WIDE_INT and lengths are unsigned HOST_WIDE_INT. (expand_assignment, expand_expr, expand_expr_unaligned): Likewise. (do_jump): Likewise. (move_by_pieces, move_by_pieces_ninsns, clear_by_pieces): MAX_SIZE is now unsigned. (emit_group_load): BYTEPOS is HOST_WIDE_INT; BYTELEN is unsigned. (emit_group_store): Likewise. (emit_move_insn): I now unsigned. (store_constructor): Use host_integerp, tree_low_cst, and bitsize_unit_node. (get_inner_reference): Return bitpos and bitsize as HOST_WIDE_INT. Rework all calculations to use trees and new fields. * expr.h (promoted_input_arg): Regno now unsigned. (store_bit_field, extract_bit_field): Adjust types of pos and size. (mark_seen_cases): Arg is HOST_WIDE_INT. * flow.c (verify_wide_reg_1): REGNO now unsigned. * fold-const.c (decode_field_reference): Size and pos HOST_WIDE_INT; precisions and alignments are unsigned. (optimize_bit_field_compare, fold_truthop): Likewise. (int_const_binop): Adjust threshold for size_int_type_wide call. (fold_convert): Likewise. (size_int_type_wide): Make table larger and fix thinko that only had half of table used. (all_ones_mask_p, fold): Precisions are unsigned. * function.c (put_reg_info_stack): REGNO is unsigned. (instantiate_decl): Size is HOST_WIDE_INT. (instantiate_virtual_regs): I is unsigned. (assign_parms): REGNO, REGNOI, and REGNOR are unsigned. (promoted_input_arg): REGNO is unsigned. * function.h (struct function): x_max_parm_reg is now unsigned. * gcse.c (max_gcse_regno): Now unsigned. (struct null_pointer_info): min_reg and max_reg now unsigned. (lookup_set, next_set): REGNO arg now unsigned. (compute_hash_table): REGNO and I now unsigned. (handle_avail_expr): regnum_for_replacing now unsigned. (cprop_insn): REGNO now unsigned. (delete_null_pointer_checks_1): BLOCK_REG now pointer to unsigned. * ggc-common.c (ggc_mark_tree_children, case FIELD_DECL): New case. * global.c (set_preference): SRC_REGNO, DEST_REGNO, and I now unsigned. * hard-reg-set.h (reg_class_size): Now unsigned. * integrate.c (mark_stores): LAST_REG and I now unsigned; new UREGNO. * jump.c (mark_modified_reg): I now unsigned; add cast. (rtx_equal_for_thread_p): Add cast. * loop.c (max_reg_before_loop): Now unsigned. (struct_movable): REGNO now unsigned. (try_copy_prop): REGNO arg unsigned. (regs_match_p): XN and YN now unsigned. (consec_sets_invariant_p, maybe_eliminate_biv): REGNO now unsigned. (strength_reduce): Likewise; NREGS also unsigned. (first_increment_giv, last_increment_giv unsigned): Now unsigned. * loop.h (struct iv_class): REGNO now unsigned. (max_reg_before_loop, first_increment_giv, last_increment_giv): Now unsigned. * machmode.h (mode_size, mode_unit_size): Now unsigned. (mode_for_size, smallest_mode_for_size): Pass size as unsigned. * optabs.c (expand_binop): I and NWORDS now unsigned. (expand_unop): I now unsigned. * print-tree.c (print_node): Don't print DECL_FIELD_BITPOS, but do print DECL_FIELD_OFFSET and DECL_FIELD_BIT_OFFSET. * real.c (significand_size): Now returns unsigned. * real.h (significand_size): Likewise. * regclass.c (reg_class_size): Now unsigned. (choose_hard_reg_mode): Both operands now unsigned. (record_reg_classes): REGNO and NR now unsigned. (reg_scan): NREGS now unsigned. (reg_scan_update): old_max_regno now unsigned. (reg_scan_mark_refs): Arg MIN_REGNO and var REGNO now unsigned. * reload.c (find_valid_class): BEST_SIZE now unsigned. (find_dummy_reload): REGNO, NWORDS, and I now unsigned. (hard_reg_set_here_p): Args BEG_REGNO and END_REGNO now unsigned. Likewise for variable R. (refers_to_regno_for_reload_p): Args REGNO and END_REGNO now unsigned, as are variables INNER_REGNO and INNER_ENDREGNO; add new variable R. (find_equiv_reg): Add casts. (regno_clobbered_p): Arg REGNO now unsigned. * reload.h (struct reload): NREGS now unsigned. (refers_to_regno_for_reload_p): Regno args are unsigned. (regno_clobbered_p): Likewise. * reload1.c (reg_max_ref_width, spill_stack_slot_width): Now unsigned. (compute_use_by_pseudos): REGNO now unsigned. (find_reg): I and J now unsigned, new variable K, and change loop variables accordingly; THIS_NREGS now unsigned. (alter_reg): INHERENT_SIZE and TOTAL_SIZE now unsigned. (spill_hard_reg): REGNO arg now unsigned; add casts. (forget_old_reloads_1): REGNO, NR, and I now unsigned. (mark_reload_reg_in_use): Arg REGNO and vars NREGS and I now unsigned. (clear_reload_reg_in_use): Arg REGNO and vars NREGS, START_REGNO, END_REGNO, CONFLICT_START, and CONFLICT_END now unsigned. (reload_reg_free_p, reload_reg_reaches_end_p): Arg REGNO now unsigned. (choose_reload_regs): MAX_GROUP_SIZE now unsigned. (emit_reload_insns): REGNO now unsigned. (reload_cse_move2add): Add cast. (move2add_note_store): REGNO and I now unsigned; new variable ENDREGNO and rework loop. * resource.c (mark_referenced_resources, mark_set_resources): New variable R; REGNO and LAST_REGNO now unsigned. (mark_target_live_regs): J and REGNO now unsigned. * rtl.c (mode_size, mode_unit_size): Now unsigned. * rtl.h (union rtunion_def): New field rtuint. (XCUINT): New macro. (ADDRESSOF_REGNO, REGNO, SUBREG_WORD): New XCUINT. (operand_subword, operand_subword_force): Word number is unsigned. (choose_hard_reg_mode): Operands are unsigned. (refers_to-regno_p, dead_or_set_regno_p): Regno arg is unsigned. (find_regno_note, find_regno_fusage, replace_regs): Likewise. (regno_use_in, combine_instructions, remove_death): Likewise. (reg_scan, reg_scan_update): Likewise. (extended_count): Return is unsigned. * rtlanal.c (refers_to_regno_p): Args REGNO and ENDREGNO and vars I, INNER_REGNO, and INNER_ENDREGNO now unsigned; new variable X_REGNO. (reg_overlap_mentioned_p): REGNO and ENDREGNO now unsigned. (reg_set_last_first_regno, reg_set_last_last_regno): Now unsigned. (reg_reg_last_1): FIRS and LAST now unsigned. (dead_or_set_p): REGNO, LAST_REGNO, and I now unsigned. (dead_or_set_regno_p): Arg TEST_REGNO and vars REGNO and ENDREGNO now unsigned. (find_regno_note, regno_use_in): Arg REGNO now unsigned. (find_regno_fusage): Likewise; also var REGNOTE now unsigned. (find_reg_fusage): Variables REGNO, END_REGNO, and I now unsigned. (replace_regs): Arg NREGS now unsigned. * sdbout.c (sdbout_parms, sdbout_reg_parms): Don't check REGNO < 0. * simplify-rtx.c (simplify_unary_operation): WIDTH now unsigned. (simplify_binary_operation): Likewise. (cselib_invalidate_regno): Arg REGNO and variables ENDREGNO, I, and THIS_LAST now unsigned. (cselib_record_set): Add cast. * ssa.c (ssa_max_reg_num): Now unsigned. (rename_block): REGNO now unsigned. * stmt.c (expand_return): Bit positions unsigned HOST_WIDE_INT; sizes now unsigned. (all_cases_count): Just return -1 not -2. COUNT, MINVAL, and LASTVAL now HOST_WIDE_INT. Rework tests to use trees whenever possible. Use host_integerp and tree_low_cst. (mark_seen_cases): COUNT arg now HOST_WIDE_INT; Likewise variable NEXT_NODE_OFFSET; XLO now unsigned. (check_for_full_enumeration_handing): BYTES_NEEDED, I to HOST_WIDE_INT. * stor-layout.c (mode_for_size): SIZE arg now unsigned. (smallest_mode_for_size): Likewise. (layout_decl): Simplify handing of a specified DECL_SIZE_UNIT. KNOWN_ALIGN is now an alignment, so simplify code. Don't turn off DECL_BIT_FIELD if field is BLKmode, but not type. (start_record_layout): Renamed from new_record_layout_info. Update to new fields. (debug_rli, normalize_rli, rli_size_unit_so_far, rli_size_so_far): New functions. (place_union_field): Renamed from layout_union_field. Update to use new fields in rli. (place_field): Renamed from layout_field. Major rewrite to use new fields in rli; pass alignment to layout_decl. (finalize_record_size): Rework to use new fields in rli and handle union. (compute_record_mode): Rework to simplify and to use new DECL fields. (finalize_type_size): Make rounding more consistent. (finish_union_layout): Deleted. (layout_type, case VOID_TYPE): Don't set TYPE_SIZE_UNIT either. (layout_type, case RECORD_TYPE): Call new function names. (initialize_sizetypes): Set TYPE_IS_SIZETYPE. (set_sizetype): Set TYPE_IS_SIZETYPE earlier. (get_best_mode): UNIT is now unsigned; remove casts. * tree.c (bit_position): Compute from new fields. (byte_position, int_byte_position): New functions. (print_type_hash_statistics): Cast to remove warning. (build_range_type): Use host_integerp and tree_low_cst to try to hash. (build_index_type): Likewise; make subtype of sizetype. (build_index_2_type): Pass sizetype to build_range_type. (build_common_tree_nodes): Use size_int and bitsize_int to initialize nodes; add bitsize_{zero,one,unit}_node. * tree.h (DECL_FIELD_CONTEXT): Use FIELD_DECL_CHECK. (DECL_BIT_FIELD_TYPE, DECL_QUALIFIER, DECL_FCONTEXT): Likewise. (DECL_PACKED, DECL_BIT_FIELD): Likewise. (DECL_FIELD_BITPOS): Deleted. (DECL_FIELD_OFFSET, DECL_FIELD_BIT_OFFSET): New fields. (DECL_RESULT, DECL_SAVED_INSNS): Use FUNCTION_DECL_CHECK. (DECL_FRAME_SIZE, DECL_FUNCTION_CODE, DECL_NO_STATIC_CHAIN): Likewise. (DECL_INLINE, DECL_BUILT_IN_NONANSI, DECL_IS_MALLOC): Likewise. (DECL_BUILT_IN_CLASS, DECL_STATIC_CONSTRUCTOR): Likewise. (DECL_STATIC_DESTRUCTOR, DECL_NO_CHECK_MEMORY_USAGE): Likewise. (DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT, DECL_NO_LIMIT_STACK) Likewise. (DECL_ORIGINAL_TYPE, TYPE_DECL_SUPPRESS_DEBUG): Use TYPE_DECL_CHECK. (DECL_ARG_TYPE_AS_WRITEN, DECL_ARG_TYPE): Use PARM_DECL_CHECK. (DECL_INCOMING_RTL, DECL_TRANSPARENT_UNION): Likewise. (DECL_ALIGN): Adjust to new field in union. (DECL_OFFSET_ALIGN): New field. (DECL_ERROR_ISSUED, DECL_TOO_LATE): Use LABEL_DECL_CHECK. (DECL_IN_TEXT_SECTION): Use VAR_DECL_CHECK. (union tree_decl): Add struct for both aligns. (enum tree_index): Add TI_BITSIZE_{ZERO,ONE,UNIT}. (bitsize_zero_node, bitsize_one_node, bitsize_unit_node): Added. (struct record_layout_info): Rework fields to have offset alignment and byte and bit position. (start_record_layout, place_field): Renamed from old names. (rli_size_so_far, rli_size_unit_so_far, normalize_rli): New decls. (byte_position, int_byte_position): Likewise. (get_inner_reference): Change types of position and length. * unroll.c (unroll_loop): New variable R; use for some loops. MAX_LOCAL_REGNUM and MAXREGNUM now unsigned. (calculate_giv_inc): Arg REGNO now unsigned. (copy_loop_body): REGNO and SRC_REGNO now unsigned. * varasm.c (assemble_variable): Clean up handling of size using host_integerp and tree_low_cst. (decode_addr_const): Use byte, not bit, position. (output_constructor): bitpos and offsets are HOST_WIDE_INT; use tree_low_cst and int_bit_position. * objc/objc-act.c (build_ivar_list_initializer): Use byte_position. * ch/actions.c (check_missing_cases): BYTES_NEEDED is HOST_WIDE_INT. * ch/typeck.c (expand_constant_to_buffer): Use int_byte_position. (extract_constant_from_buffer): Likewise. * cp/class.c (build_vbase_pointer_fields): layout_field now place_field. (get_vfield_offset): Use byte_position. (set_rtti_entry): Set OFFSET to ssizetype zero. (get_binfo_offset_as_int): Deleted. (dfs_record_base_offsets): Use tree_low_cst. (dfs_search_base_offsets): Likewise. (layout_nonempty_base_or_field): Reflect changes in RLI format and call byte_position. (layout_empty_base): Convert offset to ssizetype. (build_base_field): use rli_size_unit_so_far. (dfs_propagate_binfo_offsets): Do computation in proper type. (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets. (layout_class_type): Reflect changes in RLI names and fields. (finish_struct_1): Set DECL_FIELD_OFFSET. * cp/dump.c (dequeue_and_dump): Call bit_position. * cp/expr.c (cplus_expand_constant): Use byte_position. * cp/rtti.c (expand_class_desc): Use bitsize_one_node. * cp/typeck.c (build_component_addr): Use byte_position and don't special case for zero offset. * f/com.c (ffecom_tree_canonize_ptr_): Use bitsize_zero_node. (ffecom_tree_canonize_ref_): Likewise. * java/class.c (make_field_value): Use byte_position. * java/expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position. (java_array_data_offset): Likewise. * java/java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to bzero call. From-SVN: r32742
2000-03-25 19:34:13 +01:00
unsigned int inner_endregno
= inner_regno + (inner_regno < FIRST_PSEUDO_REGISTER
? subreg_nregs (x) : 1);
1991-12-01 06:13:56 +01:00
return endregno > inner_regno && regno < inner_endregno;
}
break;
case CLOBBER:
case SET:
if (&SET_DEST (x) != loc
/* Note setting a SUBREG counts as referring to the REG it is in for
a pseudo but not for hard registers since we can
treat each word individually. */
&& ((GET_CODE (SET_DEST (x)) == SUBREG
&& loc != &SUBREG_REG (SET_DEST (x))
alias.c (record_set, [...]): Use REG_P. 2004-06-15 Jerry Quinn <jlquinn@optonline.net> * alias.c (record_set, record_base_value, canon_rtx, get_addr, nonlocal_mentioned_p_1, init_alias_analysis): Use REG_P. * bt-load.c (find_btr_reference, insn_sets_btr_p, note_btr_set): Likewise. * builtins.c (expand_builtin_setjmp, expand_builtin_apply, expand_builtin_mathfn, expand_builtin_strlen, expand_builtin_memcmp, expand_builtin_strcmp, expand_builtin_strncmp, expand_builtin_frame_address): Likewise. * caller-save.c (mark_set_regs, add_stored_regs, mark_referenced_regs, insert_one_insn): Likewise. * calls.c (prepare_call_address, precompute_register_parameters, precompute_arguments, expand_call, emit_library_call_value_1): Likewise. * cfganal.c (flow_active_insn_p): Likewise. * combine.c (set_nonzero_bits_and_sign_copies, can_combine_p, combinable_i3pat, try_combine, find_split_point, COMBINE_RTX_EQUAL_P, subst, combine_simplify_rtx, simplify_if_then_else, simplify_set, make_extraction, recog_for_combine, gen_lowpart_for_combine, simplify_comparison, record_dead_and_set_regs_1, record_dead_and_set_regs, record_promoted_value, check_promoted_subreg, get_last_value_validate, get_last_value, reg_dead_at_p_1, reg_bitfield_target_p, distribute_notes, unmentioned_reg_p_1): Likewise. * conflict.c (mark_reg): Likewise. * cse.c (HASH, COST, COST_IN, approx_reg_cost_1, notreg_cost, mention_regs, insert_regs, lookup, lookup_for_remove, insert, merge_equiv_classes, flush_hash_table, invalidate, remove_invalid_refs, remove_invalid_subreg_refs, rehash_using_reg, invalidate_for_call, use_related_value, canon_hash, exp_equiv_p, cse_rtx_varies_p, canon_reg, find_best_addr, fold_rtx, equiv_constant, record_jump_cond, cse_insn, addr_affects_sp_p, invalidate_from_clobbers, cse_process_notes, cse_around_loop, cse_set_around_loop, count_reg_usage, set_live_p, cse_change_cc_mode, cse_cc_succs, cse_condition_code_reg): Likewise. * cselib.c (cselib_reg_set_mode, rtx_equal_for_cselib_p, cselib_lookup, cselib_invalidate_regno, cselib_invalidate_rtx, cselib_record_set, cselib_record_sets): Likewise. * dbxout.c (dbxout_symbol_location, dbxout_parms, dbxout_reg_parms, dbxout_block): Likewise. * df.c (df_ref_record, df_def_record_1, df_uses_record): Likewise. * dojump.c (do_jump): Likewise. * dwarf2out.c (dwarf2out_frame_debug_expr, is_pseudo_reg, is_based_loc, rtl_for_decl_location): Likewise. * emit-rtl.c (set_reg_attrs_for_parm, set_decl_rtl, set_decl_incoming_rtl, mark_user_reg): Likewise. * explow.c (copy_all_regs, copy_all_regs, memory_address, force_reg, copy_to_suggested_reg, allocate_dynamic_stack_space, probe_stack_range, hard_function_value): Likewise. * expmed.c (store_bit_field, store_fixed_bit_field, store_split_bit_field, extract_bit_field, extract_fixed_bit_field, extract_split_bit_field, expand_divmod, emit_store_flag_force): Likewise. * expr.c (convert_move, convert_modes, block_move_libcall_safe_for_call_parm, emit_group_load, use_reg, use_group_regs, emit_move_insn, emit_move_insn_1, compress_float_constant, push_block, emit_single_push_insn, emit_push_insn, get_subtarget, expand_assignment, store_expr, store_constructor, store_field, force_operand, safe_from_p, expand_expr_real_1, expand_increment, do_store_flag, do_tablejump): Likewise. * final.c (profile_function, final_scan_insn, alter_subreg, get_mem_expr_from_op, output_asm_operand_names, output_operand, only_leaf_regs_used, leaf_renumber_regs_insn): Likewise. * flow.c (verify_wide_reg_1, mark_regs_live_at_end, find_regno_partial, propagate_one_insn, init_propagate_block_info, insn_dead_p, libcall_dead_p, mark_set_1, not_reg_cond, attempt_auto_inc, find_auto_inc, mark_used_regs, count_or_remove_death_notes_bb): Likewise. * function.c (find_temp_slot_from_address, update_temp_slot_address, preserve_temp_slots, put_var_into_stack, fixup_var_refs_insn, fixup_var_refs_1, fixup_stack_1, optimize_bit_field, flush_addressof, put_addressof_into_stack, purge_addressof_1, insns_for_mem_walk, purge_single_hard_subreg_set, instantiate_decl, instantiate_virtual_regs_1, aggregate_value_p, assign_parms, promoted_input_arg, setjmp_vars_warning, setjmp_args_warning, setjmp_protect, setjmp_protect_args, fix_lexical_addr, expand_function_start, diddle_return_value, clobber_return_register, expand_function_end, keep_stack_depressed, handle_epilogue_set, update_epilogue_consts): Likewise. * genemit.c (gen_exp, gen_insn): Likewise. * genrecog.c (make_insn_sequence): Likewise. * global.c (global_conflicts, expand_preferences, mark_reg_store, mark_reg_conflicts, set_preference, reg_becomes_live, build_insn_chain, mark_reg_change): Likewise. * haifa_sched.c (CONST_BASED_ADDRESS_P, find_set_reg_weight): Likewise. * ifcvt.c (noce_try_abs, noce_get_condition, noce_process_if_block): Likewise. * integrate.c (copy_rtx_and_substitute, try_constants, subst_constants, mark_stores, allocate_initial_values): Likewise. * jump.c (reversed_comparison_code_parts, delete_prior_computation, delete_computation, rtx_renumbered_equal_p, true_regnum, reg_or_subregno): Likewise. * lcm.c (reg_dies, reg_becomes_live): Likewise. * local-alloc.c (validate_equiv_mem_from_store, validate_equiv_mem, update_equiv_regs, no_equiv, block_alloc, combine_regs, reg_is_set, wipe_dead_reg, no_conflict_p): Likewise. * loop-iv.c (simple_reg_p, simple_set_p, kill_sets, iv_get_reaching_def, iv_analyze_biv, altered_reg_used, mark_altered, simple_rhs_p, simplify_using_assignment, implies_p): Likewise. * loop.c (scan_loop, combine_movables, rtx_equal_for_loop_p, move_movables, note_set_pseudo_multiple_uses, consec_sets_invariant_p, find_single_use_in_loop, count_one_set, loop_bivs_init_find, loop_givs_rescan, check_insn_for_bivs, check_insn_for_givs, valid_initial_value_p, simplify_giv_expr, consec_sets_giv, loop_regs_update, check_dbra_loop, maybe_eliminate_biv, maybe_eliminate_biv_1, record_initial, update_reg_last_use, canonicalize_condition, loop_regs_scan, load_mems, try_copy_prop, try_swap_copy_prop): Likewise. * optabs.c (expand_binop, expand_vector_binop, expand_vector_unop, expand_abs, emit_no_conflict_block, emit_libcall_block, expand_float): Likewise. * postreload.c (reload_cse_simplify, reload_cse_simplify_set, reload_cse_simplify_operands, reload_combine, reload_combine_note_store, reload_combine_note_use, reload_cse_move2add, move2add_note_store): Likewise. * print-rtl.c (print_rtx): Likewise. * ra-build.c (copy_insn_p, remember_move, init_one_web_common, contains_pseudo, handle_asm_insn): Likewise. * ra-debug.c (ra_print_rtx_object, dump_constraints, dump_static_insn_cost): Likewise. * ra-rewrite.c (slots_overlap_p, emit_colors, remove_suspicious_death_notes): Likewise. * recog.c (validate_replace_rtx_1, find_single_use_1, find_single_use, register_operand, scratch_operand, nonmemory_operand, constrain_operands): Likewise. * reg-stack (check_asm_stack_operands, remove_regno_note, emit_swap_insn, swap_rtx_condition, subst_stack_regs_pat, subst_asm_stack_regs): Likewise. * regclass.c (scan_one_insn, record_reg_classes, copy_cost, record_address_regs, reg_scan_mark_refs): Likewise. * regmove.c (discover_flags_reg, replacement_quality, copy_src_to_dest, reg_is_remote_constant_p, regmove_optimize, fixup_match_1): Likewise. * regrename.c (note_sets, clear_dead_regs, build_def_use, kill_value, kill_set_value, copyprop_hardreg_forward_1): Likewise. * reload.c (MATCHES, push_secondary_reload, find_reusable_reload, reload_inner_reg_of_subreg, can_reload_into, push_reload, combine_reloads, find_dummy_reload, hard_reg_set_here_p, operands_match_p, decompose, find_reloads, find_reloads_toplev, find_reloads_address, subst_indexed_address, find_reloads_address_1, find_reloads_subreg_address, find_replacement, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p, find_equiv_reg, regno_clobbered_p): Likewise. * reload1.c (replace_pseudos_in, reload, calculate_needs_all_insns, find_reg, delete_dead_insn, alter_reg, eliminate_regs, elimination_effects, eliminate_regs_in_insn, scan_paradoxical_subregs, forget_old_reloads_1, reload_reg_free_for_value_p, choose_reload_regs, emit_input_reload_insns, emit_output_reload_insns, do_input_reload, do_output_reload, emit_reload_insns, gen_reload, delete_address_reloads_1, inc_for_reload): Likewise. * reorg.c (update_reg_dead_notes, fix_reg_dead_note, update_reg_unused_notes, fill_slots_from_thread): Likewise. * resource.c (update_live_status, mark_referenced_resources, mark_set_resources, mark_target_live_regs): Likewise. * rtlanal.c (nonzero_address_p, get_jump_table_offset, global_reg_mentioned_p_1, reg_mentioned_p, reg_referenced_p, reg_set_p, set_noop_p, find_last_value, refers_to_regno_p, note_stores, dead_or_set_p, dead_or_set_regno_p, find_regno_note, find_reg_fusage, find_regno_fusage, replace_regs, regno_use_in, parms_set, find_first_parameter_load, keep_with_call_p, hoist_test_store, hoist_update_store, address_cost, nonzero_bits1, num_sign_bit_copies1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sched-deps.c (deps_may_trap_p, sched_analyze_1, sched_analyze_insn, sched_analyze): Likewise. * sched-rgn.c (check_live_1, update_live_1, sets_likely_spilled_1): Likewise. * sdbout.c (sdbout_symbol, sdbout_parms, sdbout_reg_parms): Likewise. * simplify-rtx.c (simplify_replace_rtx, simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_subreg): Likewise. * stmt.c (decl_conflicts_with_clobbers_p, expand_asm_operands, expand_end_stmt_expr, expand_return, expand_decl, expand_anon_union_decl): Likewise. * unroll.c (precondition_loop_p, calculate_giv_inc, copy_loop_body, find_splittable_regs, find_splittable_givs, find_common_reg_term, loop_iterations): Likewise. * var-tracking.c (variable_union, variable_part_different_p, variable_different_p, count_uses, add_uses, add_stores, compute_bb_dataflow, set_variable_part, delete_variable_part, emit_notes_in_bb, vt_get_decl_and_offset, vt_add_function_parameters): Likewise. * varasm.c (assemble_variable): Likewise. From-SVN: r83195
2004-06-15 20:02:40 +02:00
&& REG_P (SUBREG_REG (SET_DEST (x)))
1991-12-01 06:13:56 +01:00
&& REGNO (SUBREG_REG (SET_DEST (x))) >= FIRST_PSEUDO_REGISTER
&& refers_to_regno_p (regno, endregno,
SUBREG_REG (SET_DEST (x)), loc))
alias.c (record_set, [...]): Use REG_P. 2004-06-15 Jerry Quinn <jlquinn@optonline.net> * alias.c (record_set, record_base_value, canon_rtx, get_addr, nonlocal_mentioned_p_1, init_alias_analysis): Use REG_P. * bt-load.c (find_btr_reference, insn_sets_btr_p, note_btr_set): Likewise. * builtins.c (expand_builtin_setjmp, expand_builtin_apply, expand_builtin_mathfn, expand_builtin_strlen, expand_builtin_memcmp, expand_builtin_strcmp, expand_builtin_strncmp, expand_builtin_frame_address): Likewise. * caller-save.c (mark_set_regs, add_stored_regs, mark_referenced_regs, insert_one_insn): Likewise. * calls.c (prepare_call_address, precompute_register_parameters, precompute_arguments, expand_call, emit_library_call_value_1): Likewise. * cfganal.c (flow_active_insn_p): Likewise. * combine.c (set_nonzero_bits_and_sign_copies, can_combine_p, combinable_i3pat, try_combine, find_split_point, COMBINE_RTX_EQUAL_P, subst, combine_simplify_rtx, simplify_if_then_else, simplify_set, make_extraction, recog_for_combine, gen_lowpart_for_combine, simplify_comparison, record_dead_and_set_regs_1, record_dead_and_set_regs, record_promoted_value, check_promoted_subreg, get_last_value_validate, get_last_value, reg_dead_at_p_1, reg_bitfield_target_p, distribute_notes, unmentioned_reg_p_1): Likewise. * conflict.c (mark_reg): Likewise. * cse.c (HASH, COST, COST_IN, approx_reg_cost_1, notreg_cost, mention_regs, insert_regs, lookup, lookup_for_remove, insert, merge_equiv_classes, flush_hash_table, invalidate, remove_invalid_refs, remove_invalid_subreg_refs, rehash_using_reg, invalidate_for_call, use_related_value, canon_hash, exp_equiv_p, cse_rtx_varies_p, canon_reg, find_best_addr, fold_rtx, equiv_constant, record_jump_cond, cse_insn, addr_affects_sp_p, invalidate_from_clobbers, cse_process_notes, cse_around_loop, cse_set_around_loop, count_reg_usage, set_live_p, cse_change_cc_mode, cse_cc_succs, cse_condition_code_reg): Likewise. * cselib.c (cselib_reg_set_mode, rtx_equal_for_cselib_p, cselib_lookup, cselib_invalidate_regno, cselib_invalidate_rtx, cselib_record_set, cselib_record_sets): Likewise. * dbxout.c (dbxout_symbol_location, dbxout_parms, dbxout_reg_parms, dbxout_block): Likewise. * df.c (df_ref_record, df_def_record_1, df_uses_record): Likewise. * dojump.c (do_jump): Likewise. * dwarf2out.c (dwarf2out_frame_debug_expr, is_pseudo_reg, is_based_loc, rtl_for_decl_location): Likewise. * emit-rtl.c (set_reg_attrs_for_parm, set_decl_rtl, set_decl_incoming_rtl, mark_user_reg): Likewise. * explow.c (copy_all_regs, copy_all_regs, memory_address, force_reg, copy_to_suggested_reg, allocate_dynamic_stack_space, probe_stack_range, hard_function_value): Likewise. * expmed.c (store_bit_field, store_fixed_bit_field, store_split_bit_field, extract_bit_field, extract_fixed_bit_field, extract_split_bit_field, expand_divmod, emit_store_flag_force): Likewise. * expr.c (convert_move, convert_modes, block_move_libcall_safe_for_call_parm, emit_group_load, use_reg, use_group_regs, emit_move_insn, emit_move_insn_1, compress_float_constant, push_block, emit_single_push_insn, emit_push_insn, get_subtarget, expand_assignment, store_expr, store_constructor, store_field, force_operand, safe_from_p, expand_expr_real_1, expand_increment, do_store_flag, do_tablejump): Likewise. * final.c (profile_function, final_scan_insn, alter_subreg, get_mem_expr_from_op, output_asm_operand_names, output_operand, only_leaf_regs_used, leaf_renumber_regs_insn): Likewise. * flow.c (verify_wide_reg_1, mark_regs_live_at_end, find_regno_partial, propagate_one_insn, init_propagate_block_info, insn_dead_p, libcall_dead_p, mark_set_1, not_reg_cond, attempt_auto_inc, find_auto_inc, mark_used_regs, count_or_remove_death_notes_bb): Likewise. * function.c (find_temp_slot_from_address, update_temp_slot_address, preserve_temp_slots, put_var_into_stack, fixup_var_refs_insn, fixup_var_refs_1, fixup_stack_1, optimize_bit_field, flush_addressof, put_addressof_into_stack, purge_addressof_1, insns_for_mem_walk, purge_single_hard_subreg_set, instantiate_decl, instantiate_virtual_regs_1, aggregate_value_p, assign_parms, promoted_input_arg, setjmp_vars_warning, setjmp_args_warning, setjmp_protect, setjmp_protect_args, fix_lexical_addr, expand_function_start, diddle_return_value, clobber_return_register, expand_function_end, keep_stack_depressed, handle_epilogue_set, update_epilogue_consts): Likewise. * genemit.c (gen_exp, gen_insn): Likewise. * genrecog.c (make_insn_sequence): Likewise. * global.c (global_conflicts, expand_preferences, mark_reg_store, mark_reg_conflicts, set_preference, reg_becomes_live, build_insn_chain, mark_reg_change): Likewise. * haifa_sched.c (CONST_BASED_ADDRESS_P, find_set_reg_weight): Likewise. * ifcvt.c (noce_try_abs, noce_get_condition, noce_process_if_block): Likewise. * integrate.c (copy_rtx_and_substitute, try_constants, subst_constants, mark_stores, allocate_initial_values): Likewise. * jump.c (reversed_comparison_code_parts, delete_prior_computation, delete_computation, rtx_renumbered_equal_p, true_regnum, reg_or_subregno): Likewise. * lcm.c (reg_dies, reg_becomes_live): Likewise. * local-alloc.c (validate_equiv_mem_from_store, validate_equiv_mem, update_equiv_regs, no_equiv, block_alloc, combine_regs, reg_is_set, wipe_dead_reg, no_conflict_p): Likewise. * loop-iv.c (simple_reg_p, simple_set_p, kill_sets, iv_get_reaching_def, iv_analyze_biv, altered_reg_used, mark_altered, simple_rhs_p, simplify_using_assignment, implies_p): Likewise. * loop.c (scan_loop, combine_movables, rtx_equal_for_loop_p, move_movables, note_set_pseudo_multiple_uses, consec_sets_invariant_p, find_single_use_in_loop, count_one_set, loop_bivs_init_find, loop_givs_rescan, check_insn_for_bivs, check_insn_for_givs, valid_initial_value_p, simplify_giv_expr, consec_sets_giv, loop_regs_update, check_dbra_loop, maybe_eliminate_biv, maybe_eliminate_biv_1, record_initial, update_reg_last_use, canonicalize_condition, loop_regs_scan, load_mems, try_copy_prop, try_swap_copy_prop): Likewise. * optabs.c (expand_binop, expand_vector_binop, expand_vector_unop, expand_abs, emit_no_conflict_block, emit_libcall_block, expand_float): Likewise. * postreload.c (reload_cse_simplify, reload_cse_simplify_set, reload_cse_simplify_operands, reload_combine, reload_combine_note_store, reload_combine_note_use, reload_cse_move2add, move2add_note_store): Likewise. * print-rtl.c (print_rtx): Likewise. * ra-build.c (copy_insn_p, remember_move, init_one_web_common, contains_pseudo, handle_asm_insn): Likewise. * ra-debug.c (ra_print_rtx_object, dump_constraints, dump_static_insn_cost): Likewise. * ra-rewrite.c (slots_overlap_p, emit_colors, remove_suspicious_death_notes): Likewise. * recog.c (validate_replace_rtx_1, find_single_use_1, find_single_use, register_operand, scratch_operand, nonmemory_operand, constrain_operands): Likewise. * reg-stack (check_asm_stack_operands, remove_regno_note, emit_swap_insn, swap_rtx_condition, subst_stack_regs_pat, subst_asm_stack_regs): Likewise. * regclass.c (scan_one_insn, record_reg_classes, copy_cost, record_address_regs, reg_scan_mark_refs): Likewise. * regmove.c (discover_flags_reg, replacement_quality, copy_src_to_dest, reg_is_remote_constant_p, regmove_optimize, fixup_match_1): Likewise. * regrename.c (note_sets, clear_dead_regs, build_def_use, kill_value, kill_set_value, copyprop_hardreg_forward_1): Likewise. * reload.c (MATCHES, push_secondary_reload, find_reusable_reload, reload_inner_reg_of_subreg, can_reload_into, push_reload, combine_reloads, find_dummy_reload, hard_reg_set_here_p, operands_match_p, decompose, find_reloads, find_reloads_toplev, find_reloads_address, subst_indexed_address, find_reloads_address_1, find_reloads_subreg_address, find_replacement, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p, find_equiv_reg, regno_clobbered_p): Likewise. * reload1.c (replace_pseudos_in, reload, calculate_needs_all_insns, find_reg, delete_dead_insn, alter_reg, eliminate_regs, elimination_effects, eliminate_regs_in_insn, scan_paradoxical_subregs, forget_old_reloads_1, reload_reg_free_for_value_p, choose_reload_regs, emit_input_reload_insns, emit_output_reload_insns, do_input_reload, do_output_reload, emit_reload_insns, gen_reload, delete_address_reloads_1, inc_for_reload): Likewise. * reorg.c (update_reg_dead_notes, fix_reg_dead_note, update_reg_unused_notes, fill_slots_from_thread): Likewise. * resource.c (update_live_status, mark_referenced_resources, mark_set_resources, mark_target_live_regs): Likewise. * rtlanal.c (nonzero_address_p, get_jump_table_offset, global_reg_mentioned_p_1, reg_mentioned_p, reg_referenced_p, reg_set_p, set_noop_p, find_last_value, refers_to_regno_p, note_stores, dead_or_set_p, dead_or_set_regno_p, find_regno_note, find_reg_fusage, find_regno_fusage, replace_regs, regno_use_in, parms_set, find_first_parameter_load, keep_with_call_p, hoist_test_store, hoist_update_store, address_cost, nonzero_bits1, num_sign_bit_copies1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sched-deps.c (deps_may_trap_p, sched_analyze_1, sched_analyze_insn, sched_analyze): Likewise. * sched-rgn.c (check_live_1, update_live_1, sets_likely_spilled_1): Likewise. * sdbout.c (sdbout_symbol, sdbout_parms, sdbout_reg_parms): Likewise. * simplify-rtx.c (simplify_replace_rtx, simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_subreg): Likewise. * stmt.c (decl_conflicts_with_clobbers_p, expand_asm_operands, expand_end_stmt_expr, expand_return, expand_decl, expand_anon_union_decl): Likewise. * unroll.c (precondition_loop_p, calculate_giv_inc, copy_loop_body, find_splittable_regs, find_splittable_givs, find_common_reg_term, loop_iterations): Likewise. * var-tracking.c (variable_union, variable_part_different_p, variable_different_p, count_uses, add_uses, add_stores, compute_bb_dataflow, set_variable_part, delete_variable_part, emit_notes_in_bb, vt_get_decl_and_offset, vt_add_function_parameters): Likewise. * varasm.c (assemble_variable): Likewise. From-SVN: r83195
2004-06-15 20:02:40 +02:00
|| (!REG_P (SET_DEST (x))
1991-12-01 06:13:56 +01:00
&& refers_to_regno_p (regno, endregno, SET_DEST (x), loc))))
return true;
1991-12-01 06:13:56 +01:00
if (code == CLOBBER || loc == &SET_SRC (x))
return false;
1991-12-01 06:13:56 +01:00
x = SET_SRC (x);
goto repeat;
default:
break;
1991-12-01 06:13:56 +01:00
}
/* X does not match, so try its subexpressions. */
fmt = GET_RTX_FORMAT (code);
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
{
if (fmt[i] == 'e' && loc != &XEXP (x, i))
{
if (i == 0)
{
x = XEXP (x, 0);
goto repeat;
}
else
if (refers_to_regno_p (regno, endregno, XEXP (x, i), loc))
return true;
1991-12-01 06:13:56 +01:00
}
else if (fmt[i] == 'E')
{
alias.c: Remove uses of "register" specifier in declarations of arguments and local... 2001-10-10 Stan Shebs <shebs@apple.com> * alias.c: Remove uses of "register" specifier in declarations of arguments and local variables. * c-common.c: Ditto. * c-convert.c: Ditto. * c-decl.c: Ditto. * c-format.c: Ditto. * c-semantics.c: Ditto. * c-typeck.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfgbuild.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * combine.c: Ditto. * convert.c: Ditto. * cppexp.c: Ditto. * cppfiles.c: Ditto. * cse.c: Ditto. * dbxout.c: Ditto. * defaults.h: Ditto. * df.c: Ditto. * dwarf2out.c: Ditto. * dwarfout.c: Ditto. * emit-rtl.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fix-header.c: Ditto. * floatlib.c: Ditto. * flow.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * gcc.c: Ditto. * gcse.c: Ditto. * gen-protos.c: Ditto. * genattrtab.c: Ditto. * gencheck.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * gengenrtl.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * gensupport.c: Ditto. * global.c: Ditto. * gmon.c: Ditto. * graph.c: Ditto. * haifa-sched.c: Ditto. * hard-reg-set.h: Ditto. * hash.c: Ditto. * integrate.c: Ditto. * jump.c: Ditto. * lists.c: Ditto. * local-alloc.c: Ditto. * loop.c: Ditto. * mips-tdump.c: Ditto. * mips-tfile.c: Ditto. * optabs.c: Ditto. * prefix.c: Ditto. * print-rtl.c: Ditto. * read-rtl.c: Ditto. * real.c: Ditto. * recog.c: Ditto. * reg-stack.c: Ditto. * regclass.c: Ditto. * regmove.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtl.c: Ditto. * rtlanal.c: Ditto. * scan.c: Ditto. * sched-deps.c: Ditto. * sched-rgn.c: Ditto. * sdbout.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tradcif.y: Ditto. * tradcpp.c: Ditto. * tree.c: Ditto. * unroll.c: Ditto. * varasm.c: Ditto. * xcoffout.c: Ditto. From-SVN: r46173
2001-10-11 05:16:15 +02:00
int j;
for (j = XVECLEN (x, i) - 1; j >= 0; j--)
1991-12-01 06:13:56 +01:00
if (loc != &XVECEXP (x, i, j)
&& refers_to_regno_p (regno, endregno, XVECEXP (x, i, j), loc))
return true;
1991-12-01 06:13:56 +01:00
}
}
return false;
1991-12-01 06:13:56 +01:00
}
/* Nonzero if modifying X will affect IN. If X is a register or a SUBREG,
we check if any register number in X conflicts with the relevant register
numbers. If X is a constant, return 0. If X is a MEM, return 1 iff IN
contains a MEM (we don't bother checking for memory addresses that can't
conflict because we expect this to be a rare case. */
int
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
reg_overlap_mentioned_p (const_rtx x, const_rtx in)
1991-12-01 06:13:56 +01:00
{
* Rework fields used to describe positions of bitfields and modify sizes to be unsigned and use HOST_WIDE_INT. * alias.c (reg_known_value_size): Now unsigned. * c-typeck.c (build_unary_op, case ADDR_EXPR): Use byte_position. (really_start_incremental_init): Use bitsize_zero_node. (push_init_level, pop_init_level, output_init_element): Likewise. Use bitsize_unit_node and bitsize_one_node. (output_pending_init_elements, process_init_element): Likewise. * combine.c (combine_max_regno, reg_sign_bit_copies): Now unsigned. (make_extraction): Position and length HOST_WIDE_INT and unsigned HOST_WIDE_INT, respectively. (get_pos_from_mask): Passed in value is unsigned HOST_WIDE_INT. (num_sign_bit_copies): Returns unsigned. BITWIDTH now unsigned; rework arithmetic. Remove recursive call from arg to MAX. (combine_instructions, init_reg_last_arrays): NREGS now unsigned. (setup_incoming_promotions, can_combine_p, try_combine, simplify_set): REGNO now unsigned. (set_nonzero_bit_and_sign_copies): NUM now unsigned. (find_split_point, expand_compound_operation, make_extraction): LEN now unsigned HOST_WIDE_INT, POS now HOST_WIDE_INT. (make_field_assignment): Likewise. (combine_simplify_rtx): Add cast. (expand_compound_operation): MODEWIDTH now unsigned; rework arithmetic. (force_to_mode): WIDTH now unsigned; add cast. (if_then_else_cond): SIZE now unsigned. (nonzero_bits): MODE_WIDTH, RESULT_WIDTH, and WIDTH now unsigned. (extended_count): Now returns unsigned. (simplify_shift_const): COUNT unsigned; arg is now INPUT_COUNT. Add SIGNED_COUNT variable; MODE_WORDS and FIRST_COUNT now unsigned. (simplify_comparison): MODE_WIDTH now unsigned. (update_table_tick): REGNO and ENDREGNO now unsigned; new var R. (mark_used_regs_combine): Likewise; rework arithmetic. (record_value_for_reg): REGNO, ENDREGNO, and I now unsigned. (record_dead_and_set_regs, reg_dead_at_p, distribute_notes): Likewise. (record_promoted_value): REGNO now unsigned. (get_last_value_validate): REGNO, ENDREGNO, and J now unsigned. (get_last_value): REGNO now unsigned. (use_crosses_set_p): REGNO and ENDREGNO now unsigned. (reg_dead_regno, reg_dead_endregno): Now unsigned. (remove_death): Arg REGNO now unsigned. (move_deaths): REGNO, DEADREGNO, DEADEND, OUREND, and I now unsigned. (reg_bitfield_target_p): REGNO, REGNO, ENDREGNO, and ENDTREGNO now unsigned. * convert.c (convert_to_integer): INPREC and OUTPREC now unsigned. * cse.c (struct qty_table_elem): FIRST_REG and LAST_REG now unsigned. (struct cse_reg_info): REGNO now unsigned. (cached_regno): Now unsigned. (REGNO_QTY_VALID_P): Add cast. (make_new_qty, make_regs_eqv, delete_reg_eqiv): Regno args unsigned. (remove_invalid_regs): Likewise. (remove_invalid_subreg_refs): Likewise; arg WORD also unsigned as are variables END and I. (get_cse_reg_info, insert): Likewise. (mention_regs, invalidate_for_call): REGNO, ENDREGNO, and I unsigned. (canon_hash): Likewise. (insert_regs, lookup_for_remove): REGNO now unsigned. (invalidate): REGNO, ENDREGNO, TREGNO, and TENDREGNO now unsigned. New variable RN. * dbxout.c (dbxout_parms, dbxout_reg_parms): Don't check for REGNO < 0. * dwarf2out.c (dwarf2ou_frame_debug_expr): Remove cast. * emit-rtl.c (subreg_realpart_p): Add cast. (operand_subword): Arg I is now unsigned as is var PARTWORDS. (operand_subword_force): Arg I is now unsigned. * except.c (eh_regs): Variable I is now unsigned. * explow.c (hard_function_value): BYTES is unsigned HOST_WIDE_INT. * expmed.c (store_fixed_bit_field): Position is HOST_WIDE_INT; length is unsigned HOST_WIDE_INT; likewise for internal variables. (store_split_bit_field, extract_fixed_bit_field): Likewise. (extract_split_bit_field, store_bit_field, extract_bit_field): Likewise. * expr.c (store_constructor_fields, store_constructor, store_field): Positions are HOST_WIDE_INT and lengths are unsigned HOST_WIDE_INT. (expand_assignment, expand_expr, expand_expr_unaligned): Likewise. (do_jump): Likewise. (move_by_pieces, move_by_pieces_ninsns, clear_by_pieces): MAX_SIZE is now unsigned. (emit_group_load): BYTEPOS is HOST_WIDE_INT; BYTELEN is unsigned. (emit_group_store): Likewise. (emit_move_insn): I now unsigned. (store_constructor): Use host_integerp, tree_low_cst, and bitsize_unit_node. (get_inner_reference): Return bitpos and bitsize as HOST_WIDE_INT. Rework all calculations to use trees and new fields. * expr.h (promoted_input_arg): Regno now unsigned. (store_bit_field, extract_bit_field): Adjust types of pos and size. (mark_seen_cases): Arg is HOST_WIDE_INT. * flow.c (verify_wide_reg_1): REGNO now unsigned. * fold-const.c (decode_field_reference): Size and pos HOST_WIDE_INT; precisions and alignments are unsigned. (optimize_bit_field_compare, fold_truthop): Likewise. (int_const_binop): Adjust threshold for size_int_type_wide call. (fold_convert): Likewise. (size_int_type_wide): Make table larger and fix thinko that only had half of table used. (all_ones_mask_p, fold): Precisions are unsigned. * function.c (put_reg_info_stack): REGNO is unsigned. (instantiate_decl): Size is HOST_WIDE_INT. (instantiate_virtual_regs): I is unsigned. (assign_parms): REGNO, REGNOI, and REGNOR are unsigned. (promoted_input_arg): REGNO is unsigned. * function.h (struct function): x_max_parm_reg is now unsigned. * gcse.c (max_gcse_regno): Now unsigned. (struct null_pointer_info): min_reg and max_reg now unsigned. (lookup_set, next_set): REGNO arg now unsigned. (compute_hash_table): REGNO and I now unsigned. (handle_avail_expr): regnum_for_replacing now unsigned. (cprop_insn): REGNO now unsigned. (delete_null_pointer_checks_1): BLOCK_REG now pointer to unsigned. * ggc-common.c (ggc_mark_tree_children, case FIELD_DECL): New case. * global.c (set_preference): SRC_REGNO, DEST_REGNO, and I now unsigned. * hard-reg-set.h (reg_class_size): Now unsigned. * integrate.c (mark_stores): LAST_REG and I now unsigned; new UREGNO. * jump.c (mark_modified_reg): I now unsigned; add cast. (rtx_equal_for_thread_p): Add cast. * loop.c (max_reg_before_loop): Now unsigned. (struct_movable): REGNO now unsigned. (try_copy_prop): REGNO arg unsigned. (regs_match_p): XN and YN now unsigned. (consec_sets_invariant_p, maybe_eliminate_biv): REGNO now unsigned. (strength_reduce): Likewise; NREGS also unsigned. (first_increment_giv, last_increment_giv unsigned): Now unsigned. * loop.h (struct iv_class): REGNO now unsigned. (max_reg_before_loop, first_increment_giv, last_increment_giv): Now unsigned. * machmode.h (mode_size, mode_unit_size): Now unsigned. (mode_for_size, smallest_mode_for_size): Pass size as unsigned. * optabs.c (expand_binop): I and NWORDS now unsigned. (expand_unop): I now unsigned. * print-tree.c (print_node): Don't print DECL_FIELD_BITPOS, but do print DECL_FIELD_OFFSET and DECL_FIELD_BIT_OFFSET. * real.c (significand_size): Now returns unsigned. * real.h (significand_size): Likewise. * regclass.c (reg_class_size): Now unsigned. (choose_hard_reg_mode): Both operands now unsigned. (record_reg_classes): REGNO and NR now unsigned. (reg_scan): NREGS now unsigned. (reg_scan_update): old_max_regno now unsigned. (reg_scan_mark_refs): Arg MIN_REGNO and var REGNO now unsigned. * reload.c (find_valid_class): BEST_SIZE now unsigned. (find_dummy_reload): REGNO, NWORDS, and I now unsigned. (hard_reg_set_here_p): Args BEG_REGNO and END_REGNO now unsigned. Likewise for variable R. (refers_to_regno_for_reload_p): Args REGNO and END_REGNO now unsigned, as are variables INNER_REGNO and INNER_ENDREGNO; add new variable R. (find_equiv_reg): Add casts. (regno_clobbered_p): Arg REGNO now unsigned. * reload.h (struct reload): NREGS now unsigned. (refers_to_regno_for_reload_p): Regno args are unsigned. (regno_clobbered_p): Likewise. * reload1.c (reg_max_ref_width, spill_stack_slot_width): Now unsigned. (compute_use_by_pseudos): REGNO now unsigned. (find_reg): I and J now unsigned, new variable K, and change loop variables accordingly; THIS_NREGS now unsigned. (alter_reg): INHERENT_SIZE and TOTAL_SIZE now unsigned. (spill_hard_reg): REGNO arg now unsigned; add casts. (forget_old_reloads_1): REGNO, NR, and I now unsigned. (mark_reload_reg_in_use): Arg REGNO and vars NREGS and I now unsigned. (clear_reload_reg_in_use): Arg REGNO and vars NREGS, START_REGNO, END_REGNO, CONFLICT_START, and CONFLICT_END now unsigned. (reload_reg_free_p, reload_reg_reaches_end_p): Arg REGNO now unsigned. (choose_reload_regs): MAX_GROUP_SIZE now unsigned. (emit_reload_insns): REGNO now unsigned. (reload_cse_move2add): Add cast. (move2add_note_store): REGNO and I now unsigned; new variable ENDREGNO and rework loop. * resource.c (mark_referenced_resources, mark_set_resources): New variable R; REGNO and LAST_REGNO now unsigned. (mark_target_live_regs): J and REGNO now unsigned. * rtl.c (mode_size, mode_unit_size): Now unsigned. * rtl.h (union rtunion_def): New field rtuint. (XCUINT): New macro. (ADDRESSOF_REGNO, REGNO, SUBREG_WORD): New XCUINT. (operand_subword, operand_subword_force): Word number is unsigned. (choose_hard_reg_mode): Operands are unsigned. (refers_to-regno_p, dead_or_set_regno_p): Regno arg is unsigned. (find_regno_note, find_regno_fusage, replace_regs): Likewise. (regno_use_in, combine_instructions, remove_death): Likewise. (reg_scan, reg_scan_update): Likewise. (extended_count): Return is unsigned. * rtlanal.c (refers_to_regno_p): Args REGNO and ENDREGNO and vars I, INNER_REGNO, and INNER_ENDREGNO now unsigned; new variable X_REGNO. (reg_overlap_mentioned_p): REGNO and ENDREGNO now unsigned. (reg_set_last_first_regno, reg_set_last_last_regno): Now unsigned. (reg_reg_last_1): FIRS and LAST now unsigned. (dead_or_set_p): REGNO, LAST_REGNO, and I now unsigned. (dead_or_set_regno_p): Arg TEST_REGNO and vars REGNO and ENDREGNO now unsigned. (find_regno_note, regno_use_in): Arg REGNO now unsigned. (find_regno_fusage): Likewise; also var REGNOTE now unsigned. (find_reg_fusage): Variables REGNO, END_REGNO, and I now unsigned. (replace_regs): Arg NREGS now unsigned. * sdbout.c (sdbout_parms, sdbout_reg_parms): Don't check REGNO < 0. * simplify-rtx.c (simplify_unary_operation): WIDTH now unsigned. (simplify_binary_operation): Likewise. (cselib_invalidate_regno): Arg REGNO and variables ENDREGNO, I, and THIS_LAST now unsigned. (cselib_record_set): Add cast. * ssa.c (ssa_max_reg_num): Now unsigned. (rename_block): REGNO now unsigned. * stmt.c (expand_return): Bit positions unsigned HOST_WIDE_INT; sizes now unsigned. (all_cases_count): Just return -1 not -2. COUNT, MINVAL, and LASTVAL now HOST_WIDE_INT. Rework tests to use trees whenever possible. Use host_integerp and tree_low_cst. (mark_seen_cases): COUNT arg now HOST_WIDE_INT; Likewise variable NEXT_NODE_OFFSET; XLO now unsigned. (check_for_full_enumeration_handing): BYTES_NEEDED, I to HOST_WIDE_INT. * stor-layout.c (mode_for_size): SIZE arg now unsigned. (smallest_mode_for_size): Likewise. (layout_decl): Simplify handing of a specified DECL_SIZE_UNIT. KNOWN_ALIGN is now an alignment, so simplify code. Don't turn off DECL_BIT_FIELD if field is BLKmode, but not type. (start_record_layout): Renamed from new_record_layout_info. Update to new fields. (debug_rli, normalize_rli, rli_size_unit_so_far, rli_size_so_far): New functions. (place_union_field): Renamed from layout_union_field. Update to use new fields in rli. (place_field): Renamed from layout_field. Major rewrite to use new fields in rli; pass alignment to layout_decl. (finalize_record_size): Rework to use new fields in rli and handle union. (compute_record_mode): Rework to simplify and to use new DECL fields. (finalize_type_size): Make rounding more consistent. (finish_union_layout): Deleted. (layout_type, case VOID_TYPE): Don't set TYPE_SIZE_UNIT either. (layout_type, case RECORD_TYPE): Call new function names. (initialize_sizetypes): Set TYPE_IS_SIZETYPE. (set_sizetype): Set TYPE_IS_SIZETYPE earlier. (get_best_mode): UNIT is now unsigned; remove casts. * tree.c (bit_position): Compute from new fields. (byte_position, int_byte_position): New functions. (print_type_hash_statistics): Cast to remove warning. (build_range_type): Use host_integerp and tree_low_cst to try to hash. (build_index_type): Likewise; make subtype of sizetype. (build_index_2_type): Pass sizetype to build_range_type. (build_common_tree_nodes): Use size_int and bitsize_int to initialize nodes; add bitsize_{zero,one,unit}_node. * tree.h (DECL_FIELD_CONTEXT): Use FIELD_DECL_CHECK. (DECL_BIT_FIELD_TYPE, DECL_QUALIFIER, DECL_FCONTEXT): Likewise. (DECL_PACKED, DECL_BIT_FIELD): Likewise. (DECL_FIELD_BITPOS): Deleted. (DECL_FIELD_OFFSET, DECL_FIELD_BIT_OFFSET): New fields. (DECL_RESULT, DECL_SAVED_INSNS): Use FUNCTION_DECL_CHECK. (DECL_FRAME_SIZE, DECL_FUNCTION_CODE, DECL_NO_STATIC_CHAIN): Likewise. (DECL_INLINE, DECL_BUILT_IN_NONANSI, DECL_IS_MALLOC): Likewise. (DECL_BUILT_IN_CLASS, DECL_STATIC_CONSTRUCTOR): Likewise. (DECL_STATIC_DESTRUCTOR, DECL_NO_CHECK_MEMORY_USAGE): Likewise. (DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT, DECL_NO_LIMIT_STACK) Likewise. (DECL_ORIGINAL_TYPE, TYPE_DECL_SUPPRESS_DEBUG): Use TYPE_DECL_CHECK. (DECL_ARG_TYPE_AS_WRITEN, DECL_ARG_TYPE): Use PARM_DECL_CHECK. (DECL_INCOMING_RTL, DECL_TRANSPARENT_UNION): Likewise. (DECL_ALIGN): Adjust to new field in union. (DECL_OFFSET_ALIGN): New field. (DECL_ERROR_ISSUED, DECL_TOO_LATE): Use LABEL_DECL_CHECK. (DECL_IN_TEXT_SECTION): Use VAR_DECL_CHECK. (union tree_decl): Add struct for both aligns. (enum tree_index): Add TI_BITSIZE_{ZERO,ONE,UNIT}. (bitsize_zero_node, bitsize_one_node, bitsize_unit_node): Added. (struct record_layout_info): Rework fields to have offset alignment and byte and bit position. (start_record_layout, place_field): Renamed from old names. (rli_size_so_far, rli_size_unit_so_far, normalize_rli): New decls. (byte_position, int_byte_position): Likewise. (get_inner_reference): Change types of position and length. * unroll.c (unroll_loop): New variable R; use for some loops. MAX_LOCAL_REGNUM and MAXREGNUM now unsigned. (calculate_giv_inc): Arg REGNO now unsigned. (copy_loop_body): REGNO and SRC_REGNO now unsigned. * varasm.c (assemble_variable): Clean up handling of size using host_integerp and tree_low_cst. (decode_addr_const): Use byte, not bit, position. (output_constructor): bitpos and offsets are HOST_WIDE_INT; use tree_low_cst and int_bit_position. * objc/objc-act.c (build_ivar_list_initializer): Use byte_position. * ch/actions.c (check_missing_cases): BYTES_NEEDED is HOST_WIDE_INT. * ch/typeck.c (expand_constant_to_buffer): Use int_byte_position. (extract_constant_from_buffer): Likewise. * cp/class.c (build_vbase_pointer_fields): layout_field now place_field. (get_vfield_offset): Use byte_position. (set_rtti_entry): Set OFFSET to ssizetype zero. (get_binfo_offset_as_int): Deleted. (dfs_record_base_offsets): Use tree_low_cst. (dfs_search_base_offsets): Likewise. (layout_nonempty_base_or_field): Reflect changes in RLI format and call byte_position. (layout_empty_base): Convert offset to ssizetype. (build_base_field): use rli_size_unit_so_far. (dfs_propagate_binfo_offsets): Do computation in proper type. (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets. (layout_class_type): Reflect changes in RLI names and fields. (finish_struct_1): Set DECL_FIELD_OFFSET. * cp/dump.c (dequeue_and_dump): Call bit_position. * cp/expr.c (cplus_expand_constant): Use byte_position. * cp/rtti.c (expand_class_desc): Use bitsize_one_node. * cp/typeck.c (build_component_addr): Use byte_position and don't special case for zero offset. * f/com.c (ffecom_tree_canonize_ptr_): Use bitsize_zero_node. (ffecom_tree_canonize_ref_): Likewise. * java/class.c (make_field_value): Use byte_position. * java/expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position. (java_array_data_offset): Likewise. * java/java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to bzero call. From-SVN: r32742
2000-03-25 19:34:13 +01:00
unsigned int regno, endregno;
1991-12-01 06:13:56 +01:00
/* If either argument is a constant, then modifying X can not
affect IN. Here we look at IN, we can profitably combine
CONSTANT_P (x) with the switch statement below. */
if (CONSTANT_P (in))
return 0;
recurse:
switch (GET_CODE (x))
1991-12-01 06:13:56 +01:00
{
case STRICT_LOW_PART:
case ZERO_EXTRACT:
case SIGN_EXTRACT:
/* Overly conservative. */
x = XEXP (x, 0);
goto recurse;
case SUBREG:
1991-12-01 06:13:56 +01:00
regno = REGNO (SUBREG_REG (x));
if (regno < FIRST_PSEUDO_REGISTER)
Use byte offsets in SUBREGs instead of words. 2001-04-03 Jakub Jelinek <jakub@redhat.com> David S. Miller <davem@pierdol.cobaltmicro.com> Andrew MacLeod <amacleod@redhat.com> Use byte offsets in SUBREGs instead of words. * alias.c (nonlocal_mentioned_p): Use subreg_regno function. * caller-save.c (mark_set_regs): Change callers of subreg_hard_regno to pass new argument. (add_stored_regs): Use subreg_regno_offset function. * calls.c (expand_call): For non-paradoxical SUBREG take endianess into account. (precompute_arguments): Use gen_lowpart_SUBREG. * combine.c (try_combine): Replace explicit XEXP with SUBREG_REG. (combine_simplify_rtx): Rework to use SUBREG_BYTE. (simplify_set): Rework to use SUBREG_BYTE. (expand_field_assignment): Use SUBREG_BYTE. (make_extraction): Use SUBREG_BYTE. (if_then_else_cond): Use SUBREG_BYTE. (apply_distributive_law): Use SUBREG_BYTE and fixup subreg comments. (gen_lowpart_for_combine): Compute full byte offset. * cse.c (mention_regs): Use SUBREG_BYTE. (remove_invalid_subreg_refs): Rework to use SUBREG_BYTE. (canon_hash): Use SUBREG_BYTE. (fold_rtx): Pass SUBREG_BYTE div UNITS_PER_WORD to operand_subword. (gen_lowpart_if_possible): Formatting. * dbxout.c (dbxout_symbol_location): Compute SUBREG hard regnos correctly. * dwarf2out.c (is_pseudo_reg): Fixup explicit XEXP into SUBREG_REG (mem_loc_descriptor): Fixup explicit XEXP into SUBREG_REG (loc_descriptor): Fixup explicit XEXP into SUBREG_REG * dwarfout.c (is_pseudo_reg): Fixup explicit XEXP into SUBREG_REG (output_mem_loc_descriptor): Fixup explicit XEXP into SUBREG_REG (output_loc_descriptor): Fixup explicit XEXP into SUBREG_REG * emit-rtl.c (gen_rtx_SUBREG): New function, used to verify certain invariants about SUBREGs the compiler creates. (gen_lowpart_SUBREG): New function. (subreg_hard_regno): New function to get the final register number. (gen_lowpart_common): Use SUBREG_BYTE. (gen_imagpart): Spacing nits. (subreg_realpart_p): Use SUBREG_BYTE. (gen_highpart): Use SUBREG_BYTE. (subreg_lowpart_p): Always compute endian corrected goal offset, even at the byte level, then compare against that. (constant_subword): New function, pulled out all constant cases from operand_subword and changed second argument name to offset. (operand_subword): Detect non REG/SUBREG/CONCAT/MEM cases early and call constant_subword to do the work. Return const0_rtx if looking for a word outside of OP. (operand_subword_force): Change second arg name to offset. * expmed.c (store_bit_field): Use SUBREG_BYTE. (store_split_bit_field): Use SUBREG_BYTE. (extract_bit_field): Use SUBREG_BYTE. (extract_split_bit_field): Use SUBREG_BYTE. (expand_shift): Use SUBREG_BYTE. * expr.c (store_expr, expand_expr): Use gen_lowpart_SUBREG. * final.c (alter_subreg) Use subreg_hard_regno and SUBREG_BYTE. * flow.c (set_noop_p): Use SUBREG_BYTE. (mark_set_1): Remove ALTER_HARD_SUBREG. Use subreg_regno_offset instead. * function.c (fixup_var_refs_1): Fixup explicit XEXP into a SUBREG_REG. (fixup_memory_subreg): Use SUBREG_BYTE and remove byte endian correction code. (optimize_bit_field): Use SUBREG_BYTE. (purge_addressof_1): Use SUBREG_BYTE. (purge_single_hard_subreg_set): Use subreg_regno_offset function. (assign_params): Mark arguments SUBREG_PROMOTED_VAR_P if they are actually promoted by the caller and PROMOTE_FOR_CALLS_ONLY is true. * gengenrtl.c (special_rtx): Add SUBREG. * global.c (mark_reg_store): Use SUBREG_BYTE. (set_preference): Rework to use subreg_regno_offset and SUBREG_BYTE. * ifcvt (noce_emit_move_insn): Use SUBREG_BYTE. * integrate.c (copy_rtx_and_substitute): Use SUBREG_BYTE and make sure final byte offset is congruent to subreg's mode size. (subst_constants): Use SUBREG_BYTE. (mark_stores): Use subreg_regno_offset function. * jump.c (rtx_renumbered_equal_p, true_regnum): Use subreg_regno_offset function and SUBREG_BYTE. * local-alloc.c (combine_regs): Use subreg_regno_offset function. (reg_is_born): Use subreg_hard_regno. * recog.c (valid_replace_rtx_1): Use SUBREG_BYTE and remove byte endian correction code. Don't combine subregs unless resulting offset aligns with type. Fix subreg constant extraction for DImode. Simplify SUBREG of VOIDmode CONST_DOUBLE. (general_operand): Remove dead mode_altering_drug code. (indirect_operand): Use SUBREG_BYTE. (constrain_operands): Use subreg_regno_offset function. * reg-stack.c (get_true_reg): Use subreg_regno_offset function. * regmove.c (regmove_optimize): Use SUBREG_BYTE. (optimize_reg_copy_3): Use gen_lowpart_SUBREG. * regs.h (REG_SIZE): Allow target to override. (REGMODE_NATURAL_SIZE): New macro which target can override. * reload.c (reload_inner_reg_of_subreg): subreg_regno should be used on the entire subreg rtx. (push_reload): Use SUBREG_BYTE in comments and code. (find_dummy_reload): Use subreg_regno_offset. Only adjust offsets for hard registers inside subregs. (operands_match_p): Use subreg_regno_offset. (find_reloads): Use SUBREG_BYTE and only advance offset for subregs containing hard regs. (find_reload_toplev): Use SUBREG_BYTE. Remove byte endian corrections when fixing up MEM subregs. (find_reloads_address_1): Use SUBREG_BYTE, subreg_regno, and subreg_regno_offset where appropriate. (find_reloads_subreg_address): Use SUBREG_BYTE. Remove byte endian corrections when fixing up MEM subregs. (subst_reloads): When combining two subregs, make sure final offset is congruent to subreg's mode size. (find_replacement): Use SUBREG_BYTE and subreg_regno_offset. (refers_to_regno_for_reload_p): Use subreg_regno. (reg_overlap_mentioned_for_reload_p): Use subreg_regno_offset. * reload1.c (eliminate_regs) Use SUBREG_BYTE. Remove byte endian correction code for memory subreg fixups. (forget_old_reload_1): Use subreg_regno_offset. (choose_reload_regs): Use subreg_regno. (emit_input_reload_insns): Use SUBREG_BYTE. (reload_combine_note_store): Use subreg_regno_offset. (move2add_note_store): Use subreg_regno_offset. * resource.c (update_live_status, mark_referenced_resources): Use subreg_regno function. (mark_set_resources): Use subreg_regno function. * rtl.h (SUBREG_WORD): Rename to SUBREG_BYTE. (subreg_regno_offset, subreg_regno): Define prototypes. (subreg_hard_regno, constant_subword, gen_rtx_SUBREG): Newi functions. (gen_lowpart_SUBREG): Add prototype. * rtl.texi (subreg): Update to reflect new byte offset representation. Add mentioning of the effect that BYTES_BIG_ENDIAN has on subregs now. * rtlanal.c (refers_to_regno_p): Use subreg_regno. (reg_overlap_mentioned_p): Use subreg_regno. (replace_regs); Make sure final offset of combined subreg is congruent to size of subreg's mode. (subreg_regno_offset): New function. (subreg_regno): New function. * sched-vis.c (print_value): Change SUBREG_WORD to SUBREG_BYTE. * sdbout.c (sdbout_symbol): Compute offset using alter_subreg. * stmt.c (expand_anon_union_decl): Use gen_lowpart_SUBREG. * tm.texi (ALTER_HARD_SUBREG): Remove, it is now dead. (SUBREG_REGNO_OFFSET): Describe SUBREG_REGNO_OFFSET overrides. * config/a29k/a29k.c (gpc_reg_operand): Use subreg_regno. (a29k_get_reloaded_address): Use SUBREG_BYTE. (print_operand): Use SUBREG_BYTE. * config/alpha/alpha.c (print_operand_address): Use SUBREG_BYTE. * config/arm/arm.c (arm_reload_in_hi): Use SUBREG_BYTE. (arm_reload_out_hi): Use SUBREG_BYTE. * config/d30v/d30v.c (d30v_split_double): Use subreg_regno_offset instead of SUBREG_WORD. (d30v_print_operand_memory_reference): Use subreg_regno_offset. * config/dsp16xx/dsp16xx.md (extendqihi2, zero_extendqihi2): Fix SUBREG creation to use byte offset. * config/h8300/h8300.md (Unnamed HImode zero extraction and 16bit inverted load insns): Fix explicit rtl subregs to use byte offsets. * config/i370/i370.md (cmpstrsi, movstrsi, mulsi3, divsi3, udivsi3, umodsi3): Generate SUBREGs with byte offsets. * config/i860/i860.c (single_insn_src_p): Use SUBREG_BYTE. * config/i860/i860.md (mulsi3_big): Fixup explicit SUBREGs in rtl to use byte offsets. (unnamed fmlow.dd insn): Fixup SUBREGS to use byte offsets. * config/i960/i960.md (extendhisi2): Generate SUBREGs with byte offsets, also make sure it is congruent to SUBREG's mode size. (extendqisi2, extendqihi2, zero_extendhisi2, zero_extendqisi2, unnamed ldob insn): Generate SUBREGs with byte offset. (zero_extendqihi2): SUBREG's are byte offsets. * config/m68hc11/m68hc11.c (m68hc11_gen_lowpart): Use SUBREG_BYTE. (m68hc11_gen_highpart): Use SUBREG_BYTE. * config/m68k/m68k.md (zero_extendhisi2, zero_extendqihi2, zero-extendqisi2): Generate SUBREGs with byte offset. (umulsidi3, mulsidi3, subreghi1ashrdi_const32, subregsi1ashrdi_const32, subreg1lshrdi_const32): Fixup explicit subregs in rtl to use byte offsets. * config/m88k/m88k.md (extendsidi2): fixup subregs to use byte offset. * config/mips/mips.c (mips_move_1word): Use subreg_regno_offset. (mips_move_2words): Use subreg_regno_offset. (mips_secondary_reload_class): Use subreg_regno_offset. * config/mips/mips.md (DImode plus, minus, move, and logical op splits): Fixup explicit subregs in rtl to use byte offsets. * config/mn10200/mn10200.c (print_operand): Use subreg_regno function. * config/mn10300/mn10300.c (print_operand): Use subreg_regno function. * config/ns32k/ns32k.md (udivmoddisi4): Fix explicit subregs in rtl to use byte offsets. * config/pa/pa.c (emit_move_sequence): Use SUBREG_BYTE. * config/pa/pa.md (floatunssisf2, floatunssidf2, mulsi3): fix explicit subregs to use byte offsets. * config/pdp11/pdp11.md (zero_extendhisi2, modhi3, modhi3+1): Fixup explicit subregs in rtl to use byte offsets. * config/romp/romp.c (memory_offset_in_range_p): Use SUBREG_BYTE and remove byte endian correction code. * config/sh/sh.c (output_movedouble): Use subreg_regno. (gen_ashift_hi): Use SUBREG_BYTE. (regs_used): Use subreg_regno_offset. (machine_dependent_reorg): Use subreg_regno_offset. * config/sh/sh.h (INDEX_REGISTER_RTX_P): Use SUBREG_BYTE. * config/sh/sh.md (DImode and DFmode move splits): Use subreg_regno. (movdf_i4): Subregs are byte offsets now. * config/sparc/sparc.c (ultra_find_type): Use SUBREG_BYTE. * config/sparc/sparc.h (ALTER_HARD_SUBREG): Removed. (REGMODE_NATURAL_SIZE): Override. (REG_SIZE): For SUBREG check float mode on SUBREG_REG's mode. * config/sparc/sparc.md (TFmode move splits): Generate SUBREGs with byte offsets. (zero_extendhisi2, zero_extendqidi2_insn, extendhisi2, extendqihi2, sign_extendqihi2_insn, sign_extendqisi2_insn, extendqidi2): Generate SUBREGs with byte offsets, also make sure it is congruent to SUBREG's mode size. (smulsi3_highpart_v8plus): Fix explicit subregs in rtl to use byte offsets. (cmp_siqi_trunc, cmp_siqi_trunc_set, cmp_diqi_trunc, cmp_diqi_trunc_set, lshrdi3_v8plus+1, lshrdi3_v8plus+2, lshrdi3_v8plus+3, lshrdi3_v8plus+4): Use proper SUBREG_BYTE offset for non-paradoxical subregs in patterns. * config/v850/v850.c (print_operand, output_move_double): Use subreg_regno function. Co-Authored-By: Andrew MacLeod <amacleod@redhat.com> Co-Authored-By: David S. Miller <davem@pierdol.cobaltmicro.com> From-SVN: r41058
2001-04-03 17:06:12 +02:00
regno = subreg_regno (x);
endregno = regno + (regno < FIRST_PSEUDO_REGISTER
? subreg_nregs (x) : 1);
goto do_reg;
1991-12-01 06:13:56 +01:00
case REG:
regno = REGNO (x);
regs.h (end_hard_regno): New function. gcc/ * regs.h (end_hard_regno): New function. (END_HARD_REGNO, END_REGNO): New macros. (add_to_hard_reg_set): New function. (remove_from_hard_reg_set): Likewise. (in_hard_reg_set_p): Likewise. (overlaps_hard_reg_set_p): Likewise. * bt-load.c (find_btr_reference): Use overlaps_hard_reg_set_p. (note_btr_set): Use END_HARD_REGNO. * caller-save.c (setup_save_areas): Use end_hard_regno. (mark_set_regs): Use END_HARD_REGNO. (add_stored_regs): Use end_hard_regno. (mark_referenced_regs): Use add_to_hard_reg_set. * combine.c (update_table_tick): Use END_REGNO. (record_value_for_reg): Likewise. (record_dead_and_set_regs): Likewise. (get_last_value_validate): Likewise. (use_crosses_set_p): Likewise. (reg_dead_at_p_1): Likewise. (reg_dead_at_p): Likewise. (mark_used_regs_combine): Use add_to_hard_reg_set. (move_deaths): Use END_HARD_REGNO. (reg_bitfield_target_p): Use end_hard_regno. (distribute_notes): Use END_HARD_REGNO. * cse.c (mention_regs): Use END_REGNO. (insert): Use add_to_hard_reg_set. (invalidate): Use END_HARD_REGNO. (invalidate_for_call): Likewise. (exp_equiv_p): Use END_REGNO. (cse_insn): Likewise. * cselib.c (cselib_invalidate_regno): Use end_hard_regno. * df-problems.c (df_urec_mark_reg_change): Use END_HARD_REGNO. * df-scan.c (df_ref_record): Use END_HARD_REGNO. * function.c (keep_stack_depressed): Use end_hard_regno. * global.c (global_alloc): Use end_hard_regno. (global_conflicts): Use add_to_hard_reg_set instead of mark_reg_live_nc. (find_reg): Likewise. (mark_reg_store): Likewise. (mark_reg_conflicts): Likewise. (mark_reg_death): Use remove_from_hard_reg_set. (mark_reg_live_nc): Delete. (set_preference): Use end_hard_regno. * local-alloc.c (mark_life): Use add_to_hard_reg_set and remove_from_hard_reg_set. (post_mark_life): Use add_to_hard_reg_set. * mode-switching.c (reg_dies): Use remove_from_hard_reg_set. (reg_becomes_live): Use add_to_hard_reg_set. * recog.c (reg_fits_class_p): Use in_hard_reg_set_p. (peep2_find_free_register): Use add_to_hard_reg_set. * reg-stack.c (convert_regs_exit): Use END_HARD_REGNO. * regclass.c (record_reg_classes): Use in_hard_reg_set_p. * regrename.c (note_sets): Use add_to_hard_reg_set. (clear_dead_regs): Use remove_from_hard_reg_set. (regrename_optimize): Use add_to_hard_reg_set. (find_oldest_value_reg): Use in_hard_reg_set_p. * reload.c (push_reload): Use in_hard_reg_set_p and end_hard_regno. (hard_reg_set_here_p): Use end_hard_regno. (decompose): Likewise. (reg_overlap_mentioned_for_reload_p): Use END_HARD_REGNO. (find_equiv_reg): Use in_hard_reg_set_p and end_hard_regno. * reload1.c (compute_use_by_pseudos): Use add_to_hard_reg_set. (mark_home_live): Use end_hard_regno. (spill_hard_reg): Likewise. (clear_reload_reg_in_use): Likewise. * reorg.c (delete_prior_computation): Use END_REGNO. * resource.c (update_live_status): Use END_HARD_REGNO. (mark_referenced_resources): Use add_to_hard_reg_set. (mark_set_resources): Likewise. (mark_target_live_regs): Likewise. Use remove_from_hard_reg_set. * rtlanal.c (refers_to_regno_p): Use END_REGNO. (reg_overlap_mentioned_p): Likewise. (dead_or_set_p): Likewise. Use an exclusive upper loop bound. (covers_regno_no_parallel_p): Use END_REGNO. (find_regno_note): Likewise. (find_reg_fusage): Use END_HARD_REGNO. * stmt.c (decl_overlaps_hard_reg_set_p): Use overlaps_hard_reg_set_p. * var-tracking.c (emit_note_insn_var_location): Use end_hard_regno. From-SVN: r124961
2007-05-22 22:52:39 +02:00
endregno = END_REGNO (x);
do_reg:
return refers_to_regno_p (regno, endregno, in, (rtx*) 0);
1991-12-01 06:13:56 +01:00
case MEM:
{
const char *fmt;
int i;
1991-12-01 06:13:56 +01:00
alias.c (get_alias_set, [...]): Use MEM_P. 2004-07-01 Jerry Quinn <jlquinn@optonline.net> * alias.c (get_alias_set, canon_rtx, get_addr, nonoverlapping_memrefs_p, nonlocal_referenced_p_1, memory_modified_1): Use MEM_P. * builtins.c (expand_builtin_prefetch, expand_builtin_profile_func, expand_builtin): Likewise. * calls.c (expand_call, emit_library_call_value_1, store_one_arg): Likewise. * combine.c (can_combine_p, combinable_i3pat, try_combine, find_split_point, combine_simplify_rtx, simplify_set, make_extraction, rtx_equal_for_field_assignment_p, gen_lowpart_for_combine, record_dead_and_set_regs_1, get_last_value_validate, mark_used_regs_combine, move_deaths, unmentioned_reg_p_1): Likewise. * cse.c (check_dependence, canon_hash, equiv_constant, gen_lowpart_if_possible, cse_insn, invalidate_from_clobbers, cse_around_loop, cse_check_loop_start, cse_set_around_loop, count_reg_usage): Likewise. * cselib.c (rtx_equal_for_cselib_p, add_mem_for_addr, cselib_lookup, cselib_invalidate_mem, cselib_invalidate_rtx, cselib_record_set, cselib_record_sets): Likewise. * dbxout.c (PARM_PASSED_IN_MEMORY, dbxout_symbol, dbxout_symbol_location, dbxout_parms, dbxout_reg_parms): Likewise. * ddg.c (mark_mem_use, mark_mem_store, rtx_mem_access_p): Likewise. * df.c (df_uses_record): Likewise. * dojump (do_jump): Likewise. * dwarf2out.c (stack_adjust_offset, mem_loc_descriptor, loc_descriptor_from_tree, rtl_for_decl_location, add_bound_info, decl_start_label): Likewise. * emit-rtl.c (gen_complex_constant_part, gen_highpart, operand_subword, change_address_1, make_safe_from): Likewise. * explow.c (break_out_memory_refs, copy_all_regs, validize_mem, stabilize, force_not_mem): Likewise. * expmed.c (store_bit_field, store_split_bit_field, extract_bit_field, expand_mult_const, expand_divmod, emit_store_flag): Likewise. * expr.c (convert_move, convert_modes, emit_block_move, emit_group_load, emit_group_store, clear_storage, emit_move_insn, emit_move_insn_1, expand_assignment, store_expr, store_constructor_field, store_constructor, store_field, force_operand, safe_from_p, expand_expr_real_1, expand_increment): Likewise. * final.c (cleanup_subreg_operands, alter_subreg, get_mem_expr_from_op): Likewise. * flow.c (notice_stack_pointer_modification_1, init_propagate_block_info, insn_dead_p, mark_set_1, mark_used_regs): Likewise. * function.c (mark_temp_addr_taken, preserve_temp_slots, preserve_rtl_expr_result, put_var_into_stack, fixup_var_refs_1, optimize_bit_field, flush_addressof, purge_addressof_1, instantiate_decl, instantiate_virtual_regs_1, assign_parms, setjmp_protect, setjmp_protect_args, fix_lexical_addr, keep_stack_depressed): Likewise. * ifcvt.c (noce_try_cmove_arith, noce_try_abs, noce_operand_ok, noce_process_if_block, find_memory): Likewise. * integrate.c (subst_constants, allocate_initial_values): Likewise. * local-alloc.c (validate_equiv_mem_from_store, memref_referenced_p, update_equiv_regs): Likewise. * loop.c (scan_loop, prescan_loop, note_addr_stored, check_store, maybe_eliminate_biv_1, find_mem_in_note_1): Likewise. * optabs.c (expand_abs, emit_unop_insn): Likewise. * passes.c (rest_of_handle_final): Likewise. * postreload.c (reload_cse_simplify_set, reload_cse_simplify_operands, move2add_note_store): Likewise. * ra-build.c (detect_remat_webs): Likewise. * ra-debug.c (dump_static_insn_cost): Likewise. * ra-rewrite.c (slots_overlap_p, insert_stores): Likewise. * recog.c (validate_change, apply_change_group, cancel_changes, validate_replace_rtx_1, general_operand, register_operand, nonmemory_operand, push_operand, pop_operand, memory_operand, indirect_operand, asm_operand_ok, offsettable_memref_p, offsettable_nonstrict_memref_p, constrain_operands, store_data_bypass_p): Likewise. * reg-stack.c (subst_stack_regs_pat): Likewise. * regclass.c (record_operand_costs, scan_one_insn, record_reg_classes, copy_cost, reg_scan_mark_refs): Likewise. * regmove.c (optimize_reg_copy_3, stack_memref_p, combine_stack_adjustments_for_block): Likewise. * regrename.c (copyprop_hardreg_forward_1): Likewise. * reload.c (can_reload_into, push_reload, decompose, immune_p, find_reloads, find_reloads_address, find_reloads_address_1, reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p, find_equiv_reg): Likewise. * reload1.c (reload, eliminate_regs, eliminate_regs_in_insn, reload_as_needed, choose_reload_regs, emit_input_reload_insns, do_input_reload, emit_reload_insns, gen_reload, delete_output_reload, delete_address_reloads): Likewise. * resource.c (mark_referenced_resources): Likewise. * rtlanal.c (get_jump_table_offset, count_occurrences, reg_referenced_p, reg_set_p, set_of_1, set_noop_p, reg_overlap_mentioned_p, note_uses, replace_regs, nonzero_bits1, num_sign_bit_copies1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sched-deps.c (sched_analyze_1, sched_analyze_2): Likewise. * sdbout.c (PARM_PASSED_IN_MEMORY, sdbout_symbol, sdbout_toplevel_data, sdbout_parms, sdbout_reg_parms, sdbout_global_decl): Likewise. * simplify-rtx.c (simplify_subreg): Likewise. * stmt.c (expand_asm_operands, expand_expr_stmt_value, expand_decl, expand_anon_union_decl, expand_end_case_type): Likewise. * unroll.c (calculate_giv_inc): Likewise. * var-tracking.c (stack_adjust_offset_pre_post, bb_stack_adjust_offset, track_expr_p, count_uses, add_uses, add_stores, compute_bb_dataflow, vt_get_decl_and_offset, vt_add_function_parameters): Likewise. * varasm.c (make_var_volatile, notice_global_symbol, assemble_external, decode_addr_const, mark_weak, default_encode_section_info): Likewise. From-SVN: r83980
2004-07-01 14:52:53 +02:00
if (MEM_P (in))
1991-12-01 06:13:56 +01:00
return 1;
fmt = GET_RTX_FORMAT (GET_CODE (in));
for (i = GET_RTX_LENGTH (GET_CODE (in)) - 1; i >= 0; i--)
if (fmt[i] == 'e')
{
if (reg_overlap_mentioned_p (x, XEXP (in, i)))
return 1;
}
else if (fmt[i] == 'E')
{
int j;
for (j = XVECLEN (in, i) - 1; j >= 0; --j)
if (reg_overlap_mentioned_p (x, XVECEXP (in, i, j)))
return 1;
}
return 0;
}
case SCRATCH:
case PC:
case CC0:
return reg_mentioned_p (x, in);
case PARALLEL:
{
int i;
/* If any register in here refers to it we return true. */
for (i = XVECLEN (x, 0) - 1; i >= 0; i--)
if (XEXP (XVECEXP (x, 0, i), 0) != 0
&& reg_overlap_mentioned_p (XEXP (XVECEXP (x, 0, i), 0), in))
return 1;
return 0;
}
1991-12-01 06:13:56 +01:00
default:
ra-build.c (copy_insn_p, [...]): Use gcc_assert and gcc_unreachable instead of abort. * ra-build.c (copy_insn_p, remember_move, defuse_overlap_p_1, live_out_1, prune_hardregs_for_mode, init_one_web_common, reinit_one_web, add_subweb, add_subweb_2, init_web_parts, record_conflict, compare_and_free_webs, init_webs_defs_uses, parts_to_webs_1, parts_to_webs, reset_conflicts, check_conflict_numbers, remember_web_was_spilled, handle_asm_insn, ra_build_free): Use gcc_assert and gcc_unreachable instead of abort. * ra-colorize.c (push_list, put_web, reset_lists, put_web_at_end, put_move, remove_move, combine, select_spill, colorize_one_web, try_recolor_web, insert_coalesced_conflicts, check_colors, break_precolored_alias, restore_conflicts_from_coalesce, sort_and_combine_web_pairs, check_uncoalesced_moves): Likewise. * ra-rewrite.c (spill_coalescing, slots_overlap_p, emit_loads, reloads_to_loads, rewrite_program2, emit_colors): Likewise. * ra.c (first_hard_reg, create_insn_info, find_subweb, init_ra, check_df): Likewise. * real.c (do_add, do_multiply, do_divide, do_compare, do_fix_trunc, real_arithmetic, real_compare, real_exponent, real_ldexp, real_identical, real_to_integer, real_to_integer2, real_to_decimal, real_to_hexadecimal, real_from_integer, ten_to_ptwo, ten_to_mptwo, real_digit, real_nan, real_maxval, round_for_format, real_convert, real_to_target, real_from_target, real_hash, encode_ieee_single, encode_ieee_double, encode_ieee_extended, encode_ieee_quad, encode_vax_f, encode_vax_d, encode_vax_g, encode_i370_single, encode_i370_double, encode_c4x_single, encode_c4x_extended): Likewise. * recog.c (validate_change, validate_replace_rtx_1, asm_operand_ok, extract_insn, peep2_next_insn, peep2_reg_dead_p, peep2_find_free_register, peephole2_optimize, store_data_bypass_p, if_test_bypass_p): Likewise. * reg-stack.c (record_label_references, get_asm_operand_n_inputs, stack_result, remove_regno_note, get_hard_regnum, emit_pop_insn, emit_swap_insn, swap_to_top, move_for_stack_reg, subst_stack_regs_pat, subst_asm_stack_regs, change_stack, compensate_edge, convert_regs_1): Likewise. * regclass.c (init_reg_sets, init_reg_sets_1, memory_move_secondary_cost): Likewise. * regrename.c (note_sets, clear_dead_regs, scan_rtx_reg, scan_rtx): Likewise. * reload.c (push_secondary_reload, find_valid_class, push_reload, operands_match_p, decompose, immune_p, find_reloads, find_reloads_toplev, find_reloads_address_1, subst_reloads, copy_replacements, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p): Likewise. * reload1.c (compute_use_by_pseudos, replace_pseudos_in, reload, count_pseudo, find_reg, eliminate_regs, eliminate_regs_in_insn, verify_initial_elim_offsets, finish_spills, clear_reload_reg_in_use, reload_reg_free_p, reload_reg_reaches_end_p, reloads_conflict, choose_reload_regs, merge_assigned_reloads, emit_input_reload_insns, do_output_reload, fixup_abnormal_edges): Likewise. * reorg.c (stop_search_p, emit_delay_sequence, get_jump_flags, fill_slots_from_thread, relax_delay_slots): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * rtl.c (copy_rtx, rtx_equal_p): Likewise. * rtlanal.c (insn_dependent_p, reg_overlap_mentioned_p, dead_or_set_p, find_reg_fusage, remove_note, replace_rtx, subreg_lsb_1, subreg_regno_offset, subreg_offset_representable_p, find_first_parameter_load, can_hoist_insn_p, hoist_update_store, hoist_insn_after, hoist_insn_to_edge, nonzero_bits1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sbitmap.c (sbitmap_difference): Likewise. * sched-deps.c (add_dependence, sched_analyze_1, sched_analyze_2, sched_analyze, add_forward_dependence): Likewise. * sched-ebb.c (fix_basic_block_boundaries, schedule_ebb): Likewise. * sched-rgn.c (debug_regions, compute_trg_info, schedule_region, schedule_insns): Likewise. * sched-vis.c (print_pattern): Likewise. * sdbout.c (sdbout_symbol, sdbout_toplevel_data): Likewise. * simplify-rtx.c (simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_ternary_operation, simplify_immed_subreg, simplify_subreg, simplify_gen_subreg): Likewise. * sreal.c (copy, sreal_sub, sreal_div): Likewise. * stmt.c (force_label_rtx, expand_goto, expand_asm_operands, resolve_operand_name_1, expand_return, expand_decl, expand_anon_union_decl, emit_case_bit_tests, expand_case): Likewise. * stor-layout.c (put_pending_size, smallest_mode_for_size, int_mode_for_mode, layout_decl, finish_builtin_struct, layout_type, set_sizetype, get_mode_bounds): Likewise. From-SVN: r87244
2004-09-09 19:19:16 +02:00
gcc_assert (CONSTANT_P (x));
return 0;
}
1991-12-01 06:13:56 +01:00
}
/* Call FUN on each register or MEM that is stored into or clobbered by X.
(X would be the pattern of an insn). DATA is an arbitrary pointer,
ignored by note_stores, but passed to FUN.
FUN receives three arguments:
1. the REG, MEM, CC0 or PC being stored in or clobbered,
2. the SET or CLOBBER rtx that does the store,
3. the pointer DATA provided to note_stores.
1991-12-01 06:13:56 +01:00
If the item being stored in or clobbered is a SUBREG of a hard register,
the SUBREG will be passed. */
1991-12-01 06:13:56 +01:00
void
alias.c (record_set, [...]): Constify. * alias.c (record_set, memory_modified_1): Constify. * bt-load.c (note_btr_set): Likewise. * caller-save.c (mark_set_regs, add_stored_regs): Likewise. * combine.c (set_nonzero_bits_and_sign_copies, expand_field_assignment, record_dead_and_set_regs_1, use_crosses_set_p, reg_dead_at_p_1, can_combine_p, likely_spilled_retval_1): Likewise. * config/frv/frv.c (frv_registers_update_1, frv_io_check_address, frv_io_handle_set): Likewise. * config/mips/mips.c (mips_sim_record_set, vr4130_true_reg_dependence_p_1): Likewise. * config/mt/mt.c (insn_dependent_p_1): Likewise. * config/s390/s390.c (s390_reg_clobbered_rtx): Likewise. * config/sh/sh.c (flow_dependent_p_1): Likewise. * cselib.c (cselib_invalidate_rtx_note_stores): Likewise. * dce.c (mark_nonreg_stores_1, mark_nonreg_stores_2): Likewise. * ddg.c (mark_mem_store): Likewise. * df-problems.c (df_urec_mark_reg_change): Likewise. * function.c (update_epilogue_consts): Likewise. * gcse.c (record_set_info, record_last_set_info, mems_conflict_for_gcse_p, canon_list_insert, reg_set_info, reg_clear_last_set): Likewise. * global.c (mark_reg_store, mark_reg_clobber, reg_becomes_live): Likewise. * jump.c (reversed_comparison_code_parts): Likewise. * local-alloc.c (validate_equiv_mem_from_store, no_equiv, reg_is_set): Likewise. * loop-iv.c (mark_altered): Likewise. * mode-switching.c (reg_becomes_live): Likewise. * optabs.c (no_conflict_move_test): Likewise. * postreload-gcse.c (record_last_set_info, find_mem_conflicts): Likewise. * postreload.c (reload_combine_note_store, move2add_note_store): Likewise. * regmove.c (flags_set_1): Likewise. * regrename.c (note_sets, kill_clobbered_value, kill_set_value): Likewise. * reload1.c (mark_not_eliminable, forget_old_reloads_1): Likewise. * resource.c (update_live_status): Likewise. * rtl.h (set_of, note_stores): Likewise. * rtlanal.c (set_of_1, parms_set, struct set_of_data, set_of, note_stores, parms_set): Likewise. * sched-rgn.c (sets_likely_spilled_1): Likewise. * stack-ptr-mod.c (notice_stack_pointer_modification_1): Likewise. * var-tracking.c (count_stores, add_stores): Likewise. From-SVN: r127065
2007-07-30 18:30:18 +02:00
note_stores (const_rtx x, void (*fun) (rtx, const_rtx, void *), void *data)
1991-12-01 06:13:56 +01:00
{
int i;
if (GET_CODE (x) == COND_EXEC)
x = COND_EXEC_CODE (x);
if (GET_CODE (x) == SET || GET_CODE (x) == CLOBBER)
{
rtx dest = SET_DEST (x);
while ((GET_CODE (dest) == SUBREG
&& (!REG_P (SUBREG_REG (dest))
|| REGNO (SUBREG_REG (dest)) >= FIRST_PSEUDO_REGISTER))
|| GET_CODE (dest) == ZERO_EXTRACT
|| GET_CODE (dest) == STRICT_LOW_PART)
dest = XEXP (dest, 0);
/* If we have a PARALLEL, SET_DEST is a list of EXPR_LIST expressions,
each of whose first operand is a register. */
if (GET_CODE (dest) == PARALLEL)
{
for (i = XVECLEN (dest, 0) - 1; i >= 0; i--)
if (XEXP (XVECEXP (dest, 0, i), 0) != 0)
(*fun) (XEXP (XVECEXP (dest, 0, i), 0), x, data);
}
else
(*fun) (dest, x, data);
}
* Rework fields used to describe positions of bitfields and modify sizes to be unsigned and use HOST_WIDE_INT. * alias.c (reg_known_value_size): Now unsigned. * c-typeck.c (build_unary_op, case ADDR_EXPR): Use byte_position. (really_start_incremental_init): Use bitsize_zero_node. (push_init_level, pop_init_level, output_init_element): Likewise. Use bitsize_unit_node and bitsize_one_node. (output_pending_init_elements, process_init_element): Likewise. * combine.c (combine_max_regno, reg_sign_bit_copies): Now unsigned. (make_extraction): Position and length HOST_WIDE_INT and unsigned HOST_WIDE_INT, respectively. (get_pos_from_mask): Passed in value is unsigned HOST_WIDE_INT. (num_sign_bit_copies): Returns unsigned. BITWIDTH now unsigned; rework arithmetic. Remove recursive call from arg to MAX. (combine_instructions, init_reg_last_arrays): NREGS now unsigned. (setup_incoming_promotions, can_combine_p, try_combine, simplify_set): REGNO now unsigned. (set_nonzero_bit_and_sign_copies): NUM now unsigned. (find_split_point, expand_compound_operation, make_extraction): LEN now unsigned HOST_WIDE_INT, POS now HOST_WIDE_INT. (make_field_assignment): Likewise. (combine_simplify_rtx): Add cast. (expand_compound_operation): MODEWIDTH now unsigned; rework arithmetic. (force_to_mode): WIDTH now unsigned; add cast. (if_then_else_cond): SIZE now unsigned. (nonzero_bits): MODE_WIDTH, RESULT_WIDTH, and WIDTH now unsigned. (extended_count): Now returns unsigned. (simplify_shift_const): COUNT unsigned; arg is now INPUT_COUNT. Add SIGNED_COUNT variable; MODE_WORDS and FIRST_COUNT now unsigned. (simplify_comparison): MODE_WIDTH now unsigned. (update_table_tick): REGNO and ENDREGNO now unsigned; new var R. (mark_used_regs_combine): Likewise; rework arithmetic. (record_value_for_reg): REGNO, ENDREGNO, and I now unsigned. (record_dead_and_set_regs, reg_dead_at_p, distribute_notes): Likewise. (record_promoted_value): REGNO now unsigned. (get_last_value_validate): REGNO, ENDREGNO, and J now unsigned. (get_last_value): REGNO now unsigned. (use_crosses_set_p): REGNO and ENDREGNO now unsigned. (reg_dead_regno, reg_dead_endregno): Now unsigned. (remove_death): Arg REGNO now unsigned. (move_deaths): REGNO, DEADREGNO, DEADEND, OUREND, and I now unsigned. (reg_bitfield_target_p): REGNO, REGNO, ENDREGNO, and ENDTREGNO now unsigned. * convert.c (convert_to_integer): INPREC and OUTPREC now unsigned. * cse.c (struct qty_table_elem): FIRST_REG and LAST_REG now unsigned. (struct cse_reg_info): REGNO now unsigned. (cached_regno): Now unsigned. (REGNO_QTY_VALID_P): Add cast. (make_new_qty, make_regs_eqv, delete_reg_eqiv): Regno args unsigned. (remove_invalid_regs): Likewise. (remove_invalid_subreg_refs): Likewise; arg WORD also unsigned as are variables END and I. (get_cse_reg_info, insert): Likewise. (mention_regs, invalidate_for_call): REGNO, ENDREGNO, and I unsigned. (canon_hash): Likewise. (insert_regs, lookup_for_remove): REGNO now unsigned. (invalidate): REGNO, ENDREGNO, TREGNO, and TENDREGNO now unsigned. New variable RN. * dbxout.c (dbxout_parms, dbxout_reg_parms): Don't check for REGNO < 0. * dwarf2out.c (dwarf2ou_frame_debug_expr): Remove cast. * emit-rtl.c (subreg_realpart_p): Add cast. (operand_subword): Arg I is now unsigned as is var PARTWORDS. (operand_subword_force): Arg I is now unsigned. * except.c (eh_regs): Variable I is now unsigned. * explow.c (hard_function_value): BYTES is unsigned HOST_WIDE_INT. * expmed.c (store_fixed_bit_field): Position is HOST_WIDE_INT; length is unsigned HOST_WIDE_INT; likewise for internal variables. (store_split_bit_field, extract_fixed_bit_field): Likewise. (extract_split_bit_field, store_bit_field, extract_bit_field): Likewise. * expr.c (store_constructor_fields, store_constructor, store_field): Positions are HOST_WIDE_INT and lengths are unsigned HOST_WIDE_INT. (expand_assignment, expand_expr, expand_expr_unaligned): Likewise. (do_jump): Likewise. (move_by_pieces, move_by_pieces_ninsns, clear_by_pieces): MAX_SIZE is now unsigned. (emit_group_load): BYTEPOS is HOST_WIDE_INT; BYTELEN is unsigned. (emit_group_store): Likewise. (emit_move_insn): I now unsigned. (store_constructor): Use host_integerp, tree_low_cst, and bitsize_unit_node. (get_inner_reference): Return bitpos and bitsize as HOST_WIDE_INT. Rework all calculations to use trees and new fields. * expr.h (promoted_input_arg): Regno now unsigned. (store_bit_field, extract_bit_field): Adjust types of pos and size. (mark_seen_cases): Arg is HOST_WIDE_INT. * flow.c (verify_wide_reg_1): REGNO now unsigned. * fold-const.c (decode_field_reference): Size and pos HOST_WIDE_INT; precisions and alignments are unsigned. (optimize_bit_field_compare, fold_truthop): Likewise. (int_const_binop): Adjust threshold for size_int_type_wide call. (fold_convert): Likewise. (size_int_type_wide): Make table larger and fix thinko that only had half of table used. (all_ones_mask_p, fold): Precisions are unsigned. * function.c (put_reg_info_stack): REGNO is unsigned. (instantiate_decl): Size is HOST_WIDE_INT. (instantiate_virtual_regs): I is unsigned. (assign_parms): REGNO, REGNOI, and REGNOR are unsigned. (promoted_input_arg): REGNO is unsigned. * function.h (struct function): x_max_parm_reg is now unsigned. * gcse.c (max_gcse_regno): Now unsigned. (struct null_pointer_info): min_reg and max_reg now unsigned. (lookup_set, next_set): REGNO arg now unsigned. (compute_hash_table): REGNO and I now unsigned. (handle_avail_expr): regnum_for_replacing now unsigned. (cprop_insn): REGNO now unsigned. (delete_null_pointer_checks_1): BLOCK_REG now pointer to unsigned. * ggc-common.c (ggc_mark_tree_children, case FIELD_DECL): New case. * global.c (set_preference): SRC_REGNO, DEST_REGNO, and I now unsigned. * hard-reg-set.h (reg_class_size): Now unsigned. * integrate.c (mark_stores): LAST_REG and I now unsigned; new UREGNO. * jump.c (mark_modified_reg): I now unsigned; add cast. (rtx_equal_for_thread_p): Add cast. * loop.c (max_reg_before_loop): Now unsigned. (struct_movable): REGNO now unsigned. (try_copy_prop): REGNO arg unsigned. (regs_match_p): XN and YN now unsigned. (consec_sets_invariant_p, maybe_eliminate_biv): REGNO now unsigned. (strength_reduce): Likewise; NREGS also unsigned. (first_increment_giv, last_increment_giv unsigned): Now unsigned. * loop.h (struct iv_class): REGNO now unsigned. (max_reg_before_loop, first_increment_giv, last_increment_giv): Now unsigned. * machmode.h (mode_size, mode_unit_size): Now unsigned. (mode_for_size, smallest_mode_for_size): Pass size as unsigned. * optabs.c (expand_binop): I and NWORDS now unsigned. (expand_unop): I now unsigned. * print-tree.c (print_node): Don't print DECL_FIELD_BITPOS, but do print DECL_FIELD_OFFSET and DECL_FIELD_BIT_OFFSET. * real.c (significand_size): Now returns unsigned. * real.h (significand_size): Likewise. * regclass.c (reg_class_size): Now unsigned. (choose_hard_reg_mode): Both operands now unsigned. (record_reg_classes): REGNO and NR now unsigned. (reg_scan): NREGS now unsigned. (reg_scan_update): old_max_regno now unsigned. (reg_scan_mark_refs): Arg MIN_REGNO and var REGNO now unsigned. * reload.c (find_valid_class): BEST_SIZE now unsigned. (find_dummy_reload): REGNO, NWORDS, and I now unsigned. (hard_reg_set_here_p): Args BEG_REGNO and END_REGNO now unsigned. Likewise for variable R. (refers_to_regno_for_reload_p): Args REGNO and END_REGNO now unsigned, as are variables INNER_REGNO and INNER_ENDREGNO; add new variable R. (find_equiv_reg): Add casts. (regno_clobbered_p): Arg REGNO now unsigned. * reload.h (struct reload): NREGS now unsigned. (refers_to_regno_for_reload_p): Regno args are unsigned. (regno_clobbered_p): Likewise. * reload1.c (reg_max_ref_width, spill_stack_slot_width): Now unsigned. (compute_use_by_pseudos): REGNO now unsigned. (find_reg): I and J now unsigned, new variable K, and change loop variables accordingly; THIS_NREGS now unsigned. (alter_reg): INHERENT_SIZE and TOTAL_SIZE now unsigned. (spill_hard_reg): REGNO arg now unsigned; add casts. (forget_old_reloads_1): REGNO, NR, and I now unsigned. (mark_reload_reg_in_use): Arg REGNO and vars NREGS and I now unsigned. (clear_reload_reg_in_use): Arg REGNO and vars NREGS, START_REGNO, END_REGNO, CONFLICT_START, and CONFLICT_END now unsigned. (reload_reg_free_p, reload_reg_reaches_end_p): Arg REGNO now unsigned. (choose_reload_regs): MAX_GROUP_SIZE now unsigned. (emit_reload_insns): REGNO now unsigned. (reload_cse_move2add): Add cast. (move2add_note_store): REGNO and I now unsigned; new variable ENDREGNO and rework loop. * resource.c (mark_referenced_resources, mark_set_resources): New variable R; REGNO and LAST_REGNO now unsigned. (mark_target_live_regs): J and REGNO now unsigned. * rtl.c (mode_size, mode_unit_size): Now unsigned. * rtl.h (union rtunion_def): New field rtuint. (XCUINT): New macro. (ADDRESSOF_REGNO, REGNO, SUBREG_WORD): New XCUINT. (operand_subword, operand_subword_force): Word number is unsigned. (choose_hard_reg_mode): Operands are unsigned. (refers_to-regno_p, dead_or_set_regno_p): Regno arg is unsigned. (find_regno_note, find_regno_fusage, replace_regs): Likewise. (regno_use_in, combine_instructions, remove_death): Likewise. (reg_scan, reg_scan_update): Likewise. (extended_count): Return is unsigned. * rtlanal.c (refers_to_regno_p): Args REGNO and ENDREGNO and vars I, INNER_REGNO, and INNER_ENDREGNO now unsigned; new variable X_REGNO. (reg_overlap_mentioned_p): REGNO and ENDREGNO now unsigned. (reg_set_last_first_regno, reg_set_last_last_regno): Now unsigned. (reg_reg_last_1): FIRS and LAST now unsigned. (dead_or_set_p): REGNO, LAST_REGNO, and I now unsigned. (dead_or_set_regno_p): Arg TEST_REGNO and vars REGNO and ENDREGNO now unsigned. (find_regno_note, regno_use_in): Arg REGNO now unsigned. (find_regno_fusage): Likewise; also var REGNOTE now unsigned. (find_reg_fusage): Variables REGNO, END_REGNO, and I now unsigned. (replace_regs): Arg NREGS now unsigned. * sdbout.c (sdbout_parms, sdbout_reg_parms): Don't check REGNO < 0. * simplify-rtx.c (simplify_unary_operation): WIDTH now unsigned. (simplify_binary_operation): Likewise. (cselib_invalidate_regno): Arg REGNO and variables ENDREGNO, I, and THIS_LAST now unsigned. (cselib_record_set): Add cast. * ssa.c (ssa_max_reg_num): Now unsigned. (rename_block): REGNO now unsigned. * stmt.c (expand_return): Bit positions unsigned HOST_WIDE_INT; sizes now unsigned. (all_cases_count): Just return -1 not -2. COUNT, MINVAL, and LASTVAL now HOST_WIDE_INT. Rework tests to use trees whenever possible. Use host_integerp and tree_low_cst. (mark_seen_cases): COUNT arg now HOST_WIDE_INT; Likewise variable NEXT_NODE_OFFSET; XLO now unsigned. (check_for_full_enumeration_handing): BYTES_NEEDED, I to HOST_WIDE_INT. * stor-layout.c (mode_for_size): SIZE arg now unsigned. (smallest_mode_for_size): Likewise. (layout_decl): Simplify handing of a specified DECL_SIZE_UNIT. KNOWN_ALIGN is now an alignment, so simplify code. Don't turn off DECL_BIT_FIELD if field is BLKmode, but not type. (start_record_layout): Renamed from new_record_layout_info. Update to new fields. (debug_rli, normalize_rli, rli_size_unit_so_far, rli_size_so_far): New functions. (place_union_field): Renamed from layout_union_field. Update to use new fields in rli. (place_field): Renamed from layout_field. Major rewrite to use new fields in rli; pass alignment to layout_decl. (finalize_record_size): Rework to use new fields in rli and handle union. (compute_record_mode): Rework to simplify and to use new DECL fields. (finalize_type_size): Make rounding more consistent. (finish_union_layout): Deleted. (layout_type, case VOID_TYPE): Don't set TYPE_SIZE_UNIT either. (layout_type, case RECORD_TYPE): Call new function names. (initialize_sizetypes): Set TYPE_IS_SIZETYPE. (set_sizetype): Set TYPE_IS_SIZETYPE earlier. (get_best_mode): UNIT is now unsigned; remove casts. * tree.c (bit_position): Compute from new fields. (byte_position, int_byte_position): New functions. (print_type_hash_statistics): Cast to remove warning. (build_range_type): Use host_integerp and tree_low_cst to try to hash. (build_index_type): Likewise; make subtype of sizetype. (build_index_2_type): Pass sizetype to build_range_type. (build_common_tree_nodes): Use size_int and bitsize_int to initialize nodes; add bitsize_{zero,one,unit}_node. * tree.h (DECL_FIELD_CONTEXT): Use FIELD_DECL_CHECK. (DECL_BIT_FIELD_TYPE, DECL_QUALIFIER, DECL_FCONTEXT): Likewise. (DECL_PACKED, DECL_BIT_FIELD): Likewise. (DECL_FIELD_BITPOS): Deleted. (DECL_FIELD_OFFSET, DECL_FIELD_BIT_OFFSET): New fields. (DECL_RESULT, DECL_SAVED_INSNS): Use FUNCTION_DECL_CHECK. (DECL_FRAME_SIZE, DECL_FUNCTION_CODE, DECL_NO_STATIC_CHAIN): Likewise. (DECL_INLINE, DECL_BUILT_IN_NONANSI, DECL_IS_MALLOC): Likewise. (DECL_BUILT_IN_CLASS, DECL_STATIC_CONSTRUCTOR): Likewise. (DECL_STATIC_DESTRUCTOR, DECL_NO_CHECK_MEMORY_USAGE): Likewise. (DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT, DECL_NO_LIMIT_STACK) Likewise. (DECL_ORIGINAL_TYPE, TYPE_DECL_SUPPRESS_DEBUG): Use TYPE_DECL_CHECK. (DECL_ARG_TYPE_AS_WRITEN, DECL_ARG_TYPE): Use PARM_DECL_CHECK. (DECL_INCOMING_RTL, DECL_TRANSPARENT_UNION): Likewise. (DECL_ALIGN): Adjust to new field in union. (DECL_OFFSET_ALIGN): New field. (DECL_ERROR_ISSUED, DECL_TOO_LATE): Use LABEL_DECL_CHECK. (DECL_IN_TEXT_SECTION): Use VAR_DECL_CHECK. (union tree_decl): Add struct for both aligns. (enum tree_index): Add TI_BITSIZE_{ZERO,ONE,UNIT}. (bitsize_zero_node, bitsize_one_node, bitsize_unit_node): Added. (struct record_layout_info): Rework fields to have offset alignment and byte and bit position. (start_record_layout, place_field): Renamed from old names. (rli_size_so_far, rli_size_unit_so_far, normalize_rli): New decls. (byte_position, int_byte_position): Likewise. (get_inner_reference): Change types of position and length. * unroll.c (unroll_loop): New variable R; use for some loops. MAX_LOCAL_REGNUM and MAXREGNUM now unsigned. (calculate_giv_inc): Arg REGNO now unsigned. (copy_loop_body): REGNO and SRC_REGNO now unsigned. * varasm.c (assemble_variable): Clean up handling of size using host_integerp and tree_low_cst. (decode_addr_const): Use byte, not bit, position. (output_constructor): bitpos and offsets are HOST_WIDE_INT; use tree_low_cst and int_bit_position. * objc/objc-act.c (build_ivar_list_initializer): Use byte_position. * ch/actions.c (check_missing_cases): BYTES_NEEDED is HOST_WIDE_INT. * ch/typeck.c (expand_constant_to_buffer): Use int_byte_position. (extract_constant_from_buffer): Likewise. * cp/class.c (build_vbase_pointer_fields): layout_field now place_field. (get_vfield_offset): Use byte_position. (set_rtti_entry): Set OFFSET to ssizetype zero. (get_binfo_offset_as_int): Deleted. (dfs_record_base_offsets): Use tree_low_cst. (dfs_search_base_offsets): Likewise. (layout_nonempty_base_or_field): Reflect changes in RLI format and call byte_position. (layout_empty_base): Convert offset to ssizetype. (build_base_field): use rli_size_unit_so_far. (dfs_propagate_binfo_offsets): Do computation in proper type. (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets. (layout_class_type): Reflect changes in RLI names and fields. (finish_struct_1): Set DECL_FIELD_OFFSET. * cp/dump.c (dequeue_and_dump): Call bit_position. * cp/expr.c (cplus_expand_constant): Use byte_position. * cp/rtti.c (expand_class_desc): Use bitsize_one_node. * cp/typeck.c (build_component_addr): Use byte_position and don't special case for zero offset. * f/com.c (ffecom_tree_canonize_ptr_): Use bitsize_zero_node. (ffecom_tree_canonize_ref_): Likewise. * java/class.c (make_field_value): Use byte_position. * java/expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position. (java_array_data_offset): Likewise. * java/java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to bzero call. From-SVN: r32742
2000-03-25 19:34:13 +01:00
else if (GET_CODE (x) == PARALLEL)
for (i = XVECLEN (x, 0) - 1; i >= 0; i--)
note_stores (XVECEXP (x, 0, i), fun, data);
}
1991-12-01 06:13:56 +01:00
/* Like notes_stores, but call FUN for each expression that is being
referenced in PBODY, a pointer to the PATTERN of an insn. We only call
FUN for each expression, not any interior subexpressions. FUN receives a
pointer to the expression and the DATA passed to this function.
Note that this is not quite the same test as that done in reg_referenced_p
since that considers something as being referenced if it is being
partially set, while we do not. */
void
note_uses (rtx *pbody, void (*fun) (rtx *, void *), void *data)
{
rtx body = *pbody;
int i;
switch (GET_CODE (body))
{
case COND_EXEC:
(*fun) (&COND_EXEC_TEST (body), data);
note_uses (&COND_EXEC_CODE (body), fun, data);
return;
case PARALLEL:
for (i = XVECLEN (body, 0) - 1; i >= 0; i--)
note_uses (&XVECEXP (body, 0, i), fun, data);
return;
rtlanal.c (note_uses): Deal with SEQUENCEs. * rtlanal.c (note_uses): Deal with SEQUENCEs. * config/bfin/bfin.c: Include "timevar.h". (bfin_flag_schedule_insns2, splitting_for_sched, bfin_flag_var_tracking): New variables. (print_operand): Handle '%!'. (override_options): Disable normal sched2 pass, instead set bfin_flag_schedule_insns2 for reorg to handle it. (output_file_start): Likewise for var-tracking. (bfin_optimize_loop): Take some care not to stumble over SEQUENCEs. (gen_one_bundle, bfin_gen_bundles, type_for_anomaly, trapping_loads_p): New functions. (bfin_reorg): Do second scheduling pass here, and call bfin_gen_bundles. Use type_for_anomaly and trapping_loads_p instead of examining insns directly. If bfin_flag_var_tracking, call var-tracking pass when done with everything else. * config/bfin/bfin.h (PRINT_OPERAND_PUNCT_VALID_P): '!' is valid. * config/bfin/bfin.md (UNSPEC_32BIT): New constant. (movsi_insn32): New pattern, with two new splits to create it before the final scheduling pass. (neghi2): Not a dsp32 insn, rather alu0. (movbi, pushsi_insn, popsi_insn, movsi_insn, movv2hi_insn, movhi_insn, movqi_insn, movsf_insn, movsi_insv, extendhisi2, zero_extendhisi2, extendqihi2, extendqisi2, zero_extendqihi2, zero_extendqisi2, mulhisi3, umulhisi3, ssadsi3, sssubsi3, smaxsi3, sminsi3, abssi2, ssnegsi2, signbitssi2, smaxhi3, sminhi3, abshi2, ssneghi2, signbitshi2, movhi_low2high, movhi_high2high, movhi_low2low, movhi_high2low, movhiv2hi_low, movhiv2hi_high, composev2hi, packv2hi, movv2hi_hi, ssaddhi3, sssubhi3, addv2hi3, ssaddv2hi3, subv2hi3, sssubv2hi3, addsubv2hi3, subaddv2hi3, ssaddsubv2hi3, sssubaddv2hi3, sublohiv2hi3, subhilov2hi3, sssublohiv2hi3, sssubhilov2hi3, addlohiv2hi3, addhilov2hi3, ssaddlohiv2hi3, ssaddhilov2hi3, sminv2hi3, smaxv2hi3, flag_mulhi, flag_mulhisi, flag_mulhisi_parts, flag_machi, flag_machi_acconly, flag_macinithi, flag_macinit1hi, mulv2hi3, flag_mulv2hi, flag_mulv2hi_parts, flag_macv2hi_parts, flag_macv2hi_parts_acconly, flag_macinitv2hi_parts, flag_macinit1v2hi_parts, mulhisi_ll, mulhisi_lh, mulhisi_hl, mulhisi_hh, ssnegv2hi2, absv2hi2, ssashiftv2hi3, ssashifthi3, lshiftv2hi3, lshifthi3): Use '%!' to terminate all dsp32/load/store variants instead of ';'. (ror_one, rol_one): Likewise. Make them dsp32 insns. (ashlsi3_insn, ashrsi3, lshrsi3): Add dsp32 variants. (align8, align16, align24): Now named patterns; also using '%!'. (mnop): New insn. From-SVN: r119534
2006-12-05 09:49:56 +01:00
case SEQUENCE:
for (i = XVECLEN (body, 0) - 1; i >= 0; i--)
note_uses (&PATTERN (XVECEXP (body, 0, i)), fun, data);
return;
case USE:
(*fun) (&XEXP (body, 0), data);
return;
case ASM_OPERANDS:
for (i = ASM_OPERANDS_INPUT_LENGTH (body) - 1; i >= 0; i--)
(*fun) (&ASM_OPERANDS_INPUT (body, i), data);
return;
case TRAP_IF:
(*fun) (&TRAP_CONDITION (body), data);
return;
case PREFETCH:
(*fun) (&XEXP (body, 0), data);
return;
case UNSPEC:
case UNSPEC_VOLATILE:
for (i = XVECLEN (body, 0) - 1; i >= 0; i--)
(*fun) (&XVECEXP (body, 0, i), data);
return;
case CLOBBER:
alias.c (get_alias_set, [...]): Use MEM_P. 2004-07-01 Jerry Quinn <jlquinn@optonline.net> * alias.c (get_alias_set, canon_rtx, get_addr, nonoverlapping_memrefs_p, nonlocal_referenced_p_1, memory_modified_1): Use MEM_P. * builtins.c (expand_builtin_prefetch, expand_builtin_profile_func, expand_builtin): Likewise. * calls.c (expand_call, emit_library_call_value_1, store_one_arg): Likewise. * combine.c (can_combine_p, combinable_i3pat, try_combine, find_split_point, combine_simplify_rtx, simplify_set, make_extraction, rtx_equal_for_field_assignment_p, gen_lowpart_for_combine, record_dead_and_set_regs_1, get_last_value_validate, mark_used_regs_combine, move_deaths, unmentioned_reg_p_1): Likewise. * cse.c (check_dependence, canon_hash, equiv_constant, gen_lowpart_if_possible, cse_insn, invalidate_from_clobbers, cse_around_loop, cse_check_loop_start, cse_set_around_loop, count_reg_usage): Likewise. * cselib.c (rtx_equal_for_cselib_p, add_mem_for_addr, cselib_lookup, cselib_invalidate_mem, cselib_invalidate_rtx, cselib_record_set, cselib_record_sets): Likewise. * dbxout.c (PARM_PASSED_IN_MEMORY, dbxout_symbol, dbxout_symbol_location, dbxout_parms, dbxout_reg_parms): Likewise. * ddg.c (mark_mem_use, mark_mem_store, rtx_mem_access_p): Likewise. * df.c (df_uses_record): Likewise. * dojump (do_jump): Likewise. * dwarf2out.c (stack_adjust_offset, mem_loc_descriptor, loc_descriptor_from_tree, rtl_for_decl_location, add_bound_info, decl_start_label): Likewise. * emit-rtl.c (gen_complex_constant_part, gen_highpart, operand_subword, change_address_1, make_safe_from): Likewise. * explow.c (break_out_memory_refs, copy_all_regs, validize_mem, stabilize, force_not_mem): Likewise. * expmed.c (store_bit_field, store_split_bit_field, extract_bit_field, expand_mult_const, expand_divmod, emit_store_flag): Likewise. * expr.c (convert_move, convert_modes, emit_block_move, emit_group_load, emit_group_store, clear_storage, emit_move_insn, emit_move_insn_1, expand_assignment, store_expr, store_constructor_field, store_constructor, store_field, force_operand, safe_from_p, expand_expr_real_1, expand_increment): Likewise. * final.c (cleanup_subreg_operands, alter_subreg, get_mem_expr_from_op): Likewise. * flow.c (notice_stack_pointer_modification_1, init_propagate_block_info, insn_dead_p, mark_set_1, mark_used_regs): Likewise. * function.c (mark_temp_addr_taken, preserve_temp_slots, preserve_rtl_expr_result, put_var_into_stack, fixup_var_refs_1, optimize_bit_field, flush_addressof, purge_addressof_1, instantiate_decl, instantiate_virtual_regs_1, assign_parms, setjmp_protect, setjmp_protect_args, fix_lexical_addr, keep_stack_depressed): Likewise. * ifcvt.c (noce_try_cmove_arith, noce_try_abs, noce_operand_ok, noce_process_if_block, find_memory): Likewise. * integrate.c (subst_constants, allocate_initial_values): Likewise. * local-alloc.c (validate_equiv_mem_from_store, memref_referenced_p, update_equiv_regs): Likewise. * loop.c (scan_loop, prescan_loop, note_addr_stored, check_store, maybe_eliminate_biv_1, find_mem_in_note_1): Likewise. * optabs.c (expand_abs, emit_unop_insn): Likewise. * passes.c (rest_of_handle_final): Likewise. * postreload.c (reload_cse_simplify_set, reload_cse_simplify_operands, move2add_note_store): Likewise. * ra-build.c (detect_remat_webs): Likewise. * ra-debug.c (dump_static_insn_cost): Likewise. * ra-rewrite.c (slots_overlap_p, insert_stores): Likewise. * recog.c (validate_change, apply_change_group, cancel_changes, validate_replace_rtx_1, general_operand, register_operand, nonmemory_operand, push_operand, pop_operand, memory_operand, indirect_operand, asm_operand_ok, offsettable_memref_p, offsettable_nonstrict_memref_p, constrain_operands, store_data_bypass_p): Likewise. * reg-stack.c (subst_stack_regs_pat): Likewise. * regclass.c (record_operand_costs, scan_one_insn, record_reg_classes, copy_cost, reg_scan_mark_refs): Likewise. * regmove.c (optimize_reg_copy_3, stack_memref_p, combine_stack_adjustments_for_block): Likewise. * regrename.c (copyprop_hardreg_forward_1): Likewise. * reload.c (can_reload_into, push_reload, decompose, immune_p, find_reloads, find_reloads_address, find_reloads_address_1, reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p, find_equiv_reg): Likewise. * reload1.c (reload, eliminate_regs, eliminate_regs_in_insn, reload_as_needed, choose_reload_regs, emit_input_reload_insns, do_input_reload, emit_reload_insns, gen_reload, delete_output_reload, delete_address_reloads): Likewise. * resource.c (mark_referenced_resources): Likewise. * rtlanal.c (get_jump_table_offset, count_occurrences, reg_referenced_p, reg_set_p, set_of_1, set_noop_p, reg_overlap_mentioned_p, note_uses, replace_regs, nonzero_bits1, num_sign_bit_copies1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sched-deps.c (sched_analyze_1, sched_analyze_2): Likewise. * sdbout.c (PARM_PASSED_IN_MEMORY, sdbout_symbol, sdbout_toplevel_data, sdbout_parms, sdbout_reg_parms, sdbout_global_decl): Likewise. * simplify-rtx.c (simplify_subreg): Likewise. * stmt.c (expand_asm_operands, expand_expr_stmt_value, expand_decl, expand_anon_union_decl, expand_end_case_type): Likewise. * unroll.c (calculate_giv_inc): Likewise. * var-tracking.c (stack_adjust_offset_pre_post, bb_stack_adjust_offset, track_expr_p, count_uses, add_uses, add_stores, compute_bb_dataflow, vt_get_decl_and_offset, vt_add_function_parameters): Likewise. * varasm.c (make_var_volatile, notice_global_symbol, assemble_external, decode_addr_const, mark_weak, default_encode_section_info): Likewise. From-SVN: r83980
2004-07-01 14:52:53 +02:00
if (MEM_P (XEXP (body, 0)))
(*fun) (&XEXP (XEXP (body, 0), 0), data);
return;
case SET:
{
rtx dest = SET_DEST (body);
/* For sets we replace everything in source plus registers in memory
expression in store and operands of a ZERO_EXTRACT. */
(*fun) (&SET_SRC (body), data);
if (GET_CODE (dest) == ZERO_EXTRACT)
{
(*fun) (&XEXP (dest, 1), data);
(*fun) (&XEXP (dest, 2), data);
}
while (GET_CODE (dest) == SUBREG || GET_CODE (dest) == STRICT_LOW_PART)
dest = XEXP (dest, 0);
alias.c (get_alias_set, [...]): Use MEM_P. 2004-07-01 Jerry Quinn <jlquinn@optonline.net> * alias.c (get_alias_set, canon_rtx, get_addr, nonoverlapping_memrefs_p, nonlocal_referenced_p_1, memory_modified_1): Use MEM_P. * builtins.c (expand_builtin_prefetch, expand_builtin_profile_func, expand_builtin): Likewise. * calls.c (expand_call, emit_library_call_value_1, store_one_arg): Likewise. * combine.c (can_combine_p, combinable_i3pat, try_combine, find_split_point, combine_simplify_rtx, simplify_set, make_extraction, rtx_equal_for_field_assignment_p, gen_lowpart_for_combine, record_dead_and_set_regs_1, get_last_value_validate, mark_used_regs_combine, move_deaths, unmentioned_reg_p_1): Likewise. * cse.c (check_dependence, canon_hash, equiv_constant, gen_lowpart_if_possible, cse_insn, invalidate_from_clobbers, cse_around_loop, cse_check_loop_start, cse_set_around_loop, count_reg_usage): Likewise. * cselib.c (rtx_equal_for_cselib_p, add_mem_for_addr, cselib_lookup, cselib_invalidate_mem, cselib_invalidate_rtx, cselib_record_set, cselib_record_sets): Likewise. * dbxout.c (PARM_PASSED_IN_MEMORY, dbxout_symbol, dbxout_symbol_location, dbxout_parms, dbxout_reg_parms): Likewise. * ddg.c (mark_mem_use, mark_mem_store, rtx_mem_access_p): Likewise. * df.c (df_uses_record): Likewise. * dojump (do_jump): Likewise. * dwarf2out.c (stack_adjust_offset, mem_loc_descriptor, loc_descriptor_from_tree, rtl_for_decl_location, add_bound_info, decl_start_label): Likewise. * emit-rtl.c (gen_complex_constant_part, gen_highpart, operand_subword, change_address_1, make_safe_from): Likewise. * explow.c (break_out_memory_refs, copy_all_regs, validize_mem, stabilize, force_not_mem): Likewise. * expmed.c (store_bit_field, store_split_bit_field, extract_bit_field, expand_mult_const, expand_divmod, emit_store_flag): Likewise. * expr.c (convert_move, convert_modes, emit_block_move, emit_group_load, emit_group_store, clear_storage, emit_move_insn, emit_move_insn_1, expand_assignment, store_expr, store_constructor_field, store_constructor, store_field, force_operand, safe_from_p, expand_expr_real_1, expand_increment): Likewise. * final.c (cleanup_subreg_operands, alter_subreg, get_mem_expr_from_op): Likewise. * flow.c (notice_stack_pointer_modification_1, init_propagate_block_info, insn_dead_p, mark_set_1, mark_used_regs): Likewise. * function.c (mark_temp_addr_taken, preserve_temp_slots, preserve_rtl_expr_result, put_var_into_stack, fixup_var_refs_1, optimize_bit_field, flush_addressof, purge_addressof_1, instantiate_decl, instantiate_virtual_regs_1, assign_parms, setjmp_protect, setjmp_protect_args, fix_lexical_addr, keep_stack_depressed): Likewise. * ifcvt.c (noce_try_cmove_arith, noce_try_abs, noce_operand_ok, noce_process_if_block, find_memory): Likewise. * integrate.c (subst_constants, allocate_initial_values): Likewise. * local-alloc.c (validate_equiv_mem_from_store, memref_referenced_p, update_equiv_regs): Likewise. * loop.c (scan_loop, prescan_loop, note_addr_stored, check_store, maybe_eliminate_biv_1, find_mem_in_note_1): Likewise. * optabs.c (expand_abs, emit_unop_insn): Likewise. * passes.c (rest_of_handle_final): Likewise. * postreload.c (reload_cse_simplify_set, reload_cse_simplify_operands, move2add_note_store): Likewise. * ra-build.c (detect_remat_webs): Likewise. * ra-debug.c (dump_static_insn_cost): Likewise. * ra-rewrite.c (slots_overlap_p, insert_stores): Likewise. * recog.c (validate_change, apply_change_group, cancel_changes, validate_replace_rtx_1, general_operand, register_operand, nonmemory_operand, push_operand, pop_operand, memory_operand, indirect_operand, asm_operand_ok, offsettable_memref_p, offsettable_nonstrict_memref_p, constrain_operands, store_data_bypass_p): Likewise. * reg-stack.c (subst_stack_regs_pat): Likewise. * regclass.c (record_operand_costs, scan_one_insn, record_reg_classes, copy_cost, reg_scan_mark_refs): Likewise. * regmove.c (optimize_reg_copy_3, stack_memref_p, combine_stack_adjustments_for_block): Likewise. * regrename.c (copyprop_hardreg_forward_1): Likewise. * reload.c (can_reload_into, push_reload, decompose, immune_p, find_reloads, find_reloads_address, find_reloads_address_1, reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p, find_equiv_reg): Likewise. * reload1.c (reload, eliminate_regs, eliminate_regs_in_insn, reload_as_needed, choose_reload_regs, emit_input_reload_insns, do_input_reload, emit_reload_insns, gen_reload, delete_output_reload, delete_address_reloads): Likewise. * resource.c (mark_referenced_resources): Likewise. * rtlanal.c (get_jump_table_offset, count_occurrences, reg_referenced_p, reg_set_p, set_of_1, set_noop_p, reg_overlap_mentioned_p, note_uses, replace_regs, nonzero_bits1, num_sign_bit_copies1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sched-deps.c (sched_analyze_1, sched_analyze_2): Likewise. * sdbout.c (PARM_PASSED_IN_MEMORY, sdbout_symbol, sdbout_toplevel_data, sdbout_parms, sdbout_reg_parms, sdbout_global_decl): Likewise. * simplify-rtx.c (simplify_subreg): Likewise. * stmt.c (expand_asm_operands, expand_expr_stmt_value, expand_decl, expand_anon_union_decl, expand_end_case_type): Likewise. * unroll.c (calculate_giv_inc): Likewise. * var-tracking.c (stack_adjust_offset_pre_post, bb_stack_adjust_offset, track_expr_p, count_uses, add_uses, add_stores, compute_bb_dataflow, vt_get_decl_and_offset, vt_add_function_parameters): Likewise. * varasm.c (make_var_volatile, notice_global_symbol, assemble_external, decode_addr_const, mark_weak, default_encode_section_info): Likewise. From-SVN: r83980
2004-07-01 14:52:53 +02:00
if (MEM_P (dest))
(*fun) (&XEXP (dest, 0), data);
}
return;
default:
/* All the other possibilities never store. */
(*fun) (pbody, data);
return;
}
}
1991-12-01 06:13:56 +01:00
/* Return nonzero if X's old contents don't survive after INSN.
This will be true if X is (cc0) or if X is a register and
X dies in INSN or because INSN entirely sets X.
"Entirely set" means set directly and not through a SUBREG, or
ZERO_EXTRACT, so no trace of the old contents remains.
1991-12-01 06:13:56 +01:00
Likewise, REG_INC does not count.
REG may be a hard or pseudo reg. Renumbering is not taken into account,
but for this use that makes no difference, since regs don't overlap
during their lifetimes. Therefore, this function may be used
at any time after deaths have been computed.
1991-12-01 06:13:56 +01:00
If REG is a hard reg that occupies multiple machine registers, this
function will only return 1 if each of those registers will be replaced
by INSN. */
int
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
dead_or_set_p (const_rtx insn, const_rtx x)
1991-12-01 06:13:56 +01:00
{
regs.h (end_hard_regno): New function. gcc/ * regs.h (end_hard_regno): New function. (END_HARD_REGNO, END_REGNO): New macros. (add_to_hard_reg_set): New function. (remove_from_hard_reg_set): Likewise. (in_hard_reg_set_p): Likewise. (overlaps_hard_reg_set_p): Likewise. * bt-load.c (find_btr_reference): Use overlaps_hard_reg_set_p. (note_btr_set): Use END_HARD_REGNO. * caller-save.c (setup_save_areas): Use end_hard_regno. (mark_set_regs): Use END_HARD_REGNO. (add_stored_regs): Use end_hard_regno. (mark_referenced_regs): Use add_to_hard_reg_set. * combine.c (update_table_tick): Use END_REGNO. (record_value_for_reg): Likewise. (record_dead_and_set_regs): Likewise. (get_last_value_validate): Likewise. (use_crosses_set_p): Likewise. (reg_dead_at_p_1): Likewise. (reg_dead_at_p): Likewise. (mark_used_regs_combine): Use add_to_hard_reg_set. (move_deaths): Use END_HARD_REGNO. (reg_bitfield_target_p): Use end_hard_regno. (distribute_notes): Use END_HARD_REGNO. * cse.c (mention_regs): Use END_REGNO. (insert): Use add_to_hard_reg_set. (invalidate): Use END_HARD_REGNO. (invalidate_for_call): Likewise. (exp_equiv_p): Use END_REGNO. (cse_insn): Likewise. * cselib.c (cselib_invalidate_regno): Use end_hard_regno. * df-problems.c (df_urec_mark_reg_change): Use END_HARD_REGNO. * df-scan.c (df_ref_record): Use END_HARD_REGNO. * function.c (keep_stack_depressed): Use end_hard_regno. * global.c (global_alloc): Use end_hard_regno. (global_conflicts): Use add_to_hard_reg_set instead of mark_reg_live_nc. (find_reg): Likewise. (mark_reg_store): Likewise. (mark_reg_conflicts): Likewise. (mark_reg_death): Use remove_from_hard_reg_set. (mark_reg_live_nc): Delete. (set_preference): Use end_hard_regno. * local-alloc.c (mark_life): Use add_to_hard_reg_set and remove_from_hard_reg_set. (post_mark_life): Use add_to_hard_reg_set. * mode-switching.c (reg_dies): Use remove_from_hard_reg_set. (reg_becomes_live): Use add_to_hard_reg_set. * recog.c (reg_fits_class_p): Use in_hard_reg_set_p. (peep2_find_free_register): Use add_to_hard_reg_set. * reg-stack.c (convert_regs_exit): Use END_HARD_REGNO. * regclass.c (record_reg_classes): Use in_hard_reg_set_p. * regrename.c (note_sets): Use add_to_hard_reg_set. (clear_dead_regs): Use remove_from_hard_reg_set. (regrename_optimize): Use add_to_hard_reg_set. (find_oldest_value_reg): Use in_hard_reg_set_p. * reload.c (push_reload): Use in_hard_reg_set_p and end_hard_regno. (hard_reg_set_here_p): Use end_hard_regno. (decompose): Likewise. (reg_overlap_mentioned_for_reload_p): Use END_HARD_REGNO. (find_equiv_reg): Use in_hard_reg_set_p and end_hard_regno. * reload1.c (compute_use_by_pseudos): Use add_to_hard_reg_set. (mark_home_live): Use end_hard_regno. (spill_hard_reg): Likewise. (clear_reload_reg_in_use): Likewise. * reorg.c (delete_prior_computation): Use END_REGNO. * resource.c (update_live_status): Use END_HARD_REGNO. (mark_referenced_resources): Use add_to_hard_reg_set. (mark_set_resources): Likewise. (mark_target_live_regs): Likewise. Use remove_from_hard_reg_set. * rtlanal.c (refers_to_regno_p): Use END_REGNO. (reg_overlap_mentioned_p): Likewise. (dead_or_set_p): Likewise. Use an exclusive upper loop bound. (covers_regno_no_parallel_p): Use END_REGNO. (find_regno_note): Likewise. (find_reg_fusage): Use END_HARD_REGNO. * stmt.c (decl_overlaps_hard_reg_set_p): Use overlaps_hard_reg_set_p. * var-tracking.c (emit_note_insn_var_location): Use end_hard_regno. From-SVN: r124961
2007-05-22 22:52:39 +02:00
unsigned int regno, end_regno;
* Rework fields used to describe positions of bitfields and modify sizes to be unsigned and use HOST_WIDE_INT. * alias.c (reg_known_value_size): Now unsigned. * c-typeck.c (build_unary_op, case ADDR_EXPR): Use byte_position. (really_start_incremental_init): Use bitsize_zero_node. (push_init_level, pop_init_level, output_init_element): Likewise. Use bitsize_unit_node and bitsize_one_node. (output_pending_init_elements, process_init_element): Likewise. * combine.c (combine_max_regno, reg_sign_bit_copies): Now unsigned. (make_extraction): Position and length HOST_WIDE_INT and unsigned HOST_WIDE_INT, respectively. (get_pos_from_mask): Passed in value is unsigned HOST_WIDE_INT. (num_sign_bit_copies): Returns unsigned. BITWIDTH now unsigned; rework arithmetic. Remove recursive call from arg to MAX. (combine_instructions, init_reg_last_arrays): NREGS now unsigned. (setup_incoming_promotions, can_combine_p, try_combine, simplify_set): REGNO now unsigned. (set_nonzero_bit_and_sign_copies): NUM now unsigned. (find_split_point, expand_compound_operation, make_extraction): LEN now unsigned HOST_WIDE_INT, POS now HOST_WIDE_INT. (make_field_assignment): Likewise. (combine_simplify_rtx): Add cast. (expand_compound_operation): MODEWIDTH now unsigned; rework arithmetic. (force_to_mode): WIDTH now unsigned; add cast. (if_then_else_cond): SIZE now unsigned. (nonzero_bits): MODE_WIDTH, RESULT_WIDTH, and WIDTH now unsigned. (extended_count): Now returns unsigned. (simplify_shift_const): COUNT unsigned; arg is now INPUT_COUNT. Add SIGNED_COUNT variable; MODE_WORDS and FIRST_COUNT now unsigned. (simplify_comparison): MODE_WIDTH now unsigned. (update_table_tick): REGNO and ENDREGNO now unsigned; new var R. (mark_used_regs_combine): Likewise; rework arithmetic. (record_value_for_reg): REGNO, ENDREGNO, and I now unsigned. (record_dead_and_set_regs, reg_dead_at_p, distribute_notes): Likewise. (record_promoted_value): REGNO now unsigned. (get_last_value_validate): REGNO, ENDREGNO, and J now unsigned. (get_last_value): REGNO now unsigned. (use_crosses_set_p): REGNO and ENDREGNO now unsigned. (reg_dead_regno, reg_dead_endregno): Now unsigned. (remove_death): Arg REGNO now unsigned. (move_deaths): REGNO, DEADREGNO, DEADEND, OUREND, and I now unsigned. (reg_bitfield_target_p): REGNO, REGNO, ENDREGNO, and ENDTREGNO now unsigned. * convert.c (convert_to_integer): INPREC and OUTPREC now unsigned. * cse.c (struct qty_table_elem): FIRST_REG and LAST_REG now unsigned. (struct cse_reg_info): REGNO now unsigned. (cached_regno): Now unsigned. (REGNO_QTY_VALID_P): Add cast. (make_new_qty, make_regs_eqv, delete_reg_eqiv): Regno args unsigned. (remove_invalid_regs): Likewise. (remove_invalid_subreg_refs): Likewise; arg WORD also unsigned as are variables END and I. (get_cse_reg_info, insert): Likewise. (mention_regs, invalidate_for_call): REGNO, ENDREGNO, and I unsigned. (canon_hash): Likewise. (insert_regs, lookup_for_remove): REGNO now unsigned. (invalidate): REGNO, ENDREGNO, TREGNO, and TENDREGNO now unsigned. New variable RN. * dbxout.c (dbxout_parms, dbxout_reg_parms): Don't check for REGNO < 0. * dwarf2out.c (dwarf2ou_frame_debug_expr): Remove cast. * emit-rtl.c (subreg_realpart_p): Add cast. (operand_subword): Arg I is now unsigned as is var PARTWORDS. (operand_subword_force): Arg I is now unsigned. * except.c (eh_regs): Variable I is now unsigned. * explow.c (hard_function_value): BYTES is unsigned HOST_WIDE_INT. * expmed.c (store_fixed_bit_field): Position is HOST_WIDE_INT; length is unsigned HOST_WIDE_INT; likewise for internal variables. (store_split_bit_field, extract_fixed_bit_field): Likewise. (extract_split_bit_field, store_bit_field, extract_bit_field): Likewise. * expr.c (store_constructor_fields, store_constructor, store_field): Positions are HOST_WIDE_INT and lengths are unsigned HOST_WIDE_INT. (expand_assignment, expand_expr, expand_expr_unaligned): Likewise. (do_jump): Likewise. (move_by_pieces, move_by_pieces_ninsns, clear_by_pieces): MAX_SIZE is now unsigned. (emit_group_load): BYTEPOS is HOST_WIDE_INT; BYTELEN is unsigned. (emit_group_store): Likewise. (emit_move_insn): I now unsigned. (store_constructor): Use host_integerp, tree_low_cst, and bitsize_unit_node. (get_inner_reference): Return bitpos and bitsize as HOST_WIDE_INT. Rework all calculations to use trees and new fields. * expr.h (promoted_input_arg): Regno now unsigned. (store_bit_field, extract_bit_field): Adjust types of pos and size. (mark_seen_cases): Arg is HOST_WIDE_INT. * flow.c (verify_wide_reg_1): REGNO now unsigned. * fold-const.c (decode_field_reference): Size and pos HOST_WIDE_INT; precisions and alignments are unsigned. (optimize_bit_field_compare, fold_truthop): Likewise. (int_const_binop): Adjust threshold for size_int_type_wide call. (fold_convert): Likewise. (size_int_type_wide): Make table larger and fix thinko that only had half of table used. (all_ones_mask_p, fold): Precisions are unsigned. * function.c (put_reg_info_stack): REGNO is unsigned. (instantiate_decl): Size is HOST_WIDE_INT. (instantiate_virtual_regs): I is unsigned. (assign_parms): REGNO, REGNOI, and REGNOR are unsigned. (promoted_input_arg): REGNO is unsigned. * function.h (struct function): x_max_parm_reg is now unsigned. * gcse.c (max_gcse_regno): Now unsigned. (struct null_pointer_info): min_reg and max_reg now unsigned. (lookup_set, next_set): REGNO arg now unsigned. (compute_hash_table): REGNO and I now unsigned. (handle_avail_expr): regnum_for_replacing now unsigned. (cprop_insn): REGNO now unsigned. (delete_null_pointer_checks_1): BLOCK_REG now pointer to unsigned. * ggc-common.c (ggc_mark_tree_children, case FIELD_DECL): New case. * global.c (set_preference): SRC_REGNO, DEST_REGNO, and I now unsigned. * hard-reg-set.h (reg_class_size): Now unsigned. * integrate.c (mark_stores): LAST_REG and I now unsigned; new UREGNO. * jump.c (mark_modified_reg): I now unsigned; add cast. (rtx_equal_for_thread_p): Add cast. * loop.c (max_reg_before_loop): Now unsigned. (struct_movable): REGNO now unsigned. (try_copy_prop): REGNO arg unsigned. (regs_match_p): XN and YN now unsigned. (consec_sets_invariant_p, maybe_eliminate_biv): REGNO now unsigned. (strength_reduce): Likewise; NREGS also unsigned. (first_increment_giv, last_increment_giv unsigned): Now unsigned. * loop.h (struct iv_class): REGNO now unsigned. (max_reg_before_loop, first_increment_giv, last_increment_giv): Now unsigned. * machmode.h (mode_size, mode_unit_size): Now unsigned. (mode_for_size, smallest_mode_for_size): Pass size as unsigned. * optabs.c (expand_binop): I and NWORDS now unsigned. (expand_unop): I now unsigned. * print-tree.c (print_node): Don't print DECL_FIELD_BITPOS, but do print DECL_FIELD_OFFSET and DECL_FIELD_BIT_OFFSET. * real.c (significand_size): Now returns unsigned. * real.h (significand_size): Likewise. * regclass.c (reg_class_size): Now unsigned. (choose_hard_reg_mode): Both operands now unsigned. (record_reg_classes): REGNO and NR now unsigned. (reg_scan): NREGS now unsigned. (reg_scan_update): old_max_regno now unsigned. (reg_scan_mark_refs): Arg MIN_REGNO and var REGNO now unsigned. * reload.c (find_valid_class): BEST_SIZE now unsigned. (find_dummy_reload): REGNO, NWORDS, and I now unsigned. (hard_reg_set_here_p): Args BEG_REGNO and END_REGNO now unsigned. Likewise for variable R. (refers_to_regno_for_reload_p): Args REGNO and END_REGNO now unsigned, as are variables INNER_REGNO and INNER_ENDREGNO; add new variable R. (find_equiv_reg): Add casts. (regno_clobbered_p): Arg REGNO now unsigned. * reload.h (struct reload): NREGS now unsigned. (refers_to_regno_for_reload_p): Regno args are unsigned. (regno_clobbered_p): Likewise. * reload1.c (reg_max_ref_width, spill_stack_slot_width): Now unsigned. (compute_use_by_pseudos): REGNO now unsigned. (find_reg): I and J now unsigned, new variable K, and change loop variables accordingly; THIS_NREGS now unsigned. (alter_reg): INHERENT_SIZE and TOTAL_SIZE now unsigned. (spill_hard_reg): REGNO arg now unsigned; add casts. (forget_old_reloads_1): REGNO, NR, and I now unsigned. (mark_reload_reg_in_use): Arg REGNO and vars NREGS and I now unsigned. (clear_reload_reg_in_use): Arg REGNO and vars NREGS, START_REGNO, END_REGNO, CONFLICT_START, and CONFLICT_END now unsigned. (reload_reg_free_p, reload_reg_reaches_end_p): Arg REGNO now unsigned. (choose_reload_regs): MAX_GROUP_SIZE now unsigned. (emit_reload_insns): REGNO now unsigned. (reload_cse_move2add): Add cast. (move2add_note_store): REGNO and I now unsigned; new variable ENDREGNO and rework loop. * resource.c (mark_referenced_resources, mark_set_resources): New variable R; REGNO and LAST_REGNO now unsigned. (mark_target_live_regs): J and REGNO now unsigned. * rtl.c (mode_size, mode_unit_size): Now unsigned. * rtl.h (union rtunion_def): New field rtuint. (XCUINT): New macro. (ADDRESSOF_REGNO, REGNO, SUBREG_WORD): New XCUINT. (operand_subword, operand_subword_force): Word number is unsigned. (choose_hard_reg_mode): Operands are unsigned. (refers_to-regno_p, dead_or_set_regno_p): Regno arg is unsigned. (find_regno_note, find_regno_fusage, replace_regs): Likewise. (regno_use_in, combine_instructions, remove_death): Likewise. (reg_scan, reg_scan_update): Likewise. (extended_count): Return is unsigned. * rtlanal.c (refers_to_regno_p): Args REGNO and ENDREGNO and vars I, INNER_REGNO, and INNER_ENDREGNO now unsigned; new variable X_REGNO. (reg_overlap_mentioned_p): REGNO and ENDREGNO now unsigned. (reg_set_last_first_regno, reg_set_last_last_regno): Now unsigned. (reg_reg_last_1): FIRS and LAST now unsigned. (dead_or_set_p): REGNO, LAST_REGNO, and I now unsigned. (dead_or_set_regno_p): Arg TEST_REGNO and vars REGNO and ENDREGNO now unsigned. (find_regno_note, regno_use_in): Arg REGNO now unsigned. (find_regno_fusage): Likewise; also var REGNOTE now unsigned. (find_reg_fusage): Variables REGNO, END_REGNO, and I now unsigned. (replace_regs): Arg NREGS now unsigned. * sdbout.c (sdbout_parms, sdbout_reg_parms): Don't check REGNO < 0. * simplify-rtx.c (simplify_unary_operation): WIDTH now unsigned. (simplify_binary_operation): Likewise. (cselib_invalidate_regno): Arg REGNO and variables ENDREGNO, I, and THIS_LAST now unsigned. (cselib_record_set): Add cast. * ssa.c (ssa_max_reg_num): Now unsigned. (rename_block): REGNO now unsigned. * stmt.c (expand_return): Bit positions unsigned HOST_WIDE_INT; sizes now unsigned. (all_cases_count): Just return -1 not -2. COUNT, MINVAL, and LASTVAL now HOST_WIDE_INT. Rework tests to use trees whenever possible. Use host_integerp and tree_low_cst. (mark_seen_cases): COUNT arg now HOST_WIDE_INT; Likewise variable NEXT_NODE_OFFSET; XLO now unsigned. (check_for_full_enumeration_handing): BYTES_NEEDED, I to HOST_WIDE_INT. * stor-layout.c (mode_for_size): SIZE arg now unsigned. (smallest_mode_for_size): Likewise. (layout_decl): Simplify handing of a specified DECL_SIZE_UNIT. KNOWN_ALIGN is now an alignment, so simplify code. Don't turn off DECL_BIT_FIELD if field is BLKmode, but not type. (start_record_layout): Renamed from new_record_layout_info. Update to new fields. (debug_rli, normalize_rli, rli_size_unit_so_far, rli_size_so_far): New functions. (place_union_field): Renamed from layout_union_field. Update to use new fields in rli. (place_field): Renamed from layout_field. Major rewrite to use new fields in rli; pass alignment to layout_decl. (finalize_record_size): Rework to use new fields in rli and handle union. (compute_record_mode): Rework to simplify and to use new DECL fields. (finalize_type_size): Make rounding more consistent. (finish_union_layout): Deleted. (layout_type, case VOID_TYPE): Don't set TYPE_SIZE_UNIT either. (layout_type, case RECORD_TYPE): Call new function names. (initialize_sizetypes): Set TYPE_IS_SIZETYPE. (set_sizetype): Set TYPE_IS_SIZETYPE earlier. (get_best_mode): UNIT is now unsigned; remove casts. * tree.c (bit_position): Compute from new fields. (byte_position, int_byte_position): New functions. (print_type_hash_statistics): Cast to remove warning. (build_range_type): Use host_integerp and tree_low_cst to try to hash. (build_index_type): Likewise; make subtype of sizetype. (build_index_2_type): Pass sizetype to build_range_type. (build_common_tree_nodes): Use size_int and bitsize_int to initialize nodes; add bitsize_{zero,one,unit}_node. * tree.h (DECL_FIELD_CONTEXT): Use FIELD_DECL_CHECK. (DECL_BIT_FIELD_TYPE, DECL_QUALIFIER, DECL_FCONTEXT): Likewise. (DECL_PACKED, DECL_BIT_FIELD): Likewise. (DECL_FIELD_BITPOS): Deleted. (DECL_FIELD_OFFSET, DECL_FIELD_BIT_OFFSET): New fields. (DECL_RESULT, DECL_SAVED_INSNS): Use FUNCTION_DECL_CHECK. (DECL_FRAME_SIZE, DECL_FUNCTION_CODE, DECL_NO_STATIC_CHAIN): Likewise. (DECL_INLINE, DECL_BUILT_IN_NONANSI, DECL_IS_MALLOC): Likewise. (DECL_BUILT_IN_CLASS, DECL_STATIC_CONSTRUCTOR): Likewise. (DECL_STATIC_DESTRUCTOR, DECL_NO_CHECK_MEMORY_USAGE): Likewise. (DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT, DECL_NO_LIMIT_STACK) Likewise. (DECL_ORIGINAL_TYPE, TYPE_DECL_SUPPRESS_DEBUG): Use TYPE_DECL_CHECK. (DECL_ARG_TYPE_AS_WRITEN, DECL_ARG_TYPE): Use PARM_DECL_CHECK. (DECL_INCOMING_RTL, DECL_TRANSPARENT_UNION): Likewise. (DECL_ALIGN): Adjust to new field in union. (DECL_OFFSET_ALIGN): New field. (DECL_ERROR_ISSUED, DECL_TOO_LATE): Use LABEL_DECL_CHECK. (DECL_IN_TEXT_SECTION): Use VAR_DECL_CHECK. (union tree_decl): Add struct for both aligns. (enum tree_index): Add TI_BITSIZE_{ZERO,ONE,UNIT}. (bitsize_zero_node, bitsize_one_node, bitsize_unit_node): Added. (struct record_layout_info): Rework fields to have offset alignment and byte and bit position. (start_record_layout, place_field): Renamed from old names. (rli_size_so_far, rli_size_unit_so_far, normalize_rli): New decls. (byte_position, int_byte_position): Likewise. (get_inner_reference): Change types of position and length. * unroll.c (unroll_loop): New variable R; use for some loops. MAX_LOCAL_REGNUM and MAXREGNUM now unsigned. (calculate_giv_inc): Arg REGNO now unsigned. (copy_loop_body): REGNO and SRC_REGNO now unsigned. * varasm.c (assemble_variable): Clean up handling of size using host_integerp and tree_low_cst. (decode_addr_const): Use byte, not bit, position. (output_constructor): bitpos and offsets are HOST_WIDE_INT; use tree_low_cst and int_bit_position. * objc/objc-act.c (build_ivar_list_initializer): Use byte_position. * ch/actions.c (check_missing_cases): BYTES_NEEDED is HOST_WIDE_INT. * ch/typeck.c (expand_constant_to_buffer): Use int_byte_position. (extract_constant_from_buffer): Likewise. * cp/class.c (build_vbase_pointer_fields): layout_field now place_field. (get_vfield_offset): Use byte_position. (set_rtti_entry): Set OFFSET to ssizetype zero. (get_binfo_offset_as_int): Deleted. (dfs_record_base_offsets): Use tree_low_cst. (dfs_search_base_offsets): Likewise. (layout_nonempty_base_or_field): Reflect changes in RLI format and call byte_position. (layout_empty_base): Convert offset to ssizetype. (build_base_field): use rli_size_unit_so_far. (dfs_propagate_binfo_offsets): Do computation in proper type. (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets. (layout_class_type): Reflect changes in RLI names and fields. (finish_struct_1): Set DECL_FIELD_OFFSET. * cp/dump.c (dequeue_and_dump): Call bit_position. * cp/expr.c (cplus_expand_constant): Use byte_position. * cp/rtti.c (expand_class_desc): Use bitsize_one_node. * cp/typeck.c (build_component_addr): Use byte_position and don't special case for zero offset. * f/com.c (ffecom_tree_canonize_ptr_): Use bitsize_zero_node. (ffecom_tree_canonize_ref_): Likewise. * java/class.c (make_field_value): Use byte_position. * java/expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position. (java_array_data_offset): Likewise. * java/java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to bzero call. From-SVN: r32742
2000-03-25 19:34:13 +01:00
unsigned int i;
1991-12-01 06:13:56 +01:00
/* Can't use cc0_rtx below since this file is used by genattrtab.c. */
if (GET_CODE (x) == CC0)
return 1;
ra-build.c (copy_insn_p, [...]): Use gcc_assert and gcc_unreachable instead of abort. * ra-build.c (copy_insn_p, remember_move, defuse_overlap_p_1, live_out_1, prune_hardregs_for_mode, init_one_web_common, reinit_one_web, add_subweb, add_subweb_2, init_web_parts, record_conflict, compare_and_free_webs, init_webs_defs_uses, parts_to_webs_1, parts_to_webs, reset_conflicts, check_conflict_numbers, remember_web_was_spilled, handle_asm_insn, ra_build_free): Use gcc_assert and gcc_unreachable instead of abort. * ra-colorize.c (push_list, put_web, reset_lists, put_web_at_end, put_move, remove_move, combine, select_spill, colorize_one_web, try_recolor_web, insert_coalesced_conflicts, check_colors, break_precolored_alias, restore_conflicts_from_coalesce, sort_and_combine_web_pairs, check_uncoalesced_moves): Likewise. * ra-rewrite.c (spill_coalescing, slots_overlap_p, emit_loads, reloads_to_loads, rewrite_program2, emit_colors): Likewise. * ra.c (first_hard_reg, create_insn_info, find_subweb, init_ra, check_df): Likewise. * real.c (do_add, do_multiply, do_divide, do_compare, do_fix_trunc, real_arithmetic, real_compare, real_exponent, real_ldexp, real_identical, real_to_integer, real_to_integer2, real_to_decimal, real_to_hexadecimal, real_from_integer, ten_to_ptwo, ten_to_mptwo, real_digit, real_nan, real_maxval, round_for_format, real_convert, real_to_target, real_from_target, real_hash, encode_ieee_single, encode_ieee_double, encode_ieee_extended, encode_ieee_quad, encode_vax_f, encode_vax_d, encode_vax_g, encode_i370_single, encode_i370_double, encode_c4x_single, encode_c4x_extended): Likewise. * recog.c (validate_change, validate_replace_rtx_1, asm_operand_ok, extract_insn, peep2_next_insn, peep2_reg_dead_p, peep2_find_free_register, peephole2_optimize, store_data_bypass_p, if_test_bypass_p): Likewise. * reg-stack.c (record_label_references, get_asm_operand_n_inputs, stack_result, remove_regno_note, get_hard_regnum, emit_pop_insn, emit_swap_insn, swap_to_top, move_for_stack_reg, subst_stack_regs_pat, subst_asm_stack_regs, change_stack, compensate_edge, convert_regs_1): Likewise. * regclass.c (init_reg_sets, init_reg_sets_1, memory_move_secondary_cost): Likewise. * regrename.c (note_sets, clear_dead_regs, scan_rtx_reg, scan_rtx): Likewise. * reload.c (push_secondary_reload, find_valid_class, push_reload, operands_match_p, decompose, immune_p, find_reloads, find_reloads_toplev, find_reloads_address_1, subst_reloads, copy_replacements, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p): Likewise. * reload1.c (compute_use_by_pseudos, replace_pseudos_in, reload, count_pseudo, find_reg, eliminate_regs, eliminate_regs_in_insn, verify_initial_elim_offsets, finish_spills, clear_reload_reg_in_use, reload_reg_free_p, reload_reg_reaches_end_p, reloads_conflict, choose_reload_regs, merge_assigned_reloads, emit_input_reload_insns, do_output_reload, fixup_abnormal_edges): Likewise. * reorg.c (stop_search_p, emit_delay_sequence, get_jump_flags, fill_slots_from_thread, relax_delay_slots): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * rtl.c (copy_rtx, rtx_equal_p): Likewise. * rtlanal.c (insn_dependent_p, reg_overlap_mentioned_p, dead_or_set_p, find_reg_fusage, remove_note, replace_rtx, subreg_lsb_1, subreg_regno_offset, subreg_offset_representable_p, find_first_parameter_load, can_hoist_insn_p, hoist_update_store, hoist_insn_after, hoist_insn_to_edge, nonzero_bits1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sbitmap.c (sbitmap_difference): Likewise. * sched-deps.c (add_dependence, sched_analyze_1, sched_analyze_2, sched_analyze, add_forward_dependence): Likewise. * sched-ebb.c (fix_basic_block_boundaries, schedule_ebb): Likewise. * sched-rgn.c (debug_regions, compute_trg_info, schedule_region, schedule_insns): Likewise. * sched-vis.c (print_pattern): Likewise. * sdbout.c (sdbout_symbol, sdbout_toplevel_data): Likewise. * simplify-rtx.c (simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_ternary_operation, simplify_immed_subreg, simplify_subreg, simplify_gen_subreg): Likewise. * sreal.c (copy, sreal_sub, sreal_div): Likewise. * stmt.c (force_label_rtx, expand_goto, expand_asm_operands, resolve_operand_name_1, expand_return, expand_decl, expand_anon_union_decl, emit_case_bit_tests, expand_case): Likewise. * stor-layout.c (put_pending_size, smallest_mode_for_size, int_mode_for_mode, layout_decl, finish_builtin_struct, layout_type, set_sizetype, get_mode_bounds): Likewise. From-SVN: r87244
2004-09-09 19:19:16 +02:00
gcc_assert (REG_P (x));
1991-12-01 06:13:56 +01:00
regno = REGNO (x);
regs.h (end_hard_regno): New function. gcc/ * regs.h (end_hard_regno): New function. (END_HARD_REGNO, END_REGNO): New macros. (add_to_hard_reg_set): New function. (remove_from_hard_reg_set): Likewise. (in_hard_reg_set_p): Likewise. (overlaps_hard_reg_set_p): Likewise. * bt-load.c (find_btr_reference): Use overlaps_hard_reg_set_p. (note_btr_set): Use END_HARD_REGNO. * caller-save.c (setup_save_areas): Use end_hard_regno. (mark_set_regs): Use END_HARD_REGNO. (add_stored_regs): Use end_hard_regno. (mark_referenced_regs): Use add_to_hard_reg_set. * combine.c (update_table_tick): Use END_REGNO. (record_value_for_reg): Likewise. (record_dead_and_set_regs): Likewise. (get_last_value_validate): Likewise. (use_crosses_set_p): Likewise. (reg_dead_at_p_1): Likewise. (reg_dead_at_p): Likewise. (mark_used_regs_combine): Use add_to_hard_reg_set. (move_deaths): Use END_HARD_REGNO. (reg_bitfield_target_p): Use end_hard_regno. (distribute_notes): Use END_HARD_REGNO. * cse.c (mention_regs): Use END_REGNO. (insert): Use add_to_hard_reg_set. (invalidate): Use END_HARD_REGNO. (invalidate_for_call): Likewise. (exp_equiv_p): Use END_REGNO. (cse_insn): Likewise. * cselib.c (cselib_invalidate_regno): Use end_hard_regno. * df-problems.c (df_urec_mark_reg_change): Use END_HARD_REGNO. * df-scan.c (df_ref_record): Use END_HARD_REGNO. * function.c (keep_stack_depressed): Use end_hard_regno. * global.c (global_alloc): Use end_hard_regno. (global_conflicts): Use add_to_hard_reg_set instead of mark_reg_live_nc. (find_reg): Likewise. (mark_reg_store): Likewise. (mark_reg_conflicts): Likewise. (mark_reg_death): Use remove_from_hard_reg_set. (mark_reg_live_nc): Delete. (set_preference): Use end_hard_regno. * local-alloc.c (mark_life): Use add_to_hard_reg_set and remove_from_hard_reg_set. (post_mark_life): Use add_to_hard_reg_set. * mode-switching.c (reg_dies): Use remove_from_hard_reg_set. (reg_becomes_live): Use add_to_hard_reg_set. * recog.c (reg_fits_class_p): Use in_hard_reg_set_p. (peep2_find_free_register): Use add_to_hard_reg_set. * reg-stack.c (convert_regs_exit): Use END_HARD_REGNO. * regclass.c (record_reg_classes): Use in_hard_reg_set_p. * regrename.c (note_sets): Use add_to_hard_reg_set. (clear_dead_regs): Use remove_from_hard_reg_set. (regrename_optimize): Use add_to_hard_reg_set. (find_oldest_value_reg): Use in_hard_reg_set_p. * reload.c (push_reload): Use in_hard_reg_set_p and end_hard_regno. (hard_reg_set_here_p): Use end_hard_regno. (decompose): Likewise. (reg_overlap_mentioned_for_reload_p): Use END_HARD_REGNO. (find_equiv_reg): Use in_hard_reg_set_p and end_hard_regno. * reload1.c (compute_use_by_pseudos): Use add_to_hard_reg_set. (mark_home_live): Use end_hard_regno. (spill_hard_reg): Likewise. (clear_reload_reg_in_use): Likewise. * reorg.c (delete_prior_computation): Use END_REGNO. * resource.c (update_live_status): Use END_HARD_REGNO. (mark_referenced_resources): Use add_to_hard_reg_set. (mark_set_resources): Likewise. (mark_target_live_regs): Likewise. Use remove_from_hard_reg_set. * rtlanal.c (refers_to_regno_p): Use END_REGNO. (reg_overlap_mentioned_p): Likewise. (dead_or_set_p): Likewise. Use an exclusive upper loop bound. (covers_regno_no_parallel_p): Use END_REGNO. (find_regno_note): Likewise. (find_reg_fusage): Use END_HARD_REGNO. * stmt.c (decl_overlaps_hard_reg_set_p): Use overlaps_hard_reg_set_p. * var-tracking.c (emit_note_insn_var_location): Use end_hard_regno. From-SVN: r124961
2007-05-22 22:52:39 +02:00
end_regno = END_REGNO (x);
for (i = regno; i < end_regno; i++)
1991-12-01 06:13:56 +01:00
if (! dead_or_set_regno_p (insn, i))
return 0;
return 1;
}
/* Return TRUE iff DEST is a register or subreg of a register and
doesn't change the number of words of the inner register, and any
part of the register is TEST_REGNO. */
static bool
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
covers_regno_no_parallel_p (const_rtx dest, unsigned int test_regno)
{
unsigned int regno, endregno;
if (GET_CODE (dest) == SUBREG
&& (((GET_MODE_SIZE (GET_MODE (dest))
+ UNITS_PER_WORD - 1) / UNITS_PER_WORD)
== ((GET_MODE_SIZE (GET_MODE (SUBREG_REG (dest)))
+ UNITS_PER_WORD - 1) / UNITS_PER_WORD)))
dest = SUBREG_REG (dest);
if (!REG_P (dest))
return false;
regno = REGNO (dest);
regs.h (end_hard_regno): New function. gcc/ * regs.h (end_hard_regno): New function. (END_HARD_REGNO, END_REGNO): New macros. (add_to_hard_reg_set): New function. (remove_from_hard_reg_set): Likewise. (in_hard_reg_set_p): Likewise. (overlaps_hard_reg_set_p): Likewise. * bt-load.c (find_btr_reference): Use overlaps_hard_reg_set_p. (note_btr_set): Use END_HARD_REGNO. * caller-save.c (setup_save_areas): Use end_hard_regno. (mark_set_regs): Use END_HARD_REGNO. (add_stored_regs): Use end_hard_regno. (mark_referenced_regs): Use add_to_hard_reg_set. * combine.c (update_table_tick): Use END_REGNO. (record_value_for_reg): Likewise. (record_dead_and_set_regs): Likewise. (get_last_value_validate): Likewise. (use_crosses_set_p): Likewise. (reg_dead_at_p_1): Likewise. (reg_dead_at_p): Likewise. (mark_used_regs_combine): Use add_to_hard_reg_set. (move_deaths): Use END_HARD_REGNO. (reg_bitfield_target_p): Use end_hard_regno. (distribute_notes): Use END_HARD_REGNO. * cse.c (mention_regs): Use END_REGNO. (insert): Use add_to_hard_reg_set. (invalidate): Use END_HARD_REGNO. (invalidate_for_call): Likewise. (exp_equiv_p): Use END_REGNO. (cse_insn): Likewise. * cselib.c (cselib_invalidate_regno): Use end_hard_regno. * df-problems.c (df_urec_mark_reg_change): Use END_HARD_REGNO. * df-scan.c (df_ref_record): Use END_HARD_REGNO. * function.c (keep_stack_depressed): Use end_hard_regno. * global.c (global_alloc): Use end_hard_regno. (global_conflicts): Use add_to_hard_reg_set instead of mark_reg_live_nc. (find_reg): Likewise. (mark_reg_store): Likewise. (mark_reg_conflicts): Likewise. (mark_reg_death): Use remove_from_hard_reg_set. (mark_reg_live_nc): Delete. (set_preference): Use end_hard_regno. * local-alloc.c (mark_life): Use add_to_hard_reg_set and remove_from_hard_reg_set. (post_mark_life): Use add_to_hard_reg_set. * mode-switching.c (reg_dies): Use remove_from_hard_reg_set. (reg_becomes_live): Use add_to_hard_reg_set. * recog.c (reg_fits_class_p): Use in_hard_reg_set_p. (peep2_find_free_register): Use add_to_hard_reg_set. * reg-stack.c (convert_regs_exit): Use END_HARD_REGNO. * regclass.c (record_reg_classes): Use in_hard_reg_set_p. * regrename.c (note_sets): Use add_to_hard_reg_set. (clear_dead_regs): Use remove_from_hard_reg_set. (regrename_optimize): Use add_to_hard_reg_set. (find_oldest_value_reg): Use in_hard_reg_set_p. * reload.c (push_reload): Use in_hard_reg_set_p and end_hard_regno. (hard_reg_set_here_p): Use end_hard_regno. (decompose): Likewise. (reg_overlap_mentioned_for_reload_p): Use END_HARD_REGNO. (find_equiv_reg): Use in_hard_reg_set_p and end_hard_regno. * reload1.c (compute_use_by_pseudos): Use add_to_hard_reg_set. (mark_home_live): Use end_hard_regno. (spill_hard_reg): Likewise. (clear_reload_reg_in_use): Likewise. * reorg.c (delete_prior_computation): Use END_REGNO. * resource.c (update_live_status): Use END_HARD_REGNO. (mark_referenced_resources): Use add_to_hard_reg_set. (mark_set_resources): Likewise. (mark_target_live_regs): Likewise. Use remove_from_hard_reg_set. * rtlanal.c (refers_to_regno_p): Use END_REGNO. (reg_overlap_mentioned_p): Likewise. (dead_or_set_p): Likewise. Use an exclusive upper loop bound. (covers_regno_no_parallel_p): Use END_REGNO. (find_regno_note): Likewise. (find_reg_fusage): Use END_HARD_REGNO. * stmt.c (decl_overlaps_hard_reg_set_p): Use overlaps_hard_reg_set_p. * var-tracking.c (emit_note_insn_var_location): Use end_hard_regno. From-SVN: r124961
2007-05-22 22:52:39 +02:00
endregno = END_REGNO (dest);
return (test_regno >= regno && test_regno < endregno);
}
/* Like covers_regno_no_parallel_p, but also handles PARALLELs where
any member matches the covers_regno_no_parallel_p criteria. */
static bool
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
covers_regno_p (const_rtx dest, unsigned int test_regno)
{
if (GET_CODE (dest) == PARALLEL)
{
/* Some targets place small structures in registers for return
values of functions, and those registers are wrapped in
PARALLELs that we may see as the destination of a SET. */
int i;
for (i = XVECLEN (dest, 0) - 1; i >= 0; i--)
{
rtx inner = XEXP (XVECEXP (dest, 0, i), 0);
if (inner != NULL_RTX
&& covers_regno_no_parallel_p (inner, test_regno))
return true;
}
return false;
}
else
return covers_regno_no_parallel_p (dest, test_regno);
}
/* Utility function for dead_or_set_p to check an individual register. */
1991-12-01 06:13:56 +01:00
int
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
dead_or_set_regno_p (const_rtx insn, unsigned int test_regno)
1991-12-01 06:13:56 +01:00
{
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
const_rtx pattern;
1991-12-01 06:13:56 +01:00
/* See if there is a death note for something that includes TEST_REGNO. */
if (find_regno_note (insn, REG_DEAD, test_regno))
return 1;
1991-12-01 06:13:56 +01:00
alias.c (nonlocal_mentioned_p, [...]): Use, LABEL_P, JUMP_P, CALL_P, NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P. 2004-07-08 Jerry Quinn <jlquinn@optonline.net> * alias.c (nonlocal_mentioned_p, nonlocal_referenced_p, nonlocal_set_p, init_alias_analysis): Use, LABEL_P, JUMP_P, CALL_P, NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P. * bb-reorder.c (mark_bb_for_unlikely_executed_section, add_labels_and_missing_jumps, find_jump_block, fix_crossing_unconditional_branches, add_reg_crossing_jump_notes): Likewise. * bt-load.c (btr_referenced_p, compute_defs_uses_and_gen, link_btr_uses, move_btr_def): Likewise. * builtins.c (expand_builtin_longjmp, expand_builtin_nonlocal_goto, expand_builtin_expect_jump): Likewise. * caller-save.c (save_call_clobbered_regs, insert_one_insn): Likewise. * calls.c (expand_call, emit_library_call_value_1): Likewise. * cfganal.c (forwarder_block_p): Likewise. * cfgbuild.c (inside_basic_block_p, count_basic_blocks, make_label_edge, rtl_make_eh_edge, make_edges, find_basic_blocks_1, find_bb_boundaries): Likewise. * cfgcleanup.c (try_simplify_condjump, try_forward_edges, merge_blocks_move_predecessor_nojumps, merge_blocks_move_successor_nojumps, insns_match_p, flow_find_cross_jump, outgoing_edges_match, try_crossjump_to_edge, try_optimize_cfg): Likewise. * cfgexpand.c (expand_block, construct_exit_block): Likewise. * cfglayout.c (skip_insns_after_block, label_for_bb, record_effective_endpoints, insn_locators_initialize, fixup_reorder_chain, update_unlikely_executed_notes): Likewise. * cfgmainloop.c (create_loop_notes): Likewise. * cfgrtl.c (delete_insn, delete_insn_chain, create_basic_block_structure, rtl_delete_block, free_bb_for_insn, update_bb_for_insn, rtl_merge_blocks, rtl_can_merge_blocks, block_label, try_redirect_by_replacing_jump, last_loop_beg_note, redirect_branch_edge, force_nonfallthru_and_redirect, rtl_tidy_fallthru_edge, back_edge_of_syntactic_loop_p, rtl_split_edge, commit_one_edge_insertion, print_rtl_with_bb, update_br_prob_note, rtl_verify_flow_info_1, rtl_verify_flow_info, purge_dead_edges, cfg_layout_redirect_edge_and_branch, cfg_layout_delete_block, cfg_layout_can_merge_blocks_p, cfg_layout_merge_blocks, rtl_block_ends_with_call_p, need_fake_edge_p, rtl_flow_call_edges_add): Likewise. * combine.c (combine_instructions, can_combine_p, try_combine, find_split_point, record_dead_and_set_regs, reg_dead_at_p, distribute_notes, distribute_links, insn_cuid): Likewise. * cse.c (fold_rtx, cse_insn, cse_around_loop, invalidate_skipped_block, cse_set_around_loop, cse_end_of_basic_block, cse_main, cse_basic_block, cse_condition_code_reg): Likewise. * cselib.c (cselib_process_insn): Likewise. * ddg.c (create_ddg): Likewise. * df.c (df_insn_refs_record, df_bb_rd_local_compute, df_insns_modify): Likewise. * dwarf2out.c (dwarf2out_stack_adjust, dwarf2out_frame_debug, gen_label_die, dwarf2out_var_location): Likewise. * emit-rtl.c (get_first_nonnote_insn, get_last_nonnote_insn, next_insn, previous_insn, next_nonnote_insn, prev_nonnote_insn, last_call_insn, active_insn_p, next_label, prev_label, link_cc0_insns, next_cc0_user, try_split, add_insn_after, add_insn_before, remove_insn, add_function_usage_to, reorder_insns, find_line_note, remove_unnecessary_notes, emit_insn_after_1, classify_insn): Likewise. * except.c (convert_from_eh_region_ranges_1, emit_to_new_bb_before, connect_post_landing_pads, sjlj_mark_call_sites, sjlj_emit_function_enter, sjlj_emit_function_exit, reachable_handlers, can_throw_internal, can_throw_external, set_nothrow_function_flags, convert_to_eh_region_ranges): Likewise. * explow.c (optimize_save_area_alloca): Likewise. * expr.c (expand_expr_real): Likewise. * final.c (insn_current_reference_address, compute_alignments, shorten_branches, final, scan_ahead_for_unlikely_executed_note, final_scan_insn, output_asm_label, leaf_function_p): Likewise. * flow.c (first_insn_after_basic_block_note, delete_dead_jumptables, propagate_block_delete_insn, propagate_one_insn, init_propagate_block_info, propagate_block, libcall_dead_p, mark_set_1, attempt_auto_inc, find_auto_inc, try_pre_increment): Likewise. * function.c (instantiate_virtual_regs, reorder_blocks_1, expand_function_start, expand_function_end, contains, thread_prologue_and_epilogue_insns, reposition_prologue_and_epilogue_notes): Likewise. * gcse.c (constprop_register, bypass_conditional_jumps, insert_insn_end_bb, gcse_after_reload): Likewise. * genemit.c (gen_expand, gen_split): Likewise. * genpeep.c (gen_peephole, main): Likewise. * global.c (build_insn_chain): Likewise. * graph.c (node_data, print_rtl_graph_with_bb): Likewise. * haifa-sched.c (unlink_other_notes, unlink_line_notes, get_block_head_tail, no_real_insns_p, rm_line_notes, save_line_notes, restore_line_notes, rm_redundant_line_notes, rm_other_notes, ok_for_early_queue_removal, set_priorities, sched_init): Likewise. * ifcvt.c (count_bb_insns, first_active_insn, last_active_insn, cond_exec_process_insns, end_ifcvt_sequence, noce_process_if_block, merge_if_block, block_jumps_and_fallthru_p, find_if_block, dead_or_predicable): Likewise. * integrate.c (try_constants): Likewise. * jump.c (rebuild_jump_labels, cleanup_barriers, purge_line_number_notes, init_label_info, mark_all_labels, squeeze_notes, get_label_before, get_label_after, reversed_comparison_code_parts, simplejump_p, pc_set, returnjump_p, onlyjump_p, follow_jumps, mark_jump_label, delete_barrier, delete_prior_computation, delete_computation, delete_related_insns, delete_for_peephole, redirect_jump): Likewise. * lcm.c (optimize_mode_switching): Likewise. * local-alloc.c (validate_equiv_mem, update_equiv_regs, block_alloc): Likewise. * loop-doloop.c (doloop_valid_p, doloop_optimize): Likewise. * loop-invariant.c (find_exits, find_invariants_bb): Likewise. * loop-iv.c (simplify_using_assignment): Likewise. * loop.c (compute_luids, loop_optimize, scan_loop, libcall_other_reg, libcall_benefit, skip_consec_insns, move_movables, prescan_loop, find_and_verify_loops, labels_in_range_p, for_each_insn_in_loop, loop_bivs_init_find, strength_reduce, check_insn_for_bivs, check_insn_for_givs, check_final_value, update_giv_derive, basic_induction_var, product_cheap_p, check_dbra_loop, loop_insn_first_p, last_use_this_basic_block, canonicalize_condition, get_condition, loop_regs_scan, load_mems, try_copy_prop, LOOP_BLOCK_NUM, loop_dump_aux): Likewise. * modulo-sched.c (doloop_register_get, find_line_note, sms_schedule, sms_schedule_by_order): Likewise. * optabs.c (emit_no_conflict_block, emit_libcall_block): Likewise. * postreload.c (reload_cse_simplify_operands, reload_combine, reload_cse_move2add): Likewise. * predict.c (can_predict_insn_p, estimate_probability, expected_value_to_br_prob, process_note_predictions): Likewise. * print-rtl.c (print_rtx, print_rtl, print_rtl_single): Likewise. * profile.c (branch_prob): Likewise. * ra-build.c (live_out_1, livethrough_conflicts_bb, detect_webs_set_in_cond_jump): Likewise. * ra-debug.c (ra_print_rtx_object, ra_debug_insns, ra_print_rtl_with_bb): Likewise. * ra-rewrite.c (insert_stores, rewrite_program2): Likewise. * recog.c (next_insn_tests_no_inequality, find_single_use, split_all_insns, peephole2_optimize, if_test_bypass_p): Likewise. * reg-stack.c (next_flags_user, record_label_references, emit_swap_insn, swap_rtx_condition, subst_stack_regs, compensate_edge, convert_regs_1): Likewise. * regclass.c (scan_one_insn): Likewise. * regmove.c (optimize_reg_copy_1, optimize_reg_copy_2, fixup_match_2, regmove_optimize, fixup_match_1, single_set_for_csa, combine_stack_adjustments_for_block): Likewise. * regrename.c (build_def_use, copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads, find_reloads_address_1, subst_reloads, find_equiv_reg): Likewise. * reload1.c (reload, calculate_needs_all_insns, set_label_offsets, reload_as_needed, emit_input_reload_insns, do_output_reload, delete_output_reload, delete_address_reloads_1, fixup_abnormal_edges): Likewise. * reorg.c (find_end_label, emit_delay_sequence, delete_from_delay_slot, delete_scheduled_jump, optimize_skip, get_jump_flags, rare_destination, mostly_true_jump, try_merge_delay_insns, redundant_insn, own_thread_p, fill_simple_delay_slots, fill_slots_from_thread, fill_eager_delay_slots, relax_delay_slots, make_return_insns, dbr_schedule): Likewise. * resource.c (find_basic_block, next_insn_no_annul, find_dead_or_set_registers, mark_target_live_regs): Likewise. * rtl.h (RTX_PREV): Likewise. * rtlanal.c (global_reg_mentioned_p, no_labels_between_p, no_jumps_between_p, reg_used_between_p, reg_referenced_between_p, reg_set_p, find_last_value, dead_or_set_regno_p, find_reg_fusage, find_regno_fusage, pure_call_p, replace_label, rtx_referenced_p_1, tablejump_p, computed_jump_p, insns_safe_to_move_p, find_first_parameter_load, can_hoist_insn_p): Likewise. * sched-deps.c (get_condition, add_dependence, sched_analyze_2, sched_analyze_insn, sched_analyze, add_forward_dependence): Likewise. * sched-ebb.c (fix_basic_block_boundaries, add_deps_for_risky_insns, schedule_ebbs): Likewise. * sched-rgn.c (is_cfg_nonregular, find_conditional_protection, is_conditionally_protected, can_schedule_ready_p, add_branch_dependences, debug_dependencies): Likewise. * stmt.c (emit_nop, expand_start_case, emit_jump_if_reachable): Likewise. * unroll.c (unroll_loop, copy_loop_body, back_branch_in_range_p, reg_dead_after_loop, loop_find_equiv_value, loop_iterations, set_dominates_use, ujump_to_loop_cont): Likewise. * var-tracking.c (prologue_stack_adjust, vt_initialize): Likewise. * varasm.c (output_constant_pool_1): Likewise. From-SVN: r84341
2004-07-09 05:29:35 +02:00
if (CALL_P (insn)
&& find_regno_fusage (insn, CLOBBER, test_regno))
return 1;
pattern = PATTERN (insn);
/* If a COND_EXEC is not executed, the value survives. */
if (GET_CODE (pattern) == COND_EXEC)
return 0;
if (GET_CODE (pattern) == SET)
return covers_regno_p (SET_DEST (pattern), test_regno);
else if (GET_CODE (pattern) == PARALLEL)
1991-12-01 06:13:56 +01:00
{
alias.c: Remove uses of "register" specifier in declarations of arguments and local... 2001-10-10 Stan Shebs <shebs@apple.com> * alias.c: Remove uses of "register" specifier in declarations of arguments and local variables. * c-common.c: Ditto. * c-convert.c: Ditto. * c-decl.c: Ditto. * c-format.c: Ditto. * c-semantics.c: Ditto. * c-typeck.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfgbuild.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * combine.c: Ditto. * convert.c: Ditto. * cppexp.c: Ditto. * cppfiles.c: Ditto. * cse.c: Ditto. * dbxout.c: Ditto. * defaults.h: Ditto. * df.c: Ditto. * dwarf2out.c: Ditto. * dwarfout.c: Ditto. * emit-rtl.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fix-header.c: Ditto. * floatlib.c: Ditto. * flow.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * gcc.c: Ditto. * gcse.c: Ditto. * gen-protos.c: Ditto. * genattrtab.c: Ditto. * gencheck.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * gengenrtl.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * gensupport.c: Ditto. * global.c: Ditto. * gmon.c: Ditto. * graph.c: Ditto. * haifa-sched.c: Ditto. * hard-reg-set.h: Ditto. * hash.c: Ditto. * integrate.c: Ditto. * jump.c: Ditto. * lists.c: Ditto. * local-alloc.c: Ditto. * loop.c: Ditto. * mips-tdump.c: Ditto. * mips-tfile.c: Ditto. * optabs.c: Ditto. * prefix.c: Ditto. * print-rtl.c: Ditto. * read-rtl.c: Ditto. * real.c: Ditto. * recog.c: Ditto. * reg-stack.c: Ditto. * regclass.c: Ditto. * regmove.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtl.c: Ditto. * rtlanal.c: Ditto. * scan.c: Ditto. * sched-deps.c: Ditto. * sched-rgn.c: Ditto. * sdbout.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tradcif.y: Ditto. * tradcpp.c: Ditto. * tree.c: Ditto. * unroll.c: Ditto. * varasm.c: Ditto. * xcoffout.c: Ditto. From-SVN: r46173
2001-10-11 05:16:15 +02:00
int i;
1991-12-01 06:13:56 +01:00
for (i = XVECLEN (pattern, 0) - 1; i >= 0; i--)
1991-12-01 06:13:56 +01:00
{
rtx body = XVECEXP (pattern, 0, i);
if (GET_CODE (body) == COND_EXEC)
body = COND_EXEC_CODE (body);
1991-12-01 06:13:56 +01:00
if ((GET_CODE (body) == SET || GET_CODE (body) == CLOBBER)
&& covers_regno_p (SET_DEST (body), test_regno))
return 1;
1991-12-01 06:13:56 +01:00
}
}
return 0;
}
/* Return the reg-note of kind KIND in insn INSN, if there is one.
If DATUM is nonzero, look for one whose datum is DATUM. */
rtx
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
find_reg_note (const_rtx insn, enum reg_note kind, const_rtx datum)
1991-12-01 06:13:56 +01:00
{
alias.c: Remove uses of "register" specifier in declarations of arguments and local... 2001-10-10 Stan Shebs <shebs@apple.com> * alias.c: Remove uses of "register" specifier in declarations of arguments and local variables. * c-common.c: Ditto. * c-convert.c: Ditto. * c-decl.c: Ditto. * c-format.c: Ditto. * c-semantics.c: Ditto. * c-typeck.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfgbuild.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * combine.c: Ditto. * convert.c: Ditto. * cppexp.c: Ditto. * cppfiles.c: Ditto. * cse.c: Ditto. * dbxout.c: Ditto. * defaults.h: Ditto. * df.c: Ditto. * dwarf2out.c: Ditto. * dwarfout.c: Ditto. * emit-rtl.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fix-header.c: Ditto. * floatlib.c: Ditto. * flow.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * gcc.c: Ditto. * gcse.c: Ditto. * gen-protos.c: Ditto. * genattrtab.c: Ditto. * gencheck.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * gengenrtl.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * gensupport.c: Ditto. * global.c: Ditto. * gmon.c: Ditto. * graph.c: Ditto. * haifa-sched.c: Ditto. * hard-reg-set.h: Ditto. * hash.c: Ditto. * integrate.c: Ditto. * jump.c: Ditto. * lists.c: Ditto. * local-alloc.c: Ditto. * loop.c: Ditto. * mips-tdump.c: Ditto. * mips-tfile.c: Ditto. * optabs.c: Ditto. * prefix.c: Ditto. * print-rtl.c: Ditto. * read-rtl.c: Ditto. * real.c: Ditto. * recog.c: Ditto. * reg-stack.c: Ditto. * regclass.c: Ditto. * regmove.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtl.c: Ditto. * rtlanal.c: Ditto. * scan.c: Ditto. * sched-deps.c: Ditto. * sched-rgn.c: Ditto. * sdbout.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tradcif.y: Ditto. * tradcpp.c: Ditto. * tree.c: Ditto. * unroll.c: Ditto. * varasm.c: Ditto. * xcoffout.c: Ditto. From-SVN: r46173
2001-10-11 05:16:15 +02:00
rtx link;
1991-12-01 06:13:56 +01:00
gcc_checking_assert (insn);
/* Ignore anything that is not an INSN, JUMP_INSN or CALL_INSN. */
alias.c (mark_constant_function): Use INSN_P. * alias.c (mark_constant_function): Use INSN_P. (init_alias_analysis): Likewise. * combine.c (combine_instructions): Use INSN_P. (can_combine_p): Likewise. (try_combine): Likewise. (distribute_notes): Likewise. (distribute_links): Likewise. * cse.c (cse_around_loop): Use INSN_P. (invalidate_skipped_block): Likewise. (cse_set_around_loop): Likewise. (cse_end_of_basic_block): Likewise. (delete_trivially_dead_insns): Likewise. * emit-rtl.c (unshare_all_rtl_again): Use INSN_P. (unshare_all_rtl_1): Likewise. (next_cc0_user): Likewise. (try_split make_insn_raw): Likewise. (remove_unnecessary_notes): Likewise. * final.c (shorten_branches): Use INSN_P. (leaf_renumber_regs): Likewise. (leaf_renumber_regs_insn): Likewise. * flow.c (find_label_refs): Use INSN_P. (verify_wide_reg): Likewise. (notice_stack_pointer_modification): Likewise. (count_or_remove_death_notes): Likewise. (verify_flow_info): Likewise. (clear_log_links): Likewise. * function.c (fixup_var_refs_insns): Use INSN_P. (compute_insns_for_mem): Likewise. * gcse.c (alloc_gcse_mem): Use INSN_P. (compute_sets): Likewise. (compute_hash_table): Likewise. (classic_gcse): Likewise. (cprop): Likewise. (insert_insn_end_bb): Likewise. (delete_null_pointer_checks_1): Likewise. * global.c (expand_preferences): Use INSN_P. (build_insn_chain): Likewise. * graph.c (node_data): Use INSN_P. * haifa-sched.c (priority): Use INSN_P. (rm_line_notes): Likewise. (rm_other_notes): Likewise. (find_insn_reg_weight): Likewise. (init_target_units): Likewise. (schedule_block): Likewise. (compute_block_forward_dependences): Likewise. (debug_dependencies): Likewise. (set_priorities): Likewise. * integrate.c (function_cannot_inline_p): Use INSN_P. (save_parm_insns): Likewise. (copy_insn_list): Likewise. * jump.c (mark_all_labels): Use INSN_P. (never_reached_warning): Likewise. * lcm.c (optimize_mode_switching): Use INSN_P. * local-alloc.c (validate_equiv_mem): Use INSN_P. (memref_used_between_p): Likewise. (update_equiv_regs): Likewise. (block_alloc): Likewise. (no_conflict_p): Likewise. * loop.c (scan_loop): Use INSN_P. (find_and_verify_loops): Likewise. (count_loop_regs_set): Likewise. (loop_reg_used_before_p): Likewise. (strength_reduce): Likewise. (recombine_givs): Likewise. (check_dbra_loop): Likewise. (load_mems): Likewise. (try_copy_prop): Likewise. * print-rtl.c (print_rtx): Use INSN_P. * recog.c (find_single_use): Use INSN_P. * reg-stack.c (stack_regs_mentioned): Use INSN_P. (next_flags_user): Likewise. (swap_rtx_condition): Likewise. * regmove.c (mark_flags_life_zones): Use INSN_P. (optimize_reg_copy_1): Likewise. (optimize_reg_copy_2): Likewise. (optimize_reg_copy_3): Likewise. (reg_is_remote_constant_p): Likewise. (fixup_match_2): Likewise. (regmove_optimize): Likewise. (fixup_match_1): Likewise. * regrename.c (build_def_use): Use INSN_P. (replace_reg_in_block): Likewise. (consider_use): Likewise. * reload.c (find_equiv_reg): Use INSN_P. * reload1.c (reload): Use INSN_P. (maybe_fix_stack_asms): Likewise. (calculate_needs_all_insns): Likewise. (reload_as_needed): Likewise. (emit_output_reload_insns): Likewise. (delete_address_reloads_1): Likewise. (reload_cse_regs_1): Likewise. (reload_combine): Likewise. (reload_cse_move2add): Likewise. * reorg.c (redundant_insn): Use INSN_P. (dbr_schedule): Likewise. * resource.c (find_dead_or_set_registers): Use INSN_P. (mark_target_live_regs): Likewise. * rtlanal.c (reg_used_between_p): Use INSN_P. (reg_referenced_between_p): Likewise. (reg_set_between_p): Likewise. (reg_set_p): Likewise. (single_set): Likewise. (multiple_sets): Likewise. (find_last_value): Likewise. (reg_set_last): Likewise. (find_reg_note): Likewise. (find_regno_note): Likewise. * sibcall.c (sequence_uses_addressof): Use INSN_P. * simplify-rtx.c (cselib_process_insn): Use INSN_P. * ssa.c (find_evaluations): Use INSN_P. (rename_block): Likewise. (rename_equivalent_regs): Likewise. * unroll.c (loop_find_equiv_value): Use INSN_P. (set_dominates_use): Likewise. * varasm.c (mark_constant_pool): Use INSN_P. (mark_constants): Likewise. * config/alpha/alpha.c (alpha_does_function_need_gp): Use INSN_P. (alphaev4_next_group): Likewise. (alphaev5_next_group): Likewise. * config/c4x/c4x.c (c4x_process_after_reload): Use INSN_P. (c4x_rptb_rpts_p): Likewise. * config/mips/mips.c (mips16_optimize_gp): Use INSN_P. * config/rs6000/rs6000.c (uses_TOC): Use INSN_P. (rs6000_adjust_priority): Likewise. * config/sh/sh.c (sh_loop_align): Use INSN_P. (machine_dependent_reorg): Likewise. (split_branches): Likewise. * config/tahoe/tahoe.c (tahoe_cmp_check): Use INSN_P. From-SVN: r35494
2000-08-04 22:28:08 +02:00
if (! INSN_P (insn))
return 0;
if (datum == 0)
{
for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
if (REG_NOTE_KIND (link) == kind)
return link;
return 0;
}
1991-12-01 06:13:56 +01:00
for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
if (REG_NOTE_KIND (link) == kind && datum == XEXP (link, 0))
1991-12-01 06:13:56 +01:00
return link;
return 0;
}
/* Return the reg-note of kind KIND in insn INSN which applies to register
number REGNO, if any. Return 0 if there is no such reg-note. Note that
the REGNO of this NOTE need not be REGNO if REGNO is a hard register;
it might be the case that the note overlaps REGNO. */
1991-12-01 06:13:56 +01:00
rtx
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
find_regno_note (const_rtx insn, enum reg_note kind, unsigned int regno)
1991-12-01 06:13:56 +01:00
{
alias.c: Remove uses of "register" specifier in declarations of arguments and local... 2001-10-10 Stan Shebs <shebs@apple.com> * alias.c: Remove uses of "register" specifier in declarations of arguments and local variables. * c-common.c: Ditto. * c-convert.c: Ditto. * c-decl.c: Ditto. * c-format.c: Ditto. * c-semantics.c: Ditto. * c-typeck.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfgbuild.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * combine.c: Ditto. * convert.c: Ditto. * cppexp.c: Ditto. * cppfiles.c: Ditto. * cse.c: Ditto. * dbxout.c: Ditto. * defaults.h: Ditto. * df.c: Ditto. * dwarf2out.c: Ditto. * dwarfout.c: Ditto. * emit-rtl.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fix-header.c: Ditto. * floatlib.c: Ditto. * flow.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * gcc.c: Ditto. * gcse.c: Ditto. * gen-protos.c: Ditto. * genattrtab.c: Ditto. * gencheck.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * gengenrtl.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * gensupport.c: Ditto. * global.c: Ditto. * gmon.c: Ditto. * graph.c: Ditto. * haifa-sched.c: Ditto. * hard-reg-set.h: Ditto. * hash.c: Ditto. * integrate.c: Ditto. * jump.c: Ditto. * lists.c: Ditto. * local-alloc.c: Ditto. * loop.c: Ditto. * mips-tdump.c: Ditto. * mips-tfile.c: Ditto. * optabs.c: Ditto. * prefix.c: Ditto. * print-rtl.c: Ditto. * read-rtl.c: Ditto. * real.c: Ditto. * recog.c: Ditto. * reg-stack.c: Ditto. * regclass.c: Ditto. * regmove.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtl.c: Ditto. * rtlanal.c: Ditto. * scan.c: Ditto. * sched-deps.c: Ditto. * sched-rgn.c: Ditto. * sdbout.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tradcif.y: Ditto. * tradcpp.c: Ditto. * tree.c: Ditto. * unroll.c: Ditto. * varasm.c: Ditto. * xcoffout.c: Ditto. From-SVN: r46173
2001-10-11 05:16:15 +02:00
rtx link;
1991-12-01 06:13:56 +01:00
/* Ignore anything that is not an INSN, JUMP_INSN or CALL_INSN. */
alias.c (mark_constant_function): Use INSN_P. * alias.c (mark_constant_function): Use INSN_P. (init_alias_analysis): Likewise. * combine.c (combine_instructions): Use INSN_P. (can_combine_p): Likewise. (try_combine): Likewise. (distribute_notes): Likewise. (distribute_links): Likewise. * cse.c (cse_around_loop): Use INSN_P. (invalidate_skipped_block): Likewise. (cse_set_around_loop): Likewise. (cse_end_of_basic_block): Likewise. (delete_trivially_dead_insns): Likewise. * emit-rtl.c (unshare_all_rtl_again): Use INSN_P. (unshare_all_rtl_1): Likewise. (next_cc0_user): Likewise. (try_split make_insn_raw): Likewise. (remove_unnecessary_notes): Likewise. * final.c (shorten_branches): Use INSN_P. (leaf_renumber_regs): Likewise. (leaf_renumber_regs_insn): Likewise. * flow.c (find_label_refs): Use INSN_P. (verify_wide_reg): Likewise. (notice_stack_pointer_modification): Likewise. (count_or_remove_death_notes): Likewise. (verify_flow_info): Likewise. (clear_log_links): Likewise. * function.c (fixup_var_refs_insns): Use INSN_P. (compute_insns_for_mem): Likewise. * gcse.c (alloc_gcse_mem): Use INSN_P. (compute_sets): Likewise. (compute_hash_table): Likewise. (classic_gcse): Likewise. (cprop): Likewise. (insert_insn_end_bb): Likewise. (delete_null_pointer_checks_1): Likewise. * global.c (expand_preferences): Use INSN_P. (build_insn_chain): Likewise. * graph.c (node_data): Use INSN_P. * haifa-sched.c (priority): Use INSN_P. (rm_line_notes): Likewise. (rm_other_notes): Likewise. (find_insn_reg_weight): Likewise. (init_target_units): Likewise. (schedule_block): Likewise. (compute_block_forward_dependences): Likewise. (debug_dependencies): Likewise. (set_priorities): Likewise. * integrate.c (function_cannot_inline_p): Use INSN_P. (save_parm_insns): Likewise. (copy_insn_list): Likewise. * jump.c (mark_all_labels): Use INSN_P. (never_reached_warning): Likewise. * lcm.c (optimize_mode_switching): Use INSN_P. * local-alloc.c (validate_equiv_mem): Use INSN_P. (memref_used_between_p): Likewise. (update_equiv_regs): Likewise. (block_alloc): Likewise. (no_conflict_p): Likewise. * loop.c (scan_loop): Use INSN_P. (find_and_verify_loops): Likewise. (count_loop_regs_set): Likewise. (loop_reg_used_before_p): Likewise. (strength_reduce): Likewise. (recombine_givs): Likewise. (check_dbra_loop): Likewise. (load_mems): Likewise. (try_copy_prop): Likewise. * print-rtl.c (print_rtx): Use INSN_P. * recog.c (find_single_use): Use INSN_P. * reg-stack.c (stack_regs_mentioned): Use INSN_P. (next_flags_user): Likewise. (swap_rtx_condition): Likewise. * regmove.c (mark_flags_life_zones): Use INSN_P. (optimize_reg_copy_1): Likewise. (optimize_reg_copy_2): Likewise. (optimize_reg_copy_3): Likewise. (reg_is_remote_constant_p): Likewise. (fixup_match_2): Likewise. (regmove_optimize): Likewise. (fixup_match_1): Likewise. * regrename.c (build_def_use): Use INSN_P. (replace_reg_in_block): Likewise. (consider_use): Likewise. * reload.c (find_equiv_reg): Use INSN_P. * reload1.c (reload): Use INSN_P. (maybe_fix_stack_asms): Likewise. (calculate_needs_all_insns): Likewise. (reload_as_needed): Likewise. (emit_output_reload_insns): Likewise. (delete_address_reloads_1): Likewise. (reload_cse_regs_1): Likewise. (reload_combine): Likewise. (reload_cse_move2add): Likewise. * reorg.c (redundant_insn): Use INSN_P. (dbr_schedule): Likewise. * resource.c (find_dead_or_set_registers): Use INSN_P. (mark_target_live_regs): Likewise. * rtlanal.c (reg_used_between_p): Use INSN_P. (reg_referenced_between_p): Likewise. (reg_set_between_p): Likewise. (reg_set_p): Likewise. (single_set): Likewise. (multiple_sets): Likewise. (find_last_value): Likewise. (reg_set_last): Likewise. (find_reg_note): Likewise. (find_regno_note): Likewise. * sibcall.c (sequence_uses_addressof): Use INSN_P. * simplify-rtx.c (cselib_process_insn): Use INSN_P. * ssa.c (find_evaluations): Use INSN_P. (rename_block): Likewise. (rename_equivalent_regs): Likewise. * unroll.c (loop_find_equiv_value): Use INSN_P. (set_dominates_use): Likewise. * varasm.c (mark_constant_pool): Use INSN_P. (mark_constants): Likewise. * config/alpha/alpha.c (alpha_does_function_need_gp): Use INSN_P. (alphaev4_next_group): Likewise. (alphaev5_next_group): Likewise. * config/c4x/c4x.c (c4x_process_after_reload): Use INSN_P. (c4x_rptb_rpts_p): Likewise. * config/mips/mips.c (mips16_optimize_gp): Use INSN_P. * config/rs6000/rs6000.c (uses_TOC): Use INSN_P. (rs6000_adjust_priority): Likewise. * config/sh/sh.c (sh_loop_align): Use INSN_P. (machine_dependent_reorg): Likewise. (split_branches): Likewise. * config/tahoe/tahoe.c (tahoe_cmp_check): Use INSN_P. From-SVN: r35494
2000-08-04 22:28:08 +02:00
if (! INSN_P (insn))
return 0;
1991-12-01 06:13:56 +01:00
for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
if (REG_NOTE_KIND (link) == kind
/* Verify that it is a register, so that scratch and MEM won't cause a
problem here. */
alias.c (record_set, [...]): Use REG_P. 2004-06-15 Jerry Quinn <jlquinn@optonline.net> * alias.c (record_set, record_base_value, canon_rtx, get_addr, nonlocal_mentioned_p_1, init_alias_analysis): Use REG_P. * bt-load.c (find_btr_reference, insn_sets_btr_p, note_btr_set): Likewise. * builtins.c (expand_builtin_setjmp, expand_builtin_apply, expand_builtin_mathfn, expand_builtin_strlen, expand_builtin_memcmp, expand_builtin_strcmp, expand_builtin_strncmp, expand_builtin_frame_address): Likewise. * caller-save.c (mark_set_regs, add_stored_regs, mark_referenced_regs, insert_one_insn): Likewise. * calls.c (prepare_call_address, precompute_register_parameters, precompute_arguments, expand_call, emit_library_call_value_1): Likewise. * cfganal.c (flow_active_insn_p): Likewise. * combine.c (set_nonzero_bits_and_sign_copies, can_combine_p, combinable_i3pat, try_combine, find_split_point, COMBINE_RTX_EQUAL_P, subst, combine_simplify_rtx, simplify_if_then_else, simplify_set, make_extraction, recog_for_combine, gen_lowpart_for_combine, simplify_comparison, record_dead_and_set_regs_1, record_dead_and_set_regs, record_promoted_value, check_promoted_subreg, get_last_value_validate, get_last_value, reg_dead_at_p_1, reg_bitfield_target_p, distribute_notes, unmentioned_reg_p_1): Likewise. * conflict.c (mark_reg): Likewise. * cse.c (HASH, COST, COST_IN, approx_reg_cost_1, notreg_cost, mention_regs, insert_regs, lookup, lookup_for_remove, insert, merge_equiv_classes, flush_hash_table, invalidate, remove_invalid_refs, remove_invalid_subreg_refs, rehash_using_reg, invalidate_for_call, use_related_value, canon_hash, exp_equiv_p, cse_rtx_varies_p, canon_reg, find_best_addr, fold_rtx, equiv_constant, record_jump_cond, cse_insn, addr_affects_sp_p, invalidate_from_clobbers, cse_process_notes, cse_around_loop, cse_set_around_loop, count_reg_usage, set_live_p, cse_change_cc_mode, cse_cc_succs, cse_condition_code_reg): Likewise. * cselib.c (cselib_reg_set_mode, rtx_equal_for_cselib_p, cselib_lookup, cselib_invalidate_regno, cselib_invalidate_rtx, cselib_record_set, cselib_record_sets): Likewise. * dbxout.c (dbxout_symbol_location, dbxout_parms, dbxout_reg_parms, dbxout_block): Likewise. * df.c (df_ref_record, df_def_record_1, df_uses_record): Likewise. * dojump.c (do_jump): Likewise. * dwarf2out.c (dwarf2out_frame_debug_expr, is_pseudo_reg, is_based_loc, rtl_for_decl_location): Likewise. * emit-rtl.c (set_reg_attrs_for_parm, set_decl_rtl, set_decl_incoming_rtl, mark_user_reg): Likewise. * explow.c (copy_all_regs, copy_all_regs, memory_address, force_reg, copy_to_suggested_reg, allocate_dynamic_stack_space, probe_stack_range, hard_function_value): Likewise. * expmed.c (store_bit_field, store_fixed_bit_field, store_split_bit_field, extract_bit_field, extract_fixed_bit_field, extract_split_bit_field, expand_divmod, emit_store_flag_force): Likewise. * expr.c (convert_move, convert_modes, block_move_libcall_safe_for_call_parm, emit_group_load, use_reg, use_group_regs, emit_move_insn, emit_move_insn_1, compress_float_constant, push_block, emit_single_push_insn, emit_push_insn, get_subtarget, expand_assignment, store_expr, store_constructor, store_field, force_operand, safe_from_p, expand_expr_real_1, expand_increment, do_store_flag, do_tablejump): Likewise. * final.c (profile_function, final_scan_insn, alter_subreg, get_mem_expr_from_op, output_asm_operand_names, output_operand, only_leaf_regs_used, leaf_renumber_regs_insn): Likewise. * flow.c (verify_wide_reg_1, mark_regs_live_at_end, find_regno_partial, propagate_one_insn, init_propagate_block_info, insn_dead_p, libcall_dead_p, mark_set_1, not_reg_cond, attempt_auto_inc, find_auto_inc, mark_used_regs, count_or_remove_death_notes_bb): Likewise. * function.c (find_temp_slot_from_address, update_temp_slot_address, preserve_temp_slots, put_var_into_stack, fixup_var_refs_insn, fixup_var_refs_1, fixup_stack_1, optimize_bit_field, flush_addressof, put_addressof_into_stack, purge_addressof_1, insns_for_mem_walk, purge_single_hard_subreg_set, instantiate_decl, instantiate_virtual_regs_1, aggregate_value_p, assign_parms, promoted_input_arg, setjmp_vars_warning, setjmp_args_warning, setjmp_protect, setjmp_protect_args, fix_lexical_addr, expand_function_start, diddle_return_value, clobber_return_register, expand_function_end, keep_stack_depressed, handle_epilogue_set, update_epilogue_consts): Likewise. * genemit.c (gen_exp, gen_insn): Likewise. * genrecog.c (make_insn_sequence): Likewise. * global.c (global_conflicts, expand_preferences, mark_reg_store, mark_reg_conflicts, set_preference, reg_becomes_live, build_insn_chain, mark_reg_change): Likewise. * haifa_sched.c (CONST_BASED_ADDRESS_P, find_set_reg_weight): Likewise. * ifcvt.c (noce_try_abs, noce_get_condition, noce_process_if_block): Likewise. * integrate.c (copy_rtx_and_substitute, try_constants, subst_constants, mark_stores, allocate_initial_values): Likewise. * jump.c (reversed_comparison_code_parts, delete_prior_computation, delete_computation, rtx_renumbered_equal_p, true_regnum, reg_or_subregno): Likewise. * lcm.c (reg_dies, reg_becomes_live): Likewise. * local-alloc.c (validate_equiv_mem_from_store, validate_equiv_mem, update_equiv_regs, no_equiv, block_alloc, combine_regs, reg_is_set, wipe_dead_reg, no_conflict_p): Likewise. * loop-iv.c (simple_reg_p, simple_set_p, kill_sets, iv_get_reaching_def, iv_analyze_biv, altered_reg_used, mark_altered, simple_rhs_p, simplify_using_assignment, implies_p): Likewise. * loop.c (scan_loop, combine_movables, rtx_equal_for_loop_p, move_movables, note_set_pseudo_multiple_uses, consec_sets_invariant_p, find_single_use_in_loop, count_one_set, loop_bivs_init_find, loop_givs_rescan, check_insn_for_bivs, check_insn_for_givs, valid_initial_value_p, simplify_giv_expr, consec_sets_giv, loop_regs_update, check_dbra_loop, maybe_eliminate_biv, maybe_eliminate_biv_1, record_initial, update_reg_last_use, canonicalize_condition, loop_regs_scan, load_mems, try_copy_prop, try_swap_copy_prop): Likewise. * optabs.c (expand_binop, expand_vector_binop, expand_vector_unop, expand_abs, emit_no_conflict_block, emit_libcall_block, expand_float): Likewise. * postreload.c (reload_cse_simplify, reload_cse_simplify_set, reload_cse_simplify_operands, reload_combine, reload_combine_note_store, reload_combine_note_use, reload_cse_move2add, move2add_note_store): Likewise. * print-rtl.c (print_rtx): Likewise. * ra-build.c (copy_insn_p, remember_move, init_one_web_common, contains_pseudo, handle_asm_insn): Likewise. * ra-debug.c (ra_print_rtx_object, dump_constraints, dump_static_insn_cost): Likewise. * ra-rewrite.c (slots_overlap_p, emit_colors, remove_suspicious_death_notes): Likewise. * recog.c (validate_replace_rtx_1, find_single_use_1, find_single_use, register_operand, scratch_operand, nonmemory_operand, constrain_operands): Likewise. * reg-stack (check_asm_stack_operands, remove_regno_note, emit_swap_insn, swap_rtx_condition, subst_stack_regs_pat, subst_asm_stack_regs): Likewise. * regclass.c (scan_one_insn, record_reg_classes, copy_cost, record_address_regs, reg_scan_mark_refs): Likewise. * regmove.c (discover_flags_reg, replacement_quality, copy_src_to_dest, reg_is_remote_constant_p, regmove_optimize, fixup_match_1): Likewise. * regrename.c (note_sets, clear_dead_regs, build_def_use, kill_value, kill_set_value, copyprop_hardreg_forward_1): Likewise. * reload.c (MATCHES, push_secondary_reload, find_reusable_reload, reload_inner_reg_of_subreg, can_reload_into, push_reload, combine_reloads, find_dummy_reload, hard_reg_set_here_p, operands_match_p, decompose, find_reloads, find_reloads_toplev, find_reloads_address, subst_indexed_address, find_reloads_address_1, find_reloads_subreg_address, find_replacement, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p, find_equiv_reg, regno_clobbered_p): Likewise. * reload1.c (replace_pseudos_in, reload, calculate_needs_all_insns, find_reg, delete_dead_insn, alter_reg, eliminate_regs, elimination_effects, eliminate_regs_in_insn, scan_paradoxical_subregs, forget_old_reloads_1, reload_reg_free_for_value_p, choose_reload_regs, emit_input_reload_insns, emit_output_reload_insns, do_input_reload, do_output_reload, emit_reload_insns, gen_reload, delete_address_reloads_1, inc_for_reload): Likewise. * reorg.c (update_reg_dead_notes, fix_reg_dead_note, update_reg_unused_notes, fill_slots_from_thread): Likewise. * resource.c (update_live_status, mark_referenced_resources, mark_set_resources, mark_target_live_regs): Likewise. * rtlanal.c (nonzero_address_p, get_jump_table_offset, global_reg_mentioned_p_1, reg_mentioned_p, reg_referenced_p, reg_set_p, set_noop_p, find_last_value, refers_to_regno_p, note_stores, dead_or_set_p, dead_or_set_regno_p, find_regno_note, find_reg_fusage, find_regno_fusage, replace_regs, regno_use_in, parms_set, find_first_parameter_load, keep_with_call_p, hoist_test_store, hoist_update_store, address_cost, nonzero_bits1, num_sign_bit_copies1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sched-deps.c (deps_may_trap_p, sched_analyze_1, sched_analyze_insn, sched_analyze): Likewise. * sched-rgn.c (check_live_1, update_live_1, sets_likely_spilled_1): Likewise. * sdbout.c (sdbout_symbol, sdbout_parms, sdbout_reg_parms): Likewise. * simplify-rtx.c (simplify_replace_rtx, simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_subreg): Likewise. * stmt.c (decl_conflicts_with_clobbers_p, expand_asm_operands, expand_end_stmt_expr, expand_return, expand_decl, expand_anon_union_decl): Likewise. * unroll.c (precondition_loop_p, calculate_giv_inc, copy_loop_body, find_splittable_regs, find_splittable_givs, find_common_reg_term, loop_iterations): Likewise. * var-tracking.c (variable_union, variable_part_different_p, variable_different_p, count_uses, add_uses, add_stores, compute_bb_dataflow, set_variable_part, delete_variable_part, emit_notes_in_bb, vt_get_decl_and_offset, vt_add_function_parameters): Likewise. * varasm.c (assemble_variable): Likewise. From-SVN: r83195
2004-06-15 20:02:40 +02:00
&& REG_P (XEXP (link, 0))
&& REGNO (XEXP (link, 0)) <= regno
regs.h (end_hard_regno): New function. gcc/ * regs.h (end_hard_regno): New function. (END_HARD_REGNO, END_REGNO): New macros. (add_to_hard_reg_set): New function. (remove_from_hard_reg_set): Likewise. (in_hard_reg_set_p): Likewise. (overlaps_hard_reg_set_p): Likewise. * bt-load.c (find_btr_reference): Use overlaps_hard_reg_set_p. (note_btr_set): Use END_HARD_REGNO. * caller-save.c (setup_save_areas): Use end_hard_regno. (mark_set_regs): Use END_HARD_REGNO. (add_stored_regs): Use end_hard_regno. (mark_referenced_regs): Use add_to_hard_reg_set. * combine.c (update_table_tick): Use END_REGNO. (record_value_for_reg): Likewise. (record_dead_and_set_regs): Likewise. (get_last_value_validate): Likewise. (use_crosses_set_p): Likewise. (reg_dead_at_p_1): Likewise. (reg_dead_at_p): Likewise. (mark_used_regs_combine): Use add_to_hard_reg_set. (move_deaths): Use END_HARD_REGNO. (reg_bitfield_target_p): Use end_hard_regno. (distribute_notes): Use END_HARD_REGNO. * cse.c (mention_regs): Use END_REGNO. (insert): Use add_to_hard_reg_set. (invalidate): Use END_HARD_REGNO. (invalidate_for_call): Likewise. (exp_equiv_p): Use END_REGNO. (cse_insn): Likewise. * cselib.c (cselib_invalidate_regno): Use end_hard_regno. * df-problems.c (df_urec_mark_reg_change): Use END_HARD_REGNO. * df-scan.c (df_ref_record): Use END_HARD_REGNO. * function.c (keep_stack_depressed): Use end_hard_regno. * global.c (global_alloc): Use end_hard_regno. (global_conflicts): Use add_to_hard_reg_set instead of mark_reg_live_nc. (find_reg): Likewise. (mark_reg_store): Likewise. (mark_reg_conflicts): Likewise. (mark_reg_death): Use remove_from_hard_reg_set. (mark_reg_live_nc): Delete. (set_preference): Use end_hard_regno. * local-alloc.c (mark_life): Use add_to_hard_reg_set and remove_from_hard_reg_set. (post_mark_life): Use add_to_hard_reg_set. * mode-switching.c (reg_dies): Use remove_from_hard_reg_set. (reg_becomes_live): Use add_to_hard_reg_set. * recog.c (reg_fits_class_p): Use in_hard_reg_set_p. (peep2_find_free_register): Use add_to_hard_reg_set. * reg-stack.c (convert_regs_exit): Use END_HARD_REGNO. * regclass.c (record_reg_classes): Use in_hard_reg_set_p. * regrename.c (note_sets): Use add_to_hard_reg_set. (clear_dead_regs): Use remove_from_hard_reg_set. (regrename_optimize): Use add_to_hard_reg_set. (find_oldest_value_reg): Use in_hard_reg_set_p. * reload.c (push_reload): Use in_hard_reg_set_p and end_hard_regno. (hard_reg_set_here_p): Use end_hard_regno. (decompose): Likewise. (reg_overlap_mentioned_for_reload_p): Use END_HARD_REGNO. (find_equiv_reg): Use in_hard_reg_set_p and end_hard_regno. * reload1.c (compute_use_by_pseudos): Use add_to_hard_reg_set. (mark_home_live): Use end_hard_regno. (spill_hard_reg): Likewise. (clear_reload_reg_in_use): Likewise. * reorg.c (delete_prior_computation): Use END_REGNO. * resource.c (update_live_status): Use END_HARD_REGNO. (mark_referenced_resources): Use add_to_hard_reg_set. (mark_set_resources): Likewise. (mark_target_live_regs): Likewise. Use remove_from_hard_reg_set. * rtlanal.c (refers_to_regno_p): Use END_REGNO. (reg_overlap_mentioned_p): Likewise. (dead_or_set_p): Likewise. Use an exclusive upper loop bound. (covers_regno_no_parallel_p): Use END_REGNO. (find_regno_note): Likewise. (find_reg_fusage): Use END_HARD_REGNO. * stmt.c (decl_overlaps_hard_reg_set_p): Use overlaps_hard_reg_set_p. * var-tracking.c (emit_note_insn_var_location): Use end_hard_regno. From-SVN: r124961
2007-05-22 22:52:39 +02:00
&& END_REGNO (XEXP (link, 0)) > regno)
1991-12-01 06:13:56 +01:00
return link;
return 0;
}
/* Return a REG_EQUIV or REG_EQUAL note if insn has only a single set and
has such a note. */
rtx
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
find_reg_equal_equiv_note (const_rtx insn)
{
rtx link;
if (!INSN_P (insn))
return 0;
for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
if (REG_NOTE_KIND (link) == REG_EQUAL
|| REG_NOTE_KIND (link) == REG_EQUIV)
{
/* FIXME: We should never have REG_EQUAL/REG_EQUIV notes on
insns that have multiple sets. Checking single_set to
make sure of this is not the proper check, as explained
in the comment in set_unique_reg_note.
This should be changed into an assert. */
if (GET_CODE (PATTERN (insn)) == PARALLEL && multiple_sets (insn))
return 0;
return link;
}
return NULL;
}
/* Check whether INSN is a single_set whose source is known to be
equivalent to a constant. Return that constant if so, otherwise
return null. */
rtx
Use rtx_insn for various jump-handling functions and predicates gcc/ChangeLog: 2014-09-05 David Malcolm <dmalcolm@redhat.com> * config/arc/arc.c (arc_print_operand): Use insn method of final_sequence for type-safety. * config/bfin/bfin.c (bfin_hardware_loop): Strengthen param "insn" from rtx to rtx_insn *. * config/frv/frv.c (frv_print_operand_jump_hint): Likewise. * config/mn10300/mn10300.c (mn10300_scan_for_setlb_lcc): Likewise for locals "branch", "label". * config/h8300/h8300.c (same_cmp_preceding_p): Likewise for locals "i1", "i2". Use NULL rather than NULL_RTX in comparisons. (same_cmp_following_p): Likewise for locals "i2", "i3". * config/sh/sh_optimize_sett_clrt.cc (sh_optimize_sett_clrt::sh_cbranch_ccreg_value): Likewise for param "cbranch_insn". * function.c (convert_jumps_to_returns): Likewis for local "jump". * ifcvt.c (cond_exec_get_condition): Likewise for param "jump". * jump.c (simplejump_p): Strengthen param "insn" from const_rtx to const rtx_insn *. (condjump_p): Likewise. (condjump_in_parallel_p): Likewise. (pc_set): Likewise. (any_uncondjump_p): Likewise. (any_condjump_p): Likewise. (condjump_label): Likewise. (returnjump_p): Strengthen param "insn" from rtx to const rtx_insn *. (onlyjump_p): Strengthen param "insn" from const_rtx to const rtx_insn *. (jump_to_label_p): Likewise. (invert_jump_1): Strengthen param "jump" from rtx to rtx_insn *. (invert_jump): Likewise. * reorg.c (simplejump_or_return_p): Add checked cast when calling simplejump_p. (get_jump_flags): Strengthen param "insn" from rtx to const rtx_insn *. (get_branch_condition): Likewise. (condition_dominates_p): Likewise. (make_return_insns): Move declaration of local "pat" earlier, to after we've handled NONJUMP_INSN_P and non-sequences, using its methods to simplify the code and for type-safety. * rtl.h (find_constant_src): Strengthen param from const_rtx to const rtx_insn *. (jump_to_label_p): Strengthen param from rtx to const rtx_insn *. (condjump_p): Strengthen param from const_rtx to const rtx_insn *. (any_condjump_p): Likewise. (any_uncondjump_p): Likewise. (pc_set): Likewise. (condjump_label): Likewise. (simplejump_p): Likewise. (returnjump_p): Likewise. (onlyjump_p): Likewise. (invert_jump_1): Strengthen param 1 from rtx to rtx_insn *. (invert_jump): Likewise. (condjump_in_parallel_p): Strengthen param from const_rtx to const rtx_insn *. * rtlanal.c (find_constant_src): Strengthen param from const_rtx to const rtx_insn *. * sel-sched-ir.c (fallthru_bb_of_jump): Strengthen param from rtx to const rtx_insn *. * sel-sched-ir.h (fallthru_bb_of_jump): Likewise. From-SVN: r214970
2014-09-05 17:15:43 +02:00
find_constant_src (const rtx_insn *insn)
{
rtx note, set, x;
set = single_set (insn);
if (set)
{
x = avoid_constant_pool_reference (SET_SRC (set));
if (CONSTANT_P (x))
return x;
}
note = find_reg_equal_equiv_note (insn);
if (note && CONSTANT_P (XEXP (note, 0)))
return XEXP (note, 0);
return NULL_RTX;
}
/* Return true if DATUM, or any overlap of DATUM, of kind CODE is found
in the CALL_INSN_FUNCTION_USAGE information of INSN. */
int
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
find_reg_fusage (const_rtx insn, enum rtx_code code, const_rtx datum)
{
/* If it's not a CALL_INSN, it can't possibly have a
CALL_INSN_FUNCTION_USAGE field, so don't bother checking. */
alias.c (nonlocal_mentioned_p, [...]): Use, LABEL_P, JUMP_P, CALL_P, NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P. 2004-07-08 Jerry Quinn <jlquinn@optonline.net> * alias.c (nonlocal_mentioned_p, nonlocal_referenced_p, nonlocal_set_p, init_alias_analysis): Use, LABEL_P, JUMP_P, CALL_P, NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P. * bb-reorder.c (mark_bb_for_unlikely_executed_section, add_labels_and_missing_jumps, find_jump_block, fix_crossing_unconditional_branches, add_reg_crossing_jump_notes): Likewise. * bt-load.c (btr_referenced_p, compute_defs_uses_and_gen, link_btr_uses, move_btr_def): Likewise. * builtins.c (expand_builtin_longjmp, expand_builtin_nonlocal_goto, expand_builtin_expect_jump): Likewise. * caller-save.c (save_call_clobbered_regs, insert_one_insn): Likewise. * calls.c (expand_call, emit_library_call_value_1): Likewise. * cfganal.c (forwarder_block_p): Likewise. * cfgbuild.c (inside_basic_block_p, count_basic_blocks, make_label_edge, rtl_make_eh_edge, make_edges, find_basic_blocks_1, find_bb_boundaries): Likewise. * cfgcleanup.c (try_simplify_condjump, try_forward_edges, merge_blocks_move_predecessor_nojumps, merge_blocks_move_successor_nojumps, insns_match_p, flow_find_cross_jump, outgoing_edges_match, try_crossjump_to_edge, try_optimize_cfg): Likewise. * cfgexpand.c (expand_block, construct_exit_block): Likewise. * cfglayout.c (skip_insns_after_block, label_for_bb, record_effective_endpoints, insn_locators_initialize, fixup_reorder_chain, update_unlikely_executed_notes): Likewise. * cfgmainloop.c (create_loop_notes): Likewise. * cfgrtl.c (delete_insn, delete_insn_chain, create_basic_block_structure, rtl_delete_block, free_bb_for_insn, update_bb_for_insn, rtl_merge_blocks, rtl_can_merge_blocks, block_label, try_redirect_by_replacing_jump, last_loop_beg_note, redirect_branch_edge, force_nonfallthru_and_redirect, rtl_tidy_fallthru_edge, back_edge_of_syntactic_loop_p, rtl_split_edge, commit_one_edge_insertion, print_rtl_with_bb, update_br_prob_note, rtl_verify_flow_info_1, rtl_verify_flow_info, purge_dead_edges, cfg_layout_redirect_edge_and_branch, cfg_layout_delete_block, cfg_layout_can_merge_blocks_p, cfg_layout_merge_blocks, rtl_block_ends_with_call_p, need_fake_edge_p, rtl_flow_call_edges_add): Likewise. * combine.c (combine_instructions, can_combine_p, try_combine, find_split_point, record_dead_and_set_regs, reg_dead_at_p, distribute_notes, distribute_links, insn_cuid): Likewise. * cse.c (fold_rtx, cse_insn, cse_around_loop, invalidate_skipped_block, cse_set_around_loop, cse_end_of_basic_block, cse_main, cse_basic_block, cse_condition_code_reg): Likewise. * cselib.c (cselib_process_insn): Likewise. * ddg.c (create_ddg): Likewise. * df.c (df_insn_refs_record, df_bb_rd_local_compute, df_insns_modify): Likewise. * dwarf2out.c (dwarf2out_stack_adjust, dwarf2out_frame_debug, gen_label_die, dwarf2out_var_location): Likewise. * emit-rtl.c (get_first_nonnote_insn, get_last_nonnote_insn, next_insn, previous_insn, next_nonnote_insn, prev_nonnote_insn, last_call_insn, active_insn_p, next_label, prev_label, link_cc0_insns, next_cc0_user, try_split, add_insn_after, add_insn_before, remove_insn, add_function_usage_to, reorder_insns, find_line_note, remove_unnecessary_notes, emit_insn_after_1, classify_insn): Likewise. * except.c (convert_from_eh_region_ranges_1, emit_to_new_bb_before, connect_post_landing_pads, sjlj_mark_call_sites, sjlj_emit_function_enter, sjlj_emit_function_exit, reachable_handlers, can_throw_internal, can_throw_external, set_nothrow_function_flags, convert_to_eh_region_ranges): Likewise. * explow.c (optimize_save_area_alloca): Likewise. * expr.c (expand_expr_real): Likewise. * final.c (insn_current_reference_address, compute_alignments, shorten_branches, final, scan_ahead_for_unlikely_executed_note, final_scan_insn, output_asm_label, leaf_function_p): Likewise. * flow.c (first_insn_after_basic_block_note, delete_dead_jumptables, propagate_block_delete_insn, propagate_one_insn, init_propagate_block_info, propagate_block, libcall_dead_p, mark_set_1, attempt_auto_inc, find_auto_inc, try_pre_increment): Likewise. * function.c (instantiate_virtual_regs, reorder_blocks_1, expand_function_start, expand_function_end, contains, thread_prologue_and_epilogue_insns, reposition_prologue_and_epilogue_notes): Likewise. * gcse.c (constprop_register, bypass_conditional_jumps, insert_insn_end_bb, gcse_after_reload): Likewise. * genemit.c (gen_expand, gen_split): Likewise. * genpeep.c (gen_peephole, main): Likewise. * global.c (build_insn_chain): Likewise. * graph.c (node_data, print_rtl_graph_with_bb): Likewise. * haifa-sched.c (unlink_other_notes, unlink_line_notes, get_block_head_tail, no_real_insns_p, rm_line_notes, save_line_notes, restore_line_notes, rm_redundant_line_notes, rm_other_notes, ok_for_early_queue_removal, set_priorities, sched_init): Likewise. * ifcvt.c (count_bb_insns, first_active_insn, last_active_insn, cond_exec_process_insns, end_ifcvt_sequence, noce_process_if_block, merge_if_block, block_jumps_and_fallthru_p, find_if_block, dead_or_predicable): Likewise. * integrate.c (try_constants): Likewise. * jump.c (rebuild_jump_labels, cleanup_barriers, purge_line_number_notes, init_label_info, mark_all_labels, squeeze_notes, get_label_before, get_label_after, reversed_comparison_code_parts, simplejump_p, pc_set, returnjump_p, onlyjump_p, follow_jumps, mark_jump_label, delete_barrier, delete_prior_computation, delete_computation, delete_related_insns, delete_for_peephole, redirect_jump): Likewise. * lcm.c (optimize_mode_switching): Likewise. * local-alloc.c (validate_equiv_mem, update_equiv_regs, block_alloc): Likewise. * loop-doloop.c (doloop_valid_p, doloop_optimize): Likewise. * loop-invariant.c (find_exits, find_invariants_bb): Likewise. * loop-iv.c (simplify_using_assignment): Likewise. * loop.c (compute_luids, loop_optimize, scan_loop, libcall_other_reg, libcall_benefit, skip_consec_insns, move_movables, prescan_loop, find_and_verify_loops, labels_in_range_p, for_each_insn_in_loop, loop_bivs_init_find, strength_reduce, check_insn_for_bivs, check_insn_for_givs, check_final_value, update_giv_derive, basic_induction_var, product_cheap_p, check_dbra_loop, loop_insn_first_p, last_use_this_basic_block, canonicalize_condition, get_condition, loop_regs_scan, load_mems, try_copy_prop, LOOP_BLOCK_NUM, loop_dump_aux): Likewise. * modulo-sched.c (doloop_register_get, find_line_note, sms_schedule, sms_schedule_by_order): Likewise. * optabs.c (emit_no_conflict_block, emit_libcall_block): Likewise. * postreload.c (reload_cse_simplify_operands, reload_combine, reload_cse_move2add): Likewise. * predict.c (can_predict_insn_p, estimate_probability, expected_value_to_br_prob, process_note_predictions): Likewise. * print-rtl.c (print_rtx, print_rtl, print_rtl_single): Likewise. * profile.c (branch_prob): Likewise. * ra-build.c (live_out_1, livethrough_conflicts_bb, detect_webs_set_in_cond_jump): Likewise. * ra-debug.c (ra_print_rtx_object, ra_debug_insns, ra_print_rtl_with_bb): Likewise. * ra-rewrite.c (insert_stores, rewrite_program2): Likewise. * recog.c (next_insn_tests_no_inequality, find_single_use, split_all_insns, peephole2_optimize, if_test_bypass_p): Likewise. * reg-stack.c (next_flags_user, record_label_references, emit_swap_insn, swap_rtx_condition, subst_stack_regs, compensate_edge, convert_regs_1): Likewise. * regclass.c (scan_one_insn): Likewise. * regmove.c (optimize_reg_copy_1, optimize_reg_copy_2, fixup_match_2, regmove_optimize, fixup_match_1, single_set_for_csa, combine_stack_adjustments_for_block): Likewise. * regrename.c (build_def_use, copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads, find_reloads_address_1, subst_reloads, find_equiv_reg): Likewise. * reload1.c (reload, calculate_needs_all_insns, set_label_offsets, reload_as_needed, emit_input_reload_insns, do_output_reload, delete_output_reload, delete_address_reloads_1, fixup_abnormal_edges): Likewise. * reorg.c (find_end_label, emit_delay_sequence, delete_from_delay_slot, delete_scheduled_jump, optimize_skip, get_jump_flags, rare_destination, mostly_true_jump, try_merge_delay_insns, redundant_insn, own_thread_p, fill_simple_delay_slots, fill_slots_from_thread, fill_eager_delay_slots, relax_delay_slots, make_return_insns, dbr_schedule): Likewise. * resource.c (find_basic_block, next_insn_no_annul, find_dead_or_set_registers, mark_target_live_regs): Likewise. * rtl.h (RTX_PREV): Likewise. * rtlanal.c (global_reg_mentioned_p, no_labels_between_p, no_jumps_between_p, reg_used_between_p, reg_referenced_between_p, reg_set_p, find_last_value, dead_or_set_regno_p, find_reg_fusage, find_regno_fusage, pure_call_p, replace_label, rtx_referenced_p_1, tablejump_p, computed_jump_p, insns_safe_to_move_p, find_first_parameter_load, can_hoist_insn_p): Likewise. * sched-deps.c (get_condition, add_dependence, sched_analyze_2, sched_analyze_insn, sched_analyze, add_forward_dependence): Likewise. * sched-ebb.c (fix_basic_block_boundaries, add_deps_for_risky_insns, schedule_ebbs): Likewise. * sched-rgn.c (is_cfg_nonregular, find_conditional_protection, is_conditionally_protected, can_schedule_ready_p, add_branch_dependences, debug_dependencies): Likewise. * stmt.c (emit_nop, expand_start_case, emit_jump_if_reachable): Likewise. * unroll.c (unroll_loop, copy_loop_body, back_branch_in_range_p, reg_dead_after_loop, loop_find_equiv_value, loop_iterations, set_dominates_use, ujump_to_loop_cont): Likewise. * var-tracking.c (prologue_stack_adjust, vt_initialize): Likewise. * varasm.c (output_constant_pool_1): Likewise. From-SVN: r84341
2004-07-09 05:29:35 +02:00
if (!CALL_P (insn))
return 0;
ra-build.c (copy_insn_p, [...]): Use gcc_assert and gcc_unreachable instead of abort. * ra-build.c (copy_insn_p, remember_move, defuse_overlap_p_1, live_out_1, prune_hardregs_for_mode, init_one_web_common, reinit_one_web, add_subweb, add_subweb_2, init_web_parts, record_conflict, compare_and_free_webs, init_webs_defs_uses, parts_to_webs_1, parts_to_webs, reset_conflicts, check_conflict_numbers, remember_web_was_spilled, handle_asm_insn, ra_build_free): Use gcc_assert and gcc_unreachable instead of abort. * ra-colorize.c (push_list, put_web, reset_lists, put_web_at_end, put_move, remove_move, combine, select_spill, colorize_one_web, try_recolor_web, insert_coalesced_conflicts, check_colors, break_precolored_alias, restore_conflicts_from_coalesce, sort_and_combine_web_pairs, check_uncoalesced_moves): Likewise. * ra-rewrite.c (spill_coalescing, slots_overlap_p, emit_loads, reloads_to_loads, rewrite_program2, emit_colors): Likewise. * ra.c (first_hard_reg, create_insn_info, find_subweb, init_ra, check_df): Likewise. * real.c (do_add, do_multiply, do_divide, do_compare, do_fix_trunc, real_arithmetic, real_compare, real_exponent, real_ldexp, real_identical, real_to_integer, real_to_integer2, real_to_decimal, real_to_hexadecimal, real_from_integer, ten_to_ptwo, ten_to_mptwo, real_digit, real_nan, real_maxval, round_for_format, real_convert, real_to_target, real_from_target, real_hash, encode_ieee_single, encode_ieee_double, encode_ieee_extended, encode_ieee_quad, encode_vax_f, encode_vax_d, encode_vax_g, encode_i370_single, encode_i370_double, encode_c4x_single, encode_c4x_extended): Likewise. * recog.c (validate_change, validate_replace_rtx_1, asm_operand_ok, extract_insn, peep2_next_insn, peep2_reg_dead_p, peep2_find_free_register, peephole2_optimize, store_data_bypass_p, if_test_bypass_p): Likewise. * reg-stack.c (record_label_references, get_asm_operand_n_inputs, stack_result, remove_regno_note, get_hard_regnum, emit_pop_insn, emit_swap_insn, swap_to_top, move_for_stack_reg, subst_stack_regs_pat, subst_asm_stack_regs, change_stack, compensate_edge, convert_regs_1): Likewise. * regclass.c (init_reg_sets, init_reg_sets_1, memory_move_secondary_cost): Likewise. * regrename.c (note_sets, clear_dead_regs, scan_rtx_reg, scan_rtx): Likewise. * reload.c (push_secondary_reload, find_valid_class, push_reload, operands_match_p, decompose, immune_p, find_reloads, find_reloads_toplev, find_reloads_address_1, subst_reloads, copy_replacements, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p): Likewise. * reload1.c (compute_use_by_pseudos, replace_pseudos_in, reload, count_pseudo, find_reg, eliminate_regs, eliminate_regs_in_insn, verify_initial_elim_offsets, finish_spills, clear_reload_reg_in_use, reload_reg_free_p, reload_reg_reaches_end_p, reloads_conflict, choose_reload_regs, merge_assigned_reloads, emit_input_reload_insns, do_output_reload, fixup_abnormal_edges): Likewise. * reorg.c (stop_search_p, emit_delay_sequence, get_jump_flags, fill_slots_from_thread, relax_delay_slots): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * rtl.c (copy_rtx, rtx_equal_p): Likewise. * rtlanal.c (insn_dependent_p, reg_overlap_mentioned_p, dead_or_set_p, find_reg_fusage, remove_note, replace_rtx, subreg_lsb_1, subreg_regno_offset, subreg_offset_representable_p, find_first_parameter_load, can_hoist_insn_p, hoist_update_store, hoist_insn_after, hoist_insn_to_edge, nonzero_bits1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sbitmap.c (sbitmap_difference): Likewise. * sched-deps.c (add_dependence, sched_analyze_1, sched_analyze_2, sched_analyze, add_forward_dependence): Likewise. * sched-ebb.c (fix_basic_block_boundaries, schedule_ebb): Likewise. * sched-rgn.c (debug_regions, compute_trg_info, schedule_region, schedule_insns): Likewise. * sched-vis.c (print_pattern): Likewise. * sdbout.c (sdbout_symbol, sdbout_toplevel_data): Likewise. * simplify-rtx.c (simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_ternary_operation, simplify_immed_subreg, simplify_subreg, simplify_gen_subreg): Likewise. * sreal.c (copy, sreal_sub, sreal_div): Likewise. * stmt.c (force_label_rtx, expand_goto, expand_asm_operands, resolve_operand_name_1, expand_return, expand_decl, expand_anon_union_decl, emit_case_bit_tests, expand_case): Likewise. * stor-layout.c (put_pending_size, smallest_mode_for_size, int_mode_for_mode, layout_decl, finish_builtin_struct, layout_type, set_sizetype, get_mode_bounds): Likewise. From-SVN: r87244
2004-09-09 19:19:16 +02:00
gcc_assert (datum);
alias.c (record_set, [...]): Use REG_P. 2004-06-15 Jerry Quinn <jlquinn@optonline.net> * alias.c (record_set, record_base_value, canon_rtx, get_addr, nonlocal_mentioned_p_1, init_alias_analysis): Use REG_P. * bt-load.c (find_btr_reference, insn_sets_btr_p, note_btr_set): Likewise. * builtins.c (expand_builtin_setjmp, expand_builtin_apply, expand_builtin_mathfn, expand_builtin_strlen, expand_builtin_memcmp, expand_builtin_strcmp, expand_builtin_strncmp, expand_builtin_frame_address): Likewise. * caller-save.c (mark_set_regs, add_stored_regs, mark_referenced_regs, insert_one_insn): Likewise. * calls.c (prepare_call_address, precompute_register_parameters, precompute_arguments, expand_call, emit_library_call_value_1): Likewise. * cfganal.c (flow_active_insn_p): Likewise. * combine.c (set_nonzero_bits_and_sign_copies, can_combine_p, combinable_i3pat, try_combine, find_split_point, COMBINE_RTX_EQUAL_P, subst, combine_simplify_rtx, simplify_if_then_else, simplify_set, make_extraction, recog_for_combine, gen_lowpart_for_combine, simplify_comparison, record_dead_and_set_regs_1, record_dead_and_set_regs, record_promoted_value, check_promoted_subreg, get_last_value_validate, get_last_value, reg_dead_at_p_1, reg_bitfield_target_p, distribute_notes, unmentioned_reg_p_1): Likewise. * conflict.c (mark_reg): Likewise. * cse.c (HASH, COST, COST_IN, approx_reg_cost_1, notreg_cost, mention_regs, insert_regs, lookup, lookup_for_remove, insert, merge_equiv_classes, flush_hash_table, invalidate, remove_invalid_refs, remove_invalid_subreg_refs, rehash_using_reg, invalidate_for_call, use_related_value, canon_hash, exp_equiv_p, cse_rtx_varies_p, canon_reg, find_best_addr, fold_rtx, equiv_constant, record_jump_cond, cse_insn, addr_affects_sp_p, invalidate_from_clobbers, cse_process_notes, cse_around_loop, cse_set_around_loop, count_reg_usage, set_live_p, cse_change_cc_mode, cse_cc_succs, cse_condition_code_reg): Likewise. * cselib.c (cselib_reg_set_mode, rtx_equal_for_cselib_p, cselib_lookup, cselib_invalidate_regno, cselib_invalidate_rtx, cselib_record_set, cselib_record_sets): Likewise. * dbxout.c (dbxout_symbol_location, dbxout_parms, dbxout_reg_parms, dbxout_block): Likewise. * df.c (df_ref_record, df_def_record_1, df_uses_record): Likewise. * dojump.c (do_jump): Likewise. * dwarf2out.c (dwarf2out_frame_debug_expr, is_pseudo_reg, is_based_loc, rtl_for_decl_location): Likewise. * emit-rtl.c (set_reg_attrs_for_parm, set_decl_rtl, set_decl_incoming_rtl, mark_user_reg): Likewise. * explow.c (copy_all_regs, copy_all_regs, memory_address, force_reg, copy_to_suggested_reg, allocate_dynamic_stack_space, probe_stack_range, hard_function_value): Likewise. * expmed.c (store_bit_field, store_fixed_bit_field, store_split_bit_field, extract_bit_field, extract_fixed_bit_field, extract_split_bit_field, expand_divmod, emit_store_flag_force): Likewise. * expr.c (convert_move, convert_modes, block_move_libcall_safe_for_call_parm, emit_group_load, use_reg, use_group_regs, emit_move_insn, emit_move_insn_1, compress_float_constant, push_block, emit_single_push_insn, emit_push_insn, get_subtarget, expand_assignment, store_expr, store_constructor, store_field, force_operand, safe_from_p, expand_expr_real_1, expand_increment, do_store_flag, do_tablejump): Likewise. * final.c (profile_function, final_scan_insn, alter_subreg, get_mem_expr_from_op, output_asm_operand_names, output_operand, only_leaf_regs_used, leaf_renumber_regs_insn): Likewise. * flow.c (verify_wide_reg_1, mark_regs_live_at_end, find_regno_partial, propagate_one_insn, init_propagate_block_info, insn_dead_p, libcall_dead_p, mark_set_1, not_reg_cond, attempt_auto_inc, find_auto_inc, mark_used_regs, count_or_remove_death_notes_bb): Likewise. * function.c (find_temp_slot_from_address, update_temp_slot_address, preserve_temp_slots, put_var_into_stack, fixup_var_refs_insn, fixup_var_refs_1, fixup_stack_1, optimize_bit_field, flush_addressof, put_addressof_into_stack, purge_addressof_1, insns_for_mem_walk, purge_single_hard_subreg_set, instantiate_decl, instantiate_virtual_regs_1, aggregate_value_p, assign_parms, promoted_input_arg, setjmp_vars_warning, setjmp_args_warning, setjmp_protect, setjmp_protect_args, fix_lexical_addr, expand_function_start, diddle_return_value, clobber_return_register, expand_function_end, keep_stack_depressed, handle_epilogue_set, update_epilogue_consts): Likewise. * genemit.c (gen_exp, gen_insn): Likewise. * genrecog.c (make_insn_sequence): Likewise. * global.c (global_conflicts, expand_preferences, mark_reg_store, mark_reg_conflicts, set_preference, reg_becomes_live, build_insn_chain, mark_reg_change): Likewise. * haifa_sched.c (CONST_BASED_ADDRESS_P, find_set_reg_weight): Likewise. * ifcvt.c (noce_try_abs, noce_get_condition, noce_process_if_block): Likewise. * integrate.c (copy_rtx_and_substitute, try_constants, subst_constants, mark_stores, allocate_initial_values): Likewise. * jump.c (reversed_comparison_code_parts, delete_prior_computation, delete_computation, rtx_renumbered_equal_p, true_regnum, reg_or_subregno): Likewise. * lcm.c (reg_dies, reg_becomes_live): Likewise. * local-alloc.c (validate_equiv_mem_from_store, validate_equiv_mem, update_equiv_regs, no_equiv, block_alloc, combine_regs, reg_is_set, wipe_dead_reg, no_conflict_p): Likewise. * loop-iv.c (simple_reg_p, simple_set_p, kill_sets, iv_get_reaching_def, iv_analyze_biv, altered_reg_used, mark_altered, simple_rhs_p, simplify_using_assignment, implies_p): Likewise. * loop.c (scan_loop, combine_movables, rtx_equal_for_loop_p, move_movables, note_set_pseudo_multiple_uses, consec_sets_invariant_p, find_single_use_in_loop, count_one_set, loop_bivs_init_find, loop_givs_rescan, check_insn_for_bivs, check_insn_for_givs, valid_initial_value_p, simplify_giv_expr, consec_sets_giv, loop_regs_update, check_dbra_loop, maybe_eliminate_biv, maybe_eliminate_biv_1, record_initial, update_reg_last_use, canonicalize_condition, loop_regs_scan, load_mems, try_copy_prop, try_swap_copy_prop): Likewise. * optabs.c (expand_binop, expand_vector_binop, expand_vector_unop, expand_abs, emit_no_conflict_block, emit_libcall_block, expand_float): Likewise. * postreload.c (reload_cse_simplify, reload_cse_simplify_set, reload_cse_simplify_operands, reload_combine, reload_combine_note_store, reload_combine_note_use, reload_cse_move2add, move2add_note_store): Likewise. * print-rtl.c (print_rtx): Likewise. * ra-build.c (copy_insn_p, remember_move, init_one_web_common, contains_pseudo, handle_asm_insn): Likewise. * ra-debug.c (ra_print_rtx_object, dump_constraints, dump_static_insn_cost): Likewise. * ra-rewrite.c (slots_overlap_p, emit_colors, remove_suspicious_death_notes): Likewise. * recog.c (validate_replace_rtx_1, find_single_use_1, find_single_use, register_operand, scratch_operand, nonmemory_operand, constrain_operands): Likewise. * reg-stack (check_asm_stack_operands, remove_regno_note, emit_swap_insn, swap_rtx_condition, subst_stack_regs_pat, subst_asm_stack_regs): Likewise. * regclass.c (scan_one_insn, record_reg_classes, copy_cost, record_address_regs, reg_scan_mark_refs): Likewise. * regmove.c (discover_flags_reg, replacement_quality, copy_src_to_dest, reg_is_remote_constant_p, regmove_optimize, fixup_match_1): Likewise. * regrename.c (note_sets, clear_dead_regs, build_def_use, kill_value, kill_set_value, copyprop_hardreg_forward_1): Likewise. * reload.c (MATCHES, push_secondary_reload, find_reusable_reload, reload_inner_reg_of_subreg, can_reload_into, push_reload, combine_reloads, find_dummy_reload, hard_reg_set_here_p, operands_match_p, decompose, find_reloads, find_reloads_toplev, find_reloads_address, subst_indexed_address, find_reloads_address_1, find_reloads_subreg_address, find_replacement, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p, find_equiv_reg, regno_clobbered_p): Likewise. * reload1.c (replace_pseudos_in, reload, calculate_needs_all_insns, find_reg, delete_dead_insn, alter_reg, eliminate_regs, elimination_effects, eliminate_regs_in_insn, scan_paradoxical_subregs, forget_old_reloads_1, reload_reg_free_for_value_p, choose_reload_regs, emit_input_reload_insns, emit_output_reload_insns, do_input_reload, do_output_reload, emit_reload_insns, gen_reload, delete_address_reloads_1, inc_for_reload): Likewise. * reorg.c (update_reg_dead_notes, fix_reg_dead_note, update_reg_unused_notes, fill_slots_from_thread): Likewise. * resource.c (update_live_status, mark_referenced_resources, mark_set_resources, mark_target_live_regs): Likewise. * rtlanal.c (nonzero_address_p, get_jump_table_offset, global_reg_mentioned_p_1, reg_mentioned_p, reg_referenced_p, reg_set_p, set_noop_p, find_last_value, refers_to_regno_p, note_stores, dead_or_set_p, dead_or_set_regno_p, find_regno_note, find_reg_fusage, find_regno_fusage, replace_regs, regno_use_in, parms_set, find_first_parameter_load, keep_with_call_p, hoist_test_store, hoist_update_store, address_cost, nonzero_bits1, num_sign_bit_copies1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sched-deps.c (deps_may_trap_p, sched_analyze_1, sched_analyze_insn, sched_analyze): Likewise. * sched-rgn.c (check_live_1, update_live_1, sets_likely_spilled_1): Likewise. * sdbout.c (sdbout_symbol, sdbout_parms, sdbout_reg_parms): Likewise. * simplify-rtx.c (simplify_replace_rtx, simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_subreg): Likewise. * stmt.c (decl_conflicts_with_clobbers_p, expand_asm_operands, expand_end_stmt_expr, expand_return, expand_decl, expand_anon_union_decl): Likewise. * unroll.c (precondition_loop_p, calculate_giv_inc, copy_loop_body, find_splittable_regs, find_splittable_givs, find_common_reg_term, loop_iterations): Likewise. * var-tracking.c (variable_union, variable_part_different_p, variable_different_p, count_uses, add_uses, add_stores, compute_bb_dataflow, set_variable_part, delete_variable_part, emit_notes_in_bb, vt_get_decl_and_offset, vt_add_function_parameters): Likewise. * varasm.c (assemble_variable): Likewise. From-SVN: r83195
2004-06-15 20:02:40 +02:00
if (!REG_P (datum))
{
alias.c: Remove uses of "register" specifier in declarations of arguments and local... 2001-10-10 Stan Shebs <shebs@apple.com> * alias.c: Remove uses of "register" specifier in declarations of arguments and local variables. * c-common.c: Ditto. * c-convert.c: Ditto. * c-decl.c: Ditto. * c-format.c: Ditto. * c-semantics.c: Ditto. * c-typeck.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfgbuild.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * combine.c: Ditto. * convert.c: Ditto. * cppexp.c: Ditto. * cppfiles.c: Ditto. * cse.c: Ditto. * dbxout.c: Ditto. * defaults.h: Ditto. * df.c: Ditto. * dwarf2out.c: Ditto. * dwarfout.c: Ditto. * emit-rtl.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fix-header.c: Ditto. * floatlib.c: Ditto. * flow.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * gcc.c: Ditto. * gcse.c: Ditto. * gen-protos.c: Ditto. * genattrtab.c: Ditto. * gencheck.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * gengenrtl.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * gensupport.c: Ditto. * global.c: Ditto. * gmon.c: Ditto. * graph.c: Ditto. * haifa-sched.c: Ditto. * hard-reg-set.h: Ditto. * hash.c: Ditto. * integrate.c: Ditto. * jump.c: Ditto. * lists.c: Ditto. * local-alloc.c: Ditto. * loop.c: Ditto. * mips-tdump.c: Ditto. * mips-tfile.c: Ditto. * optabs.c: Ditto. * prefix.c: Ditto. * print-rtl.c: Ditto. * read-rtl.c: Ditto. * real.c: Ditto. * recog.c: Ditto. * reg-stack.c: Ditto. * regclass.c: Ditto. * regmove.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtl.c: Ditto. * rtlanal.c: Ditto. * scan.c: Ditto. * sched-deps.c: Ditto. * sched-rgn.c: Ditto. * sdbout.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tradcif.y: Ditto. * tradcpp.c: Ditto. * tree.c: Ditto. * unroll.c: Ditto. * varasm.c: Ditto. * xcoffout.c: Ditto. From-SVN: r46173
2001-10-11 05:16:15 +02:00
rtx link;
for (link = CALL_INSN_FUNCTION_USAGE (insn);
link;
link = XEXP (link, 1))
if (GET_CODE (XEXP (link, 0)) == code
&& rtx_equal_p (datum, XEXP (XEXP (link, 0), 0)))
return 1;
}
else
{
* Rework fields used to describe positions of bitfields and modify sizes to be unsigned and use HOST_WIDE_INT. * alias.c (reg_known_value_size): Now unsigned. * c-typeck.c (build_unary_op, case ADDR_EXPR): Use byte_position. (really_start_incremental_init): Use bitsize_zero_node. (push_init_level, pop_init_level, output_init_element): Likewise. Use bitsize_unit_node and bitsize_one_node. (output_pending_init_elements, process_init_element): Likewise. * combine.c (combine_max_regno, reg_sign_bit_copies): Now unsigned. (make_extraction): Position and length HOST_WIDE_INT and unsigned HOST_WIDE_INT, respectively. (get_pos_from_mask): Passed in value is unsigned HOST_WIDE_INT. (num_sign_bit_copies): Returns unsigned. BITWIDTH now unsigned; rework arithmetic. Remove recursive call from arg to MAX. (combine_instructions, init_reg_last_arrays): NREGS now unsigned. (setup_incoming_promotions, can_combine_p, try_combine, simplify_set): REGNO now unsigned. (set_nonzero_bit_and_sign_copies): NUM now unsigned. (find_split_point, expand_compound_operation, make_extraction): LEN now unsigned HOST_WIDE_INT, POS now HOST_WIDE_INT. (make_field_assignment): Likewise. (combine_simplify_rtx): Add cast. (expand_compound_operation): MODEWIDTH now unsigned; rework arithmetic. (force_to_mode): WIDTH now unsigned; add cast. (if_then_else_cond): SIZE now unsigned. (nonzero_bits): MODE_WIDTH, RESULT_WIDTH, and WIDTH now unsigned. (extended_count): Now returns unsigned. (simplify_shift_const): COUNT unsigned; arg is now INPUT_COUNT. Add SIGNED_COUNT variable; MODE_WORDS and FIRST_COUNT now unsigned. (simplify_comparison): MODE_WIDTH now unsigned. (update_table_tick): REGNO and ENDREGNO now unsigned; new var R. (mark_used_regs_combine): Likewise; rework arithmetic. (record_value_for_reg): REGNO, ENDREGNO, and I now unsigned. (record_dead_and_set_regs, reg_dead_at_p, distribute_notes): Likewise. (record_promoted_value): REGNO now unsigned. (get_last_value_validate): REGNO, ENDREGNO, and J now unsigned. (get_last_value): REGNO now unsigned. (use_crosses_set_p): REGNO and ENDREGNO now unsigned. (reg_dead_regno, reg_dead_endregno): Now unsigned. (remove_death): Arg REGNO now unsigned. (move_deaths): REGNO, DEADREGNO, DEADEND, OUREND, and I now unsigned. (reg_bitfield_target_p): REGNO, REGNO, ENDREGNO, and ENDTREGNO now unsigned. * convert.c (convert_to_integer): INPREC and OUTPREC now unsigned. * cse.c (struct qty_table_elem): FIRST_REG and LAST_REG now unsigned. (struct cse_reg_info): REGNO now unsigned. (cached_regno): Now unsigned. (REGNO_QTY_VALID_P): Add cast. (make_new_qty, make_regs_eqv, delete_reg_eqiv): Regno args unsigned. (remove_invalid_regs): Likewise. (remove_invalid_subreg_refs): Likewise; arg WORD also unsigned as are variables END and I. (get_cse_reg_info, insert): Likewise. (mention_regs, invalidate_for_call): REGNO, ENDREGNO, and I unsigned. (canon_hash): Likewise. (insert_regs, lookup_for_remove): REGNO now unsigned. (invalidate): REGNO, ENDREGNO, TREGNO, and TENDREGNO now unsigned. New variable RN. * dbxout.c (dbxout_parms, dbxout_reg_parms): Don't check for REGNO < 0. * dwarf2out.c (dwarf2ou_frame_debug_expr): Remove cast. * emit-rtl.c (subreg_realpart_p): Add cast. (operand_subword): Arg I is now unsigned as is var PARTWORDS. (operand_subword_force): Arg I is now unsigned. * except.c (eh_regs): Variable I is now unsigned. * explow.c (hard_function_value): BYTES is unsigned HOST_WIDE_INT. * expmed.c (store_fixed_bit_field): Position is HOST_WIDE_INT; length is unsigned HOST_WIDE_INT; likewise for internal variables. (store_split_bit_field, extract_fixed_bit_field): Likewise. (extract_split_bit_field, store_bit_field, extract_bit_field): Likewise. * expr.c (store_constructor_fields, store_constructor, store_field): Positions are HOST_WIDE_INT and lengths are unsigned HOST_WIDE_INT. (expand_assignment, expand_expr, expand_expr_unaligned): Likewise. (do_jump): Likewise. (move_by_pieces, move_by_pieces_ninsns, clear_by_pieces): MAX_SIZE is now unsigned. (emit_group_load): BYTEPOS is HOST_WIDE_INT; BYTELEN is unsigned. (emit_group_store): Likewise. (emit_move_insn): I now unsigned. (store_constructor): Use host_integerp, tree_low_cst, and bitsize_unit_node. (get_inner_reference): Return bitpos and bitsize as HOST_WIDE_INT. Rework all calculations to use trees and new fields. * expr.h (promoted_input_arg): Regno now unsigned. (store_bit_field, extract_bit_field): Adjust types of pos and size. (mark_seen_cases): Arg is HOST_WIDE_INT. * flow.c (verify_wide_reg_1): REGNO now unsigned. * fold-const.c (decode_field_reference): Size and pos HOST_WIDE_INT; precisions and alignments are unsigned. (optimize_bit_field_compare, fold_truthop): Likewise. (int_const_binop): Adjust threshold for size_int_type_wide call. (fold_convert): Likewise. (size_int_type_wide): Make table larger and fix thinko that only had half of table used. (all_ones_mask_p, fold): Precisions are unsigned. * function.c (put_reg_info_stack): REGNO is unsigned. (instantiate_decl): Size is HOST_WIDE_INT. (instantiate_virtual_regs): I is unsigned. (assign_parms): REGNO, REGNOI, and REGNOR are unsigned. (promoted_input_arg): REGNO is unsigned. * function.h (struct function): x_max_parm_reg is now unsigned. * gcse.c (max_gcse_regno): Now unsigned. (struct null_pointer_info): min_reg and max_reg now unsigned. (lookup_set, next_set): REGNO arg now unsigned. (compute_hash_table): REGNO and I now unsigned. (handle_avail_expr): regnum_for_replacing now unsigned. (cprop_insn): REGNO now unsigned. (delete_null_pointer_checks_1): BLOCK_REG now pointer to unsigned. * ggc-common.c (ggc_mark_tree_children, case FIELD_DECL): New case. * global.c (set_preference): SRC_REGNO, DEST_REGNO, and I now unsigned. * hard-reg-set.h (reg_class_size): Now unsigned. * integrate.c (mark_stores): LAST_REG and I now unsigned; new UREGNO. * jump.c (mark_modified_reg): I now unsigned; add cast. (rtx_equal_for_thread_p): Add cast. * loop.c (max_reg_before_loop): Now unsigned. (struct_movable): REGNO now unsigned. (try_copy_prop): REGNO arg unsigned. (regs_match_p): XN and YN now unsigned. (consec_sets_invariant_p, maybe_eliminate_biv): REGNO now unsigned. (strength_reduce): Likewise; NREGS also unsigned. (first_increment_giv, last_increment_giv unsigned): Now unsigned. * loop.h (struct iv_class): REGNO now unsigned. (max_reg_before_loop, first_increment_giv, last_increment_giv): Now unsigned. * machmode.h (mode_size, mode_unit_size): Now unsigned. (mode_for_size, smallest_mode_for_size): Pass size as unsigned. * optabs.c (expand_binop): I and NWORDS now unsigned. (expand_unop): I now unsigned. * print-tree.c (print_node): Don't print DECL_FIELD_BITPOS, but do print DECL_FIELD_OFFSET and DECL_FIELD_BIT_OFFSET. * real.c (significand_size): Now returns unsigned. * real.h (significand_size): Likewise. * regclass.c (reg_class_size): Now unsigned. (choose_hard_reg_mode): Both operands now unsigned. (record_reg_classes): REGNO and NR now unsigned. (reg_scan): NREGS now unsigned. (reg_scan_update): old_max_regno now unsigned. (reg_scan_mark_refs): Arg MIN_REGNO and var REGNO now unsigned. * reload.c (find_valid_class): BEST_SIZE now unsigned. (find_dummy_reload): REGNO, NWORDS, and I now unsigned. (hard_reg_set_here_p): Args BEG_REGNO and END_REGNO now unsigned. Likewise for variable R. (refers_to_regno_for_reload_p): Args REGNO and END_REGNO now unsigned, as are variables INNER_REGNO and INNER_ENDREGNO; add new variable R. (find_equiv_reg): Add casts. (regno_clobbered_p): Arg REGNO now unsigned. * reload.h (struct reload): NREGS now unsigned. (refers_to_regno_for_reload_p): Regno args are unsigned. (regno_clobbered_p): Likewise. * reload1.c (reg_max_ref_width, spill_stack_slot_width): Now unsigned. (compute_use_by_pseudos): REGNO now unsigned. (find_reg): I and J now unsigned, new variable K, and change loop variables accordingly; THIS_NREGS now unsigned. (alter_reg): INHERENT_SIZE and TOTAL_SIZE now unsigned. (spill_hard_reg): REGNO arg now unsigned; add casts. (forget_old_reloads_1): REGNO, NR, and I now unsigned. (mark_reload_reg_in_use): Arg REGNO and vars NREGS and I now unsigned. (clear_reload_reg_in_use): Arg REGNO and vars NREGS, START_REGNO, END_REGNO, CONFLICT_START, and CONFLICT_END now unsigned. (reload_reg_free_p, reload_reg_reaches_end_p): Arg REGNO now unsigned. (choose_reload_regs): MAX_GROUP_SIZE now unsigned. (emit_reload_insns): REGNO now unsigned. (reload_cse_move2add): Add cast. (move2add_note_store): REGNO and I now unsigned; new variable ENDREGNO and rework loop. * resource.c (mark_referenced_resources, mark_set_resources): New variable R; REGNO and LAST_REGNO now unsigned. (mark_target_live_regs): J and REGNO now unsigned. * rtl.c (mode_size, mode_unit_size): Now unsigned. * rtl.h (union rtunion_def): New field rtuint. (XCUINT): New macro. (ADDRESSOF_REGNO, REGNO, SUBREG_WORD): New XCUINT. (operand_subword, operand_subword_force): Word number is unsigned. (choose_hard_reg_mode): Operands are unsigned. (refers_to-regno_p, dead_or_set_regno_p): Regno arg is unsigned. (find_regno_note, find_regno_fusage, replace_regs): Likewise. (regno_use_in, combine_instructions, remove_death): Likewise. (reg_scan, reg_scan_update): Likewise. (extended_count): Return is unsigned. * rtlanal.c (refers_to_regno_p): Args REGNO and ENDREGNO and vars I, INNER_REGNO, and INNER_ENDREGNO now unsigned; new variable X_REGNO. (reg_overlap_mentioned_p): REGNO and ENDREGNO now unsigned. (reg_set_last_first_regno, reg_set_last_last_regno): Now unsigned. (reg_reg_last_1): FIRS and LAST now unsigned. (dead_or_set_p): REGNO, LAST_REGNO, and I now unsigned. (dead_or_set_regno_p): Arg TEST_REGNO and vars REGNO and ENDREGNO now unsigned. (find_regno_note, regno_use_in): Arg REGNO now unsigned. (find_regno_fusage): Likewise; also var REGNOTE now unsigned. (find_reg_fusage): Variables REGNO, END_REGNO, and I now unsigned. (replace_regs): Arg NREGS now unsigned. * sdbout.c (sdbout_parms, sdbout_reg_parms): Don't check REGNO < 0. * simplify-rtx.c (simplify_unary_operation): WIDTH now unsigned. (simplify_binary_operation): Likewise. (cselib_invalidate_regno): Arg REGNO and variables ENDREGNO, I, and THIS_LAST now unsigned. (cselib_record_set): Add cast. * ssa.c (ssa_max_reg_num): Now unsigned. (rename_block): REGNO now unsigned. * stmt.c (expand_return): Bit positions unsigned HOST_WIDE_INT; sizes now unsigned. (all_cases_count): Just return -1 not -2. COUNT, MINVAL, and LASTVAL now HOST_WIDE_INT. Rework tests to use trees whenever possible. Use host_integerp and tree_low_cst. (mark_seen_cases): COUNT arg now HOST_WIDE_INT; Likewise variable NEXT_NODE_OFFSET; XLO now unsigned. (check_for_full_enumeration_handing): BYTES_NEEDED, I to HOST_WIDE_INT. * stor-layout.c (mode_for_size): SIZE arg now unsigned. (smallest_mode_for_size): Likewise. (layout_decl): Simplify handing of a specified DECL_SIZE_UNIT. KNOWN_ALIGN is now an alignment, so simplify code. Don't turn off DECL_BIT_FIELD if field is BLKmode, but not type. (start_record_layout): Renamed from new_record_layout_info. Update to new fields. (debug_rli, normalize_rli, rli_size_unit_so_far, rli_size_so_far): New functions. (place_union_field): Renamed from layout_union_field. Update to use new fields in rli. (place_field): Renamed from layout_field. Major rewrite to use new fields in rli; pass alignment to layout_decl. (finalize_record_size): Rework to use new fields in rli and handle union. (compute_record_mode): Rework to simplify and to use new DECL fields. (finalize_type_size): Make rounding more consistent. (finish_union_layout): Deleted. (layout_type, case VOID_TYPE): Don't set TYPE_SIZE_UNIT either. (layout_type, case RECORD_TYPE): Call new function names. (initialize_sizetypes): Set TYPE_IS_SIZETYPE. (set_sizetype): Set TYPE_IS_SIZETYPE earlier. (get_best_mode): UNIT is now unsigned; remove casts. * tree.c (bit_position): Compute from new fields. (byte_position, int_byte_position): New functions. (print_type_hash_statistics): Cast to remove warning. (build_range_type): Use host_integerp and tree_low_cst to try to hash. (build_index_type): Likewise; make subtype of sizetype. (build_index_2_type): Pass sizetype to build_range_type. (build_common_tree_nodes): Use size_int and bitsize_int to initialize nodes; add bitsize_{zero,one,unit}_node. * tree.h (DECL_FIELD_CONTEXT): Use FIELD_DECL_CHECK. (DECL_BIT_FIELD_TYPE, DECL_QUALIFIER, DECL_FCONTEXT): Likewise. (DECL_PACKED, DECL_BIT_FIELD): Likewise. (DECL_FIELD_BITPOS): Deleted. (DECL_FIELD_OFFSET, DECL_FIELD_BIT_OFFSET): New fields. (DECL_RESULT, DECL_SAVED_INSNS): Use FUNCTION_DECL_CHECK. (DECL_FRAME_SIZE, DECL_FUNCTION_CODE, DECL_NO_STATIC_CHAIN): Likewise. (DECL_INLINE, DECL_BUILT_IN_NONANSI, DECL_IS_MALLOC): Likewise. (DECL_BUILT_IN_CLASS, DECL_STATIC_CONSTRUCTOR): Likewise. (DECL_STATIC_DESTRUCTOR, DECL_NO_CHECK_MEMORY_USAGE): Likewise. (DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT, DECL_NO_LIMIT_STACK) Likewise. (DECL_ORIGINAL_TYPE, TYPE_DECL_SUPPRESS_DEBUG): Use TYPE_DECL_CHECK. (DECL_ARG_TYPE_AS_WRITEN, DECL_ARG_TYPE): Use PARM_DECL_CHECK. (DECL_INCOMING_RTL, DECL_TRANSPARENT_UNION): Likewise. (DECL_ALIGN): Adjust to new field in union. (DECL_OFFSET_ALIGN): New field. (DECL_ERROR_ISSUED, DECL_TOO_LATE): Use LABEL_DECL_CHECK. (DECL_IN_TEXT_SECTION): Use VAR_DECL_CHECK. (union tree_decl): Add struct for both aligns. (enum tree_index): Add TI_BITSIZE_{ZERO,ONE,UNIT}. (bitsize_zero_node, bitsize_one_node, bitsize_unit_node): Added. (struct record_layout_info): Rework fields to have offset alignment and byte and bit position. (start_record_layout, place_field): Renamed from old names. (rli_size_so_far, rli_size_unit_so_far, normalize_rli): New decls. (byte_position, int_byte_position): Likewise. (get_inner_reference): Change types of position and length. * unroll.c (unroll_loop): New variable R; use for some loops. MAX_LOCAL_REGNUM and MAXREGNUM now unsigned. (calculate_giv_inc): Arg REGNO now unsigned. (copy_loop_body): REGNO and SRC_REGNO now unsigned. * varasm.c (assemble_variable): Clean up handling of size using host_integerp and tree_low_cst. (decode_addr_const): Use byte, not bit, position. (output_constructor): bitpos and offsets are HOST_WIDE_INT; use tree_low_cst and int_bit_position. * objc/objc-act.c (build_ivar_list_initializer): Use byte_position. * ch/actions.c (check_missing_cases): BYTES_NEEDED is HOST_WIDE_INT. * ch/typeck.c (expand_constant_to_buffer): Use int_byte_position. (extract_constant_from_buffer): Likewise. * cp/class.c (build_vbase_pointer_fields): layout_field now place_field. (get_vfield_offset): Use byte_position. (set_rtti_entry): Set OFFSET to ssizetype zero. (get_binfo_offset_as_int): Deleted. (dfs_record_base_offsets): Use tree_low_cst. (dfs_search_base_offsets): Likewise. (layout_nonempty_base_or_field): Reflect changes in RLI format and call byte_position. (layout_empty_base): Convert offset to ssizetype. (build_base_field): use rli_size_unit_so_far. (dfs_propagate_binfo_offsets): Do computation in proper type. (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets. (layout_class_type): Reflect changes in RLI names and fields. (finish_struct_1): Set DECL_FIELD_OFFSET. * cp/dump.c (dequeue_and_dump): Call bit_position. * cp/expr.c (cplus_expand_constant): Use byte_position. * cp/rtti.c (expand_class_desc): Use bitsize_one_node. * cp/typeck.c (build_component_addr): Use byte_position and don't special case for zero offset. * f/com.c (ffecom_tree_canonize_ptr_): Use bitsize_zero_node. (ffecom_tree_canonize_ref_): Likewise. * java/class.c (make_field_value): Use byte_position. * java/expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position. (java_array_data_offset): Likewise. * java/java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to bzero call. From-SVN: r32742
2000-03-25 19:34:13 +01:00
unsigned int regno = REGNO (datum);
/* CALL_INSN_FUNCTION_USAGE information cannot contain references
to pseudo registers, so don't bother checking. */
if (regno < FIRST_PSEUDO_REGISTER)
{
regs.h (end_hard_regno): New function. gcc/ * regs.h (end_hard_regno): New function. (END_HARD_REGNO, END_REGNO): New macros. (add_to_hard_reg_set): New function. (remove_from_hard_reg_set): Likewise. (in_hard_reg_set_p): Likewise. (overlaps_hard_reg_set_p): Likewise. * bt-load.c (find_btr_reference): Use overlaps_hard_reg_set_p. (note_btr_set): Use END_HARD_REGNO. * caller-save.c (setup_save_areas): Use end_hard_regno. (mark_set_regs): Use END_HARD_REGNO. (add_stored_regs): Use end_hard_regno. (mark_referenced_regs): Use add_to_hard_reg_set. * combine.c (update_table_tick): Use END_REGNO. (record_value_for_reg): Likewise. (record_dead_and_set_regs): Likewise. (get_last_value_validate): Likewise. (use_crosses_set_p): Likewise. (reg_dead_at_p_1): Likewise. (reg_dead_at_p): Likewise. (mark_used_regs_combine): Use add_to_hard_reg_set. (move_deaths): Use END_HARD_REGNO. (reg_bitfield_target_p): Use end_hard_regno. (distribute_notes): Use END_HARD_REGNO. * cse.c (mention_regs): Use END_REGNO. (insert): Use add_to_hard_reg_set. (invalidate): Use END_HARD_REGNO. (invalidate_for_call): Likewise. (exp_equiv_p): Use END_REGNO. (cse_insn): Likewise. * cselib.c (cselib_invalidate_regno): Use end_hard_regno. * df-problems.c (df_urec_mark_reg_change): Use END_HARD_REGNO. * df-scan.c (df_ref_record): Use END_HARD_REGNO. * function.c (keep_stack_depressed): Use end_hard_regno. * global.c (global_alloc): Use end_hard_regno. (global_conflicts): Use add_to_hard_reg_set instead of mark_reg_live_nc. (find_reg): Likewise. (mark_reg_store): Likewise. (mark_reg_conflicts): Likewise. (mark_reg_death): Use remove_from_hard_reg_set. (mark_reg_live_nc): Delete. (set_preference): Use end_hard_regno. * local-alloc.c (mark_life): Use add_to_hard_reg_set and remove_from_hard_reg_set. (post_mark_life): Use add_to_hard_reg_set. * mode-switching.c (reg_dies): Use remove_from_hard_reg_set. (reg_becomes_live): Use add_to_hard_reg_set. * recog.c (reg_fits_class_p): Use in_hard_reg_set_p. (peep2_find_free_register): Use add_to_hard_reg_set. * reg-stack.c (convert_regs_exit): Use END_HARD_REGNO. * regclass.c (record_reg_classes): Use in_hard_reg_set_p. * regrename.c (note_sets): Use add_to_hard_reg_set. (clear_dead_regs): Use remove_from_hard_reg_set. (regrename_optimize): Use add_to_hard_reg_set. (find_oldest_value_reg): Use in_hard_reg_set_p. * reload.c (push_reload): Use in_hard_reg_set_p and end_hard_regno. (hard_reg_set_here_p): Use end_hard_regno. (decompose): Likewise. (reg_overlap_mentioned_for_reload_p): Use END_HARD_REGNO. (find_equiv_reg): Use in_hard_reg_set_p and end_hard_regno. * reload1.c (compute_use_by_pseudos): Use add_to_hard_reg_set. (mark_home_live): Use end_hard_regno. (spill_hard_reg): Likewise. (clear_reload_reg_in_use): Likewise. * reorg.c (delete_prior_computation): Use END_REGNO. * resource.c (update_live_status): Use END_HARD_REGNO. (mark_referenced_resources): Use add_to_hard_reg_set. (mark_set_resources): Likewise. (mark_target_live_regs): Likewise. Use remove_from_hard_reg_set. * rtlanal.c (refers_to_regno_p): Use END_REGNO. (reg_overlap_mentioned_p): Likewise. (dead_or_set_p): Likewise. Use an exclusive upper loop bound. (covers_regno_no_parallel_p): Use END_REGNO. (find_regno_note): Likewise. (find_reg_fusage): Use END_HARD_REGNO. * stmt.c (decl_overlaps_hard_reg_set_p): Use overlaps_hard_reg_set_p. * var-tracking.c (emit_note_insn_var_location): Use end_hard_regno. From-SVN: r124961
2007-05-22 22:52:39 +02:00
unsigned int end_regno = END_HARD_REGNO (datum);
* Rework fields used to describe positions of bitfields and modify sizes to be unsigned and use HOST_WIDE_INT. * alias.c (reg_known_value_size): Now unsigned. * c-typeck.c (build_unary_op, case ADDR_EXPR): Use byte_position. (really_start_incremental_init): Use bitsize_zero_node. (push_init_level, pop_init_level, output_init_element): Likewise. Use bitsize_unit_node and bitsize_one_node. (output_pending_init_elements, process_init_element): Likewise. * combine.c (combine_max_regno, reg_sign_bit_copies): Now unsigned. (make_extraction): Position and length HOST_WIDE_INT and unsigned HOST_WIDE_INT, respectively. (get_pos_from_mask): Passed in value is unsigned HOST_WIDE_INT. (num_sign_bit_copies): Returns unsigned. BITWIDTH now unsigned; rework arithmetic. Remove recursive call from arg to MAX. (combine_instructions, init_reg_last_arrays): NREGS now unsigned. (setup_incoming_promotions, can_combine_p, try_combine, simplify_set): REGNO now unsigned. (set_nonzero_bit_and_sign_copies): NUM now unsigned. (find_split_point, expand_compound_operation, make_extraction): LEN now unsigned HOST_WIDE_INT, POS now HOST_WIDE_INT. (make_field_assignment): Likewise. (combine_simplify_rtx): Add cast. (expand_compound_operation): MODEWIDTH now unsigned; rework arithmetic. (force_to_mode): WIDTH now unsigned; add cast. (if_then_else_cond): SIZE now unsigned. (nonzero_bits): MODE_WIDTH, RESULT_WIDTH, and WIDTH now unsigned. (extended_count): Now returns unsigned. (simplify_shift_const): COUNT unsigned; arg is now INPUT_COUNT. Add SIGNED_COUNT variable; MODE_WORDS and FIRST_COUNT now unsigned. (simplify_comparison): MODE_WIDTH now unsigned. (update_table_tick): REGNO and ENDREGNO now unsigned; new var R. (mark_used_regs_combine): Likewise; rework arithmetic. (record_value_for_reg): REGNO, ENDREGNO, and I now unsigned. (record_dead_and_set_regs, reg_dead_at_p, distribute_notes): Likewise. (record_promoted_value): REGNO now unsigned. (get_last_value_validate): REGNO, ENDREGNO, and J now unsigned. (get_last_value): REGNO now unsigned. (use_crosses_set_p): REGNO and ENDREGNO now unsigned. (reg_dead_regno, reg_dead_endregno): Now unsigned. (remove_death): Arg REGNO now unsigned. (move_deaths): REGNO, DEADREGNO, DEADEND, OUREND, and I now unsigned. (reg_bitfield_target_p): REGNO, REGNO, ENDREGNO, and ENDTREGNO now unsigned. * convert.c (convert_to_integer): INPREC and OUTPREC now unsigned. * cse.c (struct qty_table_elem): FIRST_REG and LAST_REG now unsigned. (struct cse_reg_info): REGNO now unsigned. (cached_regno): Now unsigned. (REGNO_QTY_VALID_P): Add cast. (make_new_qty, make_regs_eqv, delete_reg_eqiv): Regno args unsigned. (remove_invalid_regs): Likewise. (remove_invalid_subreg_refs): Likewise; arg WORD also unsigned as are variables END and I. (get_cse_reg_info, insert): Likewise. (mention_regs, invalidate_for_call): REGNO, ENDREGNO, and I unsigned. (canon_hash): Likewise. (insert_regs, lookup_for_remove): REGNO now unsigned. (invalidate): REGNO, ENDREGNO, TREGNO, and TENDREGNO now unsigned. New variable RN. * dbxout.c (dbxout_parms, dbxout_reg_parms): Don't check for REGNO < 0. * dwarf2out.c (dwarf2ou_frame_debug_expr): Remove cast. * emit-rtl.c (subreg_realpart_p): Add cast. (operand_subword): Arg I is now unsigned as is var PARTWORDS. (operand_subword_force): Arg I is now unsigned. * except.c (eh_regs): Variable I is now unsigned. * explow.c (hard_function_value): BYTES is unsigned HOST_WIDE_INT. * expmed.c (store_fixed_bit_field): Position is HOST_WIDE_INT; length is unsigned HOST_WIDE_INT; likewise for internal variables. (store_split_bit_field, extract_fixed_bit_field): Likewise. (extract_split_bit_field, store_bit_field, extract_bit_field): Likewise. * expr.c (store_constructor_fields, store_constructor, store_field): Positions are HOST_WIDE_INT and lengths are unsigned HOST_WIDE_INT. (expand_assignment, expand_expr, expand_expr_unaligned): Likewise. (do_jump): Likewise. (move_by_pieces, move_by_pieces_ninsns, clear_by_pieces): MAX_SIZE is now unsigned. (emit_group_load): BYTEPOS is HOST_WIDE_INT; BYTELEN is unsigned. (emit_group_store): Likewise. (emit_move_insn): I now unsigned. (store_constructor): Use host_integerp, tree_low_cst, and bitsize_unit_node. (get_inner_reference): Return bitpos and bitsize as HOST_WIDE_INT. Rework all calculations to use trees and new fields. * expr.h (promoted_input_arg): Regno now unsigned. (store_bit_field, extract_bit_field): Adjust types of pos and size. (mark_seen_cases): Arg is HOST_WIDE_INT. * flow.c (verify_wide_reg_1): REGNO now unsigned. * fold-const.c (decode_field_reference): Size and pos HOST_WIDE_INT; precisions and alignments are unsigned. (optimize_bit_field_compare, fold_truthop): Likewise. (int_const_binop): Adjust threshold for size_int_type_wide call. (fold_convert): Likewise. (size_int_type_wide): Make table larger and fix thinko that only had half of table used. (all_ones_mask_p, fold): Precisions are unsigned. * function.c (put_reg_info_stack): REGNO is unsigned. (instantiate_decl): Size is HOST_WIDE_INT. (instantiate_virtual_regs): I is unsigned. (assign_parms): REGNO, REGNOI, and REGNOR are unsigned. (promoted_input_arg): REGNO is unsigned. * function.h (struct function): x_max_parm_reg is now unsigned. * gcse.c (max_gcse_regno): Now unsigned. (struct null_pointer_info): min_reg and max_reg now unsigned. (lookup_set, next_set): REGNO arg now unsigned. (compute_hash_table): REGNO and I now unsigned. (handle_avail_expr): regnum_for_replacing now unsigned. (cprop_insn): REGNO now unsigned. (delete_null_pointer_checks_1): BLOCK_REG now pointer to unsigned. * ggc-common.c (ggc_mark_tree_children, case FIELD_DECL): New case. * global.c (set_preference): SRC_REGNO, DEST_REGNO, and I now unsigned. * hard-reg-set.h (reg_class_size): Now unsigned. * integrate.c (mark_stores): LAST_REG and I now unsigned; new UREGNO. * jump.c (mark_modified_reg): I now unsigned; add cast. (rtx_equal_for_thread_p): Add cast. * loop.c (max_reg_before_loop): Now unsigned. (struct_movable): REGNO now unsigned. (try_copy_prop): REGNO arg unsigned. (regs_match_p): XN and YN now unsigned. (consec_sets_invariant_p, maybe_eliminate_biv): REGNO now unsigned. (strength_reduce): Likewise; NREGS also unsigned. (first_increment_giv, last_increment_giv unsigned): Now unsigned. * loop.h (struct iv_class): REGNO now unsigned. (max_reg_before_loop, first_increment_giv, last_increment_giv): Now unsigned. * machmode.h (mode_size, mode_unit_size): Now unsigned. (mode_for_size, smallest_mode_for_size): Pass size as unsigned. * optabs.c (expand_binop): I and NWORDS now unsigned. (expand_unop): I now unsigned. * print-tree.c (print_node): Don't print DECL_FIELD_BITPOS, but do print DECL_FIELD_OFFSET and DECL_FIELD_BIT_OFFSET. * real.c (significand_size): Now returns unsigned. * real.h (significand_size): Likewise. * regclass.c (reg_class_size): Now unsigned. (choose_hard_reg_mode): Both operands now unsigned. (record_reg_classes): REGNO and NR now unsigned. (reg_scan): NREGS now unsigned. (reg_scan_update): old_max_regno now unsigned. (reg_scan_mark_refs): Arg MIN_REGNO and var REGNO now unsigned. * reload.c (find_valid_class): BEST_SIZE now unsigned. (find_dummy_reload): REGNO, NWORDS, and I now unsigned. (hard_reg_set_here_p): Args BEG_REGNO and END_REGNO now unsigned. Likewise for variable R. (refers_to_regno_for_reload_p): Args REGNO and END_REGNO now unsigned, as are variables INNER_REGNO and INNER_ENDREGNO; add new variable R. (find_equiv_reg): Add casts. (regno_clobbered_p): Arg REGNO now unsigned. * reload.h (struct reload): NREGS now unsigned. (refers_to_regno_for_reload_p): Regno args are unsigned. (regno_clobbered_p): Likewise. * reload1.c (reg_max_ref_width, spill_stack_slot_width): Now unsigned. (compute_use_by_pseudos): REGNO now unsigned. (find_reg): I and J now unsigned, new variable K, and change loop variables accordingly; THIS_NREGS now unsigned. (alter_reg): INHERENT_SIZE and TOTAL_SIZE now unsigned. (spill_hard_reg): REGNO arg now unsigned; add casts. (forget_old_reloads_1): REGNO, NR, and I now unsigned. (mark_reload_reg_in_use): Arg REGNO and vars NREGS and I now unsigned. (clear_reload_reg_in_use): Arg REGNO and vars NREGS, START_REGNO, END_REGNO, CONFLICT_START, and CONFLICT_END now unsigned. (reload_reg_free_p, reload_reg_reaches_end_p): Arg REGNO now unsigned. (choose_reload_regs): MAX_GROUP_SIZE now unsigned. (emit_reload_insns): REGNO now unsigned. (reload_cse_move2add): Add cast. (move2add_note_store): REGNO and I now unsigned; new variable ENDREGNO and rework loop. * resource.c (mark_referenced_resources, mark_set_resources): New variable R; REGNO and LAST_REGNO now unsigned. (mark_target_live_regs): J and REGNO now unsigned. * rtl.c (mode_size, mode_unit_size): Now unsigned. * rtl.h (union rtunion_def): New field rtuint. (XCUINT): New macro. (ADDRESSOF_REGNO, REGNO, SUBREG_WORD): New XCUINT. (operand_subword, operand_subword_force): Word number is unsigned. (choose_hard_reg_mode): Operands are unsigned. (refers_to-regno_p, dead_or_set_regno_p): Regno arg is unsigned. (find_regno_note, find_regno_fusage, replace_regs): Likewise. (regno_use_in, combine_instructions, remove_death): Likewise. (reg_scan, reg_scan_update): Likewise. (extended_count): Return is unsigned. * rtlanal.c (refers_to_regno_p): Args REGNO and ENDREGNO and vars I, INNER_REGNO, and INNER_ENDREGNO now unsigned; new variable X_REGNO. (reg_overlap_mentioned_p): REGNO and ENDREGNO now unsigned. (reg_set_last_first_regno, reg_set_last_last_regno): Now unsigned. (reg_reg_last_1): FIRS and LAST now unsigned. (dead_or_set_p): REGNO, LAST_REGNO, and I now unsigned. (dead_or_set_regno_p): Arg TEST_REGNO and vars REGNO and ENDREGNO now unsigned. (find_regno_note, regno_use_in): Arg REGNO now unsigned. (find_regno_fusage): Likewise; also var REGNOTE now unsigned. (find_reg_fusage): Variables REGNO, END_REGNO, and I now unsigned. (replace_regs): Arg NREGS now unsigned. * sdbout.c (sdbout_parms, sdbout_reg_parms): Don't check REGNO < 0. * simplify-rtx.c (simplify_unary_operation): WIDTH now unsigned. (simplify_binary_operation): Likewise. (cselib_invalidate_regno): Arg REGNO and variables ENDREGNO, I, and THIS_LAST now unsigned. (cselib_record_set): Add cast. * ssa.c (ssa_max_reg_num): Now unsigned. (rename_block): REGNO now unsigned. * stmt.c (expand_return): Bit positions unsigned HOST_WIDE_INT; sizes now unsigned. (all_cases_count): Just return -1 not -2. COUNT, MINVAL, and LASTVAL now HOST_WIDE_INT. Rework tests to use trees whenever possible. Use host_integerp and tree_low_cst. (mark_seen_cases): COUNT arg now HOST_WIDE_INT; Likewise variable NEXT_NODE_OFFSET; XLO now unsigned. (check_for_full_enumeration_handing): BYTES_NEEDED, I to HOST_WIDE_INT. * stor-layout.c (mode_for_size): SIZE arg now unsigned. (smallest_mode_for_size): Likewise. (layout_decl): Simplify handing of a specified DECL_SIZE_UNIT. KNOWN_ALIGN is now an alignment, so simplify code. Don't turn off DECL_BIT_FIELD if field is BLKmode, but not type. (start_record_layout): Renamed from new_record_layout_info. Update to new fields. (debug_rli, normalize_rli, rli_size_unit_so_far, rli_size_so_far): New functions. (place_union_field): Renamed from layout_union_field. Update to use new fields in rli. (place_field): Renamed from layout_field. Major rewrite to use new fields in rli; pass alignment to layout_decl. (finalize_record_size): Rework to use new fields in rli and handle union. (compute_record_mode): Rework to simplify and to use new DECL fields. (finalize_type_size): Make rounding more consistent. (finish_union_layout): Deleted. (layout_type, case VOID_TYPE): Don't set TYPE_SIZE_UNIT either. (layout_type, case RECORD_TYPE): Call new function names. (initialize_sizetypes): Set TYPE_IS_SIZETYPE. (set_sizetype): Set TYPE_IS_SIZETYPE earlier. (get_best_mode): UNIT is now unsigned; remove casts. * tree.c (bit_position): Compute from new fields. (byte_position, int_byte_position): New functions. (print_type_hash_statistics): Cast to remove warning. (build_range_type): Use host_integerp and tree_low_cst to try to hash. (build_index_type): Likewise; make subtype of sizetype. (build_index_2_type): Pass sizetype to build_range_type. (build_common_tree_nodes): Use size_int and bitsize_int to initialize nodes; add bitsize_{zero,one,unit}_node. * tree.h (DECL_FIELD_CONTEXT): Use FIELD_DECL_CHECK. (DECL_BIT_FIELD_TYPE, DECL_QUALIFIER, DECL_FCONTEXT): Likewise. (DECL_PACKED, DECL_BIT_FIELD): Likewise. (DECL_FIELD_BITPOS): Deleted. (DECL_FIELD_OFFSET, DECL_FIELD_BIT_OFFSET): New fields. (DECL_RESULT, DECL_SAVED_INSNS): Use FUNCTION_DECL_CHECK. (DECL_FRAME_SIZE, DECL_FUNCTION_CODE, DECL_NO_STATIC_CHAIN): Likewise. (DECL_INLINE, DECL_BUILT_IN_NONANSI, DECL_IS_MALLOC): Likewise. (DECL_BUILT_IN_CLASS, DECL_STATIC_CONSTRUCTOR): Likewise. (DECL_STATIC_DESTRUCTOR, DECL_NO_CHECK_MEMORY_USAGE): Likewise. (DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT, DECL_NO_LIMIT_STACK) Likewise. (DECL_ORIGINAL_TYPE, TYPE_DECL_SUPPRESS_DEBUG): Use TYPE_DECL_CHECK. (DECL_ARG_TYPE_AS_WRITEN, DECL_ARG_TYPE): Use PARM_DECL_CHECK. (DECL_INCOMING_RTL, DECL_TRANSPARENT_UNION): Likewise. (DECL_ALIGN): Adjust to new field in union. (DECL_OFFSET_ALIGN): New field. (DECL_ERROR_ISSUED, DECL_TOO_LATE): Use LABEL_DECL_CHECK. (DECL_IN_TEXT_SECTION): Use VAR_DECL_CHECK. (union tree_decl): Add struct for both aligns. (enum tree_index): Add TI_BITSIZE_{ZERO,ONE,UNIT}. (bitsize_zero_node, bitsize_one_node, bitsize_unit_node): Added. (struct record_layout_info): Rework fields to have offset alignment and byte and bit position. (start_record_layout, place_field): Renamed from old names. (rli_size_so_far, rli_size_unit_so_far, normalize_rli): New decls. (byte_position, int_byte_position): Likewise. (get_inner_reference): Change types of position and length. * unroll.c (unroll_loop): New variable R; use for some loops. MAX_LOCAL_REGNUM and MAXREGNUM now unsigned. (calculate_giv_inc): Arg REGNO now unsigned. (copy_loop_body): REGNO and SRC_REGNO now unsigned. * varasm.c (assemble_variable): Clean up handling of size using host_integerp and tree_low_cst. (decode_addr_const): Use byte, not bit, position. (output_constructor): bitpos and offsets are HOST_WIDE_INT; use tree_low_cst and int_bit_position. * objc/objc-act.c (build_ivar_list_initializer): Use byte_position. * ch/actions.c (check_missing_cases): BYTES_NEEDED is HOST_WIDE_INT. * ch/typeck.c (expand_constant_to_buffer): Use int_byte_position. (extract_constant_from_buffer): Likewise. * cp/class.c (build_vbase_pointer_fields): layout_field now place_field. (get_vfield_offset): Use byte_position. (set_rtti_entry): Set OFFSET to ssizetype zero. (get_binfo_offset_as_int): Deleted. (dfs_record_base_offsets): Use tree_low_cst. (dfs_search_base_offsets): Likewise. (layout_nonempty_base_or_field): Reflect changes in RLI format and call byte_position. (layout_empty_base): Convert offset to ssizetype. (build_base_field): use rli_size_unit_so_far. (dfs_propagate_binfo_offsets): Do computation in proper type. (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets. (layout_class_type): Reflect changes in RLI names and fields. (finish_struct_1): Set DECL_FIELD_OFFSET. * cp/dump.c (dequeue_and_dump): Call bit_position. * cp/expr.c (cplus_expand_constant): Use byte_position. * cp/rtti.c (expand_class_desc): Use bitsize_one_node. * cp/typeck.c (build_component_addr): Use byte_position and don't special case for zero offset. * f/com.c (ffecom_tree_canonize_ptr_): Use bitsize_zero_node. (ffecom_tree_canonize_ref_): Likewise. * java/class.c (make_field_value): Use byte_position. * java/expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position. (java_array_data_offset): Likewise. * java/java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to bzero call. From-SVN: r32742
2000-03-25 19:34:13 +01:00
unsigned int i;
for (i = regno; i < end_regno; i++)
if (find_regno_fusage (insn, code, i))
return 1;
}
}
return 0;
}
/* Return true if REGNO, or any overlap of REGNO, of kind CODE is found
in the CALL_INSN_FUNCTION_USAGE information of INSN. */
int
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
find_regno_fusage (const_rtx insn, enum rtx_code code, unsigned int regno)
{
alias.c: Remove uses of "register" specifier in declarations of arguments and local... 2001-10-10 Stan Shebs <shebs@apple.com> * alias.c: Remove uses of "register" specifier in declarations of arguments and local variables. * c-common.c: Ditto. * c-convert.c: Ditto. * c-decl.c: Ditto. * c-format.c: Ditto. * c-semantics.c: Ditto. * c-typeck.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfgbuild.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * combine.c: Ditto. * convert.c: Ditto. * cppexp.c: Ditto. * cppfiles.c: Ditto. * cse.c: Ditto. * dbxout.c: Ditto. * defaults.h: Ditto. * df.c: Ditto. * dwarf2out.c: Ditto. * dwarfout.c: Ditto. * emit-rtl.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fix-header.c: Ditto. * floatlib.c: Ditto. * flow.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * gcc.c: Ditto. * gcse.c: Ditto. * gen-protos.c: Ditto. * genattrtab.c: Ditto. * gencheck.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * gengenrtl.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * gensupport.c: Ditto. * global.c: Ditto. * gmon.c: Ditto. * graph.c: Ditto. * haifa-sched.c: Ditto. * hard-reg-set.h: Ditto. * hash.c: Ditto. * integrate.c: Ditto. * jump.c: Ditto. * lists.c: Ditto. * local-alloc.c: Ditto. * loop.c: Ditto. * mips-tdump.c: Ditto. * mips-tfile.c: Ditto. * optabs.c: Ditto. * prefix.c: Ditto. * print-rtl.c: Ditto. * read-rtl.c: Ditto. * real.c: Ditto. * recog.c: Ditto. * reg-stack.c: Ditto. * regclass.c: Ditto. * regmove.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtl.c: Ditto. * rtlanal.c: Ditto. * scan.c: Ditto. * sched-deps.c: Ditto. * sched-rgn.c: Ditto. * sdbout.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tradcif.y: Ditto. * tradcpp.c: Ditto. * tree.c: Ditto. * unroll.c: Ditto. * varasm.c: Ditto. * xcoffout.c: Ditto. From-SVN: r46173
2001-10-11 05:16:15 +02:00
rtx link;
/* CALL_INSN_FUNCTION_USAGE information cannot contain references
to pseudo registers, so don't bother checking. */
if (regno >= FIRST_PSEUDO_REGISTER
alias.c (nonlocal_mentioned_p, [...]): Use, LABEL_P, JUMP_P, CALL_P, NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P. 2004-07-08 Jerry Quinn <jlquinn@optonline.net> * alias.c (nonlocal_mentioned_p, nonlocal_referenced_p, nonlocal_set_p, init_alias_analysis): Use, LABEL_P, JUMP_P, CALL_P, NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P. * bb-reorder.c (mark_bb_for_unlikely_executed_section, add_labels_and_missing_jumps, find_jump_block, fix_crossing_unconditional_branches, add_reg_crossing_jump_notes): Likewise. * bt-load.c (btr_referenced_p, compute_defs_uses_and_gen, link_btr_uses, move_btr_def): Likewise. * builtins.c (expand_builtin_longjmp, expand_builtin_nonlocal_goto, expand_builtin_expect_jump): Likewise. * caller-save.c (save_call_clobbered_regs, insert_one_insn): Likewise. * calls.c (expand_call, emit_library_call_value_1): Likewise. * cfganal.c (forwarder_block_p): Likewise. * cfgbuild.c (inside_basic_block_p, count_basic_blocks, make_label_edge, rtl_make_eh_edge, make_edges, find_basic_blocks_1, find_bb_boundaries): Likewise. * cfgcleanup.c (try_simplify_condjump, try_forward_edges, merge_blocks_move_predecessor_nojumps, merge_blocks_move_successor_nojumps, insns_match_p, flow_find_cross_jump, outgoing_edges_match, try_crossjump_to_edge, try_optimize_cfg): Likewise. * cfgexpand.c (expand_block, construct_exit_block): Likewise. * cfglayout.c (skip_insns_after_block, label_for_bb, record_effective_endpoints, insn_locators_initialize, fixup_reorder_chain, update_unlikely_executed_notes): Likewise. * cfgmainloop.c (create_loop_notes): Likewise. * cfgrtl.c (delete_insn, delete_insn_chain, create_basic_block_structure, rtl_delete_block, free_bb_for_insn, update_bb_for_insn, rtl_merge_blocks, rtl_can_merge_blocks, block_label, try_redirect_by_replacing_jump, last_loop_beg_note, redirect_branch_edge, force_nonfallthru_and_redirect, rtl_tidy_fallthru_edge, back_edge_of_syntactic_loop_p, rtl_split_edge, commit_one_edge_insertion, print_rtl_with_bb, update_br_prob_note, rtl_verify_flow_info_1, rtl_verify_flow_info, purge_dead_edges, cfg_layout_redirect_edge_and_branch, cfg_layout_delete_block, cfg_layout_can_merge_blocks_p, cfg_layout_merge_blocks, rtl_block_ends_with_call_p, need_fake_edge_p, rtl_flow_call_edges_add): Likewise. * combine.c (combine_instructions, can_combine_p, try_combine, find_split_point, record_dead_and_set_regs, reg_dead_at_p, distribute_notes, distribute_links, insn_cuid): Likewise. * cse.c (fold_rtx, cse_insn, cse_around_loop, invalidate_skipped_block, cse_set_around_loop, cse_end_of_basic_block, cse_main, cse_basic_block, cse_condition_code_reg): Likewise. * cselib.c (cselib_process_insn): Likewise. * ddg.c (create_ddg): Likewise. * df.c (df_insn_refs_record, df_bb_rd_local_compute, df_insns_modify): Likewise. * dwarf2out.c (dwarf2out_stack_adjust, dwarf2out_frame_debug, gen_label_die, dwarf2out_var_location): Likewise. * emit-rtl.c (get_first_nonnote_insn, get_last_nonnote_insn, next_insn, previous_insn, next_nonnote_insn, prev_nonnote_insn, last_call_insn, active_insn_p, next_label, prev_label, link_cc0_insns, next_cc0_user, try_split, add_insn_after, add_insn_before, remove_insn, add_function_usage_to, reorder_insns, find_line_note, remove_unnecessary_notes, emit_insn_after_1, classify_insn): Likewise. * except.c (convert_from_eh_region_ranges_1, emit_to_new_bb_before, connect_post_landing_pads, sjlj_mark_call_sites, sjlj_emit_function_enter, sjlj_emit_function_exit, reachable_handlers, can_throw_internal, can_throw_external, set_nothrow_function_flags, convert_to_eh_region_ranges): Likewise. * explow.c (optimize_save_area_alloca): Likewise. * expr.c (expand_expr_real): Likewise. * final.c (insn_current_reference_address, compute_alignments, shorten_branches, final, scan_ahead_for_unlikely_executed_note, final_scan_insn, output_asm_label, leaf_function_p): Likewise. * flow.c (first_insn_after_basic_block_note, delete_dead_jumptables, propagate_block_delete_insn, propagate_one_insn, init_propagate_block_info, propagate_block, libcall_dead_p, mark_set_1, attempt_auto_inc, find_auto_inc, try_pre_increment): Likewise. * function.c (instantiate_virtual_regs, reorder_blocks_1, expand_function_start, expand_function_end, contains, thread_prologue_and_epilogue_insns, reposition_prologue_and_epilogue_notes): Likewise. * gcse.c (constprop_register, bypass_conditional_jumps, insert_insn_end_bb, gcse_after_reload): Likewise. * genemit.c (gen_expand, gen_split): Likewise. * genpeep.c (gen_peephole, main): Likewise. * global.c (build_insn_chain): Likewise. * graph.c (node_data, print_rtl_graph_with_bb): Likewise. * haifa-sched.c (unlink_other_notes, unlink_line_notes, get_block_head_tail, no_real_insns_p, rm_line_notes, save_line_notes, restore_line_notes, rm_redundant_line_notes, rm_other_notes, ok_for_early_queue_removal, set_priorities, sched_init): Likewise. * ifcvt.c (count_bb_insns, first_active_insn, last_active_insn, cond_exec_process_insns, end_ifcvt_sequence, noce_process_if_block, merge_if_block, block_jumps_and_fallthru_p, find_if_block, dead_or_predicable): Likewise. * integrate.c (try_constants): Likewise. * jump.c (rebuild_jump_labels, cleanup_barriers, purge_line_number_notes, init_label_info, mark_all_labels, squeeze_notes, get_label_before, get_label_after, reversed_comparison_code_parts, simplejump_p, pc_set, returnjump_p, onlyjump_p, follow_jumps, mark_jump_label, delete_barrier, delete_prior_computation, delete_computation, delete_related_insns, delete_for_peephole, redirect_jump): Likewise. * lcm.c (optimize_mode_switching): Likewise. * local-alloc.c (validate_equiv_mem, update_equiv_regs, block_alloc): Likewise. * loop-doloop.c (doloop_valid_p, doloop_optimize): Likewise. * loop-invariant.c (find_exits, find_invariants_bb): Likewise. * loop-iv.c (simplify_using_assignment): Likewise. * loop.c (compute_luids, loop_optimize, scan_loop, libcall_other_reg, libcall_benefit, skip_consec_insns, move_movables, prescan_loop, find_and_verify_loops, labels_in_range_p, for_each_insn_in_loop, loop_bivs_init_find, strength_reduce, check_insn_for_bivs, check_insn_for_givs, check_final_value, update_giv_derive, basic_induction_var, product_cheap_p, check_dbra_loop, loop_insn_first_p, last_use_this_basic_block, canonicalize_condition, get_condition, loop_regs_scan, load_mems, try_copy_prop, LOOP_BLOCK_NUM, loop_dump_aux): Likewise. * modulo-sched.c (doloop_register_get, find_line_note, sms_schedule, sms_schedule_by_order): Likewise. * optabs.c (emit_no_conflict_block, emit_libcall_block): Likewise. * postreload.c (reload_cse_simplify_operands, reload_combine, reload_cse_move2add): Likewise. * predict.c (can_predict_insn_p, estimate_probability, expected_value_to_br_prob, process_note_predictions): Likewise. * print-rtl.c (print_rtx, print_rtl, print_rtl_single): Likewise. * profile.c (branch_prob): Likewise. * ra-build.c (live_out_1, livethrough_conflicts_bb, detect_webs_set_in_cond_jump): Likewise. * ra-debug.c (ra_print_rtx_object, ra_debug_insns, ra_print_rtl_with_bb): Likewise. * ra-rewrite.c (insert_stores, rewrite_program2): Likewise. * recog.c (next_insn_tests_no_inequality, find_single_use, split_all_insns, peephole2_optimize, if_test_bypass_p): Likewise. * reg-stack.c (next_flags_user, record_label_references, emit_swap_insn, swap_rtx_condition, subst_stack_regs, compensate_edge, convert_regs_1): Likewise. * regclass.c (scan_one_insn): Likewise. * regmove.c (optimize_reg_copy_1, optimize_reg_copy_2, fixup_match_2, regmove_optimize, fixup_match_1, single_set_for_csa, combine_stack_adjustments_for_block): Likewise. * regrename.c (build_def_use, copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads, find_reloads_address_1, subst_reloads, find_equiv_reg): Likewise. * reload1.c (reload, calculate_needs_all_insns, set_label_offsets, reload_as_needed, emit_input_reload_insns, do_output_reload, delete_output_reload, delete_address_reloads_1, fixup_abnormal_edges): Likewise. * reorg.c (find_end_label, emit_delay_sequence, delete_from_delay_slot, delete_scheduled_jump, optimize_skip, get_jump_flags, rare_destination, mostly_true_jump, try_merge_delay_insns, redundant_insn, own_thread_p, fill_simple_delay_slots, fill_slots_from_thread, fill_eager_delay_slots, relax_delay_slots, make_return_insns, dbr_schedule): Likewise. * resource.c (find_basic_block, next_insn_no_annul, find_dead_or_set_registers, mark_target_live_regs): Likewise. * rtl.h (RTX_PREV): Likewise. * rtlanal.c (global_reg_mentioned_p, no_labels_between_p, no_jumps_between_p, reg_used_between_p, reg_referenced_between_p, reg_set_p, find_last_value, dead_or_set_regno_p, find_reg_fusage, find_regno_fusage, pure_call_p, replace_label, rtx_referenced_p_1, tablejump_p, computed_jump_p, insns_safe_to_move_p, find_first_parameter_load, can_hoist_insn_p): Likewise. * sched-deps.c (get_condition, add_dependence, sched_analyze_2, sched_analyze_insn, sched_analyze, add_forward_dependence): Likewise. * sched-ebb.c (fix_basic_block_boundaries, add_deps_for_risky_insns, schedule_ebbs): Likewise. * sched-rgn.c (is_cfg_nonregular, find_conditional_protection, is_conditionally_protected, can_schedule_ready_p, add_branch_dependences, debug_dependencies): Likewise. * stmt.c (emit_nop, expand_start_case, emit_jump_if_reachable): Likewise. * unroll.c (unroll_loop, copy_loop_body, back_branch_in_range_p, reg_dead_after_loop, loop_find_equiv_value, loop_iterations, set_dominates_use, ujump_to_loop_cont): Likewise. * var-tracking.c (prologue_stack_adjust, vt_initialize): Likewise. * varasm.c (output_constant_pool_1): Likewise. From-SVN: r84341
2004-07-09 05:29:35 +02:00
|| !CALL_P (insn) )
return 0;
for (link = CALL_INSN_FUNCTION_USAGE (insn); link; link = XEXP (link, 1))
{
* Rework fields used to describe positions of bitfields and modify sizes to be unsigned and use HOST_WIDE_INT. * alias.c (reg_known_value_size): Now unsigned. * c-typeck.c (build_unary_op, case ADDR_EXPR): Use byte_position. (really_start_incremental_init): Use bitsize_zero_node. (push_init_level, pop_init_level, output_init_element): Likewise. Use bitsize_unit_node and bitsize_one_node. (output_pending_init_elements, process_init_element): Likewise. * combine.c (combine_max_regno, reg_sign_bit_copies): Now unsigned. (make_extraction): Position and length HOST_WIDE_INT and unsigned HOST_WIDE_INT, respectively. (get_pos_from_mask): Passed in value is unsigned HOST_WIDE_INT. (num_sign_bit_copies): Returns unsigned. BITWIDTH now unsigned; rework arithmetic. Remove recursive call from arg to MAX. (combine_instructions, init_reg_last_arrays): NREGS now unsigned. (setup_incoming_promotions, can_combine_p, try_combine, simplify_set): REGNO now unsigned. (set_nonzero_bit_and_sign_copies): NUM now unsigned. (find_split_point, expand_compound_operation, make_extraction): LEN now unsigned HOST_WIDE_INT, POS now HOST_WIDE_INT. (make_field_assignment): Likewise. (combine_simplify_rtx): Add cast. (expand_compound_operation): MODEWIDTH now unsigned; rework arithmetic. (force_to_mode): WIDTH now unsigned; add cast. (if_then_else_cond): SIZE now unsigned. (nonzero_bits): MODE_WIDTH, RESULT_WIDTH, and WIDTH now unsigned. (extended_count): Now returns unsigned. (simplify_shift_const): COUNT unsigned; arg is now INPUT_COUNT. Add SIGNED_COUNT variable; MODE_WORDS and FIRST_COUNT now unsigned. (simplify_comparison): MODE_WIDTH now unsigned. (update_table_tick): REGNO and ENDREGNO now unsigned; new var R. (mark_used_regs_combine): Likewise; rework arithmetic. (record_value_for_reg): REGNO, ENDREGNO, and I now unsigned. (record_dead_and_set_regs, reg_dead_at_p, distribute_notes): Likewise. (record_promoted_value): REGNO now unsigned. (get_last_value_validate): REGNO, ENDREGNO, and J now unsigned. (get_last_value): REGNO now unsigned. (use_crosses_set_p): REGNO and ENDREGNO now unsigned. (reg_dead_regno, reg_dead_endregno): Now unsigned. (remove_death): Arg REGNO now unsigned. (move_deaths): REGNO, DEADREGNO, DEADEND, OUREND, and I now unsigned. (reg_bitfield_target_p): REGNO, REGNO, ENDREGNO, and ENDTREGNO now unsigned. * convert.c (convert_to_integer): INPREC and OUTPREC now unsigned. * cse.c (struct qty_table_elem): FIRST_REG and LAST_REG now unsigned. (struct cse_reg_info): REGNO now unsigned. (cached_regno): Now unsigned. (REGNO_QTY_VALID_P): Add cast. (make_new_qty, make_regs_eqv, delete_reg_eqiv): Regno args unsigned. (remove_invalid_regs): Likewise. (remove_invalid_subreg_refs): Likewise; arg WORD also unsigned as are variables END and I. (get_cse_reg_info, insert): Likewise. (mention_regs, invalidate_for_call): REGNO, ENDREGNO, and I unsigned. (canon_hash): Likewise. (insert_regs, lookup_for_remove): REGNO now unsigned. (invalidate): REGNO, ENDREGNO, TREGNO, and TENDREGNO now unsigned. New variable RN. * dbxout.c (dbxout_parms, dbxout_reg_parms): Don't check for REGNO < 0. * dwarf2out.c (dwarf2ou_frame_debug_expr): Remove cast. * emit-rtl.c (subreg_realpart_p): Add cast. (operand_subword): Arg I is now unsigned as is var PARTWORDS. (operand_subword_force): Arg I is now unsigned. * except.c (eh_regs): Variable I is now unsigned. * explow.c (hard_function_value): BYTES is unsigned HOST_WIDE_INT. * expmed.c (store_fixed_bit_field): Position is HOST_WIDE_INT; length is unsigned HOST_WIDE_INT; likewise for internal variables. (store_split_bit_field, extract_fixed_bit_field): Likewise. (extract_split_bit_field, store_bit_field, extract_bit_field): Likewise. * expr.c (store_constructor_fields, store_constructor, store_field): Positions are HOST_WIDE_INT and lengths are unsigned HOST_WIDE_INT. (expand_assignment, expand_expr, expand_expr_unaligned): Likewise. (do_jump): Likewise. (move_by_pieces, move_by_pieces_ninsns, clear_by_pieces): MAX_SIZE is now unsigned. (emit_group_load): BYTEPOS is HOST_WIDE_INT; BYTELEN is unsigned. (emit_group_store): Likewise. (emit_move_insn): I now unsigned. (store_constructor): Use host_integerp, tree_low_cst, and bitsize_unit_node. (get_inner_reference): Return bitpos and bitsize as HOST_WIDE_INT. Rework all calculations to use trees and new fields. * expr.h (promoted_input_arg): Regno now unsigned. (store_bit_field, extract_bit_field): Adjust types of pos and size. (mark_seen_cases): Arg is HOST_WIDE_INT. * flow.c (verify_wide_reg_1): REGNO now unsigned. * fold-const.c (decode_field_reference): Size and pos HOST_WIDE_INT; precisions and alignments are unsigned. (optimize_bit_field_compare, fold_truthop): Likewise. (int_const_binop): Adjust threshold for size_int_type_wide call. (fold_convert): Likewise. (size_int_type_wide): Make table larger and fix thinko that only had half of table used. (all_ones_mask_p, fold): Precisions are unsigned. * function.c (put_reg_info_stack): REGNO is unsigned. (instantiate_decl): Size is HOST_WIDE_INT. (instantiate_virtual_regs): I is unsigned. (assign_parms): REGNO, REGNOI, and REGNOR are unsigned. (promoted_input_arg): REGNO is unsigned. * function.h (struct function): x_max_parm_reg is now unsigned. * gcse.c (max_gcse_regno): Now unsigned. (struct null_pointer_info): min_reg and max_reg now unsigned. (lookup_set, next_set): REGNO arg now unsigned. (compute_hash_table): REGNO and I now unsigned. (handle_avail_expr): regnum_for_replacing now unsigned. (cprop_insn): REGNO now unsigned. (delete_null_pointer_checks_1): BLOCK_REG now pointer to unsigned. * ggc-common.c (ggc_mark_tree_children, case FIELD_DECL): New case. * global.c (set_preference): SRC_REGNO, DEST_REGNO, and I now unsigned. * hard-reg-set.h (reg_class_size): Now unsigned. * integrate.c (mark_stores): LAST_REG and I now unsigned; new UREGNO. * jump.c (mark_modified_reg): I now unsigned; add cast. (rtx_equal_for_thread_p): Add cast. * loop.c (max_reg_before_loop): Now unsigned. (struct_movable): REGNO now unsigned. (try_copy_prop): REGNO arg unsigned. (regs_match_p): XN and YN now unsigned. (consec_sets_invariant_p, maybe_eliminate_biv): REGNO now unsigned. (strength_reduce): Likewise; NREGS also unsigned. (first_increment_giv, last_increment_giv unsigned): Now unsigned. * loop.h (struct iv_class): REGNO now unsigned. (max_reg_before_loop, first_increment_giv, last_increment_giv): Now unsigned. * machmode.h (mode_size, mode_unit_size): Now unsigned. (mode_for_size, smallest_mode_for_size): Pass size as unsigned. * optabs.c (expand_binop): I and NWORDS now unsigned. (expand_unop): I now unsigned. * print-tree.c (print_node): Don't print DECL_FIELD_BITPOS, but do print DECL_FIELD_OFFSET and DECL_FIELD_BIT_OFFSET. * real.c (significand_size): Now returns unsigned. * real.h (significand_size): Likewise. * regclass.c (reg_class_size): Now unsigned. (choose_hard_reg_mode): Both operands now unsigned. (record_reg_classes): REGNO and NR now unsigned. (reg_scan): NREGS now unsigned. (reg_scan_update): old_max_regno now unsigned. (reg_scan_mark_refs): Arg MIN_REGNO and var REGNO now unsigned. * reload.c (find_valid_class): BEST_SIZE now unsigned. (find_dummy_reload): REGNO, NWORDS, and I now unsigned. (hard_reg_set_here_p): Args BEG_REGNO and END_REGNO now unsigned. Likewise for variable R. (refers_to_regno_for_reload_p): Args REGNO and END_REGNO now unsigned, as are variables INNER_REGNO and INNER_ENDREGNO; add new variable R. (find_equiv_reg): Add casts. (regno_clobbered_p): Arg REGNO now unsigned. * reload.h (struct reload): NREGS now unsigned. (refers_to_regno_for_reload_p): Regno args are unsigned. (regno_clobbered_p): Likewise. * reload1.c (reg_max_ref_width, spill_stack_slot_width): Now unsigned. (compute_use_by_pseudos): REGNO now unsigned. (find_reg): I and J now unsigned, new variable K, and change loop variables accordingly; THIS_NREGS now unsigned. (alter_reg): INHERENT_SIZE and TOTAL_SIZE now unsigned. (spill_hard_reg): REGNO arg now unsigned; add casts. (forget_old_reloads_1): REGNO, NR, and I now unsigned. (mark_reload_reg_in_use): Arg REGNO and vars NREGS and I now unsigned. (clear_reload_reg_in_use): Arg REGNO and vars NREGS, START_REGNO, END_REGNO, CONFLICT_START, and CONFLICT_END now unsigned. (reload_reg_free_p, reload_reg_reaches_end_p): Arg REGNO now unsigned. (choose_reload_regs): MAX_GROUP_SIZE now unsigned. (emit_reload_insns): REGNO now unsigned. (reload_cse_move2add): Add cast. (move2add_note_store): REGNO and I now unsigned; new variable ENDREGNO and rework loop. * resource.c (mark_referenced_resources, mark_set_resources): New variable R; REGNO and LAST_REGNO now unsigned. (mark_target_live_regs): J and REGNO now unsigned. * rtl.c (mode_size, mode_unit_size): Now unsigned. * rtl.h (union rtunion_def): New field rtuint. (XCUINT): New macro. (ADDRESSOF_REGNO, REGNO, SUBREG_WORD): New XCUINT. (operand_subword, operand_subword_force): Word number is unsigned. (choose_hard_reg_mode): Operands are unsigned. (refers_to-regno_p, dead_or_set_regno_p): Regno arg is unsigned. (find_regno_note, find_regno_fusage, replace_regs): Likewise. (regno_use_in, combine_instructions, remove_death): Likewise. (reg_scan, reg_scan_update): Likewise. (extended_count): Return is unsigned. * rtlanal.c (refers_to_regno_p): Args REGNO and ENDREGNO and vars I, INNER_REGNO, and INNER_ENDREGNO now unsigned; new variable X_REGNO. (reg_overlap_mentioned_p): REGNO and ENDREGNO now unsigned. (reg_set_last_first_regno, reg_set_last_last_regno): Now unsigned. (reg_reg_last_1): FIRS and LAST now unsigned. (dead_or_set_p): REGNO, LAST_REGNO, and I now unsigned. (dead_or_set_regno_p): Arg TEST_REGNO and vars REGNO and ENDREGNO now unsigned. (find_regno_note, regno_use_in): Arg REGNO now unsigned. (find_regno_fusage): Likewise; also var REGNOTE now unsigned. (find_reg_fusage): Variables REGNO, END_REGNO, and I now unsigned. (replace_regs): Arg NREGS now unsigned. * sdbout.c (sdbout_parms, sdbout_reg_parms): Don't check REGNO < 0. * simplify-rtx.c (simplify_unary_operation): WIDTH now unsigned. (simplify_binary_operation): Likewise. (cselib_invalidate_regno): Arg REGNO and variables ENDREGNO, I, and THIS_LAST now unsigned. (cselib_record_set): Add cast. * ssa.c (ssa_max_reg_num): Now unsigned. (rename_block): REGNO now unsigned. * stmt.c (expand_return): Bit positions unsigned HOST_WIDE_INT; sizes now unsigned. (all_cases_count): Just return -1 not -2. COUNT, MINVAL, and LASTVAL now HOST_WIDE_INT. Rework tests to use trees whenever possible. Use host_integerp and tree_low_cst. (mark_seen_cases): COUNT arg now HOST_WIDE_INT; Likewise variable NEXT_NODE_OFFSET; XLO now unsigned. (check_for_full_enumeration_handing): BYTES_NEEDED, I to HOST_WIDE_INT. * stor-layout.c (mode_for_size): SIZE arg now unsigned. (smallest_mode_for_size): Likewise. (layout_decl): Simplify handing of a specified DECL_SIZE_UNIT. KNOWN_ALIGN is now an alignment, so simplify code. Don't turn off DECL_BIT_FIELD if field is BLKmode, but not type. (start_record_layout): Renamed from new_record_layout_info. Update to new fields. (debug_rli, normalize_rli, rli_size_unit_so_far, rli_size_so_far): New functions. (place_union_field): Renamed from layout_union_field. Update to use new fields in rli. (place_field): Renamed from layout_field. Major rewrite to use new fields in rli; pass alignment to layout_decl. (finalize_record_size): Rework to use new fields in rli and handle union. (compute_record_mode): Rework to simplify and to use new DECL fields. (finalize_type_size): Make rounding more consistent. (finish_union_layout): Deleted. (layout_type, case VOID_TYPE): Don't set TYPE_SIZE_UNIT either. (layout_type, case RECORD_TYPE): Call new function names. (initialize_sizetypes): Set TYPE_IS_SIZETYPE. (set_sizetype): Set TYPE_IS_SIZETYPE earlier. (get_best_mode): UNIT is now unsigned; remove casts. * tree.c (bit_position): Compute from new fields. (byte_position, int_byte_position): New functions. (print_type_hash_statistics): Cast to remove warning. (build_range_type): Use host_integerp and tree_low_cst to try to hash. (build_index_type): Likewise; make subtype of sizetype. (build_index_2_type): Pass sizetype to build_range_type. (build_common_tree_nodes): Use size_int and bitsize_int to initialize nodes; add bitsize_{zero,one,unit}_node. * tree.h (DECL_FIELD_CONTEXT): Use FIELD_DECL_CHECK. (DECL_BIT_FIELD_TYPE, DECL_QUALIFIER, DECL_FCONTEXT): Likewise. (DECL_PACKED, DECL_BIT_FIELD): Likewise. (DECL_FIELD_BITPOS): Deleted. (DECL_FIELD_OFFSET, DECL_FIELD_BIT_OFFSET): New fields. (DECL_RESULT, DECL_SAVED_INSNS): Use FUNCTION_DECL_CHECK. (DECL_FRAME_SIZE, DECL_FUNCTION_CODE, DECL_NO_STATIC_CHAIN): Likewise. (DECL_INLINE, DECL_BUILT_IN_NONANSI, DECL_IS_MALLOC): Likewise. (DECL_BUILT_IN_CLASS, DECL_STATIC_CONSTRUCTOR): Likewise. (DECL_STATIC_DESTRUCTOR, DECL_NO_CHECK_MEMORY_USAGE): Likewise. (DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT, DECL_NO_LIMIT_STACK) Likewise. (DECL_ORIGINAL_TYPE, TYPE_DECL_SUPPRESS_DEBUG): Use TYPE_DECL_CHECK. (DECL_ARG_TYPE_AS_WRITEN, DECL_ARG_TYPE): Use PARM_DECL_CHECK. (DECL_INCOMING_RTL, DECL_TRANSPARENT_UNION): Likewise. (DECL_ALIGN): Adjust to new field in union. (DECL_OFFSET_ALIGN): New field. (DECL_ERROR_ISSUED, DECL_TOO_LATE): Use LABEL_DECL_CHECK. (DECL_IN_TEXT_SECTION): Use VAR_DECL_CHECK. (union tree_decl): Add struct for both aligns. (enum tree_index): Add TI_BITSIZE_{ZERO,ONE,UNIT}. (bitsize_zero_node, bitsize_one_node, bitsize_unit_node): Added. (struct record_layout_info): Rework fields to have offset alignment and byte and bit position. (start_record_layout, place_field): Renamed from old names. (rli_size_so_far, rli_size_unit_so_far, normalize_rli): New decls. (byte_position, int_byte_position): Likewise. (get_inner_reference): Change types of position and length. * unroll.c (unroll_loop): New variable R; use for some loops. MAX_LOCAL_REGNUM and MAXREGNUM now unsigned. (calculate_giv_inc): Arg REGNO now unsigned. (copy_loop_body): REGNO and SRC_REGNO now unsigned. * varasm.c (assemble_variable): Clean up handling of size using host_integerp and tree_low_cst. (decode_addr_const): Use byte, not bit, position. (output_constructor): bitpos and offsets are HOST_WIDE_INT; use tree_low_cst and int_bit_position. * objc/objc-act.c (build_ivar_list_initializer): Use byte_position. * ch/actions.c (check_missing_cases): BYTES_NEEDED is HOST_WIDE_INT. * ch/typeck.c (expand_constant_to_buffer): Use int_byte_position. (extract_constant_from_buffer): Likewise. * cp/class.c (build_vbase_pointer_fields): layout_field now place_field. (get_vfield_offset): Use byte_position. (set_rtti_entry): Set OFFSET to ssizetype zero. (get_binfo_offset_as_int): Deleted. (dfs_record_base_offsets): Use tree_low_cst. (dfs_search_base_offsets): Likewise. (layout_nonempty_base_or_field): Reflect changes in RLI format and call byte_position. (layout_empty_base): Convert offset to ssizetype. (build_base_field): use rli_size_unit_so_far. (dfs_propagate_binfo_offsets): Do computation in proper type. (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets. (layout_class_type): Reflect changes in RLI names and fields. (finish_struct_1): Set DECL_FIELD_OFFSET. * cp/dump.c (dequeue_and_dump): Call bit_position. * cp/expr.c (cplus_expand_constant): Use byte_position. * cp/rtti.c (expand_class_desc): Use bitsize_one_node. * cp/typeck.c (build_component_addr): Use byte_position and don't special case for zero offset. * f/com.c (ffecom_tree_canonize_ptr_): Use bitsize_zero_node. (ffecom_tree_canonize_ref_): Likewise. * java/class.c (make_field_value): Use byte_position. * java/expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position. (java_array_data_offset): Likewise. * java/java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to bzero call. From-SVN: r32742
2000-03-25 19:34:13 +01:00
rtx op, reg;
if (GET_CODE (op = XEXP (link, 0)) == code
alias.c (record_set, [...]): Use REG_P. 2004-06-15 Jerry Quinn <jlquinn@optonline.net> * alias.c (record_set, record_base_value, canon_rtx, get_addr, nonlocal_mentioned_p_1, init_alias_analysis): Use REG_P. * bt-load.c (find_btr_reference, insn_sets_btr_p, note_btr_set): Likewise. * builtins.c (expand_builtin_setjmp, expand_builtin_apply, expand_builtin_mathfn, expand_builtin_strlen, expand_builtin_memcmp, expand_builtin_strcmp, expand_builtin_strncmp, expand_builtin_frame_address): Likewise. * caller-save.c (mark_set_regs, add_stored_regs, mark_referenced_regs, insert_one_insn): Likewise. * calls.c (prepare_call_address, precompute_register_parameters, precompute_arguments, expand_call, emit_library_call_value_1): Likewise. * cfganal.c (flow_active_insn_p): Likewise. * combine.c (set_nonzero_bits_and_sign_copies, can_combine_p, combinable_i3pat, try_combine, find_split_point, COMBINE_RTX_EQUAL_P, subst, combine_simplify_rtx, simplify_if_then_else, simplify_set, make_extraction, recog_for_combine, gen_lowpart_for_combine, simplify_comparison, record_dead_and_set_regs_1, record_dead_and_set_regs, record_promoted_value, check_promoted_subreg, get_last_value_validate, get_last_value, reg_dead_at_p_1, reg_bitfield_target_p, distribute_notes, unmentioned_reg_p_1): Likewise. * conflict.c (mark_reg): Likewise. * cse.c (HASH, COST, COST_IN, approx_reg_cost_1, notreg_cost, mention_regs, insert_regs, lookup, lookup_for_remove, insert, merge_equiv_classes, flush_hash_table, invalidate, remove_invalid_refs, remove_invalid_subreg_refs, rehash_using_reg, invalidate_for_call, use_related_value, canon_hash, exp_equiv_p, cse_rtx_varies_p, canon_reg, find_best_addr, fold_rtx, equiv_constant, record_jump_cond, cse_insn, addr_affects_sp_p, invalidate_from_clobbers, cse_process_notes, cse_around_loop, cse_set_around_loop, count_reg_usage, set_live_p, cse_change_cc_mode, cse_cc_succs, cse_condition_code_reg): Likewise. * cselib.c (cselib_reg_set_mode, rtx_equal_for_cselib_p, cselib_lookup, cselib_invalidate_regno, cselib_invalidate_rtx, cselib_record_set, cselib_record_sets): Likewise. * dbxout.c (dbxout_symbol_location, dbxout_parms, dbxout_reg_parms, dbxout_block): Likewise. * df.c (df_ref_record, df_def_record_1, df_uses_record): Likewise. * dojump.c (do_jump): Likewise. * dwarf2out.c (dwarf2out_frame_debug_expr, is_pseudo_reg, is_based_loc, rtl_for_decl_location): Likewise. * emit-rtl.c (set_reg_attrs_for_parm, set_decl_rtl, set_decl_incoming_rtl, mark_user_reg): Likewise. * explow.c (copy_all_regs, copy_all_regs, memory_address, force_reg, copy_to_suggested_reg, allocate_dynamic_stack_space, probe_stack_range, hard_function_value): Likewise. * expmed.c (store_bit_field, store_fixed_bit_field, store_split_bit_field, extract_bit_field, extract_fixed_bit_field, extract_split_bit_field, expand_divmod, emit_store_flag_force): Likewise. * expr.c (convert_move, convert_modes, block_move_libcall_safe_for_call_parm, emit_group_load, use_reg, use_group_regs, emit_move_insn, emit_move_insn_1, compress_float_constant, push_block, emit_single_push_insn, emit_push_insn, get_subtarget, expand_assignment, store_expr, store_constructor, store_field, force_operand, safe_from_p, expand_expr_real_1, expand_increment, do_store_flag, do_tablejump): Likewise. * final.c (profile_function, final_scan_insn, alter_subreg, get_mem_expr_from_op, output_asm_operand_names, output_operand, only_leaf_regs_used, leaf_renumber_regs_insn): Likewise. * flow.c (verify_wide_reg_1, mark_regs_live_at_end, find_regno_partial, propagate_one_insn, init_propagate_block_info, insn_dead_p, libcall_dead_p, mark_set_1, not_reg_cond, attempt_auto_inc, find_auto_inc, mark_used_regs, count_or_remove_death_notes_bb): Likewise. * function.c (find_temp_slot_from_address, update_temp_slot_address, preserve_temp_slots, put_var_into_stack, fixup_var_refs_insn, fixup_var_refs_1, fixup_stack_1, optimize_bit_field, flush_addressof, put_addressof_into_stack, purge_addressof_1, insns_for_mem_walk, purge_single_hard_subreg_set, instantiate_decl, instantiate_virtual_regs_1, aggregate_value_p, assign_parms, promoted_input_arg, setjmp_vars_warning, setjmp_args_warning, setjmp_protect, setjmp_protect_args, fix_lexical_addr, expand_function_start, diddle_return_value, clobber_return_register, expand_function_end, keep_stack_depressed, handle_epilogue_set, update_epilogue_consts): Likewise. * genemit.c (gen_exp, gen_insn): Likewise. * genrecog.c (make_insn_sequence): Likewise. * global.c (global_conflicts, expand_preferences, mark_reg_store, mark_reg_conflicts, set_preference, reg_becomes_live, build_insn_chain, mark_reg_change): Likewise. * haifa_sched.c (CONST_BASED_ADDRESS_P, find_set_reg_weight): Likewise. * ifcvt.c (noce_try_abs, noce_get_condition, noce_process_if_block): Likewise. * integrate.c (copy_rtx_and_substitute, try_constants, subst_constants, mark_stores, allocate_initial_values): Likewise. * jump.c (reversed_comparison_code_parts, delete_prior_computation, delete_computation, rtx_renumbered_equal_p, true_regnum, reg_or_subregno): Likewise. * lcm.c (reg_dies, reg_becomes_live): Likewise. * local-alloc.c (validate_equiv_mem_from_store, validate_equiv_mem, update_equiv_regs, no_equiv, block_alloc, combine_regs, reg_is_set, wipe_dead_reg, no_conflict_p): Likewise. * loop-iv.c (simple_reg_p, simple_set_p, kill_sets, iv_get_reaching_def, iv_analyze_biv, altered_reg_used, mark_altered, simple_rhs_p, simplify_using_assignment, implies_p): Likewise. * loop.c (scan_loop, combine_movables, rtx_equal_for_loop_p, move_movables, note_set_pseudo_multiple_uses, consec_sets_invariant_p, find_single_use_in_loop, count_one_set, loop_bivs_init_find, loop_givs_rescan, check_insn_for_bivs, check_insn_for_givs, valid_initial_value_p, simplify_giv_expr, consec_sets_giv, loop_regs_update, check_dbra_loop, maybe_eliminate_biv, maybe_eliminate_biv_1, record_initial, update_reg_last_use, canonicalize_condition, loop_regs_scan, load_mems, try_copy_prop, try_swap_copy_prop): Likewise. * optabs.c (expand_binop, expand_vector_binop, expand_vector_unop, expand_abs, emit_no_conflict_block, emit_libcall_block, expand_float): Likewise. * postreload.c (reload_cse_simplify, reload_cse_simplify_set, reload_cse_simplify_operands, reload_combine, reload_combine_note_store, reload_combine_note_use, reload_cse_move2add, move2add_note_store): Likewise. * print-rtl.c (print_rtx): Likewise. * ra-build.c (copy_insn_p, remember_move, init_one_web_common, contains_pseudo, handle_asm_insn): Likewise. * ra-debug.c (ra_print_rtx_object, dump_constraints, dump_static_insn_cost): Likewise. * ra-rewrite.c (slots_overlap_p, emit_colors, remove_suspicious_death_notes): Likewise. * recog.c (validate_replace_rtx_1, find_single_use_1, find_single_use, register_operand, scratch_operand, nonmemory_operand, constrain_operands): Likewise. * reg-stack (check_asm_stack_operands, remove_regno_note, emit_swap_insn, swap_rtx_condition, subst_stack_regs_pat, subst_asm_stack_regs): Likewise. * regclass.c (scan_one_insn, record_reg_classes, copy_cost, record_address_regs, reg_scan_mark_refs): Likewise. * regmove.c (discover_flags_reg, replacement_quality, copy_src_to_dest, reg_is_remote_constant_p, regmove_optimize, fixup_match_1): Likewise. * regrename.c (note_sets, clear_dead_regs, build_def_use, kill_value, kill_set_value, copyprop_hardreg_forward_1): Likewise. * reload.c (MATCHES, push_secondary_reload, find_reusable_reload, reload_inner_reg_of_subreg, can_reload_into, push_reload, combine_reloads, find_dummy_reload, hard_reg_set_here_p, operands_match_p, decompose, find_reloads, find_reloads_toplev, find_reloads_address, subst_indexed_address, find_reloads_address_1, find_reloads_subreg_address, find_replacement, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p, find_equiv_reg, regno_clobbered_p): Likewise. * reload1.c (replace_pseudos_in, reload, calculate_needs_all_insns, find_reg, delete_dead_insn, alter_reg, eliminate_regs, elimination_effects, eliminate_regs_in_insn, scan_paradoxical_subregs, forget_old_reloads_1, reload_reg_free_for_value_p, choose_reload_regs, emit_input_reload_insns, emit_output_reload_insns, do_input_reload, do_output_reload, emit_reload_insns, gen_reload, delete_address_reloads_1, inc_for_reload): Likewise. * reorg.c (update_reg_dead_notes, fix_reg_dead_note, update_reg_unused_notes, fill_slots_from_thread): Likewise. * resource.c (update_live_status, mark_referenced_resources, mark_set_resources, mark_target_live_regs): Likewise. * rtlanal.c (nonzero_address_p, get_jump_table_offset, global_reg_mentioned_p_1, reg_mentioned_p, reg_referenced_p, reg_set_p, set_noop_p, find_last_value, refers_to_regno_p, note_stores, dead_or_set_p, dead_or_set_regno_p, find_regno_note, find_reg_fusage, find_regno_fusage, replace_regs, regno_use_in, parms_set, find_first_parameter_load, keep_with_call_p, hoist_test_store, hoist_update_store, address_cost, nonzero_bits1, num_sign_bit_copies1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sched-deps.c (deps_may_trap_p, sched_analyze_1, sched_analyze_insn, sched_analyze): Likewise. * sched-rgn.c (check_live_1, update_live_1, sets_likely_spilled_1): Likewise. * sdbout.c (sdbout_symbol, sdbout_parms, sdbout_reg_parms): Likewise. * simplify-rtx.c (simplify_replace_rtx, simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_subreg): Likewise. * stmt.c (decl_conflicts_with_clobbers_p, expand_asm_operands, expand_end_stmt_expr, expand_return, expand_decl, expand_anon_union_decl): Likewise. * unroll.c (precondition_loop_p, calculate_giv_inc, copy_loop_body, find_splittable_regs, find_splittable_givs, find_common_reg_term, loop_iterations): Likewise. * var-tracking.c (variable_union, variable_part_different_p, variable_different_p, count_uses, add_uses, add_stores, compute_bb_dataflow, set_variable_part, delete_variable_part, emit_notes_in_bb, vt_get_decl_and_offset, vt_add_function_parameters): Likewise. * varasm.c (assemble_variable): Likewise. From-SVN: r83195
2004-06-15 20:02:40 +02:00
&& REG_P (reg = XEXP (op, 0))
regs.h (end_hard_regno): New function. gcc/ * regs.h (end_hard_regno): New function. (END_HARD_REGNO, END_REGNO): New macros. (add_to_hard_reg_set): New function. (remove_from_hard_reg_set): Likewise. (in_hard_reg_set_p): Likewise. (overlaps_hard_reg_set_p): Likewise. * bt-load.c (find_btr_reference): Use overlaps_hard_reg_set_p. (note_btr_set): Use END_HARD_REGNO. * caller-save.c (setup_save_areas): Use end_hard_regno. (mark_set_regs): Use END_HARD_REGNO. (add_stored_regs): Use end_hard_regno. (mark_referenced_regs): Use add_to_hard_reg_set. * combine.c (update_table_tick): Use END_REGNO. (record_value_for_reg): Likewise. (record_dead_and_set_regs): Likewise. (get_last_value_validate): Likewise. (use_crosses_set_p): Likewise. (reg_dead_at_p_1): Likewise. (reg_dead_at_p): Likewise. (mark_used_regs_combine): Use add_to_hard_reg_set. (move_deaths): Use END_HARD_REGNO. (reg_bitfield_target_p): Use end_hard_regno. (distribute_notes): Use END_HARD_REGNO. * cse.c (mention_regs): Use END_REGNO. (insert): Use add_to_hard_reg_set. (invalidate): Use END_HARD_REGNO. (invalidate_for_call): Likewise. (exp_equiv_p): Use END_REGNO. (cse_insn): Likewise. * cselib.c (cselib_invalidate_regno): Use end_hard_regno. * df-problems.c (df_urec_mark_reg_change): Use END_HARD_REGNO. * df-scan.c (df_ref_record): Use END_HARD_REGNO. * function.c (keep_stack_depressed): Use end_hard_regno. * global.c (global_alloc): Use end_hard_regno. (global_conflicts): Use add_to_hard_reg_set instead of mark_reg_live_nc. (find_reg): Likewise. (mark_reg_store): Likewise. (mark_reg_conflicts): Likewise. (mark_reg_death): Use remove_from_hard_reg_set. (mark_reg_live_nc): Delete. (set_preference): Use end_hard_regno. * local-alloc.c (mark_life): Use add_to_hard_reg_set and remove_from_hard_reg_set. (post_mark_life): Use add_to_hard_reg_set. * mode-switching.c (reg_dies): Use remove_from_hard_reg_set. (reg_becomes_live): Use add_to_hard_reg_set. * recog.c (reg_fits_class_p): Use in_hard_reg_set_p. (peep2_find_free_register): Use add_to_hard_reg_set. * reg-stack.c (convert_regs_exit): Use END_HARD_REGNO. * regclass.c (record_reg_classes): Use in_hard_reg_set_p. * regrename.c (note_sets): Use add_to_hard_reg_set. (clear_dead_regs): Use remove_from_hard_reg_set. (regrename_optimize): Use add_to_hard_reg_set. (find_oldest_value_reg): Use in_hard_reg_set_p. * reload.c (push_reload): Use in_hard_reg_set_p and end_hard_regno. (hard_reg_set_here_p): Use end_hard_regno. (decompose): Likewise. (reg_overlap_mentioned_for_reload_p): Use END_HARD_REGNO. (find_equiv_reg): Use in_hard_reg_set_p and end_hard_regno. * reload1.c (compute_use_by_pseudos): Use add_to_hard_reg_set. (mark_home_live): Use end_hard_regno. (spill_hard_reg): Likewise. (clear_reload_reg_in_use): Likewise. * reorg.c (delete_prior_computation): Use END_REGNO. * resource.c (update_live_status): Use END_HARD_REGNO. (mark_referenced_resources): Use add_to_hard_reg_set. (mark_set_resources): Likewise. (mark_target_live_regs): Likewise. Use remove_from_hard_reg_set. * rtlanal.c (refers_to_regno_p): Use END_REGNO. (reg_overlap_mentioned_p): Likewise. (dead_or_set_p): Likewise. Use an exclusive upper loop bound. (covers_regno_no_parallel_p): Use END_REGNO. (find_regno_note): Likewise. (find_reg_fusage): Use END_HARD_REGNO. * stmt.c (decl_overlaps_hard_reg_set_p): Use overlaps_hard_reg_set_p. * var-tracking.c (emit_note_insn_var_location): Use end_hard_regno. From-SVN: r124961
2007-05-22 22:52:39 +02:00
&& REGNO (reg) <= regno
&& END_HARD_REGNO (reg) > regno)
return 1;
}
return 0;
}
1991-12-01 06:13:56 +01:00
rtl.texi (REG_NOTES): Say that int_list can also be used. gcc/ * doc/rtl.texi (REG_NOTES): Say that int_list can also be used. (REG_BR_PROB): Say that the probability is stored in an int_list. * reg-notes.def: Update commentary to mention INT_LIST. * rtl.def (EXPR_LIST, INSN_LIST): Capitalize comments. (INT_LIST): New rtx. * rtl.h (add_int_reg_note, add_shallow_copy_of_reg_note): Declare. * rtlanal.c (int_reg_note_p): New function. (alloc_reg_note): Assert that the note does not have an int argument. (add_int_reg_note, add_shallow_copy_of_reg_note): New functions. * combine.c (distribute_notes): Use add_shallow_copy_of_rtx. * cse.c (cse_process_notes_1): Expect REG_EQUAL to be an EXPR_LIST rather than an INSN_LIST. Handle INT_LIST. * ifcvt.c (cond_exec_process_insns): Take the probability as an int rather than an rtx. Use gen_rtx_INT_LIST to create a REG_BR_PROB note. (cond_exec_process_if_block): Use XINT to extract REG_BR_PROB values. Manipulate them as ints rather than rtxes. * reg-stack.c (subst_asm_stack_regs): Only handle EXPR_LIST notes. * regmove.c (copy_src_to_dest): Likewise. * sched-vis.c (print_insn_with_notes): Handle INT_LIST. * config/i386/winnt.c (i386_pe_seh_unwind_emit): Sink pat assignment into the cases that need it. * config/arm/arm.c (arm_unwind_emit): Likewise. * asan.c (asan_clear_shadow): Use add_int_reg_note for REG_BR_PROB. * emit-rtl.c (try_split, emit_copy_of_insn_after): Likewise. * loop-doloop.c (add_test, doloop_modify): Likewise. * loop-unswitch.c (compare_and_jump_seq): Likewise. * optabs.c (emit_cmp_and_jump_insn_1): Likewise. * predict.c (combine_predictions_for_insn): Likewise. * print-rtl.c (print_rtx): Handle INT_LIST. * config/aarch64/aarch64.c (aarch64_emit_unlikely_jump): Likewise. * config/alpha/alpha.c (emit_unlikely_jump): Likewise. * config/arm/arm.c (emit_unlikely_jump): Likewise. * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise. (ix86_split_fp_branch, predict_jump): Likewise. * config/rs6000/rs6000.c (emit_unlikely_jump): Likewise. * config/sh/sh.c (expand_cbranchsi4): Likewise. * config/spu/spu.c (ea_load_store_inline): Likewise. * cfgbuild.c (compute_outgoing_frequencies): Use XINT to access the value of a REG_BR_PROB note. * cfgrtl.c (force_nonfallthru_and_redirect): Likewise. (update_br_prob_note, rtl_verify_edges, purge_dead_edges): Likewise. * emit-rtl.c (try_split): Likewise. * predict.c (br_prob_note_reliable_p): Likewise. (invert_br_probabilities, combine_predictions_for_insn): Likewise. * reorg.c (mostly_true_jump): Likewise. * config/bfin/bfin.c (cbranch_predicted_taken_p): Likewise. * config/frv/frv.c (frv_print_operand_jump_hint): Likewise. * config/i386/i386.c (ix86_print_operand): Likewise. * config/ia64/ia64.c (ia64_print_operand): Likewise. * config/mmix/mmix.c (mmix_print_operand): Likewise. * config/rs6000/rs6000.c (output_cbranch): Likewise. * config/s390/s390.c (s390_expand_tbegin): Likewise. * config/sh/sh.c (sh_print_operand, sh_adjust_cost): Likewise. * config/sparc/sparc.c (output_cbranch): Likewise. * config/spu/spu.c (get_branch_target): Likewise. * config/tilegx/tilegx.c (cbranch_predicted_p): Likewise. * config/tilepro/tilepro.c (cbranch_predicted_p): Likewise. From-SVN: r202839
2013-09-23 19:41:02 +02:00
/* Return true if KIND is an integer REG_NOTE. */
static bool
int_reg_note_p (enum reg_note kind)
{
return kind == REG_BR_PROB;
}
/* Allocate a register note with kind KIND and datum DATUM. LIST is
stored as the pointer to the next register note. */
rtlanal.c (add_reg_note): New function. * rtlanal.c (add_reg_note): New function. * rtl.h (add_reg_note): Declare. * auto-inc-dec.c (attempt_change): Use add_reg_note. * bb-reorder.c (add_reg_crossing_jump_notes): Likewise. * builtins.c (expand_builtin_longjmp): Likewise. (expand_builtin_nonlocal_goto): Likewise. * calls.c (emit_call_1, expand_call): Likewise. * cfgexpand.c (add_reg_br_prob_note): Likewise. * cfglayout.c (fixup_reorder_chain): Likewise. * cfgrtl.c (force_nonfallthru_and_redirect): Likewise. (commit_one_edge_insertion): Likewise. * combine.c (move_deaths, distribute_notes): Likewise. * df-problems.c (df_set_note): Likewise. * emit-rtl.c (link_cc0_insns, try_split): Likewise. (set_unique_reg_note): Likewise. (emit_copy_of_insn_after): Likewise. * expr.c (expand_expr_real): Likewise. * gcse.c (add_label_notes): Likewise. * haifa-sched.c (create_check_block_twin): Likewise. * jump.c (mark_jump_label_1): Likewise. * loop-doloop.c (add_test, doloop_modify): Likewise. * loop-unswitch.c (compare_and_jump_seq): Likewise. * lower-subreg.c (move_eh_region_note): Likewise. * optabs.c (emit_libcall_block): Likewise. * predict.c (predict_insn): Likewise. (combine_predictions_for_insn): Likewise. * recog.c (peephole2_optimize): Likewise. * regmove.c (try_auto_increment): Likewise. * reg-stack.c (emit_pop_insn, move_for_stack_reg): Likewise. * reload.c (find_reloads): Likewise. * reload1.c (fixup_eh_region_note): Likewise. (reload_as_needed, add_auto_inc_notes, copy_eh_notes): Likewise. * reorg.c (delete_prior_computation): Likewise. (delete_computation, dbr_schedule): Likewise. * config/pa/pa.c (legitimize_pic_address): Likewise. * config/sh/sh.c (sh_reorg): Likewise. From-SVN: r137374
2008-07-02 20:01:18 +02:00
rtx
alloc_reg_note (enum reg_note kind, rtx datum, rtx list)
rtlanal.c (add_reg_note): New function. * rtlanal.c (add_reg_note): New function. * rtl.h (add_reg_note): Declare. * auto-inc-dec.c (attempt_change): Use add_reg_note. * bb-reorder.c (add_reg_crossing_jump_notes): Likewise. * builtins.c (expand_builtin_longjmp): Likewise. (expand_builtin_nonlocal_goto): Likewise. * calls.c (emit_call_1, expand_call): Likewise. * cfgexpand.c (add_reg_br_prob_note): Likewise. * cfglayout.c (fixup_reorder_chain): Likewise. * cfgrtl.c (force_nonfallthru_and_redirect): Likewise. (commit_one_edge_insertion): Likewise. * combine.c (move_deaths, distribute_notes): Likewise. * df-problems.c (df_set_note): Likewise. * emit-rtl.c (link_cc0_insns, try_split): Likewise. (set_unique_reg_note): Likewise. (emit_copy_of_insn_after): Likewise. * expr.c (expand_expr_real): Likewise. * gcse.c (add_label_notes): Likewise. * haifa-sched.c (create_check_block_twin): Likewise. * jump.c (mark_jump_label_1): Likewise. * loop-doloop.c (add_test, doloop_modify): Likewise. * loop-unswitch.c (compare_and_jump_seq): Likewise. * lower-subreg.c (move_eh_region_note): Likewise. * optabs.c (emit_libcall_block): Likewise. * predict.c (predict_insn): Likewise. (combine_predictions_for_insn): Likewise. * recog.c (peephole2_optimize): Likewise. * regmove.c (try_auto_increment): Likewise. * reg-stack.c (emit_pop_insn, move_for_stack_reg): Likewise. * reload.c (find_reloads): Likewise. * reload1.c (fixup_eh_region_note): Likewise. (reload_as_needed, add_auto_inc_notes, copy_eh_notes): Likewise. * reorg.c (delete_prior_computation): Likewise. (delete_computation, dbr_schedule): Likewise. * config/pa/pa.c (legitimize_pic_address): Likewise. * config/sh/sh.c (sh_reorg): Likewise. From-SVN: r137374
2008-07-02 20:01:18 +02:00
{
rtx note;
rtl.texi (REG_NOTES): Say that int_list can also be used. gcc/ * doc/rtl.texi (REG_NOTES): Say that int_list can also be used. (REG_BR_PROB): Say that the probability is stored in an int_list. * reg-notes.def: Update commentary to mention INT_LIST. * rtl.def (EXPR_LIST, INSN_LIST): Capitalize comments. (INT_LIST): New rtx. * rtl.h (add_int_reg_note, add_shallow_copy_of_reg_note): Declare. * rtlanal.c (int_reg_note_p): New function. (alloc_reg_note): Assert that the note does not have an int argument. (add_int_reg_note, add_shallow_copy_of_reg_note): New functions. * combine.c (distribute_notes): Use add_shallow_copy_of_rtx. * cse.c (cse_process_notes_1): Expect REG_EQUAL to be an EXPR_LIST rather than an INSN_LIST. Handle INT_LIST. * ifcvt.c (cond_exec_process_insns): Take the probability as an int rather than an rtx. Use gen_rtx_INT_LIST to create a REG_BR_PROB note. (cond_exec_process_if_block): Use XINT to extract REG_BR_PROB values. Manipulate them as ints rather than rtxes. * reg-stack.c (subst_asm_stack_regs): Only handle EXPR_LIST notes. * regmove.c (copy_src_to_dest): Likewise. * sched-vis.c (print_insn_with_notes): Handle INT_LIST. * config/i386/winnt.c (i386_pe_seh_unwind_emit): Sink pat assignment into the cases that need it. * config/arm/arm.c (arm_unwind_emit): Likewise. * asan.c (asan_clear_shadow): Use add_int_reg_note for REG_BR_PROB. * emit-rtl.c (try_split, emit_copy_of_insn_after): Likewise. * loop-doloop.c (add_test, doloop_modify): Likewise. * loop-unswitch.c (compare_and_jump_seq): Likewise. * optabs.c (emit_cmp_and_jump_insn_1): Likewise. * predict.c (combine_predictions_for_insn): Likewise. * print-rtl.c (print_rtx): Handle INT_LIST. * config/aarch64/aarch64.c (aarch64_emit_unlikely_jump): Likewise. * config/alpha/alpha.c (emit_unlikely_jump): Likewise. * config/arm/arm.c (emit_unlikely_jump): Likewise. * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise. (ix86_split_fp_branch, predict_jump): Likewise. * config/rs6000/rs6000.c (emit_unlikely_jump): Likewise. * config/sh/sh.c (expand_cbranchsi4): Likewise. * config/spu/spu.c (ea_load_store_inline): Likewise. * cfgbuild.c (compute_outgoing_frequencies): Use XINT to access the value of a REG_BR_PROB note. * cfgrtl.c (force_nonfallthru_and_redirect): Likewise. (update_br_prob_note, rtl_verify_edges, purge_dead_edges): Likewise. * emit-rtl.c (try_split): Likewise. * predict.c (br_prob_note_reliable_p): Likewise. (invert_br_probabilities, combine_predictions_for_insn): Likewise. * reorg.c (mostly_true_jump): Likewise. * config/bfin/bfin.c (cbranch_predicted_taken_p): Likewise. * config/frv/frv.c (frv_print_operand_jump_hint): Likewise. * config/i386/i386.c (ix86_print_operand): Likewise. * config/ia64/ia64.c (ia64_print_operand): Likewise. * config/mmix/mmix.c (mmix_print_operand): Likewise. * config/rs6000/rs6000.c (output_cbranch): Likewise. * config/s390/s390.c (s390_expand_tbegin): Likewise. * config/sh/sh.c (sh_print_operand, sh_adjust_cost): Likewise. * config/sparc/sparc.c (output_cbranch): Likewise. * config/spu/spu.c (get_branch_target): Likewise. * config/tilegx/tilegx.c (cbranch_predicted_p): Likewise. * config/tilepro/tilepro.c (cbranch_predicted_p): Likewise. From-SVN: r202839
2013-09-23 19:41:02 +02:00
gcc_checking_assert (!int_reg_note_p (kind));
rtlanal.c (add_reg_note): New function. * rtlanal.c (add_reg_note): New function. * rtl.h (add_reg_note): Declare. * auto-inc-dec.c (attempt_change): Use add_reg_note. * bb-reorder.c (add_reg_crossing_jump_notes): Likewise. * builtins.c (expand_builtin_longjmp): Likewise. (expand_builtin_nonlocal_goto): Likewise. * calls.c (emit_call_1, expand_call): Likewise. * cfgexpand.c (add_reg_br_prob_note): Likewise. * cfglayout.c (fixup_reorder_chain): Likewise. * cfgrtl.c (force_nonfallthru_and_redirect): Likewise. (commit_one_edge_insertion): Likewise. * combine.c (move_deaths, distribute_notes): Likewise. * df-problems.c (df_set_note): Likewise. * emit-rtl.c (link_cc0_insns, try_split): Likewise. (set_unique_reg_note): Likewise. (emit_copy_of_insn_after): Likewise. * expr.c (expand_expr_real): Likewise. * gcse.c (add_label_notes): Likewise. * haifa-sched.c (create_check_block_twin): Likewise. * jump.c (mark_jump_label_1): Likewise. * loop-doloop.c (add_test, doloop_modify): Likewise. * loop-unswitch.c (compare_and_jump_seq): Likewise. * lower-subreg.c (move_eh_region_note): Likewise. * optabs.c (emit_libcall_block): Likewise. * predict.c (predict_insn): Likewise. (combine_predictions_for_insn): Likewise. * recog.c (peephole2_optimize): Likewise. * regmove.c (try_auto_increment): Likewise. * reg-stack.c (emit_pop_insn, move_for_stack_reg): Likewise. * reload.c (find_reloads): Likewise. * reload1.c (fixup_eh_region_note): Likewise. (reload_as_needed, add_auto_inc_notes, copy_eh_notes): Likewise. * reorg.c (delete_prior_computation): Likewise. (delete_computation, dbr_schedule): Likewise. * config/pa/pa.c (legitimize_pic_address): Likewise. * config/sh/sh.c (sh_reorg): Likewise. From-SVN: r137374
2008-07-02 20:01:18 +02:00
switch (kind)
{
case REG_CC_SETTER:
case REG_CC_USER:
case REG_LABEL_TARGET:
case REG_LABEL_OPERAND:
case REG_TM:
rtlanal.c (add_reg_note): New function. * rtlanal.c (add_reg_note): New function. * rtl.h (add_reg_note): Declare. * auto-inc-dec.c (attempt_change): Use add_reg_note. * bb-reorder.c (add_reg_crossing_jump_notes): Likewise. * builtins.c (expand_builtin_longjmp): Likewise. (expand_builtin_nonlocal_goto): Likewise. * calls.c (emit_call_1, expand_call): Likewise. * cfgexpand.c (add_reg_br_prob_note): Likewise. * cfglayout.c (fixup_reorder_chain): Likewise. * cfgrtl.c (force_nonfallthru_and_redirect): Likewise. (commit_one_edge_insertion): Likewise. * combine.c (move_deaths, distribute_notes): Likewise. * df-problems.c (df_set_note): Likewise. * emit-rtl.c (link_cc0_insns, try_split): Likewise. (set_unique_reg_note): Likewise. (emit_copy_of_insn_after): Likewise. * expr.c (expand_expr_real): Likewise. * gcse.c (add_label_notes): Likewise. * haifa-sched.c (create_check_block_twin): Likewise. * jump.c (mark_jump_label_1): Likewise. * loop-doloop.c (add_test, doloop_modify): Likewise. * loop-unswitch.c (compare_and_jump_seq): Likewise. * lower-subreg.c (move_eh_region_note): Likewise. * optabs.c (emit_libcall_block): Likewise. * predict.c (predict_insn): Likewise. (combine_predictions_for_insn): Likewise. * recog.c (peephole2_optimize): Likewise. * regmove.c (try_auto_increment): Likewise. * reg-stack.c (emit_pop_insn, move_for_stack_reg): Likewise. * reload.c (find_reloads): Likewise. * reload1.c (fixup_eh_region_note): Likewise. (reload_as_needed, add_auto_inc_notes, copy_eh_notes): Likewise. * reorg.c (delete_prior_computation): Likewise. (delete_computation, dbr_schedule): Likewise. * config/pa/pa.c (legitimize_pic_address): Likewise. * config/sh/sh.c (sh_reorg): Likewise. From-SVN: r137374
2008-07-02 20:01:18 +02:00
/* These types of register notes use an INSN_LIST rather than an
EXPR_LIST, so that copying is done right and dumps look
better. */
note = alloc_INSN_LIST (datum, list);
rtlanal.c (add_reg_note): New function. * rtlanal.c (add_reg_note): New function. * rtl.h (add_reg_note): Declare. * auto-inc-dec.c (attempt_change): Use add_reg_note. * bb-reorder.c (add_reg_crossing_jump_notes): Likewise. * builtins.c (expand_builtin_longjmp): Likewise. (expand_builtin_nonlocal_goto): Likewise. * calls.c (emit_call_1, expand_call): Likewise. * cfgexpand.c (add_reg_br_prob_note): Likewise. * cfglayout.c (fixup_reorder_chain): Likewise. * cfgrtl.c (force_nonfallthru_and_redirect): Likewise. (commit_one_edge_insertion): Likewise. * combine.c (move_deaths, distribute_notes): Likewise. * df-problems.c (df_set_note): Likewise. * emit-rtl.c (link_cc0_insns, try_split): Likewise. (set_unique_reg_note): Likewise. (emit_copy_of_insn_after): Likewise. * expr.c (expand_expr_real): Likewise. * gcse.c (add_label_notes): Likewise. * haifa-sched.c (create_check_block_twin): Likewise. * jump.c (mark_jump_label_1): Likewise. * loop-doloop.c (add_test, doloop_modify): Likewise. * loop-unswitch.c (compare_and_jump_seq): Likewise. * lower-subreg.c (move_eh_region_note): Likewise. * optabs.c (emit_libcall_block): Likewise. * predict.c (predict_insn): Likewise. (combine_predictions_for_insn): Likewise. * recog.c (peephole2_optimize): Likewise. * regmove.c (try_auto_increment): Likewise. * reg-stack.c (emit_pop_insn, move_for_stack_reg): Likewise. * reload.c (find_reloads): Likewise. * reload1.c (fixup_eh_region_note): Likewise. (reload_as_needed, add_auto_inc_notes, copy_eh_notes): Likewise. * reorg.c (delete_prior_computation): Likewise. (delete_computation, dbr_schedule): Likewise. * config/pa/pa.c (legitimize_pic_address): Likewise. * config/sh/sh.c (sh_reorg): Likewise. From-SVN: r137374
2008-07-02 20:01:18 +02:00
PUT_REG_NOTE_KIND (note, kind);
break;
default:
note = alloc_EXPR_LIST (kind, datum, list);
rtlanal.c (add_reg_note): New function. * rtlanal.c (add_reg_note): New function. * rtl.h (add_reg_note): Declare. * auto-inc-dec.c (attempt_change): Use add_reg_note. * bb-reorder.c (add_reg_crossing_jump_notes): Likewise. * builtins.c (expand_builtin_longjmp): Likewise. (expand_builtin_nonlocal_goto): Likewise. * calls.c (emit_call_1, expand_call): Likewise. * cfgexpand.c (add_reg_br_prob_note): Likewise. * cfglayout.c (fixup_reorder_chain): Likewise. * cfgrtl.c (force_nonfallthru_and_redirect): Likewise. (commit_one_edge_insertion): Likewise. * combine.c (move_deaths, distribute_notes): Likewise. * df-problems.c (df_set_note): Likewise. * emit-rtl.c (link_cc0_insns, try_split): Likewise. (set_unique_reg_note): Likewise. (emit_copy_of_insn_after): Likewise. * expr.c (expand_expr_real): Likewise. * gcse.c (add_label_notes): Likewise. * haifa-sched.c (create_check_block_twin): Likewise. * jump.c (mark_jump_label_1): Likewise. * loop-doloop.c (add_test, doloop_modify): Likewise. * loop-unswitch.c (compare_and_jump_seq): Likewise. * lower-subreg.c (move_eh_region_note): Likewise. * optabs.c (emit_libcall_block): Likewise. * predict.c (predict_insn): Likewise. (combine_predictions_for_insn): Likewise. * recog.c (peephole2_optimize): Likewise. * regmove.c (try_auto_increment): Likewise. * reg-stack.c (emit_pop_insn, move_for_stack_reg): Likewise. * reload.c (find_reloads): Likewise. * reload1.c (fixup_eh_region_note): Likewise. (reload_as_needed, add_auto_inc_notes, copy_eh_notes): Likewise. * reorg.c (delete_prior_computation): Likewise. (delete_computation, dbr_schedule): Likewise. * config/pa/pa.c (legitimize_pic_address): Likewise. * config/sh/sh.c (sh_reorg): Likewise. From-SVN: r137374
2008-07-02 20:01:18 +02:00
break;
}
return note;
}
/* Add register note with kind KIND and datum DATUM to INSN. */
void
add_reg_note (rtx insn, enum reg_note kind, rtx datum)
{
REG_NOTES (insn) = alloc_reg_note (kind, datum, REG_NOTES (insn));
rtlanal.c (add_reg_note): New function. * rtlanal.c (add_reg_note): New function. * rtl.h (add_reg_note): Declare. * auto-inc-dec.c (attempt_change): Use add_reg_note. * bb-reorder.c (add_reg_crossing_jump_notes): Likewise. * builtins.c (expand_builtin_longjmp): Likewise. (expand_builtin_nonlocal_goto): Likewise. * calls.c (emit_call_1, expand_call): Likewise. * cfgexpand.c (add_reg_br_prob_note): Likewise. * cfglayout.c (fixup_reorder_chain): Likewise. * cfgrtl.c (force_nonfallthru_and_redirect): Likewise. (commit_one_edge_insertion): Likewise. * combine.c (move_deaths, distribute_notes): Likewise. * df-problems.c (df_set_note): Likewise. * emit-rtl.c (link_cc0_insns, try_split): Likewise. (set_unique_reg_note): Likewise. (emit_copy_of_insn_after): Likewise. * expr.c (expand_expr_real): Likewise. * gcse.c (add_label_notes): Likewise. * haifa-sched.c (create_check_block_twin): Likewise. * jump.c (mark_jump_label_1): Likewise. * loop-doloop.c (add_test, doloop_modify): Likewise. * loop-unswitch.c (compare_and_jump_seq): Likewise. * lower-subreg.c (move_eh_region_note): Likewise. * optabs.c (emit_libcall_block): Likewise. * predict.c (predict_insn): Likewise. (combine_predictions_for_insn): Likewise. * recog.c (peephole2_optimize): Likewise. * regmove.c (try_auto_increment): Likewise. * reg-stack.c (emit_pop_insn, move_for_stack_reg): Likewise. * reload.c (find_reloads): Likewise. * reload1.c (fixup_eh_region_note): Likewise. (reload_as_needed, add_auto_inc_notes, copy_eh_notes): Likewise. * reorg.c (delete_prior_computation): Likewise. (delete_computation, dbr_schedule): Likewise. * config/pa/pa.c (legitimize_pic_address): Likewise. * config/sh/sh.c (sh_reorg): Likewise. From-SVN: r137374
2008-07-02 20:01:18 +02:00
}
rtl.texi (REG_NOTES): Say that int_list can also be used. gcc/ * doc/rtl.texi (REG_NOTES): Say that int_list can also be used. (REG_BR_PROB): Say that the probability is stored in an int_list. * reg-notes.def: Update commentary to mention INT_LIST. * rtl.def (EXPR_LIST, INSN_LIST): Capitalize comments. (INT_LIST): New rtx. * rtl.h (add_int_reg_note, add_shallow_copy_of_reg_note): Declare. * rtlanal.c (int_reg_note_p): New function. (alloc_reg_note): Assert that the note does not have an int argument. (add_int_reg_note, add_shallow_copy_of_reg_note): New functions. * combine.c (distribute_notes): Use add_shallow_copy_of_rtx. * cse.c (cse_process_notes_1): Expect REG_EQUAL to be an EXPR_LIST rather than an INSN_LIST. Handle INT_LIST. * ifcvt.c (cond_exec_process_insns): Take the probability as an int rather than an rtx. Use gen_rtx_INT_LIST to create a REG_BR_PROB note. (cond_exec_process_if_block): Use XINT to extract REG_BR_PROB values. Manipulate them as ints rather than rtxes. * reg-stack.c (subst_asm_stack_regs): Only handle EXPR_LIST notes. * regmove.c (copy_src_to_dest): Likewise. * sched-vis.c (print_insn_with_notes): Handle INT_LIST. * config/i386/winnt.c (i386_pe_seh_unwind_emit): Sink pat assignment into the cases that need it. * config/arm/arm.c (arm_unwind_emit): Likewise. * asan.c (asan_clear_shadow): Use add_int_reg_note for REG_BR_PROB. * emit-rtl.c (try_split, emit_copy_of_insn_after): Likewise. * loop-doloop.c (add_test, doloop_modify): Likewise. * loop-unswitch.c (compare_and_jump_seq): Likewise. * optabs.c (emit_cmp_and_jump_insn_1): Likewise. * predict.c (combine_predictions_for_insn): Likewise. * print-rtl.c (print_rtx): Handle INT_LIST. * config/aarch64/aarch64.c (aarch64_emit_unlikely_jump): Likewise. * config/alpha/alpha.c (emit_unlikely_jump): Likewise. * config/arm/arm.c (emit_unlikely_jump): Likewise. * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise. (ix86_split_fp_branch, predict_jump): Likewise. * config/rs6000/rs6000.c (emit_unlikely_jump): Likewise. * config/sh/sh.c (expand_cbranchsi4): Likewise. * config/spu/spu.c (ea_load_store_inline): Likewise. * cfgbuild.c (compute_outgoing_frequencies): Use XINT to access the value of a REG_BR_PROB note. * cfgrtl.c (force_nonfallthru_and_redirect): Likewise. (update_br_prob_note, rtl_verify_edges, purge_dead_edges): Likewise. * emit-rtl.c (try_split): Likewise. * predict.c (br_prob_note_reliable_p): Likewise. (invert_br_probabilities, combine_predictions_for_insn): Likewise. * reorg.c (mostly_true_jump): Likewise. * config/bfin/bfin.c (cbranch_predicted_taken_p): Likewise. * config/frv/frv.c (frv_print_operand_jump_hint): Likewise. * config/i386/i386.c (ix86_print_operand): Likewise. * config/ia64/ia64.c (ia64_print_operand): Likewise. * config/mmix/mmix.c (mmix_print_operand): Likewise. * config/rs6000/rs6000.c (output_cbranch): Likewise. * config/s390/s390.c (s390_expand_tbegin): Likewise. * config/sh/sh.c (sh_print_operand, sh_adjust_cost): Likewise. * config/sparc/sparc.c (output_cbranch): Likewise. * config/spu/spu.c (get_branch_target): Likewise. * config/tilegx/tilegx.c (cbranch_predicted_p): Likewise. * config/tilepro/tilepro.c (cbranch_predicted_p): Likewise. From-SVN: r202839
2013-09-23 19:41:02 +02:00
/* Add an integer register note with kind KIND and datum DATUM to INSN. */
void
add_int_reg_note (rtx insn, enum reg_note kind, int datum)
{
gcc_checking_assert (int_reg_note_p (kind));
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 13:02:45 +01:00
REG_NOTES (insn) = gen_rtx_INT_LIST ((machine_mode) kind,
rtl.texi (REG_NOTES): Say that int_list can also be used. gcc/ * doc/rtl.texi (REG_NOTES): Say that int_list can also be used. (REG_BR_PROB): Say that the probability is stored in an int_list. * reg-notes.def: Update commentary to mention INT_LIST. * rtl.def (EXPR_LIST, INSN_LIST): Capitalize comments. (INT_LIST): New rtx. * rtl.h (add_int_reg_note, add_shallow_copy_of_reg_note): Declare. * rtlanal.c (int_reg_note_p): New function. (alloc_reg_note): Assert that the note does not have an int argument. (add_int_reg_note, add_shallow_copy_of_reg_note): New functions. * combine.c (distribute_notes): Use add_shallow_copy_of_rtx. * cse.c (cse_process_notes_1): Expect REG_EQUAL to be an EXPR_LIST rather than an INSN_LIST. Handle INT_LIST. * ifcvt.c (cond_exec_process_insns): Take the probability as an int rather than an rtx. Use gen_rtx_INT_LIST to create a REG_BR_PROB note. (cond_exec_process_if_block): Use XINT to extract REG_BR_PROB values. Manipulate them as ints rather than rtxes. * reg-stack.c (subst_asm_stack_regs): Only handle EXPR_LIST notes. * regmove.c (copy_src_to_dest): Likewise. * sched-vis.c (print_insn_with_notes): Handle INT_LIST. * config/i386/winnt.c (i386_pe_seh_unwind_emit): Sink pat assignment into the cases that need it. * config/arm/arm.c (arm_unwind_emit): Likewise. * asan.c (asan_clear_shadow): Use add_int_reg_note for REG_BR_PROB. * emit-rtl.c (try_split, emit_copy_of_insn_after): Likewise. * loop-doloop.c (add_test, doloop_modify): Likewise. * loop-unswitch.c (compare_and_jump_seq): Likewise. * optabs.c (emit_cmp_and_jump_insn_1): Likewise. * predict.c (combine_predictions_for_insn): Likewise. * print-rtl.c (print_rtx): Handle INT_LIST. * config/aarch64/aarch64.c (aarch64_emit_unlikely_jump): Likewise. * config/alpha/alpha.c (emit_unlikely_jump): Likewise. * config/arm/arm.c (emit_unlikely_jump): Likewise. * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise. (ix86_split_fp_branch, predict_jump): Likewise. * config/rs6000/rs6000.c (emit_unlikely_jump): Likewise. * config/sh/sh.c (expand_cbranchsi4): Likewise. * config/spu/spu.c (ea_load_store_inline): Likewise. * cfgbuild.c (compute_outgoing_frequencies): Use XINT to access the value of a REG_BR_PROB note. * cfgrtl.c (force_nonfallthru_and_redirect): Likewise. (update_br_prob_note, rtl_verify_edges, purge_dead_edges): Likewise. * emit-rtl.c (try_split): Likewise. * predict.c (br_prob_note_reliable_p): Likewise. (invert_br_probabilities, combine_predictions_for_insn): Likewise. * reorg.c (mostly_true_jump): Likewise. * config/bfin/bfin.c (cbranch_predicted_taken_p): Likewise. * config/frv/frv.c (frv_print_operand_jump_hint): Likewise. * config/i386/i386.c (ix86_print_operand): Likewise. * config/ia64/ia64.c (ia64_print_operand): Likewise. * config/mmix/mmix.c (mmix_print_operand): Likewise. * config/rs6000/rs6000.c (output_cbranch): Likewise. * config/s390/s390.c (s390_expand_tbegin): Likewise. * config/sh/sh.c (sh_print_operand, sh_adjust_cost): Likewise. * config/sparc/sparc.c (output_cbranch): Likewise. * config/spu/spu.c (get_branch_target): Likewise. * config/tilegx/tilegx.c (cbranch_predicted_p): Likewise. * config/tilepro/tilepro.c (cbranch_predicted_p): Likewise. From-SVN: r202839
2013-09-23 19:41:02 +02:00
datum, REG_NOTES (insn));
}
/* Add a register note like NOTE to INSN. */
void
add_shallow_copy_of_reg_note (rtx_insn *insn, rtx note)
rtl.texi (REG_NOTES): Say that int_list can also be used. gcc/ * doc/rtl.texi (REG_NOTES): Say that int_list can also be used. (REG_BR_PROB): Say that the probability is stored in an int_list. * reg-notes.def: Update commentary to mention INT_LIST. * rtl.def (EXPR_LIST, INSN_LIST): Capitalize comments. (INT_LIST): New rtx. * rtl.h (add_int_reg_note, add_shallow_copy_of_reg_note): Declare. * rtlanal.c (int_reg_note_p): New function. (alloc_reg_note): Assert that the note does not have an int argument. (add_int_reg_note, add_shallow_copy_of_reg_note): New functions. * combine.c (distribute_notes): Use add_shallow_copy_of_rtx. * cse.c (cse_process_notes_1): Expect REG_EQUAL to be an EXPR_LIST rather than an INSN_LIST. Handle INT_LIST. * ifcvt.c (cond_exec_process_insns): Take the probability as an int rather than an rtx. Use gen_rtx_INT_LIST to create a REG_BR_PROB note. (cond_exec_process_if_block): Use XINT to extract REG_BR_PROB values. Manipulate them as ints rather than rtxes. * reg-stack.c (subst_asm_stack_regs): Only handle EXPR_LIST notes. * regmove.c (copy_src_to_dest): Likewise. * sched-vis.c (print_insn_with_notes): Handle INT_LIST. * config/i386/winnt.c (i386_pe_seh_unwind_emit): Sink pat assignment into the cases that need it. * config/arm/arm.c (arm_unwind_emit): Likewise. * asan.c (asan_clear_shadow): Use add_int_reg_note for REG_BR_PROB. * emit-rtl.c (try_split, emit_copy_of_insn_after): Likewise. * loop-doloop.c (add_test, doloop_modify): Likewise. * loop-unswitch.c (compare_and_jump_seq): Likewise. * optabs.c (emit_cmp_and_jump_insn_1): Likewise. * predict.c (combine_predictions_for_insn): Likewise. * print-rtl.c (print_rtx): Handle INT_LIST. * config/aarch64/aarch64.c (aarch64_emit_unlikely_jump): Likewise. * config/alpha/alpha.c (emit_unlikely_jump): Likewise. * config/arm/arm.c (emit_unlikely_jump): Likewise. * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise. (ix86_split_fp_branch, predict_jump): Likewise. * config/rs6000/rs6000.c (emit_unlikely_jump): Likewise. * config/sh/sh.c (expand_cbranchsi4): Likewise. * config/spu/spu.c (ea_load_store_inline): Likewise. * cfgbuild.c (compute_outgoing_frequencies): Use XINT to access the value of a REG_BR_PROB note. * cfgrtl.c (force_nonfallthru_and_redirect): Likewise. (update_br_prob_note, rtl_verify_edges, purge_dead_edges): Likewise. * emit-rtl.c (try_split): Likewise. * predict.c (br_prob_note_reliable_p): Likewise. (invert_br_probabilities, combine_predictions_for_insn): Likewise. * reorg.c (mostly_true_jump): Likewise. * config/bfin/bfin.c (cbranch_predicted_taken_p): Likewise. * config/frv/frv.c (frv_print_operand_jump_hint): Likewise. * config/i386/i386.c (ix86_print_operand): Likewise. * config/ia64/ia64.c (ia64_print_operand): Likewise. * config/mmix/mmix.c (mmix_print_operand): Likewise. * config/rs6000/rs6000.c (output_cbranch): Likewise. * config/s390/s390.c (s390_expand_tbegin): Likewise. * config/sh/sh.c (sh_print_operand, sh_adjust_cost): Likewise. * config/sparc/sparc.c (output_cbranch): Likewise. * config/spu/spu.c (get_branch_target): Likewise. * config/tilegx/tilegx.c (cbranch_predicted_p): Likewise. * config/tilepro/tilepro.c (cbranch_predicted_p): Likewise. From-SVN: r202839
2013-09-23 19:41:02 +02:00
{
if (GET_CODE (note) == INT_LIST)
add_int_reg_note (insn, REG_NOTE_KIND (note), XINT (note, 0));
else
add_reg_note (insn, REG_NOTE_KIND (note), XEXP (note, 0));
}
1991-12-01 06:13:56 +01:00
/* Remove register note NOTE from the REG_NOTES of INSN. */
void
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
remove_note (rtx insn, const_rtx note)
1991-12-01 06:13:56 +01:00
{
alias.c: Remove uses of "register" specifier in declarations of arguments and local... 2001-10-10 Stan Shebs <shebs@apple.com> * alias.c: Remove uses of "register" specifier in declarations of arguments and local variables. * c-common.c: Ditto. * c-convert.c: Ditto. * c-decl.c: Ditto. * c-format.c: Ditto. * c-semantics.c: Ditto. * c-typeck.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfgbuild.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * combine.c: Ditto. * convert.c: Ditto. * cppexp.c: Ditto. * cppfiles.c: Ditto. * cse.c: Ditto. * dbxout.c: Ditto. * defaults.h: Ditto. * df.c: Ditto. * dwarf2out.c: Ditto. * dwarfout.c: Ditto. * emit-rtl.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fix-header.c: Ditto. * floatlib.c: Ditto. * flow.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * gcc.c: Ditto. * gcse.c: Ditto. * gen-protos.c: Ditto. * genattrtab.c: Ditto. * gencheck.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * gengenrtl.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * gensupport.c: Ditto. * global.c: Ditto. * gmon.c: Ditto. * graph.c: Ditto. * haifa-sched.c: Ditto. * hard-reg-set.h: Ditto. * hash.c: Ditto. * integrate.c: Ditto. * jump.c: Ditto. * lists.c: Ditto. * local-alloc.c: Ditto. * loop.c: Ditto. * mips-tdump.c: Ditto. * mips-tfile.c: Ditto. * optabs.c: Ditto. * prefix.c: Ditto. * print-rtl.c: Ditto. * read-rtl.c: Ditto. * real.c: Ditto. * recog.c: Ditto. * reg-stack.c: Ditto. * regclass.c: Ditto. * regmove.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtl.c: Ditto. * rtlanal.c: Ditto. * scan.c: Ditto. * sched-deps.c: Ditto. * sched-rgn.c: Ditto. * sdbout.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tradcif.y: Ditto. * tradcpp.c: Ditto. * tree.c: Ditto. * unroll.c: Ditto. * varasm.c: Ditto. * xcoffout.c: Ditto. From-SVN: r46173
2001-10-11 05:16:15 +02:00
rtx link;
1991-12-01 06:13:56 +01:00
if (note == NULL_RTX)
return;
1991-12-01 06:13:56 +01:00
if (REG_NOTES (insn) == note)
REG_NOTES (insn) = XEXP (note, 1);
else
for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
if (XEXP (link, 1) == note)
{
XEXP (link, 1) = XEXP (note, 1);
break;
}
switch (REG_NOTE_KIND (note))
1991-12-01 06:13:56 +01:00
{
case REG_EQUAL:
case REG_EQUIV:
Remove DF_REF_INSN scaffolding gcc/ 2014-08-26 David Malcolm <dmalcolm@redhat.com> * df.h (df_dump_insn_problem_function): Strengthen first param of this callback from const_rtx to const rtx_insn *. (struct df_insn_info): Strengthen field "insn" from rtx to rtx_insn *. (DF_REF_INSN): Eliminate this function, reinstating the older macro definition. (df_find_def): Strengthen param 1 from rtx to rtx_insn *. (df_reg_defined): Likewise. (df_find_use): Likewise. (df_reg_used): Likewise. (df_dump_insn_top): Strengthen param 1 from const_rtx to const rtx_insn *. (df_dump_insn_bottom): Likewise. (df_insn_debug): Strengthen param 1 from rtx to rtx_insn *. (df_insn_debug_regno): Likewise. (debug_df_insn): Likewise. (df_rd_simulate_one_insn): Likewise for param 2. (df_word_lr_simulate_defs): Likewise for param 1. (df_word_lr_simulate_uses): Likewise. (df_md_simulate_one_insn): Likewise for param 2. (df_simulate_find_noclobber_defs): Likewise for param 1. (df_simulate_find_defs): Likewise. (df_simulate_defs): Likewise. (df_simulate_uses): Likewise. (df_simulate_one_insn_backwards): Likewise for param 2. (df_simulate_one_insn_forwards): Likewise. (df_uses_create): Likewise for param 2. (df_insn_create_insn_record): Likewise for param 1. (df_insn_delete): Likewise. (df_insn_rescan): Likewise. (df_insn_rescan_debug_internal): Likewise. (df_insn_change_bb): Likewise. (df_notes_rescan): Likewise. * rtl.h (remove_death): Likewise for param 2. (print_rtl_with_bb): Strengthen param 2 from const_rtx to const rtx_insn *. * sched-int.h (reemit_notes): Strengthen param from rtx to rtx_insn *. * valtrack.h (propagate_for_debug): Likewise for param 1. * cfgrtl.c (print_rtl_with_bb): Strengthen param "rtx_first" and local "tmp_rtx" from const_rtx to const rtx_insn *. * combine.c (remove_death): Strengthen param "insn" from rtx to rtx_insn *. (move_deaths): Likewise for local "where_dead". * cse.c (delete_trivially_dead_insns): Introduce local "bind_var_loc" so that "bind" can be strengthened to an rtx_insn *. * df-core.c (df_find_def): Strengthen param "insn" from rtx to rtx_insn *. (df_reg_defined): Likewise. (df_find_use): Likewise. (df_reg_used): Likewise. (df_dump_insn_problem_data): Strengthen param "insn" from const_rtx to const rtx_insn *. (df_dump_insn_top): Likewise. (df_dump_insn_bottom): Likewise. (df_insn_debug): Strengthen param "insn" from rtx to rtx_insn *. (df_insn_debug_regno): Likewise. (debug_df_insn): Likewise. (DF_REF_INSN): Delete. * df-problems.c (df_rd_simulate_one_insn): Strengthen param "insn" from rtx to rtx_insn *. (df_chain_insn_top_dump): Strengthen param "insn" from const_rtx to const rtx_insn *. (df_chain_insn_bottom_dump): Likewise. (df_word_lr_simulate_defs): Strengthen param "insn" from rtx to rtx_insn *. (df_word_lr_simulate_uses): Likewise. (df_print_note): Likewise. (df_remove_dead_and_unused_notes): Likewise. (df_set_unused_notes_for_mw): Likewise. (df_set_dead_notes_for_mw): Likewise. (df_create_unused_note): Likewise. (df_simulate_find_defs): Likewise. (df_simulate_find_uses): Likewise. (df_simulate_find_noclobber_defs): Likewise. (df_simulate_defs): Likewise. (df_simulate_uses): Likewise. (df_simulate_one_insn_backwards): Likewise. (df_simulate_one_insn_forwards): Likewise. (df_md_simulate_one_insn): Likewise. * df-scan.c (df_uses_create): Likewise. (df_insn_create_insn_record): Likewise. (df_insn_delete): Likewise. (df_insn_rescan): Likewise. (df_insn_rescan_debug_internal): Likewise. (df_insn_change_bb): Likewise. (df_notes_rescan): Likewise. (df_refs_add_to_chains): Likewise. (df_insn_refs_verify): Likewise. * emit-rtl.c (set_insn_deleted): Add checked cast to rtx_insn * when invoking df_insn_delete. (reorder_insns): Strengthen local "x" from rtx to rtx_insn *. (set_unique_reg_note): Add checked cast. * final.c (cleanup_subreg_operands): Likewise. * gcse.c (update_ld_motion_stores): Likewise, strengthening local "insn" from rtx to rtx_insn *. * haifa-sched.c (reemit_notes): Strengthen param "insn" and local "last" from rtx to rtx_insn *. * ira-emit.c (change_regs_in_insn): New function. (change_loop): Strengthen local "insn" from rtx to rtx_insn *. Invoke change_regs_in_insn rather than change_regs. * ira.c (update_equiv_regs): Strengthen locals "insn", "init_insn", "new_insn" from rtx to rtx_insn *. Invoke for_each_rtx_in_insn rather than for_each_rtx. * recog.c (confirm_change_group): Add checked casts. (peep2_update_life): Strengthen local "x" from rtx to rtx_insn *. Add checked cast. (peep2_fill_buffer): Add checked cast. * rtlanal.c (remove_note): Likewise. * valtrack.c (propagate_for_debug): Strengthen param "insn" and locals "next" "end" from rtx to rtx_insn *. / 2014-08-26 David Malcolm <dmalcolm@redhat.com> * rtx-classes-status.txt (TODO): DF_REF_INSN is done. From-SVN: r214548
2014-08-26 22:39:42 +02:00
df_notes_rescan (as_a <rtx_insn *> (insn));
break;
default:
break;
1991-12-01 06:13:56 +01:00
}
}
/* Remove REG_EQUAL and/or REG_EQUIV notes if INSN has such notes. */
void
remove_reg_equal_equiv_notes (rtx_insn *insn)
{
rtx *loc;
loc = &REG_NOTES (insn);
while (*loc)
{
enum reg_note kind = REG_NOTE_KIND (*loc);
if (kind == REG_EQUAL || kind == REG_EQUIV)
*loc = XEXP (*loc, 1);
else
loc = &XEXP (*loc, 1);
}
}
/* Remove all REG_EQUAL and REG_EQUIV notes referring to REGNO. */
void
remove_reg_equal_equiv_notes_for_regno (unsigned int regno)
{
df_ref eq_use;
if (!df)
return;
/* This loop is a little tricky. We cannot just go down the chain because
it is being modified by some actions in the loop. So we just iterate
over the head. We plan to drain the list anyway. */
while ((eq_use = DF_REG_EQ_USE_CHAIN (regno)) != NULL)
{
rtx_insn *insn = DF_REF_INSN (eq_use);
rtx note = find_reg_equal_equiv_note (insn);
/* This assert is generally triggered when someone deletes a REG_EQUAL
or REG_EQUIV note by hacking the list manually rather than calling
remove_note. */
gcc_assert (note);
remove_note (insn, note);
}
}
/* Search LISTP (an EXPR_LIST) for an entry whose first operand is NODE and
return 1 if it is found. A simple equality test is used to determine if
NODE matches. */
bool
in_insn_list_p (const rtx_insn_list *listp, const rtx_insn *node)
{
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
const_rtx x;
for (x = listp; x; x = XEXP (x, 1))
if (node == XEXP (x, 0))
return true;
return false;
}
/* Search LISTP (an EXPR_LIST) for an entry whose first operand is NODE and
remove that entry from the list if it is found.
A simple equality test is used to determine if NODE matches. */
void
remove_node_from_expr_list (const_rtx node, rtx_expr_list **listp)
{
rtx_expr_list *temp = *listp;
rtx prev = NULL_RTX;
while (temp)
{
if (node == temp->element ())
{
/* Splice the node out of the list. */
if (prev)
XEXP (prev, 1) = temp->next ();
else
*listp = temp->next ();
return;
}
prev = temp;
temp = temp->next ();
}
}
/* Search LISTP (an INSN_LIST) for an entry whose first operand is NODE and
remove that entry from the list if it is found.
A simple equality test is used to determine if NODE matches. */
void
remove_node_from_insn_list (const rtx_insn *node, rtx_insn_list **listp)
{
rtx_insn_list *temp = *listp;
rtx prev = NULL;
while (temp)
{
if (node == temp->insn ())
{
/* Splice the node out of the list. */
if (prev)
XEXP (prev, 1) = temp->next ();
else
*listp = temp->next ();
return;
}
prev = temp;
temp = temp->next ();
}
}
1991-12-01 06:13:56 +01:00
/* Nonzero if X contains any volatile instructions. These are instructions
which may cause unpredictable machine state instructions, and thus no
instructions or register uses should be moved or combined across them.
This includes only volatile asms and UNSPEC_VOLATILE instructions. */
int
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
volatile_insn_p (const_rtx x)
{
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
const RTX_CODE code = GET_CODE (x);
switch (code)
{
case LABEL_REF:
case SYMBOL_REF:
case CONST:
alias.c (rtx_equal_for_memref_p): Convert constant cases. 2012-08-23 Kenneth Zadeck <zadeck@naturalbridge.com> * alias.c (rtx_equal_for_memref_p): Convert constant cases. * combine.c (find_single_use_1, mark_used_regs_combine): Convert to CASE_CONST_ANY. * cse.c (exp_equiv_p, canon_reg, fold_rtx, cse_process_notes_1, count_reg_usage): Convert constant cases. * cselib.c (cselib_expand_value_rtx_1): Convert to CASE_CONST_ANY. (cselib_subst_to_values): Convert constant cases. * df-scan.c (df_uses_record): Ditto. * dse.c (const_or_frame_p): Convert case statements to explicit if-then-else using mode classes. * emit-rtl.c (verify_rtx_sharing, copy_insn_1): Convert constant cases. * explow.c (convert_memory_address_addr_space): Ditto. * gcse.c (want_to_gcse_p, oprs_unchanged_p, compute_transp): Ditto. * genattrtab.c (attr_copy_rtx, clear_struct_flag): Ditto. * ira.c (equiv_init_varies_p, contains_replace_regs, memref_referenced_p, rtx_moveable_p): Ditto. * jump.c (mark_jump_label_1): Remove constant cases. (rtx_renumbered_equal_p): Convert to CASE_CONST_UNIQUE. * loop-invariant.c (check_maybe_invariant, hash_invariant_expr_1, invariant_expr_equal_p): Convert to CASE_CONST_ANY. * postreload-gcse.c (oprs_unchanged_p): Convert constant cases. * reginfo.c (reg_scan_mark_refs): Ditto. * regrename.c (scan_rtx): Ditto. * reload1.c (eliminate_regs_1, elimination_effects, scan_paradoxical_subregs): Ditto. * reload.c (operands_match_p, subst_reg_equivs): Ditto. * resource.c (mark_referenced_resources, mark_set_resources): Ditto. * rtlanal.c (rtx_unstable_p, rtx_varies_p, count_occurrences) (reg_mentioned_p, modified_between_p, modified_in_p) (volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, inequality_comparisons_p, computed_jump_p_1): Ditto. * rtl.c (copy_rtx, rtx_equal_p_cb, rtx_equal_p): Ditto. * sched-deps.c (sched_analyze_2): Ditto. * valtrack.c (cleanup_auto_inc_dec): Ditto. * rtl.h: (CASE_CONST_SCALAR_INT, CASE_CONST_UNIQUE, CASE_CONST_ANY): New macros. From-SVN: r190627
2012-08-23 20:46:18 +02:00
CASE_CONST_ANY:
case CC0:
case PC:
case REG:
case SCRATCH:
case CLOBBER:
case ADDR_VEC:
case ADDR_DIFF_VEC:
case CALL:
case MEM:
return 0;
case UNSPEC_VOLATILE:
return 1;
case ASM_INPUT:
case ASM_OPERANDS:
if (MEM_VOLATILE_P (x))
return 1;
default:
break;
}
/* Recursively scan the operands of this expression. */
{
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
const char *const fmt = GET_RTX_FORMAT (code);
alias.c: Remove uses of "register" specifier in declarations of arguments and local... 2001-10-10 Stan Shebs <shebs@apple.com> * alias.c: Remove uses of "register" specifier in declarations of arguments and local variables. * c-common.c: Ditto. * c-convert.c: Ditto. * c-decl.c: Ditto. * c-format.c: Ditto. * c-semantics.c: Ditto. * c-typeck.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfgbuild.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * combine.c: Ditto. * convert.c: Ditto. * cppexp.c: Ditto. * cppfiles.c: Ditto. * cse.c: Ditto. * dbxout.c: Ditto. * defaults.h: Ditto. * df.c: Ditto. * dwarf2out.c: Ditto. * dwarfout.c: Ditto. * emit-rtl.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fix-header.c: Ditto. * floatlib.c: Ditto. * flow.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * gcc.c: Ditto. * gcse.c: Ditto. * gen-protos.c: Ditto. * genattrtab.c: Ditto. * gencheck.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * gengenrtl.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * gensupport.c: Ditto. * global.c: Ditto. * gmon.c: Ditto. * graph.c: Ditto. * haifa-sched.c: Ditto. * hard-reg-set.h: Ditto. * hash.c: Ditto. * integrate.c: Ditto. * jump.c: Ditto. * lists.c: Ditto. * local-alloc.c: Ditto. * loop.c: Ditto. * mips-tdump.c: Ditto. * mips-tfile.c: Ditto. * optabs.c: Ditto. * prefix.c: Ditto. * print-rtl.c: Ditto. * read-rtl.c: Ditto. * real.c: Ditto. * recog.c: Ditto. * reg-stack.c: Ditto. * regclass.c: Ditto. * regmove.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtl.c: Ditto. * rtlanal.c: Ditto. * scan.c: Ditto. * sched-deps.c: Ditto. * sched-rgn.c: Ditto. * sdbout.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tradcif.y: Ditto. * tradcpp.c: Ditto. * tree.c: Ditto. * unroll.c: Ditto. * varasm.c: Ditto. * xcoffout.c: Ditto. From-SVN: r46173
2001-10-11 05:16:15 +02:00
int i;
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
{
if (fmt[i] == 'e')
{
if (volatile_insn_p (XEXP (x, i)))
return 1;
}
else if (fmt[i] == 'E')
{
alias.c: Remove uses of "register" specifier in declarations of arguments and local... 2001-10-10 Stan Shebs <shebs@apple.com> * alias.c: Remove uses of "register" specifier in declarations of arguments and local variables. * c-common.c: Ditto. * c-convert.c: Ditto. * c-decl.c: Ditto. * c-format.c: Ditto. * c-semantics.c: Ditto. * c-typeck.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfgbuild.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * combine.c: Ditto. * convert.c: Ditto. * cppexp.c: Ditto. * cppfiles.c: Ditto. * cse.c: Ditto. * dbxout.c: Ditto. * defaults.h: Ditto. * df.c: Ditto. * dwarf2out.c: Ditto. * dwarfout.c: Ditto. * emit-rtl.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fix-header.c: Ditto. * floatlib.c: Ditto. * flow.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * gcc.c: Ditto. * gcse.c: Ditto. * gen-protos.c: Ditto. * genattrtab.c: Ditto. * gencheck.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * gengenrtl.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * gensupport.c: Ditto. * global.c: Ditto. * gmon.c: Ditto. * graph.c: Ditto. * haifa-sched.c: Ditto. * hard-reg-set.h: Ditto. * hash.c: Ditto. * integrate.c: Ditto. * jump.c: Ditto. * lists.c: Ditto. * local-alloc.c: Ditto. * loop.c: Ditto. * mips-tdump.c: Ditto. * mips-tfile.c: Ditto. * optabs.c: Ditto. * prefix.c: Ditto. * print-rtl.c: Ditto. * read-rtl.c: Ditto. * real.c: Ditto. * recog.c: Ditto. * reg-stack.c: Ditto. * regclass.c: Ditto. * regmove.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtl.c: Ditto. * rtlanal.c: Ditto. * scan.c: Ditto. * sched-deps.c: Ditto. * sched-rgn.c: Ditto. * sdbout.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tradcif.y: Ditto. * tradcpp.c: Ditto. * tree.c: Ditto. * unroll.c: Ditto. * varasm.c: Ditto. * xcoffout.c: Ditto. From-SVN: r46173
2001-10-11 05:16:15 +02:00
int j;
for (j = 0; j < XVECLEN (x, i); j++)
if (volatile_insn_p (XVECEXP (x, i, j)))
return 1;
}
}
}
return 0;
}
1991-12-01 06:13:56 +01:00
/* Nonzero if X contains any volatile memory references
UNSPEC_VOLATILE operations or volatile ASM_OPERANDS expressions. */
1991-12-01 06:13:56 +01:00
int
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
volatile_refs_p (const_rtx x)
1991-12-01 06:13:56 +01:00
{
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
const RTX_CODE code = GET_CODE (x);
1991-12-01 06:13:56 +01:00
switch (code)
{
case LABEL_REF:
case SYMBOL_REF:
case CONST:
alias.c (rtx_equal_for_memref_p): Convert constant cases. 2012-08-23 Kenneth Zadeck <zadeck@naturalbridge.com> * alias.c (rtx_equal_for_memref_p): Convert constant cases. * combine.c (find_single_use_1, mark_used_regs_combine): Convert to CASE_CONST_ANY. * cse.c (exp_equiv_p, canon_reg, fold_rtx, cse_process_notes_1, count_reg_usage): Convert constant cases. * cselib.c (cselib_expand_value_rtx_1): Convert to CASE_CONST_ANY. (cselib_subst_to_values): Convert constant cases. * df-scan.c (df_uses_record): Ditto. * dse.c (const_or_frame_p): Convert case statements to explicit if-then-else using mode classes. * emit-rtl.c (verify_rtx_sharing, copy_insn_1): Convert constant cases. * explow.c (convert_memory_address_addr_space): Ditto. * gcse.c (want_to_gcse_p, oprs_unchanged_p, compute_transp): Ditto. * genattrtab.c (attr_copy_rtx, clear_struct_flag): Ditto. * ira.c (equiv_init_varies_p, contains_replace_regs, memref_referenced_p, rtx_moveable_p): Ditto. * jump.c (mark_jump_label_1): Remove constant cases. (rtx_renumbered_equal_p): Convert to CASE_CONST_UNIQUE. * loop-invariant.c (check_maybe_invariant, hash_invariant_expr_1, invariant_expr_equal_p): Convert to CASE_CONST_ANY. * postreload-gcse.c (oprs_unchanged_p): Convert constant cases. * reginfo.c (reg_scan_mark_refs): Ditto. * regrename.c (scan_rtx): Ditto. * reload1.c (eliminate_regs_1, elimination_effects, scan_paradoxical_subregs): Ditto. * reload.c (operands_match_p, subst_reg_equivs): Ditto. * resource.c (mark_referenced_resources, mark_set_resources): Ditto. * rtlanal.c (rtx_unstable_p, rtx_varies_p, count_occurrences) (reg_mentioned_p, modified_between_p, modified_in_p) (volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, inequality_comparisons_p, computed_jump_p_1): Ditto. * rtl.c (copy_rtx, rtx_equal_p_cb, rtx_equal_p): Ditto. * sched-deps.c (sched_analyze_2): Ditto. * valtrack.c (cleanup_auto_inc_dec): Ditto. * rtl.h: (CASE_CONST_SCALAR_INT, CASE_CONST_UNIQUE, CASE_CONST_ANY): New macros. From-SVN: r190627
2012-08-23 20:46:18 +02:00
CASE_CONST_ANY:
1991-12-01 06:13:56 +01:00
case CC0:
case PC:
case REG:
case SCRATCH:
case CLOBBER:
case ADDR_VEC:
case ADDR_DIFF_VEC:
return 0;
case UNSPEC_VOLATILE:
1991-12-01 06:13:56 +01:00
return 1;
case MEM:
case ASM_INPUT:
1991-12-01 06:13:56 +01:00
case ASM_OPERANDS:
if (MEM_VOLATILE_P (x))
return 1;
default:
break;
1991-12-01 06:13:56 +01:00
}
/* Recursively scan the operands of this expression. */
{
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
const char *const fmt = GET_RTX_FORMAT (code);
alias.c: Remove uses of "register" specifier in declarations of arguments and local... 2001-10-10 Stan Shebs <shebs@apple.com> * alias.c: Remove uses of "register" specifier in declarations of arguments and local variables. * c-common.c: Ditto. * c-convert.c: Ditto. * c-decl.c: Ditto. * c-format.c: Ditto. * c-semantics.c: Ditto. * c-typeck.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfgbuild.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * combine.c: Ditto. * convert.c: Ditto. * cppexp.c: Ditto. * cppfiles.c: Ditto. * cse.c: Ditto. * dbxout.c: Ditto. * defaults.h: Ditto. * df.c: Ditto. * dwarf2out.c: Ditto. * dwarfout.c: Ditto. * emit-rtl.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fix-header.c: Ditto. * floatlib.c: Ditto. * flow.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * gcc.c: Ditto. * gcse.c: Ditto. * gen-protos.c: Ditto. * genattrtab.c: Ditto. * gencheck.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * gengenrtl.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * gensupport.c: Ditto. * global.c: Ditto. * gmon.c: Ditto. * graph.c: Ditto. * haifa-sched.c: Ditto. * hard-reg-set.h: Ditto. * hash.c: Ditto. * integrate.c: Ditto. * jump.c: Ditto. * lists.c: Ditto. * local-alloc.c: Ditto. * loop.c: Ditto. * mips-tdump.c: Ditto. * mips-tfile.c: Ditto. * optabs.c: Ditto. * prefix.c: Ditto. * print-rtl.c: Ditto. * read-rtl.c: Ditto. * real.c: Ditto. * recog.c: Ditto. * reg-stack.c: Ditto. * regclass.c: Ditto. * regmove.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtl.c: Ditto. * rtlanal.c: Ditto. * scan.c: Ditto. * sched-deps.c: Ditto. * sched-rgn.c: Ditto. * sdbout.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tradcif.y: Ditto. * tradcpp.c: Ditto. * tree.c: Ditto. * unroll.c: Ditto. * varasm.c: Ditto. * xcoffout.c: Ditto. From-SVN: r46173
2001-10-11 05:16:15 +02:00
int i;
1991-12-01 06:13:56 +01:00
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
{
if (fmt[i] == 'e')
{
if (volatile_refs_p (XEXP (x, i)))
return 1;
}
else if (fmt[i] == 'E')
1991-12-01 06:13:56 +01:00
{
alias.c: Remove uses of "register" specifier in declarations of arguments and local... 2001-10-10 Stan Shebs <shebs@apple.com> * alias.c: Remove uses of "register" specifier in declarations of arguments and local variables. * c-common.c: Ditto. * c-convert.c: Ditto. * c-decl.c: Ditto. * c-format.c: Ditto. * c-semantics.c: Ditto. * c-typeck.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfgbuild.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * combine.c: Ditto. * convert.c: Ditto. * cppexp.c: Ditto. * cppfiles.c: Ditto. * cse.c: Ditto. * dbxout.c: Ditto. * defaults.h: Ditto. * df.c: Ditto. * dwarf2out.c: Ditto. * dwarfout.c: Ditto. * emit-rtl.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fix-header.c: Ditto. * floatlib.c: Ditto. * flow.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * gcc.c: Ditto. * gcse.c: Ditto. * gen-protos.c: Ditto. * genattrtab.c: Ditto. * gencheck.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * gengenrtl.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * gensupport.c: Ditto. * global.c: Ditto. * gmon.c: Ditto. * graph.c: Ditto. * haifa-sched.c: Ditto. * hard-reg-set.h: Ditto. * hash.c: Ditto. * integrate.c: Ditto. * jump.c: Ditto. * lists.c: Ditto. * local-alloc.c: Ditto. * loop.c: Ditto. * mips-tdump.c: Ditto. * mips-tfile.c: Ditto. * optabs.c: Ditto. * prefix.c: Ditto. * print-rtl.c: Ditto. * read-rtl.c: Ditto. * real.c: Ditto. * recog.c: Ditto. * reg-stack.c: Ditto. * regclass.c: Ditto. * regmove.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtl.c: Ditto. * rtlanal.c: Ditto. * scan.c: Ditto. * sched-deps.c: Ditto. * sched-rgn.c: Ditto. * sdbout.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tradcif.y: Ditto. * tradcpp.c: Ditto. * tree.c: Ditto. * unroll.c: Ditto. * varasm.c: Ditto. * xcoffout.c: Ditto. From-SVN: r46173
2001-10-11 05:16:15 +02:00
int j;
1991-12-01 06:13:56 +01:00
for (j = 0; j < XVECLEN (x, i); j++)
if (volatile_refs_p (XVECEXP (x, i, j)))
return 1;
}
}
}
return 0;
}
/* Similar to above, except that it also rejects register pre- and post-
incrementing. */
int
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
side_effects_p (const_rtx x)
1991-12-01 06:13:56 +01:00
{
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
const RTX_CODE code = GET_CODE (x);
1991-12-01 06:13:56 +01:00
switch (code)
{
case LABEL_REF:
case SYMBOL_REF:
case CONST:
alias.c (rtx_equal_for_memref_p): Convert constant cases. 2012-08-23 Kenneth Zadeck <zadeck@naturalbridge.com> * alias.c (rtx_equal_for_memref_p): Convert constant cases. * combine.c (find_single_use_1, mark_used_regs_combine): Convert to CASE_CONST_ANY. * cse.c (exp_equiv_p, canon_reg, fold_rtx, cse_process_notes_1, count_reg_usage): Convert constant cases. * cselib.c (cselib_expand_value_rtx_1): Convert to CASE_CONST_ANY. (cselib_subst_to_values): Convert constant cases. * df-scan.c (df_uses_record): Ditto. * dse.c (const_or_frame_p): Convert case statements to explicit if-then-else using mode classes. * emit-rtl.c (verify_rtx_sharing, copy_insn_1): Convert constant cases. * explow.c (convert_memory_address_addr_space): Ditto. * gcse.c (want_to_gcse_p, oprs_unchanged_p, compute_transp): Ditto. * genattrtab.c (attr_copy_rtx, clear_struct_flag): Ditto. * ira.c (equiv_init_varies_p, contains_replace_regs, memref_referenced_p, rtx_moveable_p): Ditto. * jump.c (mark_jump_label_1): Remove constant cases. (rtx_renumbered_equal_p): Convert to CASE_CONST_UNIQUE. * loop-invariant.c (check_maybe_invariant, hash_invariant_expr_1, invariant_expr_equal_p): Convert to CASE_CONST_ANY. * postreload-gcse.c (oprs_unchanged_p): Convert constant cases. * reginfo.c (reg_scan_mark_refs): Ditto. * regrename.c (scan_rtx): Ditto. * reload1.c (eliminate_regs_1, elimination_effects, scan_paradoxical_subregs): Ditto. * reload.c (operands_match_p, subst_reg_equivs): Ditto. * resource.c (mark_referenced_resources, mark_set_resources): Ditto. * rtlanal.c (rtx_unstable_p, rtx_varies_p, count_occurrences) (reg_mentioned_p, modified_between_p, modified_in_p) (volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, inequality_comparisons_p, computed_jump_p_1): Ditto. * rtl.c (copy_rtx, rtx_equal_p_cb, rtx_equal_p): Ditto. * sched-deps.c (sched_analyze_2): Ditto. * valtrack.c (cleanup_auto_inc_dec): Ditto. * rtl.h: (CASE_CONST_SCALAR_INT, CASE_CONST_UNIQUE, CASE_CONST_ANY): New macros. From-SVN: r190627
2012-08-23 20:46:18 +02:00
CASE_CONST_ANY:
1991-12-01 06:13:56 +01:00
case CC0:
case PC:
case REG:
case SCRATCH:
case ADDR_VEC:
case ADDR_DIFF_VEC:
invoke.texi (-fvar-tracking-assignments): New. gcc/ChangeLog: * doc/invoke.texi (-fvar-tracking-assignments): New. (-fvar-tracking-assignments-toggle): New. (-fdump-final-insns=file): Mark filename as optional. (--param min-nondebug-insn-uid): New. (-gdwarf-@{version}): Mention version 4. * opts.c (common_handle_option): Accept it. * tree-vrp.c (find_assert_locations_1): Skip debug stmts. * regrename.c (regrename_optimize): Drop last. Don't count debug insns as uses. Don't reject change because of debug insn. (do_replace): Reject DEBUG_INSN as chain starter. Take base_regno from the chain starter, and check for inexact matches in DEBUG_INSNS. (scan_rtx_reg): Accept inexact matches in DEBUG_INSNs. (build_def_use): Simplify and fix the marking of DEBUG_INSNs. * sched-ebb.c (schedule_ebbs): Skip boundary debug insns. * fwprop.c (forward_propagate_and_simplify): ...into debug insns. * doc/gimple.texi (is_gimple_debug): New. (gimple_debug_bind_p): New. (is_gimple_call, gimple_assign_cast_p): End sentence with period. * doc/install.texi (bootstrap-debug): More details. (bootstrap-debug-big, bootstrap-debug-lean): Document. (bootstrap-debug-lib): More details. (bootstrap-debug-ckovw): Update. (bootstrap-time): New. * tree-into-ssa.c (mark_def_sites): Skip debug stmts. (insert_phi_nodes_for): Insert debug stmts. (rewrite_stmt): Take iterator. Insert debug stmts. (rewrite_enter_block): Adjust. (maybe_replace_use_in_debug_stmt): New. (rewrite_update_stmt): Use it. (mark_use_interesting): Return early for debug stmts. * tree-ssa-loop-im.c (rewrite_bittest): Propagate DEFs into debug stmts before replacing stmt. (move_computations_stmt): Likewise. * ira-conflicts.c (add_copies): Skip debug insns. * regstat.c (regstat_init_n_sets_and_refs): Discount debug insns. (regstat_bb_compute_ri): Skip debug insns. * tree-ssa-threadupdate.c (redirection_block_p): Skip debug stmts. * tree-ssa-loop-manip.c (find_uses_to_rename_stmt, check_loop_closed_ssa_stmt): Skip debug stmts. * tree-tailcall.c (find_tail_calls): Likewise. * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Likewise. * tree.h (MAY_HAVE_DEBUG_STMTS): New. (build_var_debug_value_stat): Declare. (build_var_debug_value): Define. (target_for_debug_bind): Declare. * reload.c (find_equiv_reg): Skip debug insns. * rtlanal.c (reg_used_between_p): Skip debug insns. (side_effects_p): Likewise. (canonicalize_condition): Likewise. * ddg.c (create_ddg_dep_from_intra_loop_link): Check that non-debug insns never depend on debug insns. (create_ddg_dep_no_link): Likewise. (add_cross_iteration_register_deps): Use ANTI_DEP for debug insns. Don't add inter-loop dependencies for debug insns. (build_intra_loop_deps): Likewise. (create_ddg): Count debug insns. * ddg.h (struct ddg::num_debug): New. (num_backargs): Pair up with previous int field. * diagnostic.c (diagnostic_report_diagnostic): Skip notes on -fcompare-debug-second. * final.c (get_attr_length_1): Skip debug insns. (rest_of_clean-state): Don't dump CFA_RESTORE_STATE. * gcc.c (invoke_as): Call compare-debug-dump-opt. (driver_self_specs): Map -fdump-final-insns to -fdump-final-insns=.. (get_local_tick): New. (compare_debug_dump_opt_spec_function): Test for . argument and compute output name. Compute temp output spec without flag name. Compute -frandom-seed. (OPT): Undef after use. * cfgloopanal.c (num_loop_insns): Skip debug insns. (average_num_loop_insns): Likewise. * params.h (MIN_NONDEBUG_INSN_UID): New. * gimple.def (GIMPLE_DEBUG): New. * ipa-reference.c (scan_stmt_for_static_refs): Skip debug stmts. * auto-inc-dec.c (merge_in_block): Skip debug insns. (merge_in_block): Fix whitespace. * toplev.c (flag_var_tracking): Update comment. (flag_var_tracking_assignments): New. (flag_var_tracking_assignments_toggle): New. (process_options): Don't open final insns dump file if we're not going to write to it. Compute defaults for var_tracking. * df-scan.c (df_insn_rescan_debug_internal): New. (df_uses_record): Handle debug insns. * haifa-sched.c (ready): Initialize n_debug. (contributes_to_priority): Skip debug insns. (dep_list_size): New. (priority): Use it. (rank_for_schedule): Likewise. Schedule debug insns as soon as they're ready. Disregard previous debug insns to make decisions. (queue_insn): Never queue debug insns. (ready_add, ready_remove_first, ready_remove): Count debug insns. (schedule_insn): Don't reject debug insns because of issue rate. (get_ebb_head_tail, no_real_insns_p): Skip boundary debug insns. (queue_to_ready): Skip and discount debug insns. (choose_ready): Let debug insns through. (schedule_block): Check boundary debug insns. Discount debug insns, schedule them early. Adjust whitespace. (set_priorities): Check for boundary debug insns. (add_jump_dependencies): Use dep_list_size. (prev_non_location_insn): New. (check_cfg): Use it. * tree-ssa-loop-ivopts.c (find-interesting_users): Skip debug stmts. (remove_unused_ivs): Reset debug stmts. * modulo-sched.c (const_iteration_count): Skip debug insns. (res_MII): Discount debug insns. (loop_single_full_bb_p): Skip debug insns. (sms_schedule): Likewise. (sms_schedule_by_order): Likewise. (ps_has_conflicts): Likewise. * caller-save.c (refmarker_fn): New. (save_call_clobbered_regs): Replace regs with saved mem in debug insns. (mark_referenced_regs): Take pointer, mark and arg. Adjust. Call refmarker_fn mark for hardregnos. (mark_reg_as_referenced): New. (replace_reg_with_saved_mem): New. * ipa-pure-const.c (check_stmt): Skip debug stmts. * cse.c (cse_insn): Canonicalize debug insns. Skip them when searching back. (cse_extended_basic_block): Skip debug insns. (count_reg_usage): Likewise. (is_dead_reg): New, split out of... (set_live_p): ... here. (insn_live_p): Use it for debug insns. * tree-stdarg.c (check_all_va_list_escapes): Skip debug stmts. (execute_optimize_stdarg): Likewise. * tree-ssa-dom.c (propagate_rhs_into_lhs): Likewise. * tree-ssa-propagate.c (substitute_and_fold): Don't regard changes in debug stmts as changes. * sel-sched.c (moving_insn_creates_bookkeeping_block_p): New. (moveup_expr): Don't move across debug insns. Don't move debug insn if it would create a bookkeeping block. (moveup_expr_cached): Don't use cache for debug insns that are heads of blocks. (compute_av_set_inside_bb): Skip debug insns. (sel_rank_for_schedule): Schedule debug insns first. Remove dead code. (block_valid_for_bookkeeping_p); Support lax searches. (create_block_for_bookkeeping): Adjust block numbers when encountering debug-only blocks. (find_place_for_bookkeeping): Deal with debug-only blocks. (generate_bookkeeping_insn): Accept no place to insert. (remove_temp_moveop_nops): New argument full_tidying. (prepare_place_to_insert): Deal with debug insns. (advance_state_on_fence): Debug insns don't start cycles. (update_boundaries): Take fence as argument. Deal with debug insns. (schedule_expr_on_boundary): No full_tidying on debug insns. (fill_insns): Deal with debug insns. (track_scheduled_insns_and_blocks): Don't count debug insns. (need_nop_to_preserve_insn_bb): New, split out of... (remove_insn_from_stream): ... this. (fur_orig_expr_not_found): Skip debug insns. * rtl.def (VALUE): Move up. (DEBUG_INSN): New. * tree-ssa-sink.c (all_immediate_uses_same_place): Skip debug stmts. (nearest_common_dominator_of_uses): Take debug_stmts argument. Set it if debug stmts are found. (statement_sink_location): Skip debug stmts. Propagate moving defs into debug stmts. * ifcvt.c (first_active_insn): Skip debug insns. (last_active_insns): Likewise. (cond_exec_process_insns): Likewise. (noce_process_if_block): Likewise. (check_cond_move_block): Likewise. (cond_move_convert_if_block): Likewise. (block_jumps_and_fallthru_p): Likewise. (dead_or_predicable): Likewise. * dwarf2out.c (debug_str_hash_forced): New. (find_AT_string): Add comment. (gen_label_for_indirect_string): New. (get_debug_string_label): New. (AT_string_form): Use it. (mem_loc_descriptor): Handle non-TLS symbols. Handle MINUS , DIV, MOD, AND, IOR, XOR, NOT, ABS, NEG, and CONST_STRING. Accept but discard COMPARE, IF_THEN_ELSE, ROTATE, ROTATERT, TRUNCATE and several operations that cannot be represented with DWARF opcodes. (loc_descriptor): Ignore SIGN_EXTEND and ZERO_EXTEND. Require dwarf_version 4 for DW_OP_implicit_value and DW_OP_stack_value. (dwarf2out_var_location): Take during-call mark into account. (output_indirect_string): Update comment. Output if there are label and references. (prune_indirect_string): New. (prune_unused_types): Call it if debug_str_hash_forced. More in dwarf2out.c, from Jakub Jelinek <jakub@redhat.com>: (dw_long_long_const): Remove. (struct dw_val_struct): Change val_long_long type to rtx. (print_die, attr_checksum, same_dw_val_p, loc_descriptor): Adjust for val_long_long change to CONST_DOUBLE rtx from a long hi/lo pair. (output_die): Likewise. Use HOST_BITS_PER_WIDE_INT size of each component instead of HOST_BITS_PER_LONG. (output_loc_operands): Likewise. For const8* assert HOST_BITS_PER_WIDE_INT rather than HOST_BITS_PER_LONG is >= 64. (output_loc_operands_raw): For const8* assert HOST_BITS_PER_WIDE_INT rather than HOST_BITS_PER_LONG is >= 64. (add_AT_long_long): Remove val_hi and val_lo arguments, add val_const_double. (size_of_die): Use HOST_BITS_PER_WIDE_INT size multiplier instead of HOST_BITS_PER_LONG for dw_val_class_long_long. (add_const_value_attribute): Adjust add_AT_long_long caller. Don't handle TLS SYMBOL_REFs. If CONST wraps a constant, tail recurse. (dwarf_stack_op_name): Handle DW_OP_implicit_value and DW_OP_stack_value. (size_of_loc_descr, output_loc_operands, output_loc_operands_raw): Handle DW_OP_implicit_value. (extract_int): Move prototype earlier. (mem_loc_descriptor): For SUBREG punt if inner mode size is wider than DWARF2_ADDR_SIZE. Handle SIGN_EXTEND and ZERO_EXTEND by DW_OP_shl and DW_OP_shr{a,}. Handle EQ, NE, GT, GE, LT, LE, GTU, GEU, LTU, LEU, SMIN, SMAX, UMIN, UMAX, SIGN_EXTRACT, ZERO_EXTRACT. (loc_descriptor): Compare mode size with DWARF2_ADDR_SIZE instead of Pmode size. (loc_descriptor): Add MODE argument. Handle CONST_INT, CONST_DOUBLE, CONST_VECTOR, CONST, LABEL_REF and SYMBOL_REF if mode != VOIDmode, attempt to handle other expressions. Don't handle TLS SYMBOL_REFs. (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor_from_tree_1): Adjust loc_descriptor callers. (add_location_or_const_value_attribute): Likewise. For single location loc_lists attempt to use add_const_value_attribute for constant decls. Add DW_AT_const_value even if NOTE_VAR_LOCATION is VAR_LOCATION with CONSTANT_P or CONST_STRING in its expression. * cfgbuild.c (inside_basic_block_p): Handle debug insns. (control_flow_insn_p): Likewise. * tree-parloops.c (eliminate_local_variables_stmt): Handle debug stmt. (separate_decls_in_region_debug_bind): New. (separate_decls_in_region): Process debug bind stmts afterwards. * recog.c (verify_changes): Handle debug insns. (extract_insn): Likewise. (peephole2_optimize): Skip debug insns. * dse.c (scan_insn): Skip debug insns. * sel-sched-ir.c (return_nop_to_pool): Take full_tidying argument. Pass it on. (setup_id_for_insn): Handle debug insns. (maybe_tidy_empty_bb): Adjust whitespace. (tidy_control_flow): Skip debug insns. (sel_remove_insn): Adjust for debug insns. (sel_estimate_number_of_insns): Skip debug insns. (create_insn_rtx_from_pattern): Handle debug insns. (create_copy_of_insn_rtx): Likewise. * sel-sched-.h (sel_bb_end): Declare. (sel_bb_empty_or_nop_p): New. (get_all_loop_exits): Use it. (_eligible_successor_edge_p): Likewise. (return_nop_to_pool): Adjust. * tree-eh.c (tre_empty_eh_handler_p): Skip debug stmts. * ira-lives.c (process_bb_node_lives): Skip debug insns. * gimple-pretty-print.c (dump_gimple_debug): New. (dump_gimple_stmt): Use it. (dump_bb_header): Skip gimple debug stmts. * regmove.c (optimize_reg_copy_1): Discount debug insns. (fixup_match_2): Likewise. (regmove_backward_pass): Likewise. Simplify combined replacement. Handle debug insns. * function.c (instantiate_virtual_regs): Handle debug insns. * function.h (struct emit_status): Add x_cur_debug_insn_uid. * print-rtl.h: Include cselib.h. (print_rtx): Print VALUEs. Split out and recurse for VAR_LOCATIONs. * df.h (df_inns_rescan_debug_internal): Declare. * gcse.c (alloc_hash_table): Estimate n_insns. (cprop_insn): Don't regard debug insns as changes. (bypass_conditional_jumps): Skip debug insns. (one_pre_gcse_pass): Adjust. (one_code_hoisting_pass): Likewise. (compute_ld_motion_mems): Skip debug insns. (one_cprop_pass): Adjust. * tree-if-conv.c (tree_if_convert_stmt): Reset debug stmts. (if_convertible_stmt_p): Handle debug stmts. * init-regs.c (initialize_uninitialized_regs): Skip debug insns. * tree-vect-loop.c (vect_is_simple_reduction): Skip debug stmts. * ira-build.c (create_bb_allocnos): Skip debug insns. * tree-flow-inline.h (has_zero_uses): Discount debug stmts. (has_single_use): Likewise. (single_imm_use): Likewise. (num_imm_uses): Likewise. * tree-ssa-phiopt.c (empty_block_p): Skip debug stmts. * tree-ssa-coalesce.c (build_ssa_conflict_graph): Skip debug stmts. (create_outofssa_var_map): Likewise. * lower-subreg.c (adjust_decomposed_uses): New. (resolve_debug): New. (decompose_multiword_subregs): Use it. * tree-dfa.c (find_referenced_vars): Skip debug stmts. * emit-rtl.c: Include params.h. (cur_debug_insn_uid): Define. (set_new_first_and_last_insn): Set cur_debug_insn_uid too. (copy_rtx_if_shared_1): Handle debug insns. (reset_used_flags): Likewise. (set_used_flags): LIkewise. (get_max_insn_count): New. (next_nondebug_insn): New. (prev_nondebug_insn): New. (make_debug_insn_raw): New. (emit_insn_before_noloc): Handle debug insns. (emit_jump_insn_before_noloc): Likewise. (emit_call_insn_before_noloc): Likewise. (emit_debug_insn_before_noloc): New. (emit_insn_after_noloc): Handle debug insns. (emit_jump_insn_after_noloc): Likewise. (emit_call_insn_after_noloc): Likewise. (emit_debug_insn_after_noloc): Likewise. (emit_insn_after): Take loc from earlier non-debug insn. (emit_jump_insn_after): Likewise. (emit_call_insn_after): Likewise. (emit_debug_insn_after_setloc): New. (emit_debug_insn_after): New. (emit_insn_before): Take loc from later non-debug insn. (emit_jump_insn_before): Likewise. (emit_call_insn_before): Likewise. (emit_debug_insn_before_setloc): New. (emit_debug_insn_before): New. (emit_insn): Handle debug insns. (emit_debug_insn): New. (emit_jump_insn): Handle debug insns. (emit_call_insn): Likewise. (emit): Likewise. (init_emit): Take min-nondebug-insn-uid into account. Initialize cur_debug_insn_uid. (emit_copy_of_insn_after): Handle debug insns. * cfgexpand.c (gimple_assign_rhs_to_tree): Do not overwrite location of single rhs in place. (maybe_dump_rtl_for_gimple_stmt): Dump lineno. (floor_sdiv_adjust): New. (cell_sdiv_adjust): New. (cell_udiv_adjust): New. (round_sdiv_adjust): New. (round_udiv_adjust): New. (wrap_constant): Moved from cselib. (unwrap_constant): New. (expand_debug_expr): New. (expand_debug_locations): New. (expand_gimple_basic_block): Drop hiding redeclaration. Expand debug bind stmts. (gimple_expand_cfg): Expand debug locations. * cselib.c: Include tree-pass.h. (struct expand_value_data): New. (cselib_record_sets_hook): New. (PRESERVED_VALUE_P, LONG_TERM_PRESERVED_VALUE_P): New. (cselib_clear_table): Move, and implemnet in terms of... (cselib_reset_table_with_next_value): ... this. (cselib_get_next_unknown_value): New. (discard_useless_locs): Don't discard preserved values. (cselib_preserve_value): New. (cselib_preserved_value_p): New. (cselib_preserve_definitely): New. (cselib_clear_preserve): New. (cselib_preserve_only_values): New. (new_cselib_val): Take rtx argument. Dump it in details. (cselib_lookup_mem): Adjust. (expand_loc): Take regs_active in struct. Adjust. Silence dumps unless details are requested. (cselib_expand_value_rtx_cb): New. (cselib_expand_value_rtx): Rename and reimplment in terms of... (cselib_expand_value_rtx_1): ... this. Adjust. Silence dumps without details. Copy more subregs. Try to resolve values using a callback. Wrap constants. (cselib_subst_to_values): Adjust. (cselib_log_lookup): New. (cselib_lookup): Call it. (cselib_invalidate_regno): Don't count preserved values as useless. (cselib_invalidate_mem): Likewise. (cselib_record_set): Likewise. (struct set): Renamed to cselib_set, moved to cselib.h. (cselib_record_sets): Adjust. Call hook. (cselib_process_insn): Reset table when it would be cleared. (dump_cselib_val): New. (dump_cselib_table): New. * tree-cfgcleanup.c (tree_forwarded_block_p): Skip debug stmts. (remove_forwarder_block): Support moving debug stmts. * cselib.h (cselib_record_sets_hook): Declare. (cselib_expand_callback): New type. (cselib_expand_value_rtx_cb): Declare. (cselib_reset_table_with_next_value): Declare. (cselib_get_next_unknown_value): Declare. (cselib_preserve_value): Declare. (cselib_preserved_value_p): Declare. (cselib_preserve_only_values): Declare. (dump_cselib_table): Declare. * cfgcleanup.c (flow_find_cross_jump): Skip debug insns. (try_crossjump_to_edge): Likewise. (delete_unreachable_blocks): Remove dominant GIMPLE blocks after dominated blocks when debug stmts are present. * simplify-rtx.c (delegitimize_mem_from_attrs): New. * tree-ssa-live.c (remove_unused_locals): Skip debug stmts. (set_var_live_on_entry): Likewise. * loop-invariant.c (find_invariants_bb): Skip debug insns. * cfglayout.c (curr_location, last_location): Make static. (set_curr_insn_source_location): Don't avoid bouncing. (get_curr_insn_source_location): New. (get_curr_insn_block): New. (duplicate_insn_chain): Handle debug insns. * tree-ssa-forwprop.c (forward_propagate_addr_expr): Propagate into debug stmts. * common.opt (fcompare-debug): Move to sort order. (fdump-unnumbered-links): Likewise. (fvar-tracking-assignments): New. (fvar-tracking-assignments-toggle): New. * tree-ssa-dce.c (mark_stmt_necessary): Don't mark blocks because of debug stmts. (mark_stmt_if_obviously_necessary): Mark debug stmts. (eliminate_unnecessary_stmts): Walk dominated blocks before dominators. * tree-ssa-ter.c (find_replaceable_in_bb): Skip debug stmts. * ira.c (memref_used_between_p): Skip debug insns. (update_equiv_regs): Likewise. * sched-deps.c (sd_lists_size): Accept empty list. (sd_init_insn): Mark debug insns. (sd_finish_insn): Unmark them. (sd_add_dep): Reject non-debug deps on debug insns. (fixup_sched_groups): Give debug insns group treatment. Skip debug insns. (sched_analyze_reg): Don't mark debug insns for sched before call. (sched_analyze_2): Handle debug insns. (sched_analyze_insn): Compute next non-debug insn. Handle debug insns. (deps_analyze_insn): Handle debug insns. (deps_start_bb): Skip debug insns. (init_deps): Initialize last_debug_insn. * tree-ssa.c (target_for_debug_bind): New. (find_released_ssa_name): New. (propagate_var_def_into_debug_stmts): New. (propagate_defs_into_debug_stmts): New. (verify_ssa): Skip debug bind stmts without values. (warn_uninialized_vars): Skip debug stmts. * target-def.h (TARGET_DELEGITIMIZE_ADDRESS): Set default. * rtl.c (rtx_equal_p_cb): Handle VALUEs. (rtx_equal_p): Likewise. * ira-costs.c (scan_one_insn): Skip debug insns. (process_bb_node_for_hard_reg_moves): Likewise. * rtl.h (DEBUG_INSN_P): New. (NONDEBUG_INSN_P): New. (MAY_HAVE_DEBUG_INSNS): New. (INSN_P): Accept debug insns. (RTX_FRAME_RELATED_P): Likewise. (INSN_DELETED_P): Likewise (PAT_VAR_LOCATION_DECL): New. (PAT_VAR_LOCATION_LOC): New. (PAT_VAR_OCATION_STATUS): New. (NOTE_VAR_LOCATION_DECL): Reimplement. (NOTE_VAR_LOCATION_LOC): Likewise. (NOTE_VAR_LOCATION_STATUS): Likewise. (INSN_VAR_LOCATION): New. (INSN_VAR_LOCATION_DECL): New. (INSN_VAR_LOCATION_LOC): New. (INSN_VAR_LOCATION_STATUS): New. (gen_rtx_UNKNOWN_VAR_LOC): New. (VAR_LOC_UNKNOWN_P): New. (NOTE_DURING_CALL_P): New. (SCHED_GROUP_P): Accept debug insns. (emit_debug_insn_before): Declare. (emit_debug_insn_before_noloc): Declare. (emit_debug_insn_beore_setloc): Declare. (emit_debug_insn_after): Declare. (emit_debug_insn_after_noloc): Declare. (emit_debug_insn_after_setloc): Declare. (emit_debug_insn): Declare. (make_debug_insn_raw): Declare. (prev_nondebug_insn): Declare. (next_nondebug_insn): Declare. (delegitimize_mem_from_attrs): Declare. (get_max_insn_count): Declare. (wrap_constant): Declare. (unwrap_constant): Declare. (get_curr_insn_source_location): Declare. (get_curr_insn_block): Declare. * tree-inline.c (insert_debug_decl_map): New. (processing_debug_stmt): New. (remap_decl): Don't create new mappings in debug stmts. (remap_gimple_op_r): Don't add references in debug stmts. (copy_tree_body_r): Likewise. (remap_gimple_stmt): Handle debug bind stmts. (copy_bb): Skip debug stmts. (copy_edges_for_bb): Likewise. (copy_debug_stmt): New. (copy_debug_stmts): New. (copy_body): Copy debug stmts at the end. (insert_init_debug_bind): New. (insert_init_stmt): Take id. Skip and emit debug stmts. (setup_one_parameter): Remap variable earlier, register debug mapping. (estimate_num_insns): Skip debug stmts. (expand_call_inline): Preserve debug_map. (optimize_inline_calls): Check for no debug_stmts left-overs. (unsave_expr_now): Preserve debug_map. (copy_gimple_seq_and_replace_locals): Likewise. (tree_function_versioning): Check for no debug_stmts left-overs. Init and destroy debug_map as needed. Split edges unconditionally. (build_duplicate_type): Init and destroy debug_map as needed. * tree-inline.h: Include gimple.h instead of pointer-set.h. (struct copy_body_data): Add debug_stmts and debug_map. * sched-int.h (struct ready_list): Add n_debug. (struct deps): Add last_debug_insn. (DEBUG_INSN_SCHED_P): New. (BOUNDARY_DEBUG_INSN_P): New. (SCHEDULE_DEBUG_INSN_P): New. (sd_iterator_cond): Accept empty list. * combine.c (create_log_links): Skip debug insns. (combine_instructions): Likewise. (cleanup_auto_inc_dec): New. From Jakub Jelinek: Make sure the return value is always unshared. (struct rtx_subst_pair): New. (auto_adjust_pair): New. (propagate_for_debug_subst): New. (propagate_for_debug): New. (try_combine): Skip debug insns. Propagate removed defs into debug insns. (next_nonnote_nondebug_insn): New. (distribute_notes): Use it. Skip debug insns. (distribute_links): Skip debug insns. * tree-outof-ssa.c (set_location_for_edge): Likewise. * resource.c (mark_target_live_regs): Likewise. * var-tracking.c: Include cselib.h and target.h. (enum micro_operation_type): Add MO_VAL_USE, MO_VAL_LOC, and MO_VAL_SET. (micro_operation_type_name): New. (enum emit_note_where): Add EMIT_NOTE_AFTER_CALL_INSN. (struct micro_operation_def): Update comments. (decl_or_value): New type. Use instead of decls. (struct emit_note_data_def): Add vars. (struct attrs_def): Use decl_or_value. (struct variable_tracking_info_def): Add permp, flooded. (struct location_chain_def): Update comment. (struct variable_part_def): Use decl_or_value. (struct variable_def): Make var_part a variable length array. (valvar_pool): New. (scratch_regs): New. (cselib_hook_called): New. (dv_is_decl_p): New. (dv_is_value_p): New. (dv_as_decl): New. (dv_as_value): New. (dv_as_opaque): New. (dv_onepart_p): New. (dv_pool): New. (IS_DECL_CODE): New. (check_value_is_not_decl): New. (dv_from_decl): New. (dv_from_value): New. (dv_htab_hash): New. (variable_htab_hash): Use it. (variable_htab_eq): Support values. (variable_htab_free): Free from the right pool. (attrs_list_member, attrs_list_insert): Use decl_or_value. (attrs_list_union): Adjust. (attrs_list_mpdv_union): New. (tie_break_pointers): New. (canon_value_cmp): New. (unshare_variable): Return possibly-modified slot. (vars_copy_1): Adjust. (var_reg_decl_set): Adjust. Split out of... (var_reg_set): ... this. (get_init_value): Adjust. (var_reg_delete_and_set): Adjust. (var_reg_delete): Adjust. (var_regno_delete): Adjust. (var_mem_decl_set): Split out of... (var_mem_set): ... this. (var_mem_delete_and_set): Adjust. (var_mem_delete): Adjust. (val_store): New. (val_reset): New. (val_resolve): New. (variable_union): Adjust. Speed up merge of 1-part vars. (variable_canonicalize): Use unshared slot. (VALUED_RECURSED_INTO): New. (find_loc_in_1pdv): New. (struct dfset_merge): New. (insert_into_intersection): New. (intersect_loc_chains): New. (loc_cmp): New. (canonicalize_loc_order_check): New. (canonicalize_values_mark): New. (canonicalize_values_star): New. (variable_merge_over_cur): New. (variable_merge_over_src): New. (dataflow_set_merge): New. (dataflow_set_equiv_regs): New. (remove_duplicate_values): New. (struct dfset_post_merge): New. (variable_post_merge_new_vals): New. (variable_post_merge_perm_vals): New. (dataflow_post_merge_adjust): New. (find_mem_expr_in_1pdv): New. (dataflow_set_preserve_mem_locs): New. (dataflow_set_remove_mem_locs): New. (dataflow_set_clear_at_call): New. (onepart_variable_different_p): New. (variable_different_p): Use it. (dataflow_set_different_1): Adjust. Make detailed dump more verbose. (track_expr_p): Add need_rtl parameter. Don't generate rtl if not needed. (track_loc_p): Pass it true. (struct count_use_info): New. (find_use_val): New. (replace_expr_with_values): New. (log_op_type): New. (use_type): New, partially split out of... (count_uses): ... this. Count new micro-ops. (count_uses_1): Adjust. (count_stores): Adjust. (count_with_sets): New. (VAL_NEEDS_RESOLUTION): New. (VAL_HOLDS_TRACK_EXPR): New. (VAL_EXPR_IS_COPIED): New. (VAL_EXPR_IS_CLOBBERED): New. (add_uses): Adjust. Generate new micro-ops. (add_uses_1): Adjust. (add_stores): Generate new micro-ops. (add_with_sets): New. (find_src_status): Adjust. (find_src_set_src): Adjust. (compute_bb_dataflow): Use dataflow_set_clear_at_call. Handle new micro-ops. Canonicalize value equivalances. (vt_find_locations): Compute total size of hash tables for dumping. Perform merge for var-tracking-assignments. Don't disregard single-block loops. (dump_attrs_list): Handle decl_or_value. (dump_variable): Take variable. Deal with decl_or_value. (dump_variable_slot): New. (dump_vars): Use it. (dump_dataflow_sets): Adjust. (set_slot_part): New, extended to support one-part variables after splitting out of... (set_variable_part): ... this. (clobber_slot_part): New, split out of... (clobber_variable_part): ... this. (delete_slot_part): New, split out of... (delete_variable_part): .... this. (check_wrap_constant): New. (vt_expand_loc_callback): New. (vt_expand_loc): New. (emit_note_insn_var_location): Adjust. Handle values. Handle EMIT_NOTE_AFTER_CALL_INSN. (emit_notes_for_differences_1): Adjust. Handle values. (emit_notes_for_differences_2): Likewise. (emit_notes_for_differences): Adjust. (emit_notes_in_bb): Take pointer to set. Emit AFTER_CALL_INSN notes. Adjust. Handle new micro-ops. (vt_add_function_parameters): Adjust. Create and bind values. (vt_initialize): Adjust. Initialize scratch_regs and valvar_pool, flooded and perm.. Initialize and use cselib. Log operations. Move some code to count_with_sets and add_with_sets. (delete_debug_insns): New. (vt_debug_insns_local): New. (vt_finalize): Release permp, valvar_pool, scratch_regs. Finish cselib. (var_tracking_main): If var-tracking-assignments is enabled but var-tracking isn't, delete debug insns and leave. Likewise if we exceed limits or fail the stack adjustments tests, and after all var-tracking processing. More in var-tracking, from Jakub Jelinek <jakub@redhat.com>: (dataflow_set): Add traversed_vars. (value_chain, const_value_chain): New typedefs. (value_chain_pool, value_chains): New variables. (value_chain_htab_hash, value_chain_htab_eq, add_value_chain, add_value_chains, add_cselib_value_chains, remove_value_chain, remove_value_chains, remove_cselib_value_chains): New functions. (shared_hash_find_slot_unshare_1, shared_hash_find_slot_1, shared_hash_find_slot_noinsert_1, shared_hash_find_1): New static inlines. (shared_hash_find_slot_unshare, shared_hash_find_slot, shared_hash_find_slot_noinsert, shared_hash_find): Update. (dst_can_be_shared): New variable. (unshare_variable): Unshare set->vars if shared, use shared_hash_*. Clear dst_can_be_shared. If set->traversed_vars is non-NULL and different from set->vars, look up slot again instead of using the passed in slot. (dataflow_set_init): Initialize traversed_vars. (variable_union): Use shared_hash_*. Use initially NO_INSERT lookup if set->vars is shared. Don't keep slot cleared before calling unshare_variable. Unshare set->vars if needed. Adjust unshare_variable callers. Clear dst_can_be_shared if needed. Even ->refcount == 1 vars must be unshared if set->vars is shared and var needs to be modified. (dataflow_set_union): Set traversed_vars during canonicalization. (VALUE_CHANGED, DECL_CHANGED): Define. (set_dv_changed, dv_changed_p): New static inlines. (track_expr_p): Clear DECL_CHANGED. (dump_dataflow_sets): Set it. (variable_was_changed): Call set_dv_changed. (emit_note_insn_var_location): Likewise. (changed_variables_stack): New variable. (check_changed_vars_1, check_changed_vars_2): New functions. (emit_notes_for_changes): Do nothing if changed_variables is empty. Traverse changed_variables with check_changed_vars_1, call check_changed_vars_2 on each changed_variables_stack entry. (emit_notes_in_bb): Add SET argument. Just clear it at the beginning, use it instead of local &set, don't destroy it at the end. (vt_emit_notes): Call dataflow_set_clear early on all VTI(bb)->out sets, never use them, instead use emit_notes_in_bb computed set, dataflow_set_clear also VTI(bb)->in when we are done with the basic block. Initialize changed_variables_stack, free it afterwards. If ENABLE_CHECKING verify that after noting differences to an empty set value_chains hash table is empty. (vt_initialize): Initialize value_chains and value_chain_pool. (vt_finalize): Delete value_chains htab, free value_chain_pool. (variable_tracking_main): Call dump_dataflow_sets before calling vt_emit_notes, not after it. * tree-flow.h (propagate_defs_into_debug_stmts): Declare. (propagate_var_def_into_debug_stmts): Declare. * df-problems.c (df_lr_bb_local_compute): Skip debug insns. (df_set_note): Reject debug insns. (df_whole_mw_reg_dead_p): Take added_notes_p argument. Don't add notes to debug insns. (df_note_bb_compute): Adjust. Likewise. (df_simulate_uses): Skip debug insns. (df_simulate_initialize_backwards): Likewise. * reg-stack.c (subst_stack_regs_in_debug_insn): New. (subst_stack_regs_pat): Reject debug insns. (convert_regs_1): Handle debug insns. * Makefile.in (TREE_INLINE_H): Take pointer-set.h from GIMPLE_H. (print-rtl.o): Depend on cselib.h. (cselib.o): Depend on TREE_PASS_H. (var-tracking.o): Depend on cselib.h and TARGET_H. * sched-rgn.c (rgn_estimate_number_of_insns): Discount debug insns. (init_ready_list): Skip boundary debug insns. (add_branch_dependences): Skip debug insns. (free_block_dependencies): Check for blocks with only debug insns. (compute_priorities): Likewise. * gimple.c (gss_for_code): Handle GIMPLE_DEBUG. (gimple_build_with_ops_stat): Take subcode as unsigned. Adjust all callers. (gimple_build_debug_bind_stat): New. (empty_body_p): Skip debug stmts. (gimple_has_side_effects): Likewise. (gimple_rhs_has_side_effects): Likewise. * gimple.h (enum gimple_debug_subcode, GIMPLE_DEBUG_BIND): New. (gimple_build_debug_bind_stat): Declare. (gimple_build_debug_bind): Define. (is_gimple_debug): New. (gimple_debug_bind_p): New. (gimple_debug_bind_get_var): New. (gimple_debug_bind_get_value): New. (gimple_debug_bind_get_value_ptr): New. (gimple_debug_bind_set_var): New. (gimple_debug_bind_set_value): New. (GIMPLE_DEBUG_BIND_NOVALUE): New internal temporary macro. (gimple_debug_bind_reset_value): New. (gimple_debug_bind_has_value_p): New. (gsi_next_nondebug): New. (gsi_prev_nondebug): New. (gsi_start_nondebug_bb): New. (gsi_last_nondebug_bb): New. * sched-vis.c (print_pattern): Handle VAR_LOCATION. (print_insn): Handle DEBUG_INSN. * tree-cfg.c (remove_bb): Walk stmts backwards. Let loc of first insn prevail. (first_stmt): Skip debug stmts. (first_non_label_stmt): Likewise. (last_stmt): Likewise. (has_zero_uses_1): New. (single_imm_use_1): New. (verify_gimple_debug): New. (verify_types_in_gimple_stmt): Handle debug stmts. (verify_stmt): Likewise. (debug_loop_num): Skip debug stmts. (remove_edge_and_dominated_blocks): Remove dominators last. * tree-ssa-reasssoc.c (rewrite_expr_tree): Propagate into debug stmts. (linearize_expr): Likewise. * config/i386/i386.c (ix86_delegitimize_address): Call default implementation. * config/ia64/ia64.c (ia64_safe_itanium_class): Handle debug insns. (group_barrier_needed): Skip debug insns. (emit_insn_group_barriers): Likewise. (emit_all_insn_group_barriers): Likewise. (ia64_variable_issue): Handle debug insns. (ia64_dfa_new_cycle): Likewise. (final_emit_insn_group_barriers): Skip debug insns. (ia64_dwarf2out_def_steady_cfa): Take frame argument. Don't def cfa without frame. (process_set): Likewise. (process_for_unwind_directive): Pass frame on. * config/rs6000/rs6000.c (TARGET_DELEGITIMIZE_ADDRESS): Define. (rs6000_delegitimize_address): New. (rs6000_debug_adjust_cost): Handle debug insns. (is_microcoded_insn): Likewise. (is_cracked_insn): Likewise. (is_nonpipeline_insn): Likewise. (insn_must_be_first_in_group): Likewise. (insn_must_be_last_in_group): Likewise. (force_new_group): Likewise. * cfgrtl.c (rtl_split_block): Emit INSN_DELETED note if block contains only debug insns. (rtl_merge_blocks): Skip debug insns. (purge_dead_edges): Likewise. (rtl_block_ends_with_call_p): Skip debug insns. * dce.c (deletable_insn_p): Handle VAR_LOCATION. (mark_reg_dependencies): Skip debug insns. * params.def (PARAM_MIN_NONDEBUG_INSN_UID): New. * tree-ssanames.c (release_ssa_name): Propagate def into debug stmts. * tree-ssa-threadedge.c (record_temporary_equivalences_from_stmts): Skip debug stmts. * regcprop.c (replace_oldest_value_addr): Skip debug insns. (replace_oldest_value_mem): Use ALL_REGS for debug insns. (copyprop_hardreg_forward_1): Handle debug insns. * reload1.c (reload): Skip debug insns. Replace unassigned pseudos in debug insns with their equivalences. (eliminate_regs_in_insn): Skip debug insns. (emit_input_reload_insns): Skip debug insns at first, adjust them later. * tree-ssa-operands.c (add_virtual_operand): Reject debug stmts. (get_indirect_ref_operands): Pass opf_no_vops on. (get_expr_operands): Likewise. Skip debug stmts. (parse_ssa_operands): Scan debug insns with opf_no_vops. gcc/testsuite/ChangeLog: * gcc.dg/guality/guality.c: New. * gcc.dg/guality/guality.h: New. * gcc.dg/guality/guality.exp: New. * gcc.dg/guality/example.c: New. * lib/gcc-dg.exp (cleanup-dump): Remove .gk files. (cleanup-saved-temps): Likewise, .gkd files too. gcc/cp/ChangeLog: * cp-tree.h (TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS): New. * cp-lang.c (cxx_dwarf_name): Pass it. * error.c (count_non_default_template_args): Take flags as argument. Adjust all callers. Skip counting of default arguments if the new flag is given. ChangeLog: * Makefile.tpl (BUILD_CONFIG): Default to bootstrap-debug. * Makefile.in: Rebuilt. contrib/ChangeLog: * compare-debug: Look for .gkd files and compare them. config/ChangeLog: * bootstrap-debug.mk: Add comments. * bootstrap-debug-big.mk: New. * bootstrap-debug-lean.mk: New. * bootstrap-debug-ckovw.mk: Add comments. * bootstrap-debug-lib.mk: Drop CFLAGS for stages. Use -g0 for TFLAGS in stage1. Drop -fvar-tracking-assignments-toggle. From-SVN: r151312
2009-09-02 04:42:21 +02:00
case VAR_LOCATION:
1991-12-01 06:13:56 +01:00
return 0;
case CLOBBER:
/* Reject CLOBBER with a non-VOID mode. These are made by combine.c
when some combination can't be done. If we see one, don't think
that we can simplify the expression. */
return (GET_MODE (x) != VOIDmode);
case PRE_INC:
case PRE_DEC:
case POST_INC:
case POST_DEC:
case PRE_MODIFY:
case POST_MODIFY:
1991-12-01 06:13:56 +01:00
case CALL:
case UNSPEC_VOLATILE:
1991-12-01 06:13:56 +01:00
return 1;
case MEM:
case ASM_INPUT:
1991-12-01 06:13:56 +01:00
case ASM_OPERANDS:
if (MEM_VOLATILE_P (x))
return 1;
default:
break;
1991-12-01 06:13:56 +01:00
}
/* Recursively scan the operands of this expression. */
{
alias.c: Remove uses of "register" specifier in declarations of arguments and local... 2001-10-10 Stan Shebs <shebs@apple.com> * alias.c: Remove uses of "register" specifier in declarations of arguments and local variables. * c-common.c: Ditto. * c-convert.c: Ditto. * c-decl.c: Ditto. * c-format.c: Ditto. * c-semantics.c: Ditto. * c-typeck.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfgbuild.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * combine.c: Ditto. * convert.c: Ditto. * cppexp.c: Ditto. * cppfiles.c: Ditto. * cse.c: Ditto. * dbxout.c: Ditto. * defaults.h: Ditto. * df.c: Ditto. * dwarf2out.c: Ditto. * dwarfout.c: Ditto. * emit-rtl.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fix-header.c: Ditto. * floatlib.c: Ditto. * flow.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * gcc.c: Ditto. * gcse.c: Ditto. * gen-protos.c: Ditto. * genattrtab.c: Ditto. * gencheck.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * gengenrtl.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * gensupport.c: Ditto. * global.c: Ditto. * gmon.c: Ditto. * graph.c: Ditto. * haifa-sched.c: Ditto. * hard-reg-set.h: Ditto. * hash.c: Ditto. * integrate.c: Ditto. * jump.c: Ditto. * lists.c: Ditto. * local-alloc.c: Ditto. * loop.c: Ditto. * mips-tdump.c: Ditto. * mips-tfile.c: Ditto. * optabs.c: Ditto. * prefix.c: Ditto. * print-rtl.c: Ditto. * read-rtl.c: Ditto. * real.c: Ditto. * recog.c: Ditto. * reg-stack.c: Ditto. * regclass.c: Ditto. * regmove.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtl.c: Ditto. * rtlanal.c: Ditto. * scan.c: Ditto. * sched-deps.c: Ditto. * sched-rgn.c: Ditto. * sdbout.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tradcif.y: Ditto. * tradcpp.c: Ditto. * tree.c: Ditto. * unroll.c: Ditto. * varasm.c: Ditto. * xcoffout.c: Ditto. From-SVN: r46173
2001-10-11 05:16:15 +02:00
const char *fmt = GET_RTX_FORMAT (code);
int i;
1991-12-01 06:13:56 +01:00
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
{
if (fmt[i] == 'e')
{
if (side_effects_p (XEXP (x, i)))
return 1;
}
else if (fmt[i] == 'E')
1991-12-01 06:13:56 +01:00
{
alias.c: Remove uses of "register" specifier in declarations of arguments and local... 2001-10-10 Stan Shebs <shebs@apple.com> * alias.c: Remove uses of "register" specifier in declarations of arguments and local variables. * c-common.c: Ditto. * c-convert.c: Ditto. * c-decl.c: Ditto. * c-format.c: Ditto. * c-semantics.c: Ditto. * c-typeck.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfgbuild.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * combine.c: Ditto. * convert.c: Ditto. * cppexp.c: Ditto. * cppfiles.c: Ditto. * cse.c: Ditto. * dbxout.c: Ditto. * defaults.h: Ditto. * df.c: Ditto. * dwarf2out.c: Ditto. * dwarfout.c: Ditto. * emit-rtl.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fix-header.c: Ditto. * floatlib.c: Ditto. * flow.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * gcc.c: Ditto. * gcse.c: Ditto. * gen-protos.c: Ditto. * genattrtab.c: Ditto. * gencheck.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * gengenrtl.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * gensupport.c: Ditto. * global.c: Ditto. * gmon.c: Ditto. * graph.c: Ditto. * haifa-sched.c: Ditto. * hard-reg-set.h: Ditto. * hash.c: Ditto. * integrate.c: Ditto. * jump.c: Ditto. * lists.c: Ditto. * local-alloc.c: Ditto. * loop.c: Ditto. * mips-tdump.c: Ditto. * mips-tfile.c: Ditto. * optabs.c: Ditto. * prefix.c: Ditto. * print-rtl.c: Ditto. * read-rtl.c: Ditto. * real.c: Ditto. * recog.c: Ditto. * reg-stack.c: Ditto. * regclass.c: Ditto. * regmove.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtl.c: Ditto. * rtlanal.c: Ditto. * scan.c: Ditto. * sched-deps.c: Ditto. * sched-rgn.c: Ditto. * sdbout.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tradcif.y: Ditto. * tradcpp.c: Ditto. * tree.c: Ditto. * unroll.c: Ditto. * varasm.c: Ditto. * xcoffout.c: Ditto. From-SVN: r46173
2001-10-11 05:16:15 +02:00
int j;
1991-12-01 06:13:56 +01:00
for (j = 0; j < XVECLEN (x, i); j++)
if (side_effects_p (XVECEXP (x, i, j)))
return 1;
}
}
}
return 0;
}
/* Return nonzero if evaluating rtx X might cause a trap.
FLAGS controls how to consider MEMs. A nonzero means the context
of the access may have changed from the original, such that the
address may have become invalid. */
1991-12-01 06:13:56 +01:00
int
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
may_trap_p_1 (const_rtx x, unsigned flags)
1991-12-01 06:13:56 +01:00
{
int i;
enum rtx_code code;
rtl.h (rtx_format): Constify a char*. * rtl.h (rtx_format): Constify a char*. * rtl.c (rtx_format): Likewise. (copy_rtx, copy_most_rtx, read_rtx): Likewise. (init_rtl): Use accessor macro, not `rtx_format'. * alias.c (rtx_equal_for_memref_p, find_symbolic_term): Constify a char*. * caller-save.c (mark_referenced_regs): Likewise. * combine.c (subst, make_compound_operation, known_cond, gen_rtx_combine, update_table_tick, get_last_value_validate, use_crosses_set_p, mark_used_regs_combine, move_deaths): Likewise. * cse.c (rtx_cost, mention_regs, canon_hash, exp_equiv_p, refers_to_p, canon_reg, fold_rtx, cse_process_notes, count_reg_usage): Likewise. * emit-rtl.c (gen_rtx, copy_rtx_if_shared, reset_used_flags): Likewise. * final.c (leaf_renumber_regs_insn): Likewise. * flow.c (mark_used_regs, find_use_as_address, dump_flow_info, dump_edge_info, count_reg_references): Likewise. * function.c (fixup_var_refs_1, walk_fixup_memory_subreg, fixup_stack_1, purge_addressof_1, instantiate_virtual_regs_1): Likewise. * gcse.c (oprs_unchanged_p, hash_expr_1, expr_equiv_p, oprs_not_set_p, expr_killed_p, compute_transp, find_used_regs, add_label_notes): Likewise. * genattrtab.c (attr_rtx, attr_copy_rtx, encode_units_mask, clear_struct_flag, count_sub_rtxs, count_alternatives, compares_alternatives_p, contained_in_p, walk_attr_value, write_expr_attr_cache): Likewise. * genconfig.c (walk_insn_part): Likewise. * genemit.c (max_operand_1, gen_exp): Likewise. * genextract.c (walk_rtx): Likewise. * genflags.c (num_operands): Likewise. * genoutput.c (scan_operands): Likewise. * genpeep.c (match_rtx): Likewise. * genrecog.c (add_to_sequence): Likewise. * haifa-sched.c (may_trap_exp, sched_analyze_2, attach_deaths): Likewise. * integrate.c (save_constants, copy_for_inline, copy_rtx_and_substitute, subst_constants, restore_constants): Likewise. * jump.c (mark_jump_label, invert_exp, redirect_exp, rtx_renumbered_equal_p, rtx_equal_for_thread_p): Likewise. * local-alloc.c (contains_replace_regs, memref_referenced_p): Likewise. * loop.c (record_excess_regs, rtx_equal_for_loop_p, add_label_notes, replace_call_address, count_nonfixed_reads, invariant_p, find_single_use_in_loop, find_mem_givs, find_life_end, maybe_eliminate_biv_1, update_reg_last_use): Likewise. * print-rtl.c (reg_names, print_rtx): Likewise. * recog.c (validate_replace_rtx_1, find_single_use_1): Likewise. * reg-stack.c (stack_regs_mentioned_p, record_label_references, record_reg_life_pat, swap_rtx_condition, goto_block_pat, print_blocks): Likewise. * regclass.c (fix_register, record_address_regs, reg_scan_mark_refs): Likewise. * regmove.c (stable_but_for_p): Likewise. * reload.c (loc_mentioned_in_p, operands_match_p, find_reloads_toplevsubst_reg_equivs, find_reloads_address_1, copy_replacements, refers_to_regno_for_reload_p, refers_to_mem_for_reload_p, find_inc_amount, regno_clobbered_p, reload_when_needed_name, reg_class_names, debug_reload_to_stream): Likewise. * reload1.c (eliminate_regs, scan_paradoxical_subregs, delete_address_reloads_1, count_occurrences, reload_cse_mem_conflict_p, reload_combine_note_use, add_auto_inc_notes): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * rtlanal.c (rtx_unstable_p, rtx_varies_p, rtx_addr_varies_p, reg_mentioned_p, regs_set_between_p, modified_between_p, modified_in_p, refers_to_regno_p, reg_overlap_mentioned_p, rtx_equal_p, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p, inequality_comparisons_p, replace_rtx, replace_regs, jmp_uses_reg_or_mem, for_each_rtx, regno_use_in): Likewise. * sched.c (sched_analyze_2, attach_deaths): Likewise. * stupid.c (stupid_mark_refs): Likewise. * unroll.c (remap_split_bivs): Likewise. * varasm.c (mark_constants): Likewise. * a29k/a29k.c (uses_local_reg_p): Likewise. * alpha/alpha.c (summarize_insn): Likewise. * arm/arm.c (symbol_mentioned_p, label_mentioned_p, eliminate_lr2ip): Likewise. * arm/thumb.c (symbol_mentioned_p, label_mentioned_p): Likewise. * i386/i386.c (symbolic_reference_mentioned_p, copy_all_rtx, reg_mentioned_in_mem): Likewise. * ns32k/ns32k.c (global_symbolic_reference_mentioned_p, symbolic_reference_mentioned_p): Likewise. * romp/romp.c (unsigned_comparisons_p, hash_rtx): Likewise. * sh/sh.c (regs_used, mark_use): Likewise. * vax/vax.c (vax_rtx_cost): Likewise. From-SVN: r28784
1999-08-21 01:05:25 +02:00
const char *fmt;
/* We make no distinction currently, but this function is part of
the internal target-hooks ABI so we keep the parameter as
"unsigned flags". */
bool code_changed = flags != 0;
1991-12-01 06:13:56 +01:00
if (x == 0)
return 0;
code = GET_CODE (x);
switch (code)
{
/* Handle these cases quickly. */
alias.c (rtx_equal_for_memref_p): Convert constant cases. 2012-08-23 Kenneth Zadeck <zadeck@naturalbridge.com> * alias.c (rtx_equal_for_memref_p): Convert constant cases. * combine.c (find_single_use_1, mark_used_regs_combine): Convert to CASE_CONST_ANY. * cse.c (exp_equiv_p, canon_reg, fold_rtx, cse_process_notes_1, count_reg_usage): Convert constant cases. * cselib.c (cselib_expand_value_rtx_1): Convert to CASE_CONST_ANY. (cselib_subst_to_values): Convert constant cases. * df-scan.c (df_uses_record): Ditto. * dse.c (const_or_frame_p): Convert case statements to explicit if-then-else using mode classes. * emit-rtl.c (verify_rtx_sharing, copy_insn_1): Convert constant cases. * explow.c (convert_memory_address_addr_space): Ditto. * gcse.c (want_to_gcse_p, oprs_unchanged_p, compute_transp): Ditto. * genattrtab.c (attr_copy_rtx, clear_struct_flag): Ditto. * ira.c (equiv_init_varies_p, contains_replace_regs, memref_referenced_p, rtx_moveable_p): Ditto. * jump.c (mark_jump_label_1): Remove constant cases. (rtx_renumbered_equal_p): Convert to CASE_CONST_UNIQUE. * loop-invariant.c (check_maybe_invariant, hash_invariant_expr_1, invariant_expr_equal_p): Convert to CASE_CONST_ANY. * postreload-gcse.c (oprs_unchanged_p): Convert constant cases. * reginfo.c (reg_scan_mark_refs): Ditto. * regrename.c (scan_rtx): Ditto. * reload1.c (eliminate_regs_1, elimination_effects, scan_paradoxical_subregs): Ditto. * reload.c (operands_match_p, subst_reg_equivs): Ditto. * resource.c (mark_referenced_resources, mark_set_resources): Ditto. * rtlanal.c (rtx_unstable_p, rtx_varies_p, count_occurrences) (reg_mentioned_p, modified_between_p, modified_in_p) (volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, inequality_comparisons_p, computed_jump_p_1): Ditto. * rtl.c (copy_rtx, rtx_equal_p_cb, rtx_equal_p): Ditto. * sched-deps.c (sched_analyze_2): Ditto. * valtrack.c (cleanup_auto_inc_dec): Ditto. * rtl.h: (CASE_CONST_SCALAR_INT, CASE_CONST_UNIQUE, CASE_CONST_ANY): New macros. From-SVN: r190627
2012-08-23 20:46:18 +02:00
CASE_CONST_ANY:
1991-12-01 06:13:56 +01:00
case SYMBOL_REF:
case LABEL_REF:
case CONST:
case PC:
case CC0:
case REG:
case SCRATCH:
return 0;
case UNSPEC:
return targetm.unspec_may_trap_p (x, flags);
case UNSPEC_VOLATILE:
case ASM_INPUT:
1991-12-01 06:13:56 +01:00
case TRAP_IF:
return 1;
case ASM_OPERANDS:
return MEM_VOLATILE_P (x);
1991-12-01 06:13:56 +01:00
/* Memory ref can trap unless it's a static var or a stack slot. */
case MEM:
re PR target/10127 (-fstack-check let's program crash) PR target/10127 PR ada/20548 * expr.h (STACK_CHECK_PROBE_INTERVAL): Delete. (STACK_CHECK_PROBE_INTERVAL_EXP): New macro. (STACK_CHECK_MOVING_SP): Likewise. * system.h (STACK_CHECK_PROBE_INTERVAL): Poison it. * doc/tm.texi (Stack Checking): Delete STACK_CHECK_PROBE_INTERVAL. Document STACK_CHECK_PROBE_INTERVAL_EXP and STACK_CHECK_MOVING_SP. * doc/md.texi (Standard Pattern Names): Tweak entry of CHECK_STACK. Document PROBE_STACK. * explow.c (anti_adjust_stack_and_probe): New function. (allocate_dynamic_stack_space): Do not directly allocate space if STACK_CHECK_MOVING_SP, instead invoke above function. (emit_stack_probe): Handle probe_stack insn. (PROBE_INTERVAL): New macro. (STACK_GROW_OPTAB): Likewise. (STACK_GROW_OFF): Likewise. (probe_stack_range): Use Pmode and memory_address consistently. Fix loop condition in the small constant case. Rewrite in the general case to be immune to wraparounds. Make sure the address of probes is valid. Try to use [base + disp] addressing mode if possible. * ira.c (setup_eliminable_regset): Set frame_pointer_needed if stack checking is enabled and STACK_CHECK_MOVING_SP. * rtlanal.c (may_trap_p_1) <MEM>: If stack checking is enabled, return 1 for volatile references to the stack pointer. * tree.c (build_common_builtin_nodes): Do not set ECF_NOTHROW on __builtin_alloca if stack checking is enabled. * unwind-dw2.c (uw_identify_context): Take into account whether the context is that of a signal frame or not. * config/i386/linux.h (STACK_CHECK_MOVING_SP): Define to 1. * config/i386/linux64.h (STACK_CHECK_MOVING_SP): Likewise. From-SVN: r153877
2009-11-03 23:49:37 +01:00
/* Recognize specific pattern of stack checking probes. */
if (flag_stack_check
&& MEM_VOLATILE_P (x)
&& XEXP (x, 0) == stack_pointer_rtx)
return 1;
if (/* MEM_NOTRAP_P only relates to the actual position of the memory
reference; moving it out of context such as when moving code
when optimizing, might cause its address to become invalid. */
code_changed
|| !MEM_NOTRAP_P (x))
{
rtl.texi (MEM_SIZE_KNOWN_P): Document. gcc/ * doc/rtl.texi (MEM_SIZE_KNOWN_P): Document. (MEM_SIZE): Change from returning an rtx to returning a HOST_WIDE_INT. * rtl.h (MEM_SIZE_KNOWN_P): New macro. (MEM_SIZE): Return a HOST_WIDE_INT rather than an rtx. * emit-rtl.h (set_mem_size): Take a HOST_WIDE_INT rather than an rtx. (clear_mem_size): Declare. * emit-rtl.c (set_mem_size): Take a HOST_WIDE_INT rather than an rtx. (clear_mem_size): New function. * alias.c (ao_ref_from_mem): Adjust uses of MEM_SIZE, using MEM_SIZE_KNOWN_P to test whether the size is known, and MEM_SIZE to get a HOST_WIDE_INT size. Adjust calls to set_mem_size, passing a HOST_WIDE_INT rather than an rtx. Use clear_mem_size to clear the size. (nonoverlapping_memrefs_p): Likewise. * builtins.c (get_memory_rtx, expand_builtin_memcmp): Likewise. (expand_builtin_init_trampoline): Likewise. * calls.c (compute_argument_addresses): Likewise. * cfgcleanup.c (merge_memattrs): Likewise. * dce.c (find_call_stack_args): Likewise. * dse.c (record_store, scan_insn): Likewise. * dwarf2out.c (dw_sra_loc_expr): Likewise. * expr.c (emit_block_move_hints): Likewise. * function.c (assign_parm_find_stack_rtl): Likewise. * print-rtl.c (print_rtx): Likewise. * reload.c (find_reloads_subreg_address): Likewise. * rtlanal.c (may_trap_p_1): Likewise. * var-tracking.c (track_expr_p): Likewise. * varasm.c (assemble_trampoline_template): Likewise. * config/arm/arm.c (arm_print_operand): Likewise. * config/h8300/h8300.c (h8sx_emit_movmd): Likewise. * config/i386/i386.c (expand_movmem_via_rep_mov): Likewise. (expand_setmem_via_rep_stos, expand_constant_movmem_prologue) (expand_constant_setmem_prologue): Likewise. * config/mips/mips.c (mips_get_unaligned_mem): Likewise. * config/rs6000/rs6000.c (expand_block_move): Likewise. (adjacent_mem_locations): Likewise. * config/s390/s390.c (s390_expand_setmem): Likewise. (s390_expand_insv): Likewise. * config/s390/s390.md (*extzv<mode>, *extv<mode>): Likewise. (*extendqi<mode>2_short_displ): Likewise. * config/sh/sh.c (expand_block_move): Likewise. * config/sh/sh.md (extv, extzv): Likewise. From-SVN: r176476
2011-07-19 19:43:15 +02:00
HOST_WIDE_INT size = MEM_SIZE_KNOWN_P (x) ? MEM_SIZE (x) : 0;
return rtx_addr_can_trap_p_1 (XEXP (x, 0), 0, size,
GET_MODE (x), code_changed);
}
return 0;
1991-12-01 06:13:56 +01:00
/* Division by a non-constant might trap. */
case DIV:
case MOD:
case UDIV:
case UMOD:
if (HONOR_SNANS (x))
return 1;
if (SCALAR_FLOAT_MODE_P (GET_MODE (x)))
return flag_trapping_math;
if (!CONSTANT_P (XEXP (x, 1)) || (XEXP (x, 1) == const0_rtx))
1991-12-01 06:13:56 +01:00
return 1;
break;
case EXPR_LIST:
/* An EXPR_LIST is used to represent a function call. This
certainly may trap. */
return 1;
case GE:
case GT:
case LE:
case LT:
case LTGT:
case COMPARE:
/* Some floating point comparisons may trap. */
if (!flag_trapping_math)
break;
/* ??? There is no machine independent way to check for tests that trap
when COMPARE is used, though many targets do make this distinction.
For instance, sparc uses CCFPE for compares which generate exceptions
and CCFP for compares which do not generate exceptions. */
if (HONOR_NANS (x))
return 1;
/* But often the compare has some CC mode, so check operand
modes as well. */
if (HONOR_NANS (XEXP (x, 0))
|| HONOR_NANS (XEXP (x, 1)))
return 1;
break;
case EQ:
case NE:
if (HONOR_SNANS (x))
return 1;
/* Often comparison is CC mode, so check operand modes. */
if (HONOR_SNANS (XEXP (x, 0))
|| HONOR_SNANS (XEXP (x, 1)))
return 1;
break;
case FIX:
/* Conversion of floating point might trap. */
if (flag_trapping_math && HONOR_NANS (XEXP (x, 0)))
return 1;
break;
case NEG:
case ABS:
case SUBREG:
/* These operations don't trap even with floating point. */
break;
1991-12-01 06:13:56 +01:00
default:
/* Any floating arithmetic may trap. */
if (SCALAR_FLOAT_MODE_P (GET_MODE (x)) && flag_trapping_math)
1991-12-01 06:13:56 +01:00
return 1;
}
fmt = GET_RTX_FORMAT (code);
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
{
if (fmt[i] == 'e')
{
if (may_trap_p_1 (XEXP (x, i), flags))
1991-12-01 06:13:56 +01:00
return 1;
}
else if (fmt[i] == 'E')
{
alias.c: Remove uses of "register" specifier in declarations of arguments and local... 2001-10-10 Stan Shebs <shebs@apple.com> * alias.c: Remove uses of "register" specifier in declarations of arguments and local variables. * c-common.c: Ditto. * c-convert.c: Ditto. * c-decl.c: Ditto. * c-format.c: Ditto. * c-semantics.c: Ditto. * c-typeck.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfgbuild.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * combine.c: Ditto. * convert.c: Ditto. * cppexp.c: Ditto. * cppfiles.c: Ditto. * cse.c: Ditto. * dbxout.c: Ditto. * defaults.h: Ditto. * df.c: Ditto. * dwarf2out.c: Ditto. * dwarfout.c: Ditto. * emit-rtl.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fix-header.c: Ditto. * floatlib.c: Ditto. * flow.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * gcc.c: Ditto. * gcse.c: Ditto. * gen-protos.c: Ditto. * genattrtab.c: Ditto. * gencheck.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * gengenrtl.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * gensupport.c: Ditto. * global.c: Ditto. * gmon.c: Ditto. * graph.c: Ditto. * haifa-sched.c: Ditto. * hard-reg-set.h: Ditto. * hash.c: Ditto. * integrate.c: Ditto. * jump.c: Ditto. * lists.c: Ditto. * local-alloc.c: Ditto. * loop.c: Ditto. * mips-tdump.c: Ditto. * mips-tfile.c: Ditto. * optabs.c: Ditto. * prefix.c: Ditto. * print-rtl.c: Ditto. * read-rtl.c: Ditto. * real.c: Ditto. * recog.c: Ditto. * reg-stack.c: Ditto. * regclass.c: Ditto. * regmove.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtl.c: Ditto. * rtlanal.c: Ditto. * scan.c: Ditto. * sched-deps.c: Ditto. * sched-rgn.c: Ditto. * sdbout.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tradcif.y: Ditto. * tradcpp.c: Ditto. * tree.c: Ditto. * unroll.c: Ditto. * varasm.c: Ditto. * xcoffout.c: Ditto. From-SVN: r46173
2001-10-11 05:16:15 +02:00
int j;
1991-12-01 06:13:56 +01:00
for (j = 0; j < XVECLEN (x, i); j++)
if (may_trap_p_1 (XVECEXP (x, i, j), flags))
1991-12-01 06:13:56 +01:00
return 1;
}
}
return 0;
}
/* Return nonzero if evaluating rtx X might cause a trap. */
int
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
may_trap_p (const_rtx x)
{
return may_trap_p_1 (x, 0);
}
/* Same as above, but additionally return nonzero if evaluating rtx X might
cause a fault. We define a fault for the purpose of this function as a
erroneous execution condition that cannot be encountered during the normal
execution of a valid program; the typical example is an unaligned memory
access on a strict alignment machine. The compiler guarantees that it
doesn't generate code that will fault from a valid program, but this
guarantee doesn't mean anything for individual instructions. Consider
the following example:
struct S { int d; union { char *cp; int *ip; }; };
int foo(struct S *s)
{
if (s->d == 1)
return *s->ip;
else
return *s->cp;
}
on a strict alignment machine. In a valid program, foo will never be
invoked on a structure for which d is equal to 1 and the underlying
unique field of the union not aligned on a 4-byte boundary, but the
expression *s->ip might cause a fault if considered individually.
At the RTL level, potentially problematic expressions will almost always
verify may_trap_p; for example, the above dereference can be emitted as
(mem:SI (reg:P)) and this expression is may_trap_p for a generic register.
However, suppose that foo is inlined in a caller that causes s->cp to
point to a local character variable and guarantees that s->d is not set
to 1; foo may have been effectively translated into pseudo-RTL as:
if ((reg:SI) == 1)
(set (reg:SI) (mem:SI (%fp - 7)))
else
(set (reg:QI) (mem:QI (%fp - 7)))
Now (mem:SI (%fp - 7)) is considered as not may_trap_p since it is a
memory reference to a stack slot, but it will certainly cause a fault
on a strict alignment machine. */
int
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
may_trap_or_fault_p (const_rtx x)
{
return may_trap_p_1 (x, 1);
}
1991-12-01 06:13:56 +01:00
/* Return nonzero if X contains a comparison that is not either EQ or NE,
i.e., an inequality. */
int
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
inequality_comparisons_p (const_rtx x)
1991-12-01 06:13:56 +01:00
{
alias.c: Remove uses of "register" specifier in declarations of arguments and local... 2001-10-10 Stan Shebs <shebs@apple.com> * alias.c: Remove uses of "register" specifier in declarations of arguments and local variables. * c-common.c: Ditto. * c-convert.c: Ditto. * c-decl.c: Ditto. * c-format.c: Ditto. * c-semantics.c: Ditto. * c-typeck.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfgbuild.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * combine.c: Ditto. * convert.c: Ditto. * cppexp.c: Ditto. * cppfiles.c: Ditto. * cse.c: Ditto. * dbxout.c: Ditto. * defaults.h: Ditto. * df.c: Ditto. * dwarf2out.c: Ditto. * dwarfout.c: Ditto. * emit-rtl.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fix-header.c: Ditto. * floatlib.c: Ditto. * flow.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * gcc.c: Ditto. * gcse.c: Ditto. * gen-protos.c: Ditto. * genattrtab.c: Ditto. * gencheck.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * gengenrtl.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * gensupport.c: Ditto. * global.c: Ditto. * gmon.c: Ditto. * graph.c: Ditto. * haifa-sched.c: Ditto. * hard-reg-set.h: Ditto. * hash.c: Ditto. * integrate.c: Ditto. * jump.c: Ditto. * lists.c: Ditto. * local-alloc.c: Ditto. * loop.c: Ditto. * mips-tdump.c: Ditto. * mips-tfile.c: Ditto. * optabs.c: Ditto. * prefix.c: Ditto. * print-rtl.c: Ditto. * read-rtl.c: Ditto. * real.c: Ditto. * recog.c: Ditto. * reg-stack.c: Ditto. * regclass.c: Ditto. * regmove.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtl.c: Ditto. * rtlanal.c: Ditto. * scan.c: Ditto. * sched-deps.c: Ditto. * sched-rgn.c: Ditto. * sdbout.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tradcif.y: Ditto. * tradcpp.c: Ditto. * tree.c: Ditto. * unroll.c: Ditto. * varasm.c: Ditto. * xcoffout.c: Ditto. From-SVN: r46173
2001-10-11 05:16:15 +02:00
const char *fmt;
int len, i;
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
const enum rtx_code code = GET_CODE (x);
1991-12-01 06:13:56 +01:00
switch (code)
{
case REG:
case SCRATCH:
case PC:
case CC0:
alias.c (rtx_equal_for_memref_p): Convert constant cases. 2012-08-23 Kenneth Zadeck <zadeck@naturalbridge.com> * alias.c (rtx_equal_for_memref_p): Convert constant cases. * combine.c (find_single_use_1, mark_used_regs_combine): Convert to CASE_CONST_ANY. * cse.c (exp_equiv_p, canon_reg, fold_rtx, cse_process_notes_1, count_reg_usage): Convert constant cases. * cselib.c (cselib_expand_value_rtx_1): Convert to CASE_CONST_ANY. (cselib_subst_to_values): Convert constant cases. * df-scan.c (df_uses_record): Ditto. * dse.c (const_or_frame_p): Convert case statements to explicit if-then-else using mode classes. * emit-rtl.c (verify_rtx_sharing, copy_insn_1): Convert constant cases. * explow.c (convert_memory_address_addr_space): Ditto. * gcse.c (want_to_gcse_p, oprs_unchanged_p, compute_transp): Ditto. * genattrtab.c (attr_copy_rtx, clear_struct_flag): Ditto. * ira.c (equiv_init_varies_p, contains_replace_regs, memref_referenced_p, rtx_moveable_p): Ditto. * jump.c (mark_jump_label_1): Remove constant cases. (rtx_renumbered_equal_p): Convert to CASE_CONST_UNIQUE. * loop-invariant.c (check_maybe_invariant, hash_invariant_expr_1, invariant_expr_equal_p): Convert to CASE_CONST_ANY. * postreload-gcse.c (oprs_unchanged_p): Convert constant cases. * reginfo.c (reg_scan_mark_refs): Ditto. * regrename.c (scan_rtx): Ditto. * reload1.c (eliminate_regs_1, elimination_effects, scan_paradoxical_subregs): Ditto. * reload.c (operands_match_p, subst_reg_equivs): Ditto. * resource.c (mark_referenced_resources, mark_set_resources): Ditto. * rtlanal.c (rtx_unstable_p, rtx_varies_p, count_occurrences) (reg_mentioned_p, modified_between_p, modified_in_p) (volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, inequality_comparisons_p, computed_jump_p_1): Ditto. * rtl.c (copy_rtx, rtx_equal_p_cb, rtx_equal_p): Ditto. * sched-deps.c (sched_analyze_2): Ditto. * valtrack.c (cleanup_auto_inc_dec): Ditto. * rtl.h: (CASE_CONST_SCALAR_INT, CASE_CONST_UNIQUE, CASE_CONST_ANY): New macros. From-SVN: r190627
2012-08-23 20:46:18 +02:00
CASE_CONST_ANY:
1991-12-01 06:13:56 +01:00
case CONST:
case LABEL_REF:
case SYMBOL_REF:
return 0;
case LT:
case LTU:
case GT:
case GTU:
case LE:
case LEU:
case GE:
case GEU:
return 1;
default:
break;
1991-12-01 06:13:56 +01:00
}
len = GET_RTX_LENGTH (code);
fmt = GET_RTX_FORMAT (code);
for (i = 0; i < len; i++)
{
if (fmt[i] == 'e')
{
if (inequality_comparisons_p (XEXP (x, i)))
return 1;
}
else if (fmt[i] == 'E')
{
alias.c: Remove uses of "register" specifier in declarations of arguments and local... 2001-10-10 Stan Shebs <shebs@apple.com> * alias.c: Remove uses of "register" specifier in declarations of arguments and local variables. * c-common.c: Ditto. * c-convert.c: Ditto. * c-decl.c: Ditto. * c-format.c: Ditto. * c-semantics.c: Ditto. * c-typeck.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfgbuild.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * combine.c: Ditto. * convert.c: Ditto. * cppexp.c: Ditto. * cppfiles.c: Ditto. * cse.c: Ditto. * dbxout.c: Ditto. * defaults.h: Ditto. * df.c: Ditto. * dwarf2out.c: Ditto. * dwarfout.c: Ditto. * emit-rtl.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fix-header.c: Ditto. * floatlib.c: Ditto. * flow.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * gcc.c: Ditto. * gcse.c: Ditto. * gen-protos.c: Ditto. * genattrtab.c: Ditto. * gencheck.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * gengenrtl.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * gensupport.c: Ditto. * global.c: Ditto. * gmon.c: Ditto. * graph.c: Ditto. * haifa-sched.c: Ditto. * hard-reg-set.h: Ditto. * hash.c: Ditto. * integrate.c: Ditto. * jump.c: Ditto. * lists.c: Ditto. * local-alloc.c: Ditto. * loop.c: Ditto. * mips-tdump.c: Ditto. * mips-tfile.c: Ditto. * optabs.c: Ditto. * prefix.c: Ditto. * print-rtl.c: Ditto. * read-rtl.c: Ditto. * real.c: Ditto. * recog.c: Ditto. * reg-stack.c: Ditto. * regclass.c: Ditto. * regmove.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtl.c: Ditto. * rtlanal.c: Ditto. * scan.c: Ditto. * sched-deps.c: Ditto. * sched-rgn.c: Ditto. * sdbout.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tradcif.y: Ditto. * tradcpp.c: Ditto. * tree.c: Ditto. * unroll.c: Ditto. * varasm.c: Ditto. * xcoffout.c: Ditto. From-SVN: r46173
2001-10-11 05:16:15 +02:00
int j;
1991-12-01 06:13:56 +01:00
for (j = XVECLEN (x, i) - 1; j >= 0; j--)
if (inequality_comparisons_p (XVECEXP (x, i, j)))
return 1;
}
}
1991-12-01 06:13:56 +01:00
return 0;
}
/* Replace any occurrence of FROM in X with TO. The function does
not enter into CONST_DOUBLE for the replace.
1991-12-01 06:13:56 +01:00
Note that copying is not done so X must not be shared unless all copies
are to be modified. */
rtx
replace_rtx (rtx x, rtx from, rtx to)
1991-12-01 06:13:56 +01:00
{
alias.c: Remove uses of "register" specifier in declarations of arguments and local... 2001-10-10 Stan Shebs <shebs@apple.com> * alias.c: Remove uses of "register" specifier in declarations of arguments and local variables. * c-common.c: Ditto. * c-convert.c: Ditto. * c-decl.c: Ditto. * c-format.c: Ditto. * c-semantics.c: Ditto. * c-typeck.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfgbuild.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * combine.c: Ditto. * convert.c: Ditto. * cppexp.c: Ditto. * cppfiles.c: Ditto. * cse.c: Ditto. * dbxout.c: Ditto. * defaults.h: Ditto. * df.c: Ditto. * dwarf2out.c: Ditto. * dwarfout.c: Ditto. * emit-rtl.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fix-header.c: Ditto. * floatlib.c: Ditto. * flow.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * gcc.c: Ditto. * gcse.c: Ditto. * gen-protos.c: Ditto. * genattrtab.c: Ditto. * gencheck.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * gengenrtl.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * gensupport.c: Ditto. * global.c: Ditto. * gmon.c: Ditto. * graph.c: Ditto. * haifa-sched.c: Ditto. * hard-reg-set.h: Ditto. * hash.c: Ditto. * integrate.c: Ditto. * jump.c: Ditto. * lists.c: Ditto. * local-alloc.c: Ditto. * loop.c: Ditto. * mips-tdump.c: Ditto. * mips-tfile.c: Ditto. * optabs.c: Ditto. * prefix.c: Ditto. * print-rtl.c: Ditto. * read-rtl.c: Ditto. * real.c: Ditto. * recog.c: Ditto. * reg-stack.c: Ditto. * regclass.c: Ditto. * regmove.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtl.c: Ditto. * rtlanal.c: Ditto. * scan.c: Ditto. * sched-deps.c: Ditto. * sched-rgn.c: Ditto. * sdbout.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tradcif.y: Ditto. * tradcpp.c: Ditto. * tree.c: Ditto. * unroll.c: Ditto. * varasm.c: Ditto. * xcoffout.c: Ditto. From-SVN: r46173
2001-10-11 05:16:15 +02:00
int i, j;
const char *fmt;
1991-12-01 06:13:56 +01:00
if (x == from)
return to;
/* Allow this function to make replacements in EXPR_LISTs. */
if (x == 0)
return 0;
if (GET_CODE (x) == SUBREG)
{
rtx new_rtx = replace_rtx (SUBREG_REG (x), from, to);
if (CONST_INT_P (new_rtx))
{
x = simplify_subreg (GET_MODE (x), new_rtx,
GET_MODE (SUBREG_REG (x)),
SUBREG_BYTE (x));
ra-build.c (copy_insn_p, [...]): Use gcc_assert and gcc_unreachable instead of abort. * ra-build.c (copy_insn_p, remember_move, defuse_overlap_p_1, live_out_1, prune_hardregs_for_mode, init_one_web_common, reinit_one_web, add_subweb, add_subweb_2, init_web_parts, record_conflict, compare_and_free_webs, init_webs_defs_uses, parts_to_webs_1, parts_to_webs, reset_conflicts, check_conflict_numbers, remember_web_was_spilled, handle_asm_insn, ra_build_free): Use gcc_assert and gcc_unreachable instead of abort. * ra-colorize.c (push_list, put_web, reset_lists, put_web_at_end, put_move, remove_move, combine, select_spill, colorize_one_web, try_recolor_web, insert_coalesced_conflicts, check_colors, break_precolored_alias, restore_conflicts_from_coalesce, sort_and_combine_web_pairs, check_uncoalesced_moves): Likewise. * ra-rewrite.c (spill_coalescing, slots_overlap_p, emit_loads, reloads_to_loads, rewrite_program2, emit_colors): Likewise. * ra.c (first_hard_reg, create_insn_info, find_subweb, init_ra, check_df): Likewise. * real.c (do_add, do_multiply, do_divide, do_compare, do_fix_trunc, real_arithmetic, real_compare, real_exponent, real_ldexp, real_identical, real_to_integer, real_to_integer2, real_to_decimal, real_to_hexadecimal, real_from_integer, ten_to_ptwo, ten_to_mptwo, real_digit, real_nan, real_maxval, round_for_format, real_convert, real_to_target, real_from_target, real_hash, encode_ieee_single, encode_ieee_double, encode_ieee_extended, encode_ieee_quad, encode_vax_f, encode_vax_d, encode_vax_g, encode_i370_single, encode_i370_double, encode_c4x_single, encode_c4x_extended): Likewise. * recog.c (validate_change, validate_replace_rtx_1, asm_operand_ok, extract_insn, peep2_next_insn, peep2_reg_dead_p, peep2_find_free_register, peephole2_optimize, store_data_bypass_p, if_test_bypass_p): Likewise. * reg-stack.c (record_label_references, get_asm_operand_n_inputs, stack_result, remove_regno_note, get_hard_regnum, emit_pop_insn, emit_swap_insn, swap_to_top, move_for_stack_reg, subst_stack_regs_pat, subst_asm_stack_regs, change_stack, compensate_edge, convert_regs_1): Likewise. * regclass.c (init_reg_sets, init_reg_sets_1, memory_move_secondary_cost): Likewise. * regrename.c (note_sets, clear_dead_regs, scan_rtx_reg, scan_rtx): Likewise. * reload.c (push_secondary_reload, find_valid_class, push_reload, operands_match_p, decompose, immune_p, find_reloads, find_reloads_toplev, find_reloads_address_1, subst_reloads, copy_replacements, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p): Likewise. * reload1.c (compute_use_by_pseudos, replace_pseudos_in, reload, count_pseudo, find_reg, eliminate_regs, eliminate_regs_in_insn, verify_initial_elim_offsets, finish_spills, clear_reload_reg_in_use, reload_reg_free_p, reload_reg_reaches_end_p, reloads_conflict, choose_reload_regs, merge_assigned_reloads, emit_input_reload_insns, do_output_reload, fixup_abnormal_edges): Likewise. * reorg.c (stop_search_p, emit_delay_sequence, get_jump_flags, fill_slots_from_thread, relax_delay_slots): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * rtl.c (copy_rtx, rtx_equal_p): Likewise. * rtlanal.c (insn_dependent_p, reg_overlap_mentioned_p, dead_or_set_p, find_reg_fusage, remove_note, replace_rtx, subreg_lsb_1, subreg_regno_offset, subreg_offset_representable_p, find_first_parameter_load, can_hoist_insn_p, hoist_update_store, hoist_insn_after, hoist_insn_to_edge, nonzero_bits1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sbitmap.c (sbitmap_difference): Likewise. * sched-deps.c (add_dependence, sched_analyze_1, sched_analyze_2, sched_analyze, add_forward_dependence): Likewise. * sched-ebb.c (fix_basic_block_boundaries, schedule_ebb): Likewise. * sched-rgn.c (debug_regions, compute_trg_info, schedule_region, schedule_insns): Likewise. * sched-vis.c (print_pattern): Likewise. * sdbout.c (sdbout_symbol, sdbout_toplevel_data): Likewise. * simplify-rtx.c (simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_ternary_operation, simplify_immed_subreg, simplify_subreg, simplify_gen_subreg): Likewise. * sreal.c (copy, sreal_sub, sreal_div): Likewise. * stmt.c (force_label_rtx, expand_goto, expand_asm_operands, resolve_operand_name_1, expand_return, expand_decl, expand_anon_union_decl, emit_case_bit_tests, expand_case): Likewise. * stor-layout.c (put_pending_size, smallest_mode_for_size, int_mode_for_mode, layout_decl, finish_builtin_struct, layout_type, set_sizetype, get_mode_bounds): Likewise. From-SVN: r87244
2004-09-09 19:19:16 +02:00
gcc_assert (x);
}
else
SUBREG_REG (x) = new_rtx;
return x;
}
else if (GET_CODE (x) == ZERO_EXTEND)
{
rtx new_rtx = replace_rtx (XEXP (x, 0), from, to);
if (CONST_INT_P (new_rtx))
{
x = simplify_unary_operation (ZERO_EXTEND, GET_MODE (x),
new_rtx, GET_MODE (XEXP (x, 0)));
ra-build.c (copy_insn_p, [...]): Use gcc_assert and gcc_unreachable instead of abort. * ra-build.c (copy_insn_p, remember_move, defuse_overlap_p_1, live_out_1, prune_hardregs_for_mode, init_one_web_common, reinit_one_web, add_subweb, add_subweb_2, init_web_parts, record_conflict, compare_and_free_webs, init_webs_defs_uses, parts_to_webs_1, parts_to_webs, reset_conflicts, check_conflict_numbers, remember_web_was_spilled, handle_asm_insn, ra_build_free): Use gcc_assert and gcc_unreachable instead of abort. * ra-colorize.c (push_list, put_web, reset_lists, put_web_at_end, put_move, remove_move, combine, select_spill, colorize_one_web, try_recolor_web, insert_coalesced_conflicts, check_colors, break_precolored_alias, restore_conflicts_from_coalesce, sort_and_combine_web_pairs, check_uncoalesced_moves): Likewise. * ra-rewrite.c (spill_coalescing, slots_overlap_p, emit_loads, reloads_to_loads, rewrite_program2, emit_colors): Likewise. * ra.c (first_hard_reg, create_insn_info, find_subweb, init_ra, check_df): Likewise. * real.c (do_add, do_multiply, do_divide, do_compare, do_fix_trunc, real_arithmetic, real_compare, real_exponent, real_ldexp, real_identical, real_to_integer, real_to_integer2, real_to_decimal, real_to_hexadecimal, real_from_integer, ten_to_ptwo, ten_to_mptwo, real_digit, real_nan, real_maxval, round_for_format, real_convert, real_to_target, real_from_target, real_hash, encode_ieee_single, encode_ieee_double, encode_ieee_extended, encode_ieee_quad, encode_vax_f, encode_vax_d, encode_vax_g, encode_i370_single, encode_i370_double, encode_c4x_single, encode_c4x_extended): Likewise. * recog.c (validate_change, validate_replace_rtx_1, asm_operand_ok, extract_insn, peep2_next_insn, peep2_reg_dead_p, peep2_find_free_register, peephole2_optimize, store_data_bypass_p, if_test_bypass_p): Likewise. * reg-stack.c (record_label_references, get_asm_operand_n_inputs, stack_result, remove_regno_note, get_hard_regnum, emit_pop_insn, emit_swap_insn, swap_to_top, move_for_stack_reg, subst_stack_regs_pat, subst_asm_stack_regs, change_stack, compensate_edge, convert_regs_1): Likewise. * regclass.c (init_reg_sets, init_reg_sets_1, memory_move_secondary_cost): Likewise. * regrename.c (note_sets, clear_dead_regs, scan_rtx_reg, scan_rtx): Likewise. * reload.c (push_secondary_reload, find_valid_class, push_reload, operands_match_p, decompose, immune_p, find_reloads, find_reloads_toplev, find_reloads_address_1, subst_reloads, copy_replacements, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p): Likewise. * reload1.c (compute_use_by_pseudos, replace_pseudos_in, reload, count_pseudo, find_reg, eliminate_regs, eliminate_regs_in_insn, verify_initial_elim_offsets, finish_spills, clear_reload_reg_in_use, reload_reg_free_p, reload_reg_reaches_end_p, reloads_conflict, choose_reload_regs, merge_assigned_reloads, emit_input_reload_insns, do_output_reload, fixup_abnormal_edges): Likewise. * reorg.c (stop_search_p, emit_delay_sequence, get_jump_flags, fill_slots_from_thread, relax_delay_slots): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * rtl.c (copy_rtx, rtx_equal_p): Likewise. * rtlanal.c (insn_dependent_p, reg_overlap_mentioned_p, dead_or_set_p, find_reg_fusage, remove_note, replace_rtx, subreg_lsb_1, subreg_regno_offset, subreg_offset_representable_p, find_first_parameter_load, can_hoist_insn_p, hoist_update_store, hoist_insn_after, hoist_insn_to_edge, nonzero_bits1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sbitmap.c (sbitmap_difference): Likewise. * sched-deps.c (add_dependence, sched_analyze_1, sched_analyze_2, sched_analyze, add_forward_dependence): Likewise. * sched-ebb.c (fix_basic_block_boundaries, schedule_ebb): Likewise. * sched-rgn.c (debug_regions, compute_trg_info, schedule_region, schedule_insns): Likewise. * sched-vis.c (print_pattern): Likewise. * sdbout.c (sdbout_symbol, sdbout_toplevel_data): Likewise. * simplify-rtx.c (simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_ternary_operation, simplify_immed_subreg, simplify_subreg, simplify_gen_subreg): Likewise. * sreal.c (copy, sreal_sub, sreal_div): Likewise. * stmt.c (force_label_rtx, expand_goto, expand_asm_operands, resolve_operand_name_1, expand_return, expand_decl, expand_anon_union_decl, emit_case_bit_tests, expand_case): Likewise. * stor-layout.c (put_pending_size, smallest_mode_for_size, int_mode_for_mode, layout_decl, finish_builtin_struct, layout_type, set_sizetype, get_mode_bounds): Likewise. From-SVN: r87244
2004-09-09 19:19:16 +02:00
gcc_assert (x);
}
else
XEXP (x, 0) = new_rtx;
return x;
}
1991-12-01 06:13:56 +01:00
fmt = GET_RTX_FORMAT (GET_CODE (x));
for (i = GET_RTX_LENGTH (GET_CODE (x)) - 1; i >= 0; i--)
{
if (fmt[i] == 'e')
XEXP (x, i) = replace_rtx (XEXP (x, i), from, to);
else if (fmt[i] == 'E')
for (j = XVECLEN (x, i) - 1; j >= 0; j--)
XVECEXP (x, i, j) = replace_rtx (XVECEXP (x, i, j), from, to);
}
return x;
}
1991-12-01 06:13:56 +01:00
/* Replace occurrences of the OLD_LABEL in *LOC with NEW_LABEL. Also track
the change in LABEL_NUSES if UPDATE_LABEL_NUSES. */
void
replace_label (rtx *loc, rtx old_label, rtx new_label, bool update_label_nuses)
{
/* Handle jump tables specially, since ADDR_{DIFF_,}VECs can be long. */
rtx x = *loc;
if (JUMP_TABLE_DATA_P (x))
{
x = PATTERN (x);
rtvec vec = XVEC (x, GET_CODE (x) == ADDR_DIFF_VEC);
int len = GET_NUM_ELEM (vec);
for (int i = 0; i < len; ++i)
{
rtx ref = RTVEC_ELT (vec, i);
if (XEXP (ref, 0) == old_label)
{
XEXP (ref, 0) = new_label;
if (update_label_nuses)
{
++LABEL_NUSES (new_label);
--LABEL_NUSES (old_label);
}
}
}
return;
}
/* If this is a JUMP_INSN, then we also need to fix the JUMP_LABEL
field. This is not handled by the iterator because it doesn't
handle unprinted ('0') fields. */
if (JUMP_P (x) && JUMP_LABEL (x) == old_label)
JUMP_LABEL (x) = new_label;
subrtx_ptr_iterator::array_type array;
FOR_EACH_SUBRTX_PTR (iter, array, loc, ALL)
{
rtx *loc = *iter;
if (rtx x = *loc)
{
if (GET_CODE (x) == SYMBOL_REF
&& CONSTANT_POOL_ADDRESS_P (x))
{
rtx c = get_pool_constant (x);
if (rtx_referenced_p (old_label, c))
{
/* Create a copy of constant C; replace the label inside
but do not update LABEL_NUSES because uses in constant pool
are not counted. */
rtx new_c = copy_rtx (c);
replace_label (&new_c, old_label, new_label, false);
/* Add the new constant NEW_C to constant pool and replace
the old reference to constant by new reference. */
rtx new_mem = force_const_mem (get_pool_mode (x), new_c);
*loc = replace_rtx (x, x, XEXP (new_mem, 0));
}
}
if ((GET_CODE (x) == LABEL_REF
|| GET_CODE (x) == INSN_LIST)
&& XEXP (x, 0) == old_label)
{
XEXP (x, 0) = new_label;
if (update_label_nuses)
{
++LABEL_NUSES (new_label);
--LABEL_NUSES (old_label);
}
}
}
}
}
void
replace_label_in_insn (rtx_insn *insn, rtx old_label, rtx new_label,
bool update_label_nuses)
{
rtx insn_as_rtx = insn;
replace_label (&insn_as_rtx, old_label, new_label, update_label_nuses);
gcc_checking_assert (insn_as_rtx == insn);
}
/* Return true if X is referenced in BODY. */
bool
rtx_referenced_p (const_rtx x, const_rtx body)
{
subrtx_iterator::array_type array;
FOR_EACH_SUBRTX (iter, array, body, ALL)
if (const_rtx y = *iter)
{
/* Check if a label_ref Y refers to label X. */
Introduce LABEL_REF_LABEL gcc/ChangeLog: 2014-09-11 David Malcolm <dmalcolm@redhat.com> * rtl.h (LABEL_REF_LABEL): New macro. * alias.c (rtx_equal_for_memref_p): Use LABEL_REF_LABEL in place of XEXP (, 0), where we know that we have a LABEL_REF. * cfgbuild.c (make_edges): Likewise. (purge_dead_tablejump_edges): Likewise. * cfgexpand.c (convert_debug_memory_address): Likewise. * cfgrtl.c (patch_jump_insn): Likewise. * combine.c (distribute_notes): Likewise. * cse.c (hash_rtx_cb): Likewise. (exp_equiv_p): Likewise. (fold_rtx): Likewise. (check_for_label_ref): Likewise. * cselib.c (rtx_equal_for_cselib_1): Likewise. (cselib_hash_rtx): Likewise. * emit-rtl.c (mark_label_nuses): Likewise. * explow.c (convert_memory_address_addr_space): Likewise. * final.c (output_asm_label): Likewise. (output_addr_const): Likewise. * gcse.c (add_label_notes): Likewise. * genconfig.c (walk_insn_part): Likewise. * genrecog.c (validate_pattern): Likewise. * ifcvt.c (cond_exec_get_condition): Likewise. (noce_emit_store_flag): Likewise. (noce_get_alt_condition): Likewise. (noce_get_condition): Likewise. * jump.c (maybe_propagate_label_ref): Likewise. (mark_jump_label_1): Likewise. (redirect_exp_1): Likewise. (rtx_renumbered_equal_p): Likewise. * lra-constraints.c (operands_match_p): Likewise. * reload.c (operands_match_p): Likewise. (find_reloads): Likewise. * reload1.c (set_label_offsets): Likewise. * reorg.c (get_branch_condition): Likewise. * rtl.c (rtx_equal_p_cb): Likewise. (rtx_equal_p): Likewise. * rtlanal.c (reg_mentioned_p): Likewise. (rtx_referenced_p): Likewise. (get_condition): Likewise. * sched-vis.c (print_value): Likewise. * varasm.c (const_hash_1): Likewise. (compare_constant): Likewise. (const_rtx_hash_1): Likewise. (output_constant_pool_1): Likewise. From-SVN: r215190
2014-09-11 22:47:39 +02:00
if (GET_CODE (y) == LABEL_REF
&& LABEL_P (x)
&& LABEL_REF_LABEL (y) == x)
return true;
if (rtx_equal_p (x, y))
return true;
/* If Y is a reference to pool constant traverse the constant. */
if (GET_CODE (y) == SYMBOL_REF
&& CONSTANT_POOL_ADDRESS_P (y))
iter.substitute (get_pool_constant (y));
}
return false;
}
/* If INSN is a tablejump return true and store the label (before jump table) to
*LABELP and the jump table to *TABLEP. LABELP and TABLEP may be NULL. */
bool
tablejump_p (const rtx_insn *insn, rtx *labelp, rtx_jump_table_data **tablep)
{
rtx label, table;
rtlanal.c (tablejump_p): False for returns. * rtlanal.c (tablejump_p): False for returns. * reorg.c (first_active_target_insn): New static function. (find_end_label): Set JUMP_LABEL for a new returnjump. (optimize_skip, get_jump_flags, rare_destination, mostly_true_jump, get_branch_condition, steal_delay_list_from_target, own_thread_p, fill_simple_delay_slots, follow_jumps, fill_slots_from_thread, fill_eager_delay_slots, relax_delay_slots, make_return_insns, dbr_schedule): Adjust to handle ret_rtx in JUMP_LABELs. * jump.c (delete_related_insns): Likewise. (jump_to_label_p): New function. (redirect_target): New static function. (redirect_exp_1): Use it. Adjust to handle ret_rtx in JUMP_LABELS. (redirect_jump_1): Assert that the new label is nonnull. (redirect_jump): Likewise. (redirect_jump_2): Check for ANY_RETURN_P rather than NULL labels. * ifcvt.c (find_if_case_1): Take care when redirecting jumps to the exit block. (dead_or_predicable): Change NEW_DEST arg to DEST_EDGE. All callers changed. Ensure that the right label is passed to redirect_jump. * function.c (emit_return_into_block, thread_prologue_and_epilogue_insns): Ensure new returnjumps have ret_rtx in their JUMP_LABEL. * print-rtl.c (print_rtx): Handle ret_rtx in a JUMP_LABEL. * emit-rtl.c (skip_consecutive_labels): Allow the caller to pass ret_rtx as label. * cfglayout.c (fixup_reorder_chain): Use force_nonfallthru_and_redirect rather than force_nonfallthru. (duplicate_insn_chain): Copy JUMP_LABELs for returns. * rtl.h (ANY_RETURN_P): New macro. (jump_to_label_p): Declare. * resource.c (find_dead_or_set_registers): Handle ret_rtx in JUMP_LABELs. (mark_target_live_regs): Likewise. * basic-block.h (force_nonfallthru_and_redirect): Declare. * cfgrtl.c (force_nonfallthru_and_redirect): No longer static. * config/alpha/alpha.c (alpha_tablejump_addr_vec, alpha_tablejump_best_label): Remove functions. * config/alpha/alpha-protos.c (alpha_tablejump_addr_vec, alpha_tablejump_best_label): Remove declarations. * config/sh/sh.c (barrier_align, split_branches): Adjust for ret_rtx in JUMP_LABELs. * config/arm/arm.c (is_jump_table): Likewise. From-SVN: r176881
2011-07-28 20:45:20 +02:00
if (!JUMP_P (insn))
return false;
label = JUMP_LABEL (insn);
if (label != NULL_RTX && !ANY_RETURN_P (label)
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 23:29:38 +02:00
&& (table = NEXT_INSN (as_a <rtx_insn *> (label))) != NULL_RTX
&& JUMP_TABLE_DATA_P (table))
{
if (labelp)
*labelp = label;
if (tablep)
Make tablejump_p accept a rtx_jump_table_data ** 2014-08-19 David Malcolm <dmalcolm@redhat.com> * rtl.h (tablejump_p): Strengthen third param from rtx * to rtx_jump_table_data **. * cfgbuild.c (make_edges): Introduce local "table", using it in place of "tmp" for jump table data. (find_bb_boundaries): Strengthen local "table" from rtx to rtx_jump_table_data *. * cfgcleanup.c (merge_blocks_move_successor_nojumps): Likewise. (outgoing_edges_match): Likewise for locals "table1" and "table2". (try_crossjump_to_edge): Likewise. * cfgrtl.c (try_redirect_by_replacing_jump): Likewise for local "table". (patch_jump_insn): Introduce local "table", using it in place of "tmp" for jump table data. (force_nonfallthru_and_redirect): Introduce local "table", so that call to tablejump_p can receive an rtx_jump_table_data **. Update logic around the call to overwrite "note" appropriately if tablejump_p returns non-zero. (get_last_bb_insn): Introduce local "table", using it in place of "tmp" for jump table data. * dwarf2cfi.c (create_trace_edges): Likewise. * config/arm/arm.c (get_jump_table_size): Strengthen param "insn" from rtx to rtx_jump_table_data *. (create_fix_barrier): Strengthen local "tmp" from rtx to rtx_jump_table_data *. (arm_reorg): Likewise for local "table". * config/s390/s390.c (s390_chunkify_start): Likewise. * config/spu/spu.c (spu_emit_branch_hint): Likewise. * jump.c (delete_related_insns): Strengthen local "lab_next" from rtx to rtx_jump_table_data *. * rtlanal.c (tablejump_p): Strengthen param "tablep" from rtx * to rtx_jump_table_data **. Add a checked cast when writing through the pointer: we know there that local "table" is non-NULL and that JUMP_TABLE_DATA_P (table) holds. (label_is_jump_target_p): Introduce local "table", using it in place of "tmp" for jump table data. From-SVN: r214184
2014-08-19 21:19:13 +02:00
*tablep = as_a <rtx_jump_table_data *> (table);
return true;
}
return false;
}
/* A subroutine of computed_jump_p, return 1 if X contains a REG or MEM or
constant that is not in the constant pool and not in the condition
of an IF_THEN_ELSE. */
static int
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
computed_jump_p_1 (const_rtx x)
{
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
const enum rtx_code code = GET_CODE (x);
int i, j;
rtl.h (rtx_format): Constify a char*. * rtl.h (rtx_format): Constify a char*. * rtl.c (rtx_format): Likewise. (copy_rtx, copy_most_rtx, read_rtx): Likewise. (init_rtl): Use accessor macro, not `rtx_format'. * alias.c (rtx_equal_for_memref_p, find_symbolic_term): Constify a char*. * caller-save.c (mark_referenced_regs): Likewise. * combine.c (subst, make_compound_operation, known_cond, gen_rtx_combine, update_table_tick, get_last_value_validate, use_crosses_set_p, mark_used_regs_combine, move_deaths): Likewise. * cse.c (rtx_cost, mention_regs, canon_hash, exp_equiv_p, refers_to_p, canon_reg, fold_rtx, cse_process_notes, count_reg_usage): Likewise. * emit-rtl.c (gen_rtx, copy_rtx_if_shared, reset_used_flags): Likewise. * final.c (leaf_renumber_regs_insn): Likewise. * flow.c (mark_used_regs, find_use_as_address, dump_flow_info, dump_edge_info, count_reg_references): Likewise. * function.c (fixup_var_refs_1, walk_fixup_memory_subreg, fixup_stack_1, purge_addressof_1, instantiate_virtual_regs_1): Likewise. * gcse.c (oprs_unchanged_p, hash_expr_1, expr_equiv_p, oprs_not_set_p, expr_killed_p, compute_transp, find_used_regs, add_label_notes): Likewise. * genattrtab.c (attr_rtx, attr_copy_rtx, encode_units_mask, clear_struct_flag, count_sub_rtxs, count_alternatives, compares_alternatives_p, contained_in_p, walk_attr_value, write_expr_attr_cache): Likewise. * genconfig.c (walk_insn_part): Likewise. * genemit.c (max_operand_1, gen_exp): Likewise. * genextract.c (walk_rtx): Likewise. * genflags.c (num_operands): Likewise. * genoutput.c (scan_operands): Likewise. * genpeep.c (match_rtx): Likewise. * genrecog.c (add_to_sequence): Likewise. * haifa-sched.c (may_trap_exp, sched_analyze_2, attach_deaths): Likewise. * integrate.c (save_constants, copy_for_inline, copy_rtx_and_substitute, subst_constants, restore_constants): Likewise. * jump.c (mark_jump_label, invert_exp, redirect_exp, rtx_renumbered_equal_p, rtx_equal_for_thread_p): Likewise. * local-alloc.c (contains_replace_regs, memref_referenced_p): Likewise. * loop.c (record_excess_regs, rtx_equal_for_loop_p, add_label_notes, replace_call_address, count_nonfixed_reads, invariant_p, find_single_use_in_loop, find_mem_givs, find_life_end, maybe_eliminate_biv_1, update_reg_last_use): Likewise. * print-rtl.c (reg_names, print_rtx): Likewise. * recog.c (validate_replace_rtx_1, find_single_use_1): Likewise. * reg-stack.c (stack_regs_mentioned_p, record_label_references, record_reg_life_pat, swap_rtx_condition, goto_block_pat, print_blocks): Likewise. * regclass.c (fix_register, record_address_regs, reg_scan_mark_refs): Likewise. * regmove.c (stable_but_for_p): Likewise. * reload.c (loc_mentioned_in_p, operands_match_p, find_reloads_toplevsubst_reg_equivs, find_reloads_address_1, copy_replacements, refers_to_regno_for_reload_p, refers_to_mem_for_reload_p, find_inc_amount, regno_clobbered_p, reload_when_needed_name, reg_class_names, debug_reload_to_stream): Likewise. * reload1.c (eliminate_regs, scan_paradoxical_subregs, delete_address_reloads_1, count_occurrences, reload_cse_mem_conflict_p, reload_combine_note_use, add_auto_inc_notes): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * rtlanal.c (rtx_unstable_p, rtx_varies_p, rtx_addr_varies_p, reg_mentioned_p, regs_set_between_p, modified_between_p, modified_in_p, refers_to_regno_p, reg_overlap_mentioned_p, rtx_equal_p, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p, inequality_comparisons_p, replace_rtx, replace_regs, jmp_uses_reg_or_mem, for_each_rtx, regno_use_in): Likewise. * sched.c (sched_analyze_2, attach_deaths): Likewise. * stupid.c (stupid_mark_refs): Likewise. * unroll.c (remap_split_bivs): Likewise. * varasm.c (mark_constants): Likewise. * a29k/a29k.c (uses_local_reg_p): Likewise. * alpha/alpha.c (summarize_insn): Likewise. * arm/arm.c (symbol_mentioned_p, label_mentioned_p, eliminate_lr2ip): Likewise. * arm/thumb.c (symbol_mentioned_p, label_mentioned_p): Likewise. * i386/i386.c (symbolic_reference_mentioned_p, copy_all_rtx, reg_mentioned_in_mem): Likewise. * ns32k/ns32k.c (global_symbolic_reference_mentioned_p, symbolic_reference_mentioned_p): Likewise. * romp/romp.c (unsigned_comparisons_p, hash_rtx): Likewise. * sh/sh.c (regs_used, mark_use): Likewise. * vax/vax.c (vax_rtx_cost): Likewise. From-SVN: r28784
1999-08-21 01:05:25 +02:00
const char *fmt;
switch (code)
{
case LABEL_REF:
case PC:
return 0;
case CONST:
alias.c (rtx_equal_for_memref_p): Convert constant cases. 2012-08-23 Kenneth Zadeck <zadeck@naturalbridge.com> * alias.c (rtx_equal_for_memref_p): Convert constant cases. * combine.c (find_single_use_1, mark_used_regs_combine): Convert to CASE_CONST_ANY. * cse.c (exp_equiv_p, canon_reg, fold_rtx, cse_process_notes_1, count_reg_usage): Convert constant cases. * cselib.c (cselib_expand_value_rtx_1): Convert to CASE_CONST_ANY. (cselib_subst_to_values): Convert constant cases. * df-scan.c (df_uses_record): Ditto. * dse.c (const_or_frame_p): Convert case statements to explicit if-then-else using mode classes. * emit-rtl.c (verify_rtx_sharing, copy_insn_1): Convert constant cases. * explow.c (convert_memory_address_addr_space): Ditto. * gcse.c (want_to_gcse_p, oprs_unchanged_p, compute_transp): Ditto. * genattrtab.c (attr_copy_rtx, clear_struct_flag): Ditto. * ira.c (equiv_init_varies_p, contains_replace_regs, memref_referenced_p, rtx_moveable_p): Ditto. * jump.c (mark_jump_label_1): Remove constant cases. (rtx_renumbered_equal_p): Convert to CASE_CONST_UNIQUE. * loop-invariant.c (check_maybe_invariant, hash_invariant_expr_1, invariant_expr_equal_p): Convert to CASE_CONST_ANY. * postreload-gcse.c (oprs_unchanged_p): Convert constant cases. * reginfo.c (reg_scan_mark_refs): Ditto. * regrename.c (scan_rtx): Ditto. * reload1.c (eliminate_regs_1, elimination_effects, scan_paradoxical_subregs): Ditto. * reload.c (operands_match_p, subst_reg_equivs): Ditto. * resource.c (mark_referenced_resources, mark_set_resources): Ditto. * rtlanal.c (rtx_unstable_p, rtx_varies_p, count_occurrences) (reg_mentioned_p, modified_between_p, modified_in_p) (volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, inequality_comparisons_p, computed_jump_p_1): Ditto. * rtl.c (copy_rtx, rtx_equal_p_cb, rtx_equal_p): Ditto. * sched-deps.c (sched_analyze_2): Ditto. * valtrack.c (cleanup_auto_inc_dec): Ditto. * rtl.h: (CASE_CONST_SCALAR_INT, CASE_CONST_UNIQUE, CASE_CONST_ANY): New macros. From-SVN: r190627
2012-08-23 20:46:18 +02:00
CASE_CONST_ANY:
case SYMBOL_REF:
case REG:
return 1;
case MEM:
return ! (GET_CODE (XEXP (x, 0)) == SYMBOL_REF
&& CONSTANT_POOL_ADDRESS_P (XEXP (x, 0)));
case IF_THEN_ELSE:
return (computed_jump_p_1 (XEXP (x, 1))
|| computed_jump_p_1 (XEXP (x, 2)));
bitmap.c (bitmap_clear): Ensure `inline' is at the beginning of the declaration. * bitmap.c (bitmap_clear): Ensure `inline' is at the beginning of the declaration. * c-decl.c (finish_decl): Use parentheses around && within ||. * rtl.c: Include stdlib.h. (read_skip_spaces): Add parentheses around assignments used as truth values. (read_rtx): Initialize list_rtx. * cppexp.c (parse_number): Use || when operands are truth values. * alias.c (find_base_value): Add default case. (memrefs_conflict): Likewise. * combine.c (sets_function_arg_p): Likewise. * genemit.c (gen_exp): Likewise. * local-alloc.c (contains_replace_regs): Likewise. * rtlanal.c (jmp_uses_reg_or_mem): Likewise. * fold-const.c (fold_convert): Use "&&" for truth values. (fold): Add default case. * sdbout.c (sdbout_field_types): Fix typo in declaration. (sdbout_one_type): Add default case. * alpha.c (alpha_sa_mask): Prototype only if OPEN_VMS. (some_operand): Add default case. (input_operand): Likewise. (signed_comparison_operator): Likewise. (divmod_operator): Likewise. (alpha_set_memflags_1): Likewise. * reload1.c (reload_cse_simplify_operands): Ensure function always returns a value. * scan-decls.c (scan_decls): Likewise. * c-lex.c (skip_white_space): Fix typo in declaraion. * c-typeck.c (comp_target_types): Add parentheses around assignment used as truth value. (print_spelling): Likewise. (constructor_implicit, constructor_result): Remove unused variables. * collect2.c (scan_library): Protect prototype with #ifdef SCAN_LIBRARIES. * emit-rtl.c (find_line_note): Fix typo in declaration. * final.c (asm_insn_count): Protect prototype with #ifdef HAVE_ATTR_length. * flow.c (find_auto_inc): Protect prototype with #ifdef AUTO_INC_DEC. (try_pre_increment_1, try_pre_increment): Likewise. * regclass.c (auto_inc_dec_reg_p): Protect prototype with #ifdef FORBIDDEN_INC_DEC_CLASSES. Make return type explicit. * gcov-io.h (__store_long, __write_long, __read_long): Fix unsigned/signed comparisons. * gcov.c (read_files): Remove unused "first_type" variable. (scan _for_source_files): Initialize s_ptr. (function_summary): Eliminate "%lf" formatting, use %ld for longs. (output_data): Initialize branch_probs and last_line_num. Eliminate "%lf" formatting, use "%ld" for longs. Co-Authored-By: Jeffrey A Law <law@cygnus.com> From-SVN: r17158
1997-12-20 12:31:54 +01:00
default:
break;
}
fmt = GET_RTX_FORMAT (code);
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
{
if (fmt[i] == 'e'
&& computed_jump_p_1 (XEXP (x, i)))
return 1;
else if (fmt[i] == 'E')
for (j = 0; j < XVECLEN (x, i); j++)
if (computed_jump_p_1 (XVECEXP (x, i, j)))
return 1;
}
return 0;
}
/* Return nonzero if INSN is an indirect jump (aka computed jump).
Tablejumps and casesi insns are not considered indirect jumps;
we can recognize them by a (use (label_ref)). */
int
computed_jump_p (const rtx_insn *insn)
{
int i;
alias.c (nonlocal_mentioned_p, [...]): Use, LABEL_P, JUMP_P, CALL_P, NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P. 2004-07-08 Jerry Quinn <jlquinn@optonline.net> * alias.c (nonlocal_mentioned_p, nonlocal_referenced_p, nonlocal_set_p, init_alias_analysis): Use, LABEL_P, JUMP_P, CALL_P, NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P. * bb-reorder.c (mark_bb_for_unlikely_executed_section, add_labels_and_missing_jumps, find_jump_block, fix_crossing_unconditional_branches, add_reg_crossing_jump_notes): Likewise. * bt-load.c (btr_referenced_p, compute_defs_uses_and_gen, link_btr_uses, move_btr_def): Likewise. * builtins.c (expand_builtin_longjmp, expand_builtin_nonlocal_goto, expand_builtin_expect_jump): Likewise. * caller-save.c (save_call_clobbered_regs, insert_one_insn): Likewise. * calls.c (expand_call, emit_library_call_value_1): Likewise. * cfganal.c (forwarder_block_p): Likewise. * cfgbuild.c (inside_basic_block_p, count_basic_blocks, make_label_edge, rtl_make_eh_edge, make_edges, find_basic_blocks_1, find_bb_boundaries): Likewise. * cfgcleanup.c (try_simplify_condjump, try_forward_edges, merge_blocks_move_predecessor_nojumps, merge_blocks_move_successor_nojumps, insns_match_p, flow_find_cross_jump, outgoing_edges_match, try_crossjump_to_edge, try_optimize_cfg): Likewise. * cfgexpand.c (expand_block, construct_exit_block): Likewise. * cfglayout.c (skip_insns_after_block, label_for_bb, record_effective_endpoints, insn_locators_initialize, fixup_reorder_chain, update_unlikely_executed_notes): Likewise. * cfgmainloop.c (create_loop_notes): Likewise. * cfgrtl.c (delete_insn, delete_insn_chain, create_basic_block_structure, rtl_delete_block, free_bb_for_insn, update_bb_for_insn, rtl_merge_blocks, rtl_can_merge_blocks, block_label, try_redirect_by_replacing_jump, last_loop_beg_note, redirect_branch_edge, force_nonfallthru_and_redirect, rtl_tidy_fallthru_edge, back_edge_of_syntactic_loop_p, rtl_split_edge, commit_one_edge_insertion, print_rtl_with_bb, update_br_prob_note, rtl_verify_flow_info_1, rtl_verify_flow_info, purge_dead_edges, cfg_layout_redirect_edge_and_branch, cfg_layout_delete_block, cfg_layout_can_merge_blocks_p, cfg_layout_merge_blocks, rtl_block_ends_with_call_p, need_fake_edge_p, rtl_flow_call_edges_add): Likewise. * combine.c (combine_instructions, can_combine_p, try_combine, find_split_point, record_dead_and_set_regs, reg_dead_at_p, distribute_notes, distribute_links, insn_cuid): Likewise. * cse.c (fold_rtx, cse_insn, cse_around_loop, invalidate_skipped_block, cse_set_around_loop, cse_end_of_basic_block, cse_main, cse_basic_block, cse_condition_code_reg): Likewise. * cselib.c (cselib_process_insn): Likewise. * ddg.c (create_ddg): Likewise. * df.c (df_insn_refs_record, df_bb_rd_local_compute, df_insns_modify): Likewise. * dwarf2out.c (dwarf2out_stack_adjust, dwarf2out_frame_debug, gen_label_die, dwarf2out_var_location): Likewise. * emit-rtl.c (get_first_nonnote_insn, get_last_nonnote_insn, next_insn, previous_insn, next_nonnote_insn, prev_nonnote_insn, last_call_insn, active_insn_p, next_label, prev_label, link_cc0_insns, next_cc0_user, try_split, add_insn_after, add_insn_before, remove_insn, add_function_usage_to, reorder_insns, find_line_note, remove_unnecessary_notes, emit_insn_after_1, classify_insn): Likewise. * except.c (convert_from_eh_region_ranges_1, emit_to_new_bb_before, connect_post_landing_pads, sjlj_mark_call_sites, sjlj_emit_function_enter, sjlj_emit_function_exit, reachable_handlers, can_throw_internal, can_throw_external, set_nothrow_function_flags, convert_to_eh_region_ranges): Likewise. * explow.c (optimize_save_area_alloca): Likewise. * expr.c (expand_expr_real): Likewise. * final.c (insn_current_reference_address, compute_alignments, shorten_branches, final, scan_ahead_for_unlikely_executed_note, final_scan_insn, output_asm_label, leaf_function_p): Likewise. * flow.c (first_insn_after_basic_block_note, delete_dead_jumptables, propagate_block_delete_insn, propagate_one_insn, init_propagate_block_info, propagate_block, libcall_dead_p, mark_set_1, attempt_auto_inc, find_auto_inc, try_pre_increment): Likewise. * function.c (instantiate_virtual_regs, reorder_blocks_1, expand_function_start, expand_function_end, contains, thread_prologue_and_epilogue_insns, reposition_prologue_and_epilogue_notes): Likewise. * gcse.c (constprop_register, bypass_conditional_jumps, insert_insn_end_bb, gcse_after_reload): Likewise. * genemit.c (gen_expand, gen_split): Likewise. * genpeep.c (gen_peephole, main): Likewise. * global.c (build_insn_chain): Likewise. * graph.c (node_data, print_rtl_graph_with_bb): Likewise. * haifa-sched.c (unlink_other_notes, unlink_line_notes, get_block_head_tail, no_real_insns_p, rm_line_notes, save_line_notes, restore_line_notes, rm_redundant_line_notes, rm_other_notes, ok_for_early_queue_removal, set_priorities, sched_init): Likewise. * ifcvt.c (count_bb_insns, first_active_insn, last_active_insn, cond_exec_process_insns, end_ifcvt_sequence, noce_process_if_block, merge_if_block, block_jumps_and_fallthru_p, find_if_block, dead_or_predicable): Likewise. * integrate.c (try_constants): Likewise. * jump.c (rebuild_jump_labels, cleanup_barriers, purge_line_number_notes, init_label_info, mark_all_labels, squeeze_notes, get_label_before, get_label_after, reversed_comparison_code_parts, simplejump_p, pc_set, returnjump_p, onlyjump_p, follow_jumps, mark_jump_label, delete_barrier, delete_prior_computation, delete_computation, delete_related_insns, delete_for_peephole, redirect_jump): Likewise. * lcm.c (optimize_mode_switching): Likewise. * local-alloc.c (validate_equiv_mem, update_equiv_regs, block_alloc): Likewise. * loop-doloop.c (doloop_valid_p, doloop_optimize): Likewise. * loop-invariant.c (find_exits, find_invariants_bb): Likewise. * loop-iv.c (simplify_using_assignment): Likewise. * loop.c (compute_luids, loop_optimize, scan_loop, libcall_other_reg, libcall_benefit, skip_consec_insns, move_movables, prescan_loop, find_and_verify_loops, labels_in_range_p, for_each_insn_in_loop, loop_bivs_init_find, strength_reduce, check_insn_for_bivs, check_insn_for_givs, check_final_value, update_giv_derive, basic_induction_var, product_cheap_p, check_dbra_loop, loop_insn_first_p, last_use_this_basic_block, canonicalize_condition, get_condition, loop_regs_scan, load_mems, try_copy_prop, LOOP_BLOCK_NUM, loop_dump_aux): Likewise. * modulo-sched.c (doloop_register_get, find_line_note, sms_schedule, sms_schedule_by_order): Likewise. * optabs.c (emit_no_conflict_block, emit_libcall_block): Likewise. * postreload.c (reload_cse_simplify_operands, reload_combine, reload_cse_move2add): Likewise. * predict.c (can_predict_insn_p, estimate_probability, expected_value_to_br_prob, process_note_predictions): Likewise. * print-rtl.c (print_rtx, print_rtl, print_rtl_single): Likewise. * profile.c (branch_prob): Likewise. * ra-build.c (live_out_1, livethrough_conflicts_bb, detect_webs_set_in_cond_jump): Likewise. * ra-debug.c (ra_print_rtx_object, ra_debug_insns, ra_print_rtl_with_bb): Likewise. * ra-rewrite.c (insert_stores, rewrite_program2): Likewise. * recog.c (next_insn_tests_no_inequality, find_single_use, split_all_insns, peephole2_optimize, if_test_bypass_p): Likewise. * reg-stack.c (next_flags_user, record_label_references, emit_swap_insn, swap_rtx_condition, subst_stack_regs, compensate_edge, convert_regs_1): Likewise. * regclass.c (scan_one_insn): Likewise. * regmove.c (optimize_reg_copy_1, optimize_reg_copy_2, fixup_match_2, regmove_optimize, fixup_match_1, single_set_for_csa, combine_stack_adjustments_for_block): Likewise. * regrename.c (build_def_use, copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads, find_reloads_address_1, subst_reloads, find_equiv_reg): Likewise. * reload1.c (reload, calculate_needs_all_insns, set_label_offsets, reload_as_needed, emit_input_reload_insns, do_output_reload, delete_output_reload, delete_address_reloads_1, fixup_abnormal_edges): Likewise. * reorg.c (find_end_label, emit_delay_sequence, delete_from_delay_slot, delete_scheduled_jump, optimize_skip, get_jump_flags, rare_destination, mostly_true_jump, try_merge_delay_insns, redundant_insn, own_thread_p, fill_simple_delay_slots, fill_slots_from_thread, fill_eager_delay_slots, relax_delay_slots, make_return_insns, dbr_schedule): Likewise. * resource.c (find_basic_block, next_insn_no_annul, find_dead_or_set_registers, mark_target_live_regs): Likewise. * rtl.h (RTX_PREV): Likewise. * rtlanal.c (global_reg_mentioned_p, no_labels_between_p, no_jumps_between_p, reg_used_between_p, reg_referenced_between_p, reg_set_p, find_last_value, dead_or_set_regno_p, find_reg_fusage, find_regno_fusage, pure_call_p, replace_label, rtx_referenced_p_1, tablejump_p, computed_jump_p, insns_safe_to_move_p, find_first_parameter_load, can_hoist_insn_p): Likewise. * sched-deps.c (get_condition, add_dependence, sched_analyze_2, sched_analyze_insn, sched_analyze, add_forward_dependence): Likewise. * sched-ebb.c (fix_basic_block_boundaries, add_deps_for_risky_insns, schedule_ebbs): Likewise. * sched-rgn.c (is_cfg_nonregular, find_conditional_protection, is_conditionally_protected, can_schedule_ready_p, add_branch_dependences, debug_dependencies): Likewise. * stmt.c (emit_nop, expand_start_case, emit_jump_if_reachable): Likewise. * unroll.c (unroll_loop, copy_loop_body, back_branch_in_range_p, reg_dead_after_loop, loop_find_equiv_value, loop_iterations, set_dominates_use, ujump_to_loop_cont): Likewise. * var-tracking.c (prologue_stack_adjust, vt_initialize): Likewise. * varasm.c (output_constant_pool_1): Likewise. From-SVN: r84341
2004-07-09 05:29:35 +02:00
if (JUMP_P (insn))
{
rtx pat = PATTERN (insn);
Divide REG_LABEL notes into REG_LABEL_OPERAND and REG_LABEL_TARGET. * doc/rtl.texi (Insns): Specify when a label_ref makes a jump_insn. Similar for what label_refs can go in the JUMP_TARGET field. Split REG_LABEL documentation into REG_LABEL_TARGET and REG_LABEL_OPERAND. * reload.c (find_reloads): Generate REG_LABEL_OPERAND, not REG_LABEL when replacing an operand with a LABEL_REF for a non-jump insn. (subst_reloads): When replacing a LABEL_REG with a register, instead of generating a REG_LABEL note, assert that there already is one or that the label is a known target for the insn. * rtlanal.c (computed_jump_p): Instead of looking for a REG_LABEL note, check the JUMP_LABEL field. Remove "else" after return. * reorg.c (emit_delay_sequence): Replace case for REG_LABEL with cases for REG_LABEL_OPERAND and REG_LABEL_TARGET. (fill_slots_from_thread): Handle both REG_LABEL_OPERAND and REG_LABEL_TARGET notes, including the JUMP_TARGET field on JUMP_P insns. Iterate over all notes; don't assume there's only one. * cse.c (recorded_label_ref): Adjust comment to refer to REG_LABEL_OPERAND. (cse_extended_basic_block): Do LABEL_REF check for all INSN_P insns, not just NONJUMP_INSN_P. (check_for_label_ref): For JUMP_P insns, check that the LABEL_REF isn't a jump target. * jump.c (rebuild_jump_labels): Adjust head comment. (init_label_info): Ditto. Remove REG_LABEL_OPERAND notes only; don't reset REG_LABEL_TARGET notes, including the JUMP_LABEL field. (mark_all_labels): For JUMP_P insns without a target, check if the the target is noted on the previous nonjump insn. (mark_jump_label_1): New function, guts from mark_jump_label. <case IF_THEN_ELSE>: Handle first operand as a non-target when marking jump target labels. <case LABEL_REF>: Adjust for whether to generate a REG_LABEL_TARGET or a REG_LABEL_OPERAND note. For 'E' format rtl, iterate in descending element order. (delete_related_insns): Handle both REG_LABEL_TARGET and REG_LABEL_OPERAND notes. For JUMP_P insns with labels with zero reference count, delete and fallthrough. Move finding-next- non-deleted insn last in the function. Look at all INSN_P insns for REG_LABEL_OPERAND notes. (redirect_jump_2): Assert that OLABEL equals the old JUMP_LABEL of JUMP. * print-rtl.c (print_rtx): For JUMP_P insns and a non-NULL JUMP_LABEL, output the INSN_UID of it. * gcse.c: Adjust comments as appropriate to say REG_LABEL_OPERAND and/or REG_LABEL_TARGET. (add_label_notes): Only add REG_LABEL_OPERAND notes. Put in line with jump.c copy by only adding notes for labels actually referenced in the insn. * emit-rtl.c (try_split): Don't assume only NONJUMP_INSN_P need usage count increment; handle all INSN_P trial insns. (emit_copy_of_insn_after): Change to not copy REG_LABEL_OPERAND notes. * rtl.h (struct rtx_def) <volatil>: Adjust to mention REG_LABEL_TARGET and REG_LABEL_OPERAND. (LABEL_REF_NONLOCAL_P): Allow REG_LABEL_TARGET and REG_LABEL_OPERAND. * combine.c (distribute_notes): Adjust for REG_LABEL_TARGET on JUMP_P insns and REG_LABEL_OPERAND everywhere. * sched-rgn.c (is_cfg_nonregular): Check for REG_LABEL_OPERANDS on all INSN_P insns. * reg-notes.def (LABEL_TARGET, LABEL_OPERAND): Split from LABEL. * cfgrtl.c (delete_insn): Adjust to handle REG_LABEL_TARGET and REG_LABEL_OPERAND notes. * reload1.c (calculate_needs_all_insns): Adjust comments. (set_label_offsets): Adjust to look for REG_LABEL_OPERAND notes. * config/alpha/alpha.md (split for load of an address into a four-insn sequence on Unicos/Mk): Adjust to use REG_LABEL_OPERAND. * config/sh/sh.md (sh_reorg, final_prescan_insn): Ditto. From-SVN: r128287
2007-09-09 06:41:58 +02:00
/* If we have a JUMP_LABEL set, we're not a computed jump. */
if (JUMP_LABEL (insn) != NULL)
return 0;
Divide REG_LABEL notes into REG_LABEL_OPERAND and REG_LABEL_TARGET. * doc/rtl.texi (Insns): Specify when a label_ref makes a jump_insn. Similar for what label_refs can go in the JUMP_TARGET field. Split REG_LABEL documentation into REG_LABEL_TARGET and REG_LABEL_OPERAND. * reload.c (find_reloads): Generate REG_LABEL_OPERAND, not REG_LABEL when replacing an operand with a LABEL_REF for a non-jump insn. (subst_reloads): When replacing a LABEL_REG with a register, instead of generating a REG_LABEL note, assert that there already is one or that the label is a known target for the insn. * rtlanal.c (computed_jump_p): Instead of looking for a REG_LABEL note, check the JUMP_LABEL field. Remove "else" after return. * reorg.c (emit_delay_sequence): Replace case for REG_LABEL with cases for REG_LABEL_OPERAND and REG_LABEL_TARGET. (fill_slots_from_thread): Handle both REG_LABEL_OPERAND and REG_LABEL_TARGET notes, including the JUMP_TARGET field on JUMP_P insns. Iterate over all notes; don't assume there's only one. * cse.c (recorded_label_ref): Adjust comment to refer to REG_LABEL_OPERAND. (cse_extended_basic_block): Do LABEL_REF check for all INSN_P insns, not just NONJUMP_INSN_P. (check_for_label_ref): For JUMP_P insns, check that the LABEL_REF isn't a jump target. * jump.c (rebuild_jump_labels): Adjust head comment. (init_label_info): Ditto. Remove REG_LABEL_OPERAND notes only; don't reset REG_LABEL_TARGET notes, including the JUMP_LABEL field. (mark_all_labels): For JUMP_P insns without a target, check if the the target is noted on the previous nonjump insn. (mark_jump_label_1): New function, guts from mark_jump_label. <case IF_THEN_ELSE>: Handle first operand as a non-target when marking jump target labels. <case LABEL_REF>: Adjust for whether to generate a REG_LABEL_TARGET or a REG_LABEL_OPERAND note. For 'E' format rtl, iterate in descending element order. (delete_related_insns): Handle both REG_LABEL_TARGET and REG_LABEL_OPERAND notes. For JUMP_P insns with labels with zero reference count, delete and fallthrough. Move finding-next- non-deleted insn last in the function. Look at all INSN_P insns for REG_LABEL_OPERAND notes. (redirect_jump_2): Assert that OLABEL equals the old JUMP_LABEL of JUMP. * print-rtl.c (print_rtx): For JUMP_P insns and a non-NULL JUMP_LABEL, output the INSN_UID of it. * gcse.c: Adjust comments as appropriate to say REG_LABEL_OPERAND and/or REG_LABEL_TARGET. (add_label_notes): Only add REG_LABEL_OPERAND notes. Put in line with jump.c copy by only adding notes for labels actually referenced in the insn. * emit-rtl.c (try_split): Don't assume only NONJUMP_INSN_P need usage count increment; handle all INSN_P trial insns. (emit_copy_of_insn_after): Change to not copy REG_LABEL_OPERAND notes. * rtl.h (struct rtx_def) <volatil>: Adjust to mention REG_LABEL_TARGET and REG_LABEL_OPERAND. (LABEL_REF_NONLOCAL_P): Allow REG_LABEL_TARGET and REG_LABEL_OPERAND. * combine.c (distribute_notes): Adjust for REG_LABEL_TARGET on JUMP_P insns and REG_LABEL_OPERAND everywhere. * sched-rgn.c (is_cfg_nonregular): Check for REG_LABEL_OPERANDS on all INSN_P insns. * reg-notes.def (LABEL_TARGET, LABEL_OPERAND): Split from LABEL. * cfgrtl.c (delete_insn): Adjust to handle REG_LABEL_TARGET and REG_LABEL_OPERAND notes. * reload1.c (calculate_needs_all_insns): Adjust comments. (set_label_offsets): Adjust to look for REG_LABEL_OPERAND notes. * config/alpha/alpha.md (split for load of an address into a four-insn sequence on Unicos/Mk): Adjust to use REG_LABEL_OPERAND. * config/sh/sh.md (sh_reorg, final_prescan_insn): Ditto. From-SVN: r128287
2007-09-09 06:41:58 +02:00
if (GET_CODE (pat) == PARALLEL)
{
int len = XVECLEN (pat, 0);
int has_use_labelref = 0;
for (i = len - 1; i >= 0; i--)
if (GET_CODE (XVECEXP (pat, 0, i)) == USE
&& (GET_CODE (XEXP (XVECEXP (pat, 0, i), 0))
== LABEL_REF))
{
has_use_labelref = 1;
break;
}
if (! has_use_labelref)
for (i = len - 1; i >= 0; i--)
if (GET_CODE (XVECEXP (pat, 0, i)) == SET
&& SET_DEST (XVECEXP (pat, 0, i)) == pc_rtx
&& computed_jump_p_1 (SET_SRC (XVECEXP (pat, 0, i))))
return 1;
}
else if (GET_CODE (pat) == SET
&& SET_DEST (pat) == pc_rtx
&& computed_jump_p_1 (SET_SRC (pat)))
return 1;
}
return 0;
}
re PR debug/43092 (Wrong debuginfo with VTA and -fomit-frame-pointer/-mno-accumulate-outgoing-args) PR debug/43092 PR rtl-optimization/43494 * rtl.h (for_each_inc_dec_fn): New type. (for_each_inc_dec): Declare. * rtlanal.c (struct for_each_inc_dec_ops): New type. (for_each_inc_dec_find_inc_dec): New fn. (for_each_inc_dec_find_mem): New fn. (for_each_inc_dec): New fn. * dse.c (struct insn_size): Remove. (replace_inc_dec, replace_inc_dec_mem): Remove. (emit_inc_dec_insn_before): New fn. (check_for_inc_dec): Use it, along with for_each_inc_dec. (canon_address): Pass mem modes to cselib_lookup. * cselib.h (cselib_lookup): Add memmode argument. Adjust callers. (cselib_lookup_from_insn): Likewise. (cselib_subst_to_values): Likewise. * cselib.c (find_slot_memmode): New var. (cselib_find_slot): New fn. Use it instead of htab_find_slot_with_hash everywhere. (entry_and_rtx_equal_p): Use find_slot_memmode. (autoinc_split): New fn. (rtx_equal_for_cselib_p): Rename and implement in terms of... (rtx_equal_for_cselib_1): ... this. Take memmode, pass it on. Deal with autoinc. Special-case recursion into MEMs. (cselib_hash_rtx): Likewise. (cselib_lookup_mem): Infer pmode from address mode. Distinguish address and MEM modes. (cselib_subst_to_values): Add memmode, pass it on. Deal with autoinc. (cselib_lookup): Add memmode argument, pass it on. (cselib_lookup_from_insn): Add memmode. (cselib_invalidate_rtx): Discard obsolete push_operand handling. (struct cselib_record_autoinc_data): New. (cselib_record_autoinc_cb): New fn. (cselib_record_sets): Use it, along with for_each_inc_dec. Pass MEM mode to cselib_lookup. Reset autoinced REGs here instead of... (cselib_process_insn): ... here. * var-tracking.c (replace_expr_with_values, use_type): Pass MEM mode to cselib_lookup. (add_uses): Likewise, also to cselib_subst_to_values. (add_stores): Likewise. * sched-deps.c (add_insn_mem_dependence): Pass mode to cselib_subst_to_values. (sched_analyze_1, sched_analyze_2): Likewise. Adjusted. * gcse.c (do_local_cprop): Adjusted. * postreload.c (reload_cse_simplify_set): Adjusted. (reload_cse_simplify_operands): Adjusted. * sel-sched-dump (debug_mem_addr_value): Pass mode. From-SVN: r169782
2011-02-03 07:04:04 +01:00
/* MEM has a PRE/POST-INC/DEC/MODIFY address X. Extract the operands of
the equivalent add insn and pass the result to FN, using DATA as the
final argument. */
re PR debug/43092 (Wrong debuginfo with VTA and -fomit-frame-pointer/-mno-accumulate-outgoing-args) PR debug/43092 PR rtl-optimization/43494 * rtl.h (for_each_inc_dec_fn): New type. (for_each_inc_dec): Declare. * rtlanal.c (struct for_each_inc_dec_ops): New type. (for_each_inc_dec_find_inc_dec): New fn. (for_each_inc_dec_find_mem): New fn. (for_each_inc_dec): New fn. * dse.c (struct insn_size): Remove. (replace_inc_dec, replace_inc_dec_mem): Remove. (emit_inc_dec_insn_before): New fn. (check_for_inc_dec): Use it, along with for_each_inc_dec. (canon_address): Pass mem modes to cselib_lookup. * cselib.h (cselib_lookup): Add memmode argument. Adjust callers. (cselib_lookup_from_insn): Likewise. (cselib_subst_to_values): Likewise. * cselib.c (find_slot_memmode): New var. (cselib_find_slot): New fn. Use it instead of htab_find_slot_with_hash everywhere. (entry_and_rtx_equal_p): Use find_slot_memmode. (autoinc_split): New fn. (rtx_equal_for_cselib_p): Rename and implement in terms of... (rtx_equal_for_cselib_1): ... this. Take memmode, pass it on. Deal with autoinc. Special-case recursion into MEMs. (cselib_hash_rtx): Likewise. (cselib_lookup_mem): Infer pmode from address mode. Distinguish address and MEM modes. (cselib_subst_to_values): Add memmode, pass it on. Deal with autoinc. (cselib_lookup): Add memmode argument, pass it on. (cselib_lookup_from_insn): Add memmode. (cselib_invalidate_rtx): Discard obsolete push_operand handling. (struct cselib_record_autoinc_data): New. (cselib_record_autoinc_cb): New fn. (cselib_record_sets): Use it, along with for_each_inc_dec. Pass MEM mode to cselib_lookup. Reset autoinced REGs here instead of... (cselib_process_insn): ... here. * var-tracking.c (replace_expr_with_values, use_type): Pass MEM mode to cselib_lookup. (add_uses): Likewise, also to cselib_subst_to_values. (add_stores): Likewise. * sched-deps.c (add_insn_mem_dependence): Pass mode to cselib_subst_to_values. (sched_analyze_1, sched_analyze_2): Likewise. Adjusted. * gcse.c (do_local_cprop): Adjusted. * postreload.c (reload_cse_simplify_set): Adjusted. (reload_cse_simplify_operands): Adjusted. * sel-sched-dump (debug_mem_addr_value): Pass mode. From-SVN: r169782
2011-02-03 07:04:04 +01:00
static int
for_each_inc_dec_find_inc_dec (rtx mem, for_each_inc_dec_fn fn, void *data)
re PR debug/43092 (Wrong debuginfo with VTA and -fomit-frame-pointer/-mno-accumulate-outgoing-args) PR debug/43092 PR rtl-optimization/43494 * rtl.h (for_each_inc_dec_fn): New type. (for_each_inc_dec): Declare. * rtlanal.c (struct for_each_inc_dec_ops): New type. (for_each_inc_dec_find_inc_dec): New fn. (for_each_inc_dec_find_mem): New fn. (for_each_inc_dec): New fn. * dse.c (struct insn_size): Remove. (replace_inc_dec, replace_inc_dec_mem): Remove. (emit_inc_dec_insn_before): New fn. (check_for_inc_dec): Use it, along with for_each_inc_dec. (canon_address): Pass mem modes to cselib_lookup. * cselib.h (cselib_lookup): Add memmode argument. Adjust callers. (cselib_lookup_from_insn): Likewise. (cselib_subst_to_values): Likewise. * cselib.c (find_slot_memmode): New var. (cselib_find_slot): New fn. Use it instead of htab_find_slot_with_hash everywhere. (entry_and_rtx_equal_p): Use find_slot_memmode. (autoinc_split): New fn. (rtx_equal_for_cselib_p): Rename and implement in terms of... (rtx_equal_for_cselib_1): ... this. Take memmode, pass it on. Deal with autoinc. Special-case recursion into MEMs. (cselib_hash_rtx): Likewise. (cselib_lookup_mem): Infer pmode from address mode. Distinguish address and MEM modes. (cselib_subst_to_values): Add memmode, pass it on. Deal with autoinc. (cselib_lookup): Add memmode argument, pass it on. (cselib_lookup_from_insn): Add memmode. (cselib_invalidate_rtx): Discard obsolete push_operand handling. (struct cselib_record_autoinc_data): New. (cselib_record_autoinc_cb): New fn. (cselib_record_sets): Use it, along with for_each_inc_dec. Pass MEM mode to cselib_lookup. Reset autoinced REGs here instead of... (cselib_process_insn): ... here. * var-tracking.c (replace_expr_with_values, use_type): Pass MEM mode to cselib_lookup. (add_uses): Likewise, also to cselib_subst_to_values. (add_stores): Likewise. * sched-deps.c (add_insn_mem_dependence): Pass mode to cselib_subst_to_values. (sched_analyze_1, sched_analyze_2): Likewise. Adjusted. * gcse.c (do_local_cprop): Adjusted. * postreload.c (reload_cse_simplify_set): Adjusted. (reload_cse_simplify_operands): Adjusted. * sel-sched-dump (debug_mem_addr_value): Pass mode. From-SVN: r169782
2011-02-03 07:04:04 +01:00
{
rtx x = XEXP (mem, 0);
re PR debug/43092 (Wrong debuginfo with VTA and -fomit-frame-pointer/-mno-accumulate-outgoing-args) PR debug/43092 PR rtl-optimization/43494 * rtl.h (for_each_inc_dec_fn): New type. (for_each_inc_dec): Declare. * rtlanal.c (struct for_each_inc_dec_ops): New type. (for_each_inc_dec_find_inc_dec): New fn. (for_each_inc_dec_find_mem): New fn. (for_each_inc_dec): New fn. * dse.c (struct insn_size): Remove. (replace_inc_dec, replace_inc_dec_mem): Remove. (emit_inc_dec_insn_before): New fn. (check_for_inc_dec): Use it, along with for_each_inc_dec. (canon_address): Pass mem modes to cselib_lookup. * cselib.h (cselib_lookup): Add memmode argument. Adjust callers. (cselib_lookup_from_insn): Likewise. (cselib_subst_to_values): Likewise. * cselib.c (find_slot_memmode): New var. (cselib_find_slot): New fn. Use it instead of htab_find_slot_with_hash everywhere. (entry_and_rtx_equal_p): Use find_slot_memmode. (autoinc_split): New fn. (rtx_equal_for_cselib_p): Rename and implement in terms of... (rtx_equal_for_cselib_1): ... this. Take memmode, pass it on. Deal with autoinc. Special-case recursion into MEMs. (cselib_hash_rtx): Likewise. (cselib_lookup_mem): Infer pmode from address mode. Distinguish address and MEM modes. (cselib_subst_to_values): Add memmode, pass it on. Deal with autoinc. (cselib_lookup): Add memmode argument, pass it on. (cselib_lookup_from_insn): Add memmode. (cselib_invalidate_rtx): Discard obsolete push_operand handling. (struct cselib_record_autoinc_data): New. (cselib_record_autoinc_cb): New fn. (cselib_record_sets): Use it, along with for_each_inc_dec. Pass MEM mode to cselib_lookup. Reset autoinced REGs here instead of... (cselib_process_insn): ... here. * var-tracking.c (replace_expr_with_values, use_type): Pass MEM mode to cselib_lookup. (add_uses): Likewise, also to cselib_subst_to_values. (add_stores): Likewise. * sched-deps.c (add_insn_mem_dependence): Pass mode to cselib_subst_to_values. (sched_analyze_1, sched_analyze_2): Likewise. Adjusted. * gcse.c (do_local_cprop): Adjusted. * postreload.c (reload_cse_simplify_set): Adjusted. (reload_cse_simplify_operands): Adjusted. * sel-sched-dump (debug_mem_addr_value): Pass mode. From-SVN: r169782
2011-02-03 07:04:04 +01:00
switch (GET_CODE (x))
{
case PRE_INC:
case POST_INC:
{
int size = GET_MODE_SIZE (GET_MODE (mem));
re PR debug/43092 (Wrong debuginfo with VTA and -fomit-frame-pointer/-mno-accumulate-outgoing-args) PR debug/43092 PR rtl-optimization/43494 * rtl.h (for_each_inc_dec_fn): New type. (for_each_inc_dec): Declare. * rtlanal.c (struct for_each_inc_dec_ops): New type. (for_each_inc_dec_find_inc_dec): New fn. (for_each_inc_dec_find_mem): New fn. (for_each_inc_dec): New fn. * dse.c (struct insn_size): Remove. (replace_inc_dec, replace_inc_dec_mem): Remove. (emit_inc_dec_insn_before): New fn. (check_for_inc_dec): Use it, along with for_each_inc_dec. (canon_address): Pass mem modes to cselib_lookup. * cselib.h (cselib_lookup): Add memmode argument. Adjust callers. (cselib_lookup_from_insn): Likewise. (cselib_subst_to_values): Likewise. * cselib.c (find_slot_memmode): New var. (cselib_find_slot): New fn. Use it instead of htab_find_slot_with_hash everywhere. (entry_and_rtx_equal_p): Use find_slot_memmode. (autoinc_split): New fn. (rtx_equal_for_cselib_p): Rename and implement in terms of... (rtx_equal_for_cselib_1): ... this. Take memmode, pass it on. Deal with autoinc. Special-case recursion into MEMs. (cselib_hash_rtx): Likewise. (cselib_lookup_mem): Infer pmode from address mode. Distinguish address and MEM modes. (cselib_subst_to_values): Add memmode, pass it on. Deal with autoinc. (cselib_lookup): Add memmode argument, pass it on. (cselib_lookup_from_insn): Add memmode. (cselib_invalidate_rtx): Discard obsolete push_operand handling. (struct cselib_record_autoinc_data): New. (cselib_record_autoinc_cb): New fn. (cselib_record_sets): Use it, along with for_each_inc_dec. Pass MEM mode to cselib_lookup. Reset autoinced REGs here instead of... (cselib_process_insn): ... here. * var-tracking.c (replace_expr_with_values, use_type): Pass MEM mode to cselib_lookup. (add_uses): Likewise, also to cselib_subst_to_values. (add_stores): Likewise. * sched-deps.c (add_insn_mem_dependence): Pass mode to cselib_subst_to_values. (sched_analyze_1, sched_analyze_2): Likewise. Adjusted. * gcse.c (do_local_cprop): Adjusted. * postreload.c (reload_cse_simplify_set): Adjusted. (reload_cse_simplify_operands): Adjusted. * sel-sched-dump (debug_mem_addr_value): Pass mode. From-SVN: r169782
2011-02-03 07:04:04 +01:00
rtx r1 = XEXP (x, 0);
rtx c = gen_int_mode (size, GET_MODE (r1));
return fn (mem, x, r1, r1, c, data);
re PR debug/43092 (Wrong debuginfo with VTA and -fomit-frame-pointer/-mno-accumulate-outgoing-args) PR debug/43092 PR rtl-optimization/43494 * rtl.h (for_each_inc_dec_fn): New type. (for_each_inc_dec): Declare. * rtlanal.c (struct for_each_inc_dec_ops): New type. (for_each_inc_dec_find_inc_dec): New fn. (for_each_inc_dec_find_mem): New fn. (for_each_inc_dec): New fn. * dse.c (struct insn_size): Remove. (replace_inc_dec, replace_inc_dec_mem): Remove. (emit_inc_dec_insn_before): New fn. (check_for_inc_dec): Use it, along with for_each_inc_dec. (canon_address): Pass mem modes to cselib_lookup. * cselib.h (cselib_lookup): Add memmode argument. Adjust callers. (cselib_lookup_from_insn): Likewise. (cselib_subst_to_values): Likewise. * cselib.c (find_slot_memmode): New var. (cselib_find_slot): New fn. Use it instead of htab_find_slot_with_hash everywhere. (entry_and_rtx_equal_p): Use find_slot_memmode. (autoinc_split): New fn. (rtx_equal_for_cselib_p): Rename and implement in terms of... (rtx_equal_for_cselib_1): ... this. Take memmode, pass it on. Deal with autoinc. Special-case recursion into MEMs. (cselib_hash_rtx): Likewise. (cselib_lookup_mem): Infer pmode from address mode. Distinguish address and MEM modes. (cselib_subst_to_values): Add memmode, pass it on. Deal with autoinc. (cselib_lookup): Add memmode argument, pass it on. (cselib_lookup_from_insn): Add memmode. (cselib_invalidate_rtx): Discard obsolete push_operand handling. (struct cselib_record_autoinc_data): New. (cselib_record_autoinc_cb): New fn. (cselib_record_sets): Use it, along with for_each_inc_dec. Pass MEM mode to cselib_lookup. Reset autoinced REGs here instead of... (cselib_process_insn): ... here. * var-tracking.c (replace_expr_with_values, use_type): Pass MEM mode to cselib_lookup. (add_uses): Likewise, also to cselib_subst_to_values. (add_stores): Likewise. * sched-deps.c (add_insn_mem_dependence): Pass mode to cselib_subst_to_values. (sched_analyze_1, sched_analyze_2): Likewise. Adjusted. * gcse.c (do_local_cprop): Adjusted. * postreload.c (reload_cse_simplify_set): Adjusted. (reload_cse_simplify_operands): Adjusted. * sel-sched-dump (debug_mem_addr_value): Pass mode. From-SVN: r169782
2011-02-03 07:04:04 +01:00
}
case PRE_DEC:
case POST_DEC:
{
int size = GET_MODE_SIZE (GET_MODE (mem));
re PR debug/43092 (Wrong debuginfo with VTA and -fomit-frame-pointer/-mno-accumulate-outgoing-args) PR debug/43092 PR rtl-optimization/43494 * rtl.h (for_each_inc_dec_fn): New type. (for_each_inc_dec): Declare. * rtlanal.c (struct for_each_inc_dec_ops): New type. (for_each_inc_dec_find_inc_dec): New fn. (for_each_inc_dec_find_mem): New fn. (for_each_inc_dec): New fn. * dse.c (struct insn_size): Remove. (replace_inc_dec, replace_inc_dec_mem): Remove. (emit_inc_dec_insn_before): New fn. (check_for_inc_dec): Use it, along with for_each_inc_dec. (canon_address): Pass mem modes to cselib_lookup. * cselib.h (cselib_lookup): Add memmode argument. Adjust callers. (cselib_lookup_from_insn): Likewise. (cselib_subst_to_values): Likewise. * cselib.c (find_slot_memmode): New var. (cselib_find_slot): New fn. Use it instead of htab_find_slot_with_hash everywhere. (entry_and_rtx_equal_p): Use find_slot_memmode. (autoinc_split): New fn. (rtx_equal_for_cselib_p): Rename and implement in terms of... (rtx_equal_for_cselib_1): ... this. Take memmode, pass it on. Deal with autoinc. Special-case recursion into MEMs. (cselib_hash_rtx): Likewise. (cselib_lookup_mem): Infer pmode from address mode. Distinguish address and MEM modes. (cselib_subst_to_values): Add memmode, pass it on. Deal with autoinc. (cselib_lookup): Add memmode argument, pass it on. (cselib_lookup_from_insn): Add memmode. (cselib_invalidate_rtx): Discard obsolete push_operand handling. (struct cselib_record_autoinc_data): New. (cselib_record_autoinc_cb): New fn. (cselib_record_sets): Use it, along with for_each_inc_dec. Pass MEM mode to cselib_lookup. Reset autoinced REGs here instead of... (cselib_process_insn): ... here. * var-tracking.c (replace_expr_with_values, use_type): Pass MEM mode to cselib_lookup. (add_uses): Likewise, also to cselib_subst_to_values. (add_stores): Likewise. * sched-deps.c (add_insn_mem_dependence): Pass mode to cselib_subst_to_values. (sched_analyze_1, sched_analyze_2): Likewise. Adjusted. * gcse.c (do_local_cprop): Adjusted. * postreload.c (reload_cse_simplify_set): Adjusted. (reload_cse_simplify_operands): Adjusted. * sel-sched-dump (debug_mem_addr_value): Pass mode. From-SVN: r169782
2011-02-03 07:04:04 +01:00
rtx r1 = XEXP (x, 0);
rtx c = gen_int_mode (-size, GET_MODE (r1));
return fn (mem, x, r1, r1, c, data);
re PR debug/43092 (Wrong debuginfo with VTA and -fomit-frame-pointer/-mno-accumulate-outgoing-args) PR debug/43092 PR rtl-optimization/43494 * rtl.h (for_each_inc_dec_fn): New type. (for_each_inc_dec): Declare. * rtlanal.c (struct for_each_inc_dec_ops): New type. (for_each_inc_dec_find_inc_dec): New fn. (for_each_inc_dec_find_mem): New fn. (for_each_inc_dec): New fn. * dse.c (struct insn_size): Remove. (replace_inc_dec, replace_inc_dec_mem): Remove. (emit_inc_dec_insn_before): New fn. (check_for_inc_dec): Use it, along with for_each_inc_dec. (canon_address): Pass mem modes to cselib_lookup. * cselib.h (cselib_lookup): Add memmode argument. Adjust callers. (cselib_lookup_from_insn): Likewise. (cselib_subst_to_values): Likewise. * cselib.c (find_slot_memmode): New var. (cselib_find_slot): New fn. Use it instead of htab_find_slot_with_hash everywhere. (entry_and_rtx_equal_p): Use find_slot_memmode. (autoinc_split): New fn. (rtx_equal_for_cselib_p): Rename and implement in terms of... (rtx_equal_for_cselib_1): ... this. Take memmode, pass it on. Deal with autoinc. Special-case recursion into MEMs. (cselib_hash_rtx): Likewise. (cselib_lookup_mem): Infer pmode from address mode. Distinguish address and MEM modes. (cselib_subst_to_values): Add memmode, pass it on. Deal with autoinc. (cselib_lookup): Add memmode argument, pass it on. (cselib_lookup_from_insn): Add memmode. (cselib_invalidate_rtx): Discard obsolete push_operand handling. (struct cselib_record_autoinc_data): New. (cselib_record_autoinc_cb): New fn. (cselib_record_sets): Use it, along with for_each_inc_dec. Pass MEM mode to cselib_lookup. Reset autoinced REGs here instead of... (cselib_process_insn): ... here. * var-tracking.c (replace_expr_with_values, use_type): Pass MEM mode to cselib_lookup. (add_uses): Likewise, also to cselib_subst_to_values. (add_stores): Likewise. * sched-deps.c (add_insn_mem_dependence): Pass mode to cselib_subst_to_values. (sched_analyze_1, sched_analyze_2): Likewise. Adjusted. * gcse.c (do_local_cprop): Adjusted. * postreload.c (reload_cse_simplify_set): Adjusted. (reload_cse_simplify_operands): Adjusted. * sel-sched-dump (debug_mem_addr_value): Pass mode. From-SVN: r169782
2011-02-03 07:04:04 +01:00
}
case PRE_MODIFY:
case POST_MODIFY:
{
rtx r1 = XEXP (x, 0);
rtx add = XEXP (x, 1);
return fn (mem, x, r1, add, NULL, data);
re PR debug/43092 (Wrong debuginfo with VTA and -fomit-frame-pointer/-mno-accumulate-outgoing-args) PR debug/43092 PR rtl-optimization/43494 * rtl.h (for_each_inc_dec_fn): New type. (for_each_inc_dec): Declare. * rtlanal.c (struct for_each_inc_dec_ops): New type. (for_each_inc_dec_find_inc_dec): New fn. (for_each_inc_dec_find_mem): New fn. (for_each_inc_dec): New fn. * dse.c (struct insn_size): Remove. (replace_inc_dec, replace_inc_dec_mem): Remove. (emit_inc_dec_insn_before): New fn. (check_for_inc_dec): Use it, along with for_each_inc_dec. (canon_address): Pass mem modes to cselib_lookup. * cselib.h (cselib_lookup): Add memmode argument. Adjust callers. (cselib_lookup_from_insn): Likewise. (cselib_subst_to_values): Likewise. * cselib.c (find_slot_memmode): New var. (cselib_find_slot): New fn. Use it instead of htab_find_slot_with_hash everywhere. (entry_and_rtx_equal_p): Use find_slot_memmode. (autoinc_split): New fn. (rtx_equal_for_cselib_p): Rename and implement in terms of... (rtx_equal_for_cselib_1): ... this. Take memmode, pass it on. Deal with autoinc. Special-case recursion into MEMs. (cselib_hash_rtx): Likewise. (cselib_lookup_mem): Infer pmode from address mode. Distinguish address and MEM modes. (cselib_subst_to_values): Add memmode, pass it on. Deal with autoinc. (cselib_lookup): Add memmode argument, pass it on. (cselib_lookup_from_insn): Add memmode. (cselib_invalidate_rtx): Discard obsolete push_operand handling. (struct cselib_record_autoinc_data): New. (cselib_record_autoinc_cb): New fn. (cselib_record_sets): Use it, along with for_each_inc_dec. Pass MEM mode to cselib_lookup. Reset autoinced REGs here instead of... (cselib_process_insn): ... here. * var-tracking.c (replace_expr_with_values, use_type): Pass MEM mode to cselib_lookup. (add_uses): Likewise, also to cselib_subst_to_values. (add_stores): Likewise. * sched-deps.c (add_insn_mem_dependence): Pass mode to cselib_subst_to_values. (sched_analyze_1, sched_analyze_2): Likewise. Adjusted. * gcse.c (do_local_cprop): Adjusted. * postreload.c (reload_cse_simplify_set): Adjusted. (reload_cse_simplify_operands): Adjusted. * sel-sched-dump (debug_mem_addr_value): Pass mode. From-SVN: r169782
2011-02-03 07:04:04 +01:00
}
default:
gcc_unreachable ();
re PR debug/43092 (Wrong debuginfo with VTA and -fomit-frame-pointer/-mno-accumulate-outgoing-args) PR debug/43092 PR rtl-optimization/43494 * rtl.h (for_each_inc_dec_fn): New type. (for_each_inc_dec): Declare. * rtlanal.c (struct for_each_inc_dec_ops): New type. (for_each_inc_dec_find_inc_dec): New fn. (for_each_inc_dec_find_mem): New fn. (for_each_inc_dec): New fn. * dse.c (struct insn_size): Remove. (replace_inc_dec, replace_inc_dec_mem): Remove. (emit_inc_dec_insn_before): New fn. (check_for_inc_dec): Use it, along with for_each_inc_dec. (canon_address): Pass mem modes to cselib_lookup. * cselib.h (cselib_lookup): Add memmode argument. Adjust callers. (cselib_lookup_from_insn): Likewise. (cselib_subst_to_values): Likewise. * cselib.c (find_slot_memmode): New var. (cselib_find_slot): New fn. Use it instead of htab_find_slot_with_hash everywhere. (entry_and_rtx_equal_p): Use find_slot_memmode. (autoinc_split): New fn. (rtx_equal_for_cselib_p): Rename and implement in terms of... (rtx_equal_for_cselib_1): ... this. Take memmode, pass it on. Deal with autoinc. Special-case recursion into MEMs. (cselib_hash_rtx): Likewise. (cselib_lookup_mem): Infer pmode from address mode. Distinguish address and MEM modes. (cselib_subst_to_values): Add memmode, pass it on. Deal with autoinc. (cselib_lookup): Add memmode argument, pass it on. (cselib_lookup_from_insn): Add memmode. (cselib_invalidate_rtx): Discard obsolete push_operand handling. (struct cselib_record_autoinc_data): New. (cselib_record_autoinc_cb): New fn. (cselib_record_sets): Use it, along with for_each_inc_dec. Pass MEM mode to cselib_lookup. Reset autoinced REGs here instead of... (cselib_process_insn): ... here. * var-tracking.c (replace_expr_with_values, use_type): Pass MEM mode to cselib_lookup. (add_uses): Likewise, also to cselib_subst_to_values. (add_stores): Likewise. * sched-deps.c (add_insn_mem_dependence): Pass mode to cselib_subst_to_values. (sched_analyze_1, sched_analyze_2): Likewise. Adjusted. * gcse.c (do_local_cprop): Adjusted. * postreload.c (reload_cse_simplify_set): Adjusted. (reload_cse_simplify_operands): Adjusted. * sel-sched-dump (debug_mem_addr_value): Pass mode. From-SVN: r169782
2011-02-03 07:04:04 +01:00
}
}
/* Traverse *LOC looking for MEMs that have autoinc addresses.
For each such autoinc operation found, call FN, passing it
re PR debug/43092 (Wrong debuginfo with VTA and -fomit-frame-pointer/-mno-accumulate-outgoing-args) PR debug/43092 PR rtl-optimization/43494 * rtl.h (for_each_inc_dec_fn): New type. (for_each_inc_dec): Declare. * rtlanal.c (struct for_each_inc_dec_ops): New type. (for_each_inc_dec_find_inc_dec): New fn. (for_each_inc_dec_find_mem): New fn. (for_each_inc_dec): New fn. * dse.c (struct insn_size): Remove. (replace_inc_dec, replace_inc_dec_mem): Remove. (emit_inc_dec_insn_before): New fn. (check_for_inc_dec): Use it, along with for_each_inc_dec. (canon_address): Pass mem modes to cselib_lookup. * cselib.h (cselib_lookup): Add memmode argument. Adjust callers. (cselib_lookup_from_insn): Likewise. (cselib_subst_to_values): Likewise. * cselib.c (find_slot_memmode): New var. (cselib_find_slot): New fn. Use it instead of htab_find_slot_with_hash everywhere. (entry_and_rtx_equal_p): Use find_slot_memmode. (autoinc_split): New fn. (rtx_equal_for_cselib_p): Rename and implement in terms of... (rtx_equal_for_cselib_1): ... this. Take memmode, pass it on. Deal with autoinc. Special-case recursion into MEMs. (cselib_hash_rtx): Likewise. (cselib_lookup_mem): Infer pmode from address mode. Distinguish address and MEM modes. (cselib_subst_to_values): Add memmode, pass it on. Deal with autoinc. (cselib_lookup): Add memmode argument, pass it on. (cselib_lookup_from_insn): Add memmode. (cselib_invalidate_rtx): Discard obsolete push_operand handling. (struct cselib_record_autoinc_data): New. (cselib_record_autoinc_cb): New fn. (cselib_record_sets): Use it, along with for_each_inc_dec. Pass MEM mode to cselib_lookup. Reset autoinced REGs here instead of... (cselib_process_insn): ... here. * var-tracking.c (replace_expr_with_values, use_type): Pass MEM mode to cselib_lookup. (add_uses): Likewise, also to cselib_subst_to_values. (add_stores): Likewise. * sched-deps.c (add_insn_mem_dependence): Pass mode to cselib_subst_to_values. (sched_analyze_1, sched_analyze_2): Likewise. Adjusted. * gcse.c (do_local_cprop): Adjusted. * postreload.c (reload_cse_simplify_set): Adjusted. (reload_cse_simplify_operands): Adjusted. * sel-sched-dump (debug_mem_addr_value): Pass mode. From-SVN: r169782
2011-02-03 07:04:04 +01:00
the innermost enclosing MEM, the operation itself, the RTX modified
by the operation, two RTXs (the second may be NULL) that, once
added, represent the value to be held by the modified RTX
afterwards, and DATA. FN is to return 0 to continue the
traversal or any other value to have it returned to the caller of
re PR debug/43092 (Wrong debuginfo with VTA and -fomit-frame-pointer/-mno-accumulate-outgoing-args) PR debug/43092 PR rtl-optimization/43494 * rtl.h (for_each_inc_dec_fn): New type. (for_each_inc_dec): Declare. * rtlanal.c (struct for_each_inc_dec_ops): New type. (for_each_inc_dec_find_inc_dec): New fn. (for_each_inc_dec_find_mem): New fn. (for_each_inc_dec): New fn. * dse.c (struct insn_size): Remove. (replace_inc_dec, replace_inc_dec_mem): Remove. (emit_inc_dec_insn_before): New fn. (check_for_inc_dec): Use it, along with for_each_inc_dec. (canon_address): Pass mem modes to cselib_lookup. * cselib.h (cselib_lookup): Add memmode argument. Adjust callers. (cselib_lookup_from_insn): Likewise. (cselib_subst_to_values): Likewise. * cselib.c (find_slot_memmode): New var. (cselib_find_slot): New fn. Use it instead of htab_find_slot_with_hash everywhere. (entry_and_rtx_equal_p): Use find_slot_memmode. (autoinc_split): New fn. (rtx_equal_for_cselib_p): Rename and implement in terms of... (rtx_equal_for_cselib_1): ... this. Take memmode, pass it on. Deal with autoinc. Special-case recursion into MEMs. (cselib_hash_rtx): Likewise. (cselib_lookup_mem): Infer pmode from address mode. Distinguish address and MEM modes. (cselib_subst_to_values): Add memmode, pass it on. Deal with autoinc. (cselib_lookup): Add memmode argument, pass it on. (cselib_lookup_from_insn): Add memmode. (cselib_invalidate_rtx): Discard obsolete push_operand handling. (struct cselib_record_autoinc_data): New. (cselib_record_autoinc_cb): New fn. (cselib_record_sets): Use it, along with for_each_inc_dec. Pass MEM mode to cselib_lookup. Reset autoinced REGs here instead of... (cselib_process_insn): ... here. * var-tracking.c (replace_expr_with_values, use_type): Pass MEM mode to cselib_lookup. (add_uses): Likewise, also to cselib_subst_to_values. (add_stores): Likewise. * sched-deps.c (add_insn_mem_dependence): Pass mode to cselib_subst_to_values. (sched_analyze_1, sched_analyze_2): Likewise. Adjusted. * gcse.c (do_local_cprop): Adjusted. * postreload.c (reload_cse_simplify_set): Adjusted. (reload_cse_simplify_operands): Adjusted. * sel-sched-dump (debug_mem_addr_value): Pass mode. From-SVN: r169782
2011-02-03 07:04:04 +01:00
for_each_inc_dec. */
int
for_each_inc_dec (rtx x,
re PR debug/43092 (Wrong debuginfo with VTA and -fomit-frame-pointer/-mno-accumulate-outgoing-args) PR debug/43092 PR rtl-optimization/43494 * rtl.h (for_each_inc_dec_fn): New type. (for_each_inc_dec): Declare. * rtlanal.c (struct for_each_inc_dec_ops): New type. (for_each_inc_dec_find_inc_dec): New fn. (for_each_inc_dec_find_mem): New fn. (for_each_inc_dec): New fn. * dse.c (struct insn_size): Remove. (replace_inc_dec, replace_inc_dec_mem): Remove. (emit_inc_dec_insn_before): New fn. (check_for_inc_dec): Use it, along with for_each_inc_dec. (canon_address): Pass mem modes to cselib_lookup. * cselib.h (cselib_lookup): Add memmode argument. Adjust callers. (cselib_lookup_from_insn): Likewise. (cselib_subst_to_values): Likewise. * cselib.c (find_slot_memmode): New var. (cselib_find_slot): New fn. Use it instead of htab_find_slot_with_hash everywhere. (entry_and_rtx_equal_p): Use find_slot_memmode. (autoinc_split): New fn. (rtx_equal_for_cselib_p): Rename and implement in terms of... (rtx_equal_for_cselib_1): ... this. Take memmode, pass it on. Deal with autoinc. Special-case recursion into MEMs. (cselib_hash_rtx): Likewise. (cselib_lookup_mem): Infer pmode from address mode. Distinguish address and MEM modes. (cselib_subst_to_values): Add memmode, pass it on. Deal with autoinc. (cselib_lookup): Add memmode argument, pass it on. (cselib_lookup_from_insn): Add memmode. (cselib_invalidate_rtx): Discard obsolete push_operand handling. (struct cselib_record_autoinc_data): New. (cselib_record_autoinc_cb): New fn. (cselib_record_sets): Use it, along with for_each_inc_dec. Pass MEM mode to cselib_lookup. Reset autoinced REGs here instead of... (cselib_process_insn): ... here. * var-tracking.c (replace_expr_with_values, use_type): Pass MEM mode to cselib_lookup. (add_uses): Likewise, also to cselib_subst_to_values. (add_stores): Likewise. * sched-deps.c (add_insn_mem_dependence): Pass mode to cselib_subst_to_values. (sched_analyze_1, sched_analyze_2): Likewise. Adjusted. * gcse.c (do_local_cprop): Adjusted. * postreload.c (reload_cse_simplify_set): Adjusted. (reload_cse_simplify_operands): Adjusted. * sel-sched-dump (debug_mem_addr_value): Pass mode. From-SVN: r169782
2011-02-03 07:04:04 +01:00
for_each_inc_dec_fn fn,
void *data)
re PR debug/43092 (Wrong debuginfo with VTA and -fomit-frame-pointer/-mno-accumulate-outgoing-args) PR debug/43092 PR rtl-optimization/43494 * rtl.h (for_each_inc_dec_fn): New type. (for_each_inc_dec): Declare. * rtlanal.c (struct for_each_inc_dec_ops): New type. (for_each_inc_dec_find_inc_dec): New fn. (for_each_inc_dec_find_mem): New fn. (for_each_inc_dec): New fn. * dse.c (struct insn_size): Remove. (replace_inc_dec, replace_inc_dec_mem): Remove. (emit_inc_dec_insn_before): New fn. (check_for_inc_dec): Use it, along with for_each_inc_dec. (canon_address): Pass mem modes to cselib_lookup. * cselib.h (cselib_lookup): Add memmode argument. Adjust callers. (cselib_lookup_from_insn): Likewise. (cselib_subst_to_values): Likewise. * cselib.c (find_slot_memmode): New var. (cselib_find_slot): New fn. Use it instead of htab_find_slot_with_hash everywhere. (entry_and_rtx_equal_p): Use find_slot_memmode. (autoinc_split): New fn. (rtx_equal_for_cselib_p): Rename and implement in terms of... (rtx_equal_for_cselib_1): ... this. Take memmode, pass it on. Deal with autoinc. Special-case recursion into MEMs. (cselib_hash_rtx): Likewise. (cselib_lookup_mem): Infer pmode from address mode. Distinguish address and MEM modes. (cselib_subst_to_values): Add memmode, pass it on. Deal with autoinc. (cselib_lookup): Add memmode argument, pass it on. (cselib_lookup_from_insn): Add memmode. (cselib_invalidate_rtx): Discard obsolete push_operand handling. (struct cselib_record_autoinc_data): New. (cselib_record_autoinc_cb): New fn. (cselib_record_sets): Use it, along with for_each_inc_dec. Pass MEM mode to cselib_lookup. Reset autoinced REGs here instead of... (cselib_process_insn): ... here. * var-tracking.c (replace_expr_with_values, use_type): Pass MEM mode to cselib_lookup. (add_uses): Likewise, also to cselib_subst_to_values. (add_stores): Likewise. * sched-deps.c (add_insn_mem_dependence): Pass mode to cselib_subst_to_values. (sched_analyze_1, sched_analyze_2): Likewise. Adjusted. * gcse.c (do_local_cprop): Adjusted. * postreload.c (reload_cse_simplify_set): Adjusted. (reload_cse_simplify_operands): Adjusted. * sel-sched-dump (debug_mem_addr_value): Pass mode. From-SVN: r169782
2011-02-03 07:04:04 +01:00
{
subrtx_var_iterator::array_type array;
FOR_EACH_SUBRTX_VAR (iter, array, x, NONCONST)
{
rtx mem = *iter;
if (mem
&& MEM_P (mem)
&& GET_RTX_CLASS (GET_CODE (XEXP (mem, 0))) == RTX_AUTOINC)
{
int res = for_each_inc_dec_find_inc_dec (mem, fn, data);
if (res != 0)
return res;
iter.skip_subrtxes ();
}
}
return 0;
re PR debug/43092 (Wrong debuginfo with VTA and -fomit-frame-pointer/-mno-accumulate-outgoing-args) PR debug/43092 PR rtl-optimization/43494 * rtl.h (for_each_inc_dec_fn): New type. (for_each_inc_dec): Declare. * rtlanal.c (struct for_each_inc_dec_ops): New type. (for_each_inc_dec_find_inc_dec): New fn. (for_each_inc_dec_find_mem): New fn. (for_each_inc_dec): New fn. * dse.c (struct insn_size): Remove. (replace_inc_dec, replace_inc_dec_mem): Remove. (emit_inc_dec_insn_before): New fn. (check_for_inc_dec): Use it, along with for_each_inc_dec. (canon_address): Pass mem modes to cselib_lookup. * cselib.h (cselib_lookup): Add memmode argument. Adjust callers. (cselib_lookup_from_insn): Likewise. (cselib_subst_to_values): Likewise. * cselib.c (find_slot_memmode): New var. (cselib_find_slot): New fn. Use it instead of htab_find_slot_with_hash everywhere. (entry_and_rtx_equal_p): Use find_slot_memmode. (autoinc_split): New fn. (rtx_equal_for_cselib_p): Rename and implement in terms of... (rtx_equal_for_cselib_1): ... this. Take memmode, pass it on. Deal with autoinc. Special-case recursion into MEMs. (cselib_hash_rtx): Likewise. (cselib_lookup_mem): Infer pmode from address mode. Distinguish address and MEM modes. (cselib_subst_to_values): Add memmode, pass it on. Deal with autoinc. (cselib_lookup): Add memmode argument, pass it on. (cselib_lookup_from_insn): Add memmode. (cselib_invalidate_rtx): Discard obsolete push_operand handling. (struct cselib_record_autoinc_data): New. (cselib_record_autoinc_cb): New fn. (cselib_record_sets): Use it, along with for_each_inc_dec. Pass MEM mode to cselib_lookup. Reset autoinced REGs here instead of... (cselib_process_insn): ... here. * var-tracking.c (replace_expr_with_values, use_type): Pass MEM mode to cselib_lookup. (add_uses): Likewise, also to cselib_subst_to_values. (add_stores): Likewise. * sched-deps.c (add_insn_mem_dependence): Pass mode to cselib_subst_to_values. (sched_analyze_1, sched_analyze_2): Likewise. Adjusted. * gcse.c (do_local_cprop): Adjusted. * postreload.c (reload_cse_simplify_set): Adjusted. (reload_cse_simplify_operands): Adjusted. * sel-sched-dump (debug_mem_addr_value): Pass mode. From-SVN: r169782
2011-02-03 07:04:04 +01:00
}
/* Searches X for any reference to REGNO, returning the rtx of the
reference found if any. Otherwise, returns NULL_RTX. */
rtx
regno_use_in (unsigned int regno, rtx x)
{
alias.c: Remove uses of "register" specifier in declarations of arguments and local... 2001-10-10 Stan Shebs <shebs@apple.com> * alias.c: Remove uses of "register" specifier in declarations of arguments and local variables. * c-common.c: Ditto. * c-convert.c: Ditto. * c-decl.c: Ditto. * c-format.c: Ditto. * c-semantics.c: Ditto. * c-typeck.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfg.c: Ditto. * cfgbuild.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * combine.c: Ditto. * convert.c: Ditto. * cppexp.c: Ditto. * cppfiles.c: Ditto. * cse.c: Ditto. * dbxout.c: Ditto. * defaults.h: Ditto. * df.c: Ditto. * dwarf2out.c: Ditto. * dwarfout.c: Ditto. * emit-rtl.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * fix-header.c: Ditto. * floatlib.c: Ditto. * flow.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * gcc.c: Ditto. * gcse.c: Ditto. * gen-protos.c: Ditto. * genattrtab.c: Ditto. * gencheck.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * gengenrtl.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * gensupport.c: Ditto. * global.c: Ditto. * gmon.c: Ditto. * graph.c: Ditto. * haifa-sched.c: Ditto. * hard-reg-set.h: Ditto. * hash.c: Ditto. * integrate.c: Ditto. * jump.c: Ditto. * lists.c: Ditto. * local-alloc.c: Ditto. * loop.c: Ditto. * mips-tdump.c: Ditto. * mips-tfile.c: Ditto. * optabs.c: Ditto. * prefix.c: Ditto. * print-rtl.c: Ditto. * read-rtl.c: Ditto. * real.c: Ditto. * recog.c: Ditto. * reg-stack.c: Ditto. * regclass.c: Ditto. * regmove.c: Ditto. * reload.c: Ditto. * reload1.c: Ditto. * reorg.c: Ditto. * resource.c: Ditto. * rtl.c: Ditto. * rtlanal.c: Ditto. * scan.c: Ditto. * sched-deps.c: Ditto. * sched-rgn.c: Ditto. * sdbout.c: Ditto. * simplify-rtx.c: Ditto. * stmt.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tradcif.y: Ditto. * tradcpp.c: Ditto. * tree.c: Ditto. * unroll.c: Ditto. * varasm.c: Ditto. * xcoffout.c: Ditto. From-SVN: r46173
2001-10-11 05:16:15 +02:00
const char *fmt;
int i, j;
rtx tem;
alias.c (record_set, [...]): Use REG_P. 2004-06-15 Jerry Quinn <jlquinn@optonline.net> * alias.c (record_set, record_base_value, canon_rtx, get_addr, nonlocal_mentioned_p_1, init_alias_analysis): Use REG_P. * bt-load.c (find_btr_reference, insn_sets_btr_p, note_btr_set): Likewise. * builtins.c (expand_builtin_setjmp, expand_builtin_apply, expand_builtin_mathfn, expand_builtin_strlen, expand_builtin_memcmp, expand_builtin_strcmp, expand_builtin_strncmp, expand_builtin_frame_address): Likewise. * caller-save.c (mark_set_regs, add_stored_regs, mark_referenced_regs, insert_one_insn): Likewise. * calls.c (prepare_call_address, precompute_register_parameters, precompute_arguments, expand_call, emit_library_call_value_1): Likewise. * cfganal.c (flow_active_insn_p): Likewise. * combine.c (set_nonzero_bits_and_sign_copies, can_combine_p, combinable_i3pat, try_combine, find_split_point, COMBINE_RTX_EQUAL_P, subst, combine_simplify_rtx, simplify_if_then_else, simplify_set, make_extraction, recog_for_combine, gen_lowpart_for_combine, simplify_comparison, record_dead_and_set_regs_1, record_dead_and_set_regs, record_promoted_value, check_promoted_subreg, get_last_value_validate, get_last_value, reg_dead_at_p_1, reg_bitfield_target_p, distribute_notes, unmentioned_reg_p_1): Likewise. * conflict.c (mark_reg): Likewise. * cse.c (HASH, COST, COST_IN, approx_reg_cost_1, notreg_cost, mention_regs, insert_regs, lookup, lookup_for_remove, insert, merge_equiv_classes, flush_hash_table, invalidate, remove_invalid_refs, remove_invalid_subreg_refs, rehash_using_reg, invalidate_for_call, use_related_value, canon_hash, exp_equiv_p, cse_rtx_varies_p, canon_reg, find_best_addr, fold_rtx, equiv_constant, record_jump_cond, cse_insn, addr_affects_sp_p, invalidate_from_clobbers, cse_process_notes, cse_around_loop, cse_set_around_loop, count_reg_usage, set_live_p, cse_change_cc_mode, cse_cc_succs, cse_condition_code_reg): Likewise. * cselib.c (cselib_reg_set_mode, rtx_equal_for_cselib_p, cselib_lookup, cselib_invalidate_regno, cselib_invalidate_rtx, cselib_record_set, cselib_record_sets): Likewise. * dbxout.c (dbxout_symbol_location, dbxout_parms, dbxout_reg_parms, dbxout_block): Likewise. * df.c (df_ref_record, df_def_record_1, df_uses_record): Likewise. * dojump.c (do_jump): Likewise. * dwarf2out.c (dwarf2out_frame_debug_expr, is_pseudo_reg, is_based_loc, rtl_for_decl_location): Likewise. * emit-rtl.c (set_reg_attrs_for_parm, set_decl_rtl, set_decl_incoming_rtl, mark_user_reg): Likewise. * explow.c (copy_all_regs, copy_all_regs, memory_address, force_reg, copy_to_suggested_reg, allocate_dynamic_stack_space, probe_stack_range, hard_function_value): Likewise. * expmed.c (store_bit_field, store_fixed_bit_field, store_split_bit_field, extract_bit_field, extract_fixed_bit_field, extract_split_bit_field, expand_divmod, emit_store_flag_force): Likewise. * expr.c (convert_move, convert_modes, block_move_libcall_safe_for_call_parm, emit_group_load, use_reg, use_group_regs, emit_move_insn, emit_move_insn_1, compress_float_constant, push_block, emit_single_push_insn, emit_push_insn, get_subtarget, expand_assignment, store_expr, store_constructor, store_field, force_operand, safe_from_p, expand_expr_real_1, expand_increment, do_store_flag, do_tablejump): Likewise. * final.c (profile_function, final_scan_insn, alter_subreg, get_mem_expr_from_op, output_asm_operand_names, output_operand, only_leaf_regs_used, leaf_renumber_regs_insn): Likewise. * flow.c (verify_wide_reg_1, mark_regs_live_at_end, find_regno_partial, propagate_one_insn, init_propagate_block_info, insn_dead_p, libcall_dead_p, mark_set_1, not_reg_cond, attempt_auto_inc, find_auto_inc, mark_used_regs, count_or_remove_death_notes_bb): Likewise. * function.c (find_temp_slot_from_address, update_temp_slot_address, preserve_temp_slots, put_var_into_stack, fixup_var_refs_insn, fixup_var_refs_1, fixup_stack_1, optimize_bit_field, flush_addressof, put_addressof_into_stack, purge_addressof_1, insns_for_mem_walk, purge_single_hard_subreg_set, instantiate_decl, instantiate_virtual_regs_1, aggregate_value_p, assign_parms, promoted_input_arg, setjmp_vars_warning, setjmp_args_warning, setjmp_protect, setjmp_protect_args, fix_lexical_addr, expand_function_start, diddle_return_value, clobber_return_register, expand_function_end, keep_stack_depressed, handle_epilogue_set, update_epilogue_consts): Likewise. * genemit.c (gen_exp, gen_insn): Likewise. * genrecog.c (make_insn_sequence): Likewise. * global.c (global_conflicts, expand_preferences, mark_reg_store, mark_reg_conflicts, set_preference, reg_becomes_live, build_insn_chain, mark_reg_change): Likewise. * haifa_sched.c (CONST_BASED_ADDRESS_P, find_set_reg_weight): Likewise. * ifcvt.c (noce_try_abs, noce_get_condition, noce_process_if_block): Likewise. * integrate.c (copy_rtx_and_substitute, try_constants, subst_constants, mark_stores, allocate_initial_values): Likewise. * jump.c (reversed_comparison_code_parts, delete_prior_computation, delete_computation, rtx_renumbered_equal_p, true_regnum, reg_or_subregno): Likewise. * lcm.c (reg_dies, reg_becomes_live): Likewise. * local-alloc.c (validate_equiv_mem_from_store, validate_equiv_mem, update_equiv_regs, no_equiv, block_alloc, combine_regs, reg_is_set, wipe_dead_reg, no_conflict_p): Likewise. * loop-iv.c (simple_reg_p, simple_set_p, kill_sets, iv_get_reaching_def, iv_analyze_biv, altered_reg_used, mark_altered, simple_rhs_p, simplify_using_assignment, implies_p): Likewise. * loop.c (scan_loop, combine_movables, rtx_equal_for_loop_p, move_movables, note_set_pseudo_multiple_uses, consec_sets_invariant_p, find_single_use_in_loop, count_one_set, loop_bivs_init_find, loop_givs_rescan, check_insn_for_bivs, check_insn_for_givs, valid_initial_value_p, simplify_giv_expr, consec_sets_giv, loop_regs_update, check_dbra_loop, maybe_eliminate_biv, maybe_eliminate_biv_1, record_initial, update_reg_last_use, canonicalize_condition, loop_regs_scan, load_mems, try_copy_prop, try_swap_copy_prop): Likewise. * optabs.c (expand_binop, expand_vector_binop, expand_vector_unop, expand_abs, emit_no_conflict_block, emit_libcall_block, expand_float): Likewise. * postreload.c (reload_cse_simplify, reload_cse_simplify_set, reload_cse_simplify_operands, reload_combine, reload_combine_note_store, reload_combine_note_use, reload_cse_move2add, move2add_note_store): Likewise. * print-rtl.c (print_rtx): Likewise. * ra-build.c (copy_insn_p, remember_move, init_one_web_common, contains_pseudo, handle_asm_insn): Likewise. * ra-debug.c (ra_print_rtx_object, dump_constraints, dump_static_insn_cost): Likewise. * ra-rewrite.c (slots_overlap_p, emit_colors, remove_suspicious_death_notes): Likewise. * recog.c (validate_replace_rtx_1, find_single_use_1, find_single_use, register_operand, scratch_operand, nonmemory_operand, constrain_operands): Likewise. * reg-stack (check_asm_stack_operands, remove_regno_note, emit_swap_insn, swap_rtx_condition, subst_stack_regs_pat, subst_asm_stack_regs): Likewise. * regclass.c (scan_one_insn, record_reg_classes, copy_cost, record_address_regs, reg_scan_mark_refs): Likewise. * regmove.c (discover_flags_reg, replacement_quality, copy_src_to_dest, reg_is_remote_constant_p, regmove_optimize, fixup_match_1): Likewise. * regrename.c (note_sets, clear_dead_regs, build_def_use, kill_value, kill_set_value, copyprop_hardreg_forward_1): Likewise. * reload.c (MATCHES, push_secondary_reload, find_reusable_reload, reload_inner_reg_of_subreg, can_reload_into, push_reload, combine_reloads, find_dummy_reload, hard_reg_set_here_p, operands_match_p, decompose, find_reloads, find_reloads_toplev, find_reloads_address, subst_indexed_address, find_reloads_address_1, find_reloads_subreg_address, find_replacement, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p, find_equiv_reg, regno_clobbered_p): Likewise. * reload1.c (replace_pseudos_in, reload, calculate_needs_all_insns, find_reg, delete_dead_insn, alter_reg, eliminate_regs, elimination_effects, eliminate_regs_in_insn, scan_paradoxical_subregs, forget_old_reloads_1, reload_reg_free_for_value_p, choose_reload_regs, emit_input_reload_insns, emit_output_reload_insns, do_input_reload, do_output_reload, emit_reload_insns, gen_reload, delete_address_reloads_1, inc_for_reload): Likewise. * reorg.c (update_reg_dead_notes, fix_reg_dead_note, update_reg_unused_notes, fill_slots_from_thread): Likewise. * resource.c (update_live_status, mark_referenced_resources, mark_set_resources, mark_target_live_regs): Likewise. * rtlanal.c (nonzero_address_p, get_jump_table_offset, global_reg_mentioned_p_1, reg_mentioned_p, reg_referenced_p, reg_set_p, set_noop_p, find_last_value, refers_to_regno_p, note_stores, dead_or_set_p, dead_or_set_regno_p, find_regno_note, find_reg_fusage, find_regno_fusage, replace_regs, regno_use_in, parms_set, find_first_parameter_load, keep_with_call_p, hoist_test_store, hoist_update_store, address_cost, nonzero_bits1, num_sign_bit_copies1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sched-deps.c (deps_may_trap_p, sched_analyze_1, sched_analyze_insn, sched_analyze): Likewise. * sched-rgn.c (check_live_1, update_live_1, sets_likely_spilled_1): Likewise. * sdbout.c (sdbout_symbol, sdbout_parms, sdbout_reg_parms): Likewise. * simplify-rtx.c (simplify_replace_rtx, simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_subreg): Likewise. * stmt.c (decl_conflicts_with_clobbers_p, expand_asm_operands, expand_end_stmt_expr, expand_return, expand_decl, expand_anon_union_decl): Likewise. * unroll.c (precondition_loop_p, calculate_giv_inc, copy_loop_body, find_splittable_regs, find_splittable_givs, find_common_reg_term, loop_iterations): Likewise. * var-tracking.c (variable_union, variable_part_different_p, variable_different_p, count_uses, add_uses, add_stores, compute_bb_dataflow, set_variable_part, delete_variable_part, emit_notes_in_bb, vt_get_decl_and_offset, vt_add_function_parameters): Likewise. * varasm.c (assemble_variable): Likewise. From-SVN: r83195
2004-06-15 20:02:40 +02:00
if (REG_P (x) && REGNO (x) == regno)
return x;
fmt = GET_RTX_FORMAT (GET_CODE (x));
for (i = GET_RTX_LENGTH (GET_CODE (x)) - 1; i >= 0; i--)
{
if (fmt[i] == 'e')
{
if ((tem = regno_use_in (regno, XEXP (x, i))))
return tem;
}
else if (fmt[i] == 'E')
for (j = XVECLEN (x, i) - 1; j >= 0; j--)
if ((tem = regno_use_in (regno , XVECEXP (x, i, j))))
return tem;
}
return NULL_RTX;
}
/* Return a value indicating whether OP, an operand of a commutative
operation, is preferred as the first or second operand. The higher
the value, the stronger the preference for being the first operand.
We use negative values to indicate a preference for the first operand
and positive values for the second operand. */
int
commutative_operand_precedence (rtx op)
{
enum rtx_code code = GET_CODE (op);
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
/* Constants always come the second operand. Prefer "nice" constants. */
if (code == CONST_INT)
return -8;
2014-05-06 18:25:05 +02:00
if (code == CONST_WIDE_INT)
return -8;
if (code == CONST_DOUBLE)
return -7;
rtl.c (rtx_code_size): Check CONST_FIXED to calcualte correct sizes in DEF_RTL_EXPR. * rtl.c (rtx_code_size): Check CONST_FIXED to calcualte correct sizes in DEF_RTL_EXPR. (copy_rtx): Handle CONST_FIXED. (rtx_equal_p): Likewise. * rtl.h (fixed_value.h): New include. (rtx_def): Add a new field of fixed_value to u. (XCNMPFV): Define for accessing fixed_value. (CONST_FIXED_VALUE, CONST_FIXED_VALUE_HIGH, CONST_FIXED_VALUE_LOW): Define. * rtl.def (CONST_FIXED): New constant. (SS_MULT, US_MULT, SS_DIV, US_DIV, FRACT_CONVERT, UNSIGNED_FRACT_CONVERT, SAT_FRACT, UNSIGNED_SAT_FRACT, US_NEG, US_ASHIFT): New codes. * doc/rtl.texi (Expressions): Document const_fixed, us_neg, ss_mult, us_mult, ss_div, us_div, us_ashift, fract_convert, sat_fract, unsigned_fract_convert, unsigned_sat_fract): Document them. * varasm.c (assemble_integer): Extend to support fixed-point constants by using different machine classes. (decode_addr_const): Handle FIXED_CST. (const_hash_1): Likewise. (compare_constant): Likewise. (copy_constant): Likewise. (const_rtx_hash_1): Handle CONST_FIXED. (output_constant_pool_2): Handle MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM, MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM. (initializer_constant_valid_p): Handle FIXED_CST. (output_constant): Support FIXED_POINT_TYPE. * gengenrtl.c (excluded_rtx): Check CONST_FIXED to exclude. * cse.c (hash_rtx): Support CONST_FIXED. (exp_equiv_p): Likewise. (cannon_reg): Likewise. (fold_rtx): Likewise. (equiv_constant): Likewise. (cse_process_notes_1): Likewise. (count_reg_usage): Likewise. * cselib.c (entry_and_rtx_equal_p): Check CONST_FIXED. (rtx_equal_for_cselib_p): Handle CONST_FIXED. (wrap_constant): Check CONST_FIXED. (cselib_hash_rtx): Support CONST_FIXED. (cselib_subst_to_values): Likewise. * df-scan.c (df_uses_record): Likewise. * gcse.c (want_to_gcse_p): Likewise. (oprs_unchanged_p): Likewise. (oprs_not_set_p): Likewise. (compute_transp): Likewise. (extract_mentioned_regs_helper): Likewise. * genemit.c (gen_exp): Likewise. * local-alloc.c (equiv_init_varies_p): Likewise. (contains_replace_regs): Likewise. (memref_referenced_p): Likewise. * loop-invariant.c (check_maybe_invariant): Likewise. (hash_invariant_expr_1): Likewise. (invariant_expr_equal_p): Likewise. * postreload-gcse.c (oprs_unchanged_p): Likewise. * regclass.c (reg_scan_mark_refs): Likewise. * regrename.c (scan_rtx): Likewise. * resource.c (mark_referenced_resources): Likewise. (mark_set_resources): Likewise. * rtlanal.c (rtx_unstable_p): Likewise. (rtx_varies_p): Likewise. (count_occurrences): Likewise. (reg_mentioned_p): Likewise. (modified_between_p): Likewise. (modified_in_p): Likewise. (volatile_insn_p): Likewise. (volatile_refs_p): Likewise. (side_effects_p): Likewise. (may_trap_p_1): Likewise. (inequality_comparisons_p): Likewise. (computed_jump_p_1): Likewise. (commutative_operand_precedence): Likewise. * sched-deps.c (sched_analyze_2): Likewise. * sched-vis.c (print_value): Likewise. * reload.c (operands_match_p): Likewise. (subst_reg_equivs): Likewise. * reload1.c (eliminate_regs_1): Likewise. (elimination_effects): Likewise. (scan_paradoxical_subregs): Likewise. * alias.c (rtx_equal_for_memref_p): Likewise. * Makefile.in (RTL_BASE_H): Add fixed-value.h. * emit-rtl.c (const_fixed_htab): New hash table. (const_fixed_htab_hash, const_fixed_htab_eq, lookup_const_fixed): Declare. (const_fixed_htab_hash, const_fixed_htab_eq, lookup_const_fixed, const_fixed_from_fixed_value): New functions. (verify_rtx_sharing): Handle CONST_FIXED. (copy_rtx_if_shared_1): Likewise. (reset_used_flags): Likewise. (set_used_flags): Likewise. (copy_insn_1): Likewise. (init_emit_once): Create const_fixed_htab. Store fixed-point scalar and vector zero and one to const_tiny_rtx. From-SVN: r127725
2007-08-23 02:30:39 +02:00
if (code == CONST_FIXED)
return -7;
op = avoid_constant_pool_reference (op);
code = GET_CODE (op);
alias.c (rtx_equal_for_memref_p): Use predicates to test rtx classes and new rtx class codes... 2004-02-07 Paolo Bonzini <bonzini@gnu.org> * alias.c (rtx_equal_for_memref_p): Use predicates to test rtx classes and new rtx class codes, possibly splitting conditionals that tested against '<' and 'o'. * caller-save.c (save_call_clobbered_regs): Likewise. * combine.c (contains_muldiv, find_split_point, subst, combine_simplify_rtx, simplify_if_then_else, simplify_set, simplify_logical, expand_compound_operation, make_compound_operation, if_then_else_cond, known_cond, apply_distributive_law, cached_nonzero_bits, cached_num_sign_bit_copies, simplify_shift_const, gen_binary, simplify_comparison, update_table_tick, record_value_for_reg, get_lsat_value_validate): Likewise. * cse.c (mention_regs, find_best_addr, find_comparison_args, fold_rtx, cse_insn, invalidate_memory, cse_basic_block): Likewise. * emit-rtl.c (copy_insn_1): Likewise. * expr.c (force_operand): Likewise. * final.c (final_scan_insn, get_mem_expr_from_op): Likewise. * flow.c (notice_stack_pointer_modification_1, invalidate_mems_from_autoinc, ior_reg_cond, not_reg_cond, and_reg_cond, elim_reg_cond): Likewise. * function.c (update_epilogue_consts): Likewise. * genattrtab.c (attr_rtx_1): Likewise. * genopinit.c (gen_insn): Likewise. * integrate.c (subst_constants): Likewise. * jump.c (reversed_comparison_code_parts, reversed_comparison_code, delete_related_insns, rtx_renumbered_equal_p): Likewise. * local-alloc.c (block_alloc): Likewise. * loop.c (rtx_equal_for_prefetch_p, maybe_eliminate_biv, canonicalize_condition): Likewise. * loop-iv.c (simplify_using_conditions, iv_number_of_iterations): Likewise. * optabs.c (add_equal_node, expand_binop): Likewise. * predict.c (estimate_probability): Likewise. * ra-debug.c (ra_print_rtx_2op, ra_print_rtx): Likewise. * recog.c (validate_replace_rtx_1, comparison_operator, offsettable_address_p, constrain_operands): Likewise. * reg-stack.c (swap_rtx_condition_1, subst_stack_regs_pat): Likewise. * regclass.c (scan_one_insn): Likewise. * regmove.c (stable_and_no_regs_but_for_p): Likewise. * regrename.c (kill_autoinc_value): Likewise. * reload.c (find_reusable_reload, find_reloads, reg_overlap_mentioned_for_reload_p): Likewise. * reload1.c (gen_reload, delete_address_reloads_1): Likewise. * rtl.c (copy_rtx): Likewise. * rtl.h (CONSTANT_P, INSN_P): Likewise. * rtlanal.c (commutative_operand_precedence): Likewise. * sched-deps.c (conditions_mutex_p): Likewise. * sched-rgn.c (is_cfg_nonregular): Likewise. * simplify-rtx.c (simplify_gen_binary, simplify_gen_relational, simplify_replace_rtx, simplify_unary_operation, simplify_binary_operation, simplify_ternary_operation, simplify_rtx): Likewise. * unroll.c (reg_dead_after_loop): Likewise. * config/alpha/alpha.c (alpha_swapped_comparison_operator, print_operand): Likewise. * config/arc/arc.c (proper_comparison_operator): Likewise. * config/arm/arm.c (arm_arm_address_cost, arm_select_cc_mode): Likewise. * config/avr/avr.c (_reg_unused_after): Likewise. * config/frv/frv.c (frv_ifcvt_modify_tests, frv_ifcvt_modify_insn, frv_pack_insn): Likewise. * config/i386/i386.c (ix86_comparison_operator, ix86_carry_flag_operator, fcmov_comparison_operator, arith_or_logical_operator, print_operand, ix86_expand_binary_operator, ix86_binary_operator_ok): Likewise. * config/i386/i386.md: Likewise. * config/ia64/ia64.c (not_postinc_memory_operand, ia64_print_operand, update_set_flags, errata_emit_nops): Likewise. * config/ia64/ia64.h (PREFERRED_RELOAD_CLASS, CONSTRAINT_OK_FOR_S): Likewise. * config/ip2k/ip2k.c (mdr_resequence_xy_yx, mdr_try_move_dp_reload, ip2k_check_can_adjust_stack_ref, ip2k_xexp_not_uses_reg_for_mem, ip2k_xexp_not_uses_reg_p, ip2k_composite_xexp_not_uses_reg_p, ip2k_unary_operator): Likewise. * config/iq2000/iq2000.c (cmp_op, symbolic_expression_p, eqne_comparison_operator, signed_comparison_operator): Likewise. * config/mips/mips.c (cmp_op, symbolic_expression_p): Likewise. * config/mmix/mmix (mmix_foldable_comparison_operator, mmix_comparison_operator): Likewise. * config/pa/pa.c (hppa_legitimize_address): Likewise. * config/rs6000/rs6000.c (stmw_operation, branch_comparison_operator, trap_comparison_operator, ccr_bit): Likewise. * config/rs6000/rs6000.h (SELECT_CC_MODE): Likewise. * config/s390/s390.c (s390_alc_comparison, s390_slb_comparison):L Likewise. * config/sh/sh.c (gen_block_redirect, reg_unused_after): Likewise. * config/sparc/sparc.c (eq_or_neq, normal_comp_operator, noov_compare_op, noov_compare64_op, v9_regcmp_op, emit_hard_tfmode_operation, reg_unused_after) * doc/md.texi, doc/rtl.texi: Likewise. * ra-debug.c: Add 2004 to list of copyright years. * unroll.c: Likewise. * combine.c (simplify_logical): Remove dummy test, (apply_distributive_law): Fix typo in comment. GET_CODE (x) == AND so x is a commutative binary op. * jump.c (delete_related_insns): simplify loop condition, move testing of RTX codes inside the loop. (rtx_renumbered_equal_p): do not use RTX_CODE. * rtl.c (rtx_class): Declare as enum rtx_class. * rtl.def (EQ, NE, UNEQ, LTGT, UNORDERED, ORDERED): Move to RTX_COMM_COMPARE class. (HIGH, SYMBOL_REF, LABEL_REF, CONST, CONST_INT, CONST_DOUBLE): Move to RTX_CONST_OBJ class. * rtl.h (enum rtx_class): New declaration, (RTX_OBJ_MASK, RTX_OBJ_RESULT, RTX_COMPARE_MASK, RTX_COMPARE_RESULT, RTX_ARITHMETIC_MASK, RTX_ARITHMETIC_RESULT, RTX_BINARY_MASK, RTX_BINARY_RESULT, RTX_COMMUTATIVE_MASK, RTX_COMMUTATIVE_RESULT, RTX_NON_COMMUTATIVE_RESULT, RTX_EXPR_FIRST, RTX_EXPR_LAST, UNARY_P, BINARY_P, ARITHMETIC_P, COMMUTATIVE_ARITHMETIC_P, COMPARISON_P, SWAPPABLE_OPERANDS_P, NON_COMMUTATIVE_P, COMMUTATIVE_P, OBJECT_P): New macros. * config/sparc/sparc.c (noov_compare_op): Remove register from parameter. From-SVN: r78824
2004-03-03 09:35:33 +01:00
switch (GET_RTX_CLASS (code))
{
case RTX_CONST_OBJ:
if (code == CONST_INT)
return -6;
2014-05-06 18:25:05 +02:00
if (code == CONST_WIDE_INT)
return -6;
alias.c (rtx_equal_for_memref_p): Use predicates to test rtx classes and new rtx class codes... 2004-02-07 Paolo Bonzini <bonzini@gnu.org> * alias.c (rtx_equal_for_memref_p): Use predicates to test rtx classes and new rtx class codes, possibly splitting conditionals that tested against '<' and 'o'. * caller-save.c (save_call_clobbered_regs): Likewise. * combine.c (contains_muldiv, find_split_point, subst, combine_simplify_rtx, simplify_if_then_else, simplify_set, simplify_logical, expand_compound_operation, make_compound_operation, if_then_else_cond, known_cond, apply_distributive_law, cached_nonzero_bits, cached_num_sign_bit_copies, simplify_shift_const, gen_binary, simplify_comparison, update_table_tick, record_value_for_reg, get_lsat_value_validate): Likewise. * cse.c (mention_regs, find_best_addr, find_comparison_args, fold_rtx, cse_insn, invalidate_memory, cse_basic_block): Likewise. * emit-rtl.c (copy_insn_1): Likewise. * expr.c (force_operand): Likewise. * final.c (final_scan_insn, get_mem_expr_from_op): Likewise. * flow.c (notice_stack_pointer_modification_1, invalidate_mems_from_autoinc, ior_reg_cond, not_reg_cond, and_reg_cond, elim_reg_cond): Likewise. * function.c (update_epilogue_consts): Likewise. * genattrtab.c (attr_rtx_1): Likewise. * genopinit.c (gen_insn): Likewise. * integrate.c (subst_constants): Likewise. * jump.c (reversed_comparison_code_parts, reversed_comparison_code, delete_related_insns, rtx_renumbered_equal_p): Likewise. * local-alloc.c (block_alloc): Likewise. * loop.c (rtx_equal_for_prefetch_p, maybe_eliminate_biv, canonicalize_condition): Likewise. * loop-iv.c (simplify_using_conditions, iv_number_of_iterations): Likewise. * optabs.c (add_equal_node, expand_binop): Likewise. * predict.c (estimate_probability): Likewise. * ra-debug.c (ra_print_rtx_2op, ra_print_rtx): Likewise. * recog.c (validate_replace_rtx_1, comparison_operator, offsettable_address_p, constrain_operands): Likewise. * reg-stack.c (swap_rtx_condition_1, subst_stack_regs_pat): Likewise. * regclass.c (scan_one_insn): Likewise. * regmove.c (stable_and_no_regs_but_for_p): Likewise. * regrename.c (kill_autoinc_value): Likewise. * reload.c (find_reusable_reload, find_reloads, reg_overlap_mentioned_for_reload_p): Likewise. * reload1.c (gen_reload, delete_address_reloads_1): Likewise. * rtl.c (copy_rtx): Likewise. * rtl.h (CONSTANT_P, INSN_P): Likewise. * rtlanal.c (commutative_operand_precedence): Likewise. * sched-deps.c (conditions_mutex_p): Likewise. * sched-rgn.c (is_cfg_nonregular): Likewise. * simplify-rtx.c (simplify_gen_binary, simplify_gen_relational, simplify_replace_rtx, simplify_unary_operation, simplify_binary_operation, simplify_ternary_operation, simplify_rtx): Likewise. * unroll.c (reg_dead_after_loop): Likewise. * config/alpha/alpha.c (alpha_swapped_comparison_operator, print_operand): Likewise. * config/arc/arc.c (proper_comparison_operator): Likewise. * config/arm/arm.c (arm_arm_address_cost, arm_select_cc_mode): Likewise. * config/avr/avr.c (_reg_unused_after): Likewise. * config/frv/frv.c (frv_ifcvt_modify_tests, frv_ifcvt_modify_insn, frv_pack_insn): Likewise. * config/i386/i386.c (ix86_comparison_operator, ix86_carry_flag_operator, fcmov_comparison_operator, arith_or_logical_operator, print_operand, ix86_expand_binary_operator, ix86_binary_operator_ok): Likewise. * config/i386/i386.md: Likewise. * config/ia64/ia64.c (not_postinc_memory_operand, ia64_print_operand, update_set_flags, errata_emit_nops): Likewise. * config/ia64/ia64.h (PREFERRED_RELOAD_CLASS, CONSTRAINT_OK_FOR_S): Likewise. * config/ip2k/ip2k.c (mdr_resequence_xy_yx, mdr_try_move_dp_reload, ip2k_check_can_adjust_stack_ref, ip2k_xexp_not_uses_reg_for_mem, ip2k_xexp_not_uses_reg_p, ip2k_composite_xexp_not_uses_reg_p, ip2k_unary_operator): Likewise. * config/iq2000/iq2000.c (cmp_op, symbolic_expression_p, eqne_comparison_operator, signed_comparison_operator): Likewise. * config/mips/mips.c (cmp_op, symbolic_expression_p): Likewise. * config/mmix/mmix (mmix_foldable_comparison_operator, mmix_comparison_operator): Likewise. * config/pa/pa.c (hppa_legitimize_address): Likewise. * config/rs6000/rs6000.c (stmw_operation, branch_comparison_operator, trap_comparison_operator, ccr_bit): Likewise. * config/rs6000/rs6000.h (SELECT_CC_MODE): Likewise. * config/s390/s390.c (s390_alc_comparison, s390_slb_comparison):L Likewise. * config/sh/sh.c (gen_block_redirect, reg_unused_after): Likewise. * config/sparc/sparc.c (eq_or_neq, normal_comp_operator, noov_compare_op, noov_compare64_op, v9_regcmp_op, emit_hard_tfmode_operation, reg_unused_after) * doc/md.texi, doc/rtl.texi: Likewise. * ra-debug.c: Add 2004 to list of copyright years. * unroll.c: Likewise. * combine.c (simplify_logical): Remove dummy test, (apply_distributive_law): Fix typo in comment. GET_CODE (x) == AND so x is a commutative binary op. * jump.c (delete_related_insns): simplify loop condition, move testing of RTX codes inside the loop. (rtx_renumbered_equal_p): do not use RTX_CODE. * rtl.c (rtx_class): Declare as enum rtx_class. * rtl.def (EQ, NE, UNEQ, LTGT, UNORDERED, ORDERED): Move to RTX_COMM_COMPARE class. (HIGH, SYMBOL_REF, LABEL_REF, CONST, CONST_INT, CONST_DOUBLE): Move to RTX_CONST_OBJ class. * rtl.h (enum rtx_class): New declaration, (RTX_OBJ_MASK, RTX_OBJ_RESULT, RTX_COMPARE_MASK, RTX_COMPARE_RESULT, RTX_ARITHMETIC_MASK, RTX_ARITHMETIC_RESULT, RTX_BINARY_MASK, RTX_BINARY_RESULT, RTX_COMMUTATIVE_MASK, RTX_COMMUTATIVE_RESULT, RTX_NON_COMMUTATIVE_RESULT, RTX_EXPR_FIRST, RTX_EXPR_LAST, UNARY_P, BINARY_P, ARITHMETIC_P, COMMUTATIVE_ARITHMETIC_P, COMPARISON_P, SWAPPABLE_OPERANDS_P, NON_COMMUTATIVE_P, COMMUTATIVE_P, OBJECT_P): New macros. * config/sparc/sparc.c (noov_compare_op): Remove register from parameter. From-SVN: r78824
2004-03-03 09:35:33 +01:00
if (code == CONST_DOUBLE)
return -5;
rtl.c (rtx_code_size): Check CONST_FIXED to calcualte correct sizes in DEF_RTL_EXPR. * rtl.c (rtx_code_size): Check CONST_FIXED to calcualte correct sizes in DEF_RTL_EXPR. (copy_rtx): Handle CONST_FIXED. (rtx_equal_p): Likewise. * rtl.h (fixed_value.h): New include. (rtx_def): Add a new field of fixed_value to u. (XCNMPFV): Define for accessing fixed_value. (CONST_FIXED_VALUE, CONST_FIXED_VALUE_HIGH, CONST_FIXED_VALUE_LOW): Define. * rtl.def (CONST_FIXED): New constant. (SS_MULT, US_MULT, SS_DIV, US_DIV, FRACT_CONVERT, UNSIGNED_FRACT_CONVERT, SAT_FRACT, UNSIGNED_SAT_FRACT, US_NEG, US_ASHIFT): New codes. * doc/rtl.texi (Expressions): Document const_fixed, us_neg, ss_mult, us_mult, ss_div, us_div, us_ashift, fract_convert, sat_fract, unsigned_fract_convert, unsigned_sat_fract): Document them. * varasm.c (assemble_integer): Extend to support fixed-point constants by using different machine classes. (decode_addr_const): Handle FIXED_CST. (const_hash_1): Likewise. (compare_constant): Likewise. (copy_constant): Likewise. (const_rtx_hash_1): Handle CONST_FIXED. (output_constant_pool_2): Handle MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM, MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM. (initializer_constant_valid_p): Handle FIXED_CST. (output_constant): Support FIXED_POINT_TYPE. * gengenrtl.c (excluded_rtx): Check CONST_FIXED to exclude. * cse.c (hash_rtx): Support CONST_FIXED. (exp_equiv_p): Likewise. (cannon_reg): Likewise. (fold_rtx): Likewise. (equiv_constant): Likewise. (cse_process_notes_1): Likewise. (count_reg_usage): Likewise. * cselib.c (entry_and_rtx_equal_p): Check CONST_FIXED. (rtx_equal_for_cselib_p): Handle CONST_FIXED. (wrap_constant): Check CONST_FIXED. (cselib_hash_rtx): Support CONST_FIXED. (cselib_subst_to_values): Likewise. * df-scan.c (df_uses_record): Likewise. * gcse.c (want_to_gcse_p): Likewise. (oprs_unchanged_p): Likewise. (oprs_not_set_p): Likewise. (compute_transp): Likewise. (extract_mentioned_regs_helper): Likewise. * genemit.c (gen_exp): Likewise. * local-alloc.c (equiv_init_varies_p): Likewise. (contains_replace_regs): Likewise. (memref_referenced_p): Likewise. * loop-invariant.c (check_maybe_invariant): Likewise. (hash_invariant_expr_1): Likewise. (invariant_expr_equal_p): Likewise. * postreload-gcse.c (oprs_unchanged_p): Likewise. * regclass.c (reg_scan_mark_refs): Likewise. * regrename.c (scan_rtx): Likewise. * resource.c (mark_referenced_resources): Likewise. (mark_set_resources): Likewise. * rtlanal.c (rtx_unstable_p): Likewise. (rtx_varies_p): Likewise. (count_occurrences): Likewise. (reg_mentioned_p): Likewise. (modified_between_p): Likewise. (modified_in_p): Likewise. (volatile_insn_p): Likewise. (volatile_refs_p): Likewise. (side_effects_p): Likewise. (may_trap_p_1): Likewise. (inequality_comparisons_p): Likewise. (computed_jump_p_1): Likewise. (commutative_operand_precedence): Likewise. * sched-deps.c (sched_analyze_2): Likewise. * sched-vis.c (print_value): Likewise. * reload.c (operands_match_p): Likewise. (subst_reg_equivs): Likewise. * reload1.c (eliminate_regs_1): Likewise. (elimination_effects): Likewise. (scan_paradoxical_subregs): Likewise. * alias.c (rtx_equal_for_memref_p): Likewise. * Makefile.in (RTL_BASE_H): Add fixed-value.h. * emit-rtl.c (const_fixed_htab): New hash table. (const_fixed_htab_hash, const_fixed_htab_eq, lookup_const_fixed): Declare. (const_fixed_htab_hash, const_fixed_htab_eq, lookup_const_fixed, const_fixed_from_fixed_value): New functions. (verify_rtx_sharing): Handle CONST_FIXED. (copy_rtx_if_shared_1): Likewise. (reset_used_flags): Likewise. (set_used_flags): Likewise. (copy_insn_1): Likewise. (init_emit_once): Create const_fixed_htab. Store fixed-point scalar and vector zero and one to const_tiny_rtx. From-SVN: r127725
2007-08-23 02:30:39 +02:00
if (code == CONST_FIXED)
return -5;
return -4;
alias.c (rtx_equal_for_memref_p): Use predicates to test rtx classes and new rtx class codes... 2004-02-07 Paolo Bonzini <bonzini@gnu.org> * alias.c (rtx_equal_for_memref_p): Use predicates to test rtx classes and new rtx class codes, possibly splitting conditionals that tested against '<' and 'o'. * caller-save.c (save_call_clobbered_regs): Likewise. * combine.c (contains_muldiv, find_split_point, subst, combine_simplify_rtx, simplify_if_then_else, simplify_set, simplify_logical, expand_compound_operation, make_compound_operation, if_then_else_cond, known_cond, apply_distributive_law, cached_nonzero_bits, cached_num_sign_bit_copies, simplify_shift_const, gen_binary, simplify_comparison, update_table_tick, record_value_for_reg, get_lsat_value_validate): Likewise. * cse.c (mention_regs, find_best_addr, find_comparison_args, fold_rtx, cse_insn, invalidate_memory, cse_basic_block): Likewise. * emit-rtl.c (copy_insn_1): Likewise. * expr.c (force_operand): Likewise. * final.c (final_scan_insn, get_mem_expr_from_op): Likewise. * flow.c (notice_stack_pointer_modification_1, invalidate_mems_from_autoinc, ior_reg_cond, not_reg_cond, and_reg_cond, elim_reg_cond): Likewise. * function.c (update_epilogue_consts): Likewise. * genattrtab.c (attr_rtx_1): Likewise. * genopinit.c (gen_insn): Likewise. * integrate.c (subst_constants): Likewise. * jump.c (reversed_comparison_code_parts, reversed_comparison_code, delete_related_insns, rtx_renumbered_equal_p): Likewise. * local-alloc.c (block_alloc): Likewise. * loop.c (rtx_equal_for_prefetch_p, maybe_eliminate_biv, canonicalize_condition): Likewise. * loop-iv.c (simplify_using_conditions, iv_number_of_iterations): Likewise. * optabs.c (add_equal_node, expand_binop): Likewise. * predict.c (estimate_probability): Likewise. * ra-debug.c (ra_print_rtx_2op, ra_print_rtx): Likewise. * recog.c (validate_replace_rtx_1, comparison_operator, offsettable_address_p, constrain_operands): Likewise. * reg-stack.c (swap_rtx_condition_1, subst_stack_regs_pat): Likewise. * regclass.c (scan_one_insn): Likewise. * regmove.c (stable_and_no_regs_but_for_p): Likewise. * regrename.c (kill_autoinc_value): Likewise. * reload.c (find_reusable_reload, find_reloads, reg_overlap_mentioned_for_reload_p): Likewise. * reload1.c (gen_reload, delete_address_reloads_1): Likewise. * rtl.c (copy_rtx): Likewise. * rtl.h (CONSTANT_P, INSN_P): Likewise. * rtlanal.c (commutative_operand_precedence): Likewise. * sched-deps.c (conditions_mutex_p): Likewise. * sched-rgn.c (is_cfg_nonregular): Likewise. * simplify-rtx.c (simplify_gen_binary, simplify_gen_relational, simplify_replace_rtx, simplify_unary_operation, simplify_binary_operation, simplify_ternary_operation, simplify_rtx): Likewise. * unroll.c (reg_dead_after_loop): Likewise. * config/alpha/alpha.c (alpha_swapped_comparison_operator, print_operand): Likewise. * config/arc/arc.c (proper_comparison_operator): Likewise. * config/arm/arm.c (arm_arm_address_cost, arm_select_cc_mode): Likewise. * config/avr/avr.c (_reg_unused_after): Likewise. * config/frv/frv.c (frv_ifcvt_modify_tests, frv_ifcvt_modify_insn, frv_pack_insn): Likewise. * config/i386/i386.c (ix86_comparison_operator, ix86_carry_flag_operator, fcmov_comparison_operator, arith_or_logical_operator, print_operand, ix86_expand_binary_operator, ix86_binary_operator_ok): Likewise. * config/i386/i386.md: Likewise. * config/ia64/ia64.c (not_postinc_memory_operand, ia64_print_operand, update_set_flags, errata_emit_nops): Likewise. * config/ia64/ia64.h (PREFERRED_RELOAD_CLASS, CONSTRAINT_OK_FOR_S): Likewise. * config/ip2k/ip2k.c (mdr_resequence_xy_yx, mdr_try_move_dp_reload, ip2k_check_can_adjust_stack_ref, ip2k_xexp_not_uses_reg_for_mem, ip2k_xexp_not_uses_reg_p, ip2k_composite_xexp_not_uses_reg_p, ip2k_unary_operator): Likewise. * config/iq2000/iq2000.c (cmp_op, symbolic_expression_p, eqne_comparison_operator, signed_comparison_operator): Likewise. * config/mips/mips.c (cmp_op, symbolic_expression_p): Likewise. * config/mmix/mmix (mmix_foldable_comparison_operator, mmix_comparison_operator): Likewise. * config/pa/pa.c (hppa_legitimize_address): Likewise. * config/rs6000/rs6000.c (stmw_operation, branch_comparison_operator, trap_comparison_operator, ccr_bit): Likewise. * config/rs6000/rs6000.h (SELECT_CC_MODE): Likewise. * config/s390/s390.c (s390_alc_comparison, s390_slb_comparison):L Likewise. * config/sh/sh.c (gen_block_redirect, reg_unused_after): Likewise. * config/sparc/sparc.c (eq_or_neq, normal_comp_operator, noov_compare_op, noov_compare64_op, v9_regcmp_op, emit_hard_tfmode_operation, reg_unused_after) * doc/md.texi, doc/rtl.texi: Likewise. * ra-debug.c: Add 2004 to list of copyright years. * unroll.c: Likewise. * combine.c (simplify_logical): Remove dummy test, (apply_distributive_law): Fix typo in comment. GET_CODE (x) == AND so x is a commutative binary op. * jump.c (delete_related_insns): simplify loop condition, move testing of RTX codes inside the loop. (rtx_renumbered_equal_p): do not use RTX_CODE. * rtl.c (rtx_class): Declare as enum rtx_class. * rtl.def (EQ, NE, UNEQ, LTGT, UNORDERED, ORDERED): Move to RTX_COMM_COMPARE class. (HIGH, SYMBOL_REF, LABEL_REF, CONST, CONST_INT, CONST_DOUBLE): Move to RTX_CONST_OBJ class. * rtl.h (enum rtx_class): New declaration, (RTX_OBJ_MASK, RTX_OBJ_RESULT, RTX_COMPARE_MASK, RTX_COMPARE_RESULT, RTX_ARITHMETIC_MASK, RTX_ARITHMETIC_RESULT, RTX_BINARY_MASK, RTX_BINARY_RESULT, RTX_COMMUTATIVE_MASK, RTX_COMMUTATIVE_RESULT, RTX_NON_COMMUTATIVE_RESULT, RTX_EXPR_FIRST, RTX_EXPR_LAST, UNARY_P, BINARY_P, ARITHMETIC_P, COMMUTATIVE_ARITHMETIC_P, COMPARISON_P, SWAPPABLE_OPERANDS_P, NON_COMMUTATIVE_P, COMMUTATIVE_P, OBJECT_P): New macros. * config/sparc/sparc.c (noov_compare_op): Remove register from parameter. From-SVN: r78824
2004-03-03 09:35:33 +01:00
case RTX_EXTRA:
/* SUBREGs of objects should come second. */
if (code == SUBREG && OBJECT_P (SUBREG_REG (op)))
return -3;
return 0;
alias.c (rtx_equal_for_memref_p): Use predicates to test rtx classes and new rtx class codes... 2004-02-07 Paolo Bonzini <bonzini@gnu.org> * alias.c (rtx_equal_for_memref_p): Use predicates to test rtx classes and new rtx class codes, possibly splitting conditionals that tested against '<' and 'o'. * caller-save.c (save_call_clobbered_regs): Likewise. * combine.c (contains_muldiv, find_split_point, subst, combine_simplify_rtx, simplify_if_then_else, simplify_set, simplify_logical, expand_compound_operation, make_compound_operation, if_then_else_cond, known_cond, apply_distributive_law, cached_nonzero_bits, cached_num_sign_bit_copies, simplify_shift_const, gen_binary, simplify_comparison, update_table_tick, record_value_for_reg, get_lsat_value_validate): Likewise. * cse.c (mention_regs, find_best_addr, find_comparison_args, fold_rtx, cse_insn, invalidate_memory, cse_basic_block): Likewise. * emit-rtl.c (copy_insn_1): Likewise. * expr.c (force_operand): Likewise. * final.c (final_scan_insn, get_mem_expr_from_op): Likewise. * flow.c (notice_stack_pointer_modification_1, invalidate_mems_from_autoinc, ior_reg_cond, not_reg_cond, and_reg_cond, elim_reg_cond): Likewise. * function.c (update_epilogue_consts): Likewise. * genattrtab.c (attr_rtx_1): Likewise. * genopinit.c (gen_insn): Likewise. * integrate.c (subst_constants): Likewise. * jump.c (reversed_comparison_code_parts, reversed_comparison_code, delete_related_insns, rtx_renumbered_equal_p): Likewise. * local-alloc.c (block_alloc): Likewise. * loop.c (rtx_equal_for_prefetch_p, maybe_eliminate_biv, canonicalize_condition): Likewise. * loop-iv.c (simplify_using_conditions, iv_number_of_iterations): Likewise. * optabs.c (add_equal_node, expand_binop): Likewise. * predict.c (estimate_probability): Likewise. * ra-debug.c (ra_print_rtx_2op, ra_print_rtx): Likewise. * recog.c (validate_replace_rtx_1, comparison_operator, offsettable_address_p, constrain_operands): Likewise. * reg-stack.c (swap_rtx_condition_1, subst_stack_regs_pat): Likewise. * regclass.c (scan_one_insn): Likewise. * regmove.c (stable_and_no_regs_but_for_p): Likewise. * regrename.c (kill_autoinc_value): Likewise. * reload.c (find_reusable_reload, find_reloads, reg_overlap_mentioned_for_reload_p): Likewise. * reload1.c (gen_reload, delete_address_reloads_1): Likewise. * rtl.c (copy_rtx): Likewise. * rtl.h (CONSTANT_P, INSN_P): Likewise. * rtlanal.c (commutative_operand_precedence): Likewise. * sched-deps.c (conditions_mutex_p): Likewise. * sched-rgn.c (is_cfg_nonregular): Likewise. * simplify-rtx.c (simplify_gen_binary, simplify_gen_relational, simplify_replace_rtx, simplify_unary_operation, simplify_binary_operation, simplify_ternary_operation, simplify_rtx): Likewise. * unroll.c (reg_dead_after_loop): Likewise. * config/alpha/alpha.c (alpha_swapped_comparison_operator, print_operand): Likewise. * config/arc/arc.c (proper_comparison_operator): Likewise. * config/arm/arm.c (arm_arm_address_cost, arm_select_cc_mode): Likewise. * config/avr/avr.c (_reg_unused_after): Likewise. * config/frv/frv.c (frv_ifcvt_modify_tests, frv_ifcvt_modify_insn, frv_pack_insn): Likewise. * config/i386/i386.c (ix86_comparison_operator, ix86_carry_flag_operator, fcmov_comparison_operator, arith_or_logical_operator, print_operand, ix86_expand_binary_operator, ix86_binary_operator_ok): Likewise. * config/i386/i386.md: Likewise. * config/ia64/ia64.c (not_postinc_memory_operand, ia64_print_operand, update_set_flags, errata_emit_nops): Likewise. * config/ia64/ia64.h (PREFERRED_RELOAD_CLASS, CONSTRAINT_OK_FOR_S): Likewise. * config/ip2k/ip2k.c (mdr_resequence_xy_yx, mdr_try_move_dp_reload, ip2k_check_can_adjust_stack_ref, ip2k_xexp_not_uses_reg_for_mem, ip2k_xexp_not_uses_reg_p, ip2k_composite_xexp_not_uses_reg_p, ip2k_unary_operator): Likewise. * config/iq2000/iq2000.c (cmp_op, symbolic_expression_p, eqne_comparison_operator, signed_comparison_operator): Likewise. * config/mips/mips.c (cmp_op, symbolic_expression_p): Likewise. * config/mmix/mmix (mmix_foldable_comparison_operator, mmix_comparison_operator): Likewise. * config/pa/pa.c (hppa_legitimize_address): Likewise. * config/rs6000/rs6000.c (stmw_operation, branch_comparison_operator, trap_comparison_operator, ccr_bit): Likewise. * config/rs6000/rs6000.h (SELECT_CC_MODE): Likewise. * config/s390/s390.c (s390_alc_comparison, s390_slb_comparison):L Likewise. * config/sh/sh.c (gen_block_redirect, reg_unused_after): Likewise. * config/sparc/sparc.c (eq_or_neq, normal_comp_operator, noov_compare_op, noov_compare64_op, v9_regcmp_op, emit_hard_tfmode_operation, reg_unused_after) * doc/md.texi, doc/rtl.texi: Likewise. * ra-debug.c: Add 2004 to list of copyright years. * unroll.c: Likewise. * combine.c (simplify_logical): Remove dummy test, (apply_distributive_law): Fix typo in comment. GET_CODE (x) == AND so x is a commutative binary op. * jump.c (delete_related_insns): simplify loop condition, move testing of RTX codes inside the loop. (rtx_renumbered_equal_p): do not use RTX_CODE. * rtl.c (rtx_class): Declare as enum rtx_class. * rtl.def (EQ, NE, UNEQ, LTGT, UNORDERED, ORDERED): Move to RTX_COMM_COMPARE class. (HIGH, SYMBOL_REF, LABEL_REF, CONST, CONST_INT, CONST_DOUBLE): Move to RTX_CONST_OBJ class. * rtl.h (enum rtx_class): New declaration, (RTX_OBJ_MASK, RTX_OBJ_RESULT, RTX_COMPARE_MASK, RTX_COMPARE_RESULT, RTX_ARITHMETIC_MASK, RTX_ARITHMETIC_RESULT, RTX_BINARY_MASK, RTX_BINARY_RESULT, RTX_COMMUTATIVE_MASK, RTX_COMMUTATIVE_RESULT, RTX_NON_COMMUTATIVE_RESULT, RTX_EXPR_FIRST, RTX_EXPR_LAST, UNARY_P, BINARY_P, ARITHMETIC_P, COMMUTATIVE_ARITHMETIC_P, COMPARISON_P, SWAPPABLE_OPERANDS_P, NON_COMMUTATIVE_P, COMMUTATIVE_P, OBJECT_P): New macros. * config/sparc/sparc.c (noov_compare_op): Remove register from parameter. From-SVN: r78824
2004-03-03 09:35:33 +01:00
case RTX_OBJ:
/* Complex expressions should be the first, so decrease priority
of objects. Prefer pointer objects over non pointer objects. */
if ((REG_P (op) && REG_POINTER (op))
|| (MEM_P (op) && MEM_POINTER (op)))
return -1;
return -2;
alias.c (rtx_equal_for_memref_p): Use predicates to test rtx classes and new rtx class codes... 2004-02-07 Paolo Bonzini <bonzini@gnu.org> * alias.c (rtx_equal_for_memref_p): Use predicates to test rtx classes and new rtx class codes, possibly splitting conditionals that tested against '<' and 'o'. * caller-save.c (save_call_clobbered_regs): Likewise. * combine.c (contains_muldiv, find_split_point, subst, combine_simplify_rtx, simplify_if_then_else, simplify_set, simplify_logical, expand_compound_operation, make_compound_operation, if_then_else_cond, known_cond, apply_distributive_law, cached_nonzero_bits, cached_num_sign_bit_copies, simplify_shift_const, gen_binary, simplify_comparison, update_table_tick, record_value_for_reg, get_lsat_value_validate): Likewise. * cse.c (mention_regs, find_best_addr, find_comparison_args, fold_rtx, cse_insn, invalidate_memory, cse_basic_block): Likewise. * emit-rtl.c (copy_insn_1): Likewise. * expr.c (force_operand): Likewise. * final.c (final_scan_insn, get_mem_expr_from_op): Likewise. * flow.c (notice_stack_pointer_modification_1, invalidate_mems_from_autoinc, ior_reg_cond, not_reg_cond, and_reg_cond, elim_reg_cond): Likewise. * function.c (update_epilogue_consts): Likewise. * genattrtab.c (attr_rtx_1): Likewise. * genopinit.c (gen_insn): Likewise. * integrate.c (subst_constants): Likewise. * jump.c (reversed_comparison_code_parts, reversed_comparison_code, delete_related_insns, rtx_renumbered_equal_p): Likewise. * local-alloc.c (block_alloc): Likewise. * loop.c (rtx_equal_for_prefetch_p, maybe_eliminate_biv, canonicalize_condition): Likewise. * loop-iv.c (simplify_using_conditions, iv_number_of_iterations): Likewise. * optabs.c (add_equal_node, expand_binop): Likewise. * predict.c (estimate_probability): Likewise. * ra-debug.c (ra_print_rtx_2op, ra_print_rtx): Likewise. * recog.c (validate_replace_rtx_1, comparison_operator, offsettable_address_p, constrain_operands): Likewise. * reg-stack.c (swap_rtx_condition_1, subst_stack_regs_pat): Likewise. * regclass.c (scan_one_insn): Likewise. * regmove.c (stable_and_no_regs_but_for_p): Likewise. * regrename.c (kill_autoinc_value): Likewise. * reload.c (find_reusable_reload, find_reloads, reg_overlap_mentioned_for_reload_p): Likewise. * reload1.c (gen_reload, delete_address_reloads_1): Likewise. * rtl.c (copy_rtx): Likewise. * rtl.h (CONSTANT_P, INSN_P): Likewise. * rtlanal.c (commutative_operand_precedence): Likewise. * sched-deps.c (conditions_mutex_p): Likewise. * sched-rgn.c (is_cfg_nonregular): Likewise. * simplify-rtx.c (simplify_gen_binary, simplify_gen_relational, simplify_replace_rtx, simplify_unary_operation, simplify_binary_operation, simplify_ternary_operation, simplify_rtx): Likewise. * unroll.c (reg_dead_after_loop): Likewise. * config/alpha/alpha.c (alpha_swapped_comparison_operator, print_operand): Likewise. * config/arc/arc.c (proper_comparison_operator): Likewise. * config/arm/arm.c (arm_arm_address_cost, arm_select_cc_mode): Likewise. * config/avr/avr.c (_reg_unused_after): Likewise. * config/frv/frv.c (frv_ifcvt_modify_tests, frv_ifcvt_modify_insn, frv_pack_insn): Likewise. * config/i386/i386.c (ix86_comparison_operator, ix86_carry_flag_operator, fcmov_comparison_operator, arith_or_logical_operator, print_operand, ix86_expand_binary_operator, ix86_binary_operator_ok): Likewise. * config/i386/i386.md: Likewise. * config/ia64/ia64.c (not_postinc_memory_operand, ia64_print_operand, update_set_flags, errata_emit_nops): Likewise. * config/ia64/ia64.h (PREFERRED_RELOAD_CLASS, CONSTRAINT_OK_FOR_S): Likewise. * config/ip2k/ip2k.c (mdr_resequence_xy_yx, mdr_try_move_dp_reload, ip2k_check_can_adjust_stack_ref, ip2k_xexp_not_uses_reg_for_mem, ip2k_xexp_not_uses_reg_p, ip2k_composite_xexp_not_uses_reg_p, ip2k_unary_operator): Likewise. * config/iq2000/iq2000.c (cmp_op, symbolic_expression_p, eqne_comparison_operator, signed_comparison_operator): Likewise. * config/mips/mips.c (cmp_op, symbolic_expression_p): Likewise. * config/mmix/mmix (mmix_foldable_comparison_operator, mmix_comparison_operator): Likewise. * config/pa/pa.c (hppa_legitimize_address): Likewise. * config/rs6000/rs6000.c (stmw_operation, branch_comparison_operator, trap_comparison_operator, ccr_bit): Likewise. * config/rs6000/rs6000.h (SELECT_CC_MODE): Likewise. * config/s390/s390.c (s390_alc_comparison, s390_slb_comparison):L Likewise. * config/sh/sh.c (gen_block_redirect, reg_unused_after): Likewise. * config/sparc/sparc.c (eq_or_neq, normal_comp_operator, noov_compare_op, noov_compare64_op, v9_regcmp_op, emit_hard_tfmode_operation, reg_unused_after) * doc/md.texi, doc/rtl.texi: Likewise. * ra-debug.c: Add 2004 to list of copyright years. * unroll.c: Likewise. * combine.c (simplify_logical): Remove dummy test, (apply_distributive_law): Fix typo in comment. GET_CODE (x) == AND so x is a commutative binary op. * jump.c (delete_related_insns): simplify loop condition, move testing of RTX codes inside the loop. (rtx_renumbered_equal_p): do not use RTX_CODE. * rtl.c (rtx_class): Declare as enum rtx_class. * rtl.def (EQ, NE, UNEQ, LTGT, UNORDERED, ORDERED): Move to RTX_COMM_COMPARE class. (HIGH, SYMBOL_REF, LABEL_REF, CONST, CONST_INT, CONST_DOUBLE): Move to RTX_CONST_OBJ class. * rtl.h (enum rtx_class): New declaration, (RTX_OBJ_MASK, RTX_OBJ_RESULT, RTX_COMPARE_MASK, RTX_COMPARE_RESULT, RTX_ARITHMETIC_MASK, RTX_ARITHMETIC_RESULT, RTX_BINARY_MASK, RTX_BINARY_RESULT, RTX_COMMUTATIVE_MASK, RTX_COMMUTATIVE_RESULT, RTX_NON_COMMUTATIVE_RESULT, RTX_EXPR_FIRST, RTX_EXPR_LAST, UNARY_P, BINARY_P, ARITHMETIC_P, COMMUTATIVE_ARITHMETIC_P, COMPARISON_P, SWAPPABLE_OPERANDS_P, NON_COMMUTATIVE_P, COMMUTATIVE_P, OBJECT_P): New macros. * config/sparc/sparc.c (noov_compare_op): Remove register from parameter. From-SVN: r78824
2004-03-03 09:35:33 +01:00
case RTX_COMM_ARITH:
/* Prefer operands that are themselves commutative to be first.
This helps to make things linear. In particular,
(and (and (reg) (reg)) (not (reg))) is canonical. */
return 4;
case RTX_BIN_ARITH:
/* If only one operand is a binary expression, it will be the first
operand. In particular, (plus (minus (reg) (reg)) (neg (reg)))
is canonical, although it will usually be further simplified. */
return 2;
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
alias.c (rtx_equal_for_memref_p): Use predicates to test rtx classes and new rtx class codes... 2004-02-07 Paolo Bonzini <bonzini@gnu.org> * alias.c (rtx_equal_for_memref_p): Use predicates to test rtx classes and new rtx class codes, possibly splitting conditionals that tested against '<' and 'o'. * caller-save.c (save_call_clobbered_regs): Likewise. * combine.c (contains_muldiv, find_split_point, subst, combine_simplify_rtx, simplify_if_then_else, simplify_set, simplify_logical, expand_compound_operation, make_compound_operation, if_then_else_cond, known_cond, apply_distributive_law, cached_nonzero_bits, cached_num_sign_bit_copies, simplify_shift_const, gen_binary, simplify_comparison, update_table_tick, record_value_for_reg, get_lsat_value_validate): Likewise. * cse.c (mention_regs, find_best_addr, find_comparison_args, fold_rtx, cse_insn, invalidate_memory, cse_basic_block): Likewise. * emit-rtl.c (copy_insn_1): Likewise. * expr.c (force_operand): Likewise. * final.c (final_scan_insn, get_mem_expr_from_op): Likewise. * flow.c (notice_stack_pointer_modification_1, invalidate_mems_from_autoinc, ior_reg_cond, not_reg_cond, and_reg_cond, elim_reg_cond): Likewise. * function.c (update_epilogue_consts): Likewise. * genattrtab.c (attr_rtx_1): Likewise. * genopinit.c (gen_insn): Likewise. * integrate.c (subst_constants): Likewise. * jump.c (reversed_comparison_code_parts, reversed_comparison_code, delete_related_insns, rtx_renumbered_equal_p): Likewise. * local-alloc.c (block_alloc): Likewise. * loop.c (rtx_equal_for_prefetch_p, maybe_eliminate_biv, canonicalize_condition): Likewise. * loop-iv.c (simplify_using_conditions, iv_number_of_iterations): Likewise. * optabs.c (add_equal_node, expand_binop): Likewise. * predict.c (estimate_probability): Likewise. * ra-debug.c (ra_print_rtx_2op, ra_print_rtx): Likewise. * recog.c (validate_replace_rtx_1, comparison_operator, offsettable_address_p, constrain_operands): Likewise. * reg-stack.c (swap_rtx_condition_1, subst_stack_regs_pat): Likewise. * regclass.c (scan_one_insn): Likewise. * regmove.c (stable_and_no_regs_but_for_p): Likewise. * regrename.c (kill_autoinc_value): Likewise. * reload.c (find_reusable_reload, find_reloads, reg_overlap_mentioned_for_reload_p): Likewise. * reload1.c (gen_reload, delete_address_reloads_1): Likewise. * rtl.c (copy_rtx): Likewise. * rtl.h (CONSTANT_P, INSN_P): Likewise. * rtlanal.c (commutative_operand_precedence): Likewise. * sched-deps.c (conditions_mutex_p): Likewise. * sched-rgn.c (is_cfg_nonregular): Likewise. * simplify-rtx.c (simplify_gen_binary, simplify_gen_relational, simplify_replace_rtx, simplify_unary_operation, simplify_binary_operation, simplify_ternary_operation, simplify_rtx): Likewise. * unroll.c (reg_dead_after_loop): Likewise. * config/alpha/alpha.c (alpha_swapped_comparison_operator, print_operand): Likewise. * config/arc/arc.c (proper_comparison_operator): Likewise. * config/arm/arm.c (arm_arm_address_cost, arm_select_cc_mode): Likewise. * config/avr/avr.c (_reg_unused_after): Likewise. * config/frv/frv.c (frv_ifcvt_modify_tests, frv_ifcvt_modify_insn, frv_pack_insn): Likewise. * config/i386/i386.c (ix86_comparison_operator, ix86_carry_flag_operator, fcmov_comparison_operator, arith_or_logical_operator, print_operand, ix86_expand_binary_operator, ix86_binary_operator_ok): Likewise. * config/i386/i386.md: Likewise. * config/ia64/ia64.c (not_postinc_memory_operand, ia64_print_operand, update_set_flags, errata_emit_nops): Likewise. * config/ia64/ia64.h (PREFERRED_RELOAD_CLASS, CONSTRAINT_OK_FOR_S): Likewise. * config/ip2k/ip2k.c (mdr_resequence_xy_yx, mdr_try_move_dp_reload, ip2k_check_can_adjust_stack_ref, ip2k_xexp_not_uses_reg_for_mem, ip2k_xexp_not_uses_reg_p, ip2k_composite_xexp_not_uses_reg_p, ip2k_unary_operator): Likewise. * config/iq2000/iq2000.c (cmp_op, symbolic_expression_p, eqne_comparison_operator, signed_comparison_operator): Likewise. * config/mips/mips.c (cmp_op, symbolic_expression_p): Likewise. * config/mmix/mmix (mmix_foldable_comparison_operator, mmix_comparison_operator): Likewise. * config/pa/pa.c (hppa_legitimize_address): Likewise. * config/rs6000/rs6000.c (stmw_operation, branch_comparison_operator, trap_comparison_operator, ccr_bit): Likewise. * config/rs6000/rs6000.h (SELECT_CC_MODE): Likewise. * config/s390/s390.c (s390_alc_comparison, s390_slb_comparison):L Likewise. * config/sh/sh.c (gen_block_redirect, reg_unused_after): Likewise. * config/sparc/sparc.c (eq_or_neq, normal_comp_operator, noov_compare_op, noov_compare64_op, v9_regcmp_op, emit_hard_tfmode_operation, reg_unused_after) * doc/md.texi, doc/rtl.texi: Likewise. * ra-debug.c: Add 2004 to list of copyright years. * unroll.c: Likewise. * combine.c (simplify_logical): Remove dummy test, (apply_distributive_law): Fix typo in comment. GET_CODE (x) == AND so x is a commutative binary op. * jump.c (delete_related_insns): simplify loop condition, move testing of RTX codes inside the loop. (rtx_renumbered_equal_p): do not use RTX_CODE. * rtl.c (rtx_class): Declare as enum rtx_class. * rtl.def (EQ, NE, UNEQ, LTGT, UNORDERED, ORDERED): Move to RTX_COMM_COMPARE class. (HIGH, SYMBOL_REF, LABEL_REF, CONST, CONST_INT, CONST_DOUBLE): Move to RTX_CONST_OBJ class. * rtl.h (enum rtx_class): New declaration, (RTX_OBJ_MASK, RTX_OBJ_RESULT, RTX_COMPARE_MASK, RTX_COMPARE_RESULT, RTX_ARITHMETIC_MASK, RTX_ARITHMETIC_RESULT, RTX_BINARY_MASK, RTX_BINARY_RESULT, RTX_COMMUTATIVE_MASK, RTX_COMMUTATIVE_RESULT, RTX_NON_COMMUTATIVE_RESULT, RTX_EXPR_FIRST, RTX_EXPR_LAST, UNARY_P, BINARY_P, ARITHMETIC_P, COMMUTATIVE_ARITHMETIC_P, COMPARISON_P, SWAPPABLE_OPERANDS_P, NON_COMMUTATIVE_P, COMMUTATIVE_P, OBJECT_P): New macros. * config/sparc/sparc.c (noov_compare_op): Remove register from parameter. From-SVN: r78824
2004-03-03 09:35:33 +01:00
case RTX_UNARY:
/* Then prefer NEG and NOT. */
if (code == NEG || code == NOT)
return 1;
alias.c (rtx_equal_for_memref_p): Use predicates to test rtx classes and new rtx class codes... 2004-02-07 Paolo Bonzini <bonzini@gnu.org> * alias.c (rtx_equal_for_memref_p): Use predicates to test rtx classes and new rtx class codes, possibly splitting conditionals that tested against '<' and 'o'. * caller-save.c (save_call_clobbered_regs): Likewise. * combine.c (contains_muldiv, find_split_point, subst, combine_simplify_rtx, simplify_if_then_else, simplify_set, simplify_logical, expand_compound_operation, make_compound_operation, if_then_else_cond, known_cond, apply_distributive_law, cached_nonzero_bits, cached_num_sign_bit_copies, simplify_shift_const, gen_binary, simplify_comparison, update_table_tick, record_value_for_reg, get_lsat_value_validate): Likewise. * cse.c (mention_regs, find_best_addr, find_comparison_args, fold_rtx, cse_insn, invalidate_memory, cse_basic_block): Likewise. * emit-rtl.c (copy_insn_1): Likewise. * expr.c (force_operand): Likewise. * final.c (final_scan_insn, get_mem_expr_from_op): Likewise. * flow.c (notice_stack_pointer_modification_1, invalidate_mems_from_autoinc, ior_reg_cond, not_reg_cond, and_reg_cond, elim_reg_cond): Likewise. * function.c (update_epilogue_consts): Likewise. * genattrtab.c (attr_rtx_1): Likewise. * genopinit.c (gen_insn): Likewise. * integrate.c (subst_constants): Likewise. * jump.c (reversed_comparison_code_parts, reversed_comparison_code, delete_related_insns, rtx_renumbered_equal_p): Likewise. * local-alloc.c (block_alloc): Likewise. * loop.c (rtx_equal_for_prefetch_p, maybe_eliminate_biv, canonicalize_condition): Likewise. * loop-iv.c (simplify_using_conditions, iv_number_of_iterations): Likewise. * optabs.c (add_equal_node, expand_binop): Likewise. * predict.c (estimate_probability): Likewise. * ra-debug.c (ra_print_rtx_2op, ra_print_rtx): Likewise. * recog.c (validate_replace_rtx_1, comparison_operator, offsettable_address_p, constrain_operands): Likewise. * reg-stack.c (swap_rtx_condition_1, subst_stack_regs_pat): Likewise. * regclass.c (scan_one_insn): Likewise. * regmove.c (stable_and_no_regs_but_for_p): Likewise. * regrename.c (kill_autoinc_value): Likewise. * reload.c (find_reusable_reload, find_reloads, reg_overlap_mentioned_for_reload_p): Likewise. * reload1.c (gen_reload, delete_address_reloads_1): Likewise. * rtl.c (copy_rtx): Likewise. * rtl.h (CONSTANT_P, INSN_P): Likewise. * rtlanal.c (commutative_operand_precedence): Likewise. * sched-deps.c (conditions_mutex_p): Likewise. * sched-rgn.c (is_cfg_nonregular): Likewise. * simplify-rtx.c (simplify_gen_binary, simplify_gen_relational, simplify_replace_rtx, simplify_unary_operation, simplify_binary_operation, simplify_ternary_operation, simplify_rtx): Likewise. * unroll.c (reg_dead_after_loop): Likewise. * config/alpha/alpha.c (alpha_swapped_comparison_operator, print_operand): Likewise. * config/arc/arc.c (proper_comparison_operator): Likewise. * config/arm/arm.c (arm_arm_address_cost, arm_select_cc_mode): Likewise. * config/avr/avr.c (_reg_unused_after): Likewise. * config/frv/frv.c (frv_ifcvt_modify_tests, frv_ifcvt_modify_insn, frv_pack_insn): Likewise. * config/i386/i386.c (ix86_comparison_operator, ix86_carry_flag_operator, fcmov_comparison_operator, arith_or_logical_operator, print_operand, ix86_expand_binary_operator, ix86_binary_operator_ok): Likewise. * config/i386/i386.md: Likewise. * config/ia64/ia64.c (not_postinc_memory_operand, ia64_print_operand, update_set_flags, errata_emit_nops): Likewise. * config/ia64/ia64.h (PREFERRED_RELOAD_CLASS, CONSTRAINT_OK_FOR_S): Likewise. * config/ip2k/ip2k.c (mdr_resequence_xy_yx, mdr_try_move_dp_reload, ip2k_check_can_adjust_stack_ref, ip2k_xexp_not_uses_reg_for_mem, ip2k_xexp_not_uses_reg_p, ip2k_composite_xexp_not_uses_reg_p, ip2k_unary_operator): Likewise. * config/iq2000/iq2000.c (cmp_op, symbolic_expression_p, eqne_comparison_operator, signed_comparison_operator): Likewise. * config/mips/mips.c (cmp_op, symbolic_expression_p): Likewise. * config/mmix/mmix (mmix_foldable_comparison_operator, mmix_comparison_operator): Likewise. * config/pa/pa.c (hppa_legitimize_address): Likewise. * config/rs6000/rs6000.c (stmw_operation, branch_comparison_operator, trap_comparison_operator, ccr_bit): Likewise. * config/rs6000/rs6000.h (SELECT_CC_MODE): Likewise. * config/s390/s390.c (s390_alc_comparison, s390_slb_comparison):L Likewise. * config/sh/sh.c (gen_block_redirect, reg_unused_after): Likewise. * config/sparc/sparc.c (eq_or_neq, normal_comp_operator, noov_compare_op, noov_compare64_op, v9_regcmp_op, emit_hard_tfmode_operation, reg_unused_after) * doc/md.texi, doc/rtl.texi: Likewise. * ra-debug.c: Add 2004 to list of copyright years. * unroll.c: Likewise. * combine.c (simplify_logical): Remove dummy test, (apply_distributive_law): Fix typo in comment. GET_CODE (x) == AND so x is a commutative binary op. * jump.c (delete_related_insns): simplify loop condition, move testing of RTX codes inside the loop. (rtx_renumbered_equal_p): do not use RTX_CODE. * rtl.c (rtx_class): Declare as enum rtx_class. * rtl.def (EQ, NE, UNEQ, LTGT, UNORDERED, ORDERED): Move to RTX_COMM_COMPARE class. (HIGH, SYMBOL_REF, LABEL_REF, CONST, CONST_INT, CONST_DOUBLE): Move to RTX_CONST_OBJ class. * rtl.h (enum rtx_class): New declaration, (RTX_OBJ_MASK, RTX_OBJ_RESULT, RTX_COMPARE_MASK, RTX_COMPARE_RESULT, RTX_ARITHMETIC_MASK, RTX_ARITHMETIC_RESULT, RTX_BINARY_MASK, RTX_BINARY_RESULT, RTX_COMMUTATIVE_MASK, RTX_COMMUTATIVE_RESULT, RTX_NON_COMMUTATIVE_RESULT, RTX_EXPR_FIRST, RTX_EXPR_LAST, UNARY_P, BINARY_P, ARITHMETIC_P, COMMUTATIVE_ARITHMETIC_P, COMPARISON_P, SWAPPABLE_OPERANDS_P, NON_COMMUTATIVE_P, COMMUTATIVE_P, OBJECT_P): New macros. * config/sparc/sparc.c (noov_compare_op): Remove register from parameter. From-SVN: r78824
2004-03-03 09:35:33 +01:00
default:
return 0;
}
}
/* Return 1 iff it is necessary to swap operands of commutative operation
in order to canonicalize expression. */
bool
swap_commutative_operands_p (rtx x, rtx y)
{
return (commutative_operand_precedence (x)
< commutative_operand_precedence (y));
}
/* Return 1 if X is an autoincrement side effect and the register is
not the stack pointer. */
int
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
auto_inc_p (const_rtx x)
{
switch (GET_CODE (x))
{
case PRE_INC:
case POST_INC:
case PRE_DEC:
case POST_DEC:
case PRE_MODIFY:
case POST_MODIFY:
/* There are no REG_INC notes for SP. */
if (XEXP (x, 0) != stack_pointer_rtx)
return 1;
default:
break;
}
return 0;
}
/* Return nonzero if IN contains a piece of rtl that has the address LOC. */
int
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
loc_mentioned_in_p (rtx *loc, const_rtx in)
{
enum rtx_code code;
const char *fmt;
int i, j;
if (!in)
return 0;
code = GET_CODE (in);
fmt = GET_RTX_FORMAT (code);
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
{
if (fmt[i] == 'e')
{
if (loc == &XEXP (in, i) || loc_mentioned_in_p (loc, XEXP (in, i)))
return 1;
}
else if (fmt[i] == 'E')
for (j = XVECLEN (in, i) - 1; j >= 0; j--)
if (loc == &XVECEXP (in, i, j)
|| loc_mentioned_in_p (loc, XVECEXP (in, i, j)))
return 1;
}
return 0;
}
Use byte offsets in SUBREGs instead of words. 2001-04-03 Jakub Jelinek <jakub@redhat.com> David S. Miller <davem@pierdol.cobaltmicro.com> Andrew MacLeod <amacleod@redhat.com> Use byte offsets in SUBREGs instead of words. * alias.c (nonlocal_mentioned_p): Use subreg_regno function. * caller-save.c (mark_set_regs): Change callers of subreg_hard_regno to pass new argument. (add_stored_regs): Use subreg_regno_offset function. * calls.c (expand_call): For non-paradoxical SUBREG take endianess into account. (precompute_arguments): Use gen_lowpart_SUBREG. * combine.c (try_combine): Replace explicit XEXP with SUBREG_REG. (combine_simplify_rtx): Rework to use SUBREG_BYTE. (simplify_set): Rework to use SUBREG_BYTE. (expand_field_assignment): Use SUBREG_BYTE. (make_extraction): Use SUBREG_BYTE. (if_then_else_cond): Use SUBREG_BYTE. (apply_distributive_law): Use SUBREG_BYTE and fixup subreg comments. (gen_lowpart_for_combine): Compute full byte offset. * cse.c (mention_regs): Use SUBREG_BYTE. (remove_invalid_subreg_refs): Rework to use SUBREG_BYTE. (canon_hash): Use SUBREG_BYTE. (fold_rtx): Pass SUBREG_BYTE div UNITS_PER_WORD to operand_subword. (gen_lowpart_if_possible): Formatting. * dbxout.c (dbxout_symbol_location): Compute SUBREG hard regnos correctly. * dwarf2out.c (is_pseudo_reg): Fixup explicit XEXP into SUBREG_REG (mem_loc_descriptor): Fixup explicit XEXP into SUBREG_REG (loc_descriptor): Fixup explicit XEXP into SUBREG_REG * dwarfout.c (is_pseudo_reg): Fixup explicit XEXP into SUBREG_REG (output_mem_loc_descriptor): Fixup explicit XEXP into SUBREG_REG (output_loc_descriptor): Fixup explicit XEXP into SUBREG_REG * emit-rtl.c (gen_rtx_SUBREG): New function, used to verify certain invariants about SUBREGs the compiler creates. (gen_lowpart_SUBREG): New function. (subreg_hard_regno): New function to get the final register number. (gen_lowpart_common): Use SUBREG_BYTE. (gen_imagpart): Spacing nits. (subreg_realpart_p): Use SUBREG_BYTE. (gen_highpart): Use SUBREG_BYTE. (subreg_lowpart_p): Always compute endian corrected goal offset, even at the byte level, then compare against that. (constant_subword): New function, pulled out all constant cases from operand_subword and changed second argument name to offset. (operand_subword): Detect non REG/SUBREG/CONCAT/MEM cases early and call constant_subword to do the work. Return const0_rtx if looking for a word outside of OP. (operand_subword_force): Change second arg name to offset. * expmed.c (store_bit_field): Use SUBREG_BYTE. (store_split_bit_field): Use SUBREG_BYTE. (extract_bit_field): Use SUBREG_BYTE. (extract_split_bit_field): Use SUBREG_BYTE. (expand_shift): Use SUBREG_BYTE. * expr.c (store_expr, expand_expr): Use gen_lowpart_SUBREG. * final.c (alter_subreg) Use subreg_hard_regno and SUBREG_BYTE. * flow.c (set_noop_p): Use SUBREG_BYTE. (mark_set_1): Remove ALTER_HARD_SUBREG. Use subreg_regno_offset instead. * function.c (fixup_var_refs_1): Fixup explicit XEXP into a SUBREG_REG. (fixup_memory_subreg): Use SUBREG_BYTE and remove byte endian correction code. (optimize_bit_field): Use SUBREG_BYTE. (purge_addressof_1): Use SUBREG_BYTE. (purge_single_hard_subreg_set): Use subreg_regno_offset function. (assign_params): Mark arguments SUBREG_PROMOTED_VAR_P if they are actually promoted by the caller and PROMOTE_FOR_CALLS_ONLY is true. * gengenrtl.c (special_rtx): Add SUBREG. * global.c (mark_reg_store): Use SUBREG_BYTE. (set_preference): Rework to use subreg_regno_offset and SUBREG_BYTE. * ifcvt (noce_emit_move_insn): Use SUBREG_BYTE. * integrate.c (copy_rtx_and_substitute): Use SUBREG_BYTE and make sure final byte offset is congruent to subreg's mode size. (subst_constants): Use SUBREG_BYTE. (mark_stores): Use subreg_regno_offset function. * jump.c (rtx_renumbered_equal_p, true_regnum): Use subreg_regno_offset function and SUBREG_BYTE. * local-alloc.c (combine_regs): Use subreg_regno_offset function. (reg_is_born): Use subreg_hard_regno. * recog.c (valid_replace_rtx_1): Use SUBREG_BYTE and remove byte endian correction code. Don't combine subregs unless resulting offset aligns with type. Fix subreg constant extraction for DImode. Simplify SUBREG of VOIDmode CONST_DOUBLE. (general_operand): Remove dead mode_altering_drug code. (indirect_operand): Use SUBREG_BYTE. (constrain_operands): Use subreg_regno_offset function. * reg-stack.c (get_true_reg): Use subreg_regno_offset function. * regmove.c (regmove_optimize): Use SUBREG_BYTE. (optimize_reg_copy_3): Use gen_lowpart_SUBREG. * regs.h (REG_SIZE): Allow target to override. (REGMODE_NATURAL_SIZE): New macro which target can override. * reload.c (reload_inner_reg_of_subreg): subreg_regno should be used on the entire subreg rtx. (push_reload): Use SUBREG_BYTE in comments and code. (find_dummy_reload): Use subreg_regno_offset. Only adjust offsets for hard registers inside subregs. (operands_match_p): Use subreg_regno_offset. (find_reloads): Use SUBREG_BYTE and only advance offset for subregs containing hard regs. (find_reload_toplev): Use SUBREG_BYTE. Remove byte endian corrections when fixing up MEM subregs. (find_reloads_address_1): Use SUBREG_BYTE, subreg_regno, and subreg_regno_offset where appropriate. (find_reloads_subreg_address): Use SUBREG_BYTE. Remove byte endian corrections when fixing up MEM subregs. (subst_reloads): When combining two subregs, make sure final offset is congruent to subreg's mode size. (find_replacement): Use SUBREG_BYTE and subreg_regno_offset. (refers_to_regno_for_reload_p): Use subreg_regno. (reg_overlap_mentioned_for_reload_p): Use subreg_regno_offset. * reload1.c (eliminate_regs) Use SUBREG_BYTE. Remove byte endian correction code for memory subreg fixups. (forget_old_reload_1): Use subreg_regno_offset. (choose_reload_regs): Use subreg_regno. (emit_input_reload_insns): Use SUBREG_BYTE. (reload_combine_note_store): Use subreg_regno_offset. (move2add_note_store): Use subreg_regno_offset. * resource.c (update_live_status, mark_referenced_resources): Use subreg_regno function. (mark_set_resources): Use subreg_regno function. * rtl.h (SUBREG_WORD): Rename to SUBREG_BYTE. (subreg_regno_offset, subreg_regno): Define prototypes. (subreg_hard_regno, constant_subword, gen_rtx_SUBREG): Newi functions. (gen_lowpart_SUBREG): Add prototype. * rtl.texi (subreg): Update to reflect new byte offset representation. Add mentioning of the effect that BYTES_BIG_ENDIAN has on subregs now. * rtlanal.c (refers_to_regno_p): Use subreg_regno. (reg_overlap_mentioned_p): Use subreg_regno. (replace_regs); Make sure final offset of combined subreg is congruent to size of subreg's mode. (subreg_regno_offset): New function. (subreg_regno): New function. * sched-vis.c (print_value): Change SUBREG_WORD to SUBREG_BYTE. * sdbout.c (sdbout_symbol): Compute offset using alter_subreg. * stmt.c (expand_anon_union_decl): Use gen_lowpart_SUBREG. * tm.texi (ALTER_HARD_SUBREG): Remove, it is now dead. (SUBREG_REGNO_OFFSET): Describe SUBREG_REGNO_OFFSET overrides. * config/a29k/a29k.c (gpc_reg_operand): Use subreg_regno. (a29k_get_reloaded_address): Use SUBREG_BYTE. (print_operand): Use SUBREG_BYTE. * config/alpha/alpha.c (print_operand_address): Use SUBREG_BYTE. * config/arm/arm.c (arm_reload_in_hi): Use SUBREG_BYTE. (arm_reload_out_hi): Use SUBREG_BYTE. * config/d30v/d30v.c (d30v_split_double): Use subreg_regno_offset instead of SUBREG_WORD. (d30v_print_operand_memory_reference): Use subreg_regno_offset. * config/dsp16xx/dsp16xx.md (extendqihi2, zero_extendqihi2): Fix SUBREG creation to use byte offset. * config/h8300/h8300.md (Unnamed HImode zero extraction and 16bit inverted load insns): Fix explicit rtl subregs to use byte offsets. * config/i370/i370.md (cmpstrsi, movstrsi, mulsi3, divsi3, udivsi3, umodsi3): Generate SUBREGs with byte offsets. * config/i860/i860.c (single_insn_src_p): Use SUBREG_BYTE. * config/i860/i860.md (mulsi3_big): Fixup explicit SUBREGs in rtl to use byte offsets. (unnamed fmlow.dd insn): Fixup SUBREGS to use byte offsets. * config/i960/i960.md (extendhisi2): Generate SUBREGs with byte offsets, also make sure it is congruent to SUBREG's mode size. (extendqisi2, extendqihi2, zero_extendhisi2, zero_extendqisi2, unnamed ldob insn): Generate SUBREGs with byte offset. (zero_extendqihi2): SUBREG's are byte offsets. * config/m68hc11/m68hc11.c (m68hc11_gen_lowpart): Use SUBREG_BYTE. (m68hc11_gen_highpart): Use SUBREG_BYTE. * config/m68k/m68k.md (zero_extendhisi2, zero_extendqihi2, zero-extendqisi2): Generate SUBREGs with byte offset. (umulsidi3, mulsidi3, subreghi1ashrdi_const32, subregsi1ashrdi_const32, subreg1lshrdi_const32): Fixup explicit subregs in rtl to use byte offsets. * config/m88k/m88k.md (extendsidi2): fixup subregs to use byte offset. * config/mips/mips.c (mips_move_1word): Use subreg_regno_offset. (mips_move_2words): Use subreg_regno_offset. (mips_secondary_reload_class): Use subreg_regno_offset. * config/mips/mips.md (DImode plus, minus, move, and logical op splits): Fixup explicit subregs in rtl to use byte offsets. * config/mn10200/mn10200.c (print_operand): Use subreg_regno function. * config/mn10300/mn10300.c (print_operand): Use subreg_regno function. * config/ns32k/ns32k.md (udivmoddisi4): Fix explicit subregs in rtl to use byte offsets. * config/pa/pa.c (emit_move_sequence): Use SUBREG_BYTE. * config/pa/pa.md (floatunssisf2, floatunssidf2, mulsi3): fix explicit subregs to use byte offsets. * config/pdp11/pdp11.md (zero_extendhisi2, modhi3, modhi3+1): Fixup explicit subregs in rtl to use byte offsets. * config/romp/romp.c (memory_offset_in_range_p): Use SUBREG_BYTE and remove byte endian correction code. * config/sh/sh.c (output_movedouble): Use subreg_regno. (gen_ashift_hi): Use SUBREG_BYTE. (regs_used): Use subreg_regno_offset. (machine_dependent_reorg): Use subreg_regno_offset. * config/sh/sh.h (INDEX_REGISTER_RTX_P): Use SUBREG_BYTE. * config/sh/sh.md (DImode and DFmode move splits): Use subreg_regno. (movdf_i4): Subregs are byte offsets now. * config/sparc/sparc.c (ultra_find_type): Use SUBREG_BYTE. * config/sparc/sparc.h (ALTER_HARD_SUBREG): Removed. (REGMODE_NATURAL_SIZE): Override. (REG_SIZE): For SUBREG check float mode on SUBREG_REG's mode. * config/sparc/sparc.md (TFmode move splits): Generate SUBREGs with byte offsets. (zero_extendhisi2, zero_extendqidi2_insn, extendhisi2, extendqihi2, sign_extendqihi2_insn, sign_extendqisi2_insn, extendqidi2): Generate SUBREGs with byte offsets, also make sure it is congruent to SUBREG's mode size. (smulsi3_highpart_v8plus): Fix explicit subregs in rtl to use byte offsets. (cmp_siqi_trunc, cmp_siqi_trunc_set, cmp_diqi_trunc, cmp_diqi_trunc_set, lshrdi3_v8plus+1, lshrdi3_v8plus+2, lshrdi3_v8plus+3, lshrdi3_v8plus+4): Use proper SUBREG_BYTE offset for non-paradoxical subregs in patterns. * config/v850/v850.c (print_operand, output_move_double): Use subreg_regno function. Co-Authored-By: Andrew MacLeod <amacleod@redhat.com> Co-Authored-By: David S. Miller <davem@pierdol.cobaltmicro.com> From-SVN: r41058
2001-04-03 17:06:12 +02:00
/* Helper function for subreg_lsb. Given a subreg's OUTER_MODE, INNER_MODE,
and SUBREG_BYTE, return the bit offset where the subreg begins
(counting from the least significant bit of the operand). */
unsigned int
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 13:02:45 +01:00
subreg_lsb_1 (machine_mode outer_mode,
machine_mode inner_mode,
unsigned int subreg_byte)
{
unsigned int bitpos;
unsigned int byte;
unsigned int word;
/* A paradoxical subreg begins at bit position 0. */
if (GET_MODE_PRECISION (outer_mode) > GET_MODE_PRECISION (inner_mode))
return 0;
if (WORDS_BIG_ENDIAN != BYTES_BIG_ENDIAN)
/* If the subreg crosses a word boundary ensure that
it also begins and ends on a word boundary. */
ra-build.c (copy_insn_p, [...]): Use gcc_assert and gcc_unreachable instead of abort. * ra-build.c (copy_insn_p, remember_move, defuse_overlap_p_1, live_out_1, prune_hardregs_for_mode, init_one_web_common, reinit_one_web, add_subweb, add_subweb_2, init_web_parts, record_conflict, compare_and_free_webs, init_webs_defs_uses, parts_to_webs_1, parts_to_webs, reset_conflicts, check_conflict_numbers, remember_web_was_spilled, handle_asm_insn, ra_build_free): Use gcc_assert and gcc_unreachable instead of abort. * ra-colorize.c (push_list, put_web, reset_lists, put_web_at_end, put_move, remove_move, combine, select_spill, colorize_one_web, try_recolor_web, insert_coalesced_conflicts, check_colors, break_precolored_alias, restore_conflicts_from_coalesce, sort_and_combine_web_pairs, check_uncoalesced_moves): Likewise. * ra-rewrite.c (spill_coalescing, slots_overlap_p, emit_loads, reloads_to_loads, rewrite_program2, emit_colors): Likewise. * ra.c (first_hard_reg, create_insn_info, find_subweb, init_ra, check_df): Likewise. * real.c (do_add, do_multiply, do_divide, do_compare, do_fix_trunc, real_arithmetic, real_compare, real_exponent, real_ldexp, real_identical, real_to_integer, real_to_integer2, real_to_decimal, real_to_hexadecimal, real_from_integer, ten_to_ptwo, ten_to_mptwo, real_digit, real_nan, real_maxval, round_for_format, real_convert, real_to_target, real_from_target, real_hash, encode_ieee_single, encode_ieee_double, encode_ieee_extended, encode_ieee_quad, encode_vax_f, encode_vax_d, encode_vax_g, encode_i370_single, encode_i370_double, encode_c4x_single, encode_c4x_extended): Likewise. * recog.c (validate_change, validate_replace_rtx_1, asm_operand_ok, extract_insn, peep2_next_insn, peep2_reg_dead_p, peep2_find_free_register, peephole2_optimize, store_data_bypass_p, if_test_bypass_p): Likewise. * reg-stack.c (record_label_references, get_asm_operand_n_inputs, stack_result, remove_regno_note, get_hard_regnum, emit_pop_insn, emit_swap_insn, swap_to_top, move_for_stack_reg, subst_stack_regs_pat, subst_asm_stack_regs, change_stack, compensate_edge, convert_regs_1): Likewise. * regclass.c (init_reg_sets, init_reg_sets_1, memory_move_secondary_cost): Likewise. * regrename.c (note_sets, clear_dead_regs, scan_rtx_reg, scan_rtx): Likewise. * reload.c (push_secondary_reload, find_valid_class, push_reload, operands_match_p, decompose, immune_p, find_reloads, find_reloads_toplev, find_reloads_address_1, subst_reloads, copy_replacements, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p): Likewise. * reload1.c (compute_use_by_pseudos, replace_pseudos_in, reload, count_pseudo, find_reg, eliminate_regs, eliminate_regs_in_insn, verify_initial_elim_offsets, finish_spills, clear_reload_reg_in_use, reload_reg_free_p, reload_reg_reaches_end_p, reloads_conflict, choose_reload_regs, merge_assigned_reloads, emit_input_reload_insns, do_output_reload, fixup_abnormal_edges): Likewise. * reorg.c (stop_search_p, emit_delay_sequence, get_jump_flags, fill_slots_from_thread, relax_delay_slots): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * rtl.c (copy_rtx, rtx_equal_p): Likewise. * rtlanal.c (insn_dependent_p, reg_overlap_mentioned_p, dead_or_set_p, find_reg_fusage, remove_note, replace_rtx, subreg_lsb_1, subreg_regno_offset, subreg_offset_representable_p, find_first_parameter_load, can_hoist_insn_p, hoist_update_store, hoist_insn_after, hoist_insn_to_edge, nonzero_bits1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sbitmap.c (sbitmap_difference): Likewise. * sched-deps.c (add_dependence, sched_analyze_1, sched_analyze_2, sched_analyze, add_forward_dependence): Likewise. * sched-ebb.c (fix_basic_block_boundaries, schedule_ebb): Likewise. * sched-rgn.c (debug_regions, compute_trg_info, schedule_region, schedule_insns): Likewise. * sched-vis.c (print_pattern): Likewise. * sdbout.c (sdbout_symbol, sdbout_toplevel_data): Likewise. * simplify-rtx.c (simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_ternary_operation, simplify_immed_subreg, simplify_subreg, simplify_gen_subreg): Likewise. * sreal.c (copy, sreal_sub, sreal_div): Likewise. * stmt.c (force_label_rtx, expand_goto, expand_asm_operands, resolve_operand_name_1, expand_return, expand_decl, expand_anon_union_decl, emit_case_bit_tests, expand_case): Likewise. * stor-layout.c (put_pending_size, smallest_mode_for_size, int_mode_for_mode, layout_decl, finish_builtin_struct, layout_type, set_sizetype, get_mode_bounds): Likewise. From-SVN: r87244
2004-09-09 19:19:16 +02:00
gcc_assert (!((subreg_byte % UNITS_PER_WORD
+ GET_MODE_SIZE (outer_mode)) > UNITS_PER_WORD
&& (subreg_byte % UNITS_PER_WORD
|| GET_MODE_SIZE (outer_mode) % UNITS_PER_WORD)));
if (WORDS_BIG_ENDIAN)
word = (GET_MODE_SIZE (inner_mode)
- (subreg_byte + GET_MODE_SIZE (outer_mode))) / UNITS_PER_WORD;
else
word = subreg_byte / UNITS_PER_WORD;
bitpos = word * BITS_PER_WORD;
if (BYTES_BIG_ENDIAN)
byte = (GET_MODE_SIZE (inner_mode)
- (subreg_byte + GET_MODE_SIZE (outer_mode))) % UNITS_PER_WORD;
else
byte = subreg_byte % UNITS_PER_WORD;
bitpos += byte * BITS_PER_UNIT;
return bitpos;
}
/* Given a subreg X, return the bit offset where the subreg begins
(counting from the least significant bit of the reg). */
unsigned int
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
subreg_lsb (const_rtx x)
{
return subreg_lsb_1 (GET_MODE (x), GET_MODE (SUBREG_REG (x)),
SUBREG_BYTE (x));
}
/* Fill in information about a subreg of a hard register.
Use byte offsets in SUBREGs instead of words. 2001-04-03 Jakub Jelinek <jakub@redhat.com> David S. Miller <davem@pierdol.cobaltmicro.com> Andrew MacLeod <amacleod@redhat.com> Use byte offsets in SUBREGs instead of words. * alias.c (nonlocal_mentioned_p): Use subreg_regno function. * caller-save.c (mark_set_regs): Change callers of subreg_hard_regno to pass new argument. (add_stored_regs): Use subreg_regno_offset function. * calls.c (expand_call): For non-paradoxical SUBREG take endianess into account. (precompute_arguments): Use gen_lowpart_SUBREG. * combine.c (try_combine): Replace explicit XEXP with SUBREG_REG. (combine_simplify_rtx): Rework to use SUBREG_BYTE. (simplify_set): Rework to use SUBREG_BYTE. (expand_field_assignment): Use SUBREG_BYTE. (make_extraction): Use SUBREG_BYTE. (if_then_else_cond): Use SUBREG_BYTE. (apply_distributive_law): Use SUBREG_BYTE and fixup subreg comments. (gen_lowpart_for_combine): Compute full byte offset. * cse.c (mention_regs): Use SUBREG_BYTE. (remove_invalid_subreg_refs): Rework to use SUBREG_BYTE. (canon_hash): Use SUBREG_BYTE. (fold_rtx): Pass SUBREG_BYTE div UNITS_PER_WORD to operand_subword. (gen_lowpart_if_possible): Formatting. * dbxout.c (dbxout_symbol_location): Compute SUBREG hard regnos correctly. * dwarf2out.c (is_pseudo_reg): Fixup explicit XEXP into SUBREG_REG (mem_loc_descriptor): Fixup explicit XEXP into SUBREG_REG (loc_descriptor): Fixup explicit XEXP into SUBREG_REG * dwarfout.c (is_pseudo_reg): Fixup explicit XEXP into SUBREG_REG (output_mem_loc_descriptor): Fixup explicit XEXP into SUBREG_REG (output_loc_descriptor): Fixup explicit XEXP into SUBREG_REG * emit-rtl.c (gen_rtx_SUBREG): New function, used to verify certain invariants about SUBREGs the compiler creates. (gen_lowpart_SUBREG): New function. (subreg_hard_regno): New function to get the final register number. (gen_lowpart_common): Use SUBREG_BYTE. (gen_imagpart): Spacing nits. (subreg_realpart_p): Use SUBREG_BYTE. (gen_highpart): Use SUBREG_BYTE. (subreg_lowpart_p): Always compute endian corrected goal offset, even at the byte level, then compare against that. (constant_subword): New function, pulled out all constant cases from operand_subword and changed second argument name to offset. (operand_subword): Detect non REG/SUBREG/CONCAT/MEM cases early and call constant_subword to do the work. Return const0_rtx if looking for a word outside of OP. (operand_subword_force): Change second arg name to offset. * expmed.c (store_bit_field): Use SUBREG_BYTE. (store_split_bit_field): Use SUBREG_BYTE. (extract_bit_field): Use SUBREG_BYTE. (extract_split_bit_field): Use SUBREG_BYTE. (expand_shift): Use SUBREG_BYTE. * expr.c (store_expr, expand_expr): Use gen_lowpart_SUBREG. * final.c (alter_subreg) Use subreg_hard_regno and SUBREG_BYTE. * flow.c (set_noop_p): Use SUBREG_BYTE. (mark_set_1): Remove ALTER_HARD_SUBREG. Use subreg_regno_offset instead. * function.c (fixup_var_refs_1): Fixup explicit XEXP into a SUBREG_REG. (fixup_memory_subreg): Use SUBREG_BYTE and remove byte endian correction code. (optimize_bit_field): Use SUBREG_BYTE. (purge_addressof_1): Use SUBREG_BYTE. (purge_single_hard_subreg_set): Use subreg_regno_offset function. (assign_params): Mark arguments SUBREG_PROMOTED_VAR_P if they are actually promoted by the caller and PROMOTE_FOR_CALLS_ONLY is true. * gengenrtl.c (special_rtx): Add SUBREG. * global.c (mark_reg_store): Use SUBREG_BYTE. (set_preference): Rework to use subreg_regno_offset and SUBREG_BYTE. * ifcvt (noce_emit_move_insn): Use SUBREG_BYTE. * integrate.c (copy_rtx_and_substitute): Use SUBREG_BYTE and make sure final byte offset is congruent to subreg's mode size. (subst_constants): Use SUBREG_BYTE. (mark_stores): Use subreg_regno_offset function. * jump.c (rtx_renumbered_equal_p, true_regnum): Use subreg_regno_offset function and SUBREG_BYTE. * local-alloc.c (combine_regs): Use subreg_regno_offset function. (reg_is_born): Use subreg_hard_regno. * recog.c (valid_replace_rtx_1): Use SUBREG_BYTE and remove byte endian correction code. Don't combine subregs unless resulting offset aligns with type. Fix subreg constant extraction for DImode. Simplify SUBREG of VOIDmode CONST_DOUBLE. (general_operand): Remove dead mode_altering_drug code. (indirect_operand): Use SUBREG_BYTE. (constrain_operands): Use subreg_regno_offset function. * reg-stack.c (get_true_reg): Use subreg_regno_offset function. * regmove.c (regmove_optimize): Use SUBREG_BYTE. (optimize_reg_copy_3): Use gen_lowpart_SUBREG. * regs.h (REG_SIZE): Allow target to override. (REGMODE_NATURAL_SIZE): New macro which target can override. * reload.c (reload_inner_reg_of_subreg): subreg_regno should be used on the entire subreg rtx. (push_reload): Use SUBREG_BYTE in comments and code. (find_dummy_reload): Use subreg_regno_offset. Only adjust offsets for hard registers inside subregs. (operands_match_p): Use subreg_regno_offset. (find_reloads): Use SUBREG_BYTE and only advance offset for subregs containing hard regs. (find_reload_toplev): Use SUBREG_BYTE. Remove byte endian corrections when fixing up MEM subregs. (find_reloads_address_1): Use SUBREG_BYTE, subreg_regno, and subreg_regno_offset where appropriate. (find_reloads_subreg_address): Use SUBREG_BYTE. Remove byte endian corrections when fixing up MEM subregs. (subst_reloads): When combining two subregs, make sure final offset is congruent to subreg's mode size. (find_replacement): Use SUBREG_BYTE and subreg_regno_offset. (refers_to_regno_for_reload_p): Use subreg_regno. (reg_overlap_mentioned_for_reload_p): Use subreg_regno_offset. * reload1.c (eliminate_regs) Use SUBREG_BYTE. Remove byte endian correction code for memory subreg fixups. (forget_old_reload_1): Use subreg_regno_offset. (choose_reload_regs): Use subreg_regno. (emit_input_reload_insns): Use SUBREG_BYTE. (reload_combine_note_store): Use subreg_regno_offset. (move2add_note_store): Use subreg_regno_offset. * resource.c (update_live_status, mark_referenced_resources): Use subreg_regno function. (mark_set_resources): Use subreg_regno function. * rtl.h (SUBREG_WORD): Rename to SUBREG_BYTE. (subreg_regno_offset, subreg_regno): Define prototypes. (subreg_hard_regno, constant_subword, gen_rtx_SUBREG): Newi functions. (gen_lowpart_SUBREG): Add prototype. * rtl.texi (subreg): Update to reflect new byte offset representation. Add mentioning of the effect that BYTES_BIG_ENDIAN has on subregs now. * rtlanal.c (refers_to_regno_p): Use subreg_regno. (reg_overlap_mentioned_p): Use subreg_regno. (replace_regs); Make sure final offset of combined subreg is congruent to size of subreg's mode. (subreg_regno_offset): New function. (subreg_regno): New function. * sched-vis.c (print_value): Change SUBREG_WORD to SUBREG_BYTE. * sdbout.c (sdbout_symbol): Compute offset using alter_subreg. * stmt.c (expand_anon_union_decl): Use gen_lowpart_SUBREG. * tm.texi (ALTER_HARD_SUBREG): Remove, it is now dead. (SUBREG_REGNO_OFFSET): Describe SUBREG_REGNO_OFFSET overrides. * config/a29k/a29k.c (gpc_reg_operand): Use subreg_regno. (a29k_get_reloaded_address): Use SUBREG_BYTE. (print_operand): Use SUBREG_BYTE. * config/alpha/alpha.c (print_operand_address): Use SUBREG_BYTE. * config/arm/arm.c (arm_reload_in_hi): Use SUBREG_BYTE. (arm_reload_out_hi): Use SUBREG_BYTE. * config/d30v/d30v.c (d30v_split_double): Use subreg_regno_offset instead of SUBREG_WORD. (d30v_print_operand_memory_reference): Use subreg_regno_offset. * config/dsp16xx/dsp16xx.md (extendqihi2, zero_extendqihi2): Fix SUBREG creation to use byte offset. * config/h8300/h8300.md (Unnamed HImode zero extraction and 16bit inverted load insns): Fix explicit rtl subregs to use byte offsets. * config/i370/i370.md (cmpstrsi, movstrsi, mulsi3, divsi3, udivsi3, umodsi3): Generate SUBREGs with byte offsets. * config/i860/i860.c (single_insn_src_p): Use SUBREG_BYTE. * config/i860/i860.md (mulsi3_big): Fixup explicit SUBREGs in rtl to use byte offsets. (unnamed fmlow.dd insn): Fixup SUBREGS to use byte offsets. * config/i960/i960.md (extendhisi2): Generate SUBREGs with byte offsets, also make sure it is congruent to SUBREG's mode size. (extendqisi2, extendqihi2, zero_extendhisi2, zero_extendqisi2, unnamed ldob insn): Generate SUBREGs with byte offset. (zero_extendqihi2): SUBREG's are byte offsets. * config/m68hc11/m68hc11.c (m68hc11_gen_lowpart): Use SUBREG_BYTE. (m68hc11_gen_highpart): Use SUBREG_BYTE. * config/m68k/m68k.md (zero_extendhisi2, zero_extendqihi2, zero-extendqisi2): Generate SUBREGs with byte offset. (umulsidi3, mulsidi3, subreghi1ashrdi_const32, subregsi1ashrdi_const32, subreg1lshrdi_const32): Fixup explicit subregs in rtl to use byte offsets. * config/m88k/m88k.md (extendsidi2): fixup subregs to use byte offset. * config/mips/mips.c (mips_move_1word): Use subreg_regno_offset. (mips_move_2words): Use subreg_regno_offset. (mips_secondary_reload_class): Use subreg_regno_offset. * config/mips/mips.md (DImode plus, minus, move, and logical op splits): Fixup explicit subregs in rtl to use byte offsets. * config/mn10200/mn10200.c (print_operand): Use subreg_regno function. * config/mn10300/mn10300.c (print_operand): Use subreg_regno function. * config/ns32k/ns32k.md (udivmoddisi4): Fix explicit subregs in rtl to use byte offsets. * config/pa/pa.c (emit_move_sequence): Use SUBREG_BYTE. * config/pa/pa.md (floatunssisf2, floatunssidf2, mulsi3): fix explicit subregs to use byte offsets. * config/pdp11/pdp11.md (zero_extendhisi2, modhi3, modhi3+1): Fixup explicit subregs in rtl to use byte offsets. * config/romp/romp.c (memory_offset_in_range_p): Use SUBREG_BYTE and remove byte endian correction code. * config/sh/sh.c (output_movedouble): Use subreg_regno. (gen_ashift_hi): Use SUBREG_BYTE. (regs_used): Use subreg_regno_offset. (machine_dependent_reorg): Use subreg_regno_offset. * config/sh/sh.h (INDEX_REGISTER_RTX_P): Use SUBREG_BYTE. * config/sh/sh.md (DImode and DFmode move splits): Use subreg_regno. (movdf_i4): Subregs are byte offsets now. * config/sparc/sparc.c (ultra_find_type): Use SUBREG_BYTE. * config/sparc/sparc.h (ALTER_HARD_SUBREG): Removed. (REGMODE_NATURAL_SIZE): Override. (REG_SIZE): For SUBREG check float mode on SUBREG_REG's mode. * config/sparc/sparc.md (TFmode move splits): Generate SUBREGs with byte offsets. (zero_extendhisi2, zero_extendqidi2_insn, extendhisi2, extendqihi2, sign_extendqihi2_insn, sign_extendqisi2_insn, extendqidi2): Generate SUBREGs with byte offsets, also make sure it is congruent to SUBREG's mode size. (smulsi3_highpart_v8plus): Fix explicit subregs in rtl to use byte offsets. (cmp_siqi_trunc, cmp_siqi_trunc_set, cmp_diqi_trunc, cmp_diqi_trunc_set, lshrdi3_v8plus+1, lshrdi3_v8plus+2, lshrdi3_v8plus+3, lshrdi3_v8plus+4): Use proper SUBREG_BYTE offset for non-paradoxical subregs in patterns. * config/v850/v850.c (print_operand, output_move_double): Use subreg_regno function. Co-Authored-By: Andrew MacLeod <amacleod@redhat.com> Co-Authored-By: David S. Miller <davem@pierdol.cobaltmicro.com> From-SVN: r41058
2001-04-03 17:06:12 +02:00
xregno - A regno of an inner hard subreg_reg (or what will become one).
xmode - The mode of xregno.
offset - The byte offset.
ymode - The mode of a top level SUBREG (or what may become one).
info - Pointer to structure to fill in.
Rather than considering one particular inner register (and thus one
particular "outer" register) in isolation, this function really uses
XREGNO as a model for a sequence of isomorphic hard registers. Thus the
function does not check whether adding INFO->offset to XREGNO gives
a valid hard register; even if INFO->offset + XREGNO is out of range,
there might be another register of the same type that is in range.
Likewise it doesn't check whether HARD_REGNO_MODE_OK accepts the new
register, since that can depend on things like whether the final
register number is even or odd. Callers that want to check whether
this particular subreg can be replaced by a simple (reg ...) should
use simplify_subreg_regno. */
void
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 13:02:45 +01:00
subreg_get_info (unsigned int xregno, machine_mode xmode,
unsigned int offset, machine_mode ymode,
struct subreg_info *info)
{
int nregs_xmode, nregs_ymode;
int mode_multiple, nregs_multiple;
int offset_adj, y_offset, y_offset_adj;
int regsize_xmode, regsize_ymode;
bool rknown;
ra-build.c (copy_insn_p, [...]): Use gcc_assert and gcc_unreachable instead of abort. * ra-build.c (copy_insn_p, remember_move, defuse_overlap_p_1, live_out_1, prune_hardregs_for_mode, init_one_web_common, reinit_one_web, add_subweb, add_subweb_2, init_web_parts, record_conflict, compare_and_free_webs, init_webs_defs_uses, parts_to_webs_1, parts_to_webs, reset_conflicts, check_conflict_numbers, remember_web_was_spilled, handle_asm_insn, ra_build_free): Use gcc_assert and gcc_unreachable instead of abort. * ra-colorize.c (push_list, put_web, reset_lists, put_web_at_end, put_move, remove_move, combine, select_spill, colorize_one_web, try_recolor_web, insert_coalesced_conflicts, check_colors, break_precolored_alias, restore_conflicts_from_coalesce, sort_and_combine_web_pairs, check_uncoalesced_moves): Likewise. * ra-rewrite.c (spill_coalescing, slots_overlap_p, emit_loads, reloads_to_loads, rewrite_program2, emit_colors): Likewise. * ra.c (first_hard_reg, create_insn_info, find_subweb, init_ra, check_df): Likewise. * real.c (do_add, do_multiply, do_divide, do_compare, do_fix_trunc, real_arithmetic, real_compare, real_exponent, real_ldexp, real_identical, real_to_integer, real_to_integer2, real_to_decimal, real_to_hexadecimal, real_from_integer, ten_to_ptwo, ten_to_mptwo, real_digit, real_nan, real_maxval, round_for_format, real_convert, real_to_target, real_from_target, real_hash, encode_ieee_single, encode_ieee_double, encode_ieee_extended, encode_ieee_quad, encode_vax_f, encode_vax_d, encode_vax_g, encode_i370_single, encode_i370_double, encode_c4x_single, encode_c4x_extended): Likewise. * recog.c (validate_change, validate_replace_rtx_1, asm_operand_ok, extract_insn, peep2_next_insn, peep2_reg_dead_p, peep2_find_free_register, peephole2_optimize, store_data_bypass_p, if_test_bypass_p): Likewise. * reg-stack.c (record_label_references, get_asm_operand_n_inputs, stack_result, remove_regno_note, get_hard_regnum, emit_pop_insn, emit_swap_insn, swap_to_top, move_for_stack_reg, subst_stack_regs_pat, subst_asm_stack_regs, change_stack, compensate_edge, convert_regs_1): Likewise. * regclass.c (init_reg_sets, init_reg_sets_1, memory_move_secondary_cost): Likewise. * regrename.c (note_sets, clear_dead_regs, scan_rtx_reg, scan_rtx): Likewise. * reload.c (push_secondary_reload, find_valid_class, push_reload, operands_match_p, decompose, immune_p, find_reloads, find_reloads_toplev, find_reloads_address_1, subst_reloads, copy_replacements, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p): Likewise. * reload1.c (compute_use_by_pseudos, replace_pseudos_in, reload, count_pseudo, find_reg, eliminate_regs, eliminate_regs_in_insn, verify_initial_elim_offsets, finish_spills, clear_reload_reg_in_use, reload_reg_free_p, reload_reg_reaches_end_p, reloads_conflict, choose_reload_regs, merge_assigned_reloads, emit_input_reload_insns, do_output_reload, fixup_abnormal_edges): Likewise. * reorg.c (stop_search_p, emit_delay_sequence, get_jump_flags, fill_slots_from_thread, relax_delay_slots): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * rtl.c (copy_rtx, rtx_equal_p): Likewise. * rtlanal.c (insn_dependent_p, reg_overlap_mentioned_p, dead_or_set_p, find_reg_fusage, remove_note, replace_rtx, subreg_lsb_1, subreg_regno_offset, subreg_offset_representable_p, find_first_parameter_load, can_hoist_insn_p, hoist_update_store, hoist_insn_after, hoist_insn_to_edge, nonzero_bits1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sbitmap.c (sbitmap_difference): Likewise. * sched-deps.c (add_dependence, sched_analyze_1, sched_analyze_2, sched_analyze, add_forward_dependence): Likewise. * sched-ebb.c (fix_basic_block_boundaries, schedule_ebb): Likewise. * sched-rgn.c (debug_regions, compute_trg_info, schedule_region, schedule_insns): Likewise. * sched-vis.c (print_pattern): Likewise. * sdbout.c (sdbout_symbol, sdbout_toplevel_data): Likewise. * simplify-rtx.c (simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_ternary_operation, simplify_immed_subreg, simplify_subreg, simplify_gen_subreg): Likewise. * sreal.c (copy, sreal_sub, sreal_div): Likewise. * stmt.c (force_label_rtx, expand_goto, expand_asm_operands, resolve_operand_name_1, expand_return, expand_decl, expand_anon_union_decl, emit_case_bit_tests, expand_case): Likewise. * stor-layout.c (put_pending_size, smallest_mode_for_size, int_mode_for_mode, layout_decl, finish_builtin_struct, layout_type, set_sizetype, get_mode_bounds): Likewise. From-SVN: r87244
2004-09-09 19:19:16 +02:00
gcc_assert (xregno < FIRST_PSEUDO_REGISTER);
rknown = false;
/* If there are holes in a non-scalar mode in registers, we expect
that it is made up of its units concatenated together. */
if (HARD_REGNO_NREGS_HAS_PADDING (xregno, xmode))
{
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 13:02:45 +01:00
machine_mode xmode_unit;
nregs_xmode = HARD_REGNO_NREGS_WITH_PADDING (xregno, xmode);
if (GET_MODE_INNER (xmode) == VOIDmode)
xmode_unit = xmode;
else
xmode_unit = GET_MODE_INNER (xmode);
gcc_assert (HARD_REGNO_NREGS_HAS_PADDING (xregno, xmode_unit));
gcc_assert (nregs_xmode
== (GET_MODE_NUNITS (xmode)
* HARD_REGNO_NREGS_WITH_PADDING (xregno, xmode_unit)));
gcc_assert (hard_regno_nregs[xregno][xmode]
== (hard_regno_nregs[xregno][xmode_unit]
* GET_MODE_NUNITS (xmode)));
/* You can only ask for a SUBREG of a value with holes in the middle
if you don't cross the holes. (Such a SUBREG should be done by
picking a different register class, or doing it in memory if
necessary.) An example of a value with holes is XCmode on 32-bit
x86 with -m128bit-long-double; it's represented in 6 32-bit registers,
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
3 for each part, but in memory it's two 128-bit parts.
Padding is assumed to be at the end (not necessarily the 'high part')
of each unit. */
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
if ((offset / GET_MODE_SIZE (xmode_unit) + 1
< GET_MODE_NUNITS (xmode))
&& (offset / GET_MODE_SIZE (xmode_unit)
!= ((offset + GET_MODE_SIZE (ymode) - 1)
/ GET_MODE_SIZE (xmode_unit))))
{
info->representable_p = false;
rknown = true;
}
}
else
nregs_xmode = hard_regno_nregs[xregno][xmode];
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
alias.c (record_set): Use hard_regno_nregs. * alias.c (record_set): Use hard_regno_nregs. * bt-load.c (find_btr_reference, note_btr_set): Likewise. * builtins.c (apply_args_size): Likewise. * caller-save.c (setup_save_areas, save_call_clobbered_regs, mark_set_regs, add_stored_regs, mark_referenced_regs, insert_restore, insert_save, insert_one_insn): Likewise. * cfgcleanup.c: Include regs.h (mark_effect, mentions_nonequal_regs): Likewise. * cfgrtl.c (mark_killed_regs): Likewise * combine.c (update_table_tick, record_value_for_reg, record_dead_and_set_regs, get_last_value_validate, use_crosses_set_p, reg_dead_at_p_1, reg_dead_at_p, mark_used_regs_combine, move_deaths, reg_bitfield_target_p, distribute_notes): Likewise. * cse.c (mention_regs, insert, invalidate, invalidate_for_call, exp_equiv_p, cse_insn): Likewise. * cselib.c (cselib_lookup): Likewise. (cselib_invalidate_regno, cselib_record_set): Likewise. * df.c (df_ref_record): Likewise. * dwarf2out.c (reg_loc_descriptor, multiple_reg_loc_descriptor): Likewise. * flow.c (mark_reg, insn_dead_p, mark_set_1, mark_used_reg, count_or_remove_death_notes_bb): Likewise. * function.c (aggregate_value_p, keep_stack_depressed): Likewise. * gloval.c (global_alloc, find_reg, mark_reg_store, mark_reg_conflicts, mark_reg_death, set_preference, reg_becomes_live, reg_dies): Likewise. * integrate.c (mark_stores): Likewise. * jump.c (delete_prior_computation): Likewise. * lcm.c (reg_dies, reg_becomes_live): Likewise. * local-alloc.c (combine_regs, find_free_reg, post_mark_life): Likewise. * loop.c (LOOP_REGNO_NREGS): Likewise. * postreload.c (reload_combine, reload_combine_note_store, reload_combine_note_use, reload_cse_move2add, move2add_note_store): Likewise. * ra-colorize.c (combine, color_usable_p, get_free_reg, calculate_dont_begin, calculate_dont_begin, colorize_one_web, try_recolor_web, insert_coalesced_conflicts, check_colors, break_precolored_alias): Likewise. * ra-debug.c: Include regs.h (ra_print_rtx_object): Likewise. * ra-rewrite (choose_spill_colors): Likewise. (spill_same_color_p, update_spill_colors, spill_is_free): Likewise. * ra.c (init_ra): Likewise. * recog.c (reg_fits_class_p, peep2_reg_dead_p, peep2_find_free_register): Likewise. * reg-stack.c (subst_stack_regs_pat, convert_regs_exit): Likewise. * regclass.c (hard_regno_nregs): New array. (init_reg_modes_once): Initialize it. (choose_hard_reg_mode): Use it. (record_reg_classes): Likewise. * regmove.c (mark_flags_life_zones): Likewise. * regrename.c (note_sets, clear_dead_regs, regrename_optimize, scan_rtx_reg, dump_def_use_chain, kill_value, set_value_regno, copy_value, maybe_mode_change, find_oldest_value_reg, copyprop_hardreg_forward_1): * regs.h (hard_regno_nregs): Declare. * realod.c (reload_inner_reg_of_subreg): Use it. (push_reload, combine_reloads, find_dummy_reload, hard_reg_set_here_p, operands_match_p, decompose, find_reloads, refers_to_regno_for_reload_p, find_equiv_reg, regno_clobbered_p, reload_adjust_reg_for_mode): Likewise. * reload1.c (compute_use_by_pseudos, count_pseudo, count_spilled_pseudo, find_reg, find_reload_regs, mark_home_live, spill_hard_reg, forget_old_reloads_1, mark_reload_reg_in_use, clear_reload_reg_in_use, reload_reg_free_for_value_p, free_for_value_p allocate_reload_reg, choose_reload_regs, emit_reload_insns, delete_output_reload): Likewise. * resource.c (update_live_status, mark_referenced_resources, mark_set_resources, mark_target_live_regs): Likewise. * rtlanal.c: Include regs.h (refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_regno_note, find_reg_fusage, subreg_regno_offset, subreg_offset_representable_p, hoist_test_store): Likewise. * sched-deps.c (sched_analyze_1, sched_analyze_2): Likewise. * sched-rgn.c (check_live_1, update_live_1): Likewise. * stmt.c: Include regs.h (decl_conflicts_with_clobbers_p): Likewise. * varasm.c (make_decl_rtl): Likewise. * Makefile.in (cfgcleanup.o, rtlanal.o, ra-debug.o): Add regs.h dependnecy. From-SVN: r77088
2004-02-02 01:17:18 +01:00
nregs_ymode = hard_regno_nregs[xregno][ymode];
/* Paradoxical subregs are otherwise valid. */
if (!rknown
&& offset == 0
&& GET_MODE_PRECISION (ymode) > GET_MODE_PRECISION (xmode))
{
info->representable_p = true;
/* If this is a big endian paradoxical subreg, which uses more
actual hard registers than the original register, we must
return a negative offset so that we find the proper highpart
of the register. */
if (GET_MODE_SIZE (ymode) > UNITS_PER_WORD
? REG_WORDS_BIG_ENDIAN : BYTES_BIG_ENDIAN)
info->offset = nregs_xmode - nregs_ymode;
else
info->offset = 0;
info->nregs = nregs_ymode;
return;
}
/* If registers store different numbers of bits in the different
modes, we cannot generally form this subreg. */
if (!HARD_REGNO_NREGS_HAS_PADDING (xregno, xmode)
&& !HARD_REGNO_NREGS_HAS_PADDING (xregno, ymode)
&& (GET_MODE_SIZE (xmode) % nregs_xmode) == 0
&& (GET_MODE_SIZE (ymode) % nregs_ymode) == 0)
{
regsize_xmode = GET_MODE_SIZE (xmode) / nregs_xmode;
regsize_ymode = GET_MODE_SIZE (ymode) / nregs_ymode;
if (!rknown && regsize_xmode > regsize_ymode && nregs_ymode > 1)
{
info->representable_p = false;
info->nregs
= (GET_MODE_SIZE (ymode) + regsize_xmode - 1) / regsize_xmode;
info->offset = offset / regsize_xmode;
return;
}
if (!rknown && regsize_ymode > regsize_xmode && nregs_xmode > 1)
{
info->representable_p = false;
info->nregs
= (GET_MODE_SIZE (ymode) + regsize_xmode - 1) / regsize_xmode;
info->offset = offset / regsize_xmode;
return;
}
/* Quick exit for the simple and common case of extracting whole
subregisters from a multiregister value. */
/* ??? It would be better to integrate this into the code below,
if we can generalize the concept enough and figure out how
odd-sized modes can coexist with the other weird cases we support. */
if (!rknown
&& WORDS_BIG_ENDIAN == REG_WORDS_BIG_ENDIAN
&& regsize_xmode == regsize_ymode
&& (offset % regsize_ymode) == 0)
{
info->representable_p = true;
info->nregs = nregs_ymode;
info->offset = offset / regsize_ymode;
gcc_assert (info->offset + info->nregs <= nregs_xmode);
return;
}
}
/* Lowpart subregs are otherwise valid. */
if (!rknown && offset == subreg_lowpart_offset (ymode, xmode))
{
info->representable_p = true;
rknown = true;
if (offset == 0 || nregs_xmode == nregs_ymode)
{
info->offset = 0;
info->nregs = nregs_ymode;
return;
}
}
/* This should always pass, otherwise we don't know how to verify
the constraint. These conditions may be relaxed but
subreg_regno_offset would need to be redesigned. */
ra-build.c (copy_insn_p, [...]): Use gcc_assert and gcc_unreachable instead of abort. * ra-build.c (copy_insn_p, remember_move, defuse_overlap_p_1, live_out_1, prune_hardregs_for_mode, init_one_web_common, reinit_one_web, add_subweb, add_subweb_2, init_web_parts, record_conflict, compare_and_free_webs, init_webs_defs_uses, parts_to_webs_1, parts_to_webs, reset_conflicts, check_conflict_numbers, remember_web_was_spilled, handle_asm_insn, ra_build_free): Use gcc_assert and gcc_unreachable instead of abort. * ra-colorize.c (push_list, put_web, reset_lists, put_web_at_end, put_move, remove_move, combine, select_spill, colorize_one_web, try_recolor_web, insert_coalesced_conflicts, check_colors, break_precolored_alias, restore_conflicts_from_coalesce, sort_and_combine_web_pairs, check_uncoalesced_moves): Likewise. * ra-rewrite.c (spill_coalescing, slots_overlap_p, emit_loads, reloads_to_loads, rewrite_program2, emit_colors): Likewise. * ra.c (first_hard_reg, create_insn_info, find_subweb, init_ra, check_df): Likewise. * real.c (do_add, do_multiply, do_divide, do_compare, do_fix_trunc, real_arithmetic, real_compare, real_exponent, real_ldexp, real_identical, real_to_integer, real_to_integer2, real_to_decimal, real_to_hexadecimal, real_from_integer, ten_to_ptwo, ten_to_mptwo, real_digit, real_nan, real_maxval, round_for_format, real_convert, real_to_target, real_from_target, real_hash, encode_ieee_single, encode_ieee_double, encode_ieee_extended, encode_ieee_quad, encode_vax_f, encode_vax_d, encode_vax_g, encode_i370_single, encode_i370_double, encode_c4x_single, encode_c4x_extended): Likewise. * recog.c (validate_change, validate_replace_rtx_1, asm_operand_ok, extract_insn, peep2_next_insn, peep2_reg_dead_p, peep2_find_free_register, peephole2_optimize, store_data_bypass_p, if_test_bypass_p): Likewise. * reg-stack.c (record_label_references, get_asm_operand_n_inputs, stack_result, remove_regno_note, get_hard_regnum, emit_pop_insn, emit_swap_insn, swap_to_top, move_for_stack_reg, subst_stack_regs_pat, subst_asm_stack_regs, change_stack, compensate_edge, convert_regs_1): Likewise. * regclass.c (init_reg_sets, init_reg_sets_1, memory_move_secondary_cost): Likewise. * regrename.c (note_sets, clear_dead_regs, scan_rtx_reg, scan_rtx): Likewise. * reload.c (push_secondary_reload, find_valid_class, push_reload, operands_match_p, decompose, immune_p, find_reloads, find_reloads_toplev, find_reloads_address_1, subst_reloads, copy_replacements, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p): Likewise. * reload1.c (compute_use_by_pseudos, replace_pseudos_in, reload, count_pseudo, find_reg, eliminate_regs, eliminate_regs_in_insn, verify_initial_elim_offsets, finish_spills, clear_reload_reg_in_use, reload_reg_free_p, reload_reg_reaches_end_p, reloads_conflict, choose_reload_regs, merge_assigned_reloads, emit_input_reload_insns, do_output_reload, fixup_abnormal_edges): Likewise. * reorg.c (stop_search_p, emit_delay_sequence, get_jump_flags, fill_slots_from_thread, relax_delay_slots): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * rtl.c (copy_rtx, rtx_equal_p): Likewise. * rtlanal.c (insn_dependent_p, reg_overlap_mentioned_p, dead_or_set_p, find_reg_fusage, remove_note, replace_rtx, subreg_lsb_1, subreg_regno_offset, subreg_offset_representable_p, find_first_parameter_load, can_hoist_insn_p, hoist_update_store, hoist_insn_after, hoist_insn_to_edge, nonzero_bits1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sbitmap.c (sbitmap_difference): Likewise. * sched-deps.c (add_dependence, sched_analyze_1, sched_analyze_2, sched_analyze, add_forward_dependence): Likewise. * sched-ebb.c (fix_basic_block_boundaries, schedule_ebb): Likewise. * sched-rgn.c (debug_regions, compute_trg_info, schedule_region, schedule_insns): Likewise. * sched-vis.c (print_pattern): Likewise. * sdbout.c (sdbout_symbol, sdbout_toplevel_data): Likewise. * simplify-rtx.c (simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_ternary_operation, simplify_immed_subreg, simplify_subreg, simplify_gen_subreg): Likewise. * sreal.c (copy, sreal_sub, sreal_div): Likewise. * stmt.c (force_label_rtx, expand_goto, expand_asm_operands, resolve_operand_name_1, expand_return, expand_decl, expand_anon_union_decl, emit_case_bit_tests, expand_case): Likewise. * stor-layout.c (put_pending_size, smallest_mode_for_size, int_mode_for_mode, layout_decl, finish_builtin_struct, layout_type, set_sizetype, get_mode_bounds): Likewise. From-SVN: r87244
2004-09-09 19:19:16 +02:00
gcc_assert ((GET_MODE_SIZE (xmode) % GET_MODE_SIZE (ymode)) == 0);
gcc_assert ((nregs_xmode % nregs_ymode) == 0);
if (WORDS_BIG_ENDIAN != REG_WORDS_BIG_ENDIAN
&& GET_MODE_SIZE (xmode) > UNITS_PER_WORD)
{
HOST_WIDE_INT xsize = GET_MODE_SIZE (xmode);
HOST_WIDE_INT ysize = GET_MODE_SIZE (ymode);
HOST_WIDE_INT off_low = offset & (ysize - 1);
HOST_WIDE_INT off_high = offset & ~(ysize - 1);
offset = (xsize - ysize - off_high) | off_low;
}
/* The XMODE value can be seen as a vector of NREGS_XMODE
values. The subreg must represent a lowpart of given field.
Compute what field it is. */
offset_adj = offset;
offset_adj -= subreg_lowpart_offset (ymode,
mode_for_size (GET_MODE_BITSIZE (xmode)
/ nregs_xmode,
MODE_INT, 0));
/* Size of ymode must not be greater than the size of xmode. */
mode_multiple = GET_MODE_SIZE (xmode) / GET_MODE_SIZE (ymode);
ra-build.c (copy_insn_p, [...]): Use gcc_assert and gcc_unreachable instead of abort. * ra-build.c (copy_insn_p, remember_move, defuse_overlap_p_1, live_out_1, prune_hardregs_for_mode, init_one_web_common, reinit_one_web, add_subweb, add_subweb_2, init_web_parts, record_conflict, compare_and_free_webs, init_webs_defs_uses, parts_to_webs_1, parts_to_webs, reset_conflicts, check_conflict_numbers, remember_web_was_spilled, handle_asm_insn, ra_build_free): Use gcc_assert and gcc_unreachable instead of abort. * ra-colorize.c (push_list, put_web, reset_lists, put_web_at_end, put_move, remove_move, combine, select_spill, colorize_one_web, try_recolor_web, insert_coalesced_conflicts, check_colors, break_precolored_alias, restore_conflicts_from_coalesce, sort_and_combine_web_pairs, check_uncoalesced_moves): Likewise. * ra-rewrite.c (spill_coalescing, slots_overlap_p, emit_loads, reloads_to_loads, rewrite_program2, emit_colors): Likewise. * ra.c (first_hard_reg, create_insn_info, find_subweb, init_ra, check_df): Likewise. * real.c (do_add, do_multiply, do_divide, do_compare, do_fix_trunc, real_arithmetic, real_compare, real_exponent, real_ldexp, real_identical, real_to_integer, real_to_integer2, real_to_decimal, real_to_hexadecimal, real_from_integer, ten_to_ptwo, ten_to_mptwo, real_digit, real_nan, real_maxval, round_for_format, real_convert, real_to_target, real_from_target, real_hash, encode_ieee_single, encode_ieee_double, encode_ieee_extended, encode_ieee_quad, encode_vax_f, encode_vax_d, encode_vax_g, encode_i370_single, encode_i370_double, encode_c4x_single, encode_c4x_extended): Likewise. * recog.c (validate_change, validate_replace_rtx_1, asm_operand_ok, extract_insn, peep2_next_insn, peep2_reg_dead_p, peep2_find_free_register, peephole2_optimize, store_data_bypass_p, if_test_bypass_p): Likewise. * reg-stack.c (record_label_references, get_asm_operand_n_inputs, stack_result, remove_regno_note, get_hard_regnum, emit_pop_insn, emit_swap_insn, swap_to_top, move_for_stack_reg, subst_stack_regs_pat, subst_asm_stack_regs, change_stack, compensate_edge, convert_regs_1): Likewise. * regclass.c (init_reg_sets, init_reg_sets_1, memory_move_secondary_cost): Likewise. * regrename.c (note_sets, clear_dead_regs, scan_rtx_reg, scan_rtx): Likewise. * reload.c (push_secondary_reload, find_valid_class, push_reload, operands_match_p, decompose, immune_p, find_reloads, find_reloads_toplev, find_reloads_address_1, subst_reloads, copy_replacements, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p): Likewise. * reload1.c (compute_use_by_pseudos, replace_pseudos_in, reload, count_pseudo, find_reg, eliminate_regs, eliminate_regs_in_insn, verify_initial_elim_offsets, finish_spills, clear_reload_reg_in_use, reload_reg_free_p, reload_reg_reaches_end_p, reloads_conflict, choose_reload_regs, merge_assigned_reloads, emit_input_reload_insns, do_output_reload, fixup_abnormal_edges): Likewise. * reorg.c (stop_search_p, emit_delay_sequence, get_jump_flags, fill_slots_from_thread, relax_delay_slots): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * rtl.c (copy_rtx, rtx_equal_p): Likewise. * rtlanal.c (insn_dependent_p, reg_overlap_mentioned_p, dead_or_set_p, find_reg_fusage, remove_note, replace_rtx, subreg_lsb_1, subreg_regno_offset, subreg_offset_representable_p, find_first_parameter_load, can_hoist_insn_p, hoist_update_store, hoist_insn_after, hoist_insn_to_edge, nonzero_bits1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sbitmap.c (sbitmap_difference): Likewise. * sched-deps.c (add_dependence, sched_analyze_1, sched_analyze_2, sched_analyze, add_forward_dependence): Likewise. * sched-ebb.c (fix_basic_block_boundaries, schedule_ebb): Likewise. * sched-rgn.c (debug_regions, compute_trg_info, schedule_region, schedule_insns): Likewise. * sched-vis.c (print_pattern): Likewise. * sdbout.c (sdbout_symbol, sdbout_toplevel_data): Likewise. * simplify-rtx.c (simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_ternary_operation, simplify_immed_subreg, simplify_subreg, simplify_gen_subreg): Likewise. * sreal.c (copy, sreal_sub, sreal_div): Likewise. * stmt.c (force_label_rtx, expand_goto, expand_asm_operands, resolve_operand_name_1, expand_return, expand_decl, expand_anon_union_decl, emit_case_bit_tests, expand_case): Likewise. * stor-layout.c (put_pending_size, smallest_mode_for_size, int_mode_for_mode, layout_decl, finish_builtin_struct, layout_type, set_sizetype, get_mode_bounds): Likewise. From-SVN: r87244
2004-09-09 19:19:16 +02:00
gcc_assert (mode_multiple != 0);
y_offset = offset / GET_MODE_SIZE (ymode);
y_offset_adj = offset_adj / GET_MODE_SIZE (ymode);
nregs_multiple = nregs_xmode / nregs_ymode;
ra-build.c (copy_insn_p, [...]): Use gcc_assert and gcc_unreachable instead of abort. * ra-build.c (copy_insn_p, remember_move, defuse_overlap_p_1, live_out_1, prune_hardregs_for_mode, init_one_web_common, reinit_one_web, add_subweb, add_subweb_2, init_web_parts, record_conflict, compare_and_free_webs, init_webs_defs_uses, parts_to_webs_1, parts_to_webs, reset_conflicts, check_conflict_numbers, remember_web_was_spilled, handle_asm_insn, ra_build_free): Use gcc_assert and gcc_unreachable instead of abort. * ra-colorize.c (push_list, put_web, reset_lists, put_web_at_end, put_move, remove_move, combine, select_spill, colorize_one_web, try_recolor_web, insert_coalesced_conflicts, check_colors, break_precolored_alias, restore_conflicts_from_coalesce, sort_and_combine_web_pairs, check_uncoalesced_moves): Likewise. * ra-rewrite.c (spill_coalescing, slots_overlap_p, emit_loads, reloads_to_loads, rewrite_program2, emit_colors): Likewise. * ra.c (first_hard_reg, create_insn_info, find_subweb, init_ra, check_df): Likewise. * real.c (do_add, do_multiply, do_divide, do_compare, do_fix_trunc, real_arithmetic, real_compare, real_exponent, real_ldexp, real_identical, real_to_integer, real_to_integer2, real_to_decimal, real_to_hexadecimal, real_from_integer, ten_to_ptwo, ten_to_mptwo, real_digit, real_nan, real_maxval, round_for_format, real_convert, real_to_target, real_from_target, real_hash, encode_ieee_single, encode_ieee_double, encode_ieee_extended, encode_ieee_quad, encode_vax_f, encode_vax_d, encode_vax_g, encode_i370_single, encode_i370_double, encode_c4x_single, encode_c4x_extended): Likewise. * recog.c (validate_change, validate_replace_rtx_1, asm_operand_ok, extract_insn, peep2_next_insn, peep2_reg_dead_p, peep2_find_free_register, peephole2_optimize, store_data_bypass_p, if_test_bypass_p): Likewise. * reg-stack.c (record_label_references, get_asm_operand_n_inputs, stack_result, remove_regno_note, get_hard_regnum, emit_pop_insn, emit_swap_insn, swap_to_top, move_for_stack_reg, subst_stack_regs_pat, subst_asm_stack_regs, change_stack, compensate_edge, convert_regs_1): Likewise. * regclass.c (init_reg_sets, init_reg_sets_1, memory_move_secondary_cost): Likewise. * regrename.c (note_sets, clear_dead_regs, scan_rtx_reg, scan_rtx): Likewise. * reload.c (push_secondary_reload, find_valid_class, push_reload, operands_match_p, decompose, immune_p, find_reloads, find_reloads_toplev, find_reloads_address_1, subst_reloads, copy_replacements, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p): Likewise. * reload1.c (compute_use_by_pseudos, replace_pseudos_in, reload, count_pseudo, find_reg, eliminate_regs, eliminate_regs_in_insn, verify_initial_elim_offsets, finish_spills, clear_reload_reg_in_use, reload_reg_free_p, reload_reg_reaches_end_p, reloads_conflict, choose_reload_regs, merge_assigned_reloads, emit_input_reload_insns, do_output_reload, fixup_abnormal_edges): Likewise. * reorg.c (stop_search_p, emit_delay_sequence, get_jump_flags, fill_slots_from_thread, relax_delay_slots): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * rtl.c (copy_rtx, rtx_equal_p): Likewise. * rtlanal.c (insn_dependent_p, reg_overlap_mentioned_p, dead_or_set_p, find_reg_fusage, remove_note, replace_rtx, subreg_lsb_1, subreg_regno_offset, subreg_offset_representable_p, find_first_parameter_load, can_hoist_insn_p, hoist_update_store, hoist_insn_after, hoist_insn_to_edge, nonzero_bits1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sbitmap.c (sbitmap_difference): Likewise. * sched-deps.c (add_dependence, sched_analyze_1, sched_analyze_2, sched_analyze, add_forward_dependence): Likewise. * sched-ebb.c (fix_basic_block_boundaries, schedule_ebb): Likewise. * sched-rgn.c (debug_regions, compute_trg_info, schedule_region, schedule_insns): Likewise. * sched-vis.c (print_pattern): Likewise. * sdbout.c (sdbout_symbol, sdbout_toplevel_data): Likewise. * simplify-rtx.c (simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_ternary_operation, simplify_immed_subreg, simplify_subreg, simplify_gen_subreg): Likewise. * sreal.c (copy, sreal_sub, sreal_div): Likewise. * stmt.c (force_label_rtx, expand_goto, expand_asm_operands, resolve_operand_name_1, expand_return, expand_decl, expand_anon_union_decl, emit_case_bit_tests, expand_case): Likewise. * stor-layout.c (put_pending_size, smallest_mode_for_size, int_mode_for_mode, layout_decl, finish_builtin_struct, layout_type, set_sizetype, get_mode_bounds): Likewise. From-SVN: r87244
2004-09-09 19:19:16 +02:00
gcc_assert ((offset_adj % GET_MODE_SIZE (ymode)) == 0);
ra-build.c (copy_insn_p, [...]): Use gcc_assert and gcc_unreachable instead of abort. * ra-build.c (copy_insn_p, remember_move, defuse_overlap_p_1, live_out_1, prune_hardregs_for_mode, init_one_web_common, reinit_one_web, add_subweb, add_subweb_2, init_web_parts, record_conflict, compare_and_free_webs, init_webs_defs_uses, parts_to_webs_1, parts_to_webs, reset_conflicts, check_conflict_numbers, remember_web_was_spilled, handle_asm_insn, ra_build_free): Use gcc_assert and gcc_unreachable instead of abort. * ra-colorize.c (push_list, put_web, reset_lists, put_web_at_end, put_move, remove_move, combine, select_spill, colorize_one_web, try_recolor_web, insert_coalesced_conflicts, check_colors, break_precolored_alias, restore_conflicts_from_coalesce, sort_and_combine_web_pairs, check_uncoalesced_moves): Likewise. * ra-rewrite.c (spill_coalescing, slots_overlap_p, emit_loads, reloads_to_loads, rewrite_program2, emit_colors): Likewise. * ra.c (first_hard_reg, create_insn_info, find_subweb, init_ra, check_df): Likewise. * real.c (do_add, do_multiply, do_divide, do_compare, do_fix_trunc, real_arithmetic, real_compare, real_exponent, real_ldexp, real_identical, real_to_integer, real_to_integer2, real_to_decimal, real_to_hexadecimal, real_from_integer, ten_to_ptwo, ten_to_mptwo, real_digit, real_nan, real_maxval, round_for_format, real_convert, real_to_target, real_from_target, real_hash, encode_ieee_single, encode_ieee_double, encode_ieee_extended, encode_ieee_quad, encode_vax_f, encode_vax_d, encode_vax_g, encode_i370_single, encode_i370_double, encode_c4x_single, encode_c4x_extended): Likewise. * recog.c (validate_change, validate_replace_rtx_1, asm_operand_ok, extract_insn, peep2_next_insn, peep2_reg_dead_p, peep2_find_free_register, peephole2_optimize, store_data_bypass_p, if_test_bypass_p): Likewise. * reg-stack.c (record_label_references, get_asm_operand_n_inputs, stack_result, remove_regno_note, get_hard_regnum, emit_pop_insn, emit_swap_insn, swap_to_top, move_for_stack_reg, subst_stack_regs_pat, subst_asm_stack_regs, change_stack, compensate_edge, convert_regs_1): Likewise. * regclass.c (init_reg_sets, init_reg_sets_1, memory_move_secondary_cost): Likewise. * regrename.c (note_sets, clear_dead_regs, scan_rtx_reg, scan_rtx): Likewise. * reload.c (push_secondary_reload, find_valid_class, push_reload, operands_match_p, decompose, immune_p, find_reloads, find_reloads_toplev, find_reloads_address_1, subst_reloads, copy_replacements, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p): Likewise. * reload1.c (compute_use_by_pseudos, replace_pseudos_in, reload, count_pseudo, find_reg, eliminate_regs, eliminate_regs_in_insn, verify_initial_elim_offsets, finish_spills, clear_reload_reg_in_use, reload_reg_free_p, reload_reg_reaches_end_p, reloads_conflict, choose_reload_regs, merge_assigned_reloads, emit_input_reload_insns, do_output_reload, fixup_abnormal_edges): Likewise. * reorg.c (stop_search_p, emit_delay_sequence, get_jump_flags, fill_slots_from_thread, relax_delay_slots): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * rtl.c (copy_rtx, rtx_equal_p): Likewise. * rtlanal.c (insn_dependent_p, reg_overlap_mentioned_p, dead_or_set_p, find_reg_fusage, remove_note, replace_rtx, subreg_lsb_1, subreg_regno_offset, subreg_offset_representable_p, find_first_parameter_load, can_hoist_insn_p, hoist_update_store, hoist_insn_after, hoist_insn_to_edge, nonzero_bits1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sbitmap.c (sbitmap_difference): Likewise. * sched-deps.c (add_dependence, sched_analyze_1, sched_analyze_2, sched_analyze, add_forward_dependence): Likewise. * sched-ebb.c (fix_basic_block_boundaries, schedule_ebb): Likewise. * sched-rgn.c (debug_regions, compute_trg_info, schedule_region, schedule_insns): Likewise. * sched-vis.c (print_pattern): Likewise. * sdbout.c (sdbout_symbol, sdbout_toplevel_data): Likewise. * simplify-rtx.c (simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_ternary_operation, simplify_immed_subreg, simplify_subreg, simplify_gen_subreg): Likewise. * sreal.c (copy, sreal_sub, sreal_div): Likewise. * stmt.c (force_label_rtx, expand_goto, expand_asm_operands, resolve_operand_name_1, expand_return, expand_decl, expand_anon_union_decl, emit_case_bit_tests, expand_case): Likewise. * stor-layout.c (put_pending_size, smallest_mode_for_size, int_mode_for_mode, layout_decl, finish_builtin_struct, layout_type, set_sizetype, get_mode_bounds): Likewise. From-SVN: r87244
2004-09-09 19:19:16 +02:00
gcc_assert ((mode_multiple % nregs_multiple) == 0);
if (!rknown)
{
info->representable_p = (!(y_offset_adj % (mode_multiple / nregs_multiple)));
rknown = true;
}
info->offset = (y_offset / (mode_multiple / nregs_multiple)) * nregs_ymode;
info->nregs = nregs_ymode;
}
/* This function returns the regno offset of a subreg expression.
xregno - A regno of an inner hard subreg_reg (or what will become one).
xmode - The mode of xregno.
offset - The byte offset.
ymode - The mode of a top level SUBREG (or what may become one).
RETURN - The regno offset which would be used. */
unsigned int
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 13:02:45 +01:00
subreg_regno_offset (unsigned int xregno, machine_mode xmode,
unsigned int offset, machine_mode ymode)
{
struct subreg_info info;
subreg_get_info (xregno, xmode, offset, ymode, &info);
return info.offset;
}
/* This function returns true when the offset is representable via
subreg_offset in the given regno.
xregno - A regno of an inner hard subreg_reg (or what will become one).
xmode - The mode of xregno.
offset - The byte offset.
ymode - The mode of a top level SUBREG (or what may become one).
RETURN - Whether the offset is representable. */
bool
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 13:02:45 +01:00
subreg_offset_representable_p (unsigned int xregno, machine_mode xmode,
unsigned int offset, machine_mode ymode)
{
struct subreg_info info;
subreg_get_info (xregno, xmode, offset, ymode, &info);
return info.representable_p;
}
/* Return the number of a YMODE register to which
(subreg:YMODE (reg:XMODE XREGNO) OFFSET)
can be simplified. Return -1 if the subreg can't be simplified.
XREGNO is a hard register number. */
int
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 13:02:45 +01:00
simplify_subreg_regno (unsigned int xregno, machine_mode xmode,
unsigned int offset, machine_mode ymode)
{
struct subreg_info info;
unsigned int yregno;
#ifdef CANNOT_CHANGE_MODE_CLASS
/* Give the backend a chance to disallow the mode change. */
if (GET_MODE_CLASS (xmode) != MODE_COMPLEX_INT
&& GET_MODE_CLASS (xmode) != MODE_COMPLEX_FLOAT
dbxout.c (dbxout_symbol_location): Pass new argument to alter_subreg. 2012-10-23 Vladimir Makarov <vmakarov@redhat.com> * dbxout.c (dbxout_symbol_location): Pass new argument to alter_subreg. * dwarf2out.c: Include ira.h and lra.h. (based_loc_descr, compute_frame_pointer_to_fb_displacement): Use lra_eliminate_regs for LRA instead of eliminate_regs. * expr.c (emit_move_insn_1): Pass an additional argument to emit_move_via_integer. Use emit_move_via_integer for LRA only if the insn is recognized. * emit-rtl.c (gen_rtx_REG): Add lra_in_progress. (validate_subreg): Don't check offset for LRA and floating point modes. * final.c (final_scan_insn, cleanup_subreg_operands): Pass new argument to alter_subreg. (walk_alter_subreg, output_operand): Ditto. (alter_subreg): Add new argument. * gcse.c (calculate_bb_reg_pressure): Add parameter to ira_setup_eliminable_regset call. * ira.c: Include lra.h. (ira_init_once, ira_init, ira_finish_once): Call lra_start_once, lra_init, lra_finish_once in anyway. (ira_setup_eliminable_regset): Add parameter. Remove need_fp. Call lra_init_elimination and mark HARD_FRAME_POINTER_REGNUM as living forever if frame_pointer_needed. (setup_reg_class_relations): Set up ira_reg_class_subset. (ira_reg_equiv_invariant_p, ira_reg_equiv_const): Remove. (find_reg_equiv_invariant_const): Ditto. (setup_reg_renumber): Use ira_equiv_no_lvalue_p instead of ira_reg_equiv_invariant_p. Skip caps for LRA. (setup_reg_equiv_init, ira_update_equiv_info_by_shuffle_insn): New functions. (ira_reg_equiv_len, ira_reg_equiv): New externals. (ira_reg_equiv): New. (ira_expand_reg_equiv, init_reg_equiv, finish_reg_equiv): New functions. (no_equiv, update_equiv_regs): Use ira_reg_equiv instead of reg_equiv_init. (setup_reg_equiv): New function. (ira_use_lra_p): New global. (ira): Set up lra_simple_p and ira_conflicts_p. Set up and restore flag_caller_saves and flag_ira_region. Move initialization of ira_obstack and ira_bitmap_obstack upper. Call init_reg_equiv, setup_reg_equiv, and setup_reg_equiv_init instead of initialization of ira_reg_equiv_len, ira_reg_equiv_invariant_p, and ira_reg_equiv_const. Call ira_setup_eliminable_regset with a new argument. Don't flatten IRA IRA for LRA. Don't reassign conflict allocnos for LRA. Call finish_reg_equiv. (do_reload): Prepare code for LRA call. Call LRA. * ira.h (ira_use_lra_p): New external. (struct target_ira): Add members x_ira_class_subset_p x_ira_reg_class_subset, and x_ira_reg_classes_intersect_p. (ira_class_subset_p, ira_reg_class_subset): New macros. (ira_reg_classes_intersect_p): New macro. (struct ira_reg_equiv): New. (ira_setup_eliminable_regset): Add an argument. (ira_expand_reg_equiv, ira_update_equiv_info_by_shuffle_insn): New prototypes. * ira-color.c (color_pass, move_spill_restore, coalesce_allocnos): Use ira_equiv_no_lvalue_p. (coalesce_spill_slots, ira_sort_regnos_for_alter_reg): Ditto. * ira-emit.c (ira_create_new_reg): Call ira_expand_reg_equiv. (generate_edge_moves, change_loop) Use ira_equiv_no_lvalue_p. (emit_move_list): Simplify code. Call ira_update_equiv_info_by_shuffle_insn. Use ira_reg_equiv instead of ira_reg_equiv_invariant_p and ira_reg_equiv_const. Change assert. * ira-int.h (struct target_ira_int): Remove x_ira_class_subset_p and x_ira_reg_classes_intersect_p. (ira_class_subset_p, ira_reg_classes_intersect_p): Remove. (ira_reg_equiv_len, ira_reg_equiv_invariant_p): Ditto. (ira_reg_equiv_const): Ditto. (ira_equiv_no_lvalue_p): New function. * jump.c (true_regnum): Always use hard_regno for subreg_get_info when lra is in progress. * haifa-sched.c (sched_init): Pass new argument to ira_setup_eliminable_regset. * loop-invariant.c (calculate_loop_reg_pressure): Pass new argument to ira_setup_eliminable_regset. * lra.h: New. * lra-int.h: Ditto. * lra.c: Ditto. * lra-assigns.c: Ditto. * lra-constraints.c: Ditto. * lra-coalesce.c: Ditto. * lra-eliminations.c: Ditto. * lra-lives.c: Ditto. * lra-spills.c: Ditto. * Makefile.in (LRA_INT_H): New. (OBJS): Add lra.o, lra-assigns.o, lra-coalesce.o, lra-constraints.o, lra-eliminations.o, lra-lives.o, and lra-spills.o. (dwarf2out.o): Add dependence on ira.h and lra.h. (ira.o): Add dependence on lra.h. (lra.o, lra-assigns.o, lra-coalesce.o, lra-constraints.o): New entries. (lra-eliminations.o, lra-lives.o, lra-spills.o): Ditto. * output.h (alter_subreg): Add new argument. * rtlanal.c (simplify_subreg_regno): Permit mode changes for LRA. Permit ARG_POINTER_REGNUM and STACK_POINTER_REGNUM for LRA. * recog.c (general_operand, register_operand): Accept paradoxical FLOAT_MODE subregs for LRA. (scratch_operand): Accept pseudos for LRA. * rtl.h (lra_in_progress): New external. (debug_bb_n_slim, debug_bb_slim, print_value_slim): New prototypes. (debug_rtl_slim, debug_insn_slim): Ditto. * sdbout.c (sdbout_symbol): Pass new argument to alter_subreg. * sched-vis.c (print_value_slim): New. * target.def (lra_p): New hook. (register_priority): Ditto. (different_addr_displacement_p): Ditto. (spill_class): Ditto. * target-globals.h (this_target_lra_int): New external. (target_globals): New member lra_int. (restore_target_globals): Restore this_target_lra_int. * target-globals.c: Include lra-int.h. (default_target_globals): Add &default_target_lra_int. * targhooks.c (default_lra_p): New function. (default_register_priority): Ditto. (default_different_addr_displacement_p): Ditto. * targhooks.h (default_lra_p): Declare. (default_register_priority): Ditto. (default_different_addr_displacement_p): Ditto. * timevar.def (TV_LRA, TV_LRA_ELIMINATE, TV_LRA_INHERITANCE): New. (TV_LRA_CREATE_LIVE_RANGES, TV_LRA_ASSIGN, TV_LRA_COALESCE): New. * config/arm/arm.c (load_multiple_sequence): Pass new argument toOB alter_subreg. (store_multiple_sequence): Ditto. * config/i386/i386.h (enum ix86_tune_indices): Add X86_TUNE_GENERAL_REGS_SSE_SPILL. (TARGET_GENERAL_REGS_SSE_SPILL): New macro. * config/i386/i386.c (initial_ix86_tune_features): Set up X86_TUNE_GENERAL_REGS_SSE_SPILL for m_COREI7 and m_CORE2I7. (ix86_lra_p, ix86_register_priority): New functions. (ix86_secondary_reload): Add NON_Q_REGS, SIREG, DIREG. (inline_secondary_memory_needed): Change assert. (ix86_spill_class): New function. (TARGET_LRA_P, TARGET_REGISTER_BANK, TARGET_SPILL_CLASS): New macros. * config/m68k/m68k.c (emit_move_sequence): Pass new argument to alter_subreg. * config/m32r/m32r.c (gen_split_move_double): Ditto. * config/pa/pa.c (pa_emit_move_sequence): Ditto. * config/sh/sh.md: Ditto. * config/v850/v850.c (v850_reorg): Ditto. * config/xtensa/xtensa.c (fixup_subreg_mem): Ditto. * doc/md.texi: Add new interpretation of hint * for LRA. * doc/passes.texi: Describe LRA pass. * doc/tm.texi.in: Add TARGET_LRA_P, TARGET_REGISTER_PRIORITY, TARGET_DIFFERENT_ADDR_DISPLACEMENT_P, and TARGET_SPILL_CLASS. * doc/tm.texi: Update. From-SVN: r192719
2012-10-23 17:51:41 +02:00
&& REG_CANNOT_CHANGE_MODE_P (xregno, xmode, ymode)
/* We can use mode change in LRA for some transformations. */
&& ! lra_in_progress)
return -1;
#endif
/* We shouldn't simplify stack-related registers. */
if ((!reload_completed || frame_pointer_needed)
&& xregno == FRAME_POINTER_REGNUM)
return -1;
if (FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
&& xregno == ARG_POINTER_REGNUM)
return -1;
dbxout.c (dbxout_symbol_location): Pass new argument to alter_subreg. 2012-10-23 Vladimir Makarov <vmakarov@redhat.com> * dbxout.c (dbxout_symbol_location): Pass new argument to alter_subreg. * dwarf2out.c: Include ira.h and lra.h. (based_loc_descr, compute_frame_pointer_to_fb_displacement): Use lra_eliminate_regs for LRA instead of eliminate_regs. * expr.c (emit_move_insn_1): Pass an additional argument to emit_move_via_integer. Use emit_move_via_integer for LRA only if the insn is recognized. * emit-rtl.c (gen_rtx_REG): Add lra_in_progress. (validate_subreg): Don't check offset for LRA and floating point modes. * final.c (final_scan_insn, cleanup_subreg_operands): Pass new argument to alter_subreg. (walk_alter_subreg, output_operand): Ditto. (alter_subreg): Add new argument. * gcse.c (calculate_bb_reg_pressure): Add parameter to ira_setup_eliminable_regset call. * ira.c: Include lra.h. (ira_init_once, ira_init, ira_finish_once): Call lra_start_once, lra_init, lra_finish_once in anyway. (ira_setup_eliminable_regset): Add parameter. Remove need_fp. Call lra_init_elimination and mark HARD_FRAME_POINTER_REGNUM as living forever if frame_pointer_needed. (setup_reg_class_relations): Set up ira_reg_class_subset. (ira_reg_equiv_invariant_p, ira_reg_equiv_const): Remove. (find_reg_equiv_invariant_const): Ditto. (setup_reg_renumber): Use ira_equiv_no_lvalue_p instead of ira_reg_equiv_invariant_p. Skip caps for LRA. (setup_reg_equiv_init, ira_update_equiv_info_by_shuffle_insn): New functions. (ira_reg_equiv_len, ira_reg_equiv): New externals. (ira_reg_equiv): New. (ira_expand_reg_equiv, init_reg_equiv, finish_reg_equiv): New functions. (no_equiv, update_equiv_regs): Use ira_reg_equiv instead of reg_equiv_init. (setup_reg_equiv): New function. (ira_use_lra_p): New global. (ira): Set up lra_simple_p and ira_conflicts_p. Set up and restore flag_caller_saves and flag_ira_region. Move initialization of ira_obstack and ira_bitmap_obstack upper. Call init_reg_equiv, setup_reg_equiv, and setup_reg_equiv_init instead of initialization of ira_reg_equiv_len, ira_reg_equiv_invariant_p, and ira_reg_equiv_const. Call ira_setup_eliminable_regset with a new argument. Don't flatten IRA IRA for LRA. Don't reassign conflict allocnos for LRA. Call finish_reg_equiv. (do_reload): Prepare code for LRA call. Call LRA. * ira.h (ira_use_lra_p): New external. (struct target_ira): Add members x_ira_class_subset_p x_ira_reg_class_subset, and x_ira_reg_classes_intersect_p. (ira_class_subset_p, ira_reg_class_subset): New macros. (ira_reg_classes_intersect_p): New macro. (struct ira_reg_equiv): New. (ira_setup_eliminable_regset): Add an argument. (ira_expand_reg_equiv, ira_update_equiv_info_by_shuffle_insn): New prototypes. * ira-color.c (color_pass, move_spill_restore, coalesce_allocnos): Use ira_equiv_no_lvalue_p. (coalesce_spill_slots, ira_sort_regnos_for_alter_reg): Ditto. * ira-emit.c (ira_create_new_reg): Call ira_expand_reg_equiv. (generate_edge_moves, change_loop) Use ira_equiv_no_lvalue_p. (emit_move_list): Simplify code. Call ira_update_equiv_info_by_shuffle_insn. Use ira_reg_equiv instead of ira_reg_equiv_invariant_p and ira_reg_equiv_const. Change assert. * ira-int.h (struct target_ira_int): Remove x_ira_class_subset_p and x_ira_reg_classes_intersect_p. (ira_class_subset_p, ira_reg_classes_intersect_p): Remove. (ira_reg_equiv_len, ira_reg_equiv_invariant_p): Ditto. (ira_reg_equiv_const): Ditto. (ira_equiv_no_lvalue_p): New function. * jump.c (true_regnum): Always use hard_regno for subreg_get_info when lra is in progress. * haifa-sched.c (sched_init): Pass new argument to ira_setup_eliminable_regset. * loop-invariant.c (calculate_loop_reg_pressure): Pass new argument to ira_setup_eliminable_regset. * lra.h: New. * lra-int.h: Ditto. * lra.c: Ditto. * lra-assigns.c: Ditto. * lra-constraints.c: Ditto. * lra-coalesce.c: Ditto. * lra-eliminations.c: Ditto. * lra-lives.c: Ditto. * lra-spills.c: Ditto. * Makefile.in (LRA_INT_H): New. (OBJS): Add lra.o, lra-assigns.o, lra-coalesce.o, lra-constraints.o, lra-eliminations.o, lra-lives.o, and lra-spills.o. (dwarf2out.o): Add dependence on ira.h and lra.h. (ira.o): Add dependence on lra.h. (lra.o, lra-assigns.o, lra-coalesce.o, lra-constraints.o): New entries. (lra-eliminations.o, lra-lives.o, lra-spills.o): Ditto. * output.h (alter_subreg): Add new argument. * rtlanal.c (simplify_subreg_regno): Permit mode changes for LRA. Permit ARG_POINTER_REGNUM and STACK_POINTER_REGNUM for LRA. * recog.c (general_operand, register_operand): Accept paradoxical FLOAT_MODE subregs for LRA. (scratch_operand): Accept pseudos for LRA. * rtl.h (lra_in_progress): New external. (debug_bb_n_slim, debug_bb_slim, print_value_slim): New prototypes. (debug_rtl_slim, debug_insn_slim): Ditto. * sdbout.c (sdbout_symbol): Pass new argument to alter_subreg. * sched-vis.c (print_value_slim): New. * target.def (lra_p): New hook. (register_priority): Ditto. (different_addr_displacement_p): Ditto. (spill_class): Ditto. * target-globals.h (this_target_lra_int): New external. (target_globals): New member lra_int. (restore_target_globals): Restore this_target_lra_int. * target-globals.c: Include lra-int.h. (default_target_globals): Add &default_target_lra_int. * targhooks.c (default_lra_p): New function. (default_register_priority): Ditto. (default_different_addr_displacement_p): Ditto. * targhooks.h (default_lra_p): Declare. (default_register_priority): Ditto. (default_different_addr_displacement_p): Ditto. * timevar.def (TV_LRA, TV_LRA_ELIMINATE, TV_LRA_INHERITANCE): New. (TV_LRA_CREATE_LIVE_RANGES, TV_LRA_ASSIGN, TV_LRA_COALESCE): New. * config/arm/arm.c (load_multiple_sequence): Pass new argument toOB alter_subreg. (store_multiple_sequence): Ditto. * config/i386/i386.h (enum ix86_tune_indices): Add X86_TUNE_GENERAL_REGS_SSE_SPILL. (TARGET_GENERAL_REGS_SSE_SPILL): New macro. * config/i386/i386.c (initial_ix86_tune_features): Set up X86_TUNE_GENERAL_REGS_SSE_SPILL for m_COREI7 and m_CORE2I7. (ix86_lra_p, ix86_register_priority): New functions. (ix86_secondary_reload): Add NON_Q_REGS, SIREG, DIREG. (inline_secondary_memory_needed): Change assert. (ix86_spill_class): New function. (TARGET_LRA_P, TARGET_REGISTER_BANK, TARGET_SPILL_CLASS): New macros. * config/m68k/m68k.c (emit_move_sequence): Pass new argument to alter_subreg. * config/m32r/m32r.c (gen_split_move_double): Ditto. * config/pa/pa.c (pa_emit_move_sequence): Ditto. * config/sh/sh.md: Ditto. * config/v850/v850.c (v850_reorg): Ditto. * config/xtensa/xtensa.c (fixup_subreg_mem): Ditto. * doc/md.texi: Add new interpretation of hint * for LRA. * doc/passes.texi: Describe LRA pass. * doc/tm.texi.in: Add TARGET_LRA_P, TARGET_REGISTER_PRIORITY, TARGET_DIFFERENT_ADDR_DISPLACEMENT_P, and TARGET_SPILL_CLASS. * doc/tm.texi: Update. From-SVN: r192719
2012-10-23 17:51:41 +02:00
if (xregno == STACK_POINTER_REGNUM
/* We should convert hard stack register in LRA if it is
possible. */
&& ! lra_in_progress)
return -1;
/* Try to get the register offset. */
subreg_get_info (xregno, xmode, offset, ymode, &info);
if (!info.representable_p)
return -1;
/* Make sure that the offsetted register value is in range. */
yregno = xregno + info.offset;
if (!HARD_REGISTER_NUM_P (yregno))
return -1;
/* See whether (reg:YMODE YREGNO) is valid.
??? We allow invalid registers if (reg:XMODE XREGNO) is also invalid.
This is a kludge to work around how complex FP arguments are passed
on IA-64 and should be fixed. See PR target/49226. */
if (!HARD_REGNO_MODE_OK (yregno, ymode)
&& HARD_REGNO_MODE_OK (xregno, xmode))
return -1;
return (int) yregno;
}
/* Return the final regno that a subreg expression refers to. */
unsigned int
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
subreg_regno (const_rtx x)
Use byte offsets in SUBREGs instead of words. 2001-04-03 Jakub Jelinek <jakub@redhat.com> David S. Miller <davem@pierdol.cobaltmicro.com> Andrew MacLeod <amacleod@redhat.com> Use byte offsets in SUBREGs instead of words. * alias.c (nonlocal_mentioned_p): Use subreg_regno function. * caller-save.c (mark_set_regs): Change callers of subreg_hard_regno to pass new argument. (add_stored_regs): Use subreg_regno_offset function. * calls.c (expand_call): For non-paradoxical SUBREG take endianess into account. (precompute_arguments): Use gen_lowpart_SUBREG. * combine.c (try_combine): Replace explicit XEXP with SUBREG_REG. (combine_simplify_rtx): Rework to use SUBREG_BYTE. (simplify_set): Rework to use SUBREG_BYTE. (expand_field_assignment): Use SUBREG_BYTE. (make_extraction): Use SUBREG_BYTE. (if_then_else_cond): Use SUBREG_BYTE. (apply_distributive_law): Use SUBREG_BYTE and fixup subreg comments. (gen_lowpart_for_combine): Compute full byte offset. * cse.c (mention_regs): Use SUBREG_BYTE. (remove_invalid_subreg_refs): Rework to use SUBREG_BYTE. (canon_hash): Use SUBREG_BYTE. (fold_rtx): Pass SUBREG_BYTE div UNITS_PER_WORD to operand_subword. (gen_lowpart_if_possible): Formatting. * dbxout.c (dbxout_symbol_location): Compute SUBREG hard regnos correctly. * dwarf2out.c (is_pseudo_reg): Fixup explicit XEXP into SUBREG_REG (mem_loc_descriptor): Fixup explicit XEXP into SUBREG_REG (loc_descriptor): Fixup explicit XEXP into SUBREG_REG * dwarfout.c (is_pseudo_reg): Fixup explicit XEXP into SUBREG_REG (output_mem_loc_descriptor): Fixup explicit XEXP into SUBREG_REG (output_loc_descriptor): Fixup explicit XEXP into SUBREG_REG * emit-rtl.c (gen_rtx_SUBREG): New function, used to verify certain invariants about SUBREGs the compiler creates. (gen_lowpart_SUBREG): New function. (subreg_hard_regno): New function to get the final register number. (gen_lowpart_common): Use SUBREG_BYTE. (gen_imagpart): Spacing nits. (subreg_realpart_p): Use SUBREG_BYTE. (gen_highpart): Use SUBREG_BYTE. (subreg_lowpart_p): Always compute endian corrected goal offset, even at the byte level, then compare against that. (constant_subword): New function, pulled out all constant cases from operand_subword and changed second argument name to offset. (operand_subword): Detect non REG/SUBREG/CONCAT/MEM cases early and call constant_subword to do the work. Return const0_rtx if looking for a word outside of OP. (operand_subword_force): Change second arg name to offset. * expmed.c (store_bit_field): Use SUBREG_BYTE. (store_split_bit_field): Use SUBREG_BYTE. (extract_bit_field): Use SUBREG_BYTE. (extract_split_bit_field): Use SUBREG_BYTE. (expand_shift): Use SUBREG_BYTE. * expr.c (store_expr, expand_expr): Use gen_lowpart_SUBREG. * final.c (alter_subreg) Use subreg_hard_regno and SUBREG_BYTE. * flow.c (set_noop_p): Use SUBREG_BYTE. (mark_set_1): Remove ALTER_HARD_SUBREG. Use subreg_regno_offset instead. * function.c (fixup_var_refs_1): Fixup explicit XEXP into a SUBREG_REG. (fixup_memory_subreg): Use SUBREG_BYTE and remove byte endian correction code. (optimize_bit_field): Use SUBREG_BYTE. (purge_addressof_1): Use SUBREG_BYTE. (purge_single_hard_subreg_set): Use subreg_regno_offset function. (assign_params): Mark arguments SUBREG_PROMOTED_VAR_P if they are actually promoted by the caller and PROMOTE_FOR_CALLS_ONLY is true. * gengenrtl.c (special_rtx): Add SUBREG. * global.c (mark_reg_store): Use SUBREG_BYTE. (set_preference): Rework to use subreg_regno_offset and SUBREG_BYTE. * ifcvt (noce_emit_move_insn): Use SUBREG_BYTE. * integrate.c (copy_rtx_and_substitute): Use SUBREG_BYTE and make sure final byte offset is congruent to subreg's mode size. (subst_constants): Use SUBREG_BYTE. (mark_stores): Use subreg_regno_offset function. * jump.c (rtx_renumbered_equal_p, true_regnum): Use subreg_regno_offset function and SUBREG_BYTE. * local-alloc.c (combine_regs): Use subreg_regno_offset function. (reg_is_born): Use subreg_hard_regno. * recog.c (valid_replace_rtx_1): Use SUBREG_BYTE and remove byte endian correction code. Don't combine subregs unless resulting offset aligns with type. Fix subreg constant extraction for DImode. Simplify SUBREG of VOIDmode CONST_DOUBLE. (general_operand): Remove dead mode_altering_drug code. (indirect_operand): Use SUBREG_BYTE. (constrain_operands): Use subreg_regno_offset function. * reg-stack.c (get_true_reg): Use subreg_regno_offset function. * regmove.c (regmove_optimize): Use SUBREG_BYTE. (optimize_reg_copy_3): Use gen_lowpart_SUBREG. * regs.h (REG_SIZE): Allow target to override. (REGMODE_NATURAL_SIZE): New macro which target can override. * reload.c (reload_inner_reg_of_subreg): subreg_regno should be used on the entire subreg rtx. (push_reload): Use SUBREG_BYTE in comments and code. (find_dummy_reload): Use subreg_regno_offset. Only adjust offsets for hard registers inside subregs. (operands_match_p): Use subreg_regno_offset. (find_reloads): Use SUBREG_BYTE and only advance offset for subregs containing hard regs. (find_reload_toplev): Use SUBREG_BYTE. Remove byte endian corrections when fixing up MEM subregs. (find_reloads_address_1): Use SUBREG_BYTE, subreg_regno, and subreg_regno_offset where appropriate. (find_reloads_subreg_address): Use SUBREG_BYTE. Remove byte endian corrections when fixing up MEM subregs. (subst_reloads): When combining two subregs, make sure final offset is congruent to subreg's mode size. (find_replacement): Use SUBREG_BYTE and subreg_regno_offset. (refers_to_regno_for_reload_p): Use subreg_regno. (reg_overlap_mentioned_for_reload_p): Use subreg_regno_offset. * reload1.c (eliminate_regs) Use SUBREG_BYTE. Remove byte endian correction code for memory subreg fixups. (forget_old_reload_1): Use subreg_regno_offset. (choose_reload_regs): Use subreg_regno. (emit_input_reload_insns): Use SUBREG_BYTE. (reload_combine_note_store): Use subreg_regno_offset. (move2add_note_store): Use subreg_regno_offset. * resource.c (update_live_status, mark_referenced_resources): Use subreg_regno function. (mark_set_resources): Use subreg_regno function. * rtl.h (SUBREG_WORD): Rename to SUBREG_BYTE. (subreg_regno_offset, subreg_regno): Define prototypes. (subreg_hard_regno, constant_subword, gen_rtx_SUBREG): Newi functions. (gen_lowpart_SUBREG): Add prototype. * rtl.texi (subreg): Update to reflect new byte offset representation. Add mentioning of the effect that BYTES_BIG_ENDIAN has on subregs now. * rtlanal.c (refers_to_regno_p): Use subreg_regno. (reg_overlap_mentioned_p): Use subreg_regno. (replace_regs); Make sure final offset of combined subreg is congruent to size of subreg's mode. (subreg_regno_offset): New function. (subreg_regno): New function. * sched-vis.c (print_value): Change SUBREG_WORD to SUBREG_BYTE. * sdbout.c (sdbout_symbol): Compute offset using alter_subreg. * stmt.c (expand_anon_union_decl): Use gen_lowpart_SUBREG. * tm.texi (ALTER_HARD_SUBREG): Remove, it is now dead. (SUBREG_REGNO_OFFSET): Describe SUBREG_REGNO_OFFSET overrides. * config/a29k/a29k.c (gpc_reg_operand): Use subreg_regno. (a29k_get_reloaded_address): Use SUBREG_BYTE. (print_operand): Use SUBREG_BYTE. * config/alpha/alpha.c (print_operand_address): Use SUBREG_BYTE. * config/arm/arm.c (arm_reload_in_hi): Use SUBREG_BYTE. (arm_reload_out_hi): Use SUBREG_BYTE. * config/d30v/d30v.c (d30v_split_double): Use subreg_regno_offset instead of SUBREG_WORD. (d30v_print_operand_memory_reference): Use subreg_regno_offset. * config/dsp16xx/dsp16xx.md (extendqihi2, zero_extendqihi2): Fix SUBREG creation to use byte offset. * config/h8300/h8300.md (Unnamed HImode zero extraction and 16bit inverted load insns): Fix explicit rtl subregs to use byte offsets. * config/i370/i370.md (cmpstrsi, movstrsi, mulsi3, divsi3, udivsi3, umodsi3): Generate SUBREGs with byte offsets. * config/i860/i860.c (single_insn_src_p): Use SUBREG_BYTE. * config/i860/i860.md (mulsi3_big): Fixup explicit SUBREGs in rtl to use byte offsets. (unnamed fmlow.dd insn): Fixup SUBREGS to use byte offsets. * config/i960/i960.md (extendhisi2): Generate SUBREGs with byte offsets, also make sure it is congruent to SUBREG's mode size. (extendqisi2, extendqihi2, zero_extendhisi2, zero_extendqisi2, unnamed ldob insn): Generate SUBREGs with byte offset. (zero_extendqihi2): SUBREG's are byte offsets. * config/m68hc11/m68hc11.c (m68hc11_gen_lowpart): Use SUBREG_BYTE. (m68hc11_gen_highpart): Use SUBREG_BYTE. * config/m68k/m68k.md (zero_extendhisi2, zero_extendqihi2, zero-extendqisi2): Generate SUBREGs with byte offset. (umulsidi3, mulsidi3, subreghi1ashrdi_const32, subregsi1ashrdi_const32, subreg1lshrdi_const32): Fixup explicit subregs in rtl to use byte offsets. * config/m88k/m88k.md (extendsidi2): fixup subregs to use byte offset. * config/mips/mips.c (mips_move_1word): Use subreg_regno_offset. (mips_move_2words): Use subreg_regno_offset. (mips_secondary_reload_class): Use subreg_regno_offset. * config/mips/mips.md (DImode plus, minus, move, and logical op splits): Fixup explicit subregs in rtl to use byte offsets. * config/mn10200/mn10200.c (print_operand): Use subreg_regno function. * config/mn10300/mn10300.c (print_operand): Use subreg_regno function. * config/ns32k/ns32k.md (udivmoddisi4): Fix explicit subregs in rtl to use byte offsets. * config/pa/pa.c (emit_move_sequence): Use SUBREG_BYTE. * config/pa/pa.md (floatunssisf2, floatunssidf2, mulsi3): fix explicit subregs to use byte offsets. * config/pdp11/pdp11.md (zero_extendhisi2, modhi3, modhi3+1): Fixup explicit subregs in rtl to use byte offsets. * config/romp/romp.c (memory_offset_in_range_p): Use SUBREG_BYTE and remove byte endian correction code. * config/sh/sh.c (output_movedouble): Use subreg_regno. (gen_ashift_hi): Use SUBREG_BYTE. (regs_used): Use subreg_regno_offset. (machine_dependent_reorg): Use subreg_regno_offset. * config/sh/sh.h (INDEX_REGISTER_RTX_P): Use SUBREG_BYTE. * config/sh/sh.md (DImode and DFmode move splits): Use subreg_regno. (movdf_i4): Subregs are byte offsets now. * config/sparc/sparc.c (ultra_find_type): Use SUBREG_BYTE. * config/sparc/sparc.h (ALTER_HARD_SUBREG): Removed. (REGMODE_NATURAL_SIZE): Override. (REG_SIZE): For SUBREG check float mode on SUBREG_REG's mode. * config/sparc/sparc.md (TFmode move splits): Generate SUBREGs with byte offsets. (zero_extendhisi2, zero_extendqidi2_insn, extendhisi2, extendqihi2, sign_extendqihi2_insn, sign_extendqisi2_insn, extendqidi2): Generate SUBREGs with byte offsets, also make sure it is congruent to SUBREG's mode size. (smulsi3_highpart_v8plus): Fix explicit subregs in rtl to use byte offsets. (cmp_siqi_trunc, cmp_siqi_trunc_set, cmp_diqi_trunc, cmp_diqi_trunc_set, lshrdi3_v8plus+1, lshrdi3_v8plus+2, lshrdi3_v8plus+3, lshrdi3_v8plus+4): Use proper SUBREG_BYTE offset for non-paradoxical subregs in patterns. * config/v850/v850.c (print_operand, output_move_double): Use subreg_regno function. Co-Authored-By: Andrew MacLeod <amacleod@redhat.com> Co-Authored-By: David S. Miller <davem@pierdol.cobaltmicro.com> From-SVN: r41058
2001-04-03 17:06:12 +02:00
{
unsigned int ret;
rtx subreg = SUBREG_REG (x);
int regno = REGNO (subreg);
ret = regno + subreg_regno_offset (regno,
GET_MODE (subreg),
Use byte offsets in SUBREGs instead of words. 2001-04-03 Jakub Jelinek <jakub@redhat.com> David S. Miller <davem@pierdol.cobaltmicro.com> Andrew MacLeod <amacleod@redhat.com> Use byte offsets in SUBREGs instead of words. * alias.c (nonlocal_mentioned_p): Use subreg_regno function. * caller-save.c (mark_set_regs): Change callers of subreg_hard_regno to pass new argument. (add_stored_regs): Use subreg_regno_offset function. * calls.c (expand_call): For non-paradoxical SUBREG take endianess into account. (precompute_arguments): Use gen_lowpart_SUBREG. * combine.c (try_combine): Replace explicit XEXP with SUBREG_REG. (combine_simplify_rtx): Rework to use SUBREG_BYTE. (simplify_set): Rework to use SUBREG_BYTE. (expand_field_assignment): Use SUBREG_BYTE. (make_extraction): Use SUBREG_BYTE. (if_then_else_cond): Use SUBREG_BYTE. (apply_distributive_law): Use SUBREG_BYTE and fixup subreg comments. (gen_lowpart_for_combine): Compute full byte offset. * cse.c (mention_regs): Use SUBREG_BYTE. (remove_invalid_subreg_refs): Rework to use SUBREG_BYTE. (canon_hash): Use SUBREG_BYTE. (fold_rtx): Pass SUBREG_BYTE div UNITS_PER_WORD to operand_subword. (gen_lowpart_if_possible): Formatting. * dbxout.c (dbxout_symbol_location): Compute SUBREG hard regnos correctly. * dwarf2out.c (is_pseudo_reg): Fixup explicit XEXP into SUBREG_REG (mem_loc_descriptor): Fixup explicit XEXP into SUBREG_REG (loc_descriptor): Fixup explicit XEXP into SUBREG_REG * dwarfout.c (is_pseudo_reg): Fixup explicit XEXP into SUBREG_REG (output_mem_loc_descriptor): Fixup explicit XEXP into SUBREG_REG (output_loc_descriptor): Fixup explicit XEXP into SUBREG_REG * emit-rtl.c (gen_rtx_SUBREG): New function, used to verify certain invariants about SUBREGs the compiler creates. (gen_lowpart_SUBREG): New function. (subreg_hard_regno): New function to get the final register number. (gen_lowpart_common): Use SUBREG_BYTE. (gen_imagpart): Spacing nits. (subreg_realpart_p): Use SUBREG_BYTE. (gen_highpart): Use SUBREG_BYTE. (subreg_lowpart_p): Always compute endian corrected goal offset, even at the byte level, then compare against that. (constant_subword): New function, pulled out all constant cases from operand_subword and changed second argument name to offset. (operand_subword): Detect non REG/SUBREG/CONCAT/MEM cases early and call constant_subword to do the work. Return const0_rtx if looking for a word outside of OP. (operand_subword_force): Change second arg name to offset. * expmed.c (store_bit_field): Use SUBREG_BYTE. (store_split_bit_field): Use SUBREG_BYTE. (extract_bit_field): Use SUBREG_BYTE. (extract_split_bit_field): Use SUBREG_BYTE. (expand_shift): Use SUBREG_BYTE. * expr.c (store_expr, expand_expr): Use gen_lowpart_SUBREG. * final.c (alter_subreg) Use subreg_hard_regno and SUBREG_BYTE. * flow.c (set_noop_p): Use SUBREG_BYTE. (mark_set_1): Remove ALTER_HARD_SUBREG. Use subreg_regno_offset instead. * function.c (fixup_var_refs_1): Fixup explicit XEXP into a SUBREG_REG. (fixup_memory_subreg): Use SUBREG_BYTE and remove byte endian correction code. (optimize_bit_field): Use SUBREG_BYTE. (purge_addressof_1): Use SUBREG_BYTE. (purge_single_hard_subreg_set): Use subreg_regno_offset function. (assign_params): Mark arguments SUBREG_PROMOTED_VAR_P if they are actually promoted by the caller and PROMOTE_FOR_CALLS_ONLY is true. * gengenrtl.c (special_rtx): Add SUBREG. * global.c (mark_reg_store): Use SUBREG_BYTE. (set_preference): Rework to use subreg_regno_offset and SUBREG_BYTE. * ifcvt (noce_emit_move_insn): Use SUBREG_BYTE. * integrate.c (copy_rtx_and_substitute): Use SUBREG_BYTE and make sure final byte offset is congruent to subreg's mode size. (subst_constants): Use SUBREG_BYTE. (mark_stores): Use subreg_regno_offset function. * jump.c (rtx_renumbered_equal_p, true_regnum): Use subreg_regno_offset function and SUBREG_BYTE. * local-alloc.c (combine_regs): Use subreg_regno_offset function. (reg_is_born): Use subreg_hard_regno. * recog.c (valid_replace_rtx_1): Use SUBREG_BYTE and remove byte endian correction code. Don't combine subregs unless resulting offset aligns with type. Fix subreg constant extraction for DImode. Simplify SUBREG of VOIDmode CONST_DOUBLE. (general_operand): Remove dead mode_altering_drug code. (indirect_operand): Use SUBREG_BYTE. (constrain_operands): Use subreg_regno_offset function. * reg-stack.c (get_true_reg): Use subreg_regno_offset function. * regmove.c (regmove_optimize): Use SUBREG_BYTE. (optimize_reg_copy_3): Use gen_lowpart_SUBREG. * regs.h (REG_SIZE): Allow target to override. (REGMODE_NATURAL_SIZE): New macro which target can override. * reload.c (reload_inner_reg_of_subreg): subreg_regno should be used on the entire subreg rtx. (push_reload): Use SUBREG_BYTE in comments and code. (find_dummy_reload): Use subreg_regno_offset. Only adjust offsets for hard registers inside subregs. (operands_match_p): Use subreg_regno_offset. (find_reloads): Use SUBREG_BYTE and only advance offset for subregs containing hard regs. (find_reload_toplev): Use SUBREG_BYTE. Remove byte endian corrections when fixing up MEM subregs. (find_reloads_address_1): Use SUBREG_BYTE, subreg_regno, and subreg_regno_offset where appropriate. (find_reloads_subreg_address): Use SUBREG_BYTE. Remove byte endian corrections when fixing up MEM subregs. (subst_reloads): When combining two subregs, make sure final offset is congruent to subreg's mode size. (find_replacement): Use SUBREG_BYTE and subreg_regno_offset. (refers_to_regno_for_reload_p): Use subreg_regno. (reg_overlap_mentioned_for_reload_p): Use subreg_regno_offset. * reload1.c (eliminate_regs) Use SUBREG_BYTE. Remove byte endian correction code for memory subreg fixups. (forget_old_reload_1): Use subreg_regno_offset. (choose_reload_regs): Use subreg_regno. (emit_input_reload_insns): Use SUBREG_BYTE. (reload_combine_note_store): Use subreg_regno_offset. (move2add_note_store): Use subreg_regno_offset. * resource.c (update_live_status, mark_referenced_resources): Use subreg_regno function. (mark_set_resources): Use subreg_regno function. * rtl.h (SUBREG_WORD): Rename to SUBREG_BYTE. (subreg_regno_offset, subreg_regno): Define prototypes. (subreg_hard_regno, constant_subword, gen_rtx_SUBREG): Newi functions. (gen_lowpart_SUBREG): Add prototype. * rtl.texi (subreg): Update to reflect new byte offset representation. Add mentioning of the effect that BYTES_BIG_ENDIAN has on subregs now. * rtlanal.c (refers_to_regno_p): Use subreg_regno. (reg_overlap_mentioned_p): Use subreg_regno. (replace_regs); Make sure final offset of combined subreg is congruent to size of subreg's mode. (subreg_regno_offset): New function. (subreg_regno): New function. * sched-vis.c (print_value): Change SUBREG_WORD to SUBREG_BYTE. * sdbout.c (sdbout_symbol): Compute offset using alter_subreg. * stmt.c (expand_anon_union_decl): Use gen_lowpart_SUBREG. * tm.texi (ALTER_HARD_SUBREG): Remove, it is now dead. (SUBREG_REGNO_OFFSET): Describe SUBREG_REGNO_OFFSET overrides. * config/a29k/a29k.c (gpc_reg_operand): Use subreg_regno. (a29k_get_reloaded_address): Use SUBREG_BYTE. (print_operand): Use SUBREG_BYTE. * config/alpha/alpha.c (print_operand_address): Use SUBREG_BYTE. * config/arm/arm.c (arm_reload_in_hi): Use SUBREG_BYTE. (arm_reload_out_hi): Use SUBREG_BYTE. * config/d30v/d30v.c (d30v_split_double): Use subreg_regno_offset instead of SUBREG_WORD. (d30v_print_operand_memory_reference): Use subreg_regno_offset. * config/dsp16xx/dsp16xx.md (extendqihi2, zero_extendqihi2): Fix SUBREG creation to use byte offset. * config/h8300/h8300.md (Unnamed HImode zero extraction and 16bit inverted load insns): Fix explicit rtl subregs to use byte offsets. * config/i370/i370.md (cmpstrsi, movstrsi, mulsi3, divsi3, udivsi3, umodsi3): Generate SUBREGs with byte offsets. * config/i860/i860.c (single_insn_src_p): Use SUBREG_BYTE. * config/i860/i860.md (mulsi3_big): Fixup explicit SUBREGs in rtl to use byte offsets. (unnamed fmlow.dd insn): Fixup SUBREGS to use byte offsets. * config/i960/i960.md (extendhisi2): Generate SUBREGs with byte offsets, also make sure it is congruent to SUBREG's mode size. (extendqisi2, extendqihi2, zero_extendhisi2, zero_extendqisi2, unnamed ldob insn): Generate SUBREGs with byte offset. (zero_extendqihi2): SUBREG's are byte offsets. * config/m68hc11/m68hc11.c (m68hc11_gen_lowpart): Use SUBREG_BYTE. (m68hc11_gen_highpart): Use SUBREG_BYTE. * config/m68k/m68k.md (zero_extendhisi2, zero_extendqihi2, zero-extendqisi2): Generate SUBREGs with byte offset. (umulsidi3, mulsidi3, subreghi1ashrdi_const32, subregsi1ashrdi_const32, subreg1lshrdi_const32): Fixup explicit subregs in rtl to use byte offsets. * config/m88k/m88k.md (extendsidi2): fixup subregs to use byte offset. * config/mips/mips.c (mips_move_1word): Use subreg_regno_offset. (mips_move_2words): Use subreg_regno_offset. (mips_secondary_reload_class): Use subreg_regno_offset. * config/mips/mips.md (DImode plus, minus, move, and logical op splits): Fixup explicit subregs in rtl to use byte offsets. * config/mn10200/mn10200.c (print_operand): Use subreg_regno function. * config/mn10300/mn10300.c (print_operand): Use subreg_regno function. * config/ns32k/ns32k.md (udivmoddisi4): Fix explicit subregs in rtl to use byte offsets. * config/pa/pa.c (emit_move_sequence): Use SUBREG_BYTE. * config/pa/pa.md (floatunssisf2, floatunssidf2, mulsi3): fix explicit subregs to use byte offsets. * config/pdp11/pdp11.md (zero_extendhisi2, modhi3, modhi3+1): Fixup explicit subregs in rtl to use byte offsets. * config/romp/romp.c (memory_offset_in_range_p): Use SUBREG_BYTE and remove byte endian correction code. * config/sh/sh.c (output_movedouble): Use subreg_regno. (gen_ashift_hi): Use SUBREG_BYTE. (regs_used): Use subreg_regno_offset. (machine_dependent_reorg): Use subreg_regno_offset. * config/sh/sh.h (INDEX_REGISTER_RTX_P): Use SUBREG_BYTE. * config/sh/sh.md (DImode and DFmode move splits): Use subreg_regno. (movdf_i4): Subregs are byte offsets now. * config/sparc/sparc.c (ultra_find_type): Use SUBREG_BYTE. * config/sparc/sparc.h (ALTER_HARD_SUBREG): Removed. (REGMODE_NATURAL_SIZE): Override. (REG_SIZE): For SUBREG check float mode on SUBREG_REG's mode. * config/sparc/sparc.md (TFmode move splits): Generate SUBREGs with byte offsets. (zero_extendhisi2, zero_extendqidi2_insn, extendhisi2, extendqihi2, sign_extendqihi2_insn, sign_extendqisi2_insn, extendqidi2): Generate SUBREGs with byte offsets, also make sure it is congruent to SUBREG's mode size. (smulsi3_highpart_v8plus): Fix explicit subregs in rtl to use byte offsets. (cmp_siqi_trunc, cmp_siqi_trunc_set, cmp_diqi_trunc, cmp_diqi_trunc_set, lshrdi3_v8plus+1, lshrdi3_v8plus+2, lshrdi3_v8plus+3, lshrdi3_v8plus+4): Use proper SUBREG_BYTE offset for non-paradoxical subregs in patterns. * config/v850/v850.c (print_operand, output_move_double): Use subreg_regno function. Co-Authored-By: Andrew MacLeod <amacleod@redhat.com> Co-Authored-By: David S. Miller <davem@pierdol.cobaltmicro.com> From-SVN: r41058
2001-04-03 17:06:12 +02:00
SUBREG_BYTE (x),
GET_MODE (x));
return ret;
}
/* Return the number of registers that a subreg expression refers
to. */
unsigned int
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
subreg_nregs (const_rtx x)
ra-conflict.c: New file. 2007-09-02 Kenneth Zadeck <zadeck@naturalbridge.com> * ra-conflict.c: New file. * ra.h: New file. * reload.c (push_reload, find_dummy_reload): Change DF_RA_LIVE usage to DF_LIVE usage. * rtlanal.c (subreg_nregs_with_regno): New function. * df-scan.c (df_def_record_1, df_uses_record): Add code to set DF_REF_EXTRACT, DF_REF_STRICT_LOWER_PART, and DF_REF_SUBREG flags. (df_has_eh_preds): Removed. (df_bb_refs_collect, df_bb_refs_collect, df_bb_refs_collect, df_exit_block_uses_collect): Changed call from df_has_eh_preds to bb_has_eh_pred. * global.c (allocno, max_allocno, conflicts, allocno_row_words, reg_allocno, EXECUTE_IF_SET_IN_ALLOCNO_SET): Moved to ra.h (SET_ALLOCNO_LIVE, CLEAR_ALLOCNO_LIVE): Moved to ra-conflicts.c. (regs_set, record_one_conflict, record_conflicts, mark_reg_store, mark_reg_clobber, mark_reg_conflicts, mark_reg_death): Deleted. (global_alloc): Turn off rescanning insns after call to global_conflicts and added call to set_preferences. (global_conflicts): Moved to ra-alloc.c. (set_preferences_1, set_preferences): New function. (mirror_conflicts): Changed types for various variables. (mark_elimination): Change DF_RA_LIVE usage to DF_LIVE usage. (build_insn_chain): Rewritten from scratch and made local. (print_insn_chain, print_insn_chains): New functions. (dump_conflicts): Do not print conflicts for fixed_regs. (rest_of_handle_global_alloc): Turn off insn rescanning. * hard-reg-set.h: Fixed comment. * local-alloc.c (update_equiv_regs): Change DF_RA_LIVE usage to DF_LIVE usage and delete refs to TOP sets. (block_alloc): Mark regs as live if they are in the artificial defs at top of block. (find_stack_regs): New function. (rest_of_handle_local_alloc): Changed urec problem to live problem and do not turn off df rescanning. * df.h (DF_UREC, DF_UREC_BB_INFO, DF_LIVE_TOP, DF_RA_LIVE_IN, DF_RA_LIVE_TOP, DF_RA_LIVE_OUT, df_urec_bb_info, df_urec, df_urec_add_problem, df_urec_get_bb_info, df_has_eh_preds): Removed. (DF_CHAIN, DF_NOTE, DF_CHAIN): Renumbered. (DF_REF_EXTRACT, DF_REF_STRICT_LOWER_PART, DF_REF_SUBREG): New fields in df_ref_flags. The rest have been renumbered. * init-regs.c (initialize_uninitialized_regs): Enhanced debugging at -O1. * rtl.h (subreg_nregs_with_regno): New function. * df-problems.c: (df_get_live_out, df_get_live_in, df_get_live_top): Removed reference to DF_RA_LIVE. (df_lr_reset, df_lr_transfer_function, df_live_free_bb_info, df_live_alloc, df_live_reset, df_live_local_finalize, df_live_free): Make top set only if different from in set. (df_lr_top_dump, df_live_top_dump): Only print top set if different from in set. (df_lr_bb_local_compute): Removed unnecessary check. (df_urec_problem_data, df_urec_set_bb_info, df_urec_free_bb_info, df_urec_alloc, df_urec_mark_reg_change, earlyclobber_regclass, df_urec_check_earlyclobber, df_urec_mark_reg_use_for_earlyclobber, df_urec_mark_reg_use_for_earlyclobber_1, df_urec_bb_local_compute, df_urec_local_compute, df_urec_init, df_urec_local_finalize, df_urec_confluence_n, df_urec_transfer_function, df_urec_free, df_urec_top_dump, df_urec_bottom_dump, problem_UREC, df_urec_add_problem): Removed. (df_simulate_fixup_sets): Changed call from df_has_eh_preds to bb_has_eh_pred. * Makefile.in (ra-conflict.o, ra.h): New dependencies. * basic_block.h (bb_has_abnormal_pred): New function. * reload1.c (compute_use_by_pseudos): Change DF_RA_LIVE usage to DF_LIVE usage. From-SVN: r128957
2007-10-02 15:10:07 +02:00
{
return subreg_nregs_with_regno (REGNO (SUBREG_REG (x)), x);
}
/* Return the number of registers that a subreg REG with REGNO
expression refers to. This is a copy of the rtlanal.c:subreg_nregs
changed so that the regno can be passed in. */
unsigned int
subreg_nregs_with_regno (unsigned int regno, const_rtx x)
{
struct subreg_info info;
rtx subreg = SUBREG_REG (x);
subreg_get_info (regno, GET_MODE (subreg), SUBREG_BYTE (x), GET_MODE (x),
&info);
return info.nregs;
}
ra-conflict.c: New file. 2007-09-02 Kenneth Zadeck <zadeck@naturalbridge.com> * ra-conflict.c: New file. * ra.h: New file. * reload.c (push_reload, find_dummy_reload): Change DF_RA_LIVE usage to DF_LIVE usage. * rtlanal.c (subreg_nregs_with_regno): New function. * df-scan.c (df_def_record_1, df_uses_record): Add code to set DF_REF_EXTRACT, DF_REF_STRICT_LOWER_PART, and DF_REF_SUBREG flags. (df_has_eh_preds): Removed. (df_bb_refs_collect, df_bb_refs_collect, df_bb_refs_collect, df_exit_block_uses_collect): Changed call from df_has_eh_preds to bb_has_eh_pred. * global.c (allocno, max_allocno, conflicts, allocno_row_words, reg_allocno, EXECUTE_IF_SET_IN_ALLOCNO_SET): Moved to ra.h (SET_ALLOCNO_LIVE, CLEAR_ALLOCNO_LIVE): Moved to ra-conflicts.c. (regs_set, record_one_conflict, record_conflicts, mark_reg_store, mark_reg_clobber, mark_reg_conflicts, mark_reg_death): Deleted. (global_alloc): Turn off rescanning insns after call to global_conflicts and added call to set_preferences. (global_conflicts): Moved to ra-alloc.c. (set_preferences_1, set_preferences): New function. (mirror_conflicts): Changed types for various variables. (mark_elimination): Change DF_RA_LIVE usage to DF_LIVE usage. (build_insn_chain): Rewritten from scratch and made local. (print_insn_chain, print_insn_chains): New functions. (dump_conflicts): Do not print conflicts for fixed_regs. (rest_of_handle_global_alloc): Turn off insn rescanning. * hard-reg-set.h: Fixed comment. * local-alloc.c (update_equiv_regs): Change DF_RA_LIVE usage to DF_LIVE usage and delete refs to TOP sets. (block_alloc): Mark regs as live if they are in the artificial defs at top of block. (find_stack_regs): New function. (rest_of_handle_local_alloc): Changed urec problem to live problem and do not turn off df rescanning. * df.h (DF_UREC, DF_UREC_BB_INFO, DF_LIVE_TOP, DF_RA_LIVE_IN, DF_RA_LIVE_TOP, DF_RA_LIVE_OUT, df_urec_bb_info, df_urec, df_urec_add_problem, df_urec_get_bb_info, df_has_eh_preds): Removed. (DF_CHAIN, DF_NOTE, DF_CHAIN): Renumbered. (DF_REF_EXTRACT, DF_REF_STRICT_LOWER_PART, DF_REF_SUBREG): New fields in df_ref_flags. The rest have been renumbered. * init-regs.c (initialize_uninitialized_regs): Enhanced debugging at -O1. * rtl.h (subreg_nregs_with_regno): New function. * df-problems.c: (df_get_live_out, df_get_live_in, df_get_live_top): Removed reference to DF_RA_LIVE. (df_lr_reset, df_lr_transfer_function, df_live_free_bb_info, df_live_alloc, df_live_reset, df_live_local_finalize, df_live_free): Make top set only if different from in set. (df_lr_top_dump, df_live_top_dump): Only print top set if different from in set. (df_lr_bb_local_compute): Removed unnecessary check. (df_urec_problem_data, df_urec_set_bb_info, df_urec_free_bb_info, df_urec_alloc, df_urec_mark_reg_change, earlyclobber_regclass, df_urec_check_earlyclobber, df_urec_mark_reg_use_for_earlyclobber, df_urec_mark_reg_use_for_earlyclobber_1, df_urec_bb_local_compute, df_urec_local_compute, df_urec_init, df_urec_local_finalize, df_urec_confluence_n, df_urec_transfer_function, df_urec_free, df_urec_top_dump, df_urec_bottom_dump, problem_UREC, df_urec_add_problem): Removed. (df_simulate_fixup_sets): Changed call from df_has_eh_preds to bb_has_eh_pred. * Makefile.in (ra-conflict.o, ra.h): New dependencies. * basic_block.h (bb_has_abnormal_pred): New function. * reload1.c (compute_use_by_pseudos): Change DF_RA_LIVE usage to DF_LIVE usage. From-SVN: r128957
2007-10-02 15:10:07 +02:00
struct parms_set_data
{
int nregs;
HARD_REG_SET regs;
};
/* Helper function for noticing stores to parameter registers. */
static void
alias.c (record_set, [...]): Constify. * alias.c (record_set, memory_modified_1): Constify. * bt-load.c (note_btr_set): Likewise. * caller-save.c (mark_set_regs, add_stored_regs): Likewise. * combine.c (set_nonzero_bits_and_sign_copies, expand_field_assignment, record_dead_and_set_regs_1, use_crosses_set_p, reg_dead_at_p_1, can_combine_p, likely_spilled_retval_1): Likewise. * config/frv/frv.c (frv_registers_update_1, frv_io_check_address, frv_io_handle_set): Likewise. * config/mips/mips.c (mips_sim_record_set, vr4130_true_reg_dependence_p_1): Likewise. * config/mt/mt.c (insn_dependent_p_1): Likewise. * config/s390/s390.c (s390_reg_clobbered_rtx): Likewise. * config/sh/sh.c (flow_dependent_p_1): Likewise. * cselib.c (cselib_invalidate_rtx_note_stores): Likewise. * dce.c (mark_nonreg_stores_1, mark_nonreg_stores_2): Likewise. * ddg.c (mark_mem_store): Likewise. * df-problems.c (df_urec_mark_reg_change): Likewise. * function.c (update_epilogue_consts): Likewise. * gcse.c (record_set_info, record_last_set_info, mems_conflict_for_gcse_p, canon_list_insert, reg_set_info, reg_clear_last_set): Likewise. * global.c (mark_reg_store, mark_reg_clobber, reg_becomes_live): Likewise. * jump.c (reversed_comparison_code_parts): Likewise. * local-alloc.c (validate_equiv_mem_from_store, no_equiv, reg_is_set): Likewise. * loop-iv.c (mark_altered): Likewise. * mode-switching.c (reg_becomes_live): Likewise. * optabs.c (no_conflict_move_test): Likewise. * postreload-gcse.c (record_last_set_info, find_mem_conflicts): Likewise. * postreload.c (reload_combine_note_store, move2add_note_store): Likewise. * regmove.c (flags_set_1): Likewise. * regrename.c (note_sets, kill_clobbered_value, kill_set_value): Likewise. * reload1.c (mark_not_eliminable, forget_old_reloads_1): Likewise. * resource.c (update_live_status): Likewise. * rtl.h (set_of, note_stores): Likewise. * rtlanal.c (set_of_1, parms_set, struct set_of_data, set_of, note_stores, parms_set): Likewise. * sched-rgn.c (sets_likely_spilled_1): Likewise. * stack-ptr-mod.c (notice_stack_pointer_modification_1): Likewise. * var-tracking.c (count_stores, add_stores): Likewise. From-SVN: r127065
2007-07-30 18:30:18 +02:00
parms_set (rtx x, const_rtx pat ATTRIBUTE_UNUSED, void *data)
{
ra.h (add_neighbor): Fix -Wc++-compat and/or -Wcast-qual warnings. * ra.h (add_neighbor): Fix -Wc++-compat and/or -Wcast-qual warnings. * recog.c (check_asm_operands, validate_change_1): Likewise. * reg-stack.c (check_asm_stack_operands, subst_asm_stack_regs, subst_asm_stack_regs): Likewise. * regclass.c (regclass, som_hash, som_eq, record_subregs_of_mode, cannot_change_mode_set_regs, invalid_mode_change_p): Likewise. * regmove.c (reg_is_remote_constant_p): Likewise. * regrename.c (regrename_optimize, scan_rtx_reg, kill_clobbered_value, kill_set_value, kill_autoinc_value): Likewise. * regstat.c (regstat_init_n_sets_and_refs, regstat_compute_ri, regstat_compute_calls_crossed): Likewise. * reload1.c (init_reload, new_insn_chain, has_nonexceptional_receiver, reload, copy_reloads, calculate_needs_all_insns, init_elim_table): Likewise. * rtl-factoring.c (compute_rtx_cost, fill_hash_bucket): Likewise. * rtl.c (shallow_copy_rtx_stat): Likewise. * rtlanal.c (parms_set): Likewise. * sbitmap.c (sbitmap_alloc, sbitmap_alloc_with_popcount, sbitmap_resize, sbitmap_vector_alloc): Likewise. * sched-ebb.c (earliest_block_with_similiar_load, add_deps_for_risky_insns): Likewise. * sched-rgn.c (find_rgns, gather_region_statistics, extend_rgns, schedule_region): Likewise. * see.c (eq_descriptor_pre_extension, hash_descriptor_pre_extension, hash_del_pre_extension, eq_descriptor_properties, hash_descriptor_properties, hash_del_properties, see_seek_pre_extension_expr, see_initialize_data_structures, see_print_register_properties, see_print_pre_extension_expr, see_delete_merged_def_extension, see_delete_unmerged_def_extension, see_emit_use_extension, see_pre_delete_extension, see_map_extension, see_commit_changes, see_analyze_merged_def_local_prop, see_analyze_merged_def_local_prop, see_analyze_unmerged_def_local_prop, see_analyze_use_local_prop, see_set_prop_merged_def, see_set_prop_unmerged_def, see_set_prop_unmerged_use, see_print_one_extension, see_merge_one_use_extension, see_merge_one_def_extension, see_store_reference_and_extension, see_update_uses_relevancy, see_update_defs_relevancy): Likewise. * statistics.c (hash_statistics_hash, hash_statistics_eq, hash_statistics_free, curr_statistics_hash): Likewise. * stmt.c (parse_output_constraint, decl_overlaps_hard_reg_set_p, expand_asm_operands, expand_return, case_bit_test_cmp, expand_case): Likewise. * stor-layout.c (start_record_layout): Likewise. * stringpool.c (ggc_alloc_string, gt_pch_n_S, gt_pch_save_stringpool): Likewise. * tree-data-ref.c (hash_stmt_vertex_info, have_similar_memory_accesses_1, ref_base_address_1): Likewise. * tree-ssa-phiopt.c (name_to_bb_hash): Likewise. From-SVN: r137128
2008-06-26 02:12:56 +02:00
struct parms_set_data *const d = (struct parms_set_data *) data;
if (REG_P (x) && REGNO (x) < FIRST_PSEUDO_REGISTER
&& TEST_HARD_REG_BIT (d->regs, REGNO (x)))
{
CLEAR_HARD_REG_BIT (d->regs, REGNO (x));
d->nregs--;
}
}
/* Look backward for first parameter to be loaded.
Note that loads of all parameters will not necessarily be
found if CSE has eliminated some of them (e.g., an argument
to the outer function is passed down as a parameter).
Do not skip BOUNDARY. */
rtx_insn *
find_first_parameter_load (rtx_insn *call_insn, rtx_insn *boundary)
{
struct parms_set_data parm;
rtx p;
rtx_insn *before, *first_set;
/* Since different machines initialize their parameter registers
in different orders, assume nothing. Collect the set of all
parameter registers. */
CLEAR_HARD_REG_SET (parm.regs);
parm.nregs = 0;
for (p = CALL_INSN_FUNCTION_USAGE (call_insn); p; p = XEXP (p, 1))
if (GET_CODE (XEXP (p, 0)) == USE
alias.c (record_set, [...]): Use REG_P. 2004-06-15 Jerry Quinn <jlquinn@optonline.net> * alias.c (record_set, record_base_value, canon_rtx, get_addr, nonlocal_mentioned_p_1, init_alias_analysis): Use REG_P. * bt-load.c (find_btr_reference, insn_sets_btr_p, note_btr_set): Likewise. * builtins.c (expand_builtin_setjmp, expand_builtin_apply, expand_builtin_mathfn, expand_builtin_strlen, expand_builtin_memcmp, expand_builtin_strcmp, expand_builtin_strncmp, expand_builtin_frame_address): Likewise. * caller-save.c (mark_set_regs, add_stored_regs, mark_referenced_regs, insert_one_insn): Likewise. * calls.c (prepare_call_address, precompute_register_parameters, precompute_arguments, expand_call, emit_library_call_value_1): Likewise. * cfganal.c (flow_active_insn_p): Likewise. * combine.c (set_nonzero_bits_and_sign_copies, can_combine_p, combinable_i3pat, try_combine, find_split_point, COMBINE_RTX_EQUAL_P, subst, combine_simplify_rtx, simplify_if_then_else, simplify_set, make_extraction, recog_for_combine, gen_lowpart_for_combine, simplify_comparison, record_dead_and_set_regs_1, record_dead_and_set_regs, record_promoted_value, check_promoted_subreg, get_last_value_validate, get_last_value, reg_dead_at_p_1, reg_bitfield_target_p, distribute_notes, unmentioned_reg_p_1): Likewise. * conflict.c (mark_reg): Likewise. * cse.c (HASH, COST, COST_IN, approx_reg_cost_1, notreg_cost, mention_regs, insert_regs, lookup, lookup_for_remove, insert, merge_equiv_classes, flush_hash_table, invalidate, remove_invalid_refs, remove_invalid_subreg_refs, rehash_using_reg, invalidate_for_call, use_related_value, canon_hash, exp_equiv_p, cse_rtx_varies_p, canon_reg, find_best_addr, fold_rtx, equiv_constant, record_jump_cond, cse_insn, addr_affects_sp_p, invalidate_from_clobbers, cse_process_notes, cse_around_loop, cse_set_around_loop, count_reg_usage, set_live_p, cse_change_cc_mode, cse_cc_succs, cse_condition_code_reg): Likewise. * cselib.c (cselib_reg_set_mode, rtx_equal_for_cselib_p, cselib_lookup, cselib_invalidate_regno, cselib_invalidate_rtx, cselib_record_set, cselib_record_sets): Likewise. * dbxout.c (dbxout_symbol_location, dbxout_parms, dbxout_reg_parms, dbxout_block): Likewise. * df.c (df_ref_record, df_def_record_1, df_uses_record): Likewise. * dojump.c (do_jump): Likewise. * dwarf2out.c (dwarf2out_frame_debug_expr, is_pseudo_reg, is_based_loc, rtl_for_decl_location): Likewise. * emit-rtl.c (set_reg_attrs_for_parm, set_decl_rtl, set_decl_incoming_rtl, mark_user_reg): Likewise. * explow.c (copy_all_regs, copy_all_regs, memory_address, force_reg, copy_to_suggested_reg, allocate_dynamic_stack_space, probe_stack_range, hard_function_value): Likewise. * expmed.c (store_bit_field, store_fixed_bit_field, store_split_bit_field, extract_bit_field, extract_fixed_bit_field, extract_split_bit_field, expand_divmod, emit_store_flag_force): Likewise. * expr.c (convert_move, convert_modes, block_move_libcall_safe_for_call_parm, emit_group_load, use_reg, use_group_regs, emit_move_insn, emit_move_insn_1, compress_float_constant, push_block, emit_single_push_insn, emit_push_insn, get_subtarget, expand_assignment, store_expr, store_constructor, store_field, force_operand, safe_from_p, expand_expr_real_1, expand_increment, do_store_flag, do_tablejump): Likewise. * final.c (profile_function, final_scan_insn, alter_subreg, get_mem_expr_from_op, output_asm_operand_names, output_operand, only_leaf_regs_used, leaf_renumber_regs_insn): Likewise. * flow.c (verify_wide_reg_1, mark_regs_live_at_end, find_regno_partial, propagate_one_insn, init_propagate_block_info, insn_dead_p, libcall_dead_p, mark_set_1, not_reg_cond, attempt_auto_inc, find_auto_inc, mark_used_regs, count_or_remove_death_notes_bb): Likewise. * function.c (find_temp_slot_from_address, update_temp_slot_address, preserve_temp_slots, put_var_into_stack, fixup_var_refs_insn, fixup_var_refs_1, fixup_stack_1, optimize_bit_field, flush_addressof, put_addressof_into_stack, purge_addressof_1, insns_for_mem_walk, purge_single_hard_subreg_set, instantiate_decl, instantiate_virtual_regs_1, aggregate_value_p, assign_parms, promoted_input_arg, setjmp_vars_warning, setjmp_args_warning, setjmp_protect, setjmp_protect_args, fix_lexical_addr, expand_function_start, diddle_return_value, clobber_return_register, expand_function_end, keep_stack_depressed, handle_epilogue_set, update_epilogue_consts): Likewise. * genemit.c (gen_exp, gen_insn): Likewise. * genrecog.c (make_insn_sequence): Likewise. * global.c (global_conflicts, expand_preferences, mark_reg_store, mark_reg_conflicts, set_preference, reg_becomes_live, build_insn_chain, mark_reg_change): Likewise. * haifa_sched.c (CONST_BASED_ADDRESS_P, find_set_reg_weight): Likewise. * ifcvt.c (noce_try_abs, noce_get_condition, noce_process_if_block): Likewise. * integrate.c (copy_rtx_and_substitute, try_constants, subst_constants, mark_stores, allocate_initial_values): Likewise. * jump.c (reversed_comparison_code_parts, delete_prior_computation, delete_computation, rtx_renumbered_equal_p, true_regnum, reg_or_subregno): Likewise. * lcm.c (reg_dies, reg_becomes_live): Likewise. * local-alloc.c (validate_equiv_mem_from_store, validate_equiv_mem, update_equiv_regs, no_equiv, block_alloc, combine_regs, reg_is_set, wipe_dead_reg, no_conflict_p): Likewise. * loop-iv.c (simple_reg_p, simple_set_p, kill_sets, iv_get_reaching_def, iv_analyze_biv, altered_reg_used, mark_altered, simple_rhs_p, simplify_using_assignment, implies_p): Likewise. * loop.c (scan_loop, combine_movables, rtx_equal_for_loop_p, move_movables, note_set_pseudo_multiple_uses, consec_sets_invariant_p, find_single_use_in_loop, count_one_set, loop_bivs_init_find, loop_givs_rescan, check_insn_for_bivs, check_insn_for_givs, valid_initial_value_p, simplify_giv_expr, consec_sets_giv, loop_regs_update, check_dbra_loop, maybe_eliminate_biv, maybe_eliminate_biv_1, record_initial, update_reg_last_use, canonicalize_condition, loop_regs_scan, load_mems, try_copy_prop, try_swap_copy_prop): Likewise. * optabs.c (expand_binop, expand_vector_binop, expand_vector_unop, expand_abs, emit_no_conflict_block, emit_libcall_block, expand_float): Likewise. * postreload.c (reload_cse_simplify, reload_cse_simplify_set, reload_cse_simplify_operands, reload_combine, reload_combine_note_store, reload_combine_note_use, reload_cse_move2add, move2add_note_store): Likewise. * print-rtl.c (print_rtx): Likewise. * ra-build.c (copy_insn_p, remember_move, init_one_web_common, contains_pseudo, handle_asm_insn): Likewise. * ra-debug.c (ra_print_rtx_object, dump_constraints, dump_static_insn_cost): Likewise. * ra-rewrite.c (slots_overlap_p, emit_colors, remove_suspicious_death_notes): Likewise. * recog.c (validate_replace_rtx_1, find_single_use_1, find_single_use, register_operand, scratch_operand, nonmemory_operand, constrain_operands): Likewise. * reg-stack (check_asm_stack_operands, remove_regno_note, emit_swap_insn, swap_rtx_condition, subst_stack_regs_pat, subst_asm_stack_regs): Likewise. * regclass.c (scan_one_insn, record_reg_classes, copy_cost, record_address_regs, reg_scan_mark_refs): Likewise. * regmove.c (discover_flags_reg, replacement_quality, copy_src_to_dest, reg_is_remote_constant_p, regmove_optimize, fixup_match_1): Likewise. * regrename.c (note_sets, clear_dead_regs, build_def_use, kill_value, kill_set_value, copyprop_hardreg_forward_1): Likewise. * reload.c (MATCHES, push_secondary_reload, find_reusable_reload, reload_inner_reg_of_subreg, can_reload_into, push_reload, combine_reloads, find_dummy_reload, hard_reg_set_here_p, operands_match_p, decompose, find_reloads, find_reloads_toplev, find_reloads_address, subst_indexed_address, find_reloads_address_1, find_reloads_subreg_address, find_replacement, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p, find_equiv_reg, regno_clobbered_p): Likewise. * reload1.c (replace_pseudos_in, reload, calculate_needs_all_insns, find_reg, delete_dead_insn, alter_reg, eliminate_regs, elimination_effects, eliminate_regs_in_insn, scan_paradoxical_subregs, forget_old_reloads_1, reload_reg_free_for_value_p, choose_reload_regs, emit_input_reload_insns, emit_output_reload_insns, do_input_reload, do_output_reload, emit_reload_insns, gen_reload, delete_address_reloads_1, inc_for_reload): Likewise. * reorg.c (update_reg_dead_notes, fix_reg_dead_note, update_reg_unused_notes, fill_slots_from_thread): Likewise. * resource.c (update_live_status, mark_referenced_resources, mark_set_resources, mark_target_live_regs): Likewise. * rtlanal.c (nonzero_address_p, get_jump_table_offset, global_reg_mentioned_p_1, reg_mentioned_p, reg_referenced_p, reg_set_p, set_noop_p, find_last_value, refers_to_regno_p, note_stores, dead_or_set_p, dead_or_set_regno_p, find_regno_note, find_reg_fusage, find_regno_fusage, replace_regs, regno_use_in, parms_set, find_first_parameter_load, keep_with_call_p, hoist_test_store, hoist_update_store, address_cost, nonzero_bits1, num_sign_bit_copies1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sched-deps.c (deps_may_trap_p, sched_analyze_1, sched_analyze_insn, sched_analyze): Likewise. * sched-rgn.c (check_live_1, update_live_1, sets_likely_spilled_1): Likewise. * sdbout.c (sdbout_symbol, sdbout_parms, sdbout_reg_parms): Likewise. * simplify-rtx.c (simplify_replace_rtx, simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_subreg): Likewise. * stmt.c (decl_conflicts_with_clobbers_p, expand_asm_operands, expand_end_stmt_expr, expand_return, expand_decl, expand_anon_union_decl): Likewise. * unroll.c (precondition_loop_p, calculate_giv_inc, copy_loop_body, find_splittable_regs, find_splittable_givs, find_common_reg_term, loop_iterations): Likewise. * var-tracking.c (variable_union, variable_part_different_p, variable_different_p, count_uses, add_uses, add_stores, compute_bb_dataflow, set_variable_part, delete_variable_part, emit_notes_in_bb, vt_get_decl_and_offset, vt_add_function_parameters): Likewise. * varasm.c (assemble_variable): Likewise. From-SVN: r83195
2004-06-15 20:02:40 +02:00
&& REG_P (XEXP (XEXP (p, 0), 0)))
{
ra-build.c (copy_insn_p, [...]): Use gcc_assert and gcc_unreachable instead of abort. * ra-build.c (copy_insn_p, remember_move, defuse_overlap_p_1, live_out_1, prune_hardregs_for_mode, init_one_web_common, reinit_one_web, add_subweb, add_subweb_2, init_web_parts, record_conflict, compare_and_free_webs, init_webs_defs_uses, parts_to_webs_1, parts_to_webs, reset_conflicts, check_conflict_numbers, remember_web_was_spilled, handle_asm_insn, ra_build_free): Use gcc_assert and gcc_unreachable instead of abort. * ra-colorize.c (push_list, put_web, reset_lists, put_web_at_end, put_move, remove_move, combine, select_spill, colorize_one_web, try_recolor_web, insert_coalesced_conflicts, check_colors, break_precolored_alias, restore_conflicts_from_coalesce, sort_and_combine_web_pairs, check_uncoalesced_moves): Likewise. * ra-rewrite.c (spill_coalescing, slots_overlap_p, emit_loads, reloads_to_loads, rewrite_program2, emit_colors): Likewise. * ra.c (first_hard_reg, create_insn_info, find_subweb, init_ra, check_df): Likewise. * real.c (do_add, do_multiply, do_divide, do_compare, do_fix_trunc, real_arithmetic, real_compare, real_exponent, real_ldexp, real_identical, real_to_integer, real_to_integer2, real_to_decimal, real_to_hexadecimal, real_from_integer, ten_to_ptwo, ten_to_mptwo, real_digit, real_nan, real_maxval, round_for_format, real_convert, real_to_target, real_from_target, real_hash, encode_ieee_single, encode_ieee_double, encode_ieee_extended, encode_ieee_quad, encode_vax_f, encode_vax_d, encode_vax_g, encode_i370_single, encode_i370_double, encode_c4x_single, encode_c4x_extended): Likewise. * recog.c (validate_change, validate_replace_rtx_1, asm_operand_ok, extract_insn, peep2_next_insn, peep2_reg_dead_p, peep2_find_free_register, peephole2_optimize, store_data_bypass_p, if_test_bypass_p): Likewise. * reg-stack.c (record_label_references, get_asm_operand_n_inputs, stack_result, remove_regno_note, get_hard_regnum, emit_pop_insn, emit_swap_insn, swap_to_top, move_for_stack_reg, subst_stack_regs_pat, subst_asm_stack_regs, change_stack, compensate_edge, convert_regs_1): Likewise. * regclass.c (init_reg_sets, init_reg_sets_1, memory_move_secondary_cost): Likewise. * regrename.c (note_sets, clear_dead_regs, scan_rtx_reg, scan_rtx): Likewise. * reload.c (push_secondary_reload, find_valid_class, push_reload, operands_match_p, decompose, immune_p, find_reloads, find_reloads_toplev, find_reloads_address_1, subst_reloads, copy_replacements, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p): Likewise. * reload1.c (compute_use_by_pseudos, replace_pseudos_in, reload, count_pseudo, find_reg, eliminate_regs, eliminate_regs_in_insn, verify_initial_elim_offsets, finish_spills, clear_reload_reg_in_use, reload_reg_free_p, reload_reg_reaches_end_p, reloads_conflict, choose_reload_regs, merge_assigned_reloads, emit_input_reload_insns, do_output_reload, fixup_abnormal_edges): Likewise. * reorg.c (stop_search_p, emit_delay_sequence, get_jump_flags, fill_slots_from_thread, relax_delay_slots): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * rtl.c (copy_rtx, rtx_equal_p): Likewise. * rtlanal.c (insn_dependent_p, reg_overlap_mentioned_p, dead_or_set_p, find_reg_fusage, remove_note, replace_rtx, subreg_lsb_1, subreg_regno_offset, subreg_offset_representable_p, find_first_parameter_load, can_hoist_insn_p, hoist_update_store, hoist_insn_after, hoist_insn_to_edge, nonzero_bits1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sbitmap.c (sbitmap_difference): Likewise. * sched-deps.c (add_dependence, sched_analyze_1, sched_analyze_2, sched_analyze, add_forward_dependence): Likewise. * sched-ebb.c (fix_basic_block_boundaries, schedule_ebb): Likewise. * sched-rgn.c (debug_regions, compute_trg_info, schedule_region, schedule_insns): Likewise. * sched-vis.c (print_pattern): Likewise. * sdbout.c (sdbout_symbol, sdbout_toplevel_data): Likewise. * simplify-rtx.c (simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_ternary_operation, simplify_immed_subreg, simplify_subreg, simplify_gen_subreg): Likewise. * sreal.c (copy, sreal_sub, sreal_div): Likewise. * stmt.c (force_label_rtx, expand_goto, expand_asm_operands, resolve_operand_name_1, expand_return, expand_decl, expand_anon_union_decl, emit_case_bit_tests, expand_case): Likewise. * stor-layout.c (put_pending_size, smallest_mode_for_size, int_mode_for_mode, layout_decl, finish_builtin_struct, layout_type, set_sizetype, get_mode_bounds): Likewise. From-SVN: r87244
2004-09-09 19:19:16 +02:00
gcc_assert (REGNO (XEXP (XEXP (p, 0), 0)) < FIRST_PSEUDO_REGISTER);
/* We only care about registers which can hold function
arguments. */
if (!FUNCTION_ARG_REGNO_P (REGNO (XEXP (XEXP (p, 0), 0))))
continue;
SET_HARD_REG_BIT (parm.regs, REGNO (XEXP (XEXP (p, 0), 0)));
parm.nregs++;
}
before = call_insn;
first_set = call_insn;
/* Search backward for the first set of a register in this set. */
while (parm.nregs && before != boundary)
{
before = PREV_INSN (before);
/* It is possible that some loads got CSEed from one call to
another. Stop in that case. */
alias.c (nonlocal_mentioned_p, [...]): Use, LABEL_P, JUMP_P, CALL_P, NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P. 2004-07-08 Jerry Quinn <jlquinn@optonline.net> * alias.c (nonlocal_mentioned_p, nonlocal_referenced_p, nonlocal_set_p, init_alias_analysis): Use, LABEL_P, JUMP_P, CALL_P, NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P. * bb-reorder.c (mark_bb_for_unlikely_executed_section, add_labels_and_missing_jumps, find_jump_block, fix_crossing_unconditional_branches, add_reg_crossing_jump_notes): Likewise. * bt-load.c (btr_referenced_p, compute_defs_uses_and_gen, link_btr_uses, move_btr_def): Likewise. * builtins.c (expand_builtin_longjmp, expand_builtin_nonlocal_goto, expand_builtin_expect_jump): Likewise. * caller-save.c (save_call_clobbered_regs, insert_one_insn): Likewise. * calls.c (expand_call, emit_library_call_value_1): Likewise. * cfganal.c (forwarder_block_p): Likewise. * cfgbuild.c (inside_basic_block_p, count_basic_blocks, make_label_edge, rtl_make_eh_edge, make_edges, find_basic_blocks_1, find_bb_boundaries): Likewise. * cfgcleanup.c (try_simplify_condjump, try_forward_edges, merge_blocks_move_predecessor_nojumps, merge_blocks_move_successor_nojumps, insns_match_p, flow_find_cross_jump, outgoing_edges_match, try_crossjump_to_edge, try_optimize_cfg): Likewise. * cfgexpand.c (expand_block, construct_exit_block): Likewise. * cfglayout.c (skip_insns_after_block, label_for_bb, record_effective_endpoints, insn_locators_initialize, fixup_reorder_chain, update_unlikely_executed_notes): Likewise. * cfgmainloop.c (create_loop_notes): Likewise. * cfgrtl.c (delete_insn, delete_insn_chain, create_basic_block_structure, rtl_delete_block, free_bb_for_insn, update_bb_for_insn, rtl_merge_blocks, rtl_can_merge_blocks, block_label, try_redirect_by_replacing_jump, last_loop_beg_note, redirect_branch_edge, force_nonfallthru_and_redirect, rtl_tidy_fallthru_edge, back_edge_of_syntactic_loop_p, rtl_split_edge, commit_one_edge_insertion, print_rtl_with_bb, update_br_prob_note, rtl_verify_flow_info_1, rtl_verify_flow_info, purge_dead_edges, cfg_layout_redirect_edge_and_branch, cfg_layout_delete_block, cfg_layout_can_merge_blocks_p, cfg_layout_merge_blocks, rtl_block_ends_with_call_p, need_fake_edge_p, rtl_flow_call_edges_add): Likewise. * combine.c (combine_instructions, can_combine_p, try_combine, find_split_point, record_dead_and_set_regs, reg_dead_at_p, distribute_notes, distribute_links, insn_cuid): Likewise. * cse.c (fold_rtx, cse_insn, cse_around_loop, invalidate_skipped_block, cse_set_around_loop, cse_end_of_basic_block, cse_main, cse_basic_block, cse_condition_code_reg): Likewise. * cselib.c (cselib_process_insn): Likewise. * ddg.c (create_ddg): Likewise. * df.c (df_insn_refs_record, df_bb_rd_local_compute, df_insns_modify): Likewise. * dwarf2out.c (dwarf2out_stack_adjust, dwarf2out_frame_debug, gen_label_die, dwarf2out_var_location): Likewise. * emit-rtl.c (get_first_nonnote_insn, get_last_nonnote_insn, next_insn, previous_insn, next_nonnote_insn, prev_nonnote_insn, last_call_insn, active_insn_p, next_label, prev_label, link_cc0_insns, next_cc0_user, try_split, add_insn_after, add_insn_before, remove_insn, add_function_usage_to, reorder_insns, find_line_note, remove_unnecessary_notes, emit_insn_after_1, classify_insn): Likewise. * except.c (convert_from_eh_region_ranges_1, emit_to_new_bb_before, connect_post_landing_pads, sjlj_mark_call_sites, sjlj_emit_function_enter, sjlj_emit_function_exit, reachable_handlers, can_throw_internal, can_throw_external, set_nothrow_function_flags, convert_to_eh_region_ranges): Likewise. * explow.c (optimize_save_area_alloca): Likewise. * expr.c (expand_expr_real): Likewise. * final.c (insn_current_reference_address, compute_alignments, shorten_branches, final, scan_ahead_for_unlikely_executed_note, final_scan_insn, output_asm_label, leaf_function_p): Likewise. * flow.c (first_insn_after_basic_block_note, delete_dead_jumptables, propagate_block_delete_insn, propagate_one_insn, init_propagate_block_info, propagate_block, libcall_dead_p, mark_set_1, attempt_auto_inc, find_auto_inc, try_pre_increment): Likewise. * function.c (instantiate_virtual_regs, reorder_blocks_1, expand_function_start, expand_function_end, contains, thread_prologue_and_epilogue_insns, reposition_prologue_and_epilogue_notes): Likewise. * gcse.c (constprop_register, bypass_conditional_jumps, insert_insn_end_bb, gcse_after_reload): Likewise. * genemit.c (gen_expand, gen_split): Likewise. * genpeep.c (gen_peephole, main): Likewise. * global.c (build_insn_chain): Likewise. * graph.c (node_data, print_rtl_graph_with_bb): Likewise. * haifa-sched.c (unlink_other_notes, unlink_line_notes, get_block_head_tail, no_real_insns_p, rm_line_notes, save_line_notes, restore_line_notes, rm_redundant_line_notes, rm_other_notes, ok_for_early_queue_removal, set_priorities, sched_init): Likewise. * ifcvt.c (count_bb_insns, first_active_insn, last_active_insn, cond_exec_process_insns, end_ifcvt_sequence, noce_process_if_block, merge_if_block, block_jumps_and_fallthru_p, find_if_block, dead_or_predicable): Likewise. * integrate.c (try_constants): Likewise. * jump.c (rebuild_jump_labels, cleanup_barriers, purge_line_number_notes, init_label_info, mark_all_labels, squeeze_notes, get_label_before, get_label_after, reversed_comparison_code_parts, simplejump_p, pc_set, returnjump_p, onlyjump_p, follow_jumps, mark_jump_label, delete_barrier, delete_prior_computation, delete_computation, delete_related_insns, delete_for_peephole, redirect_jump): Likewise. * lcm.c (optimize_mode_switching): Likewise. * local-alloc.c (validate_equiv_mem, update_equiv_regs, block_alloc): Likewise. * loop-doloop.c (doloop_valid_p, doloop_optimize): Likewise. * loop-invariant.c (find_exits, find_invariants_bb): Likewise. * loop-iv.c (simplify_using_assignment): Likewise. * loop.c (compute_luids, loop_optimize, scan_loop, libcall_other_reg, libcall_benefit, skip_consec_insns, move_movables, prescan_loop, find_and_verify_loops, labels_in_range_p, for_each_insn_in_loop, loop_bivs_init_find, strength_reduce, check_insn_for_bivs, check_insn_for_givs, check_final_value, update_giv_derive, basic_induction_var, product_cheap_p, check_dbra_loop, loop_insn_first_p, last_use_this_basic_block, canonicalize_condition, get_condition, loop_regs_scan, load_mems, try_copy_prop, LOOP_BLOCK_NUM, loop_dump_aux): Likewise. * modulo-sched.c (doloop_register_get, find_line_note, sms_schedule, sms_schedule_by_order): Likewise. * optabs.c (emit_no_conflict_block, emit_libcall_block): Likewise. * postreload.c (reload_cse_simplify_operands, reload_combine, reload_cse_move2add): Likewise. * predict.c (can_predict_insn_p, estimate_probability, expected_value_to_br_prob, process_note_predictions): Likewise. * print-rtl.c (print_rtx, print_rtl, print_rtl_single): Likewise. * profile.c (branch_prob): Likewise. * ra-build.c (live_out_1, livethrough_conflicts_bb, detect_webs_set_in_cond_jump): Likewise. * ra-debug.c (ra_print_rtx_object, ra_debug_insns, ra_print_rtl_with_bb): Likewise. * ra-rewrite.c (insert_stores, rewrite_program2): Likewise. * recog.c (next_insn_tests_no_inequality, find_single_use, split_all_insns, peephole2_optimize, if_test_bypass_p): Likewise. * reg-stack.c (next_flags_user, record_label_references, emit_swap_insn, swap_rtx_condition, subst_stack_regs, compensate_edge, convert_regs_1): Likewise. * regclass.c (scan_one_insn): Likewise. * regmove.c (optimize_reg_copy_1, optimize_reg_copy_2, fixup_match_2, regmove_optimize, fixup_match_1, single_set_for_csa, combine_stack_adjustments_for_block): Likewise. * regrename.c (build_def_use, copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads, find_reloads_address_1, subst_reloads, find_equiv_reg): Likewise. * reload1.c (reload, calculate_needs_all_insns, set_label_offsets, reload_as_needed, emit_input_reload_insns, do_output_reload, delete_output_reload, delete_address_reloads_1, fixup_abnormal_edges): Likewise. * reorg.c (find_end_label, emit_delay_sequence, delete_from_delay_slot, delete_scheduled_jump, optimize_skip, get_jump_flags, rare_destination, mostly_true_jump, try_merge_delay_insns, redundant_insn, own_thread_p, fill_simple_delay_slots, fill_slots_from_thread, fill_eager_delay_slots, relax_delay_slots, make_return_insns, dbr_schedule): Likewise. * resource.c (find_basic_block, next_insn_no_annul, find_dead_or_set_registers, mark_target_live_regs): Likewise. * rtl.h (RTX_PREV): Likewise. * rtlanal.c (global_reg_mentioned_p, no_labels_between_p, no_jumps_between_p, reg_used_between_p, reg_referenced_between_p, reg_set_p, find_last_value, dead_or_set_regno_p, find_reg_fusage, find_regno_fusage, pure_call_p, replace_label, rtx_referenced_p_1, tablejump_p, computed_jump_p, insns_safe_to_move_p, find_first_parameter_load, can_hoist_insn_p): Likewise. * sched-deps.c (get_condition, add_dependence, sched_analyze_2, sched_analyze_insn, sched_analyze, add_forward_dependence): Likewise. * sched-ebb.c (fix_basic_block_boundaries, add_deps_for_risky_insns, schedule_ebbs): Likewise. * sched-rgn.c (is_cfg_nonregular, find_conditional_protection, is_conditionally_protected, can_schedule_ready_p, add_branch_dependences, debug_dependencies): Likewise. * stmt.c (emit_nop, expand_start_case, emit_jump_if_reachable): Likewise. * unroll.c (unroll_loop, copy_loop_body, back_branch_in_range_p, reg_dead_after_loop, loop_find_equiv_value, loop_iterations, set_dominates_use, ujump_to_loop_cont): Likewise. * var-tracking.c (prologue_stack_adjust, vt_initialize): Likewise. * varasm.c (output_constant_pool_1): Likewise. From-SVN: r84341
2004-07-09 05:29:35 +02:00
if (CALL_P (before))
break;
/* Our caller needs either ensure that we will find all sets
(in case code has not been optimized yet), or take care
for possible labels in a way by setting boundary to preceding
CODE_LABEL. */
alias.c (nonlocal_mentioned_p, [...]): Use, LABEL_P, JUMP_P, CALL_P, NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P. 2004-07-08 Jerry Quinn <jlquinn@optonline.net> * alias.c (nonlocal_mentioned_p, nonlocal_referenced_p, nonlocal_set_p, init_alias_analysis): Use, LABEL_P, JUMP_P, CALL_P, NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P. * bb-reorder.c (mark_bb_for_unlikely_executed_section, add_labels_and_missing_jumps, find_jump_block, fix_crossing_unconditional_branches, add_reg_crossing_jump_notes): Likewise. * bt-load.c (btr_referenced_p, compute_defs_uses_and_gen, link_btr_uses, move_btr_def): Likewise. * builtins.c (expand_builtin_longjmp, expand_builtin_nonlocal_goto, expand_builtin_expect_jump): Likewise. * caller-save.c (save_call_clobbered_regs, insert_one_insn): Likewise. * calls.c (expand_call, emit_library_call_value_1): Likewise. * cfganal.c (forwarder_block_p): Likewise. * cfgbuild.c (inside_basic_block_p, count_basic_blocks, make_label_edge, rtl_make_eh_edge, make_edges, find_basic_blocks_1, find_bb_boundaries): Likewise. * cfgcleanup.c (try_simplify_condjump, try_forward_edges, merge_blocks_move_predecessor_nojumps, merge_blocks_move_successor_nojumps, insns_match_p, flow_find_cross_jump, outgoing_edges_match, try_crossjump_to_edge, try_optimize_cfg): Likewise. * cfgexpand.c (expand_block, construct_exit_block): Likewise. * cfglayout.c (skip_insns_after_block, label_for_bb, record_effective_endpoints, insn_locators_initialize, fixup_reorder_chain, update_unlikely_executed_notes): Likewise. * cfgmainloop.c (create_loop_notes): Likewise. * cfgrtl.c (delete_insn, delete_insn_chain, create_basic_block_structure, rtl_delete_block, free_bb_for_insn, update_bb_for_insn, rtl_merge_blocks, rtl_can_merge_blocks, block_label, try_redirect_by_replacing_jump, last_loop_beg_note, redirect_branch_edge, force_nonfallthru_and_redirect, rtl_tidy_fallthru_edge, back_edge_of_syntactic_loop_p, rtl_split_edge, commit_one_edge_insertion, print_rtl_with_bb, update_br_prob_note, rtl_verify_flow_info_1, rtl_verify_flow_info, purge_dead_edges, cfg_layout_redirect_edge_and_branch, cfg_layout_delete_block, cfg_layout_can_merge_blocks_p, cfg_layout_merge_blocks, rtl_block_ends_with_call_p, need_fake_edge_p, rtl_flow_call_edges_add): Likewise. * combine.c (combine_instructions, can_combine_p, try_combine, find_split_point, record_dead_and_set_regs, reg_dead_at_p, distribute_notes, distribute_links, insn_cuid): Likewise. * cse.c (fold_rtx, cse_insn, cse_around_loop, invalidate_skipped_block, cse_set_around_loop, cse_end_of_basic_block, cse_main, cse_basic_block, cse_condition_code_reg): Likewise. * cselib.c (cselib_process_insn): Likewise. * ddg.c (create_ddg): Likewise. * df.c (df_insn_refs_record, df_bb_rd_local_compute, df_insns_modify): Likewise. * dwarf2out.c (dwarf2out_stack_adjust, dwarf2out_frame_debug, gen_label_die, dwarf2out_var_location): Likewise. * emit-rtl.c (get_first_nonnote_insn, get_last_nonnote_insn, next_insn, previous_insn, next_nonnote_insn, prev_nonnote_insn, last_call_insn, active_insn_p, next_label, prev_label, link_cc0_insns, next_cc0_user, try_split, add_insn_after, add_insn_before, remove_insn, add_function_usage_to, reorder_insns, find_line_note, remove_unnecessary_notes, emit_insn_after_1, classify_insn): Likewise. * except.c (convert_from_eh_region_ranges_1, emit_to_new_bb_before, connect_post_landing_pads, sjlj_mark_call_sites, sjlj_emit_function_enter, sjlj_emit_function_exit, reachable_handlers, can_throw_internal, can_throw_external, set_nothrow_function_flags, convert_to_eh_region_ranges): Likewise. * explow.c (optimize_save_area_alloca): Likewise. * expr.c (expand_expr_real): Likewise. * final.c (insn_current_reference_address, compute_alignments, shorten_branches, final, scan_ahead_for_unlikely_executed_note, final_scan_insn, output_asm_label, leaf_function_p): Likewise. * flow.c (first_insn_after_basic_block_note, delete_dead_jumptables, propagate_block_delete_insn, propagate_one_insn, init_propagate_block_info, propagate_block, libcall_dead_p, mark_set_1, attempt_auto_inc, find_auto_inc, try_pre_increment): Likewise. * function.c (instantiate_virtual_regs, reorder_blocks_1, expand_function_start, expand_function_end, contains, thread_prologue_and_epilogue_insns, reposition_prologue_and_epilogue_notes): Likewise. * gcse.c (constprop_register, bypass_conditional_jumps, insert_insn_end_bb, gcse_after_reload): Likewise. * genemit.c (gen_expand, gen_split): Likewise. * genpeep.c (gen_peephole, main): Likewise. * global.c (build_insn_chain): Likewise. * graph.c (node_data, print_rtl_graph_with_bb): Likewise. * haifa-sched.c (unlink_other_notes, unlink_line_notes, get_block_head_tail, no_real_insns_p, rm_line_notes, save_line_notes, restore_line_notes, rm_redundant_line_notes, rm_other_notes, ok_for_early_queue_removal, set_priorities, sched_init): Likewise. * ifcvt.c (count_bb_insns, first_active_insn, last_active_insn, cond_exec_process_insns, end_ifcvt_sequence, noce_process_if_block, merge_if_block, block_jumps_and_fallthru_p, find_if_block, dead_or_predicable): Likewise. * integrate.c (try_constants): Likewise. * jump.c (rebuild_jump_labels, cleanup_barriers, purge_line_number_notes, init_label_info, mark_all_labels, squeeze_notes, get_label_before, get_label_after, reversed_comparison_code_parts, simplejump_p, pc_set, returnjump_p, onlyjump_p, follow_jumps, mark_jump_label, delete_barrier, delete_prior_computation, delete_computation, delete_related_insns, delete_for_peephole, redirect_jump): Likewise. * lcm.c (optimize_mode_switching): Likewise. * local-alloc.c (validate_equiv_mem, update_equiv_regs, block_alloc): Likewise. * loop-doloop.c (doloop_valid_p, doloop_optimize): Likewise. * loop-invariant.c (find_exits, find_invariants_bb): Likewise. * loop-iv.c (simplify_using_assignment): Likewise. * loop.c (compute_luids, loop_optimize, scan_loop, libcall_other_reg, libcall_benefit, skip_consec_insns, move_movables, prescan_loop, find_and_verify_loops, labels_in_range_p, for_each_insn_in_loop, loop_bivs_init_find, strength_reduce, check_insn_for_bivs, check_insn_for_givs, check_final_value, update_giv_derive, basic_induction_var, product_cheap_p, check_dbra_loop, loop_insn_first_p, last_use_this_basic_block, canonicalize_condition, get_condition, loop_regs_scan, load_mems, try_copy_prop, LOOP_BLOCK_NUM, loop_dump_aux): Likewise. * modulo-sched.c (doloop_register_get, find_line_note, sms_schedule, sms_schedule_by_order): Likewise. * optabs.c (emit_no_conflict_block, emit_libcall_block): Likewise. * postreload.c (reload_cse_simplify_operands, reload_combine, reload_cse_move2add): Likewise. * predict.c (can_predict_insn_p, estimate_probability, expected_value_to_br_prob, process_note_predictions): Likewise. * print-rtl.c (print_rtx, print_rtl, print_rtl_single): Likewise. * profile.c (branch_prob): Likewise. * ra-build.c (live_out_1, livethrough_conflicts_bb, detect_webs_set_in_cond_jump): Likewise. * ra-debug.c (ra_print_rtx_object, ra_debug_insns, ra_print_rtl_with_bb): Likewise. * ra-rewrite.c (insert_stores, rewrite_program2): Likewise. * recog.c (next_insn_tests_no_inequality, find_single_use, split_all_insns, peephole2_optimize, if_test_bypass_p): Likewise. * reg-stack.c (next_flags_user, record_label_references, emit_swap_insn, swap_rtx_condition, subst_stack_regs, compensate_edge, convert_regs_1): Likewise. * regclass.c (scan_one_insn): Likewise. * regmove.c (optimize_reg_copy_1, optimize_reg_copy_2, fixup_match_2, regmove_optimize, fixup_match_1, single_set_for_csa, combine_stack_adjustments_for_block): Likewise. * regrename.c (build_def_use, copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads, find_reloads_address_1, subst_reloads, find_equiv_reg): Likewise. * reload1.c (reload, calculate_needs_all_insns, set_label_offsets, reload_as_needed, emit_input_reload_insns, do_output_reload, delete_output_reload, delete_address_reloads_1, fixup_abnormal_edges): Likewise. * reorg.c (find_end_label, emit_delay_sequence, delete_from_delay_slot, delete_scheduled_jump, optimize_skip, get_jump_flags, rare_destination, mostly_true_jump, try_merge_delay_insns, redundant_insn, own_thread_p, fill_simple_delay_slots, fill_slots_from_thread, fill_eager_delay_slots, relax_delay_slots, make_return_insns, dbr_schedule): Likewise. * resource.c (find_basic_block, next_insn_no_annul, find_dead_or_set_registers, mark_target_live_regs): Likewise. * rtl.h (RTX_PREV): Likewise. * rtlanal.c (global_reg_mentioned_p, no_labels_between_p, no_jumps_between_p, reg_used_between_p, reg_referenced_between_p, reg_set_p, find_last_value, dead_or_set_regno_p, find_reg_fusage, find_regno_fusage, pure_call_p, replace_label, rtx_referenced_p_1, tablejump_p, computed_jump_p, insns_safe_to_move_p, find_first_parameter_load, can_hoist_insn_p): Likewise. * sched-deps.c (get_condition, add_dependence, sched_analyze_2, sched_analyze_insn, sched_analyze, add_forward_dependence): Likewise. * sched-ebb.c (fix_basic_block_boundaries, add_deps_for_risky_insns, schedule_ebbs): Likewise. * sched-rgn.c (is_cfg_nonregular, find_conditional_protection, is_conditionally_protected, can_schedule_ready_p, add_branch_dependences, debug_dependencies): Likewise. * stmt.c (emit_nop, expand_start_case, emit_jump_if_reachable): Likewise. * unroll.c (unroll_loop, copy_loop_body, back_branch_in_range_p, reg_dead_after_loop, loop_find_equiv_value, loop_iterations, set_dominates_use, ujump_to_loop_cont): Likewise. * var-tracking.c (prologue_stack_adjust, vt_initialize): Likewise. * varasm.c (output_constant_pool_1): Likewise. From-SVN: r84341
2004-07-09 05:29:35 +02:00
if (LABEL_P (before))
{
ra-build.c (copy_insn_p, [...]): Use gcc_assert and gcc_unreachable instead of abort. * ra-build.c (copy_insn_p, remember_move, defuse_overlap_p_1, live_out_1, prune_hardregs_for_mode, init_one_web_common, reinit_one_web, add_subweb, add_subweb_2, init_web_parts, record_conflict, compare_and_free_webs, init_webs_defs_uses, parts_to_webs_1, parts_to_webs, reset_conflicts, check_conflict_numbers, remember_web_was_spilled, handle_asm_insn, ra_build_free): Use gcc_assert and gcc_unreachable instead of abort. * ra-colorize.c (push_list, put_web, reset_lists, put_web_at_end, put_move, remove_move, combine, select_spill, colorize_one_web, try_recolor_web, insert_coalesced_conflicts, check_colors, break_precolored_alias, restore_conflicts_from_coalesce, sort_and_combine_web_pairs, check_uncoalesced_moves): Likewise. * ra-rewrite.c (spill_coalescing, slots_overlap_p, emit_loads, reloads_to_loads, rewrite_program2, emit_colors): Likewise. * ra.c (first_hard_reg, create_insn_info, find_subweb, init_ra, check_df): Likewise. * real.c (do_add, do_multiply, do_divide, do_compare, do_fix_trunc, real_arithmetic, real_compare, real_exponent, real_ldexp, real_identical, real_to_integer, real_to_integer2, real_to_decimal, real_to_hexadecimal, real_from_integer, ten_to_ptwo, ten_to_mptwo, real_digit, real_nan, real_maxval, round_for_format, real_convert, real_to_target, real_from_target, real_hash, encode_ieee_single, encode_ieee_double, encode_ieee_extended, encode_ieee_quad, encode_vax_f, encode_vax_d, encode_vax_g, encode_i370_single, encode_i370_double, encode_c4x_single, encode_c4x_extended): Likewise. * recog.c (validate_change, validate_replace_rtx_1, asm_operand_ok, extract_insn, peep2_next_insn, peep2_reg_dead_p, peep2_find_free_register, peephole2_optimize, store_data_bypass_p, if_test_bypass_p): Likewise. * reg-stack.c (record_label_references, get_asm_operand_n_inputs, stack_result, remove_regno_note, get_hard_regnum, emit_pop_insn, emit_swap_insn, swap_to_top, move_for_stack_reg, subst_stack_regs_pat, subst_asm_stack_regs, change_stack, compensate_edge, convert_regs_1): Likewise. * regclass.c (init_reg_sets, init_reg_sets_1, memory_move_secondary_cost): Likewise. * regrename.c (note_sets, clear_dead_regs, scan_rtx_reg, scan_rtx): Likewise. * reload.c (push_secondary_reload, find_valid_class, push_reload, operands_match_p, decompose, immune_p, find_reloads, find_reloads_toplev, find_reloads_address_1, subst_reloads, copy_replacements, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p): Likewise. * reload1.c (compute_use_by_pseudos, replace_pseudos_in, reload, count_pseudo, find_reg, eliminate_regs, eliminate_regs_in_insn, verify_initial_elim_offsets, finish_spills, clear_reload_reg_in_use, reload_reg_free_p, reload_reg_reaches_end_p, reloads_conflict, choose_reload_regs, merge_assigned_reloads, emit_input_reload_insns, do_output_reload, fixup_abnormal_edges): Likewise. * reorg.c (stop_search_p, emit_delay_sequence, get_jump_flags, fill_slots_from_thread, relax_delay_slots): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * rtl.c (copy_rtx, rtx_equal_p): Likewise. * rtlanal.c (insn_dependent_p, reg_overlap_mentioned_p, dead_or_set_p, find_reg_fusage, remove_note, replace_rtx, subreg_lsb_1, subreg_regno_offset, subreg_offset_representable_p, find_first_parameter_load, can_hoist_insn_p, hoist_update_store, hoist_insn_after, hoist_insn_to_edge, nonzero_bits1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sbitmap.c (sbitmap_difference): Likewise. * sched-deps.c (add_dependence, sched_analyze_1, sched_analyze_2, sched_analyze, add_forward_dependence): Likewise. * sched-ebb.c (fix_basic_block_boundaries, schedule_ebb): Likewise. * sched-rgn.c (debug_regions, compute_trg_info, schedule_region, schedule_insns): Likewise. * sched-vis.c (print_pattern): Likewise. * sdbout.c (sdbout_symbol, sdbout_toplevel_data): Likewise. * simplify-rtx.c (simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_ternary_operation, simplify_immed_subreg, simplify_subreg, simplify_gen_subreg): Likewise. * sreal.c (copy, sreal_sub, sreal_div): Likewise. * stmt.c (force_label_rtx, expand_goto, expand_asm_operands, resolve_operand_name_1, expand_return, expand_decl, expand_anon_union_decl, emit_case_bit_tests, expand_case): Likewise. * stor-layout.c (put_pending_size, smallest_mode_for_size, int_mode_for_mode, layout_decl, finish_builtin_struct, layout_type, set_sizetype, get_mode_bounds): Likewise. From-SVN: r87244
2004-09-09 19:19:16 +02:00
gcc_assert (before == boundary);
break;
}
if (INSN_P (before))
{
int nregs_old = parm.nregs;
note_stores (PATTERN (before), parms_set, &parm);
/* If we found something that did not set a parameter reg,
we're done. Do not keep going, as that might result
in hoisting an insn before the setting of a pseudo
that is used by the hoisted insn. */
if (nregs_old != parm.nregs)
first_set = before;
else
break;
}
}
return first_set;
}
/* Return true if we should avoid inserting code between INSN and preceding
call instruction. */
bool
keep_with_call_p (const rtx_insn *insn)
{
rtx set;
if (INSN_P (insn) && (set = single_set (insn)) != NULL)
{
alias.c (record_set, [...]): Use REG_P. 2004-06-15 Jerry Quinn <jlquinn@optonline.net> * alias.c (record_set, record_base_value, canon_rtx, get_addr, nonlocal_mentioned_p_1, init_alias_analysis): Use REG_P. * bt-load.c (find_btr_reference, insn_sets_btr_p, note_btr_set): Likewise. * builtins.c (expand_builtin_setjmp, expand_builtin_apply, expand_builtin_mathfn, expand_builtin_strlen, expand_builtin_memcmp, expand_builtin_strcmp, expand_builtin_strncmp, expand_builtin_frame_address): Likewise. * caller-save.c (mark_set_regs, add_stored_regs, mark_referenced_regs, insert_one_insn): Likewise. * calls.c (prepare_call_address, precompute_register_parameters, precompute_arguments, expand_call, emit_library_call_value_1): Likewise. * cfganal.c (flow_active_insn_p): Likewise. * combine.c (set_nonzero_bits_and_sign_copies, can_combine_p, combinable_i3pat, try_combine, find_split_point, COMBINE_RTX_EQUAL_P, subst, combine_simplify_rtx, simplify_if_then_else, simplify_set, make_extraction, recog_for_combine, gen_lowpart_for_combine, simplify_comparison, record_dead_and_set_regs_1, record_dead_and_set_regs, record_promoted_value, check_promoted_subreg, get_last_value_validate, get_last_value, reg_dead_at_p_1, reg_bitfield_target_p, distribute_notes, unmentioned_reg_p_1): Likewise. * conflict.c (mark_reg): Likewise. * cse.c (HASH, COST, COST_IN, approx_reg_cost_1, notreg_cost, mention_regs, insert_regs, lookup, lookup_for_remove, insert, merge_equiv_classes, flush_hash_table, invalidate, remove_invalid_refs, remove_invalid_subreg_refs, rehash_using_reg, invalidate_for_call, use_related_value, canon_hash, exp_equiv_p, cse_rtx_varies_p, canon_reg, find_best_addr, fold_rtx, equiv_constant, record_jump_cond, cse_insn, addr_affects_sp_p, invalidate_from_clobbers, cse_process_notes, cse_around_loop, cse_set_around_loop, count_reg_usage, set_live_p, cse_change_cc_mode, cse_cc_succs, cse_condition_code_reg): Likewise. * cselib.c (cselib_reg_set_mode, rtx_equal_for_cselib_p, cselib_lookup, cselib_invalidate_regno, cselib_invalidate_rtx, cselib_record_set, cselib_record_sets): Likewise. * dbxout.c (dbxout_symbol_location, dbxout_parms, dbxout_reg_parms, dbxout_block): Likewise. * df.c (df_ref_record, df_def_record_1, df_uses_record): Likewise. * dojump.c (do_jump): Likewise. * dwarf2out.c (dwarf2out_frame_debug_expr, is_pseudo_reg, is_based_loc, rtl_for_decl_location): Likewise. * emit-rtl.c (set_reg_attrs_for_parm, set_decl_rtl, set_decl_incoming_rtl, mark_user_reg): Likewise. * explow.c (copy_all_regs, copy_all_regs, memory_address, force_reg, copy_to_suggested_reg, allocate_dynamic_stack_space, probe_stack_range, hard_function_value): Likewise. * expmed.c (store_bit_field, store_fixed_bit_field, store_split_bit_field, extract_bit_field, extract_fixed_bit_field, extract_split_bit_field, expand_divmod, emit_store_flag_force): Likewise. * expr.c (convert_move, convert_modes, block_move_libcall_safe_for_call_parm, emit_group_load, use_reg, use_group_regs, emit_move_insn, emit_move_insn_1, compress_float_constant, push_block, emit_single_push_insn, emit_push_insn, get_subtarget, expand_assignment, store_expr, store_constructor, store_field, force_operand, safe_from_p, expand_expr_real_1, expand_increment, do_store_flag, do_tablejump): Likewise. * final.c (profile_function, final_scan_insn, alter_subreg, get_mem_expr_from_op, output_asm_operand_names, output_operand, only_leaf_regs_used, leaf_renumber_regs_insn): Likewise. * flow.c (verify_wide_reg_1, mark_regs_live_at_end, find_regno_partial, propagate_one_insn, init_propagate_block_info, insn_dead_p, libcall_dead_p, mark_set_1, not_reg_cond, attempt_auto_inc, find_auto_inc, mark_used_regs, count_or_remove_death_notes_bb): Likewise. * function.c (find_temp_slot_from_address, update_temp_slot_address, preserve_temp_slots, put_var_into_stack, fixup_var_refs_insn, fixup_var_refs_1, fixup_stack_1, optimize_bit_field, flush_addressof, put_addressof_into_stack, purge_addressof_1, insns_for_mem_walk, purge_single_hard_subreg_set, instantiate_decl, instantiate_virtual_regs_1, aggregate_value_p, assign_parms, promoted_input_arg, setjmp_vars_warning, setjmp_args_warning, setjmp_protect, setjmp_protect_args, fix_lexical_addr, expand_function_start, diddle_return_value, clobber_return_register, expand_function_end, keep_stack_depressed, handle_epilogue_set, update_epilogue_consts): Likewise. * genemit.c (gen_exp, gen_insn): Likewise. * genrecog.c (make_insn_sequence): Likewise. * global.c (global_conflicts, expand_preferences, mark_reg_store, mark_reg_conflicts, set_preference, reg_becomes_live, build_insn_chain, mark_reg_change): Likewise. * haifa_sched.c (CONST_BASED_ADDRESS_P, find_set_reg_weight): Likewise. * ifcvt.c (noce_try_abs, noce_get_condition, noce_process_if_block): Likewise. * integrate.c (copy_rtx_and_substitute, try_constants, subst_constants, mark_stores, allocate_initial_values): Likewise. * jump.c (reversed_comparison_code_parts, delete_prior_computation, delete_computation, rtx_renumbered_equal_p, true_regnum, reg_or_subregno): Likewise. * lcm.c (reg_dies, reg_becomes_live): Likewise. * local-alloc.c (validate_equiv_mem_from_store, validate_equiv_mem, update_equiv_regs, no_equiv, block_alloc, combine_regs, reg_is_set, wipe_dead_reg, no_conflict_p): Likewise. * loop-iv.c (simple_reg_p, simple_set_p, kill_sets, iv_get_reaching_def, iv_analyze_biv, altered_reg_used, mark_altered, simple_rhs_p, simplify_using_assignment, implies_p): Likewise. * loop.c (scan_loop, combine_movables, rtx_equal_for_loop_p, move_movables, note_set_pseudo_multiple_uses, consec_sets_invariant_p, find_single_use_in_loop, count_one_set, loop_bivs_init_find, loop_givs_rescan, check_insn_for_bivs, check_insn_for_givs, valid_initial_value_p, simplify_giv_expr, consec_sets_giv, loop_regs_update, check_dbra_loop, maybe_eliminate_biv, maybe_eliminate_biv_1, record_initial, update_reg_last_use, canonicalize_condition, loop_regs_scan, load_mems, try_copy_prop, try_swap_copy_prop): Likewise. * optabs.c (expand_binop, expand_vector_binop, expand_vector_unop, expand_abs, emit_no_conflict_block, emit_libcall_block, expand_float): Likewise. * postreload.c (reload_cse_simplify, reload_cse_simplify_set, reload_cse_simplify_operands, reload_combine, reload_combine_note_store, reload_combine_note_use, reload_cse_move2add, move2add_note_store): Likewise. * print-rtl.c (print_rtx): Likewise. * ra-build.c (copy_insn_p, remember_move, init_one_web_common, contains_pseudo, handle_asm_insn): Likewise. * ra-debug.c (ra_print_rtx_object, dump_constraints, dump_static_insn_cost): Likewise. * ra-rewrite.c (slots_overlap_p, emit_colors, remove_suspicious_death_notes): Likewise. * recog.c (validate_replace_rtx_1, find_single_use_1, find_single_use, register_operand, scratch_operand, nonmemory_operand, constrain_operands): Likewise. * reg-stack (check_asm_stack_operands, remove_regno_note, emit_swap_insn, swap_rtx_condition, subst_stack_regs_pat, subst_asm_stack_regs): Likewise. * regclass.c (scan_one_insn, record_reg_classes, copy_cost, record_address_regs, reg_scan_mark_refs): Likewise. * regmove.c (discover_flags_reg, replacement_quality, copy_src_to_dest, reg_is_remote_constant_p, regmove_optimize, fixup_match_1): Likewise. * regrename.c (note_sets, clear_dead_regs, build_def_use, kill_value, kill_set_value, copyprop_hardreg_forward_1): Likewise. * reload.c (MATCHES, push_secondary_reload, find_reusable_reload, reload_inner_reg_of_subreg, can_reload_into, push_reload, combine_reloads, find_dummy_reload, hard_reg_set_here_p, operands_match_p, decompose, find_reloads, find_reloads_toplev, find_reloads_address, subst_indexed_address, find_reloads_address_1, find_reloads_subreg_address, find_replacement, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p, find_equiv_reg, regno_clobbered_p): Likewise. * reload1.c (replace_pseudos_in, reload, calculate_needs_all_insns, find_reg, delete_dead_insn, alter_reg, eliminate_regs, elimination_effects, eliminate_regs_in_insn, scan_paradoxical_subregs, forget_old_reloads_1, reload_reg_free_for_value_p, choose_reload_regs, emit_input_reload_insns, emit_output_reload_insns, do_input_reload, do_output_reload, emit_reload_insns, gen_reload, delete_address_reloads_1, inc_for_reload): Likewise. * reorg.c (update_reg_dead_notes, fix_reg_dead_note, update_reg_unused_notes, fill_slots_from_thread): Likewise. * resource.c (update_live_status, mark_referenced_resources, mark_set_resources, mark_target_live_regs): Likewise. * rtlanal.c (nonzero_address_p, get_jump_table_offset, global_reg_mentioned_p_1, reg_mentioned_p, reg_referenced_p, reg_set_p, set_noop_p, find_last_value, refers_to_regno_p, note_stores, dead_or_set_p, dead_or_set_regno_p, find_regno_note, find_reg_fusage, find_regno_fusage, replace_regs, regno_use_in, parms_set, find_first_parameter_load, keep_with_call_p, hoist_test_store, hoist_update_store, address_cost, nonzero_bits1, num_sign_bit_copies1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sched-deps.c (deps_may_trap_p, sched_analyze_1, sched_analyze_insn, sched_analyze): Likewise. * sched-rgn.c (check_live_1, update_live_1, sets_likely_spilled_1): Likewise. * sdbout.c (sdbout_symbol, sdbout_parms, sdbout_reg_parms): Likewise. * simplify-rtx.c (simplify_replace_rtx, simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_subreg): Likewise. * stmt.c (decl_conflicts_with_clobbers_p, expand_asm_operands, expand_end_stmt_expr, expand_return, expand_decl, expand_anon_union_decl): Likewise. * unroll.c (precondition_loop_p, calculate_giv_inc, copy_loop_body, find_splittable_regs, find_splittable_givs, find_common_reg_term, loop_iterations): Likewise. * var-tracking.c (variable_union, variable_part_different_p, variable_different_p, count_uses, add_uses, add_stores, compute_bb_dataflow, set_variable_part, delete_variable_part, emit_notes_in_bb, vt_get_decl_and_offset, vt_add_function_parameters): Likewise. * varasm.c (assemble_variable): Likewise. From-SVN: r83195
2004-06-15 20:02:40 +02:00
if (REG_P (SET_DEST (set))
&& REGNO (SET_DEST (set)) < FIRST_PSEUDO_REGISTER
&& fixed_regs[REGNO (SET_DEST (set))]
&& general_operand (SET_SRC (set), VOIDmode))
return true;
alias.c (record_set, [...]): Use REG_P. 2004-06-15 Jerry Quinn <jlquinn@optonline.net> * alias.c (record_set, record_base_value, canon_rtx, get_addr, nonlocal_mentioned_p_1, init_alias_analysis): Use REG_P. * bt-load.c (find_btr_reference, insn_sets_btr_p, note_btr_set): Likewise. * builtins.c (expand_builtin_setjmp, expand_builtin_apply, expand_builtin_mathfn, expand_builtin_strlen, expand_builtin_memcmp, expand_builtin_strcmp, expand_builtin_strncmp, expand_builtin_frame_address): Likewise. * caller-save.c (mark_set_regs, add_stored_regs, mark_referenced_regs, insert_one_insn): Likewise. * calls.c (prepare_call_address, precompute_register_parameters, precompute_arguments, expand_call, emit_library_call_value_1): Likewise. * cfganal.c (flow_active_insn_p): Likewise. * combine.c (set_nonzero_bits_and_sign_copies, can_combine_p, combinable_i3pat, try_combine, find_split_point, COMBINE_RTX_EQUAL_P, subst, combine_simplify_rtx, simplify_if_then_else, simplify_set, make_extraction, recog_for_combine, gen_lowpart_for_combine, simplify_comparison, record_dead_and_set_regs_1, record_dead_and_set_regs, record_promoted_value, check_promoted_subreg, get_last_value_validate, get_last_value, reg_dead_at_p_1, reg_bitfield_target_p, distribute_notes, unmentioned_reg_p_1): Likewise. * conflict.c (mark_reg): Likewise. * cse.c (HASH, COST, COST_IN, approx_reg_cost_1, notreg_cost, mention_regs, insert_regs, lookup, lookup_for_remove, insert, merge_equiv_classes, flush_hash_table, invalidate, remove_invalid_refs, remove_invalid_subreg_refs, rehash_using_reg, invalidate_for_call, use_related_value, canon_hash, exp_equiv_p, cse_rtx_varies_p, canon_reg, find_best_addr, fold_rtx, equiv_constant, record_jump_cond, cse_insn, addr_affects_sp_p, invalidate_from_clobbers, cse_process_notes, cse_around_loop, cse_set_around_loop, count_reg_usage, set_live_p, cse_change_cc_mode, cse_cc_succs, cse_condition_code_reg): Likewise. * cselib.c (cselib_reg_set_mode, rtx_equal_for_cselib_p, cselib_lookup, cselib_invalidate_regno, cselib_invalidate_rtx, cselib_record_set, cselib_record_sets): Likewise. * dbxout.c (dbxout_symbol_location, dbxout_parms, dbxout_reg_parms, dbxout_block): Likewise. * df.c (df_ref_record, df_def_record_1, df_uses_record): Likewise. * dojump.c (do_jump): Likewise. * dwarf2out.c (dwarf2out_frame_debug_expr, is_pseudo_reg, is_based_loc, rtl_for_decl_location): Likewise. * emit-rtl.c (set_reg_attrs_for_parm, set_decl_rtl, set_decl_incoming_rtl, mark_user_reg): Likewise. * explow.c (copy_all_regs, copy_all_regs, memory_address, force_reg, copy_to_suggested_reg, allocate_dynamic_stack_space, probe_stack_range, hard_function_value): Likewise. * expmed.c (store_bit_field, store_fixed_bit_field, store_split_bit_field, extract_bit_field, extract_fixed_bit_field, extract_split_bit_field, expand_divmod, emit_store_flag_force): Likewise. * expr.c (convert_move, convert_modes, block_move_libcall_safe_for_call_parm, emit_group_load, use_reg, use_group_regs, emit_move_insn, emit_move_insn_1, compress_float_constant, push_block, emit_single_push_insn, emit_push_insn, get_subtarget, expand_assignment, store_expr, store_constructor, store_field, force_operand, safe_from_p, expand_expr_real_1, expand_increment, do_store_flag, do_tablejump): Likewise. * final.c (profile_function, final_scan_insn, alter_subreg, get_mem_expr_from_op, output_asm_operand_names, output_operand, only_leaf_regs_used, leaf_renumber_regs_insn): Likewise. * flow.c (verify_wide_reg_1, mark_regs_live_at_end, find_regno_partial, propagate_one_insn, init_propagate_block_info, insn_dead_p, libcall_dead_p, mark_set_1, not_reg_cond, attempt_auto_inc, find_auto_inc, mark_used_regs, count_or_remove_death_notes_bb): Likewise. * function.c (find_temp_slot_from_address, update_temp_slot_address, preserve_temp_slots, put_var_into_stack, fixup_var_refs_insn, fixup_var_refs_1, fixup_stack_1, optimize_bit_field, flush_addressof, put_addressof_into_stack, purge_addressof_1, insns_for_mem_walk, purge_single_hard_subreg_set, instantiate_decl, instantiate_virtual_regs_1, aggregate_value_p, assign_parms, promoted_input_arg, setjmp_vars_warning, setjmp_args_warning, setjmp_protect, setjmp_protect_args, fix_lexical_addr, expand_function_start, diddle_return_value, clobber_return_register, expand_function_end, keep_stack_depressed, handle_epilogue_set, update_epilogue_consts): Likewise. * genemit.c (gen_exp, gen_insn): Likewise. * genrecog.c (make_insn_sequence): Likewise. * global.c (global_conflicts, expand_preferences, mark_reg_store, mark_reg_conflicts, set_preference, reg_becomes_live, build_insn_chain, mark_reg_change): Likewise. * haifa_sched.c (CONST_BASED_ADDRESS_P, find_set_reg_weight): Likewise. * ifcvt.c (noce_try_abs, noce_get_condition, noce_process_if_block): Likewise. * integrate.c (copy_rtx_and_substitute, try_constants, subst_constants, mark_stores, allocate_initial_values): Likewise. * jump.c (reversed_comparison_code_parts, delete_prior_computation, delete_computation, rtx_renumbered_equal_p, true_regnum, reg_or_subregno): Likewise. * lcm.c (reg_dies, reg_becomes_live): Likewise. * local-alloc.c (validate_equiv_mem_from_store, validate_equiv_mem, update_equiv_regs, no_equiv, block_alloc, combine_regs, reg_is_set, wipe_dead_reg, no_conflict_p): Likewise. * loop-iv.c (simple_reg_p, simple_set_p, kill_sets, iv_get_reaching_def, iv_analyze_biv, altered_reg_used, mark_altered, simple_rhs_p, simplify_using_assignment, implies_p): Likewise. * loop.c (scan_loop, combine_movables, rtx_equal_for_loop_p, move_movables, note_set_pseudo_multiple_uses, consec_sets_invariant_p, find_single_use_in_loop, count_one_set, loop_bivs_init_find, loop_givs_rescan, check_insn_for_bivs, check_insn_for_givs, valid_initial_value_p, simplify_giv_expr, consec_sets_giv, loop_regs_update, check_dbra_loop, maybe_eliminate_biv, maybe_eliminate_biv_1, record_initial, update_reg_last_use, canonicalize_condition, loop_regs_scan, load_mems, try_copy_prop, try_swap_copy_prop): Likewise. * optabs.c (expand_binop, expand_vector_binop, expand_vector_unop, expand_abs, emit_no_conflict_block, emit_libcall_block, expand_float): Likewise. * postreload.c (reload_cse_simplify, reload_cse_simplify_set, reload_cse_simplify_operands, reload_combine, reload_combine_note_store, reload_combine_note_use, reload_cse_move2add, move2add_note_store): Likewise. * print-rtl.c (print_rtx): Likewise. * ra-build.c (copy_insn_p, remember_move, init_one_web_common, contains_pseudo, handle_asm_insn): Likewise. * ra-debug.c (ra_print_rtx_object, dump_constraints, dump_static_insn_cost): Likewise. * ra-rewrite.c (slots_overlap_p, emit_colors, remove_suspicious_death_notes): Likewise. * recog.c (validate_replace_rtx_1, find_single_use_1, find_single_use, register_operand, scratch_operand, nonmemory_operand, constrain_operands): Likewise. * reg-stack (check_asm_stack_operands, remove_regno_note, emit_swap_insn, swap_rtx_condition, subst_stack_regs_pat, subst_asm_stack_regs): Likewise. * regclass.c (scan_one_insn, record_reg_classes, copy_cost, record_address_regs, reg_scan_mark_refs): Likewise. * regmove.c (discover_flags_reg, replacement_quality, copy_src_to_dest, reg_is_remote_constant_p, regmove_optimize, fixup_match_1): Likewise. * regrename.c (note_sets, clear_dead_regs, build_def_use, kill_value, kill_set_value, copyprop_hardreg_forward_1): Likewise. * reload.c (MATCHES, push_secondary_reload, find_reusable_reload, reload_inner_reg_of_subreg, can_reload_into, push_reload, combine_reloads, find_dummy_reload, hard_reg_set_here_p, operands_match_p, decompose, find_reloads, find_reloads_toplev, find_reloads_address, subst_indexed_address, find_reloads_address_1, find_reloads_subreg_address, find_replacement, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p, find_equiv_reg, regno_clobbered_p): Likewise. * reload1.c (replace_pseudos_in, reload, calculate_needs_all_insns, find_reg, delete_dead_insn, alter_reg, eliminate_regs, elimination_effects, eliminate_regs_in_insn, scan_paradoxical_subregs, forget_old_reloads_1, reload_reg_free_for_value_p, choose_reload_regs, emit_input_reload_insns, emit_output_reload_insns, do_input_reload, do_output_reload, emit_reload_insns, gen_reload, delete_address_reloads_1, inc_for_reload): Likewise. * reorg.c (update_reg_dead_notes, fix_reg_dead_note, update_reg_unused_notes, fill_slots_from_thread): Likewise. * resource.c (update_live_status, mark_referenced_resources, mark_set_resources, mark_target_live_regs): Likewise. * rtlanal.c (nonzero_address_p, get_jump_table_offset, global_reg_mentioned_p_1, reg_mentioned_p, reg_referenced_p, reg_set_p, set_noop_p, find_last_value, refers_to_regno_p, note_stores, dead_or_set_p, dead_or_set_regno_p, find_regno_note, find_reg_fusage, find_regno_fusage, replace_regs, regno_use_in, parms_set, find_first_parameter_load, keep_with_call_p, hoist_test_store, hoist_update_store, address_cost, nonzero_bits1, num_sign_bit_copies1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sched-deps.c (deps_may_trap_p, sched_analyze_1, sched_analyze_insn, sched_analyze): Likewise. * sched-rgn.c (check_live_1, update_live_1, sets_likely_spilled_1): Likewise. * sdbout.c (sdbout_symbol, sdbout_parms, sdbout_reg_parms): Likewise. * simplify-rtx.c (simplify_replace_rtx, simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_subreg): Likewise. * stmt.c (decl_conflicts_with_clobbers_p, expand_asm_operands, expand_end_stmt_expr, expand_return, expand_decl, expand_anon_union_decl): Likewise. * unroll.c (precondition_loop_p, calculate_giv_inc, copy_loop_body, find_splittable_regs, find_splittable_givs, find_common_reg_term, loop_iterations): Likewise. * var-tracking.c (variable_union, variable_part_different_p, variable_different_p, count_uses, add_uses, add_stores, compute_bb_dataflow, set_variable_part, delete_variable_part, emit_notes_in_bb, vt_get_decl_and_offset, vt_add_function_parameters): Likewise. * varasm.c (assemble_variable): Likewise. From-SVN: r83195
2004-06-15 20:02:40 +02:00
if (REG_P (SET_SRC (set))
&& targetm.calls.function_value_regno_p (REGNO (SET_SRC (set)))
alias.c (record_set, [...]): Use REG_P. 2004-06-15 Jerry Quinn <jlquinn@optonline.net> * alias.c (record_set, record_base_value, canon_rtx, get_addr, nonlocal_mentioned_p_1, init_alias_analysis): Use REG_P. * bt-load.c (find_btr_reference, insn_sets_btr_p, note_btr_set): Likewise. * builtins.c (expand_builtin_setjmp, expand_builtin_apply, expand_builtin_mathfn, expand_builtin_strlen, expand_builtin_memcmp, expand_builtin_strcmp, expand_builtin_strncmp, expand_builtin_frame_address): Likewise. * caller-save.c (mark_set_regs, add_stored_regs, mark_referenced_regs, insert_one_insn): Likewise. * calls.c (prepare_call_address, precompute_register_parameters, precompute_arguments, expand_call, emit_library_call_value_1): Likewise. * cfganal.c (flow_active_insn_p): Likewise. * combine.c (set_nonzero_bits_and_sign_copies, can_combine_p, combinable_i3pat, try_combine, find_split_point, COMBINE_RTX_EQUAL_P, subst, combine_simplify_rtx, simplify_if_then_else, simplify_set, make_extraction, recog_for_combine, gen_lowpart_for_combine, simplify_comparison, record_dead_and_set_regs_1, record_dead_and_set_regs, record_promoted_value, check_promoted_subreg, get_last_value_validate, get_last_value, reg_dead_at_p_1, reg_bitfield_target_p, distribute_notes, unmentioned_reg_p_1): Likewise. * conflict.c (mark_reg): Likewise. * cse.c (HASH, COST, COST_IN, approx_reg_cost_1, notreg_cost, mention_regs, insert_regs, lookup, lookup_for_remove, insert, merge_equiv_classes, flush_hash_table, invalidate, remove_invalid_refs, remove_invalid_subreg_refs, rehash_using_reg, invalidate_for_call, use_related_value, canon_hash, exp_equiv_p, cse_rtx_varies_p, canon_reg, find_best_addr, fold_rtx, equiv_constant, record_jump_cond, cse_insn, addr_affects_sp_p, invalidate_from_clobbers, cse_process_notes, cse_around_loop, cse_set_around_loop, count_reg_usage, set_live_p, cse_change_cc_mode, cse_cc_succs, cse_condition_code_reg): Likewise. * cselib.c (cselib_reg_set_mode, rtx_equal_for_cselib_p, cselib_lookup, cselib_invalidate_regno, cselib_invalidate_rtx, cselib_record_set, cselib_record_sets): Likewise. * dbxout.c (dbxout_symbol_location, dbxout_parms, dbxout_reg_parms, dbxout_block): Likewise. * df.c (df_ref_record, df_def_record_1, df_uses_record): Likewise. * dojump.c (do_jump): Likewise. * dwarf2out.c (dwarf2out_frame_debug_expr, is_pseudo_reg, is_based_loc, rtl_for_decl_location): Likewise. * emit-rtl.c (set_reg_attrs_for_parm, set_decl_rtl, set_decl_incoming_rtl, mark_user_reg): Likewise. * explow.c (copy_all_regs, copy_all_regs, memory_address, force_reg, copy_to_suggested_reg, allocate_dynamic_stack_space, probe_stack_range, hard_function_value): Likewise. * expmed.c (store_bit_field, store_fixed_bit_field, store_split_bit_field, extract_bit_field, extract_fixed_bit_field, extract_split_bit_field, expand_divmod, emit_store_flag_force): Likewise. * expr.c (convert_move, convert_modes, block_move_libcall_safe_for_call_parm, emit_group_load, use_reg, use_group_regs, emit_move_insn, emit_move_insn_1, compress_float_constant, push_block, emit_single_push_insn, emit_push_insn, get_subtarget, expand_assignment, store_expr, store_constructor, store_field, force_operand, safe_from_p, expand_expr_real_1, expand_increment, do_store_flag, do_tablejump): Likewise. * final.c (profile_function, final_scan_insn, alter_subreg, get_mem_expr_from_op, output_asm_operand_names, output_operand, only_leaf_regs_used, leaf_renumber_regs_insn): Likewise. * flow.c (verify_wide_reg_1, mark_regs_live_at_end, find_regno_partial, propagate_one_insn, init_propagate_block_info, insn_dead_p, libcall_dead_p, mark_set_1, not_reg_cond, attempt_auto_inc, find_auto_inc, mark_used_regs, count_or_remove_death_notes_bb): Likewise. * function.c (find_temp_slot_from_address, update_temp_slot_address, preserve_temp_slots, put_var_into_stack, fixup_var_refs_insn, fixup_var_refs_1, fixup_stack_1, optimize_bit_field, flush_addressof, put_addressof_into_stack, purge_addressof_1, insns_for_mem_walk, purge_single_hard_subreg_set, instantiate_decl, instantiate_virtual_regs_1, aggregate_value_p, assign_parms, promoted_input_arg, setjmp_vars_warning, setjmp_args_warning, setjmp_protect, setjmp_protect_args, fix_lexical_addr, expand_function_start, diddle_return_value, clobber_return_register, expand_function_end, keep_stack_depressed, handle_epilogue_set, update_epilogue_consts): Likewise. * genemit.c (gen_exp, gen_insn): Likewise. * genrecog.c (make_insn_sequence): Likewise. * global.c (global_conflicts, expand_preferences, mark_reg_store, mark_reg_conflicts, set_preference, reg_becomes_live, build_insn_chain, mark_reg_change): Likewise. * haifa_sched.c (CONST_BASED_ADDRESS_P, find_set_reg_weight): Likewise. * ifcvt.c (noce_try_abs, noce_get_condition, noce_process_if_block): Likewise. * integrate.c (copy_rtx_and_substitute, try_constants, subst_constants, mark_stores, allocate_initial_values): Likewise. * jump.c (reversed_comparison_code_parts, delete_prior_computation, delete_computation, rtx_renumbered_equal_p, true_regnum, reg_or_subregno): Likewise. * lcm.c (reg_dies, reg_becomes_live): Likewise. * local-alloc.c (validate_equiv_mem_from_store, validate_equiv_mem, update_equiv_regs, no_equiv, block_alloc, combine_regs, reg_is_set, wipe_dead_reg, no_conflict_p): Likewise. * loop-iv.c (simple_reg_p, simple_set_p, kill_sets, iv_get_reaching_def, iv_analyze_biv, altered_reg_used, mark_altered, simple_rhs_p, simplify_using_assignment, implies_p): Likewise. * loop.c (scan_loop, combine_movables, rtx_equal_for_loop_p, move_movables, note_set_pseudo_multiple_uses, consec_sets_invariant_p, find_single_use_in_loop, count_one_set, loop_bivs_init_find, loop_givs_rescan, check_insn_for_bivs, check_insn_for_givs, valid_initial_value_p, simplify_giv_expr, consec_sets_giv, loop_regs_update, check_dbra_loop, maybe_eliminate_biv, maybe_eliminate_biv_1, record_initial, update_reg_last_use, canonicalize_condition, loop_regs_scan, load_mems, try_copy_prop, try_swap_copy_prop): Likewise. * optabs.c (expand_binop, expand_vector_binop, expand_vector_unop, expand_abs, emit_no_conflict_block, emit_libcall_block, expand_float): Likewise. * postreload.c (reload_cse_simplify, reload_cse_simplify_set, reload_cse_simplify_operands, reload_combine, reload_combine_note_store, reload_combine_note_use, reload_cse_move2add, move2add_note_store): Likewise. * print-rtl.c (print_rtx): Likewise. * ra-build.c (copy_insn_p, remember_move, init_one_web_common, contains_pseudo, handle_asm_insn): Likewise. * ra-debug.c (ra_print_rtx_object, dump_constraints, dump_static_insn_cost): Likewise. * ra-rewrite.c (slots_overlap_p, emit_colors, remove_suspicious_death_notes): Likewise. * recog.c (validate_replace_rtx_1, find_single_use_1, find_single_use, register_operand, scratch_operand, nonmemory_operand, constrain_operands): Likewise. * reg-stack (check_asm_stack_operands, remove_regno_note, emit_swap_insn, swap_rtx_condition, subst_stack_regs_pat, subst_asm_stack_regs): Likewise. * regclass.c (scan_one_insn, record_reg_classes, copy_cost, record_address_regs, reg_scan_mark_refs): Likewise. * regmove.c (discover_flags_reg, replacement_quality, copy_src_to_dest, reg_is_remote_constant_p, regmove_optimize, fixup_match_1): Likewise. * regrename.c (note_sets, clear_dead_regs, build_def_use, kill_value, kill_set_value, copyprop_hardreg_forward_1): Likewise. * reload.c (MATCHES, push_secondary_reload, find_reusable_reload, reload_inner_reg_of_subreg, can_reload_into, push_reload, combine_reloads, find_dummy_reload, hard_reg_set_here_p, operands_match_p, decompose, find_reloads, find_reloads_toplev, find_reloads_address, subst_indexed_address, find_reloads_address_1, find_reloads_subreg_address, find_replacement, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p, find_equiv_reg, regno_clobbered_p): Likewise. * reload1.c (replace_pseudos_in, reload, calculate_needs_all_insns, find_reg, delete_dead_insn, alter_reg, eliminate_regs, elimination_effects, eliminate_regs_in_insn, scan_paradoxical_subregs, forget_old_reloads_1, reload_reg_free_for_value_p, choose_reload_regs, emit_input_reload_insns, emit_output_reload_insns, do_input_reload, do_output_reload, emit_reload_insns, gen_reload, delete_address_reloads_1, inc_for_reload): Likewise. * reorg.c (update_reg_dead_notes, fix_reg_dead_note, update_reg_unused_notes, fill_slots_from_thread): Likewise. * resource.c (update_live_status, mark_referenced_resources, mark_set_resources, mark_target_live_regs): Likewise. * rtlanal.c (nonzero_address_p, get_jump_table_offset, global_reg_mentioned_p_1, reg_mentioned_p, reg_referenced_p, reg_set_p, set_noop_p, find_last_value, refers_to_regno_p, note_stores, dead_or_set_p, dead_or_set_regno_p, find_regno_note, find_reg_fusage, find_regno_fusage, replace_regs, regno_use_in, parms_set, find_first_parameter_load, keep_with_call_p, hoist_test_store, hoist_update_store, address_cost, nonzero_bits1, num_sign_bit_copies1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sched-deps.c (deps_may_trap_p, sched_analyze_1, sched_analyze_insn, sched_analyze): Likewise. * sched-rgn.c (check_live_1, update_live_1, sets_likely_spilled_1): Likewise. * sdbout.c (sdbout_symbol, sdbout_parms, sdbout_reg_parms): Likewise. * simplify-rtx.c (simplify_replace_rtx, simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_subreg): Likewise. * stmt.c (decl_conflicts_with_clobbers_p, expand_asm_operands, expand_end_stmt_expr, expand_return, expand_decl, expand_anon_union_decl): Likewise. * unroll.c (precondition_loop_p, calculate_giv_inc, copy_loop_body, find_splittable_regs, find_splittable_givs, find_common_reg_term, loop_iterations): Likewise. * var-tracking.c (variable_union, variable_part_different_p, variable_different_p, count_uses, add_uses, add_stores, compute_bb_dataflow, set_variable_part, delete_variable_part, emit_notes_in_bb, vt_get_decl_and_offset, vt_add_function_parameters): Likewise. * varasm.c (assemble_variable): Likewise. From-SVN: r83195
2004-06-15 20:02:40 +02:00
&& REG_P (SET_DEST (set))
&& REGNO (SET_DEST (set)) >= FIRST_PSEUDO_REGISTER)
return true;
/* There may be a stack pop just after the call and before the store
of the return register. Search for the actual store when deciding
if we can break or not. */
if (SET_DEST (set) == stack_pointer_rtx)
{
/* This CONST_CAST is okay because next_nonnote_insn just
returns its argument and we assign it to a const_rtx
variable. */
const rtx_insn *i2
= next_nonnote_insn (const_cast<rtx_insn *> (insn));
if (i2 && keep_with_call_p (i2))
return true;
}
}
return false;
}
/* Return true if LABEL is a target of JUMP_INSN. This applies only
to non-complex jumps. That is, direct unconditional, conditional,
and tablejumps, but not computed jumps or returns. It also does
not apply to the fallthru case of a conditional jump. */
bool
label_is_jump_target_p (const_rtx label, const rtx_insn *jump_insn)
{
rtx tmp = JUMP_LABEL (jump_insn);
Make tablejump_p accept a rtx_jump_table_data ** 2014-08-19 David Malcolm <dmalcolm@redhat.com> * rtl.h (tablejump_p): Strengthen third param from rtx * to rtx_jump_table_data **. * cfgbuild.c (make_edges): Introduce local "table", using it in place of "tmp" for jump table data. (find_bb_boundaries): Strengthen local "table" from rtx to rtx_jump_table_data *. * cfgcleanup.c (merge_blocks_move_successor_nojumps): Likewise. (outgoing_edges_match): Likewise for locals "table1" and "table2". (try_crossjump_to_edge): Likewise. * cfgrtl.c (try_redirect_by_replacing_jump): Likewise for local "table". (patch_jump_insn): Introduce local "table", using it in place of "tmp" for jump table data. (force_nonfallthru_and_redirect): Introduce local "table", so that call to tablejump_p can receive an rtx_jump_table_data **. Update logic around the call to overwrite "note" appropriately if tablejump_p returns non-zero. (get_last_bb_insn): Introduce local "table", using it in place of "tmp" for jump table data. * dwarf2cfi.c (create_trace_edges): Likewise. * config/arm/arm.c (get_jump_table_size): Strengthen param "insn" from rtx to rtx_jump_table_data *. (create_fix_barrier): Strengthen local "tmp" from rtx to rtx_jump_table_data *. (arm_reorg): Likewise for local "table". * config/s390/s390.c (s390_chunkify_start): Likewise. * config/spu/spu.c (spu_emit_branch_hint): Likewise. * jump.c (delete_related_insns): Strengthen local "lab_next" from rtx to rtx_jump_table_data *. * rtlanal.c (tablejump_p): Strengthen param "tablep" from rtx * to rtx_jump_table_data **. Add a checked cast when writing through the pointer: we know there that local "table" is non-NULL and that JUMP_TABLE_DATA_P (table) holds. (label_is_jump_target_p): Introduce local "table", using it in place of "tmp" for jump table data. From-SVN: r214184
2014-08-19 21:19:13 +02:00
rtx_jump_table_data *table;
if (label == tmp)
return true;
Make tablejump_p accept a rtx_jump_table_data ** 2014-08-19 David Malcolm <dmalcolm@redhat.com> * rtl.h (tablejump_p): Strengthen third param from rtx * to rtx_jump_table_data **. * cfgbuild.c (make_edges): Introduce local "table", using it in place of "tmp" for jump table data. (find_bb_boundaries): Strengthen local "table" from rtx to rtx_jump_table_data *. * cfgcleanup.c (merge_blocks_move_successor_nojumps): Likewise. (outgoing_edges_match): Likewise for locals "table1" and "table2". (try_crossjump_to_edge): Likewise. * cfgrtl.c (try_redirect_by_replacing_jump): Likewise for local "table". (patch_jump_insn): Introduce local "table", using it in place of "tmp" for jump table data. (force_nonfallthru_and_redirect): Introduce local "table", so that call to tablejump_p can receive an rtx_jump_table_data **. Update logic around the call to overwrite "note" appropriately if tablejump_p returns non-zero. (get_last_bb_insn): Introduce local "table", using it in place of "tmp" for jump table data. * dwarf2cfi.c (create_trace_edges): Likewise. * config/arm/arm.c (get_jump_table_size): Strengthen param "insn" from rtx to rtx_jump_table_data *. (create_fix_barrier): Strengthen local "tmp" from rtx to rtx_jump_table_data *. (arm_reorg): Likewise for local "table". * config/s390/s390.c (s390_chunkify_start): Likewise. * config/spu/spu.c (spu_emit_branch_hint): Likewise. * jump.c (delete_related_insns): Strengthen local "lab_next" from rtx to rtx_jump_table_data *. * rtlanal.c (tablejump_p): Strengthen param "tablep" from rtx * to rtx_jump_table_data **. Add a checked cast when writing through the pointer: we know there that local "table" is non-NULL and that JUMP_TABLE_DATA_P (table) holds. (label_is_jump_target_p): Introduce local "table", using it in place of "tmp" for jump table data. From-SVN: r214184
2014-08-19 21:19:13 +02:00
if (tablejump_p (jump_insn, NULL, &table))
{
rtvec vec = table->get_labels ();
int i, veclen = GET_NUM_ELEM (vec);
for (i = 0; i < veclen; ++i)
if (XEXP (RTVEC_ELT (vec, i), 0) == label)
return true;
}
if (find_reg_note (jump_insn, REG_LABEL_TARGET, label))
return true;
return false;
}
/* Return an estimate of the cost of computing rtx X.
One use is in cse, to decide which expression to keep in the hash table.
Another is in rtl generation, to pick the cheapest way to multiply.
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
Other uses like the latter are expected in the future.
fwprop.c (should_replace_address): Add speed attribute. * fwprop.c (should_replace_address): Add speed attribute. (PR_OPTIMIZE_FOR_SPEED): New flag. (propagate_rtx_1): Use it. (propagate_rtx): Set it. (try_fwprop_subst): Update call of rtx_costs. (forward_propagate_and_simplify): LIkewise. * hooks.c (hook_int_rtx_bool_0): New (hook_bool_rtx_int_int_intp_false): Replace by ... (hook_bool_rtx_int_int_intp_bool_false): .. thisone. * hooks.h (hook_int_rtx_bool_0): New (hook_bool_rtx_int_int_intp_false): Replace by ... (hook_bool_rtx_int_int_intp_bool_false): .. thisone. * optabs.c (avoid_expensive_constant): UPdate call of rtx_cost. (prepare_cmp_insn): UPdate call of rtx_cost. * postreload.c (reload_cse_simplify_set): Update call of rtx_cost. (reload_cse_simplify_operands): Update call of rtx_cost. (reload_cse_move2add): call of rtx_cost. * target.h (struct gcc_target): Update rtx_costs and address_costs. * rtlanal.c (rtx_cost): Add speed argument. (address_cost): Add speed argument (default_address_cost): Likewise. (insn_rtx_cost): Likewise. * cfgloopanal.c (seq_cost): Add speed argument. (target_reg_cost, target_spill_cost): Turn to array. (init_set_costs): Update for speed. (estimate_reg_pressure_cost): Add speed argument. * auto-inc-dec.c (attempt_change): Update call of rtx_cost. * dojump.c (prefer_and_bit_test): UPdate call of rtx_cost. * tree-ssa-loop-ivopts.c (struct ivopts_data): New field speed. (seq_cost): Add speed argument. (computation_cost): Add speed arugment. (add_cost, multiply_by_const, get_address_cost): add speed argument. (force_expr_to_var_cost): Update for profile info. (force_var_cost): Likewise. (split_address_cost): Likewise. (ptr_difference_cost): Likewise. (difference_cost): Likewise. (get_computation_cost_at): Likewise. (determine_iv_cost): Likewise. (ivopts_global_cost_for_size): Likewise. (rewrite_use_address): Likewise. (tree_ssa_iv_optimize_loop): Initialize speed field. * cse.c (optimize_this_for_speed_p): New static var. (notreg_cost): Update call of rtx_cost. (cse_extended_basic_block): set optimize_this_for_speed_p. * ifcvt.c (cheap_bb_rtx_cost_p): Update call of rtx_cost. (noce_try_cmove_arith): Likewise. (noce_try_sign_mask): LIkewise. * expr.c (compress_float_constant): Update rtx_cost calls. * tree-ssa-address.c (most_expensive_mult_to_index): Add speed argument. (addr_to_parts): Likewise. (create_mem_ref): Likewise. * dse.c (find_shift_sequence): Add speed argument. (replace_read): Update call. * calls.c (precompute_register_parameters): Update call of rtx_cost. * expmed.c (sdiv_pow2_cheap, smod_pow2_cheap, zero_cost, add_cost, * neg_cost, shift_cost, shiftadd_cost, shiftsub_cost, mul_cost, sdiv_cost, udiv_cost ,mul_widen_cost, mul_highpart_cost): Increase dimension. (init_expmed): Initialize for both size and speed. (expand_shift): Use profile. (synth_mult): Use profile. (choose_mult_variant): Use profile. (expand_mult): Use profile. (expand_mult_highpart_optab): Use profile. (expand_mult_highpart): Use profile. (expand_smod_pow2): Use profile. (expand_divmod): Use profile. * simplify-rtx.c (simplify_binary_operation_1): Update call of rtx_cost. * loop-invariant.c (create_new_invariant): Use profile. (gain_for_invariant): Add speed parameter. (best_gain_for_invariant): Likewise. (find_invariants_to_move): Likewise. (move_single_loop_invariants): Set it. * target-def.h (TARGET_RTX_COSTS): Use hook. * rtl.h (rtx_cost, address_cost, insn_rtx_cost): Update prototpe. (optimize_insn_for_size_p, optimize_insn_for_speed_p): Declare. * output.h (default_address_cost): Update prototype. * combine.c (optimize_this_for_speed_p): New static var. (combine_validate_cost): Update call of rtx_cost. (combine_instructions): Set optimize_this_for_speed_p. (expand_compound_operation): Update call of rtx_cost. (make_extraction):Update call of rtx_cost. (force_to_mode):Update call of rtx_cost. (distribute_and_simplify_rtx):Update call of rtx_cost. * cfgloop.h (target_reg_cost, target_spill_cost): Turn to array. (estimate_reg_pressure_cost): Update prototype. * tree-flow.h (multiply_by_cost, create_mem_ref): Update prototype. * basic-block.h (optimize_insn_for_size_p, optimize_insn_for_speed_p): Remove. * config/alpha/alpha.c (alpha_rtx_costs): Update. (alpha_rtx_costs): Update. * config/frv/frv.c (frv_rtx_costs): Update. * config/s390/s390.c (s390_rtx_costs): Update. * config/m32c/m32c.c (m32c_memory_move_cost): Update. (m32c_rtx_costs): Update. * config/spu/spu.c (TARGET_ADDRESS_COST): Upate. (spu_rtx_costs): Update. * config/sparc/sparc.c (sparc_rtx_costs): Update. * config/m32r/m32r.c (m32r_rtx_costs): Update. * config/i386/i386.c (:ix86_address_cost): Update. (ix86_rtx_costs): Update. * config/sh/sh.c (sh_rtx_costs, sh_address_cost): Update. * config/pdp11/pdp11.c (pdp11_rtx_costs): Update. * config/avr/avr.c (avr_rtx_costs, avr_address_cost): Update. * config/crx/crx.c (crx_address_cost): Update. * config/xtensa/xtensa.c (xtensa_rtx_costs): Update. * config/stormy16/stormy16.c (xstormy16_address_cost, xstormy16_rtx_costs): Update. * config/m68hc11/m68hc11.c (m68hc11_address_cost, m68hc11_rtx_costs): Update. * config/cris/cris.c (cris_rtx_costs, cris_address_cost): Update. * config/iq2000/iq2000.c (iq2000_rtx_costs, iq2000_address_cost): Update. * config/mn10300/mn10300.c (mn10300_address_cost, mn10300_rtx_costs): Update * config/ia64/ia64.c (ia64_rtx_costs): Update. * config/m68k/m68k.c (m68k_rtx_costs): Update. * config/rs6000/rs6000.c (rs6000_rtx_costs): Update. * config/arc/arc.c (arc_rtx_costs, arc_address_cost): Update. * config/mcore/mcore.c (TARGET_ADDRESS_COST): Update. (mcore_rtx_costs): update. * config/score/score3.c (score3_rtx_costs): Update. * config/score/score7.c (score7_rtx_costs): Update. * config/score/score3.h (score3_rtx_costs):Update. * config/score/score7.h (score7_rtx_costs): Update. * config/score/score.c (score_rtx_costs): Update. * config/arm/arm.c (arm_address_cost): Update. (arm_rtx_costs_1): Update. (arm_rtx_costs_1): Update. (arm_size_rtx_costs): Update. (arm_size_rtx_costs): Update. (arm_size_rtx_costs): Update. (arm_xscale_rtx_costs): Update. (arm_thumb_address_cost): Update. * config/pa/pa.c (hppa_address_cost): Update. * config/mips/mips.c (mips_rtx_costs): Update. * config/vax/vax.c (vax_address_cost): Update. * config/h8300/h8300.c (h8300_shift_costs): Update. (h8300_rtx_costs): Update. * config/v850/v850.c (TARGET_ADDRESS_COST): Update. (v850_rtx_costs): Update. * config/mmix/mmix.c (mmix_rtx_costs, mmix_rtx_costs): Update. * config/bfin/bfin.c (bfin_address_cost): Update. (bfin_rtx_costs): Update. * stmt.c (lshift_cheap_p): Update. From-SVN: r139821
2008-08-31 11:44:25 +02:00
tm.texi.in (TARGET_RTX_COSTS): Add an opno paramter. gcc/ * doc/tm.texi.in (TARGET_RTX_COSTS): Add an opno paramter. * doc/tm.texi: Regenerate. * target.def (rtx_costs): Add an opno parameter. * hooks.h (hook_bool_rtx_int_int_intp_bool_false): Replace with... (hook_bool_rtx_int_int_int_intp_bool_false): ...this. * hooks.c (hook_bool_rtx_int_int_intp_bool_false): Replace with... (hook_bool_rtx_int_int_int_intp_bool_false): ...this. * cse.c (COST_IN): Add an opno parameter. (notreg_cost): Likewise. Update call to rtx_cost. (COST, fold_rtx): Update accordingly. * dojump.c (prefer_and_bit_test): Update call to rtx_cost. * expmed.c (emit_store_flag): Likewise. * optabs.c (avoid_expensive_constant): Add an opno parameter. Update call to rtx_cost. (expand_binop_directly, expand_binop): Likewise. (expand_twoval_binop, prepare_cmp_insn): Likewise. * rtl.h (rtx_cost, get_full_rtx_cost): Add opno parameters. (set_src_cost, get_full_set_src_cost): Update accordingly. * rtlanal.c (rtx_cost): Add an opno parameter. Update call to target hook. (get_full_rtx_cost): Add an opno paramter. Update calls to rtx_cost. (default_adress_cost): Update calls to rtx_cost. * config/arm/arm.c (arm_rtx_costs_1, arm_size_rtx_costs) (arm_slowmul_rtx_costs): Adjust calls to rtx_cost. (arm_rtx_costs): Add an opno parameter. * config/alpha/alpha.c (alpha_rtx_costs): Add an opno parameter and adjust any recursive rtx-cost calls. * config/avr/avr.c (avr_operand_rtx_cost, avr_rtx_costs): Likewise. * config/bfin/bfin.c (bfin_rtx_costs): Likewise. * config/c6x/c6x.c (c6x_rtx_costs): Likewise. * config/cris/cris.c (cris_rtx_costs): Likewise. * config/frv/frv.c (frv_rtx_costs): Likewise. * config/h8300/h8300.c (h8300_rtx_costs): Likewise. * config/i386/i386.c (ix86_rtx_costs): Likewise. * config/ia64/ia64.c (ia64_rtx_costs): Likewise. * config/iq2000/iq2000.c (iq2000_rtx_costs): Likewise. * config/lm32/lm32.c (lm32_rtx_costs): Likewise. * config/m32c/m32c.c (m32c_rtx_costs): Likewise. * config/m32r/m32r.c (m32r_rtx_costs): Likewise. * config/m68k/m68k.c (m68k_rtx_costs): Likewise. * config/mcore/mcore.c (mcore_rtx_costs): Likewise. * config/mep/mep.c (mep_rtx_cost): Likewise. * config/microblaze/microblaze.c (microblaze_rtx_costs): Likewise. * config/mips/mips.c (mips_binary_cost): Update call to rtx_cost. (mips_zero_extend_cost): Add an opno parameter. * config/mmix/mmix.c (mmix_rtx_costs): Likewise. * config/mn10300/mn10300.c (mn10300_address_cost): Update call to rtx_cost. (mn10300_rtx_costs): Add an opno parameter and adjust any recursive rtx-cost calls. * config/pa/pa.c (hppa_rtx_costs): Likewise. * config/pdp11/pdp11.c (pdp11_rtx_costs): Likewise. * config/picochip/picochip.c (picochip_rtx_costs): Likewise. * config/rs6000/rs6000.c (rs6000_rtx_costs): Likewise. (rs6000_debug_rtx_costs): Likewise. * config/s390/s390.c (s390_rtx_costs): Likewise. * config/score/score-protos.h (score_rtx_costs): Likewise. * config/score/score.c (score_rtx_costs): Likewise. * config/sh/sh.c (andcosts): Update call to rtx_cost. (sh_rtx_costs): Add an opno parameter. * config/sparc/sparc.c (sparc_rtx_costs): Likewise. * config/spu/spu.c (spu_rtx_costs): Likewise. * config/stormy16/stormy16.c (xstormy16_rtx_costs): Likewise. * config/v850/v850.c (v850_rtx_costs): Likewise. * config/vax/vax.c (vax_rtx_costs): Likewise. * config/xtensa/xtensa.c (xtensa_rtx_costs): Likewise. From-SVN: r177852
2011-08-18 14:37:53 +02:00
X appears as operand OPNO in an expression with code OUTER_CODE.
SPEED specifies whether costs optimized for speed or size should
fwprop.c (should_replace_address): Add speed attribute. * fwprop.c (should_replace_address): Add speed attribute. (PR_OPTIMIZE_FOR_SPEED): New flag. (propagate_rtx_1): Use it. (propagate_rtx): Set it. (try_fwprop_subst): Update call of rtx_costs. (forward_propagate_and_simplify): LIkewise. * hooks.c (hook_int_rtx_bool_0): New (hook_bool_rtx_int_int_intp_false): Replace by ... (hook_bool_rtx_int_int_intp_bool_false): .. thisone. * hooks.h (hook_int_rtx_bool_0): New (hook_bool_rtx_int_int_intp_false): Replace by ... (hook_bool_rtx_int_int_intp_bool_false): .. thisone. * optabs.c (avoid_expensive_constant): UPdate call of rtx_cost. (prepare_cmp_insn): UPdate call of rtx_cost. * postreload.c (reload_cse_simplify_set): Update call of rtx_cost. (reload_cse_simplify_operands): Update call of rtx_cost. (reload_cse_move2add): call of rtx_cost. * target.h (struct gcc_target): Update rtx_costs and address_costs. * rtlanal.c (rtx_cost): Add speed argument. (address_cost): Add speed argument (default_address_cost): Likewise. (insn_rtx_cost): Likewise. * cfgloopanal.c (seq_cost): Add speed argument. (target_reg_cost, target_spill_cost): Turn to array. (init_set_costs): Update for speed. (estimate_reg_pressure_cost): Add speed argument. * auto-inc-dec.c (attempt_change): Update call of rtx_cost. * dojump.c (prefer_and_bit_test): UPdate call of rtx_cost. * tree-ssa-loop-ivopts.c (struct ivopts_data): New field speed. (seq_cost): Add speed argument. (computation_cost): Add speed arugment. (add_cost, multiply_by_const, get_address_cost): add speed argument. (force_expr_to_var_cost): Update for profile info. (force_var_cost): Likewise. (split_address_cost): Likewise. (ptr_difference_cost): Likewise. (difference_cost): Likewise. (get_computation_cost_at): Likewise. (determine_iv_cost): Likewise. (ivopts_global_cost_for_size): Likewise. (rewrite_use_address): Likewise. (tree_ssa_iv_optimize_loop): Initialize speed field. * cse.c (optimize_this_for_speed_p): New static var. (notreg_cost): Update call of rtx_cost. (cse_extended_basic_block): set optimize_this_for_speed_p. * ifcvt.c (cheap_bb_rtx_cost_p): Update call of rtx_cost. (noce_try_cmove_arith): Likewise. (noce_try_sign_mask): LIkewise. * expr.c (compress_float_constant): Update rtx_cost calls. * tree-ssa-address.c (most_expensive_mult_to_index): Add speed argument. (addr_to_parts): Likewise. (create_mem_ref): Likewise. * dse.c (find_shift_sequence): Add speed argument. (replace_read): Update call. * calls.c (precompute_register_parameters): Update call of rtx_cost. * expmed.c (sdiv_pow2_cheap, smod_pow2_cheap, zero_cost, add_cost, * neg_cost, shift_cost, shiftadd_cost, shiftsub_cost, mul_cost, sdiv_cost, udiv_cost ,mul_widen_cost, mul_highpart_cost): Increase dimension. (init_expmed): Initialize for both size and speed. (expand_shift): Use profile. (synth_mult): Use profile. (choose_mult_variant): Use profile. (expand_mult): Use profile. (expand_mult_highpart_optab): Use profile. (expand_mult_highpart): Use profile. (expand_smod_pow2): Use profile. (expand_divmod): Use profile. * simplify-rtx.c (simplify_binary_operation_1): Update call of rtx_cost. * loop-invariant.c (create_new_invariant): Use profile. (gain_for_invariant): Add speed parameter. (best_gain_for_invariant): Likewise. (find_invariants_to_move): Likewise. (move_single_loop_invariants): Set it. * target-def.h (TARGET_RTX_COSTS): Use hook. * rtl.h (rtx_cost, address_cost, insn_rtx_cost): Update prototpe. (optimize_insn_for_size_p, optimize_insn_for_speed_p): Declare. * output.h (default_address_cost): Update prototype. * combine.c (optimize_this_for_speed_p): New static var. (combine_validate_cost): Update call of rtx_cost. (combine_instructions): Set optimize_this_for_speed_p. (expand_compound_operation): Update call of rtx_cost. (make_extraction):Update call of rtx_cost. (force_to_mode):Update call of rtx_cost. (distribute_and_simplify_rtx):Update call of rtx_cost. * cfgloop.h (target_reg_cost, target_spill_cost): Turn to array. (estimate_reg_pressure_cost): Update prototype. * tree-flow.h (multiply_by_cost, create_mem_ref): Update prototype. * basic-block.h (optimize_insn_for_size_p, optimize_insn_for_speed_p): Remove. * config/alpha/alpha.c (alpha_rtx_costs): Update. (alpha_rtx_costs): Update. * config/frv/frv.c (frv_rtx_costs): Update. * config/s390/s390.c (s390_rtx_costs): Update. * config/m32c/m32c.c (m32c_memory_move_cost): Update. (m32c_rtx_costs): Update. * config/spu/spu.c (TARGET_ADDRESS_COST): Upate. (spu_rtx_costs): Update. * config/sparc/sparc.c (sparc_rtx_costs): Update. * config/m32r/m32r.c (m32r_rtx_costs): Update. * config/i386/i386.c (:ix86_address_cost): Update. (ix86_rtx_costs): Update. * config/sh/sh.c (sh_rtx_costs, sh_address_cost): Update. * config/pdp11/pdp11.c (pdp11_rtx_costs): Update. * config/avr/avr.c (avr_rtx_costs, avr_address_cost): Update. * config/crx/crx.c (crx_address_cost): Update. * config/xtensa/xtensa.c (xtensa_rtx_costs): Update. * config/stormy16/stormy16.c (xstormy16_address_cost, xstormy16_rtx_costs): Update. * config/m68hc11/m68hc11.c (m68hc11_address_cost, m68hc11_rtx_costs): Update. * config/cris/cris.c (cris_rtx_costs, cris_address_cost): Update. * config/iq2000/iq2000.c (iq2000_rtx_costs, iq2000_address_cost): Update. * config/mn10300/mn10300.c (mn10300_address_cost, mn10300_rtx_costs): Update * config/ia64/ia64.c (ia64_rtx_costs): Update. * config/m68k/m68k.c (m68k_rtx_costs): Update. * config/rs6000/rs6000.c (rs6000_rtx_costs): Update. * config/arc/arc.c (arc_rtx_costs, arc_address_cost): Update. * config/mcore/mcore.c (TARGET_ADDRESS_COST): Update. (mcore_rtx_costs): update. * config/score/score3.c (score3_rtx_costs): Update. * config/score/score7.c (score7_rtx_costs): Update. * config/score/score3.h (score3_rtx_costs):Update. * config/score/score7.h (score7_rtx_costs): Update. * config/score/score.c (score_rtx_costs): Update. * config/arm/arm.c (arm_address_cost): Update. (arm_rtx_costs_1): Update. (arm_rtx_costs_1): Update. (arm_size_rtx_costs): Update. (arm_size_rtx_costs): Update. (arm_size_rtx_costs): Update. (arm_xscale_rtx_costs): Update. (arm_thumb_address_cost): Update. * config/pa/pa.c (hppa_address_cost): Update. * config/mips/mips.c (mips_rtx_costs): Update. * config/vax/vax.c (vax_address_cost): Update. * config/h8300/h8300.c (h8300_shift_costs): Update. (h8300_rtx_costs): Update. * config/v850/v850.c (TARGET_ADDRESS_COST): Update. (v850_rtx_costs): Update. * config/mmix/mmix.c (mmix_rtx_costs, mmix_rtx_costs): Update. * config/bfin/bfin.c (bfin_address_cost): Update. (bfin_rtx_costs): Update. * stmt.c (lshift_cheap_p): Update. From-SVN: r139821
2008-08-31 11:44:25 +02:00
be returned. */
int
tm.texi.in (TARGET_RTX_COSTS): Add an opno paramter. gcc/ * doc/tm.texi.in (TARGET_RTX_COSTS): Add an opno paramter. * doc/tm.texi: Regenerate. * target.def (rtx_costs): Add an opno parameter. * hooks.h (hook_bool_rtx_int_int_intp_bool_false): Replace with... (hook_bool_rtx_int_int_int_intp_bool_false): ...this. * hooks.c (hook_bool_rtx_int_int_intp_bool_false): Replace with... (hook_bool_rtx_int_int_int_intp_bool_false): ...this. * cse.c (COST_IN): Add an opno parameter. (notreg_cost): Likewise. Update call to rtx_cost. (COST, fold_rtx): Update accordingly. * dojump.c (prefer_and_bit_test): Update call to rtx_cost. * expmed.c (emit_store_flag): Likewise. * optabs.c (avoid_expensive_constant): Add an opno parameter. Update call to rtx_cost. (expand_binop_directly, expand_binop): Likewise. (expand_twoval_binop, prepare_cmp_insn): Likewise. * rtl.h (rtx_cost, get_full_rtx_cost): Add opno parameters. (set_src_cost, get_full_set_src_cost): Update accordingly. * rtlanal.c (rtx_cost): Add an opno parameter. Update call to target hook. (get_full_rtx_cost): Add an opno paramter. Update calls to rtx_cost. (default_adress_cost): Update calls to rtx_cost. * config/arm/arm.c (arm_rtx_costs_1, arm_size_rtx_costs) (arm_slowmul_rtx_costs): Adjust calls to rtx_cost. (arm_rtx_costs): Add an opno parameter. * config/alpha/alpha.c (alpha_rtx_costs): Add an opno parameter and adjust any recursive rtx-cost calls. * config/avr/avr.c (avr_operand_rtx_cost, avr_rtx_costs): Likewise. * config/bfin/bfin.c (bfin_rtx_costs): Likewise. * config/c6x/c6x.c (c6x_rtx_costs): Likewise. * config/cris/cris.c (cris_rtx_costs): Likewise. * config/frv/frv.c (frv_rtx_costs): Likewise. * config/h8300/h8300.c (h8300_rtx_costs): Likewise. * config/i386/i386.c (ix86_rtx_costs): Likewise. * config/ia64/ia64.c (ia64_rtx_costs): Likewise. * config/iq2000/iq2000.c (iq2000_rtx_costs): Likewise. * config/lm32/lm32.c (lm32_rtx_costs): Likewise. * config/m32c/m32c.c (m32c_rtx_costs): Likewise. * config/m32r/m32r.c (m32r_rtx_costs): Likewise. * config/m68k/m68k.c (m68k_rtx_costs): Likewise. * config/mcore/mcore.c (mcore_rtx_costs): Likewise. * config/mep/mep.c (mep_rtx_cost): Likewise. * config/microblaze/microblaze.c (microblaze_rtx_costs): Likewise. * config/mips/mips.c (mips_binary_cost): Update call to rtx_cost. (mips_zero_extend_cost): Add an opno parameter. * config/mmix/mmix.c (mmix_rtx_costs): Likewise. * config/mn10300/mn10300.c (mn10300_address_cost): Update call to rtx_cost. (mn10300_rtx_costs): Add an opno parameter and adjust any recursive rtx-cost calls. * config/pa/pa.c (hppa_rtx_costs): Likewise. * config/pdp11/pdp11.c (pdp11_rtx_costs): Likewise. * config/picochip/picochip.c (picochip_rtx_costs): Likewise. * config/rs6000/rs6000.c (rs6000_rtx_costs): Likewise. (rs6000_debug_rtx_costs): Likewise. * config/s390/s390.c (s390_rtx_costs): Likewise. * config/score/score-protos.h (score_rtx_costs): Likewise. * config/score/score.c (score_rtx_costs): Likewise. * config/sh/sh.c (andcosts): Update call to rtx_cost. (sh_rtx_costs): Add an opno parameter. * config/sparc/sparc.c (sparc_rtx_costs): Likewise. * config/spu/spu.c (spu_rtx_costs): Likewise. * config/stormy16/stormy16.c (xstormy16_rtx_costs): Likewise. * config/v850/v850.c (v850_rtx_costs): Likewise. * config/vax/vax.c (vax_rtx_costs): Likewise. * config/xtensa/xtensa.c (xtensa_rtx_costs): Likewise. From-SVN: r177852
2011-08-18 14:37:53 +02:00
rtx_cost (rtx x, enum rtx_code outer_code, int opno, bool speed)
{
int i, j;
enum rtx_code code;
const char *fmt;
int total;
int factor;
if (x == 0)
return 0;
/* A size N times larger than UNITS_PER_WORD likely needs N times as
many insns, taking N times as long. */
factor = GET_MODE_SIZE (GET_MODE (x)) / UNITS_PER_WORD;
if (factor == 0)
factor = 1;
/* Compute the default costs of certain things.
Note that targetm.rtx_costs can override the defaults. */
code = GET_CODE (x);
switch (code)
{
case MULT:
/* Multiplication has time-complexity O(N*N), where N is the
number of units (translated from digits) when using
schoolbook long multiplication. */
total = factor * factor * COSTS_N_INSNS (5);
break;
case DIV:
case UDIV:
case MOD:
case UMOD:
/* Similarly, complexity for schoolbook long division. */
total = factor * factor * COSTS_N_INSNS (7);
break;
case USE:
/* Used in combine.c as a marker. */
total = 0;
break;
case SET:
/* A SET doesn't have a mode, so let's look at the SET_DEST to get
the mode for the factor. */
factor = GET_MODE_SIZE (GET_MODE (SET_DEST (x))) / UNITS_PER_WORD;
if (factor == 0)
factor = 1;
/* Pass through. */
default:
total = factor * COSTS_N_INSNS (1);
}
switch (code)
{
case REG:
return 0;
case SUBREG:
total = 0;
/* If we can't tie these modes, make this expensive. The larger
the mode, the more expensive it is. */
if (! MODES_TIEABLE_P (GET_MODE (x), GET_MODE (SUBREG_REG (x))))
return COSTS_N_INSNS (2 + factor);
break;
default:
tm.texi.in (TARGET_RTX_COSTS): Add an opno paramter. gcc/ * doc/tm.texi.in (TARGET_RTX_COSTS): Add an opno paramter. * doc/tm.texi: Regenerate. * target.def (rtx_costs): Add an opno parameter. * hooks.h (hook_bool_rtx_int_int_intp_bool_false): Replace with... (hook_bool_rtx_int_int_int_intp_bool_false): ...this. * hooks.c (hook_bool_rtx_int_int_intp_bool_false): Replace with... (hook_bool_rtx_int_int_int_intp_bool_false): ...this. * cse.c (COST_IN): Add an opno parameter. (notreg_cost): Likewise. Update call to rtx_cost. (COST, fold_rtx): Update accordingly. * dojump.c (prefer_and_bit_test): Update call to rtx_cost. * expmed.c (emit_store_flag): Likewise. * optabs.c (avoid_expensive_constant): Add an opno parameter. Update call to rtx_cost. (expand_binop_directly, expand_binop): Likewise. (expand_twoval_binop, prepare_cmp_insn): Likewise. * rtl.h (rtx_cost, get_full_rtx_cost): Add opno parameters. (set_src_cost, get_full_set_src_cost): Update accordingly. * rtlanal.c (rtx_cost): Add an opno parameter. Update call to target hook. (get_full_rtx_cost): Add an opno paramter. Update calls to rtx_cost. (default_adress_cost): Update calls to rtx_cost. * config/arm/arm.c (arm_rtx_costs_1, arm_size_rtx_costs) (arm_slowmul_rtx_costs): Adjust calls to rtx_cost. (arm_rtx_costs): Add an opno parameter. * config/alpha/alpha.c (alpha_rtx_costs): Add an opno parameter and adjust any recursive rtx-cost calls. * config/avr/avr.c (avr_operand_rtx_cost, avr_rtx_costs): Likewise. * config/bfin/bfin.c (bfin_rtx_costs): Likewise. * config/c6x/c6x.c (c6x_rtx_costs): Likewise. * config/cris/cris.c (cris_rtx_costs): Likewise. * config/frv/frv.c (frv_rtx_costs): Likewise. * config/h8300/h8300.c (h8300_rtx_costs): Likewise. * config/i386/i386.c (ix86_rtx_costs): Likewise. * config/ia64/ia64.c (ia64_rtx_costs): Likewise. * config/iq2000/iq2000.c (iq2000_rtx_costs): Likewise. * config/lm32/lm32.c (lm32_rtx_costs): Likewise. * config/m32c/m32c.c (m32c_rtx_costs): Likewise. * config/m32r/m32r.c (m32r_rtx_costs): Likewise. * config/m68k/m68k.c (m68k_rtx_costs): Likewise. * config/mcore/mcore.c (mcore_rtx_costs): Likewise. * config/mep/mep.c (mep_rtx_cost): Likewise. * config/microblaze/microblaze.c (microblaze_rtx_costs): Likewise. * config/mips/mips.c (mips_binary_cost): Update call to rtx_cost. (mips_zero_extend_cost): Add an opno parameter. * config/mmix/mmix.c (mmix_rtx_costs): Likewise. * config/mn10300/mn10300.c (mn10300_address_cost): Update call to rtx_cost. (mn10300_rtx_costs): Add an opno parameter and adjust any recursive rtx-cost calls. * config/pa/pa.c (hppa_rtx_costs): Likewise. * config/pdp11/pdp11.c (pdp11_rtx_costs): Likewise. * config/picochip/picochip.c (picochip_rtx_costs): Likewise. * config/rs6000/rs6000.c (rs6000_rtx_costs): Likewise. (rs6000_debug_rtx_costs): Likewise. * config/s390/s390.c (s390_rtx_costs): Likewise. * config/score/score-protos.h (score_rtx_costs): Likewise. * config/score/score.c (score_rtx_costs): Likewise. * config/sh/sh.c (andcosts): Update call to rtx_cost. (sh_rtx_costs): Add an opno parameter. * config/sparc/sparc.c (sparc_rtx_costs): Likewise. * config/spu/spu.c (spu_rtx_costs): Likewise. * config/stormy16/stormy16.c (xstormy16_rtx_costs): Likewise. * config/v850/v850.c (v850_rtx_costs): Likewise. * config/vax/vax.c (vax_rtx_costs): Likewise. * config/xtensa/xtensa.c (xtensa_rtx_costs): Likewise. From-SVN: r177852
2011-08-18 14:37:53 +02:00
if (targetm.rtx_costs (x, code, outer_code, opno, &total, speed))
return total;
break;
}
/* Sum the costs of the sub-rtx's, plus cost of this operation,
which is already in total. */
fmt = GET_RTX_FORMAT (code);
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
if (fmt[i] == 'e')
tm.texi.in (TARGET_RTX_COSTS): Add an opno paramter. gcc/ * doc/tm.texi.in (TARGET_RTX_COSTS): Add an opno paramter. * doc/tm.texi: Regenerate. * target.def (rtx_costs): Add an opno parameter. * hooks.h (hook_bool_rtx_int_int_intp_bool_false): Replace with... (hook_bool_rtx_int_int_int_intp_bool_false): ...this. * hooks.c (hook_bool_rtx_int_int_intp_bool_false): Replace with... (hook_bool_rtx_int_int_int_intp_bool_false): ...this. * cse.c (COST_IN): Add an opno parameter. (notreg_cost): Likewise. Update call to rtx_cost. (COST, fold_rtx): Update accordingly. * dojump.c (prefer_and_bit_test): Update call to rtx_cost. * expmed.c (emit_store_flag): Likewise. * optabs.c (avoid_expensive_constant): Add an opno parameter. Update call to rtx_cost. (expand_binop_directly, expand_binop): Likewise. (expand_twoval_binop, prepare_cmp_insn): Likewise. * rtl.h (rtx_cost, get_full_rtx_cost): Add opno parameters. (set_src_cost, get_full_set_src_cost): Update accordingly. * rtlanal.c (rtx_cost): Add an opno parameter. Update call to target hook. (get_full_rtx_cost): Add an opno paramter. Update calls to rtx_cost. (default_adress_cost): Update calls to rtx_cost. * config/arm/arm.c (arm_rtx_costs_1, arm_size_rtx_costs) (arm_slowmul_rtx_costs): Adjust calls to rtx_cost. (arm_rtx_costs): Add an opno parameter. * config/alpha/alpha.c (alpha_rtx_costs): Add an opno parameter and adjust any recursive rtx-cost calls. * config/avr/avr.c (avr_operand_rtx_cost, avr_rtx_costs): Likewise. * config/bfin/bfin.c (bfin_rtx_costs): Likewise. * config/c6x/c6x.c (c6x_rtx_costs): Likewise. * config/cris/cris.c (cris_rtx_costs): Likewise. * config/frv/frv.c (frv_rtx_costs): Likewise. * config/h8300/h8300.c (h8300_rtx_costs): Likewise. * config/i386/i386.c (ix86_rtx_costs): Likewise. * config/ia64/ia64.c (ia64_rtx_costs): Likewise. * config/iq2000/iq2000.c (iq2000_rtx_costs): Likewise. * config/lm32/lm32.c (lm32_rtx_costs): Likewise. * config/m32c/m32c.c (m32c_rtx_costs): Likewise. * config/m32r/m32r.c (m32r_rtx_costs): Likewise. * config/m68k/m68k.c (m68k_rtx_costs): Likewise. * config/mcore/mcore.c (mcore_rtx_costs): Likewise. * config/mep/mep.c (mep_rtx_cost): Likewise. * config/microblaze/microblaze.c (microblaze_rtx_costs): Likewise. * config/mips/mips.c (mips_binary_cost): Update call to rtx_cost. (mips_zero_extend_cost): Add an opno parameter. * config/mmix/mmix.c (mmix_rtx_costs): Likewise. * config/mn10300/mn10300.c (mn10300_address_cost): Update call to rtx_cost. (mn10300_rtx_costs): Add an opno parameter and adjust any recursive rtx-cost calls. * config/pa/pa.c (hppa_rtx_costs): Likewise. * config/pdp11/pdp11.c (pdp11_rtx_costs): Likewise. * config/picochip/picochip.c (picochip_rtx_costs): Likewise. * config/rs6000/rs6000.c (rs6000_rtx_costs): Likewise. (rs6000_debug_rtx_costs): Likewise. * config/s390/s390.c (s390_rtx_costs): Likewise. * config/score/score-protos.h (score_rtx_costs): Likewise. * config/score/score.c (score_rtx_costs): Likewise. * config/sh/sh.c (andcosts): Update call to rtx_cost. (sh_rtx_costs): Add an opno parameter. * config/sparc/sparc.c (sparc_rtx_costs): Likewise. * config/spu/spu.c (spu_rtx_costs): Likewise. * config/stormy16/stormy16.c (xstormy16_rtx_costs): Likewise. * config/v850/v850.c (v850_rtx_costs): Likewise. * config/vax/vax.c (vax_rtx_costs): Likewise. * config/xtensa/xtensa.c (xtensa_rtx_costs): Likewise. From-SVN: r177852
2011-08-18 14:37:53 +02:00
total += rtx_cost (XEXP (x, i), code, i, speed);
else if (fmt[i] == 'E')
for (j = 0; j < XVECLEN (x, i); j++)
tm.texi.in (TARGET_RTX_COSTS): Add an opno paramter. gcc/ * doc/tm.texi.in (TARGET_RTX_COSTS): Add an opno paramter. * doc/tm.texi: Regenerate. * target.def (rtx_costs): Add an opno parameter. * hooks.h (hook_bool_rtx_int_int_intp_bool_false): Replace with... (hook_bool_rtx_int_int_int_intp_bool_false): ...this. * hooks.c (hook_bool_rtx_int_int_intp_bool_false): Replace with... (hook_bool_rtx_int_int_int_intp_bool_false): ...this. * cse.c (COST_IN): Add an opno parameter. (notreg_cost): Likewise. Update call to rtx_cost. (COST, fold_rtx): Update accordingly. * dojump.c (prefer_and_bit_test): Update call to rtx_cost. * expmed.c (emit_store_flag): Likewise. * optabs.c (avoid_expensive_constant): Add an opno parameter. Update call to rtx_cost. (expand_binop_directly, expand_binop): Likewise. (expand_twoval_binop, prepare_cmp_insn): Likewise. * rtl.h (rtx_cost, get_full_rtx_cost): Add opno parameters. (set_src_cost, get_full_set_src_cost): Update accordingly. * rtlanal.c (rtx_cost): Add an opno parameter. Update call to target hook. (get_full_rtx_cost): Add an opno paramter. Update calls to rtx_cost. (default_adress_cost): Update calls to rtx_cost. * config/arm/arm.c (arm_rtx_costs_1, arm_size_rtx_costs) (arm_slowmul_rtx_costs): Adjust calls to rtx_cost. (arm_rtx_costs): Add an opno parameter. * config/alpha/alpha.c (alpha_rtx_costs): Add an opno parameter and adjust any recursive rtx-cost calls. * config/avr/avr.c (avr_operand_rtx_cost, avr_rtx_costs): Likewise. * config/bfin/bfin.c (bfin_rtx_costs): Likewise. * config/c6x/c6x.c (c6x_rtx_costs): Likewise. * config/cris/cris.c (cris_rtx_costs): Likewise. * config/frv/frv.c (frv_rtx_costs): Likewise. * config/h8300/h8300.c (h8300_rtx_costs): Likewise. * config/i386/i386.c (ix86_rtx_costs): Likewise. * config/ia64/ia64.c (ia64_rtx_costs): Likewise. * config/iq2000/iq2000.c (iq2000_rtx_costs): Likewise. * config/lm32/lm32.c (lm32_rtx_costs): Likewise. * config/m32c/m32c.c (m32c_rtx_costs): Likewise. * config/m32r/m32r.c (m32r_rtx_costs): Likewise. * config/m68k/m68k.c (m68k_rtx_costs): Likewise. * config/mcore/mcore.c (mcore_rtx_costs): Likewise. * config/mep/mep.c (mep_rtx_cost): Likewise. * config/microblaze/microblaze.c (microblaze_rtx_costs): Likewise. * config/mips/mips.c (mips_binary_cost): Update call to rtx_cost. (mips_zero_extend_cost): Add an opno parameter. * config/mmix/mmix.c (mmix_rtx_costs): Likewise. * config/mn10300/mn10300.c (mn10300_address_cost): Update call to rtx_cost. (mn10300_rtx_costs): Add an opno parameter and adjust any recursive rtx-cost calls. * config/pa/pa.c (hppa_rtx_costs): Likewise. * config/pdp11/pdp11.c (pdp11_rtx_costs): Likewise. * config/picochip/picochip.c (picochip_rtx_costs): Likewise. * config/rs6000/rs6000.c (rs6000_rtx_costs): Likewise. (rs6000_debug_rtx_costs): Likewise. * config/s390/s390.c (s390_rtx_costs): Likewise. * config/score/score-protos.h (score_rtx_costs): Likewise. * config/score/score.c (score_rtx_costs): Likewise. * config/sh/sh.c (andcosts): Update call to rtx_cost. (sh_rtx_costs): Add an opno parameter. * config/sparc/sparc.c (sparc_rtx_costs): Likewise. * config/spu/spu.c (spu_rtx_costs): Likewise. * config/stormy16/stormy16.c (xstormy16_rtx_costs): Likewise. * config/v850/v850.c (v850_rtx_costs): Likewise. * config/vax/vax.c (vax_rtx_costs): Likewise. * config/xtensa/xtensa.c (xtensa_rtx_costs): Likewise. From-SVN: r177852
2011-08-18 14:37:53 +02:00
total += rtx_cost (XVECEXP (x, i, j), code, i, speed);
return total;
}
/* Fill in the structure C with information about both speed and size rtx
tm.texi.in (TARGET_RTX_COSTS): Add an opno paramter. gcc/ * doc/tm.texi.in (TARGET_RTX_COSTS): Add an opno paramter. * doc/tm.texi: Regenerate. * target.def (rtx_costs): Add an opno parameter. * hooks.h (hook_bool_rtx_int_int_intp_bool_false): Replace with... (hook_bool_rtx_int_int_int_intp_bool_false): ...this. * hooks.c (hook_bool_rtx_int_int_intp_bool_false): Replace with... (hook_bool_rtx_int_int_int_intp_bool_false): ...this. * cse.c (COST_IN): Add an opno parameter. (notreg_cost): Likewise. Update call to rtx_cost. (COST, fold_rtx): Update accordingly. * dojump.c (prefer_and_bit_test): Update call to rtx_cost. * expmed.c (emit_store_flag): Likewise. * optabs.c (avoid_expensive_constant): Add an opno parameter. Update call to rtx_cost. (expand_binop_directly, expand_binop): Likewise. (expand_twoval_binop, prepare_cmp_insn): Likewise. * rtl.h (rtx_cost, get_full_rtx_cost): Add opno parameters. (set_src_cost, get_full_set_src_cost): Update accordingly. * rtlanal.c (rtx_cost): Add an opno parameter. Update call to target hook. (get_full_rtx_cost): Add an opno paramter. Update calls to rtx_cost. (default_adress_cost): Update calls to rtx_cost. * config/arm/arm.c (arm_rtx_costs_1, arm_size_rtx_costs) (arm_slowmul_rtx_costs): Adjust calls to rtx_cost. (arm_rtx_costs): Add an opno parameter. * config/alpha/alpha.c (alpha_rtx_costs): Add an opno parameter and adjust any recursive rtx-cost calls. * config/avr/avr.c (avr_operand_rtx_cost, avr_rtx_costs): Likewise. * config/bfin/bfin.c (bfin_rtx_costs): Likewise. * config/c6x/c6x.c (c6x_rtx_costs): Likewise. * config/cris/cris.c (cris_rtx_costs): Likewise. * config/frv/frv.c (frv_rtx_costs): Likewise. * config/h8300/h8300.c (h8300_rtx_costs): Likewise. * config/i386/i386.c (ix86_rtx_costs): Likewise. * config/ia64/ia64.c (ia64_rtx_costs): Likewise. * config/iq2000/iq2000.c (iq2000_rtx_costs): Likewise. * config/lm32/lm32.c (lm32_rtx_costs): Likewise. * config/m32c/m32c.c (m32c_rtx_costs): Likewise. * config/m32r/m32r.c (m32r_rtx_costs): Likewise. * config/m68k/m68k.c (m68k_rtx_costs): Likewise. * config/mcore/mcore.c (mcore_rtx_costs): Likewise. * config/mep/mep.c (mep_rtx_cost): Likewise. * config/microblaze/microblaze.c (microblaze_rtx_costs): Likewise. * config/mips/mips.c (mips_binary_cost): Update call to rtx_cost. (mips_zero_extend_cost): Add an opno parameter. * config/mmix/mmix.c (mmix_rtx_costs): Likewise. * config/mn10300/mn10300.c (mn10300_address_cost): Update call to rtx_cost. (mn10300_rtx_costs): Add an opno parameter and adjust any recursive rtx-cost calls. * config/pa/pa.c (hppa_rtx_costs): Likewise. * config/pdp11/pdp11.c (pdp11_rtx_costs): Likewise. * config/picochip/picochip.c (picochip_rtx_costs): Likewise. * config/rs6000/rs6000.c (rs6000_rtx_costs): Likewise. (rs6000_debug_rtx_costs): Likewise. * config/s390/s390.c (s390_rtx_costs): Likewise. * config/score/score-protos.h (score_rtx_costs): Likewise. * config/score/score.c (score_rtx_costs): Likewise. * config/sh/sh.c (andcosts): Update call to rtx_cost. (sh_rtx_costs): Add an opno parameter. * config/sparc/sparc.c (sparc_rtx_costs): Likewise. * config/spu/spu.c (spu_rtx_costs): Likewise. * config/stormy16/stormy16.c (xstormy16_rtx_costs): Likewise. * config/v850/v850.c (v850_rtx_costs): Likewise. * config/vax/vax.c (vax_rtx_costs): Likewise. * config/xtensa/xtensa.c (xtensa_rtx_costs): Likewise. From-SVN: r177852
2011-08-18 14:37:53 +02:00
costs for X, which is operand OPNO in an expression with code OUTER. */
void
tm.texi.in (TARGET_RTX_COSTS): Add an opno paramter. gcc/ * doc/tm.texi.in (TARGET_RTX_COSTS): Add an opno paramter. * doc/tm.texi: Regenerate. * target.def (rtx_costs): Add an opno parameter. * hooks.h (hook_bool_rtx_int_int_intp_bool_false): Replace with... (hook_bool_rtx_int_int_int_intp_bool_false): ...this. * hooks.c (hook_bool_rtx_int_int_intp_bool_false): Replace with... (hook_bool_rtx_int_int_int_intp_bool_false): ...this. * cse.c (COST_IN): Add an opno parameter. (notreg_cost): Likewise. Update call to rtx_cost. (COST, fold_rtx): Update accordingly. * dojump.c (prefer_and_bit_test): Update call to rtx_cost. * expmed.c (emit_store_flag): Likewise. * optabs.c (avoid_expensive_constant): Add an opno parameter. Update call to rtx_cost. (expand_binop_directly, expand_binop): Likewise. (expand_twoval_binop, prepare_cmp_insn): Likewise. * rtl.h (rtx_cost, get_full_rtx_cost): Add opno parameters. (set_src_cost, get_full_set_src_cost): Update accordingly. * rtlanal.c (rtx_cost): Add an opno parameter. Update call to target hook. (get_full_rtx_cost): Add an opno paramter. Update calls to rtx_cost. (default_adress_cost): Update calls to rtx_cost. * config/arm/arm.c (arm_rtx_costs_1, arm_size_rtx_costs) (arm_slowmul_rtx_costs): Adjust calls to rtx_cost. (arm_rtx_costs): Add an opno parameter. * config/alpha/alpha.c (alpha_rtx_costs): Add an opno parameter and adjust any recursive rtx-cost calls. * config/avr/avr.c (avr_operand_rtx_cost, avr_rtx_costs): Likewise. * config/bfin/bfin.c (bfin_rtx_costs): Likewise. * config/c6x/c6x.c (c6x_rtx_costs): Likewise. * config/cris/cris.c (cris_rtx_costs): Likewise. * config/frv/frv.c (frv_rtx_costs): Likewise. * config/h8300/h8300.c (h8300_rtx_costs): Likewise. * config/i386/i386.c (ix86_rtx_costs): Likewise. * config/ia64/ia64.c (ia64_rtx_costs): Likewise. * config/iq2000/iq2000.c (iq2000_rtx_costs): Likewise. * config/lm32/lm32.c (lm32_rtx_costs): Likewise. * config/m32c/m32c.c (m32c_rtx_costs): Likewise. * config/m32r/m32r.c (m32r_rtx_costs): Likewise. * config/m68k/m68k.c (m68k_rtx_costs): Likewise. * config/mcore/mcore.c (mcore_rtx_costs): Likewise. * config/mep/mep.c (mep_rtx_cost): Likewise. * config/microblaze/microblaze.c (microblaze_rtx_costs): Likewise. * config/mips/mips.c (mips_binary_cost): Update call to rtx_cost. (mips_zero_extend_cost): Add an opno parameter. * config/mmix/mmix.c (mmix_rtx_costs): Likewise. * config/mn10300/mn10300.c (mn10300_address_cost): Update call to rtx_cost. (mn10300_rtx_costs): Add an opno parameter and adjust any recursive rtx-cost calls. * config/pa/pa.c (hppa_rtx_costs): Likewise. * config/pdp11/pdp11.c (pdp11_rtx_costs): Likewise. * config/picochip/picochip.c (picochip_rtx_costs): Likewise. * config/rs6000/rs6000.c (rs6000_rtx_costs): Likewise. (rs6000_debug_rtx_costs): Likewise. * config/s390/s390.c (s390_rtx_costs): Likewise. * config/score/score-protos.h (score_rtx_costs): Likewise. * config/score/score.c (score_rtx_costs): Likewise. * config/sh/sh.c (andcosts): Update call to rtx_cost. (sh_rtx_costs): Add an opno parameter. * config/sparc/sparc.c (sparc_rtx_costs): Likewise. * config/spu/spu.c (spu_rtx_costs): Likewise. * config/stormy16/stormy16.c (xstormy16_rtx_costs): Likewise. * config/v850/v850.c (v850_rtx_costs): Likewise. * config/vax/vax.c (vax_rtx_costs): Likewise. * config/xtensa/xtensa.c (xtensa_rtx_costs): Likewise. From-SVN: r177852
2011-08-18 14:37:53 +02:00
get_full_rtx_cost (rtx x, enum rtx_code outer, int opno,
struct full_rtx_costs *c)
{
tm.texi.in (TARGET_RTX_COSTS): Add an opno paramter. gcc/ * doc/tm.texi.in (TARGET_RTX_COSTS): Add an opno paramter. * doc/tm.texi: Regenerate. * target.def (rtx_costs): Add an opno parameter. * hooks.h (hook_bool_rtx_int_int_intp_bool_false): Replace with... (hook_bool_rtx_int_int_int_intp_bool_false): ...this. * hooks.c (hook_bool_rtx_int_int_intp_bool_false): Replace with... (hook_bool_rtx_int_int_int_intp_bool_false): ...this. * cse.c (COST_IN): Add an opno parameter. (notreg_cost): Likewise. Update call to rtx_cost. (COST, fold_rtx): Update accordingly. * dojump.c (prefer_and_bit_test): Update call to rtx_cost. * expmed.c (emit_store_flag): Likewise. * optabs.c (avoid_expensive_constant): Add an opno parameter. Update call to rtx_cost. (expand_binop_directly, expand_binop): Likewise. (expand_twoval_binop, prepare_cmp_insn): Likewise. * rtl.h (rtx_cost, get_full_rtx_cost): Add opno parameters. (set_src_cost, get_full_set_src_cost): Update accordingly. * rtlanal.c (rtx_cost): Add an opno parameter. Update call to target hook. (get_full_rtx_cost): Add an opno paramter. Update calls to rtx_cost. (default_adress_cost): Update calls to rtx_cost. * config/arm/arm.c (arm_rtx_costs_1, arm_size_rtx_costs) (arm_slowmul_rtx_costs): Adjust calls to rtx_cost. (arm_rtx_costs): Add an opno parameter. * config/alpha/alpha.c (alpha_rtx_costs): Add an opno parameter and adjust any recursive rtx-cost calls. * config/avr/avr.c (avr_operand_rtx_cost, avr_rtx_costs): Likewise. * config/bfin/bfin.c (bfin_rtx_costs): Likewise. * config/c6x/c6x.c (c6x_rtx_costs): Likewise. * config/cris/cris.c (cris_rtx_costs): Likewise. * config/frv/frv.c (frv_rtx_costs): Likewise. * config/h8300/h8300.c (h8300_rtx_costs): Likewise. * config/i386/i386.c (ix86_rtx_costs): Likewise. * config/ia64/ia64.c (ia64_rtx_costs): Likewise. * config/iq2000/iq2000.c (iq2000_rtx_costs): Likewise. * config/lm32/lm32.c (lm32_rtx_costs): Likewise. * config/m32c/m32c.c (m32c_rtx_costs): Likewise. * config/m32r/m32r.c (m32r_rtx_costs): Likewise. * config/m68k/m68k.c (m68k_rtx_costs): Likewise. * config/mcore/mcore.c (mcore_rtx_costs): Likewise. * config/mep/mep.c (mep_rtx_cost): Likewise. * config/microblaze/microblaze.c (microblaze_rtx_costs): Likewise. * config/mips/mips.c (mips_binary_cost): Update call to rtx_cost. (mips_zero_extend_cost): Add an opno parameter. * config/mmix/mmix.c (mmix_rtx_costs): Likewise. * config/mn10300/mn10300.c (mn10300_address_cost): Update call to rtx_cost. (mn10300_rtx_costs): Add an opno parameter and adjust any recursive rtx-cost calls. * config/pa/pa.c (hppa_rtx_costs): Likewise. * config/pdp11/pdp11.c (pdp11_rtx_costs): Likewise. * config/picochip/picochip.c (picochip_rtx_costs): Likewise. * config/rs6000/rs6000.c (rs6000_rtx_costs): Likewise. (rs6000_debug_rtx_costs): Likewise. * config/s390/s390.c (s390_rtx_costs): Likewise. * config/score/score-protos.h (score_rtx_costs): Likewise. * config/score/score.c (score_rtx_costs): Likewise. * config/sh/sh.c (andcosts): Update call to rtx_cost. (sh_rtx_costs): Add an opno parameter. * config/sparc/sparc.c (sparc_rtx_costs): Likewise. * config/spu/spu.c (spu_rtx_costs): Likewise. * config/stormy16/stormy16.c (xstormy16_rtx_costs): Likewise. * config/v850/v850.c (v850_rtx_costs): Likewise. * config/vax/vax.c (vax_rtx_costs): Likewise. * config/xtensa/xtensa.c (xtensa_rtx_costs): Likewise. From-SVN: r177852
2011-08-18 14:37:53 +02:00
c->speed = rtx_cost (x, outer, opno, true);
c->size = rtx_cost (x, outer, opno, false);
}
/* Return cost of address expression X.
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
Expect that X is properly formed address reference.
fwprop.c (should_replace_address): Add speed attribute. * fwprop.c (should_replace_address): Add speed attribute. (PR_OPTIMIZE_FOR_SPEED): New flag. (propagate_rtx_1): Use it. (propagate_rtx): Set it. (try_fwprop_subst): Update call of rtx_costs. (forward_propagate_and_simplify): LIkewise. * hooks.c (hook_int_rtx_bool_0): New (hook_bool_rtx_int_int_intp_false): Replace by ... (hook_bool_rtx_int_int_intp_bool_false): .. thisone. * hooks.h (hook_int_rtx_bool_0): New (hook_bool_rtx_int_int_intp_false): Replace by ... (hook_bool_rtx_int_int_intp_bool_false): .. thisone. * optabs.c (avoid_expensive_constant): UPdate call of rtx_cost. (prepare_cmp_insn): UPdate call of rtx_cost. * postreload.c (reload_cse_simplify_set): Update call of rtx_cost. (reload_cse_simplify_operands): Update call of rtx_cost. (reload_cse_move2add): call of rtx_cost. * target.h (struct gcc_target): Update rtx_costs and address_costs. * rtlanal.c (rtx_cost): Add speed argument. (address_cost): Add speed argument (default_address_cost): Likewise. (insn_rtx_cost): Likewise. * cfgloopanal.c (seq_cost): Add speed argument. (target_reg_cost, target_spill_cost): Turn to array. (init_set_costs): Update for speed. (estimate_reg_pressure_cost): Add speed argument. * auto-inc-dec.c (attempt_change): Update call of rtx_cost. * dojump.c (prefer_and_bit_test): UPdate call of rtx_cost. * tree-ssa-loop-ivopts.c (struct ivopts_data): New field speed. (seq_cost): Add speed argument. (computation_cost): Add speed arugment. (add_cost, multiply_by_const, get_address_cost): add speed argument. (force_expr_to_var_cost): Update for profile info. (force_var_cost): Likewise. (split_address_cost): Likewise. (ptr_difference_cost): Likewise. (difference_cost): Likewise. (get_computation_cost_at): Likewise. (determine_iv_cost): Likewise. (ivopts_global_cost_for_size): Likewise. (rewrite_use_address): Likewise. (tree_ssa_iv_optimize_loop): Initialize speed field. * cse.c (optimize_this_for_speed_p): New static var. (notreg_cost): Update call of rtx_cost. (cse_extended_basic_block): set optimize_this_for_speed_p. * ifcvt.c (cheap_bb_rtx_cost_p): Update call of rtx_cost. (noce_try_cmove_arith): Likewise. (noce_try_sign_mask): LIkewise. * expr.c (compress_float_constant): Update rtx_cost calls. * tree-ssa-address.c (most_expensive_mult_to_index): Add speed argument. (addr_to_parts): Likewise. (create_mem_ref): Likewise. * dse.c (find_shift_sequence): Add speed argument. (replace_read): Update call. * calls.c (precompute_register_parameters): Update call of rtx_cost. * expmed.c (sdiv_pow2_cheap, smod_pow2_cheap, zero_cost, add_cost, * neg_cost, shift_cost, shiftadd_cost, shiftsub_cost, mul_cost, sdiv_cost, udiv_cost ,mul_widen_cost, mul_highpart_cost): Increase dimension. (init_expmed): Initialize for both size and speed. (expand_shift): Use profile. (synth_mult): Use profile. (choose_mult_variant): Use profile. (expand_mult): Use profile. (expand_mult_highpart_optab): Use profile. (expand_mult_highpart): Use profile. (expand_smod_pow2): Use profile. (expand_divmod): Use profile. * simplify-rtx.c (simplify_binary_operation_1): Update call of rtx_cost. * loop-invariant.c (create_new_invariant): Use profile. (gain_for_invariant): Add speed parameter. (best_gain_for_invariant): Likewise. (find_invariants_to_move): Likewise. (move_single_loop_invariants): Set it. * target-def.h (TARGET_RTX_COSTS): Use hook. * rtl.h (rtx_cost, address_cost, insn_rtx_cost): Update prototpe. (optimize_insn_for_size_p, optimize_insn_for_speed_p): Declare. * output.h (default_address_cost): Update prototype. * combine.c (optimize_this_for_speed_p): New static var. (combine_validate_cost): Update call of rtx_cost. (combine_instructions): Set optimize_this_for_speed_p. (expand_compound_operation): Update call of rtx_cost. (make_extraction):Update call of rtx_cost. (force_to_mode):Update call of rtx_cost. (distribute_and_simplify_rtx):Update call of rtx_cost. * cfgloop.h (target_reg_cost, target_spill_cost): Turn to array. (estimate_reg_pressure_cost): Update prototype. * tree-flow.h (multiply_by_cost, create_mem_ref): Update prototype. * basic-block.h (optimize_insn_for_size_p, optimize_insn_for_speed_p): Remove. * config/alpha/alpha.c (alpha_rtx_costs): Update. (alpha_rtx_costs): Update. * config/frv/frv.c (frv_rtx_costs): Update. * config/s390/s390.c (s390_rtx_costs): Update. * config/m32c/m32c.c (m32c_memory_move_cost): Update. (m32c_rtx_costs): Update. * config/spu/spu.c (TARGET_ADDRESS_COST): Upate. (spu_rtx_costs): Update. * config/sparc/sparc.c (sparc_rtx_costs): Update. * config/m32r/m32r.c (m32r_rtx_costs): Update. * config/i386/i386.c (:ix86_address_cost): Update. (ix86_rtx_costs): Update. * config/sh/sh.c (sh_rtx_costs, sh_address_cost): Update. * config/pdp11/pdp11.c (pdp11_rtx_costs): Update. * config/avr/avr.c (avr_rtx_costs, avr_address_cost): Update. * config/crx/crx.c (crx_address_cost): Update. * config/xtensa/xtensa.c (xtensa_rtx_costs): Update. * config/stormy16/stormy16.c (xstormy16_address_cost, xstormy16_rtx_costs): Update. * config/m68hc11/m68hc11.c (m68hc11_address_cost, m68hc11_rtx_costs): Update. * config/cris/cris.c (cris_rtx_costs, cris_address_cost): Update. * config/iq2000/iq2000.c (iq2000_rtx_costs, iq2000_address_cost): Update. * config/mn10300/mn10300.c (mn10300_address_cost, mn10300_rtx_costs): Update * config/ia64/ia64.c (ia64_rtx_costs): Update. * config/m68k/m68k.c (m68k_rtx_costs): Update. * config/rs6000/rs6000.c (rs6000_rtx_costs): Update. * config/arc/arc.c (arc_rtx_costs, arc_address_cost): Update. * config/mcore/mcore.c (TARGET_ADDRESS_COST): Update. (mcore_rtx_costs): update. * config/score/score3.c (score3_rtx_costs): Update. * config/score/score7.c (score7_rtx_costs): Update. * config/score/score3.h (score3_rtx_costs):Update. * config/score/score7.h (score7_rtx_costs): Update. * config/score/score.c (score_rtx_costs): Update. * config/arm/arm.c (arm_address_cost): Update. (arm_rtx_costs_1): Update. (arm_rtx_costs_1): Update. (arm_size_rtx_costs): Update. (arm_size_rtx_costs): Update. (arm_size_rtx_costs): Update. (arm_xscale_rtx_costs): Update. (arm_thumb_address_cost): Update. * config/pa/pa.c (hppa_address_cost): Update. * config/mips/mips.c (mips_rtx_costs): Update. * config/vax/vax.c (vax_address_cost): Update. * config/h8300/h8300.c (h8300_shift_costs): Update. (h8300_rtx_costs): Update. * config/v850/v850.c (TARGET_ADDRESS_COST): Update. (v850_rtx_costs): Update. * config/mmix/mmix.c (mmix_rtx_costs, mmix_rtx_costs): Update. * config/bfin/bfin.c (bfin_address_cost): Update. (bfin_rtx_costs): Update. * stmt.c (lshift_cheap_p): Update. From-SVN: r139821
2008-08-31 11:44:25 +02:00
SPEED parameter specify whether costs optimized for speed or size should
be returned. */
int
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 13:02:45 +01:00
address_cost (rtx x, machine_mode mode, addr_space_t as, bool speed)
{
/* We may be asked for cost of various unusual addresses, such as operands
of push instruction. It is not worthwhile to complicate writing
of the target hook by such cases. */
extend.texi (Named Address Spaces): New section. 2009-10-26 Ben Elliston <bje@au.ibm.com> Michael Meissner <meissner@linux.vnet.ibm.com> Ulrich Weigand <uweigand@de.ibm.com> * doc/extend.texi (Named Address Spaces): New section. * coretypes.h (addr_space_t): New type. (ADDR_SPACE_GENERIC): New define. (ADDR_SPACE_GENERIC_P): New macro. * doc/tm.texi (Named Address Spaces): New section. (TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P): Document. (TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS): Document. (TARGET_ADDR_SPACE_SUBSET_P): Document. (TARGET_ADDR_SPACE_CONVERT): Document. * target.h (struct gcc_target): Add addr_space substructure. * target-def.h (TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P): Define. (TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS): Likewise. (TARGET_ADDR_SPACE_SUBSET_P): Likewise. (TARGET_ADDR_SPACE_CONVERT): Likewise. (TARGET_ADDR_SPACE_HOOKS): Likewise. (TARGET_INITIALIZER): Initialize addr_space hooks. * targhooks.c (default_addr_space_legitimate_address_p): New function. (default_addr_space_legitimize_address): Likewise. (default_addr_space_subset_p): Likewise. (default_addr_space_convert): Likewise. * targhooks.h (default_addr_space_legitimate_address_p): Add prototype. (default_addr_space_legitimize_address): Likewise. (default_addr_space_subset_p): Likewise. (default_addr_space_convert): Likewise. * doc/rtl.texi (MEM_ADDR_SPACE): Document. * rtl.h (mem_attrs): Add ADDRSPACE memory attribute. (MEM_ADDR_SPACE): New macro. * emit-rtl.c (get_mem_attrs): Add ADDRSPACE argument and set address space memory attribute. (mem_attrs_htab_hash): Handle address space memory attribute. (mem_attrs_htab_eq): Likewise. (set_mem_attributes_minus_bitpos): Likewise. (set_mem_alias_set): Likewise. (set_mem_align): Likewise. (set_mem_expr): Likewise. (set_mem_offset): Likewise. (set_mem_size): Likewise. (adjust_address_1): Likewise. (offset_address): Likewise. (widen_memoy_address): Likewise. (get_spill_slot_decl): Likewise. (set_mem_attrs_for_spill): Likewise. (set_mem_addr_space): New function. * emit-rtl.h (set_mem_addr_space): Add prototype. * print-rtl.c (print_rtx): Print address space memory attribute. * expr.c (expand_assignment): Set address space memory attribute of generated MEM RTXes as appropriate. (expand_expr_real_1): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * tree-ssa-loop-ivopts.c (produce_memory_decl_rtl): Likewise. * tree.h (struct tree_base): Add address_space bitfield. Reduce size of "spare" bitfield. (TYPE_ADDR_SPACE): New macro. (ENCODE_QUAL_ADDR_SPACE): Likewise. (DECODE_QUAL_ADDR_SPACE): Likewise. (CLEAR_QUAL_ADDR_SPACE): Likewise. (KEEP_QUAL_ADDR_SPACE): Likewise. (TYPE_QUALS): Encode type address space. (TYPE_QUALS_NO_ADDR_SPACE): New macro. * tree.c (set_type_quals): Set type address space. (build_array_type): Inherit array address space from element type. * print-tree.c (print_node_brief): Print type address space. (print_node): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * explow.c (memory_address): Rename to ... (memory_address_addr_space): ... this. Add ADDRSPACE argument. Use address-space aware variants of memory address routines. * recog.c (memory_address_p): Rename to ... (memory_address_addr_space_p): ... this. Add ADDSPACE argument. Use address-space aware variants of memory address routines. (offsettable_address_p): Rename to ... (offsettable_address_addr_space_p): ... this. Add ADDRSPACE argument. Use address-space aware variants of memory address routines. * reload.c (strict_memory_address_p): Rename to ... (strict_memory_address_addr_space_p): ... this. Add ADDSPACE argument. Use address-space aware variants of memory address routines. (maybe_memory_address_p): Rename to ... (maybe_memory_address_addr_space_p): ... this. Add ADDSPACE argument. Use address-space aware variants of memory address routines. * expr.h (memory_address_addr_space): Add prototype. (memory_address): Define as macro. * recog.h (memory_address_addr_space_p): Add prototype. (memory_address_p): Define as macro. (offsettable_address_addr_space_p): Add prototype. (offsettable_address_p): Define as macro. (strict_memory_address_addr_space_p): Add prototype. (strict_memory_address_p): Define as macro. * combine.c (find_split_point): Use address-space aware variants of memory address routines. * emit-rtl.c (operand_subword): Likewise. (change_address_1): Likewise. (adjust_address_1): Likewise. (offset_address): Likewise. * expr.c (emit_move_insn): Likewise. (expand_assignment): Likewise. (expand_expr_real_1): Likewise. * recog.c (verify_changes): Likewise. (general_operand): Likewise. (offsettable_memref_p): Likewise. (offsettable_nonstrict_memref_p): Likewise. (constrain_operands): Likewise. * reload.c (get_secondary_mem): Likewise. (find_reloads_toplev): Likewise. (find_reloads_address): Likewise. (find_reloads_subreg_address): Likewise. * reload1.c (reload): Likewise. * rtlhooks.c (gen_lowpart_if_possible): Likewise. * rtl.h (address_cost): Add ADDRSPACE argument. * rtlanal.c (address_cost): Add ADDRSPACE argument. Use address-space aware variant of memory address routines. * loop-invariant.c (create_new_invariant): Update address_cost call. * tree-ssa-loop-ivopts.c (computation_cost): Likewise. * fwprop.c (should_replace_address): Add ADDRSPACE argument. Use address-space aware variant of memory address routines. (propagate_rtx_1): Update call to should_replace_address. * tree-flow.h (multiplier_allowed_in_address_p): Add ADDRSPACE argument. * tree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): Add ADDRSPACE argument. Use per-address-space instead of global cache. Use address-space aware variant of memory address routines. (get_address_cost): Likewise. (get_computation_cost_at): Update calls. * tree-ssa-address.c (valid_mem_ref_p): Add ADDRSPACE argument. Use address-space aware variant of memory address routines. (create_mem_ref_raw): Update call to valid_mem_ref_p. (most_expensive_mult_to_index): Update call to multiplier_allowed_in_address_p. * dwarf2out.c (modified_type_die): Output DW_AT_address_class attribute to indicate named address spaces. * varasm.c (get_variable_section): DECLs in named address spaces cannot be "common". * reload.c (find_reloads_address): Do not use LEGITIMIZE_RELOAD_ADDRESS for addresses in a non-generic address space. * expr.c (emit_block_move_hints): Do not use libcalls for memory in non-generic address spaces. (clear_storage_hints): Likewise. (expand_assignment): Likewise. * fold-const.c (operand_equal_p): Expressions refering to different address spaces are not equivalent. * rtl.c (rtx_equal_p_cb): MEMs refering to different address spaces are not equivalent. (rtx_equal_p): Likewise. * cse.c (exp_equiv_p): Likewise. * jump.c (rtx_renumbered_equal_p): Likewise. * reload.c (operands_match_p): Likewise. * alias.c (nonoverlapping_memrefs_p): MEMs refering to different address spaces may alias. (true_dependence): Likewise. (canon_true_dependence): Likewise. (write_dependence_p): Likewise. * dse.c (canon_address): Handle named address spaces. * ifcvt.c (noce_try_cmove_arith): Likewise. * tree.def (ADDR_SPACE_CONVERT_EXPR): New tree code. * expr.c (expand_expr_real_2): Expand ADDR_SPACE_CONVERT_EXPR. * convert.c (convert_to_pointer): Generate ADDR_SPACE_CONVERT_EXPR to handle conversions between different address spaces. * fold-const.c (fold_convert_loc): Likewise. (fold_unary_loc): Handle ADDR_SPACE_CONVERT_EXPR. * tree-pretty-print.c (dump_generic_node): Likewise. * gimple-pretty-print.c (dump_unary_rhs): Likewise. * tree-cfg.c (verify_gimple_assign_unary): Likewise. * tree-inline.c (estimate_operator_cost): Likewise. * tree-ssa.c (useless_type_conversion_p): Conversions between pointers to different address spaces are not useless. Co-Authored-By: Michael Meissner <meissner@linux.vnet.ibm.com> Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com> From-SVN: r153572
2009-10-26 22:55:59 +01:00
if (!memory_address_addr_space_p (mode, x, as))
return 1000;
hooks.c (hook_int_rtx_mode_as_bool_0): New function. * hooks.c (hook_int_rtx_mode_as_bool_0): New function. * hooks.h (hook_int_rtx_mode_as_bool_0): Declare it. * output.h (default_address_cost): Add machine_mode and address space arguments. * target.def (address_cost): Likewise. * rtlanal.c (address_cost): Pass mode and address space to target hook. (default_address_cost): Add unnamed machine_mode and address space arguments. * doc/tm.texi: Regenerate. * config/alpha/alpha.c (TARGET_ADDRESS_COST): Use hook_int_rtx_mode_as_bool_0 instead of hook_int_rtx_bool_0. * config/arm/arm.c (arm_address_cost): Add machine_mode and address space arguments. * config/avr/avr.c (avr_address_cost): Likewise. * config/bfin/bfin.c (bfin_address_cost): Likewise. * config/cr16/cr16.c (cr16_address_cost): Likewise. * config/cris/cris.c (cris_address_cost): Likewise. * config/epiphany/epiphany.c (epiphany_address_cost): Likewise. * config/i386/i386.c (ix86_address_cost): Likewise. * config/ia64/ia64.c (TARGET_ADDRESS_COST): Use hook_int_rtx_mode_as_bool_0 instead of hook_int_rtx_bool_0. * config/iq2000/iq2000.c (iq2000_address_cost): Add machine_mode and address space arguments. Pass them on in recursive invocation. * config/lm32/lm32.c (TARGET_ADDRESS_COST): Use hook_int_rtx_mode_as_bool_0 instead of hook_int_rtx_bool_0. * config/m32c/m32c.c (m32c_address_cost): Add machine_mode and address space arguments. * config/m32r/m32r.c (TARGET_ADDRESS_COST): Use hook_int_rtx_mode_as_bool_0 instead of hook_int_rtx_bool_0. * config/mcore/mcore.c (TARGET_ADDRESS_COST): Likewise. * config/mep/mep.c (mep_address_cost): Add machine_mode and address space arguments. * config/microblaze/microblaze.c (microblaze_address_cost): Likewise. * config/mips/mips.c (mips_address_cost): Likewise. * config/mmix/mmix.c (TARGET_ADDRESS_COST): Use hook_int_rtx_mode_as_bool_0 instead of hook_int_rtx_bool_0. * config/mn10300/mn10300.c (mn10300_address_cost): Add machine_mode and address space arguments. (mn10300_rtx_costs): Pass GET_MODE (x) and MEM_ADDR_SPACE (x) to mn10300_address_cost. * config/pa/pa.c (hppa_address_cost): Add machine_mode and address space arguments. * config/rs6000/rs6000.c (rs6000_debug_address_cost): Likewise. (TARGET_ADDRESS_COST): Use hook_int_rtx_mode_as_bool_0 instead of hook_int_rtx_bool_0. * config/rx/rx.c (rx_address_cost): Add machine_mode and address space arguments. * config/s390/s390.c (s390_address_cost): Likewise. * config/score/score-protos.h (score_address_cost): Likewise. * config/score/score.c (score_address_cost): Likewise. * config/sh/sh.c (sh_address_cost): Likewise. * config/sparc/sparc.c (TARGET_ADDRESS_COST): Use hook_int_rtx_mode_as_bool_0 instead of hook_int_rtx_bool_0. * config/spu/spu.c (TARGET_ADDRESS_COST): Likewise. * config/stormy16/stormy16.c (xstormy16_address_cost): Add machine_mode and address space arguments. * config/v850/v850.c (TARGET_ADDRESS_COST): Use hook_int_rtx_mode_as_bool_0 instead of hook_int_rtx_bool_0. * config/vax/vax.c (vax_address_cost): Add machine_mode and address space arguments. * config/xtensa/xtensa (TARGET_ADDRESS_COST): Use hook_int_rtx_mode_as_bool_0 instead of hook_int_rtx_bool_0. From-SVN: r190990
2012-09-05 19:31:17 +02:00
return targetm.address_cost (x, mode, as, speed);
}
/* If the target doesn't override, compute the cost as with arithmetic. */
int
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 13:02:45 +01:00
default_address_cost (rtx x, machine_mode, addr_space_t, bool speed)
{
tm.texi.in (TARGET_RTX_COSTS): Add an opno paramter. gcc/ * doc/tm.texi.in (TARGET_RTX_COSTS): Add an opno paramter. * doc/tm.texi: Regenerate. * target.def (rtx_costs): Add an opno parameter. * hooks.h (hook_bool_rtx_int_int_intp_bool_false): Replace with... (hook_bool_rtx_int_int_int_intp_bool_false): ...this. * hooks.c (hook_bool_rtx_int_int_intp_bool_false): Replace with... (hook_bool_rtx_int_int_int_intp_bool_false): ...this. * cse.c (COST_IN): Add an opno parameter. (notreg_cost): Likewise. Update call to rtx_cost. (COST, fold_rtx): Update accordingly. * dojump.c (prefer_and_bit_test): Update call to rtx_cost. * expmed.c (emit_store_flag): Likewise. * optabs.c (avoid_expensive_constant): Add an opno parameter. Update call to rtx_cost. (expand_binop_directly, expand_binop): Likewise. (expand_twoval_binop, prepare_cmp_insn): Likewise. * rtl.h (rtx_cost, get_full_rtx_cost): Add opno parameters. (set_src_cost, get_full_set_src_cost): Update accordingly. * rtlanal.c (rtx_cost): Add an opno parameter. Update call to target hook. (get_full_rtx_cost): Add an opno paramter. Update calls to rtx_cost. (default_adress_cost): Update calls to rtx_cost. * config/arm/arm.c (arm_rtx_costs_1, arm_size_rtx_costs) (arm_slowmul_rtx_costs): Adjust calls to rtx_cost. (arm_rtx_costs): Add an opno parameter. * config/alpha/alpha.c (alpha_rtx_costs): Add an opno parameter and adjust any recursive rtx-cost calls. * config/avr/avr.c (avr_operand_rtx_cost, avr_rtx_costs): Likewise. * config/bfin/bfin.c (bfin_rtx_costs): Likewise. * config/c6x/c6x.c (c6x_rtx_costs): Likewise. * config/cris/cris.c (cris_rtx_costs): Likewise. * config/frv/frv.c (frv_rtx_costs): Likewise. * config/h8300/h8300.c (h8300_rtx_costs): Likewise. * config/i386/i386.c (ix86_rtx_costs): Likewise. * config/ia64/ia64.c (ia64_rtx_costs): Likewise. * config/iq2000/iq2000.c (iq2000_rtx_costs): Likewise. * config/lm32/lm32.c (lm32_rtx_costs): Likewise. * config/m32c/m32c.c (m32c_rtx_costs): Likewise. * config/m32r/m32r.c (m32r_rtx_costs): Likewise. * config/m68k/m68k.c (m68k_rtx_costs): Likewise. * config/mcore/mcore.c (mcore_rtx_costs): Likewise. * config/mep/mep.c (mep_rtx_cost): Likewise. * config/microblaze/microblaze.c (microblaze_rtx_costs): Likewise. * config/mips/mips.c (mips_binary_cost): Update call to rtx_cost. (mips_zero_extend_cost): Add an opno parameter. * config/mmix/mmix.c (mmix_rtx_costs): Likewise. * config/mn10300/mn10300.c (mn10300_address_cost): Update call to rtx_cost. (mn10300_rtx_costs): Add an opno parameter and adjust any recursive rtx-cost calls. * config/pa/pa.c (hppa_rtx_costs): Likewise. * config/pdp11/pdp11.c (pdp11_rtx_costs): Likewise. * config/picochip/picochip.c (picochip_rtx_costs): Likewise. * config/rs6000/rs6000.c (rs6000_rtx_costs): Likewise. (rs6000_debug_rtx_costs): Likewise. * config/s390/s390.c (s390_rtx_costs): Likewise. * config/score/score-protos.h (score_rtx_costs): Likewise. * config/score/score.c (score_rtx_costs): Likewise. * config/sh/sh.c (andcosts): Update call to rtx_cost. (sh_rtx_costs): Add an opno parameter. * config/sparc/sparc.c (sparc_rtx_costs): Likewise. * config/spu/spu.c (spu_rtx_costs): Likewise. * config/stormy16/stormy16.c (xstormy16_rtx_costs): Likewise. * config/v850/v850.c (v850_rtx_costs): Likewise. * config/vax/vax.c (vax_rtx_costs): Likewise. * config/xtensa/xtensa.c (xtensa_rtx_costs): Likewise. From-SVN: r177852
2011-08-18 14:37:53 +02:00
return rtx_cost (x, MEM, 0, speed);
}
unsigned HOST_WIDE_INT
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 13:02:45 +01:00
nonzero_bits (const_rtx x, machine_mode mode)
{
return cached_nonzero_bits (x, mode, NULL_RTX, VOIDmode, 0);
}
unsigned int
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 13:02:45 +01:00
num_sign_bit_copies (const_rtx x, machine_mode mode)
{
return cached_num_sign_bit_copies (x, mode, NULL_RTX, VOIDmode, 0);
}
/* The function cached_nonzero_bits is a wrapper around nonzero_bits1.
It avoids exponential behavior in nonzero_bits1 when X has
identical subexpressions on the first or the second level. */
static unsigned HOST_WIDE_INT
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 13:02:45 +01:00
cached_nonzero_bits (const_rtx x, machine_mode mode, const_rtx known_x,
machine_mode known_mode,
unsigned HOST_WIDE_INT known_ret)
{
if (x == known_x && mode == known_mode)
return known_ret;
/* Try to find identical subexpressions. If found call
nonzero_bits1 on X with the subexpressions as KNOWN_X and the
precomputed value for the subexpression as KNOWN_RET. */
if (ARITHMETIC_P (x))
{
rtx x0 = XEXP (x, 0);
rtx x1 = XEXP (x, 1);
/* Check the first level. */
if (x0 == x1)
return nonzero_bits1 (x, mode, x0, mode,
cached_nonzero_bits (x0, mode, known_x,
known_mode, known_ret));
/* Check the second level. */
if (ARITHMETIC_P (x0)
&& (x1 == XEXP (x0, 0) || x1 == XEXP (x0, 1)))
return nonzero_bits1 (x, mode, x1, mode,
cached_nonzero_bits (x1, mode, known_x,
known_mode, known_ret));
if (ARITHMETIC_P (x1)
&& (x0 == XEXP (x1, 0) || x0 == XEXP (x1, 1)))
return nonzero_bits1 (x, mode, x0, mode,
cached_nonzero_bits (x0, mode, known_x,
known_mode, known_ret));
}
return nonzero_bits1 (x, mode, known_x, known_mode, known_ret);
}
/* We let num_sign_bit_copies recur into nonzero_bits as that is useful.
We don't let nonzero_bits recur into num_sign_bit_copies, because that
is less useful. We can't allow both, because that results in exponential
run time recursion. There is a nullstone testcase that triggered
this. This macro avoids accidental uses of num_sign_bit_copies. */
#define cached_num_sign_bit_copies sorry_i_am_preventing_exponential_behavior
/* Given an expression, X, compute which bits in X can be nonzero.
We don't care about bits outside of those defined in MODE.
For most X this is simply GET_MODE_MASK (GET_MODE (MODE)), but if X is
an arithmetic operation, we can do better. */
static unsigned HOST_WIDE_INT
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 13:02:45 +01:00
nonzero_bits1 (const_rtx x, machine_mode mode, const_rtx known_x,
machine_mode known_mode,
unsigned HOST_WIDE_INT known_ret)
{
unsigned HOST_WIDE_INT nonzero = GET_MODE_MASK (mode);
unsigned HOST_WIDE_INT inner_nz;
enum rtx_code code;
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 13:02:45 +01:00
machine_mode inner_mode;
unsigned int mode_width = GET_MODE_PRECISION (mode);
/* For floating-point and vector values, assume all bits are needed. */
if (FLOAT_MODE_P (GET_MODE (x)) || FLOAT_MODE_P (mode)
|| VECTOR_MODE_P (GET_MODE (x)) || VECTOR_MODE_P (mode))
return nonzero;
/* If X is wider than MODE, use its mode instead. */
if (GET_MODE_PRECISION (GET_MODE (x)) > mode_width)
{
mode = GET_MODE (x);
nonzero = GET_MODE_MASK (mode);
mode_width = GET_MODE_PRECISION (mode);
}
if (mode_width > HOST_BITS_PER_WIDE_INT)
/* Our only callers in this case look for single bit values. So
just return the mode mask. Those tests will then be false. */
return nonzero;
#ifndef WORD_REGISTER_OPERATIONS
/* If MODE is wider than X, but both are a single word for both the host
and target machines, we can compute this from which bits of the
object might be nonzero in its own mode, taking into account the fact
that on many CISC machines, accessing an object in a wider mode
causes the high-order bits to become undefined. So they are
not known to be zero. */
if (GET_MODE (x) != VOIDmode && GET_MODE (x) != mode
&& GET_MODE_PRECISION (GET_MODE (x)) <= BITS_PER_WORD
&& GET_MODE_PRECISION (GET_MODE (x)) <= HOST_BITS_PER_WIDE_INT
&& GET_MODE_PRECISION (mode) > GET_MODE_PRECISION (GET_MODE (x)))
{
nonzero &= cached_nonzero_bits (x, GET_MODE (x),
known_x, known_mode, known_ret);
nonzero |= GET_MODE_MASK (mode) & ~GET_MODE_MASK (GET_MODE (x));
return nonzero;
}
#endif
code = GET_CODE (x);
switch (code)
{
case REG:
#if defined(POINTERS_EXTEND_UNSIGNED) && !defined(HAVE_ptr_extend)
/* If pointers extend unsigned and this is a pointer in Pmode, say that
all the bits above ptr_mode are known to be zero. */
lto-symtab.c (lto_cgraph_replace_node): Update. * lto-symtab.c (lto_cgraph_replace_node): Update. * cgraphbuild.c (record_reference, record_type_list, record_eh_tables, mark_address, mark_load, mark_store): Update. * cgraph.c (cgraph_same_body_alias, dump_cgraph_node, cgraph_create_virtual_clone, cgraph_for_node_thunks_and_aliases): Update. * cgraph.h (symtab_node_def, symtab_node, const_symtab_node): Remove. (cgraph_alias_aliased_node, varpool_alias_aliased_node): Update. * reload.c: Fix typo in comment. * rtlanal.c: Likewise. * tree-emultls.c (gen_emutls_addr): Update. * ipa-reference.c (analyze_function): Update. * cgraphunit.c (cgraph_analyze_function, cgraph_process_same_body_aliases, assemble_thunks_and_aliases): Update. * ipa-ref.c (ipa_record_reference): Reorg to avoid reference types. (ipa_remove_reference): Likewise. (ipa_remove_all_refering): Rename to ... (ipa_remove_all_referring): ... this one; update. (ipa_dump_references): Update. (ipa_dump_referring): Update. (ipa_clone_references): Update. (ipa_clone_refering): Rename to ... (ipa_clone_referring): ... this one; update. (ipa_ref_cannot_lead_to_return): Update. (ipa_ref_has_aliases_p): Update. * ipa-ref.h (symtab_node_def, symtab_node, const_symtab_node): New forward typedefs. (ipa_ref_type): Remove. (ipa_ref_ptr_u): Remove. (ipa_ref): Remove referencing, refered, refered_index, refering_type and refered_type; add referring, referred and referred_index. (ipa_ref_list): Rename refering to referring. (ipa_record_reference, ipa_remove_all_referring, ipa_dump_referring, ipa_clone_references, ipa_clone_referring): Update prototypes. * lto-cgraph.c (referenced_from_other_partition_p): Update. (lto_output_ref): Update. (add_references): Update. (input_varpool_node): Update. (input_refs): Update. * ipa-ref-inline.h (ipa_ref_node): Update. (ipa_ref_varpool_node): Update. (ipa_ref_referring_node); Update. (ipa_ref_referring_varpool_node): Update. (ipa_ref_referring_ref_list); Update. (ipa_ref_referred_ref_list): Update. (ipa_ref_list_first_referring): Update. (ipa_empty_ref_list): Update. (ipa_ref_list_refering_iterate): Rename to ... (ipa_ref_list_referring_iterate): ... this one. * cse.c: Update comment. * ipa-utils.c (ipa_reverse_postorder): Update. * tree-ssa-alias.c: Update. * ipa-inline.c (reset_edge_caches): Update. (update_caller_keys): Update. * ipa-inline.h: Update comments. * jump.c: Update comment. * alias.c: Likewise. * ipa.c (process_references): Update. (cgraph_remove_unreachable_nodes): Likewise. (ipa_discover_readonly_nonaddressable_var): Likewise. (cgraph_address_taken_from_non_vtable_p): Likewise. * trans-mem.c (ipa_tm_execute): Update. * simplify-rtx.c: Fix comment. * rtl.c: Fix comment. * symtab.c (symtab_unregister_node): Update. * varpool.c (dump_varpool_node): Update. (varpool_analyze_pending_decls): Update. (assemble_aliases): Update. (varpool_for_node_and_aliases): Update. From-SVN: r186564
2012-04-18 11:57:53 +02:00
/* As we do not know which address space the pointer is referring to,
tm.texi (TARGET_ADDR_SPACE_POINTER_MODE): Document. 2009-10-26 Ben Elliston <bje@au.ibm.com> Michael Meissner <meissner@linux.vnet.ibm.com> Ulrich Weigand <uweigand@de.ibm.com> * doc/tm.texi (TARGET_ADDR_SPACE_POINTER_MODE): Document. (TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise. (TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise. * target.h (struct target_def): Add pointer_mode, address_mode, and valid_pointer_mode to addr_space substructure. * target-def.h (TARGET_ADDR_SPACE_POINTER_MODE): Define. (TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise. (TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise. (TARGET_ADDR_SPACE_HOOKS): Add them. * targhooks.c (target_default_pointer_address_modes_p): New function. * target.h (target_default_pointer_address_modes_p): Add prototype. * targhooks.c (default_addr_space_pointer_mode): New function. (default_addr_space_address_mode): Likewise. (default_addr_space_valid_pointer_mode): Likewise. * targhooks.h (default_addr_space_pointer_mode): Add prototype. (default_addr_space_address_mode): Likewise. (default_addr_space_valid_pointer_mode): Likewise. * output.h (default_valid_pointer_mode): Move to ... * targhooks.h (default_valid_pointer_mode): ... here. * varasm.c (default_valid_pointer_mode): Move to ... * targhooks.c (default_valid_pointer_mode): ... here. * varasm.c (output_constant): Use targetm.addr_space.valid_pointer_mode instead of targetm.valid_pointer_mode. * fold-const.c (fit_double_type): Use int_or_pointer_precision. * tree.c (integer_pow2p): Likewise. (tree_log2): Likewise. (tree_floor_log2): Likewise. (signed_or_unsigned_type_for): Support pointer type of different size. (int_or_pointer_precision): New function. * tree.h (int_or_pointer_precision): Add prototype. * stor-layout.c (layout_type): Set TYPE_PRECISION for offset types. * varasm.c (initializer_constant_valid_p): Use TYPE_PRECISION of incoming pointer type instead of POINTER_SIZE. * tree.c (build_pointer_type): Use appropriate pointer mode instead of ptr_mode. (build_reference_type): Likewise. * expr.c (store_expr): Likewise. (expand_expr_addr_expr): Likewise. * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * auto-inc-dec.c: Include "target.h". (try_merge): Use appropriate address mode instead of Pmode. (find_inc): Likewise. * combine.c (find_split_point): Likewise. * cselib.c (cselib_record_sets): Likewise. * dse.c (replace_inc_dec): Likewise. (canon_address): Likewise. * var-tracking.c (replace_expr_with_values): Likewise. (count_uses): Likewise. (add_uses): Likewise. (add_stores): Likewise. * emit-rtl.c: Include "target.h". (adjust_address_1): Use appropriate address mode instead of Pmode. (offset_address): Likewise. * explow.c (break_out_memory_refs): Likewise. (memory_address_addr_space): Likewise. (promote_mode): Likewise. * expr.c (move_by_pieces): Likewise. (emit_block_move_via_loop): Likewise. (store_by_pieces): Likewise. (store_by_pieces_1): Likewise. (expand_assignment): Likewise. (store_constructor): Likewise. (expand_expr_addr_expr): Likewise. (expand_expr_real_1): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * ifcvt.c (noce_try_cmove_arith): Likewise. * regcprop.c (kill_autoinc_value): Likewise. * regmove.c (try_auto_increment): Likewise. * reload.c (find_reloads): Likewise. (find_reloads_address): Likewise. (find_reloads_address_1): Likewise. * sched-deps.c: Include "target.h". (sched_analyze_1): Use appropriate address mode instead of Pmode. (sched_analyze_2): Likewise. * sel-sched-dump.c: Include "target.h". (debug_mem_addr_value): Use appropriate address mode instead of Pmode. * stor-layout.c (layout_type): Likewise. * tree-ssa-loop-ivopts.c (produce_memory_decl_rtl): Likewise. (multiplier_allowed_in_address_p): Likewise. (get_address_cost): Likewise. * varasm.c (make_decl_rtl): Likewise. * expr.c (expand_assignment): Always convert offsets to appropriate address mode. (store_expr): Likewise. (store_constructor): Likewise. (expand_expr_real_1): Likewise. * reload.h (form_sum): Add MODE argument. * reload.c (form_sum): Add MODE argument, use it instead of Pmode. Update recursive calls. (subst_indexed_address): Update calls to form_sum. * tree-flow.h (addr_for_mem_ref): Add ADDRSPACE argument. * tree-ssa-address.c: Include "target.h". (templates): Replace by ... (mem_addr_template_list): ... this new vector. (TEMPL_IDX): Handle address space numbers. (gen_addr_rtx): Add address mode argument, use it instead of Pmode. (addr_for_mem_ref): Add ADDRSPACE argument. Use per-address-space instead of global cache. Update call to gen_addr_rtx. (valid_mem_ref_p): Update call to addr_for_mem_ref. * expr.c (expand_expr_real_1): Update call to addr_for_mem_ref. * rtl.h (convert_memory_address_addr_space): Add prototype. (convert_memory_address): Define as macro. * explow.c (convert_memory_address): Rename to ... (convert_memory_address_addr_space): ... this. Add ADDRSPACE argument. Use appropriate pointer and address modes instead of ptr_mode / Pmode. Update recursive calls. (memory_address_addr_space): Call convert_memory_address_addr_space. * expmed.c (make_tree): Likewise. * expr.c (expand_assignment): Likewise. (expand_expr_addr_expr_1): Likewise. Also, add ADDRSPACE argument. (expand_expr_addr_expr): Likewise. Also, update call. * alias.c (find_base_value): Guard pointer size optimizations. (find_base_term): Likewise. * rtlanal.c (nonzero_bits1): Likewise. (num_sign_bit_copies1): Likewise. * simplify-rtx.c (simplify_unary_operation_1): Likewise. * Makefile.in (tree-ssa-address.o): Add $(TARGET_H) dependency. (emit-rtl.o): Likewise. (auto-inc-dec.o): Likewise. (sched-deps.o): Likewise. Co-Authored-By: Michael Meissner <meissner@linux.vnet.ibm.com> Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com> From-SVN: r153573
2009-10-26 22:57:10 +01:00
we can do this only if the target does not support different pointer
or address modes depending on the address space. */
if (target_default_pointer_address_modes_p ()
&& POINTERS_EXTEND_UNSIGNED && GET_MODE (x) == Pmode
&& REG_POINTER (x))
nonzero &= GET_MODE_MASK (ptr_mode);
#endif
/* Include declared information about alignment of pointers. */
/* ??? We don't properly preserve REG_POINTER changes across
pointer-to-integer casts, so we can't trust it except for
things that we know must be pointers. See execute/960116-1.c. */
if ((x == stack_pointer_rtx
|| x == frame_pointer_rtx
|| x == arg_pointer_rtx)
&& REGNO_POINTER_ALIGN (REGNO (x)))
{
unsigned HOST_WIDE_INT alignment
= REGNO_POINTER_ALIGN (REGNO (x)) / BITS_PER_UNIT;
#ifdef PUSH_ROUNDING
/* If PUSH_ROUNDING is defined, it is possible for the
stack to be momentarily aligned only to that amount,
so we pick the least alignment. */
if (x == stack_pointer_rtx && PUSH_ARGS)
alignment = MIN ((unsigned HOST_WIDE_INT) PUSH_ROUNDING (1),
alignment);
#endif
nonzero &= ~(alignment - 1);
}
{
unsigned HOST_WIDE_INT nonzero_for_hook = nonzero;
rtx new_rtx = rtl_hooks.reg_nonzero_bits (x, mode, known_x,
known_mode, known_ret,
&nonzero_for_hook);
if (new_rtx)
nonzero_for_hook &= cached_nonzero_bits (new_rtx, mode, known_x,
known_mode, known_ret);
return nonzero_for_hook;
}
case CONST_INT:
#ifdef SHORT_IMMEDIATES_SIGN_EXTEND
/* If X is negative in MODE, sign-extend the value. */
if (INTVAL (x) > 0
&& mode_width < BITS_PER_WORD
&& (UINTVAL (x) & ((unsigned HOST_WIDE_INT) 1 << (mode_width - 1)))
!= 0)
return UINTVAL (x) | (HOST_WIDE_INT_M1U << mode_width);
#endif
return UINTVAL (x);
case MEM:
#ifdef LOAD_EXTEND_OP
/* In many, if not most, RISC machines, reading a byte from memory
zeros the rest of the register. Noticing that fact saves a lot
of extra zero-extends. */
if (LOAD_EXTEND_OP (GET_MODE (x)) == ZERO_EXTEND)
nonzero &= GET_MODE_MASK (GET_MODE (x));
#endif
break;
case EQ: case NE:
case UNEQ: case LTGT:
case GT: case GTU: case UNGT:
case LT: case LTU: case UNLT:
case GE: case GEU: case UNGE:
case LE: case LEU: case UNLE:
case UNORDERED: case ORDERED:
/* If this produces an integer result, we know which bits are set.
Code here used to clear bits outside the mode of X, but that is
now done above. */
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
/* Mind that MODE is the mode the caller wants to look at this
operation in, and not the actual operation mode. We can wind
up with (subreg:DI (gt:V4HI x y)), and we don't have anything
that describes the results of a vector compare. */
if (GET_MODE_CLASS (GET_MODE (x)) == MODE_INT
&& mode_width <= HOST_BITS_PER_WIDE_INT)
nonzero = STORE_FLAG_VALUE;
break;
case NEG:
#if 0
/* Disabled to avoid exponential mutual recursion between nonzero_bits
and num_sign_bit_copies. */
if (num_sign_bit_copies (XEXP (x, 0), GET_MODE (x))
== GET_MODE_PRECISION (GET_MODE (x)))
nonzero = 1;
#endif
if (GET_MODE_PRECISION (GET_MODE (x)) < mode_width)
nonzero |= (GET_MODE_MASK (mode) & ~GET_MODE_MASK (GET_MODE (x)));
break;
case ABS:
#if 0
/* Disabled to avoid exponential mutual recursion between nonzero_bits
and num_sign_bit_copies. */
if (num_sign_bit_copies (XEXP (x, 0), GET_MODE (x))
== GET_MODE_PRECISION (GET_MODE (x)))
nonzero = 1;
#endif
break;
case TRUNCATE:
nonzero &= (cached_nonzero_bits (XEXP (x, 0), mode,
known_x, known_mode, known_ret)
& GET_MODE_MASK (mode));
break;
case ZERO_EXTEND:
nonzero &= cached_nonzero_bits (XEXP (x, 0), mode,
known_x, known_mode, known_ret);
if (GET_MODE (XEXP (x, 0)) != VOIDmode)
nonzero &= GET_MODE_MASK (GET_MODE (XEXP (x, 0)));
break;
case SIGN_EXTEND:
/* If the sign bit is known clear, this is the same as ZERO_EXTEND.
Otherwise, show all the bits in the outer mode but not the inner
may be nonzero. */
inner_nz = cached_nonzero_bits (XEXP (x, 0), mode,
known_x, known_mode, known_ret);
if (GET_MODE (XEXP (x, 0)) != VOIDmode)
{
inner_nz &= GET_MODE_MASK (GET_MODE (XEXP (x, 0)));
if (val_signbit_known_set_p (GET_MODE (XEXP (x, 0)), inner_nz))
inner_nz |= (GET_MODE_MASK (mode)
& ~GET_MODE_MASK (GET_MODE (XEXP (x, 0))));
}
nonzero &= inner_nz;
break;
case AND:
nonzero &= cached_nonzero_bits (XEXP (x, 0), mode,
known_x, known_mode, known_ret)
& cached_nonzero_bits (XEXP (x, 1), mode,
known_x, known_mode, known_ret);
break;
case XOR: case IOR:
case UMIN: case UMAX: case SMIN: case SMAX:
{
unsigned HOST_WIDE_INT nonzero0
= cached_nonzero_bits (XEXP (x, 0), mode,
known_x, known_mode, known_ret);
/* Don't call nonzero_bits for the second time if it cannot change
anything. */
if ((nonzero & nonzero0) != nonzero)
nonzero &= nonzero0
| cached_nonzero_bits (XEXP (x, 1), mode,
known_x, known_mode, known_ret);
}
break;
case PLUS: case MINUS:
case MULT:
case DIV: case UDIV:
case MOD: case UMOD:
/* We can apply the rules of arithmetic to compute the number of
high- and low-order zero bits of these operations. We start by
computing the width (position of the highest-order nonzero bit)
and the number of low-order zero bits for each value. */
{
unsigned HOST_WIDE_INT nz0
= cached_nonzero_bits (XEXP (x, 0), mode,
known_x, known_mode, known_ret);
unsigned HOST_WIDE_INT nz1
= cached_nonzero_bits (XEXP (x, 1), mode,
known_x, known_mode, known_ret);
int sign_index = GET_MODE_PRECISION (GET_MODE (x)) - 1;
int width0 = floor_log2 (nz0) + 1;
int width1 = floor_log2 (nz1) + 1;
int low0 = floor_log2 (nz0 & -nz0);
int low1 = floor_log2 (nz1 & -nz1);
unsigned HOST_WIDE_INT op0_maybe_minusp
= nz0 & ((unsigned HOST_WIDE_INT) 1 << sign_index);
unsigned HOST_WIDE_INT op1_maybe_minusp
= nz1 & ((unsigned HOST_WIDE_INT) 1 << sign_index);
unsigned int result_width = mode_width;
int result_low = 0;
switch (code)
{
case PLUS:
result_width = MAX (width0, width1) + 1;
result_low = MIN (low0, low1);
break;
case MINUS:
result_low = MIN (low0, low1);
break;
case MULT:
result_width = width0 + width1;
result_low = low0 + low1;
break;
case DIV:
if (width1 == 0)
break;
if (!op0_maybe_minusp && !op1_maybe_minusp)
result_width = width0;
break;
case UDIV:
if (width1 == 0)
break;
result_width = width0;
break;
case MOD:
if (width1 == 0)
break;
if (!op0_maybe_minusp && !op1_maybe_minusp)
result_width = MIN (width0, width1);
result_low = MIN (low0, low1);
break;
case UMOD:
if (width1 == 0)
break;
result_width = MIN (width0, width1);
result_low = MIN (low0, low1);
break;
default:
ra-build.c (copy_insn_p, [...]): Use gcc_assert and gcc_unreachable instead of abort. * ra-build.c (copy_insn_p, remember_move, defuse_overlap_p_1, live_out_1, prune_hardregs_for_mode, init_one_web_common, reinit_one_web, add_subweb, add_subweb_2, init_web_parts, record_conflict, compare_and_free_webs, init_webs_defs_uses, parts_to_webs_1, parts_to_webs, reset_conflicts, check_conflict_numbers, remember_web_was_spilled, handle_asm_insn, ra_build_free): Use gcc_assert and gcc_unreachable instead of abort. * ra-colorize.c (push_list, put_web, reset_lists, put_web_at_end, put_move, remove_move, combine, select_spill, colorize_one_web, try_recolor_web, insert_coalesced_conflicts, check_colors, break_precolored_alias, restore_conflicts_from_coalesce, sort_and_combine_web_pairs, check_uncoalesced_moves): Likewise. * ra-rewrite.c (spill_coalescing, slots_overlap_p, emit_loads, reloads_to_loads, rewrite_program2, emit_colors): Likewise. * ra.c (first_hard_reg, create_insn_info, find_subweb, init_ra, check_df): Likewise. * real.c (do_add, do_multiply, do_divide, do_compare, do_fix_trunc, real_arithmetic, real_compare, real_exponent, real_ldexp, real_identical, real_to_integer, real_to_integer2, real_to_decimal, real_to_hexadecimal, real_from_integer, ten_to_ptwo, ten_to_mptwo, real_digit, real_nan, real_maxval, round_for_format, real_convert, real_to_target, real_from_target, real_hash, encode_ieee_single, encode_ieee_double, encode_ieee_extended, encode_ieee_quad, encode_vax_f, encode_vax_d, encode_vax_g, encode_i370_single, encode_i370_double, encode_c4x_single, encode_c4x_extended): Likewise. * recog.c (validate_change, validate_replace_rtx_1, asm_operand_ok, extract_insn, peep2_next_insn, peep2_reg_dead_p, peep2_find_free_register, peephole2_optimize, store_data_bypass_p, if_test_bypass_p): Likewise. * reg-stack.c (record_label_references, get_asm_operand_n_inputs, stack_result, remove_regno_note, get_hard_regnum, emit_pop_insn, emit_swap_insn, swap_to_top, move_for_stack_reg, subst_stack_regs_pat, subst_asm_stack_regs, change_stack, compensate_edge, convert_regs_1): Likewise. * regclass.c (init_reg_sets, init_reg_sets_1, memory_move_secondary_cost): Likewise. * regrename.c (note_sets, clear_dead_regs, scan_rtx_reg, scan_rtx): Likewise. * reload.c (push_secondary_reload, find_valid_class, push_reload, operands_match_p, decompose, immune_p, find_reloads, find_reloads_toplev, find_reloads_address_1, subst_reloads, copy_replacements, refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p): Likewise. * reload1.c (compute_use_by_pseudos, replace_pseudos_in, reload, count_pseudo, find_reg, eliminate_regs, eliminate_regs_in_insn, verify_initial_elim_offsets, finish_spills, clear_reload_reg_in_use, reload_reg_free_p, reload_reg_reaches_end_p, reloads_conflict, choose_reload_regs, merge_assigned_reloads, emit_input_reload_insns, do_output_reload, fixup_abnormal_edges): Likewise. * reorg.c (stop_search_p, emit_delay_sequence, get_jump_flags, fill_slots_from_thread, relax_delay_slots): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * rtl.c (copy_rtx, rtx_equal_p): Likewise. * rtlanal.c (insn_dependent_p, reg_overlap_mentioned_p, dead_or_set_p, find_reg_fusage, remove_note, replace_rtx, subreg_lsb_1, subreg_regno_offset, subreg_offset_representable_p, find_first_parameter_load, can_hoist_insn_p, hoist_update_store, hoist_insn_after, hoist_insn_to_edge, nonzero_bits1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sbitmap.c (sbitmap_difference): Likewise. * sched-deps.c (add_dependence, sched_analyze_1, sched_analyze_2, sched_analyze, add_forward_dependence): Likewise. * sched-ebb.c (fix_basic_block_boundaries, schedule_ebb): Likewise. * sched-rgn.c (debug_regions, compute_trg_info, schedule_region, schedule_insns): Likewise. * sched-vis.c (print_pattern): Likewise. * sdbout.c (sdbout_symbol, sdbout_toplevel_data): Likewise. * simplify-rtx.c (simplify_unary_operation, simplify_binary_operation, simplify_const_relational_operation, simplify_ternary_operation, simplify_immed_subreg, simplify_subreg, simplify_gen_subreg): Likewise. * sreal.c (copy, sreal_sub, sreal_div): Likewise. * stmt.c (force_label_rtx, expand_goto, expand_asm_operands, resolve_operand_name_1, expand_return, expand_decl, expand_anon_union_decl, emit_case_bit_tests, expand_case): Likewise. * stor-layout.c (put_pending_size, smallest_mode_for_size, int_mode_for_mode, layout_decl, finish_builtin_struct, layout_type, set_sizetype, get_mode_bounds): Likewise. From-SVN: r87244
2004-09-09 19:19:16 +02:00
gcc_unreachable ();
}
if (result_width < mode_width)
nonzero &= ((unsigned HOST_WIDE_INT) 1 << result_width) - 1;
if (result_low > 0)
nonzero &= ~(((unsigned HOST_WIDE_INT) 1 << result_low) - 1);
}
break;
case ZERO_EXTRACT:
if (CONST_INT_P (XEXP (x, 1))
&& INTVAL (XEXP (x, 1)) < HOST_BITS_PER_WIDE_INT)
nonzero &= ((unsigned HOST_WIDE_INT) 1 << INTVAL (XEXP (x, 1))) - 1;
break;
case SUBREG:
/* If this is a SUBREG formed for a promoted variable that has
been zero-extended, we know that at least the high-order bits
are zero, though others might be too. */
calls.c (precompute_arguments): Use new SUBREG_PROMOTED_SET instead of SUBREG_PROMOTED_UNSIGNED_SET. gcc/ 2014-08-08 Kugan Vivekanandarajah <kuganv@linaro.org> * calls.c (precompute_arguments): Use new SUBREG_PROMOTED_SET instead of SUBREG_PROMOTED_UNSIGNED_SET. (expand_call): Likewise. * cfgexpand.c (expand_gimple_stmt_1): Use SUBREG_PROMOTED_SIGN to get promoted mode. * combine.c (record_promoted_value): Skip > 0 comparison with SUBREG_PROMOTED_UNSIGNED_P as it now returns only 0 or 1. * expr.c (convert_move): Use SUBREG_CHECK_PROMOTED_SIGN instead of SUBREG_PROMOTED_UNSIGNED_P. (convert_modes): Likewise. (store_expr): Use SUBREG_PROMOTED_SIGN to get promoted mode. Use SUBREG_CHECK_PROMOTED_SIGN instead of SUBREG_PROMOTED_UNSIGNED_P. (expand_expr_real_1): Use new SUBREG_PROMOTED_SET instead of SUBREG_PROMOTED_UNSIGNED_SET. * function.c (assign_parm_setup_reg): Use new SUBREG_PROMOTED_SET instead of SUBREG_PROMOTED_UNSIGNED_SET. * ifcvt.c (noce_emit_cmove): Updated to use SUBREG_PROMOTED_GET and SUBREG_PROMOTED_SET. * internal-fn.c (ubsan_expand_si_overflow_mul_check): Use SUBREG_PROMOTED_SET instead of SUBREG_PROMOTED_UNSIGNED_SET. * optabs.c (widen_operand): Use SUBREG_CHECK_PROMOTED_SIGN instead of SUBREG_PROMOTED_UNSIGNED_P. * rtl.h (SUBREG_PROMOTED_UNSIGNED_SET): Remove. (SUBREG_PROMOTED_SET): New define. (SUBREG_PROMOTED_GET): Likewise. (SUBREG_PROMOTED_SIGN): Likewise. (SUBREG_PROMOTED_SIGNED_P): Likewise. (SUBREG_CHECK_PROMOTED_SIGN): Likewise. (SUBREG_PROMOTED_UNSIGNED_P): Updated. * rtlanal.c (unsigned_reg_p): Use new SUBREG_PROMOTED_GET instead of SUBREG_PROMOTED_UNSIGNED_GET. (nonzero_bits1): Skip > 0 comparison with the results as SUBREG_PROMOTED_UNSIGNED_P now returns only 0 or 1. (num_sign_bit_copies1): Use SUBREG_PROMOTED_SIGNED_P instead of !SUBREG_PROMOTED_UNSIGNED_P. * simplify-rtx.c (simplify_unary_operation_1): Use new SUBREG_PROMOTED_SIGNED_P instead of !SUBREG_PROMOTED_UNSIGNED_P. (simplify_subreg): Use new SUBREG_PROMOTED_SIGNED_P, SUBREG_PROMOTED_UNSIGNED_P and SUBREG_PROMOTED_SET instead of SUBREG_PROMOTED_UNSIGNED_P and SUBREG_PROMOTED_UNSIGNED_SET. From-SVN: r213749
2014-08-08 07:24:12 +02:00
if (SUBREG_PROMOTED_VAR_P (x) && SUBREG_PROMOTED_UNSIGNED_P (x))
nonzero = GET_MODE_MASK (GET_MODE (x))
& cached_nonzero_bits (SUBREG_REG (x), GET_MODE (x),
known_x, known_mode, known_ret);
inner_mode = GET_MODE (SUBREG_REG (x));
/* If the inner mode is a single word for both the host and target
machines, we can compute this from which bits of the inner
object might be nonzero. */
if (GET_MODE_PRECISION (inner_mode) <= BITS_PER_WORD
&& (GET_MODE_PRECISION (inner_mode) <= HOST_BITS_PER_WIDE_INT))
{
nonzero &= cached_nonzero_bits (SUBREG_REG (x), mode,
known_x, known_mode, known_ret);
#if defined (WORD_REGISTER_OPERATIONS) && defined (LOAD_EXTEND_OP)
/* If this is a typical RISC machine, we only have to worry
about the way loads are extended. */
if ((LOAD_EXTEND_OP (inner_mode) == SIGN_EXTEND
? val_signbit_known_set_p (inner_mode, nonzero)
: LOAD_EXTEND_OP (inner_mode) != ZERO_EXTEND)
alias.c (get_alias_set, [...]): Use MEM_P. 2004-07-01 Jerry Quinn <jlquinn@optonline.net> * alias.c (get_alias_set, canon_rtx, get_addr, nonoverlapping_memrefs_p, nonlocal_referenced_p_1, memory_modified_1): Use MEM_P. * builtins.c (expand_builtin_prefetch, expand_builtin_profile_func, expand_builtin): Likewise. * calls.c (expand_call, emit_library_call_value_1, store_one_arg): Likewise. * combine.c (can_combine_p, combinable_i3pat, try_combine, find_split_point, combine_simplify_rtx, simplify_set, make_extraction, rtx_equal_for_field_assignment_p, gen_lowpart_for_combine, record_dead_and_set_regs_1, get_last_value_validate, mark_used_regs_combine, move_deaths, unmentioned_reg_p_1): Likewise. * cse.c (check_dependence, canon_hash, equiv_constant, gen_lowpart_if_possible, cse_insn, invalidate_from_clobbers, cse_around_loop, cse_check_loop_start, cse_set_around_loop, count_reg_usage): Likewise. * cselib.c (rtx_equal_for_cselib_p, add_mem_for_addr, cselib_lookup, cselib_invalidate_mem, cselib_invalidate_rtx, cselib_record_set, cselib_record_sets): Likewise. * dbxout.c (PARM_PASSED_IN_MEMORY, dbxout_symbol, dbxout_symbol_location, dbxout_parms, dbxout_reg_parms): Likewise. * ddg.c (mark_mem_use, mark_mem_store, rtx_mem_access_p): Likewise. * df.c (df_uses_record): Likewise. * dojump (do_jump): Likewise. * dwarf2out.c (stack_adjust_offset, mem_loc_descriptor, loc_descriptor_from_tree, rtl_for_decl_location, add_bound_info, decl_start_label): Likewise. * emit-rtl.c (gen_complex_constant_part, gen_highpart, operand_subword, change_address_1, make_safe_from): Likewise. * explow.c (break_out_memory_refs, copy_all_regs, validize_mem, stabilize, force_not_mem): Likewise. * expmed.c (store_bit_field, store_split_bit_field, extract_bit_field, expand_mult_const, expand_divmod, emit_store_flag): Likewise. * expr.c (convert_move, convert_modes, emit_block_move, emit_group_load, emit_group_store, clear_storage, emit_move_insn, emit_move_insn_1, expand_assignment, store_expr, store_constructor_field, store_constructor, store_field, force_operand, safe_from_p, expand_expr_real_1, expand_increment): Likewise. * final.c (cleanup_subreg_operands, alter_subreg, get_mem_expr_from_op): Likewise. * flow.c (notice_stack_pointer_modification_1, init_propagate_block_info, insn_dead_p, mark_set_1, mark_used_regs): Likewise. * function.c (mark_temp_addr_taken, preserve_temp_slots, preserve_rtl_expr_result, put_var_into_stack, fixup_var_refs_1, optimize_bit_field, flush_addressof, purge_addressof_1, instantiate_decl, instantiate_virtual_regs_1, assign_parms, setjmp_protect, setjmp_protect_args, fix_lexical_addr, keep_stack_depressed): Likewise. * ifcvt.c (noce_try_cmove_arith, noce_try_abs, noce_operand_ok, noce_process_if_block, find_memory): Likewise. * integrate.c (subst_constants, allocate_initial_values): Likewise. * local-alloc.c (validate_equiv_mem_from_store, memref_referenced_p, update_equiv_regs): Likewise. * loop.c (scan_loop, prescan_loop, note_addr_stored, check_store, maybe_eliminate_biv_1, find_mem_in_note_1): Likewise. * optabs.c (expand_abs, emit_unop_insn): Likewise. * passes.c (rest_of_handle_final): Likewise. * postreload.c (reload_cse_simplify_set, reload_cse_simplify_operands, move2add_note_store): Likewise. * ra-build.c (detect_remat_webs): Likewise. * ra-debug.c (dump_static_insn_cost): Likewise. * ra-rewrite.c (slots_overlap_p, insert_stores): Likewise. * recog.c (validate_change, apply_change_group, cancel_changes, validate_replace_rtx_1, general_operand, register_operand, nonmemory_operand, push_operand, pop_operand, memory_operand, indirect_operand, asm_operand_ok, offsettable_memref_p, offsettable_nonstrict_memref_p, constrain_operands, store_data_bypass_p): Likewise. * reg-stack.c (subst_stack_regs_pat): Likewise. * regclass.c (record_operand_costs, scan_one_insn, record_reg_classes, copy_cost, reg_scan_mark_refs): Likewise. * regmove.c (optimize_reg_copy_3, stack_memref_p, combine_stack_adjustments_for_block): Likewise. * regrename.c (copyprop_hardreg_forward_1): Likewise. * reload.c (can_reload_into, push_reload, decompose, immune_p, find_reloads, find_reloads_address, find_reloads_address_1, reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p, find_equiv_reg): Likewise. * reload1.c (reload, eliminate_regs, eliminate_regs_in_insn, reload_as_needed, choose_reload_regs, emit_input_reload_insns, do_input_reload, emit_reload_insns, gen_reload, delete_output_reload, delete_address_reloads): Likewise. * resource.c (mark_referenced_resources): Likewise. * rtlanal.c (get_jump_table_offset, count_occurrences, reg_referenced_p, reg_set_p, set_of_1, set_noop_p, reg_overlap_mentioned_p, note_uses, replace_regs, nonzero_bits1, num_sign_bit_copies1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sched-deps.c (sched_analyze_1, sched_analyze_2): Likewise. * sdbout.c (PARM_PASSED_IN_MEMORY, sdbout_symbol, sdbout_toplevel_data, sdbout_parms, sdbout_reg_parms, sdbout_global_decl): Likewise. * simplify-rtx.c (simplify_subreg): Likewise. * stmt.c (expand_asm_operands, expand_expr_stmt_value, expand_decl, expand_anon_union_decl, expand_end_case_type): Likewise. * unroll.c (calculate_giv_inc): Likewise. * var-tracking.c (stack_adjust_offset_pre_post, bb_stack_adjust_offset, track_expr_p, count_uses, add_uses, add_stores, compute_bb_dataflow, vt_get_decl_and_offset, vt_add_function_parameters): Likewise. * varasm.c (make_var_volatile, notice_global_symbol, assemble_external, decode_addr_const, mark_weak, default_encode_section_info): Likewise. From-SVN: r83980
2004-07-01 14:52:53 +02:00
|| !MEM_P (SUBREG_REG (x)))
#endif
{
/* On many CISC machines, accessing an object in a wider mode
causes the high-order bits to become undefined. So they are
not known to be zero. */
if (GET_MODE_PRECISION (GET_MODE (x))
> GET_MODE_PRECISION (inner_mode))
nonzero |= (GET_MODE_MASK (GET_MODE (x))
& ~GET_MODE_MASK (inner_mode));
}
}
break;
case ASHIFTRT:
case LSHIFTRT:
case ASHIFT:
case ROTATE:
/* The nonzero bits are in two classes: any bits within MODE
that aren't in GET_MODE (x) are always significant. The rest of the
nonzero bits are those that are significant in the operand of
the shift when shifted the appropriate number of bits. This
shows that high-order bits are cleared by the right shift and
low-order bits by left shifts. */
if (CONST_INT_P (XEXP (x, 1))
&& INTVAL (XEXP (x, 1)) >= 0
&& INTVAL (XEXP (x, 1)) < HOST_BITS_PER_WIDE_INT
&& INTVAL (XEXP (x, 1)) < GET_MODE_PRECISION (GET_MODE (x)))
{
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 13:02:45 +01:00
machine_mode inner_mode = GET_MODE (x);
unsigned int width = GET_MODE_PRECISION (inner_mode);
int count = INTVAL (XEXP (x, 1));
unsigned HOST_WIDE_INT mode_mask = GET_MODE_MASK (inner_mode);
unsigned HOST_WIDE_INT op_nonzero
= cached_nonzero_bits (XEXP (x, 0), mode,
known_x, known_mode, known_ret);
unsigned HOST_WIDE_INT inner = op_nonzero & mode_mask;
unsigned HOST_WIDE_INT outer = 0;
if (mode_width > width)
outer = (op_nonzero & nonzero & ~mode_mask);
if (code == LSHIFTRT)
inner >>= count;
else if (code == ASHIFTRT)
{
inner >>= count;
/* If the sign bit may have been nonzero before the shift, we
need to mark all the places it could have been copied to
by the shift as possibly nonzero. */
if (inner & ((unsigned HOST_WIDE_INT) 1 << (width - 1 - count)))
inner |= (((unsigned HOST_WIDE_INT) 1 << count) - 1)
<< (width - count);
}
else if (code == ASHIFT)
inner <<= count;
else
inner = ((inner << (count % width)
| (inner >> (width - (count % width)))) & mode_mask);
nonzero &= (outer | inner);
}
break;
case FFS:
case POPCOUNT:
/* This is at most the number of bits in the mode. */
nonzero = ((unsigned HOST_WIDE_INT) 2 << (floor_log2 (mode_width))) - 1;
break;
case CLZ:
/* If CLZ has a known value at zero, then the nonzero bits are
that value, plus the number of bits in the mode minus one. */
if (CLZ_DEFINED_VALUE_AT_ZERO (mode, nonzero))
nonzero
|= ((unsigned HOST_WIDE_INT) 1 << (floor_log2 (mode_width))) - 1;
else
nonzero = -1;
break;
case CTZ:
/* If CTZ has a known value at zero, then the nonzero bits are
that value, plus the number of bits in the mode minus one. */
if (CTZ_DEFINED_VALUE_AT_ZERO (mode, nonzero))
nonzero
|= ((unsigned HOST_WIDE_INT) 1 << (floor_log2 (mode_width))) - 1;
else
nonzero = -1;
break;
case CLRSB:
/* This is at most the number of bits in the mode minus 1. */
nonzero = ((unsigned HOST_WIDE_INT) 1 << (floor_log2 (mode_width))) - 1;
break;
case PARITY:
nonzero = 1;
break;
case IF_THEN_ELSE:
{
unsigned HOST_WIDE_INT nonzero_true
= cached_nonzero_bits (XEXP (x, 1), mode,
known_x, known_mode, known_ret);
/* Don't call nonzero_bits for the second time if it cannot change
anything. */
if ((nonzero & nonzero_true) != nonzero)
nonzero &= nonzero_true
| cached_nonzero_bits (XEXP (x, 2), mode,
known_x, known_mode, known_ret);
}
break;
default:
break;
}
return nonzero;
}
/* See the macro definition above. */
#undef cached_num_sign_bit_copies
/* The function cached_num_sign_bit_copies is a wrapper around
num_sign_bit_copies1. It avoids exponential behavior in
num_sign_bit_copies1 when X has identical subexpressions on the
first or the second level. */
static unsigned int
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 13:02:45 +01:00
cached_num_sign_bit_copies (const_rtx x, machine_mode mode, const_rtx known_x,
machine_mode known_mode,
unsigned int known_ret)
{
if (x == known_x && mode == known_mode)
return known_ret;
/* Try to find identical subexpressions. If found call
num_sign_bit_copies1 on X with the subexpressions as KNOWN_X and
the precomputed value for the subexpression as KNOWN_RET. */
if (ARITHMETIC_P (x))
{
rtx x0 = XEXP (x, 0);
rtx x1 = XEXP (x, 1);
/* Check the first level. */
if (x0 == x1)
return
num_sign_bit_copies1 (x, mode, x0, mode,
cached_num_sign_bit_copies (x0, mode, known_x,
known_mode,
known_ret));
/* Check the second level. */
if (ARITHMETIC_P (x0)
&& (x1 == XEXP (x0, 0) || x1 == XEXP (x0, 1)))
return
num_sign_bit_copies1 (x, mode, x1, mode,
cached_num_sign_bit_copies (x1, mode, known_x,
known_mode,
known_ret));
if (ARITHMETIC_P (x1)
&& (x0 == XEXP (x1, 0) || x0 == XEXP (x1, 1)))
return
num_sign_bit_copies1 (x, mode, x0, mode,
cached_num_sign_bit_copies (x0, mode, known_x,
known_mode,
known_ret));
}
return num_sign_bit_copies1 (x, mode, known_x, known_mode, known_ret);
}
/* Return the number of bits at the high-order end of X that are known to
be equal to the sign bit. X will be used in mode MODE; if MODE is
VOIDmode, X will be used in its own mode. The returned value will always
be between 1 and the number of bits in MODE. */
static unsigned int
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 13:02:45 +01:00
num_sign_bit_copies1 (const_rtx x, machine_mode mode, const_rtx known_x,
machine_mode known_mode,
unsigned int known_ret)
{
enum rtx_code code = GET_CODE (x);
unsigned int bitwidth = GET_MODE_PRECISION (mode);
int num0, num1, result;
unsigned HOST_WIDE_INT nonzero;
/* If we weren't given a mode, use the mode of X. If the mode is still
VOIDmode, we don't know anything. Likewise if one of the modes is
floating-point. */
if (mode == VOIDmode)
mode = GET_MODE (x);
if (mode == VOIDmode || FLOAT_MODE_P (mode) || FLOAT_MODE_P (GET_MODE (x))
|| VECTOR_MODE_P (GET_MODE (x)) || VECTOR_MODE_P (mode))
return 1;
/* For a smaller object, just ignore the high bits. */
if (bitwidth < GET_MODE_PRECISION (GET_MODE (x)))
{
num0 = cached_num_sign_bit_copies (x, GET_MODE (x),
known_x, known_mode, known_ret);
return MAX (1,
num0 - (int) (GET_MODE_PRECISION (GET_MODE (x)) - bitwidth));
}
if (GET_MODE (x) != VOIDmode && bitwidth > GET_MODE_PRECISION (GET_MODE (x)))
{
#ifndef WORD_REGISTER_OPERATIONS
/* If this machine does not do all register operations on the entire
register and MODE is wider than the mode of X, we can say nothing
at all about the high-order bits. */
return 1;
#else
/* Likewise on machines that do, if the mode of the object is smaller
than a word and loads of that size don't sign extend, we can say
nothing about the high order bits. */
if (GET_MODE_PRECISION (GET_MODE (x)) < BITS_PER_WORD
#ifdef LOAD_EXTEND_OP
&& LOAD_EXTEND_OP (GET_MODE (x)) != SIGN_EXTEND
#endif
)
return 1;
#endif
}
switch (code)
{
case REG:
#if defined(POINTERS_EXTEND_UNSIGNED) && !defined(HAVE_ptr_extend)
/* If pointers extend signed and this is a pointer in Pmode, say that
all the bits above ptr_mode are known to be sign bit copies. */
lto-symtab.c (lto_cgraph_replace_node): Update. * lto-symtab.c (lto_cgraph_replace_node): Update. * cgraphbuild.c (record_reference, record_type_list, record_eh_tables, mark_address, mark_load, mark_store): Update. * cgraph.c (cgraph_same_body_alias, dump_cgraph_node, cgraph_create_virtual_clone, cgraph_for_node_thunks_and_aliases): Update. * cgraph.h (symtab_node_def, symtab_node, const_symtab_node): Remove. (cgraph_alias_aliased_node, varpool_alias_aliased_node): Update. * reload.c: Fix typo in comment. * rtlanal.c: Likewise. * tree-emultls.c (gen_emutls_addr): Update. * ipa-reference.c (analyze_function): Update. * cgraphunit.c (cgraph_analyze_function, cgraph_process_same_body_aliases, assemble_thunks_and_aliases): Update. * ipa-ref.c (ipa_record_reference): Reorg to avoid reference types. (ipa_remove_reference): Likewise. (ipa_remove_all_refering): Rename to ... (ipa_remove_all_referring): ... this one; update. (ipa_dump_references): Update. (ipa_dump_referring): Update. (ipa_clone_references): Update. (ipa_clone_refering): Rename to ... (ipa_clone_referring): ... this one; update. (ipa_ref_cannot_lead_to_return): Update. (ipa_ref_has_aliases_p): Update. * ipa-ref.h (symtab_node_def, symtab_node, const_symtab_node): New forward typedefs. (ipa_ref_type): Remove. (ipa_ref_ptr_u): Remove. (ipa_ref): Remove referencing, refered, refered_index, refering_type and refered_type; add referring, referred and referred_index. (ipa_ref_list): Rename refering to referring. (ipa_record_reference, ipa_remove_all_referring, ipa_dump_referring, ipa_clone_references, ipa_clone_referring): Update prototypes. * lto-cgraph.c (referenced_from_other_partition_p): Update. (lto_output_ref): Update. (add_references): Update. (input_varpool_node): Update. (input_refs): Update. * ipa-ref-inline.h (ipa_ref_node): Update. (ipa_ref_varpool_node): Update. (ipa_ref_referring_node); Update. (ipa_ref_referring_varpool_node): Update. (ipa_ref_referring_ref_list); Update. (ipa_ref_referred_ref_list): Update. (ipa_ref_list_first_referring): Update. (ipa_empty_ref_list): Update. (ipa_ref_list_refering_iterate): Rename to ... (ipa_ref_list_referring_iterate): ... this one. * cse.c: Update comment. * ipa-utils.c (ipa_reverse_postorder): Update. * tree-ssa-alias.c: Update. * ipa-inline.c (reset_edge_caches): Update. (update_caller_keys): Update. * ipa-inline.h: Update comments. * jump.c: Update comment. * alias.c: Likewise. * ipa.c (process_references): Update. (cgraph_remove_unreachable_nodes): Likewise. (ipa_discover_readonly_nonaddressable_var): Likewise. (cgraph_address_taken_from_non_vtable_p): Likewise. * trans-mem.c (ipa_tm_execute): Update. * simplify-rtx.c: Fix comment. * rtl.c: Fix comment. * symtab.c (symtab_unregister_node): Update. * varpool.c (dump_varpool_node): Update. (varpool_analyze_pending_decls): Update. (assemble_aliases): Update. (varpool_for_node_and_aliases): Update. From-SVN: r186564
2012-04-18 11:57:53 +02:00
/* As we do not know which address space the pointer is referring to,
tm.texi (TARGET_ADDR_SPACE_POINTER_MODE): Document. 2009-10-26 Ben Elliston <bje@au.ibm.com> Michael Meissner <meissner@linux.vnet.ibm.com> Ulrich Weigand <uweigand@de.ibm.com> * doc/tm.texi (TARGET_ADDR_SPACE_POINTER_MODE): Document. (TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise. (TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise. * target.h (struct target_def): Add pointer_mode, address_mode, and valid_pointer_mode to addr_space substructure. * target-def.h (TARGET_ADDR_SPACE_POINTER_MODE): Define. (TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise. (TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise. (TARGET_ADDR_SPACE_HOOKS): Add them. * targhooks.c (target_default_pointer_address_modes_p): New function. * target.h (target_default_pointer_address_modes_p): Add prototype. * targhooks.c (default_addr_space_pointer_mode): New function. (default_addr_space_address_mode): Likewise. (default_addr_space_valid_pointer_mode): Likewise. * targhooks.h (default_addr_space_pointer_mode): Add prototype. (default_addr_space_address_mode): Likewise. (default_addr_space_valid_pointer_mode): Likewise. * output.h (default_valid_pointer_mode): Move to ... * targhooks.h (default_valid_pointer_mode): ... here. * varasm.c (default_valid_pointer_mode): Move to ... * targhooks.c (default_valid_pointer_mode): ... here. * varasm.c (output_constant): Use targetm.addr_space.valid_pointer_mode instead of targetm.valid_pointer_mode. * fold-const.c (fit_double_type): Use int_or_pointer_precision. * tree.c (integer_pow2p): Likewise. (tree_log2): Likewise. (tree_floor_log2): Likewise. (signed_or_unsigned_type_for): Support pointer type of different size. (int_or_pointer_precision): New function. * tree.h (int_or_pointer_precision): Add prototype. * stor-layout.c (layout_type): Set TYPE_PRECISION for offset types. * varasm.c (initializer_constant_valid_p): Use TYPE_PRECISION of incoming pointer type instead of POINTER_SIZE. * tree.c (build_pointer_type): Use appropriate pointer mode instead of ptr_mode. (build_reference_type): Likewise. * expr.c (store_expr): Likewise. (expand_expr_addr_expr): Likewise. * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * auto-inc-dec.c: Include "target.h". (try_merge): Use appropriate address mode instead of Pmode. (find_inc): Likewise. * combine.c (find_split_point): Likewise. * cselib.c (cselib_record_sets): Likewise. * dse.c (replace_inc_dec): Likewise. (canon_address): Likewise. * var-tracking.c (replace_expr_with_values): Likewise. (count_uses): Likewise. (add_uses): Likewise. (add_stores): Likewise. * emit-rtl.c: Include "target.h". (adjust_address_1): Use appropriate address mode instead of Pmode. (offset_address): Likewise. * explow.c (break_out_memory_refs): Likewise. (memory_address_addr_space): Likewise. (promote_mode): Likewise. * expr.c (move_by_pieces): Likewise. (emit_block_move_via_loop): Likewise. (store_by_pieces): Likewise. (store_by_pieces_1): Likewise. (expand_assignment): Likewise. (store_constructor): Likewise. (expand_expr_addr_expr): Likewise. (expand_expr_real_1): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * ifcvt.c (noce_try_cmove_arith): Likewise. * regcprop.c (kill_autoinc_value): Likewise. * regmove.c (try_auto_increment): Likewise. * reload.c (find_reloads): Likewise. (find_reloads_address): Likewise. (find_reloads_address_1): Likewise. * sched-deps.c: Include "target.h". (sched_analyze_1): Use appropriate address mode instead of Pmode. (sched_analyze_2): Likewise. * sel-sched-dump.c: Include "target.h". (debug_mem_addr_value): Use appropriate address mode instead of Pmode. * stor-layout.c (layout_type): Likewise. * tree-ssa-loop-ivopts.c (produce_memory_decl_rtl): Likewise. (multiplier_allowed_in_address_p): Likewise. (get_address_cost): Likewise. * varasm.c (make_decl_rtl): Likewise. * expr.c (expand_assignment): Always convert offsets to appropriate address mode. (store_expr): Likewise. (store_constructor): Likewise. (expand_expr_real_1): Likewise. * reload.h (form_sum): Add MODE argument. * reload.c (form_sum): Add MODE argument, use it instead of Pmode. Update recursive calls. (subst_indexed_address): Update calls to form_sum. * tree-flow.h (addr_for_mem_ref): Add ADDRSPACE argument. * tree-ssa-address.c: Include "target.h". (templates): Replace by ... (mem_addr_template_list): ... this new vector. (TEMPL_IDX): Handle address space numbers. (gen_addr_rtx): Add address mode argument, use it instead of Pmode. (addr_for_mem_ref): Add ADDRSPACE argument. Use per-address-space instead of global cache. Update call to gen_addr_rtx. (valid_mem_ref_p): Update call to addr_for_mem_ref. * expr.c (expand_expr_real_1): Update call to addr_for_mem_ref. * rtl.h (convert_memory_address_addr_space): Add prototype. (convert_memory_address): Define as macro. * explow.c (convert_memory_address): Rename to ... (convert_memory_address_addr_space): ... this. Add ADDRSPACE argument. Use appropriate pointer and address modes instead of ptr_mode / Pmode. Update recursive calls. (memory_address_addr_space): Call convert_memory_address_addr_space. * expmed.c (make_tree): Likewise. * expr.c (expand_assignment): Likewise. (expand_expr_addr_expr_1): Likewise. Also, add ADDRSPACE argument. (expand_expr_addr_expr): Likewise. Also, update call. * alias.c (find_base_value): Guard pointer size optimizations. (find_base_term): Likewise. * rtlanal.c (nonzero_bits1): Likewise. (num_sign_bit_copies1): Likewise. * simplify-rtx.c (simplify_unary_operation_1): Likewise. * Makefile.in (tree-ssa-address.o): Add $(TARGET_H) dependency. (emit-rtl.o): Likewise. (auto-inc-dec.o): Likewise. (sched-deps.o): Likewise. Co-Authored-By: Michael Meissner <meissner@linux.vnet.ibm.com> Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com> From-SVN: r153573
2009-10-26 22:57:10 +01:00
we can do this only if the target does not support different pointer
or address modes depending on the address space. */
if (target_default_pointer_address_modes_p ()
&& ! POINTERS_EXTEND_UNSIGNED && GET_MODE (x) == Pmode
&& mode == Pmode && REG_POINTER (x))
return GET_MODE_PRECISION (Pmode) - GET_MODE_PRECISION (ptr_mode) + 1;
#endif
{
unsigned int copies_for_hook = 1, copies = 1;
rtx new_rtx = rtl_hooks.reg_num_sign_bit_copies (x, mode, known_x,
known_mode, known_ret,
&copies_for_hook);
if (new_rtx)
copies = cached_num_sign_bit_copies (new_rtx, mode, known_x,
known_mode, known_ret);
if (copies > 1 || copies_for_hook > 1)
return MAX (copies, copies_for_hook);
/* Else, use nonzero_bits to guess num_sign_bit_copies (see below). */
}
break;
case MEM:
#ifdef LOAD_EXTEND_OP
/* Some RISC machines sign-extend all loads of smaller than a word. */
if (LOAD_EXTEND_OP (GET_MODE (x)) == SIGN_EXTEND)
return MAX (1, ((int) bitwidth
- (int) GET_MODE_PRECISION (GET_MODE (x)) + 1));
#endif
break;
case CONST_INT:
/* If the constant is negative, take its 1's complement and remask.
Then see how many zero bits we have. */
nonzero = UINTVAL (x) & GET_MODE_MASK (mode);
if (bitwidth <= HOST_BITS_PER_WIDE_INT
&& (nonzero & ((unsigned HOST_WIDE_INT) 1 << (bitwidth - 1))) != 0)
nonzero = (~nonzero) & GET_MODE_MASK (mode);
return (nonzero == 0 ? bitwidth : bitwidth - floor_log2 (nonzero) - 1);
case SUBREG:
/* If this is a SUBREG for a promoted object that is sign-extended
and we are looking at it in a wider mode, we know that at least the
high-order bits are known to be sign bit copies. */
calls.c (precompute_arguments): Use new SUBREG_PROMOTED_SET instead of SUBREG_PROMOTED_UNSIGNED_SET. gcc/ 2014-08-08 Kugan Vivekanandarajah <kuganv@linaro.org> * calls.c (precompute_arguments): Use new SUBREG_PROMOTED_SET instead of SUBREG_PROMOTED_UNSIGNED_SET. (expand_call): Likewise. * cfgexpand.c (expand_gimple_stmt_1): Use SUBREG_PROMOTED_SIGN to get promoted mode. * combine.c (record_promoted_value): Skip > 0 comparison with SUBREG_PROMOTED_UNSIGNED_P as it now returns only 0 or 1. * expr.c (convert_move): Use SUBREG_CHECK_PROMOTED_SIGN instead of SUBREG_PROMOTED_UNSIGNED_P. (convert_modes): Likewise. (store_expr): Use SUBREG_PROMOTED_SIGN to get promoted mode. Use SUBREG_CHECK_PROMOTED_SIGN instead of SUBREG_PROMOTED_UNSIGNED_P. (expand_expr_real_1): Use new SUBREG_PROMOTED_SET instead of SUBREG_PROMOTED_UNSIGNED_SET. * function.c (assign_parm_setup_reg): Use new SUBREG_PROMOTED_SET instead of SUBREG_PROMOTED_UNSIGNED_SET. * ifcvt.c (noce_emit_cmove): Updated to use SUBREG_PROMOTED_GET and SUBREG_PROMOTED_SET. * internal-fn.c (ubsan_expand_si_overflow_mul_check): Use SUBREG_PROMOTED_SET instead of SUBREG_PROMOTED_UNSIGNED_SET. * optabs.c (widen_operand): Use SUBREG_CHECK_PROMOTED_SIGN instead of SUBREG_PROMOTED_UNSIGNED_P. * rtl.h (SUBREG_PROMOTED_UNSIGNED_SET): Remove. (SUBREG_PROMOTED_SET): New define. (SUBREG_PROMOTED_GET): Likewise. (SUBREG_PROMOTED_SIGN): Likewise. (SUBREG_PROMOTED_SIGNED_P): Likewise. (SUBREG_CHECK_PROMOTED_SIGN): Likewise. (SUBREG_PROMOTED_UNSIGNED_P): Updated. * rtlanal.c (unsigned_reg_p): Use new SUBREG_PROMOTED_GET instead of SUBREG_PROMOTED_UNSIGNED_GET. (nonzero_bits1): Skip > 0 comparison with the results as SUBREG_PROMOTED_UNSIGNED_P now returns only 0 or 1. (num_sign_bit_copies1): Use SUBREG_PROMOTED_SIGNED_P instead of !SUBREG_PROMOTED_UNSIGNED_P. * simplify-rtx.c (simplify_unary_operation_1): Use new SUBREG_PROMOTED_SIGNED_P instead of !SUBREG_PROMOTED_UNSIGNED_P. (simplify_subreg): Use new SUBREG_PROMOTED_SIGNED_P, SUBREG_PROMOTED_UNSIGNED_P and SUBREG_PROMOTED_SET instead of SUBREG_PROMOTED_UNSIGNED_P and SUBREG_PROMOTED_UNSIGNED_SET. From-SVN: r213749
2014-08-08 07:24:12 +02:00
if (SUBREG_PROMOTED_VAR_P (x) && SUBREG_PROMOTED_SIGNED_P (x))
{
num0 = cached_num_sign_bit_copies (SUBREG_REG (x), mode,
known_x, known_mode, known_ret);
return MAX ((int) bitwidth
- (int) GET_MODE_PRECISION (GET_MODE (x)) + 1,
num0);
}
/* For a smaller object, just ignore the high bits. */
if (bitwidth <= GET_MODE_PRECISION (GET_MODE (SUBREG_REG (x))))
{
num0 = cached_num_sign_bit_copies (SUBREG_REG (x), VOIDmode,
known_x, known_mode, known_ret);
return MAX (1, (num0
- (int) (GET_MODE_PRECISION (GET_MODE (SUBREG_REG (x)))
- bitwidth)));
}
#ifdef WORD_REGISTER_OPERATIONS
#ifdef LOAD_EXTEND_OP
/* For paradoxical SUBREGs on machines where all register operations
affect the entire register, just look inside. Note that we are
passing MODE to the recursive call, so the number of sign bit copies
will remain relative to that mode, not the inner mode. */
/* This works only if loads sign extend. Otherwise, if we get a
reload for the inner part, it may be loaded from the stack, and
then we lose all sign bit copies that existed before the store
to the stack. */
if (paradoxical_subreg_p (x)
&& LOAD_EXTEND_OP (GET_MODE (SUBREG_REG (x))) == SIGN_EXTEND
alias.c (get_alias_set, [...]): Use MEM_P. 2004-07-01 Jerry Quinn <jlquinn@optonline.net> * alias.c (get_alias_set, canon_rtx, get_addr, nonoverlapping_memrefs_p, nonlocal_referenced_p_1, memory_modified_1): Use MEM_P. * builtins.c (expand_builtin_prefetch, expand_builtin_profile_func, expand_builtin): Likewise. * calls.c (expand_call, emit_library_call_value_1, store_one_arg): Likewise. * combine.c (can_combine_p, combinable_i3pat, try_combine, find_split_point, combine_simplify_rtx, simplify_set, make_extraction, rtx_equal_for_field_assignment_p, gen_lowpart_for_combine, record_dead_and_set_regs_1, get_last_value_validate, mark_used_regs_combine, move_deaths, unmentioned_reg_p_1): Likewise. * cse.c (check_dependence, canon_hash, equiv_constant, gen_lowpart_if_possible, cse_insn, invalidate_from_clobbers, cse_around_loop, cse_check_loop_start, cse_set_around_loop, count_reg_usage): Likewise. * cselib.c (rtx_equal_for_cselib_p, add_mem_for_addr, cselib_lookup, cselib_invalidate_mem, cselib_invalidate_rtx, cselib_record_set, cselib_record_sets): Likewise. * dbxout.c (PARM_PASSED_IN_MEMORY, dbxout_symbol, dbxout_symbol_location, dbxout_parms, dbxout_reg_parms): Likewise. * ddg.c (mark_mem_use, mark_mem_store, rtx_mem_access_p): Likewise. * df.c (df_uses_record): Likewise. * dojump (do_jump): Likewise. * dwarf2out.c (stack_adjust_offset, mem_loc_descriptor, loc_descriptor_from_tree, rtl_for_decl_location, add_bound_info, decl_start_label): Likewise. * emit-rtl.c (gen_complex_constant_part, gen_highpart, operand_subword, change_address_1, make_safe_from): Likewise. * explow.c (break_out_memory_refs, copy_all_regs, validize_mem, stabilize, force_not_mem): Likewise. * expmed.c (store_bit_field, store_split_bit_field, extract_bit_field, expand_mult_const, expand_divmod, emit_store_flag): Likewise. * expr.c (convert_move, convert_modes, emit_block_move, emit_group_load, emit_group_store, clear_storage, emit_move_insn, emit_move_insn_1, expand_assignment, store_expr, store_constructor_field, store_constructor, store_field, force_operand, safe_from_p, expand_expr_real_1, expand_increment): Likewise. * final.c (cleanup_subreg_operands, alter_subreg, get_mem_expr_from_op): Likewise. * flow.c (notice_stack_pointer_modification_1, init_propagate_block_info, insn_dead_p, mark_set_1, mark_used_regs): Likewise. * function.c (mark_temp_addr_taken, preserve_temp_slots, preserve_rtl_expr_result, put_var_into_stack, fixup_var_refs_1, optimize_bit_field, flush_addressof, purge_addressof_1, instantiate_decl, instantiate_virtual_regs_1, assign_parms, setjmp_protect, setjmp_protect_args, fix_lexical_addr, keep_stack_depressed): Likewise. * ifcvt.c (noce_try_cmove_arith, noce_try_abs, noce_operand_ok, noce_process_if_block, find_memory): Likewise. * integrate.c (subst_constants, allocate_initial_values): Likewise. * local-alloc.c (validate_equiv_mem_from_store, memref_referenced_p, update_equiv_regs): Likewise. * loop.c (scan_loop, prescan_loop, note_addr_stored, check_store, maybe_eliminate_biv_1, find_mem_in_note_1): Likewise. * optabs.c (expand_abs, emit_unop_insn): Likewise. * passes.c (rest_of_handle_final): Likewise. * postreload.c (reload_cse_simplify_set, reload_cse_simplify_operands, move2add_note_store): Likewise. * ra-build.c (detect_remat_webs): Likewise. * ra-debug.c (dump_static_insn_cost): Likewise. * ra-rewrite.c (slots_overlap_p, insert_stores): Likewise. * recog.c (validate_change, apply_change_group, cancel_changes, validate_replace_rtx_1, general_operand, register_operand, nonmemory_operand, push_operand, pop_operand, memory_operand, indirect_operand, asm_operand_ok, offsettable_memref_p, offsettable_nonstrict_memref_p, constrain_operands, store_data_bypass_p): Likewise. * reg-stack.c (subst_stack_regs_pat): Likewise. * regclass.c (record_operand_costs, scan_one_insn, record_reg_classes, copy_cost, reg_scan_mark_refs): Likewise. * regmove.c (optimize_reg_copy_3, stack_memref_p, combine_stack_adjustments_for_block): Likewise. * regrename.c (copyprop_hardreg_forward_1): Likewise. * reload.c (can_reload_into, push_reload, decompose, immune_p, find_reloads, find_reloads_address, find_reloads_address_1, reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p, find_equiv_reg): Likewise. * reload1.c (reload, eliminate_regs, eliminate_regs_in_insn, reload_as_needed, choose_reload_regs, emit_input_reload_insns, do_input_reload, emit_reload_insns, gen_reload, delete_output_reload, delete_address_reloads): Likewise. * resource.c (mark_referenced_resources): Likewise. * rtlanal.c (get_jump_table_offset, count_occurrences, reg_referenced_p, reg_set_p, set_of_1, set_noop_p, reg_overlap_mentioned_p, note_uses, replace_regs, nonzero_bits1, num_sign_bit_copies1): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * sched-deps.c (sched_analyze_1, sched_analyze_2): Likewise. * sdbout.c (PARM_PASSED_IN_MEMORY, sdbout_symbol, sdbout_toplevel_data, sdbout_parms, sdbout_reg_parms, sdbout_global_decl): Likewise. * simplify-rtx.c (simplify_subreg): Likewise. * stmt.c (expand_asm_operands, expand_expr_stmt_value, expand_decl, expand_anon_union_decl, expand_end_case_type): Likewise. * unroll.c (calculate_giv_inc): Likewise. * var-tracking.c (stack_adjust_offset_pre_post, bb_stack_adjust_offset, track_expr_p, count_uses, add_uses, add_stores, compute_bb_dataflow, vt_get_decl_and_offset, vt_add_function_parameters): Likewise. * varasm.c (make_var_volatile, notice_global_symbol, assemble_external, decode_addr_const, mark_weak, default_encode_section_info): Likewise. From-SVN: r83980
2004-07-01 14:52:53 +02:00
&& MEM_P (SUBREG_REG (x)))
return cached_num_sign_bit_copies (SUBREG_REG (x), mode,
known_x, known_mode, known_ret);
#endif
#endif
break;
case SIGN_EXTRACT:
if (CONST_INT_P (XEXP (x, 1)))
return MAX (1, (int) bitwidth - INTVAL (XEXP (x, 1)));
break;
case SIGN_EXTEND:
return (bitwidth - GET_MODE_PRECISION (GET_MODE (XEXP (x, 0)))
+ cached_num_sign_bit_copies (XEXP (x, 0), VOIDmode,
known_x, known_mode, known_ret));
case TRUNCATE:
/* For a smaller object, just ignore the high bits. */
num0 = cached_num_sign_bit_copies (XEXP (x, 0), VOIDmode,
known_x, known_mode, known_ret);
return MAX (1, (num0 - (int) (GET_MODE_PRECISION (GET_MODE (XEXP (x, 0)))
- bitwidth)));
case NOT:
return cached_num_sign_bit_copies (XEXP (x, 0), mode,
known_x, known_mode, known_ret);
case ROTATE: case ROTATERT:
/* If we are rotating left by a number of bits less than the number
of sign bit copies, we can just subtract that amount from the
number. */
if (CONST_INT_P (XEXP (x, 1))
&& INTVAL (XEXP (x, 1)) >= 0
&& INTVAL (XEXP (x, 1)) < (int) bitwidth)
{
num0 = cached_num_sign_bit_copies (XEXP (x, 0), mode,
known_x, known_mode, known_ret);
return MAX (1, num0 - (code == ROTATE ? INTVAL (XEXP (x, 1))
: (int) bitwidth - INTVAL (XEXP (x, 1))));
}
break;
case NEG:
/* In general, this subtracts one sign bit copy. But if the value
is known to be positive, the number of sign bit copies is the
same as that of the input. Finally, if the input has just one bit
that might be nonzero, all the bits are copies of the sign bit. */
num0 = cached_num_sign_bit_copies (XEXP (x, 0), mode,
known_x, known_mode, known_ret);
if (bitwidth > HOST_BITS_PER_WIDE_INT)
return num0 > 1 ? num0 - 1 : 1;
nonzero = nonzero_bits (XEXP (x, 0), mode);
if (nonzero == 1)
return bitwidth;
if (num0 > 1
&& (((unsigned HOST_WIDE_INT) 1 << (bitwidth - 1)) & nonzero))
num0--;
return num0;
case IOR: case AND: case XOR:
case SMIN: case SMAX: case UMIN: case UMAX:
/* Logical operations will preserve the number of sign-bit copies.
MIN and MAX operations always return one of the operands. */
num0 = cached_num_sign_bit_copies (XEXP (x, 0), mode,
known_x, known_mode, known_ret);
num1 = cached_num_sign_bit_copies (XEXP (x, 1), mode,
known_x, known_mode, known_ret);
/* If num1 is clearing some of the top bits then regardless of
the other term, we are guaranteed to have at least that many
high-order zero bits. */
if (code == AND
&& num1 > 1
&& bitwidth <= HOST_BITS_PER_WIDE_INT
&& CONST_INT_P (XEXP (x, 1))
&& (UINTVAL (XEXP (x, 1))
& ((unsigned HOST_WIDE_INT) 1 << (bitwidth - 1))) == 0)
return num1;
/* Similarly for IOR when setting high-order bits. */
if (code == IOR
&& num1 > 1
&& bitwidth <= HOST_BITS_PER_WIDE_INT
&& CONST_INT_P (XEXP (x, 1))
&& (UINTVAL (XEXP (x, 1))
& ((unsigned HOST_WIDE_INT) 1 << (bitwidth - 1))) != 0)
return num1;
return MIN (num0, num1);
case PLUS: case MINUS:
/* For addition and subtraction, we can have a 1-bit carry. However,
if we are subtracting 1 from a positive number, there will not
be such a carry. Furthermore, if the positive number is known to
be 0 or 1, we know the result is either -1 or 0. */
if (code == PLUS && XEXP (x, 1) == constm1_rtx
&& bitwidth <= HOST_BITS_PER_WIDE_INT)
{
nonzero = nonzero_bits (XEXP (x, 0), mode);
if ((((unsigned HOST_WIDE_INT) 1 << (bitwidth - 1)) & nonzero) == 0)
return (nonzero == 1 || nonzero == 0 ? bitwidth
: bitwidth - floor_log2 (nonzero) - 1);
}
num0 = cached_num_sign_bit_copies (XEXP (x, 0), mode,
known_x, known_mode, known_ret);
num1 = cached_num_sign_bit_copies (XEXP (x, 1), mode,
known_x, known_mode, known_ret);
result = MAX (1, MIN (num0, num1) - 1);
return result;
case MULT:
/* The number of bits of the product is the sum of the number of
bits of both terms. However, unless one of the terms if known
to be positive, we must allow for an additional bit since negating
a negative number can remove one sign bit copy. */
num0 = cached_num_sign_bit_copies (XEXP (x, 0), mode,
known_x, known_mode, known_ret);
num1 = cached_num_sign_bit_copies (XEXP (x, 1), mode,
known_x, known_mode, known_ret);
result = bitwidth - (bitwidth - num0) - (bitwidth - num1);
if (result > 0
&& (bitwidth > HOST_BITS_PER_WIDE_INT
|| (((nonzero_bits (XEXP (x, 0), mode)
& ((unsigned HOST_WIDE_INT) 1 << (bitwidth - 1))) != 0)
&& ((nonzero_bits (XEXP (x, 1), mode)
& ((unsigned HOST_WIDE_INT) 1 << (bitwidth - 1)))
!= 0))))
result--;
return MAX (1, result);
case UDIV:
/* The result must be <= the first operand. If the first operand
has the high bit set, we know nothing about the number of sign
bit copies. */
if (bitwidth > HOST_BITS_PER_WIDE_INT)
return 1;
else if ((nonzero_bits (XEXP (x, 0), mode)
& ((unsigned HOST_WIDE_INT) 1 << (bitwidth - 1))) != 0)
return 1;
else
return cached_num_sign_bit_copies (XEXP (x, 0), mode,
known_x, known_mode, known_ret);
case UMOD:
/* The result must be <= the second operand. If the second operand
has (or just might have) the high bit set, we know nothing about
the number of sign bit copies. */
if (bitwidth > HOST_BITS_PER_WIDE_INT)
return 1;
else if ((nonzero_bits (XEXP (x, 1), mode)
& ((unsigned HOST_WIDE_INT) 1 << (bitwidth - 1))) != 0)
return 1;
else
return cached_num_sign_bit_copies (XEXP (x, 1), mode,
known_x, known_mode, known_ret);
case DIV:
/* Similar to unsigned division, except that we have to worry about
the case where the divisor is negative, in which case we have
to add 1. */
result = cached_num_sign_bit_copies (XEXP (x, 0), mode,
known_x, known_mode, known_ret);
if (result > 1
&& (bitwidth > HOST_BITS_PER_WIDE_INT
|| (nonzero_bits (XEXP (x, 1), mode)
& ((unsigned HOST_WIDE_INT) 1 << (bitwidth - 1))) != 0))
result--;
return result;
case MOD:
result = cached_num_sign_bit_copies (XEXP (x, 1), mode,
known_x, known_mode, known_ret);
if (result > 1
&& (bitwidth > HOST_BITS_PER_WIDE_INT
|| (nonzero_bits (XEXP (x, 1), mode)
& ((unsigned HOST_WIDE_INT) 1 << (bitwidth - 1))) != 0))
result--;
return result;
case ASHIFTRT:
/* Shifts by a constant add to the number of bits equal to the
sign bit. */
num0 = cached_num_sign_bit_copies (XEXP (x, 0), mode,
known_x, known_mode, known_ret);
if (CONST_INT_P (XEXP (x, 1))
&& INTVAL (XEXP (x, 1)) > 0
&& INTVAL (XEXP (x, 1)) < GET_MODE_PRECISION (GET_MODE (x)))
num0 = MIN ((int) bitwidth, num0 + INTVAL (XEXP (x, 1)));
return num0;
case ASHIFT:
/* Left shifts destroy copies. */
if (!CONST_INT_P (XEXP (x, 1))
|| INTVAL (XEXP (x, 1)) < 0
|| INTVAL (XEXP (x, 1)) >= (int) bitwidth
|| INTVAL (XEXP (x, 1)) >= GET_MODE_PRECISION (GET_MODE (x)))
return 1;
num0 = cached_num_sign_bit_copies (XEXP (x, 0), mode,
known_x, known_mode, known_ret);
return MAX (1, num0 - INTVAL (XEXP (x, 1)));
case IF_THEN_ELSE:
num0 = cached_num_sign_bit_copies (XEXP (x, 1), mode,
known_x, known_mode, known_ret);
num1 = cached_num_sign_bit_copies (XEXP (x, 2), mode,
known_x, known_mode, known_ret);
return MIN (num0, num1);
case EQ: case NE: case GE: case GT: case LE: case LT:
case UNEQ: case LTGT: case UNGE: case UNGT: case UNLE: case UNLT:
case GEU: case GTU: case LEU: case LTU:
case UNORDERED: case ORDERED:
/* If the constant is negative, take its 1's complement and remask.
Then see how many zero bits we have. */
nonzero = STORE_FLAG_VALUE;
if (bitwidth <= HOST_BITS_PER_WIDE_INT
&& (nonzero & ((unsigned HOST_WIDE_INT) 1 << (bitwidth - 1))) != 0)
nonzero = (~nonzero) & GET_MODE_MASK (mode);
return (nonzero == 0 ? bitwidth : bitwidth - floor_log2 (nonzero) - 1);
default:
break;
}
/* If we haven't been able to figure it out by one of the above rules,
see if some of the high-order bits are known to be zero. If so,
count those bits and return one less than that amount. If we can't
safely compute the mask for this mode, always return BITWIDTH. */
bitwidth = GET_MODE_PRECISION (mode);
if (bitwidth > HOST_BITS_PER_WIDE_INT)
return 1;
nonzero = nonzero_bits (x, mode);
return nonzero & ((unsigned HOST_WIDE_INT) 1 << (bitwidth - 1))
? 1 : bitwidth - floor_log2 (nonzero) - 1;
}
/* Calculate the rtx_cost of a single instruction. A return value of
zero indicates an instruction pattern without a known cost. */
int
fwprop.c (should_replace_address): Add speed attribute. * fwprop.c (should_replace_address): Add speed attribute. (PR_OPTIMIZE_FOR_SPEED): New flag. (propagate_rtx_1): Use it. (propagate_rtx): Set it. (try_fwprop_subst): Update call of rtx_costs. (forward_propagate_and_simplify): LIkewise. * hooks.c (hook_int_rtx_bool_0): New (hook_bool_rtx_int_int_intp_false): Replace by ... (hook_bool_rtx_int_int_intp_bool_false): .. thisone. * hooks.h (hook_int_rtx_bool_0): New (hook_bool_rtx_int_int_intp_false): Replace by ... (hook_bool_rtx_int_int_intp_bool_false): .. thisone. * optabs.c (avoid_expensive_constant): UPdate call of rtx_cost. (prepare_cmp_insn): UPdate call of rtx_cost. * postreload.c (reload_cse_simplify_set): Update call of rtx_cost. (reload_cse_simplify_operands): Update call of rtx_cost. (reload_cse_move2add): call of rtx_cost. * target.h (struct gcc_target): Update rtx_costs and address_costs. * rtlanal.c (rtx_cost): Add speed argument. (address_cost): Add speed argument (default_address_cost): Likewise. (insn_rtx_cost): Likewise. * cfgloopanal.c (seq_cost): Add speed argument. (target_reg_cost, target_spill_cost): Turn to array. (init_set_costs): Update for speed. (estimate_reg_pressure_cost): Add speed argument. * auto-inc-dec.c (attempt_change): Update call of rtx_cost. * dojump.c (prefer_and_bit_test): UPdate call of rtx_cost. * tree-ssa-loop-ivopts.c (struct ivopts_data): New field speed. (seq_cost): Add speed argument. (computation_cost): Add speed arugment. (add_cost, multiply_by_const, get_address_cost): add speed argument. (force_expr_to_var_cost): Update for profile info. (force_var_cost): Likewise. (split_address_cost): Likewise. (ptr_difference_cost): Likewise. (difference_cost): Likewise. (get_computation_cost_at): Likewise. (determine_iv_cost): Likewise. (ivopts_global_cost_for_size): Likewise. (rewrite_use_address): Likewise. (tree_ssa_iv_optimize_loop): Initialize speed field. * cse.c (optimize_this_for_speed_p): New static var. (notreg_cost): Update call of rtx_cost. (cse_extended_basic_block): set optimize_this_for_speed_p. * ifcvt.c (cheap_bb_rtx_cost_p): Update call of rtx_cost. (noce_try_cmove_arith): Likewise. (noce_try_sign_mask): LIkewise. * expr.c (compress_float_constant): Update rtx_cost calls. * tree-ssa-address.c (most_expensive_mult_to_index): Add speed argument. (addr_to_parts): Likewise. (create_mem_ref): Likewise. * dse.c (find_shift_sequence): Add speed argument. (replace_read): Update call. * calls.c (precompute_register_parameters): Update call of rtx_cost. * expmed.c (sdiv_pow2_cheap, smod_pow2_cheap, zero_cost, add_cost, * neg_cost, shift_cost, shiftadd_cost, shiftsub_cost, mul_cost, sdiv_cost, udiv_cost ,mul_widen_cost, mul_highpart_cost): Increase dimension. (init_expmed): Initialize for both size and speed. (expand_shift): Use profile. (synth_mult): Use profile. (choose_mult_variant): Use profile. (expand_mult): Use profile. (expand_mult_highpart_optab): Use profile. (expand_mult_highpart): Use profile. (expand_smod_pow2): Use profile. (expand_divmod): Use profile. * simplify-rtx.c (simplify_binary_operation_1): Update call of rtx_cost. * loop-invariant.c (create_new_invariant): Use profile. (gain_for_invariant): Add speed parameter. (best_gain_for_invariant): Likewise. (find_invariants_to_move): Likewise. (move_single_loop_invariants): Set it. * target-def.h (TARGET_RTX_COSTS): Use hook. * rtl.h (rtx_cost, address_cost, insn_rtx_cost): Update prototpe. (optimize_insn_for_size_p, optimize_insn_for_speed_p): Declare. * output.h (default_address_cost): Update prototype. * combine.c (optimize_this_for_speed_p): New static var. (combine_validate_cost): Update call of rtx_cost. (combine_instructions): Set optimize_this_for_speed_p. (expand_compound_operation): Update call of rtx_cost. (make_extraction):Update call of rtx_cost. (force_to_mode):Update call of rtx_cost. (distribute_and_simplify_rtx):Update call of rtx_cost. * cfgloop.h (target_reg_cost, target_spill_cost): Turn to array. (estimate_reg_pressure_cost): Update prototype. * tree-flow.h (multiply_by_cost, create_mem_ref): Update prototype. * basic-block.h (optimize_insn_for_size_p, optimize_insn_for_speed_p): Remove. * config/alpha/alpha.c (alpha_rtx_costs): Update. (alpha_rtx_costs): Update. * config/frv/frv.c (frv_rtx_costs): Update. * config/s390/s390.c (s390_rtx_costs): Update. * config/m32c/m32c.c (m32c_memory_move_cost): Update. (m32c_rtx_costs): Update. * config/spu/spu.c (TARGET_ADDRESS_COST): Upate. (spu_rtx_costs): Update. * config/sparc/sparc.c (sparc_rtx_costs): Update. * config/m32r/m32r.c (m32r_rtx_costs): Update. * config/i386/i386.c (:ix86_address_cost): Update. (ix86_rtx_costs): Update. * config/sh/sh.c (sh_rtx_costs, sh_address_cost): Update. * config/pdp11/pdp11.c (pdp11_rtx_costs): Update. * config/avr/avr.c (avr_rtx_costs, avr_address_cost): Update. * config/crx/crx.c (crx_address_cost): Update. * config/xtensa/xtensa.c (xtensa_rtx_costs): Update. * config/stormy16/stormy16.c (xstormy16_address_cost, xstormy16_rtx_costs): Update. * config/m68hc11/m68hc11.c (m68hc11_address_cost, m68hc11_rtx_costs): Update. * config/cris/cris.c (cris_rtx_costs, cris_address_cost): Update. * config/iq2000/iq2000.c (iq2000_rtx_costs, iq2000_address_cost): Update. * config/mn10300/mn10300.c (mn10300_address_cost, mn10300_rtx_costs): Update * config/ia64/ia64.c (ia64_rtx_costs): Update. * config/m68k/m68k.c (m68k_rtx_costs): Update. * config/rs6000/rs6000.c (rs6000_rtx_costs): Update. * config/arc/arc.c (arc_rtx_costs, arc_address_cost): Update. * config/mcore/mcore.c (TARGET_ADDRESS_COST): Update. (mcore_rtx_costs): update. * config/score/score3.c (score3_rtx_costs): Update. * config/score/score7.c (score7_rtx_costs): Update. * config/score/score3.h (score3_rtx_costs):Update. * config/score/score7.h (score7_rtx_costs): Update. * config/score/score.c (score_rtx_costs): Update. * config/arm/arm.c (arm_address_cost): Update. (arm_rtx_costs_1): Update. (arm_rtx_costs_1): Update. (arm_size_rtx_costs): Update. (arm_size_rtx_costs): Update. (arm_size_rtx_costs): Update. (arm_xscale_rtx_costs): Update. (arm_thumb_address_cost): Update. * config/pa/pa.c (hppa_address_cost): Update. * config/mips/mips.c (mips_rtx_costs): Update. * config/vax/vax.c (vax_address_cost): Update. * config/h8300/h8300.c (h8300_shift_costs): Update. (h8300_rtx_costs): Update. * config/v850/v850.c (TARGET_ADDRESS_COST): Update. (v850_rtx_costs): Update. * config/mmix/mmix.c (mmix_rtx_costs, mmix_rtx_costs): Update. * config/bfin/bfin.c (bfin_address_cost): Update. (bfin_rtx_costs): Update. * stmt.c (lshift_cheap_p): Update. From-SVN: r139821
2008-08-31 11:44:25 +02:00
insn_rtx_cost (rtx pat, bool speed)
{
int i, cost;
rtx set;
/* Extract the single set rtx from the instruction pattern.
We can't use single_set since we only have the pattern. */
if (GET_CODE (pat) == SET)
set = pat;
else if (GET_CODE (pat) == PARALLEL)
{
set = NULL_RTX;
for (i = 0; i < XVECLEN (pat, 0); i++)
{
rtx x = XVECEXP (pat, 0, i);
if (GET_CODE (x) == SET)
{
if (set)
return 0;
set = x;
}
}
if (!set)
return 0;
}
else
return 0;
cost = set_src_cost (SET_SRC (set), speed);
return cost > 0 ? cost : COSTS_N_INSNS (1);
}
/* Returns estimate on cost of computing SEQ. */
unsigned
seq_cost (const rtx_insn *seq, bool speed)
{
unsigned cost = 0;
rtx set;
for (; seq; seq = NEXT_INSN (seq))
{
set = single_set (seq);
if (set)
cost += set_rtx_cost (set, speed);
else
cost++;
}
return cost;
}
/* Given an insn INSN and condition COND, return the condition in a
canonical form to simplify testing by callers. Specifically:
(1) The code will always be a comparison operation (EQ, NE, GT, etc.).
(2) Both operands will be machine operands; (cc0) will have been replaced.
(3) If an operand is a constant, it will be the second operand.
(4) (LE x const) will be replaced with (LT x <const+1>) and similarly
for GE, GEU, and LEU.
If the condition cannot be understood, or is an inequality floating-point
comparison which needs to be reversed, 0 will be returned.
If REVERSE is nonzero, then reverse the condition prior to canonizing it.
If EARLIEST is nonzero, it is a pointer to a place where the earliest
insn used in locating the condition was found. If a replacement test
of the condition is desired, it should be placed in front of that
insn and we will be sure that the inputs are still valid.
If WANT_REG is nonzero, we wish the condition to be relative to that
register, if possible. Therefore, do not canonicalize the condition
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
further. If ALLOW_CC_MODE is nonzero, allow the condition returned
to be a compare to a CC mode register.
If VALID_AT_INSN_P, the condition must be valid at both *EARLIEST
and at INSN. */
rtx
Various condition-handling calls gcc/ 2014-08-26 David Malcolm <dmalcolm@redhat.com> * rtl.h (canonicalize_condition): Strengthen param 1 from rtx to rtx_insn * and param 4 from rtx * to rtx_insn **. (get_condition): Strengthen param 1 from rtx to rtx_insn * and param 2 from rtx * to rtx_insn **. * df.h (can_move_insns_across): Strengthen params 1-4 from rtx to rtx_insn * and final param from rtx * to rtx_insn **. * cfgcleanup.c (try_head_merge_bb): Strengthen local "move_before" from rtx to rtx_insn *. (try_head_merge_bb): Likewise for both locals named "move_upto". * df-problems.c (can_move_insns_across): Likewise for params "from", "to", "across_from", "across_to" and locals "insn", "next", "max_to". Strengthen param "pmove_upto" from rtx * to rtx_insn **. * ifcvt.c (struct noce_if_info): Strengthen field "cond_earliest" from rtx to rtx_insn *. (noce_get_alt_condition): Strengthen param "earliest" from rtx * to rtx_insn **. Strengthen local "insn" from rtx to rtx_insn *. (noce_try_minmax): Strengthen locals "earliest", "seq" from rtx to rtx_insn *. (noce_try_abs): Likewise. (noce_get_condition): Likewise for param "jump". Strengthen param "earliest" from rtx * to rtx_insn **. (noce_find_if_block): Strengthen local "cond_earliest" from rtx to rtx_insn *. (find_cond_trap): Likewise. (dead_or_predicable): Likewise for local "earliest". * loop-iv.c (check_simple_exit): Likewise for local "at". Add checked cast. * rtlanal.c (canonicalize_condition): Likewise for param "insn" and local "prev". Strengthen param "earliest" from rtx * to rtx_insn **. (get_condition): Strengthen param "jump" from rtx to rtx_insn * Strengthen param "earliest" from rtx * to rtx_insn **. From-SVN: r214542
2014-08-26 21:38:42 +02:00
canonicalize_condition (rtx_insn *insn, rtx cond, int reverse,
rtx_insn **earliest,
rtx want_reg, int allow_cc_mode, int valid_at_insn_p)
{
enum rtx_code code;
Various condition-handling calls gcc/ 2014-08-26 David Malcolm <dmalcolm@redhat.com> * rtl.h (canonicalize_condition): Strengthen param 1 from rtx to rtx_insn * and param 4 from rtx * to rtx_insn **. (get_condition): Strengthen param 1 from rtx to rtx_insn * and param 2 from rtx * to rtx_insn **. * df.h (can_move_insns_across): Strengthen params 1-4 from rtx to rtx_insn * and final param from rtx * to rtx_insn **. * cfgcleanup.c (try_head_merge_bb): Strengthen local "move_before" from rtx to rtx_insn *. (try_head_merge_bb): Likewise for both locals named "move_upto". * df-problems.c (can_move_insns_across): Likewise for params "from", "to", "across_from", "across_to" and locals "insn", "next", "max_to". Strengthen param "pmove_upto" from rtx * to rtx_insn **. * ifcvt.c (struct noce_if_info): Strengthen field "cond_earliest" from rtx to rtx_insn *. (noce_get_alt_condition): Strengthen param "earliest" from rtx * to rtx_insn **. Strengthen local "insn" from rtx to rtx_insn *. (noce_try_minmax): Strengthen locals "earliest", "seq" from rtx to rtx_insn *. (noce_try_abs): Likewise. (noce_get_condition): Likewise for param "jump". Strengthen param "earliest" from rtx * to rtx_insn **. (noce_find_if_block): Strengthen local "cond_earliest" from rtx to rtx_insn *. (find_cond_trap): Likewise. (dead_or_predicable): Likewise for local "earliest". * loop-iv.c (check_simple_exit): Likewise for local "at". Add checked cast. * rtlanal.c (canonicalize_condition): Likewise for param "insn" and local "prev". Strengthen param "earliest" from rtx * to rtx_insn **. (get_condition): Strengthen param "jump" from rtx to rtx_insn * Strengthen param "earliest" from rtx * to rtx_insn **. From-SVN: r214542
2014-08-26 21:38:42 +02:00
rtx_insn *prev = insn;
cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify. * emit-rtl.c (const_int_htab_hash, const_int_htab_eq, const_double_htab_hash, const_double_htab_eq, mem_attrs_htab_hash): Likewise. * loop-iv.c (biv_eq): Likewise. * print-rtl.c (print_rtx, print_decl_name, print_mem_expr, print_inline_rtx, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_rtl, print_rtl_single, print_simple_rtl): Likewise. * rtl-error.c (location_for_asm, diagnostic_for_asm, error_for_asm, warning_for_asm, _fatal_insn, _fatal_insn_not_found): Likewise. * rtl.c (rtx_size, shared_const_p, shallow_copy_rtx_stat, rtx_equal_p, rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag): Likewise. * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtl_check_failed_code1, rtl_check_failed_code2, rtl_check_failed_code_mode, rtvec_check_failed_bounds, rtl_check_failed_flag, LABEL_KIND, SET_LABEL_KIND, rhs_regno, subreg_lsb, subreg_regno, subreg_nregs, shared_const_p, rtx_size, shallow_copy_rtx_stat, rtx_equal_p, get_pool_mode, insn_line, insn_file, simplify_replace_rtx, mode_signbit_p, rtx_addr_can_trap_p, nonzero_address_p, rtx_unstable_p, get_integer_term, get_related_value, offset_within_block_p, reg_mentioned_p, count_occurrences, reg_referenced_p, reg_used_between_p, no_labels_between_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, side_effects_p, volatile_refs_p, volatile_insn_p, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p, auto_inc_p, in_expr_list_p, remove_node_from_expr_list, loc_mentioned_in_p, label_is_jump_target_p, reversed_comparison_code_parts, debug_rtx, debug_rtx_list, debug_rtx_range, debug_rtx_find, print_mem_expr, print_rtl, print_simple_rtl, print_rtl_single, print_inline_rtx): Likewise. * rtlanal.c (covers_regno_p, covers_regno_no_parallel_p, computed_jump_p_1, nonzero_bits1, rtx_unstable_p, rtx_addr_can_trap_p_1, rtx_addr_can_trap_p, nonzero_address_p, get_integer_term, get_related_value, offset_within_block_p, count_occurrences, reg_mentioned_p, no_labels_between_p, reg_used_between_p, reg_referenced_p, single_set_2, multiple_sets, set_noop_p, refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, covers_regno_no_parallel_p, covers_regno_p, dead_or_set_regno_p, find_reg_note, find_regno_note, find_reg_equal_equiv_note, find_constant_src, find_reg_fusage, find_regno_fusage, pure_call_p, remove_note, in_expr_list_p, remove_node_from_expr_list, volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, may_trap_p, may_trap_after_code_motion_p, may_trap_or_fault_p, inequality_comparisons_p, tablejump_p, computed_jump_p_1, computed_jump_p, auto_inc_p, loc_mentioned_in_p, subreg_lsb, subreg_regno, subreg_nregs, label_is_jump_target_p): Likewise. * simplify-rtx.c (neg_const_int, plus_minus_operand_p, mode_signbit_p, simplify_replace_rtx, plus_minus_operand_p): Likewise. * toplev.h (_fatal_insn_not_found, _fatal_insn, error_for_asm, warning_for_asm): Likewise. * tree.h (print_rtl): Likewise. * varasm.c (get_pool_mode): Likewise. From-SVN: r126922
2007-07-25 20:33:26 +02:00
const_rtx set;
rtx tem;
rtx op0, op1;
int reverse_code = 0;
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 13:02:45 +01:00
machine_mode mode;
basic_block bb = BLOCK_FOR_INSN (insn);
code = GET_CODE (cond);
mode = GET_MODE (cond);
op0 = XEXP (cond, 0);
op1 = XEXP (cond, 1);
if (reverse)
code = reversed_comparison_code (cond, insn);
if (code == UNKNOWN)
return 0;
if (earliest)
*earliest = insn;
/* If we are comparing a register with zero, see if the register is set
in the previous insn to a COMPARE or a comparison operation. Perform
the same tests as a function of STORE_FLAG_VALUE as find_comparison_args
in cse.c */
while ((GET_RTX_CLASS (code) == RTX_COMPARE
|| GET_RTX_CLASS (code) == RTX_COMM_COMPARE)
&& op1 == CONST0_RTX (GET_MODE (op0))
&& op0 != want_reg)
{
/* Set nonzero when we find something of interest. */
rtx x = 0;
/* If comparison with cc0, import actual comparison from compare
insn. */
if (op0 == cc0_rtx)
{
if ((prev = prev_nonnote_insn (prev)) == 0
|| !NONJUMP_INSN_P (prev)
|| (set = single_set (prev)) == 0
|| SET_DEST (set) != cc0_rtx)
return 0;
op0 = SET_SRC (set);
op1 = CONST0_RTX (GET_MODE (op0));
if (earliest)
*earliest = prev;
}
/* If this is a COMPARE, pick up the two things being compared. */
if (GET_CODE (op0) == COMPARE)
{
op1 = XEXP (op0, 1);
op0 = XEXP (op0, 0);
continue;
}
else if (!REG_P (op0))
break;
/* Go back to the previous insn. Stop if it is not an INSN. We also
stop if it isn't a single set or if it has a REG_INC note because
we don't want to bother dealing with it. */
prev = prev_nonnote_nondebug_insn (prev);
invoke.texi (-fvar-tracking-assignments): New. gcc/ChangeLog: * doc/invoke.texi (-fvar-tracking-assignments): New. (-fvar-tracking-assignments-toggle): New. (-fdump-final-insns=file): Mark filename as optional. (--param min-nondebug-insn-uid): New. (-gdwarf-@{version}): Mention version 4. * opts.c (common_handle_option): Accept it. * tree-vrp.c (find_assert_locations_1): Skip debug stmts. * regrename.c (regrename_optimize): Drop last. Don't count debug insns as uses. Don't reject change because of debug insn. (do_replace): Reject DEBUG_INSN as chain starter. Take base_regno from the chain starter, and check for inexact matches in DEBUG_INSNS. (scan_rtx_reg): Accept inexact matches in DEBUG_INSNs. (build_def_use): Simplify and fix the marking of DEBUG_INSNs. * sched-ebb.c (schedule_ebbs): Skip boundary debug insns. * fwprop.c (forward_propagate_and_simplify): ...into debug insns. * doc/gimple.texi (is_gimple_debug): New. (gimple_debug_bind_p): New. (is_gimple_call, gimple_assign_cast_p): End sentence with period. * doc/install.texi (bootstrap-debug): More details. (bootstrap-debug-big, bootstrap-debug-lean): Document. (bootstrap-debug-lib): More details. (bootstrap-debug-ckovw): Update. (bootstrap-time): New. * tree-into-ssa.c (mark_def_sites): Skip debug stmts. (insert_phi_nodes_for): Insert debug stmts. (rewrite_stmt): Take iterator. Insert debug stmts. (rewrite_enter_block): Adjust. (maybe_replace_use_in_debug_stmt): New. (rewrite_update_stmt): Use it. (mark_use_interesting): Return early for debug stmts. * tree-ssa-loop-im.c (rewrite_bittest): Propagate DEFs into debug stmts before replacing stmt. (move_computations_stmt): Likewise. * ira-conflicts.c (add_copies): Skip debug insns. * regstat.c (regstat_init_n_sets_and_refs): Discount debug insns. (regstat_bb_compute_ri): Skip debug insns. * tree-ssa-threadupdate.c (redirection_block_p): Skip debug stmts. * tree-ssa-loop-manip.c (find_uses_to_rename_stmt, check_loop_closed_ssa_stmt): Skip debug stmts. * tree-tailcall.c (find_tail_calls): Likewise. * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Likewise. * tree.h (MAY_HAVE_DEBUG_STMTS): New. (build_var_debug_value_stat): Declare. (build_var_debug_value): Define. (target_for_debug_bind): Declare. * reload.c (find_equiv_reg): Skip debug insns. * rtlanal.c (reg_used_between_p): Skip debug insns. (side_effects_p): Likewise. (canonicalize_condition): Likewise. * ddg.c (create_ddg_dep_from_intra_loop_link): Check that non-debug insns never depend on debug insns. (create_ddg_dep_no_link): Likewise. (add_cross_iteration_register_deps): Use ANTI_DEP for debug insns. Don't add inter-loop dependencies for debug insns. (build_intra_loop_deps): Likewise. (create_ddg): Count debug insns. * ddg.h (struct ddg::num_debug): New. (num_backargs): Pair up with previous int field. * diagnostic.c (diagnostic_report_diagnostic): Skip notes on -fcompare-debug-second. * final.c (get_attr_length_1): Skip debug insns. (rest_of_clean-state): Don't dump CFA_RESTORE_STATE. * gcc.c (invoke_as): Call compare-debug-dump-opt. (driver_self_specs): Map -fdump-final-insns to -fdump-final-insns=.. (get_local_tick): New. (compare_debug_dump_opt_spec_function): Test for . argument and compute output name. Compute temp output spec without flag name. Compute -frandom-seed. (OPT): Undef after use. * cfgloopanal.c (num_loop_insns): Skip debug insns. (average_num_loop_insns): Likewise. * params.h (MIN_NONDEBUG_INSN_UID): New. * gimple.def (GIMPLE_DEBUG): New. * ipa-reference.c (scan_stmt_for_static_refs): Skip debug stmts. * auto-inc-dec.c (merge_in_block): Skip debug insns. (merge_in_block): Fix whitespace. * toplev.c (flag_var_tracking): Update comment. (flag_var_tracking_assignments): New. (flag_var_tracking_assignments_toggle): New. (process_options): Don't open final insns dump file if we're not going to write to it. Compute defaults for var_tracking. * df-scan.c (df_insn_rescan_debug_internal): New. (df_uses_record): Handle debug insns. * haifa-sched.c (ready): Initialize n_debug. (contributes_to_priority): Skip debug insns. (dep_list_size): New. (priority): Use it. (rank_for_schedule): Likewise. Schedule debug insns as soon as they're ready. Disregard previous debug insns to make decisions. (queue_insn): Never queue debug insns. (ready_add, ready_remove_first, ready_remove): Count debug insns. (schedule_insn): Don't reject debug insns because of issue rate. (get_ebb_head_tail, no_real_insns_p): Skip boundary debug insns. (queue_to_ready): Skip and discount debug insns. (choose_ready): Let debug insns through. (schedule_block): Check boundary debug insns. Discount debug insns, schedule them early. Adjust whitespace. (set_priorities): Check for boundary debug insns. (add_jump_dependencies): Use dep_list_size. (prev_non_location_insn): New. (check_cfg): Use it. * tree-ssa-loop-ivopts.c (find-interesting_users): Skip debug stmts. (remove_unused_ivs): Reset debug stmts. * modulo-sched.c (const_iteration_count): Skip debug insns. (res_MII): Discount debug insns. (loop_single_full_bb_p): Skip debug insns. (sms_schedule): Likewise. (sms_schedule_by_order): Likewise. (ps_has_conflicts): Likewise. * caller-save.c (refmarker_fn): New. (save_call_clobbered_regs): Replace regs with saved mem in debug insns. (mark_referenced_regs): Take pointer, mark and arg. Adjust. Call refmarker_fn mark for hardregnos. (mark_reg_as_referenced): New. (replace_reg_with_saved_mem): New. * ipa-pure-const.c (check_stmt): Skip debug stmts. * cse.c (cse_insn): Canonicalize debug insns. Skip them when searching back. (cse_extended_basic_block): Skip debug insns. (count_reg_usage): Likewise. (is_dead_reg): New, split out of... (set_live_p): ... here. (insn_live_p): Use it for debug insns. * tree-stdarg.c (check_all_va_list_escapes): Skip debug stmts. (execute_optimize_stdarg): Likewise. * tree-ssa-dom.c (propagate_rhs_into_lhs): Likewise. * tree-ssa-propagate.c (substitute_and_fold): Don't regard changes in debug stmts as changes. * sel-sched.c (moving_insn_creates_bookkeeping_block_p): New. (moveup_expr): Don't move across debug insns. Don't move debug insn if it would create a bookkeeping block. (moveup_expr_cached): Don't use cache for debug insns that are heads of blocks. (compute_av_set_inside_bb): Skip debug insns. (sel_rank_for_schedule): Schedule debug insns first. Remove dead code. (block_valid_for_bookkeeping_p); Support lax searches. (create_block_for_bookkeeping): Adjust block numbers when encountering debug-only blocks. (find_place_for_bookkeeping): Deal with debug-only blocks. (generate_bookkeeping_insn): Accept no place to insert. (remove_temp_moveop_nops): New argument full_tidying. (prepare_place_to_insert): Deal with debug insns. (advance_state_on_fence): Debug insns don't start cycles. (update_boundaries): Take fence as argument. Deal with debug insns. (schedule_expr_on_boundary): No full_tidying on debug insns. (fill_insns): Deal with debug insns. (track_scheduled_insns_and_blocks): Don't count debug insns. (need_nop_to_preserve_insn_bb): New, split out of... (remove_insn_from_stream): ... this. (fur_orig_expr_not_found): Skip debug insns. * rtl.def (VALUE): Move up. (DEBUG_INSN): New. * tree-ssa-sink.c (all_immediate_uses_same_place): Skip debug stmts. (nearest_common_dominator_of_uses): Take debug_stmts argument. Set it if debug stmts are found. (statement_sink_location): Skip debug stmts. Propagate moving defs into debug stmts. * ifcvt.c (first_active_insn): Skip debug insns. (last_active_insns): Likewise. (cond_exec_process_insns): Likewise. (noce_process_if_block): Likewise. (check_cond_move_block): Likewise. (cond_move_convert_if_block): Likewise. (block_jumps_and_fallthru_p): Likewise. (dead_or_predicable): Likewise. * dwarf2out.c (debug_str_hash_forced): New. (find_AT_string): Add comment. (gen_label_for_indirect_string): New. (get_debug_string_label): New. (AT_string_form): Use it. (mem_loc_descriptor): Handle non-TLS symbols. Handle MINUS , DIV, MOD, AND, IOR, XOR, NOT, ABS, NEG, and CONST_STRING. Accept but discard COMPARE, IF_THEN_ELSE, ROTATE, ROTATERT, TRUNCATE and several operations that cannot be represented with DWARF opcodes. (loc_descriptor): Ignore SIGN_EXTEND and ZERO_EXTEND. Require dwarf_version 4 for DW_OP_implicit_value and DW_OP_stack_value. (dwarf2out_var_location): Take during-call mark into account. (output_indirect_string): Update comment. Output if there are label and references. (prune_indirect_string): New. (prune_unused_types): Call it if debug_str_hash_forced. More in dwarf2out.c, from Jakub Jelinek <jakub@redhat.com>: (dw_long_long_const): Remove. (struct dw_val_struct): Change val_long_long type to rtx. (print_die, attr_checksum, same_dw_val_p, loc_descriptor): Adjust for val_long_long change to CONST_DOUBLE rtx from a long hi/lo pair. (output_die): Likewise. Use HOST_BITS_PER_WIDE_INT size of each component instead of HOST_BITS_PER_LONG. (output_loc_operands): Likewise. For const8* assert HOST_BITS_PER_WIDE_INT rather than HOST_BITS_PER_LONG is >= 64. (output_loc_operands_raw): For const8* assert HOST_BITS_PER_WIDE_INT rather than HOST_BITS_PER_LONG is >= 64. (add_AT_long_long): Remove val_hi and val_lo arguments, add val_const_double. (size_of_die): Use HOST_BITS_PER_WIDE_INT size multiplier instead of HOST_BITS_PER_LONG for dw_val_class_long_long. (add_const_value_attribute): Adjust add_AT_long_long caller. Don't handle TLS SYMBOL_REFs. If CONST wraps a constant, tail recurse. (dwarf_stack_op_name): Handle DW_OP_implicit_value and DW_OP_stack_value. (size_of_loc_descr, output_loc_operands, output_loc_operands_raw): Handle DW_OP_implicit_value. (extract_int): Move prototype earlier. (mem_loc_descriptor): For SUBREG punt if inner mode size is wider than DWARF2_ADDR_SIZE. Handle SIGN_EXTEND and ZERO_EXTEND by DW_OP_shl and DW_OP_shr{a,}. Handle EQ, NE, GT, GE, LT, LE, GTU, GEU, LTU, LEU, SMIN, SMAX, UMIN, UMAX, SIGN_EXTRACT, ZERO_EXTRACT. (loc_descriptor): Compare mode size with DWARF2_ADDR_SIZE instead of Pmode size. (loc_descriptor): Add MODE argument. Handle CONST_INT, CONST_DOUBLE, CONST_VECTOR, CONST, LABEL_REF and SYMBOL_REF if mode != VOIDmode, attempt to handle other expressions. Don't handle TLS SYMBOL_REFs. (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor_from_tree_1): Adjust loc_descriptor callers. (add_location_or_const_value_attribute): Likewise. For single location loc_lists attempt to use add_const_value_attribute for constant decls. Add DW_AT_const_value even if NOTE_VAR_LOCATION is VAR_LOCATION with CONSTANT_P or CONST_STRING in its expression. * cfgbuild.c (inside_basic_block_p): Handle debug insns. (control_flow_insn_p): Likewise. * tree-parloops.c (eliminate_local_variables_stmt): Handle debug stmt. (separate_decls_in_region_debug_bind): New. (separate_decls_in_region): Process debug bind stmts afterwards. * recog.c (verify_changes): Handle debug insns. (extract_insn): Likewise. (peephole2_optimize): Skip debug insns. * dse.c (scan_insn): Skip debug insns. * sel-sched-ir.c (return_nop_to_pool): Take full_tidying argument. Pass it on. (setup_id_for_insn): Handle debug insns. (maybe_tidy_empty_bb): Adjust whitespace. (tidy_control_flow): Skip debug insns. (sel_remove_insn): Adjust for debug insns. (sel_estimate_number_of_insns): Skip debug insns. (create_insn_rtx_from_pattern): Handle debug insns. (create_copy_of_insn_rtx): Likewise. * sel-sched-.h (sel_bb_end): Declare. (sel_bb_empty_or_nop_p): New. (get_all_loop_exits): Use it. (_eligible_successor_edge_p): Likewise. (return_nop_to_pool): Adjust. * tree-eh.c (tre_empty_eh_handler_p): Skip debug stmts. * ira-lives.c (process_bb_node_lives): Skip debug insns. * gimple-pretty-print.c (dump_gimple_debug): New. (dump_gimple_stmt): Use it. (dump_bb_header): Skip gimple debug stmts. * regmove.c (optimize_reg_copy_1): Discount debug insns. (fixup_match_2): Likewise. (regmove_backward_pass): Likewise. Simplify combined replacement. Handle debug insns. * function.c (instantiate_virtual_regs): Handle debug insns. * function.h (struct emit_status): Add x_cur_debug_insn_uid. * print-rtl.h: Include cselib.h. (print_rtx): Print VALUEs. Split out and recurse for VAR_LOCATIONs. * df.h (df_inns_rescan_debug_internal): Declare. * gcse.c (alloc_hash_table): Estimate n_insns. (cprop_insn): Don't regard debug insns as changes. (bypass_conditional_jumps): Skip debug insns. (one_pre_gcse_pass): Adjust. (one_code_hoisting_pass): Likewise. (compute_ld_motion_mems): Skip debug insns. (one_cprop_pass): Adjust. * tree-if-conv.c (tree_if_convert_stmt): Reset debug stmts. (if_convertible_stmt_p): Handle debug stmts. * init-regs.c (initialize_uninitialized_regs): Skip debug insns. * tree-vect-loop.c (vect_is_simple_reduction): Skip debug stmts. * ira-build.c (create_bb_allocnos): Skip debug insns. * tree-flow-inline.h (has_zero_uses): Discount debug stmts. (has_single_use): Likewise. (single_imm_use): Likewise. (num_imm_uses): Likewise. * tree-ssa-phiopt.c (empty_block_p): Skip debug stmts. * tree-ssa-coalesce.c (build_ssa_conflict_graph): Skip debug stmts. (create_outofssa_var_map): Likewise. * lower-subreg.c (adjust_decomposed_uses): New. (resolve_debug): New. (decompose_multiword_subregs): Use it. * tree-dfa.c (find_referenced_vars): Skip debug stmts. * emit-rtl.c: Include params.h. (cur_debug_insn_uid): Define. (set_new_first_and_last_insn): Set cur_debug_insn_uid too. (copy_rtx_if_shared_1): Handle debug insns. (reset_used_flags): Likewise. (set_used_flags): LIkewise. (get_max_insn_count): New. (next_nondebug_insn): New. (prev_nondebug_insn): New. (make_debug_insn_raw): New. (emit_insn_before_noloc): Handle debug insns. (emit_jump_insn_before_noloc): Likewise. (emit_call_insn_before_noloc): Likewise. (emit_debug_insn_before_noloc): New. (emit_insn_after_noloc): Handle debug insns. (emit_jump_insn_after_noloc): Likewise. (emit_call_insn_after_noloc): Likewise. (emit_debug_insn_after_noloc): Likewise. (emit_insn_after): Take loc from earlier non-debug insn. (emit_jump_insn_after): Likewise. (emit_call_insn_after): Likewise. (emit_debug_insn_after_setloc): New. (emit_debug_insn_after): New. (emit_insn_before): Take loc from later non-debug insn. (emit_jump_insn_before): Likewise. (emit_call_insn_before): Likewise. (emit_debug_insn_before_setloc): New. (emit_debug_insn_before): New. (emit_insn): Handle debug insns. (emit_debug_insn): New. (emit_jump_insn): Handle debug insns. (emit_call_insn): Likewise. (emit): Likewise. (init_emit): Take min-nondebug-insn-uid into account. Initialize cur_debug_insn_uid. (emit_copy_of_insn_after): Handle debug insns. * cfgexpand.c (gimple_assign_rhs_to_tree): Do not overwrite location of single rhs in place. (maybe_dump_rtl_for_gimple_stmt): Dump lineno. (floor_sdiv_adjust): New. (cell_sdiv_adjust): New. (cell_udiv_adjust): New. (round_sdiv_adjust): New. (round_udiv_adjust): New. (wrap_constant): Moved from cselib. (unwrap_constant): New. (expand_debug_expr): New. (expand_debug_locations): New. (expand_gimple_basic_block): Drop hiding redeclaration. Expand debug bind stmts. (gimple_expand_cfg): Expand debug locations. * cselib.c: Include tree-pass.h. (struct expand_value_data): New. (cselib_record_sets_hook): New. (PRESERVED_VALUE_P, LONG_TERM_PRESERVED_VALUE_P): New. (cselib_clear_table): Move, and implemnet in terms of... (cselib_reset_table_with_next_value): ... this. (cselib_get_next_unknown_value): New. (discard_useless_locs): Don't discard preserved values. (cselib_preserve_value): New. (cselib_preserved_value_p): New. (cselib_preserve_definitely): New. (cselib_clear_preserve): New. (cselib_preserve_only_values): New. (new_cselib_val): Take rtx argument. Dump it in details. (cselib_lookup_mem): Adjust. (expand_loc): Take regs_active in struct. Adjust. Silence dumps unless details are requested. (cselib_expand_value_rtx_cb): New. (cselib_expand_value_rtx): Rename and reimplment in terms of... (cselib_expand_value_rtx_1): ... this. Adjust. Silence dumps without details. Copy more subregs. Try to resolve values using a callback. Wrap constants. (cselib_subst_to_values): Adjust. (cselib_log_lookup): New. (cselib_lookup): Call it. (cselib_invalidate_regno): Don't count preserved values as useless. (cselib_invalidate_mem): Likewise. (cselib_record_set): Likewise. (struct set): Renamed to cselib_set, moved to cselib.h. (cselib_record_sets): Adjust. Call hook. (cselib_process_insn): Reset table when it would be cleared. (dump_cselib_val): New. (dump_cselib_table): New. * tree-cfgcleanup.c (tree_forwarded_block_p): Skip debug stmts. (remove_forwarder_block): Support moving debug stmts. * cselib.h (cselib_record_sets_hook): Declare. (cselib_expand_callback): New type. (cselib_expand_value_rtx_cb): Declare. (cselib_reset_table_with_next_value): Declare. (cselib_get_next_unknown_value): Declare. (cselib_preserve_value): Declare. (cselib_preserved_value_p): Declare. (cselib_preserve_only_values): Declare. (dump_cselib_table): Declare. * cfgcleanup.c (flow_find_cross_jump): Skip debug insns. (try_crossjump_to_edge): Likewise. (delete_unreachable_blocks): Remove dominant GIMPLE blocks after dominated blocks when debug stmts are present. * simplify-rtx.c (delegitimize_mem_from_attrs): New. * tree-ssa-live.c (remove_unused_locals): Skip debug stmts. (set_var_live_on_entry): Likewise. * loop-invariant.c (find_invariants_bb): Skip debug insns. * cfglayout.c (curr_location, last_location): Make static. (set_curr_insn_source_location): Don't avoid bouncing. (get_curr_insn_source_location): New. (get_curr_insn_block): New. (duplicate_insn_chain): Handle debug insns. * tree-ssa-forwprop.c (forward_propagate_addr_expr): Propagate into debug stmts. * common.opt (fcompare-debug): Move to sort order. (fdump-unnumbered-links): Likewise. (fvar-tracking-assignments): New. (fvar-tracking-assignments-toggle): New. * tree-ssa-dce.c (mark_stmt_necessary): Don't mark blocks because of debug stmts. (mark_stmt_if_obviously_necessary): Mark debug stmts. (eliminate_unnecessary_stmts): Walk dominated blocks before dominators. * tree-ssa-ter.c (find_replaceable_in_bb): Skip debug stmts. * ira.c (memref_used_between_p): Skip debug insns. (update_equiv_regs): Likewise. * sched-deps.c (sd_lists_size): Accept empty list. (sd_init_insn): Mark debug insns. (sd_finish_insn): Unmark them. (sd_add_dep): Reject non-debug deps on debug insns. (fixup_sched_groups): Give debug insns group treatment. Skip debug insns. (sched_analyze_reg): Don't mark debug insns for sched before call. (sched_analyze_2): Handle debug insns. (sched_analyze_insn): Compute next non-debug insn. Handle debug insns. (deps_analyze_insn): Handle debug insns. (deps_start_bb): Skip debug insns. (init_deps): Initialize last_debug_insn. * tree-ssa.c (target_for_debug_bind): New. (find_released_ssa_name): New. (propagate_var_def_into_debug_stmts): New. (propagate_defs_into_debug_stmts): New. (verify_ssa): Skip debug bind stmts without values. (warn_uninialized_vars): Skip debug stmts. * target-def.h (TARGET_DELEGITIMIZE_ADDRESS): Set default. * rtl.c (rtx_equal_p_cb): Handle VALUEs. (rtx_equal_p): Likewise. * ira-costs.c (scan_one_insn): Skip debug insns. (process_bb_node_for_hard_reg_moves): Likewise. * rtl.h (DEBUG_INSN_P): New. (NONDEBUG_INSN_P): New. (MAY_HAVE_DEBUG_INSNS): New. (INSN_P): Accept debug insns. (RTX_FRAME_RELATED_P): Likewise. (INSN_DELETED_P): Likewise (PAT_VAR_LOCATION_DECL): New. (PAT_VAR_LOCATION_LOC): New. (PAT_VAR_OCATION_STATUS): New. (NOTE_VAR_LOCATION_DECL): Reimplement. (NOTE_VAR_LOCATION_LOC): Likewise. (NOTE_VAR_LOCATION_STATUS): Likewise. (INSN_VAR_LOCATION): New. (INSN_VAR_LOCATION_DECL): New. (INSN_VAR_LOCATION_LOC): New. (INSN_VAR_LOCATION_STATUS): New. (gen_rtx_UNKNOWN_VAR_LOC): New. (VAR_LOC_UNKNOWN_P): New. (NOTE_DURING_CALL_P): New. (SCHED_GROUP_P): Accept debug insns. (emit_debug_insn_before): Declare. (emit_debug_insn_before_noloc): Declare. (emit_debug_insn_beore_setloc): Declare. (emit_debug_insn_after): Declare. (emit_debug_insn_after_noloc): Declare. (emit_debug_insn_after_setloc): Declare. (emit_debug_insn): Declare. (make_debug_insn_raw): Declare. (prev_nondebug_insn): Declare. (next_nondebug_insn): Declare. (delegitimize_mem_from_attrs): Declare. (get_max_insn_count): Declare. (wrap_constant): Declare. (unwrap_constant): Declare. (get_curr_insn_source_location): Declare. (get_curr_insn_block): Declare. * tree-inline.c (insert_debug_decl_map): New. (processing_debug_stmt): New. (remap_decl): Don't create new mappings in debug stmts. (remap_gimple_op_r): Don't add references in debug stmts. (copy_tree_body_r): Likewise. (remap_gimple_stmt): Handle debug bind stmts. (copy_bb): Skip debug stmts. (copy_edges_for_bb): Likewise. (copy_debug_stmt): New. (copy_debug_stmts): New. (copy_body): Copy debug stmts at the end. (insert_init_debug_bind): New. (insert_init_stmt): Take id. Skip and emit debug stmts. (setup_one_parameter): Remap variable earlier, register debug mapping. (estimate_num_insns): Skip debug stmts. (expand_call_inline): Preserve debug_map. (optimize_inline_calls): Check for no debug_stmts left-overs. (unsave_expr_now): Preserve debug_map. (copy_gimple_seq_and_replace_locals): Likewise. (tree_function_versioning): Check for no debug_stmts left-overs. Init and destroy debug_map as needed. Split edges unconditionally. (build_duplicate_type): Init and destroy debug_map as needed. * tree-inline.h: Include gimple.h instead of pointer-set.h. (struct copy_body_data): Add debug_stmts and debug_map. * sched-int.h (struct ready_list): Add n_debug. (struct deps): Add last_debug_insn. (DEBUG_INSN_SCHED_P): New. (BOUNDARY_DEBUG_INSN_P): New. (SCHEDULE_DEBUG_INSN_P): New. (sd_iterator_cond): Accept empty list. * combine.c (create_log_links): Skip debug insns. (combine_instructions): Likewise. (cleanup_auto_inc_dec): New. From Jakub Jelinek: Make sure the return value is always unshared. (struct rtx_subst_pair): New. (auto_adjust_pair): New. (propagate_for_debug_subst): New. (propagate_for_debug): New. (try_combine): Skip debug insns. Propagate removed defs into debug insns. (next_nonnote_nondebug_insn): New. (distribute_notes): Use it. Skip debug insns. (distribute_links): Skip debug insns. * tree-outof-ssa.c (set_location_for_edge): Likewise. * resource.c (mark_target_live_regs): Likewise. * var-tracking.c: Include cselib.h and target.h. (enum micro_operation_type): Add MO_VAL_USE, MO_VAL_LOC, and MO_VAL_SET. (micro_operation_type_name): New. (enum emit_note_where): Add EMIT_NOTE_AFTER_CALL_INSN. (struct micro_operation_def): Update comments. (decl_or_value): New type. Use instead of decls. (struct emit_note_data_def): Add vars. (struct attrs_def): Use decl_or_value. (struct variable_tracking_info_def): Add permp, flooded. (struct location_chain_def): Update comment. (struct variable_part_def): Use decl_or_value. (struct variable_def): Make var_part a variable length array. (valvar_pool): New. (scratch_regs): New. (cselib_hook_called): New. (dv_is_decl_p): New. (dv_is_value_p): New. (dv_as_decl): New. (dv_as_value): New. (dv_as_opaque): New. (dv_onepart_p): New. (dv_pool): New. (IS_DECL_CODE): New. (check_value_is_not_decl): New. (dv_from_decl): New. (dv_from_value): New. (dv_htab_hash): New. (variable_htab_hash): Use it. (variable_htab_eq): Support values. (variable_htab_free): Free from the right pool. (attrs_list_member, attrs_list_insert): Use decl_or_value. (attrs_list_union): Adjust. (attrs_list_mpdv_union): New. (tie_break_pointers): New. (canon_value_cmp): New. (unshare_variable): Return possibly-modified slot. (vars_copy_1): Adjust. (var_reg_decl_set): Adjust. Split out of... (var_reg_set): ... this. (get_init_value): Adjust. (var_reg_delete_and_set): Adjust. (var_reg_delete): Adjust. (var_regno_delete): Adjust. (var_mem_decl_set): Split out of... (var_mem_set): ... this. (var_mem_delete_and_set): Adjust. (var_mem_delete): Adjust. (val_store): New. (val_reset): New. (val_resolve): New. (variable_union): Adjust. Speed up merge of 1-part vars. (variable_canonicalize): Use unshared slot. (VALUED_RECURSED_INTO): New. (find_loc_in_1pdv): New. (struct dfset_merge): New. (insert_into_intersection): New. (intersect_loc_chains): New. (loc_cmp): New. (canonicalize_loc_order_check): New. (canonicalize_values_mark): New. (canonicalize_values_star): New. (variable_merge_over_cur): New. (variable_merge_over_src): New. (dataflow_set_merge): New. (dataflow_set_equiv_regs): New. (remove_duplicate_values): New. (struct dfset_post_merge): New. (variable_post_merge_new_vals): New. (variable_post_merge_perm_vals): New. (dataflow_post_merge_adjust): New. (find_mem_expr_in_1pdv): New. (dataflow_set_preserve_mem_locs): New. (dataflow_set_remove_mem_locs): New. (dataflow_set_clear_at_call): New. (onepart_variable_different_p): New. (variable_different_p): Use it. (dataflow_set_different_1): Adjust. Make detailed dump more verbose. (track_expr_p): Add need_rtl parameter. Don't generate rtl if not needed. (track_loc_p): Pass it true. (struct count_use_info): New. (find_use_val): New. (replace_expr_with_values): New. (log_op_type): New. (use_type): New, partially split out of... (count_uses): ... this. Count new micro-ops. (count_uses_1): Adjust. (count_stores): Adjust. (count_with_sets): New. (VAL_NEEDS_RESOLUTION): New. (VAL_HOLDS_TRACK_EXPR): New. (VAL_EXPR_IS_COPIED): New. (VAL_EXPR_IS_CLOBBERED): New. (add_uses): Adjust. Generate new micro-ops. (add_uses_1): Adjust. (add_stores): Generate new micro-ops. (add_with_sets): New. (find_src_status): Adjust. (find_src_set_src): Adjust. (compute_bb_dataflow): Use dataflow_set_clear_at_call. Handle new micro-ops. Canonicalize value equivalances. (vt_find_locations): Compute total size of hash tables for dumping. Perform merge for var-tracking-assignments. Don't disregard single-block loops. (dump_attrs_list): Handle decl_or_value. (dump_variable): Take variable. Deal with decl_or_value. (dump_variable_slot): New. (dump_vars): Use it. (dump_dataflow_sets): Adjust. (set_slot_part): New, extended to support one-part variables after splitting out of... (set_variable_part): ... this. (clobber_slot_part): New, split out of... (clobber_variable_part): ... this. (delete_slot_part): New, split out of... (delete_variable_part): .... this. (check_wrap_constant): New. (vt_expand_loc_callback): New. (vt_expand_loc): New. (emit_note_insn_var_location): Adjust. Handle values. Handle EMIT_NOTE_AFTER_CALL_INSN. (emit_notes_for_differences_1): Adjust. Handle values. (emit_notes_for_differences_2): Likewise. (emit_notes_for_differences): Adjust. (emit_notes_in_bb): Take pointer to set. Emit AFTER_CALL_INSN notes. Adjust. Handle new micro-ops. (vt_add_function_parameters): Adjust. Create and bind values. (vt_initialize): Adjust. Initialize scratch_regs and valvar_pool, flooded and perm.. Initialize and use cselib. Log operations. Move some code to count_with_sets and add_with_sets. (delete_debug_insns): New. (vt_debug_insns_local): New. (vt_finalize): Release permp, valvar_pool, scratch_regs. Finish cselib. (var_tracking_main): If var-tracking-assignments is enabled but var-tracking isn't, delete debug insns and leave. Likewise if we exceed limits or fail the stack adjustments tests, and after all var-tracking processing. More in var-tracking, from Jakub Jelinek <jakub@redhat.com>: (dataflow_set): Add traversed_vars. (value_chain, const_value_chain): New typedefs. (value_chain_pool, value_chains): New variables. (value_chain_htab_hash, value_chain_htab_eq, add_value_chain, add_value_chains, add_cselib_value_chains, remove_value_chain, remove_value_chains, remove_cselib_value_chains): New functions. (shared_hash_find_slot_unshare_1, shared_hash_find_slot_1, shared_hash_find_slot_noinsert_1, shared_hash_find_1): New static inlines. (shared_hash_find_slot_unshare, shared_hash_find_slot, shared_hash_find_slot_noinsert, shared_hash_find): Update. (dst_can_be_shared): New variable. (unshare_variable): Unshare set->vars if shared, use shared_hash_*. Clear dst_can_be_shared. If set->traversed_vars is non-NULL and different from set->vars, look up slot again instead of using the passed in slot. (dataflow_set_init): Initialize traversed_vars. (variable_union): Use shared_hash_*. Use initially NO_INSERT lookup if set->vars is shared. Don't keep slot cleared before calling unshare_variable. Unshare set->vars if needed. Adjust unshare_variable callers. Clear dst_can_be_shared if needed. Even ->refcount == 1 vars must be unshared if set->vars is shared and var needs to be modified. (dataflow_set_union): Set traversed_vars during canonicalization. (VALUE_CHANGED, DECL_CHANGED): Define. (set_dv_changed, dv_changed_p): New static inlines. (track_expr_p): Clear DECL_CHANGED. (dump_dataflow_sets): Set it. (variable_was_changed): Call set_dv_changed. (emit_note_insn_var_location): Likewise. (changed_variables_stack): New variable. (check_changed_vars_1, check_changed_vars_2): New functions. (emit_notes_for_changes): Do nothing if changed_variables is empty. Traverse changed_variables with check_changed_vars_1, call check_changed_vars_2 on each changed_variables_stack entry. (emit_notes_in_bb): Add SET argument. Just clear it at the beginning, use it instead of local &set, don't destroy it at the end. (vt_emit_notes): Call dataflow_set_clear early on all VTI(bb)->out sets, never use them, instead use emit_notes_in_bb computed set, dataflow_set_clear also VTI(bb)->in when we are done with the basic block. Initialize changed_variables_stack, free it afterwards. If ENABLE_CHECKING verify that after noting differences to an empty set value_chains hash table is empty. (vt_initialize): Initialize value_chains and value_chain_pool. (vt_finalize): Delete value_chains htab, free value_chain_pool. (variable_tracking_main): Call dump_dataflow_sets before calling vt_emit_notes, not after it. * tree-flow.h (propagate_defs_into_debug_stmts): Declare. (propagate_var_def_into_debug_stmts): Declare. * df-problems.c (df_lr_bb_local_compute): Skip debug insns. (df_set_note): Reject debug insns. (df_whole_mw_reg_dead_p): Take added_notes_p argument. Don't add notes to debug insns. (df_note_bb_compute): Adjust. Likewise. (df_simulate_uses): Skip debug insns. (df_simulate_initialize_backwards): Likewise. * reg-stack.c (subst_stack_regs_in_debug_insn): New. (subst_stack_regs_pat): Reject debug insns. (convert_regs_1): Handle debug insns. * Makefile.in (TREE_INLINE_H): Take pointer-set.h from GIMPLE_H. (print-rtl.o): Depend on cselib.h. (cselib.o): Depend on TREE_PASS_H. (var-tracking.o): Depend on cselib.h and TARGET_H. * sched-rgn.c (rgn_estimate_number_of_insns): Discount debug insns. (init_ready_list): Skip boundary debug insns. (add_branch_dependences): Skip debug insns. (free_block_dependencies): Check for blocks with only debug insns. (compute_priorities): Likewise. * gimple.c (gss_for_code): Handle GIMPLE_DEBUG. (gimple_build_with_ops_stat): Take subcode as unsigned. Adjust all callers. (gimple_build_debug_bind_stat): New. (empty_body_p): Skip debug stmts. (gimple_has_side_effects): Likewise. (gimple_rhs_has_side_effects): Likewise. * gimple.h (enum gimple_debug_subcode, GIMPLE_DEBUG_BIND): New. (gimple_build_debug_bind_stat): Declare. (gimple_build_debug_bind): Define. (is_gimple_debug): New. (gimple_debug_bind_p): New. (gimple_debug_bind_get_var): New. (gimple_debug_bind_get_value): New. (gimple_debug_bind_get_value_ptr): New. (gimple_debug_bind_set_var): New. (gimple_debug_bind_set_value): New. (GIMPLE_DEBUG_BIND_NOVALUE): New internal temporary macro. (gimple_debug_bind_reset_value): New. (gimple_debug_bind_has_value_p): New. (gsi_next_nondebug): New. (gsi_prev_nondebug): New. (gsi_start_nondebug_bb): New. (gsi_last_nondebug_bb): New. * sched-vis.c (print_pattern): Handle VAR_LOCATION. (print_insn): Handle DEBUG_INSN. * tree-cfg.c (remove_bb): Walk stmts backwards. Let loc of first insn prevail. (first_stmt): Skip debug stmts. (first_non_label_stmt): Likewise. (last_stmt): Likewise. (has_zero_uses_1): New. (single_imm_use_1): New. (verify_gimple_debug): New. (verify_types_in_gimple_stmt): Handle debug stmts. (verify_stmt): Likewise. (debug_loop_num): Skip debug stmts. (remove_edge_and_dominated_blocks): Remove dominators last. * tree-ssa-reasssoc.c (rewrite_expr_tree): Propagate into debug stmts. (linearize_expr): Likewise. * config/i386/i386.c (ix86_delegitimize_address): Call default implementation. * config/ia64/ia64.c (ia64_safe_itanium_class): Handle debug insns. (group_barrier_needed): Skip debug insns. (emit_insn_group_barriers): Likewise. (emit_all_insn_group_barriers): Likewise. (ia64_variable_issue): Handle debug insns. (ia64_dfa_new_cycle): Likewise. (final_emit_insn_group_barriers): Skip debug insns. (ia64_dwarf2out_def_steady_cfa): Take frame argument. Don't def cfa without frame. (process_set): Likewise. (process_for_unwind_directive): Pass frame on. * config/rs6000/rs6000.c (TARGET_DELEGITIMIZE_ADDRESS): Define. (rs6000_delegitimize_address): New. (rs6000_debug_adjust_cost): Handle debug insns. (is_microcoded_insn): Likewise. (is_cracked_insn): Likewise. (is_nonpipeline_insn): Likewise. (insn_must_be_first_in_group): Likewise. (insn_must_be_last_in_group): Likewise. (force_new_group): Likewise. * cfgrtl.c (rtl_split_block): Emit INSN_DELETED note if block contains only debug insns. (rtl_merge_blocks): Skip debug insns. (purge_dead_edges): Likewise. (rtl_block_ends_with_call_p): Skip debug insns. * dce.c (deletable_insn_p): Handle VAR_LOCATION. (mark_reg_dependencies): Skip debug insns. * params.def (PARAM_MIN_NONDEBUG_INSN_UID): New. * tree-ssanames.c (release_ssa_name): Propagate def into debug stmts. * tree-ssa-threadedge.c (record_temporary_equivalences_from_stmts): Skip debug stmts. * regcprop.c (replace_oldest_value_addr): Skip debug insns. (replace_oldest_value_mem): Use ALL_REGS for debug insns. (copyprop_hardreg_forward_1): Handle debug insns. * reload1.c (reload): Skip debug insns. Replace unassigned pseudos in debug insns with their equivalences. (eliminate_regs_in_insn): Skip debug insns. (emit_input_reload_insns): Skip debug insns at first, adjust them later. * tree-ssa-operands.c (add_virtual_operand): Reject debug stmts. (get_indirect_ref_operands): Pass opf_no_vops on. (get_expr_operands): Likewise. Skip debug stmts. (parse_ssa_operands): Scan debug insns with opf_no_vops. gcc/testsuite/ChangeLog: * gcc.dg/guality/guality.c: New. * gcc.dg/guality/guality.h: New. * gcc.dg/guality/guality.exp: New. * gcc.dg/guality/example.c: New. * lib/gcc-dg.exp (cleanup-dump): Remove .gk files. (cleanup-saved-temps): Likewise, .gkd files too. gcc/cp/ChangeLog: * cp-tree.h (TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS): New. * cp-lang.c (cxx_dwarf_name): Pass it. * error.c (count_non_default_template_args): Take flags as argument. Adjust all callers. Skip counting of default arguments if the new flag is given. ChangeLog: * Makefile.tpl (BUILD_CONFIG): Default to bootstrap-debug. * Makefile.in: Rebuilt. contrib/ChangeLog: * compare-debug: Look for .gkd files and compare them. config/ChangeLog: * bootstrap-debug.mk: Add comments. * bootstrap-debug-big.mk: New. * bootstrap-debug-lean.mk: New. * bootstrap-debug-ckovw.mk: Add comments. * bootstrap-debug-lib.mk: Drop CFLAGS for stages. Use -g0 for TFLAGS in stage1. Drop -fvar-tracking-assignments-toggle. From-SVN: r151312
2009-09-02 04:42:21 +02:00
if (prev == 0
|| !NONJUMP_INSN_P (prev)
|| FIND_REG_INC_NOTE (prev, NULL_RTX)
/* In cfglayout mode, there do not have to be labels at the
beginning of a block, or jumps at the end, so the previous
conditions would not stop us when we reach bb boundary. */
|| BLOCK_FOR_INSN (prev) != bb)
break;
set = set_of (op0, prev);
if (set
&& (GET_CODE (set) != SET
|| !rtx_equal_p (SET_DEST (set), op0)))
break;
/* If this is setting OP0, get what it sets it to if it looks
relevant. */
if (set)
{
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 13:02:45 +01:00
machine_mode inner_mode = GET_MODE (SET_DEST (set));
#ifdef FLOAT_STORE_FLAG_VALUE
REAL_VALUE_TYPE fsfv;
#endif
/* ??? We may not combine comparisons done in a CCmode with
comparisons not done in a CCmode. This is to aid targets
like Alpha that have an IEEE compliant EQ instruction, and
a non-IEEE compliant BEQ instruction. The use of CCmode is
actually artificial, simply to prevent the combination, but
should not affect other platforms.
However, we must allow VOIDmode comparisons to match either
CCmode or non-CCmode comparison, because some ports have
modeless comparisons inside branch patterns.
??? This mode check should perhaps look more like the mode check
in simplify_comparison in combine. */
if (((GET_MODE_CLASS (mode) == MODE_CC)
!= (GET_MODE_CLASS (inner_mode) == MODE_CC))
&& mode != VOIDmode
&& inner_mode != VOIDmode)
break;
if (GET_CODE (SET_SRC (set)) == COMPARE
|| (((code == NE
|| (code == LT
&& val_signbit_known_set_p (inner_mode,
STORE_FLAG_VALUE))
#ifdef FLOAT_STORE_FLAG_VALUE
|| (code == LT
&& SCALAR_FLOAT_MODE_P (inner_mode)
&& (fsfv = FLOAT_STORE_FLAG_VALUE (inner_mode),
REAL_VALUE_NEGATIVE (fsfv)))
#endif
))
&& COMPARISON_P (SET_SRC (set))))
x = SET_SRC (set);
else if (((code == EQ
|| (code == GE
&& val_signbit_known_set_p (inner_mode,
STORE_FLAG_VALUE))
#ifdef FLOAT_STORE_FLAG_VALUE
|| (code == GE
&& SCALAR_FLOAT_MODE_P (inner_mode)
&& (fsfv = FLOAT_STORE_FLAG_VALUE (inner_mode),
REAL_VALUE_NEGATIVE (fsfv)))
#endif
))
&& COMPARISON_P (SET_SRC (set)))
{
reverse_code = 1;
x = SET_SRC (set);
}
else if ((code == EQ || code == NE)
&& GET_CODE (SET_SRC (set)) == XOR)
/* Handle sequences like:
(set op0 (xor X Y))
...(eq|ne op0 (const_int 0))...
in which case:
(eq op0 (const_int 0)) reduces to (eq X Y)
(ne op0 (const_int 0)) reduces to (ne X Y)
This is the form used by MIPS16, for example. */
x = SET_SRC (set);
else
break;
}
else if (reg_set_p (op0, prev))
/* If this sets OP0, but not directly, we have to give up. */
break;
if (x)
{
/* If the caller is expecting the condition to be valid at INSN,
make sure X doesn't change before INSN. */
if (valid_at_insn_p)
if (modified_in_p (x, prev) || modified_between_p (x, prev, insn))
break;
if (COMPARISON_P (x))
code = GET_CODE (x);
if (reverse_code)
{
code = reversed_comparison_code (x, prev);
if (code == UNKNOWN)
return 0;
reverse_code = 0;
}
op0 = XEXP (x, 0), op1 = XEXP (x, 1);
if (earliest)
*earliest = prev;
}
}
/* If constant is first, put it last. */
if (CONSTANT_P (op0))
code = swap_condition (code), tem = op0, op0 = op1, op1 = tem;
/* If OP0 is the result of a comparison, we weren't able to find what
was really being compared, so fail. */
if (!allow_cc_mode
&& GET_MODE_CLASS (GET_MODE (op0)) == MODE_CC)
return 0;
/* Canonicalize any ordered comparison with integers involving equality
if we can do computations in the relevant mode and we do not
overflow. */
if (GET_MODE_CLASS (GET_MODE (op0)) != MODE_CC
&& CONST_INT_P (op1)
&& GET_MODE (op0) != VOIDmode
&& GET_MODE_PRECISION (GET_MODE (op0)) <= HOST_BITS_PER_WIDE_INT)
{
HOST_WIDE_INT const_val = INTVAL (op1);
unsigned HOST_WIDE_INT uconst_val = const_val;
unsigned HOST_WIDE_INT max_val
= (unsigned HOST_WIDE_INT) GET_MODE_MASK (GET_MODE (op0));
switch (code)
{
case LE:
if ((unsigned HOST_WIDE_INT) const_val != max_val >> 1)
code = LT, op1 = gen_int_mode (const_val + 1, GET_MODE (op0));
break;
/* When cross-compiling, const_val might be sign-extended from
BITS_PER_WORD to HOST_BITS_PER_WIDE_INT */
case GE:
if ((const_val & max_val)
!= ((unsigned HOST_WIDE_INT) 1
<< (GET_MODE_PRECISION (GET_MODE (op0)) - 1)))
code = GT, op1 = gen_int_mode (const_val - 1, GET_MODE (op0));
break;
case LEU:
if (uconst_val < max_val)
code = LTU, op1 = gen_int_mode (uconst_val + 1, GET_MODE (op0));
break;
case GEU:
if (uconst_val != 0)
code = GTU, op1 = gen_int_mode (uconst_val - 1, GET_MODE (op0));
break;
default:
break;
}
}
/* Never return CC0; return zero instead. */
if (CC0_P (op0))
return 0;
return gen_rtx_fmt_ee (code, VOIDmode, op0, op1);
}
/* Given a jump insn JUMP, return the condition that will cause it to branch
to its JUMP_LABEL. If the condition cannot be understood, or is an
inequality floating-point comparison which needs to be reversed, 0 will
be returned.
If EARLIEST is nonzero, it is a pointer to a place where the earliest
insn used in locating the condition was found. If a replacement test
of the condition is desired, it should be placed in front of that
insn and we will be sure that the inputs are still valid. If EARLIEST
is null, the returned condition will be valid at INSN.
If ALLOW_CC_MODE is nonzero, allow the condition returned to be a
compare CC mode register.
VALID_AT_INSN_P is the same as for canonicalize_condition. */
rtx
Various condition-handling calls gcc/ 2014-08-26 David Malcolm <dmalcolm@redhat.com> * rtl.h (canonicalize_condition): Strengthen param 1 from rtx to rtx_insn * and param 4 from rtx * to rtx_insn **. (get_condition): Strengthen param 1 from rtx to rtx_insn * and param 2 from rtx * to rtx_insn **. * df.h (can_move_insns_across): Strengthen params 1-4 from rtx to rtx_insn * and final param from rtx * to rtx_insn **. * cfgcleanup.c (try_head_merge_bb): Strengthen local "move_before" from rtx to rtx_insn *. (try_head_merge_bb): Likewise for both locals named "move_upto". * df-problems.c (can_move_insns_across): Likewise for params "from", "to", "across_from", "across_to" and locals "insn", "next", "max_to". Strengthen param "pmove_upto" from rtx * to rtx_insn **. * ifcvt.c (struct noce_if_info): Strengthen field "cond_earliest" from rtx to rtx_insn *. (noce_get_alt_condition): Strengthen param "earliest" from rtx * to rtx_insn **. Strengthen local "insn" from rtx to rtx_insn *. (noce_try_minmax): Strengthen locals "earliest", "seq" from rtx to rtx_insn *. (noce_try_abs): Likewise. (noce_get_condition): Likewise for param "jump". Strengthen param "earliest" from rtx * to rtx_insn **. (noce_find_if_block): Strengthen local "cond_earliest" from rtx to rtx_insn *. (find_cond_trap): Likewise. (dead_or_predicable): Likewise for local "earliest". * loop-iv.c (check_simple_exit): Likewise for local "at". Add checked cast. * rtlanal.c (canonicalize_condition): Likewise for param "insn" and local "prev". Strengthen param "earliest" from rtx * to rtx_insn **. (get_condition): Strengthen param "jump" from rtx to rtx_insn * Strengthen param "earliest" from rtx * to rtx_insn **. From-SVN: r214542
2014-08-26 21:38:42 +02:00
get_condition (rtx_insn *jump, rtx_insn **earliest, int allow_cc_mode,
int valid_at_insn_p)
{
rtx cond;
int reverse;
rtx set;
/* If this is not a standard conditional jump, we can't parse it. */
if (!JUMP_P (jump)
|| ! any_condjump_p (jump))
return 0;
set = pc_set (jump);
cond = XEXP (SET_SRC (set), 0);
/* If this branches to JUMP_LABEL when the condition is false, reverse
the condition. */
reverse
= GET_CODE (XEXP (SET_SRC (set), 2)) == LABEL_REF
Introduce LABEL_REF_LABEL gcc/ChangeLog: 2014-09-11 David Malcolm <dmalcolm@redhat.com> * rtl.h (LABEL_REF_LABEL): New macro. * alias.c (rtx_equal_for_memref_p): Use LABEL_REF_LABEL in place of XEXP (, 0), where we know that we have a LABEL_REF. * cfgbuild.c (make_edges): Likewise. (purge_dead_tablejump_edges): Likewise. * cfgexpand.c (convert_debug_memory_address): Likewise. * cfgrtl.c (patch_jump_insn): Likewise. * combine.c (distribute_notes): Likewise. * cse.c (hash_rtx_cb): Likewise. (exp_equiv_p): Likewise. (fold_rtx): Likewise. (check_for_label_ref): Likewise. * cselib.c (rtx_equal_for_cselib_1): Likewise. (cselib_hash_rtx): Likewise. * emit-rtl.c (mark_label_nuses): Likewise. * explow.c (convert_memory_address_addr_space): Likewise. * final.c (output_asm_label): Likewise. (output_addr_const): Likewise. * gcse.c (add_label_notes): Likewise. * genconfig.c (walk_insn_part): Likewise. * genrecog.c (validate_pattern): Likewise. * ifcvt.c (cond_exec_get_condition): Likewise. (noce_emit_store_flag): Likewise. (noce_get_alt_condition): Likewise. (noce_get_condition): Likewise. * jump.c (maybe_propagate_label_ref): Likewise. (mark_jump_label_1): Likewise. (redirect_exp_1): Likewise. (rtx_renumbered_equal_p): Likewise. * lra-constraints.c (operands_match_p): Likewise. * reload.c (operands_match_p): Likewise. (find_reloads): Likewise. * reload1.c (set_label_offsets): Likewise. * reorg.c (get_branch_condition): Likewise. * rtl.c (rtx_equal_p_cb): Likewise. (rtx_equal_p): Likewise. * rtlanal.c (reg_mentioned_p): Likewise. (rtx_referenced_p): Likewise. (get_condition): Likewise. * sched-vis.c (print_value): Likewise. * varasm.c (const_hash_1): Likewise. (compare_constant): Likewise. (const_rtx_hash_1): Likewise. (output_constant_pool_1): Likewise. From-SVN: r215190
2014-09-11 22:47:39 +02:00
&& LABEL_REF_LABEL (XEXP (SET_SRC (set), 2)) == JUMP_LABEL (jump);
return canonicalize_condition (jump, cond, reverse, earliest, NULL_RTX,
allow_cc_mode, valid_at_insn_p);
}
/* Initialize the table NUM_SIGN_BIT_COPIES_IN_REP based on
TARGET_MODE_REP_EXTENDED.
Note that we assume that the property of
TARGET_MODE_REP_EXTENDED(B, C) is sticky to the integral modes
narrower than mode B. I.e., if A is a mode narrower than B then in
order to be able to operate on it in mode B, mode A needs to
satisfy the requirements set by the representation of mode B. */
static void
init_num_sign_bit_copies_in_rep (void)
{
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 13:02:45 +01:00
machine_mode mode, in_mode;
for (in_mode = GET_CLASS_NARROWEST_MODE (MODE_INT); in_mode != VOIDmode;
in_mode = GET_MODE_WIDER_MODE (mode))
for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT); mode != in_mode;
mode = GET_MODE_WIDER_MODE (mode))
{
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 13:02:45 +01:00
machine_mode i;
/* Currently, it is assumed that TARGET_MODE_REP_EXTENDED
extends to the next widest mode. */
gcc_assert (targetm.mode_rep_extended (mode, in_mode) == UNKNOWN
|| GET_MODE_WIDER_MODE (mode) == in_mode);
/* We are in in_mode. Count how many bits outside of mode
have to be copies of the sign-bit. */
for (i = mode; i != in_mode; i = GET_MODE_WIDER_MODE (i))
{
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 13:02:45 +01:00
machine_mode wider = GET_MODE_WIDER_MODE (i);
if (targetm.mode_rep_extended (i, wider) == SIGN_EXTEND
/* We can only check sign-bit copies starting from the
top-bit. In order to be able to check the bits we
have already seen we pretend that subsequent bits
have to be sign-bit copies too. */
|| num_sign_bit_copies_in_rep [in_mode][mode])
num_sign_bit_copies_in_rep [in_mode][mode]
+= GET_MODE_PRECISION (wider) - GET_MODE_PRECISION (i);
}
}
}
/* Suppose that truncation from the machine mode of X to MODE is not a
no-op. See if there is anything special about X so that we can
assume it already contains a truncated value of MODE. */
bool
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 13:02:45 +01:00
truncated_to_mode (machine_mode mode, const_rtx x)
{
/* This register has already been used in MODE without explicit
truncation. */
if (REG_P (x) && rtl_hooks.reg_truncated_to_mode (mode, x))
return true;
/* See if we already satisfy the requirements of MODE. If yes we
can just switch to MODE. */
if (num_sign_bit_copies_in_rep[GET_MODE (x)][mode]
&& (num_sign_bit_copies (x, GET_MODE (x))
>= num_sign_bit_copies_in_rep[GET_MODE (x)][mode] + 1))
return true;
return false;
}
/* Return true if RTX code CODE has a single sequence of zero or more
"e" operands and no rtvec operands. Initialize its rtx_all_subrtx_bounds
entry in that case. */
static bool
setup_reg_subrtx_bounds (unsigned int code)
{
const char *format = GET_RTX_FORMAT ((enum rtx_code) code);
unsigned int i = 0;
for (; format[i] != 'e'; ++i)
{
if (!format[i])
/* No subrtxes. Leave start and count as 0. */
return true;
if (format[i] == 'E' || format[i] == 'V')
return false;
}
/* Record the sequence of 'e's. */
rtx_all_subrtx_bounds[code].start = i;
do
++i;
while (format[i] == 'e');
rtx_all_subrtx_bounds[code].count = i - rtx_all_subrtx_bounds[code].start;
/* rtl-iter.h relies on this. */
gcc_checking_assert (rtx_all_subrtx_bounds[code].count <= 3);
for (; format[i]; ++i)
if (format[i] == 'E' || format[i] == 'V' || format[i] == 'e')
return false;
return true;
}
/* Initialize rtx_all_subrtx_bounds. */
void
init_rtlanal (void)
{
int i;
for (i = 0; i < NUM_RTX_CODE; i++)
{
if (!setup_reg_subrtx_bounds (i))
rtx_all_subrtx_bounds[i].count = UCHAR_MAX;
if (GET_RTX_CLASS (i) != RTX_CONST_OBJ)
rtx_nonconst_subrtx_bounds[i] = rtx_all_subrtx_bounds[i];
}
init_num_sign_bit_copies_in_rep ();
}
/* Check whether this is a constant pool constant. */
bool
constant_pool_constant_p (rtx x)
{
x = avoid_constant_pool_reference (x);
return CONST_DOUBLE_P (x);
}
/* If M is a bitmask that selects a field of low-order bits within an item but
not the entire word, return the length of the field. Return -1 otherwise.
M is used in machine mode MODE. */
int
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 13:02:45 +01:00
low_bitmask_len (machine_mode mode, unsigned HOST_WIDE_INT m)
{
if (mode != VOIDmode)
{
if (GET_MODE_PRECISION (mode) > HOST_BITS_PER_WIDE_INT)
return -1;
m &= GET_MODE_MASK (mode);
}
return exact_log2 (m + 1);
}
/* Return the mode of MEM's address. */
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 13:02:45 +01:00
machine_mode
get_address_mode (rtx mem)
{
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 13:02:45 +01:00
machine_mode mode;
gcc_assert (MEM_P (mem));
mode = GET_MODE (XEXP (mem, 0));
if (mode != VOIDmode)
return mode;
return targetm.addr_space.address_mode (MEM_ADDR_SPACE (mem));
}
/* Split up a CONST_DOUBLE or integer constant rtx
into two rtx's for single words,
storing in *FIRST the word that comes first in memory in the target
2014-05-06 18:25:05 +02:00
and in *SECOND the other.
TODO: This function needs to be rewritten to work on any size
integer. */
void
split_double (rtx value, rtx *first, rtx *second)
{
if (CONST_INT_P (value))
{
if (HOST_BITS_PER_WIDE_INT >= (2 * BITS_PER_WORD))
{
/* In this case the CONST_INT holds both target words.
Extract the bits from it into two word-sized pieces.
Sign extend each half to HOST_WIDE_INT. */
unsigned HOST_WIDE_INT low, high;
unsigned HOST_WIDE_INT mask, sign_bit, sign_extend;
unsigned bits_per_word = BITS_PER_WORD;
/* Set sign_bit to the most significant bit of a word. */
sign_bit = 1;
sign_bit <<= bits_per_word - 1;
/* Set mask so that all bits of the word are set. We could
have used 1 << BITS_PER_WORD instead of basing the
calculation on sign_bit. However, on machines where
HOST_BITS_PER_WIDE_INT == BITS_PER_WORD, it could cause a
compiler warning, even though the code would never be
executed. */
mask = sign_bit << 1;
mask--;
/* Set sign_extend as any remaining bits. */
sign_extend = ~mask;
/* Pick the lower word and sign-extend it. */
low = INTVAL (value);
low &= mask;
if (low & sign_bit)
low |= sign_extend;
/* Pick the higher word, shifted to the least significant
bits, and sign-extend it. */
high = INTVAL (value);
high >>= bits_per_word - 1;
high >>= 1;
high &= mask;
if (high & sign_bit)
high |= sign_extend;
/* Store the words in the target machine order. */
if (WORDS_BIG_ENDIAN)
{
*first = GEN_INT (high);
*second = GEN_INT (low);
}
else
{
*first = GEN_INT (low);
*second = GEN_INT (high);
}
}
else
{
/* The rule for using CONST_INT for a wider mode
is that we regard the value as signed.
So sign-extend it. */
rtx high = (INTVAL (value) < 0 ? constm1_rtx : const0_rtx);
if (WORDS_BIG_ENDIAN)
{
*first = high;
*second = value;
}
else
{
*first = value;
*second = high;
}
}
}
2014-05-06 18:25:05 +02:00
else if (GET_CODE (value) == CONST_WIDE_INT)
{
/* All of this is scary code and needs to be converted to
properly work with any size integer. */
gcc_assert (CONST_WIDE_INT_NUNITS (value) == 2);
if (WORDS_BIG_ENDIAN)
{
*first = GEN_INT (CONST_WIDE_INT_ELT (value, 1));
*second = GEN_INT (CONST_WIDE_INT_ELT (value, 0));
}
else
{
*first = GEN_INT (CONST_WIDE_INT_ELT (value, 0));
*second = GEN_INT (CONST_WIDE_INT_ELT (value, 1));
}
}
else if (!CONST_DOUBLE_P (value))
{
if (WORDS_BIG_ENDIAN)
{
*first = const0_rtx;
*second = value;
}
else
{
*first = value;
*second = const0_rtx;
}
}
else if (GET_MODE (value) == VOIDmode
/* This is the old way we did CONST_DOUBLE integers. */
|| GET_MODE_CLASS (GET_MODE (value)) == MODE_INT)
{
/* In an integer, the words are defined as most and least significant.
So order them by the target's convention. */
if (WORDS_BIG_ENDIAN)
{
*first = GEN_INT (CONST_DOUBLE_HIGH (value));
*second = GEN_INT (CONST_DOUBLE_LOW (value));
}
else
{
*first = GEN_INT (CONST_DOUBLE_LOW (value));
*second = GEN_INT (CONST_DOUBLE_HIGH (value));
}
}
else
{
REAL_VALUE_TYPE r;
long l[2];
REAL_VALUE_FROM_CONST_DOUBLE (r, value);
/* Note, this converts the REAL_VALUE_TYPE to the target's
format, splits up the floating point double and outputs
exactly 32 bits of it into each of l[0] and l[1] --
not necessarily BITS_PER_WORD bits. */
REAL_VALUE_TO_TARGET_DOUBLE (r, l);
/* If 32 bits is an entire word for the target, but not for the host,
then sign-extend on the host so that the number will look the same
way on the host that it would on the target. See for instance
simplify_unary_operation. The #if is needed to avoid compiler
warnings. */
#if HOST_BITS_PER_LONG > 32
if (BITS_PER_WORD < HOST_BITS_PER_LONG && BITS_PER_WORD == 32)
{
if (l[0] & ((long) 1 << 31))
l[0] |= ((long) (-1) << 32);
if (l[1] & ((long) 1 << 31))
l[1] |= ((long) (-1) << 32);
}
#endif
*first = GEN_INT (l[0]);
*second = GEN_INT (l[1]);
}
}
/* Return true if X is a sign_extract or zero_extract from the least
significant bit. */
static bool
lsb_bitfield_op_p (rtx x)
{
if (GET_RTX_CLASS (GET_CODE (x)) == RTX_BITFIELD_OPS)
{
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 13:02:45 +01:00
machine_mode mode = GET_MODE (XEXP (x, 0));
HOST_WIDE_INT len = INTVAL (XEXP (x, 1));
HOST_WIDE_INT pos = INTVAL (XEXP (x, 2));
return (pos == (BITS_BIG_ENDIAN ? GET_MODE_PRECISION (mode) - len : 0));
}
return false;
}
/* Strip outer address "mutations" from LOC and return a pointer to the
inner value. If OUTER_CODE is nonnull, store the code of the innermost
stripped expression there.
"Mutations" either convert between modes or apply some kind of
extension, truncation or alignment. */
rtx *
strip_address_mutations (rtx *loc, enum rtx_code *outer_code)
{
for (;;)
{
enum rtx_code code = GET_CODE (*loc);
if (GET_RTX_CLASS (code) == RTX_UNARY)
/* Things like SIGN_EXTEND, ZERO_EXTEND and TRUNCATE can be
used to convert between pointer sizes. */
loc = &XEXP (*loc, 0);
else if (lsb_bitfield_op_p (*loc))
/* A [SIGN|ZERO]_EXTRACT from the least significant bit effectively
acts as a combined truncation and extension. */
loc = &XEXP (*loc, 0);
else if (code == AND && CONST_INT_P (XEXP (*loc, 1)))
/* (and ... (const_int -X)) is used to align to X bytes. */
loc = &XEXP (*loc, 0);
else if (code == SUBREG
&& !OBJECT_P (SUBREG_REG (*loc))
&& subreg_lowpart_p (*loc))
/* (subreg (operator ...) ...) inside and is used for mode
conversion too. */
loc = &SUBREG_REG (*loc);
else
return loc;
if (outer_code)
*outer_code = code;
}
}
/* Return true if CODE applies some kind of scale. The scaled value is
is the first operand and the scale is the second. */
static bool
binary_scale_code_p (enum rtx_code code)
{
return (code == MULT
|| code == ASHIFT
/* Needed by ARM targets. */
|| code == ASHIFTRT
|| code == LSHIFTRT
|| code == ROTATE
|| code == ROTATERT);
}
/* If *INNER can be interpreted as a base, return a pointer to the inner term
(see address_info). Return null otherwise. */
static rtx *
get_base_term (rtx *inner)
{
if (GET_CODE (*inner) == LO_SUM)
inner = strip_address_mutations (&XEXP (*inner, 0));
if (REG_P (*inner)
|| MEM_P (*inner)
|| GET_CODE (*inner) == SUBREG
|| GET_CODE (*inner) == SCRATCH)
return inner;
return 0;
}
/* If *INNER can be interpreted as an index, return a pointer to the inner term
(see address_info). Return null otherwise. */
static rtx *
get_index_term (rtx *inner)
{
/* At present, only constant scales are allowed. */
if (binary_scale_code_p (GET_CODE (*inner)) && CONSTANT_P (XEXP (*inner, 1)))
inner = strip_address_mutations (&XEXP (*inner, 0));
if (REG_P (*inner)
|| MEM_P (*inner)
|| GET_CODE (*inner) == SUBREG
|| GET_CODE (*inner) == SCRATCH)
return inner;
return 0;
}
/* Set the segment part of address INFO to LOC, given that INNER is the
unmutated value. */
static void
set_address_segment (struct address_info *info, rtx *loc, rtx *inner)
{
gcc_assert (!info->segment);
info->segment = loc;
info->segment_term = inner;
}
/* Set the base part of address INFO to LOC, given that INNER is the
unmutated value. */
static void
set_address_base (struct address_info *info, rtx *loc, rtx *inner)
{
gcc_assert (!info->base);
info->base = loc;
info->base_term = inner;
}
/* Set the index part of address INFO to LOC, given that INNER is the
unmutated value. */
static void
set_address_index (struct address_info *info, rtx *loc, rtx *inner)
{
gcc_assert (!info->index);
info->index = loc;
info->index_term = inner;
}
/* Set the displacement part of address INFO to LOC, given that INNER
is the constant term. */
static void
set_address_disp (struct address_info *info, rtx *loc, rtx *inner)
{
gcc_assert (!info->disp);
info->disp = loc;
info->disp_term = inner;
}
/* INFO->INNER describes a {PRE,POST}_{INC,DEC} address. Set up the
rest of INFO accordingly. */
static void
decompose_incdec_address (struct address_info *info)
{
info->autoinc_p = true;
rtx *base = &XEXP (*info->inner, 0);
set_address_base (info, base, base);
gcc_checking_assert (info->base == info->base_term);
/* These addresses are only valid when the size of the addressed
value is known. */
gcc_checking_assert (info->mode != VOIDmode);
}
/* INFO->INNER describes a {PRE,POST}_MODIFY address. Set up the rest
of INFO accordingly. */
static void
decompose_automod_address (struct address_info *info)
{
info->autoinc_p = true;
rtx *base = &XEXP (*info->inner, 0);
set_address_base (info, base, base);
gcc_checking_assert (info->base == info->base_term);
rtx plus = XEXP (*info->inner, 1);
gcc_assert (GET_CODE (plus) == PLUS);
info->base_term2 = &XEXP (plus, 0);
gcc_checking_assert (rtx_equal_p (*info->base_term, *info->base_term2));
rtx *step = &XEXP (plus, 1);
rtx *inner_step = strip_address_mutations (step);
if (CONSTANT_P (*inner_step))
set_address_disp (info, step, inner_step);
else
set_address_index (info, step, inner_step);
}
/* Treat *LOC as a tree of PLUS operands and store pointers to the summed
values in [PTR, END). Return a pointer to the end of the used array. */
static rtx **
extract_plus_operands (rtx *loc, rtx **ptr, rtx **end)
{
rtx x = *loc;
if (GET_CODE (x) == PLUS)
{
ptr = extract_plus_operands (&XEXP (x, 0), ptr, end);
ptr = extract_plus_operands (&XEXP (x, 1), ptr, end);
}
else
{
gcc_assert (ptr != end);
*ptr++ = loc;
}
return ptr;
}
/* Evaluate the likelihood of X being a base or index value, returning
positive if it is likely to be a base, negative if it is likely to be
an index, and 0 if we can't tell. Make the magnitude of the return
value reflect the amount of confidence we have in the answer.
MODE, AS, OUTER_CODE and INDEX_CODE are as for ok_for_base_p_1. */
static int
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 13:02:45 +01:00
baseness (rtx x, machine_mode mode, addr_space_t as,
enum rtx_code outer_code, enum rtx_code index_code)
{
/* Believe *_POINTER unless the address shape requires otherwise. */
if (REG_P (x) && REG_POINTER (x))
return 2;
if (MEM_P (x) && MEM_POINTER (x))
return 2;
if (REG_P (x) && HARD_REGISTER_P (x))
{
/* X is a hard register. If it only fits one of the base
or index classes, choose that interpretation. */
int regno = REGNO (x);
bool base_p = ok_for_base_p_1 (regno, mode, as, outer_code, index_code);
bool index_p = REGNO_OK_FOR_INDEX_P (regno);
if (base_p != index_p)
return base_p ? 1 : -1;
}
return 0;
}
/* INFO->INNER describes a normal, non-automodified address.
Fill in the rest of INFO accordingly. */
static void
decompose_normal_address (struct address_info *info)
{
/* Treat the address as the sum of up to four values. */
rtx *ops[4];
size_t n_ops = extract_plus_operands (info->inner, ops,
ops + ARRAY_SIZE (ops)) - ops;
/* If there is more than one component, any base component is in a PLUS. */
if (n_ops > 1)
info->base_outer_code = PLUS;
/* Try to classify each sum operand now. Leave those that could be
either a base or an index in OPS. */
rtx *inner_ops[4];
size_t out = 0;
for (size_t in = 0; in < n_ops; ++in)
{
rtx *loc = ops[in];
rtx *inner = strip_address_mutations (loc);
if (CONSTANT_P (*inner))
set_address_disp (info, loc, inner);
else if (GET_CODE (*inner) == UNSPEC)
set_address_segment (info, loc, inner);
else
{
/* The only other possibilities are a base or an index. */
rtx *base_term = get_base_term (inner);
rtx *index_term = get_index_term (inner);
gcc_assert (base_term || index_term);
if (!base_term)
set_address_index (info, loc, index_term);
else if (!index_term)
set_address_base (info, loc, base_term);
else
{
gcc_assert (base_term == index_term);
ops[out] = loc;
inner_ops[out] = base_term;
++out;
}
}
}
/* Classify the remaining OPS members as bases and indexes. */
if (out == 1)
{
/* If we haven't seen a base or an index yet, assume that this is
the base. If we were confident that another term was the base
or index, treat the remaining operand as the other kind. */
if (!info->base)
set_address_base (info, ops[0], inner_ops[0]);
else
set_address_index (info, ops[0], inner_ops[0]);
}
else if (out == 2)
{
/* In the event of a tie, assume the base comes first. */
if (baseness (*inner_ops[0], info->mode, info->as, PLUS,
GET_CODE (*ops[1]))
>= baseness (*inner_ops[1], info->mode, info->as, PLUS,
GET_CODE (*ops[0])))
{
set_address_base (info, ops[0], inner_ops[0]);
set_address_index (info, ops[1], inner_ops[1]);
}
else
{
set_address_base (info, ops[1], inner_ops[1]);
set_address_index (info, ops[0], inner_ops[0]);
}
}
else
gcc_assert (out == 0);
}
/* Describe address *LOC in *INFO. MODE is the mode of the addressed value,
or VOIDmode if not known. AS is the address space associated with LOC.
OUTER_CODE is MEM if *LOC is a MEM address and ADDRESS otherwise. */
void
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 13:02:45 +01:00
decompose_address (struct address_info *info, rtx *loc, machine_mode mode,
addr_space_t as, enum rtx_code outer_code)
{
memset (info, 0, sizeof (*info));
info->mode = mode;
info->as = as;
info->addr_outer_code = outer_code;
info->outer = loc;
info->inner = strip_address_mutations (loc, &outer_code);
info->base_outer_code = outer_code;
switch (GET_CODE (*info->inner))
{
case PRE_DEC:
case PRE_INC:
case POST_DEC:
case POST_INC:
decompose_incdec_address (info);
break;
case PRE_MODIFY:
case POST_MODIFY:
decompose_automod_address (info);
break;
default:
decompose_normal_address (info);
break;
}
}
/* Describe address operand LOC in INFO. */
void
decompose_lea_address (struct address_info *info, rtx *loc)
{
decompose_address (info, loc, VOIDmode, ADDR_SPACE_GENERIC, ADDRESS);
}
/* Describe the address of MEM X in INFO. */
void
decompose_mem_address (struct address_info *info, rtx x)
{
gcc_assert (MEM_P (x));
decompose_address (info, &XEXP (x, 0), GET_MODE (x),
MEM_ADDR_SPACE (x), MEM);
}
/* Update INFO after a change to the address it describes. */
void
update_address (struct address_info *info)
{
decompose_address (info, info->outer, info->mode, info->as,
info->addr_outer_code);
}
/* Return the scale applied to *INFO->INDEX_TERM, or 0 if the index is
more complicated than that. */
HOST_WIDE_INT
get_index_scale (const struct address_info *info)
{
rtx index = *info->index;
if (GET_CODE (index) == MULT
&& CONST_INT_P (XEXP (index, 1))
&& info->index_term == &XEXP (index, 0))
return INTVAL (XEXP (index, 1));
if (GET_CODE (index) == ASHIFT
&& CONST_INT_P (XEXP (index, 1))
&& info->index_term == &XEXP (index, 0))
return (HOST_WIDE_INT) 1 << INTVAL (XEXP (index, 1));
if (info->index == info->index_term)
return 1;
return 0;
}
/* Return the "index code" of INFO, in the form required by
ok_for_base_p_1. */
enum rtx_code
get_index_code (const struct address_info *info)
{
if (info->index)
return GET_CODE (*info->index);
if (info->disp)
return GET_CODE (*info->disp);
return SCRATCH;
}
/* Return true if X contains a thread-local symbol. */
bool
tls_referenced_p (const_rtx x)
{
if (!targetm.have_tls)
return false;
subrtx_iterator::array_type array;
FOR_EACH_SUBRTX (iter, array, x, ALL)
if (GET_CODE (*iter) == SYMBOL_REF && SYMBOL_REF_TLS_MODEL (*iter) != 0)
return true;
return false;
}