gcc/gcc/rtlanal.c

5202 lines
141 KiB
C
Raw Normal View History

/* Analyze RTL for GNU compiler.
2000-02-26 15:26:24 +01:00
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
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"
1991-12-01 06:13:56 +01:00
#include "rtl.h"
#include "hard-reg-set.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"
#include "function.h"
#include "df.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. */
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 rtx_referenced_p_1 (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 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 *);
attribs.c (hash_attr, [...]): Constify. * attribs.c (hash_attr, eq_attr, init_attributes): Constify. * builtins.c (validate_arg, builtin_mathfn_code, validate_arglist): Likewise. * calls.c (call_expr_flags): Likewise. * combine.c (reg_nonzero_bits_for_combine, reg_num_sign_bit_copies_for_combine, get_last_value, reg_truncated_to_mode): Likewise. * emit-rtl.c (subreg_lowpart_p): Likewise. * expr.c (highest_pow2_factor_for_target, categorize_ctor_elements_1, categorize_ctor_elements, count_type_elements, contains_packed_reference, highest_pow2_factor, highest_pow2_factor_for_target): Likewise. * fold-const.c (may_negate_without_overflow_p, int_const_binop, fold_convertible_p, operand_equal_p, tree_swap_operands_p, native_encode_int, native_encode_real, native_encode_complex, native_encode_vector, native_encode_expr, native_interpret_int, native_interpret_real, native_interpret_complex, native_interpret_vector, native_interpret_expr): Likewise. * function.c (use_register_for_decl): Likewise. * gimplify.c (get_name): Likewise. * langhooks-def.h (lhd_return_null_const_tree): New. (LANG_HOOKS_GET_CALLEE_FNDECL): Use it. * langhooks.c (lhd_return_null_const_tree): New. * langhooks.h (lang_get_callee_fndecl): Constify. * output.h (constructor_static_from_elts_p): Likewise. * rtl-factoring.c (gen_symbol_ref_rtx_for_label): Likewise. * rtl.h (nonzero_bits, num_sign_bit_copies, truncated_to_mode, subreg_lowpart_p, noop_move_p, struct rtl_hooks): Likewise. * rtlanal.c (cached_nonzero_bits, nonzero_bits1, cached_num_sign_bit_copies, num_sign_bit_copies1, noop_move_p, nonzero_bits, num_sign_bit_copies, truncated_to_mode): Likewise. * rtlhooks-def.h (reg_nonzero_bits_general, reg_num_sign_bit_copies_general, reg_truncated_to_mode_general): Likewise. * rtlhooks.c (reg_num_sign_bit_copies_general, reg_nonzero_bits_general, reg_truncated_to_mode_general): Likewise. * stmt.c (warn_if_unused_value, is_body_block): Likewise. * stor-layout.c (mode_for_size_tree): Likewise. * tree-ssa-loop-im.c (memref_eq): Likewise. * tree-ssa-loop-ivopts.c (tree_int_cst_sign_bit): Likewise. * tree.c (contains_placeholder_p, type_list_equal, simple_cst_equal, get_callee_fndecl, operand_equal_for_phi_arg_p): Likewise. * tree.h (tree_int_cst_sign_bit, may_negate_without_overflow_p, mode_for_size_tree, categorize_ctor_elements, count_type_elements, contains_placeholder_p, contains_packed_reference, get_callee_fndecl, operand_equal_for_phi_arg_p, warn_if_unused_value, is_body_block, native_encode_expr, native_interpret_expr, fold_convertible_p, operand_equal_p, int_const_binop, tree_swap_operands_p, builtin_mathfn_code, validate_arglist, simple_cst_equal, type_list_equal, use_register_for_decl, call_expr_flags, get_name, highest_pow2_factor): Likewise. (const_call_expr_arg_iterator_d, init_const_call_expr_arg_iterator, next_const_call_expr_arg, first_const_call_expr_arg, more_const_call_expr_args_p, FOR_EACH_CONST_CALL_EXPR_ARG): New. * varasm.c (constructor_static_from_elts_p): Constify. cp: * parser.c (eof_token): Un-constify. (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc, cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious casts. java: * lang.c (java_get_callee_fndecl): Constify. objc: * objc-act.c (objc_get_callee_fndecl): Constify. * objc-act.h (objc_get_callee_fndecl): Likewise. From-SVN: r127036
2007-07-29 07:43:43 +02:00
static unsigned HOST_WIDE_INT cached_nonzero_bits (const_rtx, enum machine_mode,
const_rtx, enum machine_mode,
unsigned HOST_WIDE_INT);
attribs.c (hash_attr, [...]): Constify. * attribs.c (hash_attr, eq_attr, init_attributes): Constify. * builtins.c (validate_arg, builtin_mathfn_code, validate_arglist): Likewise. * calls.c (call_expr_flags): Likewise. * combine.c (reg_nonzero_bits_for_combine, reg_num_sign_bit_copies_for_combine, get_last_value, reg_truncated_to_mode): Likewise. * emit-rtl.c (subreg_lowpart_p): Likewise. * expr.c (highest_pow2_factor_for_target, categorize_ctor_elements_1, categorize_ctor_elements, count_type_elements, contains_packed_reference, highest_pow2_factor, highest_pow2_factor_for_target): Likewise. * fold-const.c (may_negate_without_overflow_p, int_const_binop, fold_convertible_p, operand_equal_p, tree_swap_operands_p, native_encode_int, native_encode_real, native_encode_complex, native_encode_vector, native_encode_expr, native_interpret_int, native_interpret_real, native_interpret_complex, native_interpret_vector, native_interpret_expr): Likewise. * function.c (use_register_for_decl): Likewise. * gimplify.c (get_name): Likewise. * langhooks-def.h (lhd_return_null_const_tree): New. (LANG_HOOKS_GET_CALLEE_FNDECL): Use it. * langhooks.c (lhd_return_null_const_tree): New. * langhooks.h (lang_get_callee_fndecl): Constify. * output.h (constructor_static_from_elts_p): Likewise. * rtl-factoring.c (gen_symbol_ref_rtx_for_label): Likewise. * rtl.h (nonzero_bits, num_sign_bit_copies, truncated_to_mode, subreg_lowpart_p, noop_move_p, struct rtl_hooks): Likewise. * rtlanal.c (cached_nonzero_bits, nonzero_bits1, cached_num_sign_bit_copies, num_sign_bit_copies1, noop_move_p, nonzero_bits, num_sign_bit_copies, truncated_to_mode): Likewise. * rtlhooks-def.h (reg_nonzero_bits_general, reg_num_sign_bit_copies_general, reg_truncated_to_mode_general): Likewise. * rtlhooks.c (reg_num_sign_bit_copies_general, reg_nonzero_bits_general, reg_truncated_to_mode_general): Likewise. * stmt.c (warn_if_unused_value, is_body_block): Likewise. * stor-layout.c (mode_for_size_tree): Likewise. * tree-ssa-loop-im.c (memref_eq): Likewise. * tree-ssa-loop-ivopts.c (tree_int_cst_sign_bit): Likewise. * tree.c (contains_placeholder_p, type_list_equal, simple_cst_equal, get_callee_fndecl, operand_equal_for_phi_arg_p): Likewise. * tree.h (tree_int_cst_sign_bit, may_negate_without_overflow_p, mode_for_size_tree, categorize_ctor_elements, count_type_elements, contains_placeholder_p, contains_packed_reference, get_callee_fndecl, operand_equal_for_phi_arg_p, warn_if_unused_value, is_body_block, native_encode_expr, native_interpret_expr, fold_convertible_p, operand_equal_p, int_const_binop, tree_swap_operands_p, builtin_mathfn_code, validate_arglist, simple_cst_equal, type_list_equal, use_register_for_decl, call_expr_flags, get_name, highest_pow2_factor): Likewise. (const_call_expr_arg_iterator_d, init_const_call_expr_arg_iterator, next_const_call_expr_arg, first_const_call_expr_arg, more_const_call_expr_args_p, FOR_EACH_CONST_CALL_EXPR_ARG): New. * varasm.c (constructor_static_from_elts_p): Constify. cp: * parser.c (eof_token): Un-constify. (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc, cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious casts. java: * lang.c (java_get_callee_fndecl): Constify. objc: * objc-act.c (objc_get_callee_fndecl): Constify. * objc-act.h (objc_get_callee_fndecl): Likewise. From-SVN: r127036
2007-07-29 07:43:43 +02:00
static unsigned HOST_WIDE_INT nonzero_bits1 (const_rtx, enum machine_mode,
const_rtx, enum machine_mode,
unsigned HOST_WIDE_INT);
attribs.c (hash_attr, [...]): Constify. * attribs.c (hash_attr, eq_attr, init_attributes): Constify. * builtins.c (validate_arg, builtin_mathfn_code, validate_arglist): Likewise. * calls.c (call_expr_flags): Likewise. * combine.c (reg_nonzero_bits_for_combine, reg_num_sign_bit_copies_for_combine, get_last_value, reg_truncated_to_mode): Likewise. * emit-rtl.c (subreg_lowpart_p): Likewise. * expr.c (highest_pow2_factor_for_target, categorize_ctor_elements_1, categorize_ctor_elements, count_type_elements, contains_packed_reference, highest_pow2_factor, highest_pow2_factor_for_target): Likewise. * fold-const.c (may_negate_without_overflow_p, int_const_binop, fold_convertible_p, operand_equal_p, tree_swap_operands_p, native_encode_int, native_encode_real, native_encode_complex, native_encode_vector, native_encode_expr, native_interpret_int, native_interpret_real, native_interpret_complex, native_interpret_vector, native_interpret_expr): Likewise. * function.c (use_register_for_decl): Likewise. * gimplify.c (get_name): Likewise. * langhooks-def.h (lhd_return_null_const_tree): New. (LANG_HOOKS_GET_CALLEE_FNDECL): Use it. * langhooks.c (lhd_return_null_const_tree): New. * langhooks.h (lang_get_callee_fndecl): Constify. * output.h (constructor_static_from_elts_p): Likewise. * rtl-factoring.c (gen_symbol_ref_rtx_for_label): Likewise. * rtl.h (nonzero_bits, num_sign_bit_copies, truncated_to_mode, subreg_lowpart_p, noop_move_p, struct rtl_hooks): Likewise. * rtlanal.c (cached_nonzero_bits, nonzero_bits1, cached_num_sign_bit_copies, num_sign_bit_copies1, noop_move_p, nonzero_bits, num_sign_bit_copies, truncated_to_mode): Likewise. * rtlhooks-def.h (reg_nonzero_bits_general, reg_num_sign_bit_copies_general, reg_truncated_to_mode_general): Likewise. * rtlhooks.c (reg_num_sign_bit_copies_general, reg_nonzero_bits_general, reg_truncated_to_mode_general): Likewise. * stmt.c (warn_if_unused_value, is_body_block): Likewise. * stor-layout.c (mode_for_size_tree): Likewise. * tree-ssa-loop-im.c (memref_eq): Likewise. * tree-ssa-loop-ivopts.c (tree_int_cst_sign_bit): Likewise. * tree.c (contains_placeholder_p, type_list_equal, simple_cst_equal, get_callee_fndecl, operand_equal_for_phi_arg_p): Likewise. * tree.h (tree_int_cst_sign_bit, may_negate_without_overflow_p, mode_for_size_tree, categorize_ctor_elements, count_type_elements, contains_placeholder_p, contains_packed_reference, get_callee_fndecl, operand_equal_for_phi_arg_p, warn_if_unused_value, is_body_block, native_encode_expr, native_interpret_expr, fold_convertible_p, operand_equal_p, int_const_binop, tree_swap_operands_p, builtin_mathfn_code, validate_arglist, simple_cst_equal, type_list_equal, use_register_for_decl, call_expr_flags, get_name, highest_pow2_factor): Likewise. (const_call_expr_arg_iterator_d, init_const_call_expr_arg_iterator, next_const_call_expr_arg, first_const_call_expr_arg, more_const_call_expr_args_p, FOR_EACH_CONST_CALL_EXPR_ARG): New. * varasm.c (constructor_static_from_elts_p): Constify. cp: * parser.c (eof_token): Un-constify. (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc, cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious casts. java: * lang.c (java_get_callee_fndecl): Constify. objc: * objc-act.c (objc_get_callee_fndecl): Constify. * objc-act.h (objc_get_callee_fndecl): Likewise. From-SVN: r127036
2007-07-29 07:43:43 +02:00
static unsigned int cached_num_sign_bit_copies (const_rtx, enum machine_mode, const_rtx,
enum machine_mode,
unsigned int);
attribs.c (hash_attr, [...]): Constify. * attribs.c (hash_attr, eq_attr, init_attributes): Constify. * builtins.c (validate_arg, builtin_mathfn_code, validate_arglist): Likewise. * calls.c (call_expr_flags): Likewise. * combine.c (reg_nonzero_bits_for_combine, reg_num_sign_bit_copies_for_combine, get_last_value, reg_truncated_to_mode): Likewise. * emit-rtl.c (subreg_lowpart_p): Likewise. * expr.c (highest_pow2_factor_for_target, categorize_ctor_elements_1, categorize_ctor_elements, count_type_elements, contains_packed_reference, highest_pow2_factor, highest_pow2_factor_for_target): Likewise. * fold-const.c (may_negate_without_overflow_p, int_const_binop, fold_convertible_p, operand_equal_p, tree_swap_operands_p, native_encode_int, native_encode_real, native_encode_complex, native_encode_vector, native_encode_expr, native_interpret_int, native_interpret_real, native_interpret_complex, native_interpret_vector, native_interpret_expr): Likewise. * function.c (use_register_for_decl): Likewise. * gimplify.c (get_name): Likewise. * langhooks-def.h (lhd_return_null_const_tree): New. (LANG_HOOKS_GET_CALLEE_FNDECL): Use it. * langhooks.c (lhd_return_null_const_tree): New. * langhooks.h (lang_get_callee_fndecl): Constify. * output.h (constructor_static_from_elts_p): Likewise. * rtl-factoring.c (gen_symbol_ref_rtx_for_label): Likewise. * rtl.h (nonzero_bits, num_sign_bit_copies, truncated_to_mode, subreg_lowpart_p, noop_move_p, struct rtl_hooks): Likewise. * rtlanal.c (cached_nonzero_bits, nonzero_bits1, cached_num_sign_bit_copies, num_sign_bit_copies1, noop_move_p, nonzero_bits, num_sign_bit_copies, truncated_to_mode): Likewise. * rtlhooks-def.h (reg_nonzero_bits_general, reg_num_sign_bit_copies_general, reg_truncated_to_mode_general): Likewise. * rtlhooks.c (reg_num_sign_bit_copies_general, reg_nonzero_bits_general, reg_truncated_to_mode_general): Likewise. * stmt.c (warn_if_unused_value, is_body_block): Likewise. * stor-layout.c (mode_for_size_tree): Likewise. * tree-ssa-loop-im.c (memref_eq): Likewise. * tree-ssa-loop-ivopts.c (tree_int_cst_sign_bit): Likewise. * tree.c (contains_placeholder_p, type_list_equal, simple_cst_equal, get_callee_fndecl, operand_equal_for_phi_arg_p): Likewise. * tree.h (tree_int_cst_sign_bit, may_negate_without_overflow_p, mode_for_size_tree, categorize_ctor_elements, count_type_elements, contains_placeholder_p, contains_packed_reference, get_callee_fndecl, operand_equal_for_phi_arg_p, warn_if_unused_value, is_body_block, native_encode_expr, native_interpret_expr, fold_convertible_p, operand_equal_p, int_const_binop, tree_swap_operands_p, builtin_mathfn_code, validate_arglist, simple_cst_equal, type_list_equal, use_register_for_decl, call_expr_flags, get_name, highest_pow2_factor): Likewise. (const_call_expr_arg_iterator_d, init_const_call_expr_arg_iterator, next_const_call_expr_arg, first_const_call_expr_arg, more_const_call_expr_args_p, FOR_EACH_CONST_CALL_EXPR_ARG): New. * varasm.c (constructor_static_from_elts_p): Constify. cp: * parser.c (eof_token): Un-constify. (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc, cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious casts. java: * lang.c (java_get_callee_fndecl): Constify. objc: * objc-act.c (objc_get_callee_fndecl): Constify. * objc-act.h (objc_get_callee_fndecl): Likewise. From-SVN: r127036
2007-07-29 07:43:43 +02:00
static unsigned int num_sign_bit_copies1 (const_rtx, enum machine_mode, const_rtx,
enum machine_mode, unsigned int);
/* Offset of the first 'e', 'E' or 'V' operand for each rtx code, or
-1 if a code has no such operand. */
static int non_rtx_starting_operands[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
/* 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:
case CONST_INT:
case CONST_DOUBLE:
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
case CONST_FIXED:
i386.md ("mmx_uavgv8qi3"): Use const_vector. 2002-02-19 Aldy Hernandez <aldyh@redhat.com> * config/i386/i386.md ("mmx_uavgv8qi3"): Use const_vector. ("mmx_uavgv4hi3"): Same. ("pmulhrwv4hi3"): Same. * tree-inline.c (walk_tree): Handle vectors. * c-common.c (constant_expression_warning): Handle vectors. (overflow_warning): Same. * sched-deps.c (sched_analyze_2): Handle vectors. * rtlanal.c (rtx_unstable_p): Handle vectors. (rtx_varies_p): Same. (count_occurrences): Same. (regs_set_between_p): Same. (modified_between_p): Same. (modified_in_p): Same. (volatile_insn_p): Same. (volatile_refs_p): Same. (side_effects_p): Same. (may_trap_p): Same. (inequality_comparisons_p): Same. (replace_regs): Same. (computed_jump_p_1): Same. * rtl.c (DEF_MACHMODE): Change all definitions to accept 8th argument. (inner_mode_array): New. (copy_rtx): Handle vectors. (copy_most_rtx): Same. (rtx_equal_p): Same. (get_mode_alignment): Adjust for vectors. * resource.c (mark_referenced_resources): Handle vectors. (mark_set_resources): Same. * reload1.c (eliminate_regs): Handle vectors. (elimination_effects): Same. (scan_paradoxical_subregs): Same. * reload.c (subst_reg_equivs): Handle vectors. * regrename.c (scan_rtx): Handle vectors. * regclass.c (reg_scan_mark_refs): Handle vectors. * recog.c (find_single_use_1): Handle vectors. * local-alloc.c (equiv_init_varies_p): Handle vectors. (contains_replace_regs): Same. (memref_referenced_p): Same. * integrate.c (copy_rtx_and_substitute): Handle vectors. (subst_constants): Same. * genattrtab.c (attr_copy_rtx): Handle vectors. (encode_units_mask): Same. (clear_struct_flag): Same. (count_sub_rtxs): Same. * gcse.c (want_to_gcse_p): Handle vectors. (oprs_unchanged_p): Same. (hash_expr_1): Same. (oprs_not_set_p): Same. (expr_killed_p): Same. (compute_transp): Same. (store_ops_ok): Same. * function.c (purge_addressof_1): Do not allow paradoxical subregs of vectors. (fixup_var_refs_1): Same. (instantiate_virtual_regs_1): Same. * fold-const.c (operand_equal_p): Handle vectors. (fold): Same. (rtl_expr_nonnegative_p): Same. * flow.c (mark_used_regs): Handle vectors. * df.c (df_uses_record): Handle vectors. * cselib.c (cselib_subst_to_values): Handle vectors. (cselib_mem_conflict_p): Same. (hash_rtx): Same. * cse.c (canon_reg): Handle vectors. (fold_rt): Same. (cse_process_notes): Same. (count_reg_usage): Same. (canon_hash): Same. * alias.c (nonlocal_mentioned_p): Add case for CONST_VECTOR. * combine.c (mark_used_regs_combine): Add case for CONST_VECTOR. * emit-rtl.c (init_emit_once): Generate const0_rtx for vectors. (gen_rtx): Handle CONST_VECTOR. (gen_const_vector_0): New. (copy_rtx_if_shared): CONST_VECTORs can be shared. (reset_used_flags): Same. (copy_insn_1): Same. (initializer_constant_valid_p): Handle VECTOR_CST. * doc/c-tree.texi (Expression trees): Document VECTOR_CST. * doc/rtl.texi (Constants): Document const_vector. (CONST0_RTX): Update for vectors. (RTL sharing): Same. * print-tree.c (print_node): Add case for VECTOR_CST. * tree.h (TREE_VECTOR_CST_ELTS): New. (struct tree_vector): New. (union tree_node): Add vector node. (build_vector): Add prototype. * tree.def (VECTOR_CST): New. * tree.c (build_vector): New. * expmed.c (make_tree): Handle CONST_VECTOR. * rtl.h (CONSTANT_P): CONST_VECTORs are constants too. (CONST_VECTOR_ELT): New. (CONST_VECTOR_NUNITS): New. * machmode.h (GET_MODE_INNER): New. (DEF_MACHMODE): Accept 8th arg. * machmode.def: Add 8th argument for vector inner mode. Add inner vector modes for vectors. * rtl.def (VEC_CONST): Remove. (CONST_VECTOR): New. * expr.c (clear_storage): Allow vectors. (is_zeros_p): Handle VECTOR_CST. * varasm.c (output_constant_pool): Handle vectors. (rtx_const): Add veclo and vechi fields. (kind): Add RTX_VECTOR. (decode_rtx_const): Add case for vector. * config/rs6000/rs6000-protos.h: Add zero_constant. * config/rs6000/rs6000.c (rs6000_emit_move): Handle vector constants. Force easy vector constants into memory. (easy_vector_constant): New. (emit_easy_vector_constant): New. (rs6000_legitimize_reload_address): Do not generate bad reloads on darwin. * config/rs6000/rs6000.md ("altivec_lvx"): Reflect what instruction does. ("altivec_lvxl"): Same. (altivec_lvebx): Same. (altivec_lvehx): Same. (altivec_lvewx): Same. ("*movv4si_const0"): New. ("*movv4sf_const0"): New. ("*movv8hi_const0"): New. ("*movv16qi_const0"): New. From-SVN: r49853
2002-02-19 03:53:41 +01:00
case CONST_VECTOR:
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:
case CONST_INT:
case CONST_DOUBLE:
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
case CONST_FIXED:
i386.md ("mmx_uavgv8qi3"): Use const_vector. 2002-02-19 Aldy Hernandez <aldyh@redhat.com> * config/i386/i386.md ("mmx_uavgv8qi3"): Use const_vector. ("mmx_uavgv4hi3"): Same. ("pmulhrwv4hi3"): Same. * tree-inline.c (walk_tree): Handle vectors. * c-common.c (constant_expression_warning): Handle vectors. (overflow_warning): Same. * sched-deps.c (sched_analyze_2): Handle vectors. * rtlanal.c (rtx_unstable_p): Handle vectors. (rtx_varies_p): Same. (count_occurrences): Same. (regs_set_between_p): Same. (modified_between_p): Same. (modified_in_p): Same. (volatile_insn_p): Same. (volatile_refs_p): Same. (side_effects_p): Same. (may_trap_p): Same. (inequality_comparisons_p): Same. (replace_regs): Same. (computed_jump_p_1): Same. * rtl.c (DEF_MACHMODE): Change all definitions to accept 8th argument. (inner_mode_array): New. (copy_rtx): Handle vectors. (copy_most_rtx): Same. (rtx_equal_p): Same. (get_mode_alignment): Adjust for vectors. * resource.c (mark_referenced_resources): Handle vectors. (mark_set_resources): Same. * reload1.c (eliminate_regs): Handle vectors. (elimination_effects): Same. (scan_paradoxical_subregs): Same. * reload.c (subst_reg_equivs): Handle vectors. * regrename.c (scan_rtx): Handle vectors. * regclass.c (reg_scan_mark_refs): Handle vectors. * recog.c (find_single_use_1): Handle vectors. * local-alloc.c (equiv_init_varies_p): Handle vectors. (contains_replace_regs): Same. (memref_referenced_p): Same. * integrate.c (copy_rtx_and_substitute): Handle vectors. (subst_constants): Same. * genattrtab.c (attr_copy_rtx): Handle vectors. (encode_units_mask): Same. (clear_struct_flag): Same. (count_sub_rtxs): Same. * gcse.c (want_to_gcse_p): Handle vectors. (oprs_unchanged_p): Same. (hash_expr_1): Same. (oprs_not_set_p): Same. (expr_killed_p): Same. (compute_transp): Same. (store_ops_ok): Same. * function.c (purge_addressof_1): Do not allow paradoxical subregs of vectors. (fixup_var_refs_1): Same. (instantiate_virtual_regs_1): Same. * fold-const.c (operand_equal_p): Handle vectors. (fold): Same. (rtl_expr_nonnegative_p): Same. * flow.c (mark_used_regs): Handle vectors. * df.c (df_uses_record): Handle vectors. * cselib.c (cselib_subst_to_values): Handle vectors. (cselib_mem_conflict_p): Same. (hash_rtx): Same. * cse.c (canon_reg): Handle vectors. (fold_rt): Same. (cse_process_notes): Same. (count_reg_usage): Same. (canon_hash): Same. * alias.c (nonlocal_mentioned_p): Add case for CONST_VECTOR. * combine.c (mark_used_regs_combine): Add case for CONST_VECTOR. * emit-rtl.c (init_emit_once): Generate const0_rtx for vectors. (gen_rtx): Handle CONST_VECTOR. (gen_const_vector_0): New. (copy_rtx_if_shared): CONST_VECTORs can be shared. (reset_used_flags): Same. (copy_insn_1): Same. (initializer_constant_valid_p): Handle VECTOR_CST. * doc/c-tree.texi (Expression trees): Document VECTOR_CST. * doc/rtl.texi (Constants): Document const_vector. (CONST0_RTX): Update for vectors. (RTL sharing): Same. * print-tree.c (print_node): Add case for VECTOR_CST. * tree.h (TREE_VECTOR_CST_ELTS): New. (struct tree_vector): New. (union tree_node): Add vector node. (build_vector): Add prototype. * tree.def (VECTOR_CST): New. * tree.c (build_vector): New. * expmed.c (make_tree): Handle CONST_VECTOR. * rtl.h (CONSTANT_P): CONST_VECTORs are constants too. (CONST_VECTOR_ELT): New. (CONST_VECTOR_NUNITS): New. * machmode.h (GET_MODE_INNER): New. (DEF_MACHMODE): Accept 8th arg. * machmode.def: Add 8th argument for vector inner mode. Add inner vector modes for vectors. * rtl.def (VEC_CONST): Remove. (CONST_VECTOR): New. * expr.c (clear_storage): Allow vectors. (is_zeros_p): Handle VECTOR_CST. * varasm.c (output_constant_pool): Handle vectors. (rtx_const): Add veclo and vechi fields. (kind): Add RTX_VECTOR. (decode_rtx_const): Add case for vector. * config/rs6000/rs6000-protos.h: Add zero_constant. * config/rs6000/rs6000.c (rs6000_emit_move): Handle vector constants. Force easy vector constants into memory. (easy_vector_constant): New. (emit_easy_vector_constant): New. (rs6000_legitimize_reload_address): Do not generate bad reloads on darwin. * config/rs6000/rs6000.md ("altivec_lvx"): Reflect what instruction does. ("altivec_lvxl"): Same. (altivec_lvebx): Same. (altivec_lvehx): Same. (altivec_lvewx): Same. ("*movv4si_const0"): New. ("*movv4sf_const0"): New. ("*movv8hi_const0"): New. ("*movv16qi_const0"): New. From-SVN: r49853
2002-02-19 03:53:41 +01:00
case CONST_VECTOR:
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 as an address in a MEM 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 accesses 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,
enum 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
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))
decl_size = (host_integerp (DECL_SIZE_UNIT (decl), 0)
? tree_low_cst (DECL_SIZE_UNIT (decl), 0)
: -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:
/* 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
/* 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,
with the proper remainder modulo the mode size if we are
considering unaligned memory references. */
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:
if (CONST_INT_P (XEXP (x, 1)))
return nonzero_address_p (XEXP (x, 0));
/* Handle PIC references. */
else 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 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:
case CONST_INT:
case CONST_DOUBLE:
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
case CONST_FIXED:
i386.md ("mmx_uavgv8qi3"): Use const_vector. 2002-02-19 Aldy Hernandez <aldyh@redhat.com> * config/i386/i386.md ("mmx_uavgv8qi3"): Use const_vector. ("mmx_uavgv4hi3"): Same. ("pmulhrwv4hi3"): Same. * tree-inline.c (walk_tree): Handle vectors. * c-common.c (constant_expression_warning): Handle vectors. (overflow_warning): Same. * sched-deps.c (sched_analyze_2): Handle vectors. * rtlanal.c (rtx_unstable_p): Handle vectors. (rtx_varies_p): Same. (count_occurrences): Same. (regs_set_between_p): Same. (modified_between_p): Same. (modified_in_p): Same. (volatile_insn_p): Same. (volatile_refs_p): Same. (side_effects_p): Same. (may_trap_p): Same. (inequality_comparisons_p): Same. (replace_regs): Same. (computed_jump_p_1): Same. * rtl.c (DEF_MACHMODE): Change all definitions to accept 8th argument. (inner_mode_array): New. (copy_rtx): Handle vectors. (copy_most_rtx): Same. (rtx_equal_p): Same. (get_mode_alignment): Adjust for vectors. * resource.c (mark_referenced_resources): Handle vectors. (mark_set_resources): Same. * reload1.c (eliminate_regs): Handle vectors. (elimination_effects): Same. (scan_paradoxical_subregs): Same. * reload.c (subst_reg_equivs): Handle vectors. * regrename.c (scan_rtx): Handle vectors. * regclass.c (reg_scan_mark_refs): Handle vectors. * recog.c (find_single_use_1): Handle vectors. * local-alloc.c (equiv_init_varies_p): Handle vectors. (contains_replace_regs): Same. (memref_referenced_p): Same. * integrate.c (copy_rtx_and_substitute): Handle vectors. (subst_constants): Same. * genattrtab.c (attr_copy_rtx): Handle vectors. (encode_units_mask): Same. (clear_struct_flag): Same. (count_sub_rtxs): Same. * gcse.c (want_to_gcse_p): Handle vectors. (oprs_unchanged_p): Same. (hash_expr_1): Same. (oprs_not_set_p): Same. (expr_killed_p): Same. (compute_transp): Same. (store_ops_ok): Same. * function.c (purge_addressof_1): Do not allow paradoxical subregs of vectors. (fixup_var_refs_1): Same. (instantiate_virtual_regs_1): Same. * fold-const.c (operand_equal_p): Handle vectors. (fold): Same. (rtl_expr_nonnegative_p): Same. * flow.c (mark_used_regs): Handle vectors. * df.c (df_uses_record): Handle vectors. * cselib.c (cselib_subst_to_values): Handle vectors. (cselib_mem_conflict_p): Same. (hash_rtx): Same. * cse.c (canon_reg): Handle vectors. (fold_rt): Same. (cse_process_notes): Same. (count_reg_usage): Same. (canon_hash): Same. * alias.c (nonlocal_mentioned_p): Add case for CONST_VECTOR. * combine.c (mark_used_regs_combine): Add case for CONST_VECTOR. * emit-rtl.c (init_emit_once): Generate const0_rtx for vectors. (gen_rtx): Handle CONST_VECTOR. (gen_const_vector_0): New. (copy_rtx_if_shared): CONST_VECTORs can be shared. (reset_used_flags): Same. (copy_insn_1): Same. (initializer_constant_valid_p): Handle VECTOR_CST. * doc/c-tree.texi (Expression trees): Document VECTOR_CST. * doc/rtl.texi (Constants): Document const_vector. (CONST0_RTX): Update for vectors. (RTL sharing): Same. * print-tree.c (print_node): Add case for VECTOR_CST. * tree.h (TREE_VECTOR_CST_ELTS): New. (struct tree_vector): New. (union tree_node): Add vector node. (build_vector): Add prototype. * tree.def (VECTOR_CST): New. * tree.c (build_vector): New. * expmed.c (make_tree): Handle CONST_VECTOR. * rtl.h (CONSTANT_P): CONST_VECTORs are constants too. (CONST_VECTOR_ELT): New. (CONST_VECTOR_NUNITS): New. * machmode.h (GET_MODE_INNER): New. (DEF_MACHMODE): Accept 8th arg. * machmode.def: Add 8th argument for vector inner mode. Add inner vector modes for vectors. * rtl.def (VEC_CONST): Remove. (CONST_VECTOR): New. * expr.c (clear_storage): Allow vectors. (is_zeros_p): Handle VECTOR_CST. * varasm.c (output_constant_pool): Handle vectors. (rtx_const): Add veclo and vechi fields. (kind): Add RTX_VECTOR. (decode_rtx_const): Add case for vector. * config/rs6000/rs6000-protos.h: Add zero_constant. * config/rs6000/rs6000.c (rs6000_emit_move): Handle vector constants. Force easy vector constants into memory. (easy_vector_constant): New. (emit_easy_vector_constant): New. (rs6000_legitimize_reload_address): Do not generate bad reloads on darwin. * config/rs6000/rs6000.md ("altivec_lvx"): Reflect what instruction does. ("altivec_lvxl"): Same. (altivec_lvebx): Same. (altivec_lvehx): Same. (altivec_lvewx): Same. ("*movv4si_const0"): New. ("*movv4sf_const0"): New. ("*movv8hi_const0"): New. ("*movv16qi_const0"): New. From-SVN: r49853
2002-02-19 03:53:41 +01:00
case CONST_VECTOR:
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;
}
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)
return reg == XEXP (in, 0);
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;
case CONST_INT:
i386.md ("mmx_uavgv8qi3"): Use const_vector. 2002-02-19 Aldy Hernandez <aldyh@redhat.com> * config/i386/i386.md ("mmx_uavgv8qi3"): Use const_vector. ("mmx_uavgv4hi3"): Same. ("pmulhrwv4hi3"): Same. * tree-inline.c (walk_tree): Handle vectors. * c-common.c (constant_expression_warning): Handle vectors. (overflow_warning): Same. * sched-deps.c (sched_analyze_2): Handle vectors. * rtlanal.c (rtx_unstable_p): Handle vectors. (rtx_varies_p): Same. (count_occurrences): Same. (regs_set_between_p): Same. (modified_between_p): Same. (modified_in_p): Same. (volatile_insn_p): Same. (volatile_refs_p): Same. (side_effects_p): Same. (may_trap_p): Same. (inequality_comparisons_p): Same. (replace_regs): Same. (computed_jump_p_1): Same. * rtl.c (DEF_MACHMODE): Change all definitions to accept 8th argument. (inner_mode_array): New. (copy_rtx): Handle vectors. (copy_most_rtx): Same. (rtx_equal_p): Same. (get_mode_alignment): Adjust for vectors. * resource.c (mark_referenced_resources): Handle vectors. (mark_set_resources): Same. * reload1.c (eliminate_regs): Handle vectors. (elimination_effects): Same. (scan_paradoxical_subregs): Same. * reload.c (subst_reg_equivs): Handle vectors. * regrename.c (scan_rtx): Handle vectors. * regclass.c (reg_scan_mark_refs): Handle vectors. * recog.c (find_single_use_1): Handle vectors. * local-alloc.c (equiv_init_varies_p): Handle vectors. (contains_replace_regs): Same. (memref_referenced_p): Same. * integrate.c (copy_rtx_and_substitute): Handle vectors. (subst_constants): Same. * genattrtab.c (attr_copy_rtx): Handle vectors. (encode_units_mask): Same. (clear_struct_flag): Same. (count_sub_rtxs): Same. * gcse.c (want_to_gcse_p): Handle vectors. (oprs_unchanged_p): Same. (hash_expr_1): Same. (oprs_not_set_p): Same. (expr_killed_p): Same. (compute_transp): Same. (store_ops_ok): Same. * function.c (purge_addressof_1): Do not allow paradoxical subregs of vectors. (fixup_var_refs_1): Same. (instantiate_virtual_regs_1): Same. * fold-const.c (operand_equal_p): Handle vectors. (fold): Same. (rtl_expr_nonnegative_p): Same. * flow.c (mark_used_regs): Handle vectors. * df.c (df_uses_record): Handle vectors. * cselib.c (cselib_subst_to_values): Handle vectors. (cselib_mem_conflict_p): Same. (hash_rtx): Same. * cse.c (canon_reg): Handle vectors. (fold_rt): Same. (cse_process_notes): Same. (count_reg_usage): Same. (canon_hash): Same. * alias.c (nonlocal_mentioned_p): Add case for CONST_VECTOR. * combine.c (mark_used_regs_combine): Add case for CONST_VECTOR. * emit-rtl.c (init_emit_once): Generate const0_rtx for vectors. (gen_rtx): Handle CONST_VECTOR. (gen_const_vector_0): New. (copy_rtx_if_shared): CONST_VECTORs can be shared. (reset_used_flags): Same. (copy_insn_1): Same. (initializer_constant_valid_p): Handle VECTOR_CST. * doc/c-tree.texi (Expression trees): Document VECTOR_CST. * doc/rtl.texi (Constants): Document const_vector. (CONST0_RTX): Update for vectors. (RTL sharing): Same. * print-tree.c (print_node): Add case for VECTOR_CST. * tree.h (TREE_VECTOR_CST_ELTS): New. (struct tree_vector): New. (union tree_node): Add vector node. (build_vector): Add prototype. * tree.def (VECTOR_CST): New. * tree.c (build_vector): New. * expmed.c (make_tree): Handle CONST_VECTOR. * rtl.h (CONSTANT_P): CONST_VECTORs are constants too. (CONST_VECTOR_ELT): New. (CONST_VECTOR_NUNITS): New. * machmode.h (GET_MODE_INNER): New. (DEF_MACHMODE): Accept 8th arg. * machmode.def: Add 8th argument for vector inner mode. Add inner vector modes for vectors. * rtl.def (VEC_CONST): Remove. (CONST_VECTOR): New. * expr.c (clear_storage): Allow vectors. (is_zeros_p): Handle VECTOR_CST. * varasm.c (output_constant_pool): Handle vectors. (rtx_const): Add veclo and vechi fields. (kind): Add RTX_VECTOR. (decode_rtx_const): Add case for vector. * config/rs6000/rs6000-protos.h: Add zero_constant. * config/rs6000/rs6000.c (rs6000_emit_move): Handle vector constants. Force easy vector constants into memory. (easy_vector_constant): New. (emit_easy_vector_constant): New. (rs6000_legitimize_reload_address): Do not generate bad reloads on darwin. * config/rs6000/rs6000.md ("altivec_lvx"): Reflect what instruction does. ("altivec_lvxl"): Same. (altivec_lvebx): Same. (altivec_lvehx): Same. (altivec_lvewx): Same. ("*movv4si_const0"): New. ("*movv4sf_const0"): New. ("*movv8hi_const0"): New. ("*movv16qi_const0"): New. From-SVN: r49853
2002-02-19 03:53:41 +01:00
case CONST_VECTOR:
1991-12-01 06:13:56 +01:00
case CONST_DOUBLE:
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
case CONST_FIXED:
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
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
no_labels_between_p (const_rtx beg, const_rtx end)
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 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
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_used_between_p (const_rtx reg, const_rtx from_insn, const_rtx to_insn)
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 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
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_between_p (const_rtx reg, const_rtx from_insn, const_rtx to_insn)
1991-12-01 06:13:56 +01:00
{
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
const_rtx 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
{
/* 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 1;
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
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_between_p (const_rtx x, const_rtx start, const_rtx 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;
if (start == end)
return 0;
1991-12-01 06:13:56 +01:00
switch (code)
{
case CONST_INT:
case CONST_DOUBLE:
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
case CONST_FIXED:
i386.md ("mmx_uavgv8qi3"): Use const_vector. 2002-02-19 Aldy Hernandez <aldyh@redhat.com> * config/i386/i386.md ("mmx_uavgv8qi3"): Use const_vector. ("mmx_uavgv4hi3"): Same. ("pmulhrwv4hi3"): Same. * tree-inline.c (walk_tree): Handle vectors. * c-common.c (constant_expression_warning): Handle vectors. (overflow_warning): Same. * sched-deps.c (sched_analyze_2): Handle vectors. * rtlanal.c (rtx_unstable_p): Handle vectors. (rtx_varies_p): Same. (count_occurrences): Same. (regs_set_between_p): Same. (modified_between_p): Same. (modified_in_p): Same. (volatile_insn_p): Same. (volatile_refs_p): Same. (side_effects_p): Same. (may_trap_p): Same. (inequality_comparisons_p): Same. (replace_regs): Same. (computed_jump_p_1): Same. * rtl.c (DEF_MACHMODE): Change all definitions to accept 8th argument. (inner_mode_array): New. (copy_rtx): Handle vectors. (copy_most_rtx): Same. (rtx_equal_p): Same. (get_mode_alignment): Adjust for vectors. * resource.c (mark_referenced_resources): Handle vectors. (mark_set_resources): Same. * reload1.c (eliminate_regs): Handle vectors. (elimination_effects): Same. (scan_paradoxical_subregs): Same. * reload.c (subst_reg_equivs): Handle vectors. * regrename.c (scan_rtx): Handle vectors. * regclass.c (reg_scan_mark_refs): Handle vectors. * recog.c (find_single_use_1): Handle vectors. * local-alloc.c (equiv_init_varies_p): Handle vectors. (contains_replace_regs): Same. (memref_referenced_p): Same. * integrate.c (copy_rtx_and_substitute): Handle vectors. (subst_constants): Same. * genattrtab.c (attr_copy_rtx): Handle vectors. (encode_units_mask): Same. (clear_struct_flag): Same. (count_sub_rtxs): Same. * gcse.c (want_to_gcse_p): Handle vectors. (oprs_unchanged_p): Same. (hash_expr_1): Same. (oprs_not_set_p): Same. (expr_killed_p): Same. (compute_transp): Same. (store_ops_ok): Same. * function.c (purge_addressof_1): Do not allow paradoxical subregs of vectors. (fixup_var_refs_1): Same. (instantiate_virtual_regs_1): Same. * fold-const.c (operand_equal_p): Handle vectors. (fold): Same. (rtl_expr_nonnegative_p): Same. * flow.c (mark_used_regs): Handle vectors. * df.c (df_uses_record): Handle vectors. * cselib.c (cselib_subst_to_values): Handle vectors. (cselib_mem_conflict_p): Same. (hash_rtx): Same. * cse.c (canon_reg): Handle vectors. (fold_rt): Same. (cse_process_notes): Same. (count_reg_usage): Same. (canon_hash): Same. * alias.c (nonlocal_mentioned_p): Add case for CONST_VECTOR. * combine.c (mark_used_regs_combine): Add case for CONST_VECTOR. * emit-rtl.c (init_emit_once): Generate const0_rtx for vectors. (gen_rtx): Handle CONST_VECTOR. (gen_const_vector_0): New. (copy_rtx_if_shared): CONST_VECTORs can be shared. (reset_used_flags): Same. (copy_insn_1): Same. (initializer_constant_valid_p): Handle VECTOR_CST. * doc/c-tree.texi (Expression trees): Document VECTOR_CST. * doc/rtl.texi (Constants): Document const_vector. (CONST0_RTX): Update for vectors. (RTL sharing): Same. * print-tree.c (print_node): Add case for VECTOR_CST. * tree.h (TREE_VECTOR_CST_ELTS): New. (struct tree_vector): New. (union tree_node): Add vector node. (build_vector): Add prototype. * tree.def (VECTOR_CST): New. * tree.c (build_vector): New. * expmed.c (make_tree): Handle CONST_VECTOR. * rtl.h (CONSTANT_P): CONST_VECTORs are constants too. (CONST_VECTOR_ELT): New. (CONST_VECTOR_NUNITS): New. * machmode.h (GET_MODE_INNER): New. (DEF_MACHMODE): Accept 8th arg. * machmode.def: Add 8th argument for vector inner mode. Add inner vector modes for vectors. * rtl.def (VEC_CONST): Remove. (CONST_VECTOR): New. * expr.c (clear_storage): Allow vectors. (is_zeros_p): Handle VECTOR_CST. * varasm.c (output_constant_pool): Handle vectors. (rtx_const): Add veclo and vechi fields. (kind): Add RTX_VECTOR. (decode_rtx_const): Add case for vector. * config/rs6000/rs6000-protos.h: Add zero_constant. * config/rs6000/rs6000.c (rs6000_emit_move): Handle vector constants. Force easy vector constants into memory. (easy_vector_constant): New. (emit_easy_vector_constant): New. (rs6000_legitimize_reload_address): Do not generate bad reloads on darwin. * config/rs6000/rs6000.md ("altivec_lvx"): Reflect what instruction does. ("altivec_lvxl"): Same. (altivec_lvebx): Same. (altivec_lvehx): Same. (altivec_lvewx): Same. ("*movv4si_const0"): New. ("*movv4sf_const0"): New. ("*movv8hi_const0"): New. ("*movv16qi_const0"): New. From-SVN: r49853
2002-02-19 03:53:41 +01:00
case CONST_VECTOR:
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)
{
case CONST_INT:
case CONST_DOUBLE:
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
case CONST_FIXED:
i386.md ("mmx_uavgv8qi3"): Use const_vector. 2002-02-19 Aldy Hernandez <aldyh@redhat.com> * config/i386/i386.md ("mmx_uavgv8qi3"): Use const_vector. ("mmx_uavgv4hi3"): Same. ("pmulhrwv4hi3"): Same. * tree-inline.c (walk_tree): Handle vectors. * c-common.c (constant_expression_warning): Handle vectors. (overflow_warning): Same. * sched-deps.c (sched_analyze_2): Handle vectors. * rtlanal.c (rtx_unstable_p): Handle vectors. (rtx_varies_p): Same. (count_occurrences): Same. (regs_set_between_p): Same. (modified_between_p): Same. (modified_in_p): Same. (volatile_insn_p): Same. (volatile_refs_p): Same. (side_effects_p): Same. (may_trap_p): Same. (inequality_comparisons_p): Same. (replace_regs): Same. (computed_jump_p_1): Same. * rtl.c (DEF_MACHMODE): Change all definitions to accept 8th argument. (inner_mode_array): New. (copy_rtx): Handle vectors. (copy_most_rtx): Same. (rtx_equal_p): Same. (get_mode_alignment): Adjust for vectors. * resource.c (mark_referenced_resources): Handle vectors. (mark_set_resources): Same. * reload1.c (eliminate_regs): Handle vectors. (elimination_effects): Same. (scan_paradoxical_subregs): Same. * reload.c (subst_reg_equivs): Handle vectors. * regrename.c (scan_rtx): Handle vectors. * regclass.c (reg_scan_mark_refs): Handle vectors. * recog.c (find_single_use_1): Handle vectors. * local-alloc.c (equiv_init_varies_p): Handle vectors. (contains_replace_regs): Same. (memref_referenced_p): Same. * integrate.c (copy_rtx_and_substitute): Handle vectors. (subst_constants): Same. * genattrtab.c (attr_copy_rtx): Handle vectors. (encode_units_mask): Same. (clear_struct_flag): Same. (count_sub_rtxs): Same. * gcse.c (want_to_gcse_p): Handle vectors. (oprs_unchanged_p): Same. (hash_expr_1): Same. (oprs_not_set_p): Same. (expr_killed_p): Same. (compute_transp): Same. (store_ops_ok): Same. * function.c (purge_addressof_1): Do not allow paradoxical subregs of vectors. (fixup_var_refs_1): Same. (instantiate_virtual_regs_1): Same. * fold-const.c (operand_equal_p): Handle vectors. (fold): Same. (rtl_expr_nonnegative_p): Same. * flow.c (mark_used_regs): Handle vectors. * df.c (df_uses_record): Handle vectors. * cselib.c (cselib_subst_to_values): Handle vectors. (cselib_mem_conflict_p): Same. (hash_rtx): Same. * cse.c (canon_reg): Handle vectors. (fold_rt): Same. (cse_process_notes): Same. (count_reg_usage): Same. (canon_hash): Same. * alias.c (nonlocal_mentioned_p): Add case for CONST_VECTOR. * combine.c (mark_used_regs_combine): Add case for CONST_VECTOR. * emit-rtl.c (init_emit_once): Generate const0_rtx for vectors. (gen_rtx): Handle CONST_VECTOR. (gen_const_vector_0): New. (copy_rtx_if_shared): CONST_VECTORs can be shared. (reset_used_flags): Same. (copy_insn_1): Same. (initializer_constant_valid_p): Handle VECTOR_CST. * doc/c-tree.texi (Expression trees): Document VECTOR_CST. * doc/rtl.texi (Constants): Document const_vector. (CONST0_RTX): Update for vectors. (RTL sharing): Same. * print-tree.c (print_node): Add case for VECTOR_CST. * tree.h (TREE_VECTOR_CST_ELTS): New. (struct tree_vector): New. (union tree_node): Add vector node. (build_vector): Add prototype. * tree.def (VECTOR_CST): New. * tree.c (build_vector): New. * expmed.c (make_tree): Handle CONST_VECTOR. * rtl.h (CONSTANT_P): CONST_VECTORs are constants too. (CONST_VECTOR_ELT): New. (CONST_VECTOR_NUNITS): New. * machmode.h (GET_MODE_INNER): New. (DEF_MACHMODE): Accept 8th arg. * machmode.def: Add 8th argument for vector inner mode. Add inner vector modes for vectors. * rtl.def (VEC_CONST): Remove. (CONST_VECTOR): New. * expr.c (clear_storage): Allow vectors. (is_zeros_p): Handle VECTOR_CST. * varasm.c (output_constant_pool): Handle vectors. (rtx_const): Add veclo and vechi fields. (kind): Add RTX_VECTOR. (decode_rtx_const): Add case for vector. * config/rs6000/rs6000-protos.h: Add zero_constant. * config/rs6000/rs6000.c (rs6000_emit_move): Handle vector constants. Force easy vector constants into memory. (easy_vector_constant): New. (emit_easy_vector_constant): New. (rs6000_legitimize_reload_address): Do not generate bad reloads on darwin. * config/rs6000/rs6000.md ("altivec_lvx"): Reflect what instruction does. ("altivec_lvxl"): Same. (altivec_lvebx): Same. (altivec_lvehx): Same. (altivec_lvewx): Same. ("*movv4si_const0"): New. ("*movv4sf_const0"): New. ("*movv8hi_const0"): New. ("*movv16qi_const0"): New. From-SVN: r49853
2002-02-19 03:53:41 +01:00
case CONST_VECTOR:
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;
}
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
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
single_set_2 (const_rtx 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);
}
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
attribs.c (hash_attr, [...]): Constify. * attribs.c (hash_attr, eq_attr, init_attributes): Constify. * builtins.c (validate_arg, builtin_mathfn_code, validate_arglist): Likewise. * calls.c (call_expr_flags): Likewise. * combine.c (reg_nonzero_bits_for_combine, reg_num_sign_bit_copies_for_combine, get_last_value, reg_truncated_to_mode): Likewise. * emit-rtl.c (subreg_lowpart_p): Likewise. * expr.c (highest_pow2_factor_for_target, categorize_ctor_elements_1, categorize_ctor_elements, count_type_elements, contains_packed_reference, highest_pow2_factor, highest_pow2_factor_for_target): Likewise. * fold-const.c (may_negate_without_overflow_p, int_const_binop, fold_convertible_p, operand_equal_p, tree_swap_operands_p, native_encode_int, native_encode_real, native_encode_complex, native_encode_vector, native_encode_expr, native_interpret_int, native_interpret_real, native_interpret_complex, native_interpret_vector, native_interpret_expr): Likewise. * function.c (use_register_for_decl): Likewise. * gimplify.c (get_name): Likewise. * langhooks-def.h (lhd_return_null_const_tree): New. (LANG_HOOKS_GET_CALLEE_FNDECL): Use it. * langhooks.c (lhd_return_null_const_tree): New. * langhooks.h (lang_get_callee_fndecl): Constify. * output.h (constructor_static_from_elts_p): Likewise. * rtl-factoring.c (gen_symbol_ref_rtx_for_label): Likewise. * rtl.h (nonzero_bits, num_sign_bit_copies, truncated_to_mode, subreg_lowpart_p, noop_move_p, struct rtl_hooks): Likewise. * rtlanal.c (cached_nonzero_bits, nonzero_bits1, cached_num_sign_bit_copies, num_sign_bit_copies1, noop_move_p, nonzero_bits, num_sign_bit_copies, truncated_to_mode): Likewise. * rtlhooks-def.h (reg_nonzero_bits_general, reg_num_sign_bit_copies_general, reg_truncated_to_mode_general): Likewise. * rtlhooks.c (reg_num_sign_bit_copies_general, reg_nonzero_bits_general, reg_truncated_to_mode_general): Likewise. * stmt.c (warn_if_unused_value, is_body_block): Likewise. * stor-layout.c (mode_for_size_tree): Likewise. * tree-ssa-loop-im.c (memref_eq): Likewise. * tree-ssa-loop-ivopts.c (tree_int_cst_sign_bit): Likewise. * tree.c (contains_placeholder_p, type_list_equal, simple_cst_equal, get_callee_fndecl, operand_equal_for_phi_arg_p): Likewise. * tree.h (tree_int_cst_sign_bit, may_negate_without_overflow_p, mode_for_size_tree, categorize_ctor_elements, count_type_elements, contains_placeholder_p, contains_packed_reference, get_callee_fndecl, operand_equal_for_phi_arg_p, warn_if_unused_value, is_body_block, native_encode_expr, native_interpret_expr, fold_convertible_p, operand_equal_p, int_const_binop, tree_swap_operands_p, builtin_mathfn_code, validate_arglist, simple_cst_equal, type_list_equal, use_register_for_decl, call_expr_flags, get_name, highest_pow2_factor): Likewise. (const_call_expr_arg_iterator_d, init_const_call_expr_arg_iterator, next_const_call_expr_arg, first_const_call_expr_arg, more_const_call_expr_args_p, FOR_EACH_CONST_CALL_EXPR_ARG): New. * varasm.c (constructor_static_from_elts_p): Constify. cp: * parser.c (eof_token): Un-constify. (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc, cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious casts. java: * lang.c (java_get_callee_fndecl): Constify. objc: * objc-act.c (objc_get_callee_fndecl): Constify. * objc-act.h (objc_get_callee_fndecl): Likewise. From-SVN: r127036
2007-07-29 07:43:43 +02:00
noop_move_p (const_rtx 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;
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;
}
/* Return the last thing that X was assigned from before *PINSN. If VALID_TO
is not NULL_RTX then verify that the object is not modified up to VALID_TO.
If the object was modified, if we hit a partial assignment to X, or hit a
CODE_LABEL first, return X. If we found an assignment, update *PINSN to
point to it. ALLOW_HWREG is set to 1 if hardware registers are allowed to
be the src. */
1991-12-01 06:13:56 +01:00
rtx
find_last_value (rtx x, rtx *pinsn, rtx valid_to, int allow_hwreg)
1991-12-01 06:13:56 +01:00
{
rtx 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
for (p = PREV_INSN (*pinsn); p && !LABEL_P (p);
1991-12-01 06:13:56 +01:00
p = PREV_INSN (p))
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 (p))
1991-12-01 06:13:56 +01:00
{
rtx set = single_set (p);
1992-07-06 22:15:06 +02:00
rtx note = find_reg_note (p, REG_EQUAL, NULL_RTX);
1991-12-01 06:13:56 +01:00
if (set && rtx_equal_p (x, SET_DEST (set)))
{
rtx src = SET_SRC (set);
if (note && GET_CODE (XEXP (note, 0)) != EXPR_LIST)
src = XEXP (note, 0);
if ((valid_to == NULL_RTX
|| ! modified_between_p (src, PREV_INSN (p), valid_to))
1991-12-01 06:13:56 +01:00
/* Reject hard registers because we don't usually want
to use them; we'd rather use a pseudo. */
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 (src)
&& REGNO (src) < FIRST_PSEUDO_REGISTER) || allow_hwreg))
1991-12-01 06:13:56 +01:00
{
*pinsn = p;
return src;
}
}
1991-12-01 06:13:56 +01:00
/* If set in non-simple way, we don't have a value. */
if (reg_set_p (x, p))
break;
}
return x;
}
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. */
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
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 0;
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 1;
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 1;
if (code == CLOBBER || loc == &SET_SRC (x))
return 0;
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 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 = 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 1;
}
}
return 0;
}
/* 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 (GET_CODE (pattern) == COND_EXEC)
pattern = COND_EXEC_CODE (pattern);
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
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_constant_src (const_rtx 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
/* 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;
switch (kind)
{
case REG_CC_SETTER:
case REG_CC_USER:
case REG_LABEL_TARGET:
case REG_LABEL_OPERAND:
/* 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
}
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:
df_notes_rescan (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)
{
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 = 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. */
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
in_expr_list_p (const_rtx listp, const_rtx 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 1;
return 0;
}
/* 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
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_node_from_expr_list (const_rtx node, rtx *listp)
{
rtx temp = *listp;
rtx prev = NULL_RTX;
while (temp)
{
if (node == XEXP (temp, 0))
{
/* Splice the node out of the list. */
if (prev)
XEXP (prev, 1) = XEXP (temp, 1);
else
*listp = XEXP (temp, 1);
return;
}
prev = temp;
temp = XEXP (temp, 1);
}
}
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 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_INT:
case CONST:
case CONST_DOUBLE:
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
case CONST_FIXED:
i386.md ("mmx_uavgv8qi3"): Use const_vector. 2002-02-19 Aldy Hernandez <aldyh@redhat.com> * config/i386/i386.md ("mmx_uavgv8qi3"): Use const_vector. ("mmx_uavgv4hi3"): Same. ("pmulhrwv4hi3"): Same. * tree-inline.c (walk_tree): Handle vectors. * c-common.c (constant_expression_warning): Handle vectors. (overflow_warning): Same. * sched-deps.c (sched_analyze_2): Handle vectors. * rtlanal.c (rtx_unstable_p): Handle vectors. (rtx_varies_p): Same. (count_occurrences): Same. (regs_set_between_p): Same. (modified_between_p): Same. (modified_in_p): Same. (volatile_insn_p): Same. (volatile_refs_p): Same. (side_effects_p): Same. (may_trap_p): Same. (inequality_comparisons_p): Same. (replace_regs): Same. (computed_jump_p_1): Same. * rtl.c (DEF_MACHMODE): Change all definitions to accept 8th argument. (inner_mode_array): New. (copy_rtx): Handle vectors. (copy_most_rtx): Same. (rtx_equal_p): Same. (get_mode_alignment): Adjust for vectors. * resource.c (mark_referenced_resources): Handle vectors. (mark_set_resources): Same. * reload1.c (eliminate_regs): Handle vectors. (elimination_effects): Same. (scan_paradoxical_subregs): Same. * reload.c (subst_reg_equivs): Handle vectors. * regrename.c (scan_rtx): Handle vectors. * regclass.c (reg_scan_mark_refs): Handle vectors. * recog.c (find_single_use_1): Handle vectors. * local-alloc.c (equiv_init_varies_p): Handle vectors. (contains_replace_regs): Same. (memref_referenced_p): Same. * integrate.c (copy_rtx_and_substitute): Handle vectors. (subst_constants): Same. * genattrtab.c (attr_copy_rtx): Handle vectors. (encode_units_mask): Same. (clear_struct_flag): Same. (count_sub_rtxs): Same. * gcse.c (want_to_gcse_p): Handle vectors. (oprs_unchanged_p): Same. (hash_expr_1): Same. (oprs_not_set_p): Same. (expr_killed_p): Same. (compute_transp): Same. (store_ops_ok): Same. * function.c (purge_addressof_1): Do not allow paradoxical subregs of vectors. (fixup_var_refs_1): Same. (instantiate_virtual_regs_1): Same. * fold-const.c (operand_equal_p): Handle vectors. (fold): Same. (rtl_expr_nonnegative_p): Same. * flow.c (mark_used_regs): Handle vectors. * df.c (df_uses_record): Handle vectors. * cselib.c (cselib_subst_to_values): Handle vectors. (cselib_mem_conflict_p): Same. (hash_rtx): Same. * cse.c (canon_reg): Handle vectors. (fold_rt): Same. (cse_process_notes): Same. (count_reg_usage): Same. (canon_hash): Same. * alias.c (nonlocal_mentioned_p): Add case for CONST_VECTOR. * combine.c (mark_used_regs_combine): Add case for CONST_VECTOR. * emit-rtl.c (init_emit_once): Generate const0_rtx for vectors. (gen_rtx): Handle CONST_VECTOR. (gen_const_vector_0): New. (copy_rtx_if_shared): CONST_VECTORs can be shared. (reset_used_flags): Same. (copy_insn_1): Same. (initializer_constant_valid_p): Handle VECTOR_CST. * doc/c-tree.texi (Expression trees): Document VECTOR_CST. * doc/rtl.texi (Constants): Document const_vector. (CONST0_RTX): Update for vectors. (RTL sharing): Same. * print-tree.c (print_node): Add case for VECTOR_CST. * tree.h (TREE_VECTOR_CST_ELTS): New. (struct tree_vector): New. (union tree_node): Add vector node. (build_vector): Add prototype. * tree.def (VECTOR_CST): New. * tree.c (build_vector): New. * expmed.c (make_tree): Handle CONST_VECTOR. * rtl.h (CONSTANT_P): CONST_VECTORs are constants too. (CONST_VECTOR_ELT): New. (CONST_VECTOR_NUNITS): New. * machmode.h (GET_MODE_INNER): New. (DEF_MACHMODE): Accept 8th arg. * machmode.def: Add 8th argument for vector inner mode. Add inner vector modes for vectors. * rtl.def (VEC_CONST): Remove. (CONST_VECTOR): New. * expr.c (clear_storage): Allow vectors. (is_zeros_p): Handle VECTOR_CST. * varasm.c (output_constant_pool): Handle vectors. (rtx_const): Add veclo and vechi fields. (kind): Add RTX_VECTOR. (decode_rtx_const): Add case for vector. * config/rs6000/rs6000-protos.h: Add zero_constant. * config/rs6000/rs6000.c (rs6000_emit_move): Handle vector constants. Force easy vector constants into memory. (easy_vector_constant): New. (emit_easy_vector_constant): New. (rs6000_legitimize_reload_address): Do not generate bad reloads on darwin. * config/rs6000/rs6000.md ("altivec_lvx"): Reflect what instruction does. ("altivec_lvxl"): Same. (altivec_lvebx): Same. (altivec_lvehx): Same. (altivec_lvewx): Same. ("*movv4si_const0"): New. ("*movv4sf_const0"): New. ("*movv8hi_const0"): New. ("*movv16qi_const0"): New. From-SVN: r49853
2002-02-19 03:53:41 +01:00
case CONST_VECTOR:
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:
/* case TRAP_IF: This isn't clear yet. */
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_INT:
case CONST:
case CONST_DOUBLE:
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
case CONST_FIXED:
i386.md ("mmx_uavgv8qi3"): Use const_vector. 2002-02-19 Aldy Hernandez <aldyh@redhat.com> * config/i386/i386.md ("mmx_uavgv8qi3"): Use const_vector. ("mmx_uavgv4hi3"): Same. ("pmulhrwv4hi3"): Same. * tree-inline.c (walk_tree): Handle vectors. * c-common.c (constant_expression_warning): Handle vectors. (overflow_warning): Same. * sched-deps.c (sched_analyze_2): Handle vectors. * rtlanal.c (rtx_unstable_p): Handle vectors. (rtx_varies_p): Same. (count_occurrences): Same. (regs_set_between_p): Same. (modified_between_p): Same. (modified_in_p): Same. (volatile_insn_p): Same. (volatile_refs_p): Same. (side_effects_p): Same. (may_trap_p): Same. (inequality_comparisons_p): Same. (replace_regs): Same. (computed_jump_p_1): Same. * rtl.c (DEF_MACHMODE): Change all definitions to accept 8th argument. (inner_mode_array): New. (copy_rtx): Handle vectors. (copy_most_rtx): Same. (rtx_equal_p): Same. (get_mode_alignment): Adjust for vectors. * resource.c (mark_referenced_resources): Handle vectors. (mark_set_resources): Same. * reload1.c (eliminate_regs): Handle vectors. (elimination_effects): Same. (scan_paradoxical_subregs): Same. * reload.c (subst_reg_equivs): Handle vectors. * regrename.c (scan_rtx): Handle vectors. * regclass.c (reg_scan_mark_refs): Handle vectors. * recog.c (find_single_use_1): Handle vectors. * local-alloc.c (equiv_init_varies_p): Handle vectors. (contains_replace_regs): Same. (memref_referenced_p): Same. * integrate.c (copy_rtx_and_substitute): Handle vectors. (subst_constants): Same. * genattrtab.c (attr_copy_rtx): Handle vectors. (encode_units_mask): Same. (clear_struct_flag): Same. (count_sub_rtxs): Same. * gcse.c (want_to_gcse_p): Handle vectors. (oprs_unchanged_p): Same. (hash_expr_1): Same. (oprs_not_set_p): Same. (expr_killed_p): Same. (compute_transp): Same. (store_ops_ok): Same. * function.c (purge_addressof_1): Do not allow paradoxical subregs of vectors. (fixup_var_refs_1): Same. (instantiate_virtual_regs_1): Same. * fold-const.c (operand_equal_p): Handle vectors. (fold): Same. (rtl_expr_nonnegative_p): Same. * flow.c (mark_used_regs): Handle vectors. * df.c (df_uses_record): Handle vectors. * cselib.c (cselib_subst_to_values): Handle vectors. (cselib_mem_conflict_p): Same. (hash_rtx): Same. * cse.c (canon_reg): Handle vectors. (fold_rt): Same. (cse_process_notes): Same. (count_reg_usage): Same. (canon_hash): Same. * alias.c (nonlocal_mentioned_p): Add case for CONST_VECTOR. * combine.c (mark_used_regs_combine): Add case for CONST_VECTOR. * emit-rtl.c (init_emit_once): Generate const0_rtx for vectors. (gen_rtx): Handle CONST_VECTOR. (gen_const_vector_0): New. (copy_rtx_if_shared): CONST_VECTORs can be shared. (reset_used_flags): Same. (copy_insn_1): Same. (initializer_constant_valid_p): Handle VECTOR_CST. * doc/c-tree.texi (Expression trees): Document VECTOR_CST. * doc/rtl.texi (Constants): Document const_vector. (CONST0_RTX): Update for vectors. (RTL sharing): Same. * print-tree.c (print_node): Add case for VECTOR_CST. * tree.h (TREE_VECTOR_CST_ELTS): New. (struct tree_vector): New. (union tree_node): Add vector node. (build_vector): Add prototype. * tree.def (VECTOR_CST): New. * tree.c (build_vector): New. * expmed.c (make_tree): Handle CONST_VECTOR. * rtl.h (CONSTANT_P): CONST_VECTORs are constants too. (CONST_VECTOR_ELT): New. (CONST_VECTOR_NUNITS): New. * machmode.h (GET_MODE_INNER): New. (DEF_MACHMODE): Accept 8th arg. * machmode.def: Add 8th argument for vector inner mode. Add inner vector modes for vectors. * rtl.def (VEC_CONST): Remove. (CONST_VECTOR): New. * expr.c (clear_storage): Allow vectors. (is_zeros_p): Handle VECTOR_CST. * varasm.c (output_constant_pool): Handle vectors. (rtx_const): Add veclo and vechi fields. (kind): Add RTX_VECTOR. (decode_rtx_const): Add case for vector. * config/rs6000/rs6000-protos.h: Add zero_constant. * config/rs6000/rs6000.c (rs6000_emit_move): Handle vector constants. Force easy vector constants into memory. (easy_vector_constant): New. (emit_easy_vector_constant): New. (rs6000_legitimize_reload_address): Do not generate bad reloads on darwin. * config/rs6000/rs6000.md ("altivec_lvx"): Reflect what instruction does. ("altivec_lvxl"): Same. (altivec_lvebx): Same. (altivec_lvehx): Same. (altivec_lvewx): Same. ("*movv4si_const0"): New. ("*movv4sf_const0"): New. ("*movv8hi_const0"): New. ("*movv16qi_const0"): New. From-SVN: r49853
2002-02-19 03:53:41 +01:00
case CONST_VECTOR:
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_INT:
case CONST:
case CONST_DOUBLE:
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
case CONST_FIXED:
i386.md ("mmx_uavgv8qi3"): Use const_vector. 2002-02-19 Aldy Hernandez <aldyh@redhat.com> * config/i386/i386.md ("mmx_uavgv8qi3"): Use const_vector. ("mmx_uavgv4hi3"): Same. ("pmulhrwv4hi3"): Same. * tree-inline.c (walk_tree): Handle vectors. * c-common.c (constant_expression_warning): Handle vectors. (overflow_warning): Same. * sched-deps.c (sched_analyze_2): Handle vectors. * rtlanal.c (rtx_unstable_p): Handle vectors. (rtx_varies_p): Same. (count_occurrences): Same. (regs_set_between_p): Same. (modified_between_p): Same. (modified_in_p): Same. (volatile_insn_p): Same. (volatile_refs_p): Same. (side_effects_p): Same. (may_trap_p): Same. (inequality_comparisons_p): Same. (replace_regs): Same. (computed_jump_p_1): Same. * rtl.c (DEF_MACHMODE): Change all definitions to accept 8th argument. (inner_mode_array): New. (copy_rtx): Handle vectors. (copy_most_rtx): Same. (rtx_equal_p): Same. (get_mode_alignment): Adjust for vectors. * resource.c (mark_referenced_resources): Handle vectors. (mark_set_resources): Same. * reload1.c (eliminate_regs): Handle vectors. (elimination_effects): Same. (scan_paradoxical_subregs): Same. * reload.c (subst_reg_equivs): Handle vectors. * regrename.c (scan_rtx): Handle vectors. * regclass.c (reg_scan_mark_refs): Handle vectors. * recog.c (find_single_use_1): Handle vectors. * local-alloc.c (equiv_init_varies_p): Handle vectors. (contains_replace_regs): Same. (memref_referenced_p): Same. * integrate.c (copy_rtx_and_substitute): Handle vectors. (subst_constants): Same. * genattrtab.c (attr_copy_rtx): Handle vectors. (encode_units_mask): Same. (clear_struct_flag): Same. (count_sub_rtxs): Same. * gcse.c (want_to_gcse_p): Handle vectors. (oprs_unchanged_p): Same. (hash_expr_1): Same. (oprs_not_set_p): Same. (expr_killed_p): Same. (compute_transp): Same. (store_ops_ok): Same. * function.c (purge_addressof_1): Do not allow paradoxical subregs of vectors. (fixup_var_refs_1): Same. (instantiate_virtual_regs_1): Same. * fold-const.c (operand_equal_p): Handle vectors. (fold): Same. (rtl_expr_nonnegative_p): Same. * flow.c (mark_used_regs): Handle vectors. * df.c (df_uses_record): Handle vectors. * cselib.c (cselib_subst_to_values): Handle vectors. (cselib_mem_conflict_p): Same. (hash_rtx): Same. * cse.c (canon_reg): Handle vectors. (fold_rt): Same. (cse_process_notes): Same. (count_reg_usage): Same. (canon_hash): Same. * alias.c (nonlocal_mentioned_p): Add case for CONST_VECTOR. * combine.c (mark_used_regs_combine): Add case for CONST_VECTOR. * emit-rtl.c (init_emit_once): Generate const0_rtx for vectors. (gen_rtx): Handle CONST_VECTOR. (gen_const_vector_0): New. (copy_rtx_if_shared): CONST_VECTORs can be shared. (reset_used_flags): Same. (copy_insn_1): Same. (initializer_constant_valid_p): Handle VECTOR_CST. * doc/c-tree.texi (Expression trees): Document VECTOR_CST. * doc/rtl.texi (Constants): Document const_vector. (CONST0_RTX): Update for vectors. (RTL sharing): Same. * print-tree.c (print_node): Add case for VECTOR_CST. * tree.h (TREE_VECTOR_CST_ELTS): New. (struct tree_vector): New. (union tree_node): Add vector node. (build_vector): Add prototype. * tree.def (VECTOR_CST): New. * tree.c (build_vector): New. * expmed.c (make_tree): Handle CONST_VECTOR. * rtl.h (CONSTANT_P): CONST_VECTORs are constants too. (CONST_VECTOR_ELT): New. (CONST_VECTOR_NUNITS): New. * machmode.h (GET_MODE_INNER): New. (DEF_MACHMODE): Accept 8th arg. * machmode.def: Add 8th argument for vector inner mode. Add inner vector modes for vectors. * rtl.def (VEC_CONST): Remove. (CONST_VECTOR): New. * expr.c (clear_storage): Allow vectors. (is_zeros_p): Handle VECTOR_CST. * varasm.c (output_constant_pool): Handle vectors. (rtx_const): Add veclo and vechi fields. (kind): Add RTX_VECTOR. (decode_rtx_const): Add case for vector. * config/rs6000/rs6000-protos.h: Add zero_constant. * config/rs6000/rs6000.c (rs6000_emit_move): Handle vector constants. Force easy vector constants into memory. (easy_vector_constant): New. (emit_easy_vector_constant): New. (rs6000_legitimize_reload_address): Do not generate bad reloads on darwin. * config/rs6000/rs6000.md ("altivec_lvx"): Reflect what instruction does. ("altivec_lvxl"): Same. (altivec_lvebx): Same. (altivec_lvehx): Same. (altivec_lvewx): Same. ("*movv4si_const0"): New. ("*movv4sf_const0"): New. ("*movv8hi_const0"): New. ("*movv16qi_const0"): New. From-SVN: r49853
2002-02-19 03:53:41 +01:00
case CONST_VECTOR:
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
/* case TRAP_IF: This isn't clear yet. */
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. */
case CONST_INT:
case CONST_DOUBLE:
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
case CONST_FIXED:
i386.md ("mmx_uavgv8qi3"): Use const_vector. 2002-02-19 Aldy Hernandez <aldyh@redhat.com> * config/i386/i386.md ("mmx_uavgv8qi3"): Use const_vector. ("mmx_uavgv4hi3"): Same. ("pmulhrwv4hi3"): Same. * tree-inline.c (walk_tree): Handle vectors. * c-common.c (constant_expression_warning): Handle vectors. (overflow_warning): Same. * sched-deps.c (sched_analyze_2): Handle vectors. * rtlanal.c (rtx_unstable_p): Handle vectors. (rtx_varies_p): Same. (count_occurrences): Same. (regs_set_between_p): Same. (modified_between_p): Same. (modified_in_p): Same. (volatile_insn_p): Same. (volatile_refs_p): Same. (side_effects_p): Same. (may_trap_p): Same. (inequality_comparisons_p): Same. (replace_regs): Same. (computed_jump_p_1): Same. * rtl.c (DEF_MACHMODE): Change all definitions to accept 8th argument. (inner_mode_array): New. (copy_rtx): Handle vectors. (copy_most_rtx): Same. (rtx_equal_p): Same. (get_mode_alignment): Adjust for vectors. * resource.c (mark_referenced_resources): Handle vectors. (mark_set_resources): Same. * reload1.c (eliminate_regs): Handle vectors. (elimination_effects): Same. (scan_paradoxical_subregs): Same. * reload.c (subst_reg_equivs): Handle vectors. * regrename.c (scan_rtx): Handle vectors. * regclass.c (reg_scan_mark_refs): Handle vectors. * recog.c (find_single_use_1): Handle vectors. * local-alloc.c (equiv_init_varies_p): Handle vectors. (contains_replace_regs): Same. (memref_referenced_p): Same. * integrate.c (copy_rtx_and_substitute): Handle vectors. (subst_constants): Same. * genattrtab.c (attr_copy_rtx): Handle vectors. (encode_units_mask): Same. (clear_struct_flag): Same. (count_sub_rtxs): Same. * gcse.c (want_to_gcse_p): Handle vectors. (oprs_unchanged_p): Same. (hash_expr_1): Same. (oprs_not_set_p): Same. (expr_killed_p): Same. (compute_transp): Same. (store_ops_ok): Same. * function.c (purge_addressof_1): Do not allow paradoxical subregs of vectors. (fixup_var_refs_1): Same. (instantiate_virtual_regs_1): Same. * fold-const.c (operand_equal_p): Handle vectors. (fold): Same. (rtl_expr_nonnegative_p): Same. * flow.c (mark_used_regs): Handle vectors. * df.c (df_uses_record): Handle vectors. * cselib.c (cselib_subst_to_values): Handle vectors. (cselib_mem_conflict_p): Same. (hash_rtx): Same. * cse.c (canon_reg): Handle vectors. (fold_rt): Same. (cse_process_notes): Same. (count_reg_usage): Same. (canon_hash): Same. * alias.c (nonlocal_mentioned_p): Add case for CONST_VECTOR. * combine.c (mark_used_regs_combine): Add case for CONST_VECTOR. * emit-rtl.c (init_emit_once): Generate const0_rtx for vectors. (gen_rtx): Handle CONST_VECTOR. (gen_const_vector_0): New. (copy_rtx_if_shared): CONST_VECTORs can be shared. (reset_used_flags): Same. (copy_insn_1): Same. (initializer_constant_valid_p): Handle VECTOR_CST. * doc/c-tree.texi (Expression trees): Document VECTOR_CST. * doc/rtl.texi (Constants): Document const_vector. (CONST0_RTX): Update for vectors. (RTL sharing): Same. * print-tree.c (print_node): Add case for VECTOR_CST. * tree.h (TREE_VECTOR_CST_ELTS): New. (struct tree_vector): New. (union tree_node): Add vector node. (build_vector): Add prototype. * tree.def (VECTOR_CST): New. * tree.c (build_vector): New. * expmed.c (make_tree): Handle CONST_VECTOR. * rtl.h (CONSTANT_P): CONST_VECTORs are constants too. (CONST_VECTOR_ELT): New. (CONST_VECTOR_NUNITS): New. * machmode.h (GET_MODE_INNER): New. (DEF_MACHMODE): Accept 8th arg. * machmode.def: Add 8th argument for vector inner mode. Add inner vector modes for vectors. * rtl.def (VEC_CONST): Remove. (CONST_VECTOR): New. * expr.c (clear_storage): Allow vectors. (is_zeros_p): Handle VECTOR_CST. * varasm.c (output_constant_pool): Handle vectors. (rtx_const): Add veclo and vechi fields. (kind): Add RTX_VECTOR. (decode_rtx_const): Add case for vector. * config/rs6000/rs6000-protos.h: Add zero_constant. * config/rs6000/rs6000.c (rs6000_emit_move): Handle vector constants. Force easy vector constants into memory. (easy_vector_constant): New. (emit_easy_vector_constant): New. (rs6000_legitimize_reload_address): Do not generate bad reloads on darwin. * config/rs6000/rs6000.md ("altivec_lvx"): Reflect what instruction does. ("altivec_lvxl"): Same. (altivec_lvebx): Same. (altivec_lvehx): Same. (altivec_lvewx): Same. ("*movv4si_const0"): New. ("*movv4sf_const0"): New. ("*movv8hi_const0"): New. ("*movv16qi_const0"): New. From-SVN: r49853
2002-02-19 03:53:41 +01:00
case CONST_VECTOR:
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:
case UNSPEC_VOLATILE:
return targetm.unspec_may_trap_p (x, flags);
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 (GET_MODE (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 (GET_MODE (x)))
return 1;
/* But often the compare has some CC mode, so check operand
modes as well. */
if (HONOR_NANS (GET_MODE (XEXP (x, 0)))
|| HONOR_NANS (GET_MODE (XEXP (x, 1))))
return 1;
break;
case EQ:
case NE:
if (HONOR_SNANS (GET_MODE (x)))
return 1;
/* Often comparison is CC mode, so check operand modes. */
if (HONOR_SNANS (GET_MODE (XEXP (x, 0)))
|| HONOR_SNANS (GET_MODE (XEXP (x, 1))))
return 1;
break;
case FIX:
/* Conversion of floating point might trap. */
if (flag_trapping_math && HONOR_NANS (GET_MODE (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:
case CONST_INT:
case CONST_DOUBLE:
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
case CONST_FIXED:
i386.md ("mmx_uavgv8qi3"): Use const_vector. 2002-02-19 Aldy Hernandez <aldyh@redhat.com> * config/i386/i386.md ("mmx_uavgv8qi3"): Use const_vector. ("mmx_uavgv4hi3"): Same. ("pmulhrwv4hi3"): Same. * tree-inline.c (walk_tree): Handle vectors. * c-common.c (constant_expression_warning): Handle vectors. (overflow_warning): Same. * sched-deps.c (sched_analyze_2): Handle vectors. * rtlanal.c (rtx_unstable_p): Handle vectors. (rtx_varies_p): Same. (count_occurrences): Same. (regs_set_between_p): Same. (modified_between_p): Same. (modified_in_p): Same. (volatile_insn_p): Same. (volatile_refs_p): Same. (side_effects_p): Same. (may_trap_p): Same. (inequality_comparisons_p): Same. (replace_regs): Same. (computed_jump_p_1): Same. * rtl.c (DEF_MACHMODE): Change all definitions to accept 8th argument. (inner_mode_array): New. (copy_rtx): Handle vectors. (copy_most_rtx): Same. (rtx_equal_p): Same. (get_mode_alignment): Adjust for vectors. * resource.c (mark_referenced_resources): Handle vectors. (mark_set_resources): Same. * reload1.c (eliminate_regs): Handle vectors. (elimination_effects): Same. (scan_paradoxical_subregs): Same. * reload.c (subst_reg_equivs): Handle vectors. * regrename.c (scan_rtx): Handle vectors. * regclass.c (reg_scan_mark_refs): Handle vectors. * recog.c (find_single_use_1): Handle vectors. * local-alloc.c (equiv_init_varies_p): Handle vectors. (contains_replace_regs): Same. (memref_referenced_p): Same. * integrate.c (copy_rtx_and_substitute): Handle vectors. (subst_constants): Same. * genattrtab.c (attr_copy_rtx): Handle vectors. (encode_units_mask): Same. (clear_struct_flag): Same. (count_sub_rtxs): Same. * gcse.c (want_to_gcse_p): Handle vectors. (oprs_unchanged_p): Same. (hash_expr_1): Same. (oprs_not_set_p): Same. (expr_killed_p): Same. (compute_transp): Same. (store_ops_ok): Same. * function.c (purge_addressof_1): Do not allow paradoxical subregs of vectors. (fixup_var_refs_1): Same. (instantiate_virtual_regs_1): Same. * fold-const.c (operand_equal_p): Handle vectors. (fold): Same. (rtl_expr_nonnegative_p): Same. * flow.c (mark_used_regs): Handle vectors. * df.c (df_uses_record): Handle vectors. * cselib.c (cselib_subst_to_values): Handle vectors. (cselib_mem_conflict_p): Same. (hash_rtx): Same. * cse.c (canon_reg): Handle vectors. (fold_rt): Same. (cse_process_notes): Same. (count_reg_usage): Same. (canon_hash): Same. * alias.c (nonlocal_mentioned_p): Add case for CONST_VECTOR. * combine.c (mark_used_regs_combine): Add case for CONST_VECTOR. * emit-rtl.c (init_emit_once): Generate const0_rtx for vectors. (gen_rtx): Handle CONST_VECTOR. (gen_const_vector_0): New. (copy_rtx_if_shared): CONST_VECTORs can be shared. (reset_used_flags): Same. (copy_insn_1): Same. (initializer_constant_valid_p): Handle VECTOR_CST. * doc/c-tree.texi (Expression trees): Document VECTOR_CST. * doc/rtl.texi (Constants): Document const_vector. (CONST0_RTX): Update for vectors. (RTL sharing): Same. * print-tree.c (print_node): Add case for VECTOR_CST. * tree.h (TREE_VECTOR_CST_ELTS): New. (struct tree_vector): New. (union tree_node): Add vector node. (build_vector): Add prototype. * tree.def (VECTOR_CST): New. * tree.c (build_vector): New. * expmed.c (make_tree): Handle CONST_VECTOR. * rtl.h (CONSTANT_P): CONST_VECTORs are constants too. (CONST_VECTOR_ELT): New. (CONST_VECTOR_NUNITS): New. * machmode.h (GET_MODE_INNER): New. (DEF_MACHMODE): Accept 8th arg. * machmode.def: Add 8th argument for vector inner mode. Add inner vector modes for vectors. * rtl.def (VEC_CONST): Remove. (CONST_VECTOR): New. * expr.c (clear_storage): Allow vectors. (is_zeros_p): Handle VECTOR_CST. * varasm.c (output_constant_pool): Handle vectors. (rtx_const): Add veclo and vechi fields. (kind): Add RTX_VECTOR. (decode_rtx_const): Add case for vector. * config/rs6000/rs6000-protos.h: Add zero_constant. * config/rs6000/rs6000.c (rs6000_emit_move): Handle vector constants. Force easy vector constants into memory. (easy_vector_constant): New. (emit_easy_vector_constant): New. (rs6000_legitimize_reload_address): Do not generate bad reloads on darwin. * config/rs6000/rs6000.md ("altivec_lvx"): Reflect what instruction does. ("altivec_lvxl"): Same. (altivec_lvebx): Same. (altivec_lvehx): Same. (altivec_lvewx): Same. ("*movv4si_const0"): New. ("*movv4sf_const0"): New. ("*movv8hi_const0"): New. ("*movv16qi_const0"): New. From-SVN: r49853
2002-02-19 03:53:41 +01:00
case CONST_VECTOR:
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
/* The following prevents loops occurrence when we change MEM in
CONST_DOUBLE onto the same CONST_DOUBLE. */
if (x != 0 && GET_CODE (x) == CONST_DOUBLE)
return x;
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 *X with the new one.
DATA is a REPLACE_LABEL_DATA containing the old and new labels. */
int
replace_label (rtx *x, void *data)
{
rtx l = *x;
rtx old_label = ((replace_label_data *) data)->r1;
rtx new_label = ((replace_label_data *) data)->r2;
bool update_label_nuses = ((replace_label_data *) data)->update_label_nuses;
if (l == NULL_RTX)
return 0;
if (GET_CODE (l) == SYMBOL_REF
&& CONSTANT_POOL_ADDRESS_P (l))
{
rtx c = get_pool_constant (l);
if (rtx_referenced_p (old_label, c))
{
rtx new_c, new_l;
replace_label_data *d = (replace_label_data *) data;
/* Create a copy of constant C; replace the label inside
but do not update LABEL_NUSES because uses in constant pool
are not counted. */
new_c = copy_rtx (c);
d->update_label_nuses = false;
for_each_rtx (&new_c, replace_label, data);
d->update_label_nuses = update_label_nuses;
/* Add the new constant NEW_C to constant pool and replace
the old reference to constant by new reference. */
new_l = XEXP (force_const_mem (get_pool_mode (l), new_c), 0);
*x = replace_rtx (l, l, new_l);
}
return 0;
}
/* If this is a JUMP_INSN, then we also need to fix the JUMP_LABEL
field. This is not handled by for_each_rtx because it doesn't
handle unprinted ('0') fields. */
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 (l) && JUMP_LABEL (l) == old_label)
JUMP_LABEL (l) = new_label;
if ((GET_CODE (l) == LABEL_REF
|| GET_CODE (l) == INSN_LIST)
&& XEXP (l, 0) == old_label)
{
XEXP (l, 0) = new_label;
if (update_label_nuses)
{
++LABEL_NUSES (new_label);
--LABEL_NUSES (old_label);
}
return 0;
}
return 0;
}
/* When *BODY is equal to X or X is directly referenced by *BODY
return nonzero, thus FOR_EACH_RTX stops traversing and returns nonzero
too, otherwise FOR_EACH_RTX continues traversing *BODY. */
static int
rtx_referenced_p_1 (rtx *body, void *x)
{
rtx y = (rtx) x;
if (*body == NULL_RTX)
return y == NULL_RTX;
/* Return true if a label_ref *BODY refers to label Y. */
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 (GET_CODE (*body) == LABEL_REF && LABEL_P (y))
return XEXP (*body, 0) == y;
/* If *BODY is a reference to pool constant traverse the constant. */
if (GET_CODE (*body) == SYMBOL_REF
&& CONSTANT_POOL_ADDRESS_P (*body))
return rtx_referenced_p (y, get_pool_constant (*body));
/* By default, compare the RTL expressions. */
return rtx_equal_p (*body, y);
}
/* Return true if X is referenced in BODY. */
int
rtx_referenced_p (rtx x, rtx body)
{
return for_each_rtx (&body, rtx_referenced_p_1, x);
}
/* 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
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
tablejump_p (const_rtx insn, rtx *labelp, rtx *tablep)
{
rtx label, table;
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)
&& (label = JUMP_LABEL (insn)) != NULL_RTX
&& (table = next_active_insn (label)) != NULL_RTX
&& JUMP_TABLE_DATA_P (table))
{
if (labelp)
*labelp = label;
if (tablep)
*tablep = 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:
case CONST_INT:
case CONST_DOUBLE:
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
case CONST_FIXED:
i386.md ("mmx_uavgv8qi3"): Use const_vector. 2002-02-19 Aldy Hernandez <aldyh@redhat.com> * config/i386/i386.md ("mmx_uavgv8qi3"): Use const_vector. ("mmx_uavgv4hi3"): Same. ("pmulhrwv4hi3"): Same. * tree-inline.c (walk_tree): Handle vectors. * c-common.c (constant_expression_warning): Handle vectors. (overflow_warning): Same. * sched-deps.c (sched_analyze_2): Handle vectors. * rtlanal.c (rtx_unstable_p): Handle vectors. (rtx_varies_p): Same. (count_occurrences): Same. (regs_set_between_p): Same. (modified_between_p): Same. (modified_in_p): Same. (volatile_insn_p): Same. (volatile_refs_p): Same. (side_effects_p): Same. (may_trap_p): Same. (inequality_comparisons_p): Same. (replace_regs): Same. (computed_jump_p_1): Same. * rtl.c (DEF_MACHMODE): Change all definitions to accept 8th argument. (inner_mode_array): New. (copy_rtx): Handle vectors. (copy_most_rtx): Same. (rtx_equal_p): Same. (get_mode_alignment): Adjust for vectors. * resource.c (mark_referenced_resources): Handle vectors. (mark_set_resources): Same. * reload1.c (eliminate_regs): Handle vectors. (elimination_effects): Same. (scan_paradoxical_subregs): Same. * reload.c (subst_reg_equivs): Handle vectors. * regrename.c (scan_rtx): Handle vectors. * regclass.c (reg_scan_mark_refs): Handle vectors. * recog.c (find_single_use_1): Handle vectors. * local-alloc.c (equiv_init_varies_p): Handle vectors. (contains_replace_regs): Same. (memref_referenced_p): Same. * integrate.c (copy_rtx_and_substitute): Handle vectors. (subst_constants): Same. * genattrtab.c (attr_copy_rtx): Handle vectors. (encode_units_mask): Same. (clear_struct_flag): Same. (count_sub_rtxs): Same. * gcse.c (want_to_gcse_p): Handle vectors. (oprs_unchanged_p): Same. (hash_expr_1): Same. (oprs_not_set_p): Same. (expr_killed_p): Same. (compute_transp): Same. (store_ops_ok): Same. * function.c (purge_addressof_1): Do not allow paradoxical subregs of vectors. (fixup_var_refs_1): Same. (instantiate_virtual_regs_1): Same. * fold-const.c (operand_equal_p): Handle vectors. (fold): Same. (rtl_expr_nonnegative_p): Same. * flow.c (mark_used_regs): Handle vectors. * df.c (df_uses_record): Handle vectors. * cselib.c (cselib_subst_to_values): Handle vectors. (cselib_mem_conflict_p): Same. (hash_rtx): Same. * cse.c (canon_reg): Handle vectors. (fold_rt): Same. (cse_process_notes): Same. (count_reg_usage): Same. (canon_hash): Same. * alias.c (nonlocal_mentioned_p): Add case for CONST_VECTOR. * combine.c (mark_used_regs_combine): Add case for CONST_VECTOR. * emit-rtl.c (init_emit_once): Generate const0_rtx for vectors. (gen_rtx): Handle CONST_VECTOR. (gen_const_vector_0): New. (copy_rtx_if_shared): CONST_VECTORs can be shared. (reset_used_flags): Same. (copy_insn_1): Same. (initializer_constant_valid_p): Handle VECTOR_CST. * doc/c-tree.texi (Expression trees): Document VECTOR_CST. * doc/rtl.texi (Constants): Document const_vector. (CONST0_RTX): Update for vectors. (RTL sharing): Same. * print-tree.c (print_node): Add case for VECTOR_CST. * tree.h (TREE_VECTOR_CST_ELTS): New. (struct tree_vector): New. (union tree_node): Add vector node. (build_vector): Add prototype. * tree.def (VECTOR_CST): New. * tree.c (build_vector): New. * expmed.c (make_tree): Handle CONST_VECTOR. * rtl.h (CONSTANT_P): CONST_VECTORs are constants too. (CONST_VECTOR_ELT): New. (CONST_VECTOR_NUNITS): New. * machmode.h (GET_MODE_INNER): New. (DEF_MACHMODE): Accept 8th arg. * machmode.def: Add 8th argument for vector inner mode. Add inner vector modes for vectors. * rtl.def (VEC_CONST): Remove. (CONST_VECTOR): New. * expr.c (clear_storage): Allow vectors. (is_zeros_p): Handle VECTOR_CST. * varasm.c (output_constant_pool): Handle vectors. (rtx_const): Add veclo and vechi fields. (kind): Add RTX_VECTOR. (decode_rtx_const): Add case for vector. * config/rs6000/rs6000-protos.h: Add zero_constant. * config/rs6000/rs6000.c (rs6000_emit_move): Handle vector constants. Force easy vector constants into memory. (easy_vector_constant): New. (emit_easy_vector_constant): New. (rs6000_legitimize_reload_address): Do not generate bad reloads on darwin. * config/rs6000/rs6000.md ("altivec_lvx"): Reflect what instruction does. ("altivec_lvxl"): Same. (altivec_lvebx): Same. (altivec_lvehx): Same. (altivec_lvewx): Same. ("*movv4si_const0"): New. ("*movv4sf_const0"): New. ("*movv8hi_const0"): New. ("*movv16qi_const0"): New. From-SVN: r49853
2002-02-19 03:53:41 +01:00
case CONST_VECTOR:
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
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 (const_rtx 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;
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;
}
/* Optimized loop of for_each_rtx, trying to avoid useless recursive
calls. Processes the subexpressions of EXP and passes them to F. */
static int
for_each_rtx_1 (rtx exp, int n, rtx_function f, void *data)
{
int result, i, j;
const char *format = GET_RTX_FORMAT (GET_CODE (exp));
rtx *x;
for (; format[n] != '\0'; n++)
{
switch (format[n])
{
case 'e':
/* Call F on X. */
x = &XEXP (exp, n);
result = (*f) (x, data);
if (result == -1)
/* Do not traverse sub-expressions. */
continue;
else if (result != 0)
/* Stop the traversal. */
return result;
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 (*x == NULL_RTX)
/* There are no sub-expressions. */
continue;
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
i = non_rtx_starting_operands[GET_CODE (*x)];
if (i >= 0)
{
result = for_each_rtx_1 (*x, i, f, data);
if (result != 0)
return result;
}
break;
case 'V':
case 'E':
if (XVEC (exp, n) == 0)
continue;
for (j = 0; j < XVECLEN (exp, n); ++j)
{
/* Call F on X. */
x = &XVECEXP (exp, n, j);
result = (*f) (x, data);
if (result == -1)
/* Do not traverse sub-expressions. */
continue;
else if (result != 0)
/* Stop the traversal. */
return result;
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 (*x == NULL_RTX)
/* There are no sub-expressions. */
continue;
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
i = non_rtx_starting_operands[GET_CODE (*x)];
if (i >= 0)
{
result = for_each_rtx_1 (*x, i, f, data);
if (result != 0)
return result;
}
}
break;
default:
/* Nothing to do. */
break;
}
}
return 0;
}
/* Traverse X via depth-first search, calling F for each
sub-expression (including X itself). F is also passed the DATA.
If F returns -1, do not traverse sub-expressions, but continue
traversing the rest of the tree. If F ever returns any other
nonzero value, stop the traversal, and return the value returned
by F. Otherwise, return 0. This function does not traverse inside
tree structure that contains RTX_EXPRs, or into sub-expressions
whose format code is `0' since it is not known whether or not those
codes are actually RTL.
This routine is very general, and could (should?) be used to
implement many of the other routines in this file. */
int
for_each_rtx (rtx *x, rtx_function f, void *data)
{
int result;
int i;
/* Call F on X. */
result = (*f) (x, data);
if (result == -1)
/* Do not traverse sub-expressions. */
return 0;
else if (result != 0)
/* Stop the traversal. */
return result;
if (*x == NULL_RTX)
/* There are no sub-expressions. */
return 0;
i = non_rtx_starting_operands[GET_CODE (*x)];
if (i < 0)
return 0;
return for_each_rtx_1 (*x, i, f, data);
}
rtl.h (insn_first_p): Declare. * rtl.h (insn_first_p): Declare. * rtlanal.c (insn_first_p): New function. * loop.h (varray.h): Include. (struct induction): Change combined_with to unsigned. New members derived, ix and last_use. (reg_iv_type, reg_iv_info): Now varray_type. All references changed. (REG_IV_TYPE, REG_IV_INFO): Define. (first_increment_giv, last_increment_giv): Declare. * loop.c (loop_number_loop_cont): New static variable. (loop_number_cont_dominator): Likewise. (reg_iv_type, reg_iv_info): Now varray_type. (first_increment_giv, last_increment_giv): New variables. (compute_luids, verify_dominator, find_life_end): New functions. (cmp_recombine_givs_stats, recombine_givs): Likewise. (loop_optimize): Allocate loop_number_loop_cont and loop_number_cont_dominator. Use compute_luids. (find_and_verify_loops): Initialize loop_number_loop_cont and loop_number_cont_dominator. (strength_reduce): Try to find bivs that can be expressed as givs of another biv, and to convert biv increments into givs. Call recombine_givs. Handle derived givs. (record_biv): New argument location. All callers changed. (record_giv): Initialize derived and last_use fields. (basic_induction_var): New argument location. All callers changed. (combine_givs): Don't combine a DEST_REG giv with a DEST_ADDR giv. Increment combined_with instead of setting to 1. * unroll.c (derived_regs): New static variable. (unroll_loop): Initialize it. Allocate local_regno according to max_reg_num. (copy_loop_body): Cope with derived givs. (find_splittable_givs): Check for Givs made from biv increments. Set derived_regs for givs. * Makefile.in (stmt.o, loop.o, unroll.o): Depend on loop.h . From-SVN: r24889
1999-01-27 16:45:50 +01:00
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
/* Data structure that holds the internal state communicated between
for_each_inc_dec, for_each_inc_dec_find_mem and
for_each_inc_dec_find_inc_dec. */
struct for_each_inc_dec_ops {
/* The function to be called for each autoinc operation found. */
for_each_inc_dec_fn fn;
/* The opaque argument to be passed to it. */
void *arg;
/* The MEM we're visiting, if any. */
rtx mem;
};
static int for_each_inc_dec_find_mem (rtx *r, void *d);
/* Find PRE/POST-INC/DEC/MODIFY operations within *R, extract the
operands of the equivalent add insn and pass the result to the
operator specified by *D. */
static int
for_each_inc_dec_find_inc_dec (rtx *r, void *d)
{
rtx x = *r;
struct for_each_inc_dec_ops *data = (struct for_each_inc_dec_ops *)d;
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 (data->mem));
rtx r1 = XEXP (x, 0);
rtx c = gen_int_mode (size, GET_MODE (r1));
return data->fn (data->mem, x, r1, r1, c, data->arg);
}
case PRE_DEC:
case POST_DEC:
{
int size = GET_MODE_SIZE (GET_MODE (data->mem));
rtx r1 = XEXP (x, 0);
rtx c = gen_int_mode (-size, GET_MODE (r1));
return data->fn (data->mem, x, r1, r1, c, data->arg);
}
case PRE_MODIFY:
case POST_MODIFY:
{
rtx r1 = XEXP (x, 0);
rtx add = XEXP (x, 1);
return data->fn (data->mem, x, r1, add, NULL, data->arg);
}
case MEM:
{
rtx save = data->mem;
int ret = for_each_inc_dec_find_mem (r, d);
data->mem = save;
return ret;
}
default:
return 0;
}
}
/* If *R is a MEM, find PRE/POST-INC/DEC/MODIFY operations within its
address, extract the operands of the equivalent add insn and pass
the result to the operator specified by *D. */
static int
for_each_inc_dec_find_mem (rtx *r, void *d)
{
rtx x = *r;
if (x != NULL_RTX && MEM_P (x))
{
struct for_each_inc_dec_ops *data = (struct for_each_inc_dec_ops *) d;
int result;
data->mem = x;
result = for_each_rtx (&XEXP (x, 0), for_each_inc_dec_find_inc_dec,
data);
if (result)
return result;
return -1;
}
return 0;
}
/* Traverse *X looking for MEMs, and for autoinc operations within
them. For each such autoinc operation found, call FN, passing it
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 ARG. FN is to return -1 to skip looking for other
autoinc operations within the visited operation, 0 to continue the
traversal, or any other value to have it returned to the caller of
for_each_inc_dec. */
int
for_each_inc_dec (rtx *x,
for_each_inc_dec_fn fn,
void *arg)
{
struct for_each_inc_dec_ops data;
data.fn = fn;
data.arg = arg;
data.mem = NULL;
return for_each_rtx (x, for_each_inc_dec_find_mem, &data);
}
/* 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;
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;
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
subreg_lsb_1 (enum machine_mode outer_mode,
enum 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. */
void
subreg_get_info (unsigned int xregno, enum machine_mode xmode,
unsigned int offset, enum 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))
{
enum 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;
}
}
/* 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
subreg_regno_offset (unsigned int xregno, enum machine_mode xmode,
unsigned int offset, enum 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
subreg_offset_representable_p (unsigned int xregno, enum machine_mode xmode,
unsigned int offset, enum 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
simplify_subreg_regno (unsigned int xregno, enum machine_mode xmode,
unsigned int offset, enum 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
&& REG_CANNOT_CHANGE_MODE_P (xregno, xmode, ymode))
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;
if (xregno == STACK_POINTER_REGNUM)
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
find_first_parameter_load (rtx call_insn, rtx boundary)
{
struct parms_set_data parm;
rtx p, 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
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
keep_with_call_p (const_rtx 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. */
system.h (CONST_CAST2, [...]): New macros for type-specific casts. * system.h (CONST_CAST2, CONST_CAST_TREE, CONST_CAST_RTX, CONST_CAST_BB): New macros for type-specific casts. (CONST_CAST): Add a TYPE parameter and define it in terms of CONST_CAST2. * c-decl.c (c_make_fname_decl): Supply a TYPE for CONST_CAST. * c-lex.c (cb_ident, lex_string): Likewise, * c-typeck.c (free_all_tagged_tu_seen_up_to): Likewise, * config/i386/i386.c (ix86_function_regparm, ix86_function_sseregparm): Use CONST_CAST_TREE. * config/mmix/mmix.c (mmix_encode_section_info): Supply a TYPE for CONST_CAST. * gcc.c (set_spec, read_specs, for_each_path, execute, do_spec_1, give_switch, set_multilib_dir): Likewise, * gengtype-parse.c (string_seq, typedef_name): Likewise, * gimple-low.c (block_may_fallthru): Use CONST_CAST_TREE. * jump.c (reversed_comparison_code_parts): Use CONST_CAST_RTX. * passes.c (execute_one_pass): Supply a TYPE for CONST_CAST. * prefix.c (update_path): Likewise, * pretty-print.c (pp_base_destroy_prefix): Likewise, * rtlanal.c (keep_with_call_p): Use CONST_CAST_RTX. * tree-cfg.c (tree_can_merge_blocks_p, tree_block_ends_with_condjump_p): Use CONST_CAST_BB. * tree-eh.c (lookup_stmt_eh_region_fn): USe CONST_CAST_TREE. * tree.c (build_string): Supply a TYPE for CONST_CAST. (attribute_list_contained): Use CONST_CAST_TREE. cp: * call.c (name_as_c_string): Supply a TYPE for CONST_CAST. * decl.c (cp_make_fname_decl): Likewise, * parser.c (cp_parser_string_literal): Likewise, * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE. * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p): Likewise, fortran: * gfortranspec.c (lang_specific_driver): Use CONST_CAST2. * options.c (gfc_post_options): Supply a TYPE for CONST_CAST. * parse.c (parse_omp_structured_block): Likewise, * st.c (gfc_free_statement): Likewise, java: * jcf-parse.c (read_class, java_parse_file): Supply a TYPE for CONST_CAST. * jcf.h (JCF_FINISH): Likewise. From-SVN: r128051
2007-09-03 19:09:20 +02:00
const_rtx i2 = next_nonnote_insn (CONST_CAST_RTX(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
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
label_is_jump_target_p (const_rtx label, const_rtx jump_insn)
{
rtx tmp = JUMP_LABEL (jump_insn);
if (label == tmp)
return true;
if (tablejump_p (jump_insn, NULL, &tmp))
{
rtvec vec = XVEC (PATTERN (tmp),
GET_CODE (PATTERN (tmp)) == ADDR_DIFF_VEC);
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
SPEED parameter specify whether costs optimized for speed or size should
be returned. */
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
rtx_cost (rtx x, enum rtx_code outer_code ATTRIBUTE_UNUSED, bool speed)
{
int i, j;
enum rtx_code code;
const char *fmt;
int total;
if (x == 0)
return 0;
/* Compute the default costs of certain things.
Note that targetm.rtx_costs can override the defaults. */
code = GET_CODE (x);
switch (code)
{
case MULT:
total = COSTS_N_INSNS (5);
break;
case DIV:
case UDIV:
case MOD:
case UMOD:
total = COSTS_N_INSNS (7);
break;
case USE:
/* Used in combine.c as a marker. */
total = 0;
break;
default:
total = 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
+ GET_MODE_SIZE (GET_MODE (x)) / UNITS_PER_WORD);
break;
default:
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
if (targetm.rtx_costs (x, code, outer_code, &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')
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
total += rtx_cost (XEXP (x, i), code, speed);
else if (fmt[i] == 'E')
for (j = 0; j < XVECLEN (x, i); j++)
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
total += rtx_cost (XVECEXP (x, i, j), code, speed);
return total;
}
/* Fill in the structure C with information about both speed and size rtx
costs for X, with outer code OUTER. */
void
get_full_rtx_cost (rtx x, enum rtx_code outer, struct full_rtx_costs *c)
{
c->speed = rtx_cost (x, outer, true);
c->size = rtx_cost (x, outer, 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
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
address_cost (rtx x, enum 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;
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
return targetm.address_cost (x, speed);
}
/* If the target doesn't override, compute the cost as with arithmetic. */
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
default_address_cost (rtx x, bool speed)
{
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
return rtx_cost (x, MEM, speed);
}
unsigned HOST_WIDE_INT
attribs.c (hash_attr, [...]): Constify. * attribs.c (hash_attr, eq_attr, init_attributes): Constify. * builtins.c (validate_arg, builtin_mathfn_code, validate_arglist): Likewise. * calls.c (call_expr_flags): Likewise. * combine.c (reg_nonzero_bits_for_combine, reg_num_sign_bit_copies_for_combine, get_last_value, reg_truncated_to_mode): Likewise. * emit-rtl.c (subreg_lowpart_p): Likewise. * expr.c (highest_pow2_factor_for_target, categorize_ctor_elements_1, categorize_ctor_elements, count_type_elements, contains_packed_reference, highest_pow2_factor, highest_pow2_factor_for_target): Likewise. * fold-const.c (may_negate_without_overflow_p, int_const_binop, fold_convertible_p, operand_equal_p, tree_swap_operands_p, native_encode_int, native_encode_real, native_encode_complex, native_encode_vector, native_encode_expr, native_interpret_int, native_interpret_real, native_interpret_complex, native_interpret_vector, native_interpret_expr): Likewise. * function.c (use_register_for_decl): Likewise. * gimplify.c (get_name): Likewise. * langhooks-def.h (lhd_return_null_const_tree): New. (LANG_HOOKS_GET_CALLEE_FNDECL): Use it. * langhooks.c (lhd_return_null_const_tree): New. * langhooks.h (lang_get_callee_fndecl): Constify. * output.h (constructor_static_from_elts_p): Likewise. * rtl-factoring.c (gen_symbol_ref_rtx_for_label): Likewise. * rtl.h (nonzero_bits, num_sign_bit_copies, truncated_to_mode, subreg_lowpart_p, noop_move_p, struct rtl_hooks): Likewise. * rtlanal.c (cached_nonzero_bits, nonzero_bits1, cached_num_sign_bit_copies, num_sign_bit_copies1, noop_move_p, nonzero_bits, num_sign_bit_copies, truncated_to_mode): Likewise. * rtlhooks-def.h (reg_nonzero_bits_general, reg_num_sign_bit_copies_general, reg_truncated_to_mode_general): Likewise. * rtlhooks.c (reg_num_sign_bit_copies_general, reg_nonzero_bits_general, reg_truncated_to_mode_general): Likewise. * stmt.c (warn_if_unused_value, is_body_block): Likewise. * stor-layout.c (mode_for_size_tree): Likewise. * tree-ssa-loop-im.c (memref_eq): Likewise. * tree-ssa-loop-ivopts.c (tree_int_cst_sign_bit): Likewise. * tree.c (contains_placeholder_p, type_list_equal, simple_cst_equal, get_callee_fndecl, operand_equal_for_phi_arg_p): Likewise. * tree.h (tree_int_cst_sign_bit, may_negate_without_overflow_p, mode_for_size_tree, categorize_ctor_elements, count_type_elements, contains_placeholder_p, contains_packed_reference, get_callee_fndecl, operand_equal_for_phi_arg_p, warn_if_unused_value, is_body_block, native_encode_expr, native_interpret_expr, fold_convertible_p, operand_equal_p, int_const_binop, tree_swap_operands_p, builtin_mathfn_code, validate_arglist, simple_cst_equal, type_list_equal, use_register_for_decl, call_expr_flags, get_name, highest_pow2_factor): Likewise. (const_call_expr_arg_iterator_d, init_const_call_expr_arg_iterator, next_const_call_expr_arg, first_const_call_expr_arg, more_const_call_expr_args_p, FOR_EACH_CONST_CALL_EXPR_ARG): New. * varasm.c (constructor_static_from_elts_p): Constify. cp: * parser.c (eof_token): Un-constify. (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc, cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious casts. java: * lang.c (java_get_callee_fndecl): Constify. objc: * objc-act.c (objc_get_callee_fndecl): Constify. * objc-act.h (objc_get_callee_fndecl): Likewise. From-SVN: r127036
2007-07-29 07:43:43 +02:00
nonzero_bits (const_rtx x, enum machine_mode mode)
{
return cached_nonzero_bits (x, mode, NULL_RTX, VOIDmode, 0);
}
unsigned int
attribs.c (hash_attr, [...]): Constify. * attribs.c (hash_attr, eq_attr, init_attributes): Constify. * builtins.c (validate_arg, builtin_mathfn_code, validate_arglist): Likewise. * calls.c (call_expr_flags): Likewise. * combine.c (reg_nonzero_bits_for_combine, reg_num_sign_bit_copies_for_combine, get_last_value, reg_truncated_to_mode): Likewise. * emit-rtl.c (subreg_lowpart_p): Likewise. * expr.c (highest_pow2_factor_for_target, categorize_ctor_elements_1, categorize_ctor_elements, count_type_elements, contains_packed_reference, highest_pow2_factor, highest_pow2_factor_for_target): Likewise. * fold-const.c (may_negate_without_overflow_p, int_const_binop, fold_convertible_p, operand_equal_p, tree_swap_operands_p, native_encode_int, native_encode_real, native_encode_complex, native_encode_vector, native_encode_expr, native_interpret_int, native_interpret_real, native_interpret_complex, native_interpret_vector, native_interpret_expr): Likewise. * function.c (use_register_for_decl): Likewise. * gimplify.c (get_name): Likewise. * langhooks-def.h (lhd_return_null_const_tree): New. (LANG_HOOKS_GET_CALLEE_FNDECL): Use it. * langhooks.c (lhd_return_null_const_tree): New. * langhooks.h (lang_get_callee_fndecl): Constify. * output.h (constructor_static_from_elts_p): Likewise. * rtl-factoring.c (gen_symbol_ref_rtx_for_label): Likewise. * rtl.h (nonzero_bits, num_sign_bit_copies, truncated_to_mode, subreg_lowpart_p, noop_move_p, struct rtl_hooks): Likewise. * rtlanal.c (cached_nonzero_bits, nonzero_bits1, cached_num_sign_bit_copies, num_sign_bit_copies1, noop_move_p, nonzero_bits, num_sign_bit_copies, truncated_to_mode): Likewise. * rtlhooks-def.h (reg_nonzero_bits_general, reg_num_sign_bit_copies_general, reg_truncated_to_mode_general): Likewise. * rtlhooks.c (reg_num_sign_bit_copies_general, reg_nonzero_bits_general, reg_truncated_to_mode_general): Likewise. * stmt.c (warn_if_unused_value, is_body_block): Likewise. * stor-layout.c (mode_for_size_tree): Likewise. * tree-ssa-loop-im.c (memref_eq): Likewise. * tree-ssa-loop-ivopts.c (tree_int_cst_sign_bit): Likewise. * tree.c (contains_placeholder_p, type_list_equal, simple_cst_equal, get_callee_fndecl, operand_equal_for_phi_arg_p): Likewise. * tree.h (tree_int_cst_sign_bit, may_negate_without_overflow_p, mode_for_size_tree, categorize_ctor_elements, count_type_elements, contains_placeholder_p, contains_packed_reference, get_callee_fndecl, operand_equal_for_phi_arg_p, warn_if_unused_value, is_body_block, native_encode_expr, native_interpret_expr, fold_convertible_p, operand_equal_p, int_const_binop, tree_swap_operands_p, builtin_mathfn_code, validate_arglist, simple_cst_equal, type_list_equal, use_register_for_decl, call_expr_flags, get_name, highest_pow2_factor): Likewise. (const_call_expr_arg_iterator_d, init_const_call_expr_arg_iterator, next_const_call_expr_arg, first_const_call_expr_arg, more_const_call_expr_args_p, FOR_EACH_CONST_CALL_EXPR_ARG): New. * varasm.c (constructor_static_from_elts_p): Constify. cp: * parser.c (eof_token): Un-constify. (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc, cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious casts. java: * lang.c (java_get_callee_fndecl): Constify. objc: * objc-act.c (objc_get_callee_fndecl): Constify. * objc-act.h (objc_get_callee_fndecl): Likewise. From-SVN: r127036
2007-07-29 07:43:43 +02:00
num_sign_bit_copies (const_rtx x, enum 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
attribs.c (hash_attr, [...]): Constify. * attribs.c (hash_attr, eq_attr, init_attributes): Constify. * builtins.c (validate_arg, builtin_mathfn_code, validate_arglist): Likewise. * calls.c (call_expr_flags): Likewise. * combine.c (reg_nonzero_bits_for_combine, reg_num_sign_bit_copies_for_combine, get_last_value, reg_truncated_to_mode): Likewise. * emit-rtl.c (subreg_lowpart_p): Likewise. * expr.c (highest_pow2_factor_for_target, categorize_ctor_elements_1, categorize_ctor_elements, count_type_elements, contains_packed_reference, highest_pow2_factor, highest_pow2_factor_for_target): Likewise. * fold-const.c (may_negate_without_overflow_p, int_const_binop, fold_convertible_p, operand_equal_p, tree_swap_operands_p, native_encode_int, native_encode_real, native_encode_complex, native_encode_vector, native_encode_expr, native_interpret_int, native_interpret_real, native_interpret_complex, native_interpret_vector, native_interpret_expr): Likewise. * function.c (use_register_for_decl): Likewise. * gimplify.c (get_name): Likewise. * langhooks-def.h (lhd_return_null_const_tree): New. (LANG_HOOKS_GET_CALLEE_FNDECL): Use it. * langhooks.c (lhd_return_null_const_tree): New. * langhooks.h (lang_get_callee_fndecl): Constify. * output.h (constructor_static_from_elts_p): Likewise. * rtl-factoring.c (gen_symbol_ref_rtx_for_label): Likewise. * rtl.h (nonzero_bits, num_sign_bit_copies, truncated_to_mode, subreg_lowpart_p, noop_move_p, struct rtl_hooks): Likewise. * rtlanal.c (cached_nonzero_bits, nonzero_bits1, cached_num_sign_bit_copies, num_sign_bit_copies1, noop_move_p, nonzero_bits, num_sign_bit_copies, truncated_to_mode): Likewise. * rtlhooks-def.h (reg_nonzero_bits_general, reg_num_sign_bit_copies_general, reg_truncated_to_mode_general): Likewise. * rtlhooks.c (reg_num_sign_bit_copies_general, reg_nonzero_bits_general, reg_truncated_to_mode_general): Likewise. * stmt.c (warn_if_unused_value, is_body_block): Likewise. * stor-layout.c (mode_for_size_tree): Likewise. * tree-ssa-loop-im.c (memref_eq): Likewise. * tree-ssa-loop-ivopts.c (tree_int_cst_sign_bit): Likewise. * tree.c (contains_placeholder_p, type_list_equal, simple_cst_equal, get_callee_fndecl, operand_equal_for_phi_arg_p): Likewise. * tree.h (tree_int_cst_sign_bit, may_negate_without_overflow_p, mode_for_size_tree, categorize_ctor_elements, count_type_elements, contains_placeholder_p, contains_packed_reference, get_callee_fndecl, operand_equal_for_phi_arg_p, warn_if_unused_value, is_body_block, native_encode_expr, native_interpret_expr, fold_convertible_p, operand_equal_p, int_const_binop, tree_swap_operands_p, builtin_mathfn_code, validate_arglist, simple_cst_equal, type_list_equal, use_register_for_decl, call_expr_flags, get_name, highest_pow2_factor): Likewise. (const_call_expr_arg_iterator_d, init_const_call_expr_arg_iterator, next_const_call_expr_arg, first_const_call_expr_arg, more_const_call_expr_args_p, FOR_EACH_CONST_CALL_EXPR_ARG): New. * varasm.c (constructor_static_from_elts_p): Constify. cp: * parser.c (eof_token): Un-constify. (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc, cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious casts. java: * lang.c (java_get_callee_fndecl): Constify. objc: * objc-act.c (objc_get_callee_fndecl): Constify. * objc-act.h (objc_get_callee_fndecl): Likewise. From-SVN: r127036
2007-07-29 07:43:43 +02:00
cached_nonzero_bits (const_rtx x, enum machine_mode mode, const_rtx known_x,
enum 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
attribs.c (hash_attr, [...]): Constify. * attribs.c (hash_attr, eq_attr, init_attributes): Constify. * builtins.c (validate_arg, builtin_mathfn_code, validate_arglist): Likewise. * calls.c (call_expr_flags): Likewise. * combine.c (reg_nonzero_bits_for_combine, reg_num_sign_bit_copies_for_combine, get_last_value, reg_truncated_to_mode): Likewise. * emit-rtl.c (subreg_lowpart_p): Likewise. * expr.c (highest_pow2_factor_for_target, categorize_ctor_elements_1, categorize_ctor_elements, count_type_elements, contains_packed_reference, highest_pow2_factor, highest_pow2_factor_for_target): Likewise. * fold-const.c (may_negate_without_overflow_p, int_const_binop, fold_convertible_p, operand_equal_p, tree_swap_operands_p, native_encode_int, native_encode_real, native_encode_complex, native_encode_vector, native_encode_expr, native_interpret_int, native_interpret_real, native_interpret_complex, native_interpret_vector, native_interpret_expr): Likewise. * function.c (use_register_for_decl): Likewise. * gimplify.c (get_name): Likewise. * langhooks-def.h (lhd_return_null_const_tree): New. (LANG_HOOKS_GET_CALLEE_FNDECL): Use it. * langhooks.c (lhd_return_null_const_tree): New. * langhooks.h (lang_get_callee_fndecl): Constify. * output.h (constructor_static_from_elts_p): Likewise. * rtl-factoring.c (gen_symbol_ref_rtx_for_label): Likewise. * rtl.h (nonzero_bits, num_sign_bit_copies, truncated_to_mode, subreg_lowpart_p, noop_move_p, struct rtl_hooks): Likewise. * rtlanal.c (cached_nonzero_bits, nonzero_bits1, cached_num_sign_bit_copies, num_sign_bit_copies1, noop_move_p, nonzero_bits, num_sign_bit_copies, truncated_to_mode): Likewise. * rtlhooks-def.h (reg_nonzero_bits_general, reg_num_sign_bit_copies_general, reg_truncated_to_mode_general): Likewise. * rtlhooks.c (reg_num_sign_bit_copies_general, reg_nonzero_bits_general, reg_truncated_to_mode_general): Likewise. * stmt.c (warn_if_unused_value, is_body_block): Likewise. * stor-layout.c (mode_for_size_tree): Likewise. * tree-ssa-loop-im.c (memref_eq): Likewise. * tree-ssa-loop-ivopts.c (tree_int_cst_sign_bit): Likewise. * tree.c (contains_placeholder_p, type_list_equal, simple_cst_equal, get_callee_fndecl, operand_equal_for_phi_arg_p): Likewise. * tree.h (tree_int_cst_sign_bit, may_negate_without_overflow_p, mode_for_size_tree, categorize_ctor_elements, count_type_elements, contains_placeholder_p, contains_packed_reference, get_callee_fndecl, operand_equal_for_phi_arg_p, warn_if_unused_value, is_body_block, native_encode_expr, native_interpret_expr, fold_convertible_p, operand_equal_p, int_const_binop, tree_swap_operands_p, builtin_mathfn_code, validate_arglist, simple_cst_equal, type_list_equal, use_register_for_decl, call_expr_flags, get_name, highest_pow2_factor): Likewise. (const_call_expr_arg_iterator_d, init_const_call_expr_arg_iterator, next_const_call_expr_arg, first_const_call_expr_arg, more_const_call_expr_args_p, FOR_EACH_CONST_CALL_EXPR_ARG): New. * varasm.c (constructor_static_from_elts_p): Constify. cp: * parser.c (eof_token): Un-constify. (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc, cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious casts. java: * lang.c (java_get_callee_fndecl): Constify. objc: * objc-act.c (objc_get_callee_fndecl): Constify. * objc-act.h (objc_get_callee_fndecl): Likewise. From-SVN: r127036
2007-07-29 07:43:43 +02:00
nonzero_bits1 (const_rtx x, enum machine_mode mode, const_rtx known_x,
enum 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;
enum 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. */
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
/* As we do not know which address space the pointer is refering to,
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) | ((unsigned HOST_WIDE_INT) (-1) << 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. */
if (SUBREG_PROMOTED_VAR_P (x) && SUBREG_PROMOTED_UNSIGNED_P (x) > 0)
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)))
{
enum 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 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
attribs.c (hash_attr, [...]): Constify. * attribs.c (hash_attr, eq_attr, init_attributes): Constify. * builtins.c (validate_arg, builtin_mathfn_code, validate_arglist): Likewise. * calls.c (call_expr_flags): Likewise. * combine.c (reg_nonzero_bits_for_combine, reg_num_sign_bit_copies_for_combine, get_last_value, reg_truncated_to_mode): Likewise. * emit-rtl.c (subreg_lowpart_p): Likewise. * expr.c (highest_pow2_factor_for_target, categorize_ctor_elements_1, categorize_ctor_elements, count_type_elements, contains_packed_reference, highest_pow2_factor, highest_pow2_factor_for_target): Likewise. * fold-const.c (may_negate_without_overflow_p, int_const_binop, fold_convertible_p, operand_equal_p, tree_swap_operands_p, native_encode_int, native_encode_real, native_encode_complex, native_encode_vector, native_encode_expr, native_interpret_int, native_interpret_real, native_interpret_complex, native_interpret_vector, native_interpret_expr): Likewise. * function.c (use_register_for_decl): Likewise. * gimplify.c (get_name): Likewise. * langhooks-def.h (lhd_return_null_const_tree): New. (LANG_HOOKS_GET_CALLEE_FNDECL): Use it. * langhooks.c (lhd_return_null_const_tree): New. * langhooks.h (lang_get_callee_fndecl): Constify. * output.h (constructor_static_from_elts_p): Likewise. * rtl-factoring.c (gen_symbol_ref_rtx_for_label): Likewise. * rtl.h (nonzero_bits, num_sign_bit_copies, truncated_to_mode, subreg_lowpart_p, noop_move_p, struct rtl_hooks): Likewise. * rtlanal.c (cached_nonzero_bits, nonzero_bits1, cached_num_sign_bit_copies, num_sign_bit_copies1, noop_move_p, nonzero_bits, num_sign_bit_copies, truncated_to_mode): Likewise. * rtlhooks-def.h (reg_nonzero_bits_general, reg_num_sign_bit_copies_general, reg_truncated_to_mode_general): Likewise. * rtlhooks.c (reg_num_sign_bit_copies_general, reg_nonzero_bits_general, reg_truncated_to_mode_general): Likewise. * stmt.c (warn_if_unused_value, is_body_block): Likewise. * stor-layout.c (mode_for_size_tree): Likewise. * tree-ssa-loop-im.c (memref_eq): Likewise. * tree-ssa-loop-ivopts.c (tree_int_cst_sign_bit): Likewise. * tree.c (contains_placeholder_p, type_list_equal, simple_cst_equal, get_callee_fndecl, operand_equal_for_phi_arg_p): Likewise. * tree.h (tree_int_cst_sign_bit, may_negate_without_overflow_p, mode_for_size_tree, categorize_ctor_elements, count_type_elements, contains_placeholder_p, contains_packed_reference, get_callee_fndecl, operand_equal_for_phi_arg_p, warn_if_unused_value, is_body_block, native_encode_expr, native_interpret_expr, fold_convertible_p, operand_equal_p, int_const_binop, tree_swap_operands_p, builtin_mathfn_code, validate_arglist, simple_cst_equal, type_list_equal, use_register_for_decl, call_expr_flags, get_name, highest_pow2_factor): Likewise. (const_call_expr_arg_iterator_d, init_const_call_expr_arg_iterator, next_const_call_expr_arg, first_const_call_expr_arg, more_const_call_expr_args_p, FOR_EACH_CONST_CALL_EXPR_ARG): New. * varasm.c (constructor_static_from_elts_p): Constify. cp: * parser.c (eof_token): Un-constify. (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc, cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious casts. java: * lang.c (java_get_callee_fndecl): Constify. objc: * objc-act.c (objc_get_callee_fndecl): Constify. * objc-act.h (objc_get_callee_fndecl): Likewise. From-SVN: r127036
2007-07-29 07:43:43 +02:00
cached_num_sign_bit_copies (const_rtx x, enum machine_mode mode, const_rtx known_x,
enum 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
attribs.c (hash_attr, [...]): Constify. * attribs.c (hash_attr, eq_attr, init_attributes): Constify. * builtins.c (validate_arg, builtin_mathfn_code, validate_arglist): Likewise. * calls.c (call_expr_flags): Likewise. * combine.c (reg_nonzero_bits_for_combine, reg_num_sign_bit_copies_for_combine, get_last_value, reg_truncated_to_mode): Likewise. * emit-rtl.c (subreg_lowpart_p): Likewise. * expr.c (highest_pow2_factor_for_target, categorize_ctor_elements_1, categorize_ctor_elements, count_type_elements, contains_packed_reference, highest_pow2_factor, highest_pow2_factor_for_target): Likewise. * fold-const.c (may_negate_without_overflow_p, int_const_binop, fold_convertible_p, operand_equal_p, tree_swap_operands_p, native_encode_int, native_encode_real, native_encode_complex, native_encode_vector, native_encode_expr, native_interpret_int, native_interpret_real, native_interpret_complex, native_interpret_vector, native_interpret_expr): Likewise. * function.c (use_register_for_decl): Likewise. * gimplify.c (get_name): Likewise. * langhooks-def.h (lhd_return_null_const_tree): New. (LANG_HOOKS_GET_CALLEE_FNDECL): Use it. * langhooks.c (lhd_return_null_const_tree): New. * langhooks.h (lang_get_callee_fndecl): Constify. * output.h (constructor_static_from_elts_p): Likewise. * rtl-factoring.c (gen_symbol_ref_rtx_for_label): Likewise. * rtl.h (nonzero_bits, num_sign_bit_copies, truncated_to_mode, subreg_lowpart_p, noop_move_p, struct rtl_hooks): Likewise. * rtlanal.c (cached_nonzero_bits, nonzero_bits1, cached_num_sign_bit_copies, num_sign_bit_copies1, noop_move_p, nonzero_bits, num_sign_bit_copies, truncated_to_mode): Likewise. * rtlhooks-def.h (reg_nonzero_bits_general, reg_num_sign_bit_copies_general, reg_truncated_to_mode_general): Likewise. * rtlhooks.c (reg_num_sign_bit_copies_general, reg_nonzero_bits_general, reg_truncated_to_mode_general): Likewise. * stmt.c (warn_if_unused_value, is_body_block): Likewise. * stor-layout.c (mode_for_size_tree): Likewise. * tree-ssa-loop-im.c (memref_eq): Likewise. * tree-ssa-loop-ivopts.c (tree_int_cst_sign_bit): Likewise. * tree.c (contains_placeholder_p, type_list_equal, simple_cst_equal, get_callee_fndecl, operand_equal_for_phi_arg_p): Likewise. * tree.h (tree_int_cst_sign_bit, may_negate_without_overflow_p, mode_for_size_tree, categorize_ctor_elements, count_type_elements, contains_placeholder_p, contains_packed_reference, get_callee_fndecl, operand_equal_for_phi_arg_p, warn_if_unused_value, is_body_block, native_encode_expr, native_interpret_expr, fold_convertible_p, operand_equal_p, int_const_binop, tree_swap_operands_p, builtin_mathfn_code, validate_arglist, simple_cst_equal, type_list_equal, use_register_for_decl, call_expr_flags, get_name, highest_pow2_factor): Likewise. (const_call_expr_arg_iterator_d, init_const_call_expr_arg_iterator, next_const_call_expr_arg, first_const_call_expr_arg, more_const_call_expr_args_p, FOR_EACH_CONST_CALL_EXPR_ARG): New. * varasm.c (constructor_static_from_elts_p): Constify. cp: * parser.c (eof_token): Un-constify. (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc, cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious casts. java: * lang.c (java_get_callee_fndecl): Constify. objc: * objc-act.c (objc_get_callee_fndecl): Constify. * objc-act.h (objc_get_callee_fndecl): Likewise. From-SVN: r127036
2007-07-29 07:43:43 +02:00
num_sign_bit_copies1 (const_rtx x, enum machine_mode mode, const_rtx known_x,
enum 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. */
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
/* As we do not know which address space the pointer is refering to,
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. */
if (SUBREG_PROMOTED_VAR_P (x) && ! SUBREG_PROMOTED_UNSIGNED_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;
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
cost = rtx_cost (SET_SRC (set), SET, speed);
return cost > 0 ? cost : COSTS_N_INSNS (1);
}
/* 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
canonicalize_condition (rtx insn, rtx cond, int reverse, rtx *earliest,
rtx want_reg, int allow_cc_mode, int valid_at_insn_p)
{
enum rtx_code code;
rtx 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;
enum 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;
#ifdef HAVE_cc0
/* 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;
}
#endif
/* 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)
{
enum 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_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))))
&& (((GET_MODE_CLASS (mode) == MODE_CC)
== (GET_MODE_CLASS (inner_mode) == MODE_CC))
|| mode == VOIDmode || inner_mode == VOIDmode))
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))
&& (((GET_MODE_CLASS (mode) == MODE_CC)
== (GET_MODE_CLASS (inner_mode) == MODE_CC))
|| mode == VOIDmode || inner_mode == VOIDmode))
{
reverse_code = 1;
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
get_condition (rtx jump, rtx *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
&& XEXP (XEXP (SET_SRC (set), 2), 0) == 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)
{
enum 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))
{
enum 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))
{
enum 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
attribs.c (hash_attr, [...]): Constify. * attribs.c (hash_attr, eq_attr, init_attributes): Constify. * builtins.c (validate_arg, builtin_mathfn_code, validate_arglist): Likewise. * calls.c (call_expr_flags): Likewise. * combine.c (reg_nonzero_bits_for_combine, reg_num_sign_bit_copies_for_combine, get_last_value, reg_truncated_to_mode): Likewise. * emit-rtl.c (subreg_lowpart_p): Likewise. * expr.c (highest_pow2_factor_for_target, categorize_ctor_elements_1, categorize_ctor_elements, count_type_elements, contains_packed_reference, highest_pow2_factor, highest_pow2_factor_for_target): Likewise. * fold-const.c (may_negate_without_overflow_p, int_const_binop, fold_convertible_p, operand_equal_p, tree_swap_operands_p, native_encode_int, native_encode_real, native_encode_complex, native_encode_vector, native_encode_expr, native_interpret_int, native_interpret_real, native_interpret_complex, native_interpret_vector, native_interpret_expr): Likewise. * function.c (use_register_for_decl): Likewise. * gimplify.c (get_name): Likewise. * langhooks-def.h (lhd_return_null_const_tree): New. (LANG_HOOKS_GET_CALLEE_FNDECL): Use it. * langhooks.c (lhd_return_null_const_tree): New. * langhooks.h (lang_get_callee_fndecl): Constify. * output.h (constructor_static_from_elts_p): Likewise. * rtl-factoring.c (gen_symbol_ref_rtx_for_label): Likewise. * rtl.h (nonzero_bits, num_sign_bit_copies, truncated_to_mode, subreg_lowpart_p, noop_move_p, struct rtl_hooks): Likewise. * rtlanal.c (cached_nonzero_bits, nonzero_bits1, cached_num_sign_bit_copies, num_sign_bit_copies1, noop_move_p, nonzero_bits, num_sign_bit_copies, truncated_to_mode): Likewise. * rtlhooks-def.h (reg_nonzero_bits_general, reg_num_sign_bit_copies_general, reg_truncated_to_mode_general): Likewise. * rtlhooks.c (reg_num_sign_bit_copies_general, reg_nonzero_bits_general, reg_truncated_to_mode_general): Likewise. * stmt.c (warn_if_unused_value, is_body_block): Likewise. * stor-layout.c (mode_for_size_tree): Likewise. * tree-ssa-loop-im.c (memref_eq): Likewise. * tree-ssa-loop-ivopts.c (tree_int_cst_sign_bit): Likewise. * tree.c (contains_placeholder_p, type_list_equal, simple_cst_equal, get_callee_fndecl, operand_equal_for_phi_arg_p): Likewise. * tree.h (tree_int_cst_sign_bit, may_negate_without_overflow_p, mode_for_size_tree, categorize_ctor_elements, count_type_elements, contains_placeholder_p, contains_packed_reference, get_callee_fndecl, operand_equal_for_phi_arg_p, warn_if_unused_value, is_body_block, native_encode_expr, native_interpret_expr, fold_convertible_p, operand_equal_p, int_const_binop, tree_swap_operands_p, builtin_mathfn_code, validate_arglist, simple_cst_equal, type_list_equal, use_register_for_decl, call_expr_flags, get_name, highest_pow2_factor): Likewise. (const_call_expr_arg_iterator_d, init_const_call_expr_arg_iterator, next_const_call_expr_arg, first_const_call_expr_arg, more_const_call_expr_args_p, FOR_EACH_CONST_CALL_EXPR_ARG): New. * varasm.c (constructor_static_from_elts_p): Constify. cp: * parser.c (eof_token): Un-constify. (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc, cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious casts. java: * lang.c (java_get_callee_fndecl): Constify. objc: * objc-act.c (objc_get_callee_fndecl): Constify. * objc-act.h (objc_get_callee_fndecl): Likewise. From-SVN: r127036
2007-07-29 07:43:43 +02:00
truncated_to_mode (enum 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;
}
/* Initialize non_rtx_starting_operands, which is used to speed up
for_each_rtx. */
void
init_rtlanal (void)
{
int i;
for (i = 0; i < NUM_RTX_CODE; i++)
{
const char *format = GET_RTX_FORMAT (i);
const char *first = strpbrk (format, "eEV");
non_rtx_starting_operands[i] = first ? first - format : -1;
}
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 GET_CODE (x) == CONST_DOUBLE;
}
/* 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
low_bitmask_len (enum 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);
}