gcc/gcc/reload.c

7394 lines
244 KiB
C
Raw Normal View History

1992-02-28 11:23:25 +01:00
/* Search an insn for pseudo regs that must be in hard regs and are not.
Copyright (C) 1987-2014 Free Software Foundation, Inc.
1992-02-28 11:23:25 +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.
1992-02-28 11:23:25 +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.
1992-02-28 11:23:25 +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.
1992-02-28 11:23:25 +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/>. */
1992-02-28 11:23:25 +01:00
/* This file contains subroutines used only from the file reload1.c.
It knows how to scan one insn for operands and values
that need to be copied into registers to make valid code.
It also finds other operands and values which are valid
but for which equivalent values in registers exist and
ought to be used instead.
Before processing the first insn of the function, call `init_reload'.
init_reload actually has to be called earlier anyway.
1992-02-28 11:23:25 +01:00
To scan an insn, call `find_reloads'. This does two things:
1. sets up tables describing which values must be reloaded
for this insn, and what kind of hard regs they must be reloaded into;
2. optionally record the locations where those values appear in
the data, so they can be replaced properly later.
This is done only if the second arg to `find_reloads' is nonzero.
The third arg to `find_reloads' specifies the number of levels
of indirect addressing supported by the machine. If it is zero,
indirect addressing is not valid. If it is one, (MEM (REG n))
is valid even if (REG n) did not get a hard register; if it is two,
(MEM (MEM (REG n))) is also valid even if (REG n) did not get a
hard register, and similarly for higher values.
Then you must choose the hard regs to reload those pseudo regs into,
and generate appropriate load insns before this insn and perhaps
also store insns after this insn. Set up the array `reload_reg_rtx'
to contain the REG rtx's for the registers you used. In some
cases `find_reloads' will return a nonzero value in `reload_reg_rtx'
for certain reloads. Then that tells you which register to use,
so you do not need to allocate one. But you still do need to add extra
instructions to copy the value into and out of that register.
Finally you must call `subst_reloads' to substitute the reload reg rtx's
into the locations already recorded.
NOTE SIDE EFFECTS:
find_reloads can alter the operands of the instruction it is called on.
1. Two operands of any sort may be interchanged, if they are in a
commutative instruction.
This happens only if find_reloads thinks the instruction will compile
better that way.
2. Pseudo-registers that are equivalent to constants are replaced
with those constants if they are not in hard registers.
1 happens every time find_reloads is called.
2 happens only when REPLACE is 1, which is only when
actually doing the reloads, not when just counting them.
Using a reload register for several reloads in one insn:
When an insn has reloads, it is considered as having three parts:
the input reloads, the insn itself after reloading, and the output reloads.
Reloads of values used in memory addresses are often needed for only one part.
When this is so, reload_when_needed records which part needs the reload.
Two reloads for different parts of the insn can share the same reload
register.
When a reload is used for addresses in multiple parts, or when it is
an ordinary operand, it is classified as RELOAD_OTHER, and cannot share
a register with any other reload. */
#define REG_OK_STRICT
/* We do not enable this with ENABLE_CHECKING, since it is awfully slow. */
#undef DEBUG_RELOAD
1992-02-28 11:23:25 +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"
#include "rtl-error.h"
#include "tm_p.h"
1992-02-28 11:23:25 +01:00
#include "insn-config.h"
expr.h: Split out optab- and libfunc-related code to... * expr.h: Split out optab- and libfunc-related code to... * optabs.h, libfuncs.h: ... these new headers. * Makefile.in (CONFIG_H, EXPR_H): Take out insn-codes.h. (OPTABS_H): New. (various .o rules): Add $(OPTABS_H) and/or libfuncs.h to dependencies. * mkconfig.sh: Don't include insn-codes.h from config.h. * reload.h: Use #ifdef GCC_INSN_CODES_H to decide whether enum insn_code is available. Move reload_in_optab and reload_out_optab array declarations to optabs.h. * regmove.c (gen_add3_insn): Move to optabs.c, export from there, prototype in expr.h. * gencodes.c: Cleanup: zap global variables, don't use printf where puts will do, don't bother defining MAX_INSN_CODE which nothing uses, let CODE_FOR_nothing get its value implicitly. * genemit.c, genopinit.c: Include optabs.h in generated file. * genoutput.c: Include insn-codes.h in generated file. * builtins.c, caller-save.c, combine.c, doloop.c, explow.c, expmed.c, expr.c, function.c, ifcvt.c, loop.c, optabs.c, profile.c, reload1.c, simplify-rtx.c, stmt.c, unroll.c, config/alpha/alpha.c, config/arm/arm.c, config/c4x/c4x.c, config/clipper/clipper.c, config/i386/i386.c, config/ia64/ia64.c, config/mn10300/mn10300.c, config/pj/pj.c, config/sh/sh.c, config/sparc/sparc.c: Include optabs.h. * builtins.c, calls.c, dwarf2out.c, except.c, expr.c, function.c, optabs.c, stmt.c, config/c4x/c4x.c, config/clipper/clipper.c, config/m88k/m88k.c, config/sparc/sparc.c: Include libfuncs.h. * reload.c: Include expr.h and optabs.h before reload.h. * config/alpha/alpha.c: Include tree.h before reload.h. * config/pa/pa.c: Include expr.h, optabs.h, libfuncs.h, and reload.h in that order. * config/sparc/sparc.c: Include debug.h. * recog.c: Include insn-codes.h. cp: * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies. * except.c: Include libfuncs.h. java: * Make-lang.in (java/decl.o): Update dependencies. * decl.c: Include libfuncs.h, don't include toplev.h. From-SVN: r44858
2001-08-13 17:56:51 +02:00
#include "expr.h"
#include "optabs.h"
1992-02-28 11:23:25 +01:00
#include "recog.h"
coretypes.h (struct simple_bitmap_def, [...]): New core types. gcc/ChangeLog: * coretypes.h (struct simple_bitmap_def, sbitmap, const_sbitmap): New core types. * sbitmap.h (struct sbitmap_def): Do not typedef here. * sbitmap.c: Include sbitmap.h. * basic-block.h: Do not include bitmap.h, sbitmap.h, partition.h, hard-reg-set.h. Split everything related to regsets out from here... * regset.h: ...to here. New file. * df.h: Include regset.h and sbitmap.h. * tree-flow.h: Likewise. * cfgloop.h: Likewise. * except.h: Do not include sbitmap.h. Include hashtab.h. * cgraph.h: Include vec.h and function.h. * reload.h (struct insn_chain): Change types of live_throughout and dead_or_set from regset_head to bitmap_head. (compute_use_by_pseudos): Be defined also if regset.h is not included. * ira-int.h (struct ira_spilled_reg_stack_slot): Change type of spilled_regs from regset_head to bitmap_head to avoid dependency in regset.h. * sel-sched-ir.h: Include regset.h. * reload.c: Include df.h before reload.h. * caller-save.c: Likewise. * reload1.c: Likewise. * ira.c: Likewise. (mark_elimination): Update type of r to bitmap, consistent with DF_LR_IN. * dominance.c: Include bitmap.h. * modulo-sched.c: Include df.h. * cfganal.c: Include bitmap.h and sbitmap.h. * cfgbuild.c: Include sbitmap.h. * lcm.c: Include sbitmap.h. * gcse.c (alloc_gcse_mem): Allocate regset with ALLOC_REG_SET. * domwalk.c: Include sbitmap.h, exclude ggc.h. * cfgexpand.c: Inlcude bitmap.h and sbitmap.h. * cselib.c: Include bitmap.h. * tree-optimize.c: Include regset.h. * stmt.c: Include bitmap.h. * Makefile.in: Update dependencies. cp/ChangeLog * semantics.c: Include bitmap.h. * Make-lang.in: Update dependencies. From-SVN: r159746
2010-05-23 00:24:53 +02:00
#include "df.h"
1992-02-28 11:23:25 +01:00
#include "reload.h"
#include "regs.h"
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
#include "addresses.h"
1992-02-28 11:23:25 +01:00
#include "hard-reg-set.h"
#include "flags.h"
#include "function.h"
#include "params.h"
Implement FR-V FDPIC ABI support for frv-uclinux and frv-linux. 2004-02-05 Alexandre Oliva <aoliva@redhat.com> * config/frv/frv.c (frv_emit_movsi): Use GOT relocations for symbols in sections named by the user. 2004-01-30 Alexandre Oliva <aoliva@redhat.com> * config/frv/linux.h (TARGET_OS_CPP_BUILTINS): New. 2004-01-27 Alexandre Oliva <aoliva@redhat.com> * config.gcc (frv-*-*linux*): Handle like *-*-linux*. * config/frv/t-linux (EXTRA_MULTILIB_PARTS): Remove, obviated by the above. 2004-01-20 Alexandre Oliva <aoliva@redhat.com> * config/frv/frv.md (symGOT2reg_hilo, symGOTOFF2reg_hilo): Add one more pseudo to further improve code generation. 2004-01-19 Alexandre Oliva <aoliva@redhat.com> * config/frv/frv.md (movdi_ldd): Introduce explicit indirection inside UNSPEC. 2004-01-16 Alexandre Oliva <aoliva@redhat.com> * config/frv/frv.c (frv_legitimate_address_p): Added allow_double_reg_p argument. Adjust all callers. Use it to decide whether to enable double-register indirect addressing. (frv_funcdesc_alias_set): Remove. (frv_expand_fdpic_call): Force non-SYMBOL_REF operand into register. Emit movdi_ldd. (ldd_address_operand): New. * config/frv/frv-protos.h (frv_legitimate_address_p): Adjust. * config/frv/frv.h (GO_IF_LEGITIMATE_ADDRESS): Likewise. (PREDICATE_CODES): Add ldd_address_operand. * config/frv/frv.md (movdi_ldd): New. (symGOT2reg_hilo, symGOTOFF2reg_hilo): Use separate pseudo for intermediate computations if possible. (symGOTOFF2reg_i): Fix harmless typo. 2003-12-18 Alexandre Oliva <aoliva@redhat.com> * unwind-dw2-fde-glibc.c (_Unwind_IteratePhdrCallback): Cast relocated p_vaddr to vaddr type. * config/frv/frv-protos.h (frv_expand_fdpic_call): Return void. * config/frv/frv.c (frv_get_funcdesc_alias_set): New. (frv_expand_fdpic_call): Propagate incoming MEM's expr to funcdesc MEM, or use a funcdesc alias set. Use regular move instead of ldd. (dbl_memory_one_insn_operand): Recognize function descriptors by type or by alias set, and don't split them. * config/frv/frv.md (call, call_value): Never use call_internal for fdpic. (call_internal, call_value_internal): Never match for FDPIC. (call_fdpicdi, call_fdpicsi, call_value_fdpicdi, call_value_fdpicsi): Require FDPIC. (ldd): Removed. 2003-12-17 Alexandre Oliva <aoliva@redhat.com> * config/frv/frv.h (CRT_GET_RFIB_DATA): Define for __FRV_FDPIC__. * unwind-dw2-fde-glibc.c: Don't include elf-fdpic.h any more. (_Unwind_IteratePhdrCallback): Adjust type of load_base for FRV FDPIC. Compute data base address. * config/frv/linux.h (SUBTARGET_DRIVER_SELF_SPECS): Enable -mfdpic before the other self-specs are processed. * config/frv/t-linux (CRTSTUFF_T_CFLAGS, TARGET_LIBGCC2_CFLAGS): Build with -fPIC. 2003-12-15 Alexandre Oliva <aoliva@redhat.com> * unwind-dw2-fde-glibc.c: Don't include bits/elf-fdpic.h if inhibit_libc is defined. 2003-12-12 Alexandre Oliva <aoliva@redhat.com> * unwind-dw2-fde-glibc.c: Include bits/elf-fdpic.h for __FRV_FDPIC__. (__RELOC_POINTER): Define. (_Unwind_IteratePhdrCallback): Use it. * config/frv/frv.h (Twrite): Define. (TRANSFER_FROM_TRAMPOLINE): Use it. * config/frv/linux.h (INVOKE__main): Undefine. (Twrite): Override. 2003-12-05 Richard Sandiford <rsandifo@redhat.com> * doc/invoke.texi (-mlong-calls, -mlinked-fp): Document FRV options. (-mlibrary-pic): Emphasize that this option generates EABI code. (-mcpu): Add fr550. (-mpack): Remove. 2003-11-30 Alexandre Oliva <aoliva@redhat.com> * config/frv/frv.c (int_2word_operand): Reject LABELs, SYMBOL_REFs and CONSTs in FDPIC mode. * gcc/config.gcc (with_cpu): Default to fr400 on frv-*-*linux*. 2003-11-29 Richard Sandiford <rsandifo@redhat.com> * config/frv/frv.c (move_source_operand): Don't accept symbolic constants. * config/frv/frv.md (*movhi_internal, *movsi_internal): Use an 'n' rather than 'i' constraint for the 2-instruction alternative. (*movsi_2word): New, incorporating existing int_2word_operand splitter. 2003-11-29 Richard Sandiford <rsandifo@redhat.com> * config/frv/frv.h (EXTRA_CONSTRAINT_FOR_Q): Renamed from EXTRA_CONSTRAINT_FOR_Y. (EXTRA_CONSTRAINT): Remove handling of 'Y'. * config/frv/frv.md (*movsi_internal): Remove 'Q' constraint. (addsi3): Change 'Y' constraint to 'Q'. 2003-11-27 Richard Sandiford <rsandifo@redhat.com> * reload.c (CONST_POOL_OK_P): New macro. (find_reloads): Use it to decide whether a constant can be forced into memory. * config/frv/frv.h (LEGITIMATE_PIC_OPERAND_P): Return true if the constant satisfies got12_operand. (frv_cannot_force_const_mem): Always return true for TARGET_FDPIC. (frv_legitimate_address_p): Check for valid unspec offsets using got12_operand rather than frv_legitimate_fdpic_operand_p. (frv_legitimate_fdpic_operand_p): Delete. (frv_emit_movsi): Abort if we try to use the FDPIC register during or after reload. (frv_legitimate_constant_p): Return LEGITIMATE_PIC_OPERAND_P if TARGET_FDPIC. * config/frv/frv.md (*movdf_double): Add alternatives for CONST_DOUBLE. 2003-11-19 Richard Sandiford <rsandifo@redhat.com> * config/frv/frv-protos.h (fdpic_operand, fdpic_got12_operand) (frv_fdpic_fptr_operand): Don't declare here. * config/frv/frv.h (EXTRA_CONSTRAINT_FOR_Y): Call got12_operand rather than fdpic_got12_operand. (PREDICATE_CODES): Remove symbolic_operand entry. Add entries for got12_operand and const_unspec_operand. * config/frv/frv.c (got12_operand): Renamed from fdpic_got12_operand. (gpr_or_int12_operand, dbl_memory_one_insn_operand): Update calls. (symbolic_operand): Remove. (const_unspec_operand): New predicate. * config/frv/frv.md (*movsi_got): Use got12_operand. (*movsi_high_got, *movsi_lo_sum_got): Use const_unspec_operand. 2003-11-18 Richard Sandiford <rsandifo@redhat.com> * config/frv/frv-protos.h (frv_output_addr_const_extra): Remove. * config/frv/frv.h (OUTPUT_ADDR_CONST_EXTRA): Remove definition. * config/frv/frv.c (frv_unspec): New structure. (frv_small_data_reloc_p, frv_const_unspec_p): New functions. (frv_print_operand_memory_reference): Use frv_const_unspec_p to validate CONST indices. Use frv_output_const_unspec to print them. (frv_print_operand): Update call to unspec_got_name. Use frv_output_const_unspec to print constant unspecs. (frv_legitimate_fdpic_operand_p): Return true if frv_const_unspec_p. Reject UNSPECs otherwise. (unspec_got_name): Take the relocation number as argument, not an rtx containing it. (frv_output_addr_const_extra): Remove, replacing with... (frv_output_const_unspec): ...this new function. (frv_find_base_term): Use frv_const_unspec_p & frv_small_data_reloc_p. (gpr_or_int12_operand): Use fdpic_got12_operand. (dbl_memory_one_insn_operand): Likewise. (fdpic_got12_operand): Use frv_const_unspec_p. (frv_emit_movsi): Use frv_const_unspec_p to check for CONSTs that are already legitimate. Use frv_small_data_reloc_p when deciding whether to use HIGH/LO_SUM for R_FRV_GOTOFF12 and R_FRV_GPREL12. 2003-11-18 Alexandre Oliva <aoliva@redhat.com> * config/frv/t-linux (SHLIB_MAPFILES): Override so as to export... * config/frv/libgcc-frv.ver: ... frv-specific symbols. New file. * config/frv/frv-abi.h (CREATE_DOUBLE_SHIFT): Use branch to local label, for real this time. * config/frv/frv.c (frv_local_funcdesc_p): Update to new representation of visibility. (fdpic_got12_operand, symbolic_operand): Mark unused arguments as such. 2003-11-17 Richard Sandiford <rsandifo@redhat.com> * config/frv/frv.h (MASK_LINKED_FP, TARGET_LINKED_FP): New macros. (TARGET_SWITCHES): Add -mlinked-fp and -mno-linked-fp. * config/frv/frv.c (frv_override_options): Set MASK_LINKED_FP unless it was explicitly disabled. (frv_stack_info): There is no need to save the link register in every frame unless TARGET_LINKED_FP is true. (frv_frame_pointer_required): If !TARGET_LINKED_FP, only require a frame pointer if the stack pointer might change value. (frv_return_addr_rtx): Check and process "count" argument. 2003-11-14 Richard Sandiford <rsandifo@redhat.com> * config/frv/frv-protos.h (frv_legitimize_address): Remove. (frv_find_base_term): Declare. * config/frv/frv.h (LEGITIMIZE_ADDRESS): Do nothing. (FIND_BASE_TERM): Define. (PREDICATE_CODES): Remove pic_register_operand, pic_symbolic_operand, small_data_register_operand, small_data_symbolic_operand. Add symbolic_operand. * config/frv/frv.c (const_small_data_p, plus_small_data_p): Delete. (frv_print_operand_memory_reference, output_move_single): Remove special handling for unlegitimized sdata addresses. (frv_legitimate_address_p): Don't allow sums of SDA_BASE_REG and symbolic addresses. (frv_legitimize_address, frv_legitimize_fdpic_address): Delete. (frv_find_base_term): New function. (int_2word_operand): Check specifically for symbolic address constants. (pic_register_operand, pic_symbolic_operand): Delete. (small_data_register_operand, small_data_symbolic_operand): Delete. (dbl_memory_one_insn_operand): Don't call plus_small_data_p. Allow UNSPEC_GOT constants if !TARGET_FDPIC. (move_source_operand): Only accept CONSTs if they're a two-insn symbolic constant. (fdpic_got12_operand): Don't require TARGET_FDPIC. (frv_emit_movsi): Legitimize sdata and -mlibrary-pic addresses using gen_symGOTOFF2reg*. (frv_ifcvt_rewrite_mem): Remove (plus gr16 ...) special cases. (frv_rtx_costs): Give all MEM addresses a cost of 0. Give MEMs themselves a cost of 3 insns. * config/mips/mips.md (*movsi_got): Allow for !TARGET_FDPIC too. Change predicate to symbolic_operand. (*movsi_high_got, *movsi_lo_sum_got): Likewise. (*movsi_lda_sdata): Delete. (*movsi_pic, movsi_high_pic, movsi_lo_sum_pic): Delete. 2003-11-05 Alexandre Oliva <aoliva@redhat.com> * config.gcc: Add t-slibgcc-elf-ver and support --with-cpu for frv-*-*linux*. * config/frv/frv-abi.h (CREATE_DOUBLE_SHIFT): Use branch to local label. * config/frv/frv.h (DRIVER_SELF_SPECS): Add blank before -multilib-library-pic. (LINK_SPEC): Add -z text for -mfdpic. * config/frv/frvbegin.c (__ROFIXUP_LIST__): Don't define on FDPIC. * config/frv/frvend.c (__ROFIXUP_END__): Likewise. * config/frv/linux.h (STARTFILE_SPEC, ENDFILE_SPEC, LINK_SPEC): Override. (OPTION_DEFAULT_SPECS, HAS_INIT_SECTION, INIT_SECTION_ASM_OP, FINI_SECTION_ASM_OP, CRT_CALL_STATIC_FUNCTION): Define. * config/frv/t-linux (EXTRA_MULTILIB_PARTS): Use crtstuff-generated files. 2003-10-31 Alexandre Oliva <aoliva@redhat.com> * config.gcc: Add frv-*-*linux*. * config/frv/linux.h, config/frv/t-linux: New. 2003-10-06 Alexandre Oliva <aoliva@redhat.com> * config/frv/frv.h (LINK_SPEC): Pass -melf32frvfd to the linker when -mfdpic even if a linker script is explicitly listed. 2003-10-02 Alexandre Oliva <aoliva@redhat.com> * config/frv/frv.c (frv_override_options): Clear asm_out unaligned_op for SImode on FDPIC. (frv_emit_movsi): Use compute_reloc_for_constant to compute the argument passed to decl_readonly_section. (frv_assemble_integer): Revert 2003-09-30's change, but make the whole block run with FDPIC even with -fno-PIC. 2003-10-02 Alexandre Oliva <aoliva@redhat.com> * config/frv/frv.c (frv_cannot_force_const_mem): Don't force symbol or label plus offset to memory. (frv_emit_movsi): Emit GPREL only if -mgprel-ro. Emit 32-bit GOTOFF and GPREL for LABEL_REF. * config/frv/frv.h (DRIVER_SELF_SPECS): Add -mgprel-ro with -mfdpic unless -mno-gprel-ro, -fpic or -fpie. (MASK_GPREL_RO, TARGET_GPREL_RO): New. (TARGET_SWITCHES): Added gprel-ro and no-gprel-ro. * doc/invoke.texi: Document them. 2003-09-30 Alexandre Oliva <aoliva@redhat.com> * config/frv/frv-protos.h (frv_gen_GPsym2reg): Declare. (frv_splittable_got_operand): Removed. * config/frv/frv.c (frv_cannot_force_const_mem): Reject HIGH and LO_SUM. Add comments. (frv_override_options): Moved enabling of FDPIC to DRIVER_SELF_SPECS. Don't enable MASK_DWORD. (frv_local_funcdesc_p): Remove unnecessary heck for flag_pie. (frv_legitimize_fdpic_address): Don't duplicate logic in frv_emit_movsi. (frv_gen_GPsym2reg): New. (unspec_got_name): Added gprel. (frv_expand_fdpic_call): Add support for inlining PLTs. (fdpic_fptr_operand): Renamed from frv_fdpic_fptr_operand. (gpr_or_int12_operand): Added GPREL12. (pic_symbolic_operand): Match even if !flag_pic for FDPIC. (small_data_symbolic_operand): Fail if FDPIC. (fdpic_splittable_got_operand): Removed. (fdpic_got12_operand): Added GPREL12. (frv_emit_movsi): Reorganize to avoid duplication. Emit GPREL when appropriate. Fix sdata GOTOFF. (frv_legitimate_constant_p): Require legitimate PIC operand for FDPIC with pic, but only a legitimate fdpic operand for non-pic. (frv_assemble_integer): Move FDPIC funcdesc handling out of flag_pic case. (frv_asm_out_constructor, frv_asm_out_destructor): Abort if frv_assemble_integer fails. * config/frv/frv.h (DRIVER_SELF_SPECS): New. (SUBTARGET_DRIVER_SELF_SPECS): New. (ASM_SPEC): Don't pass -mno-fdpic. (LINK_SPEC): Pass -melf32frvfd for FDPIC. (MASK_INLINE_PLT, TARGET_INLINE_PLT): New. (TARGET_SWITCHES): Add -minline-plt, -mno-inline-plt and -multilib-library-pic. (PREDICATE_CODES): Added fdpic_operand, fdpic_fptr_operand, condexec_si_media_operator, condexec_sf_add_operator and condexec_sf_conv_operator. Removed condexec_sf_binary_operator and condexec_sf_unary_operator. * config/frv/frv.md (R_FRV_GPREL12, R_FRV_GPRELHI, R_FRV_GPRELLO): New. (movsi_got, movsi_high_got, movsi_lo_sum_got): Move before movsi_internal. Give them internal names. movsi_got has type int. (fdpic got splitters): Remove. (symGPREL2reg, symGPREL2reg_hilo): New. * config/frv/t-frv (MULTILIB_MATCHES): Don't map -fpic and -fPIC to -mlibrary-pic. Map -multilib-library-pic to it. * doc/invoke.texi: -mfdpic, -minline-plt, -multilib-library-pic: Document. 2003-09-28 Alexandre Oliva <aoliva@redhat.com> * config/frv/frv.c (frv_function_symbol_referenced_p): Declare. (TARGET_CANNOT_FORCE_CONST_MEM): Define to... (frv_cannot_force_const_mem): New function. (const_small_data_p, plus_small_data_p): Update comments on sdata on FDPIC. (frv_override_options): Set flag_pie for FDPIC too. (frv_conditional_register_usage): Mark gr16 and gr17 as non-fixed, call-saved registers on FDPIC. (frv_stack_info): Don't preserve the PIC register on FDPIC, and don't force LR to be preserved. (frv_expand_prologue): Likewise. (frv_asm_output_mi_thunk): Use 12-bit funcdesc gotoff for -fpic. (frv_frame_pointer_required): Don't force it just because the FDPIC register is used. (frv_legitimate_address_p) <CONST>: Accept a legitimate FDPIC operand only if !condexec_p. (frv_legitimize_address): Return the FDPIC-legitimized address. Don't match small data here on FDPIC. (frv_legitimate_fdpic_operand_p): Don't accept unadorned function symbols. Use TRUE/FALSE instead of 1/0. (frv_local_funcdesc_p): New. (frv_legitimize_fdpic_address): Rewrite to use GOTOFF and 12-bit immediates when possible. (pic_symbolic_operand): Accept SYMBOL_REFs and CONSTs in FDPIC. (dbl_memory_one_insn_operand): Accept addresses that add a REG and an UNSPEC_GOT. (frv_emit_movsi): Handle FDPIC before small data. Use GOTOFF and 12-bit immediates when possible. (frv_legitimate_constant_p): In FDPIC, reject SImode operands that are not legitimate pic operands. (frv_in_small_data_p): Re-enable for FDPIC. * config/frv/frv.h (SDA_BASE_REG): Remove comment about FDPIC. (FRV_GLOBAL_P): Removed. * config/frv/frv.md: Add modes to CONSTs. (movsi_got): New. (movsi_lo_sum_got): Use separate matches instead of match_dup. (movsi_high_pic, movsi_lo_sum_pic): Match on non-FDPIC only. (fdpic splittable operations): Match on flag_pic != 1. 2003-09-22 Alexandre Oliva <aoliva@redhat.com> * config/frv/frv.c (frv_asm_out_constructor, frv_asm_out_destructor): Pass to frv_assemble_integer the size in bytes, not bits. 2003-09-19 Alexandre Oliva <aoliva@redhat.com> * config/frv/frv.c (frv_assemble_integer): Reject complex expressions referencing function SYMBOL_REFs. * config/frv/frv.c (frv_function_symbol_referenced_p): New. (move_source_operand): Reject CONSTs that reference function SYMBOL_REFs on FDPIC. (frv_emit_movsi): If we get such a CONST, break it up. * config/frv/frv.h (CPP_SPEC): Define __FRV_FDPIC__ for -mfdpic. (TRANSFER_FROM_TRAMPOLINE): Use different definitions for FDPIC. * config/frv/frv.c (frv_print_operand) <I>: Recognize PLUS without MEM. (frv_assemble_integer): Don't use funcdesc for LABEL_REFs. (frv_trampoline_size): Increase for FDPIC. * config/frv/frv.h (TRAMPOLINE_ALIGNMENT): Bump to 64 for FDPIC. (TRANSFER_FROM_TRAMPOLINE): Handle FDPIC trampolines. * config/frv/frv.c (frv_legitimize_fdpic_address, frv_emit_movsi): Disable use of GOTOFF for now. (const_small_data_p, plus_small_data_p, frv_in_small_data_p): Disable use of small data in FDPIC for now. (frv_asm_output_mi_thunk): Implement for FDPIC. * config/frv/frv.h (SDA_BASE_REG): Set to -1 with FDPIC. * config/frv/frv.c (frv_asm_out_constructor): Use frv_assemble_integer for FDPIC pointers. (frv_asm_out_destructor): Likewise. * config/frv/frv.md (ldd): Fix order of operands. Use address_operand for input. 2003-09-18 DJ Delorie <dj@redhat.com> * config/frv/frv.c (frv_legitimate_fdpic_operand_p): Remove UNSPEC_PIC. (unspec_got_name): Correct typo. (frv_emit_movsi): Pre-expand splittable GOTs. (frv_expand_fdpic_call): Rename gen_lddi to gen_ldd. * config/frv/frv.md (lddi): Fix syntax error, rename to ldd. (symGOT2reg_hilo, symGOTOFF2reg_hilo): New. * config/frv/t-frv: Add -mfdpic multilibs. * config/frv/frv.h (ASM_SPEC): Pass -mfdpic/-mno-fdpic. (TARGET_SWITCHES): Add -mno-fdpic, fix documentation. * config/frv/frv.c (frv_override_options): -mfdpic assumes flag_pic, default to 32-bit pics, require DWORD ops. (frv_override_options): Add W and Z constraints. (frv_expand_prologue): No pic prologue for -mfdpic. (frv_asm_output_mi_thunk): Support -mfdpic (soon). (frv_print_operand_memory_reference): Handle GOT constants. (frv_legitimate_address_p): Allow GOT constants. (frv_legitimize_address): Handle GOT addresses too. (frv_legitimate_fdpic_operand_p): New. (frv_legitimize_fdpic_address): New. (unspec_got_name): New. (frv_output_addr_const_extra): New. (frv_expand_fdpic_call): New. (frv_fdpic_fptr_operand): New. (gpr_or_int12_operand): Handle GOT operands. (int_2word_operand): Handle GOT operands. (fdpic_operand): New. (fdpic_splittable_got_operand): New. (fdpic_got12_operand): New. (frv_emit_movsi): Handle GOT operands. (frv_assemble_integer): -mfdpic doesn't use rofixups. (frv_print_operand): Support 'g' code for GOT operands. * config/frv/frv-protos.h: Add prototypes as needed. * config/frv/frv.md (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO, R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI, R_FRV_FUNCDESC_GOTLO, R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12, R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12, R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New. (movsi_high_got, movsi_lo_sum_got): New. (*movsi_pic): Don't use this splitter for -mfdpic. (addsi3): Allow GOT references also. (call, call_value): Handle -mfdpic separately. (call_fdpicdi, call_fdpicsi, lddi, call_value_fdpicdi, call_value_fdpicsi): New. (symGOT2reg, symGOT2reg_i, got splitters, symGOTOFF2reg, symGOTOFF2reg_i): New. * config/frv/frv.h (MASK_FDPIC): New. (TARGET_FDPIC): New. (TARGET_SWITCHES): Add -mfdpic. (FDPIC_FPTR_REGNO): New. (FDPIC_REGNO): New. (OUR_FDPIC_REG): New. (enum reg_class): Add FDPIC_REGS, FDPIC_FPTR_REGS, and FDPIC_CALL_REGS. (REG_CLASS_NAMES): Likewise. (REG_CLASS_CONTENTS): Likewise. (EXTRA_CONSTRAINT_FOR_Y): New, for 12-bit GOTs. (EXTRA_CONSTRAINT): Add it here. (FRV_GLOBAL_P): New. (OUTPUT_ADDR_CONST_EXTRA): New. From-SVN: r78373
2004-02-24 17:58:39 +01:00
#include "target.h"
invoke.texi (-fsched-pressure): Document it. 2009-09-02 Vladimir Makarov <vmakarov@redhat.com> * doc/invoke.texi (-fsched-pressure): Document it. (-fsched-reg-pressure-heuristic): Remove it. * reload.c (ira.h): Include. (find_reloads): Add choosing reload on number of small spilled classes. * haifa-sched.c (ira.h): Include. (sched_pressure_p, sched_regno_cover_class, curr_reg_pressure, saved_reg_pressure, curr_reg_live, saved_reg_live, region_ref_regs): New variables. (sched_init_region_reg_pressure_info, mark_regno_birth_or_death, initiate_reg_pressure_info, setup_ref_regs, initiate_bb_reg_pressure_info, save_reg_pressure, restore_reg_pressure, dying_use_p, print_curr_reg_pressure): New functions. (setup_insn_reg_pressure_info): New function. (rank_for_schedule): Add pressure checking and insn issue time. Remove comparison of insn reg weights. (ready_sort): Set insn reg pressure info. (update_register_pressure, setup_insn_max_reg_pressure, update_reg_and_insn_max_reg_pressure, sched_setup_bb_reg_pressure_info): New functions. (schedule_insn): Add code for printing and updating reg pressure info. (find_set_reg_weight, find_insn_reg_weight): Remove. (ok_for_early_queue_removal): Do nothing if pressure_only_p. (debug_ready_list): Print reg pressure info. (schedule_block): Ditto. Check insn issue time. (sched_init): Set up sched_pressure_p. Allocate and set up some reg pressure related info. (sched_finish): Free some reg pressure related info. (fix_tick_ready): Make insn always ready if pressure_p. (init_h_i_d): Don't call find_insn_reg_weight. (haifa_finish_h_i_d): Free insn reg pressure info. * ira-int.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move to ira.h. * ira-lives.c (single_reg_class): Check mode to find how many registers are necessary for operand. (ira_implicitly_set_insn_hard_regs): New. * common.opt (fsched-pressure): New options. (fsched-reg-pressure-heuristic): Remove. * ira.c (setup_eliminable_regset): Rename to ira_setup_eliminable_regset. Make it external. (expand_reg_info): Pass cover class to setup_reg_classes. (ira): Call resize_reg_info instead of allocate_reg_info. * sched-deps.c: Include ira.h. (implicit_reg_pending_clobbers, implicit_reg_pending_uses): New. (create_insn_reg_use, create_insn_reg_set, setup_insn_reg_uses, reg_pressure_info, insn_use_p, mark_insn_pseudo_birth, mark_insn_hard_regno_birth, mark_insn_reg_birth, mark_pseudo_death, mark_hard_regno_death, mark_reg_death, mark_insn_reg_store, mark_insn_reg_clobber, setup_insn_reg_pressure_info): New. (sched_analyze_1): Update implicit_reg_pending_uses. (sched_analyze_insn): Find implicit sets, uses, clobbers of regs. Use them to create dependencies. Set insn reg uses and pressure info. Process reg_pending_uses in one place. (free_deps): Free implicit sets. (remove_from_deps): Remove implicit sets if necessary. Check implicit sets when clearing reg_last_in_use. (init_deps_global): Clear implicit_reg_pending_clobbers and implicit_reg_pending_uses. * ira.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move from ira-int.h. (ira_setup_eliminable_regset, ira_set_pseudo_classes, ira_implicitly_set_insn_hard_regs): New prototypes. * ira-costs.c (pseudo_classes_defined_p, allocno_p, cost_elements_num): New variables. (allocno_costs, total_costs): Rename to costs and total_allocno_costs. (COSTS_OF_ALLOCNO): Rename to COSTS. (allocno_pref): Rename to pref. (allocno_pref_buffer): Rename to pref_buffer. (common_classes): Rename to regno_cover_class. (COST_INDEX): New. (record_reg_classes): Set allocno attributes only if allocno_p. (record_address_regs): Ditto. Use COST_INDEX instead of ALLOCNO_NUM. (scan_one_insn): Use COST_INDEX and COSTS instead of ALLOCNO_NUM and COSTS_OF_ALLOCNO. (print_costs): Rename to print_allocno_costs. (print_pseudo_costs): New. (process_bb_node_for_costs): Split into 2 functions with new function process_bb_for_costs. Pass BB to process_bb_for_costs. (find_allocno_class_costs): Rename to find_costs_and_classes. Add new parameter dump_file. Use cost_elements_num instead of ira_allocnos_num. Make one iteration if preferred classes were already calculated for scheduler. Make 2 versions of code depending on allocno_p. (setup_allocno_cover_class_and_costs): Check allocno_p. Use regno_cover_class and COSTS instead of common_classes and COSTS_OF_ALLOCNO. (init_costs, finish_costs): New. (ira_costs): Set up allocno_p and cost_elements_num. Call init_costs and finish_costs. (ira_set_pseudo_classes): New. * rtl.h (allocate_reg_info): Remove. (resize_reg_info): Change return type. (reg_cover_class): New. (setup_reg_classes): Add new parameter. * sched-int.h (struct deps_reg): New member implicit_sets. (sched_pressure_p, sched_regno_cover_class): New external definitions. (INCREASE_BITS): New macro. (struct reg_pressure_data, struct reg_use_data): New. (struct _haifa_insn_data): Remove reg_weight. Add members reg_pressure, reg_use_list, reg_set_list, and reg_pressure_excess_cost_change. (struct deps): New member implicit_sets. (pressure_p): New variable. (COVER_CLASS_BITS, INCREASE_BITS): New macros. (struct reg_pressure_data, struct reg_use_data): New. (INSN_REG_WEIGHT): Remove. (INSN_REG_PRESSURE, INSN_MAX_REG_PRESSURE, INSN_REG_USE_LIST, INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New macros. (sched_init_region_reg_pressure_info, sched_setup_bb_reg_pressure_info): New prototypes. * reginfo.c (struct reg_pref): New member coverclass. (reg_cover_class): New function. (reginfo_init, pass_reginfo_init): Move after free_reg_info. (reg_info_size): New variable. (allocate_reg_info): Make static. Setup reg_info_size. (resize_reg_info): Use reg_info_size. Return flag of resizing. (setup_reg_classes): Add a new parameter. Setup cover class too. * Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to the dependencies. * sched-rgn.c (deps_join): Set up implicit_sets. (schedule_region): Set up region and basic blocks pressure relative info. * passes.c (init_optimization_passes): Move pass_subregs_of_mode_init before pass_sched. From-SVN: r151348
2009-09-02 20:54:25 +02:00
#include "ira.h"
1992-02-28 11:23:25 +01:00
target.def (cannot_force_const_mem): Add a mode argument. gcc/ * target.def (cannot_force_const_mem): Add a mode argument. * doc/tm.texi.in (TARGET_CANNOT_FORCE_CONST_MEM): Update accordingly. * doc/tm.texi: Regenerate. * hooks.h (hook_bool_mode_rtx_false): Declare. * hooks.c (hook_bool_mode_const_rtx_false): Fix commentary. (hook_bool_mode_const_rtx_true): Likewise. (hook_bool_mode_rtx_false): New function. * reload.c (CONST_POOL_OK_P): Take a mode argument and require it to be non-VOID. Update call to cannot_force_const_mem. (find_reloads): Update accordingly. * varasm.c (force_const_mem): Update call to cannot_force_const_mem. * config/alpha/alpha.c (alpha_cannot_force_const_mem): Add a mode argument. * config/arm/arm-protos.h (arm_cannot_force_const_mem): Likewise. * config/arm/arm.h (LEGITIMATE_CONSTANT_P): Update call. * config/arm/arm.c (arm_cannot_force_const_mem): Add a mode argument. * config/bfin/bfin.c (bfin_cannot_force_const_mem): Likewise. * config/frv/frv.c (frv_cannot_force_const_mem): Likewise. * config/i386/i386.c (ix86_cannot_force_const_mem): Likewise. * config/ia64/ia64.c (ia64_cannot_force_const_mem): Likewise. * config/m68k/m68k.c (TARGET_CANNOT_FORCE_CONST_MEM): Redefine to... (m68k_cannot_force_const_mem): ...this new function. * config/mips/mips.c (mips_cannot_force_const_mem): Add a mode argument. (mips_const_insns, mips_legitimize_const_move): Update calls. (mips_secondary_reload_class): Likewise. * config/pa/pa.c (TARGET_CANNOT_FORCE_CONST_MEM): Redefine to... (pa_cannot_force_const_mem): ...this new function. * config/rs6000/rs6000.c (TARGET_CANNOT_FORCE_CONST_MEM): Reefine to... (rs6000_cannot_force_const_mem): ...this new function. * config/s390/s390.c (s390_cannot_force_const_mem): Add a mode argument. * config/sparc/sparc.c (sparc_cannot_force_const_mem): Likewise. * config/xtensa/xtensa.c (TARGET_CANNOT_FORCE_CONST_MEM): Redefine to... (xtensa_cannot_force_const_mem): ...this new function. From-SVN: r172813
2011-04-21 11:37:44 +02:00
/* True if X is a constant that can be forced into the constant pool.
MODE is the mode of the operand, or VOIDmode if not known. */
#define CONST_POOL_OK_P(MODE, X) \
((MODE) != VOIDmode \
&& CONSTANT_P (X) \
Implement FR-V FDPIC ABI support for frv-uclinux and frv-linux. 2004-02-05 Alexandre Oliva <aoliva@redhat.com> * config/frv/frv.c (frv_emit_movsi): Use GOT relocations for symbols in sections named by the user. 2004-01-30 Alexandre Oliva <aoliva@redhat.com> * config/frv/linux.h (TARGET_OS_CPP_BUILTINS): New. 2004-01-27 Alexandre Oliva <aoliva@redhat.com> * config.gcc (frv-*-*linux*): Handle like *-*-linux*. * config/frv/t-linux (EXTRA_MULTILIB_PARTS): Remove, obviated by the above. 2004-01-20 Alexandre Oliva <aoliva@redhat.com> * config/frv/frv.md (symGOT2reg_hilo, symGOTOFF2reg_hilo): Add one more pseudo to further improve code generation. 2004-01-19 Alexandre Oliva <aoliva@redhat.com> * config/frv/frv.md (movdi_ldd): Introduce explicit indirection inside UNSPEC. 2004-01-16 Alexandre Oliva <aoliva@redhat.com> * config/frv/frv.c (frv_legitimate_address_p): Added allow_double_reg_p argument. Adjust all callers. Use it to decide whether to enable double-register indirect addressing. (frv_funcdesc_alias_set): Remove. (frv_expand_fdpic_call): Force non-SYMBOL_REF operand into register. Emit movdi_ldd. (ldd_address_operand): New. * config/frv/frv-protos.h (frv_legitimate_address_p): Adjust. * config/frv/frv.h (GO_IF_LEGITIMATE_ADDRESS): Likewise. (PREDICATE_CODES): Add ldd_address_operand. * config/frv/frv.md (movdi_ldd): New. (symGOT2reg_hilo, symGOTOFF2reg_hilo): Use separate pseudo for intermediate computations if possible. (symGOTOFF2reg_i): Fix harmless typo. 2003-12-18 Alexandre Oliva <aoliva@redhat.com> * unwind-dw2-fde-glibc.c (_Unwind_IteratePhdrCallback): Cast relocated p_vaddr to vaddr type. * config/frv/frv-protos.h (frv_expand_fdpic_call): Return void. * config/frv/frv.c (frv_get_funcdesc_alias_set): New. (frv_expand_fdpic_call): Propagate incoming MEM's expr to funcdesc MEM, or use a funcdesc alias set. Use regular move instead of ldd. (dbl_memory_one_insn_operand): Recognize function descriptors by type or by alias set, and don't split them. * config/frv/frv.md (call, call_value): Never use call_internal for fdpic. (call_internal, call_value_internal): Never match for FDPIC. (call_fdpicdi, call_fdpicsi, call_value_fdpicdi, call_value_fdpicsi): Require FDPIC. (ldd): Removed. 2003-12-17 Alexandre Oliva <aoliva@redhat.com> * config/frv/frv.h (CRT_GET_RFIB_DATA): Define for __FRV_FDPIC__. * unwind-dw2-fde-glibc.c: Don't include elf-fdpic.h any more. (_Unwind_IteratePhdrCallback): Adjust type of load_base for FRV FDPIC. Compute data base address. * config/frv/linux.h (SUBTARGET_DRIVER_SELF_SPECS): Enable -mfdpic before the other self-specs are processed. * config/frv/t-linux (CRTSTUFF_T_CFLAGS, TARGET_LIBGCC2_CFLAGS): Build with -fPIC. 2003-12-15 Alexandre Oliva <aoliva@redhat.com> * unwind-dw2-fde-glibc.c: Don't include bits/elf-fdpic.h if inhibit_libc is defined. 2003-12-12 Alexandre Oliva <aoliva@redhat.com> * unwind-dw2-fde-glibc.c: Include bits/elf-fdpic.h for __FRV_FDPIC__. (__RELOC_POINTER): Define. (_Unwind_IteratePhdrCallback): Use it. * config/frv/frv.h (Twrite): Define. (TRANSFER_FROM_TRAMPOLINE): Use it. * config/frv/linux.h (INVOKE__main): Undefine. (Twrite): Override. 2003-12-05 Richard Sandiford <rsandifo@redhat.com> * doc/invoke.texi (-mlong-calls, -mlinked-fp): Document FRV options. (-mlibrary-pic): Emphasize that this option generates EABI code. (-mcpu): Add fr550. (-mpack): Remove. 2003-11-30 Alexandre Oliva <aoliva@redhat.com> * config/frv/frv.c (int_2word_operand): Reject LABELs, SYMBOL_REFs and CONSTs in FDPIC mode. * gcc/config.gcc (with_cpu): Default to fr400 on frv-*-*linux*. 2003-11-29 Richard Sandiford <rsandifo@redhat.com> * config/frv/frv.c (move_source_operand): Don't accept symbolic constants. * config/frv/frv.md (*movhi_internal, *movsi_internal): Use an 'n' rather than 'i' constraint for the 2-instruction alternative. (*movsi_2word): New, incorporating existing int_2word_operand splitter. 2003-11-29 Richard Sandiford <rsandifo@redhat.com> * config/frv/frv.h (EXTRA_CONSTRAINT_FOR_Q): Renamed from EXTRA_CONSTRAINT_FOR_Y. (EXTRA_CONSTRAINT): Remove handling of 'Y'. * config/frv/frv.md (*movsi_internal): Remove 'Q' constraint. (addsi3): Change 'Y' constraint to 'Q'. 2003-11-27 Richard Sandiford <rsandifo@redhat.com> * reload.c (CONST_POOL_OK_P): New macro. (find_reloads): Use it to decide whether a constant can be forced into memory. * config/frv/frv.h (LEGITIMATE_PIC_OPERAND_P): Return true if the constant satisfies got12_operand. (frv_cannot_force_const_mem): Always return true for TARGET_FDPIC. (frv_legitimate_address_p): Check for valid unspec offsets using got12_operand rather than frv_legitimate_fdpic_operand_p. (frv_legitimate_fdpic_operand_p): Delete. (frv_emit_movsi): Abort if we try to use the FDPIC register during or after reload. (frv_legitimate_constant_p): Return LEGITIMATE_PIC_OPERAND_P if TARGET_FDPIC. * config/frv/frv.md (*movdf_double): Add alternatives for CONST_DOUBLE. 2003-11-19 Richard Sandiford <rsandifo@redhat.com> * config/frv/frv-protos.h (fdpic_operand, fdpic_got12_operand) (frv_fdpic_fptr_operand): Don't declare here. * config/frv/frv.h (EXTRA_CONSTRAINT_FOR_Y): Call got12_operand rather than fdpic_got12_operand. (PREDICATE_CODES): Remove symbolic_operand entry. Add entries for got12_operand and const_unspec_operand. * config/frv/frv.c (got12_operand): Renamed from fdpic_got12_operand. (gpr_or_int12_operand, dbl_memory_one_insn_operand): Update calls. (symbolic_operand): Remove. (const_unspec_operand): New predicate. * config/frv/frv.md (*movsi_got): Use got12_operand. (*movsi_high_got, *movsi_lo_sum_got): Use const_unspec_operand. 2003-11-18 Richard Sandiford <rsandifo@redhat.com> * config/frv/frv-protos.h (frv_output_addr_const_extra): Remove. * config/frv/frv.h (OUTPUT_ADDR_CONST_EXTRA): Remove definition. * config/frv/frv.c (frv_unspec): New structure. (frv_small_data_reloc_p, frv_const_unspec_p): New functions. (frv_print_operand_memory_reference): Use frv_const_unspec_p to validate CONST indices. Use frv_output_const_unspec to print them. (frv_print_operand): Update call to unspec_got_name. Use frv_output_const_unspec to print constant unspecs. (frv_legitimate_fdpic_operand_p): Return true if frv_const_unspec_p. Reject UNSPECs otherwise. (unspec_got_name): Take the relocation number as argument, not an rtx containing it. (frv_output_addr_const_extra): Remove, replacing with... (frv_output_const_unspec): ...this new function. (frv_find_base_term): Use frv_const_unspec_p & frv_small_data_reloc_p. (gpr_or_int12_operand): Use fdpic_got12_operand. (dbl_memory_one_insn_operand): Likewise. (fdpic_got12_operand): Use frv_const_unspec_p. (frv_emit_movsi): Use frv_const_unspec_p to check for CONSTs that are already legitimate. Use frv_small_data_reloc_p when deciding whether to use HIGH/LO_SUM for R_FRV_GOTOFF12 and R_FRV_GPREL12. 2003-11-18 Alexandre Oliva <aoliva@redhat.com> * config/frv/t-linux (SHLIB_MAPFILES): Override so as to export... * config/frv/libgcc-frv.ver: ... frv-specific symbols. New file. * config/frv/frv-abi.h (CREATE_DOUBLE_SHIFT): Use branch to local label, for real this time. * config/frv/frv.c (frv_local_funcdesc_p): Update to new representation of visibility. (fdpic_got12_operand, symbolic_operand): Mark unused arguments as such. 2003-11-17 Richard Sandiford <rsandifo@redhat.com> * config/frv/frv.h (MASK_LINKED_FP, TARGET_LINKED_FP): New macros. (TARGET_SWITCHES): Add -mlinked-fp and -mno-linked-fp. * config/frv/frv.c (frv_override_options): Set MASK_LINKED_FP unless it was explicitly disabled. (frv_stack_info): There is no need to save the link register in every frame unless TARGET_LINKED_FP is true. (frv_frame_pointer_required): If !TARGET_LINKED_FP, only require a frame pointer if the stack pointer might change value. (frv_return_addr_rtx): Check and process "count" argument. 2003-11-14 Richard Sandiford <rsandifo@redhat.com> * config/frv/frv-protos.h (frv_legitimize_address): Remove. (frv_find_base_term): Declare. * config/frv/frv.h (LEGITIMIZE_ADDRESS): Do nothing. (FIND_BASE_TERM): Define. (PREDICATE_CODES): Remove pic_register_operand, pic_symbolic_operand, small_data_register_operand, small_data_symbolic_operand. Add symbolic_operand. * config/frv/frv.c (const_small_data_p, plus_small_data_p): Delete. (frv_print_operand_memory_reference, output_move_single): Remove special handling for unlegitimized sdata addresses. (frv_legitimate_address_p): Don't allow sums of SDA_BASE_REG and symbolic addresses. (frv_legitimize_address, frv_legitimize_fdpic_address): Delete. (frv_find_base_term): New function. (int_2word_operand): Check specifically for symbolic address constants. (pic_register_operand, pic_symbolic_operand): Delete. (small_data_register_operand, small_data_symbolic_operand): Delete. (dbl_memory_one_insn_operand): Don't call plus_small_data_p. Allow UNSPEC_GOT constants if !TARGET_FDPIC. (move_source_operand): Only accept CONSTs if they're a two-insn symbolic constant. (fdpic_got12_operand): Don't require TARGET_FDPIC. (frv_emit_movsi): Legitimize sdata and -mlibrary-pic addresses using gen_symGOTOFF2reg*. (frv_ifcvt_rewrite_mem): Remove (plus gr16 ...) special cases. (frv_rtx_costs): Give all MEM addresses a cost of 0. Give MEMs themselves a cost of 3 insns. * config/mips/mips.md (*movsi_got): Allow for !TARGET_FDPIC too. Change predicate to symbolic_operand. (*movsi_high_got, *movsi_lo_sum_got): Likewise. (*movsi_lda_sdata): Delete. (*movsi_pic, movsi_high_pic, movsi_lo_sum_pic): Delete. 2003-11-05 Alexandre Oliva <aoliva@redhat.com> * config.gcc: Add t-slibgcc-elf-ver and support --with-cpu for frv-*-*linux*. * config/frv/frv-abi.h (CREATE_DOUBLE_SHIFT): Use branch to local label. * config/frv/frv.h (DRIVER_SELF_SPECS): Add blank before -multilib-library-pic. (LINK_SPEC): Add -z text for -mfdpic. * config/frv/frvbegin.c (__ROFIXUP_LIST__): Don't define on FDPIC. * config/frv/frvend.c (__ROFIXUP_END__): Likewise. * config/frv/linux.h (STARTFILE_SPEC, ENDFILE_SPEC, LINK_SPEC): Override. (OPTION_DEFAULT_SPECS, HAS_INIT_SECTION, INIT_SECTION_ASM_OP, FINI_SECTION_ASM_OP, CRT_CALL_STATIC_FUNCTION): Define. * config/frv/t-linux (EXTRA_MULTILIB_PARTS): Use crtstuff-generated files. 2003-10-31 Alexandre Oliva <aoliva@redhat.com> * config.gcc: Add frv-*-*linux*. * config/frv/linux.h, config/frv/t-linux: New. 2003-10-06 Alexandre Oliva <aoliva@redhat.com> * config/frv/frv.h (LINK_SPEC): Pass -melf32frvfd to the linker when -mfdpic even if a linker script is explicitly listed. 2003-10-02 Alexandre Oliva <aoliva@redhat.com> * config/frv/frv.c (frv_override_options): Clear asm_out unaligned_op for SImode on FDPIC. (frv_emit_movsi): Use compute_reloc_for_constant to compute the argument passed to decl_readonly_section. (frv_assemble_integer): Revert 2003-09-30's change, but make the whole block run with FDPIC even with -fno-PIC. 2003-10-02 Alexandre Oliva <aoliva@redhat.com> * config/frv/frv.c (frv_cannot_force_const_mem): Don't force symbol or label plus offset to memory. (frv_emit_movsi): Emit GPREL only if -mgprel-ro. Emit 32-bit GOTOFF and GPREL for LABEL_REF. * config/frv/frv.h (DRIVER_SELF_SPECS): Add -mgprel-ro with -mfdpic unless -mno-gprel-ro, -fpic or -fpie. (MASK_GPREL_RO, TARGET_GPREL_RO): New. (TARGET_SWITCHES): Added gprel-ro and no-gprel-ro. * doc/invoke.texi: Document them. 2003-09-30 Alexandre Oliva <aoliva@redhat.com> * config/frv/frv-protos.h (frv_gen_GPsym2reg): Declare. (frv_splittable_got_operand): Removed. * config/frv/frv.c (frv_cannot_force_const_mem): Reject HIGH and LO_SUM. Add comments. (frv_override_options): Moved enabling of FDPIC to DRIVER_SELF_SPECS. Don't enable MASK_DWORD. (frv_local_funcdesc_p): Remove unnecessary heck for flag_pie. (frv_legitimize_fdpic_address): Don't duplicate logic in frv_emit_movsi. (frv_gen_GPsym2reg): New. (unspec_got_name): Added gprel. (frv_expand_fdpic_call): Add support for inlining PLTs. (fdpic_fptr_operand): Renamed from frv_fdpic_fptr_operand. (gpr_or_int12_operand): Added GPREL12. (pic_symbolic_operand): Match even if !flag_pic for FDPIC. (small_data_symbolic_operand): Fail if FDPIC. (fdpic_splittable_got_operand): Removed. (fdpic_got12_operand): Added GPREL12. (frv_emit_movsi): Reorganize to avoid duplication. Emit GPREL when appropriate. Fix sdata GOTOFF. (frv_legitimate_constant_p): Require legitimate PIC operand for FDPIC with pic, but only a legitimate fdpic operand for non-pic. (frv_assemble_integer): Move FDPIC funcdesc handling out of flag_pic case. (frv_asm_out_constructor, frv_asm_out_destructor): Abort if frv_assemble_integer fails. * config/frv/frv.h (DRIVER_SELF_SPECS): New. (SUBTARGET_DRIVER_SELF_SPECS): New. (ASM_SPEC): Don't pass -mno-fdpic. (LINK_SPEC): Pass -melf32frvfd for FDPIC. (MASK_INLINE_PLT, TARGET_INLINE_PLT): New. (TARGET_SWITCHES): Add -minline-plt, -mno-inline-plt and -multilib-library-pic. (PREDICATE_CODES): Added fdpic_operand, fdpic_fptr_operand, condexec_si_media_operator, condexec_sf_add_operator and condexec_sf_conv_operator. Removed condexec_sf_binary_operator and condexec_sf_unary_operator. * config/frv/frv.md (R_FRV_GPREL12, R_FRV_GPRELHI, R_FRV_GPRELLO): New. (movsi_got, movsi_high_got, movsi_lo_sum_got): Move before movsi_internal. Give them internal names. movsi_got has type int. (fdpic got splitters): Remove. (symGPREL2reg, symGPREL2reg_hilo): New. * config/frv/t-frv (MULTILIB_MATCHES): Don't map -fpic and -fPIC to -mlibrary-pic. Map -multilib-library-pic to it. * doc/invoke.texi: -mfdpic, -minline-plt, -multilib-library-pic: Document. 2003-09-28 Alexandre Oliva <aoliva@redhat.com> * config/frv/frv.c (frv_function_symbol_referenced_p): Declare. (TARGET_CANNOT_FORCE_CONST_MEM): Define to... (frv_cannot_force_const_mem): New function. (const_small_data_p, plus_small_data_p): Update comments on sdata on FDPIC. (frv_override_options): Set flag_pie for FDPIC too. (frv_conditional_register_usage): Mark gr16 and gr17 as non-fixed, call-saved registers on FDPIC. (frv_stack_info): Don't preserve the PIC register on FDPIC, and don't force LR to be preserved. (frv_expand_prologue): Likewise. (frv_asm_output_mi_thunk): Use 12-bit funcdesc gotoff for -fpic. (frv_frame_pointer_required): Don't force it just because the FDPIC register is used. (frv_legitimate_address_p) <CONST>: Accept a legitimate FDPIC operand only if !condexec_p. (frv_legitimize_address): Return the FDPIC-legitimized address. Don't match small data here on FDPIC. (frv_legitimate_fdpic_operand_p): Don't accept unadorned function symbols. Use TRUE/FALSE instead of 1/0. (frv_local_funcdesc_p): New. (frv_legitimize_fdpic_address): Rewrite to use GOTOFF and 12-bit immediates when possible. (pic_symbolic_operand): Accept SYMBOL_REFs and CONSTs in FDPIC. (dbl_memory_one_insn_operand): Accept addresses that add a REG and an UNSPEC_GOT. (frv_emit_movsi): Handle FDPIC before small data. Use GOTOFF and 12-bit immediates when possible. (frv_legitimate_constant_p): In FDPIC, reject SImode operands that are not legitimate pic operands. (frv_in_small_data_p): Re-enable for FDPIC. * config/frv/frv.h (SDA_BASE_REG): Remove comment about FDPIC. (FRV_GLOBAL_P): Removed. * config/frv/frv.md: Add modes to CONSTs. (movsi_got): New. (movsi_lo_sum_got): Use separate matches instead of match_dup. (movsi_high_pic, movsi_lo_sum_pic): Match on non-FDPIC only. (fdpic splittable operations): Match on flag_pic != 1. 2003-09-22 Alexandre Oliva <aoliva@redhat.com> * config/frv/frv.c (frv_asm_out_constructor, frv_asm_out_destructor): Pass to frv_assemble_integer the size in bytes, not bits. 2003-09-19 Alexandre Oliva <aoliva@redhat.com> * config/frv/frv.c (frv_assemble_integer): Reject complex expressions referencing function SYMBOL_REFs. * config/frv/frv.c (frv_function_symbol_referenced_p): New. (move_source_operand): Reject CONSTs that reference function SYMBOL_REFs on FDPIC. (frv_emit_movsi): If we get such a CONST, break it up. * config/frv/frv.h (CPP_SPEC): Define __FRV_FDPIC__ for -mfdpic. (TRANSFER_FROM_TRAMPOLINE): Use different definitions for FDPIC. * config/frv/frv.c (frv_print_operand) <I>: Recognize PLUS without MEM. (frv_assemble_integer): Don't use funcdesc for LABEL_REFs. (frv_trampoline_size): Increase for FDPIC. * config/frv/frv.h (TRAMPOLINE_ALIGNMENT): Bump to 64 for FDPIC. (TRANSFER_FROM_TRAMPOLINE): Handle FDPIC trampolines. * config/frv/frv.c (frv_legitimize_fdpic_address, frv_emit_movsi): Disable use of GOTOFF for now. (const_small_data_p, plus_small_data_p, frv_in_small_data_p): Disable use of small data in FDPIC for now. (frv_asm_output_mi_thunk): Implement for FDPIC. * config/frv/frv.h (SDA_BASE_REG): Set to -1 with FDPIC. * config/frv/frv.c (frv_asm_out_constructor): Use frv_assemble_integer for FDPIC pointers. (frv_asm_out_destructor): Likewise. * config/frv/frv.md (ldd): Fix order of operands. Use address_operand for input. 2003-09-18 DJ Delorie <dj@redhat.com> * config/frv/frv.c (frv_legitimate_fdpic_operand_p): Remove UNSPEC_PIC. (unspec_got_name): Correct typo. (frv_emit_movsi): Pre-expand splittable GOTs. (frv_expand_fdpic_call): Rename gen_lddi to gen_ldd. * config/frv/frv.md (lddi): Fix syntax error, rename to ldd. (symGOT2reg_hilo, symGOTOFF2reg_hilo): New. * config/frv/t-frv: Add -mfdpic multilibs. * config/frv/frv.h (ASM_SPEC): Pass -mfdpic/-mno-fdpic. (TARGET_SWITCHES): Add -mno-fdpic, fix documentation. * config/frv/frv.c (frv_override_options): -mfdpic assumes flag_pic, default to 32-bit pics, require DWORD ops. (frv_override_options): Add W and Z constraints. (frv_expand_prologue): No pic prologue for -mfdpic. (frv_asm_output_mi_thunk): Support -mfdpic (soon). (frv_print_operand_memory_reference): Handle GOT constants. (frv_legitimate_address_p): Allow GOT constants. (frv_legitimize_address): Handle GOT addresses too. (frv_legitimate_fdpic_operand_p): New. (frv_legitimize_fdpic_address): New. (unspec_got_name): New. (frv_output_addr_const_extra): New. (frv_expand_fdpic_call): New. (frv_fdpic_fptr_operand): New. (gpr_or_int12_operand): Handle GOT operands. (int_2word_operand): Handle GOT operands. (fdpic_operand): New. (fdpic_splittable_got_operand): New. (fdpic_got12_operand): New. (frv_emit_movsi): Handle GOT operands. (frv_assemble_integer): -mfdpic doesn't use rofixups. (frv_print_operand): Support 'g' code for GOT operands. * config/frv/frv-protos.h: Add prototypes as needed. * config/frv/frv.md (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO, R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI, R_FRV_FUNCDESC_GOTLO, R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12, R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12, R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New. (movsi_high_got, movsi_lo_sum_got): New. (*movsi_pic): Don't use this splitter for -mfdpic. (addsi3): Allow GOT references also. (call, call_value): Handle -mfdpic separately. (call_fdpicdi, call_fdpicsi, lddi, call_value_fdpicdi, call_value_fdpicsi): New. (symGOT2reg, symGOT2reg_i, got splitters, symGOTOFF2reg, symGOTOFF2reg_i): New. * config/frv/frv.h (MASK_FDPIC): New. (TARGET_FDPIC): New. (TARGET_SWITCHES): Add -mfdpic. (FDPIC_FPTR_REGNO): New. (FDPIC_REGNO): New. (OUR_FDPIC_REG): New. (enum reg_class): Add FDPIC_REGS, FDPIC_FPTR_REGS, and FDPIC_CALL_REGS. (REG_CLASS_NAMES): Likewise. (REG_CLASS_CONTENTS): Likewise. (EXTRA_CONSTRAINT_FOR_Y): New, for 12-bit GOTs. (EXTRA_CONSTRAINT): Add it here. (FRV_GLOBAL_P): New. (OUTPUT_ADDR_CONST_EXTRA): New. From-SVN: r78373
2004-02-24 17:58:39 +01:00
&& GET_CODE (X) != HIGH \
target.def (cannot_force_const_mem): Add a mode argument. gcc/ * target.def (cannot_force_const_mem): Add a mode argument. * doc/tm.texi.in (TARGET_CANNOT_FORCE_CONST_MEM): Update accordingly. * doc/tm.texi: Regenerate. * hooks.h (hook_bool_mode_rtx_false): Declare. * hooks.c (hook_bool_mode_const_rtx_false): Fix commentary. (hook_bool_mode_const_rtx_true): Likewise. (hook_bool_mode_rtx_false): New function. * reload.c (CONST_POOL_OK_P): Take a mode argument and require it to be non-VOID. Update call to cannot_force_const_mem. (find_reloads): Update accordingly. * varasm.c (force_const_mem): Update call to cannot_force_const_mem. * config/alpha/alpha.c (alpha_cannot_force_const_mem): Add a mode argument. * config/arm/arm-protos.h (arm_cannot_force_const_mem): Likewise. * config/arm/arm.h (LEGITIMATE_CONSTANT_P): Update call. * config/arm/arm.c (arm_cannot_force_const_mem): Add a mode argument. * config/bfin/bfin.c (bfin_cannot_force_const_mem): Likewise. * config/frv/frv.c (frv_cannot_force_const_mem): Likewise. * config/i386/i386.c (ix86_cannot_force_const_mem): Likewise. * config/ia64/ia64.c (ia64_cannot_force_const_mem): Likewise. * config/m68k/m68k.c (TARGET_CANNOT_FORCE_CONST_MEM): Redefine to... (m68k_cannot_force_const_mem): ...this new function. * config/mips/mips.c (mips_cannot_force_const_mem): Add a mode argument. (mips_const_insns, mips_legitimize_const_move): Update calls. (mips_secondary_reload_class): Likewise. * config/pa/pa.c (TARGET_CANNOT_FORCE_CONST_MEM): Redefine to... (pa_cannot_force_const_mem): ...this new function. * config/rs6000/rs6000.c (TARGET_CANNOT_FORCE_CONST_MEM): Reefine to... (rs6000_cannot_force_const_mem): ...this new function. * config/s390/s390.c (s390_cannot_force_const_mem): Add a mode argument. * config/sparc/sparc.c (sparc_cannot_force_const_mem): Likewise. * config/xtensa/xtensa.c (TARGET_CANNOT_FORCE_CONST_MEM): Redefine to... (xtensa_cannot_force_const_mem): ...this new function. From-SVN: r172813
2011-04-21 11:37:44 +02:00
&& !targetm.cannot_force_const_mem (MODE, X))
/* True if C is a non-empty register class that has too few registers
to be safely used as a reload target class. */
static inline bool
small_register_class_p (reg_class_t rclass)
{
return (reg_class_size [(int) rclass] == 1
|| (reg_class_size [(int) rclass] >= 1
&& targetm.class_likely_spilled_p (rclass)));
}
1992-02-28 11:23:25 +01:00
/* All reloads of the current insn are recorded here. See reload.h for
comments. */
1992-02-28 11:23:25 +01:00
int n_reloads;
struct reload rld[MAX_RELOADS];
1992-02-28 11:23:25 +01:00
/* All the "earlyclobber" operands of the current insn
are recorded here. */
int n_earlyclobbers;
rtx reload_earlyclobbers[MAX_RECOG_OPERANDS];
int reload_n_operands;
1992-02-28 11:23:25 +01:00
/* Replacing reloads.
If `replace_reloads' is nonzero, then as each reload is recorded
an entry is made for it in the table `replacements'.
Then later `subst_reloads' can look through that table and
perform all the replacements needed. */
/* Nonzero means record the places to replace. */
static int replace_reloads;
/* Each replacement is recorded with a structure like this. */
struct replacement
{
rtx *where; /* Location to store in */
int what; /* which reload this is for */
enum machine_mode mode; /* mode it must have */
};
static struct replacement replacements[MAX_RECOG_OPERANDS * ((MAX_REGS_PER_ADDRESS * 2) + 1)];
/* Number of replacements currently recorded. */
static int n_replacements;
/* Used to track what is modified by an operand. */
struct decomposition
{
1996-07-04 00:07:53 +02:00
int reg_flag; /* Nonzero if referencing a register. */
int safe; /* Nonzero if this can't conflict with anything. */
rtx base; /* Base address for MEM. */
HOST_WIDE_INT start; /* Starting offset or register number. */
1995-05-23 01:11:12 +02:00
HOST_WIDE_INT end; /* Ending offset or register number. */
};
#ifdef SECONDARY_MEMORY_NEEDED
/* Save MEMs needed to copy from one class of registers to another. One MEM
is used per mode, but normally only one or two modes are ever used.
We keep two versions, before and after register elimination. The one
after register elimination is record separately for each operand. This
is done in case the address is not valid to be sure that we separately
reload each. */
static rtx secondary_memlocs[NUM_MACHINE_MODES];
static rtx secondary_memlocs_elim[NUM_MACHINE_MODES][MAX_RECOG_OPERANDS];
static int secondary_memlocs_elim_used = 0;
#endif
1992-02-28 11:23:25 +01:00
/* The instruction we are doing reloads for;
so we can test whether a register dies in it. */
reload: Use rtx_insn (also touches caller-save.c and config/arc/arc) gcc/ * reload.h (struct insn_chain): Strengthen field "insn" from rtx to rtx_insn *. (find_reloads): Likewise for param 1. (subst_reloads): Likewise for sole param. (find_equiv_reg): Likwise for param 2. (regno_clobbered_p): Likwise for param 2. (reload): Likewise for param 1. * caller-save.c (save_call_clobbered_regs): Strengthen local "insn" from rtx to rtx_insn *. (insert_one_insn): Likewise for local "insn". * reload.c (this_insn): Likewise for this global. (find_reloads): Likewise for param "insn". (find_reloads_toplev): Likewise. (find_reloads_address): Likewise. (subst_reg_equivs): Likewise. (update_auto_inc_notes): Likewise. (find_reloads_address_1): Likewise. (find_reloads_subreg_address): Likewise. (subst_reloads): Likewise. (find_equiv_reg): Likewise, also for local "p". (regno_clobbered_p): Likewise for param "insn". * reload1.c (reg_reloaded_insn): Likewise for the elements of this array. (spill_reg_store): Likewise for the elements of this array. (remove_init_insns): Likewise for local "equiv_insn". (will_delete_init_insn_p): Likewise for param "insn". (reload): Likewise for param ""first" and local "insn". (calculate_needs_all_insns): Strengthen local "insn" from rtx to rtx_insn *. (calculate_elim_costs_all_insns): Likewise. (delete_caller_save_insns): Likewise. (spill_failure): Likewise for param "insn". (delete_dead_insn): Likewise. (set_label_offsets): Likewise. (eliminate_regs_in_insn): Likewise, also for locals "base_insn" and "prev_insn". (elimination_costs_in_insn): Likewise for param "insn". (set_initial_eh_label_offset): Replace use of NULL_RTX with NULL when referring to an insn. (set_initial_label_offsets): Likewise. (set_offsets_for_label): Strengthen param "insn" from rtx to rtx_insn *. (init_eliminable_invariants): Likewise for param "first" and local "insn". (fixup_eh_region_note): Likewise for param "insn". (reload_as_needed): Likewise for locals "prev", "insn", "old_next", "old_prev", "next". (gen_reload_chain_without_interm_reg_p): Likewise for locals "insn", "last". (reload_inheritance_insn): Strengthen elements of this array from rtx to rtx_insn *. (failed_reload): Likewise for param "insn". (choose_reload_regs): Likewise for local "insn". Replace use of NULL_RTX with NULL when referring to an insn. (input_reload_insns): Strengthen elements of this array from rtx to rtx_insn *. (other_input_address_reload_insns): Likewise for this global. (other_input_reload_insns): Likewise for this global. (input_address_reload_insns): Likwise for the elements of this array. (inpaddr_address_reload_insns): Likwise for the elements of this array. (output_reload_insns): Likewise for the elements of this array. (output_address_reload_insns): Likewise for the elements of this array. (outaddr_address_reload_insns): Likewise for the elements of this array. (operand_reload_insns): Likewise for this global. (other_operand_reload_insns): Likewise for this global. (other_output_reload_insns): Likewise for the elements of this array. (new_spill_reg_store): Likewise for the elements of this array. (emit_input_reload_insns): Likewise for locals "insn", "temp". Strengthen local "where" from rtx * to rtx_insn **. (emit_output_reload_insns): Strengthen locals "insn", "p", "next" from rtx to rtx_insn *. (do_input_reload): Likewise for local "insn". (do_output_reload): Likewise for local "insn". (emit_reload_insns): Likewise for locals "insn" and "store_insn". (emit_insn_if_valid_for_reload): Likewise for return type and local "last". Add checked cast to rtx_insn when returning "insn" since this has been through emit_insn. (gen_reload): Strengthen return type and locals "last", "insn", "set" from rtx to rtx_insn *. Add checked cast to rtx_insn when returning "insn" since it's been through emit_insn_if_valid_for_reload at this point. (delete_output_reload): Strengthen param "insn" and locals "output_reload_insn", "i2" from rtx to rtx_insn *. (delete_address_reloads): Likewise for params "dead_insn", "current_insn" and locals "prev", "next". (delete_address_reloads_1): Likewise for params "dead_insn", "current_insn" and locals "prev", "i2". (inc_for_reload): Likewise for locals "last", "add_insn". (add_auto_inc_notes): Strengthen param "insn" from rtx to rtx_insn *. * config/arc/arc-protos.h (regno_clobbered_p): Likewise for 2nd param of this duplicate of the prototype from reload.h From-SVN: r214370
2014-08-22 22:49:31 +02:00
static rtx_insn *this_insn;
1992-02-28 11:23:25 +01:00
/* Nonzero if this instruction is a user-specified asm with operands. */
static int this_insn_is_asm;
/* If hard_regs_live_known is nonzero,
we can tell which hard regs are currently live,
at least enough to succeed in choosing dummy reloads. */
static int hard_regs_live_known;
/* Indexed by hard reg number,
1997-12-07 01:31:01 +01:00
element is nonnegative if hard reg has been spilled.
1992-02-28 11:23:25 +01:00
This vector is passed to `find_reloads' as an argument
and is not changed here. */
static short *static_reload_reg_p;
/* Set to 1 in subst_reg_equivs if it changes anything. */
static int subst_reg_equivs_changed;
/* On return from push_reload, holds the reload-number for the OUT
operand, which can be different for that from the input operand. */
static int output_reloadnum;
/* Compare two RTX's. */
#define MATCHES(x, y) \
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
(x == y || (x != 0 && (REG_P (x) \
? REG_P (y) && REGNO (x) == REGNO (y) \
: rtx_equal_p (x, y) && ! side_effects_p (x))))
/* Indicates if two reloads purposes are for similar enough things that we
can merge their reloads. */
#define MERGABLE_RELOADS(when1, when2, op1, op2) \
((when1) == RELOAD_OTHER || (when2) == RELOAD_OTHER \
|| ((when1) == (when2) && (op1) == (op2)) \
|| ((when1) == RELOAD_FOR_INPUT && (when2) == RELOAD_FOR_INPUT) \
|| ((when1) == RELOAD_FOR_OPERAND_ADDRESS \
&& (when2) == RELOAD_FOR_OPERAND_ADDRESS) \
|| ((when1) == RELOAD_FOR_OTHER_ADDRESS \
&& (when2) == RELOAD_FOR_OTHER_ADDRESS))
/* Nonzero if these two reload purposes produce RELOAD_OTHER when merged. */
#define MERGE_TO_OTHER(when1, when2, op1, op2) \
((when1) != (when2) \
|| ! ((op1) == (op2) \
|| (when1) == RELOAD_FOR_INPUT \
|| (when1) == RELOAD_FOR_OPERAND_ADDRESS \
|| (when1) == RELOAD_FOR_OTHER_ADDRESS))
/* If we are going to reload an address, compute the reload type to
use. */
#define ADDR_TYPE(type) \
((type) == RELOAD_FOR_INPUT_ADDRESS \
? RELOAD_FOR_INPADDR_ADDRESS \
: ((type) == RELOAD_FOR_OUTPUT_ADDRESS \
? RELOAD_FOR_OUTADDR_ADDRESS \
: (type)))
static int push_secondary_reload (int, rtx, int, int, enum reg_class,
enum machine_mode, enum reload_type,
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
enum insn_code *, secondary_reload_info *);
static enum reg_class find_valid_class (enum machine_mode, enum machine_mode,
int, unsigned int);
static void push_replacement (rtx *, int, enum machine_mode);
static void dup_replacements (rtx *, rtx *);
static void combine_reloads (void);
static int find_reusable_reload (rtx *, rtx, enum reg_class,
enum reload_type, int, int);
static rtx find_dummy_reload (rtx, rtx, rtx *, rtx *, enum machine_mode,
enum machine_mode, reg_class_t, int, int);
static int hard_reg_set_here_p (unsigned int, unsigned int, rtx);
static struct decomposition decompose (rtx);
static int immune_p (rtx, rtx, struct decomposition);
static bool alternative_allows_const_pool_ref (rtx, const char *, int);
reload: Use rtx_insn (also touches caller-save.c and config/arc/arc) gcc/ * reload.h (struct insn_chain): Strengthen field "insn" from rtx to rtx_insn *. (find_reloads): Likewise for param 1. (subst_reloads): Likewise for sole param. (find_equiv_reg): Likwise for param 2. (regno_clobbered_p): Likwise for param 2. (reload): Likewise for param 1. * caller-save.c (save_call_clobbered_regs): Strengthen local "insn" from rtx to rtx_insn *. (insert_one_insn): Likewise for local "insn". * reload.c (this_insn): Likewise for this global. (find_reloads): Likewise for param "insn". (find_reloads_toplev): Likewise. (find_reloads_address): Likewise. (subst_reg_equivs): Likewise. (update_auto_inc_notes): Likewise. (find_reloads_address_1): Likewise. (find_reloads_subreg_address): Likewise. (subst_reloads): Likewise. (find_equiv_reg): Likewise, also for local "p". (regno_clobbered_p): Likewise for param "insn". * reload1.c (reg_reloaded_insn): Likewise for the elements of this array. (spill_reg_store): Likewise for the elements of this array. (remove_init_insns): Likewise for local "equiv_insn". (will_delete_init_insn_p): Likewise for param "insn". (reload): Likewise for param ""first" and local "insn". (calculate_needs_all_insns): Strengthen local "insn" from rtx to rtx_insn *. (calculate_elim_costs_all_insns): Likewise. (delete_caller_save_insns): Likewise. (spill_failure): Likewise for param "insn". (delete_dead_insn): Likewise. (set_label_offsets): Likewise. (eliminate_regs_in_insn): Likewise, also for locals "base_insn" and "prev_insn". (elimination_costs_in_insn): Likewise for param "insn". (set_initial_eh_label_offset): Replace use of NULL_RTX with NULL when referring to an insn. (set_initial_label_offsets): Likewise. (set_offsets_for_label): Strengthen param "insn" from rtx to rtx_insn *. (init_eliminable_invariants): Likewise for param "first" and local "insn". (fixup_eh_region_note): Likewise for param "insn". (reload_as_needed): Likewise for locals "prev", "insn", "old_next", "old_prev", "next". (gen_reload_chain_without_interm_reg_p): Likewise for locals "insn", "last". (reload_inheritance_insn): Strengthen elements of this array from rtx to rtx_insn *. (failed_reload): Likewise for param "insn". (choose_reload_regs): Likewise for local "insn". Replace use of NULL_RTX with NULL when referring to an insn. (input_reload_insns): Strengthen elements of this array from rtx to rtx_insn *. (other_input_address_reload_insns): Likewise for this global. (other_input_reload_insns): Likewise for this global. (input_address_reload_insns): Likwise for the elements of this array. (inpaddr_address_reload_insns): Likwise for the elements of this array. (output_reload_insns): Likewise for the elements of this array. (output_address_reload_insns): Likewise for the elements of this array. (outaddr_address_reload_insns): Likewise for the elements of this array. (operand_reload_insns): Likewise for this global. (other_operand_reload_insns): Likewise for this global. (other_output_reload_insns): Likewise for the elements of this array. (new_spill_reg_store): Likewise for the elements of this array. (emit_input_reload_insns): Likewise for locals "insn", "temp". Strengthen local "where" from rtx * to rtx_insn **. (emit_output_reload_insns): Strengthen locals "insn", "p", "next" from rtx to rtx_insn *. (do_input_reload): Likewise for local "insn". (do_output_reload): Likewise for local "insn". (emit_reload_insns): Likewise for locals "insn" and "store_insn". (emit_insn_if_valid_for_reload): Likewise for return type and local "last". Add checked cast to rtx_insn when returning "insn" since this has been through emit_insn. (gen_reload): Strengthen return type and locals "last", "insn", "set" from rtx to rtx_insn *. Add checked cast to rtx_insn when returning "insn" since it's been through emit_insn_if_valid_for_reload at this point. (delete_output_reload): Strengthen param "insn" and locals "output_reload_insn", "i2" from rtx to rtx_insn *. (delete_address_reloads): Likewise for params "dead_insn", "current_insn" and locals "prev", "next". (delete_address_reloads_1): Likewise for params "dead_insn", "current_insn" and locals "prev", "i2". (inc_for_reload): Likewise for locals "last", "add_insn". (add_auto_inc_notes): Strengthen param "insn" from rtx to rtx_insn *. * config/arc/arc-protos.h (regno_clobbered_p): Likewise for 2nd param of this duplicate of the prototype from reload.h From-SVN: r214370
2014-08-22 22:49:31 +02:00
static rtx find_reloads_toplev (rtx, int, enum reload_type, int, int,
rtx_insn *, int *);
static rtx make_memloc (rtx, 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
static int maybe_memory_address_addr_space_p (enum machine_mode, rtx,
addr_space_t, rtx *);
static int find_reloads_address (enum machine_mode, rtx *, rtx, rtx *,
reload: Use rtx_insn (also touches caller-save.c and config/arc/arc) gcc/ * reload.h (struct insn_chain): Strengthen field "insn" from rtx to rtx_insn *. (find_reloads): Likewise for param 1. (subst_reloads): Likewise for sole param. (find_equiv_reg): Likwise for param 2. (regno_clobbered_p): Likwise for param 2. (reload): Likewise for param 1. * caller-save.c (save_call_clobbered_regs): Strengthen local "insn" from rtx to rtx_insn *. (insert_one_insn): Likewise for local "insn". * reload.c (this_insn): Likewise for this global. (find_reloads): Likewise for param "insn". (find_reloads_toplev): Likewise. (find_reloads_address): Likewise. (subst_reg_equivs): Likewise. (update_auto_inc_notes): Likewise. (find_reloads_address_1): Likewise. (find_reloads_subreg_address): Likewise. (subst_reloads): Likewise. (find_equiv_reg): Likewise, also for local "p". (regno_clobbered_p): Likewise for param "insn". * reload1.c (reg_reloaded_insn): Likewise for the elements of this array. (spill_reg_store): Likewise for the elements of this array. (remove_init_insns): Likewise for local "equiv_insn". (will_delete_init_insn_p): Likewise for param "insn". (reload): Likewise for param ""first" and local "insn". (calculate_needs_all_insns): Strengthen local "insn" from rtx to rtx_insn *. (calculate_elim_costs_all_insns): Likewise. (delete_caller_save_insns): Likewise. (spill_failure): Likewise for param "insn". (delete_dead_insn): Likewise. (set_label_offsets): Likewise. (eliminate_regs_in_insn): Likewise, also for locals "base_insn" and "prev_insn". (elimination_costs_in_insn): Likewise for param "insn". (set_initial_eh_label_offset): Replace use of NULL_RTX with NULL when referring to an insn. (set_initial_label_offsets): Likewise. (set_offsets_for_label): Strengthen param "insn" from rtx to rtx_insn *. (init_eliminable_invariants): Likewise for param "first" and local "insn". (fixup_eh_region_note): Likewise for param "insn". (reload_as_needed): Likewise for locals "prev", "insn", "old_next", "old_prev", "next". (gen_reload_chain_without_interm_reg_p): Likewise for locals "insn", "last". (reload_inheritance_insn): Strengthen elements of this array from rtx to rtx_insn *. (failed_reload): Likewise for param "insn". (choose_reload_regs): Likewise for local "insn". Replace use of NULL_RTX with NULL when referring to an insn. (input_reload_insns): Strengthen elements of this array from rtx to rtx_insn *. (other_input_address_reload_insns): Likewise for this global. (other_input_reload_insns): Likewise for this global. (input_address_reload_insns): Likwise for the elements of this array. (inpaddr_address_reload_insns): Likwise for the elements of this array. (output_reload_insns): Likewise for the elements of this array. (output_address_reload_insns): Likewise for the elements of this array. (outaddr_address_reload_insns): Likewise for the elements of this array. (operand_reload_insns): Likewise for this global. (other_operand_reload_insns): Likewise for this global. (other_output_reload_insns): Likewise for the elements of this array. (new_spill_reg_store): Likewise for the elements of this array. (emit_input_reload_insns): Likewise for locals "insn", "temp". Strengthen local "where" from rtx * to rtx_insn **. (emit_output_reload_insns): Strengthen locals "insn", "p", "next" from rtx to rtx_insn *. (do_input_reload): Likewise for local "insn". (do_output_reload): Likewise for local "insn". (emit_reload_insns): Likewise for locals "insn" and "store_insn". (emit_insn_if_valid_for_reload): Likewise for return type and local "last". Add checked cast to rtx_insn when returning "insn" since this has been through emit_insn. (gen_reload): Strengthen return type and locals "last", "insn", "set" from rtx to rtx_insn *. Add checked cast to rtx_insn when returning "insn" since it's been through emit_insn_if_valid_for_reload at this point. (delete_output_reload): Strengthen param "insn" and locals "output_reload_insn", "i2" from rtx to rtx_insn *. (delete_address_reloads): Likewise for params "dead_insn", "current_insn" and locals "prev", "next". (delete_address_reloads_1): Likewise for params "dead_insn", "current_insn" and locals "prev", "i2". (inc_for_reload): Likewise for locals "last", "add_insn". (add_auto_inc_notes): Strengthen param "insn" from rtx to rtx_insn *. * config/arc/arc-protos.h (regno_clobbered_p): Likewise for 2nd param of this duplicate of the prototype from reload.h From-SVN: r214370
2014-08-22 22:49:31 +02:00
int, enum reload_type, int, rtx_insn *);
static rtx subst_reg_equivs (rtx, rtx_insn *);
static rtx subst_indexed_address (rtx);
reload: Use rtx_insn (also touches caller-save.c and config/arc/arc) gcc/ * reload.h (struct insn_chain): Strengthen field "insn" from rtx to rtx_insn *. (find_reloads): Likewise for param 1. (subst_reloads): Likewise for sole param. (find_equiv_reg): Likwise for param 2. (regno_clobbered_p): Likwise for param 2. (reload): Likewise for param 1. * caller-save.c (save_call_clobbered_regs): Strengthen local "insn" from rtx to rtx_insn *. (insert_one_insn): Likewise for local "insn". * reload.c (this_insn): Likewise for this global. (find_reloads): Likewise for param "insn". (find_reloads_toplev): Likewise. (find_reloads_address): Likewise. (subst_reg_equivs): Likewise. (update_auto_inc_notes): Likewise. (find_reloads_address_1): Likewise. (find_reloads_subreg_address): Likewise. (subst_reloads): Likewise. (find_equiv_reg): Likewise, also for local "p". (regno_clobbered_p): Likewise for param "insn". * reload1.c (reg_reloaded_insn): Likewise for the elements of this array. (spill_reg_store): Likewise for the elements of this array. (remove_init_insns): Likewise for local "equiv_insn". (will_delete_init_insn_p): Likewise for param "insn". (reload): Likewise for param ""first" and local "insn". (calculate_needs_all_insns): Strengthen local "insn" from rtx to rtx_insn *. (calculate_elim_costs_all_insns): Likewise. (delete_caller_save_insns): Likewise. (spill_failure): Likewise for param "insn". (delete_dead_insn): Likewise. (set_label_offsets): Likewise. (eliminate_regs_in_insn): Likewise, also for locals "base_insn" and "prev_insn". (elimination_costs_in_insn): Likewise for param "insn". (set_initial_eh_label_offset): Replace use of NULL_RTX with NULL when referring to an insn. (set_initial_label_offsets): Likewise. (set_offsets_for_label): Strengthen param "insn" from rtx to rtx_insn *. (init_eliminable_invariants): Likewise for param "first" and local "insn". (fixup_eh_region_note): Likewise for param "insn". (reload_as_needed): Likewise for locals "prev", "insn", "old_next", "old_prev", "next". (gen_reload_chain_without_interm_reg_p): Likewise for locals "insn", "last". (reload_inheritance_insn): Strengthen elements of this array from rtx to rtx_insn *. (failed_reload): Likewise for param "insn". (choose_reload_regs): Likewise for local "insn". Replace use of NULL_RTX with NULL when referring to an insn. (input_reload_insns): Strengthen elements of this array from rtx to rtx_insn *. (other_input_address_reload_insns): Likewise for this global. (other_input_reload_insns): Likewise for this global. (input_address_reload_insns): Likwise for the elements of this array. (inpaddr_address_reload_insns): Likwise for the elements of this array. (output_reload_insns): Likewise for the elements of this array. (output_address_reload_insns): Likewise for the elements of this array. (outaddr_address_reload_insns): Likewise for the elements of this array. (operand_reload_insns): Likewise for this global. (other_operand_reload_insns): Likewise for this global. (other_output_reload_insns): Likewise for the elements of this array. (new_spill_reg_store): Likewise for the elements of this array. (emit_input_reload_insns): Likewise for locals "insn", "temp". Strengthen local "where" from rtx * to rtx_insn **. (emit_output_reload_insns): Strengthen locals "insn", "p", "next" from rtx to rtx_insn *. (do_input_reload): Likewise for local "insn". (do_output_reload): Likewise for local "insn". (emit_reload_insns): Likewise for locals "insn" and "store_insn". (emit_insn_if_valid_for_reload): Likewise for return type and local "last". Add checked cast to rtx_insn when returning "insn" since this has been through emit_insn. (gen_reload): Strengthen return type and locals "last", "insn", "set" from rtx to rtx_insn *. Add checked cast to rtx_insn when returning "insn" since it's been through emit_insn_if_valid_for_reload at this point. (delete_output_reload): Strengthen param "insn" and locals "output_reload_insn", "i2" from rtx to rtx_insn *. (delete_address_reloads): Likewise for params "dead_insn", "current_insn" and locals "prev", "next". (delete_address_reloads_1): Likewise for params "dead_insn", "current_insn" and locals "prev", "i2". (inc_for_reload): Likewise for locals "last", "add_insn". (add_auto_inc_notes): Strengthen param "insn" from rtx to rtx_insn *. * config/arc/arc-protos.h (regno_clobbered_p): Likewise for 2nd param of this duplicate of the prototype from reload.h From-SVN: r214370
2014-08-22 22:49:31 +02:00
static void update_auto_inc_notes (rtx_insn *, int, int);
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
static int find_reloads_address_1 (enum machine_mode, addr_space_t, rtx, int,
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
enum rtx_code, enum rtx_code, rtx *,
reload: Use rtx_insn (also touches caller-save.c and config/arc/arc) gcc/ * reload.h (struct insn_chain): Strengthen field "insn" from rtx to rtx_insn *. (find_reloads): Likewise for param 1. (subst_reloads): Likewise for sole param. (find_equiv_reg): Likwise for param 2. (regno_clobbered_p): Likwise for param 2. (reload): Likewise for param 1. * caller-save.c (save_call_clobbered_regs): Strengthen local "insn" from rtx to rtx_insn *. (insert_one_insn): Likewise for local "insn". * reload.c (this_insn): Likewise for this global. (find_reloads): Likewise for param "insn". (find_reloads_toplev): Likewise. (find_reloads_address): Likewise. (subst_reg_equivs): Likewise. (update_auto_inc_notes): Likewise. (find_reloads_address_1): Likewise. (find_reloads_subreg_address): Likewise. (subst_reloads): Likewise. (find_equiv_reg): Likewise, also for local "p". (regno_clobbered_p): Likewise for param "insn". * reload1.c (reg_reloaded_insn): Likewise for the elements of this array. (spill_reg_store): Likewise for the elements of this array. (remove_init_insns): Likewise for local "equiv_insn". (will_delete_init_insn_p): Likewise for param "insn". (reload): Likewise for param ""first" and local "insn". (calculate_needs_all_insns): Strengthen local "insn" from rtx to rtx_insn *. (calculate_elim_costs_all_insns): Likewise. (delete_caller_save_insns): Likewise. (spill_failure): Likewise for param "insn". (delete_dead_insn): Likewise. (set_label_offsets): Likewise. (eliminate_regs_in_insn): Likewise, also for locals "base_insn" and "prev_insn". (elimination_costs_in_insn): Likewise for param "insn". (set_initial_eh_label_offset): Replace use of NULL_RTX with NULL when referring to an insn. (set_initial_label_offsets): Likewise. (set_offsets_for_label): Strengthen param "insn" from rtx to rtx_insn *. (init_eliminable_invariants): Likewise for param "first" and local "insn". (fixup_eh_region_note): Likewise for param "insn". (reload_as_needed): Likewise for locals "prev", "insn", "old_next", "old_prev", "next". (gen_reload_chain_without_interm_reg_p): Likewise for locals "insn", "last". (reload_inheritance_insn): Strengthen elements of this array from rtx to rtx_insn *. (failed_reload): Likewise for param "insn". (choose_reload_regs): Likewise for local "insn". Replace use of NULL_RTX with NULL when referring to an insn. (input_reload_insns): Strengthen elements of this array from rtx to rtx_insn *. (other_input_address_reload_insns): Likewise for this global. (other_input_reload_insns): Likewise for this global. (input_address_reload_insns): Likwise for the elements of this array. (inpaddr_address_reload_insns): Likwise for the elements of this array. (output_reload_insns): Likewise for the elements of this array. (output_address_reload_insns): Likewise for the elements of this array. (outaddr_address_reload_insns): Likewise for the elements of this array. (operand_reload_insns): Likewise for this global. (other_operand_reload_insns): Likewise for this global. (other_output_reload_insns): Likewise for the elements of this array. (new_spill_reg_store): Likewise for the elements of this array. (emit_input_reload_insns): Likewise for locals "insn", "temp". Strengthen local "where" from rtx * to rtx_insn **. (emit_output_reload_insns): Strengthen locals "insn", "p", "next" from rtx to rtx_insn *. (do_input_reload): Likewise for local "insn". (do_output_reload): Likewise for local "insn". (emit_reload_insns): Likewise for locals "insn" and "store_insn". (emit_insn_if_valid_for_reload): Likewise for return type and local "last". Add checked cast to rtx_insn when returning "insn" since this has been through emit_insn. (gen_reload): Strengthen return type and locals "last", "insn", "set" from rtx to rtx_insn *. Add checked cast to rtx_insn when returning "insn" since it's been through emit_insn_if_valid_for_reload at this point. (delete_output_reload): Strengthen param "insn" and locals "output_reload_insn", "i2" from rtx to rtx_insn *. (delete_address_reloads): Likewise for params "dead_insn", "current_insn" and locals "prev", "next". (delete_address_reloads_1): Likewise for params "dead_insn", "current_insn" and locals "prev", "i2". (inc_for_reload): Likewise for locals "last", "add_insn". (add_auto_inc_notes): Strengthen param "insn" from rtx to rtx_insn *. * config/arc/arc-protos.h (regno_clobbered_p): Likewise for 2nd param of this duplicate of the prototype from reload.h From-SVN: r214370
2014-08-22 22:49:31 +02:00
int, enum reload_type,int, rtx_insn *);
static void find_reloads_address_part (rtx, rtx *, enum reg_class,
enum machine_mode, int,
enum reload_type, int);
static rtx find_reloads_subreg_address (rtx, int, enum reload_type,
reload: Use rtx_insn (also touches caller-save.c and config/arc/arc) gcc/ * reload.h (struct insn_chain): Strengthen field "insn" from rtx to rtx_insn *. (find_reloads): Likewise for param 1. (subst_reloads): Likewise for sole param. (find_equiv_reg): Likwise for param 2. (regno_clobbered_p): Likwise for param 2. (reload): Likewise for param 1. * caller-save.c (save_call_clobbered_regs): Strengthen local "insn" from rtx to rtx_insn *. (insert_one_insn): Likewise for local "insn". * reload.c (this_insn): Likewise for this global. (find_reloads): Likewise for param "insn". (find_reloads_toplev): Likewise. (find_reloads_address): Likewise. (subst_reg_equivs): Likewise. (update_auto_inc_notes): Likewise. (find_reloads_address_1): Likewise. (find_reloads_subreg_address): Likewise. (subst_reloads): Likewise. (find_equiv_reg): Likewise, also for local "p". (regno_clobbered_p): Likewise for param "insn". * reload1.c (reg_reloaded_insn): Likewise for the elements of this array. (spill_reg_store): Likewise for the elements of this array. (remove_init_insns): Likewise for local "equiv_insn". (will_delete_init_insn_p): Likewise for param "insn". (reload): Likewise for param ""first" and local "insn". (calculate_needs_all_insns): Strengthen local "insn" from rtx to rtx_insn *. (calculate_elim_costs_all_insns): Likewise. (delete_caller_save_insns): Likewise. (spill_failure): Likewise for param "insn". (delete_dead_insn): Likewise. (set_label_offsets): Likewise. (eliminate_regs_in_insn): Likewise, also for locals "base_insn" and "prev_insn". (elimination_costs_in_insn): Likewise for param "insn". (set_initial_eh_label_offset): Replace use of NULL_RTX with NULL when referring to an insn. (set_initial_label_offsets): Likewise. (set_offsets_for_label): Strengthen param "insn" from rtx to rtx_insn *. (init_eliminable_invariants): Likewise for param "first" and local "insn". (fixup_eh_region_note): Likewise for param "insn". (reload_as_needed): Likewise for locals "prev", "insn", "old_next", "old_prev", "next". (gen_reload_chain_without_interm_reg_p): Likewise for locals "insn", "last". (reload_inheritance_insn): Strengthen elements of this array from rtx to rtx_insn *. (failed_reload): Likewise for param "insn". (choose_reload_regs): Likewise for local "insn". Replace use of NULL_RTX with NULL when referring to an insn. (input_reload_insns): Strengthen elements of this array from rtx to rtx_insn *. (other_input_address_reload_insns): Likewise for this global. (other_input_reload_insns): Likewise for this global. (input_address_reload_insns): Likwise for the elements of this array. (inpaddr_address_reload_insns): Likwise for the elements of this array. (output_reload_insns): Likewise for the elements of this array. (output_address_reload_insns): Likewise for the elements of this array. (outaddr_address_reload_insns): Likewise for the elements of this array. (operand_reload_insns): Likewise for this global. (other_operand_reload_insns): Likewise for this global. (other_output_reload_insns): Likewise for the elements of this array. (new_spill_reg_store): Likewise for the elements of this array. (emit_input_reload_insns): Likewise for locals "insn", "temp". Strengthen local "where" from rtx * to rtx_insn **. (emit_output_reload_insns): Strengthen locals "insn", "p", "next" from rtx to rtx_insn *. (do_input_reload): Likewise for local "insn". (do_output_reload): Likewise for local "insn". (emit_reload_insns): Likewise for locals "insn" and "store_insn". (emit_insn_if_valid_for_reload): Likewise for return type and local "last". Add checked cast to rtx_insn when returning "insn" since this has been through emit_insn. (gen_reload): Strengthen return type and locals "last", "insn", "set" from rtx to rtx_insn *. Add checked cast to rtx_insn when returning "insn" since it's been through emit_insn_if_valid_for_reload at this point. (delete_output_reload): Strengthen param "insn" and locals "output_reload_insn", "i2" from rtx to rtx_insn *. (delete_address_reloads): Likewise for params "dead_insn", "current_insn" and locals "prev", "next". (delete_address_reloads_1): Likewise for params "dead_insn", "current_insn" and locals "prev", "i2". (inc_for_reload): Likewise for locals "last", "add_insn". (add_auto_inc_notes): Strengthen param "insn" from rtx to rtx_insn *. * config/arc/arc-protos.h (regno_clobbered_p): Likewise for 2nd param of this duplicate of the prototype from reload.h From-SVN: r214370
2014-08-22 22:49:31 +02:00
int, rtx_insn *, int *);
static void copy_replacements_1 (rtx *, rtx *, int);
static int find_inc_amount (rtx, rtx);
static int refers_to_mem_for_reload_p (rtx);
static int refers_to_regno_for_reload_p (unsigned int, unsigned int,
rtx, rtx *);
/* Add NEW to reg_equiv_alt_mem_list[REGNO] if it's not present in the
list yet. */
static void
push_reg_equiv_alt_mem (int regno, rtx mem)
{
rtx it;
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
for (it = reg_equiv_alt_mem_list (regno); it; it = XEXP (it, 1))
if (rtx_equal_p (XEXP (it, 0), mem))
return;
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
reg_equiv_alt_mem_list (regno)
= alloc_EXPR_LIST (REG_EQUIV, mem,
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
reg_equiv_alt_mem_list (regno));
}
1992-02-28 11:23:25 +01:00
/* Determine if any secondary reloads are needed for loading (if IN_P is
nonzero) or storing (if IN_P is zero) X to or from a reload register of
register class RELOAD_CLASS in mode RELOAD_MODE. If secondary reloads
are needed, push them.
Return the reload number of the secondary reload we made, or -1 if
we didn't need one. *PICODE is set to the insn_code to use if we do
need a secondary reload. */
static int
push_secondary_reload (int in_p, rtx x, int opnum, int optional,
enum reg_class reload_class,
enum machine_mode reload_mode, enum reload_type type,
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
enum insn_code *picode, secondary_reload_info *prev_sri)
1992-02-28 11:23:25 +01:00
{
enum reg_class rclass = NO_REGS;
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
enum reg_class scratch_class;
1992-02-28 11:23:25 +01:00
enum machine_mode mode = reload_mode;
enum insn_code icode = CODE_FOR_nothing;
enum insn_code t_icode = CODE_FOR_nothing;
enum reload_type secondary_type;
int s_reload, t_reload = -1;
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
const char *scratch_constraint;
secondary_reload_info sri;
if (type == RELOAD_FOR_INPUT_ADDRESS
|| type == RELOAD_FOR_OUTPUT_ADDRESS
|| type == RELOAD_FOR_INPADDR_ADDRESS
|| type == RELOAD_FOR_OUTADDR_ADDRESS)
secondary_type = type;
else
secondary_type = in_p ? RELOAD_FOR_INPUT_ADDRESS : RELOAD_FOR_OUTPUT_ADDRESS;
*picode = CODE_FOR_nothing;
1992-02-28 11:23:25 +01:00
/* If X is a paradoxical SUBREG, use the inner value to determine both the
mode and object being reloaded. */
if (paradoxical_subreg_p (x))
{
x = SUBREG_REG (x);
reload_mode = GET_MODE (x);
}
/* If X is a pseudo-register that has an equivalent MEM (actually, if it
is still a pseudo-register by now, it *must* have an equivalent MEM
but we don't want to assume that), use that equivalent when seeing if
a secondary reload is needed since whether or not a reload is needed
might be sensitive to the form of the MEM. */
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) >= FIRST_PSEUDO_REGISTER
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
&& reg_equiv_mem (REGNO (x)))
x = reg_equiv_mem (REGNO (x));
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
sri.icode = CODE_FOR_nothing;
sri.prev_sri = prev_sri;
re PR middle-end/44566 (configuration with multiple targets / backends is not supported.) PR other/44566 * coretypes.h [!USED_FOR_TARGET] (reg_class_t): Define. * target.def (struct gcc_target): Replace enum reg_class with reg_class_t in hook argument / return types. * doc/tm.texi.in (TARGET_SECONDARY_RELOAD): Likewise. (TARGET_IRA_COVER_CLASSES, TARGET_MEMORY_MOVE_COST): Likewise. (TARGET_BRANCH_TARGET_REGISTER_CLASS): Likewise. * targhooks.h (default_branch_target_register_class): Likewise. (default_ira_cover_classes, default_secondary_reload): Likewise. (default_memory_move_cost, default_register_move_cost): Likewise. * targhooks.c (default_branch_target_register_class): Likewise. (default_ira_cover_classes, default_secondary_reload): Likewise. (default_memory_move_cost, default_register_move_cost): Likewise. * reload.c (push_secondary_reload, secondary_reload_class): Likewise. * bt-load.c (branch_target_load_optimize): Likewise. * ira.c (setup_cover_and_important_classes): Likewise. * ira-costs.c (copy_cost): Likewise. * reload1.c (emit_input_reload_insns): Likewise. * config/alpha/alpha.c (alpha_secondary_reload): Likewise. * config/frv/frv.c (frv_secondary_reload): Likewise. * config/s390/s390.c (s390_secondary_reload): Likewise. * config/i386/i386.c (i386_ira_cover_classes): Likewise. (ix86_secondary_reload, ix86_memory_move_cost): Likewise. (ix86_register_move_cost): Likewise. * config/sh/sh-protos.h (sh_secondary_reload): Likewise. * config/sh/sh.c (sh_target_reg_class, sh_secondary_reload): Likewise. * config/xtensa/xtensa.c (xtensa_secondary_reload): Likewise. * config/xtensa/xtensa-protos.h (xtensa_secondary_reload): Likewise. * config/rs6000/rs6000.c (rs6000_secondary_reload): Likewise. (rs6000_ira_cover_classes): Likewise. * config/picochip/picochip.c (picochip_secondary_reload): Likewise. * config/picochip/picochip-protos.h (picochip_secondary_reload): Likewise. * config/pa/pa.c (pa_secondary_reload): Likewise. * config/mips/mips.c (mips_ira_cover_classes): Likewise. * config/bfin/bfin.c (bfin_secondary_reload): Likewise. * config/ia64/ia64.c (ia64_register_move_cost): Likewise. * doc/tm.texi: Regenerate. From-SVN: r161633
2010-06-30 20:47:43 +02:00
rclass = (enum reg_class) targetm.secondary_reload (in_p, x, reload_class,
reload_mode, &sri);
combine.c (record_value_for_reg): Change 0 to VOIDmode, twice. gcc/: * combine.c (record_value_for_reg): Change 0 to VOIDmode, twice. (record_dead_and_set_regs): Likewise. * df.h (struct df_mw_hardreg): Change flags field to int. (struct df_base_ref): Likewise. (struct df): Change changeable_flags field to int. * df-scan.c (df_defs_record): Change clobber_flags to int. * dwarf2.h (enum dwarf_tag): Make lo_user and hi_user values enum constants rather than #define macros. (enum dwarf_attribute, enum dwarf_location_atom): Likewise. (enum dwarf_type, enum dwarf_endianity_encoding): Likewise. (enum dwarf_calling_convention): Likewise. (enum dwarf_line_number_x_ops): Likewise. (enum dwarf_call_frame_info): Likewise. (enum dwarf_source_language): Likewise. * dwarf2out.c (int_loc_descriptor): Add cast to enum type. (add_calling_convention_attribute): Likewise. * fold-const.c (fold_undefer_overflow_warnings): Add cast to enum type. (combine_comparisons): Change compcode to int. Add cast to enum type. * genrecog.c (maybe_both_true_2): Change c to int. (write_switch): Likewise. Add cast to enum type. * gimplify.c (gimplify_omp_for): Handle return values from gimplify_expr using MIN rather than bitwise or. (gimplify_expr): Add cast to enum type. * ipa-prop.c (update_jump_functions_after_inlining): Change IPA_BOTTOM to IPA_JF_UNKNOWN. * ira.c (setup_class_subset_and_memory_move_costs): Change mode to int. Add casts to enum type. (setup_cover_and_important_classes): Change cl to int. Add casts to enum type. (setup_class_translate): Change cl and mode to int. (ira_init_once): Change mode to int. (free_register_move_costs): Likewise. (setup_prohibited_mode_move_regs): Add casts to enum type. * langhooks.c (add_builtin_function_common): Rework assertion that value fits bitfield. * mcf.c (add_fixup_edge): Change type parameter to edge_type. * omega.c (omega_do_elimination): Avoid math on enum types. * optabs.c (expand_vec_shift_expr): Remove casts to int. * opts.c (set_debug_level): Change 2 to enum constant. Use new int local to handle integral_argment value. * regmove.c (try_auto_increment): Change PUT_MODE to PUT_REG_NOTE_KIND. * reload.c (push_secondary_reload): Add casts to enum type. (secondary_reload_class, find_valid_class): Likewise. * reload1.c (emit_input_reload_insns): Likewise. * rtl.h (NOTE_VAR_LOCATION_STATUS): Likewise. * sel-sched.c (init_hard_regs_data): Change cur_mode to int. * sel-sched-ir.c (hash_with_unspec_callback): Change 0 to enum constant. * tree.c (build_common_builtin_nodes): Add casts to enum type. * tree-complex.c (complex_lattice_t): Typedef to int rather than enum type. (expand_complex_libcall): Add casts to enum type. * tree-into-ssa.c (get_ssa_name_ann): Change 0 to enum constant. * tree-vect-loop.c (vect_model_reduction_cost): Compare reduc_code with ERROR_MARK, not NUM_TREE_CODES. (vect_create_epilog_for_reduction): Likewise. (vectorizable_reduction): Don't initialize epiloc_reduc_code. When not using it, set it to ERROR_MARK rather than NUM_TREE_CODES. * tree-vect-patterns.c (vect_pattern_recog_1): Change vec_mode to enum machine_mode. * tree-vect-stmts.c (new_stmt_vec_info): Change 0 to vect_unused_in_loop. Change 0 to loop_vect. * tree-vectorizer.c (vect_set_verbosity_level): Add casts to enum type. * var-tracking.c (get_init_value): Change return type to enum var_init_status. * vec.h (DEF_VEC_FUNC_P) [iterate]: Cast 0 to type T. * config/arm/arm.c (fp_model_for_fpu): Change to array to enum arm_fp_model. (arm_override_options): Add casts to enum type. (arm_emit_tls_decoration): Likewise. * config/i386/i386.c (ix86_function_specific_restore): Add casts to enum type. * config/i386/i386-c.c (ix86_pragma_target_parse): Likewise. * config/ia64/ia64.c (ia64_expand_compare): Change magic to int. * config/rs6000/rs6000.c (rs6000_override_options): Add casts to enum type. * config/s390/s390.c (code_for_builtin_64): Change to array of enum insn_code. (code_for_builtin_31): Likewise. (s390_expand_builtin): Change code_for_builtin to enum insn_code const *. * config/sparc/sparc.c (sparc_override_options): Change value field in struct code_model to enum cmodel. In initializer change 0 to NULL and add cast to enum type. * c-typeck.c (build_modify_expr): Add lhs_origtype parameter. Change all callers. Issue a -Wc++-compat warning using lhs_origtype if necessary. (convert_for_assignment): Issue -Wc++-compat warnings about invalid conversions to enum type on assignment. * c-common.h (build_modify_expr): Update declaration. gcc/cp/: * call.c (build_temp): Change 0 to enum constant. * cp-tree.h (cp_lvalue_kind): Typedef to int rather than enum type. * cp-gimplify.c (cp_gimplify_expr): Add cast to enum type. * decl2.c (constrain_visibility): Likewise. * parser.c (cp_lexer_get_preprocessor_token): Likewise. (cp_parser_flags): Typedef to int rather than enum type. (cp_parser_expression_stack_entry): Change prec field to enum cp_parser_prec. * typeck.c (build_modify_expr): Add lhs_origtype parameter. Change all callers. gcc/fortran/: * gfortran.h (enum gfc_symbol_type): New named enum type, broken out of struct gfc_symbol. (struct gfc_symbol): Use enum gfc_symbol_type. (enum gfc_array_ref_dimen_type): New named enum type, broken out of struct gfc_array_ref). (struct gfc_array_ref): Use enum gfc_array_ref_dimen_type. (mod_pointee_as): Update declaration. * decl.c (add_global_entry): Change type to enum gfc_symbol_type. (gfc_mod_pointee_as): Change return type to "match". * module.c (mio_array_ref): Add cast to enum type. (mio_symbol): Likewise. * resolve.c (resolve_global_procedure): Change type to enum gfc_symbol_type. * trans-io.c (gfc_build_st_parameter): Change type to unsigned int. gcc/java/: * jcf-parse.c (handle_constant): Add cast to enum type. gcc/objc/: * objc-act.c (get_super_receiver): Update calls to build_modify_expr to pass new argument. gcc/testsuite/: * gcc.dg/Wcxx-compat-4.c: New testcase. From-SVN: r146735
2009-04-24 17:31:38 +02:00
icode = (enum insn_code) sri.icode;
1992-02-28 11:23:25 +01:00
/* If we don't need any secondary registers, done. */
if (rclass == NO_REGS && icode == CODE_FOR_nothing)
return -1;
1992-02-28 11:23:25 +01:00
if (rclass != NO_REGS)
t_reload = push_secondary_reload (in_p, x, opnum, optional, rclass,
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
reload_mode, type, &t_icode, &sri);
1992-02-28 11:23:25 +01:00
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
/* If we will be using an insn, the secondary reload is for a
scratch register. */
1992-02-28 11:23:25 +01:00
if (icode != CODE_FOR_nothing)
{
/* If IN_P is nonzero, the reload register will be the output in
1992-02-28 11:23:25 +01:00
operand 0. If IN_P is zero, the reload register will be the input
in operand 1. Outputs should have an initial "=", which we must
skip. */
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
/* ??? It would be useful to be able to handle only two, or more than
three, operands, but for now we can only handle the case of having
exactly three: output, input and one temp/scratch. */
gcc_assert (insn_data[(int) icode].n_operands == 3);
/* ??? We currently have no way to represent a reload that needs
an icode to reload from an intermediate tertiary reload register.
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
We should probably have a new field in struct reload to tag a
chain of scratch operand reloads onto. */
gcc_assert (rclass == NO_REGS);
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
scratch_constraint = insn_data[(int) icode].operand[2].constraint;
gcc_assert (*scratch_constraint == '=');
scratch_constraint++;
if (*scratch_constraint == '&')
scratch_constraint++;
common.md: New file. gcc/ * common.md: New file. * doc/md.texi: Update description of generic, machine-independent constraints. * config/s390/constraints.md (e): Delete. * Makefile.in (md_file): Include common.md. * config/m32c/t-m32c (md_file): Likewise. * genpreds.c (general_mem): New array. (generic_constraint_letters): Remove constraints now defined by common.md. (add_constraint): Map TARGET_MEM_CONSTRAINT to general_mem. Allow the first character to be '<' or '>' as well. * genoutput.c (general_mem): New array. (indep_constraints): Remove constraints now defined by common.md. (note_constraint): Map TARGET_MEM_CONSTRAINT to general_mem. Remove special handling of 'm'. * ira-costs.c (record_reg_classes): Remove special handling of constraints now defined by common.md. * ira.c (ira_setup_alts, ira_get_dup_out_num): Likewise. * ira-lives.c (single_reg_class): Likewise. (ira_implicitly_set_insn_hard_regs): Likewise. * lra-constraints.c (reg_class_from_constraints): Likewise. (process_alt_operands, process_address, curr_insn_transform): Likewise. * postreload.c (reload_cse_simplify_operands): Likewise. * reload.c (push_secondary_reload, scratch_reload_class) (find_reloads, alternative_allows_const_pool_ref): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. * targhooks.c (default_secondary_reload): Likewise. * stmt.c (parse_output_constraint): Likewise. * recog.c (preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. (asm_operand_ok): Likewise, but add a comment saying why 'o' must be handled specially. From-SVN: r211475
2014-06-11 18:59:17 +02:00
scratch_class = (reg_class_for_constraint
(lookup_constraint (scratch_constraint)));
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
rclass = scratch_class;
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
mode = insn_data[(int) icode].operand[2].mode;
1992-02-28 11:23:25 +01:00
}
/* This case isn't valid, so fail. Reload is allowed to use the same
register for RELOAD_FOR_INPUT_ADDRESS and RELOAD_FOR_INPUT reloads, but
in the case of a secondary register, we actually need two different
registers for correct code. We fail here to prevent the possibility of
silently generating incorrect code later.
The convention is that secondary input reloads are valid only if the
secondary_class is different from class. If you have such a case, you
can not use secondary reloads, you must work around the problem some
other way.
Allow this when a reload_in/out pattern is being used. I.e. assume
that the generated code handles this case. */
gcc_assert (!in_p || rclass != reload_class || icode != CODE_FOR_nothing
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
|| t_icode != CODE_FOR_nothing);
/* See if we can reuse an existing secondary reload. */
for (s_reload = 0; s_reload < n_reloads; s_reload++)
if (rld[s_reload].secondary_p
&& (reg_class_subset_p (rclass, rld[s_reload].rclass)
|| reg_class_subset_p (rld[s_reload].rclass, rclass))
&& ((in_p && rld[s_reload].inmode == mode)
|| (! in_p && rld[s_reload].outmode == mode))
&& ((in_p && rld[s_reload].secondary_in_reload == t_reload)
|| (! in_p && rld[s_reload].secondary_out_reload == t_reload))
&& ((in_p && rld[s_reload].secondary_in_icode == t_icode)
|| (! in_p && rld[s_reload].secondary_out_icode == t_icode))
&& (small_register_class_p (rclass)
tm.texi (defmac SMALL_REGISTER_CLASSES): Remove. * doc/tm.texi (defmac SMALL_REGISTER_CLASSES): Remove. (TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P): Add documentation, based on the above, for new target hook. * hooks.c (hook_bool_mode_true): New generic hook. * hooks.h (hook_bool_mode_true): Add prototype. * target.h (struct gcc_target): Add small_register_classes_for_mode_p target hook. * target-def.h (TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P): New default target hook, set to hook_bool_mode_false. * regs.h: Remove default definition of SMALL_REGISTER_CLASSES. * reload.c (push_secondary_reload): Replace SMALL_REGISTER_CLASSES with targetm.small_register_classes_for_mode_p. (find_reusable_reload): Likewise. (combine_reloads): Likewise. * reload1.c (reload_as_needed): Likewise. * cse.c (approx_reg_cost_1, hash_rtx_cb): Likewise. * ifcvt.c (noce_process_if_block, check_cond_move_block, dead_or_predicable): Likewise. * regmove.c (optimize_reg_copy_1): Likewise. * calls.c (prepare_call_address): Likewise. (precompute_register_parameters): Likewise. * config/sh/sh.h: Replace SMALL_REGISTER_CLASSES with new target hook definition. * config/sh/sh.c (sh_small_register_classes_for_mode_p): Add implementation of the hook that considers all register classes small except for SH64. (sh_override_options): Use the new hook. * config/sh/sh-protos.h (sh_small_register_classes_for_mode_p): Add prototype. * config/arm/arm.h: Replace SMALL_REGISTER_CLASSES with new target hook definition. * config/arm/arm.c (arm_small_register_classes_for_mode_p): Add implementation of the hook that considers all register classes small for THUMB1. * config/arm/arm-protos.h (arm_small_register_classes_for_mode_p): Add prototype. * config/mips/mips.h: Replace SMALL_REGISTER_CLASSES with new target hook definition. * config/mips/mips.c (mips_small_register_classes_for_mode_p): Add implementation of the hook that considers all register classes small for MIPS16. * config/mips/mips-protos.h (mips_small_register_classes_for_mode_p): Add prototype. * config/i386/i386.h: Replace SMALL_REGISTER_CLASSES with new target hook definition. * config/m32c/m32c.h: Likewise. * config/pdp11/pdp11.h: Likewise. * config/avr/avr.h: Likewise. * config/xtensa/xtensa.h: Likewise. * config/m68hc11/m68hc11.h: Likewise. * config/mn10300/mn10300.h: Likewise. * config/mcore/mcore.h: Likewise. * config/h8300/h8300.h: Likewise. * config/bfin/bfin.h: Likewise. * config/iq2000/iq2000.h: Remove SMALL_REGISTER_CLASSES definition. * config/rx/rx.h: Remove SMALL_REGISTER_CLASSES definition. From-SVN: r158997
2010-05-03 19:47:47 +02:00
|| targetm.small_register_classes_for_mode_p (VOIDmode))
&& MERGABLE_RELOADS (secondary_type, rld[s_reload].when_needed,
opnum, rld[s_reload].opnum))
{
if (in_p)
rld[s_reload].inmode = mode;
if (! in_p)
rld[s_reload].outmode = mode;
if (reg_class_subset_p (rclass, rld[s_reload].rclass))
rld[s_reload].rclass = rclass;
rld[s_reload].opnum = MIN (rld[s_reload].opnum, opnum);
rld[s_reload].optional &= optional;
rld[s_reload].secondary_p = 1;
if (MERGE_TO_OTHER (secondary_type, rld[s_reload].when_needed,
opnum, rld[s_reload].opnum))
rld[s_reload].when_needed = RELOAD_OTHER;
break;
}
1992-02-28 11:23:25 +01:00
if (s_reload == n_reloads)
{
#ifdef SECONDARY_MEMORY_NEEDED
/* If we need a memory location to copy between the two reload regs,
set it up now. Note that we do the input case before making
the reload and the output case after. This is due to the
way reloads are output. */
if (in_p && icode == CODE_FOR_nothing
&& SECONDARY_MEMORY_NEEDED (rclass, reload_class, mode))
{
get_secondary_mem (x, reload_mode, opnum, type);
/* We may have just added new reloads. Make sure we add
the new reload at the end. */
s_reload = n_reloads;
}
#endif
/* We need to make a new secondary reload for this register class. */
rld[s_reload].in = rld[s_reload].out = 0;
rld[s_reload].rclass = rclass;
rld[s_reload].inmode = in_p ? mode : VOIDmode;
rld[s_reload].outmode = ! in_p ? mode : VOIDmode;
rld[s_reload].reg_rtx = 0;
rld[s_reload].optional = optional;
rld[s_reload].inc = 0;
/* Maybe we could combine these, but it seems too tricky. */
rld[s_reload].nocombine = 1;
rld[s_reload].in_reg = 0;
rld[s_reload].out_reg = 0;
rld[s_reload].opnum = opnum;
rld[s_reload].when_needed = secondary_type;
rld[s_reload].secondary_in_reload = in_p ? t_reload : -1;
rld[s_reload].secondary_out_reload = ! in_p ? t_reload : -1;
rld[s_reload].secondary_in_icode = in_p ? t_icode : CODE_FOR_nothing;
rld[s_reload].secondary_out_icode
= ! in_p ? t_icode : CODE_FOR_nothing;
rld[s_reload].secondary_p = 1;
n_reloads++;
#ifdef SECONDARY_MEMORY_NEEDED
if (! in_p && icode == CODE_FOR_nothing
&& SECONDARY_MEMORY_NEEDED (reload_class, rclass, mode))
get_secondary_mem (x, mode, opnum, type);
#endif
}
*picode = icode;
return s_reload;
1992-02-28 11:23:25 +01:00
}
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
/* If a secondary reload is needed, return its class. If both an intermediate
register and a scratch register is needed, we return the class of the
intermediate register. */
reg_class_t
secondary_reload_class (bool in_p, reg_class_t rclass, enum machine_mode mode,
rtx x)
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
{
enum insn_code icode;
secondary_reload_info sri;
sri.icode = CODE_FOR_nothing;
sri.prev_sri = NULL;
re PR middle-end/44566 (configuration with multiple targets / backends is not supported.) PR other/44566 * coretypes.h [!USED_FOR_TARGET] (reg_class_t): Define. * target.def (struct gcc_target): Replace enum reg_class with reg_class_t in hook argument / return types. * doc/tm.texi.in (TARGET_SECONDARY_RELOAD): Likewise. (TARGET_IRA_COVER_CLASSES, TARGET_MEMORY_MOVE_COST): Likewise. (TARGET_BRANCH_TARGET_REGISTER_CLASS): Likewise. * targhooks.h (default_branch_target_register_class): Likewise. (default_ira_cover_classes, default_secondary_reload): Likewise. (default_memory_move_cost, default_register_move_cost): Likewise. * targhooks.c (default_branch_target_register_class): Likewise. (default_ira_cover_classes, default_secondary_reload): Likewise. (default_memory_move_cost, default_register_move_cost): Likewise. * reload.c (push_secondary_reload, secondary_reload_class): Likewise. * bt-load.c (branch_target_load_optimize): Likewise. * ira.c (setup_cover_and_important_classes): Likewise. * ira-costs.c (copy_cost): Likewise. * reload1.c (emit_input_reload_insns): Likewise. * config/alpha/alpha.c (alpha_secondary_reload): Likewise. * config/frv/frv.c (frv_secondary_reload): Likewise. * config/s390/s390.c (s390_secondary_reload): Likewise. * config/i386/i386.c (i386_ira_cover_classes): Likewise. (ix86_secondary_reload, ix86_memory_move_cost): Likewise. (ix86_register_move_cost): Likewise. * config/sh/sh-protos.h (sh_secondary_reload): Likewise. * config/sh/sh.c (sh_target_reg_class, sh_secondary_reload): Likewise. * config/xtensa/xtensa.c (xtensa_secondary_reload): Likewise. * config/xtensa/xtensa-protos.h (xtensa_secondary_reload): Likewise. * config/rs6000/rs6000.c (rs6000_secondary_reload): Likewise. (rs6000_ira_cover_classes): Likewise. * config/picochip/picochip.c (picochip_secondary_reload): Likewise. * config/picochip/picochip-protos.h (picochip_secondary_reload): Likewise. * config/pa/pa.c (pa_secondary_reload): Likewise. * config/mips/mips.c (mips_ira_cover_classes): Likewise. * config/bfin/bfin.c (bfin_secondary_reload): Likewise. * config/ia64/ia64.c (ia64_register_move_cost): Likewise. * doc/tm.texi: Regenerate. From-SVN: r161633
2010-06-30 20:47:43 +02:00
rclass
= (enum reg_class) targetm.secondary_reload (in_p, x, rclass, mode, &sri);
combine.c (record_value_for_reg): Change 0 to VOIDmode, twice. gcc/: * combine.c (record_value_for_reg): Change 0 to VOIDmode, twice. (record_dead_and_set_regs): Likewise. * df.h (struct df_mw_hardreg): Change flags field to int. (struct df_base_ref): Likewise. (struct df): Change changeable_flags field to int. * df-scan.c (df_defs_record): Change clobber_flags to int. * dwarf2.h (enum dwarf_tag): Make lo_user and hi_user values enum constants rather than #define macros. (enum dwarf_attribute, enum dwarf_location_atom): Likewise. (enum dwarf_type, enum dwarf_endianity_encoding): Likewise. (enum dwarf_calling_convention): Likewise. (enum dwarf_line_number_x_ops): Likewise. (enum dwarf_call_frame_info): Likewise. (enum dwarf_source_language): Likewise. * dwarf2out.c (int_loc_descriptor): Add cast to enum type. (add_calling_convention_attribute): Likewise. * fold-const.c (fold_undefer_overflow_warnings): Add cast to enum type. (combine_comparisons): Change compcode to int. Add cast to enum type. * genrecog.c (maybe_both_true_2): Change c to int. (write_switch): Likewise. Add cast to enum type. * gimplify.c (gimplify_omp_for): Handle return values from gimplify_expr using MIN rather than bitwise or. (gimplify_expr): Add cast to enum type. * ipa-prop.c (update_jump_functions_after_inlining): Change IPA_BOTTOM to IPA_JF_UNKNOWN. * ira.c (setup_class_subset_and_memory_move_costs): Change mode to int. Add casts to enum type. (setup_cover_and_important_classes): Change cl to int. Add casts to enum type. (setup_class_translate): Change cl and mode to int. (ira_init_once): Change mode to int. (free_register_move_costs): Likewise. (setup_prohibited_mode_move_regs): Add casts to enum type. * langhooks.c (add_builtin_function_common): Rework assertion that value fits bitfield. * mcf.c (add_fixup_edge): Change type parameter to edge_type. * omega.c (omega_do_elimination): Avoid math on enum types. * optabs.c (expand_vec_shift_expr): Remove casts to int. * opts.c (set_debug_level): Change 2 to enum constant. Use new int local to handle integral_argment value. * regmove.c (try_auto_increment): Change PUT_MODE to PUT_REG_NOTE_KIND. * reload.c (push_secondary_reload): Add casts to enum type. (secondary_reload_class, find_valid_class): Likewise. * reload1.c (emit_input_reload_insns): Likewise. * rtl.h (NOTE_VAR_LOCATION_STATUS): Likewise. * sel-sched.c (init_hard_regs_data): Change cur_mode to int. * sel-sched-ir.c (hash_with_unspec_callback): Change 0 to enum constant. * tree.c (build_common_builtin_nodes): Add casts to enum type. * tree-complex.c (complex_lattice_t): Typedef to int rather than enum type. (expand_complex_libcall): Add casts to enum type. * tree-into-ssa.c (get_ssa_name_ann): Change 0 to enum constant. * tree-vect-loop.c (vect_model_reduction_cost): Compare reduc_code with ERROR_MARK, not NUM_TREE_CODES. (vect_create_epilog_for_reduction): Likewise. (vectorizable_reduction): Don't initialize epiloc_reduc_code. When not using it, set it to ERROR_MARK rather than NUM_TREE_CODES. * tree-vect-patterns.c (vect_pattern_recog_1): Change vec_mode to enum machine_mode. * tree-vect-stmts.c (new_stmt_vec_info): Change 0 to vect_unused_in_loop. Change 0 to loop_vect. * tree-vectorizer.c (vect_set_verbosity_level): Add casts to enum type. * var-tracking.c (get_init_value): Change return type to enum var_init_status. * vec.h (DEF_VEC_FUNC_P) [iterate]: Cast 0 to type T. * config/arm/arm.c (fp_model_for_fpu): Change to array to enum arm_fp_model. (arm_override_options): Add casts to enum type. (arm_emit_tls_decoration): Likewise. * config/i386/i386.c (ix86_function_specific_restore): Add casts to enum type. * config/i386/i386-c.c (ix86_pragma_target_parse): Likewise. * config/ia64/ia64.c (ia64_expand_compare): Change magic to int. * config/rs6000/rs6000.c (rs6000_override_options): Add casts to enum type. * config/s390/s390.c (code_for_builtin_64): Change to array of enum insn_code. (code_for_builtin_31): Likewise. (s390_expand_builtin): Change code_for_builtin to enum insn_code const *. * config/sparc/sparc.c (sparc_override_options): Change value field in struct code_model to enum cmodel. In initializer change 0 to NULL and add cast to enum type. * c-typeck.c (build_modify_expr): Add lhs_origtype parameter. Change all callers. Issue a -Wc++-compat warning using lhs_origtype if necessary. (convert_for_assignment): Issue -Wc++-compat warnings about invalid conversions to enum type on assignment. * c-common.h (build_modify_expr): Update declaration. gcc/cp/: * call.c (build_temp): Change 0 to enum constant. * cp-tree.h (cp_lvalue_kind): Typedef to int rather than enum type. * cp-gimplify.c (cp_gimplify_expr): Add cast to enum type. * decl2.c (constrain_visibility): Likewise. * parser.c (cp_lexer_get_preprocessor_token): Likewise. (cp_parser_flags): Typedef to int rather than enum type. (cp_parser_expression_stack_entry): Change prec field to enum cp_parser_prec. * typeck.c (build_modify_expr): Add lhs_origtype parameter. Change all callers. gcc/fortran/: * gfortran.h (enum gfc_symbol_type): New named enum type, broken out of struct gfc_symbol. (struct gfc_symbol): Use enum gfc_symbol_type. (enum gfc_array_ref_dimen_type): New named enum type, broken out of struct gfc_array_ref). (struct gfc_array_ref): Use enum gfc_array_ref_dimen_type. (mod_pointee_as): Update declaration. * decl.c (add_global_entry): Change type to enum gfc_symbol_type. (gfc_mod_pointee_as): Change return type to "match". * module.c (mio_array_ref): Add cast to enum type. (mio_symbol): Likewise. * resolve.c (resolve_global_procedure): Change type to enum gfc_symbol_type. * trans-io.c (gfc_build_st_parameter): Change type to unsigned int. gcc/java/: * jcf-parse.c (handle_constant): Add cast to enum type. gcc/objc/: * objc-act.c (get_super_receiver): Update calls to build_modify_expr to pass new argument. gcc/testsuite/: * gcc.dg/Wcxx-compat-4.c: New testcase. From-SVN: r146735
2009-04-24 17:31:38 +02:00
icode = (enum insn_code) sri.icode;
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
/* If there are no secondary reloads at all, we return NO_REGS.
If an intermediate register is needed, we return its class. */
if (icode == CODE_FOR_nothing || rclass != NO_REGS)
return rclass;
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
/* No intermediate register is needed, but we have a special reload
pattern, which we assume for now needs a scratch register. */
return scratch_reload_class (icode);
}
/* ICODE is the insn_code of a reload pattern. Check that it has exactly
three operands, verify that operand 2 is an output operand, and return
its register class.
??? We'd like to be able to handle any pattern with at least 2 operands,
for zero or more scratch registers, but that needs more infrastructure. */
enum reg_class
scratch_reload_class (enum insn_code icode)
{
const char *scratch_constraint;
enum reg_class rclass;
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
gcc_assert (insn_data[(int) icode].n_operands == 3);
scratch_constraint = insn_data[(int) icode].operand[2].constraint;
gcc_assert (*scratch_constraint == '=');
scratch_constraint++;
if (*scratch_constraint == '&')
scratch_constraint++;
system.h (REG_CLASS_FROM_CONSTRAINT): Poison. gcc/ * system.h (REG_CLASS_FROM_CONSTRAINT): Poison. (REG_CLASS_FOR_CONSTRAINT, EXTRA_CONSTRAINT_STR): Likewise. (EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT): Likewise. * genpreds.c (print_type_tree): New function. (write_tm_preds_h): Remove REG_CLASS_FROM_CONSTRAINT, REG_CLASS_FOR_CONSTRAINT, EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT and EXTRA_CONSTRAINT_STR. Write out enum constraint_type and get_constraint_type. * lra-constraints.c (satisfies_memory_constraint_p): Take a constraint_num rather than a constraint string. (satisfies_address_constraint_p): Likewise. (reg_class_from_constraints): Avoid old constraint macros. (process_alt_operands, process_address_1): Likewise. (curr_insn_transform): Likewise. * ira-costs.c (record_reg_classes): Likewise. (record_operand_costs): Likewise. * ira-lives.c (single_reg_class): Likewise. (ira_implicitly_set_insn_hard_regs): Likewise. * ira.c (ira_setup_alts, ira_get_dup_out_num): Likewise. * postreload.c (reload_cse_simplify_operands): Likewise. * recog.c (asm_operand_ok, preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. * reload.c (push_secondary_reload, scratch_reload_class): Likewise. (find_reloads, alternative_allows_const_pool_ref): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. * stmt.c (parse_output_constraint, parse_input_constraint): Likewise. * targhooks.c (default_secondary_reload): Likewise. * config/m32c/m32c.c (m32c_matches_constraint_p): Avoid reference to EXTRA_CONSTRAINT_STR. * config/sparc/constraints.md (U): Likewise REG_CLASS_FROM_CONSTRAINT. From-SVN: r211471
2014-06-11 18:58:35 +02:00
rclass = reg_class_for_constraint (lookup_constraint (scratch_constraint));
gcc_assert (rclass != NO_REGS);
return rclass;
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
}
1992-02-28 11:23:25 +01:00
#ifdef SECONDARY_MEMORY_NEEDED
/* Return a memory location that will be used to copy X in mode MODE.
If we haven't already made a location for this mode in this insn,
call find_reloads_address on the location being returned. */
rtx
get_secondary_mem (rtx x ATTRIBUTE_UNUSED, enum machine_mode mode,
int opnum, enum reload_type type)
{
rtx loc;
int mem_valid;
/* By default, if MODE is narrower than a word, widen it to a word.
This is required because most machines that require these memory
locations do not support short load and stores from all registers
(e.g., FP registers). */
#ifdef SECONDARY_MEMORY_NEEDED_MODE
mode = SECONDARY_MEMORY_NEEDED_MODE (mode);
#else
if (GET_MODE_BITSIZE (mode) < BITS_PER_WORD && INTEGRAL_MODE_P (mode))
mode = mode_for_size (BITS_PER_WORD, GET_MODE_CLASS (mode), 0);
#endif
/* If we already have made a MEM for this operand in MODE, return it. */
if (secondary_memlocs_elim[(int) mode][opnum] != 0)
return secondary_memlocs_elim[(int) mode][opnum];
/* If this is the first time we've tried to get a MEM for this mode,
allocate a new one. `something_changed' in reload will get set
by noticing that the frame size has changed. */
if (secondary_memlocs[(int) mode] == 0)
{
#ifdef SECONDARY_MEMORY_NEEDED_RTX
secondary_memlocs[(int) mode] = SECONDARY_MEMORY_NEEDED_RTX (mode);
#else
secondary_memlocs[(int) mode]
= assign_stack_local (mode, GET_MODE_SIZE (mode), 0);
#endif
}
/* Get a version of the address doing any eliminations needed. If that
didn't give us a new MEM, make a new one if it isn't valid. */
loc = eliminate_regs (secondary_memlocs[(int) mode], VOIDmode, NULL_RTX);
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
mem_valid = strict_memory_address_addr_space_p (mode, XEXP (loc, 0),
MEM_ADDR_SPACE (loc));
if (! mem_valid && loc == secondary_memlocs[(int) mode])
loc = copy_rtx (loc);
/* The only time the call below will do anything is if the stack
offset is too large. In that case IND_LEVELS doesn't matter, so we
can just pass a zero. Adjust the type to be the address of the
corresponding object. If the address was valid, save the eliminated
address. If it wasn't valid, we need to make a reload each time, so
don't save it. */
if (! mem_valid)
{
type = (type == RELOAD_FOR_INPUT ? RELOAD_FOR_INPUT_ADDRESS
: type == RELOAD_FOR_OUTPUT ? RELOAD_FOR_OUTPUT_ADDRESS
: RELOAD_OTHER);
find_reloads_address (mode, &loc, XEXP (loc, 0), &XEXP (loc, 0),
opnum, type, 0, 0);
}
secondary_memlocs_elim[(int) mode][opnum] = loc;
if (secondary_memlocs_elim_used <= (int)mode)
secondary_memlocs_elim_used = (int)mode + 1;
return loc;
}
/* Clear any secondary memory locations we've made. */
void
clear_secondary_mem (void)
{
memset (secondary_memlocs, 0, sizeof secondary_memlocs);
}
#endif /* SECONDARY_MEMORY_NEEDED */
/* Find the largest class which has at least one register valid in
mode INNER, and which for every such register, that register number
plus N is also valid in OUTER (if in range) and is cheap to move
lambda.h (lambda_vector_min_nz): Likewise. * lambda.h (lambda_vector_min_nz): Likewise. * langhooks.h (struct lang_hooks_for_types, struct lang_hooks): Likewise. * output.h (assemble_integer, this_is_asm_operands): Likewise. * tree.h: Likewise. * vec.h: Likewise. * tree-flow-inline.h (relink_imm_use): Use gcc_assert. * optabs.c (prepare_cmp_insn, emit_cmp_and_jump_insns): Reword comments to avoid 'abort'. Use gcc_assert as necessary. * opts.c (common_handle_option): Likewise. * pretty-print.c (pp_base_format_text): Likewise. * print-rtl.c (print_rtx): Likewise. * read-rtl.c (read_rtx_filename, read_rtx_1): Likewise. * regmove.c (try_auto_increment): Likewise. * reload.c (find_valid_class, find_reloads_toplev, find_equiv_reg): Likewise. * reload1.c (reload, forget_old_reloads_1, function_invariant_p, merge_assigned_reloads): Likewise. * tree-inline.c (inline_forbidden_p_1, estimate_num_insns_1): Likewise. * tree-optimize.c (execute_todo): Likewise. * tree-outof-ssa.c (eliminate_phi): Likewise. * tree-ssa-alias.c (add_pointed_to_expr): Likewise. * tree-ssa-ccp.c (maybe_fold_stmt_indirect): Likewise. * tree-ssa-operands.c (parse_ssa_operands, get_indirect_ref_operands, create_ssa_artficial_load_stmt): Likewise. * tree-ssa-pre.c (find_or_generate_expression): Likewise. * tree-ssanames.c (release_ssa_name): Likewise. * tree.c (int_bit_position, int_byte_position, tree_low_cst, walk_tree): Likewise. * tree-ssa-operands.c (verify_abort): Fold into .. (verify_imm_links): ... here. From-SVN: r98519
2005-04-21 20:05:34 +02:00
into REGNO. Such a class must exist. */
static enum reg_class
find_valid_class (enum machine_mode outer ATTRIBUTE_UNUSED,
enum machine_mode inner ATTRIBUTE_UNUSED, int n,
unsigned int dest_regno ATTRIBUTE_UNUSED)
{
int best_cost = -1;
int rclass;
int regno;
enum reg_class best_class = NO_REGS;
enum reg_class dest_class ATTRIBUTE_UNUSED = REGNO_REG_CLASS (dest_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 best_size = 0;
int cost;
for (rclass = 1; rclass < N_REG_CLASSES; rclass++)
{
int bad = 0;
int good = 0;
for (regno = 0; regno < FIRST_PSEUDO_REGISTER - n && ! bad; regno++)
if (TEST_HARD_REG_BIT (reg_class_contents[rclass], regno))
{
if (HARD_REGNO_MODE_OK (regno, inner))
{
good = 1;
if (TEST_HARD_REG_BIT (reg_class_contents[rclass], regno + n)
&& ! HARD_REGNO_MODE_OK (regno + n, outer))
bad = 1;
}
}
if (bad || !good)
continue;
2010-06-27 13:40:42 +02:00
cost = register_move_cost (outer, (enum reg_class) rclass, dest_class);
if ((reg_class_size[rclass] > best_size
&& (best_cost < 0 || best_cost >= cost))
|| best_cost > cost)
{
combine.c (record_value_for_reg): Change 0 to VOIDmode, twice. gcc/: * combine.c (record_value_for_reg): Change 0 to VOIDmode, twice. (record_dead_and_set_regs): Likewise. * df.h (struct df_mw_hardreg): Change flags field to int. (struct df_base_ref): Likewise. (struct df): Change changeable_flags field to int. * df-scan.c (df_defs_record): Change clobber_flags to int. * dwarf2.h (enum dwarf_tag): Make lo_user and hi_user values enum constants rather than #define macros. (enum dwarf_attribute, enum dwarf_location_atom): Likewise. (enum dwarf_type, enum dwarf_endianity_encoding): Likewise. (enum dwarf_calling_convention): Likewise. (enum dwarf_line_number_x_ops): Likewise. (enum dwarf_call_frame_info): Likewise. (enum dwarf_source_language): Likewise. * dwarf2out.c (int_loc_descriptor): Add cast to enum type. (add_calling_convention_attribute): Likewise. * fold-const.c (fold_undefer_overflow_warnings): Add cast to enum type. (combine_comparisons): Change compcode to int. Add cast to enum type. * genrecog.c (maybe_both_true_2): Change c to int. (write_switch): Likewise. Add cast to enum type. * gimplify.c (gimplify_omp_for): Handle return values from gimplify_expr using MIN rather than bitwise or. (gimplify_expr): Add cast to enum type. * ipa-prop.c (update_jump_functions_after_inlining): Change IPA_BOTTOM to IPA_JF_UNKNOWN. * ira.c (setup_class_subset_and_memory_move_costs): Change mode to int. Add casts to enum type. (setup_cover_and_important_classes): Change cl to int. Add casts to enum type. (setup_class_translate): Change cl and mode to int. (ira_init_once): Change mode to int. (free_register_move_costs): Likewise. (setup_prohibited_mode_move_regs): Add casts to enum type. * langhooks.c (add_builtin_function_common): Rework assertion that value fits bitfield. * mcf.c (add_fixup_edge): Change type parameter to edge_type. * omega.c (omega_do_elimination): Avoid math on enum types. * optabs.c (expand_vec_shift_expr): Remove casts to int. * opts.c (set_debug_level): Change 2 to enum constant. Use new int local to handle integral_argment value. * regmove.c (try_auto_increment): Change PUT_MODE to PUT_REG_NOTE_KIND. * reload.c (push_secondary_reload): Add casts to enum type. (secondary_reload_class, find_valid_class): Likewise. * reload1.c (emit_input_reload_insns): Likewise. * rtl.h (NOTE_VAR_LOCATION_STATUS): Likewise. * sel-sched.c (init_hard_regs_data): Change cur_mode to int. * sel-sched-ir.c (hash_with_unspec_callback): Change 0 to enum constant. * tree.c (build_common_builtin_nodes): Add casts to enum type. * tree-complex.c (complex_lattice_t): Typedef to int rather than enum type. (expand_complex_libcall): Add casts to enum type. * tree-into-ssa.c (get_ssa_name_ann): Change 0 to enum constant. * tree-vect-loop.c (vect_model_reduction_cost): Compare reduc_code with ERROR_MARK, not NUM_TREE_CODES. (vect_create_epilog_for_reduction): Likewise. (vectorizable_reduction): Don't initialize epiloc_reduc_code. When not using it, set it to ERROR_MARK rather than NUM_TREE_CODES. * tree-vect-patterns.c (vect_pattern_recog_1): Change vec_mode to enum machine_mode. * tree-vect-stmts.c (new_stmt_vec_info): Change 0 to vect_unused_in_loop. Change 0 to loop_vect. * tree-vectorizer.c (vect_set_verbosity_level): Add casts to enum type. * var-tracking.c (get_init_value): Change return type to enum var_init_status. * vec.h (DEF_VEC_FUNC_P) [iterate]: Cast 0 to type T. * config/arm/arm.c (fp_model_for_fpu): Change to array to enum arm_fp_model. (arm_override_options): Add casts to enum type. (arm_emit_tls_decoration): Likewise. * config/i386/i386.c (ix86_function_specific_restore): Add casts to enum type. * config/i386/i386-c.c (ix86_pragma_target_parse): Likewise. * config/ia64/ia64.c (ia64_expand_compare): Change magic to int. * config/rs6000/rs6000.c (rs6000_override_options): Add casts to enum type. * config/s390/s390.c (code_for_builtin_64): Change to array of enum insn_code. (code_for_builtin_31): Likewise. (s390_expand_builtin): Change code_for_builtin to enum insn_code const *. * config/sparc/sparc.c (sparc_override_options): Change value field in struct code_model to enum cmodel. In initializer change 0 to NULL and add cast to enum type. * c-typeck.c (build_modify_expr): Add lhs_origtype parameter. Change all callers. Issue a -Wc++-compat warning using lhs_origtype if necessary. (convert_for_assignment): Issue -Wc++-compat warnings about invalid conversions to enum type on assignment. * c-common.h (build_modify_expr): Update declaration. gcc/cp/: * call.c (build_temp): Change 0 to enum constant. * cp-tree.h (cp_lvalue_kind): Typedef to int rather than enum type. * cp-gimplify.c (cp_gimplify_expr): Add cast to enum type. * decl2.c (constrain_visibility): Likewise. * parser.c (cp_lexer_get_preprocessor_token): Likewise. (cp_parser_flags): Typedef to int rather than enum type. (cp_parser_expression_stack_entry): Change prec field to enum cp_parser_prec. * typeck.c (build_modify_expr): Add lhs_origtype parameter. Change all callers. gcc/fortran/: * gfortran.h (enum gfc_symbol_type): New named enum type, broken out of struct gfc_symbol. (struct gfc_symbol): Use enum gfc_symbol_type. (enum gfc_array_ref_dimen_type): New named enum type, broken out of struct gfc_array_ref). (struct gfc_array_ref): Use enum gfc_array_ref_dimen_type. (mod_pointee_as): Update declaration. * decl.c (add_global_entry): Change type to enum gfc_symbol_type. (gfc_mod_pointee_as): Change return type to "match". * module.c (mio_array_ref): Add cast to enum type. (mio_symbol): Likewise. * resolve.c (resolve_global_procedure): Change type to enum gfc_symbol_type. * trans-io.c (gfc_build_st_parameter): Change type to unsigned int. gcc/java/: * jcf-parse.c (handle_constant): Add cast to enum type. gcc/objc/: * objc-act.c (get_super_receiver): Update calls to build_modify_expr to pass new argument. gcc/testsuite/: * gcc.dg/Wcxx-compat-4.c: New testcase. From-SVN: r146735
2009-04-24 17:31:38 +02:00
best_class = (enum reg_class) rclass;
best_size = reg_class_size[rclass];
2010-06-27 13:40:42 +02:00
best_cost = register_move_cost (outer, (enum reg_class) rclass,
Fix enum conversions which are invalid in C++: gcc/: Fix enum conversions which are invalid in C++: * auto-inc-dec.c (attempt_change): Change 0 to SET in function call. * calls.c (store_one_arg): Change 0 to EXPAND_NORMAL in function call. * cse.c (hash_rtx_cb): Change 0 to VOIDmode in function call. * dbgcnt.c (dbg_cnt_set_limit_by_name): Add cast to enum type. * dbxout.c (dbxout_symbol): Change 0 to VOIDmode in function call. (dbxout_parms): Likewise. * df-core.c (df_set_flags): Change changeable_flags parameter to int. (df_clear_flags): Likewise. * df-problems.c (df_rd_bb_local_compute_process_def): Change top_flag parameter to int. (df_chain_create_bb_process_use): Likewise. (df_chain_add_problem): Change chain_flags parameter to unsigned int. Remove cast. * df-scan.c (df_ref_create): Change ref_flags parameter to int. (df_ref_create_structure, df_def_record_1): Likewise. (df_defs_record, df_uses_record, df_get_call_refs): Likewise. (df_notes_rescan): Change 0 to VOIDmode in function call. (df_get_call_refs, df_insn_refs_collect): Likewise. (df_bb_regs_collect): Likewise. (df_entry_block_defs_collect): Likewise. (df_exit_block_uses_collect): Likewise. * df.h: Update declarations. * double-int.c (double_int_divmod): Add cast to enum type. * dse.c (replace_inc_dec): Reverse parameters to gen_int_mode. * dwarf2out.c (new_reg_loc_descr): Add casts to enum type. (based_loc_descr): Likewise. (loc_descriptor_from_tree_1): Change first_op and second_op to enum dwarf_location_atom. Add cast to enum type. * expmed.c (init_expmed): Change 0 to SET in function call. * expr.c (init_expr_target): Change 0 to VOIDmode in function call. (expand_expr_real_1): Change 0 to EXPAND_NORMAL in function call. (do_store_flag): Likewise. * fixed-value.h (struct fixed_value): Change mode to enum machine_mode. * function.c (assign_parms): Change 0 to VOIDmode in function call. * genautomata.c (insert_automaton_decl): Change 1 to INSERT in function call. (insert_insn_decl, insert_decl, insert_state): Likewise. (automata_list_finish): Likewise. * genrecog.c (process_define_predicate): Add cast to enum type. * gensupport.c (init_predicate_table): Add cast to enum type. * gimple.c (gimple_build_return): Change 0 to ERROR_MARK in function call. (gimple_build_call_1, gimple_build_label): Likewise. (gimple_build_goto, gimple_build_asm_1): Likewise. (gimple_build_switch_1, gimple_build_cdt): Likewise. * gimple.h (GIMPLE_CHECK): Change 0 to ERROR_MARK in function call. (enum fallback): Rename from enum fallback_t. (fallback_t): Typedef as int. * gimple-low.c (lower_builtin_setjmp): Change TSI_SAME_STMT to GSI_SAME_STMT in function call. * ira.c (setup_class_subset_and_memory_move_costs): Add casts to enum type. (setup_reg_class_relations): Likewise. (setup_reg_class_nregs): Change cl to int. Add casts to enum type. (setup_prohibited_class_mode_regs): Add cast to enum type. (setup_prohibited_mode_move_regs): Likewise. * ira-costs.c (record_reg_classes): Change rclass to enum reg_class. (record_address_regs): Change i to enum reg_class. * lists.c (alloc_EXPR_LIST): Add cast to enum type. * machmode.h (GET_MODE_CLASS): Cast value to enum mode_class. (GET_MODE_WIDER_MODE): Cast value to enum machine_mode. (GET_MODE_2XWIDER_MODE): Likewise. (GET_CLASS_NARROWEST_MODE): Likewise. * omp-low.c (expand_omp_for): Add cast to enum type. * optabs.c (debug_optab_libfuncs): Add casts to enum type. * opts.c (enable_warning_as_error): Change kind to diagostic_t. * postreload.c (reload_cse_simplify_operands): Change rclass local to enum reg_class. * predict.c (combine_predictions_for_insn): Change best_predictor and predictor to enum br_predictor. (combine_predictions_for_bb): Likewise. (build_predict_expr): Change assignment to PREDICT_EXPR_OUTCOME to use SET_PREDICT_EXPR_OUTCOME. * real.c (real_arithmetic): Change icode to code in function call. * reginfo.c (init_move_cost): Add casts to enum type. (init_reg_sets_1, init_fake_stack_mems): Likewise. * regmove.c (regclass_compatible_p): Change class0 and class1 to enum reg_class. * reload.c (find_valid_class): Add casts to enum type. (push_reload): Change 0 to NO_REGS in function call. (find_reloads): Change this_alternative to array of enum reg_class. Remove some now-unnecessary casts. (make_memloc): Change 0 to VOIDmode in function call. * reload1.c (reload): Change 0 to VOIDmode in function call. (eliminate_regs_1, elimination_effects): Likewise. (eliminate_regs_in_insn): Likewise. (emit_input_reload_insns): Add cast to enum type. (delete_output_reload): Change 0 to VOIDmode in function call. * reorg.c (insn_sets_resource_p): Convert include_delayed_effects to enum type in function call. * tree.h (PREDICT_EXPR_OUTCOME): Add cast to enum type. (SET_PREDICT_EXPR_OUTCOME): Define. * tree-dump.c (get_dump_file_info): Change phase parameter to int. (get_dump_file_name, dump_begin, dump_enabled_p): Likewise. (dump_initialized_p, dump_flag_name, dump_end): Likewise. (dump_function): Likewise. * tree-dump.h: Update declarations. * tree-pass.h: Update declarations. * varasm.c (assemble_integer): Change mclass to enum mode_class. * config/arm/arm.c (thumb_legitimize_reload_address): Add cast to enum type. (arm_rtx_costs_1): Correct parenthesization. (arm_rtx_costs): Add casts to enum type. (adjacent_mem_locations): Reverse arguments to const_ok_for_op. (vfp_emit_fstmd): Use add_rg_note. (emit_multi_reg_push, emit_sfm): Likewise. (thumb_set_frame_pointer): Likewise. (arm_expand_prologue): Likewise. (arm_regno_class): Change return type to enum reg_class. (thumb1_expand_prologue): Use add_reg_note. * config/arm/arm-protos.h (arm_regno_class): Update declaration. * config/arm/arm.h (INITIALIZE_TRAMPOLINE): Change 0 to LCT_NORMAL in function call. * config/arm/gentune.sh: Add cast to enum type. * config/arm/arm-tune.md: Rebuild. * config/i386/i386.c (ix86_expand_prologue): Use add_reg_note. (ix86_split_fp_branch, predict_jump): Likewise. (ix86_expand_multi_arg_builtin): Change sub_code from enum insn_code to enum rtx_code. (ix86_builtin_vectorized_function): Add cast to enum type. * config/i386/i386.md (truncdfsf2): Change slot to enum ix86_stack_slot. (truncxf<mode>2, isinf<mode>2): Likewise. * config/i386/i386-c.c (ix86_pragma_target_parse): Add cast to enum type. * config/ia64/ia64.c (ia64_split_tmode_move): Use add_reg_note. (spill_restore_mem, do_spill, ia64_expand_prologue): Likewise. (insert_bundle_state): Change 1 to INSERT in function call. (ia64_add_bundle_selector_before): Likewise. * config/ia64/ia64.md (cpu attr): Add cast to enum type. (save_stack_nonlocal): Change 0 to LCT_NORMAL in function call. (restore_stack_nonlocal): Likewise. * config/mips/mips.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL in function call. * config/mips/mips.c (mips_binary_cost): Change 0 to SET in function call. (mips_rtx_costs): Likewise. (mips_override_options): Add casts to enum type. * config/mips/sdemtk.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL in function call. * config/pa/pa.c (legitimize_pic_address): Use add_reg_note. (store_reg, set_reg_plus_d): Likewise. (hppa_expand_prologue, hppa_profile_hook): Likewise. * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Add cast to enum type. (altivec_expand_vec_set_builtin): Change 0 to EXPAND_NORMAL in function call. (emit_unlikely_jump): Use add_reg_note. (rs6000_emit_allocate_stack): Likewise. (rs6000_frame_related, rs6000_emit_prologue): Likewise. (output_toc): Change 1 to INSERT in function call. (output_profile_hook): Change 0 to LCT_NORMAL in function call. (rs6000_initialize_trampoline): Likewise. (rs6000_init_dwarf_reg_sizes_extra): Change 0 to EXPAND_NORMAL in function call. * config/s390/s390.c (s390_rtx_costs): Add cast to enum type. (s390_expand_movmem): Change 0 to OPTAB_DIRECT in function call. (s390_expand_setmem, s390_expand_cmpmem): Likewise. (save_gprs): Use add_reg_note. (s390_emit_prologue): Likewise. (s390_expand_builtin): Change 0 to EXPAND_NORMAL in function call. * config/sparc/sparc.c (sparc_expand_prologue): Use add_reg_note. (sparc_fold_builtin): Add cast to enum type. * config/spu/spu.c (spu_emit_branch_or_set): Change ior_code to enum insn_code. (spu_expand_prologue): Use add_reg_note. (expand_builtin_args): Change 0 to EXPAND_NORMAL in function call. * c-parser.c (c_parser_attributes): Change VEC back to tree list. (c_parser_postfix_expression_after_primary): Get VEC for list of arguments. Get original types of arguments. Call build_function_call_vec. (cached_expr_list_1, cached_expr_list_2): New static variables. (c_parser_expr_list): Change return type to VEC *. Add p_orig_types parameter. Change all callers. (c_parser_release_expr): New static function. (c_parser_vec_to_tree_list): New static function. * c-typeck.c (build_function_call): Rewrite to build a VEC and call build_function_call_vec. (build_function_call_vec): New function, based on old build_function_call. (convert_arguments): Remove nargs and argarray parameters. Change values to a VEC. Add origtypes parameter. (build_modify_expr): Add rhs_origtype parameter. Change all callers. (convert_for_assignment): Add origtype parameter. Change all callers. If warn_cxx_compat, check for conversion to an enum type when calling a function. (store_init_value): Add origtype parameter. Change all callers. (digest_init): Likewise. (struct init_node): Add origtype field. (add_pending_init): Add origtype parameter. Change all callers. (output_init_element): Likewise. (output_pending_init_elements): Pass origtype from init_node to output_init_element. (process_init_elemnt): Pass origtype from c_expr to output_init_element. (c_finish_return): Add origtype parameter. Change all callers. * c-common.c (sync_resolve_size): Change params to VEC *. Change caller. (sync_resolve_params): Likewise. (sync_resolve_return): Change params to first_param. Change caller. (resolve_overloaded_builtins): Change params to VEC *. Change callers. Save first parameter around call to build_function_call_vec. * c-decl.c (finish_decl): Add origtype parameter. Change all callers. Call build_function_call_vec rather than build_function_call for cleanup. * c-tree.h: Update declarations. * c-common.h: Update declarations. * stub-objc.c (objc_rewrite_function_call): Change parameter from params to first_param. * target.h (struct gcc_target): Change resolve_overloaded_builtin params parameter from tree to void *. * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Change arglist parameter to have type void *, and to be a pointer to a VEC. * config/rs6000/rs6000-protos.h (altivec_resolve_overloaded_builtin): Update declaration. * config/spu/spu-c.c (spu_resolved_overloaded_builtin): Change fnargs parameter to have type void *, and to be a pointer to a VEC. Call build_function_call_vec instead of build_function_call. * config/spu/spu-protos.h (spu_expand_builtin): Update declaration. gcc/cp/: * typeck.c (build_function_call_vec): New function. (cp_build_function_call): Only pass first parameter to objc_rewrite_function_call. (build_modify_expr): Add rhs_origtype parameter. Change all callers. * decl.c (finish_decl): Add origtype parameter. Change all callers. * semantics.c (finish_call_expr): Pass VEC to resolve_overloaded_builtin. gcc/objc: * objc-act.c (objc_rewrite_function_call): Change parameter from params to first_param. Change all callers. gcc/testsuite: * gcc.dg/Wcxx-compat-3.c: New testcase. From-SVN: r146451
2009-04-20 21:35:00 +02:00
dest_class);
}
}
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 (best_size != 0);
return best_class;
}
/* We are trying to reload a subreg of something that is not a register.
Find the largest class which contains only registers valid in
mode MODE. OUTER is the mode of the subreg, DEST_CLASS the class in
which we would eventually like to obtain the object. */
static enum reg_class
find_valid_class_1 (enum machine_mode outer ATTRIBUTE_UNUSED,
enum machine_mode mode ATTRIBUTE_UNUSED,
enum reg_class dest_class ATTRIBUTE_UNUSED)
{
int best_cost = -1;
int rclass;
int regno;
enum reg_class best_class = NO_REGS;
unsigned int best_size = 0;
int cost;
for (rclass = 1; rclass < N_REG_CLASSES; rclass++)
{
int bad = 0;
for (regno = 0; regno < FIRST_PSEUDO_REGISTER && !bad; regno++)
{
if (in_hard_reg_set_p (reg_class_contents[rclass], mode, regno)
&& !HARD_REGNO_MODE_OK (regno, mode))
bad = 1;
}
if (bad)
continue;
cost = register_move_cost (outer, (enum reg_class) rclass, dest_class);
if ((reg_class_size[rclass] > best_size
&& (best_cost < 0 || best_cost >= cost))
|| best_cost > cost)
{
best_class = (enum reg_class) rclass;
best_size = reg_class_size[rclass];
best_cost = register_move_cost (outer, (enum reg_class) rclass,
dest_class);
}
}
gcc_assert (best_size != 0);
#ifdef LIMIT_RELOAD_CLASS
best_class = LIMIT_RELOAD_CLASS (mode, best_class);
#endif
return best_class;
}
/* Return the number of a previously made reload that can be combined with
a new one, or n_reloads if none of the existing reloads can be used.
OUT, RCLASS, TYPE and OPNUM are the same arguments as passed to
push_reload, they determine the kind of the new reload that we try to
combine. P_IN points to the corresponding value of IN, which can be
modified by this function.
DONT_SHARE is nonzero if we can't share any input-only reload for IN. */
static int
find_reusable_reload (rtx *p_in, rtx out, enum reg_class rclass,
enum reload_type type, int opnum, int dont_share)
{
rtx in = *p_in;
int i;
/* We can't merge two reloads if the output of either one is
earlyclobbered. */
if (earlyclobber_operand_p (out))
return n_reloads;
/* We can use an existing reload if the class is right
and at least one of IN and OUT is a match
and the other is at worst neutral.
(A zero compared against anything is neutral.)
tm.texi (defmac SMALL_REGISTER_CLASSES): Remove. * doc/tm.texi (defmac SMALL_REGISTER_CLASSES): Remove. (TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P): Add documentation, based on the above, for new target hook. * hooks.c (hook_bool_mode_true): New generic hook. * hooks.h (hook_bool_mode_true): Add prototype. * target.h (struct gcc_target): Add small_register_classes_for_mode_p target hook. * target-def.h (TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P): New default target hook, set to hook_bool_mode_false. * regs.h: Remove default definition of SMALL_REGISTER_CLASSES. * reload.c (push_secondary_reload): Replace SMALL_REGISTER_CLASSES with targetm.small_register_classes_for_mode_p. (find_reusable_reload): Likewise. (combine_reloads): Likewise. * reload1.c (reload_as_needed): Likewise. * cse.c (approx_reg_cost_1, hash_rtx_cb): Likewise. * ifcvt.c (noce_process_if_block, check_cond_move_block, dead_or_predicable): Likewise. * regmove.c (optimize_reg_copy_1): Likewise. * calls.c (prepare_call_address): Likewise. (precompute_register_parameters): Likewise. * config/sh/sh.h: Replace SMALL_REGISTER_CLASSES with new target hook definition. * config/sh/sh.c (sh_small_register_classes_for_mode_p): Add implementation of the hook that considers all register classes small except for SH64. (sh_override_options): Use the new hook. * config/sh/sh-protos.h (sh_small_register_classes_for_mode_p): Add prototype. * config/arm/arm.h: Replace SMALL_REGISTER_CLASSES with new target hook definition. * config/arm/arm.c (arm_small_register_classes_for_mode_p): Add implementation of the hook that considers all register classes small for THUMB1. * config/arm/arm-protos.h (arm_small_register_classes_for_mode_p): Add prototype. * config/mips/mips.h: Replace SMALL_REGISTER_CLASSES with new target hook definition. * config/mips/mips.c (mips_small_register_classes_for_mode_p): Add implementation of the hook that considers all register classes small for MIPS16. * config/mips/mips-protos.h (mips_small_register_classes_for_mode_p): Add prototype. * config/i386/i386.h: Replace SMALL_REGISTER_CLASSES with new target hook definition. * config/m32c/m32c.h: Likewise. * config/pdp11/pdp11.h: Likewise. * config/avr/avr.h: Likewise. * config/xtensa/xtensa.h: Likewise. * config/m68hc11/m68hc11.h: Likewise. * config/mn10300/mn10300.h: Likewise. * config/mcore/mcore.h: Likewise. * config/h8300/h8300.h: Likewise. * config/bfin/bfin.h: Likewise. * config/iq2000/iq2000.h: Remove SMALL_REGISTER_CLASSES definition. * config/rx/rx.h: Remove SMALL_REGISTER_CLASSES definition. From-SVN: r158997
2010-05-03 19:47:47 +02:00
For targets with small register classes, don't use existing reloads
unless they are for the same thing since that can cause us to need
more reload registers than we otherwise would. */
for (i = 0; i < n_reloads; i++)
if ((reg_class_subset_p (rclass, rld[i].rclass)
|| reg_class_subset_p (rld[i].rclass, rclass))
/* If the existing reload has a register, it must fit our class. */
&& (rld[i].reg_rtx == 0
|| TEST_HARD_REG_BIT (reg_class_contents[(int) rclass],
true_regnum (rld[i].reg_rtx)))
&& ((in != 0 && MATCHES (rld[i].in, in) && ! dont_share
&& (out == 0 || rld[i].out == 0 || MATCHES (rld[i].out, out)))
|| (out != 0 && MATCHES (rld[i].out, out)
&& (in == 0 || rld[i].in == 0 || MATCHES (rld[i].in, in))))
&& (rld[i].out == 0 || ! earlyclobber_operand_p (rld[i].out))
&& (small_register_class_p (rclass)
tm.texi (defmac SMALL_REGISTER_CLASSES): Remove. * doc/tm.texi (defmac SMALL_REGISTER_CLASSES): Remove. (TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P): Add documentation, based on the above, for new target hook. * hooks.c (hook_bool_mode_true): New generic hook. * hooks.h (hook_bool_mode_true): Add prototype. * target.h (struct gcc_target): Add small_register_classes_for_mode_p target hook. * target-def.h (TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P): New default target hook, set to hook_bool_mode_false. * regs.h: Remove default definition of SMALL_REGISTER_CLASSES. * reload.c (push_secondary_reload): Replace SMALL_REGISTER_CLASSES with targetm.small_register_classes_for_mode_p. (find_reusable_reload): Likewise. (combine_reloads): Likewise. * reload1.c (reload_as_needed): Likewise. * cse.c (approx_reg_cost_1, hash_rtx_cb): Likewise. * ifcvt.c (noce_process_if_block, check_cond_move_block, dead_or_predicable): Likewise. * regmove.c (optimize_reg_copy_1): Likewise. * calls.c (prepare_call_address): Likewise. (precompute_register_parameters): Likewise. * config/sh/sh.h: Replace SMALL_REGISTER_CLASSES with new target hook definition. * config/sh/sh.c (sh_small_register_classes_for_mode_p): Add implementation of the hook that considers all register classes small except for SH64. (sh_override_options): Use the new hook. * config/sh/sh-protos.h (sh_small_register_classes_for_mode_p): Add prototype. * config/arm/arm.h: Replace SMALL_REGISTER_CLASSES with new target hook definition. * config/arm/arm.c (arm_small_register_classes_for_mode_p): Add implementation of the hook that considers all register classes small for THUMB1. * config/arm/arm-protos.h (arm_small_register_classes_for_mode_p): Add prototype. * config/mips/mips.h: Replace SMALL_REGISTER_CLASSES with new target hook definition. * config/mips/mips.c (mips_small_register_classes_for_mode_p): Add implementation of the hook that considers all register classes small for MIPS16. * config/mips/mips-protos.h (mips_small_register_classes_for_mode_p): Add prototype. * config/i386/i386.h: Replace SMALL_REGISTER_CLASSES with new target hook definition. * config/m32c/m32c.h: Likewise. * config/pdp11/pdp11.h: Likewise. * config/avr/avr.h: Likewise. * config/xtensa/xtensa.h: Likewise. * config/m68hc11/m68hc11.h: Likewise. * config/mn10300/mn10300.h: Likewise. * config/mcore/mcore.h: Likewise. * config/h8300/h8300.h: Likewise. * config/bfin/bfin.h: Likewise. * config/iq2000/iq2000.h: Remove SMALL_REGISTER_CLASSES definition. * config/rx/rx.h: Remove SMALL_REGISTER_CLASSES definition. From-SVN: r158997
2010-05-03 19:47:47 +02:00
|| targetm.small_register_classes_for_mode_p (VOIDmode))
&& MERGABLE_RELOADS (type, rld[i].when_needed, opnum, rld[i].opnum))
return i;
/* Reloading a plain reg for input can match a reload to postincrement
that reg, since the postincrement's value is the right value.
Likewise, it can match a preincrement reload, since we regard
the preincrementation as happening before any ref in this insn
to that register. */
for (i = 0; i < n_reloads; i++)
if ((reg_class_subset_p (rclass, rld[i].rclass)
|| reg_class_subset_p (rld[i].rclass, rclass))
/* If the existing reload has a register, it must fit our
class. */
&& (rld[i].reg_rtx == 0
|| TEST_HARD_REG_BIT (reg_class_contents[(int) rclass],
true_regnum (rld[i].reg_rtx)))
&& out == 0 && rld[i].out == 0 && rld[i].in != 0
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 (in)
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
&& GET_RTX_CLASS (GET_CODE (rld[i].in)) == RTX_AUTOINC
&& MATCHES (XEXP (rld[i].in, 0), in))
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 (rld[i].in)
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
&& GET_RTX_CLASS (GET_CODE (in)) == RTX_AUTOINC
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
&& MATCHES (XEXP (in, 0), rld[i].in)))
&& (rld[i].out == 0 || ! earlyclobber_operand_p (rld[i].out))
&& (small_register_class_p (rclass)
tm.texi (defmac SMALL_REGISTER_CLASSES): Remove. * doc/tm.texi (defmac SMALL_REGISTER_CLASSES): Remove. (TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P): Add documentation, based on the above, for new target hook. * hooks.c (hook_bool_mode_true): New generic hook. * hooks.h (hook_bool_mode_true): Add prototype. * target.h (struct gcc_target): Add small_register_classes_for_mode_p target hook. * target-def.h (TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P): New default target hook, set to hook_bool_mode_false. * regs.h: Remove default definition of SMALL_REGISTER_CLASSES. * reload.c (push_secondary_reload): Replace SMALL_REGISTER_CLASSES with targetm.small_register_classes_for_mode_p. (find_reusable_reload): Likewise. (combine_reloads): Likewise. * reload1.c (reload_as_needed): Likewise. * cse.c (approx_reg_cost_1, hash_rtx_cb): Likewise. * ifcvt.c (noce_process_if_block, check_cond_move_block, dead_or_predicable): Likewise. * regmove.c (optimize_reg_copy_1): Likewise. * calls.c (prepare_call_address): Likewise. (precompute_register_parameters): Likewise. * config/sh/sh.h: Replace SMALL_REGISTER_CLASSES with new target hook definition. * config/sh/sh.c (sh_small_register_classes_for_mode_p): Add implementation of the hook that considers all register classes small except for SH64. (sh_override_options): Use the new hook. * config/sh/sh-protos.h (sh_small_register_classes_for_mode_p): Add prototype. * config/arm/arm.h: Replace SMALL_REGISTER_CLASSES with new target hook definition. * config/arm/arm.c (arm_small_register_classes_for_mode_p): Add implementation of the hook that considers all register classes small for THUMB1. * config/arm/arm-protos.h (arm_small_register_classes_for_mode_p): Add prototype. * config/mips/mips.h: Replace SMALL_REGISTER_CLASSES with new target hook definition. * config/mips/mips.c (mips_small_register_classes_for_mode_p): Add implementation of the hook that considers all register classes small for MIPS16. * config/mips/mips-protos.h (mips_small_register_classes_for_mode_p): Add prototype. * config/i386/i386.h: Replace SMALL_REGISTER_CLASSES with new target hook definition. * config/m32c/m32c.h: Likewise. * config/pdp11/pdp11.h: Likewise. * config/avr/avr.h: Likewise. * config/xtensa/xtensa.h: Likewise. * config/m68hc11/m68hc11.h: Likewise. * config/mn10300/mn10300.h: Likewise. * config/mcore/mcore.h: Likewise. * config/h8300/h8300.h: Likewise. * config/bfin/bfin.h: Likewise. * config/iq2000/iq2000.h: Remove SMALL_REGISTER_CLASSES definition. * config/rx/rx.h: Remove SMALL_REGISTER_CLASSES definition. From-SVN: r158997
2010-05-03 19:47:47 +02:00
|| targetm.small_register_classes_for_mode_p (VOIDmode))
&& MERGABLE_RELOADS (type, rld[i].when_needed,
opnum, rld[i].opnum))
{
/* Make sure reload_in ultimately has the increment,
not the plain register. */
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 (in))
*p_in = rld[i].in;
return i;
}
return n_reloads;
}
/* Return true if X is a SUBREG that will need reloading of its SUBREG_REG
expression. MODE is the mode that X will be used in. OUTPUT is true if
the function is invoked for the output part of an enclosing reload. */
static bool
reload_inner_reg_of_subreg (rtx x, enum machine_mode mode, bool output)
{
rtx inner;
/* Only SUBREGs are problematical. */
if (GET_CODE (x) != SUBREG)
return false;
inner = SUBREG_REG (x);
/* If INNER is a constant or PLUS, then INNER will need reloading. */
if (CONSTANT_P (inner) || GET_CODE (inner) == PLUS)
return true;
/* If INNER is not a hard register, then INNER will not need reloading. */
if (!(REG_P (inner) && HARD_REGISTER_P (inner)))
return false;
/* If INNER is not ok for MODE, then INNER will need reloading. */
if (!HARD_REGNO_MODE_OK (subreg_regno (x), mode))
return true;
/* If this is for an output, and the outer part is a word or smaller,
INNER is larger than a word and the number of registers in INNER is
not the same as the number of words in INNER, then INNER will need
reloading (with an in-out reload). */
return (output
&& GET_MODE_SIZE (mode) <= UNITS_PER_WORD
&& GET_MODE_SIZE (GET_MODE (inner)) > UNITS_PER_WORD
&& ((GET_MODE_SIZE (GET_MODE (inner)) / UNITS_PER_WORD)
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
!= (int) hard_regno_nregs[REGNO (inner)][GET_MODE (inner)]));
}
/* Return nonzero if IN can be reloaded into REGNO with mode MODE without
requiring an extra reload register. The caller has already found that
IN contains some reference to REGNO, so check that we can produce the
new value in a single step. E.g. if we have
(set (reg r13) (plus (reg r13) (const int 1))), and there is an
instruction that adds one to a register, this should succeed.
However, if we have something like
(set (reg r13) (plus (reg r13) (const int 999))), and the constant 999
needs to be loaded into a register first, we need a separate reload
register.
Such PLUS reloads are generated by find_reload_address_part.
The out-of-range PLUS expressions are usually introduced in the instruction
patterns by register elimination and substituting pseudos without a home
by their function-invariant equivalences. */
static int
can_reload_into (rtx in, int regno, enum machine_mode mode)
{
rtx dst, test_insn;
int r = 0;
struct recog_data_d save_recog_data;
/* For matching constraints, we often get notional input reloads where
we want to use the original register as the reload register. I.e.
technically this is a non-optional input-output reload, but IN is
already a valid register, and has been chosen as the reload register.
Speed this up, since it trivially works. */
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 (in))
return 1;
/* To test MEMs properly, we'd have to take into account all the reloads
that are already scheduled, which can become quite complicated.
And since we've already handled address reloads for this MEM, it
should always succeed anyway. */
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))
return 1;
/* If we can make a simple SET insn that does the job, everything should
be fine. */
dst = gen_rtx_REG (mode, regno);
test_insn = make_insn_raw (gen_rtx_SET (VOIDmode, dst, in));
save_recog_data = recog_data;
if (recog_memoized (test_insn) >= 0)
{
extract_insn (test_insn);
r = constrain_operands (1);
}
recog_data = save_recog_data;
return r;
}
/* Record one reload that needs to be performed.
1992-02-28 11:23:25 +01:00
IN is an rtx saying where the data are to be found before this instruction.
OUT says where they must be stored after the instruction.
(IN is zero for data not read, and OUT is zero for data not written.)
INLOC and OUTLOC point to the places in the instructions where
IN and OUT were found.
If IN and OUT are both nonzero, it means the same register must be used
to reload both IN and OUT.
RCLASS is a register class required for the reloaded data.
1992-02-28 11:23:25 +01:00
INMODE is the machine mode that the instruction requires
for the reg that replaces IN and OUTMODE is likewise for OUT.
If IN is zero, then OUT's location and mode should be passed as
INLOC and INMODE.
STRICT_LOW is the 1 if there is a containing STRICT_LOW_PART rtx.
OPTIONAL nonzero means this reload does not need to be performed:
it can be discarded if that is more convenient.
OPNUM and TYPE say what the purpose of this reload is.
1992-02-28 11:23:25 +01:00
The return value is the reload-number for this reload.
If both IN and OUT are nonzero, in some rare cases we might
want to make two separate reloads. (Actually we never do this now.)
Therefore, the reload-number for OUT is stored in
output_reloadnum when we return; the return value applies to IN.
Usually (presently always), when IN and OUT are nonzero,
the two reload-numbers are equal, but the caller should be careful to
distinguish them. */
int
push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc,
enum reg_class rclass, enum machine_mode inmode,
enum machine_mode outmode, int strict_low, int optional,
int opnum, enum reload_type type)
1992-02-28 11:23:25 +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;
1992-02-28 11:23:25 +01:00
int dont_share = 0;
int dont_remove_subreg = 0;
#ifdef LIMIT_RELOAD_CLASS
1992-02-28 11:23:25 +01:00
rtx *in_subreg_loc = 0, *out_subreg_loc = 0;
#endif
int secondary_in_reload = -1, secondary_out_reload = -1;
enum insn_code secondary_in_icode = CODE_FOR_nothing;
enum insn_code secondary_out_icode = CODE_FOR_nothing;
enum reg_class subreg_in_class ATTRIBUTE_UNUSED;
subreg_in_class = NO_REGS;
1992-02-28 11:23:25 +01:00
/* INMODE and/or OUTMODE could be VOIDmode if no mode
has been specified for the operand. In that case,
use the operand's mode as the mode to reload. */
if (inmode == VOIDmode && in != 0)
inmode = GET_MODE (in);
if (outmode == VOIDmode && out != 0)
outmode = GET_MODE (out);
/* If find_reloads and friends until now missed to replace a pseudo
with a constant of reg_equiv_constant something went wrong
beforehand.
Note that it can't simply be done here if we missed it earlier
since the constant might need to be pushed into the literal pool
and the resulting memref would probably need further
reloading. */
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 (in != 0 && REG_P (in))
1992-02-28 11:23:25 +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 regno = REGNO (in);
1992-02-28 11:23:25 +01:00
gcc_assert (regno < FIRST_PSEUDO_REGISTER
|| reg_renumber[regno] >= 0
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
|| reg_equiv_constant (regno) == NULL_RTX);
1992-02-28 11:23:25 +01:00
}
/* reg_equiv_constant only contains constants which are obviously
not appropriate as destination. So if we would need to replace
the destination pseudo with a constant we are in real
trouble. */
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 (out != 0 && REG_P (out))
1992-02-28 11:23:25 +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 regno = REGNO (out);
1992-02-28 11:23:25 +01:00
gcc_assert (regno < FIRST_PSEUDO_REGISTER
|| reg_renumber[regno] >= 0
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
|| reg_equiv_constant (regno) == NULL_RTX);
1992-02-28 11:23:25 +01:00
}
/* If we have a read-write operand with an address side-effect,
change either IN or OUT so the side-effect happens only once. */
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 (in != 0 && out != 0 && MEM_P (in) && rtx_equal_p (in, out))
[multiple changes] Mon Jul 9 06:41:07 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * emit-rtl.c (adjust_address_nv, replace_equiv_address_nv): New fcns. (operand_subword): Use them. (change_address_1): Renamed from change_address; new arg VALIDATE. * expr.h: Reflect above changes; change_address now macro. * alias.c (canon_rtx): Use replace_equiv_address_nv instead of making MEM. * cselib.c (add_mem_for_addr): Likewise. * expr.c (protect_from_queue, emit_move_insn_1): Likewise. * regmove.c (try_apply_stack_adjustment): Likewise. * reload.c (push_reload, make_memloc): Likewise. * reload1.c (eliminate_regs): Likewise. * simplify-rtx.c (simplify_replace_rtx): Likewise. * caller-save.c (setup_save_areas): Use adjust_address_nv instead of adjust_addess. * combine.c (make_extraction, simplify_shift_const): Likewise. (gen_lowpart_for_combine): Likewise. * cse.c (gen_lowpart_if_possible): Likewise. * function.c (fixup_var_refs_1, purge_addressof_1): Likewise. * expr.c (expand_expr, case COMPONENT_REF): Likewise. * optabs.c (gen_move_insn): Likewise. * reload1.c (alter_reg): Likewise. * simplify-rtx.c (simplify_subreg): Likewise. * stmt.c (expand_anon_union_decl): Likewise. * recog.c (validate_replace_rtx_1): Likewise. (expr.h): Include. * Makefile.in (recog.o): Add $(EXPR_H). * explow.c (stabilize): Call replace_equiv_address. * expr.c (move_by_pieces_1, store_by_pieces_2): Likewise. * final.c (alter_subreg): OFFSET is HOST_WIDE_INT. 2001-07-09 Bo Thorsen <bo@suse.co.uk> * config/i386/unix.h (ASM_OUTPUT_MI_THUNK): Fix x86-64 vtable support. 2001-07-09 Neil Booth <neil@daikokuya.demon.co.uk> * final.c (output_addr_const): Use target opening and closing parentheses. * target-def.h: Define TARGET_ASM_OPEN_PAREN, TARGET_ASM_CLOSE_PAREN defaults, add to TARGET_ASM_OUT. * target.h (struct gcc_target): Add open_paren and close_paren. * doc/md.texi: Update. * doc/tm.texi: Document TARGET_ASM_FUNCTION_END_PROLOGUE, TARGET_ASM_FUNCTION_BEGIN_EPILOGUE, TARGET_ASM_OPEN_PAREN and TARGET_ASM_CLOSE_PAREN. * config/i386/i386.c (TARGET_ASM_OPEN_PAREN, TARGET_ASM_CLOSE_PAREN): Override. * config/pdp11/pdp11.c (TARGET_ASM_OPEN_PAREN, TARGET_ASM_CLOSE_PAREN): Override. * config/1750a/1750a.h (ASM_OPEN_PAREN, ASM_CLOSE_PAREN): Remove. * config/a29k/a29k.h: Similarly. * config/alpha/alpha.h: Similarly. * config/arc/arc.h: Similarly. * config/arm/aof.h: Similarly. * config/arm/aout.h: Similarly. * config/avr/avr.h: Similarly. * config/c4x/c4x.h: Similarly. * config/clipper/clipper.h: Similarly. * config/convex/convex.h: Similarly. * config/d30v/d30v.h: Similarly. * config/dsp16xx/dsp16xx.h: Similarly. * config/elxsi/elxsi.h: Similarly. * config/fr30/fr30.h: Similarly. * config/h8300/h8300.h: Similarly. * config/i370/i370.h: Similarly. * config/i386/i386.h: Similarly. * config/i860/i860.h: Similarly. * config/i960/i960.h: Similarly. * config/ia64/ia64.h: Similarly. * config/m32r/m32r.h: Similarly. * config/m68hc11/m68hc11.h: Similarly. * config/m68k/m68k.h: Similarly. * config/m88k/m88k.h: Similarly. * config/mcore/mcore.h: Similarly. * config/mips/mips.h: Similarly. * config/mn10200/mn10200.h: Similarly. * config/mn10300/mn10300.h: Similarly. * config/ns32k/ns32k.h: Similarly. * config/pa/pa.h: Similarly. * config/pdp11/pdp11.h: Similarly. * config/pj/pj.h: Similarly. * config/romp/romp.h: Similarly. * config/rs6000/rs6000.h: Similarly. * config/sh/sh.h: Similarly. * config/sparc/sparc.h: Similarly. * config/v850/v850.h: Similarly. * config/vax/vax.h: Similarly. * config/we32k/we32k.h: Similarly. 2001-07-09 Joseph S. Myers <jsm28@cam.ac.uk> * doc/c-tree.texi: Document representation of attributes. 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk> * doc/tm.texi: Update some places for the rename of target to targetm. Fix typo. 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk> * target.h (struct gcc_target): Add insert_attributes. * target-def.h (TARGET_INSERT_ATTRIBUTES): Define. (TARGET_INITIALIZER): Update. * tree.c, tree.h (default_insert_attributes): New function. Update comments on other default functions to refer to targetm, not target. * doc/tm.texi (INSERT_ATTRIBUTES): Update to document TARGET_INSERT_ATTRIBUTES. (SET_DEFAULT_DECL_ATTRIBUTES): Remove. * c-common.c (decl_attributes): Use targetm.insert_attributes. Don't use PRAGMA_INSERT_ATTRIBUTES. * Makefile.in (c-common.o): Depend on $(TARGET_H). * c-decl.c (start_decl, start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. * config/c4x/c4x.h (SET_DEFAULT_DECL_ATTRIBUTES): Don't define. * config/c4x/c4x-protos.h (c4x_set_default_attributes): Don't declare. * config/c4x/c4x.c (TARGET_INSERT_ATTRIBUTES): Define. (c4x_check_attribute): Avoid modifying attribute list itself. (c4x_set_default_attributes): Rename to c4x_insert_attributes. Make static. * config/sh/sh.h (PRAGMA_INSERT_ATTRIBUTES): Don't define. * config/sh/sh-protos.h (sh_pragma_insert_attributes): Don't declare. * config/sh/sh.c (TARGET_INSERT_ATTRIBUTES): Define. (sh_pragma_insert_attributes): Rename to sh_insert_attributes. Make static. * config/v850/v850.h (SET_DEFAULT_DECL_ATTRIBUTES): Don't define. * config/v850/v850-protos.h (v850_set_default_decl_attr): Don't declare. * config/v850/v850.c (TARGET_INSERT_ATTRIBUTES): Define. (v850_set_default_decl_attr): Rename to v850_insert_attributes. Adjust parameters. Make static. 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk> * c-common.c (decl_attributes): Only take a single attributes parameter. * c-common.h (decl_attributes): Update prototype. * c-decl.c (start_decl, start_function): Only take a single attributes parameter. Update calls to decl_attributes. (finish_struct, finish_enum): Update calls to decl_attributes. (push_parm_decl): Expect unified list of attributes. Update call to decl_attributes. * c-parse.in (fndef, initdcl, notype_initdcl, nested_function, notype_nested_function, component_declarator, component_notype_declarator, label): Update calls to decl_attributes. (absdcl_maybe_attribute, parm, firstparm, myparm): Unify attribute lists that are passed to push_parm_decl. * c-tree.h (start_function, start_decl): Update prototypes. * config/sh/sh-protos.h, config/sh/sh.c (sh_pragma_insert_attributes): Only take a single attributes parameter. * config/sh/sh.h (PRAGMA_INSERT_ATTRIBUTES): Likewise. * doc/tm.texi (INSERT_ATTRIBUTES): Update. * objc/objc-act.c (define_decl, generate_objc_symtab_decl, build_module_descriptor, generate_static_references, generate_strings, build_selector_translation_table, generate_descriptor_table, generate_protocols, generate_ivars_list, generate_dispatch_table, generate_protocol_list, generate_category, generate_shared_structures, really_start_method, add_objc_decls, generate_classref_translation_entry): Update calls to start_decl and start_function. (build_tmp_function_decl, start_method_def): Unify attribute lists that are passed to push_parm_decl. 2001-07-08 Neil Booth <neil@daikokuya.demon.co.uk> * final.c (no_asm_to_stream): New. (final_scan_insn): Use target structures for prologue ends and epilogue starts. * output.h (no_asm_to_stream): New. * target-def.h (TARGET_ASM_FUNCTION_END_PROLOGUE, TARGET_ASM_FUNCTION_BEGIN_EPILOGUE): New. (TARGET_ASM_OUT): Update. * target.h (struct gcc_target): New members function_end_prologue and function_begin_epilogue. * config/1750/1750.h (ASM_OUTPUT_FUNNAM): Delete as unused. * config/alpha/alpha-protos.h (output_end_prologue): Delete. * config/alpha/alpha.c (output_end_prologue): Rename to alpha_output_function_end_prologue. Use in target struct and make static. * config/alpha/alpha.h (FUNCTION_END_PROLOGUE): Delete. * config/ia64/ia64-protos.h (ia64_output_end_prologue): Delete. * config/ia64/ia64.c (ia64_output_end_prologue): Rename to ia64_output_function_end_prologue. Use in target struct and make static. (ia64_function_prologue, ia64_funciton_epilogue): Rename mistyped prototypes. * config/ia64/ia64.h (FUNCTION_END_PROLOGUE): Delete. * config/m88k/m88k-protos.h (m88k_end_prologue, m88k_begin_epilogue): Delete. * config/m88k/m88k.c (m88k_end_prologue, m88k_begin_epilogue): Rename an use in target struct, make static. * config/ia64/ia64.h (FUNCTION_END_PROLOGUE, FUNCTION_BEGIN_EPILOGUE): Delete. 2001-07-08 Richard Henderson <rth@redhat.com> * stmt.c (emit_case_nodes): Convert modes properly in low+high test. 2001-07-08 Richard Henderson <rth@redhat.com> * config/i386/i386.md: Remove constraints strings from define_split and define_peephole2 patterns. (eh_return_si, eh_return_di): Split eh_return_1 for modes. (eh_return): Use them. 2001-07-08 Richard Henderson <rth@redhat.com> * doc/tm.texi (Exception Handling): New subnode of Stack and Calling. Document MD_FALLBACK_FRAME_STATE_FOR. 2001-07-07 Stephane Carrez <Stephane.Carrez@worldnet.fr> * config/m68hc11/m68hc11.c (m68hc11_initial_elimination_offset): Take into account m68hc11_sp_correction for FRAME_POINTER_REGNUM elimination. * config/m68hc11/m68hc11.h (STARTING_FRAME_OFFSET): Use 0. 2001-07-07 Nick Clifton <nickc@cambridge.redhat.com> * config/ia64/sysv4.h (ASM_OUTPUT_LABELREF): Append # to end of the label inside NAME as opposed to just the end of NAME. 2001-07-07 Neil Booth <neil@daikokuya.demon.co.uk> * config/alpha/alpha-protos.h (vms_valid_decl_attribute_p): Delete. * config/alpha/alpha.c (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Delete. (TARGET_VALID_DECL_ATTRIBUTE): Define for VMS. (vms_valid_decl_attribute_p): Make static, conditionally compile. * config/alpha/alpha.h (VALID_MACHINE_DECL_ATTRIBUTE): Delete. 2001-07-06 Stan Shebs <shebs@apple.com> * target.h (targetm): Rename global from "target", so as not to conflict with local variables. * c-decl.c: Ditto. * c-typeck.c: Ditto. * final.c: Ditto. * tree.c: Ditto. * cp/decl.c: Ditto. * cp/decl2.c: Ditto. * cp/typeck.c: Ditto. * 1750a/1750a.c: Ditto. * a29k/a29k.c: Ditto. * arc/arc.c: Ditto. * arm/arm.c: Ditto. * avr/avr.c: Ditto. * clipper/clipper.c: Ditto. * convex/convex.c: Ditto. * d30v/d30v.c: Ditto. * dsp16xx/dsp16xx.c: Ditto. * elxsi/elxsi.c: Ditto. * fr30/fr30.c: Ditto. * h8300/h8300.c: Ditto. * i370/i370.c: Ditto. * i386/i386.c: Ditto. * i860/i860.c: Ditto. * i960/i960.c: Ditto. * ia64/ia64.c: Ditto. * m32r/m32r.c: Ditto. * m68hc11/m68hc11.c: Ditto. * m68k/m68k.c: Ditto. * m88k/m88k.c: Ditto. * mips/mips.c: Ditto. * ns32k/ns32k.c: Ditto. * pa/pa.c: Ditto. * pdp11/pdp11.c: Ditto. * romp/romp.c: Ditto. * rs6000/rs6000.c: Ditto. * sh/sh.c: Ditto. * sparc/sparc.c: Ditto. * vax/vax.c: Ditto. * we32k/we32k.c: Ditto. * doc/tm.texi: Update the manual to match. 2001-07-06 Richard Henderson <rth@redhat.com> * except.h (MUST_USE_SJLJ_EXCEPTIONS): Examine the value of DWARF2_UNWIND_INFO not just whether it is defined. 2001-07-06 Diego Novillo <dnovillo@redhat.com> * combine.c (combine_simplify_rtx): Also recompute 'mode' if the call to simplify_binary_operation returns a new pattern. 2001-07-06 Roman Lechtchinsky <rl@cs.tu-berlin.de> * glimits.h (__SHRT_MAX__): New. (SHRT_MIN, USHRT_MAX): Define in terms of SHRT_MAX. (SHRT_MAX): Define in terms of __SHRT_MAX__. 2001-07-06 Jan van Male <jan.vanmale@fenk.wau.nl> * alias.c (base_alias_check): Cast GET_MODE_UNIT_SIZE to int to avoid warnings. 2001-07-06 Richard Henderson <rth@redhat.com> * bitmap.c (bitmap_release_memory): Move adjacent to the allocation functions. (bitmap_first_set_bit, bitmap_last_set_bit): Streamline knowing the implementation. Binary search for the set bit. (bitmap_union_of_diff): Allocate the temporary on the stack instead of using xmalloc. 2001-07-06 Richard Henderson <rth@redhat.com> * genrecog.c (validate_pattern): Warn for constraints in define_{expand,split,peephole2}. Remove strict_low_part before looking up match_dup. 2001-07-06 DJ Delorie <dj@redhat.com> * doc/gcc.texi (Makefile): Rename to be a more general purpose chapter about various build hints and history. Add section talking about the various types of native and cross builds. 2001-07-06 Neil Booth <neil@daikokuya.demon.co.uk> * Makefile.in (final.o): Depend on target.h. * final.c: Include target.h. (default_function_pro_epilogue): New. (final_start_function): Use target structure for function prologues. (final_end_function): Use target structure for function epilogues. * fold-const.c (real_hex_to_f): Constify s and p. * output.h (default_function_pro_epilogue): New. * real.h (real_hex_to_f): Update prototype. * target-def.h (TARGET_ASM_FUNCTION_PROLOGUE, TARGET_ASM_FUNCTION_EPILOGUE, TARGET_ASM_OUT): New. (TARGET_INITIALIZER): Update. * target.h (gcc_target): Add struct asm_out. * doc/tm.texi: Update. config: Update each arch to use TARGET_ASM_FUNCTION_PROLOGUE and TARGET_ASM_FUNCTION_EPILOGUE. Move macro code to functions in cpu/cpu.c, or rename old functions consistently. Take a HOST_WIDE INT not an int as the SIZE parameter. Remove now redundant macros and prototypes. Make new functions static. * 1750a/1750a.c: Similarly. * 1750a/1750a.h: Similarly. * a29k/a29k-protos.h: Similarly. * a29k/a29k.c: Similarly. * a29k/a29k.h: Similarly. * arc/arc-protos.h: Similarly. * arc/arc.c: Similarly. * arc/arc.h: Similarly. * arm/arm-protos.h: Similarly. * arm/arm.c: Similarly. * arm/arm.h: Similarly. * avr/avr-protos.h: Similarly. * avr/avr.c: Similarly. * avr/avr.h: Similarly. * clipper/clipper-protos.h: Similarly. * clipper/clipper.c: Similarly. * clipper/clipper.h: Similarly. * convex/convex.c: Similarly. * convex/convex.h: Similarly. * d30v/d30v-protos.h: Similarly. * d30v/d30v.c: Similarly. * d30v/d30v.h: Similarly. * d30v/d30v.md: Similarly. * dsp16xx/dsp16xx-protos.h: Similarly. * dsp16xx/dsp16xx.c: Similarly. * dsp16xx/dsp16xx.h: Similarly. * elxsi/elxsi.c: Similarly. * elxsi/elxsi.h: Similarly. * fr30/fr30.c: Similarly. * fr30/fr30.md: Similarly. * h8300/h8300-protos.h: Similarly. * h8300/h8300.c: Similarly. * h8300/h8300.h: Similarly. * i370/i370-protos.h: Similarly. * i370/i370.c: Similarly. * i370/i370.h: Similarly. * i386/i386.c: Similarly. * i386/osf1elf.h: Similarly. * i386/osfrose.h: Similarly. * i860/i860-protos.h: Similarly. * i860/i860.c: Similarly. * i860/i860.h: Similarly. * i960/i960-protos.h: Similarly. * i960/i960.c: Similarly. * i960/i960.h: Similarly. * ia64/ia64-protos.h: Similarly. * ia64/ia64.c: Similarly. * ia64/ia64.h: Similarly. * m32r/m32r-protos.h: Similarly. * m32r/m32r.c: Similarly. * m32r/m32r.h: Similarly. * m68hc11/m68hc11-protos.h: Similarly. * m68hc11/m68hc11.c: Similarly. * m68hc11/m68hc11.h: Similarly. * m68k/crds.h: Similarly. * m68k/dpx2.h: Similarly. * m68k/m68k-protos.h: Similarly. * m68k/m68k.c: Similarly. * m68k/m68k.h: Similarly. * m68k/news.h: Similarly. * m88k/m88k-protos.h: Similarly. * m88k/m88k.c: Similarly. * m88k/m88k.h: Similarly. * mips/mips-protos.h: Similarly. * mips/mips.c: Similarly. * mips/mips.h: Similarly. * ns32k/merlin.h: Similarly. * ns32k/ns32k.c: Similarly. * ns32k/ns32k.h: Similarly. * ns32k/tek6000.h: Similarly. * pa/pa-protos.h: Similarly. * pa/pa.c: Similarly. * pa/pa.h: Similarly. * pdp11/2bsd.h: Similarly. * pdp11/pdp11-protos.h: Similarly. * pdp11/pdp11.c: Similarly. * pdp11/pdp11.h: Similarly. * romp/romp-protos.h: Similarly. * romp/romp.c: Similarly. * romp/romp.h: Similarly. * rs6000/rs6000-protos.h: Similarly. * rs6000/rs6000.c: Similarly. * rs6000/rs6000.h: Similarly. * rs6000/sysv4.h: Similarly. * sh/sh-protos.h: Similarly. * sh/sh.c: Similarly. * sh/sh.h: Similarly. * sparc/sparc-protos.h: Similarly. * sparc/sparc.c: Similarly. * sparc/sparc.h: Similarly. * vax/vax.c: Similarly. * vax/vax.h: Similarly. * vax/vms.h: Similarly. * we32k/we32k.c: Similarly. * we32k/we32k.h: Similarly. Fri Jul 6 11:47:59 2001 Jeffrey A Law (law@cygnus.com) * basic-block.h (first_insn_after_basic_block_note): Declare. * flow.c (first_insn_after_basic_block_note): Define. Moved from... * ssa.c (first_insn_after_basic_block_note): Remove. * ssa-dce.c (find_inherently_necessary): Consider BARRIERs necessary. (ssa_eliminate_dead_code): Properly update the CFG and PHI nodes when we find a dead conditional branch. Insert BARRIERs after any blocks with no successors, but which do not have any BARRIERs. 2001-07-06 Zack Weinberg <zackw@stanford.edu> * varray.c (varray_check_failed): Use internal_error. 2001-07-05 Andrew Haley <aph@redhat.com> * Makefile.in (LIB2_DIVMOD_FUNCS): New. (LIB2FUNCS): Move divmod functions to LIB2_DIVMOD_FUNCS. * mklibgcc.in: Compile LIB2_DIVMOD_FUNCS. 2001-07-02 Jason Merrill <jason_merrill@redhat.com> * dwarf2out.c (mem_loc_descriptor): Only look through a constant pool reference if the target constant is also a SYMBOL_REF. 2001-07-05 Eric Christopher <echristo@redhat.com> * config/mips/mips.h (MASK_MIPS3900): Remove. (MASK_MIPS16,MASK_NO_CHECK_ZERO_DIV,MASK_CHECK_RANGE_DIV, MASK_UNINIT_CONST_IN_RODATA): Change for 3900 mask removal. (TARGET_MIPS3900): Change to use mips_arch. (TARGET_MIPS4000): New. (TARGET_MIPS4100): New. (TARGET_MIPS4300): New. (TARGET_SWITCHES): Change 3900 and 4650 options to NULL. (SUBTARGET_TARGET_OPTIONS): Add -march. Change help text for -mipsX. (GENERATE_BRANCHLIKELY): Move TARGET_MIPS3900. (ISA_HAS_BRANCHLIKELY): To here. (CC1_CPU_SPEC): New. (CC1_SPEC): Use here. Remove 4650 and 3900 options. (mips_arch_string): Declare. (mips_arch): Declare. (TARGET_OPTIONS): Add -march and -mtune. * config/mips/mips.c (mips_arch_string): New. (mips_arch): New. (override_options): Handle -march for codegen and -mtune for scheduling. Use mips_arch. Move tx39 target default here. (mips_parse_cpu): Move error message to override_options. * config/mips/r3900.h (TARGET_DEFAULT): Remove. * config/mips/mips.md: Use TARGET_MIPS4000 and TARGET_MIPS4300. * doc/invoke.texi (Option Summary): Add -march and -mtune entries. (MIPS Options): Ditto. Change mcpu entry to historical text. 2001-07-05 H.J. Lu (hjl@gnu.org) * config/mips/mips.c (mips_parse_cpu): New function to parse -march=*/-mcpu=*. 2001-07-05 Jim Wilson <wilson@redhat.com> * config/ia64/lib1funcs.asm: Revert 2001-07-02 change. * config/ia64/t-ia64: Likewise. (LIB1ASMFUNCS): Update comment. 2001-07-05 David Edelsohn <edelsohn@gnu.org> * doc/install.texi (Install GCC: Binaries): Fix typo. 2001-07-04 Stephane Carrez <Stephane.Carrez@worldnet.fr> * config/m68hc11/m68hc11.md ("*ashlsi3"): Operand 1 can be a memory reference using the stack pointer, adjust it since we push Y temporarily. ("*ashrsi3"): Likewise. ("*lshrsi3"): Likewise. 2001-07-05 Stephane Carrez <Stephane.Carrez@worldnet.fr> * config/m68hc11/m68hc11.h (RETURN_ADDR_RTX): Fix return address when -fomit-frame-pointer is used. 2001-07-05 Jeffrey Oldham <oldham@codesourcery.com> * flow.c: Reverse Jan Hubicka's patch of 02July2001. (try_redirect_by_replacing_jump): Reverse updating properly the count and frequency information. Reverse removing cc0 setter. (forwarder_block_p): Reverse fixing for fallthru blocks. 2001-07-05 DJ Delorie <dj@redhat.com> * gcc.c (TARGET_OPTION_TRANSLATE_TABLE): New. (translate_options): If the above is defined, use it to map given options to new options. * doc/tm.texi: Document it. 2001-07-05 Brad Lucier <lucier@math.purdue.edu> Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> * doc/invoke.texi (Optimize Options): Document that -fgcse may cause programs using computed gotos to run more slowly. 2001-07-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> * doc/install.texi (Specific): Markup, spelling and typo fixes. Fixed sorting. Consistently require binutils 2.11.2, not prereleases. (Specific, decstation-*): Canonicalize as mips-dec-*. (Specific, i?86-*-sco3.2v5*): Remove make bootstrap requirement, always necessary. (Specific, m68k-altos): Removed reference to README.altos, deleted. (Specific, mips-*): Reword MIPS C compiler requirements. (Specific, powerpc*-*-*): New, mention --with-cpu once. (Specific, sunv5): Removed, obsolete. 2001-07-05 Nathan Sidwell <nathan@codesourcery.com> * dwarf2out.c (output_loc_list): Use an all ones mask for .text asm output and don't rely on long long literals. Reformat some long lines. 2001-07-05 Andreas Jaeger <aj@suse.de> * doc/gcc.texi (GNU/Linux): Remove accidental re-add of GPL section. 2001-07-04 Daniel Berlin <dan@cgsoftware.com> * dwarf2out.c (dwarf2out_define): Update comment. (dwarf2out_undef): Ditto. (dwarf2out_start_source_file): Ditto. (dwarf2out_end_source_file): Ditto. (dwarf2out_finish): Output DW_MACINFO_end_file for primary file, since we never call the start/end debug hook for the primary file. 2001-07-04 Kazu Hirata <kazu@hxi.com> * config/h8300/h8300.c (get_shift_alg): Remove an extra operand from shll. 2001-07-04 Nathan Sidwell <nathan@codesourcery.com> * cppinit.c (remove_dup_dirs): Inform if a system include directory is being reordered. * doc/invoke.texi (Directory Options): GCC warns if you hide a system include. * doc/cpp.texi (Search Paths): Likewise. * doc/gcc.texi (Interoperation): Remove information about -I/usr/include. 2001-07-04 Nathan Sidwell <nathan@codesourcery.com> * varray.h (VARRAY_TOP_GENERIC_PTR): Remove spurious parameter. (VARRAY_TOP_CHAR_PTR): Likewise. 2001-07-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * gcc.c (process_command): Don't assign elements of a const char*. Wed Jul 4 13:40:02 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * emit-rtl.c (change_address): Don't abort if invalid address while reload is in progress. 2001-07-04 Daniel Berlin <dan@cgsoftware.com> * c-lex.c (cb_file_change): Pass line number to debug_start_source_file. (cb_undefine): Pass correct line number to debug_undef. * toplev.c (debug_start_source_file): Add line number to parameters. Pass it along to dwarf2out_start_source_file. (decode_g_option): Stop resetting debug level back to normal when we change debug formats, unless the current level is none. (Before, -g3 -gdwarf-2 would use debug level 2, rather than 3). * toplev.h (debug_start_source_file): Add line number to parameters. * dwarf2out.h (dwarf2out_start_source_file): Add line number to parameters. * dwarf2out.c (dwarf2out_start_source_file): Add line number to parameters. Output debug_macinfo data for starting file if requested. (dwarf2out_end_source_file): Output debug_macinfo data for ending file if requested. (dwarf2out_define): Output debug_macinfo data for defining a macro if requested. (dwarf2out_undef): Output debug_macinfo data for undefining a macro if requested. (DEBUG_MACINFO_SECTION): New. DWARF2 macro info section name. (DEBUG_MACINFO_SECTION_LABEL): New. DWARF2 macro info section label. (macinfo_section_label): New. DWARF2 macro info section label. (dwarf2out_init): If we want macro info, output the start label for the section. (dwarf2out_finish): If we want macro info, add a DW_AT_macro_info attribute to the compilation unit die pointing to the macro info. 2001-07-04 Daniel Berlin <dan@cgsoftware.com> * dwarf2out.c (new_loc_list): Move to inside #ifdef DWARF2_DEBUGGING_INFO. (add_loc_descr_to_loc_list): Ditto. (output_loc_list): Ditto. Also, fix thinko in curr not being initialized. (gen_internal_sym): Ditto. Wed Jul 4 13:40:02 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * emit-rtl.c (replace_equiv_address): New function. * expr.h (replace_equiv_address): New declaration. * explow.c (validize_mem): Call it instead of change_address and also call if -fforce-addr and address is constant. * expr.c: Replace more calls to change_address with adjust_address and/or replace_equiv_address or to validize_mem. * function.c, regmove.c, config/alpha/alpha.c: Likewise. * config/arm/arm.md, config/clipper/clipper.md: Likewise. * config/dsp16xx/dsp16xx.md, config/fr30/fr30.c: Likewise. * config/i370/i370.md, config/i860/i860.md: Likewise. * config/i960/i960.md, config/mips/mips.c: Likewise. * config/mips/mips.md, config/pa/pa.md: Likewise. * config/pdp11/pdp11.md, config/rs6000/rs6000.c: Likewise. * config/rs6000/rs6000.md, config/sh/sh.md: Likewise. 2001-07-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * bitmap.c (bitmap_union_of_diff): Don't use BITMAP_ALLOCA. * bitmap.h (BITMAP_ALLOCA): Don't pass alloca as an argument to a function. 2001-07-04 Joseph S. Myers <jsm28@cam.ac.uk> * doc/include: New directory. * doc/fdl.texi: Move to doc/include/fdl.texi. * doc/texinfo.tex: Move to doc/include/texinfo.tex. * doc/include/funding.texi, doc/include/gpl.texi: New files. * doc/gcc.texi: Use funding.texi and gpl.texi. * Makefile.in ($(docdir)/cpp.info, $(docdir)/gcc.info, $(docdir)/cppinternals.info, cpp.dvi. gcc.dvi. cppinternals.dvi): Update dependencies and use -I $(docdir)/include. 2001-07-04 Anthony Green <green@redhat.com> * config/v850/t-v850 (v850-c.o): Add missing dependencies. 2001-07-04 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> * doc/install.texi (sparc64-*-*): Remove garbage. Wed Jul 4 09:07:44 2001 Jan van Male <jan.vanmale@fenk.wau.nl> * i386.c (ix86_expand_builtin, case IX86_BUILTIN_SETPS): Fix typo in last change to use adjust_address. 2001-07-04 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> * doc/install.texi (Specific): Update information for *-*-solaris*. Tue Jul 3 22:33:15 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * explow.c (plus_constant_wide): Reinitialize Y for restart. 2001-07-03 Stan Shebs <shebs@apple.com> * config/darwin.h (SECTION_FUNCTION): Remove WAS_TEXT argument, remove case for flag_no_mach_text_sections. (EXTRA_SECTION_FUNCTIONS): Remove arg from uses of SECTION_FUNCTION. * config/darwin.c (flag_no_mach_text_sections): Remove. * config/darwin-protos.h (darwin_init_pragma): Remove decl. Tue Jul 3 15:35:52 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * explow.c (plus_constant_wide, case PLUS): Call find_constant_term and avoid checking for constant as first operand. * recog.c (find_constant_term_loc): No longer static. (adj_offettable_operand): Delete. * rtl.h (adj_offsettable_operand): Delete declaration. (find_constant_term): Add declaration. * caller-save.c: Replace calls to adj_offsettable_operand with calls to adjust_address. * config/arm/arm.c, config/c4x/c4x.c: Likewise. * config/clipper/clipper.md, config/h8300/h8300.c: Likewise. * config/i386/i386.c, config/i386/i386.md: Likewise. * config/i860/i860.c, config/i960/i960.c: Likewise. * config/i960/i960.md, config/m68hc11/m68hc11.c: Likewise. * config/m68k/m68k.c, config/m68k/m68k.md: Likewise. * config/m88k/m88k.md, config/mcore/mcore.c: Likewise. * config/mips/mips.c, config/mips/mips.md: Likewise. * config/mn10200/mn10200.c, config/mn10300/mn10300.c: Likewise. * config/ns32k/ns32k.c, config/ns32k/ns32k.md: Likewise. * config/pa/pa.c, config/pdp11/pdp11.c: Likewise. * config/pdp11/pdp11.md, config/sh/sh.c, config/v850/v850.c: Likewise. * config/vax/vax.md, config/ns32k/ns32k.c: Likewise. * config/ns32k/ns32k.md: Likewise. 2001-07-03 Zack Weinberg <zackw@stanford.edu> * rtl.c (copy_rtx): Handle 'T' format letter. * gensupport.c (collect_insn_data): Likewise. * print-rtl.c (print_rtx): Print 'T' slots like 's'. 2001-07-03 Nick Clifton <nickc@cambridge.redhat.com> * doc/invoke.texi (Directory Options): Specifiy range for <N> in -B option. Use 'dir' not 'foo' as example directory name. 2001-07-03 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> * config/i386/sol2.h (ASM_PREFERRED_EH_DATA_FORMAT): Define. Fixes PRs bootstrap/3067, bootstrap/3249, bootstrap/3275. 2001-07-03 Joseph S. Myers <jsm28@cam.ac.uk> * doc/cppinternals.texi: Improve formatting and logical markup. 2001-07-03 Andreas Jaeger <aj@suse.de> * Makefile.in (insn-recog.o): Add dependency on reload.h. * genrecog.c (write_header): Include reload.h for prototypes in insn-recog.c. 2001-07-03 Neil Booth <neil@daikokuya.demon.co.uk> config: * i386/cygwin.h (VALID_MACHINE_DECL_ATTRIBUTE, VALID_MACHINE_TYPE_ATTRIBUTE): Remove. * i386/i386-protos.h (i386_pe_valid_decl_attribute_p, i386_pe_valid_type_attribute_p): Add. * i386/i386.c (TARGET_INITIALIZER): Override for cygwin targets. * i386/winnt.c (i386_valid_decl_attribute_p): Return directly. Mon Jul 2 21:52:19 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * explow.c (plus_constant_wide, case LO_SUM): New case. (plus_constant_for_output_wide): Delete. * rtl.h (plus_constant_for_output): Delete. * alias.c (canon_rtx, init_alias_analysis): Call plus_constant instead of plus_constant_for_output. * recog.c (offsettable_address_p, adj_offsettable_operand): Likewise. * config/darwin.c, config/arm/arm.c, config/m68k/m68k.c: Likewise. * config/m88k/m88k.c, config/mips/mips.c, config/pa/pa.c: Likewise. * config/rs6000/rs6000.c, config/sparc/sparc.c: Likewise. * config/sparc/sparc.md: Likewise. Convert some change_address calls to adjust_address. 2001-07-03 Joseph S. Myers <jsm28@cam.ac.uk> * doc/extend.texi, doc/gcc.texi, doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Improve formatting. Improve documentation of -std and -Wwrite-strings. 2001-07-02 Geoffrey Keating <geoffk@redhat.com> * cse.c (canon_hash): Don't register registers in very small register classes, as extending their lifetime might cause reload to fail. Mon Jul 2 23:14:00 CEST 2001 Jan Hubicka <jh@suse.cz> * flow.c (try_redirect_by_replacing_jump): Remove cc0 setter. * flow.c (forwarder_block_p): Fix for fallthru blocks. (try_redirect_by_replacing_jump): Update properly the count and frequency information. Mon Jul 2 14:20:13 2001 Jeffrey A Law (law@cygnus.com) * toplev.c (dump_file_index): Move SSA dumps just after first jump dump. (dump_file): Corresponding changes. (rest_of_compilation): Move SSA path to just after the first jump pass. * doc/gcc.texi (Passes): Update due to movement of SSA path. * doc/invoke.texi: Update dump file #s as they were completely out of date with reality. 2001-07-02 Geoffrey Keating <geoffk@redhat.com> * doc/tm.texi (Frame Layout): Document STACK_PUSH_CODE. * expr.c (emit_move_insn_1): Deal with non-default STACK_PUSH_CODE. * expr.c (emit_single_push_insn): Fix warning. 2001-07-02 Toshiyasu Morita <toshiyasu.morita@hsa.hitachi.com> * expr.c (emit_move_insn_1): Avoid modifying cfun->expr->x_stack_pointer when PUSH_ROUNDING is defined. Mon Jul 2 15:33:31 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * emit-rtl.c (adjust_address): New function. * expr.h (adjust_address): Add declaration. * builtins.c: Replace some calls to change_address with calls to it or to validize_mem. * caller-save.c, dwarf2out.c, except.c, expmed.c, expr.c: Likewise. * function.c, config/a29k/a29k.md, config/alpha/alpha.c: Likewise. * config/arm/arm.c, config/convex/convex.c: Likewise. * config/dsp16xx/dsp16xx.md, config/fr30/fr30.c: Likewise. * config/i386/i386.c, config/i386/i386.md: Likewise. * config/ia64/ia64.c, config/ia64/ia64.md: Likewise. * config/m32r/m32r.c, config/m68k/m68k.md: Likewise. * config/m88k/m88k.c, config/mips/mips.md: Likewise. * config/ns32k/ns32k.c, config/rs6000/rs6000.c: Likewise. * config/sh/sh.c, config/sparc/sparc.md: Likewise. 2001-07-02 Jim Wilson <wilson@redhat.com> * config/ia64/ia64.h: Delete obsolete lib1funcs.asm comment. 2001-07-02 Steve Ellcey <sje@cup.hp.com> * config/ia64/t-ia64: Change LIB1ASMFUNCS to use single underscore. * config/ia64/lib1funcs.asm: Change macro names to match t-ia64. 2001-07-02 Zack Weinberg <zackw@stanford.edu> * cppinit.c (lang_defaults): New table. (set_lang): Just read from lang_defaults into the live options structure. 2001-07-02 Zack Weinberg <zackw@stanford.edu> * Makefile.in (doc): Depend on $(GENERATED_MANPAGES). * doc/.cvsignore: Add gcc.1, cpp.1, gcov.1. * doc/gcc.1, doc/cpp.1, doc/gcov.1: Removed. 2001-07-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> * doc/install.texi: Various spelling and markup fixes. (Installing GCC): Component specific installation instructions are gone. Fix reference. Warn about removing old install dir in the presence of shared libs. (Configuration): Invoke with options target to match configure --help. Consistently refer to gas, gld pathnames. Invert --enable-multilib documentation. Remove references to old compiler versions. Mon Jul 2 12:50:51 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * flow.c (try_simplify_condjump): Fix typo in updating fallthru flags. 2001-07-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> * doc/install.texi (Specific, mips*-sgi-irix4): Split from IRIX 5 section. (Specific, mips*-sgi-irix5): Note IDO download. Reworded MIPS C hints. Use GNU as instead of GAS. Markup fixes. Removed SGI Freeware reference, IRIX 6 only. (Specific, mips*-sgi-irix6): Removed ranlib caveats, obsolete. Note N64 library requirement/workaround. Update O32 hints. Complete list of structure passing bug victims. 2001-07-02 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> * doc/install.texi: Remove CVS Id. 2001-07-02 Andreas Jaeger <aj@suse.de> * ssa-dce.c (note_inherently_necessary_set): Add unused attribute. (find_inherently_necessary): Remove unused variable. 2001-07-02 Nathan Sidwell <nathan@codesourcery.com> * c-common.h (TDI_inlined): New ast dump phase. (dump_flag_name): New function. * c-dump.c (dump_files): Add inlined phase. (dump_flag_name): Define. * doc/invoke.texi (-fdump-ast-inlined): Document. Mon Jul 2 06:29:36 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * stor-layout.c (layout_decl): Revert change to handling of alignment in packed types. Sun Jul 1 11:53:52 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * c-common.c (decl_attributes, case A_MODE): Don't call layout_decl for FIELD_DECL. 2001-07-01 Geoffrey Keating <geoffk@redhat.com> * doc/tm.texi (FUNCTION_ARG): Document that the last call is special. 2001-07-01 Nathan Sidwell <nathan@codesourcery.com> * tlink.c (recompile_files): Remove COMPILER_PATH and LIBRARY_PATH from the environment. 2001-07-01 Zack Weinberg <zackw@stanford.edu> * c-common.h (enum rid): Add RID_FIRST_AT, RID_LAST_AT, RID_LAST_PQ. Move RID_FIRST_PQ down with the other FIRST/LAST enumerators. (OBJC_IS_AT_KEYWORD, OBJC_IS_PQ_KEYWORD): New macros. * c-parse.in (OBJC_STRING): Kill. (objc_string): Decompose to [objc_string] '@' STRING. (reswords): Take the leading '@' off all the Objective C keywords. (objc_rid_sans_at): Kill. (init_reswords): Don't initialize it. (yylexname): Use OBJC_IS_AT_KEYWORD and OBJC_IS_PQ_KEYWORD. (_yylex): Kill reconsider label. Look ahead one token after an '@'; if we get an identifier, check whether it's an Objective C @-keyword. If so, return the keyword. Otherwise, put back the token and return the '@' as a terminal. * cpplib.c (lex_macro_node): Remove unnecessary check for leading '@' on identifier. Clarify control flow and commentary. Sun Jul 1 11:53:52 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * cse.c (new_label_ref): Variable deleted. (insert): Remove set of new_label_ref. (check_for_label_ref): New function. (cse_basic_block): Don't check new_label_ref; call check_for_label_ref. See ChangeLog.5 for earlier changes. From-SVN: r43861
2001-07-09 13:20:51 +02:00
switch (GET_CODE (XEXP (in, 0)))
{
case POST_INC: case POST_DEC: case POST_MODIFY:
in = replace_equiv_address_nv (in, XEXP (XEXP (in, 0), 0));
break;
Makefile.in (c-decl.o): Depend on rtl.h and expr.h. * Makefile.in (c-decl.o): Depend on rtl.h and expr.h. * alias.c (struct alias_entry): alias_set is HOST_WIDE_INT. (REG_BASE_VALUE): Remove unneeded cast to unsigned. (get_alias_set_entry): ALIAS_SET arg is HOST_WIDE_INT. (find_base_decl): New function, from c_find_base_decl in c-common.c. (new_alias_set): Moved from tree.c; return is HOST_WIDE_INT. (get_alias_set): Likewise. Major rework to do more things and allow language-specific code to just handle special-cases. (record_alias_subset): Args are HOST_WIDE_INT. (record_component_alias): Local vars are HOST_WIDE_INT. Don't handle COMPLEX_EXPR. (get_varargs_alias_set): Moved from builtins.c. (get_frame_alias_set): New function. * builtins.c (expand_builtin_return_address): Use frame alias set. (expand_builtin_setjmp, expand_builtin_longjmp): Use alias set for setjmp buffer. (get_memory_rtx): Rework to use set_mem_attributes. (get_varargs_alias_set): Deleted from here. * c-common.c (c_apply_type_quals_to_decl): Alias sets now HOST_WIDE_INT. (c_find_base_decl): Deleted from here. (c_get_alias_set): Remove many cases and rework to just handle C-specific cases. * c-common.h (c_get_alias_set): Returns HOST_WIDE_INT. * c-decl.c (rtl.h, expr.h): Now included. (init_decl_processing): Call record_component_aliases on array types. (grokdeclarator): Likewise. Set TREE_ADDRESSABLE for all fields that are not bitfields. * c-typeck.c (common_type): Call record_component_aliases for array. * caller-save.c (setup_save_areas): Rework register loop for unsigned. Set all save areas to the frame alias set. * calls.c (initialie_argument_information): Call set_mem_attributes. (compute_argument_addresses, expand_call): Likewise. * explow.c (set_mem_attributes): New function. (stabilize): Use MEM_COPY_ATTRIBUTES and force_reg. * expr.c (struct move_by_pieces): Remove {to,from}_{struct,readonly}. LEN and OFFSET now HOST_WIDE_INT. (clear_by_pieces): Similar changes. (move_by_pieces): LEN now HOST_WIDE_INT; don't set deleted fields. (move_by_pieces_ninsns): Now returns unsigned HOST_WIDE_INT. (move_by_pieces_1): Don't use deleted fields, use MEM_COPY_ATTRIBUTES. (clear_by_pieces_1): Likewise. (emit_push_insn): Call set_mem_attributes. (expand_expr, case INDIRECT_REF): Likewise. (expand_expr, case VAR_DECL): Call change_address. * expr.h (ADD_PARM_SIZE, SUB_PARM_SIZE): Use host_integerp and tree_low_cst. (get_varargs_alias_set, get_frame_alias_set): New decls. (record_base_value, record_alias_subset, lang_get_alias_set): Likewise. (new_alias_set, set_mem_attributes): Likewse. * function.c (struct temp_slot): ALIAS_SET is HOST_WIDE_INT. (assign_stack_temp_for_type): Likewise. Can split slot even if alias set since can copy. Set MEM_ALIAS_SET and MEM_SET_IN_STRUCT_P. (assign_temp): Use host_integerp and tree_low_cst. (put_var_into_stack): Properly handle SAVE_EXPR. (put_addressof_into_stack): Likewise. (assign_parms): Call set_mem_attributes. Delete #if 0 code. (fix_lexical_address): Put reference to chain into frame alias set. (expand_function_start): Call set_mem_attributes. * integrate.c (expand_inline_function): Likewise. * recog.c (adj_offsettable_operand): Use MEM_COPY_ATTRIBUTES. * regmove.c (try_apply_stack_adjustment): Likewise. * reload.c (push_reload, make_memloc): Likewise. * reload1.c (alter_reg): Make alias sets for spilled pseudos. * rtl.def (MEM): Update comment. * rtl.h (MEM_ALIAS_SET): Now uses XCWINT. (move_by_pieces): Change length to HOST_WIDE_INT. (record_base_value, record_alias_subset): Delete from here. * stmt.c (expand_decl): Call set_mem_attributes. * stor-layout.c (finish_record_layout): Call record_component_aliases.i * toplev.c (compile_file): Call init_alias_once earlier. * tree.c (lang_get_alias_set, get_alias_set, new_alias_set): Deleted from here: now in alias.c. * tree.h (struct tree_type): alias_set is HOST_WIDE_INT. (struct tree_decl): Likewise. (get_alias_set, new_alias_set, lang_get_alias_set): Deleted from here. * varasm.c (make_function_rtl, make_decl_rtl): Call set_mem_attributes. (output_constant_def, force_const_mem): Likewise. * cp/Makefile.in (decl.o): Include ../expr.h. * cp/decl.c (expr.h): Include. (init_decl_processing): Call record_component_aliases for arrays. (grokdeclarator): Likewise. Set TREE_ADDRESSABLE for fields that aren't bitfields. * cp/tree.c (build_cplus_array_type_1): Call record_component_aliases. From-SVN: r34305
2000-05-31 20:37:31 +02:00
[multiple changes] Mon Jul 9 06:41:07 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * emit-rtl.c (adjust_address_nv, replace_equiv_address_nv): New fcns. (operand_subword): Use them. (change_address_1): Renamed from change_address; new arg VALIDATE. * expr.h: Reflect above changes; change_address now macro. * alias.c (canon_rtx): Use replace_equiv_address_nv instead of making MEM. * cselib.c (add_mem_for_addr): Likewise. * expr.c (protect_from_queue, emit_move_insn_1): Likewise. * regmove.c (try_apply_stack_adjustment): Likewise. * reload.c (push_reload, make_memloc): Likewise. * reload1.c (eliminate_regs): Likewise. * simplify-rtx.c (simplify_replace_rtx): Likewise. * caller-save.c (setup_save_areas): Use adjust_address_nv instead of adjust_addess. * combine.c (make_extraction, simplify_shift_const): Likewise. (gen_lowpart_for_combine): Likewise. * cse.c (gen_lowpart_if_possible): Likewise. * function.c (fixup_var_refs_1, purge_addressof_1): Likewise. * expr.c (expand_expr, case COMPONENT_REF): Likewise. * optabs.c (gen_move_insn): Likewise. * reload1.c (alter_reg): Likewise. * simplify-rtx.c (simplify_subreg): Likewise. * stmt.c (expand_anon_union_decl): Likewise. * recog.c (validate_replace_rtx_1): Likewise. (expr.h): Include. * Makefile.in (recog.o): Add $(EXPR_H). * explow.c (stabilize): Call replace_equiv_address. * expr.c (move_by_pieces_1, store_by_pieces_2): Likewise. * final.c (alter_subreg): OFFSET is HOST_WIDE_INT. 2001-07-09 Bo Thorsen <bo@suse.co.uk> * config/i386/unix.h (ASM_OUTPUT_MI_THUNK): Fix x86-64 vtable support. 2001-07-09 Neil Booth <neil@daikokuya.demon.co.uk> * final.c (output_addr_const): Use target opening and closing parentheses. * target-def.h: Define TARGET_ASM_OPEN_PAREN, TARGET_ASM_CLOSE_PAREN defaults, add to TARGET_ASM_OUT. * target.h (struct gcc_target): Add open_paren and close_paren. * doc/md.texi: Update. * doc/tm.texi: Document TARGET_ASM_FUNCTION_END_PROLOGUE, TARGET_ASM_FUNCTION_BEGIN_EPILOGUE, TARGET_ASM_OPEN_PAREN and TARGET_ASM_CLOSE_PAREN. * config/i386/i386.c (TARGET_ASM_OPEN_PAREN, TARGET_ASM_CLOSE_PAREN): Override. * config/pdp11/pdp11.c (TARGET_ASM_OPEN_PAREN, TARGET_ASM_CLOSE_PAREN): Override. * config/1750a/1750a.h (ASM_OPEN_PAREN, ASM_CLOSE_PAREN): Remove. * config/a29k/a29k.h: Similarly. * config/alpha/alpha.h: Similarly. * config/arc/arc.h: Similarly. * config/arm/aof.h: Similarly. * config/arm/aout.h: Similarly. * config/avr/avr.h: Similarly. * config/c4x/c4x.h: Similarly. * config/clipper/clipper.h: Similarly. * config/convex/convex.h: Similarly. * config/d30v/d30v.h: Similarly. * config/dsp16xx/dsp16xx.h: Similarly. * config/elxsi/elxsi.h: Similarly. * config/fr30/fr30.h: Similarly. * config/h8300/h8300.h: Similarly. * config/i370/i370.h: Similarly. * config/i386/i386.h: Similarly. * config/i860/i860.h: Similarly. * config/i960/i960.h: Similarly. * config/ia64/ia64.h: Similarly. * config/m32r/m32r.h: Similarly. * config/m68hc11/m68hc11.h: Similarly. * config/m68k/m68k.h: Similarly. * config/m88k/m88k.h: Similarly. * config/mcore/mcore.h: Similarly. * config/mips/mips.h: Similarly. * config/mn10200/mn10200.h: Similarly. * config/mn10300/mn10300.h: Similarly. * config/ns32k/ns32k.h: Similarly. * config/pa/pa.h: Similarly. * config/pdp11/pdp11.h: Similarly. * config/pj/pj.h: Similarly. * config/romp/romp.h: Similarly. * config/rs6000/rs6000.h: Similarly. * config/sh/sh.h: Similarly. * config/sparc/sparc.h: Similarly. * config/v850/v850.h: Similarly. * config/vax/vax.h: Similarly. * config/we32k/we32k.h: Similarly. 2001-07-09 Joseph S. Myers <jsm28@cam.ac.uk> * doc/c-tree.texi: Document representation of attributes. 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk> * doc/tm.texi: Update some places for the rename of target to targetm. Fix typo. 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk> * target.h (struct gcc_target): Add insert_attributes. * target-def.h (TARGET_INSERT_ATTRIBUTES): Define. (TARGET_INITIALIZER): Update. * tree.c, tree.h (default_insert_attributes): New function. Update comments on other default functions to refer to targetm, not target. * doc/tm.texi (INSERT_ATTRIBUTES): Update to document TARGET_INSERT_ATTRIBUTES. (SET_DEFAULT_DECL_ATTRIBUTES): Remove. * c-common.c (decl_attributes): Use targetm.insert_attributes. Don't use PRAGMA_INSERT_ATTRIBUTES. * Makefile.in (c-common.o): Depend on $(TARGET_H). * c-decl.c (start_decl, start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. * config/c4x/c4x.h (SET_DEFAULT_DECL_ATTRIBUTES): Don't define. * config/c4x/c4x-protos.h (c4x_set_default_attributes): Don't declare. * config/c4x/c4x.c (TARGET_INSERT_ATTRIBUTES): Define. (c4x_check_attribute): Avoid modifying attribute list itself. (c4x_set_default_attributes): Rename to c4x_insert_attributes. Make static. * config/sh/sh.h (PRAGMA_INSERT_ATTRIBUTES): Don't define. * config/sh/sh-protos.h (sh_pragma_insert_attributes): Don't declare. * config/sh/sh.c (TARGET_INSERT_ATTRIBUTES): Define. (sh_pragma_insert_attributes): Rename to sh_insert_attributes. Make static. * config/v850/v850.h (SET_DEFAULT_DECL_ATTRIBUTES): Don't define. * config/v850/v850-protos.h (v850_set_default_decl_attr): Don't declare. * config/v850/v850.c (TARGET_INSERT_ATTRIBUTES): Define. (v850_set_default_decl_attr): Rename to v850_insert_attributes. Adjust parameters. Make static. 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk> * c-common.c (decl_attributes): Only take a single attributes parameter. * c-common.h (decl_attributes): Update prototype. * c-decl.c (start_decl, start_function): Only take a single attributes parameter. Update calls to decl_attributes. (finish_struct, finish_enum): Update calls to decl_attributes. (push_parm_decl): Expect unified list of attributes. Update call to decl_attributes. * c-parse.in (fndef, initdcl, notype_initdcl, nested_function, notype_nested_function, component_declarator, component_notype_declarator, label): Update calls to decl_attributes. (absdcl_maybe_attribute, parm, firstparm, myparm): Unify attribute lists that are passed to push_parm_decl. * c-tree.h (start_function, start_decl): Update prototypes. * config/sh/sh-protos.h, config/sh/sh.c (sh_pragma_insert_attributes): Only take a single attributes parameter. * config/sh/sh.h (PRAGMA_INSERT_ATTRIBUTES): Likewise. * doc/tm.texi (INSERT_ATTRIBUTES): Update. * objc/objc-act.c (define_decl, generate_objc_symtab_decl, build_module_descriptor, generate_static_references, generate_strings, build_selector_translation_table, generate_descriptor_table, generate_protocols, generate_ivars_list, generate_dispatch_table, generate_protocol_list, generate_category, generate_shared_structures, really_start_method, add_objc_decls, generate_classref_translation_entry): Update calls to start_decl and start_function. (build_tmp_function_decl, start_method_def): Unify attribute lists that are passed to push_parm_decl. 2001-07-08 Neil Booth <neil@daikokuya.demon.co.uk> * final.c (no_asm_to_stream): New. (final_scan_insn): Use target structures for prologue ends and epilogue starts. * output.h (no_asm_to_stream): New. * target-def.h (TARGET_ASM_FUNCTION_END_PROLOGUE, TARGET_ASM_FUNCTION_BEGIN_EPILOGUE): New. (TARGET_ASM_OUT): Update. * target.h (struct gcc_target): New members function_end_prologue and function_begin_epilogue. * config/1750/1750.h (ASM_OUTPUT_FUNNAM): Delete as unused. * config/alpha/alpha-protos.h (output_end_prologue): Delete. * config/alpha/alpha.c (output_end_prologue): Rename to alpha_output_function_end_prologue. Use in target struct and make static. * config/alpha/alpha.h (FUNCTION_END_PROLOGUE): Delete. * config/ia64/ia64-protos.h (ia64_output_end_prologue): Delete. * config/ia64/ia64.c (ia64_output_end_prologue): Rename to ia64_output_function_end_prologue. Use in target struct and make static. (ia64_function_prologue, ia64_funciton_epilogue): Rename mistyped prototypes. * config/ia64/ia64.h (FUNCTION_END_PROLOGUE): Delete. * config/m88k/m88k-protos.h (m88k_end_prologue, m88k_begin_epilogue): Delete. * config/m88k/m88k.c (m88k_end_prologue, m88k_begin_epilogue): Rename an use in target struct, make static. * config/ia64/ia64.h (FUNCTION_END_PROLOGUE, FUNCTION_BEGIN_EPILOGUE): Delete. 2001-07-08 Richard Henderson <rth@redhat.com> * stmt.c (emit_case_nodes): Convert modes properly in low+high test. 2001-07-08 Richard Henderson <rth@redhat.com> * config/i386/i386.md: Remove constraints strings from define_split and define_peephole2 patterns. (eh_return_si, eh_return_di): Split eh_return_1 for modes. (eh_return): Use them. 2001-07-08 Richard Henderson <rth@redhat.com> * doc/tm.texi (Exception Handling): New subnode of Stack and Calling. Document MD_FALLBACK_FRAME_STATE_FOR. 2001-07-07 Stephane Carrez <Stephane.Carrez@worldnet.fr> * config/m68hc11/m68hc11.c (m68hc11_initial_elimination_offset): Take into account m68hc11_sp_correction for FRAME_POINTER_REGNUM elimination. * config/m68hc11/m68hc11.h (STARTING_FRAME_OFFSET): Use 0. 2001-07-07 Nick Clifton <nickc@cambridge.redhat.com> * config/ia64/sysv4.h (ASM_OUTPUT_LABELREF): Append # to end of the label inside NAME as opposed to just the end of NAME. 2001-07-07 Neil Booth <neil@daikokuya.demon.co.uk> * config/alpha/alpha-protos.h (vms_valid_decl_attribute_p): Delete. * config/alpha/alpha.c (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Delete. (TARGET_VALID_DECL_ATTRIBUTE): Define for VMS. (vms_valid_decl_attribute_p): Make static, conditionally compile. * config/alpha/alpha.h (VALID_MACHINE_DECL_ATTRIBUTE): Delete. 2001-07-06 Stan Shebs <shebs@apple.com> * target.h (targetm): Rename global from "target", so as not to conflict with local variables. * c-decl.c: Ditto. * c-typeck.c: Ditto. * final.c: Ditto. * tree.c: Ditto. * cp/decl.c: Ditto. * cp/decl2.c: Ditto. * cp/typeck.c: Ditto. * 1750a/1750a.c: Ditto. * a29k/a29k.c: Ditto. * arc/arc.c: Ditto. * arm/arm.c: Ditto. * avr/avr.c: Ditto. * clipper/clipper.c: Ditto. * convex/convex.c: Ditto. * d30v/d30v.c: Ditto. * dsp16xx/dsp16xx.c: Ditto. * elxsi/elxsi.c: Ditto. * fr30/fr30.c: Ditto. * h8300/h8300.c: Ditto. * i370/i370.c: Ditto. * i386/i386.c: Ditto. * i860/i860.c: Ditto. * i960/i960.c: Ditto. * ia64/ia64.c: Ditto. * m32r/m32r.c: Ditto. * m68hc11/m68hc11.c: Ditto. * m68k/m68k.c: Ditto. * m88k/m88k.c: Ditto. * mips/mips.c: Ditto. * ns32k/ns32k.c: Ditto. * pa/pa.c: Ditto. * pdp11/pdp11.c: Ditto. * romp/romp.c: Ditto. * rs6000/rs6000.c: Ditto. * sh/sh.c: Ditto. * sparc/sparc.c: Ditto. * vax/vax.c: Ditto. * we32k/we32k.c: Ditto. * doc/tm.texi: Update the manual to match. 2001-07-06 Richard Henderson <rth@redhat.com> * except.h (MUST_USE_SJLJ_EXCEPTIONS): Examine the value of DWARF2_UNWIND_INFO not just whether it is defined. 2001-07-06 Diego Novillo <dnovillo@redhat.com> * combine.c (combine_simplify_rtx): Also recompute 'mode' if the call to simplify_binary_operation returns a new pattern. 2001-07-06 Roman Lechtchinsky <rl@cs.tu-berlin.de> * glimits.h (__SHRT_MAX__): New. (SHRT_MIN, USHRT_MAX): Define in terms of SHRT_MAX. (SHRT_MAX): Define in terms of __SHRT_MAX__. 2001-07-06 Jan van Male <jan.vanmale@fenk.wau.nl> * alias.c (base_alias_check): Cast GET_MODE_UNIT_SIZE to int to avoid warnings. 2001-07-06 Richard Henderson <rth@redhat.com> * bitmap.c (bitmap_release_memory): Move adjacent to the allocation functions. (bitmap_first_set_bit, bitmap_last_set_bit): Streamline knowing the implementation. Binary search for the set bit. (bitmap_union_of_diff): Allocate the temporary on the stack instead of using xmalloc. 2001-07-06 Richard Henderson <rth@redhat.com> * genrecog.c (validate_pattern): Warn for constraints in define_{expand,split,peephole2}. Remove strict_low_part before looking up match_dup. 2001-07-06 DJ Delorie <dj@redhat.com> * doc/gcc.texi (Makefile): Rename to be a more general purpose chapter about various build hints and history. Add section talking about the various types of native and cross builds. 2001-07-06 Neil Booth <neil@daikokuya.demon.co.uk> * Makefile.in (final.o): Depend on target.h. * final.c: Include target.h. (default_function_pro_epilogue): New. (final_start_function): Use target structure for function prologues. (final_end_function): Use target structure for function epilogues. * fold-const.c (real_hex_to_f): Constify s and p. * output.h (default_function_pro_epilogue): New. * real.h (real_hex_to_f): Update prototype. * target-def.h (TARGET_ASM_FUNCTION_PROLOGUE, TARGET_ASM_FUNCTION_EPILOGUE, TARGET_ASM_OUT): New. (TARGET_INITIALIZER): Update. * target.h (gcc_target): Add struct asm_out. * doc/tm.texi: Update. config: Update each arch to use TARGET_ASM_FUNCTION_PROLOGUE and TARGET_ASM_FUNCTION_EPILOGUE. Move macro code to functions in cpu/cpu.c, or rename old functions consistently. Take a HOST_WIDE INT not an int as the SIZE parameter. Remove now redundant macros and prototypes. Make new functions static. * 1750a/1750a.c: Similarly. * 1750a/1750a.h: Similarly. * a29k/a29k-protos.h: Similarly. * a29k/a29k.c: Similarly. * a29k/a29k.h: Similarly. * arc/arc-protos.h: Similarly. * arc/arc.c: Similarly. * arc/arc.h: Similarly. * arm/arm-protos.h: Similarly. * arm/arm.c: Similarly. * arm/arm.h: Similarly. * avr/avr-protos.h: Similarly. * avr/avr.c: Similarly. * avr/avr.h: Similarly. * clipper/clipper-protos.h: Similarly. * clipper/clipper.c: Similarly. * clipper/clipper.h: Similarly. * convex/convex.c: Similarly. * convex/convex.h: Similarly. * d30v/d30v-protos.h: Similarly. * d30v/d30v.c: Similarly. * d30v/d30v.h: Similarly. * d30v/d30v.md: Similarly. * dsp16xx/dsp16xx-protos.h: Similarly. * dsp16xx/dsp16xx.c: Similarly. * dsp16xx/dsp16xx.h: Similarly. * elxsi/elxsi.c: Similarly. * elxsi/elxsi.h: Similarly. * fr30/fr30.c: Similarly. * fr30/fr30.md: Similarly. * h8300/h8300-protos.h: Similarly. * h8300/h8300.c: Similarly. * h8300/h8300.h: Similarly. * i370/i370-protos.h: Similarly. * i370/i370.c: Similarly. * i370/i370.h: Similarly. * i386/i386.c: Similarly. * i386/osf1elf.h: Similarly. * i386/osfrose.h: Similarly. * i860/i860-protos.h: Similarly. * i860/i860.c: Similarly. * i860/i860.h: Similarly. * i960/i960-protos.h: Similarly. * i960/i960.c: Similarly. * i960/i960.h: Similarly. * ia64/ia64-protos.h: Similarly. * ia64/ia64.c: Similarly. * ia64/ia64.h: Similarly. * m32r/m32r-protos.h: Similarly. * m32r/m32r.c: Similarly. * m32r/m32r.h: Similarly. * m68hc11/m68hc11-protos.h: Similarly. * m68hc11/m68hc11.c: Similarly. * m68hc11/m68hc11.h: Similarly. * m68k/crds.h: Similarly. * m68k/dpx2.h: Similarly. * m68k/m68k-protos.h: Similarly. * m68k/m68k.c: Similarly. * m68k/m68k.h: Similarly. * m68k/news.h: Similarly. * m88k/m88k-protos.h: Similarly. * m88k/m88k.c: Similarly. * m88k/m88k.h: Similarly. * mips/mips-protos.h: Similarly. * mips/mips.c: Similarly. * mips/mips.h: Similarly. * ns32k/merlin.h: Similarly. * ns32k/ns32k.c: Similarly. * ns32k/ns32k.h: Similarly. * ns32k/tek6000.h: Similarly. * pa/pa-protos.h: Similarly. * pa/pa.c: Similarly. * pa/pa.h: Similarly. * pdp11/2bsd.h: Similarly. * pdp11/pdp11-protos.h: Similarly. * pdp11/pdp11.c: Similarly. * pdp11/pdp11.h: Similarly. * romp/romp-protos.h: Similarly. * romp/romp.c: Similarly. * romp/romp.h: Similarly. * rs6000/rs6000-protos.h: Similarly. * rs6000/rs6000.c: Similarly. * rs6000/rs6000.h: Similarly. * rs6000/sysv4.h: Similarly. * sh/sh-protos.h: Similarly. * sh/sh.c: Similarly. * sh/sh.h: Similarly. * sparc/sparc-protos.h: Similarly. * sparc/sparc.c: Similarly. * sparc/sparc.h: Similarly. * vax/vax.c: Similarly. * vax/vax.h: Similarly. * vax/vms.h: Similarly. * we32k/we32k.c: Similarly. * we32k/we32k.h: Similarly. Fri Jul 6 11:47:59 2001 Jeffrey A Law (law@cygnus.com) * basic-block.h (first_insn_after_basic_block_note): Declare. * flow.c (first_insn_after_basic_block_note): Define. Moved from... * ssa.c (first_insn_after_basic_block_note): Remove. * ssa-dce.c (find_inherently_necessary): Consider BARRIERs necessary. (ssa_eliminate_dead_code): Properly update the CFG and PHI nodes when we find a dead conditional branch. Insert BARRIERs after any blocks with no successors, but which do not have any BARRIERs. 2001-07-06 Zack Weinberg <zackw@stanford.edu> * varray.c (varray_check_failed): Use internal_error. 2001-07-05 Andrew Haley <aph@redhat.com> * Makefile.in (LIB2_DIVMOD_FUNCS): New. (LIB2FUNCS): Move divmod functions to LIB2_DIVMOD_FUNCS. * mklibgcc.in: Compile LIB2_DIVMOD_FUNCS. 2001-07-02 Jason Merrill <jason_merrill@redhat.com> * dwarf2out.c (mem_loc_descriptor): Only look through a constant pool reference if the target constant is also a SYMBOL_REF. 2001-07-05 Eric Christopher <echristo@redhat.com> * config/mips/mips.h (MASK_MIPS3900): Remove. (MASK_MIPS16,MASK_NO_CHECK_ZERO_DIV,MASK_CHECK_RANGE_DIV, MASK_UNINIT_CONST_IN_RODATA): Change for 3900 mask removal. (TARGET_MIPS3900): Change to use mips_arch. (TARGET_MIPS4000): New. (TARGET_MIPS4100): New. (TARGET_MIPS4300): New. (TARGET_SWITCHES): Change 3900 and 4650 options to NULL. (SUBTARGET_TARGET_OPTIONS): Add -march. Change help text for -mipsX. (GENERATE_BRANCHLIKELY): Move TARGET_MIPS3900. (ISA_HAS_BRANCHLIKELY): To here. (CC1_CPU_SPEC): New. (CC1_SPEC): Use here. Remove 4650 and 3900 options. (mips_arch_string): Declare. (mips_arch): Declare. (TARGET_OPTIONS): Add -march and -mtune. * config/mips/mips.c (mips_arch_string): New. (mips_arch): New. (override_options): Handle -march for codegen and -mtune for scheduling. Use mips_arch. Move tx39 target default here. (mips_parse_cpu): Move error message to override_options. * config/mips/r3900.h (TARGET_DEFAULT): Remove. * config/mips/mips.md: Use TARGET_MIPS4000 and TARGET_MIPS4300. * doc/invoke.texi (Option Summary): Add -march and -mtune entries. (MIPS Options): Ditto. Change mcpu entry to historical text. 2001-07-05 H.J. Lu (hjl@gnu.org) * config/mips/mips.c (mips_parse_cpu): New function to parse -march=*/-mcpu=*. 2001-07-05 Jim Wilson <wilson@redhat.com> * config/ia64/lib1funcs.asm: Revert 2001-07-02 change. * config/ia64/t-ia64: Likewise. (LIB1ASMFUNCS): Update comment. 2001-07-05 David Edelsohn <edelsohn@gnu.org> * doc/install.texi (Install GCC: Binaries): Fix typo. 2001-07-04 Stephane Carrez <Stephane.Carrez@worldnet.fr> * config/m68hc11/m68hc11.md ("*ashlsi3"): Operand 1 can be a memory reference using the stack pointer, adjust it since we push Y temporarily. ("*ashrsi3"): Likewise. ("*lshrsi3"): Likewise. 2001-07-05 Stephane Carrez <Stephane.Carrez@worldnet.fr> * config/m68hc11/m68hc11.h (RETURN_ADDR_RTX): Fix return address when -fomit-frame-pointer is used. 2001-07-05 Jeffrey Oldham <oldham@codesourcery.com> * flow.c: Reverse Jan Hubicka's patch of 02July2001. (try_redirect_by_replacing_jump): Reverse updating properly the count and frequency information. Reverse removing cc0 setter. (forwarder_block_p): Reverse fixing for fallthru blocks. 2001-07-05 DJ Delorie <dj@redhat.com> * gcc.c (TARGET_OPTION_TRANSLATE_TABLE): New. (translate_options): If the above is defined, use it to map given options to new options. * doc/tm.texi: Document it. 2001-07-05 Brad Lucier <lucier@math.purdue.edu> Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> * doc/invoke.texi (Optimize Options): Document that -fgcse may cause programs using computed gotos to run more slowly. 2001-07-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> * doc/install.texi (Specific): Markup, spelling and typo fixes. Fixed sorting. Consistently require binutils 2.11.2, not prereleases. (Specific, decstation-*): Canonicalize as mips-dec-*. (Specific, i?86-*-sco3.2v5*): Remove make bootstrap requirement, always necessary. (Specific, m68k-altos): Removed reference to README.altos, deleted. (Specific, mips-*): Reword MIPS C compiler requirements. (Specific, powerpc*-*-*): New, mention --with-cpu once. (Specific, sunv5): Removed, obsolete. 2001-07-05 Nathan Sidwell <nathan@codesourcery.com> * dwarf2out.c (output_loc_list): Use an all ones mask for .text asm output and don't rely on long long literals. Reformat some long lines. 2001-07-05 Andreas Jaeger <aj@suse.de> * doc/gcc.texi (GNU/Linux): Remove accidental re-add of GPL section. 2001-07-04 Daniel Berlin <dan@cgsoftware.com> * dwarf2out.c (dwarf2out_define): Update comment. (dwarf2out_undef): Ditto. (dwarf2out_start_source_file): Ditto. (dwarf2out_end_source_file): Ditto. (dwarf2out_finish): Output DW_MACINFO_end_file for primary file, since we never call the start/end debug hook for the primary file. 2001-07-04 Kazu Hirata <kazu@hxi.com> * config/h8300/h8300.c (get_shift_alg): Remove an extra operand from shll. 2001-07-04 Nathan Sidwell <nathan@codesourcery.com> * cppinit.c (remove_dup_dirs): Inform if a system include directory is being reordered. * doc/invoke.texi (Directory Options): GCC warns if you hide a system include. * doc/cpp.texi (Search Paths): Likewise. * doc/gcc.texi (Interoperation): Remove information about -I/usr/include. 2001-07-04 Nathan Sidwell <nathan@codesourcery.com> * varray.h (VARRAY_TOP_GENERIC_PTR): Remove spurious parameter. (VARRAY_TOP_CHAR_PTR): Likewise. 2001-07-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * gcc.c (process_command): Don't assign elements of a const char*. Wed Jul 4 13:40:02 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * emit-rtl.c (change_address): Don't abort if invalid address while reload is in progress. 2001-07-04 Daniel Berlin <dan@cgsoftware.com> * c-lex.c (cb_file_change): Pass line number to debug_start_source_file. (cb_undefine): Pass correct line number to debug_undef. * toplev.c (debug_start_source_file): Add line number to parameters. Pass it along to dwarf2out_start_source_file. (decode_g_option): Stop resetting debug level back to normal when we change debug formats, unless the current level is none. (Before, -g3 -gdwarf-2 would use debug level 2, rather than 3). * toplev.h (debug_start_source_file): Add line number to parameters. * dwarf2out.h (dwarf2out_start_source_file): Add line number to parameters. * dwarf2out.c (dwarf2out_start_source_file): Add line number to parameters. Output debug_macinfo data for starting file if requested. (dwarf2out_end_source_file): Output debug_macinfo data for ending file if requested. (dwarf2out_define): Output debug_macinfo data for defining a macro if requested. (dwarf2out_undef): Output debug_macinfo data for undefining a macro if requested. (DEBUG_MACINFO_SECTION): New. DWARF2 macro info section name. (DEBUG_MACINFO_SECTION_LABEL): New. DWARF2 macro info section label. (macinfo_section_label): New. DWARF2 macro info section label. (dwarf2out_init): If we want macro info, output the start label for the section. (dwarf2out_finish): If we want macro info, add a DW_AT_macro_info attribute to the compilation unit die pointing to the macro info. 2001-07-04 Daniel Berlin <dan@cgsoftware.com> * dwarf2out.c (new_loc_list): Move to inside #ifdef DWARF2_DEBUGGING_INFO. (add_loc_descr_to_loc_list): Ditto. (output_loc_list): Ditto. Also, fix thinko in curr not being initialized. (gen_internal_sym): Ditto. Wed Jul 4 13:40:02 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * emit-rtl.c (replace_equiv_address): New function. * expr.h (replace_equiv_address): New declaration. * explow.c (validize_mem): Call it instead of change_address and also call if -fforce-addr and address is constant. * expr.c: Replace more calls to change_address with adjust_address and/or replace_equiv_address or to validize_mem. * function.c, regmove.c, config/alpha/alpha.c: Likewise. * config/arm/arm.md, config/clipper/clipper.md: Likewise. * config/dsp16xx/dsp16xx.md, config/fr30/fr30.c: Likewise. * config/i370/i370.md, config/i860/i860.md: Likewise. * config/i960/i960.md, config/mips/mips.c: Likewise. * config/mips/mips.md, config/pa/pa.md: Likewise. * config/pdp11/pdp11.md, config/rs6000/rs6000.c: Likewise. * config/rs6000/rs6000.md, config/sh/sh.md: Likewise. 2001-07-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * bitmap.c (bitmap_union_of_diff): Don't use BITMAP_ALLOCA. * bitmap.h (BITMAP_ALLOCA): Don't pass alloca as an argument to a function. 2001-07-04 Joseph S. Myers <jsm28@cam.ac.uk> * doc/include: New directory. * doc/fdl.texi: Move to doc/include/fdl.texi. * doc/texinfo.tex: Move to doc/include/texinfo.tex. * doc/include/funding.texi, doc/include/gpl.texi: New files. * doc/gcc.texi: Use funding.texi and gpl.texi. * Makefile.in ($(docdir)/cpp.info, $(docdir)/gcc.info, $(docdir)/cppinternals.info, cpp.dvi. gcc.dvi. cppinternals.dvi): Update dependencies and use -I $(docdir)/include. 2001-07-04 Anthony Green <green@redhat.com> * config/v850/t-v850 (v850-c.o): Add missing dependencies. 2001-07-04 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> * doc/install.texi (sparc64-*-*): Remove garbage. Wed Jul 4 09:07:44 2001 Jan van Male <jan.vanmale@fenk.wau.nl> * i386.c (ix86_expand_builtin, case IX86_BUILTIN_SETPS): Fix typo in last change to use adjust_address. 2001-07-04 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> * doc/install.texi (Specific): Update information for *-*-solaris*. Tue Jul 3 22:33:15 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * explow.c (plus_constant_wide): Reinitialize Y for restart. 2001-07-03 Stan Shebs <shebs@apple.com> * config/darwin.h (SECTION_FUNCTION): Remove WAS_TEXT argument, remove case for flag_no_mach_text_sections. (EXTRA_SECTION_FUNCTIONS): Remove arg from uses of SECTION_FUNCTION. * config/darwin.c (flag_no_mach_text_sections): Remove. * config/darwin-protos.h (darwin_init_pragma): Remove decl. Tue Jul 3 15:35:52 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * explow.c (plus_constant_wide, case PLUS): Call find_constant_term and avoid checking for constant as first operand. * recog.c (find_constant_term_loc): No longer static. (adj_offettable_operand): Delete. * rtl.h (adj_offsettable_operand): Delete declaration. (find_constant_term): Add declaration. * caller-save.c: Replace calls to adj_offsettable_operand with calls to adjust_address. * config/arm/arm.c, config/c4x/c4x.c: Likewise. * config/clipper/clipper.md, config/h8300/h8300.c: Likewise. * config/i386/i386.c, config/i386/i386.md: Likewise. * config/i860/i860.c, config/i960/i960.c: Likewise. * config/i960/i960.md, config/m68hc11/m68hc11.c: Likewise. * config/m68k/m68k.c, config/m68k/m68k.md: Likewise. * config/m88k/m88k.md, config/mcore/mcore.c: Likewise. * config/mips/mips.c, config/mips/mips.md: Likewise. * config/mn10200/mn10200.c, config/mn10300/mn10300.c: Likewise. * config/ns32k/ns32k.c, config/ns32k/ns32k.md: Likewise. * config/pa/pa.c, config/pdp11/pdp11.c: Likewise. * config/pdp11/pdp11.md, config/sh/sh.c, config/v850/v850.c: Likewise. * config/vax/vax.md, config/ns32k/ns32k.c: Likewise. * config/ns32k/ns32k.md: Likewise. 2001-07-03 Zack Weinberg <zackw@stanford.edu> * rtl.c (copy_rtx): Handle 'T' format letter. * gensupport.c (collect_insn_data): Likewise. * print-rtl.c (print_rtx): Print 'T' slots like 's'. 2001-07-03 Nick Clifton <nickc@cambridge.redhat.com> * doc/invoke.texi (Directory Options): Specifiy range for <N> in -B option. Use 'dir' not 'foo' as example directory name. 2001-07-03 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> * config/i386/sol2.h (ASM_PREFERRED_EH_DATA_FORMAT): Define. Fixes PRs bootstrap/3067, bootstrap/3249, bootstrap/3275. 2001-07-03 Joseph S. Myers <jsm28@cam.ac.uk> * doc/cppinternals.texi: Improve formatting and logical markup. 2001-07-03 Andreas Jaeger <aj@suse.de> * Makefile.in (insn-recog.o): Add dependency on reload.h. * genrecog.c (write_header): Include reload.h for prototypes in insn-recog.c. 2001-07-03 Neil Booth <neil@daikokuya.demon.co.uk> config: * i386/cygwin.h (VALID_MACHINE_DECL_ATTRIBUTE, VALID_MACHINE_TYPE_ATTRIBUTE): Remove. * i386/i386-protos.h (i386_pe_valid_decl_attribute_p, i386_pe_valid_type_attribute_p): Add. * i386/i386.c (TARGET_INITIALIZER): Override for cygwin targets. * i386/winnt.c (i386_valid_decl_attribute_p): Return directly. Mon Jul 2 21:52:19 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * explow.c (plus_constant_wide, case LO_SUM): New case. (plus_constant_for_output_wide): Delete. * rtl.h (plus_constant_for_output): Delete. * alias.c (canon_rtx, init_alias_analysis): Call plus_constant instead of plus_constant_for_output. * recog.c (offsettable_address_p, adj_offsettable_operand): Likewise. * config/darwin.c, config/arm/arm.c, config/m68k/m68k.c: Likewise. * config/m88k/m88k.c, config/mips/mips.c, config/pa/pa.c: Likewise. * config/rs6000/rs6000.c, config/sparc/sparc.c: Likewise. * config/sparc/sparc.md: Likewise. Convert some change_address calls to adjust_address. 2001-07-03 Joseph S. Myers <jsm28@cam.ac.uk> * doc/extend.texi, doc/gcc.texi, doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Improve formatting. Improve documentation of -std and -Wwrite-strings. 2001-07-02 Geoffrey Keating <geoffk@redhat.com> * cse.c (canon_hash): Don't register registers in very small register classes, as extending their lifetime might cause reload to fail. Mon Jul 2 23:14:00 CEST 2001 Jan Hubicka <jh@suse.cz> * flow.c (try_redirect_by_replacing_jump): Remove cc0 setter. * flow.c (forwarder_block_p): Fix for fallthru blocks. (try_redirect_by_replacing_jump): Update properly the count and frequency information. Mon Jul 2 14:20:13 2001 Jeffrey A Law (law@cygnus.com) * toplev.c (dump_file_index): Move SSA dumps just after first jump dump. (dump_file): Corresponding changes. (rest_of_compilation): Move SSA path to just after the first jump pass. * doc/gcc.texi (Passes): Update due to movement of SSA path. * doc/invoke.texi: Update dump file #s as they were completely out of date with reality. 2001-07-02 Geoffrey Keating <geoffk@redhat.com> * doc/tm.texi (Frame Layout): Document STACK_PUSH_CODE. * expr.c (emit_move_insn_1): Deal with non-default STACK_PUSH_CODE. * expr.c (emit_single_push_insn): Fix warning. 2001-07-02 Toshiyasu Morita <toshiyasu.morita@hsa.hitachi.com> * expr.c (emit_move_insn_1): Avoid modifying cfun->expr->x_stack_pointer when PUSH_ROUNDING is defined. Mon Jul 2 15:33:31 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * emit-rtl.c (adjust_address): New function. * expr.h (adjust_address): Add declaration. * builtins.c: Replace some calls to change_address with calls to it or to validize_mem. * caller-save.c, dwarf2out.c, except.c, expmed.c, expr.c: Likewise. * function.c, config/a29k/a29k.md, config/alpha/alpha.c: Likewise. * config/arm/arm.c, config/convex/convex.c: Likewise. * config/dsp16xx/dsp16xx.md, config/fr30/fr30.c: Likewise. * config/i386/i386.c, config/i386/i386.md: Likewise. * config/ia64/ia64.c, config/ia64/ia64.md: Likewise. * config/m32r/m32r.c, config/m68k/m68k.md: Likewise. * config/m88k/m88k.c, config/mips/mips.md: Likewise. * config/ns32k/ns32k.c, config/rs6000/rs6000.c: Likewise. * config/sh/sh.c, config/sparc/sparc.md: Likewise. 2001-07-02 Jim Wilson <wilson@redhat.com> * config/ia64/ia64.h: Delete obsolete lib1funcs.asm comment. 2001-07-02 Steve Ellcey <sje@cup.hp.com> * config/ia64/t-ia64: Change LIB1ASMFUNCS to use single underscore. * config/ia64/lib1funcs.asm: Change macro names to match t-ia64. 2001-07-02 Zack Weinberg <zackw@stanford.edu> * cppinit.c (lang_defaults): New table. (set_lang): Just read from lang_defaults into the live options structure. 2001-07-02 Zack Weinberg <zackw@stanford.edu> * Makefile.in (doc): Depend on $(GENERATED_MANPAGES). * doc/.cvsignore: Add gcc.1, cpp.1, gcov.1. * doc/gcc.1, doc/cpp.1, doc/gcov.1: Removed. 2001-07-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> * doc/install.texi: Various spelling and markup fixes. (Installing GCC): Component specific installation instructions are gone. Fix reference. Warn about removing old install dir in the presence of shared libs. (Configuration): Invoke with options target to match configure --help. Consistently refer to gas, gld pathnames. Invert --enable-multilib documentation. Remove references to old compiler versions. Mon Jul 2 12:50:51 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * flow.c (try_simplify_condjump): Fix typo in updating fallthru flags. 2001-07-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> * doc/install.texi (Specific, mips*-sgi-irix4): Split from IRIX 5 section. (Specific, mips*-sgi-irix5): Note IDO download. Reworded MIPS C hints. Use GNU as instead of GAS. Markup fixes. Removed SGI Freeware reference, IRIX 6 only. (Specific, mips*-sgi-irix6): Removed ranlib caveats, obsolete. Note N64 library requirement/workaround. Update O32 hints. Complete list of structure passing bug victims. 2001-07-02 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> * doc/install.texi: Remove CVS Id. 2001-07-02 Andreas Jaeger <aj@suse.de> * ssa-dce.c (note_inherently_necessary_set): Add unused attribute. (find_inherently_necessary): Remove unused variable. 2001-07-02 Nathan Sidwell <nathan@codesourcery.com> * c-common.h (TDI_inlined): New ast dump phase. (dump_flag_name): New function. * c-dump.c (dump_files): Add inlined phase. (dump_flag_name): Define. * doc/invoke.texi (-fdump-ast-inlined): Document. Mon Jul 2 06:29:36 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * stor-layout.c (layout_decl): Revert change to handling of alignment in packed types. Sun Jul 1 11:53:52 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * c-common.c (decl_attributes, case A_MODE): Don't call layout_decl for FIELD_DECL. 2001-07-01 Geoffrey Keating <geoffk@redhat.com> * doc/tm.texi (FUNCTION_ARG): Document that the last call is special. 2001-07-01 Nathan Sidwell <nathan@codesourcery.com> * tlink.c (recompile_files): Remove COMPILER_PATH and LIBRARY_PATH from the environment. 2001-07-01 Zack Weinberg <zackw@stanford.edu> * c-common.h (enum rid): Add RID_FIRST_AT, RID_LAST_AT, RID_LAST_PQ. Move RID_FIRST_PQ down with the other FIRST/LAST enumerators. (OBJC_IS_AT_KEYWORD, OBJC_IS_PQ_KEYWORD): New macros. * c-parse.in (OBJC_STRING): Kill. (objc_string): Decompose to [objc_string] '@' STRING. (reswords): Take the leading '@' off all the Objective C keywords. (objc_rid_sans_at): Kill. (init_reswords): Don't initialize it. (yylexname): Use OBJC_IS_AT_KEYWORD and OBJC_IS_PQ_KEYWORD. (_yylex): Kill reconsider label. Look ahead one token after an '@'; if we get an identifier, check whether it's an Objective C @-keyword. If so, return the keyword. Otherwise, put back the token and return the '@' as a terminal. * cpplib.c (lex_macro_node): Remove unnecessary check for leading '@' on identifier. Clarify control flow and commentary. Sun Jul 1 11:53:52 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * cse.c (new_label_ref): Variable deleted. (insert): Remove set of new_label_ref. (check_for_label_ref): New function. (cse_basic_block): Don't check new_label_ref; call check_for_label_ref. See ChangeLog.5 for earlier changes. From-SVN: r43861
2001-07-09 13:20:51 +02:00
case PRE_INC: case PRE_DEC: case PRE_MODIFY:
out = replace_equiv_address_nv (out, XEXP (XEXP (out, 0), 0));
break;
Makefile.in (c-decl.o): Depend on rtl.h and expr.h. * Makefile.in (c-decl.o): Depend on rtl.h and expr.h. * alias.c (struct alias_entry): alias_set is HOST_WIDE_INT. (REG_BASE_VALUE): Remove unneeded cast to unsigned. (get_alias_set_entry): ALIAS_SET arg is HOST_WIDE_INT. (find_base_decl): New function, from c_find_base_decl in c-common.c. (new_alias_set): Moved from tree.c; return is HOST_WIDE_INT. (get_alias_set): Likewise. Major rework to do more things and allow language-specific code to just handle special-cases. (record_alias_subset): Args are HOST_WIDE_INT. (record_component_alias): Local vars are HOST_WIDE_INT. Don't handle COMPLEX_EXPR. (get_varargs_alias_set): Moved from builtins.c. (get_frame_alias_set): New function. * builtins.c (expand_builtin_return_address): Use frame alias set. (expand_builtin_setjmp, expand_builtin_longjmp): Use alias set for setjmp buffer. (get_memory_rtx): Rework to use set_mem_attributes. (get_varargs_alias_set): Deleted from here. * c-common.c (c_apply_type_quals_to_decl): Alias sets now HOST_WIDE_INT. (c_find_base_decl): Deleted from here. (c_get_alias_set): Remove many cases and rework to just handle C-specific cases. * c-common.h (c_get_alias_set): Returns HOST_WIDE_INT. * c-decl.c (rtl.h, expr.h): Now included. (init_decl_processing): Call record_component_aliases on array types. (grokdeclarator): Likewise. Set TREE_ADDRESSABLE for all fields that are not bitfields. * c-typeck.c (common_type): Call record_component_aliases for array. * caller-save.c (setup_save_areas): Rework register loop for unsigned. Set all save areas to the frame alias set. * calls.c (initialie_argument_information): Call set_mem_attributes. (compute_argument_addresses, expand_call): Likewise. * explow.c (set_mem_attributes): New function. (stabilize): Use MEM_COPY_ATTRIBUTES and force_reg. * expr.c (struct move_by_pieces): Remove {to,from}_{struct,readonly}. LEN and OFFSET now HOST_WIDE_INT. (clear_by_pieces): Similar changes. (move_by_pieces): LEN now HOST_WIDE_INT; don't set deleted fields. (move_by_pieces_ninsns): Now returns unsigned HOST_WIDE_INT. (move_by_pieces_1): Don't use deleted fields, use MEM_COPY_ATTRIBUTES. (clear_by_pieces_1): Likewise. (emit_push_insn): Call set_mem_attributes. (expand_expr, case INDIRECT_REF): Likewise. (expand_expr, case VAR_DECL): Call change_address. * expr.h (ADD_PARM_SIZE, SUB_PARM_SIZE): Use host_integerp and tree_low_cst. (get_varargs_alias_set, get_frame_alias_set): New decls. (record_base_value, record_alias_subset, lang_get_alias_set): Likewise. (new_alias_set, set_mem_attributes): Likewse. * function.c (struct temp_slot): ALIAS_SET is HOST_WIDE_INT. (assign_stack_temp_for_type): Likewise. Can split slot even if alias set since can copy. Set MEM_ALIAS_SET and MEM_SET_IN_STRUCT_P. (assign_temp): Use host_integerp and tree_low_cst. (put_var_into_stack): Properly handle SAVE_EXPR. (put_addressof_into_stack): Likewise. (assign_parms): Call set_mem_attributes. Delete #if 0 code. (fix_lexical_address): Put reference to chain into frame alias set. (expand_function_start): Call set_mem_attributes. * integrate.c (expand_inline_function): Likewise. * recog.c (adj_offsettable_operand): Use MEM_COPY_ATTRIBUTES. * regmove.c (try_apply_stack_adjustment): Likewise. * reload.c (push_reload, make_memloc): Likewise. * reload1.c (alter_reg): Make alias sets for spilled pseudos. * rtl.def (MEM): Update comment. * rtl.h (MEM_ALIAS_SET): Now uses XCWINT. (move_by_pieces): Change length to HOST_WIDE_INT. (record_base_value, record_alias_subset): Delete from here. * stmt.c (expand_decl): Call set_mem_attributes. * stor-layout.c (finish_record_layout): Call record_component_aliases.i * toplev.c (compile_file): Call init_alias_once earlier. * tree.c (lang_get_alias_set, get_alias_set, new_alias_set): Deleted from here: now in alias.c. * tree.h (struct tree_type): alias_set is HOST_WIDE_INT. (struct tree_decl): Likewise. (get_alias_set, new_alias_set, lang_get_alias_set): Deleted from here. * varasm.c (make_function_rtl, make_decl_rtl): Call set_mem_attributes. (output_constant_def, force_const_mem): Likewise. * cp/Makefile.in (decl.o): Include ../expr.h. * cp/decl.c (expr.h): Include. (init_decl_processing): Call record_component_aliases for arrays. (grokdeclarator): Likewise. Set TREE_ADDRESSABLE for fields that aren't bitfields. * cp/tree.c (build_cplus_array_type_1): Call record_component_aliases. From-SVN: r34305
2000-05-31 20:37:31 +02:00
[multiple changes] Mon Jul 9 06:41:07 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * emit-rtl.c (adjust_address_nv, replace_equiv_address_nv): New fcns. (operand_subword): Use them. (change_address_1): Renamed from change_address; new arg VALIDATE. * expr.h: Reflect above changes; change_address now macro. * alias.c (canon_rtx): Use replace_equiv_address_nv instead of making MEM. * cselib.c (add_mem_for_addr): Likewise. * expr.c (protect_from_queue, emit_move_insn_1): Likewise. * regmove.c (try_apply_stack_adjustment): Likewise. * reload.c (push_reload, make_memloc): Likewise. * reload1.c (eliminate_regs): Likewise. * simplify-rtx.c (simplify_replace_rtx): Likewise. * caller-save.c (setup_save_areas): Use adjust_address_nv instead of adjust_addess. * combine.c (make_extraction, simplify_shift_const): Likewise. (gen_lowpart_for_combine): Likewise. * cse.c (gen_lowpart_if_possible): Likewise. * function.c (fixup_var_refs_1, purge_addressof_1): Likewise. * expr.c (expand_expr, case COMPONENT_REF): Likewise. * optabs.c (gen_move_insn): Likewise. * reload1.c (alter_reg): Likewise. * simplify-rtx.c (simplify_subreg): Likewise. * stmt.c (expand_anon_union_decl): Likewise. * recog.c (validate_replace_rtx_1): Likewise. (expr.h): Include. * Makefile.in (recog.o): Add $(EXPR_H). * explow.c (stabilize): Call replace_equiv_address. * expr.c (move_by_pieces_1, store_by_pieces_2): Likewise. * final.c (alter_subreg): OFFSET is HOST_WIDE_INT. 2001-07-09 Bo Thorsen <bo@suse.co.uk> * config/i386/unix.h (ASM_OUTPUT_MI_THUNK): Fix x86-64 vtable support. 2001-07-09 Neil Booth <neil@daikokuya.demon.co.uk> * final.c (output_addr_const): Use target opening and closing parentheses. * target-def.h: Define TARGET_ASM_OPEN_PAREN, TARGET_ASM_CLOSE_PAREN defaults, add to TARGET_ASM_OUT. * target.h (struct gcc_target): Add open_paren and close_paren. * doc/md.texi: Update. * doc/tm.texi: Document TARGET_ASM_FUNCTION_END_PROLOGUE, TARGET_ASM_FUNCTION_BEGIN_EPILOGUE, TARGET_ASM_OPEN_PAREN and TARGET_ASM_CLOSE_PAREN. * config/i386/i386.c (TARGET_ASM_OPEN_PAREN, TARGET_ASM_CLOSE_PAREN): Override. * config/pdp11/pdp11.c (TARGET_ASM_OPEN_PAREN, TARGET_ASM_CLOSE_PAREN): Override. * config/1750a/1750a.h (ASM_OPEN_PAREN, ASM_CLOSE_PAREN): Remove. * config/a29k/a29k.h: Similarly. * config/alpha/alpha.h: Similarly. * config/arc/arc.h: Similarly. * config/arm/aof.h: Similarly. * config/arm/aout.h: Similarly. * config/avr/avr.h: Similarly. * config/c4x/c4x.h: Similarly. * config/clipper/clipper.h: Similarly. * config/convex/convex.h: Similarly. * config/d30v/d30v.h: Similarly. * config/dsp16xx/dsp16xx.h: Similarly. * config/elxsi/elxsi.h: Similarly. * config/fr30/fr30.h: Similarly. * config/h8300/h8300.h: Similarly. * config/i370/i370.h: Similarly. * config/i386/i386.h: Similarly. * config/i860/i860.h: Similarly. * config/i960/i960.h: Similarly. * config/ia64/ia64.h: Similarly. * config/m32r/m32r.h: Similarly. * config/m68hc11/m68hc11.h: Similarly. * config/m68k/m68k.h: Similarly. * config/m88k/m88k.h: Similarly. * config/mcore/mcore.h: Similarly. * config/mips/mips.h: Similarly. * config/mn10200/mn10200.h: Similarly. * config/mn10300/mn10300.h: Similarly. * config/ns32k/ns32k.h: Similarly. * config/pa/pa.h: Similarly. * config/pdp11/pdp11.h: Similarly. * config/pj/pj.h: Similarly. * config/romp/romp.h: Similarly. * config/rs6000/rs6000.h: Similarly. * config/sh/sh.h: Similarly. * config/sparc/sparc.h: Similarly. * config/v850/v850.h: Similarly. * config/vax/vax.h: Similarly. * config/we32k/we32k.h: Similarly. 2001-07-09 Joseph S. Myers <jsm28@cam.ac.uk> * doc/c-tree.texi: Document representation of attributes. 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk> * doc/tm.texi: Update some places for the rename of target to targetm. Fix typo. 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk> * target.h (struct gcc_target): Add insert_attributes. * target-def.h (TARGET_INSERT_ATTRIBUTES): Define. (TARGET_INITIALIZER): Update. * tree.c, tree.h (default_insert_attributes): New function. Update comments on other default functions to refer to targetm, not target. * doc/tm.texi (INSERT_ATTRIBUTES): Update to document TARGET_INSERT_ATTRIBUTES. (SET_DEFAULT_DECL_ATTRIBUTES): Remove. * c-common.c (decl_attributes): Use targetm.insert_attributes. Don't use PRAGMA_INSERT_ATTRIBUTES. * Makefile.in (c-common.o): Depend on $(TARGET_H). * c-decl.c (start_decl, start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. * config/c4x/c4x.h (SET_DEFAULT_DECL_ATTRIBUTES): Don't define. * config/c4x/c4x-protos.h (c4x_set_default_attributes): Don't declare. * config/c4x/c4x.c (TARGET_INSERT_ATTRIBUTES): Define. (c4x_check_attribute): Avoid modifying attribute list itself. (c4x_set_default_attributes): Rename to c4x_insert_attributes. Make static. * config/sh/sh.h (PRAGMA_INSERT_ATTRIBUTES): Don't define. * config/sh/sh-protos.h (sh_pragma_insert_attributes): Don't declare. * config/sh/sh.c (TARGET_INSERT_ATTRIBUTES): Define. (sh_pragma_insert_attributes): Rename to sh_insert_attributes. Make static. * config/v850/v850.h (SET_DEFAULT_DECL_ATTRIBUTES): Don't define. * config/v850/v850-protos.h (v850_set_default_decl_attr): Don't declare. * config/v850/v850.c (TARGET_INSERT_ATTRIBUTES): Define. (v850_set_default_decl_attr): Rename to v850_insert_attributes. Adjust parameters. Make static. 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk> * c-common.c (decl_attributes): Only take a single attributes parameter. * c-common.h (decl_attributes): Update prototype. * c-decl.c (start_decl, start_function): Only take a single attributes parameter. Update calls to decl_attributes. (finish_struct, finish_enum): Update calls to decl_attributes. (push_parm_decl): Expect unified list of attributes. Update call to decl_attributes. * c-parse.in (fndef, initdcl, notype_initdcl, nested_function, notype_nested_function, component_declarator, component_notype_declarator, label): Update calls to decl_attributes. (absdcl_maybe_attribute, parm, firstparm, myparm): Unify attribute lists that are passed to push_parm_decl. * c-tree.h (start_function, start_decl): Update prototypes. * config/sh/sh-protos.h, config/sh/sh.c (sh_pragma_insert_attributes): Only take a single attributes parameter. * config/sh/sh.h (PRAGMA_INSERT_ATTRIBUTES): Likewise. * doc/tm.texi (INSERT_ATTRIBUTES): Update. * objc/objc-act.c (define_decl, generate_objc_symtab_decl, build_module_descriptor, generate_static_references, generate_strings, build_selector_translation_table, generate_descriptor_table, generate_protocols, generate_ivars_list, generate_dispatch_table, generate_protocol_list, generate_category, generate_shared_structures, really_start_method, add_objc_decls, generate_classref_translation_entry): Update calls to start_decl and start_function. (build_tmp_function_decl, start_method_def): Unify attribute lists that are passed to push_parm_decl. 2001-07-08 Neil Booth <neil@daikokuya.demon.co.uk> * final.c (no_asm_to_stream): New. (final_scan_insn): Use target structures for prologue ends and epilogue starts. * output.h (no_asm_to_stream): New. * target-def.h (TARGET_ASM_FUNCTION_END_PROLOGUE, TARGET_ASM_FUNCTION_BEGIN_EPILOGUE): New. (TARGET_ASM_OUT): Update. * target.h (struct gcc_target): New members function_end_prologue and function_begin_epilogue. * config/1750/1750.h (ASM_OUTPUT_FUNNAM): Delete as unused. * config/alpha/alpha-protos.h (output_end_prologue): Delete. * config/alpha/alpha.c (output_end_prologue): Rename to alpha_output_function_end_prologue. Use in target struct and make static. * config/alpha/alpha.h (FUNCTION_END_PROLOGUE): Delete. * config/ia64/ia64-protos.h (ia64_output_end_prologue): Delete. * config/ia64/ia64.c (ia64_output_end_prologue): Rename to ia64_output_function_end_prologue. Use in target struct and make static. (ia64_function_prologue, ia64_funciton_epilogue): Rename mistyped prototypes. * config/ia64/ia64.h (FUNCTION_END_PROLOGUE): Delete. * config/m88k/m88k-protos.h (m88k_end_prologue, m88k_begin_epilogue): Delete. * config/m88k/m88k.c (m88k_end_prologue, m88k_begin_epilogue): Rename an use in target struct, make static. * config/ia64/ia64.h (FUNCTION_END_PROLOGUE, FUNCTION_BEGIN_EPILOGUE): Delete. 2001-07-08 Richard Henderson <rth@redhat.com> * stmt.c (emit_case_nodes): Convert modes properly in low+high test. 2001-07-08 Richard Henderson <rth@redhat.com> * config/i386/i386.md: Remove constraints strings from define_split and define_peephole2 patterns. (eh_return_si, eh_return_di): Split eh_return_1 for modes. (eh_return): Use them. 2001-07-08 Richard Henderson <rth@redhat.com> * doc/tm.texi (Exception Handling): New subnode of Stack and Calling. Document MD_FALLBACK_FRAME_STATE_FOR. 2001-07-07 Stephane Carrez <Stephane.Carrez@worldnet.fr> * config/m68hc11/m68hc11.c (m68hc11_initial_elimination_offset): Take into account m68hc11_sp_correction for FRAME_POINTER_REGNUM elimination. * config/m68hc11/m68hc11.h (STARTING_FRAME_OFFSET): Use 0. 2001-07-07 Nick Clifton <nickc@cambridge.redhat.com> * config/ia64/sysv4.h (ASM_OUTPUT_LABELREF): Append # to end of the label inside NAME as opposed to just the end of NAME. 2001-07-07 Neil Booth <neil@daikokuya.demon.co.uk> * config/alpha/alpha-protos.h (vms_valid_decl_attribute_p): Delete. * config/alpha/alpha.c (alpha_init_machine_status, alpha_mark_machine_status, alpha_free_machine_status): Delete. (TARGET_VALID_DECL_ATTRIBUTE): Define for VMS. (vms_valid_decl_attribute_p): Make static, conditionally compile. * config/alpha/alpha.h (VALID_MACHINE_DECL_ATTRIBUTE): Delete. 2001-07-06 Stan Shebs <shebs@apple.com> * target.h (targetm): Rename global from "target", so as not to conflict with local variables. * c-decl.c: Ditto. * c-typeck.c: Ditto. * final.c: Ditto. * tree.c: Ditto. * cp/decl.c: Ditto. * cp/decl2.c: Ditto. * cp/typeck.c: Ditto. * 1750a/1750a.c: Ditto. * a29k/a29k.c: Ditto. * arc/arc.c: Ditto. * arm/arm.c: Ditto. * avr/avr.c: Ditto. * clipper/clipper.c: Ditto. * convex/convex.c: Ditto. * d30v/d30v.c: Ditto. * dsp16xx/dsp16xx.c: Ditto. * elxsi/elxsi.c: Ditto. * fr30/fr30.c: Ditto. * h8300/h8300.c: Ditto. * i370/i370.c: Ditto. * i386/i386.c: Ditto. * i860/i860.c: Ditto. * i960/i960.c: Ditto. * ia64/ia64.c: Ditto. * m32r/m32r.c: Ditto. * m68hc11/m68hc11.c: Ditto. * m68k/m68k.c: Ditto. * m88k/m88k.c: Ditto. * mips/mips.c: Ditto. * ns32k/ns32k.c: Ditto. * pa/pa.c: Ditto. * pdp11/pdp11.c: Ditto. * romp/romp.c: Ditto. * rs6000/rs6000.c: Ditto. * sh/sh.c: Ditto. * sparc/sparc.c: Ditto. * vax/vax.c: Ditto. * we32k/we32k.c: Ditto. * doc/tm.texi: Update the manual to match. 2001-07-06 Richard Henderson <rth@redhat.com> * except.h (MUST_USE_SJLJ_EXCEPTIONS): Examine the value of DWARF2_UNWIND_INFO not just whether it is defined. 2001-07-06 Diego Novillo <dnovillo@redhat.com> * combine.c (combine_simplify_rtx): Also recompute 'mode' if the call to simplify_binary_operation returns a new pattern. 2001-07-06 Roman Lechtchinsky <rl@cs.tu-berlin.de> * glimits.h (__SHRT_MAX__): New. (SHRT_MIN, USHRT_MAX): Define in terms of SHRT_MAX. (SHRT_MAX): Define in terms of __SHRT_MAX__. 2001-07-06 Jan van Male <jan.vanmale@fenk.wau.nl> * alias.c (base_alias_check): Cast GET_MODE_UNIT_SIZE to int to avoid warnings. 2001-07-06 Richard Henderson <rth@redhat.com> * bitmap.c (bitmap_release_memory): Move adjacent to the allocation functions. (bitmap_first_set_bit, bitmap_last_set_bit): Streamline knowing the implementation. Binary search for the set bit. (bitmap_union_of_diff): Allocate the temporary on the stack instead of using xmalloc. 2001-07-06 Richard Henderson <rth@redhat.com> * genrecog.c (validate_pattern): Warn for constraints in define_{expand,split,peephole2}. Remove strict_low_part before looking up match_dup. 2001-07-06 DJ Delorie <dj@redhat.com> * doc/gcc.texi (Makefile): Rename to be a more general purpose chapter about various build hints and history. Add section talking about the various types of native and cross builds. 2001-07-06 Neil Booth <neil@daikokuya.demon.co.uk> * Makefile.in (final.o): Depend on target.h. * final.c: Include target.h. (default_function_pro_epilogue): New. (final_start_function): Use target structure for function prologues. (final_end_function): Use target structure for function epilogues. * fold-const.c (real_hex_to_f): Constify s and p. * output.h (default_function_pro_epilogue): New. * real.h (real_hex_to_f): Update prototype. * target-def.h (TARGET_ASM_FUNCTION_PROLOGUE, TARGET_ASM_FUNCTION_EPILOGUE, TARGET_ASM_OUT): New. (TARGET_INITIALIZER): Update. * target.h (gcc_target): Add struct asm_out. * doc/tm.texi: Update. config: Update each arch to use TARGET_ASM_FUNCTION_PROLOGUE and TARGET_ASM_FUNCTION_EPILOGUE. Move macro code to functions in cpu/cpu.c, or rename old functions consistently. Take a HOST_WIDE INT not an int as the SIZE parameter. Remove now redundant macros and prototypes. Make new functions static. * 1750a/1750a.c: Similarly. * 1750a/1750a.h: Similarly. * a29k/a29k-protos.h: Similarly. * a29k/a29k.c: Similarly. * a29k/a29k.h: Similarly. * arc/arc-protos.h: Similarly. * arc/arc.c: Similarly. * arc/arc.h: Similarly. * arm/arm-protos.h: Similarly. * arm/arm.c: Similarly. * arm/arm.h: Similarly. * avr/avr-protos.h: Similarly. * avr/avr.c: Similarly. * avr/avr.h: Similarly. * clipper/clipper-protos.h: Similarly. * clipper/clipper.c: Similarly. * clipper/clipper.h: Similarly. * convex/convex.c: Similarly. * convex/convex.h: Similarly. * d30v/d30v-protos.h: Similarly. * d30v/d30v.c: Similarly. * d30v/d30v.h: Similarly. * d30v/d30v.md: Similarly. * dsp16xx/dsp16xx-protos.h: Similarly. * dsp16xx/dsp16xx.c: Similarly. * dsp16xx/dsp16xx.h: Similarly. * elxsi/elxsi.c: Similarly. * elxsi/elxsi.h: Similarly. * fr30/fr30.c: Similarly. * fr30/fr30.md: Similarly. * h8300/h8300-protos.h: Similarly. * h8300/h8300.c: Similarly. * h8300/h8300.h: Similarly. * i370/i370-protos.h: Similarly. * i370/i370.c: Similarly. * i370/i370.h: Similarly. * i386/i386.c: Similarly. * i386/osf1elf.h: Similarly. * i386/osfrose.h: Similarly. * i860/i860-protos.h: Similarly. * i860/i860.c: Similarly. * i860/i860.h: Similarly. * i960/i960-protos.h: Similarly. * i960/i960.c: Similarly. * i960/i960.h: Similarly. * ia64/ia64-protos.h: Similarly. * ia64/ia64.c: Similarly. * ia64/ia64.h: Similarly. * m32r/m32r-protos.h: Similarly. * m32r/m32r.c: Similarly. * m32r/m32r.h: Similarly. * m68hc11/m68hc11-protos.h: Similarly. * m68hc11/m68hc11.c: Similarly. * m68hc11/m68hc11.h: Similarly. * m68k/crds.h: Similarly. * m68k/dpx2.h: Similarly. * m68k/m68k-protos.h: Similarly. * m68k/m68k.c: Similarly. * m68k/m68k.h: Similarly. * m68k/news.h: Similarly. * m88k/m88k-protos.h: Similarly. * m88k/m88k.c: Similarly. * m88k/m88k.h: Similarly. * mips/mips-protos.h: Similarly. * mips/mips.c: Similarly. * mips/mips.h: Similarly. * ns32k/merlin.h: Similarly. * ns32k/ns32k.c: Similarly. * ns32k/ns32k.h: Similarly. * ns32k/tek6000.h: Similarly. * pa/pa-protos.h: Similarly. * pa/pa.c: Similarly. * pa/pa.h: Similarly. * pdp11/2bsd.h: Similarly. * pdp11/pdp11-protos.h: Similarly. * pdp11/pdp11.c: Similarly. * pdp11/pdp11.h: Similarly. * romp/romp-protos.h: Similarly. * romp/romp.c: Similarly. * romp/romp.h: Similarly. * rs6000/rs6000-protos.h: Similarly. * rs6000/rs6000.c: Similarly. * rs6000/rs6000.h: Similarly. * rs6000/sysv4.h: Similarly. * sh/sh-protos.h: Similarly. * sh/sh.c: Similarly. * sh/sh.h: Similarly. * sparc/sparc-protos.h: Similarly. * sparc/sparc.c: Similarly. * sparc/sparc.h: Similarly. * vax/vax.c: Similarly. * vax/vax.h: Similarly. * vax/vms.h: Similarly. * we32k/we32k.c: Similarly. * we32k/we32k.h: Similarly. Fri Jul 6 11:47:59 2001 Jeffrey A Law (law@cygnus.com) * basic-block.h (first_insn_after_basic_block_note): Declare. * flow.c (first_insn_after_basic_block_note): Define. Moved from... * ssa.c (first_insn_after_basic_block_note): Remove. * ssa-dce.c (find_inherently_necessary): Consider BARRIERs necessary. (ssa_eliminate_dead_code): Properly update the CFG and PHI nodes when we find a dead conditional branch. Insert BARRIERs after any blocks with no successors, but which do not have any BARRIERs. 2001-07-06 Zack Weinberg <zackw@stanford.edu> * varray.c (varray_check_failed): Use internal_error. 2001-07-05 Andrew Haley <aph@redhat.com> * Makefile.in (LIB2_DIVMOD_FUNCS): New. (LIB2FUNCS): Move divmod functions to LIB2_DIVMOD_FUNCS. * mklibgcc.in: Compile LIB2_DIVMOD_FUNCS. 2001-07-02 Jason Merrill <jason_merrill@redhat.com> * dwarf2out.c (mem_loc_descriptor): Only look through a constant pool reference if the target constant is also a SYMBOL_REF. 2001-07-05 Eric Christopher <echristo@redhat.com> * config/mips/mips.h (MASK_MIPS3900): Remove. (MASK_MIPS16,MASK_NO_CHECK_ZERO_DIV,MASK_CHECK_RANGE_DIV, MASK_UNINIT_CONST_IN_RODATA): Change for 3900 mask removal. (TARGET_MIPS3900): Change to use mips_arch. (TARGET_MIPS4000): New. (TARGET_MIPS4100): New. (TARGET_MIPS4300): New. (TARGET_SWITCHES): Change 3900 and 4650 options to NULL. (SUBTARGET_TARGET_OPTIONS): Add -march. Change help text for -mipsX. (GENERATE_BRANCHLIKELY): Move TARGET_MIPS3900. (ISA_HAS_BRANCHLIKELY): To here. (CC1_CPU_SPEC): New. (CC1_SPEC): Use here. Remove 4650 and 3900 options. (mips_arch_string): Declare. (mips_arch): Declare. (TARGET_OPTIONS): Add -march and -mtune. * config/mips/mips.c (mips_arch_string): New. (mips_arch): New. (override_options): Handle -march for codegen and -mtune for scheduling. Use mips_arch. Move tx39 target default here. (mips_parse_cpu): Move error message to override_options. * config/mips/r3900.h (TARGET_DEFAULT): Remove. * config/mips/mips.md: Use TARGET_MIPS4000 and TARGET_MIPS4300. * doc/invoke.texi (Option Summary): Add -march and -mtune entries. (MIPS Options): Ditto. Change mcpu entry to historical text. 2001-07-05 H.J. Lu (hjl@gnu.org) * config/mips/mips.c (mips_parse_cpu): New function to parse -march=*/-mcpu=*. 2001-07-05 Jim Wilson <wilson@redhat.com> * config/ia64/lib1funcs.asm: Revert 2001-07-02 change. * config/ia64/t-ia64: Likewise. (LIB1ASMFUNCS): Update comment. 2001-07-05 David Edelsohn <edelsohn@gnu.org> * doc/install.texi (Install GCC: Binaries): Fix typo. 2001-07-04 Stephane Carrez <Stephane.Carrez@worldnet.fr> * config/m68hc11/m68hc11.md ("*ashlsi3"): Operand 1 can be a memory reference using the stack pointer, adjust it since we push Y temporarily. ("*ashrsi3"): Likewise. ("*lshrsi3"): Likewise. 2001-07-05 Stephane Carrez <Stephane.Carrez@worldnet.fr> * config/m68hc11/m68hc11.h (RETURN_ADDR_RTX): Fix return address when -fomit-frame-pointer is used. 2001-07-05 Jeffrey Oldham <oldham@codesourcery.com> * flow.c: Reverse Jan Hubicka's patch of 02July2001. (try_redirect_by_replacing_jump): Reverse updating properly the count and frequency information. Reverse removing cc0 setter. (forwarder_block_p): Reverse fixing for fallthru blocks. 2001-07-05 DJ Delorie <dj@redhat.com> * gcc.c (TARGET_OPTION_TRANSLATE_TABLE): New. (translate_options): If the above is defined, use it to map given options to new options. * doc/tm.texi: Document it. 2001-07-05 Brad Lucier <lucier@math.purdue.edu> Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> * doc/invoke.texi (Optimize Options): Document that -fgcse may cause programs using computed gotos to run more slowly. 2001-07-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> * doc/install.texi (Specific): Markup, spelling and typo fixes. Fixed sorting. Consistently require binutils 2.11.2, not prereleases. (Specific, decstation-*): Canonicalize as mips-dec-*. (Specific, i?86-*-sco3.2v5*): Remove make bootstrap requirement, always necessary. (Specific, m68k-altos): Removed reference to README.altos, deleted. (Specific, mips-*): Reword MIPS C compiler requirements. (Specific, powerpc*-*-*): New, mention --with-cpu once. (Specific, sunv5): Removed, obsolete. 2001-07-05 Nathan Sidwell <nathan@codesourcery.com> * dwarf2out.c (output_loc_list): Use an all ones mask for .text asm output and don't rely on long long literals. Reformat some long lines. 2001-07-05 Andreas Jaeger <aj@suse.de> * doc/gcc.texi (GNU/Linux): Remove accidental re-add of GPL section. 2001-07-04 Daniel Berlin <dan@cgsoftware.com> * dwarf2out.c (dwarf2out_define): Update comment. (dwarf2out_undef): Ditto. (dwarf2out_start_source_file): Ditto. (dwarf2out_end_source_file): Ditto. (dwarf2out_finish): Output DW_MACINFO_end_file for primary file, since we never call the start/end debug hook for the primary file. 2001-07-04 Kazu Hirata <kazu@hxi.com> * config/h8300/h8300.c (get_shift_alg): Remove an extra operand from shll. 2001-07-04 Nathan Sidwell <nathan@codesourcery.com> * cppinit.c (remove_dup_dirs): Inform if a system include directory is being reordered. * doc/invoke.texi (Directory Options): GCC warns if you hide a system include. * doc/cpp.texi (Search Paths): Likewise. * doc/gcc.texi (Interoperation): Remove information about -I/usr/include. 2001-07-04 Nathan Sidwell <nathan@codesourcery.com> * varray.h (VARRAY_TOP_GENERIC_PTR): Remove spurious parameter. (VARRAY_TOP_CHAR_PTR): Likewise. 2001-07-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * gcc.c (process_command): Don't assign elements of a const char*. Wed Jul 4 13:40:02 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * emit-rtl.c (change_address): Don't abort if invalid address while reload is in progress. 2001-07-04 Daniel Berlin <dan@cgsoftware.com> * c-lex.c (cb_file_change): Pass line number to debug_start_source_file. (cb_undefine): Pass correct line number to debug_undef. * toplev.c (debug_start_source_file): Add line number to parameters. Pass it along to dwarf2out_start_source_file. (decode_g_option): Stop resetting debug level back to normal when we change debug formats, unless the current level is none. (Before, -g3 -gdwarf-2 would use debug level 2, rather than 3). * toplev.h (debug_start_source_file): Add line number to parameters. * dwarf2out.h (dwarf2out_start_source_file): Add line number to parameters. * dwarf2out.c (dwarf2out_start_source_file): Add line number to parameters. Output debug_macinfo data for starting file if requested. (dwarf2out_end_source_file): Output debug_macinfo data for ending file if requested. (dwarf2out_define): Output debug_macinfo data for defining a macro if requested. (dwarf2out_undef): Output debug_macinfo data for undefining a macro if requested. (DEBUG_MACINFO_SECTION): New. DWARF2 macro info section name. (DEBUG_MACINFO_SECTION_LABEL): New. DWARF2 macro info section label. (macinfo_section_label): New. DWARF2 macro info section label. (dwarf2out_init): If we want macro info, output the start label for the section. (dwarf2out_finish): If we want macro info, add a DW_AT_macro_info attribute to the compilation unit die pointing to the macro info. 2001-07-04 Daniel Berlin <dan@cgsoftware.com> * dwarf2out.c (new_loc_list): Move to inside #ifdef DWARF2_DEBUGGING_INFO. (add_loc_descr_to_loc_list): Ditto. (output_loc_list): Ditto. Also, fix thinko in curr not being initialized. (gen_internal_sym): Ditto. Wed Jul 4 13:40:02 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * emit-rtl.c (replace_equiv_address): New function. * expr.h (replace_equiv_address): New declaration. * explow.c (validize_mem): Call it instead of change_address and also call if -fforce-addr and address is constant. * expr.c: Replace more calls to change_address with adjust_address and/or replace_equiv_address or to validize_mem. * function.c, regmove.c, config/alpha/alpha.c: Likewise. * config/arm/arm.md, config/clipper/clipper.md: Likewise. * config/dsp16xx/dsp16xx.md, config/fr30/fr30.c: Likewise. * config/i370/i370.md, config/i860/i860.md: Likewise. * config/i960/i960.md, config/mips/mips.c: Likewise. * config/mips/mips.md, config/pa/pa.md: Likewise. * config/pdp11/pdp11.md, config/rs6000/rs6000.c: Likewise. * config/rs6000/rs6000.md, config/sh/sh.md: Likewise. 2001-07-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * bitmap.c (bitmap_union_of_diff): Don't use BITMAP_ALLOCA. * bitmap.h (BITMAP_ALLOCA): Don't pass alloca as an argument to a function. 2001-07-04 Joseph S. Myers <jsm28@cam.ac.uk> * doc/include: New directory. * doc/fdl.texi: Move to doc/include/fdl.texi. * doc/texinfo.tex: Move to doc/include/texinfo.tex. * doc/include/funding.texi, doc/include/gpl.texi: New files. * doc/gcc.texi: Use funding.texi and gpl.texi. * Makefile.in ($(docdir)/cpp.info, $(docdir)/gcc.info, $(docdir)/cppinternals.info, cpp.dvi. gcc.dvi. cppinternals.dvi): Update dependencies and use -I $(docdir)/include. 2001-07-04 Anthony Green <green@redhat.com> * config/v850/t-v850 (v850-c.o): Add missing dependencies. 2001-07-04 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> * doc/install.texi (sparc64-*-*): Remove garbage. Wed Jul 4 09:07:44 2001 Jan van Male <jan.vanmale@fenk.wau.nl> * i386.c (ix86_expand_builtin, case IX86_BUILTIN_SETPS): Fix typo in last change to use adjust_address. 2001-07-04 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> * doc/install.texi (Specific): Update information for *-*-solaris*. Tue Jul 3 22:33:15 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * explow.c (plus_constant_wide): Reinitialize Y for restart. 2001-07-03 Stan Shebs <shebs@apple.com> * config/darwin.h (SECTION_FUNCTION): Remove WAS_TEXT argument, remove case for flag_no_mach_text_sections. (EXTRA_SECTION_FUNCTIONS): Remove arg from uses of SECTION_FUNCTION. * config/darwin.c (flag_no_mach_text_sections): Remove. * config/darwin-protos.h (darwin_init_pragma): Remove decl. Tue Jul 3 15:35:52 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * explow.c (plus_constant_wide, case PLUS): Call find_constant_term and avoid checking for constant as first operand. * recog.c (find_constant_term_loc): No longer static. (adj_offettable_operand): Delete. * rtl.h (adj_offsettable_operand): Delete declaration. (find_constant_term): Add declaration. * caller-save.c: Replace calls to adj_offsettable_operand with calls to adjust_address. * config/arm/arm.c, config/c4x/c4x.c: Likewise. * config/clipper/clipper.md, config/h8300/h8300.c: Likewise. * config/i386/i386.c, config/i386/i386.md: Likewise. * config/i860/i860.c, config/i960/i960.c: Likewise. * config/i960/i960.md, config/m68hc11/m68hc11.c: Likewise. * config/m68k/m68k.c, config/m68k/m68k.md: Likewise. * config/m88k/m88k.md, config/mcore/mcore.c: Likewise. * config/mips/mips.c, config/mips/mips.md: Likewise. * config/mn10200/mn10200.c, config/mn10300/mn10300.c: Likewise. * config/ns32k/ns32k.c, config/ns32k/ns32k.md: Likewise. * config/pa/pa.c, config/pdp11/pdp11.c: Likewise. * config/pdp11/pdp11.md, config/sh/sh.c, config/v850/v850.c: Likewise. * config/vax/vax.md, config/ns32k/ns32k.c: Likewise. * config/ns32k/ns32k.md: Likewise. 2001-07-03 Zack Weinberg <zackw@stanford.edu> * rtl.c (copy_rtx): Handle 'T' format letter. * gensupport.c (collect_insn_data): Likewise. * print-rtl.c (print_rtx): Print 'T' slots like 's'. 2001-07-03 Nick Clifton <nickc@cambridge.redhat.com> * doc/invoke.texi (Directory Options): Specifiy range for <N> in -B option. Use 'dir' not 'foo' as example directory name. 2001-07-03 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> * config/i386/sol2.h (ASM_PREFERRED_EH_DATA_FORMAT): Define. Fixes PRs bootstrap/3067, bootstrap/3249, bootstrap/3275. 2001-07-03 Joseph S. Myers <jsm28@cam.ac.uk> * doc/cppinternals.texi: Improve formatting and logical markup. 2001-07-03 Andreas Jaeger <aj@suse.de> * Makefile.in (insn-recog.o): Add dependency on reload.h. * genrecog.c (write_header): Include reload.h for prototypes in insn-recog.c. 2001-07-03 Neil Booth <neil@daikokuya.demon.co.uk> config: * i386/cygwin.h (VALID_MACHINE_DECL_ATTRIBUTE, VALID_MACHINE_TYPE_ATTRIBUTE): Remove. * i386/i386-protos.h (i386_pe_valid_decl_attribute_p, i386_pe_valid_type_attribute_p): Add. * i386/i386.c (TARGET_INITIALIZER): Override for cygwin targets. * i386/winnt.c (i386_valid_decl_attribute_p): Return directly. Mon Jul 2 21:52:19 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * explow.c (plus_constant_wide, case LO_SUM): New case. (plus_constant_for_output_wide): Delete. * rtl.h (plus_constant_for_output): Delete. * alias.c (canon_rtx, init_alias_analysis): Call plus_constant instead of plus_constant_for_output. * recog.c (offsettable_address_p, adj_offsettable_operand): Likewise. * config/darwin.c, config/arm/arm.c, config/m68k/m68k.c: Likewise. * config/m88k/m88k.c, config/mips/mips.c, config/pa/pa.c: Likewise. * config/rs6000/rs6000.c, config/sparc/sparc.c: Likewise. * config/sparc/sparc.md: Likewise. Convert some change_address calls to adjust_address. 2001-07-03 Joseph S. Myers <jsm28@cam.ac.uk> * doc/extend.texi, doc/gcc.texi, doc/invoke.texi, doc/md.texi, doc/rtl.texi, doc/tm.texi: Improve formatting. Improve documentation of -std and -Wwrite-strings. 2001-07-02 Geoffrey Keating <geoffk@redhat.com> * cse.c (canon_hash): Don't register registers in very small register classes, as extending their lifetime might cause reload to fail. Mon Jul 2 23:14:00 CEST 2001 Jan Hubicka <jh@suse.cz> * flow.c (try_redirect_by_replacing_jump): Remove cc0 setter. * flow.c (forwarder_block_p): Fix for fallthru blocks. (try_redirect_by_replacing_jump): Update properly the count and frequency information. Mon Jul 2 14:20:13 2001 Jeffrey A Law (law@cygnus.com) * toplev.c (dump_file_index): Move SSA dumps just after first jump dump. (dump_file): Corresponding changes. (rest_of_compilation): Move SSA path to just after the first jump pass. * doc/gcc.texi (Passes): Update due to movement of SSA path. * doc/invoke.texi: Update dump file #s as they were completely out of date with reality. 2001-07-02 Geoffrey Keating <geoffk@redhat.com> * doc/tm.texi (Frame Layout): Document STACK_PUSH_CODE. * expr.c (emit_move_insn_1): Deal with non-default STACK_PUSH_CODE. * expr.c (emit_single_push_insn): Fix warning. 2001-07-02 Toshiyasu Morita <toshiyasu.morita@hsa.hitachi.com> * expr.c (emit_move_insn_1): Avoid modifying cfun->expr->x_stack_pointer when PUSH_ROUNDING is defined. Mon Jul 2 15:33:31 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * emit-rtl.c (adjust_address): New function. * expr.h (adjust_address): Add declaration. * builtins.c: Replace some calls to change_address with calls to it or to validize_mem. * caller-save.c, dwarf2out.c, except.c, expmed.c, expr.c: Likewise. * function.c, config/a29k/a29k.md, config/alpha/alpha.c: Likewise. * config/arm/arm.c, config/convex/convex.c: Likewise. * config/dsp16xx/dsp16xx.md, config/fr30/fr30.c: Likewise. * config/i386/i386.c, config/i386/i386.md: Likewise. * config/ia64/ia64.c, config/ia64/ia64.md: Likewise. * config/m32r/m32r.c, config/m68k/m68k.md: Likewise. * config/m88k/m88k.c, config/mips/mips.md: Likewise. * config/ns32k/ns32k.c, config/rs6000/rs6000.c: Likewise. * config/sh/sh.c, config/sparc/sparc.md: Likewise. 2001-07-02 Jim Wilson <wilson@redhat.com> * config/ia64/ia64.h: Delete obsolete lib1funcs.asm comment. 2001-07-02 Steve Ellcey <sje@cup.hp.com> * config/ia64/t-ia64: Change LIB1ASMFUNCS to use single underscore. * config/ia64/lib1funcs.asm: Change macro names to match t-ia64. 2001-07-02 Zack Weinberg <zackw@stanford.edu> * cppinit.c (lang_defaults): New table. (set_lang): Just read from lang_defaults into the live options structure. 2001-07-02 Zack Weinberg <zackw@stanford.edu> * Makefile.in (doc): Depend on $(GENERATED_MANPAGES). * doc/.cvsignore: Add gcc.1, cpp.1, gcov.1. * doc/gcc.1, doc/cpp.1, doc/gcov.1: Removed. 2001-07-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> * doc/install.texi: Various spelling and markup fixes. (Installing GCC): Component specific installation instructions are gone. Fix reference. Warn about removing old install dir in the presence of shared libs. (Configuration): Invoke with options target to match configure --help. Consistently refer to gas, gld pathnames. Invert --enable-multilib documentation. Remove references to old compiler versions. Mon Jul 2 12:50:51 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * flow.c (try_simplify_condjump): Fix typo in updating fallthru flags. 2001-07-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> * doc/install.texi (Specific, mips*-sgi-irix4): Split from IRIX 5 section. (Specific, mips*-sgi-irix5): Note IDO download. Reworded MIPS C hints. Use GNU as instead of GAS. Markup fixes. Removed SGI Freeware reference, IRIX 6 only. (Specific, mips*-sgi-irix6): Removed ranlib caveats, obsolete. Note N64 library requirement/workaround. Update O32 hints. Complete list of structure passing bug victims. 2001-07-02 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> * doc/install.texi: Remove CVS Id. 2001-07-02 Andreas Jaeger <aj@suse.de> * ssa-dce.c (note_inherently_necessary_set): Add unused attribute. (find_inherently_necessary): Remove unused variable. 2001-07-02 Nathan Sidwell <nathan@codesourcery.com> * c-common.h (TDI_inlined): New ast dump phase. (dump_flag_name): New function. * c-dump.c (dump_files): Add inlined phase. (dump_flag_name): Define. * doc/invoke.texi (-fdump-ast-inlined): Document. Mon Jul 2 06:29:36 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * stor-layout.c (layout_decl): Revert change to handling of alignment in packed types. Sun Jul 1 11:53:52 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * c-common.c (decl_attributes, case A_MODE): Don't call layout_decl for FIELD_DECL. 2001-07-01 Geoffrey Keating <geoffk@redhat.com> * doc/tm.texi (FUNCTION_ARG): Document that the last call is special. 2001-07-01 Nathan Sidwell <nathan@codesourcery.com> * tlink.c (recompile_files): Remove COMPILER_PATH and LIBRARY_PATH from the environment. 2001-07-01 Zack Weinberg <zackw@stanford.edu> * c-common.h (enum rid): Add RID_FIRST_AT, RID_LAST_AT, RID_LAST_PQ. Move RID_FIRST_PQ down with the other FIRST/LAST enumerators. (OBJC_IS_AT_KEYWORD, OBJC_IS_PQ_KEYWORD): New macros. * c-parse.in (OBJC_STRING): Kill. (objc_string): Decompose to [objc_string] '@' STRING. (reswords): Take the leading '@' off all the Objective C keywords. (objc_rid_sans_at): Kill. (init_reswords): Don't initialize it. (yylexname): Use OBJC_IS_AT_KEYWORD and OBJC_IS_PQ_KEYWORD. (_yylex): Kill reconsider label. Look ahead one token after an '@'; if we get an identifier, check whether it's an Objective C @-keyword. If so, return the keyword. Otherwise, put back the token and return the '@' as a terminal. * cpplib.c (lex_macro_node): Remove unnecessary check for leading '@' on identifier. Clarify control flow and commentary. Sun Jul 1 11:53:52 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * cse.c (new_label_ref): Variable deleted. (insert): Remove set of new_label_ref. (check_for_label_ref): New function. (cse_basic_block): Don't check new_label_ref; call check_for_label_ref. See ChangeLog.5 for earlier changes. From-SVN: r43861
2001-07-09 13:20:51 +02:00
default:
break;
}
1992-02-28 11:23:25 +01:00
/* If we are reloading a (SUBREG constant ...), really reload just the
inside expression in its own mode. Similarly for (SUBREG (PLUS ...)).
If we have (SUBREG:M1 (MEM:M2 ...) ...) (or an inner REG that is still
a pseudo and hence will become a MEM) with M1 wider than M2 and the
register is a pseudo, also reload the inside expression.
For machines that extend byte loads, do this for any SUBREG of a pseudo
where both M1 and M2 are a word or smaller, M1 is wider than M2, and
M2 is an integral mode that gets extended when loaded.
Similar issue for (SUBREG:M1 (REG:M2 ...) ...) for a hard register R
where either M1 is not valid for R or M2 is wider than a word but we
only need one register to store an M2-sized quantity in R.
(However, if OUT is nonzero, we need to reload the reg *and*
the subreg, so do nothing here, and let following statement handle it.)
1992-02-28 11:23:25 +01:00
Note that the case of (SUBREG (CONST_INT...)...) is handled elsewhere;
we can't handle it here because CONST_INT does not indicate a mode.
Similarly, we must reload the inside expression if we have a
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
STRICT_LOW_PART (presumably, in == out in this case).
Also reload the inner expression if it does not require a secondary
reload but the SUBREG does.
Finally, reload the inner expression if it is a register that is in
the class whose registers cannot be referenced in a different size
and M1 is not the same size as M2. If subreg_lowpart_p is false, we
cannot reload just the inside since we might end up with the wrong
register class. But if it is inside a STRICT_LOW_PART, we have
no choice, so we hope we do get the right register class there. */
1992-02-28 11:23:25 +01:00
if (in != 0 && GET_CODE (in) == SUBREG
&& (subreg_lowpart_p (in) || strict_low)
hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. 2002-11-04 Aldy Hernandez <aldyh@redhat.com> * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. * config/rs6000/rs6000.h (CLASS_CANNOT_CHANGE_MODE_P): Remove. (CLASS_CANNOT_CHANGE_MODE): Remove. (CANNOT_CHANGE_MODE_CLASS): New. * config/alpha/alpha.h: Same. * config/ia64/ia64.h: Same. * config/mips/mips.h: Same. * config/s390/s390.h: Same. * config/sh/sh.h: Same. * config/pa/pa64-regs.h: Same. * config/sh/sh-protos.h (sh_cannot_change_mode_class): Add prototype. * config/sh/sh.c (sh_cannot_change_mode_class): New. * config/mips/mips-protos.h (mips_cannot_change_mode_class): Add prototype. * config/mips/mips.c (mips_cannot_change_mode_class): New. * doc/tm.texi (Register Classes): Remove CLASS_CANNOT_CHANGE_MODE and CLASS_CANNOT_CHANGE_MODE_P. Document CANNOT_CHANGE_MODE_CLASS. * reload.c (push_reload): Use CANNOT_CHANGE_MODE_CLASS. (push_reload): Same. * simplify-rtx.c (simplify_subreg): Same. * reload1.c (choose_reload_regs): Same. * recog.c (register_operand): Same. * regrename.c (mode_change_ok): Change to use new CANNOT_CHANGE_MODE_CLASS infrastructure. * regclass.c (cannot_change_mode_set_regs): New. Declare subregs_of_mode. (regclass): Use subregs_of_mode. Remove references to reg_changes_mode. (init_reg_sets_1): Remove class_can_change_mode and reg_changes_mode code. (invalid_mode_change_p): New. (dump_regclass): Use invalid_mode_change_p instead of class_can_change_mode. (regclass): Same. (record_operand_costs): Do not set reg_changes_mode. * local-alloc.c (struct qty): Remove changes_mode field. (alloc_qty): Remove changes_mode initialization. (update_qty_class): Remove set of changes_mode. (find_free_reg): Use subregs_of_mode. * global.c (find_reg): Use subregs_of_mode info. * rtl.h (cannot_change_mode_set_regs): New prototype. (invalid_mode_change_p): Same. (REG_CANNOT_CHANGE_MODE_P): New macro. * flow.c (mark_used_regs): Calculate subregs_of_mode. Remove REG_CHANGES_MODE. (life_analysis): Clear subregs_of_mode. * combine.c (subst): Pass class to CLASS_CANNOT_CHANGE_MODE_P. Remove use of CLASS_CANNOT_CHANGE_MODE. (simplify_set): Same. (gen_lowpart_for_combine): Calculate subregs_of_mode. Remove REG_CHANGES_MODE. * regs.h: Add extern for subregs_of_mode; Include hard-reg-set and basic-block. (REG_CHANGES_MODE): Delete. From-SVN: r58794
2002-11-04 17:58:39 +01:00
#ifdef CANNOT_CHANGE_MODE_CLASS
&& !CANNOT_CHANGE_MODE_CLASS (GET_MODE (SUBREG_REG (in)), inmode, rclass)
#endif
&& contains_reg_of_mode[(int) rclass][(int) GET_MODE (SUBREG_REG (in))]
&& (CONSTANT_P (SUBREG_REG (in))
|| GET_CODE (SUBREG_REG (in)) == PLUS
1992-02-28 11:23:25 +01:00
|| strict_low
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 (in))
&& REGNO (SUBREG_REG (in)) >= FIRST_PSEUDO_REGISTER)
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 (in)))
&& ((GET_MODE_PRECISION (inmode)
> GET_MODE_PRECISION (GET_MODE (SUBREG_REG (in))))
#ifdef LOAD_EXTEND_OP
|| (GET_MODE_SIZE (inmode) <= UNITS_PER_WORD
&& (GET_MODE_SIZE (GET_MODE (SUBREG_REG (in)))
<= UNITS_PER_WORD)
&& (GET_MODE_PRECISION (inmode)
> GET_MODE_PRECISION (GET_MODE (SUBREG_REG (in))))
&& INTEGRAL_MODE_P (GET_MODE (SUBREG_REG (in)))
&& LOAD_EXTEND_OP (GET_MODE (SUBREG_REG (in))) != UNKNOWN)
#endif
#ifdef WORD_REGISTER_OPERATIONS
|| ((GET_MODE_PRECISION (inmode)
< GET_MODE_PRECISION (GET_MODE (SUBREG_REG (in))))
&& ((GET_MODE_SIZE (inmode) - 1) / UNITS_PER_WORD ==
((GET_MODE_SIZE (GET_MODE (SUBREG_REG (in))) - 1)
/ UNITS_PER_WORD)))
#endif
))
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 (in))
&& REGNO (SUBREG_REG (in)) < FIRST_PSEUDO_REGISTER
/* The case where out is nonzero
is handled differently in the following statement. */
&& (out == 0 || subreg_lowpart_p (in))
&& ((GET_MODE_SIZE (inmode) <= UNITS_PER_WORD
&& (GET_MODE_SIZE (GET_MODE (SUBREG_REG (in)))
> UNITS_PER_WORD)
&& ((GET_MODE_SIZE (GET_MODE (SUBREG_REG (in)))
/ UNITS_PER_WORD)
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
!= (int) hard_regno_nregs[REGNO (SUBREG_REG (in))]
[GET_MODE (SUBREG_REG (in))]))
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
|| ! HARD_REGNO_MODE_OK (subreg_regno (in), inmode)))
|| (secondary_reload_class (1, rclass, inmode, in) != NO_REGS
&& (secondary_reload_class (1, rclass, GET_MODE (SUBREG_REG (in)),
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
SUBREG_REG (in))
== NO_REGS))
hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. 2002-11-04 Aldy Hernandez <aldyh@redhat.com> * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. * config/rs6000/rs6000.h (CLASS_CANNOT_CHANGE_MODE_P): Remove. (CLASS_CANNOT_CHANGE_MODE): Remove. (CANNOT_CHANGE_MODE_CLASS): New. * config/alpha/alpha.h: Same. * config/ia64/ia64.h: Same. * config/mips/mips.h: Same. * config/s390/s390.h: Same. * config/sh/sh.h: Same. * config/pa/pa64-regs.h: Same. * config/sh/sh-protos.h (sh_cannot_change_mode_class): Add prototype. * config/sh/sh.c (sh_cannot_change_mode_class): New. * config/mips/mips-protos.h (mips_cannot_change_mode_class): Add prototype. * config/mips/mips.c (mips_cannot_change_mode_class): New. * doc/tm.texi (Register Classes): Remove CLASS_CANNOT_CHANGE_MODE and CLASS_CANNOT_CHANGE_MODE_P. Document CANNOT_CHANGE_MODE_CLASS. * reload.c (push_reload): Use CANNOT_CHANGE_MODE_CLASS. (push_reload): Same. * simplify-rtx.c (simplify_subreg): Same. * reload1.c (choose_reload_regs): Same. * recog.c (register_operand): Same. * regrename.c (mode_change_ok): Change to use new CANNOT_CHANGE_MODE_CLASS infrastructure. * regclass.c (cannot_change_mode_set_regs): New. Declare subregs_of_mode. (regclass): Use subregs_of_mode. Remove references to reg_changes_mode. (init_reg_sets_1): Remove class_can_change_mode and reg_changes_mode code. (invalid_mode_change_p): New. (dump_regclass): Use invalid_mode_change_p instead of class_can_change_mode. (regclass): Same. (record_operand_costs): Do not set reg_changes_mode. * local-alloc.c (struct qty): Remove changes_mode field. (alloc_qty): Remove changes_mode initialization. (update_qty_class): Remove set of changes_mode. (find_free_reg): Use subregs_of_mode. * global.c (find_reg): Use subregs_of_mode info. * rtl.h (cannot_change_mode_set_regs): New prototype. (invalid_mode_change_p): Same. (REG_CANNOT_CHANGE_MODE_P): New macro. * flow.c (mark_used_regs): Calculate subregs_of_mode. Remove REG_CHANGES_MODE. (life_analysis): Clear subregs_of_mode. * combine.c (subst): Pass class to CLASS_CANNOT_CHANGE_MODE_P. Remove use of CLASS_CANNOT_CHANGE_MODE. (simplify_set): Same. (gen_lowpart_for_combine): Calculate subregs_of_mode. Remove REG_CHANGES_MODE. * regs.h: Add extern for subregs_of_mode; Include hard-reg-set and basic-block. (REG_CHANGES_MODE): Delete. From-SVN: r58794
2002-11-04 17:58:39 +01:00
#ifdef CANNOT_CHANGE_MODE_CLASS
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 (in))
&& REGNO (SUBREG_REG (in)) < FIRST_PSEUDO_REGISTER
hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. 2002-11-04 Aldy Hernandez <aldyh@redhat.com> * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. * config/rs6000/rs6000.h (CLASS_CANNOT_CHANGE_MODE_P): Remove. (CLASS_CANNOT_CHANGE_MODE): Remove. (CANNOT_CHANGE_MODE_CLASS): New. * config/alpha/alpha.h: Same. * config/ia64/ia64.h: Same. * config/mips/mips.h: Same. * config/s390/s390.h: Same. * config/sh/sh.h: Same. * config/pa/pa64-regs.h: Same. * config/sh/sh-protos.h (sh_cannot_change_mode_class): Add prototype. * config/sh/sh.c (sh_cannot_change_mode_class): New. * config/mips/mips-protos.h (mips_cannot_change_mode_class): Add prototype. * config/mips/mips.c (mips_cannot_change_mode_class): New. * doc/tm.texi (Register Classes): Remove CLASS_CANNOT_CHANGE_MODE and CLASS_CANNOT_CHANGE_MODE_P. Document CANNOT_CHANGE_MODE_CLASS. * reload.c (push_reload): Use CANNOT_CHANGE_MODE_CLASS. (push_reload): Same. * simplify-rtx.c (simplify_subreg): Same. * reload1.c (choose_reload_regs): Same. * recog.c (register_operand): Same. * regrename.c (mode_change_ok): Change to use new CANNOT_CHANGE_MODE_CLASS infrastructure. * regclass.c (cannot_change_mode_set_regs): New. Declare subregs_of_mode. (regclass): Use subregs_of_mode. Remove references to reg_changes_mode. (init_reg_sets_1): Remove class_can_change_mode and reg_changes_mode code. (invalid_mode_change_p): New. (dump_regclass): Use invalid_mode_change_p instead of class_can_change_mode. (regclass): Same. (record_operand_costs): Do not set reg_changes_mode. * local-alloc.c (struct qty): Remove changes_mode field. (alloc_qty): Remove changes_mode initialization. (update_qty_class): Remove set of changes_mode. (find_free_reg): Use subregs_of_mode. * global.c (find_reg): Use subregs_of_mode info. * rtl.h (cannot_change_mode_set_regs): New prototype. (invalid_mode_change_p): Same. (REG_CANNOT_CHANGE_MODE_P): New macro. * flow.c (mark_used_regs): Calculate subregs_of_mode. Remove REG_CHANGES_MODE. (life_analysis): Clear subregs_of_mode. * combine.c (subst): Pass class to CLASS_CANNOT_CHANGE_MODE_P. Remove use of CLASS_CANNOT_CHANGE_MODE. (simplify_set): Same. (gen_lowpart_for_combine): Calculate subregs_of_mode. Remove REG_CHANGES_MODE. * regs.h: Add extern for subregs_of_mode; Include hard-reg-set and basic-block. (REG_CHANGES_MODE): Delete. From-SVN: r58794
2002-11-04 17:58:39 +01:00
&& REG_CANNOT_CHANGE_MODE_P
(REGNO (SUBREG_REG (in)), GET_MODE (SUBREG_REG (in)), inmode))
#endif
))
1992-02-28 11:23:25 +01:00
{
#ifdef LIMIT_RELOAD_CLASS
1992-02-28 11:23:25 +01:00
in_subreg_loc = inloc;
#endif
1992-02-28 11:23:25 +01:00
inloc = &SUBREG_REG (in);
in = *inloc;
#if ! defined (LOAD_EXTEND_OP) && ! defined (WORD_REGISTER_OPERATIONS)
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))
1992-02-28 11:23:25 +01:00
/* This is supposed to happen only for paradoxical subregs made by
combine.c. (SUBREG (MEM)) isn't supposed to occur other ways. */
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 (GET_MODE (in)) <= GET_MODE_SIZE (inmode));
#endif
1992-02-28 11:23:25 +01:00
inmode = GET_MODE (in);
}
/* Similar issue for (SUBREG:M1 (REG:M2 ...) ...) for a hard register R
where M1 is not valid for R if it was not handled by the code above.
Similar issue for (SUBREG constant ...) if it was not handled by the
code above. This can happen if SUBREG_BYTE != 0.
However, we must reload the inner reg *as well as* the subreg in
that case. */
if (in != 0 && reload_inner_reg_of_subreg (in, inmode, false))
{
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 (in)))
subreg_in_class
= find_valid_class (inmode, GET_MODE (SUBREG_REG (in)),
subreg_regno_offset (REGNO (SUBREG_REG (in)),
GET_MODE (SUBREG_REG (in)),
SUBREG_BYTE (in),
GET_MODE (in)),
REGNO (SUBREG_REG (in)));
else if (GET_CODE (SUBREG_REG (in)) == SYMBOL_REF)
subreg_in_class = find_valid_class_1 (inmode,
GET_MODE (SUBREG_REG (in)),
rclass);
/* This relies on the fact that emit_reload_insns outputs the
instructions for input reloads of type RELOAD_OTHER in the same
order as the reloads. Thus if the outer reload is also of type
RELOAD_OTHER, we are guaranteed that this inner reload will be
output before the outer reload. */
push_reload (SUBREG_REG (in), NULL_RTX, &SUBREG_REG (in), (rtx *) 0,
subreg_in_class, VOIDmode, VOIDmode, 0, 0, opnum, type);
dont_remove_subreg = 1;
}
1992-02-28 11:23:25 +01:00
/* Similarly for paradoxical and problematical SUBREGs on the output.
Note that there is no reason we need worry about the previous value
of SUBREG_REG (out); even if wider than out, storing in a subreg is
entitled to clobber it all (except in the case of a word mode subreg
or of a STRICT_LOW_PART, in that latter case the constraint should
label it input-output.) */
if (out != 0 && GET_CODE (out) == SUBREG
&& (subreg_lowpart_p (out) || strict_low)
hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. 2002-11-04 Aldy Hernandez <aldyh@redhat.com> * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. * config/rs6000/rs6000.h (CLASS_CANNOT_CHANGE_MODE_P): Remove. (CLASS_CANNOT_CHANGE_MODE): Remove. (CANNOT_CHANGE_MODE_CLASS): New. * config/alpha/alpha.h: Same. * config/ia64/ia64.h: Same. * config/mips/mips.h: Same. * config/s390/s390.h: Same. * config/sh/sh.h: Same. * config/pa/pa64-regs.h: Same. * config/sh/sh-protos.h (sh_cannot_change_mode_class): Add prototype. * config/sh/sh.c (sh_cannot_change_mode_class): New. * config/mips/mips-protos.h (mips_cannot_change_mode_class): Add prototype. * config/mips/mips.c (mips_cannot_change_mode_class): New. * doc/tm.texi (Register Classes): Remove CLASS_CANNOT_CHANGE_MODE and CLASS_CANNOT_CHANGE_MODE_P. Document CANNOT_CHANGE_MODE_CLASS. * reload.c (push_reload): Use CANNOT_CHANGE_MODE_CLASS. (push_reload): Same. * simplify-rtx.c (simplify_subreg): Same. * reload1.c (choose_reload_regs): Same. * recog.c (register_operand): Same. * regrename.c (mode_change_ok): Change to use new CANNOT_CHANGE_MODE_CLASS infrastructure. * regclass.c (cannot_change_mode_set_regs): New. Declare subregs_of_mode. (regclass): Use subregs_of_mode. Remove references to reg_changes_mode. (init_reg_sets_1): Remove class_can_change_mode and reg_changes_mode code. (invalid_mode_change_p): New. (dump_regclass): Use invalid_mode_change_p instead of class_can_change_mode. (regclass): Same. (record_operand_costs): Do not set reg_changes_mode. * local-alloc.c (struct qty): Remove changes_mode field. (alloc_qty): Remove changes_mode initialization. (update_qty_class): Remove set of changes_mode. (find_free_reg): Use subregs_of_mode. * global.c (find_reg): Use subregs_of_mode info. * rtl.h (cannot_change_mode_set_regs): New prototype. (invalid_mode_change_p): Same. (REG_CANNOT_CHANGE_MODE_P): New macro. * flow.c (mark_used_regs): Calculate subregs_of_mode. Remove REG_CHANGES_MODE. (life_analysis): Clear subregs_of_mode. * combine.c (subst): Pass class to CLASS_CANNOT_CHANGE_MODE_P. Remove use of CLASS_CANNOT_CHANGE_MODE. (simplify_set): Same. (gen_lowpart_for_combine): Calculate subregs_of_mode. Remove REG_CHANGES_MODE. * regs.h: Add extern for subregs_of_mode; Include hard-reg-set and basic-block. (REG_CHANGES_MODE): Delete. From-SVN: r58794
2002-11-04 17:58:39 +01:00
#ifdef CANNOT_CHANGE_MODE_CLASS
&& !CANNOT_CHANGE_MODE_CLASS (GET_MODE (SUBREG_REG (out)), outmode, rclass)
#endif
&& contains_reg_of_mode[(int) rclass][(int) GET_MODE (SUBREG_REG (out))]
&& (CONSTANT_P (SUBREG_REG (out))
1992-02-28 11:23:25 +01:00
|| strict_low
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 (out))
&& REGNO (SUBREG_REG (out)) >= FIRST_PSEUDO_REGISTER)
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 (out)))
&& ((GET_MODE_PRECISION (outmode)
> GET_MODE_PRECISION (GET_MODE (SUBREG_REG (out))))
#ifdef WORD_REGISTER_OPERATIONS
|| ((GET_MODE_PRECISION (outmode)
< GET_MODE_PRECISION (GET_MODE (SUBREG_REG (out))))
&& ((GET_MODE_SIZE (outmode) - 1) / UNITS_PER_WORD ==
((GET_MODE_SIZE (GET_MODE (SUBREG_REG (out))) - 1)
/ UNITS_PER_WORD)))
#endif
))
|| (REG_P (SUBREG_REG (out))
&& REGNO (SUBREG_REG (out)) < FIRST_PSEUDO_REGISTER
/* The case of a word mode subreg
is handled differently in the following statement. */
&& ! (GET_MODE_SIZE (outmode) <= UNITS_PER_WORD
&& (GET_MODE_SIZE (GET_MODE (SUBREG_REG (out)))
> UNITS_PER_WORD))
&& ! HARD_REGNO_MODE_OK (subreg_regno (out), outmode))
|| (secondary_reload_class (0, rclass, outmode, out) != NO_REGS
&& (secondary_reload_class (0, rclass, GET_MODE (SUBREG_REG (out)),
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
SUBREG_REG (out))
== NO_REGS))
hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. 2002-11-04 Aldy Hernandez <aldyh@redhat.com> * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. * config/rs6000/rs6000.h (CLASS_CANNOT_CHANGE_MODE_P): Remove. (CLASS_CANNOT_CHANGE_MODE): Remove. (CANNOT_CHANGE_MODE_CLASS): New. * config/alpha/alpha.h: Same. * config/ia64/ia64.h: Same. * config/mips/mips.h: Same. * config/s390/s390.h: Same. * config/sh/sh.h: Same. * config/pa/pa64-regs.h: Same. * config/sh/sh-protos.h (sh_cannot_change_mode_class): Add prototype. * config/sh/sh.c (sh_cannot_change_mode_class): New. * config/mips/mips-protos.h (mips_cannot_change_mode_class): Add prototype. * config/mips/mips.c (mips_cannot_change_mode_class): New. * doc/tm.texi (Register Classes): Remove CLASS_CANNOT_CHANGE_MODE and CLASS_CANNOT_CHANGE_MODE_P. Document CANNOT_CHANGE_MODE_CLASS. * reload.c (push_reload): Use CANNOT_CHANGE_MODE_CLASS. (push_reload): Same. * simplify-rtx.c (simplify_subreg): Same. * reload1.c (choose_reload_regs): Same. * recog.c (register_operand): Same. * regrename.c (mode_change_ok): Change to use new CANNOT_CHANGE_MODE_CLASS infrastructure. * regclass.c (cannot_change_mode_set_regs): New. Declare subregs_of_mode. (regclass): Use subregs_of_mode. Remove references to reg_changes_mode. (init_reg_sets_1): Remove class_can_change_mode and reg_changes_mode code. (invalid_mode_change_p): New. (dump_regclass): Use invalid_mode_change_p instead of class_can_change_mode. (regclass): Same. (record_operand_costs): Do not set reg_changes_mode. * local-alloc.c (struct qty): Remove changes_mode field. (alloc_qty): Remove changes_mode initialization. (update_qty_class): Remove set of changes_mode. (find_free_reg): Use subregs_of_mode. * global.c (find_reg): Use subregs_of_mode info. * rtl.h (cannot_change_mode_set_regs): New prototype. (invalid_mode_change_p): Same. (REG_CANNOT_CHANGE_MODE_P): New macro. * flow.c (mark_used_regs): Calculate subregs_of_mode. Remove REG_CHANGES_MODE. (life_analysis): Clear subregs_of_mode. * combine.c (subst): Pass class to CLASS_CANNOT_CHANGE_MODE_P. Remove use of CLASS_CANNOT_CHANGE_MODE. (simplify_set): Same. (gen_lowpart_for_combine): Calculate subregs_of_mode. Remove REG_CHANGES_MODE. * regs.h: Add extern for subregs_of_mode; Include hard-reg-set and basic-block. (REG_CHANGES_MODE): Delete. From-SVN: r58794
2002-11-04 17:58:39 +01:00
#ifdef CANNOT_CHANGE_MODE_CLASS
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 (out))
&& REGNO (SUBREG_REG (out)) < FIRST_PSEUDO_REGISTER
hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. 2002-11-04 Aldy Hernandez <aldyh@redhat.com> * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. * config/rs6000/rs6000.h (CLASS_CANNOT_CHANGE_MODE_P): Remove. (CLASS_CANNOT_CHANGE_MODE): Remove. (CANNOT_CHANGE_MODE_CLASS): New. * config/alpha/alpha.h: Same. * config/ia64/ia64.h: Same. * config/mips/mips.h: Same. * config/s390/s390.h: Same. * config/sh/sh.h: Same. * config/pa/pa64-regs.h: Same. * config/sh/sh-protos.h (sh_cannot_change_mode_class): Add prototype. * config/sh/sh.c (sh_cannot_change_mode_class): New. * config/mips/mips-protos.h (mips_cannot_change_mode_class): Add prototype. * config/mips/mips.c (mips_cannot_change_mode_class): New. * doc/tm.texi (Register Classes): Remove CLASS_CANNOT_CHANGE_MODE and CLASS_CANNOT_CHANGE_MODE_P. Document CANNOT_CHANGE_MODE_CLASS. * reload.c (push_reload): Use CANNOT_CHANGE_MODE_CLASS. (push_reload): Same. * simplify-rtx.c (simplify_subreg): Same. * reload1.c (choose_reload_regs): Same. * recog.c (register_operand): Same. * regrename.c (mode_change_ok): Change to use new CANNOT_CHANGE_MODE_CLASS infrastructure. * regclass.c (cannot_change_mode_set_regs): New. Declare subregs_of_mode. (regclass): Use subregs_of_mode. Remove references to reg_changes_mode. (init_reg_sets_1): Remove class_can_change_mode and reg_changes_mode code. (invalid_mode_change_p): New. (dump_regclass): Use invalid_mode_change_p instead of class_can_change_mode. (regclass): Same. (record_operand_costs): Do not set reg_changes_mode. * local-alloc.c (struct qty): Remove changes_mode field. (alloc_qty): Remove changes_mode initialization. (update_qty_class): Remove set of changes_mode. (find_free_reg): Use subregs_of_mode. * global.c (find_reg): Use subregs_of_mode info. * rtl.h (cannot_change_mode_set_regs): New prototype. (invalid_mode_change_p): Same. (REG_CANNOT_CHANGE_MODE_P): New macro. * flow.c (mark_used_regs): Calculate subregs_of_mode. Remove REG_CHANGES_MODE. (life_analysis): Clear subregs_of_mode. * combine.c (subst): Pass class to CLASS_CANNOT_CHANGE_MODE_P. Remove use of CLASS_CANNOT_CHANGE_MODE. (simplify_set): Same. (gen_lowpart_for_combine): Calculate subregs_of_mode. Remove REG_CHANGES_MODE. * regs.h: Add extern for subregs_of_mode; Include hard-reg-set and basic-block. (REG_CHANGES_MODE): Delete. From-SVN: r58794
2002-11-04 17:58:39 +01:00
&& REG_CANNOT_CHANGE_MODE_P (REGNO (SUBREG_REG (out)),
GET_MODE (SUBREG_REG (out)),
hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. 2002-11-04 Aldy Hernandez <aldyh@redhat.com> * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. * config/rs6000/rs6000.h (CLASS_CANNOT_CHANGE_MODE_P): Remove. (CLASS_CANNOT_CHANGE_MODE): Remove. (CANNOT_CHANGE_MODE_CLASS): New. * config/alpha/alpha.h: Same. * config/ia64/ia64.h: Same. * config/mips/mips.h: Same. * config/s390/s390.h: Same. * config/sh/sh.h: Same. * config/pa/pa64-regs.h: Same. * config/sh/sh-protos.h (sh_cannot_change_mode_class): Add prototype. * config/sh/sh.c (sh_cannot_change_mode_class): New. * config/mips/mips-protos.h (mips_cannot_change_mode_class): Add prototype. * config/mips/mips.c (mips_cannot_change_mode_class): New. * doc/tm.texi (Register Classes): Remove CLASS_CANNOT_CHANGE_MODE and CLASS_CANNOT_CHANGE_MODE_P. Document CANNOT_CHANGE_MODE_CLASS. * reload.c (push_reload): Use CANNOT_CHANGE_MODE_CLASS. (push_reload): Same. * simplify-rtx.c (simplify_subreg): Same. * reload1.c (choose_reload_regs): Same. * recog.c (register_operand): Same. * regrename.c (mode_change_ok): Change to use new CANNOT_CHANGE_MODE_CLASS infrastructure. * regclass.c (cannot_change_mode_set_regs): New. Declare subregs_of_mode. (regclass): Use subregs_of_mode. Remove references to reg_changes_mode. (init_reg_sets_1): Remove class_can_change_mode and reg_changes_mode code. (invalid_mode_change_p): New. (dump_regclass): Use invalid_mode_change_p instead of class_can_change_mode. (regclass): Same. (record_operand_costs): Do not set reg_changes_mode. * local-alloc.c (struct qty): Remove changes_mode field. (alloc_qty): Remove changes_mode initialization. (update_qty_class): Remove set of changes_mode. (find_free_reg): Use subregs_of_mode. * global.c (find_reg): Use subregs_of_mode info. * rtl.h (cannot_change_mode_set_regs): New prototype. (invalid_mode_change_p): Same. (REG_CANNOT_CHANGE_MODE_P): New macro. * flow.c (mark_used_regs): Calculate subregs_of_mode. Remove REG_CHANGES_MODE. (life_analysis): Clear subregs_of_mode. * combine.c (subst): Pass class to CLASS_CANNOT_CHANGE_MODE_P. Remove use of CLASS_CANNOT_CHANGE_MODE. (simplify_set): Same. (gen_lowpart_for_combine): Calculate subregs_of_mode. Remove REG_CHANGES_MODE. * regs.h: Add extern for subregs_of_mode; Include hard-reg-set and basic-block. (REG_CHANGES_MODE): Delete. From-SVN: r58794
2002-11-04 17:58:39 +01:00
outmode))
#endif
))
1992-02-28 11:23:25 +01:00
{
#ifdef LIMIT_RELOAD_CLASS
1992-02-28 11:23:25 +01:00
out_subreg_loc = outloc;
#endif
1992-02-28 11:23:25 +01:00
outloc = &SUBREG_REG (out);
out = *outloc;
#if ! defined (LOAD_EXTEND_OP) && ! defined (WORD_REGISTER_OPERATIONS)
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 (!MEM_P (out)
|| GET_MODE_SIZE (GET_MODE (out))
<= GET_MODE_SIZE (outmode));
#endif
1992-02-28 11:23:25 +01:00
outmode = GET_MODE (out);
}
/* Similar issue for (SUBREG:M1 (REG:M2 ...) ...) for a hard register R
where either M1 is not valid for R or M2 is wider than a word but we
only need one register to store an M2-sized quantity in R.
However, we must reload the inner reg *as well as* the subreg in
that case and the inner reg is an in-out reload. */
if (out != 0 && reload_inner_reg_of_subreg (out, outmode, true))
{
enum reg_class in_out_class
= find_valid_class (outmode, GET_MODE (SUBREG_REG (out)),
subreg_regno_offset (REGNO (SUBREG_REG (out)),
GET_MODE (SUBREG_REG (out)),
SUBREG_BYTE (out),
GET_MODE (out)),
REGNO (SUBREG_REG (out)));
/* This relies on the fact that emit_reload_insns outputs the
instructions for output reloads of type RELOAD_OTHER in reverse
order of the reloads. Thus if the outer reload is also of type
RELOAD_OTHER, we are guaranteed that this inner reload will be
output after the outer reload. */
push_reload (SUBREG_REG (out), SUBREG_REG (out), &SUBREG_REG (out),
&SUBREG_REG (out), in_out_class, VOIDmode, VOIDmode,
0, 0, opnum, RELOAD_OTHER);
dont_remove_subreg = 1;
}
1992-02-28 11:23:25 +01:00
/* If IN appears in OUT, we can't share any input-only reload for IN. */
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 (in != 0 && out != 0 && MEM_P (out)
&& (REG_P (in) || MEM_P (in) || GET_CODE (in) == PLUS)
&& reg_overlap_mentioned_for_reload_p (in, XEXP (out, 0)))
1992-02-28 11:23:25 +01:00
dont_share = 1;
/* If IN is a SUBREG of a hard register, make a new REG. This
simplifies some of the cases below. */
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 (in != 0 && GET_CODE (in) == SUBREG && REG_P (SUBREG_REG (in))
&& REGNO (SUBREG_REG (in)) < FIRST_PSEUDO_REGISTER
&& ! dont_remove_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
in = gen_rtx_REG (GET_MODE (in), subreg_regno (in));
/* Similarly for OUT. */
if (out != 0 && GET_CODE (out) == 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 (out))
&& REGNO (SUBREG_REG (out)) < FIRST_PSEUDO_REGISTER
&& ! dont_remove_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
out = gen_rtx_REG (GET_MODE (out), subreg_regno (out));
1992-02-28 11:23:25 +01:00
/* Narrow down the class of register wanted if that is
desirable on this machine for efficiency. */
{
reg_class_t preferred_class = rclass;
if (in != 0)
preferred_class = targetm.preferred_reload_class (in, rclass);
1992-02-28 11:23:25 +01:00
/* Output reloads may need analogous treatment, different in detail. */
if (out != 0)
preferred_class
= targetm.preferred_output_reload_class (out, preferred_class);
/* Discard what the target said if we cannot do it. */
if (preferred_class != NO_REGS
|| (optional && type == RELOAD_FOR_OUTPUT))
rclass = (enum reg_class) preferred_class;
}
1992-02-28 11:23:25 +01:00
/* Make sure we use a class that can handle the actual pseudo
inside any subreg. For example, on the 386, QImode regs
can appear within SImode subregs. Although GENERAL_REGS
can handle SImode, QImode needs a smaller class. */
#ifdef LIMIT_RELOAD_CLASS
if (in_subreg_loc)
rclass = LIMIT_RELOAD_CLASS (inmode, rclass);
1992-02-28 11:23:25 +01:00
else if (in != 0 && GET_CODE (in) == SUBREG)
rclass = LIMIT_RELOAD_CLASS (GET_MODE (SUBREG_REG (in)), rclass);
1992-02-28 11:23:25 +01:00
if (out_subreg_loc)
rclass = LIMIT_RELOAD_CLASS (outmode, rclass);
1992-02-28 11:23:25 +01:00
if (out != 0 && GET_CODE (out) == SUBREG)
rclass = LIMIT_RELOAD_CLASS (GET_MODE (SUBREG_REG (out)), rclass);
1992-02-28 11:23:25 +01:00
#endif
/* Verify that this class is at least possible for the mode that
is specified. */
if (this_insn_is_asm)
{
enum machine_mode mode;
if (GET_MODE_SIZE (inmode) > GET_MODE_SIZE (outmode))
mode = inmode;
else
mode = outmode;
if (mode == VOIDmode)
{
error_for_asm (this_insn, "cannot reload integer constant "
"operand in %<asm%>");
mode = word_mode;
if (in != 0)
inmode = word_mode;
if (out != 0)
outmode = word_mode;
}
1992-02-28 11:23:25 +01:00
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
if (HARD_REGNO_MODE_OK (i, mode)
&& in_hard_reg_set_p (reg_class_contents[(int) rclass], mode, i))
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
break;
1992-02-28 11:23:25 +01:00
if (i == FIRST_PSEUDO_REGISTER)
{
error_for_asm (this_insn, "impossible register constraint "
"in %<asm%>");
/* Avoid further trouble with this insn. */
PATTERN (this_insn) = gen_rtx_USE (VOIDmode, const0_rtx);
/* We used to continue here setting class to ALL_REGS, but it triggers
sanity check on i386 for:
void foo(long double d)
{
asm("" :: "a" (d));
}
Returning zero here ought to be safe as we take care in
find_reloads to not process the reloads when instruction was
replaced by USE. */
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
return 0;
1992-02-28 11:23:25 +01:00
}
}
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
/* Optional output reloads are always OK even if we have no register class,
since the function of these reloads is only to have spill_reg_store etc.
set, so that the storing insn can be deleted later. */
gcc_assert (rclass != NO_REGS
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
|| (optional != 0 && type == RELOAD_FOR_OUTPUT));
i = find_reusable_reload (&in, out, rclass, type, opnum, dont_share);
1992-02-28 11:23:25 +01:00
if (i == n_reloads)
{
/* See if we need a secondary reload register to move between CLASS
and IN or CLASS and OUT. Get the icode and push any required reloads
needed for each of them if so. */
1992-02-28 11:23:25 +01:00
if (in != 0)
secondary_in_reload
= push_secondary_reload (1, in, opnum, optional, rclass, inmode, type,
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
&secondary_in_icode, NULL);
1992-02-28 11:23:25 +01:00
if (out != 0 && GET_CODE (out) != SCRATCH)
secondary_out_reload
= push_secondary_reload (0, out, opnum, optional, rclass, outmode,
re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391) PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24 19:55:53 +01:00
type, &secondary_out_icode, NULL);
1992-02-28 11:23:25 +01:00
/* We found no existing reload suitable for re-use.
So add an additional reload. */
#ifdef SECONDARY_MEMORY_NEEDED
if (subreg_in_class == NO_REGS
&& in != 0
&& (REG_P (in)
|| (GET_CODE (in) == SUBREG && REG_P (SUBREG_REG (in))))
&& reg_or_subregno (in) < FIRST_PSEUDO_REGISTER)
subreg_in_class = REGNO_REG_CLASS (reg_or_subregno (in));
/* If a memory location is needed for the copy, make one. */
if (subreg_in_class != NO_REGS
&& SECONDARY_MEMORY_NEEDED (subreg_in_class, rclass, inmode))
get_secondary_mem (in, inmode, opnum, type);
#endif
i = n_reloads;
rld[i].in = in;
rld[i].out = out;
rld[i].rclass = rclass;
rld[i].inmode = inmode;
rld[i].outmode = outmode;
rld[i].reg_rtx = 0;
rld[i].optional = optional;
rld[i].inc = 0;
rld[i].nocombine = 0;
rld[i].in_reg = inloc ? *inloc : 0;
rld[i].out_reg = outloc ? *outloc : 0;
rld[i].opnum = opnum;
rld[i].when_needed = type;
rld[i].secondary_in_reload = secondary_in_reload;
rld[i].secondary_out_reload = secondary_out_reload;
rld[i].secondary_in_icode = secondary_in_icode;
rld[i].secondary_out_icode = secondary_out_icode;
rld[i].secondary_p = 0;
1992-02-28 11:23:25 +01:00
n_reloads++;
#ifdef SECONDARY_MEMORY_NEEDED
if (out != 0
&& (REG_P (out)
|| (GET_CODE (out) == SUBREG && REG_P (SUBREG_REG (out))))
&& reg_or_subregno (out) < FIRST_PSEUDO_REGISTER
&& SECONDARY_MEMORY_NEEDED (rclass,
REGNO_REG_CLASS (reg_or_subregno (out)),
outmode))
get_secondary_mem (out, outmode, opnum, type);
#endif
1992-02-28 11:23:25 +01:00
}
else
{
/* We are reusing an existing reload,
but we may have additional information for it.
For example, we may now have both IN and OUT
while the old one may have just one of them. */
/* The modes can be different. If they are, we want to reload in
the larger mode, so that the value is valid for both modes. */
if (inmode != VOIDmode
&& GET_MODE_SIZE (inmode) > GET_MODE_SIZE (rld[i].inmode))
rld[i].inmode = inmode;
if (outmode != VOIDmode
&& GET_MODE_SIZE (outmode) > GET_MODE_SIZE (rld[i].outmode))
rld[i].outmode = outmode;
1992-02-28 11:23:25 +01:00
if (in != 0)
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
{
rtx in_reg = inloc ? *inloc : 0;
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
/* If we merge reloads for two distinct rtl expressions that
are identical in content, there might be duplicate address
reloads. Remove the extra set now, so that if we later find
that we can inherit this reload, we can get rid of the
address reloads altogether.
Do not do this if both reloads are optional since the result
would be an optional reload which could potentially leave
unresolved address replacements.
It is not sufficient to call transfer_replacements since
choose_reload_regs will remove the replacements for address
reloads of inherited reloads which results in the same
problem. */
if (rld[i].in != in && rtx_equal_p (in, rld[i].in)
&& ! (rld[i].optional && optional))
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
{
/* We must keep the address reload with the lower operand
number alive. */
if (opnum > rld[i].opnum)
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
{
remove_address_replacements (in);
in = rld[i].in;
in_reg = rld[i].in_reg;
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
}
else
remove_address_replacements (rld[i].in);
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
}
/* When emitting reloads we don't necessarily look at the in-
and outmode, but also directly at the operands (in and out).
So we can't simply overwrite them with whatever we have found
for this (to-be-merged) reload, we have to "merge" that too.
Reusing another reload already verified that we deal with the
same operands, just possibly in different modes. So we
overwrite the operands only when the new mode is larger.
See also PR33613. */
if (!rld[i].in
|| GET_MODE_SIZE (GET_MODE (in))
> GET_MODE_SIZE (GET_MODE (rld[i].in)))
rld[i].in = in;
if (!rld[i].in_reg
|| (in_reg
&& GET_MODE_SIZE (GET_MODE (in_reg))
> GET_MODE_SIZE (GET_MODE (rld[i].in_reg))))
rld[i].in_reg = in_reg;
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
}
1992-02-28 11:23:25 +01:00
if (out != 0)
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
{
if (!rld[i].out
|| (out
&& GET_MODE_SIZE (GET_MODE (out))
> GET_MODE_SIZE (GET_MODE (rld[i].out))))
rld[i].out = out;
if (outloc
&& (!rld[i].out_reg
|| GET_MODE_SIZE (GET_MODE (*outloc))
> GET_MODE_SIZE (GET_MODE (rld[i].out_reg))))
rld[i].out_reg = *outloc;
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
}
if (reg_class_subset_p (rclass, rld[i].rclass))
rld[i].rclass = rclass;
rld[i].optional &= optional;
if (MERGE_TO_OTHER (type, rld[i].when_needed,
opnum, rld[i].opnum))
rld[i].when_needed = RELOAD_OTHER;
rld[i].opnum = MIN (rld[i].opnum, opnum);
1992-02-28 11:23:25 +01:00
}
/* If the ostensible rtx being reloaded differs from the rtx found
1992-02-28 11:23:25 +01:00
in the location to substitute, this reload is not safe to combine
because we cannot reliably tell whether it appears in the insn. */
if (in != 0 && in != *inloc)
rld[i].nocombine = 1;
1992-02-28 11:23:25 +01:00
#if 0
/* This was replaced by changes in find_reloads_address_1 and the new
function inc_for_reload, which go with a new meaning of reload_inc. */
/* If this is an IN/OUT reload in an insn that sets the CC,
it must be for an autoincrement. It doesn't work to store
the incremented value after the insn because that would clobber the CC.
So we must do the increment of the value reloaded from,
increment it, store it back, then decrement again. */
if (out != 0 && sets_cc0_p (PATTERN (this_insn)))
{
out = 0;
rld[i].out = 0;
rld[i].inc = find_inc_amount (PATTERN (this_insn), in);
1992-02-28 11:23:25 +01:00
/* If we did not find a nonzero amount-to-increment-by,
that contradicts the belief that IN is being incremented
in an address in this insn. */
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 (rld[i].inc != 0);
1992-02-28 11:23:25 +01:00
}
#endif
/* If we will replace IN and OUT with the reload-reg,
record where they are located so that substitution need
not do a tree walk. */
if (replace_reloads)
{
if (inloc != 0)
{
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
struct replacement *r = &replacements[n_replacements++];
1992-02-28 11:23:25 +01:00
r->what = i;
r->where = inloc;
r->mode = inmode;
}
if (outloc != 0 && outloc != inloc)
{
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
struct replacement *r = &replacements[n_replacements++];
1992-02-28 11:23:25 +01:00
r->what = i;
r->where = outloc;
r->mode = outmode;
}
}
/* If this reload is just being introduced and it has both
an incoming quantity and an outgoing quantity that are
supposed to be made to match, see if either one of the two
can serve as the place to reload into.
If one of them is acceptable, set rld[i].reg_rtx
1992-02-28 11:23:25 +01:00
to that one. */
if (in != 0 && out != 0 && in != out && rld[i].reg_rtx == 0)
1992-02-28 11:23:25 +01:00
{
rld[i].reg_rtx = find_dummy_reload (in, out, inloc, outloc,
inmode, outmode,
rld[i].rclass, i,
earlyclobber_operand_p (out));
1992-02-28 11:23:25 +01:00
/* If the outgoing register already contains the same value
as the incoming one, we can dispense with loading it.
The easiest way to tell the caller that is to give a phony
value for the incoming operand (same as outgoing one). */
if (rld[i].reg_rtx == out
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 (in) || CONSTANT_P (in))
Fix enum conversions which are invalid in C++: gcc/: Fix enum conversions which are invalid in C++: * auto-inc-dec.c (attempt_change): Change 0 to SET in function call. * calls.c (store_one_arg): Change 0 to EXPAND_NORMAL in function call. * cse.c (hash_rtx_cb): Change 0 to VOIDmode in function call. * dbgcnt.c (dbg_cnt_set_limit_by_name): Add cast to enum type. * dbxout.c (dbxout_symbol): Change 0 to VOIDmode in function call. (dbxout_parms): Likewise. * df-core.c (df_set_flags): Change changeable_flags parameter to int. (df_clear_flags): Likewise. * df-problems.c (df_rd_bb_local_compute_process_def): Change top_flag parameter to int. (df_chain_create_bb_process_use): Likewise. (df_chain_add_problem): Change chain_flags parameter to unsigned int. Remove cast. * df-scan.c (df_ref_create): Change ref_flags parameter to int. (df_ref_create_structure, df_def_record_1): Likewise. (df_defs_record, df_uses_record, df_get_call_refs): Likewise. (df_notes_rescan): Change 0 to VOIDmode in function call. (df_get_call_refs, df_insn_refs_collect): Likewise. (df_bb_regs_collect): Likewise. (df_entry_block_defs_collect): Likewise. (df_exit_block_uses_collect): Likewise. * df.h: Update declarations. * double-int.c (double_int_divmod): Add cast to enum type. * dse.c (replace_inc_dec): Reverse parameters to gen_int_mode. * dwarf2out.c (new_reg_loc_descr): Add casts to enum type. (based_loc_descr): Likewise. (loc_descriptor_from_tree_1): Change first_op and second_op to enum dwarf_location_atom. Add cast to enum type. * expmed.c (init_expmed): Change 0 to SET in function call. * expr.c (init_expr_target): Change 0 to VOIDmode in function call. (expand_expr_real_1): Change 0 to EXPAND_NORMAL in function call. (do_store_flag): Likewise. * fixed-value.h (struct fixed_value): Change mode to enum machine_mode. * function.c (assign_parms): Change 0 to VOIDmode in function call. * genautomata.c (insert_automaton_decl): Change 1 to INSERT in function call. (insert_insn_decl, insert_decl, insert_state): Likewise. (automata_list_finish): Likewise. * genrecog.c (process_define_predicate): Add cast to enum type. * gensupport.c (init_predicate_table): Add cast to enum type. * gimple.c (gimple_build_return): Change 0 to ERROR_MARK in function call. (gimple_build_call_1, gimple_build_label): Likewise. (gimple_build_goto, gimple_build_asm_1): Likewise. (gimple_build_switch_1, gimple_build_cdt): Likewise. * gimple.h (GIMPLE_CHECK): Change 0 to ERROR_MARK in function call. (enum fallback): Rename from enum fallback_t. (fallback_t): Typedef as int. * gimple-low.c (lower_builtin_setjmp): Change TSI_SAME_STMT to GSI_SAME_STMT in function call. * ira.c (setup_class_subset_and_memory_move_costs): Add casts to enum type. (setup_reg_class_relations): Likewise. (setup_reg_class_nregs): Change cl to int. Add casts to enum type. (setup_prohibited_class_mode_regs): Add cast to enum type. (setup_prohibited_mode_move_regs): Likewise. * ira-costs.c (record_reg_classes): Change rclass to enum reg_class. (record_address_regs): Change i to enum reg_class. * lists.c (alloc_EXPR_LIST): Add cast to enum type. * machmode.h (GET_MODE_CLASS): Cast value to enum mode_class. (GET_MODE_WIDER_MODE): Cast value to enum machine_mode. (GET_MODE_2XWIDER_MODE): Likewise. (GET_CLASS_NARROWEST_MODE): Likewise. * omp-low.c (expand_omp_for): Add cast to enum type. * optabs.c (debug_optab_libfuncs): Add casts to enum type. * opts.c (enable_warning_as_error): Change kind to diagostic_t. * postreload.c (reload_cse_simplify_operands): Change rclass local to enum reg_class. * predict.c (combine_predictions_for_insn): Change best_predictor and predictor to enum br_predictor. (combine_predictions_for_bb): Likewise. (build_predict_expr): Change assignment to PREDICT_EXPR_OUTCOME to use SET_PREDICT_EXPR_OUTCOME. * real.c (real_arithmetic): Change icode to code in function call. * reginfo.c (init_move_cost): Add casts to enum type. (init_reg_sets_1, init_fake_stack_mems): Likewise. * regmove.c (regclass_compatible_p): Change class0 and class1 to enum reg_class. * reload.c (find_valid_class): Add casts to enum type. (push_reload): Change 0 to NO_REGS in function call. (find_reloads): Change this_alternative to array of enum reg_class. Remove some now-unnecessary casts. (make_memloc): Change 0 to VOIDmode in function call. * reload1.c (reload): Change 0 to VOIDmode in function call. (eliminate_regs_1, elimination_effects): Likewise. (eliminate_regs_in_insn): Likewise. (emit_input_reload_insns): Add cast to enum type. (delete_output_reload): Change 0 to VOIDmode in function call. * reorg.c (insn_sets_resource_p): Convert include_delayed_effects to enum type in function call. * tree.h (PREDICT_EXPR_OUTCOME): Add cast to enum type. (SET_PREDICT_EXPR_OUTCOME): Define. * tree-dump.c (get_dump_file_info): Change phase parameter to int. (get_dump_file_name, dump_begin, dump_enabled_p): Likewise. (dump_initialized_p, dump_flag_name, dump_end): Likewise. (dump_function): Likewise. * tree-dump.h: Update declarations. * tree-pass.h: Update declarations. * varasm.c (assemble_integer): Change mclass to enum mode_class. * config/arm/arm.c (thumb_legitimize_reload_address): Add cast to enum type. (arm_rtx_costs_1): Correct parenthesization. (arm_rtx_costs): Add casts to enum type. (adjacent_mem_locations): Reverse arguments to const_ok_for_op. (vfp_emit_fstmd): Use add_rg_note. (emit_multi_reg_push, emit_sfm): Likewise. (thumb_set_frame_pointer): Likewise. (arm_expand_prologue): Likewise. (arm_regno_class): Change return type to enum reg_class. (thumb1_expand_prologue): Use add_reg_note. * config/arm/arm-protos.h (arm_regno_class): Update declaration. * config/arm/arm.h (INITIALIZE_TRAMPOLINE): Change 0 to LCT_NORMAL in function call. * config/arm/gentune.sh: Add cast to enum type. * config/arm/arm-tune.md: Rebuild. * config/i386/i386.c (ix86_expand_prologue): Use add_reg_note. (ix86_split_fp_branch, predict_jump): Likewise. (ix86_expand_multi_arg_builtin): Change sub_code from enum insn_code to enum rtx_code. (ix86_builtin_vectorized_function): Add cast to enum type. * config/i386/i386.md (truncdfsf2): Change slot to enum ix86_stack_slot. (truncxf<mode>2, isinf<mode>2): Likewise. * config/i386/i386-c.c (ix86_pragma_target_parse): Add cast to enum type. * config/ia64/ia64.c (ia64_split_tmode_move): Use add_reg_note. (spill_restore_mem, do_spill, ia64_expand_prologue): Likewise. (insert_bundle_state): Change 1 to INSERT in function call. (ia64_add_bundle_selector_before): Likewise. * config/ia64/ia64.md (cpu attr): Add cast to enum type. (save_stack_nonlocal): Change 0 to LCT_NORMAL in function call. (restore_stack_nonlocal): Likewise. * config/mips/mips.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL in function call. * config/mips/mips.c (mips_binary_cost): Change 0 to SET in function call. (mips_rtx_costs): Likewise. (mips_override_options): Add casts to enum type. * config/mips/sdemtk.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL in function call. * config/pa/pa.c (legitimize_pic_address): Use add_reg_note. (store_reg, set_reg_plus_d): Likewise. (hppa_expand_prologue, hppa_profile_hook): Likewise. * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Add cast to enum type. (altivec_expand_vec_set_builtin): Change 0 to EXPAND_NORMAL in function call. (emit_unlikely_jump): Use add_reg_note. (rs6000_emit_allocate_stack): Likewise. (rs6000_frame_related, rs6000_emit_prologue): Likewise. (output_toc): Change 1 to INSERT in function call. (output_profile_hook): Change 0 to LCT_NORMAL in function call. (rs6000_initialize_trampoline): Likewise. (rs6000_init_dwarf_reg_sizes_extra): Change 0 to EXPAND_NORMAL in function call. * config/s390/s390.c (s390_rtx_costs): Add cast to enum type. (s390_expand_movmem): Change 0 to OPTAB_DIRECT in function call. (s390_expand_setmem, s390_expand_cmpmem): Likewise. (save_gprs): Use add_reg_note. (s390_emit_prologue): Likewise. (s390_expand_builtin): Change 0 to EXPAND_NORMAL in function call. * config/sparc/sparc.c (sparc_expand_prologue): Use add_reg_note. (sparc_fold_builtin): Add cast to enum type. * config/spu/spu.c (spu_emit_branch_or_set): Change ior_code to enum insn_code. (spu_expand_prologue): Use add_reg_note. (expand_builtin_args): Change 0 to EXPAND_NORMAL in function call. * c-parser.c (c_parser_attributes): Change VEC back to tree list. (c_parser_postfix_expression_after_primary): Get VEC for list of arguments. Get original types of arguments. Call build_function_call_vec. (cached_expr_list_1, cached_expr_list_2): New static variables. (c_parser_expr_list): Change return type to VEC *. Add p_orig_types parameter. Change all callers. (c_parser_release_expr): New static function. (c_parser_vec_to_tree_list): New static function. * c-typeck.c (build_function_call): Rewrite to build a VEC and call build_function_call_vec. (build_function_call_vec): New function, based on old build_function_call. (convert_arguments): Remove nargs and argarray parameters. Change values to a VEC. Add origtypes parameter. (build_modify_expr): Add rhs_origtype parameter. Change all callers. (convert_for_assignment): Add origtype parameter. Change all callers. If warn_cxx_compat, check for conversion to an enum type when calling a function. (store_init_value): Add origtype parameter. Change all callers. (digest_init): Likewise. (struct init_node): Add origtype field. (add_pending_init): Add origtype parameter. Change all callers. (output_init_element): Likewise. (output_pending_init_elements): Pass origtype from init_node to output_init_element. (process_init_elemnt): Pass origtype from c_expr to output_init_element. (c_finish_return): Add origtype parameter. Change all callers. * c-common.c (sync_resolve_size): Change params to VEC *. Change caller. (sync_resolve_params): Likewise. (sync_resolve_return): Change params to first_param. Change caller. (resolve_overloaded_builtins): Change params to VEC *. Change callers. Save first parameter around call to build_function_call_vec. * c-decl.c (finish_decl): Add origtype parameter. Change all callers. Call build_function_call_vec rather than build_function_call for cleanup. * c-tree.h: Update declarations. * c-common.h: Update declarations. * stub-objc.c (objc_rewrite_function_call): Change parameter from params to first_param. * target.h (struct gcc_target): Change resolve_overloaded_builtin params parameter from tree to void *. * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Change arglist parameter to have type void *, and to be a pointer to a VEC. * config/rs6000/rs6000-protos.h (altivec_resolve_overloaded_builtin): Update declaration. * config/spu/spu-c.c (spu_resolved_overloaded_builtin): Change fnargs parameter to have type void *, and to be a pointer to a VEC. Call build_function_call_vec instead of build_function_call. * config/spu/spu-protos.h (spu_expand_builtin): Update declaration. gcc/cp/: * typeck.c (build_function_call_vec): New function. (cp_build_function_call): Only pass first parameter to objc_rewrite_function_call. (build_modify_expr): Add rhs_origtype parameter. Change all callers. * decl.c (finish_decl): Add origtype parameter. Change all callers. * semantics.c (finish_call_expr): Pass VEC to resolve_overloaded_builtin. gcc/objc: * objc-act.c (objc_rewrite_function_call): Change parameter from params to first_param. Change all callers. gcc/testsuite: * gcc.dg/Wcxx-compat-3.c: New testcase. From-SVN: r146451
2009-04-20 21:35:00 +02:00
&& 0 != find_equiv_reg (in, this_insn, NO_REGS, REGNO (out),
1992-02-28 11:23:25 +01:00
static_reload_reg_p, i, inmode))
rld[i].in = out;
1992-02-28 11:23:25 +01:00
}
/* If this is an input reload and the operand contains a register that
dies in this insn and is used nowhere else, see if it is the right class
to be used for this reload. Use it if so. (This occurs most commonly
in the case of paradoxical SUBREGs and in-out reloads). We cannot do
this if it is also an output reload that mentions the register unless
the output is a SUBREG that clobbers an entire register.
Note that the operand might be one of the spill regs, if it is a
pseudo reg and we are in a block where spilling has not taken place.
But if there is no spilling in this block, that is OK.
An explicitly used hard reg cannot be a spill reg. */
if (rld[i].reg_rtx == 0 && in != 0 && hard_regs_live_known)
1992-02-28 11:23:25 +01:00
{
rtx note;
int regno;
enum machine_mode rel_mode = inmode;
if (out && GET_MODE_SIZE (outmode) > GET_MODE_SIZE (inmode))
rel_mode = outmode;
1992-02-28 11:23:25 +01:00
for (note = REG_NOTES (this_insn); note; note = XEXP (note, 1))
if (REG_NOTE_KIND (note) == REG_DEAD
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 (note, 0))
1992-02-28 11:23:25 +01:00
&& (regno = REGNO (XEXP (note, 0))) < FIRST_PSEUDO_REGISTER
&& reg_mentioned_p (XEXP (note, 0), in)
/* Check that a former pseudo is valid; see find_dummy_reload. */
&& (ORIGINAL_REGNO (XEXP (note, 0)) < FIRST_PSEUDO_REGISTER
Eliminate ENTRY_BLOCK_PTR and EXIT_BLOCK_PTR macros gcc/ * basic-block.h (ENTRY_BLOCK_PTR_FOR_FUNCTION): Rename macro to... (EXIT_BLOCK_PTR_FOR_FUNCTION): ...this. (ENTRY_BLOCK_PTR_FOR_FN): Renamed macro to... (EXIT_BLOCK_PTR_FOR_FN): ...this. (ENTRY_BLOCK_PTR): Eliminate macro as work towards making uses of cfun be explicit. (EXIT_BLOCK_PTR): Likewise. (FOR_ALL_BB): Rework for now to eliminate use of "ENTRY_BLOCK_PTR". (FOR_ALL_BB_FN): Update for renaming of "ENTRY_BLOCK_PTR_FOR_FUNCTION" to "ENTRY_BLOCK_PTR_FOR_FN". * cfg.c (init_flow): Likewise. (check_bb_profile): Likewise. * cfganal.c (pre_and_rev_post_order_compute_fn): Likewise. * cfgcleanup.c (walk_to_nondebug_insn): Likewise. * cfghooks.c (account_profile_record): Likewise. * cfgloop.c (init_loops_structure): Likewise. * cgraphbuild.c (record_eh_tables): Likewise. (compute_call_stmt_bb_frequency): Likewise. * ipa-inline-analysis.c (compute_bb_predicates): Likewise. * lto-streamer-in.c (input_cfg): Likewise. * predict.c (maybe_hot_frequency_p): Likewise. * tree-cfg.c (init_empty_tree_cfg_for_function): Likewise. * tree-inline.c (initialize_cfun): Likewise. (copy_cfg_body): Likewise. (copy_body): Likewise. (tree_function_versioning): Likewise. * bb-reorder.c (add_labels_and_missing_jumps): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (duplicate_computed_gotos): Remove usage of EXIT_BLOCK_PTR macro. (find_rarely_executed_basic_blocks_and_crossing_edges): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (connect_traces): Likewise. (rest_of_handle_reorder_blocks): Remove usage of EXIT_BLOCK_PTR macro. (bb_to_key): Remove usage of ENTRY_BLOCK_PTR macro. (fix_crossing_conditional_branches): Remove usage of EXIT_BLOCK_PTR macro. (find_traces_1_round): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (fix_up_fall_thru_edges): Remove usage of EXIT_BLOCK_PTR macro. (find_traces): Remove usage of ENTRY_BLOCK_PTR macro. (fix_up_crossing_landing_pad): Remove usage of EXIT_BLOCK_PTR macro. (rotate_loop): Likewise. * bt-load.c (migrate_btr_def): Remove usage of ENTRY_BLOCK_PTR macro. * cfg.c (clear_aux_for_edges): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (alloc_aux_for_edges): Likewise. (clear_bb_flags): Remove usage of ENTRY_BLOCK_PTR macro. (cached_make_edge): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (compact_blocks): Likewise. (clear_edges): Likewise. * cfganal.c (single_pred_before_succ_order): Remove usage of ENTRY_BLOCK_PTR macro. (bitmap_union_of_succs): Remove usage of EXIT_BLOCK_PTR macro. (bitmap_union_of_preds): Remove usage of ENTRY_BLOCK_PTR macro. (bitmap_intersection_of_succs): Remove usage of EXIT_BLOCK_PTR macro. (bitmap_intersection_of_preds): Remove usage of ENTRY_BLOCK_PTR macro. (inverted_post_order_compute): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (compute_dominance_frontiers_1): Remove usage of ENTRY_BLOCK_PTR macro. (post_order_compute): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (connect_infinite_loops_to_exit): Remove usage of EXIT_BLOCK_PTR macro. (remove_fake_edges): Remove usage of ENTRY_BLOCK_PTR macro. (add_noreturn_fake_exit_edges): Remove usage of EXIT_BLOCK_PTR macro. (find_pdom): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (remove_fake_exit_edges): Remove usage of EXIT_BLOCK_PTR macro. (verify_edge_list): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (print_edge_list): Likewise. (create_edge_list): Likewise. (find_unreachable_blocks): Remove usage of ENTRY_BLOCK_PTR macro. (mark_dfs_back_edges): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * cfgbuild.c (find_bb_boundaries): Remove usage of ENTRY_BLOCK_PTR macro. (find_many_sub_basic_blocks): Remove usage of EXIT_BLOCK_PTR macro. (make_edges): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * cfgcleanup.c (delete_unreachable_blocks): Likewise. (try_optimize_cfg): Likewise. (try_head_merge_bb): Remove usage of EXIT_BLOCK_PTR macro. (try_crossjump_to_edge): Remove usage of ENTRY_BLOCK_PTR macro. (try_crossjump_bb): Remove usage of EXIT_BLOCK_PTR macro. (merge_blocks_move): Remove usage of ENTRY_BLOCK_PTR macro. (outgoing_edges_match): Remove usage of EXIT_BLOCK_PTR macro. (try_forward_edges): Likewise. (try_simplify_condjump): Likewise. * cfgexpand.c (gimple_expand_cfg): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (construct_exit_block): Remove usage of EXIT_BLOCK_PTR macro. (construct_init_block): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (expand_gimple_basic_block): Remove usage of EXIT_BLOCK_PTR macro. (expand_gimple_tailcall): Likewise. * cfghooks.c (can_duplicate_block_p): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (tidy_fallthru_edges): Likewise. (verify_flow_info): Likewise. * cfgloop.c (flow_bb_inside_loop_p): Likewise. (num_loop_branches): Remove usage of EXIT_BLOCK_PTR macro. (disambiguate_multiple_latches): Remove usage of ENTRY_BLOCK_PTR macro. (get_loop_exit_edges): Remove usage of EXIT_BLOCK_PTR macro. (bb_loop_header_p): Remove usage of ENTRY_BLOCK_PTR macro. (get_loop_body_in_bfs_order): Remove usage of EXIT_BLOCK_PTR macro. (get_loop_body_in_dom_order): Likewise. (get_loop_body): Likewise. * cfgloopanal.c (mark_irreducible_loops): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * cfgloopmanip.c (create_preheader): Remove usage of ENTRY_BLOCK_PTR macro. (remove_path): Remove usage of EXIT_BLOCK_PTR macro. (fix_bb_placement): Likewise. * cfgrtl.c (rtl_block_empty_p): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (rtl_can_remove_branch_p): Remove usage of EXIT_BLOCK_PTR macro. (cfg_layout_split_edge): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (rtl_flow_call_edges_add): Remove usage of EXIT_BLOCK_PTR macro. (cfg_layout_can_merge_blocks_p): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (cfg_layout_redirect_edge_and_branch): Remove usage of ENTRY_BLOCK_PTR macro. (fixup_fallthru_exit_predecessor): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (fixup_reorder_chain): Likewise. (relink_block_chain): Likewise. (cfg_layout_delete_block): Remove usage of EXIT_BLOCK_PTR macro. (rtl_verify_bb_layout): Remove usage of ENTRY_BLOCK_PTR macro. (cfg_layout_duplicate_bb): Remove usage of EXIT_BLOCK_PTR macro. (force_one_exit_fallthru): Likewise. (rtl_verify_fallthru): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (rtl_verify_edges): Likewise. (commit_edge_insertions): Likewise. (commit_one_edge_insertion): Likewise. (rtl_split_edge): Likewise. (force_nonfallthru_and_redirect): Likewise. (outof_cfg_layout_mode): Remove usage of EXIT_BLOCK_PTR macro. (skip_insns_after_block): Likewise. (fixup_partition_crossing): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (purge_dead_edges): Remove usage of EXIT_BLOCK_PTR macro. (rtl_can_merge_blocks): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (contains_no_active_insn_p): Likewise. (emit_insn_at_entry): Remove usage of ENTRY_BLOCK_PTR macro. (entry_of_function): Likewise. (last_bb_in_partition): Remove usage of EXIT_BLOCK_PTR macro. (fixup_new_cold_bb): Likewise. (patch_jump_insn): Likewise. (try_redirect_by_replacing_jump): Likewise. (block_label): Likewise. (could_fall_through): Likewise. (can_fallthru): Likewise. * cgraphbuild.c (cgraph_rebuild_references): Remove usage of ENTRY_BLOCK_PTR macro. (rebuild_cgraph_edges): Likewise. * cgraphunit.c (init_lowered_empty_function): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (expand_thunk): Remove usage of EXIT_BLOCK_PTR macro. * combine.c (get_last_value): Remove usage of ENTRY_BLOCK_PTR macro. (distribute_links): Remove usage of EXIT_BLOCK_PTR macro. (get_last_value_validate): Remove usage of ENTRY_BLOCK_PTR macro. (try_combine): Remove usage of EXIT_BLOCK_PTR macro. (reg_num_sign_bit_copies_for_combine): Remove usage of ENTRY_BLOCK_PTR macro. (reg_nonzero_bits_for_combine): Likewise. (set_nonzero_bits_and_sign_copies): Likewise. (combine_instructions): Likewise. * cprop.c (one_cprop_pass): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (bypass_conditional_jumps): Likewise. (bypass_block): Remove usage of EXIT_BLOCK_PTR macro. (find_implicit_sets): Likewise. (cprop_jump): Likewise. * cse.c (cse_cc_succs): Likewise. (cse_find_path): Likewise. * df-problems.c (df_lr_confluence_0): Likewise. * df-scan.c (df_entry_block_defs_collect): Remove usage of ENTRY_BLOCK_PTR macro. (df_exit_block_uses_collect): Remove usage of EXIT_BLOCK_PTR macro. * dominance.c (iterate_fix_dominators): Remove usage of ENTRY_BLOCK_PTR macro. (calc_idoms): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (determine_dominators_for_sons): Remove usage of ENTRY_BLOCK_PTR macro. (calc_dfs_tree): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (prune_bbs_to_update_dominators): Remove usage of ENTRY_BLOCK_PTR macro. (calc_dfs_tree_nonrec): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * domwalk.c (cmp_bb_postorder): Likewise. * dse.c (dse_step1): Remove usage of EXIT_BLOCK_PTR macro. * except.c (finish_eh_generation): Remove usage of ENTRY_BLOCK_PTR macro. (sjlj_emit_function_enter): Likewise. * final.c (compute_alignments): Likewise. * function.c (thread_prologue_and_epilogue_insns): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (reposition_prologue_and_epilogue_notes): Remove usage of EXIT_BLOCK_PTR macro. (convert_jumps_to_returns): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (regno_clobbered_at_setjmp): Remove usage of ENTRY_BLOCK_PTR macro. (next_block_for_reg): Remove usage of EXIT_BLOCK_PTR macro. * gcse.c (hoist_code): Remove usage of ENTRY_BLOCK_PTR macro. (update_bb_reg_pressure): Remove usage of EXIT_BLOCK_PTR macro. (compute_code_hoist_vbeinout): Likewise. (should_hoist_expr_to_dom): Remove usage of ENTRY_BLOCK_PTR macro. (pre_expr_reaches_here_p_work): Likewise. * gimple-iterator.c (gsi_commit_edge_inserts): Likewise. (gimple_find_edge_insert_loc): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * gimple-ssa-strength-reduction.c (slsr_process_phi): Remove usage of ENTRY_BLOCK_PTR macro. * graph.c (draw_cfg_nodes_for_loop): Remove usage of EXIT_BLOCK_PTR macro. * graphite-clast-to-gimple.c (translate_clast_user): Remove usage of ENTRY_BLOCK_PTR macro. * graphite-scop-detection.c (build_scops): Likewise. (create_sese_edges): Remove usage of EXIT_BLOCK_PTR macro. (scopdet_basic_block_info): Remove usage of ENTRY_BLOCK_PTR macro. * haifa-sched.c (restore_bb_notes): Remove usage of EXIT_BLOCK_PTR macro. (unlink_bb_notes): Likewise. (create_check_block_twin): Likewise. (init_before_recovery): Likewise. (sched_extend_bb): Likewise. (priority): Likewise. * hw-doloop.c (reorder_loops): Likewise. (discover_loop): Likewise. * ifcvt.c (dead_or_predicable): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (find_if_case_1): Remove usage of EXIT_BLOCK_PTR macro. (block_has_only_trap): Likewise. (cond_exec_find_if_block): Likewise. (merge_if_block): Likewise. * ipa-inline-analysis.c (param_change_prob): Remove usage of ENTRY_BLOCK_PTR macro. (record_modified): Likewise. * ipa-pure-const.c (execute_warn_function_noreturn): Remove usage of EXIT_BLOCK_PTR macro. (local_pure_const): Likewise. * ipa-split.c (split_function): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (find_split_points): Likewise. (consider_split): Likewise. (find_return_bb): Remove usage of EXIT_BLOCK_PTR macro. (verify_non_ssa_vars): Remove usage of ENTRY_BLOCK_PTR macro. * ira-build.c (ira_loop_tree_body_rev_postorder): Likewise. * ira-color.c (print_loop_title): Remove usage of EXIT_BLOCK_PTR macro. * ira-emit.c (entered_from_non_parent_p): Remove usage of ENTRY_BLOCK_PTR macro. (ira_emit): Remove usage of EXIT_BLOCK_PTR macro. * ira-int.h (ira_assert): Remove usage of ENTRY_BLOCK_PTR macro. * ira.c (split_live_ranges_for_shrink_wrap): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * lcm.c (compute_rev_insert_delete): Remove usage of ENTRY_BLOCK_PTR macro. (compute_nearerout): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (compute_farthest): Likewise. (compute_available): Likewise. (compute_insert_delete): Remove usage of EXIT_BLOCK_PTR macro. (compute_laterin): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (compute_earliest): Likewise. (compute_antinout_edge): Likewise. * loop-iv.c (simplify_using_initial_values): Remove usage of ENTRY_BLOCK_PTR macro. * loop-unswitch.c (unswitch_loop): Remove usage of EXIT_BLOCK_PTR macro. * lra-assigns.c (find_hard_regno_for): Remove usage of ENTRY_BLOCK_PTR macro. * lra-constraints.c (lra_inheritance): Remove usage of EXIT_BLOCK_PTR macro. * lra-lives.c (lra_create_live_ranges): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * lra.c (has_nonexceptional_receiver): Remove usage of EXIT_BLOCK_PTR macro. * lto-streamer-in.c (input_function): Remove usage of ENTRY_BLOCK_PTR macro. * lto-streamer-out.c (output_cfg): Likewise. * mcf.c (adjust_cfg_counts): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (create_fixup_graph): Remove usage of ENTRY_BLOCK_PTR macro. * mode-switching.c (optimize_mode_switching): Likewise. (create_pre_exit): Remove usage of EXIT_BLOCK_PTR macro. * modulo-sched.c (rest_of_handle_sms): Likewise. (canon_loop): Likewise. * omp-low.c (build_omp_regions): Remove usage of ENTRY_BLOCK_PTR macro. * postreload-gcse.c (eliminate_partially_redundant_loads): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * predict.c (rebuild_frequencies): Remove usage of ENTRY_BLOCK_PTR macro. (propagate_freq): Remove usage of EXIT_BLOCK_PTR macro. (estimate_bb_frequencies): Remove usage of ENTRY_BLOCK_PTR macro. (tree_estimate_probability_bb): Remove usage of EXIT_BLOCK_PTR macro. (expensive_function_p): Remove usage of ENTRY_BLOCK_PTR macro. (tree_bb_level_predictions): Remove usage of EXIT_BLOCK_PTR macro. (counts_to_freqs): Remove usage of ENTRY_BLOCK_PTR macro. (apply_return_prediction): Remove usage of EXIT_BLOCK_PTR macro. (estimate_loops): Remove usage of ENTRY_BLOCK_PTR macro. (gimple_predict_edge): Likewise. (probably_never_executed): Likewise. * profile.c (find_spanning_tree): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (branch_prob): Likewise. (compute_branch_probabilities): Likewise. (compute_frequency_overlap): Remove usage of ENTRY_BLOCK_PTR macro. (is_inconsistent): Remove usage of EXIT_BLOCK_PTR macro. (read_profile_edge_counts): Remove usage of ENTRY_BLOCK_PTR macro. (set_bb_counts): Likewise. (correct_negative_edge_counts): Likewise. (get_exec_counts): Likewise. (instrument_values): Likewise. (instrument_edges): Likewise. * reg-stack.c (convert_regs): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (compensate_edges): Remove usage of ENTRY_BLOCK_PTR macro. (convert_regs_exit): Remove usage of EXIT_BLOCK_PTR macro. (convert_regs_entry): Remove usage of ENTRY_BLOCK_PTR macro. (reg_to_stack): Likewise. * regs.h (REG_N_SETS): Likewise. * reload.c (find_dummy_reload): Likewise. (combine_reloads): Likewise. (push_reload): Likewise. * reload1.c (has_nonexceptional_receiver): Remove usage of EXIT_BLOCK_PTR macro. * resource.c (mark_target_live_regs): Remove usage of ENTRY_BLOCK_PTR macro. (find_basic_block): Likewise. * sched-ebb.c (ebb_add_block): Remove usage of EXIT_BLOCK_PTR macro. (schedule_ebbs): Likewise. * sched-int.h (sel_sched_p): Likewise. * sched-rgn.c (compute_dom_prob_ps): Remove usage of ENTRY_BLOCK_PTR macro. (rgn_add_block): Remove usage of EXIT_BLOCK_PTR macro. (haifa_find_rgns): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (propagate_deps): Remove usage of EXIT_BLOCK_PTR macro. (extend_rgns): Likewise. (find_single_block_region): Likewise. * sel-sched-ir.c (sel_remove_loop_preheader): Remove usage of ENTRY_BLOCK_PTR macro. (setup_nop_and_exit_insns): Remove usage of EXIT_BLOCK_PTR macro. (sel_create_recovery_block): Likewise. (bb_ends_ebb_p): Likewise. (sel_bb_end): Likewise. (sel_bb_head): Likewise. (free_lv_sets): Likewise. (init_lv_sets): Likewise. (tidy_control_flow): Likewise. (maybe_tidy_empty_bb): Likewise. * sel-sched-ir.h (_succ_iter_cond): Likewise. (_succ_iter_start): Likewise. (sel_bb_empty_or_nop_p): Likewise. (get_loop_exit_edges_unique_dests): Likewise. (inner_loop_header_p): Likewise. * sel-sched.c (create_block_for_bookkeeping): Likewise. (find_block_for_bookkeeping): Likewise. * store-motion.c (remove_reachable_equiv_notes): Likewise. (insert_store): Likewise. * trans-mem.c (ipa_tm_transform_clone): Remove usage of ENTRY_BLOCK_PTR macro. (tm_memopt_compute_available): Remove usage of EXIT_BLOCK_PTR macro. (ipa_tm_scan_irr_function): Remove usage of ENTRY_BLOCK_PTR macro. (gate_tm_init): Likewise. (tm_region_init): Likewise. * tree-cfg.c (execute_fixup_cfg): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (execute_warn_function_return): Remove usage of EXIT_BLOCK_PTR macro. (split_critical_edges): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (print_loops): Remove usage of ENTRY_BLOCK_PTR macro. (move_sese_region_to_fn): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (gimple_redirect_edge_and_branch): Remove usage of ENTRY_BLOCK_PTR macro. (gimple_verify_flow_info): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (remove_edge_and_dominated_blocks): Remove usage of EXIT_BLOCK_PTR macro. (make_edges): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (gimple_flow_call_edges_add): Remove usage of EXIT_BLOCK_PTR macro. (make_blocks): Remove usage of ENTRY_BLOCK_PTR macro. (build_gimple_cfg): Likewise. (gimple_duplicate_bb): Remove usage of EXIT_BLOCK_PTR macro. (gimple_can_merge_blocks_p): Likewise. * tree-cfgcleanup.c (tree_forwarder_block_p): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * tree-complex.c (update_parameter_components): Remove usage of ENTRY_BLOCK_PTR macro. * tree-if-conv.c (get_loop_body_in_if_conv_order): Remove usage of EXIT_BLOCK_PTR macro. * tree-inline.c (tree_function_versioning): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (delete_unreachable_blocks_update_callgraph): Likewise. (initialize_cfun): Likewise. (copy_cfg_body): Remove usage of ENTRY_BLOCK_PTR macro. (copy_edges_for_bb): Remove usage of EXIT_BLOCK_PTR macro. (remap_ssa_name): Remove usage of ENTRY_BLOCK_PTR macro. * tree-into-ssa.c (update_ssa): Likewise. (maybe_register_def): Remove usage of EXIT_BLOCK_PTR macro. (insert_updated_phi_nodes_for): Remove usage of ENTRY_BLOCK_PTR macro. (rewrite_into_ssa): Likewise. (rewrite_debug_stmt_uses): Likewise. * tree-outof-ssa.c (expand_phi_nodes): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * tree-profile.c (gimple_gen_ic_func_profiler): Remove usage of ENTRY_BLOCK_PTR macro. * tree-scalar-evolution.h (block_before_loop): Likewise. * tree-sra.c (sra_ipa_reset_debug_stmts): Likewise. (dump_dereferences_table): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (analyze_caller_dereference_legality): Remove usage of ENTRY_BLOCK_PTR macro. (propagate_dereference_distances): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (initialize_parameter_reductions): Remove usage of ENTRY_BLOCK_PTR macro. * tree-ssa-ccp.c (gsi_prev_dom_bb_nondebug): Likewise. (optimize_stack_restore): Remove usage of EXIT_BLOCK_PTR macro. * tree-ssa-coalesce.c (create_outofssa_var_map): Likewise. * tree-ssa-dce.c (eliminate_unnecessary_stmts): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (remove_dead_stmt): Remove usage of EXIT_BLOCK_PTR macro. (propagate_necessity): Remove usage of ENTRY_BLOCK_PTR macro. (mark_control_dependent_edges_necessary): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * tree-ssa-dom.c (eliminate_degenerate_phis): Remove usage of ENTRY_BLOCK_PTR macro. (tree_ssa_dominator_optimize): Remove usage of EXIT_BLOCK_PTR macro. * tree-ssa-live.c (verify_live_on_entry): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (calculate_live_on_exit): Likewise. (set_var_live_on_entry): Remove usage of ENTRY_BLOCK_PTR macro. (loe_visit_block): Likewise. * tree-ssa-live.h (live_on_exit): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (live_on_entry): Likewise. * tree-ssa-loop-ivopts.c (find_interesting_uses): Remove usage of EXIT_BLOCK_PTR macro. * tree-ssa-loop-manip.c (compute_live_loop_exits): Remove usage of ENTRY_BLOCK_PTR macro. * tree-ssa-loop-niter.c (simplify_using_initial_conditions): Likewise. (bound_difference): Likewise. * tree-ssa-loop-prefetch.c (may_use_storent_in_loop_p): Remove usage of EXIT_BLOCK_PTR macro. * tree-ssa-loop-unswitch.c (simplify_using_entry_checks): Remove usage of ENTRY_BLOCK_PTR macro. * tree-ssa-math-opts.c (register_division_in): Likewise. * tree-ssa-phiprop.c (tree_ssa_phiprop): Likewise. * tree-ssa-pre.c (compute_avail): Likewise. (compute_antic): Remove usage of EXIT_BLOCK_PTR macro. (insert): Remove usage of ENTRY_BLOCK_PTR macro. * tree-ssa-propagate.c (ssa_prop_init): Likewise. (simulate_block): Remove usage of EXIT_BLOCK_PTR macro. (cfg_blocks_add): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (add_control_edge): Remove usage of EXIT_BLOCK_PTR macro. * tree-ssa-reassoc.c (do_reassoc): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (build_and_add_sum): Remove usage of ENTRY_BLOCK_PTR macro. * tree-ssa-sink.c (nearest_common_dominator_of_uses): Likewise. (execute_sink_code): Remove usage of EXIT_BLOCK_PTR macro. * tree-ssa-uninit.c (find_dom): Remove usage of ENTRY_BLOCK_PTR macro. (compute_control_dep_chain): Remove usage of EXIT_BLOCK_PTR macro. (find_pdom): Likewise. (warn_uninitialized_vars): Remove usage of ENTRY_BLOCK_PTR macro. * tree-stdarg.c (reachable_at_most_once): Likewise. * tree-tailcall.c (tree_optimize_tail_calls_1): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (eliminate_tail_call): Likewise. * tsan.c (instrument_func_entry): Remove usage of ENTRY_BLOCK_PTR macro. (instrument_func_exit): Remove usage of EXIT_BLOCK_PTR macro. * var-tracking.c (vt_initialize): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (vt_add_function_parameter): Remove usage of ENTRY_BLOCK_PTR macro. (vt_find_locations): Remove usage of EXIT_BLOCK_PTR macro. (vt_stack_adjustments): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * varasm.c (assemble_start_function): Remove usage of ENTRY_BLOCK_PTR macro. * config/bfin/bfin.c (hwloop_optimize): Likewise. * config/nds32/nds32.c (nds32_fp_as_gp_check_available): Remove usage of EXIT_BLOCK_PTR macro. * config/arm/arm.c (require_pic_register): Remove usage of ENTRY_BLOCK_PTR macro. (arm_r3_live_at_start_p): Likewise. (any_sibcall_could_use_r3): Remove usage of EXIT_BLOCK_PTR macro. * config/rs6000/rs6000.c (rs6000_emit_prologue): Likewise. * config/frv/frv.c (frv_optimize_membar_global): Likewise. * config/alpha/alpha.c (alpha_gp_save_rtx): Remove usage of ENTRY_BLOCK_PTR macro. * config/i386/i386.c (ix86_count_insn): Likewise. (ix86_seh_fixup_eh_fallthru): Remove usage of EXIT_BLOCK_PTR macro. (ix86_pad_short_function): Likewise. (ix86_compute_frame_layout): Remove usage of ENTRY_BLOCK_PTR macro. (ix86_pad_returns): Remove usage of EXIT_BLOCK_PTR macro. (ix86_eax_live_at_start_p): Remove usage of ENTRY_BLOCK_PTR macro. (add_condition_to_bb): Remove usage of EXIT_BLOCK_PTR macro. (ix86_expand_epilogue): Likewise. * config/ia64/ia64.c (ia64_asm_unwind_emit): Likewise. (ia64_expand_prologue): Likewise. From-SVN: r205055
2013-11-19 22:57:13 +01:00
|| (! bitmap_bit_p (DF_LR_OUT (ENTRY_BLOCK_PTR_FOR_FN (cfun)),
[multiple changes] 2008-08-26 Vladimir Makarov <vmakarov@redhat.com> * ira-build.c, ira-color.c, ira-costs.c, ira.h, ira-lives.c, ira.c, ira-conflicts.c, ira-emit.c, ira-int.h: New files. * doc/passes.texi: Describe IRA. * doc/tm.texi (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Describe the new macros. * doc/invoke.texi (ira-max-loops-num): Describe the new parameter. (-fira, -fira-algorithm, -fira-coalesce, -fno-ira-move-spills, -fira-propagate-cost, -fno-ira-share-save-slots, -fno-ira-share-spill-slots, -fira-verbose): Describe new options. * flags.h (ira_algorithm): New enumeration. (flag_ira_algorithm, flag_ira_verbose): New external variable declarations. * postreload.c (gate_handle_postreload): Don't do post reload optimizations unless the reload is completed. * reload.c (push_reload, find_dummy_reload): Use DF_LR_OUT for IRA. * tree-pass.h (pass_ira): New external variable declaration. * reload.h: Add 2008 to the Copyright. * cfgloopanal.c: Include params.h. (estimate_reg_pressure_cost): Decrease cost for IRA optimization mode. * params.h (IRA_MAX_LOOPS_NUM): New macro. * toplev.c (ira.h): New include. (flag_ira_algorithm, flag_ira_verbose): New external variables. (backend_init_target): Call ira_init. (backend_init): Call ira_init_once. (finalize): Call finish_ira_once. * toplev.h (flag_ira, flag_ira_coalesce, flag_ira_move_spills, flag_ira_share_save_slots, flag_ira_share_spill_slots): New external variables. * regs.h (contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): New external variable declarations. (move_table): New typedef. * caller-save.c: Include headers output.h and ira.h. (no_caller_save_reg_set): New global variable. (save_slots_num, save_slots): New variables. (reg_save_code, reg_restore_code, add_stored_regs): Add prototypes. (init_caller_save): Set up no_caller_save_reg_set. (init_save_areas): Reset save_slots_num. (saved_hard_reg): New structure. (hard_reg_map, saved_regs_num, all_saved_regs): New variables. (initiate_saved_hard_regs, new_saved_hard_reg, finish_saved_hard_regs, saved_hard_reg_compare_func): New functions. (setup_save_areas): Add code for sharing stack slots. (all_blocks): New variable. (save_call_clobbered_regs): Process pseudo-register too. (mark_set_regs): Process pseudo-register too. (insert_one_insn): Put the insn after bb note in a empty basic block. Add insn check. * global.c (eliminable_regset): Make it external. (mark_elimination): Use DF_LR_IN for IRA. (pseudo_for_reload_consideration_p): New. (build_insn_chain): Make it external. Don't ignore spilled pseudos for IRA. Use pseudo_for_reload_consideration_p. (gate_handle_global_alloc): New function. (pass_global_alloc): Add the gate function. * opts.c (decode_options): Set up flag_ira. Print the warning for -fira. (common_handle_option): Process -fira-algorithm and -fira-verbose. * timevar.def (TV_IRA, TV_RELOAD): New passes. * regmove.c (regmove_optimize): Don't do replacement of output for IRA. * hard-reg-set.h (no_caller_save_reg_set, reg_class_subclasses): New external variable declarations. * local-alloc.c (update_equiv_regs): Make it external. Return true if jump label rebuilding should be done. Rescan new_insn for notes. (gate_handle_local_alloc): New function. (pass_local_alloc): Add the gate function. * alias.c (value_addr_p, stack_addr_p): New functions. (nonoverlapping_memrefs_p): Use them for IRA. * common.opt (fira, fira-algorithm, fira-coalesce, fira-move-spills, fira-share-save-slots, fira-share-spill-slots, fira-verbose): New options. * regclass.c (reg_class_subclasses, contains_reg_of_mode, move_cost, may_move_in_cost, may_move_out_cost): Make the variables external. (move_table): Remove typedef. (init_move_cost): Make it external. (allocate_reg_info, resize_reg_info, setup_reg_classes): New functions. * rtl.h (init_move_cost, allocate_reg_info, resize_reg_info, setup_reg_classes): New function prototypes. (eliminable_regset): New external variable declaration. (build_insn_chain, update_equiv_regs): New function prototypes. * Makefile.in (IRA_INT_H): New definition. (OBJS-common): Add ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, and ira-lives.o. (reload1.o, toplev.o): Add dependence on ira.h. (cfgloopanal.o): Add PARAMS_H. (caller-save.o): Add dependence on output.h and ira.h. (ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o, ira-emit.o, ira-lives.o): New entries. * passes.c (pass_ira): New pass. * params.def (PARAM_IRA_MAX_LOOPS_NUM): New parameter. * reload1.c (ira.h): Include the header. (changed_allocation_pseudos): New bitmap. (init_reload): Initiate the bitmap. (compute_use_by_pseudos): Permits spilled registers in FROM. (temp_pseudo_reg_arr): New variable. (reload): Allocate and free temp_pseudo_reg_arr. Sort pseudos for IRA. Call alter_reg with the additional parameter. Don't clear spilled_pseudos for IRA. Restore original insn chain for IRA. Clear changed_allocation_pseudos at the end of reload. (calculate_needs_all_insns): Call IRA's mark_memory_move_deletion. (hard_regno_to_pseudo_regno): New variable. (count_pseudo): Check spilled pseudos. Set up hard_regno_to_pseudo_regno. (count_spilled_pseudo): Check spilled pseudos. Update hard_regno_to_pseudo_regno. (find_reg): Use better_spill_reload_regno_p. Check hard_regno_to_pseudo_regno. (alter_reg): Set up spilled_pseudos. Add a new parameter. Add code for IRA. (eliminate_regs_1): Use additional parameter for alter_reg. (finish_spills): Set up pseudo_previous_regs only for spilled pseudos. Call reassign_pseudos once for all spilled pseudos, pass more arguments. Don't clear live_throughout and dead_or_set for spilled pseudos. Use additional parameter for alter_reg. Call mark_allocation_change. Set up changed_allocation_pseudos. Remove sanity check. (emit_input_reload_insns, delete_output_reload): Use additional parameter for alter_reg. Call mark_allocation_change. (substitute, gen_reload_chain_without_interm_reg_p): New functions. (reloads_conflict): Use gen_reload_chain_without_interm_reg_p. * testsuite/gcc.dg/20080410-1.c: New file. * config/s390/s390.h (IRA_COVER_CLASSES, IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Define. * config/sparc/sparc.h (IRA_COVER_CLASSES): New macro. * config/i386/i386.h (IRA_COVER_CLASSES): Ditto. * config/ia64/ia64.h (IRA_COVER_CLASSES): Ditto. * config/rs6000/rs6000.h (IRA_COVER_CLASSES): Ditto. * config/arm/arm.h (IRA_COVER_CLASSES): Ditto. * config/alpha/alpha.h (IRA_COVER_CLASSES): Ditto. 2008-08-24 Jeff Law <law@redhat.com> * ira.c (setup_reg_class_intersect_union): Prefer smallest class when ignoring unavailable registers. 2008-08-24 Jeff Law <law@redhat.com> * ira-color.c (coalesced_pseudo_reg_slot_compare): Check FRAME_GROWS_DOWNWARD and STACK_GROWS_DOWNWARD. * ira.c (setup_eliminable_regset): Check stack_realign_needed. * config/mn10300/mn10300.h (IRA_COVER_CLASSES): New macro. 2008-06-03 Steve Chamberlain <steve.chamberlain@gmail.com> * ira-build.c (allocno_range_compare_func): Stabilize sort. 2008-05-29 Andy Hutchinson <hutchinsonandy@aim.com> * config/avr/avr.h (IRA_COVER_CLASSES): New macro. * reload1.c (find_reg): Process registers in register allocation order. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * toplev.c (backend_init_target): Move ira_init call from here... (lang_dependent_init_target): ...to here. 2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk> * ira.c (setup_class_subset_and_memory_move_costs): Don't calculate memory move costs for NO_REGS. 2008-05-05 Kaz Kojima <kkojima@gcc.gnu.org> * ira-color.c (ira_fast_allocation): Use no_stack_reg_p only if STACK_REGS is defined. 2008-04-08 Andrew Pinski <andrew_pinski@playstation.sony.com> * config/spu/spu.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Bernd Schmidt <bernd.schmidt@analog.com> * config/bfin/bfin.h (IRA_COVER_CLASSES): New macro. 2008-04-04 Kaz Kojima <kkojima@gcc.gnu.org> * config/sh/sh.h (IRA_COVER_CLASSES): Define. * config/sh/sh.md (movsicc_true+3): Check if emit returns a barrier. From-SVN: r139590
2008-08-26 14:39:58 +02:00
ORIGINAL_REGNO (XEXP (note, 0)))
&& hard_regno_nregs[regno][GET_MODE (XEXP (note, 0))] == 1))
1992-02-28 11:23:25 +01:00
&& ! refers_to_regno_for_reload_p (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_hard_regno (rel_mode,
regno),
1992-02-28 11:23:25 +01:00
PATTERN (this_insn), inloc)
/* If this is also an output reload, IN cannot be used as
the reload register if it is set in this insn unless IN
is also OUT. */
&& (out == 0 || in == out
|| ! hard_reg_set_here_p (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_hard_regno (rel_mode, regno),
PATTERN (this_insn)))
/* ??? Why is this code so different from the previous?
Is there any simple coherent way to describe the two together?
What's going on here. */
1992-02-28 11:23:25 +01:00
&& (in != out
|| (GET_CODE (in) == SUBREG
&& (((GET_MODE_SIZE (GET_MODE (in)) + (UNITS_PER_WORD - 1))
/ UNITS_PER_WORD)
== ((GET_MODE_SIZE (GET_MODE (SUBREG_REG (in)))
+ (UNITS_PER_WORD - 1)) / UNITS_PER_WORD))))
/* Make sure the operand fits in the reg that dies. */
&& (GET_MODE_SIZE (rel_mode)
<= GET_MODE_SIZE (GET_MODE (XEXP (note, 0))))
1992-02-28 11:23:25 +01:00
&& HARD_REGNO_MODE_OK (regno, inmode)
&& HARD_REGNO_MODE_OK (regno, outmode))
1992-02-28 11:23:25 +01:00
{
unsigned int offs;
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
unsigned int nregs = MAX (hard_regno_nregs[regno][inmode],
hard_regno_nregs[regno][outmode]);
for (offs = 0; offs < nregs; offs++)
if (fixed_regs[regno + offs]
|| ! TEST_HARD_REG_BIT (reg_class_contents[(int) rclass],
regno + offs))
break;
if (offs == nregs
&& (! (refers_to_regno_for_reload_p
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, end_hard_regno (inmode, regno), in, (rtx *) 0))
|| can_reload_into (in, regno, inmode)))
{
rld[i].reg_rtx = gen_rtx_REG (rel_mode, regno);
break;
}
1992-02-28 11:23:25 +01:00
}
}
if (out)
output_reloadnum = i;
return i;
}
/* Record an additional place we must replace a value
for which we have already recorded a reload.
RELOADNUM is the value returned by push_reload
when the reload was recorded.
This is used in insn patterns that use match_dup. */
static void
push_replacement (rtx *loc, int reloadnum, enum machine_mode mode)
1992-02-28 11:23:25 +01:00
{
if (replace_reloads)
{
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
struct replacement *r = &replacements[n_replacements++];
1992-02-28 11:23:25 +01:00
r->what = reloadnum;
r->where = loc;
r->mode = mode;
}
}
/* Duplicate any replacement we have recorded to apply at
location ORIG_LOC to also be performed at DUP_LOC.
This is used in insn patterns that use match_dup. */
static void
dup_replacements (rtx *dup_loc, rtx *orig_loc)
{
int i, n = n_replacements;
for (i = 0; i < n; i++)
{
struct replacement *r = &replacements[i];
if (r->where == orig_loc)
push_replacement (dup_loc, r->what, r->mode);
}
}
1992-02-28 11:23:25 +01:00
/* Transfer all replacements that used to be in reload FROM to be in
reload TO. */
void
transfer_replacements (int to, int from)
{
int i;
for (i = 0; i < n_replacements; i++)
if (replacements[i].what == from)
replacements[i].what = to;
}
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
/* IN_RTX is the value loaded by a reload that we now decided to inherit,
or a subpart of it. If we have any replacements registered for IN_RTX,
cancel the reloads that were supposed to load them.
Return nonzero if we canceled any reloads. */
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
int
remove_address_replacements (rtx in_rtx)
{
int i, j;
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
char reload_flags[MAX_RELOADS];
int something_changed = 0;
alias.c [...] (init_alias_analysis, [...]): Use memset () instead of bzero (). * alias.c (init_alias_analysis), calls.c (expand_call, emit_library_call_value_1), combine.c (init_reg_last_arrays), cse.c (new_basic_block), dbxout.c (dbxout_type), diagnostic.c (init_output_buffer, set_diagnostic_context), dwarf2out.c (equate_decl_number_to_die, build_abbrev_table), emit-rtl.c (init_emit_once), fold-const.c (mul_double, div_and_round_double), function.c (assign_parms), gcse.c (compute_can_copy, alloc_gcse_mem, alloc_reg_set_mem, record_one_set, compute_hash_table, compute_set_hash_table, compute_expr_hash_table), genattrtab.c (optimize_attrs), global.c (global_alloc, global_conflicts), haifa-sched.c (compute_trg_info, clear_units, schedule_block), integrate.c (initialize_for_inline, expand_inline_function), jump.c (thread_jumps), local-alloc.c (local_alloc), loop.c (combine_movables, count_loop_regs_set, load_mems_and_recount_loop_regs_set), print-tree.c (debug_tree), regclass.c (init_reg_sets, init_reg_sets_1, regclass, record_reg_classes, allocate_reg_info), reload.c (get_secondary_mem, remove_address_replacements, find_reloads), reload1.c (reload, set_initial_label_offsets, finish_spills, reload_as_needed, choose_reload_regs_init, reload_cse_simplify_operands), reorg.c (dbr_schedule), sbitmap.c (sbitmap_zero), simplify-rtx.c (simplify_plus_minus), ssa.c (rename_registers), stmt.c (expand_end_case), unroll.c (unroll_loop), varray.c (varray_grow), objc/objc-act.c: Use memset () instead of bzero (). ch: * actions.c (check_missing_cases), typeck.c (build_chill_slice, build_chill_cast): Use memset () instead of bzero (). cp: * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c (push_binding_level), error.c (cp_tree_printer), pt.c (process_partial_specialization, tsubst_template_arg_vector), search.c (lookup_member): Use memset () instead of bzero (). java: * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c (init_outgoing_cpool), lex.c (java_init_lex): Use memset () instead of bzero (). From-SVN: r37303
2000-11-07 23:50:06 +01:00
memset (reload_flags, 0, sizeof reload_flags);
for (i = 0, j = 0; i < n_replacements; i++)
{
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
if (loc_mentioned_in_p (replacements[i].where, in_rtx))
reload_flags[replacements[i].what] |= 1;
else
{
replacements[j++] = replacements[i];
reload_flags[replacements[i].what] |= 2;
}
}
/* Note that the following store must be done before the recursive calls. */
n_replacements = j;
for (i = n_reloads - 1; i >= 0; i--)
{
if (reload_flags[i] == 1)
{
deallocate_reload_reg (i);
remove_address_replacements (rld[i].in);
rld[i].in = 0;
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
something_changed = 1;
}
}
return something_changed;
}
1992-02-28 11:23:25 +01:00
/* If there is only one output reload, and it is not for an earlyclobber
operand, try to combine it with a (logically unrelated) input reload
to reduce the number of reload registers needed.
This is safe if the input reload does not appear in
the value being output-reloaded, because this implies
it is not needed any more once the original insn completes.
If that doesn't work, see we can use any of the registers that
die in this insn as a reload register. We can if it is of the right
class and does not appear in the value being output-reloaded. */
static void
combine_reloads (void)
1992-02-28 11:23:25 +01:00
{
int i, regno;
1992-02-28 11:23:25 +01:00
int output_reload = -1;
int secondary_out = -1;
1992-02-28 11:23:25 +01:00
rtx note;
/* Find the output reload; return unless there is exactly one
and that one is mandatory. */
for (i = 0; i < n_reloads; i++)
if (rld[i].out != 0)
1992-02-28 11:23:25 +01:00
{
if (output_reload >= 0)
return;
output_reload = i;
}
if (output_reload < 0 || rld[output_reload].optional)
1992-02-28 11:23:25 +01:00
return;
/* An input-output reload isn't combinable. */
if (rld[output_reload].in != 0)
1992-02-28 11:23:25 +01:00
return;
/* If this reload is for an earlyclobber operand, we can't do anything. */
if (earlyclobber_operand_p (rld[output_reload].out))
return;
1992-02-28 11:23:25 +01:00
/* If there is a reload for part of the address of this operand, we would
need to change it to RELOAD_FOR_OTHER_ADDRESS. But that would extend
its life to the point where doing this combine would not lower the
number of spill registers needed. */
for (i = 0; i < n_reloads; i++)
if ((rld[i].when_needed == RELOAD_FOR_OUTPUT_ADDRESS
|| rld[i].when_needed == RELOAD_FOR_OUTADDR_ADDRESS)
&& rld[i].opnum == rld[output_reload].opnum)
return;
1992-02-28 11:23:25 +01:00
/* Check each input reload; can we combine it? */
for (i = 0; i < n_reloads; i++)
if (rld[i].in && ! rld[i].optional && ! rld[i].nocombine
1992-02-28 11:23:25 +01:00
/* Life span of this reload must not extend past main insn. */
&& rld[i].when_needed != RELOAD_FOR_OUTPUT_ADDRESS
&& rld[i].when_needed != RELOAD_FOR_OUTADDR_ADDRESS
&& rld[i].when_needed != RELOAD_OTHER
target.def (class_max_nregs): New hook. * target.def (class_max_nregs): New hook. * doc/tm.texi.in (TARGET_CLASS_MAX_NREGS): Document. * doc/tm.texi: Regenerate. * targhooks.c (default_class_max_nregs): New function. * targhooks.h (default_class_max_nregs): Declare. * ira.h (target_ira): Change type x_ira_reg_class_max_nregs and x_ira_reg_class_min_nregs arrays to unsigned char. * ira.c (setup_reg_class_nregs): Use TARGET_CLASS_MAX_NREGS target hook instead of CLASS_MAX_NREGS macro. * reginfo.c (restore_register_info): Ditto. * ira-conflicts.c (process_regs_for_copy): Use ira_reg_class_max_nregs array instead of CLASS_MAX_NREGS macro. Change type rclass and aclass vars to reg_class_t. * ira-costs.c (record_reg_classes): Use ira_reg_class_max_nregs array instead of CLASS_MAX_NREGS macro. Change type rclass var to reg_class_t. * reload.c (combine_reloads, find_reloads, find_reloads_address_1): Use ira_reg_class_max_nregs array instead of CLASS_MAX_NREGS macro. * config/i386/i386.h (CLASS_MAX_NREGS): Remove. * config/i386/i386.c (ix86_class_max_nregs): New function. (ix86_register_move_cost): Use TARGET_CLASS_MAX_NREGS target hook instead of CLASS_MAX_NREGS macro. (TARGET_CLASS_MAX_NREGS): Define. * config/avr/avr.h (CLASS_MAX_NREGS): Remove. * config/avr/avr-protos.h (class_max_nregs): Remove declaration. * config/avr/avr.c (class_max_nregs): Remove function. * config/alpha/alpha.h (CLASS_MAX_NREGS): Remove. * config/spu/spu.h (CLASS_MAX_NREGS): Remove. * config/mep/mep.h (CLASS_MAX_NREGS): Remove. * config/m32r/m32r.h (CLASS_MAX_NREGS): Remove. * config/microblaze/microblaze.h (CLASS_MAX_NREGS): Remove. * config/xtensa/xtensa.h (CLASS_MAX_NREGS): Remove. * config/stormy16/stormy16.h (CLASS_MAX_NREGS): Remove. * config/lm32/lm32.h (CLASS_MAX_NREGS): Remove. * config/moxie/moxie.h (CLASS_MAX_NREGS): Remove. * config/iq2000/iq2000.h (CLASS_MAX_NREGS): Remove. * config/mn10300/mn10300.h (CLASS_MAX_NREGS): Remove. * config/score/score.h (CLASS_MAX_NREGS): Remove. * config/vax/vax.h (CLASS_MAX_NREGS): Remove. * config/h8300/h8300.h (CLASS_MAX_NREGS): Remove. * config/v850/v850.h (CLASS_MAX_NREGS): Remove. From-SVN: r176490
2011-07-20 00:34:31 +02:00
&& (ira_reg_class_max_nregs [(int)rld[i].rclass][(int) rld[i].inmode]
== ira_reg_class_max_nregs [(int) rld[output_reload].rclass]
[(int) rld[output_reload].outmode])
&& rld[i].inc == 0
&& rld[i].reg_rtx == 0
#ifdef SECONDARY_MEMORY_NEEDED
/* Don't combine two reloads with different secondary
memory locations. */
&& (secondary_memlocs_elim[(int) rld[output_reload].outmode][rld[i].opnum] == 0
|| secondary_memlocs_elim[(int) rld[output_reload].outmode][rld[output_reload].opnum] == 0
|| rtx_equal_p (secondary_memlocs_elim[(int) rld[output_reload].outmode][rld[i].opnum],
secondary_memlocs_elim[(int) rld[output_reload].outmode][rld[output_reload].opnum]))
#endif
tm.texi (defmac SMALL_REGISTER_CLASSES): Remove. * doc/tm.texi (defmac SMALL_REGISTER_CLASSES): Remove. (TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P): Add documentation, based on the above, for new target hook. * hooks.c (hook_bool_mode_true): New generic hook. * hooks.h (hook_bool_mode_true): Add prototype. * target.h (struct gcc_target): Add small_register_classes_for_mode_p target hook. * target-def.h (TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P): New default target hook, set to hook_bool_mode_false. * regs.h: Remove default definition of SMALL_REGISTER_CLASSES. * reload.c (push_secondary_reload): Replace SMALL_REGISTER_CLASSES with targetm.small_register_classes_for_mode_p. (find_reusable_reload): Likewise. (combine_reloads): Likewise. * reload1.c (reload_as_needed): Likewise. * cse.c (approx_reg_cost_1, hash_rtx_cb): Likewise. * ifcvt.c (noce_process_if_block, check_cond_move_block, dead_or_predicable): Likewise. * regmove.c (optimize_reg_copy_1): Likewise. * calls.c (prepare_call_address): Likewise. (precompute_register_parameters): Likewise. * config/sh/sh.h: Replace SMALL_REGISTER_CLASSES with new target hook definition. * config/sh/sh.c (sh_small_register_classes_for_mode_p): Add implementation of the hook that considers all register classes small except for SH64. (sh_override_options): Use the new hook. * config/sh/sh-protos.h (sh_small_register_classes_for_mode_p): Add prototype. * config/arm/arm.h: Replace SMALL_REGISTER_CLASSES with new target hook definition. * config/arm/arm.c (arm_small_register_classes_for_mode_p): Add implementation of the hook that considers all register classes small for THUMB1. * config/arm/arm-protos.h (arm_small_register_classes_for_mode_p): Add prototype. * config/mips/mips.h: Replace SMALL_REGISTER_CLASSES with new target hook definition. * config/mips/mips.c (mips_small_register_classes_for_mode_p): Add implementation of the hook that considers all register classes small for MIPS16. * config/mips/mips-protos.h (mips_small_register_classes_for_mode_p): Add prototype. * config/i386/i386.h: Replace SMALL_REGISTER_CLASSES with new target hook definition. * config/m32c/m32c.h: Likewise. * config/pdp11/pdp11.h: Likewise. * config/avr/avr.h: Likewise. * config/xtensa/xtensa.h: Likewise. * config/m68hc11/m68hc11.h: Likewise. * config/mn10300/mn10300.h: Likewise. * config/mcore/mcore.h: Likewise. * config/h8300/h8300.h: Likewise. * config/bfin/bfin.h: Likewise. * config/iq2000/iq2000.h: Remove SMALL_REGISTER_CLASSES definition. * config/rx/rx.h: Remove SMALL_REGISTER_CLASSES definition. From-SVN: r158997
2010-05-03 19:47:47 +02:00
&& (targetm.small_register_classes_for_mode_p (VOIDmode)
? (rld[i].rclass == rld[output_reload].rclass)
: (reg_class_subset_p (rld[i].rclass,
rld[output_reload].rclass)
|| reg_class_subset_p (rld[output_reload].rclass,
rld[i].rclass)))
&& (MATCHES (rld[i].in, rld[output_reload].out)
1992-02-28 11:23:25 +01:00
/* Args reversed because the first arg seems to be
the one that we imagine being modified
while the second is the one that might be affected. */
|| (! reg_overlap_mentioned_for_reload_p (rld[output_reload].out,
rld[i].in)
1992-02-28 11:23:25 +01:00
/* However, if the input is a register that appears inside
the output, then we also can't share.
Imagine (set (mem (reg 69)) (plus (reg 69) ...)).
If the same reload reg is used for both reg 69 and the
result to be stored in memory, then that result
will clobber the address of the memory ref. */
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 (rld[i].in)
&& reg_overlap_mentioned_for_reload_p (rld[i].in,
rld[output_reload].out))))
&& ! reload_inner_reg_of_subreg (rld[i].in, rld[i].inmode,
rld[i].when_needed != RELOAD_FOR_INPUT)
&& (reg_class_size[(int) rld[i].rclass]
tm.texi (defmac SMALL_REGISTER_CLASSES): Remove. * doc/tm.texi (defmac SMALL_REGISTER_CLASSES): Remove. (TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P): Add documentation, based on the above, for new target hook. * hooks.c (hook_bool_mode_true): New generic hook. * hooks.h (hook_bool_mode_true): Add prototype. * target.h (struct gcc_target): Add small_register_classes_for_mode_p target hook. * target-def.h (TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P): New default target hook, set to hook_bool_mode_false. * regs.h: Remove default definition of SMALL_REGISTER_CLASSES. * reload.c (push_secondary_reload): Replace SMALL_REGISTER_CLASSES with targetm.small_register_classes_for_mode_p. (find_reusable_reload): Likewise. (combine_reloads): Likewise. * reload1.c (reload_as_needed): Likewise. * cse.c (approx_reg_cost_1, hash_rtx_cb): Likewise. * ifcvt.c (noce_process_if_block, check_cond_move_block, dead_or_predicable): Likewise. * regmove.c (optimize_reg_copy_1): Likewise. * calls.c (prepare_call_address): Likewise. (precompute_register_parameters): Likewise. * config/sh/sh.h: Replace SMALL_REGISTER_CLASSES with new target hook definition. * config/sh/sh.c (sh_small_register_classes_for_mode_p): Add implementation of the hook that considers all register classes small except for SH64. (sh_override_options): Use the new hook. * config/sh/sh-protos.h (sh_small_register_classes_for_mode_p): Add prototype. * config/arm/arm.h: Replace SMALL_REGISTER_CLASSES with new target hook definition. * config/arm/arm.c (arm_small_register_classes_for_mode_p): Add implementation of the hook that considers all register classes small for THUMB1. * config/arm/arm-protos.h (arm_small_register_classes_for_mode_p): Add prototype. * config/mips/mips.h: Replace SMALL_REGISTER_CLASSES with new target hook definition. * config/mips/mips.c (mips_small_register_classes_for_mode_p): Add implementation of the hook that considers all register classes small for MIPS16. * config/mips/mips-protos.h (mips_small_register_classes_for_mode_p): Add prototype. * config/i386/i386.h: Replace SMALL_REGISTER_CLASSES with new target hook definition. * config/m32c/m32c.h: Likewise. * config/pdp11/pdp11.h: Likewise. * config/avr/avr.h: Likewise. * config/xtensa/xtensa.h: Likewise. * config/m68hc11/m68hc11.h: Likewise. * config/mn10300/mn10300.h: Likewise. * config/mcore/mcore.h: Likewise. * config/h8300/h8300.h: Likewise. * config/bfin/bfin.h: Likewise. * config/iq2000/iq2000.h: Remove SMALL_REGISTER_CLASSES definition. * config/rx/rx.h: Remove SMALL_REGISTER_CLASSES definition. From-SVN: r158997
2010-05-03 19:47:47 +02:00
|| targetm.small_register_classes_for_mode_p (VOIDmode))
/* We will allow making things slightly worse by combining an
input and an output, but no worse than that. */
&& (rld[i].when_needed == RELOAD_FOR_INPUT
|| rld[i].when_needed == RELOAD_FOR_OUTPUT))
1992-02-28 11:23:25 +01:00
{
int j;
/* We have found a reload to combine with! */
rld[i].out = rld[output_reload].out;
rld[i].out_reg = rld[output_reload].out_reg;
rld[i].outmode = rld[output_reload].outmode;
1992-02-28 11:23:25 +01:00
/* Mark the old output reload as inoperative. */
rld[output_reload].out = 0;
1992-02-28 11:23:25 +01:00
/* The combined reload is needed for the entire insn. */
rld[i].when_needed = RELOAD_OTHER;
1996-07-04 00:07:53 +02:00
/* If the output reload had a secondary reload, copy it. */
if (rld[output_reload].secondary_out_reload != -1)
{
rld[i].secondary_out_reload
= rld[output_reload].secondary_out_reload;
rld[i].secondary_out_icode
= rld[output_reload].secondary_out_icode;
}
#ifdef SECONDARY_MEMORY_NEEDED
/* Copy any secondary MEM. */
if (secondary_memlocs_elim[(int) rld[output_reload].outmode][rld[output_reload].opnum] != 0)
secondary_memlocs_elim[(int) rld[output_reload].outmode][rld[i].opnum]
= secondary_memlocs_elim[(int) rld[output_reload].outmode][rld[output_reload].opnum];
#endif
1996-07-04 00:07:53 +02:00
/* If required, minimize the register class. */
if (reg_class_subset_p (rld[output_reload].rclass,
rld[i].rclass))
rld[i].rclass = rld[output_reload].rclass;
1992-02-28 11:23:25 +01:00
/* Transfer all replacements from the old reload to the combined. */
for (j = 0; j < n_replacements; j++)
if (replacements[j].what == output_reload)
replacements[j].what = i;
return;
}
/* If this insn has only one operand that is modified or written (assumed
to be the first), it must be the one corresponding to this reload. It
is safe to use anything that dies in this insn for that output provided
that it does not occur in the output (we already know it isn't an
earlyclobber. If this is an asm insn, give up. */
1999-12-19 02:19:33 +01:00
if (INSN_CODE (this_insn) == -1)
1992-02-28 11:23:25 +01:00
return;
for (i = 1; i < insn_data[INSN_CODE (this_insn)].n_operands; i++)
if (insn_data[INSN_CODE (this_insn)].operand[i].constraint[0] == '='
|| insn_data[INSN_CODE (this_insn)].operand[i].constraint[0] == '+')
1992-02-28 11:23:25 +01:00
return;
/* See if some hard register that dies in this insn and is not used in
the output is the right class. Only works if the register we pick
up can fully hold our output reload. */
for (note = REG_NOTES (this_insn); note; note = XEXP (note, 1))
if (REG_NOTE_KIND (note) == REG_DEAD
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 (note, 0))
&& !reg_overlap_mentioned_for_reload_p (XEXP (note, 0),
rld[output_reload].out)
&& (regno = REGNO (XEXP (note, 0))) < FIRST_PSEUDO_REGISTER
&& HARD_REGNO_MODE_OK (regno, rld[output_reload].outmode)
&& TEST_HARD_REG_BIT (reg_class_contents[(int) rld[output_reload].rclass],
regno)
&& (hard_regno_nregs[regno][rld[output_reload].outmode]
<= hard_regno_nregs[regno][GET_MODE (XEXP (note, 0))])
/* Ensure that a secondary or tertiary reload for this output
won't want this register. */
&& ((secondary_out = rld[output_reload].secondary_out_reload) == -1
|| (!(TEST_HARD_REG_BIT
(reg_class_contents[(int) rld[secondary_out].rclass], regno))
&& ((secondary_out = rld[secondary_out].secondary_out_reload) == -1
|| !(TEST_HARD_REG_BIT
(reg_class_contents[(int) rld[secondary_out].rclass],
regno)))))
&& !fixed_regs[regno]
/* Check that a former pseudo is valid; see find_dummy_reload. */
&& (ORIGINAL_REGNO (XEXP (note, 0)) < FIRST_PSEUDO_REGISTER
Eliminate ENTRY_BLOCK_PTR and EXIT_BLOCK_PTR macros gcc/ * basic-block.h (ENTRY_BLOCK_PTR_FOR_FUNCTION): Rename macro to... (EXIT_BLOCK_PTR_FOR_FUNCTION): ...this. (ENTRY_BLOCK_PTR_FOR_FN): Renamed macro to... (EXIT_BLOCK_PTR_FOR_FN): ...this. (ENTRY_BLOCK_PTR): Eliminate macro as work towards making uses of cfun be explicit. (EXIT_BLOCK_PTR): Likewise. (FOR_ALL_BB): Rework for now to eliminate use of "ENTRY_BLOCK_PTR". (FOR_ALL_BB_FN): Update for renaming of "ENTRY_BLOCK_PTR_FOR_FUNCTION" to "ENTRY_BLOCK_PTR_FOR_FN". * cfg.c (init_flow): Likewise. (check_bb_profile): Likewise. * cfganal.c (pre_and_rev_post_order_compute_fn): Likewise. * cfgcleanup.c (walk_to_nondebug_insn): Likewise. * cfghooks.c (account_profile_record): Likewise. * cfgloop.c (init_loops_structure): Likewise. * cgraphbuild.c (record_eh_tables): Likewise. (compute_call_stmt_bb_frequency): Likewise. * ipa-inline-analysis.c (compute_bb_predicates): Likewise. * lto-streamer-in.c (input_cfg): Likewise. * predict.c (maybe_hot_frequency_p): Likewise. * tree-cfg.c (init_empty_tree_cfg_for_function): Likewise. * tree-inline.c (initialize_cfun): Likewise. (copy_cfg_body): Likewise. (copy_body): Likewise. (tree_function_versioning): Likewise. * bb-reorder.c (add_labels_and_missing_jumps): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (duplicate_computed_gotos): Remove usage of EXIT_BLOCK_PTR macro. (find_rarely_executed_basic_blocks_and_crossing_edges): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (connect_traces): Likewise. (rest_of_handle_reorder_blocks): Remove usage of EXIT_BLOCK_PTR macro. (bb_to_key): Remove usage of ENTRY_BLOCK_PTR macro. (fix_crossing_conditional_branches): Remove usage of EXIT_BLOCK_PTR macro. (find_traces_1_round): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (fix_up_fall_thru_edges): Remove usage of EXIT_BLOCK_PTR macro. (find_traces): Remove usage of ENTRY_BLOCK_PTR macro. (fix_up_crossing_landing_pad): Remove usage of EXIT_BLOCK_PTR macro. (rotate_loop): Likewise. * bt-load.c (migrate_btr_def): Remove usage of ENTRY_BLOCK_PTR macro. * cfg.c (clear_aux_for_edges): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (alloc_aux_for_edges): Likewise. (clear_bb_flags): Remove usage of ENTRY_BLOCK_PTR macro. (cached_make_edge): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (compact_blocks): Likewise. (clear_edges): Likewise. * cfganal.c (single_pred_before_succ_order): Remove usage of ENTRY_BLOCK_PTR macro. (bitmap_union_of_succs): Remove usage of EXIT_BLOCK_PTR macro. (bitmap_union_of_preds): Remove usage of ENTRY_BLOCK_PTR macro. (bitmap_intersection_of_succs): Remove usage of EXIT_BLOCK_PTR macro. (bitmap_intersection_of_preds): Remove usage of ENTRY_BLOCK_PTR macro. (inverted_post_order_compute): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (compute_dominance_frontiers_1): Remove usage of ENTRY_BLOCK_PTR macro. (post_order_compute): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (connect_infinite_loops_to_exit): Remove usage of EXIT_BLOCK_PTR macro. (remove_fake_edges): Remove usage of ENTRY_BLOCK_PTR macro. (add_noreturn_fake_exit_edges): Remove usage of EXIT_BLOCK_PTR macro. (find_pdom): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (remove_fake_exit_edges): Remove usage of EXIT_BLOCK_PTR macro. (verify_edge_list): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (print_edge_list): Likewise. (create_edge_list): Likewise. (find_unreachable_blocks): Remove usage of ENTRY_BLOCK_PTR macro. (mark_dfs_back_edges): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * cfgbuild.c (find_bb_boundaries): Remove usage of ENTRY_BLOCK_PTR macro. (find_many_sub_basic_blocks): Remove usage of EXIT_BLOCK_PTR macro. (make_edges): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * cfgcleanup.c (delete_unreachable_blocks): Likewise. (try_optimize_cfg): Likewise. (try_head_merge_bb): Remove usage of EXIT_BLOCK_PTR macro. (try_crossjump_to_edge): Remove usage of ENTRY_BLOCK_PTR macro. (try_crossjump_bb): Remove usage of EXIT_BLOCK_PTR macro. (merge_blocks_move): Remove usage of ENTRY_BLOCK_PTR macro. (outgoing_edges_match): Remove usage of EXIT_BLOCK_PTR macro. (try_forward_edges): Likewise. (try_simplify_condjump): Likewise. * cfgexpand.c (gimple_expand_cfg): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (construct_exit_block): Remove usage of EXIT_BLOCK_PTR macro. (construct_init_block): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (expand_gimple_basic_block): Remove usage of EXIT_BLOCK_PTR macro. (expand_gimple_tailcall): Likewise. * cfghooks.c (can_duplicate_block_p): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (tidy_fallthru_edges): Likewise. (verify_flow_info): Likewise. * cfgloop.c (flow_bb_inside_loop_p): Likewise. (num_loop_branches): Remove usage of EXIT_BLOCK_PTR macro. (disambiguate_multiple_latches): Remove usage of ENTRY_BLOCK_PTR macro. (get_loop_exit_edges): Remove usage of EXIT_BLOCK_PTR macro. (bb_loop_header_p): Remove usage of ENTRY_BLOCK_PTR macro. (get_loop_body_in_bfs_order): Remove usage of EXIT_BLOCK_PTR macro. (get_loop_body_in_dom_order): Likewise. (get_loop_body): Likewise. * cfgloopanal.c (mark_irreducible_loops): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * cfgloopmanip.c (create_preheader): Remove usage of ENTRY_BLOCK_PTR macro. (remove_path): Remove usage of EXIT_BLOCK_PTR macro. (fix_bb_placement): Likewise. * cfgrtl.c (rtl_block_empty_p): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (rtl_can_remove_branch_p): Remove usage of EXIT_BLOCK_PTR macro. (cfg_layout_split_edge): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (rtl_flow_call_edges_add): Remove usage of EXIT_BLOCK_PTR macro. (cfg_layout_can_merge_blocks_p): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (cfg_layout_redirect_edge_and_branch): Remove usage of ENTRY_BLOCK_PTR macro. (fixup_fallthru_exit_predecessor): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (fixup_reorder_chain): Likewise. (relink_block_chain): Likewise. (cfg_layout_delete_block): Remove usage of EXIT_BLOCK_PTR macro. (rtl_verify_bb_layout): Remove usage of ENTRY_BLOCK_PTR macro. (cfg_layout_duplicate_bb): Remove usage of EXIT_BLOCK_PTR macro. (force_one_exit_fallthru): Likewise. (rtl_verify_fallthru): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (rtl_verify_edges): Likewise. (commit_edge_insertions): Likewise. (commit_one_edge_insertion): Likewise. (rtl_split_edge): Likewise. (force_nonfallthru_and_redirect): Likewise. (outof_cfg_layout_mode): Remove usage of EXIT_BLOCK_PTR macro. (skip_insns_after_block): Likewise. (fixup_partition_crossing): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (purge_dead_edges): Remove usage of EXIT_BLOCK_PTR macro. (rtl_can_merge_blocks): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (contains_no_active_insn_p): Likewise. (emit_insn_at_entry): Remove usage of ENTRY_BLOCK_PTR macro. (entry_of_function): Likewise. (last_bb_in_partition): Remove usage of EXIT_BLOCK_PTR macro. (fixup_new_cold_bb): Likewise. (patch_jump_insn): Likewise. (try_redirect_by_replacing_jump): Likewise. (block_label): Likewise. (could_fall_through): Likewise. (can_fallthru): Likewise. * cgraphbuild.c (cgraph_rebuild_references): Remove usage of ENTRY_BLOCK_PTR macro. (rebuild_cgraph_edges): Likewise. * cgraphunit.c (init_lowered_empty_function): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (expand_thunk): Remove usage of EXIT_BLOCK_PTR macro. * combine.c (get_last_value): Remove usage of ENTRY_BLOCK_PTR macro. (distribute_links): Remove usage of EXIT_BLOCK_PTR macro. (get_last_value_validate): Remove usage of ENTRY_BLOCK_PTR macro. (try_combine): Remove usage of EXIT_BLOCK_PTR macro. (reg_num_sign_bit_copies_for_combine): Remove usage of ENTRY_BLOCK_PTR macro. (reg_nonzero_bits_for_combine): Likewise. (set_nonzero_bits_and_sign_copies): Likewise. (combine_instructions): Likewise. * cprop.c (one_cprop_pass): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (bypass_conditional_jumps): Likewise. (bypass_block): Remove usage of EXIT_BLOCK_PTR macro. (find_implicit_sets): Likewise. (cprop_jump): Likewise. * cse.c (cse_cc_succs): Likewise. (cse_find_path): Likewise. * df-problems.c (df_lr_confluence_0): Likewise. * df-scan.c (df_entry_block_defs_collect): Remove usage of ENTRY_BLOCK_PTR macro. (df_exit_block_uses_collect): Remove usage of EXIT_BLOCK_PTR macro. * dominance.c (iterate_fix_dominators): Remove usage of ENTRY_BLOCK_PTR macro. (calc_idoms): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (determine_dominators_for_sons): Remove usage of ENTRY_BLOCK_PTR macro. (calc_dfs_tree): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (prune_bbs_to_update_dominators): Remove usage of ENTRY_BLOCK_PTR macro. (calc_dfs_tree_nonrec): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * domwalk.c (cmp_bb_postorder): Likewise. * dse.c (dse_step1): Remove usage of EXIT_BLOCK_PTR macro. * except.c (finish_eh_generation): Remove usage of ENTRY_BLOCK_PTR macro. (sjlj_emit_function_enter): Likewise. * final.c (compute_alignments): Likewise. * function.c (thread_prologue_and_epilogue_insns): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (reposition_prologue_and_epilogue_notes): Remove usage of EXIT_BLOCK_PTR macro. (convert_jumps_to_returns): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (regno_clobbered_at_setjmp): Remove usage of ENTRY_BLOCK_PTR macro. (next_block_for_reg): Remove usage of EXIT_BLOCK_PTR macro. * gcse.c (hoist_code): Remove usage of ENTRY_BLOCK_PTR macro. (update_bb_reg_pressure): Remove usage of EXIT_BLOCK_PTR macro. (compute_code_hoist_vbeinout): Likewise. (should_hoist_expr_to_dom): Remove usage of ENTRY_BLOCK_PTR macro. (pre_expr_reaches_here_p_work): Likewise. * gimple-iterator.c (gsi_commit_edge_inserts): Likewise. (gimple_find_edge_insert_loc): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * gimple-ssa-strength-reduction.c (slsr_process_phi): Remove usage of ENTRY_BLOCK_PTR macro. * graph.c (draw_cfg_nodes_for_loop): Remove usage of EXIT_BLOCK_PTR macro. * graphite-clast-to-gimple.c (translate_clast_user): Remove usage of ENTRY_BLOCK_PTR macro. * graphite-scop-detection.c (build_scops): Likewise. (create_sese_edges): Remove usage of EXIT_BLOCK_PTR macro. (scopdet_basic_block_info): Remove usage of ENTRY_BLOCK_PTR macro. * haifa-sched.c (restore_bb_notes): Remove usage of EXIT_BLOCK_PTR macro. (unlink_bb_notes): Likewise. (create_check_block_twin): Likewise. (init_before_recovery): Likewise. (sched_extend_bb): Likewise. (priority): Likewise. * hw-doloop.c (reorder_loops): Likewise. (discover_loop): Likewise. * ifcvt.c (dead_or_predicable): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (find_if_case_1): Remove usage of EXIT_BLOCK_PTR macro. (block_has_only_trap): Likewise. (cond_exec_find_if_block): Likewise. (merge_if_block): Likewise. * ipa-inline-analysis.c (param_change_prob): Remove usage of ENTRY_BLOCK_PTR macro. (record_modified): Likewise. * ipa-pure-const.c (execute_warn_function_noreturn): Remove usage of EXIT_BLOCK_PTR macro. (local_pure_const): Likewise. * ipa-split.c (split_function): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (find_split_points): Likewise. (consider_split): Likewise. (find_return_bb): Remove usage of EXIT_BLOCK_PTR macro. (verify_non_ssa_vars): Remove usage of ENTRY_BLOCK_PTR macro. * ira-build.c (ira_loop_tree_body_rev_postorder): Likewise. * ira-color.c (print_loop_title): Remove usage of EXIT_BLOCK_PTR macro. * ira-emit.c (entered_from_non_parent_p): Remove usage of ENTRY_BLOCK_PTR macro. (ira_emit): Remove usage of EXIT_BLOCK_PTR macro. * ira-int.h (ira_assert): Remove usage of ENTRY_BLOCK_PTR macro. * ira.c (split_live_ranges_for_shrink_wrap): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * lcm.c (compute_rev_insert_delete): Remove usage of ENTRY_BLOCK_PTR macro. (compute_nearerout): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (compute_farthest): Likewise. (compute_available): Likewise. (compute_insert_delete): Remove usage of EXIT_BLOCK_PTR macro. (compute_laterin): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (compute_earliest): Likewise. (compute_antinout_edge): Likewise. * loop-iv.c (simplify_using_initial_values): Remove usage of ENTRY_BLOCK_PTR macro. * loop-unswitch.c (unswitch_loop): Remove usage of EXIT_BLOCK_PTR macro. * lra-assigns.c (find_hard_regno_for): Remove usage of ENTRY_BLOCK_PTR macro. * lra-constraints.c (lra_inheritance): Remove usage of EXIT_BLOCK_PTR macro. * lra-lives.c (lra_create_live_ranges): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * lra.c (has_nonexceptional_receiver): Remove usage of EXIT_BLOCK_PTR macro. * lto-streamer-in.c (input_function): Remove usage of ENTRY_BLOCK_PTR macro. * lto-streamer-out.c (output_cfg): Likewise. * mcf.c (adjust_cfg_counts): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (create_fixup_graph): Remove usage of ENTRY_BLOCK_PTR macro. * mode-switching.c (optimize_mode_switching): Likewise. (create_pre_exit): Remove usage of EXIT_BLOCK_PTR macro. * modulo-sched.c (rest_of_handle_sms): Likewise. (canon_loop): Likewise. * omp-low.c (build_omp_regions): Remove usage of ENTRY_BLOCK_PTR macro. * postreload-gcse.c (eliminate_partially_redundant_loads): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * predict.c (rebuild_frequencies): Remove usage of ENTRY_BLOCK_PTR macro. (propagate_freq): Remove usage of EXIT_BLOCK_PTR macro. (estimate_bb_frequencies): Remove usage of ENTRY_BLOCK_PTR macro. (tree_estimate_probability_bb): Remove usage of EXIT_BLOCK_PTR macro. (expensive_function_p): Remove usage of ENTRY_BLOCK_PTR macro. (tree_bb_level_predictions): Remove usage of EXIT_BLOCK_PTR macro. (counts_to_freqs): Remove usage of ENTRY_BLOCK_PTR macro. (apply_return_prediction): Remove usage of EXIT_BLOCK_PTR macro. (estimate_loops): Remove usage of ENTRY_BLOCK_PTR macro. (gimple_predict_edge): Likewise. (probably_never_executed): Likewise. * profile.c (find_spanning_tree): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (branch_prob): Likewise. (compute_branch_probabilities): Likewise. (compute_frequency_overlap): Remove usage of ENTRY_BLOCK_PTR macro. (is_inconsistent): Remove usage of EXIT_BLOCK_PTR macro. (read_profile_edge_counts): Remove usage of ENTRY_BLOCK_PTR macro. (set_bb_counts): Likewise. (correct_negative_edge_counts): Likewise. (get_exec_counts): Likewise. (instrument_values): Likewise. (instrument_edges): Likewise. * reg-stack.c (convert_regs): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (compensate_edges): Remove usage of ENTRY_BLOCK_PTR macro. (convert_regs_exit): Remove usage of EXIT_BLOCK_PTR macro. (convert_regs_entry): Remove usage of ENTRY_BLOCK_PTR macro. (reg_to_stack): Likewise. * regs.h (REG_N_SETS): Likewise. * reload.c (find_dummy_reload): Likewise. (combine_reloads): Likewise. (push_reload): Likewise. * reload1.c (has_nonexceptional_receiver): Remove usage of EXIT_BLOCK_PTR macro. * resource.c (mark_target_live_regs): Remove usage of ENTRY_BLOCK_PTR macro. (find_basic_block): Likewise. * sched-ebb.c (ebb_add_block): Remove usage of EXIT_BLOCK_PTR macro. (schedule_ebbs): Likewise. * sched-int.h (sel_sched_p): Likewise. * sched-rgn.c (compute_dom_prob_ps): Remove usage of ENTRY_BLOCK_PTR macro. (rgn_add_block): Remove usage of EXIT_BLOCK_PTR macro. (haifa_find_rgns): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (propagate_deps): Remove usage of EXIT_BLOCK_PTR macro. (extend_rgns): Likewise. (find_single_block_region): Likewise. * sel-sched-ir.c (sel_remove_loop_preheader): Remove usage of ENTRY_BLOCK_PTR macro. (setup_nop_and_exit_insns): Remove usage of EXIT_BLOCK_PTR macro. (sel_create_recovery_block): Likewise. (bb_ends_ebb_p): Likewise. (sel_bb_end): Likewise. (sel_bb_head): Likewise. (free_lv_sets): Likewise. (init_lv_sets): Likewise. (tidy_control_flow): Likewise. (maybe_tidy_empty_bb): Likewise. * sel-sched-ir.h (_succ_iter_cond): Likewise. (_succ_iter_start): Likewise. (sel_bb_empty_or_nop_p): Likewise. (get_loop_exit_edges_unique_dests): Likewise. (inner_loop_header_p): Likewise. * sel-sched.c (create_block_for_bookkeeping): Likewise. (find_block_for_bookkeeping): Likewise. * store-motion.c (remove_reachable_equiv_notes): Likewise. (insert_store): Likewise. * trans-mem.c (ipa_tm_transform_clone): Remove usage of ENTRY_BLOCK_PTR macro. (tm_memopt_compute_available): Remove usage of EXIT_BLOCK_PTR macro. (ipa_tm_scan_irr_function): Remove usage of ENTRY_BLOCK_PTR macro. (gate_tm_init): Likewise. (tm_region_init): Likewise. * tree-cfg.c (execute_fixup_cfg): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (execute_warn_function_return): Remove usage of EXIT_BLOCK_PTR macro. (split_critical_edges): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (print_loops): Remove usage of ENTRY_BLOCK_PTR macro. (move_sese_region_to_fn): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (gimple_redirect_edge_and_branch): Remove usage of ENTRY_BLOCK_PTR macro. (gimple_verify_flow_info): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (remove_edge_and_dominated_blocks): Remove usage of EXIT_BLOCK_PTR macro. (make_edges): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (gimple_flow_call_edges_add): Remove usage of EXIT_BLOCK_PTR macro. (make_blocks): Remove usage of ENTRY_BLOCK_PTR macro. (build_gimple_cfg): Likewise. (gimple_duplicate_bb): Remove usage of EXIT_BLOCK_PTR macro. (gimple_can_merge_blocks_p): Likewise. * tree-cfgcleanup.c (tree_forwarder_block_p): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * tree-complex.c (update_parameter_components): Remove usage of ENTRY_BLOCK_PTR macro. * tree-if-conv.c (get_loop_body_in_if_conv_order): Remove usage of EXIT_BLOCK_PTR macro. * tree-inline.c (tree_function_versioning): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (delete_unreachable_blocks_update_callgraph): Likewise. (initialize_cfun): Likewise. (copy_cfg_body): Remove usage of ENTRY_BLOCK_PTR macro. (copy_edges_for_bb): Remove usage of EXIT_BLOCK_PTR macro. (remap_ssa_name): Remove usage of ENTRY_BLOCK_PTR macro. * tree-into-ssa.c (update_ssa): Likewise. (maybe_register_def): Remove usage of EXIT_BLOCK_PTR macro. (insert_updated_phi_nodes_for): Remove usage of ENTRY_BLOCK_PTR macro. (rewrite_into_ssa): Likewise. (rewrite_debug_stmt_uses): Likewise. * tree-outof-ssa.c (expand_phi_nodes): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * tree-profile.c (gimple_gen_ic_func_profiler): Remove usage of ENTRY_BLOCK_PTR macro. * tree-scalar-evolution.h (block_before_loop): Likewise. * tree-sra.c (sra_ipa_reset_debug_stmts): Likewise. (dump_dereferences_table): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (analyze_caller_dereference_legality): Remove usage of ENTRY_BLOCK_PTR macro. (propagate_dereference_distances): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (initialize_parameter_reductions): Remove usage of ENTRY_BLOCK_PTR macro. * tree-ssa-ccp.c (gsi_prev_dom_bb_nondebug): Likewise. (optimize_stack_restore): Remove usage of EXIT_BLOCK_PTR macro. * tree-ssa-coalesce.c (create_outofssa_var_map): Likewise. * tree-ssa-dce.c (eliminate_unnecessary_stmts): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (remove_dead_stmt): Remove usage of EXIT_BLOCK_PTR macro. (propagate_necessity): Remove usage of ENTRY_BLOCK_PTR macro. (mark_control_dependent_edges_necessary): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * tree-ssa-dom.c (eliminate_degenerate_phis): Remove usage of ENTRY_BLOCK_PTR macro. (tree_ssa_dominator_optimize): Remove usage of EXIT_BLOCK_PTR macro. * tree-ssa-live.c (verify_live_on_entry): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (calculate_live_on_exit): Likewise. (set_var_live_on_entry): Remove usage of ENTRY_BLOCK_PTR macro. (loe_visit_block): Likewise. * tree-ssa-live.h (live_on_exit): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (live_on_entry): Likewise. * tree-ssa-loop-ivopts.c (find_interesting_uses): Remove usage of EXIT_BLOCK_PTR macro. * tree-ssa-loop-manip.c (compute_live_loop_exits): Remove usage of ENTRY_BLOCK_PTR macro. * tree-ssa-loop-niter.c (simplify_using_initial_conditions): Likewise. (bound_difference): Likewise. * tree-ssa-loop-prefetch.c (may_use_storent_in_loop_p): Remove usage of EXIT_BLOCK_PTR macro. * tree-ssa-loop-unswitch.c (simplify_using_entry_checks): Remove usage of ENTRY_BLOCK_PTR macro. * tree-ssa-math-opts.c (register_division_in): Likewise. * tree-ssa-phiprop.c (tree_ssa_phiprop): Likewise. * tree-ssa-pre.c (compute_avail): Likewise. (compute_antic): Remove usage of EXIT_BLOCK_PTR macro. (insert): Remove usage of ENTRY_BLOCK_PTR macro. * tree-ssa-propagate.c (ssa_prop_init): Likewise. (simulate_block): Remove usage of EXIT_BLOCK_PTR macro. (cfg_blocks_add): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (add_control_edge): Remove usage of EXIT_BLOCK_PTR macro. * tree-ssa-reassoc.c (do_reassoc): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (build_and_add_sum): Remove usage of ENTRY_BLOCK_PTR macro. * tree-ssa-sink.c (nearest_common_dominator_of_uses): Likewise. (execute_sink_code): Remove usage of EXIT_BLOCK_PTR macro. * tree-ssa-uninit.c (find_dom): Remove usage of ENTRY_BLOCK_PTR macro. (compute_control_dep_chain): Remove usage of EXIT_BLOCK_PTR macro. (find_pdom): Likewise. (warn_uninitialized_vars): Remove usage of ENTRY_BLOCK_PTR macro. * tree-stdarg.c (reachable_at_most_once): Likewise. * tree-tailcall.c (tree_optimize_tail_calls_1): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (eliminate_tail_call): Likewise. * tsan.c (instrument_func_entry): Remove usage of ENTRY_BLOCK_PTR macro. (instrument_func_exit): Remove usage of EXIT_BLOCK_PTR macro. * var-tracking.c (vt_initialize): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (vt_add_function_parameter): Remove usage of ENTRY_BLOCK_PTR macro. (vt_find_locations): Remove usage of EXIT_BLOCK_PTR macro. (vt_stack_adjustments): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * varasm.c (assemble_start_function): Remove usage of ENTRY_BLOCK_PTR macro. * config/bfin/bfin.c (hwloop_optimize): Likewise. * config/nds32/nds32.c (nds32_fp_as_gp_check_available): Remove usage of EXIT_BLOCK_PTR macro. * config/arm/arm.c (require_pic_register): Remove usage of ENTRY_BLOCK_PTR macro. (arm_r3_live_at_start_p): Likewise. (any_sibcall_could_use_r3): Remove usage of EXIT_BLOCK_PTR macro. * config/rs6000/rs6000.c (rs6000_emit_prologue): Likewise. * config/frv/frv.c (frv_optimize_membar_global): Likewise. * config/alpha/alpha.c (alpha_gp_save_rtx): Remove usage of ENTRY_BLOCK_PTR macro. * config/i386/i386.c (ix86_count_insn): Likewise. (ix86_seh_fixup_eh_fallthru): Remove usage of EXIT_BLOCK_PTR macro. (ix86_pad_short_function): Likewise. (ix86_compute_frame_layout): Remove usage of ENTRY_BLOCK_PTR macro. (ix86_pad_returns): Remove usage of EXIT_BLOCK_PTR macro. (ix86_eax_live_at_start_p): Remove usage of ENTRY_BLOCK_PTR macro. (add_condition_to_bb): Remove usage of EXIT_BLOCK_PTR macro. (ix86_expand_epilogue): Likewise. * config/ia64/ia64.c (ia64_asm_unwind_emit): Likewise. (ia64_expand_prologue): Likewise. From-SVN: r205055
2013-11-19 22:57:13 +01:00
|| (!bitmap_bit_p (DF_LR_OUT (ENTRY_BLOCK_PTR_FOR_FN (cfun)),
ORIGINAL_REGNO (XEXP (note, 0)))
&& hard_regno_nregs[regno][GET_MODE (XEXP (note, 0))] == 1)))
1992-02-28 11:23:25 +01:00
{
rld[output_reload].reg_rtx
= gen_rtx_REG (rld[output_reload].outmode, regno);
1992-02-28 11:23:25 +01:00
return;
}
}
/* Try to find a reload register for an in-out reload (expressions IN and OUT).
See if one of IN and OUT is a register that may be used;
this is desirable since a spill-register won't be needed.
If so, return the register rtx that proves acceptable.
INLOC and OUTLOC are locations where IN and OUT appear in the insn.
RCLASS is the register class required for the reload.
1992-02-28 11:23:25 +01:00
If FOR_REAL is >= 0, it is the number of the reload,
and in some cases when it can be discovered that OUT doesn't need
to be computed, clear out rld[FOR_REAL].out.
1992-02-28 11:23:25 +01:00
If FOR_REAL is -1, this should not be done, because this call
is just to see if a register can be found, not to find and install it.
EARLYCLOBBER is nonzero if OUT is an earlyclobber operand. This
puts an additional constraint on being able to use IN for OUT since
IN must not appear elsewhere in the insn (it is assumed that IN itself
is safe from the earlyclobber). */
1992-02-28 11:23:25 +01:00
static rtx
find_dummy_reload (rtx real_in, rtx real_out, rtx *inloc, rtx *outloc,
enum machine_mode inmode, enum machine_mode outmode,
reg_class_t rclass, int for_real, int earlyclobber)
1992-02-28 11:23:25 +01:00
{
rtx in = real_in;
rtx out = real_out;
int in_offset = 0;
int out_offset = 0;
rtx value = 0;
/* If operands exceed a word, we can't use either of them
unless they have the same size. */
if (GET_MODE_SIZE (outmode) != GET_MODE_SIZE (inmode)
&& (GET_MODE_SIZE (outmode) > UNITS_PER_WORD
|| GET_MODE_SIZE (inmode) > UNITS_PER_WORD))
1992-02-28 11:23:25 +01:00
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
/* Note that {in,out}_offset are needed only when 'in' or 'out'
respectively refers to a hard register. */
1992-02-28 11:23:25 +01:00
/* Find the inside of any subregs. */
while (GET_CODE (out) == 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
if (REG_P (SUBREG_REG (out))
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_REG (out)) < FIRST_PSEUDO_REGISTER)
out_offset += subreg_regno_offset (REGNO (SUBREG_REG (out)),
GET_MODE (SUBREG_REG (out)),
SUBREG_BYTE (out),
GET_MODE (out));
1992-02-28 11:23:25 +01:00
out = SUBREG_REG (out);
}
while (GET_CODE (in) == 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
if (REG_P (SUBREG_REG (in))
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_REG (in)) < FIRST_PSEUDO_REGISTER)
in_offset += subreg_regno_offset (REGNO (SUBREG_REG (in)),
GET_MODE (SUBREG_REG (in)),
SUBREG_BYTE (in),
GET_MODE (in));
1992-02-28 11:23:25 +01:00
in = SUBREG_REG (in);
}
/* Narrow down the reg class, the same way push_reload will;
otherwise we might find a dummy now, but push_reload won't. */
{
reg_class_t preferred_class = targetm.preferred_reload_class (in, rclass);
if (preferred_class != NO_REGS)
rclass = (enum reg_class) preferred_class;
}
1992-02-28 11:23:25 +01:00
/* See if OUT will do. */
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 (out)
1992-02-28 11:23:25 +01:00
&& REGNO (out) < FIRST_PSEUDO_REGISTER)
{
* 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 (out) + out_offset;
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
unsigned int nwords = hard_regno_nregs[regno][outmode];
rtx saved_rtx;
1992-02-28 11:23:25 +01:00
/* When we consider whether the insn uses OUT,
ignore references within IN. They don't prevent us
from copying IN into OUT, because those refs would
move into the insn that reloads IN.
However, we only ignore IN in its role as this reload.
If the insn uses IN elsewhere and it contains OUT,
that counts. We can't be sure it's the "same" operand
so it might not go through this reload.
We also need to avoid using OUT if it, or part of it, is a
fixed register. Modifying such registers, even transiently,
may have undefined effects on the machine, such as modifying
the stack pointer. */
saved_rtx = *inloc;
1992-02-28 11:23:25 +01:00
*inloc = const0_rtx;
if (regno < FIRST_PSEUDO_REGISTER
&& HARD_REGNO_MODE_OK (regno, outmode)
1992-02-28 11:23:25 +01:00
&& ! refers_to_regno_for_reload_p (regno, regno + nwords,
PATTERN (this_insn), outloc))
{
* 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;
1992-02-28 11:23:25 +01:00
for (i = 0; i < nwords; i++)
if (! TEST_HARD_REG_BIT (reg_class_contents[(int) rclass],
regno + i)
|| fixed_regs[regno + i])
1992-02-28 11:23:25 +01:00
break;
if (i == nwords)
{
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 (real_out))
1992-02-28 11:23:25 +01:00
value = real_out;
else
value = gen_rtx_REG (outmode, regno);
1992-02-28 11:23:25 +01:00
}
}
*inloc = saved_rtx;
1992-02-28 11:23:25 +01:00
}
/* Consider using IN if OUT was not acceptable
or if OUT dies in this insn (like the quotient in a divmod insn).
We can't use IN unless it is dies in this insn,
which means we must know accurately which hard regs are live.
Also, the result can't go in IN if IN is used within OUT,
or if OUT is an earlyclobber and IN appears elsewhere in the insn. */
1992-02-28 11:23:25 +01:00
if (hard_regs_live_known
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 (in)
1992-02-28 11:23:25 +01:00
&& REGNO (in) < FIRST_PSEUDO_REGISTER
&& (value == 0
|| find_reg_note (this_insn, REG_UNUSED, real_out))
&& find_reg_note (this_insn, REG_DEAD, real_in)
&& !fixed_regs[REGNO (in)]
&& HARD_REGNO_MODE_OK (REGNO (in),
/* The only case where out and real_out might
have different modes is where real_out
is a subreg, and in that case, out
has a real mode. */
(GET_MODE (out) != VOIDmode
? GET_MODE (out) : outmode))
&& (ORIGINAL_REGNO (in) < FIRST_PSEUDO_REGISTER
/* However only do this if we can be sure that this input
operand doesn't correspond with an uninitialized pseudo.
global can assign some hardreg to it that is the same as
the one assigned to a different, also live pseudo (as it
can ignore the conflict). We must never introduce writes
to such hardregs, as they would clobber the other live
pseudo. See PR 20973. */
Eliminate ENTRY_BLOCK_PTR and EXIT_BLOCK_PTR macros gcc/ * basic-block.h (ENTRY_BLOCK_PTR_FOR_FUNCTION): Rename macro to... (EXIT_BLOCK_PTR_FOR_FUNCTION): ...this. (ENTRY_BLOCK_PTR_FOR_FN): Renamed macro to... (EXIT_BLOCK_PTR_FOR_FN): ...this. (ENTRY_BLOCK_PTR): Eliminate macro as work towards making uses of cfun be explicit. (EXIT_BLOCK_PTR): Likewise. (FOR_ALL_BB): Rework for now to eliminate use of "ENTRY_BLOCK_PTR". (FOR_ALL_BB_FN): Update for renaming of "ENTRY_BLOCK_PTR_FOR_FUNCTION" to "ENTRY_BLOCK_PTR_FOR_FN". * cfg.c (init_flow): Likewise. (check_bb_profile): Likewise. * cfganal.c (pre_and_rev_post_order_compute_fn): Likewise. * cfgcleanup.c (walk_to_nondebug_insn): Likewise. * cfghooks.c (account_profile_record): Likewise. * cfgloop.c (init_loops_structure): Likewise. * cgraphbuild.c (record_eh_tables): Likewise. (compute_call_stmt_bb_frequency): Likewise. * ipa-inline-analysis.c (compute_bb_predicates): Likewise. * lto-streamer-in.c (input_cfg): Likewise. * predict.c (maybe_hot_frequency_p): Likewise. * tree-cfg.c (init_empty_tree_cfg_for_function): Likewise. * tree-inline.c (initialize_cfun): Likewise. (copy_cfg_body): Likewise. (copy_body): Likewise. (tree_function_versioning): Likewise. * bb-reorder.c (add_labels_and_missing_jumps): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (duplicate_computed_gotos): Remove usage of EXIT_BLOCK_PTR macro. (find_rarely_executed_basic_blocks_and_crossing_edges): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (connect_traces): Likewise. (rest_of_handle_reorder_blocks): Remove usage of EXIT_BLOCK_PTR macro. (bb_to_key): Remove usage of ENTRY_BLOCK_PTR macro. (fix_crossing_conditional_branches): Remove usage of EXIT_BLOCK_PTR macro. (find_traces_1_round): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (fix_up_fall_thru_edges): Remove usage of EXIT_BLOCK_PTR macro. (find_traces): Remove usage of ENTRY_BLOCK_PTR macro. (fix_up_crossing_landing_pad): Remove usage of EXIT_BLOCK_PTR macro. (rotate_loop): Likewise. * bt-load.c (migrate_btr_def): Remove usage of ENTRY_BLOCK_PTR macro. * cfg.c (clear_aux_for_edges): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (alloc_aux_for_edges): Likewise. (clear_bb_flags): Remove usage of ENTRY_BLOCK_PTR macro. (cached_make_edge): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (compact_blocks): Likewise. (clear_edges): Likewise. * cfganal.c (single_pred_before_succ_order): Remove usage of ENTRY_BLOCK_PTR macro. (bitmap_union_of_succs): Remove usage of EXIT_BLOCK_PTR macro. (bitmap_union_of_preds): Remove usage of ENTRY_BLOCK_PTR macro. (bitmap_intersection_of_succs): Remove usage of EXIT_BLOCK_PTR macro. (bitmap_intersection_of_preds): Remove usage of ENTRY_BLOCK_PTR macro. (inverted_post_order_compute): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (compute_dominance_frontiers_1): Remove usage of ENTRY_BLOCK_PTR macro. (post_order_compute): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (connect_infinite_loops_to_exit): Remove usage of EXIT_BLOCK_PTR macro. (remove_fake_edges): Remove usage of ENTRY_BLOCK_PTR macro. (add_noreturn_fake_exit_edges): Remove usage of EXIT_BLOCK_PTR macro. (find_pdom): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (remove_fake_exit_edges): Remove usage of EXIT_BLOCK_PTR macro. (verify_edge_list): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (print_edge_list): Likewise. (create_edge_list): Likewise. (find_unreachable_blocks): Remove usage of ENTRY_BLOCK_PTR macro. (mark_dfs_back_edges): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * cfgbuild.c (find_bb_boundaries): Remove usage of ENTRY_BLOCK_PTR macro. (find_many_sub_basic_blocks): Remove usage of EXIT_BLOCK_PTR macro. (make_edges): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * cfgcleanup.c (delete_unreachable_blocks): Likewise. (try_optimize_cfg): Likewise. (try_head_merge_bb): Remove usage of EXIT_BLOCK_PTR macro. (try_crossjump_to_edge): Remove usage of ENTRY_BLOCK_PTR macro. (try_crossjump_bb): Remove usage of EXIT_BLOCK_PTR macro. (merge_blocks_move): Remove usage of ENTRY_BLOCK_PTR macro. (outgoing_edges_match): Remove usage of EXIT_BLOCK_PTR macro. (try_forward_edges): Likewise. (try_simplify_condjump): Likewise. * cfgexpand.c (gimple_expand_cfg): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (construct_exit_block): Remove usage of EXIT_BLOCK_PTR macro. (construct_init_block): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (expand_gimple_basic_block): Remove usage of EXIT_BLOCK_PTR macro. (expand_gimple_tailcall): Likewise. * cfghooks.c (can_duplicate_block_p): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (tidy_fallthru_edges): Likewise. (verify_flow_info): Likewise. * cfgloop.c (flow_bb_inside_loop_p): Likewise. (num_loop_branches): Remove usage of EXIT_BLOCK_PTR macro. (disambiguate_multiple_latches): Remove usage of ENTRY_BLOCK_PTR macro. (get_loop_exit_edges): Remove usage of EXIT_BLOCK_PTR macro. (bb_loop_header_p): Remove usage of ENTRY_BLOCK_PTR macro. (get_loop_body_in_bfs_order): Remove usage of EXIT_BLOCK_PTR macro. (get_loop_body_in_dom_order): Likewise. (get_loop_body): Likewise. * cfgloopanal.c (mark_irreducible_loops): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * cfgloopmanip.c (create_preheader): Remove usage of ENTRY_BLOCK_PTR macro. (remove_path): Remove usage of EXIT_BLOCK_PTR macro. (fix_bb_placement): Likewise. * cfgrtl.c (rtl_block_empty_p): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (rtl_can_remove_branch_p): Remove usage of EXIT_BLOCK_PTR macro. (cfg_layout_split_edge): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (rtl_flow_call_edges_add): Remove usage of EXIT_BLOCK_PTR macro. (cfg_layout_can_merge_blocks_p): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (cfg_layout_redirect_edge_and_branch): Remove usage of ENTRY_BLOCK_PTR macro. (fixup_fallthru_exit_predecessor): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (fixup_reorder_chain): Likewise. (relink_block_chain): Likewise. (cfg_layout_delete_block): Remove usage of EXIT_BLOCK_PTR macro. (rtl_verify_bb_layout): Remove usage of ENTRY_BLOCK_PTR macro. (cfg_layout_duplicate_bb): Remove usage of EXIT_BLOCK_PTR macro. (force_one_exit_fallthru): Likewise. (rtl_verify_fallthru): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (rtl_verify_edges): Likewise. (commit_edge_insertions): Likewise. (commit_one_edge_insertion): Likewise. (rtl_split_edge): Likewise. (force_nonfallthru_and_redirect): Likewise. (outof_cfg_layout_mode): Remove usage of EXIT_BLOCK_PTR macro. (skip_insns_after_block): Likewise. (fixup_partition_crossing): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (purge_dead_edges): Remove usage of EXIT_BLOCK_PTR macro. (rtl_can_merge_blocks): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (contains_no_active_insn_p): Likewise. (emit_insn_at_entry): Remove usage of ENTRY_BLOCK_PTR macro. (entry_of_function): Likewise. (last_bb_in_partition): Remove usage of EXIT_BLOCK_PTR macro. (fixup_new_cold_bb): Likewise. (patch_jump_insn): Likewise. (try_redirect_by_replacing_jump): Likewise. (block_label): Likewise. (could_fall_through): Likewise. (can_fallthru): Likewise. * cgraphbuild.c (cgraph_rebuild_references): Remove usage of ENTRY_BLOCK_PTR macro. (rebuild_cgraph_edges): Likewise. * cgraphunit.c (init_lowered_empty_function): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (expand_thunk): Remove usage of EXIT_BLOCK_PTR macro. * combine.c (get_last_value): Remove usage of ENTRY_BLOCK_PTR macro. (distribute_links): Remove usage of EXIT_BLOCK_PTR macro. (get_last_value_validate): Remove usage of ENTRY_BLOCK_PTR macro. (try_combine): Remove usage of EXIT_BLOCK_PTR macro. (reg_num_sign_bit_copies_for_combine): Remove usage of ENTRY_BLOCK_PTR macro. (reg_nonzero_bits_for_combine): Likewise. (set_nonzero_bits_and_sign_copies): Likewise. (combine_instructions): Likewise. * cprop.c (one_cprop_pass): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (bypass_conditional_jumps): Likewise. (bypass_block): Remove usage of EXIT_BLOCK_PTR macro. (find_implicit_sets): Likewise. (cprop_jump): Likewise. * cse.c (cse_cc_succs): Likewise. (cse_find_path): Likewise. * df-problems.c (df_lr_confluence_0): Likewise. * df-scan.c (df_entry_block_defs_collect): Remove usage of ENTRY_BLOCK_PTR macro. (df_exit_block_uses_collect): Remove usage of EXIT_BLOCK_PTR macro. * dominance.c (iterate_fix_dominators): Remove usage of ENTRY_BLOCK_PTR macro. (calc_idoms): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (determine_dominators_for_sons): Remove usage of ENTRY_BLOCK_PTR macro. (calc_dfs_tree): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (prune_bbs_to_update_dominators): Remove usage of ENTRY_BLOCK_PTR macro. (calc_dfs_tree_nonrec): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * domwalk.c (cmp_bb_postorder): Likewise. * dse.c (dse_step1): Remove usage of EXIT_BLOCK_PTR macro. * except.c (finish_eh_generation): Remove usage of ENTRY_BLOCK_PTR macro. (sjlj_emit_function_enter): Likewise. * final.c (compute_alignments): Likewise. * function.c (thread_prologue_and_epilogue_insns): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (reposition_prologue_and_epilogue_notes): Remove usage of EXIT_BLOCK_PTR macro. (convert_jumps_to_returns): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (regno_clobbered_at_setjmp): Remove usage of ENTRY_BLOCK_PTR macro. (next_block_for_reg): Remove usage of EXIT_BLOCK_PTR macro. * gcse.c (hoist_code): Remove usage of ENTRY_BLOCK_PTR macro. (update_bb_reg_pressure): Remove usage of EXIT_BLOCK_PTR macro. (compute_code_hoist_vbeinout): Likewise. (should_hoist_expr_to_dom): Remove usage of ENTRY_BLOCK_PTR macro. (pre_expr_reaches_here_p_work): Likewise. * gimple-iterator.c (gsi_commit_edge_inserts): Likewise. (gimple_find_edge_insert_loc): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * gimple-ssa-strength-reduction.c (slsr_process_phi): Remove usage of ENTRY_BLOCK_PTR macro. * graph.c (draw_cfg_nodes_for_loop): Remove usage of EXIT_BLOCK_PTR macro. * graphite-clast-to-gimple.c (translate_clast_user): Remove usage of ENTRY_BLOCK_PTR macro. * graphite-scop-detection.c (build_scops): Likewise. (create_sese_edges): Remove usage of EXIT_BLOCK_PTR macro. (scopdet_basic_block_info): Remove usage of ENTRY_BLOCK_PTR macro. * haifa-sched.c (restore_bb_notes): Remove usage of EXIT_BLOCK_PTR macro. (unlink_bb_notes): Likewise. (create_check_block_twin): Likewise. (init_before_recovery): Likewise. (sched_extend_bb): Likewise. (priority): Likewise. * hw-doloop.c (reorder_loops): Likewise. (discover_loop): Likewise. * ifcvt.c (dead_or_predicable): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (find_if_case_1): Remove usage of EXIT_BLOCK_PTR macro. (block_has_only_trap): Likewise. (cond_exec_find_if_block): Likewise. (merge_if_block): Likewise. * ipa-inline-analysis.c (param_change_prob): Remove usage of ENTRY_BLOCK_PTR macro. (record_modified): Likewise. * ipa-pure-const.c (execute_warn_function_noreturn): Remove usage of EXIT_BLOCK_PTR macro. (local_pure_const): Likewise. * ipa-split.c (split_function): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (find_split_points): Likewise. (consider_split): Likewise. (find_return_bb): Remove usage of EXIT_BLOCK_PTR macro. (verify_non_ssa_vars): Remove usage of ENTRY_BLOCK_PTR macro. * ira-build.c (ira_loop_tree_body_rev_postorder): Likewise. * ira-color.c (print_loop_title): Remove usage of EXIT_BLOCK_PTR macro. * ira-emit.c (entered_from_non_parent_p): Remove usage of ENTRY_BLOCK_PTR macro. (ira_emit): Remove usage of EXIT_BLOCK_PTR macro. * ira-int.h (ira_assert): Remove usage of ENTRY_BLOCK_PTR macro. * ira.c (split_live_ranges_for_shrink_wrap): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * lcm.c (compute_rev_insert_delete): Remove usage of ENTRY_BLOCK_PTR macro. (compute_nearerout): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (compute_farthest): Likewise. (compute_available): Likewise. (compute_insert_delete): Remove usage of EXIT_BLOCK_PTR macro. (compute_laterin): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (compute_earliest): Likewise. (compute_antinout_edge): Likewise. * loop-iv.c (simplify_using_initial_values): Remove usage of ENTRY_BLOCK_PTR macro. * loop-unswitch.c (unswitch_loop): Remove usage of EXIT_BLOCK_PTR macro. * lra-assigns.c (find_hard_regno_for): Remove usage of ENTRY_BLOCK_PTR macro. * lra-constraints.c (lra_inheritance): Remove usage of EXIT_BLOCK_PTR macro. * lra-lives.c (lra_create_live_ranges): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * lra.c (has_nonexceptional_receiver): Remove usage of EXIT_BLOCK_PTR macro. * lto-streamer-in.c (input_function): Remove usage of ENTRY_BLOCK_PTR macro. * lto-streamer-out.c (output_cfg): Likewise. * mcf.c (adjust_cfg_counts): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (create_fixup_graph): Remove usage of ENTRY_BLOCK_PTR macro. * mode-switching.c (optimize_mode_switching): Likewise. (create_pre_exit): Remove usage of EXIT_BLOCK_PTR macro. * modulo-sched.c (rest_of_handle_sms): Likewise. (canon_loop): Likewise. * omp-low.c (build_omp_regions): Remove usage of ENTRY_BLOCK_PTR macro. * postreload-gcse.c (eliminate_partially_redundant_loads): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * predict.c (rebuild_frequencies): Remove usage of ENTRY_BLOCK_PTR macro. (propagate_freq): Remove usage of EXIT_BLOCK_PTR macro. (estimate_bb_frequencies): Remove usage of ENTRY_BLOCK_PTR macro. (tree_estimate_probability_bb): Remove usage of EXIT_BLOCK_PTR macro. (expensive_function_p): Remove usage of ENTRY_BLOCK_PTR macro. (tree_bb_level_predictions): Remove usage of EXIT_BLOCK_PTR macro. (counts_to_freqs): Remove usage of ENTRY_BLOCK_PTR macro. (apply_return_prediction): Remove usage of EXIT_BLOCK_PTR macro. (estimate_loops): Remove usage of ENTRY_BLOCK_PTR macro. (gimple_predict_edge): Likewise. (probably_never_executed): Likewise. * profile.c (find_spanning_tree): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (branch_prob): Likewise. (compute_branch_probabilities): Likewise. (compute_frequency_overlap): Remove usage of ENTRY_BLOCK_PTR macro. (is_inconsistent): Remove usage of EXIT_BLOCK_PTR macro. (read_profile_edge_counts): Remove usage of ENTRY_BLOCK_PTR macro. (set_bb_counts): Likewise. (correct_negative_edge_counts): Likewise. (get_exec_counts): Likewise. (instrument_values): Likewise. (instrument_edges): Likewise. * reg-stack.c (convert_regs): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (compensate_edges): Remove usage of ENTRY_BLOCK_PTR macro. (convert_regs_exit): Remove usage of EXIT_BLOCK_PTR macro. (convert_regs_entry): Remove usage of ENTRY_BLOCK_PTR macro. (reg_to_stack): Likewise. * regs.h (REG_N_SETS): Likewise. * reload.c (find_dummy_reload): Likewise. (combine_reloads): Likewise. (push_reload): Likewise. * reload1.c (has_nonexceptional_receiver): Remove usage of EXIT_BLOCK_PTR macro. * resource.c (mark_target_live_regs): Remove usage of ENTRY_BLOCK_PTR macro. (find_basic_block): Likewise. * sched-ebb.c (ebb_add_block): Remove usage of EXIT_BLOCK_PTR macro. (schedule_ebbs): Likewise. * sched-int.h (sel_sched_p): Likewise. * sched-rgn.c (compute_dom_prob_ps): Remove usage of ENTRY_BLOCK_PTR macro. (rgn_add_block): Remove usage of EXIT_BLOCK_PTR macro. (haifa_find_rgns): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (propagate_deps): Remove usage of EXIT_BLOCK_PTR macro. (extend_rgns): Likewise. (find_single_block_region): Likewise. * sel-sched-ir.c (sel_remove_loop_preheader): Remove usage of ENTRY_BLOCK_PTR macro. (setup_nop_and_exit_insns): Remove usage of EXIT_BLOCK_PTR macro. (sel_create_recovery_block): Likewise. (bb_ends_ebb_p): Likewise. (sel_bb_end): Likewise. (sel_bb_head): Likewise. (free_lv_sets): Likewise. (init_lv_sets): Likewise. (tidy_control_flow): Likewise. (maybe_tidy_empty_bb): Likewise. * sel-sched-ir.h (_succ_iter_cond): Likewise. (_succ_iter_start): Likewise. (sel_bb_empty_or_nop_p): Likewise. (get_loop_exit_edges_unique_dests): Likewise. (inner_loop_header_p): Likewise. * sel-sched.c (create_block_for_bookkeeping): Likewise. (find_block_for_bookkeeping): Likewise. * store-motion.c (remove_reachable_equiv_notes): Likewise. (insert_store): Likewise. * trans-mem.c (ipa_tm_transform_clone): Remove usage of ENTRY_BLOCK_PTR macro. (tm_memopt_compute_available): Remove usage of EXIT_BLOCK_PTR macro. (ipa_tm_scan_irr_function): Remove usage of ENTRY_BLOCK_PTR macro. (gate_tm_init): Likewise. (tm_region_init): Likewise. * tree-cfg.c (execute_fixup_cfg): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (execute_warn_function_return): Remove usage of EXIT_BLOCK_PTR macro. (split_critical_edges): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (print_loops): Remove usage of ENTRY_BLOCK_PTR macro. (move_sese_region_to_fn): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (gimple_redirect_edge_and_branch): Remove usage of ENTRY_BLOCK_PTR macro. (gimple_verify_flow_info): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (remove_edge_and_dominated_blocks): Remove usage of EXIT_BLOCK_PTR macro. (make_edges): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (gimple_flow_call_edges_add): Remove usage of EXIT_BLOCK_PTR macro. (make_blocks): Remove usage of ENTRY_BLOCK_PTR macro. (build_gimple_cfg): Likewise. (gimple_duplicate_bb): Remove usage of EXIT_BLOCK_PTR macro. (gimple_can_merge_blocks_p): Likewise. * tree-cfgcleanup.c (tree_forwarder_block_p): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * tree-complex.c (update_parameter_components): Remove usage of ENTRY_BLOCK_PTR macro. * tree-if-conv.c (get_loop_body_in_if_conv_order): Remove usage of EXIT_BLOCK_PTR macro. * tree-inline.c (tree_function_versioning): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (delete_unreachable_blocks_update_callgraph): Likewise. (initialize_cfun): Likewise. (copy_cfg_body): Remove usage of ENTRY_BLOCK_PTR macro. (copy_edges_for_bb): Remove usage of EXIT_BLOCK_PTR macro. (remap_ssa_name): Remove usage of ENTRY_BLOCK_PTR macro. * tree-into-ssa.c (update_ssa): Likewise. (maybe_register_def): Remove usage of EXIT_BLOCK_PTR macro. (insert_updated_phi_nodes_for): Remove usage of ENTRY_BLOCK_PTR macro. (rewrite_into_ssa): Likewise. (rewrite_debug_stmt_uses): Likewise. * tree-outof-ssa.c (expand_phi_nodes): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * tree-profile.c (gimple_gen_ic_func_profiler): Remove usage of ENTRY_BLOCK_PTR macro. * tree-scalar-evolution.h (block_before_loop): Likewise. * tree-sra.c (sra_ipa_reset_debug_stmts): Likewise. (dump_dereferences_table): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (analyze_caller_dereference_legality): Remove usage of ENTRY_BLOCK_PTR macro. (propagate_dereference_distances): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (initialize_parameter_reductions): Remove usage of ENTRY_BLOCK_PTR macro. * tree-ssa-ccp.c (gsi_prev_dom_bb_nondebug): Likewise. (optimize_stack_restore): Remove usage of EXIT_BLOCK_PTR macro. * tree-ssa-coalesce.c (create_outofssa_var_map): Likewise. * tree-ssa-dce.c (eliminate_unnecessary_stmts): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (remove_dead_stmt): Remove usage of EXIT_BLOCK_PTR macro. (propagate_necessity): Remove usage of ENTRY_BLOCK_PTR macro. (mark_control_dependent_edges_necessary): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * tree-ssa-dom.c (eliminate_degenerate_phis): Remove usage of ENTRY_BLOCK_PTR macro. (tree_ssa_dominator_optimize): Remove usage of EXIT_BLOCK_PTR macro. * tree-ssa-live.c (verify_live_on_entry): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (calculate_live_on_exit): Likewise. (set_var_live_on_entry): Remove usage of ENTRY_BLOCK_PTR macro. (loe_visit_block): Likewise. * tree-ssa-live.h (live_on_exit): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (live_on_entry): Likewise. * tree-ssa-loop-ivopts.c (find_interesting_uses): Remove usage of EXIT_BLOCK_PTR macro. * tree-ssa-loop-manip.c (compute_live_loop_exits): Remove usage of ENTRY_BLOCK_PTR macro. * tree-ssa-loop-niter.c (simplify_using_initial_conditions): Likewise. (bound_difference): Likewise. * tree-ssa-loop-prefetch.c (may_use_storent_in_loop_p): Remove usage of EXIT_BLOCK_PTR macro. * tree-ssa-loop-unswitch.c (simplify_using_entry_checks): Remove usage of ENTRY_BLOCK_PTR macro. * tree-ssa-math-opts.c (register_division_in): Likewise. * tree-ssa-phiprop.c (tree_ssa_phiprop): Likewise. * tree-ssa-pre.c (compute_avail): Likewise. (compute_antic): Remove usage of EXIT_BLOCK_PTR macro. (insert): Remove usage of ENTRY_BLOCK_PTR macro. * tree-ssa-propagate.c (ssa_prop_init): Likewise. (simulate_block): Remove usage of EXIT_BLOCK_PTR macro. (cfg_blocks_add): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (add_control_edge): Remove usage of EXIT_BLOCK_PTR macro. * tree-ssa-reassoc.c (do_reassoc): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (build_and_add_sum): Remove usage of ENTRY_BLOCK_PTR macro. * tree-ssa-sink.c (nearest_common_dominator_of_uses): Likewise. (execute_sink_code): Remove usage of EXIT_BLOCK_PTR macro. * tree-ssa-uninit.c (find_dom): Remove usage of ENTRY_BLOCK_PTR macro. (compute_control_dep_chain): Remove usage of EXIT_BLOCK_PTR macro. (find_pdom): Likewise. (warn_uninitialized_vars): Remove usage of ENTRY_BLOCK_PTR macro. * tree-stdarg.c (reachable_at_most_once): Likewise. * tree-tailcall.c (tree_optimize_tail_calls_1): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (eliminate_tail_call): Likewise. * tsan.c (instrument_func_entry): Remove usage of ENTRY_BLOCK_PTR macro. (instrument_func_exit): Remove usage of EXIT_BLOCK_PTR macro. * var-tracking.c (vt_initialize): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. (vt_add_function_parameter): Remove usage of ENTRY_BLOCK_PTR macro. (vt_find_locations): Remove usage of EXIT_BLOCK_PTR macro. (vt_stack_adjustments): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR. * varasm.c (assemble_start_function): Remove usage of ENTRY_BLOCK_PTR macro. * config/bfin/bfin.c (hwloop_optimize): Likewise. * config/nds32/nds32.c (nds32_fp_as_gp_check_available): Remove usage of EXIT_BLOCK_PTR macro. * config/arm/arm.c (require_pic_register): Remove usage of ENTRY_BLOCK_PTR macro. (arm_r3_live_at_start_p): Likewise. (any_sibcall_could_use_r3): Remove usage of EXIT_BLOCK_PTR macro. * config/rs6000/rs6000.c (rs6000_emit_prologue): Likewise. * config/frv/frv.c (frv_optimize_membar_global): Likewise. * config/alpha/alpha.c (alpha_gp_save_rtx): Remove usage of ENTRY_BLOCK_PTR macro. * config/i386/i386.c (ix86_count_insn): Likewise. (ix86_seh_fixup_eh_fallthru): Remove usage of EXIT_BLOCK_PTR macro. (ix86_pad_short_function): Likewise. (ix86_compute_frame_layout): Remove usage of ENTRY_BLOCK_PTR macro. (ix86_pad_returns): Remove usage of EXIT_BLOCK_PTR macro. (ix86_eax_live_at_start_p): Remove usage of ENTRY_BLOCK_PTR macro. (add_condition_to_bb): Remove usage of EXIT_BLOCK_PTR macro. (ix86_expand_epilogue): Likewise. * config/ia64/ia64.c (ia64_asm_unwind_emit): Likewise. (ia64_expand_prologue): Likewise. From-SVN: r205055
2013-11-19 22:57:13 +01:00
|| (!bitmap_bit_p (DF_LR_OUT (ENTRY_BLOCK_PTR_FOR_FN (cfun)),
ORIGINAL_REGNO (in))
/* Similarly, only do this if we can be sure that the death
note is still valid. global can assign some hardreg to
the pseudo referenced in the note and simultaneously a
subword of this hardreg to a different, also live pseudo,
because only another subword of the hardreg is actually
used in the insn. This cannot happen if the pseudo has
been assigned exactly one hardreg. See PR 33732. */
&& hard_regno_nregs[REGNO (in)][GET_MODE (in)] == 1)))
1992-02-28 11:23:25 +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 = REGNO (in) + in_offset;
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
unsigned int nwords = hard_regno_nregs[regno][inmode];
1992-02-28 11:23:25 +01:00
if (! refers_to_regno_for_reload_p (regno, regno + nwords, out, (rtx*) 0)
1992-02-28 11:23:25 +01:00
&& ! hard_reg_set_here_p (regno, regno + nwords,
PATTERN (this_insn))
&& (! earlyclobber
|| ! refers_to_regno_for_reload_p (regno, regno + nwords,
PATTERN (this_insn), inloc)))
1992-02-28 11:23:25 +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 i;
1992-02-28 11:23:25 +01:00
for (i = 0; i < nwords; i++)
if (! TEST_HARD_REG_BIT (reg_class_contents[(int) rclass],
1992-02-28 11:23:25 +01:00
regno + i))
break;
if (i == nwords)
{
/* If we were going to use OUT as the reload reg
and changed our mind, it means OUT is a dummy that
dies here. So don't bother copying value to it. */
if (for_real >= 0 && value == real_out)
rld[for_real].out = 0;
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 (real_in))
1992-02-28 11:23:25 +01:00
value = real_in;
else
value = gen_rtx_REG (inmode, regno);
1992-02-28 11:23:25 +01:00
}
}
}
return value;
}
/* This page contains subroutines used mainly for determining
whether the IN or an OUT of a reload can serve as the
reload register. */
/* Return 1 if X is an operand of an insn that is being earlyclobbered. */
int
earlyclobber_operand_p (rtx x)
{
int i;
for (i = 0; i < n_earlyclobbers; i++)
if (reload_earlyclobbers[i] == x)
return 1;
return 0;
}
1992-02-28 11:23:25 +01:00
/* Return 1 if expression X alters a hard reg in the range
from BEG_REGNO (inclusive) to END_REGNO (exclusive),
either explicitly or in the guise of a pseudo-reg allocated to REGNO.
X should be the body of an instruction. */
static int
hard_reg_set_here_p (unsigned int beg_regno, unsigned int end_regno, rtx x)
1992-02-28 11:23:25 +01:00
{
if (GET_CODE (x) == SET || GET_CODE (x) == CLOBBER)
{
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 op0 = SET_DEST (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
1992-02-28 11:23:25 +01:00
while (GET_CODE (op0) == SUBREG)
op0 = SUBREG_REG (op0);
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 (op0))
1992-02-28 11:23:25 +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 r = REGNO (op0);
1992-02-28 11:23:25 +01:00
/* See if this reg overlaps range under consideration. */
if (r < end_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_hard_regno (GET_MODE (op0), r) > beg_regno)
1992-02-28 11:23:25 +01:00
return 1;
}
}
else if (GET_CODE (x) == PARALLEL)
{
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 = XVECLEN (x, 0) - 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
1992-02-28 11:23:25 +01:00
for (; i >= 0; i--)
if (hard_reg_set_here_p (beg_regno, end_regno, XVECEXP (x, 0, i)))
return 1;
}
return 0;
}
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
/* Return 1 if ADDR is a valid memory address for mode MODE
in address space AS, and check that each pseudo reg has the
proper kind of hard reg. */
1992-02-28 11:23:25 +01:00
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
strict_memory_address_addr_space_p (enum machine_mode mode ATTRIBUTE_UNUSED,
rtx addr, addr_space_t as)
1992-02-28 11:23:25 +01:00
{
tm.texi (TARGET_LEGITIMATE_ADDRESS_P): Refer mainly to this in the former documentation of... 2009-05-14 Paolo Bonzini <bonzini@gnu.org> * doc/tm.texi (TARGET_LEGITIMATE_ADDRESS_P): Refer mainly to this in the former documentation of... (GO_IF_LEGITIMATE_ADDRESS): ... this. * ira-conflicts.c (get_dup_num): Use address_operand. * targhooks.c (default_legitimate_address_p): New. * targhooks.h (default_legitimate_address_p): New. * reload.c (strict_memory_address_p) [!GO_IF_LEGITIMATE_ADDRESS]: Call hook. * recog.c (memory_address_p) [!GO_IF_LEGITIMATE_ADDRESS]: Call hook. * target.h (struct target): Add legitimate_address_p. * target-def.h (TARGET_LEGITIMATE_ADDRESS_P): New. (TARGET_INITIALIZER): Include it. * config/alpha/alpha.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/alpha/alpha-protos.h (alpha_legitimate_address_p): Remove. * config/alpha/alpha.c (alpha_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/frv/frv.h (GO_IF_LEGITIMATE_ADDRESS): Delete. (REG_OK_STRICT_P): Delete. * config/frv/frv-protos.h (frv_legitimate_address_p): Rename to... (frv_legitimate_address_p_1): ... this. * config/frv/frv.c (frv_legitimate_address_p): Forward to... (frv_legitimate_address_p_1): ... the renamed old frv_legitimate_address_p. * config/frv/predicates.md: Adjust calls to frv_legitimate_address_p. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/s390/s390.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/s390/s390-protos.h (legitimate_address_p): Remove. * config/s390/s390.c (legitimate_address_p): Rename to... (s390_legitimate_address_p): ... this, make static. (legitimize_address): Adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/s390/constraints.md ("e"): Call strict_memory_address_p. * config/m32c/m32c.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/m32c/m32c-protos.h (m32c_legitimate_address_p): Remove. * config/m32c/m32c.c (m32c_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/spu/spu.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/spu/spu-protos.h (spu_legitimate_address): Remove. * config/spu/spu.c (spu_legitimate_address): Rename to... (spu_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/sparc/sparc.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/sparc/sparc-protos.h (legitimate_address_p): Remove. * config/sparc/sparc.c (legitimate_address_p): Rename to... (sparc_legitimate_address_p): ... this, make static and return bool. (legitimize_address): Adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/i386/i386.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/i386/i386-protos.h (legitimate_address_p): Remove. * config/i386/i386.c (legitimate_address_p): Rename to... (ix86_legitimate_address_p): ... this, make static. (constant_address_p): Move after it, adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/avr/avr.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/avr/avr-protos.h (legitimate_address_p): Remove. * config/avr/avr.c (legitimate_address_p): Rename to... (avr_legitimate_address_p): ... this, make static. (legitimize_address): Adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/crx/crx.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/crx/crx-protos.h (crx_legitimate_address_p): Remove. * config/crx/crx.c (crx_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/xtensa/xtensa.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/xtensa/xtensa-protos.h (xtensa_legitimate_address_p): Remove. * config/xtensa/xtensa.c (xtensa_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/stormy16/stormy16.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/stormy16/stormy16-protos.h (xstormy16_legitimate_address_p): Remove. * config/stormy16/stormy16.c (xstormy16_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/m68hc11/m68hc11.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/m68hc11/m68hc11-protos.h (m68hc11_go_if_legitimate_address): Remove. * config/m68hc11/m68hc11.c (m68hc11_go_if_legitimate_address): Rename to... (m68hc11_legitimate_address_p): ... this, make static. (go_if_legitimate_address_internal): Rename to... (m68hc11_legitimate_address_p_1): ... this. (legitimize_address): Adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/iq2000/iq2000.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/iq2000/iq2000-protos.h (iq2000_legitimate_address_p): Remove. * config/iq2000/iq2000.c (iq2000_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/mn10300/mn10300.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/mn10300/mn10300-protos.h (legitimate_address_p): Remove. * config/mn10300/mn10300.c (legitimate_address_p): Rename to... (mn10300_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/m68k/m68k.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/m68k/m68k-protos.h (m68k_legitimate_address_p): Remove. * config/m68k/m68k.c (m68k_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/rs6000/rs6000.h (GO_IF_LEGITIMATE_ADDRESS): Delete. (REG_OK_STRICT_FLAG, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P): Delete. (INT_REG_OK_FOR_BASE_P, INT_REG_OK_FOR_INDEX_P): Move above. * config/rs6000/rs6000.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/rs6000/rs6000-protos.h (rs6000_legitimate_address): Remove. * config/rs6000/rs6000.c (rs6000_legitimate_address): Rename to... (rs6000_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. (REG_MODE_OK_FOR_BASE_P): Delete. (rs6000_legitimize_reload_address): Use INT_REG_OK_FOR_BASE_P. * config/picochip/picochip.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/picochip/picochip-protos.h (picochip_legitimate_address_p): Delete. * config/picochip/picochip.c (picochip_legitimate_address_p): Make static, adjust types. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/score/score.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/score/score.c (score_address_p): Rename to... (score_legitimate_address_p): ... this. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/score/score3.c (score3_address_p): Rename to... (score3_legitimate_address_p): ... this. * config/score/score7.c (score7_address_p): Rename to... (score7_legitimate_address_p): ... this. * config/arm/arm.h (ARM_GO_IF_LEGITIMATE_ADDRESS, THUMB2_GO_IF_LEGITIMATE_ADDRESS, THUMB1_GO_IF_LEGITIMATE_ADDRESS, GO_IF_LEGITIMATE_ADDRESS): Delete. * config/arm/arm-protos.h (thumb1_legitimate_address_p, thumb2_legitimate_address_p): Delete. (arm_legitimate_address_p): Rename to... (arm_legitimate_address_outer_p): ... this. * config/arm/constraints.md ("Uq"): Adjust call. * config/arm/predicates.md (arm_extendqisi_mem_op): Likewise. * config/arm/arm.c (arm_legitimate_address_p): New, rename old one to... (arm_legitimate_address_outer_p): ... this. (thumb1_legitimate_address_p, thumb2_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/mips/mips.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/mips/mips-protos.h (mips_legitimate_address_p): Remove. * config/mips/mips.c (mips_legitimate_address_p): ... Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/vax/vax.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/vax/vax-protos.h (legitimate_address_p): Remove. * config/vax/vax.c (legitimate_address_p): Rename to... (vax_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/h8300/h8300.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/h8300/h8300-protos.h (h8300_legitimate_address_p): Remove. * config/h8300/h8300.c (h8300_legitimate_address_p): ... Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/mmix/mmix.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/mmix/mmix-protos.h (mmix_legitimize_address): Remove. * config/mmix/mmix.c (mmix_legitimate_address): Rename to... (mmix_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/bfin/bfin.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/bfin/bfin-protos.h (bfin_legitimate_address_p): Remove. * config/bfin/bfin.c (bfin_legitimate_address_p): ... Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. From-SVN: r147534
2009-05-14 15:42:45 +02:00
#ifdef GO_IF_LEGITIMATE_ADDRESS
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
gcc_assert (ADDR_SPACE_GENERIC_P (as));
1992-02-28 11:23:25 +01:00
GO_IF_LEGITIMATE_ADDRESS (mode, addr, win);
return 0;
win:
return 1;
tm.texi (TARGET_LEGITIMATE_ADDRESS_P): Refer mainly to this in the former documentation of... 2009-05-14 Paolo Bonzini <bonzini@gnu.org> * doc/tm.texi (TARGET_LEGITIMATE_ADDRESS_P): Refer mainly to this in the former documentation of... (GO_IF_LEGITIMATE_ADDRESS): ... this. * ira-conflicts.c (get_dup_num): Use address_operand. * targhooks.c (default_legitimate_address_p): New. * targhooks.h (default_legitimate_address_p): New. * reload.c (strict_memory_address_p) [!GO_IF_LEGITIMATE_ADDRESS]: Call hook. * recog.c (memory_address_p) [!GO_IF_LEGITIMATE_ADDRESS]: Call hook. * target.h (struct target): Add legitimate_address_p. * target-def.h (TARGET_LEGITIMATE_ADDRESS_P): New. (TARGET_INITIALIZER): Include it. * config/alpha/alpha.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/alpha/alpha-protos.h (alpha_legitimate_address_p): Remove. * config/alpha/alpha.c (alpha_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/frv/frv.h (GO_IF_LEGITIMATE_ADDRESS): Delete. (REG_OK_STRICT_P): Delete. * config/frv/frv-protos.h (frv_legitimate_address_p): Rename to... (frv_legitimate_address_p_1): ... this. * config/frv/frv.c (frv_legitimate_address_p): Forward to... (frv_legitimate_address_p_1): ... the renamed old frv_legitimate_address_p. * config/frv/predicates.md: Adjust calls to frv_legitimate_address_p. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/s390/s390.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/s390/s390-protos.h (legitimate_address_p): Remove. * config/s390/s390.c (legitimate_address_p): Rename to... (s390_legitimate_address_p): ... this, make static. (legitimize_address): Adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/s390/constraints.md ("e"): Call strict_memory_address_p. * config/m32c/m32c.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/m32c/m32c-protos.h (m32c_legitimate_address_p): Remove. * config/m32c/m32c.c (m32c_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/spu/spu.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/spu/spu-protos.h (spu_legitimate_address): Remove. * config/spu/spu.c (spu_legitimate_address): Rename to... (spu_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/sparc/sparc.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/sparc/sparc-protos.h (legitimate_address_p): Remove. * config/sparc/sparc.c (legitimate_address_p): Rename to... (sparc_legitimate_address_p): ... this, make static and return bool. (legitimize_address): Adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/i386/i386.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/i386/i386-protos.h (legitimate_address_p): Remove. * config/i386/i386.c (legitimate_address_p): Rename to... (ix86_legitimate_address_p): ... this, make static. (constant_address_p): Move after it, adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/avr/avr.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/avr/avr-protos.h (legitimate_address_p): Remove. * config/avr/avr.c (legitimate_address_p): Rename to... (avr_legitimate_address_p): ... this, make static. (legitimize_address): Adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/crx/crx.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/crx/crx-protos.h (crx_legitimate_address_p): Remove. * config/crx/crx.c (crx_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/xtensa/xtensa.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/xtensa/xtensa-protos.h (xtensa_legitimate_address_p): Remove. * config/xtensa/xtensa.c (xtensa_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/stormy16/stormy16.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/stormy16/stormy16-protos.h (xstormy16_legitimate_address_p): Remove. * config/stormy16/stormy16.c (xstormy16_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/m68hc11/m68hc11.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/m68hc11/m68hc11-protos.h (m68hc11_go_if_legitimate_address): Remove. * config/m68hc11/m68hc11.c (m68hc11_go_if_legitimate_address): Rename to... (m68hc11_legitimate_address_p): ... this, make static. (go_if_legitimate_address_internal): Rename to... (m68hc11_legitimate_address_p_1): ... this. (legitimize_address): Adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/iq2000/iq2000.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/iq2000/iq2000-protos.h (iq2000_legitimate_address_p): Remove. * config/iq2000/iq2000.c (iq2000_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/mn10300/mn10300.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/mn10300/mn10300-protos.h (legitimate_address_p): Remove. * config/mn10300/mn10300.c (legitimate_address_p): Rename to... (mn10300_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/m68k/m68k.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/m68k/m68k-protos.h (m68k_legitimate_address_p): Remove. * config/m68k/m68k.c (m68k_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/rs6000/rs6000.h (GO_IF_LEGITIMATE_ADDRESS): Delete. (REG_OK_STRICT_FLAG, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P): Delete. (INT_REG_OK_FOR_BASE_P, INT_REG_OK_FOR_INDEX_P): Move above. * config/rs6000/rs6000.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/rs6000/rs6000-protos.h (rs6000_legitimate_address): Remove. * config/rs6000/rs6000.c (rs6000_legitimate_address): Rename to... (rs6000_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. (REG_MODE_OK_FOR_BASE_P): Delete. (rs6000_legitimize_reload_address): Use INT_REG_OK_FOR_BASE_P. * config/picochip/picochip.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/picochip/picochip-protos.h (picochip_legitimate_address_p): Delete. * config/picochip/picochip.c (picochip_legitimate_address_p): Make static, adjust types. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/score/score.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/score/score.c (score_address_p): Rename to... (score_legitimate_address_p): ... this. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/score/score3.c (score3_address_p): Rename to... (score3_legitimate_address_p): ... this. * config/score/score7.c (score7_address_p): Rename to... (score7_legitimate_address_p): ... this. * config/arm/arm.h (ARM_GO_IF_LEGITIMATE_ADDRESS, THUMB2_GO_IF_LEGITIMATE_ADDRESS, THUMB1_GO_IF_LEGITIMATE_ADDRESS, GO_IF_LEGITIMATE_ADDRESS): Delete. * config/arm/arm-protos.h (thumb1_legitimate_address_p, thumb2_legitimate_address_p): Delete. (arm_legitimate_address_p): Rename to... (arm_legitimate_address_outer_p): ... this. * config/arm/constraints.md ("Uq"): Adjust call. * config/arm/predicates.md (arm_extendqisi_mem_op): Likewise. * config/arm/arm.c (arm_legitimate_address_p): New, rename old one to... (arm_legitimate_address_outer_p): ... this. (thumb1_legitimate_address_p, thumb2_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/mips/mips.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/mips/mips-protos.h (mips_legitimate_address_p): Remove. * config/mips/mips.c (mips_legitimate_address_p): ... Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/vax/vax.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/vax/vax-protos.h (legitimate_address_p): Remove. * config/vax/vax.c (legitimate_address_p): Rename to... (vax_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/h8300/h8300.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/h8300/h8300-protos.h (h8300_legitimate_address_p): Remove. * config/h8300/h8300.c (h8300_legitimate_address_p): ... Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/mmix/mmix.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/mmix/mmix-protos.h (mmix_legitimize_address): Remove. * config/mmix/mmix.c (mmix_legitimate_address): Rename to... (mmix_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/bfin/bfin.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/bfin/bfin-protos.h (bfin_legitimate_address_p): Remove. * config/bfin/bfin.c (bfin_legitimate_address_p): ... Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. From-SVN: r147534
2009-05-14 15:42:45 +02:00
#else
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
return targetm.addr_space.legitimate_address_p (mode, addr, 1, as);
tm.texi (TARGET_LEGITIMATE_ADDRESS_P): Refer mainly to this in the former documentation of... 2009-05-14 Paolo Bonzini <bonzini@gnu.org> * doc/tm.texi (TARGET_LEGITIMATE_ADDRESS_P): Refer mainly to this in the former documentation of... (GO_IF_LEGITIMATE_ADDRESS): ... this. * ira-conflicts.c (get_dup_num): Use address_operand. * targhooks.c (default_legitimate_address_p): New. * targhooks.h (default_legitimate_address_p): New. * reload.c (strict_memory_address_p) [!GO_IF_LEGITIMATE_ADDRESS]: Call hook. * recog.c (memory_address_p) [!GO_IF_LEGITIMATE_ADDRESS]: Call hook. * target.h (struct target): Add legitimate_address_p. * target-def.h (TARGET_LEGITIMATE_ADDRESS_P): New. (TARGET_INITIALIZER): Include it. * config/alpha/alpha.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/alpha/alpha-protos.h (alpha_legitimate_address_p): Remove. * config/alpha/alpha.c (alpha_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/frv/frv.h (GO_IF_LEGITIMATE_ADDRESS): Delete. (REG_OK_STRICT_P): Delete. * config/frv/frv-protos.h (frv_legitimate_address_p): Rename to... (frv_legitimate_address_p_1): ... this. * config/frv/frv.c (frv_legitimate_address_p): Forward to... (frv_legitimate_address_p_1): ... the renamed old frv_legitimate_address_p. * config/frv/predicates.md: Adjust calls to frv_legitimate_address_p. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/s390/s390.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/s390/s390-protos.h (legitimate_address_p): Remove. * config/s390/s390.c (legitimate_address_p): Rename to... (s390_legitimate_address_p): ... this, make static. (legitimize_address): Adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/s390/constraints.md ("e"): Call strict_memory_address_p. * config/m32c/m32c.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/m32c/m32c-protos.h (m32c_legitimate_address_p): Remove. * config/m32c/m32c.c (m32c_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/spu/spu.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/spu/spu-protos.h (spu_legitimate_address): Remove. * config/spu/spu.c (spu_legitimate_address): Rename to... (spu_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/sparc/sparc.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/sparc/sparc-protos.h (legitimate_address_p): Remove. * config/sparc/sparc.c (legitimate_address_p): Rename to... (sparc_legitimate_address_p): ... this, make static and return bool. (legitimize_address): Adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/i386/i386.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/i386/i386-protos.h (legitimate_address_p): Remove. * config/i386/i386.c (legitimate_address_p): Rename to... (ix86_legitimate_address_p): ... this, make static. (constant_address_p): Move after it, adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/avr/avr.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/avr/avr-protos.h (legitimate_address_p): Remove. * config/avr/avr.c (legitimate_address_p): Rename to... (avr_legitimate_address_p): ... this, make static. (legitimize_address): Adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/crx/crx.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/crx/crx-protos.h (crx_legitimate_address_p): Remove. * config/crx/crx.c (crx_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/xtensa/xtensa.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/xtensa/xtensa-protos.h (xtensa_legitimate_address_p): Remove. * config/xtensa/xtensa.c (xtensa_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/stormy16/stormy16.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/stormy16/stormy16-protos.h (xstormy16_legitimate_address_p): Remove. * config/stormy16/stormy16.c (xstormy16_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/m68hc11/m68hc11.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/m68hc11/m68hc11-protos.h (m68hc11_go_if_legitimate_address): Remove. * config/m68hc11/m68hc11.c (m68hc11_go_if_legitimate_address): Rename to... (m68hc11_legitimate_address_p): ... this, make static. (go_if_legitimate_address_internal): Rename to... (m68hc11_legitimate_address_p_1): ... this. (legitimize_address): Adjust call. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/iq2000/iq2000.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/iq2000/iq2000-protos.h (iq2000_legitimate_address_p): Remove. * config/iq2000/iq2000.c (iq2000_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/mn10300/mn10300.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/mn10300/mn10300-protos.h (legitimate_address_p): Remove. * config/mn10300/mn10300.c (legitimate_address_p): Rename to... (mn10300_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/m68k/m68k.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/m68k/m68k-protos.h (m68k_legitimate_address_p): Remove. * config/m68k/m68k.c (m68k_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/rs6000/rs6000.h (GO_IF_LEGITIMATE_ADDRESS): Delete. (REG_OK_STRICT_FLAG, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P): Delete. (INT_REG_OK_FOR_BASE_P, INT_REG_OK_FOR_INDEX_P): Move above. * config/rs6000/rs6000.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/rs6000/rs6000-protos.h (rs6000_legitimate_address): Remove. * config/rs6000/rs6000.c (rs6000_legitimate_address): Rename to... (rs6000_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. (REG_MODE_OK_FOR_BASE_P): Delete. (rs6000_legitimize_reload_address): Use INT_REG_OK_FOR_BASE_P. * config/picochip/picochip.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/picochip/picochip-protos.h (picochip_legitimate_address_p): Delete. * config/picochip/picochip.c (picochip_legitimate_address_p): Make static, adjust types. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/score/score.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/score/score.c (score_address_p): Rename to... (score_legitimate_address_p): ... this. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/score/score3.c (score3_address_p): Rename to... (score3_legitimate_address_p): ... this. * config/score/score7.c (score7_address_p): Rename to... (score7_legitimate_address_p): ... this. * config/arm/arm.h (ARM_GO_IF_LEGITIMATE_ADDRESS, THUMB2_GO_IF_LEGITIMATE_ADDRESS, THUMB1_GO_IF_LEGITIMATE_ADDRESS, GO_IF_LEGITIMATE_ADDRESS): Delete. * config/arm/arm-protos.h (thumb1_legitimate_address_p, thumb2_legitimate_address_p): Delete. (arm_legitimate_address_p): Rename to... (arm_legitimate_address_outer_p): ... this. * config/arm/constraints.md ("Uq"): Adjust call. * config/arm/predicates.md (arm_extendqisi_mem_op): Likewise. * config/arm/arm.c (arm_legitimate_address_p): New, rename old one to... (arm_legitimate_address_outer_p): ... this. (thumb1_legitimate_address_p, thumb2_legitimate_address_p): Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/mips/mips.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/mips/mips-protos.h (mips_legitimate_address_p): Remove. * config/mips/mips.c (mips_legitimate_address_p): ... Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/vax/vax.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/vax/vax-protos.h (legitimate_address_p): Remove. * config/vax/vax.c (legitimate_address_p): Rename to... (vax_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/h8300/h8300.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/h8300/h8300-protos.h (h8300_legitimate_address_p): Remove. * config/h8300/h8300.c (h8300_legitimate_address_p): ... Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/mmix/mmix.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/mmix/mmix-protos.h (mmix_legitimize_address): Remove. * config/mmix/mmix.c (mmix_legitimate_address): Rename to... (mmix_legitimate_address_p): ... this, make static. (TARGET_LEGITIMATE_ADDRESS_P): New. * config/bfin/bfin.h (GO_IF_LEGITIMATE_ADDRESS): Delete. * config/bfin/bfin-protos.h (bfin_legitimate_address_p): Remove. * config/bfin/bfin.c (bfin_legitimate_address_p): ... Make static. (TARGET_LEGITIMATE_ADDRESS_P): New. From-SVN: r147534
2009-05-14 15:42:45 +02:00
#endif
1992-02-28 11:23:25 +01:00
}
/* Like rtx_equal_p except that it allows a REG and a SUBREG to match
if they are the same hard reg, and has special hacks for
autoincrement and autodecrement.
This is specifically intended for find_reloads to use
in determining whether two operands match.
X is the operand whose number is the lower of the two.
The value is 2 if Y contains a pre-increment that matches
a non-incrementing address in X. */
/* ??? To be completely correct, we should arrange to pass
for X the output operand and for Y the input operand.
For now, we assume that the output operand has the lower number
because that is natural in (SET output (... input ...)). */
int
operands_match_p (rtx x, rtx y)
1992-02-28 11:23:25 +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;
RTX_CODE code = GET_CODE (x);
const char *fmt;
1992-02-28 11:23:25 +01:00
int success_2;
1992-02-28 11:23:25 +01:00
if (x == y)
return 1;
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 ((code == REG || (code == SUBREG && REG_P (SUBREG_REG (x))))
&& (REG_P (y) || (GET_CODE (y) == SUBREG
&& REG_P (SUBREG_REG (y)))))
1992-02-28 11:23:25 +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;
1992-02-28 11:23:25 +01:00
if (code == SUBREG)
{
i = REGNO (SUBREG_REG (x));
if (i >= FIRST_PSEUDO_REGISTER)
goto slow;
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
i += subreg_regno_offset (REGNO (SUBREG_REG (x)),
GET_MODE (SUBREG_REG (x)),
SUBREG_BYTE (x),
GET_MODE (x));
1992-02-28 11:23:25 +01:00
}
else
i = REGNO (x);
if (GET_CODE (y) == SUBREG)
{
j = REGNO (SUBREG_REG (y));
if (j >= FIRST_PSEUDO_REGISTER)
goto slow;
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
j += subreg_regno_offset (REGNO (SUBREG_REG (y)),
GET_MODE (SUBREG_REG (y)),
SUBREG_BYTE (y),
GET_MODE (y));
1992-02-28 11:23:25 +01:00
}
else
j = REGNO (y);
/* On a REG_WORDS_BIG_ENDIAN machine, point to the last register of a
multiple hard register group of scalar integer registers, so that
for example (reg:DI 0) and (reg:SI 1) will be considered the same
register. */
if (REG_WORDS_BIG_ENDIAN && GET_MODE_SIZE (GET_MODE (x)) > UNITS_PER_WORD
&& SCALAR_INT_MODE_P (GET_MODE (x))
&& i < FIRST_PSEUDO_REGISTER)
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
i += hard_regno_nregs[i][GET_MODE (x)] - 1;
if (REG_WORDS_BIG_ENDIAN && GET_MODE_SIZE (GET_MODE (y)) > UNITS_PER_WORD
&& SCALAR_INT_MODE_P (GET_MODE (y))
&& j < FIRST_PSEUDO_REGISTER)
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
j += hard_regno_nregs[j][GET_MODE (y)] - 1;
1992-02-28 11:23:25 +01:00
return i == j;
}
/* If two operands must match, because they are really a single
operand of an assembler insn, then two postincrements are invalid
because the assembler insn would increment only once.
On the other hand, a postincrement matches ordinary indexing
1992-02-28 11:23:25 +01:00
if the postincrement is the output operand. */
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
if (code == POST_DEC || code == POST_INC || code == POST_MODIFY)
1992-02-28 11:23:25 +01:00
return operands_match_p (XEXP (x, 0), y);
/* Two preincrements are invalid
because the assembler insn would increment only once.
On the other hand, a preincrement matches ordinary indexing
1992-02-28 11:23:25 +01:00
if the preincrement is the input operand.
In this case, return 2, since some callers need to do special
things when this happens. */
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
if (GET_CODE (y) == PRE_DEC || GET_CODE (y) == PRE_INC
|| GET_CODE (y) == PRE_MODIFY)
1992-02-28 11:23:25 +01:00
return operands_match_p (x, XEXP (y, 0)) ? 2 : 0;
slow:
/* Now we have disposed of all the cases in which different rtx codes
can match. */
1992-02-28 11:23:25 +01:00
if (code != GET_CODE (y))
return 0;
/* (MULT:SI x y) and (MULT:HI x y) are NOT equivalent. */
if (GET_MODE (x) != GET_MODE (y))
return 0;
lto-symtab.c (lto_cgraph_replace_node): Update. * lto-symtab.c (lto_cgraph_replace_node): Update. * cgraphbuild.c (record_reference, record_type_list, record_eh_tables, mark_address, mark_load, mark_store): Update. * cgraph.c (cgraph_same_body_alias, dump_cgraph_node, cgraph_create_virtual_clone, cgraph_for_node_thunks_and_aliases): Update. * cgraph.h (symtab_node_def, symtab_node, const_symtab_node): Remove. (cgraph_alias_aliased_node, varpool_alias_aliased_node): Update. * reload.c: Fix typo in comment. * rtlanal.c: Likewise. * tree-emultls.c (gen_emutls_addr): Update. * ipa-reference.c (analyze_function): Update. * cgraphunit.c (cgraph_analyze_function, cgraph_process_same_body_aliases, assemble_thunks_and_aliases): Update. * ipa-ref.c (ipa_record_reference): Reorg to avoid reference types. (ipa_remove_reference): Likewise. (ipa_remove_all_refering): Rename to ... (ipa_remove_all_referring): ... this one; update. (ipa_dump_references): Update. (ipa_dump_referring): Update. (ipa_clone_references): Update. (ipa_clone_refering): Rename to ... (ipa_clone_referring): ... this one; update. (ipa_ref_cannot_lead_to_return): Update. (ipa_ref_has_aliases_p): Update. * ipa-ref.h (symtab_node_def, symtab_node, const_symtab_node): New forward typedefs. (ipa_ref_type): Remove. (ipa_ref_ptr_u): Remove. (ipa_ref): Remove referencing, refered, refered_index, refering_type and refered_type; add referring, referred and referred_index. (ipa_ref_list): Rename refering to referring. (ipa_record_reference, ipa_remove_all_referring, ipa_dump_referring, ipa_clone_references, ipa_clone_referring): Update prototypes. * lto-cgraph.c (referenced_from_other_partition_p): Update. (lto_output_ref): Update. (add_references): Update. (input_varpool_node): Update. (input_refs): Update. * ipa-ref-inline.h (ipa_ref_node): Update. (ipa_ref_varpool_node): Update. (ipa_ref_referring_node); Update. (ipa_ref_referring_varpool_node): Update. (ipa_ref_referring_ref_list); Update. (ipa_ref_referred_ref_list): Update. (ipa_ref_list_first_referring): Update. (ipa_empty_ref_list): Update. (ipa_ref_list_refering_iterate): Rename to ... (ipa_ref_list_referring_iterate): ... this one. * cse.c: Update comment. * ipa-utils.c (ipa_reverse_postorder): Update. * tree-ssa-alias.c: Update. * ipa-inline.c (reset_edge_caches): Update. (update_caller_keys): Update. * ipa-inline.h: Update comments. * jump.c: Update comment. * alias.c: Likewise. * ipa.c (process_references): Update. (cgraph_remove_unreachable_nodes): Likewise. (ipa_discover_readonly_nonaddressable_var): Likewise. (cgraph_address_taken_from_non_vtable_p): Likewise. * trans-mem.c (ipa_tm_execute): Update. * simplify-rtx.c: Fix comment. * rtl.c: Fix comment. * symtab.c (symtab_unregister_node): Update. * varpool.c (dump_varpool_node): Update. (varpool_analyze_pending_decls): Update. (assemble_aliases): Update. (varpool_for_node_and_aliases): Update. From-SVN: r186564
2012-04-18 11:57:53 +02:00
/* MEMs referring to different address space are not equivalent. */
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 (code == MEM && MEM_ADDR_SPACE (x) != MEM_ADDR_SPACE (y))
return 0;
switch (code)
{
alias.c (rtx_equal_for_memref_p): Convert constant cases. 2012-08-23 Kenneth Zadeck <zadeck@naturalbridge.com> * alias.c (rtx_equal_for_memref_p): Convert constant cases. * combine.c (find_single_use_1, mark_used_regs_combine): Convert to CASE_CONST_ANY. * cse.c (exp_equiv_p, canon_reg, fold_rtx, cse_process_notes_1, count_reg_usage): Convert constant cases. * cselib.c (cselib_expand_value_rtx_1): Convert to CASE_CONST_ANY. (cselib_subst_to_values): Convert constant cases. * df-scan.c (df_uses_record): Ditto. * dse.c (const_or_frame_p): Convert case statements to explicit if-then-else using mode classes. * emit-rtl.c (verify_rtx_sharing, copy_insn_1): Convert constant cases. * explow.c (convert_memory_address_addr_space): Ditto. * gcse.c (want_to_gcse_p, oprs_unchanged_p, compute_transp): Ditto. * genattrtab.c (attr_copy_rtx, clear_struct_flag): Ditto. * ira.c (equiv_init_varies_p, contains_replace_regs, memref_referenced_p, rtx_moveable_p): Ditto. * jump.c (mark_jump_label_1): Remove constant cases. (rtx_renumbered_equal_p): Convert to CASE_CONST_UNIQUE. * loop-invariant.c (check_maybe_invariant, hash_invariant_expr_1, invariant_expr_equal_p): Convert to CASE_CONST_ANY. * postreload-gcse.c (oprs_unchanged_p): Convert constant cases. * reginfo.c (reg_scan_mark_refs): Ditto. * regrename.c (scan_rtx): Ditto. * reload1.c (eliminate_regs_1, elimination_effects, scan_paradoxical_subregs): Ditto. * reload.c (operands_match_p, subst_reg_equivs): Ditto. * resource.c (mark_referenced_resources, mark_set_resources): Ditto. * rtlanal.c (rtx_unstable_p, rtx_varies_p, count_occurrences) (reg_mentioned_p, modified_between_p, modified_in_p) (volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, inequality_comparisons_p, computed_jump_p_1): Ditto. * rtl.c (copy_rtx, rtx_equal_p_cb, rtx_equal_p): Ditto. * sched-deps.c (sched_analyze_2): Ditto. * valtrack.c (cleanup_auto_inc_dec): Ditto. * rtl.h: (CASE_CONST_SCALAR_INT, CASE_CONST_UNIQUE, CASE_CONST_ANY): New macros. From-SVN: r190627
2012-08-23 20:46:18 +02:00
CASE_CONST_UNIQUE:
return 0;
case LABEL_REF:
return XEXP (x, 0) == XEXP (y, 0);
case SYMBOL_REF:
return XSTR (x, 0) == XSTR (y, 0);
default:
break;
}
1992-02-28 11:23:25 +01:00
/* Compare the elements. If any pair of corresponding elements
fail to match, return 0 for the whole things. */
success_2 = 0;
fmt = GET_RTX_FORMAT (code);
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
{
int val, j;
1992-02-28 11:23:25 +01:00
switch (fmt[i])
{
case 'w':
if (XWINT (x, i) != XWINT (y, i))
return 0;
break;
1992-02-28 11:23:25 +01:00
case 'i':
if (XINT (x, i) != XINT (y, i))
return 0;
break;
case 'e':
val = operands_match_p (XEXP (x, i), XEXP (y, i));
if (val == 0)
return 0;
/* If any subexpression returns 2,
we should return 2 if we are successful. */
if (val == 2)
success_2 = 1;
break;
case '0':
break;
case 'E':
if (XVECLEN (x, i) != XVECLEN (y, i))
return 0;
for (j = XVECLEN (x, i) - 1; j >= 0; --j)
{
val = operands_match_p (XVECEXP (x, i, j), XVECEXP (y, i, j));
if (val == 0)
return 0;
if (val == 2)
success_2 = 1;
}
break;
1992-02-28 11:23:25 +01:00
/* It is believed that rtx's at this level will never
contain anything but integers and other rtx's,
except for within LABEL_REFs and SYMBOL_REFs. */
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 ();
1992-02-28 11:23:25 +01:00
}
}
return 1 + success_2;
}
/* Describe the range of registers or memory referenced by X.
If X is a register, set REG_FLAG and put the first register
1992-02-28 11:23:25 +01:00
number into START and the last plus one into END.
If X is a memory reference, put a base address into BASE
1992-02-28 11:23:25 +01:00
and a range of integer offsets into START and END.
If X is pushing on the stack, we can assume it causes no trouble,
1992-02-28 11:23:25 +01:00
so we set the SAFE field. */
static struct decomposition
decompose (rtx x)
1992-02-28 11:23:25 +01:00
{
struct decomposition val;
int all_const = 0;
memset (&val, 0, sizeof (val));
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
switch (GET_CODE (x))
1992-02-28 11:23:25 +01:00
{
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
case MEM:
{
rtx base = NULL_RTX, offset = 0;
rtx addr = XEXP (x, 0);
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
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
if (GET_CODE (addr) == PRE_DEC || GET_CODE (addr) == PRE_INC
|| GET_CODE (addr) == POST_DEC || GET_CODE (addr) == POST_INC)
{
val.base = XEXP (addr, 0);
val.start = -GET_MODE_SIZE (GET_MODE (x));
val.end = GET_MODE_SIZE (GET_MODE (x));
val.safe = REGNO (val.base) == STACK_POINTER_REGNUM;
return val;
}
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
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
if (GET_CODE (addr) == PRE_MODIFY || GET_CODE (addr) == POST_MODIFY)
{
if (GET_CODE (XEXP (addr, 1)) == PLUS
&& XEXP (addr, 0) == XEXP (XEXP (addr, 1), 0)
&& CONSTANT_P (XEXP (XEXP (addr, 1), 1)))
{
val.base = XEXP (addr, 0);
val.start = -INTVAL (XEXP (XEXP (addr, 1), 1));
val.end = INTVAL (XEXP (XEXP (addr, 1), 1));
val.safe = REGNO (val.base) == STACK_POINTER_REGNUM;
return val;
}
}
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
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
if (GET_CODE (addr) == CONST)
{
addr = XEXP (addr, 0);
all_const = 1;
}
if (GET_CODE (addr) == PLUS)
{
if (CONSTANT_P (XEXP (addr, 0)))
{
base = XEXP (addr, 1);
offset = XEXP (addr, 0);
}
else if (CONSTANT_P (XEXP (addr, 1)))
{
base = XEXP (addr, 0);
offset = XEXP (addr, 1);
}
}
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
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
if (offset == 0)
{
base = addr;
offset = const0_rtx;
}
if (GET_CODE (offset) == CONST)
offset = XEXP (offset, 0);
if (GET_CODE (offset) == PLUS)
{
if (CONST_INT_P (XEXP (offset, 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
{
base = gen_rtx_PLUS (GET_MODE (base), base, XEXP (offset, 1));
offset = XEXP (offset, 0);
}
else if (CONST_INT_P (XEXP (offset, 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
{
base = gen_rtx_PLUS (GET_MODE (base), base, XEXP (offset, 0));
offset = XEXP (offset, 1);
}
else
{
base = gen_rtx_PLUS (GET_MODE (base), base, offset);
offset = const0_rtx;
}
}
else if (!CONST_INT_P (offset))
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
{
base = gen_rtx_PLUS (GET_MODE (base), base, offset);
offset = const0_rtx;
}
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
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
if (all_const && GET_CODE (base) == PLUS)
base = gen_rtx_CONST (GET_MODE (base), base);
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
gcc_assert (CONST_INT_P (offset));
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
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
val.start = INTVAL (offset);
val.end = val.start + GET_MODE_SIZE (GET_MODE (x));
val.base = base;
}
break;
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
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
case REG:
1992-02-28 11:23:25 +01:00
val.reg_flag = 1;
val.start = true_regnum (x);
if (val.start < 0 || val.start >= FIRST_PSEUDO_REGISTER)
1992-02-28 11:23:25 +01:00
{
/* A pseudo with no hard reg. */
val.start = REGNO (x);
val.end = val.start + 1;
}
else
/* A hard reg. */
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
val.end = end_hard_regno (GET_MODE (x), val.start);
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
break;
case 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
if (!REG_P (SUBREG_REG (x)))
1992-02-28 11:23:25 +01:00
/* This could be more precise, but it's good enough. */
return decompose (SUBREG_REG (x));
val.reg_flag = 1;
val.start = true_regnum (x);
if (val.start < 0 || val.start >= FIRST_PSEUDO_REGISTER)
1992-02-28 11:23:25 +01:00
return decompose (SUBREG_REG (x));
else
/* A hard reg. */
val.end = val.start + subreg_nregs (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
break;
case SCRATCH:
/* This hasn't been assigned yet, so it can't conflict yet. */
val.safe = 1;
break;
default:
gcc_assert (CONSTANT_P (x));
val.safe = 1;
break;
1992-02-28 11:23:25 +01:00
}
return val;
}
/* Return 1 if altering Y will not modify the value of X.
Y is also described by YDATA, which should be decompose (Y). */
static int
immune_p (rtx x, rtx y, struct decomposition ydata)
1992-02-28 11:23:25 +01:00
{
struct decomposition xdata;
if (ydata.reg_flag)
return !refers_to_regno_for_reload_p (ydata.start, ydata.end, x, (rtx*) 0);
1992-02-28 11:23:25 +01:00
if (ydata.safe)
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 (MEM_P (y));
1992-02-28 11:23:25 +01:00
/* If Y is memory and X is not, Y can't affect X. */
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 (x))
1992-02-28 11:23:25 +01:00
return 1;
xdata = decompose (x);
1992-02-28 11:23:25 +01:00
if (! rtx_equal_p (xdata.base, ydata.base))
{
/* If bases are distinct symbolic constants, there is no overlap. */
if (CONSTANT_P (xdata.base) && CONSTANT_P (ydata.base))
return 1;
/* Constants and stack slots never overlap. */
if (CONSTANT_P (xdata.base)
&& (ydata.base == frame_pointer_rtx
|| ydata.base == hard_frame_pointer_rtx
1992-02-28 11:23:25 +01:00
|| ydata.base == stack_pointer_rtx))
return 1;
if (CONSTANT_P (ydata.base)
&& (xdata.base == frame_pointer_rtx
|| xdata.base == hard_frame_pointer_rtx
1992-02-28 11:23:25 +01:00
|| xdata.base == stack_pointer_rtx))
return 1;
/* If either base is variable, we don't know anything. */
return 0;
}
return (xdata.start >= ydata.end || ydata.start >= xdata.end);
}
/* Similar, but calls decompose. */
int
safe_from_earlyclobber (rtx op, rtx clobber)
{
struct decomposition early_data;
early_data = decompose (clobber);
return immune_p (op, clobber, early_data);
}
1992-02-28 11:23:25 +01:00
/* Main entry point of this file: search the body of INSN
for values that need reloading and record them with push_reload.
REPLACE nonzero means record also where the values occur
so that subst_reloads can be used.
IND_LEVELS says how many levels of indirection are supported by this
machine; a value of zero means that a memory reference is not a valid
memory address.
LIVE_KNOWN says we have valid information about which hard
regs are live at each point in the program; this is true when
we are called from global_alloc but false when stupid register
allocation has been done.
RELOAD_REG_P if nonzero is a vector indexed by hard reg number
which is nonnegative if the reg has been commandeered for reloading into.
It is copied into STATIC_RELOAD_REG_P and referenced from there
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
by various subroutines.
1992-02-28 11:23:25 +01:00
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
Return TRUE if some operands need to be changed, because of swapping
commutative operands, reg_equiv_address substitution, or whatever. */
int
reload: Use rtx_insn (also touches caller-save.c and config/arc/arc) gcc/ * reload.h (struct insn_chain): Strengthen field "insn" from rtx to rtx_insn *. (find_reloads): Likewise for param 1. (subst_reloads): Likewise for sole param. (find_equiv_reg): Likwise for param 2. (regno_clobbered_p): Likwise for param 2. (reload): Likewise for param 1. * caller-save.c (save_call_clobbered_regs): Strengthen local "insn" from rtx to rtx_insn *. (insert_one_insn): Likewise for local "insn". * reload.c (this_insn): Likewise for this global. (find_reloads): Likewise for param "insn". (find_reloads_toplev): Likewise. (find_reloads_address): Likewise. (subst_reg_equivs): Likewise. (update_auto_inc_notes): Likewise. (find_reloads_address_1): Likewise. (find_reloads_subreg_address): Likewise. (subst_reloads): Likewise. (find_equiv_reg): Likewise, also for local "p". (regno_clobbered_p): Likewise for param "insn". * reload1.c (reg_reloaded_insn): Likewise for the elements of this array. (spill_reg_store): Likewise for the elements of this array. (remove_init_insns): Likewise for local "equiv_insn". (will_delete_init_insn_p): Likewise for param "insn". (reload): Likewise for param ""first" and local "insn". (calculate_needs_all_insns): Strengthen local "insn" from rtx to rtx_insn *. (calculate_elim_costs_all_insns): Likewise. (delete_caller_save_insns): Likewise. (spill_failure): Likewise for param "insn". (delete_dead_insn): Likewise. (set_label_offsets): Likewise. (eliminate_regs_in_insn): Likewise, also for locals "base_insn" and "prev_insn". (elimination_costs_in_insn): Likewise for param "insn". (set_initial_eh_label_offset): Replace use of NULL_RTX with NULL when referring to an insn. (set_initial_label_offsets): Likewise. (set_offsets_for_label): Strengthen param "insn" from rtx to rtx_insn *. (init_eliminable_invariants): Likewise for param "first" and local "insn". (fixup_eh_region_note): Likewise for param "insn". (reload_as_needed): Likewise for locals "prev", "insn", "old_next", "old_prev", "next". (gen_reload_chain_without_interm_reg_p): Likewise for locals "insn", "last". (reload_inheritance_insn): Strengthen elements of this array from rtx to rtx_insn *. (failed_reload): Likewise for param "insn". (choose_reload_regs): Likewise for local "insn". Replace use of NULL_RTX with NULL when referring to an insn. (input_reload_insns): Strengthen elements of this array from rtx to rtx_insn *. (other_input_address_reload_insns): Likewise for this global. (other_input_reload_insns): Likewise for this global. (input_address_reload_insns): Likwise for the elements of this array. (inpaddr_address_reload_insns): Likwise for the elements of this array. (output_reload_insns): Likewise for the elements of this array. (output_address_reload_insns): Likewise for the elements of this array. (outaddr_address_reload_insns): Likewise for the elements of this array. (operand_reload_insns): Likewise for this global. (other_operand_reload_insns): Likewise for this global. (other_output_reload_insns): Likewise for the elements of this array. (new_spill_reg_store): Likewise for the elements of this array. (emit_input_reload_insns): Likewise for locals "insn", "temp". Strengthen local "where" from rtx * to rtx_insn **. (emit_output_reload_insns): Strengthen locals "insn", "p", "next" from rtx to rtx_insn *. (do_input_reload): Likewise for local "insn". (do_output_reload): Likewise for local "insn". (emit_reload_insns): Likewise for locals "insn" and "store_insn". (emit_insn_if_valid_for_reload): Likewise for return type and local "last". Add checked cast to rtx_insn when returning "insn" since this has been through emit_insn. (gen_reload): Strengthen return type and locals "last", "insn", "set" from rtx to rtx_insn *. Add checked cast to rtx_insn when returning "insn" since it's been through emit_insn_if_valid_for_reload at this point. (delete_output_reload): Strengthen param "insn" and locals "output_reload_insn", "i2" from rtx to rtx_insn *. (delete_address_reloads): Likewise for params "dead_insn", "current_insn" and locals "prev", "next". (delete_address_reloads_1): Likewise for params "dead_insn", "current_insn" and locals "prev", "i2". (inc_for_reload): Likewise for locals "last", "add_insn". (add_auto_inc_notes): Strengthen param "insn" from rtx to rtx_insn *. * config/arc/arc-protos.h (regno_clobbered_p): Likewise for 2nd param of this duplicate of the prototype from reload.h From-SVN: r214370
2014-08-22 22:49:31 +02:00
find_reloads (rtx_insn *insn, int replace, int ind_levels, int live_known,
short *reload_reg_p)
1992-02-28 11:23:25 +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 insn_code_number;
int i, j;
1992-02-28 11:23:25 +01:00
int noperands;
/* These start out as the constraints for the insn
and they are chewed up as we consider alternatives. */
const char *constraints[MAX_RECOG_OPERANDS];
1992-02-28 11:23:25 +01:00
/* These are the preferred classes for an operand, or NO_REGS if it isn't
a register. */
enum reg_class preferred_class[MAX_RECOG_OPERANDS];
char pref_or_nothing[MAX_RECOG_OPERANDS];
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
/* Nonzero for a MEM operand whose entire address needs a reload.
May be -1 to indicate the entire address may or may not need a reload. */
1992-02-28 11:23:25 +01:00
int address_reloaded[MAX_RECOG_OPERANDS];
/* Nonzero for an address operand that needs to be completely reloaded.
May be -1 to indicate the entire operand may or may not need a reload. */
int address_operand_reloaded[MAX_RECOG_OPERANDS];
/* Value of enum reload_type to use for operand. */
enum reload_type operand_type[MAX_RECOG_OPERANDS];
/* Value of enum reload_type to use within address of operand. */
enum reload_type address_type[MAX_RECOG_OPERANDS];
/* Save the usage of each operand. */
enum reload_usage { RELOAD_READ, RELOAD_READ_WRITE, RELOAD_WRITE } modified[MAX_RECOG_OPERANDS];
1992-02-28 11:23:25 +01:00
int no_input_reloads = 0, no_output_reloads = 0;
int n_alternatives;
reg_class_t this_alternative[MAX_RECOG_OPERANDS];
char this_alternative_match_win[MAX_RECOG_OPERANDS];
1992-02-28 11:23:25 +01:00
char this_alternative_win[MAX_RECOG_OPERANDS];
char this_alternative_offmemok[MAX_RECOG_OPERANDS];
char this_alternative_earlyclobber[MAX_RECOG_OPERANDS];
int this_alternative_matches[MAX_RECOG_OPERANDS];
reg_class_t goal_alternative[MAX_RECOG_OPERANDS];
1992-02-28 11:23:25 +01:00
int this_alternative_number;
builtins.c (expand_builtin_strlen): Initialize variable `icode'. * builtins.c (expand_builtin_strlen): Initialize variable `icode'. * calls.c (expand_call): Likewise for `old_stack_arg_under_construction'. * cpphash.c (macroexpand): Likewise for `args' and `rest_zero'. * function.c (pad_to_arg_alignment): Likewise for `save_var' and `save_constant'. * gcc.c (execute): Likewise for `ut' and `st'. * genattrtab.c (attr_rtx): Likewise for `rt_val'. * genopinit.c (gen_insn): Likewise for `m1', `m2' and `op'. * jump.c (jump_optimize_1): Likewise for `temp2'. * local-alloc.c (block_alloc): Likewise for `r1'. * loop.c (recombine_givs): Likewise for `life_start' and `life_end'. * reg-stack.c (check_asm_stack_operands): Likewise for `clobber_reg'. (subst_asm_stack_regs): Likewise for `clobber_reg' and `clobber_loc'. * regmove.c (fixup_match_1): Likewise for `insn_const', `dst_node' and `set2'. * reload.c (find_reloads): Likewise for `goal_alternative_number' and `goal_earlyclobber'. * scan-decls.c (scan_decls): Likewise for `prev_id_end'. * sdbout.c (sdbout_one_type): Likewise for `member_scl'. * stupid.c (stupid_life_analysis): Likewise for `chain'. * unroll.c (copy_loop_body): Likewise for `copy'. * varasm.c (output_constructor): Likewise for `byte'. ch: * actions.c (update_else_range_for_int_const): Initialize variables `lowval' and `highval'. (update_else_range_for_range): Likewise for `low_range_val' and `high_range_val'. cp: * class.c (warn_hidden): Initialize variable `fndecl'. From-SVN: r31207
2000-01-04 17:29:41 +01:00
int goal_alternative_number = 0;
1992-02-28 11:23:25 +01:00
int operand_reloadnum[MAX_RECOG_OPERANDS];
int goal_alternative_matches[MAX_RECOG_OPERANDS];
int goal_alternative_matched[MAX_RECOG_OPERANDS];
char goal_alternative_match_win[MAX_RECOG_OPERANDS];
1992-02-28 11:23:25 +01:00
char goal_alternative_win[MAX_RECOG_OPERANDS];
char goal_alternative_offmemok[MAX_RECOG_OPERANDS];
char goal_alternative_earlyclobber[MAX_RECOG_OPERANDS];
int goal_alternative_swapped;
int best;
int commutative;
char operands_match[MAX_RECOG_OPERANDS][MAX_RECOG_OPERANDS];
rtx substed_operand[MAX_RECOG_OPERANDS];
rtx body = PATTERN (insn);
rtx set = single_set (insn);
builtins.c (expand_builtin_strlen): Initialize variable `icode'. * builtins.c (expand_builtin_strlen): Initialize variable `icode'. * calls.c (expand_call): Likewise for `old_stack_arg_under_construction'. * cpphash.c (macroexpand): Likewise for `args' and `rest_zero'. * function.c (pad_to_arg_alignment): Likewise for `save_var' and `save_constant'. * gcc.c (execute): Likewise for `ut' and `st'. * genattrtab.c (attr_rtx): Likewise for `rt_val'. * genopinit.c (gen_insn): Likewise for `m1', `m2' and `op'. * jump.c (jump_optimize_1): Likewise for `temp2'. * local-alloc.c (block_alloc): Likewise for `r1'. * loop.c (recombine_givs): Likewise for `life_start' and `life_end'. * reg-stack.c (check_asm_stack_operands): Likewise for `clobber_reg'. (subst_asm_stack_regs): Likewise for `clobber_reg' and `clobber_loc'. * regmove.c (fixup_match_1): Likewise for `insn_const', `dst_node' and `set2'. * reload.c (find_reloads): Likewise for `goal_alternative_number' and `goal_earlyclobber'. * scan-decls.c (scan_decls): Likewise for `prev_id_end'. * sdbout.c (sdbout_one_type): Likewise for `member_scl'. * stupid.c (stupid_life_analysis): Likewise for `chain'. * unroll.c (copy_loop_body): Likewise for `copy'. * varasm.c (output_constructor): Likewise for `byte'. ch: * actions.c (update_else_range_for_int_const): Initialize variables `lowval' and `highval'. (update_else_range_for_range): Likewise for `low_range_val' and `high_range_val'. cp: * class.c (warn_hidden): Initialize variable `fndecl'. From-SVN: r31207
2000-01-04 17:29:41 +01:00
int goal_earlyclobber = 0, this_earlyclobber;
1992-02-28 11:23:25 +01:00
enum machine_mode operand_mode[MAX_RECOG_OPERANDS];
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
int retval = 0;
1992-02-28 11:23:25 +01:00
this_insn = insn;
n_reloads = 0;
n_replacements = 0;
n_earlyclobbers = 0;
replace_reloads = replace;
hard_regs_live_known = live_known;
static_reload_reg_p = reload_reg_p;
/* JUMP_INSNs and CALL_INSNs are not allowed to have any output reloads;
neither are insns that SET cc0. Insns that use CC0 are not allowed
to have any input reloads. */
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) || CALL_P (insn))
1992-02-28 11:23:25 +01:00
no_output_reloads = 1;
#ifdef HAVE_cc0
if (reg_referenced_p (cc0_rtx, PATTERN (insn)))
no_input_reloads = 1;
if (reg_set_p (cc0_rtx, PATTERN (insn)))
no_output_reloads = 1;
#endif
#ifdef SECONDARY_MEMORY_NEEDED
/* The eliminated forms of any secondary memory locations are per-insn, so
clear them out here. */
if (secondary_memlocs_elim_used)
{
memset (secondary_memlocs_elim, 0,
sizeof (secondary_memlocs_elim[0]) * secondary_memlocs_elim_used);
secondary_memlocs_elim_used = 0;
}
#endif
/* Dispose quickly of (set (reg..) (reg..)) if both have hard regs and it
is cheap to move between them. If it is not, there may not be an insn
to do the copy, so we may need a reload. */
if (GET_CODE (body) == 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 (body))
&& REGNO (SET_DEST (body)) < FIRST_PSEUDO_REGISTER
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_SRC (body))
&& REGNO (SET_SRC (body)) < FIRST_PSEUDO_REGISTER
2010-06-27 13:40:42 +02:00
&& register_move_cost (GET_MODE (SET_SRC (body)),
tm.texi (REGISTER_MOVE_COST): Add a mode argument. * tm.texi (REGISTER_MOVE_COST): Add a mode argument. * reload.c (REGISTER_MOVE_COST): Likewise. Adjust all callers. * reload1.c (REGISTER_MOVE_COST): Likewise. * regclass.c (REGISTER_MOVE_COST): Likewise. (move_cost, may_move_in_cost, may_move_out_cost): Add mode dimension. Adjust all users. (init_reg_sets_1): Iterate on all modes. * config/1750a/1750a.h (REGISTER_MOVE_COST): Adjust. * config/a29k/a29k.h (REGISTER_MOVE_COST): Adjust. * config/alpha/alpha.h (REGISTER_MOVE_COST): Adjust. * config/arc/arc.h (REGISTER_MOVE_COST): Adjust. * config/arm/arm.h (REGISTER_MOVE_COST): Adjust. * config/avr/avr.h (REGISTER_MOVE_COST): Adjust. * config/c4x/c4x.h (REGISTER_MOVE_COST): Adjust. * config/d30v/d30v.h (REGISTER_MOVE_COST): Adjust. * config/dsp16xx/dsp16xx.h (REGISTER_MOVE_COST): Adjust. * config/h8300/h8300.h (REGISTER_MOVE_COST): Adjust. * config/i386/i386.h (REGISTER_MOVE_COST): Adjust. * config/ia64/ia64.h (REGISTER_MOVE_COST): Adjust. * config/m32r/m32r.h (REGISTER_MOVE_COST): Adjust. * config/m68hc11/m68hc11.h (REGISTER_MOVE_COST): Adjust. * config/m68k/m68k.h (REGISTER_MOVE_COST): Adjust. * config/mcore/mcore.h (REGISTER_MOVE_COST): Adjust. * config/mips/mips.h (REGISTER_MOVE_COST): Adjust. * config/mn10200/mn10200.h (REGISTER_MOVE_COST): Adjust. * config/mn10300/mn10300.h (REGISTER_MOVE_COST): Adjust. * config/ns32k/ns32k.h (REGISTER_MOVE_COST): Adjust. * config/pa/pa.h (REGISTER_MOVE_COST): Adjust. * config/pdp11/pdp11.h (REGISTER_MOVE_COST): Adjust. * config/pj/pj.h (REGISTER_MOVE_COST): Adjust. * config/romp/romp.h (REGISTER_MOVE_COST): Adjust. * config/rs6000/rs6000.h (REGISTER_MOVE_COST): Adjust. * config/sh/sh.h (REGISTER_MOVE_COST): Adjust. * config/sparc/sparc.h (REGISTER_MOVE_COST): Adjust. From-SVN: r38604
2001-01-02 01:59:52 +01:00
REGNO_REG_CLASS (REGNO (SET_SRC (body))),
REGNO_REG_CLASS (REGNO (SET_DEST (body)))) == 2)
return 0;
1992-02-28 11:23:25 +01:00
extract_insn (insn);
1992-02-28 11:23:25 +01:00
noperands = reload_n_operands = recog_data.n_operands;
n_alternatives = recog_data.n_alternatives;
1992-02-28 11:23:25 +01:00
/* Just return "no reloads" if insn has no operands with constraints. */
if (noperands == 0 || n_alternatives == 0)
return 0;
1992-02-28 11:23:25 +01:00
insn_code_number = INSN_CODE (insn);
this_insn_is_asm = insn_code_number < 0;
1992-02-28 11:23:25 +01:00
memcpy (operand_mode, recog_data.operand_mode,
noperands * sizeof (enum machine_mode));
memcpy (constraints, recog_data.constraints,
noperands * sizeof (const char *));
1992-02-28 11:23:25 +01:00
commutative = -1;
/* If we will need to know, later, whether some pair of operands
are the same, we must compare them now and save the result.
Reloading the base and index registers will clobber them
and afterward they will fail to match. */
for (i = 0; i < noperands; i++)
{
const char *p;
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 c;
char *end;
1992-02-28 11:23:25 +01:00
substed_operand[i] = recog_data.operand[i];
1992-02-28 11:23:25 +01:00
p = constraints[i];
modified[i] = RELOAD_READ;
/* Scan this operand's constraint to see if it is an output operand,
an in-out operand, is commutative, or should match another. */
1992-02-28 11:23:25 +01:00
defaults.h (EXTRA_MEMORY_CONSTRAINT): Add STR argument. * defaults.h (EXTRA_MEMORY_CONSTRAINT): Add STR argument. (EXTRA_ADDRESS_CONSTRAINT): Likewise. (CONSTRAINT_LEN): Provide default definition. (CONST_OK_FOR_CONSTRAINT_P): Likewise. (CONST_DOUBLE_OK_FOR_CONSTRAINT_P): Likewise. (EXTRA_CONSTRAINT_STR): Likewise. (REG_CLASS_FROM_CONSTRAINT): Define. * genoutput.c (check_constraint_len, constraint_len): New functions. (validate_insn_alternatives): Check CONSTRAINT_LEN for each constraint / modifier. (gen_insn): Call check_constraint_len. * local-alloc.c (block_alloc): Update to use new macros / pass second argument to EXTRA_{MEMORY,ADDRESS}_CONSTRAINT. * ra-build.c (handle_asm_insn): Likewise. * recog.c (asm_operand_ok, preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. * regclass.c (record_operand_costs, record_reg_classes): Likewise. * regmove.c (find_matches): Likewise. * reload.c (push_secondary_reload, find_reloads): Likewise. (alternative_allows_memconst): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. (reload_cse_simplify_operands): Likewise. * stmt.c (parse_output_constraint, parse_input_constraint): Likewise. * doc/tm.texi (CONSTRAINT_LEN, REG_CLASS_FROM_CONSTRAINT): Document. (CONST_OK_FOR_CONSTRAINT_P): Likewise. (CONST_DOUBLE_OK_FOR_CONSTRAINT_P, EXTRA_CONSTRAINT_STR): Likewise. (EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT): Add STR argument. * config/s390/s390.h (EXTRA_MEMORY_CONSTRAINT): Likewise. From-SVN: r61119
2003-01-09 18:28:49 +01:00
while ((c = *p))
{
defaults.h (EXTRA_MEMORY_CONSTRAINT): Add STR argument. * defaults.h (EXTRA_MEMORY_CONSTRAINT): Add STR argument. (EXTRA_ADDRESS_CONSTRAINT): Likewise. (CONSTRAINT_LEN): Provide default definition. (CONST_OK_FOR_CONSTRAINT_P): Likewise. (CONST_DOUBLE_OK_FOR_CONSTRAINT_P): Likewise. (EXTRA_CONSTRAINT_STR): Likewise. (REG_CLASS_FROM_CONSTRAINT): Define. * genoutput.c (check_constraint_len, constraint_len): New functions. (validate_insn_alternatives): Check CONSTRAINT_LEN for each constraint / modifier. (gen_insn): Call check_constraint_len. * local-alloc.c (block_alloc): Update to use new macros / pass second argument to EXTRA_{MEMORY,ADDRESS}_CONSTRAINT. * ra-build.c (handle_asm_insn): Likewise. * recog.c (asm_operand_ok, preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. * regclass.c (record_operand_costs, record_reg_classes): Likewise. * regmove.c (find_matches): Likewise. * reload.c (push_secondary_reload, find_reloads): Likewise. (alternative_allows_memconst): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. (reload_cse_simplify_operands): Likewise. * stmt.c (parse_output_constraint, parse_input_constraint): Likewise. * doc/tm.texi (CONSTRAINT_LEN, REG_CLASS_FROM_CONSTRAINT): Document. (CONST_OK_FOR_CONSTRAINT_P): Likewise. (CONST_DOUBLE_OK_FOR_CONSTRAINT_P, EXTRA_CONSTRAINT_STR): Likewise. (EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT): Add STR argument. * config/s390/s390.h (EXTRA_MEMORY_CONSTRAINT): Likewise. From-SVN: r61119
2003-01-09 18:28:49 +01:00
p += CONSTRAINT_LEN (c, p);
switch (c)
{
case '=':
modified[i] = RELOAD_WRITE;
break;
case '+':
modified[i] = RELOAD_READ_WRITE;
break;
case '%':
{
/* The last operand should not be marked commutative. */
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 (i != noperands - 1);
/* We currently only support one commutative pair of
operands. Some existing asm code currently uses more
than one pair. Previously, that would usually work,
but sometimes it would crash the compiler. We
continue supporting that case as well as we can by
silently ignoring all but the first pair. In the
future we may handle it correctly. */
if (commutative < 0)
commutative = i;
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
else
gcc_assert (this_insn_is_asm);
}
break;
/* Use of ISDIGIT is tempting here, but it may get expensive because
of locale support we don't want. */
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
{
c = strtoul (p - 1, &end, 10);
p = end;
operands_match[c][i]
= operands_match_p (recog_data.operand[c],
recog_data.operand[i]);
/* An operand may not match itself. */
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 (c != i);
/* If C can be commuted with C+1, and C might need to match I,
then C+1 might also need to match I. */
if (commutative >= 0)
{
if (c == commutative || c == commutative + 1)
{
int other = c + (c == commutative ? 1 : -1);
operands_match[other][i]
= operands_match_p (recog_data.operand[other],
recog_data.operand[i]);
}
if (i == commutative || i == commutative + 1)
{
int other = i + (i == commutative ? 1 : -1);
operands_match[c][other]
= operands_match_p (recog_data.operand[c],
recog_data.operand[other]);
}
/* Note that C is supposed to be less than I.
No need to consider altering both C and I because in
that case we would alter one into the other. */
}
}
}
}
1992-02-28 11:23:25 +01:00
}
/* Examine each operand that is a memory reference or memory address
and reload parts of the addresses into index registers.
Also here any references to pseudo regs that didn't get hard regs
but are equivalent to constants get replaced in the insn itself
with those constants. Nobody will ever see them again.
1992-02-28 11:23:25 +01:00
Finally, set up the preferred classes of each operand. */
for (i = 0; i < noperands; i++)
{
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_CODE code = GET_CODE (recog_data.operand[i]);
1992-02-28 11:23:25 +01:00
address_reloaded[i] = 0;
address_operand_reloaded[i] = 0;
operand_type[i] = (modified[i] == RELOAD_READ ? RELOAD_FOR_INPUT
: modified[i] == RELOAD_WRITE ? RELOAD_FOR_OUTPUT
: RELOAD_OTHER);
address_type[i]
= (modified[i] == RELOAD_READ ? RELOAD_FOR_INPUT_ADDRESS
: modified[i] == RELOAD_WRITE ? RELOAD_FOR_OUTPUT_ADDRESS
: RELOAD_OTHER);
1992-02-28 11:23:25 +01:00
if (*constraints[i] == 0)
/* Ignore things like match_operator operands. */
;
common.md: New file. gcc/ * common.md: New file. * doc/md.texi: Update description of generic, machine-independent constraints. * config/s390/constraints.md (e): Delete. * Makefile.in (md_file): Include common.md. * config/m32c/t-m32c (md_file): Likewise. * genpreds.c (general_mem): New array. (generic_constraint_letters): Remove constraints now defined by common.md. (add_constraint): Map TARGET_MEM_CONSTRAINT to general_mem. Allow the first character to be '<' or '>' as well. * genoutput.c (general_mem): New array. (indep_constraints): Remove constraints now defined by common.md. (note_constraint): Map TARGET_MEM_CONSTRAINT to general_mem. Remove special handling of 'm'. * ira-costs.c (record_reg_classes): Remove special handling of constraints now defined by common.md. * ira.c (ira_setup_alts, ira_get_dup_out_num): Likewise. * ira-lives.c (single_reg_class): Likewise. (ira_implicitly_set_insn_hard_regs): Likewise. * lra-constraints.c (reg_class_from_constraints): Likewise. (process_alt_operands, process_address, curr_insn_transform): Likewise. * postreload.c (reload_cse_simplify_operands): Likewise. * reload.c (push_secondary_reload, scratch_reload_class) (find_reloads, alternative_allows_const_pool_ref): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. * targhooks.c (default_secondary_reload): Likewise. * stmt.c (parse_output_constraint): Likewise. * recog.c (preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. (asm_operand_ok): Likewise, but add a comment saying why 'o' must be handled specially. From-SVN: r211475
2014-06-11 18:59:17 +02:00
else if (insn_extra_address_constraint
(lookup_constraint (constraints[i])))
1992-02-28 11:23:25 +01:00
{
address_operand_reloaded[i]
= find_reloads_address (recog_data.operand_mode[i], (rtx*) 0,
recog_data.operand[i],
recog_data.operand_loc[i],
i, operand_type[i], ind_levels, insn);
/* If we now have a simple operand where we used to have a
PLUS or MULT, re-recognize and try again. */
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 ((OBJECT_P (*recog_data.operand_loc[i])
|| GET_CODE (*recog_data.operand_loc[i]) == SUBREG)
&& (GET_CODE (recog_data.operand[i]) == MULT
|| GET_CODE (recog_data.operand[i]) == PLUS))
{
INSN_CODE (insn) = -1;
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
retval = find_reloads (insn, replace, ind_levels, live_known,
reload_reg_p);
return retval;
}
recog_data.operand[i] = *recog_data.operand_loc[i];
substed_operand[i] = recog_data.operand[i];
/* Address operands are reloaded in their existing mode,
no matter what is specified in the machine description. */
operand_mode[i] = GET_MODE (recog_data.operand[i]);
/* If the address is a single CONST_INT pick address mode
instead otherwise we will later not know in which mode
the reload should be performed. */
if (operand_mode[i] == VOIDmode)
operand_mode[i] = Pmode;
1992-02-28 11:23:25 +01:00
}
else if (code == MEM)
{
address_reloaded[i]
= find_reloads_address (GET_MODE (recog_data.operand[i]),
recog_data.operand_loc[i],
XEXP (recog_data.operand[i], 0),
&XEXP (recog_data.operand[i], 0),
i, address_type[i], ind_levels, insn);
recog_data.operand[i] = *recog_data.operand_loc[i];
substed_operand[i] = recog_data.operand[i];
1992-02-28 11:23:25 +01:00
}
else if (code == SUBREG)
{
rtx reg = SUBREG_REG (recog_data.operand[i]);
rtx op
= find_reloads_toplev (recog_data.operand[i], i, address_type[i],
ind_levels,
set != 0
&& &SET_DEST (set) == recog_data.operand_loc[i],
insn,
&address_reloaded[i]);
/* If we made a MEM to load (a part of) the stackslot of a pseudo
that didn't get a hard register, emit a USE with a REG_EQUAL
note in front so that we might inherit a previous, possibly
wider reload. */
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
if (replace
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 (op)
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)
&& (GET_MODE_SIZE (GET_MODE (reg))
>= GET_MODE_SIZE (GET_MODE (op)))
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
&& reg_equiv_constant (REGNO (reg)) == 0)
set_unique_reg_note (emit_insn_before (gen_rtx_USE (VOIDmode, reg),
insn),
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
REG_EQUAL, reg_equiv_memory_loc (REGNO (reg)));
substed_operand[i] = recog_data.operand[i] = 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
else if (code == PLUS || GET_RTX_CLASS (code) == RTX_UNARY)
/* We can get a PLUS as an "operand" as a result of register
elimination. See eliminate_regs and gen_reload. We handle
a unary operator by reloading the operand. */
substed_operand[i] = recog_data.operand[i]
= find_reloads_toplev (recog_data.operand[i], i, address_type[i],
ind_levels, 0, insn,
&address_reloaded[i]);
1992-02-28 11:23:25 +01:00
else if (code == REG)
{
/* This is equivalent to calling find_reloads_toplev.
The code is duplicated for speed.
When we find a pseudo always equivalent to a constant,
we replace it by the constant. We must be sure, however,
that we don't try to replace it in the insn in which it
is being set. */
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 regno = REGNO (recog_data.operand[i]);
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
if (reg_equiv_constant (regno) != 0
&& (set == 0 || &SET_DEST (set) != recog_data.operand_loc[i]))
{
/* Record the existing mode so that the check if constants are
allowed will work when operand_mode isn't specified. */
if (operand_mode[i] == VOIDmode)
operand_mode[i] = GET_MODE (recog_data.operand[i]);
substed_operand[i] = recog_data.operand[i]
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
= reg_equiv_constant (regno);
}
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
if (reg_equiv_memory_loc (regno) != 0
&& (reg_equiv_address (regno) != 0 || num_not_at_initial_offset))
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
/* We need not give a valid is_set_dest argument since the case
of a constant equivalence was checked above. */
substed_operand[i] = recog_data.operand[i]
= find_reloads_toplev (recog_data.operand[i], i, address_type[i],
ind_levels, 0, insn,
&address_reloaded[i]);
1992-02-28 11:23:25 +01:00
}
/* If the operand is still a register (we didn't replace it with an
equivalent), get the preferred class to reload it into. */
code = GET_CODE (recog_data.operand[i]);
preferred_class[i]
= ((code == REG && REGNO (recog_data.operand[i])
>= FIRST_PSEUDO_REGISTER)
? reg_preferred_class (REGNO (recog_data.operand[i]))
: NO_REGS);
pref_or_nothing[i]
= (code == REG
&& REGNO (recog_data.operand[i]) >= FIRST_PSEUDO_REGISTER
&& reg_alternate_class (REGNO (recog_data.operand[i])) == NO_REGS);
1992-02-28 11:23:25 +01:00
}
/* If this is simply a copy from operand 1 to operand 0, merge the
preferred classes for the operands. */
if (set != 0 && noperands >= 2 && recog_data.operand[0] == SET_DEST (set)
&& recog_data.operand[1] == SET_SRC (set))
1992-02-28 11:23:25 +01:00
{
preferred_class[0] = preferred_class[1]
= reg_class_subunion[(int) preferred_class[0]][(int) preferred_class[1]];
pref_or_nothing[0] |= pref_or_nothing[1];
pref_or_nothing[1] |= pref_or_nothing[0];
}
/* Now see what we need for pseudo-regs that didn't get hard regs
or got the wrong kind of hard reg. For this, we must consider
all the operands together against the register constraints. */
best = MAX_RECOG_OPERANDS * 2 + 600;
1992-02-28 11:23:25 +01:00
goal_alternative_swapped = 0;
/* The constraints are made of several alternatives.
Each operand's constraint looks like foo,bar,... with commas
separating the alternatives. The first alternatives for all
operands go together, the second alternatives go together, etc.
First loop over alternatives. */
for (this_alternative_number = 0;
this_alternative_number < n_alternatives;
this_alternative_number++)
{
int swapped;
1992-02-28 11:23:25 +01:00
system.h (TEST_BIT): New macro. gcc/ * system.h (TEST_BIT): New macro. * recog.h (alternative_mask): New type. (ALL_ALTERNATIVES, ALTERNATIVE_BIT): New macros. (recog_data_d): Replace alternative_enabled_p array with enabled_alternatives. (target_recog): New structure. (default_target_recog, this_target_recog): Declare. (get_enabled_alternatives, recog_init): Likewise. * recog.c (default_target_recog, this_target_recog): New variables. (get_enabled_alternatives): New function. (extract_insn): Use it. (recog_init): New function. (preprocess_constraints, constrain_operands): Adjust for change to recog_data. * postreload.c (reload_cse_simplify_operands): Likewise. * reload.c (find_reloads): Likewise. * ira-costs.c (record_reg_classes): Likewise. * ira-lives.c (single_reg_class): Likewise. Fix bug in which all alternatives after a disabled one would be skipped. (ira_implicitly_set_insn_hard_regs): Likewise. * ira.c (ira_setup_alts): Adjust for change to recog_data. * lra-int.h (lra_insn_recog_data): Replace alternative_enabled_p with enabled_alternatives. * lra.c (free_insn_recog_data): Update accordingly. (lra_update_insn_recog_data): Likewise. (lra_set_insn_recog_data): Likewise. Use get_enabled_alternatives. * lra-constraints.c (process_alt_operands): Likewise. Handle only_alternative as part of the enabled mask. * target-globals.h (this_target_recog): Declare. (target_globals): Add a recog field. (restore_target_globals): Restore this_target_recog. * target-globals.c: Include recog.h. (default_target_globals): Initialize recog field. (save_target_globals): Likewise. * reginfo.c (reinit_regs): Call recog_init. * toplev.c (backend_init_target): Likewise. From-SVN: r210964
2014-05-27 12:06:22 +02:00
if (!TEST_BIT (recog_data.enabled_alternatives, this_alternative_number))
{
int i;
for (i = 0; i < recog_data.n_operands; i++)
constraints[i] = skip_alternative (constraints[i]);
continue;
}
/* If insn is commutative (it's safe to exchange a certain pair
of operands) then we need to try each alternative twice, the
second time matching those two operands as if we had
exchanged them. To do this, really exchange them in
operands. */
for (swapped = 0; swapped < (commutative >= 0 ? 2 : 1); swapped++)
1992-02-28 11:23:25 +01:00
{
/* Loop over operands for one constraint alternative. */
/* LOSERS counts those that don't fit this alternative
and would require loading. */
int losers = 0;
/* BAD is set to 1 if it some operand can't fit this alternative
even after reloading. */
int bad = 0;
/* REJECT is a count of how undesirable this alternative says it is
if any reloading is required. If the alternative matches exactly
then REJECT is ignored, but otherwise it gets this much
counted against it in addition to the reloading needed. Each
? counts three times here since we want the disparaging caused by
a bad register class to only count 1/3 as much. */
int reject = 0;
if (swapped)
1992-02-28 11:23:25 +01:00
{
enum reg_class tclass;
int t;
recog_data.operand[commutative] = substed_operand[commutative + 1];
recog_data.operand[commutative + 1] = substed_operand[commutative];
/* Swap the duplicates too. */
for (i = 0; i < recog_data.n_dups; i++)
if (recog_data.dup_num[i] == commutative
|| recog_data.dup_num[i] == commutative + 1)
*recog_data.dup_loc[i]
= recog_data.operand[(int) recog_data.dup_num[i]];
tclass = preferred_class[commutative];
preferred_class[commutative] = preferred_class[commutative + 1];
preferred_class[commutative + 1] = tclass;
t = pref_or_nothing[commutative];
pref_or_nothing[commutative] = pref_or_nothing[commutative + 1];
pref_or_nothing[commutative + 1] = t;
t = address_reloaded[commutative];
address_reloaded[commutative] = address_reloaded[commutative + 1];
address_reloaded[commutative + 1] = t;
}
this_earlyclobber = 0;
for (i = 0; i < noperands; i++)
{
const char *p = constraints[i];
char *end;
int len;
int win = 0;
int did_match = 0;
/* 0 => this operand can be reloaded somehow for this alternative. */
int badop = 1;
/* 0 => this operand can be reloaded if the alternative allows regs. */
int winreg = 0;
int c;
int m;
rtx operand = recog_data.operand[i];
int offset = 0;
/* Nonzero means this is a MEM that must be reloaded into a reg
regardless of what the constraint says. */
int force_reload = 0;
int offmemok = 0;
/* Nonzero if a constant forced into memory would be OK for this
operand. */
int constmemok = 0;
int earlyclobber = 0;
system.h (REG_CLASS_FROM_CONSTRAINT): Poison. gcc/ * system.h (REG_CLASS_FROM_CONSTRAINT): Poison. (REG_CLASS_FOR_CONSTRAINT, EXTRA_CONSTRAINT_STR): Likewise. (EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT): Likewise. * genpreds.c (print_type_tree): New function. (write_tm_preds_h): Remove REG_CLASS_FROM_CONSTRAINT, REG_CLASS_FOR_CONSTRAINT, EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT and EXTRA_CONSTRAINT_STR. Write out enum constraint_type and get_constraint_type. * lra-constraints.c (satisfies_memory_constraint_p): Take a constraint_num rather than a constraint string. (satisfies_address_constraint_p): Likewise. (reg_class_from_constraints): Avoid old constraint macros. (process_alt_operands, process_address_1): Likewise. (curr_insn_transform): Likewise. * ira-costs.c (record_reg_classes): Likewise. (record_operand_costs): Likewise. * ira-lives.c (single_reg_class): Likewise. (ira_implicitly_set_insn_hard_regs): Likewise. * ira.c (ira_setup_alts, ira_get_dup_out_num): Likewise. * postreload.c (reload_cse_simplify_operands): Likewise. * recog.c (asm_operand_ok, preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. * reload.c (push_secondary_reload, scratch_reload_class): Likewise. (find_reloads, alternative_allows_const_pool_ref): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. * stmt.c (parse_output_constraint, parse_input_constraint): Likewise. * targhooks.c (default_secondary_reload): Likewise. * config/m32c/m32c.c (m32c_matches_constraint_p): Avoid reference to EXTRA_CONSTRAINT_STR. * config/sparc/constraints.md (U): Likewise REG_CLASS_FROM_CONSTRAINT. From-SVN: r211471
2014-06-11 18:58:35 +02:00
enum constraint_num cn;
enum reg_class cl;
/* If the predicate accepts a unary operator, it means that
we need to reload the operand, but do not do this for
match_operator and friends. */
if (UNARY_P (operand) && *p != 0)
operand = XEXP (operand, 0);
/* If the operand is a SUBREG, extract
the REG or MEM (or maybe even a constant) within.
(Constants can occur as a result of reg_equiv_constant.) */
while (GET_CODE (operand) == 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
{
/* Offset only matters when operand is a REG and
it is a hard reg. This is because it is passed
to reg_fits_class_p if it is a REG and all pseudos
return 0 from that function. */
if (REG_P (SUBREG_REG (operand))
&& REGNO (SUBREG_REG (operand)) < FIRST_PSEUDO_REGISTER)
{
if (simplify_subreg_regno (REGNO (SUBREG_REG (operand)),
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
GET_MODE (SUBREG_REG (operand)),
SUBREG_BYTE (operand),
GET_MODE (operand)) < 0)
force_reload = 1;
offset += subreg_regno_offset (REGNO (SUBREG_REG (operand)),
GET_MODE (SUBREG_REG (operand)),
SUBREG_BYTE (operand),
GET_MODE (operand));
}
operand = SUBREG_REG (operand);
/* Force reload if this is a constant or PLUS or if there may
be a problem accessing OPERAND in the outer mode. */
if (CONSTANT_P (operand)
|| GET_CODE (operand) == PLUS
/* We must force a reload of paradoxical SUBREGs
of a MEM because the alignment of the inner value
may not be enough to do the outer reference. On
big-endian machines, it may also reference outside
the object.
On machines that extend byte operations and we have a
SUBREG where both the inner and outer modes are no wider
than a word and the inner mode is narrower, is integral,
and gets extended when loaded from memory, combine.c has
made assumptions about the behavior of the machine in such
register access. If the data is, in fact, in memory we
must always load using the size assumed to be in the
register and let the insn do the different-sized
accesses.
This is doubly true if WORD_REGISTER_OPERATIONS. In
this case eliminate_regs has left non-paradoxical
subregs for push_reload to see. Make sure it does
by forcing the reload.
??? When is it right at this stage to have a subreg
of a mem that is _not_ to be handled specially? IMO
those should have been reduced to just a mem. */
|| ((MEM_P (operand)
|| (REG_P (operand)
&& REGNO (operand) >= FIRST_PSEUDO_REGISTER))
#ifndef WORD_REGISTER_OPERATIONS
&& (((GET_MODE_BITSIZE (GET_MODE (operand))
< BIGGEST_ALIGNMENT)
&& (GET_MODE_SIZE (operand_mode[i])
> GET_MODE_SIZE (GET_MODE (operand))))
|| BYTES_BIG_ENDIAN
#ifdef LOAD_EXTEND_OP
|| (GET_MODE_SIZE (operand_mode[i]) <= UNITS_PER_WORD
&& (GET_MODE_SIZE (GET_MODE (operand))
<= UNITS_PER_WORD)
&& (GET_MODE_SIZE (operand_mode[i])
> GET_MODE_SIZE (GET_MODE (operand)))
&& INTEGRAL_MODE_P (GET_MODE (operand))
&& LOAD_EXTEND_OP (GET_MODE (operand)) != UNKNOWN)
#endif
)
#endif
)
)
force_reload = 1;
}
1992-02-28 11:23:25 +01:00
this_alternative[i] = NO_REGS;
this_alternative_win[i] = 0;
this_alternative_match_win[i] = 0;
this_alternative_offmemok[i] = 0;
this_alternative_earlyclobber[i] = 0;
this_alternative_matches[i] = -1;
/* An empty constraint or empty alternative
allows anything which matched the pattern. */
if (*p == 0 || *p == ',')
win = 1, badop = 0;
/* Scan this alternative's specs for this operand;
set WIN if the operand fits any letter in this alternative.
Otherwise, clear BADOP if this operand could
fit some letter after reloads,
or set WINREG if this operand could fit after reloads
provided the constraint allows some registers. */
do
switch ((c = *p, len = CONSTRAINT_LEN (c, p)), c)
{
case '\0':
len = 0;
break;
case ',':
c = '\0';
break;
defaults.h (EXTRA_MEMORY_CONSTRAINT): Add STR argument. * defaults.h (EXTRA_MEMORY_CONSTRAINT): Add STR argument. (EXTRA_ADDRESS_CONSTRAINT): Likewise. (CONSTRAINT_LEN): Provide default definition. (CONST_OK_FOR_CONSTRAINT_P): Likewise. (CONST_DOUBLE_OK_FOR_CONSTRAINT_P): Likewise. (EXTRA_CONSTRAINT_STR): Likewise. (REG_CLASS_FROM_CONSTRAINT): Define. * genoutput.c (check_constraint_len, constraint_len): New functions. (validate_insn_alternatives): Check CONSTRAINT_LEN for each constraint / modifier. (gen_insn): Call check_constraint_len. * local-alloc.c (block_alloc): Update to use new macros / pass second argument to EXTRA_{MEMORY,ADDRESS}_CONSTRAINT. * ra-build.c (handle_asm_insn): Likewise. * recog.c (asm_operand_ok, preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. * regclass.c (record_operand_costs, record_reg_classes): Likewise. * regmove.c (find_matches): Likewise. * reload.c (push_secondary_reload, find_reloads): Likewise. (alternative_allows_memconst): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. (reload_cse_simplify_operands): Likewise. * stmt.c (parse_output_constraint, parse_input_constraint): Likewise. * doc/tm.texi (CONSTRAINT_LEN, REG_CLASS_FROM_CONSTRAINT): Document. (CONST_OK_FOR_CONSTRAINT_P): Likewise. (CONST_DOUBLE_OK_FOR_CONSTRAINT_P, EXTRA_CONSTRAINT_STR): Likewise. (EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT): Add STR argument. * config/s390/s390.h (EXTRA_MEMORY_CONSTRAINT): Likewise. From-SVN: r61119
2003-01-09 18:28:49 +01:00
case '?':
reject += 6;
break;
1992-02-28 11:23:25 +01:00
case '!':
reject = 600;
break;
1992-02-28 11:23:25 +01:00
case '#':
/* Ignore rest of this alternative as far as
reloading is concerned. */
do
p++;
while (*p && *p != ',');
len = 0;
break;
1992-02-28 11:23:25 +01:00
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
m = strtoul (p, &end, 10);
p = end;
len = 0;
this_alternative_matches[i] = m;
/* We are supposed to match a previous operand.
If we do, we win if that one did.
If we do not, count both of the operands as losers.
(This is too conservative, since most of the time
only a single reload insn will be needed to make
the two operands win. As a result, this alternative
may be rejected when it is actually desirable.) */
if ((swapped && (m != commutative || i != commutative + 1))
/* If we are matching as if two operands were swapped,
also pretend that operands_match had been computed
with swapped.
But if I is the second of those and C is the first,
don't exchange them, because operands_match is valid
only on one side of its diagonal. */
? (operands_match
[(m == commutative || m == commutative + 1)
? 2 * commutative + 1 - m : m]
[(i == commutative || i == commutative + 1)
? 2 * commutative + 1 - i : i])
: operands_match[m][i])
{
/* If we are matching a non-offsettable address where an
offsettable address was expected, then we must reject
this combination, because we can't reload it. */
if (this_alternative_offmemok[m]
&& MEM_P (recog_data.operand[m])
&& this_alternative[m] == NO_REGS
&& ! this_alternative_win[m])
bad = 1;
did_match = this_alternative_win[m];
}
else
{
/* Operands don't match. */
rtx value;
int loc1, loc2;
/* Retroactively mark the operand we had to match
as a loser, if it wasn't already. */
if (this_alternative_win[m])
losers++;
this_alternative_win[m] = 0;
if (this_alternative[m] == NO_REGS)
bad = 1;
/* But count the pair only once in the total badness of
this alternative, if the pair can be a dummy reload.
The pointers in operand_loc are not swapped; swap
them by hand if necessary. */
if (swapped && i == commutative)
loc1 = commutative + 1;
else if (swapped && i == commutative + 1)
loc1 = commutative;
else
loc1 = i;
if (swapped && m == commutative)
loc2 = commutative + 1;
else if (swapped && m == commutative + 1)
loc2 = commutative;
else
loc2 = m;
value
= find_dummy_reload (recog_data.operand[i],
recog_data.operand[m],
recog_data.operand_loc[loc1],
recog_data.operand_loc[loc2],
operand_mode[i], operand_mode[m],
this_alternative[m], -1,
this_alternative_earlyclobber[m]);
if (value != 0)
losers--;
}
/* This can be fixed with reloads if the operand
we are supposed to match can be fixed with reloads. */
badop = 0;
this_alternative[i] = this_alternative[m];
/* If we have to reload this operand and some previous
operand also had to match the same thing as this
operand, we don't know how to do that. So reject this
alternative. */
if (! did_match || force_reload)
for (j = 0; j < i; j++)
if (this_alternative_matches[j]
== this_alternative_matches[i])
{
badop = 1;
break;
}
break;
1992-02-28 11:23:25 +01:00
case 'p':
/* All necessary reloads for an address_operand
were handled in find_reloads_address. */
this_alternative[i]
= base_reg_class (VOIDmode, ADDR_SPACE_GENERIC,
ADDRESS, SCRATCH);
win = 1;
badop = 0;
break;
1992-02-28 11:23:25 +01:00
case TARGET_MEM_CONSTRAINT:
if (force_reload)
break;
if (MEM_P (operand)
|| (REG_P (operand)
&& REGNO (operand) >= FIRST_PSEUDO_REGISTER
&& reg_renumber[REGNO (operand)] < 0))
win = 1;
if (CONST_POOL_OK_P (operand_mode[i], operand))
badop = 0;
constmemok = 1;
break;
1992-02-28 11:23:25 +01:00
case '<':
if (MEM_P (operand)
&& ! address_reloaded[i]
&& (GET_CODE (XEXP (operand, 0)) == PRE_DEC
|| GET_CODE (XEXP (operand, 0)) == POST_DEC))
win = 1;
break;
1992-02-28 11:23:25 +01:00
case '>':
if (MEM_P (operand)
&& ! address_reloaded[i]
&& (GET_CODE (XEXP (operand, 0)) == PRE_INC
|| GET_CODE (XEXP (operand, 0)) == POST_INC))
win = 1;
break;
1992-02-28 11:23:25 +01:00
/* Memory operand whose address is not offsettable. */
case 'V':
if (force_reload)
break;
if (MEM_P (operand)
&& ! (ind_levels ? offsettable_memref_p (operand)
: offsettable_nonstrict_memref_p (operand))
/* Certain mem addresses will become offsettable
after they themselves are reloaded. This is important;
we don't want our own handling of unoffsettables
to override the handling of reg_equiv_address. */
&& !(REG_P (XEXP (operand, 0))
&& (ind_levels == 0
|| reg_equiv_address (REGNO (XEXP (operand, 0))) != 0)))
win = 1;
break;
1992-02-28 11:23:25 +01:00
/* Memory operand whose address is offsettable. */
case 'o':
if (force_reload)
break;
if ((MEM_P (operand)
/* If IND_LEVELS, find_reloads_address won't reload a
pseudo that didn't get a hard reg, so we have to
reject that case. */
&& ((ind_levels ? offsettable_memref_p (operand)
: offsettable_nonstrict_memref_p (operand))
/* A reloaded address is offsettable because it is now
just a simple register indirect. */
|| address_reloaded[i] == 1))
|| (REG_P (operand)
&& REGNO (operand) >= FIRST_PSEUDO_REGISTER
&& reg_renumber[REGNO (operand)] < 0
/* If reg_equiv_address is nonzero, we will be
loading it into a register; hence it will be
offsettable, but we cannot say that reg_equiv_mem
is offsettable without checking. */
&& ((reg_equiv_mem (REGNO (operand)) != 0
&& offsettable_memref_p (reg_equiv_mem (REGNO (operand))))
|| (reg_equiv_address (REGNO (operand)) != 0))))
win = 1;
if (CONST_POOL_OK_P (operand_mode[i], operand)
|| MEM_P (operand))
badop = 0;
constmemok = 1;
offmemok = 1;
break;
1992-02-28 11:23:25 +01:00
case '&':
/* Output operand that is stored before the need for the
input operands (and their index registers) is over. */
earlyclobber = 1, this_earlyclobber = 1;
break;
1992-02-28 11:23:25 +01:00
case 'X':
force_reload = 0;
win = 1;
break;
1992-02-28 11:23:25 +01:00
case 'g':
if (! force_reload
/* A PLUS is never a valid operand, but reload can make
it from a register when eliminating registers. */
&& GET_CODE (operand) != PLUS
/* A SCRATCH is not a valid operand. */
&& GET_CODE (operand) != SCRATCH
&& (! CONSTANT_P (operand)
|| ! flag_pic
|| LEGITIMATE_PIC_OPERAND_P (operand))
&& (GENERAL_REGS == ALL_REGS
|| !REG_P (operand)
|| (REGNO (operand) >= FIRST_PSEUDO_REGISTER
&& reg_renumber[REGNO (operand)] < 0)))
win = 1;
system.h (REG_CLASS_FROM_CONSTRAINT): Poison. gcc/ * system.h (REG_CLASS_FROM_CONSTRAINT): Poison. (REG_CLASS_FOR_CONSTRAINT, EXTRA_CONSTRAINT_STR): Likewise. (EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT): Likewise. * genpreds.c (print_type_tree): New function. (write_tm_preds_h): Remove REG_CLASS_FROM_CONSTRAINT, REG_CLASS_FOR_CONSTRAINT, EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT and EXTRA_CONSTRAINT_STR. Write out enum constraint_type and get_constraint_type. * lra-constraints.c (satisfies_memory_constraint_p): Take a constraint_num rather than a constraint string. (satisfies_address_constraint_p): Likewise. (reg_class_from_constraints): Avoid old constraint macros. (process_alt_operands, process_address_1): Likewise. (curr_insn_transform): Likewise. * ira-costs.c (record_reg_classes): Likewise. (record_operand_costs): Likewise. * ira-lives.c (single_reg_class): Likewise. (ira_implicitly_set_insn_hard_regs): Likewise. * ira.c (ira_setup_alts, ira_get_dup_out_num): Likewise. * postreload.c (reload_cse_simplify_operands): Likewise. * recog.c (asm_operand_ok, preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. * reload.c (push_secondary_reload, scratch_reload_class): Likewise. (find_reloads, alternative_allows_const_pool_ref): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. * stmt.c (parse_output_constraint, parse_input_constraint): Likewise. * targhooks.c (default_secondary_reload): Likewise. * config/m32c/m32c.c (m32c_matches_constraint_p): Avoid reference to EXTRA_CONSTRAINT_STR. * config/sparc/constraints.md (U): Likewise REG_CLASS_FROM_CONSTRAINT. From-SVN: r211471
2014-06-11 18:58:35 +02:00
cl = GENERAL_REGS;
goto reg;
default:
system.h (REG_CLASS_FROM_CONSTRAINT): Poison. gcc/ * system.h (REG_CLASS_FROM_CONSTRAINT): Poison. (REG_CLASS_FOR_CONSTRAINT, EXTRA_CONSTRAINT_STR): Likewise. (EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT): Likewise. * genpreds.c (print_type_tree): New function. (write_tm_preds_h): Remove REG_CLASS_FROM_CONSTRAINT, REG_CLASS_FOR_CONSTRAINT, EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT and EXTRA_CONSTRAINT_STR. Write out enum constraint_type and get_constraint_type. * lra-constraints.c (satisfies_memory_constraint_p): Take a constraint_num rather than a constraint string. (satisfies_address_constraint_p): Likewise. (reg_class_from_constraints): Avoid old constraint macros. (process_alt_operands, process_address_1): Likewise. (curr_insn_transform): Likewise. * ira-costs.c (record_reg_classes): Likewise. (record_operand_costs): Likewise. * ira-lives.c (single_reg_class): Likewise. (ira_implicitly_set_insn_hard_regs): Likewise. * ira.c (ira_setup_alts, ira_get_dup_out_num): Likewise. * postreload.c (reload_cse_simplify_operands): Likewise. * recog.c (asm_operand_ok, preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. * reload.c (push_secondary_reload, scratch_reload_class): Likewise. (find_reloads, alternative_allows_const_pool_ref): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. * stmt.c (parse_output_constraint, parse_input_constraint): Likewise. * targhooks.c (default_secondary_reload): Likewise. * config/m32c/m32c.c (m32c_matches_constraint_p): Avoid reference to EXTRA_CONSTRAINT_STR. * config/sparc/constraints.md (U): Likewise REG_CLASS_FROM_CONSTRAINT. From-SVN: r211471
2014-06-11 18:58:35 +02:00
cn = lookup_constraint (p);
switch (get_constraint_type (cn))
{
system.h (REG_CLASS_FROM_CONSTRAINT): Poison. gcc/ * system.h (REG_CLASS_FROM_CONSTRAINT): Poison. (REG_CLASS_FOR_CONSTRAINT, EXTRA_CONSTRAINT_STR): Likewise. (EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT): Likewise. * genpreds.c (print_type_tree): New function. (write_tm_preds_h): Remove REG_CLASS_FROM_CONSTRAINT, REG_CLASS_FOR_CONSTRAINT, EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT and EXTRA_CONSTRAINT_STR. Write out enum constraint_type and get_constraint_type. * lra-constraints.c (satisfies_memory_constraint_p): Take a constraint_num rather than a constraint string. (satisfies_address_constraint_p): Likewise. (reg_class_from_constraints): Avoid old constraint macros. (process_alt_operands, process_address_1): Likewise. (curr_insn_transform): Likewise. * ira-costs.c (record_reg_classes): Likewise. (record_operand_costs): Likewise. * ira-lives.c (single_reg_class): Likewise. (ira_implicitly_set_insn_hard_regs): Likewise. * ira.c (ira_setup_alts, ira_get_dup_out_num): Likewise. * postreload.c (reload_cse_simplify_operands): Likewise. * recog.c (asm_operand_ok, preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. * reload.c (push_secondary_reload, scratch_reload_class): Likewise. (find_reloads, alternative_allows_const_pool_ref): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. * stmt.c (parse_output_constraint, parse_input_constraint): Likewise. * targhooks.c (default_secondary_reload): Likewise. * config/m32c/m32c.c (m32c_matches_constraint_p): Avoid reference to EXTRA_CONSTRAINT_STR. * config/sparc/constraints.md (U): Likewise REG_CLASS_FROM_CONSTRAINT. From-SVN: r211471
2014-06-11 18:58:35 +02:00
case CT_REGISTER:
cl = reg_class_for_constraint (cn);
if (cl != NO_REGS)
goto reg;
break;
case CT_CONST_INT:
if (CONST_INT_P (operand)
&& (insn_const_int_ok_for_constraint
(INTVAL (operand), cn)))
win = true;
break;
system.h (REG_CLASS_FROM_CONSTRAINT): Poison. gcc/ * system.h (REG_CLASS_FROM_CONSTRAINT): Poison. (REG_CLASS_FOR_CONSTRAINT, EXTRA_CONSTRAINT_STR): Likewise. (EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT): Likewise. * genpreds.c (print_type_tree): New function. (write_tm_preds_h): Remove REG_CLASS_FROM_CONSTRAINT, REG_CLASS_FOR_CONSTRAINT, EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT and EXTRA_CONSTRAINT_STR. Write out enum constraint_type and get_constraint_type. * lra-constraints.c (satisfies_memory_constraint_p): Take a constraint_num rather than a constraint string. (satisfies_address_constraint_p): Likewise. (reg_class_from_constraints): Avoid old constraint macros. (process_alt_operands, process_address_1): Likewise. (curr_insn_transform): Likewise. * ira-costs.c (record_reg_classes): Likewise. (record_operand_costs): Likewise. * ira-lives.c (single_reg_class): Likewise. (ira_implicitly_set_insn_hard_regs): Likewise. * ira.c (ira_setup_alts, ira_get_dup_out_num): Likewise. * postreload.c (reload_cse_simplify_operands): Likewise. * recog.c (asm_operand_ok, preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. * reload.c (push_secondary_reload, scratch_reload_class): Likewise. (find_reloads, alternative_allows_const_pool_ref): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. * stmt.c (parse_output_constraint, parse_input_constraint): Likewise. * targhooks.c (default_secondary_reload): Likewise. * config/m32c/m32c.c (m32c_matches_constraint_p): Avoid reference to EXTRA_CONSTRAINT_STR. * config/sparc/constraints.md (U): Likewise REG_CLASS_FROM_CONSTRAINT. From-SVN: r211471
2014-06-11 18:58:35 +02:00
case CT_MEMORY:
if (force_reload)
break;
if (constraint_satisfied_p (operand, cn))
win = 1;
/* If the address was already reloaded,
we win as well. */
else if (MEM_P (operand) && address_reloaded[i] == 1)
win = 1;
/* Likewise if the address will be reloaded because
reg_equiv_address is nonzero. For reg_equiv_mem
we have to check. */
else if (REG_P (operand)
&& REGNO (operand) >= FIRST_PSEUDO_REGISTER
&& reg_renumber[REGNO (operand)] < 0
&& ((reg_equiv_mem (REGNO (operand)) != 0
&& (constraint_satisfied_p
(reg_equiv_mem (REGNO (operand)),
cn)))
|| (reg_equiv_address (REGNO (operand))
!= 0)))
win = 1;
/* If we didn't already win, we can reload
constants via force_const_mem, and other
MEMs by reloading the address like for 'o'. */
if (CONST_POOL_OK_P (operand_mode[i], operand)
|| MEM_P (operand))
badop = 0;
constmemok = 1;
offmemok = 1;
break;
case CT_ADDRESS:
if (constraint_satisfied_p (operand, cn))
win = 1;
/* If we didn't already win, we can reload
the address into a base register. */
this_alternative[i]
= base_reg_class (VOIDmode, ADDR_SPACE_GENERIC,
ADDRESS, SCRATCH);
badop = 0;
break;
case CT_FIXED_FORM:
if (constraint_satisfied_p (operand, cn))
win = 1;
break;
}
system.h (REG_CLASS_FROM_CONSTRAINT): Poison. gcc/ * system.h (REG_CLASS_FROM_CONSTRAINT): Poison. (REG_CLASS_FOR_CONSTRAINT, EXTRA_CONSTRAINT_STR): Likewise. (EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT): Likewise. * genpreds.c (print_type_tree): New function. (write_tm_preds_h): Remove REG_CLASS_FROM_CONSTRAINT, REG_CLASS_FOR_CONSTRAINT, EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT and EXTRA_CONSTRAINT_STR. Write out enum constraint_type and get_constraint_type. * lra-constraints.c (satisfies_memory_constraint_p): Take a constraint_num rather than a constraint string. (satisfies_address_constraint_p): Likewise. (reg_class_from_constraints): Avoid old constraint macros. (process_alt_operands, process_address_1): Likewise. (curr_insn_transform): Likewise. * ira-costs.c (record_reg_classes): Likewise. (record_operand_costs): Likewise. * ira-lives.c (single_reg_class): Likewise. (ira_implicitly_set_insn_hard_regs): Likewise. * ira.c (ira_setup_alts, ira_get_dup_out_num): Likewise. * postreload.c (reload_cse_simplify_operands): Likewise. * recog.c (asm_operand_ok, preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. * reload.c (push_secondary_reload, scratch_reload_class): Likewise. (find_reloads, alternative_allows_const_pool_ref): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. * stmt.c (parse_output_constraint, parse_input_constraint): Likewise. * targhooks.c (default_secondary_reload): Likewise. * config/m32c/m32c.c (m32c_matches_constraint_p): Avoid reference to EXTRA_CONSTRAINT_STR. * config/sparc/constraints.md (U): Likewise REG_CLASS_FROM_CONSTRAINT. From-SVN: r211471
2014-06-11 18:58:35 +02:00
break;
reg:
system.h (REG_CLASS_FROM_CONSTRAINT): Poison. gcc/ * system.h (REG_CLASS_FROM_CONSTRAINT): Poison. (REG_CLASS_FOR_CONSTRAINT, EXTRA_CONSTRAINT_STR): Likewise. (EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT): Likewise. * genpreds.c (print_type_tree): New function. (write_tm_preds_h): Remove REG_CLASS_FROM_CONSTRAINT, REG_CLASS_FOR_CONSTRAINT, EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT and EXTRA_CONSTRAINT_STR. Write out enum constraint_type and get_constraint_type. * lra-constraints.c (satisfies_memory_constraint_p): Take a constraint_num rather than a constraint string. (satisfies_address_constraint_p): Likewise. (reg_class_from_constraints): Avoid old constraint macros. (process_alt_operands, process_address_1): Likewise. (curr_insn_transform): Likewise. * ira-costs.c (record_reg_classes): Likewise. (record_operand_costs): Likewise. * ira-lives.c (single_reg_class): Likewise. (ira_implicitly_set_insn_hard_regs): Likewise. * ira.c (ira_setup_alts, ira_get_dup_out_num): Likewise. * postreload.c (reload_cse_simplify_operands): Likewise. * recog.c (asm_operand_ok, preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. * reload.c (push_secondary_reload, scratch_reload_class): Likewise. (find_reloads, alternative_allows_const_pool_ref): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. * stmt.c (parse_output_constraint, parse_input_constraint): Likewise. * targhooks.c (default_secondary_reload): Likewise. * config/m32c/m32c.c (m32c_matches_constraint_p): Avoid reference to EXTRA_CONSTRAINT_STR. * config/sparc/constraints.md (U): Likewise REG_CLASS_FROM_CONSTRAINT. From-SVN: r211471
2014-06-11 18:58:35 +02:00
this_alternative[i]
= reg_class_subunion[this_alternative[i]][cl];
if (GET_MODE (operand) == BLKmode)
break;
winreg = 1;
if (REG_P (operand)
&& reg_fits_class_p (operand, this_alternative[i],
offset, GET_MODE (recog_data.operand[i])))
win = 1;
break;
}
while ((p += len), c);
if (swapped == (commutative >= 0 ? 1 : 0))
constraints[i] = p;
/* If this operand could be handled with a reg,
and some reg is allowed, then this operand can be handled. */
if (winreg && this_alternative[i] != NO_REGS
&& (win || !class_only_fixed_regs[this_alternative[i]]))
badop = 0;
/* Record which operands fit this alternative. */
this_alternative_earlyclobber[i] = earlyclobber;
if (win && ! force_reload)
this_alternative_win[i] = 1;
else if (did_match && ! force_reload)
this_alternative_match_win[i] = 1;
else
{
int const_to_mem = 0;
this_alternative_offmemok[i] = offmemok;
losers++;
if (badop)
bad = 1;
/* Alternative loses if it has no regs for a reg operand. */
if (REG_P (operand)
&& this_alternative[i] == NO_REGS
&& this_alternative_matches[i] < 0)
bad = 1;
/* If this is a constant that is reloaded into the desired
class by copying it to memory first, count that as another
reload. This is consistent with other code and is
required to avoid choosing another alternative when
the constant is moved into memory by this function on
an early reload pass. Note that the test here is
precisely the same as in the code below that calls
force_const_mem. */
if (CONST_POOL_OK_P (operand_mode[i], operand)
&& ((targetm.preferred_reload_class (operand,
this_alternative[i])
== NO_REGS)
|| no_input_reloads))
{
const_to_mem = 1;
if (this_alternative[i] != NO_REGS)
losers++;
}
/* Alternative loses if it requires a type of reload not
permitted for this insn. We can always reload SCRATCH
and objects with a REG_UNUSED note. */
if (GET_CODE (operand) != SCRATCH
&& modified[i] != RELOAD_READ && no_output_reloads
&& ! find_reg_note (insn, REG_UNUSED, operand))
bad = 1;
else if (modified[i] != RELOAD_WRITE && no_input_reloads
&& ! const_to_mem)
bad = 1;
/* If we can't reload this value at all, reject this
alternative. Note that we could also lose due to
LIMIT_RELOAD_CLASS, but we don't check that
here. */
if (! CONSTANT_P (operand) && this_alternative[i] != NO_REGS)
{
if (targetm.preferred_reload_class (operand,
this_alternative[i])
== NO_REGS)
reject = 600;
if (operand_type[i] == RELOAD_FOR_OUTPUT
&& (targetm.preferred_output_reload_class (operand,
this_alternative[i])
== NO_REGS))
reject = 600;
}
/* We prefer to reload pseudos over reloading other things,
since such reloads may be able to be eliminated later.
If we are reloading a SCRATCH, we won't be generating any
insns, just using a register, so it is also preferred.
So bump REJECT in other cases. Don't do this in the
case where we are forcing a constant into memory and
it will then win since we don't want to have a different
alternative match then. */
if (! (REG_P (operand)
&& REGNO (operand) >= FIRST_PSEUDO_REGISTER)
&& GET_CODE (operand) != SCRATCH
&& ! (const_to_mem && constmemok))
reject += 2;
/* Input reloads can be inherited more often than output
reloads can be removed, so penalize output reloads. */
if (operand_type[i] != RELOAD_FOR_INPUT
&& GET_CODE (operand) != SCRATCH)
reject++;
}
1992-02-28 11:23:25 +01:00
/* If this operand is a pseudo register that didn't get
a hard reg and this alternative accepts some
register, see if the class that we want is a subset
of the preferred class for this register. If not,
but it intersects that class, use the preferred class
instead. If it does not intersect the preferred
class, show that usage of this alternative should be
discouraged; it will be discouraged more still if the
register is `preferred or nothing'. We do this
because it increases the chance of reusing our spill
register in a later insn and avoiding a pair of
memory stores and loads.
Don't bother with this if this alternative will
accept this operand.
Don't do this for a multiword operand, since it is
only a small win and has the risk of requiring more
spill registers, which could cause a large loss.
Don't do this if the preferred class has only one
register because we might otherwise exhaust the
class. */
if (! win && ! did_match
&& this_alternative[i] != NO_REGS
&& GET_MODE_SIZE (operand_mode[i]) <= UNITS_PER_WORD
&& reg_class_size [(int) preferred_class[i]] > 0
&& ! small_register_class_p (preferred_class[i]))
1992-02-28 11:23:25 +01:00
{
if (! reg_class_subset_p (this_alternative[i],
preferred_class[i]))
{
/* Since we don't have a way of forming the intersection,
we just do something special if the preferred class
is a subset of the class we have; that's the most
common case anyway. */
if (reg_class_subset_p (preferred_class[i],
this_alternative[i]))
this_alternative[i] = preferred_class[i];
else
reject += (2 + 2 * pref_or_nothing[i]);
}
1992-02-28 11:23:25 +01:00
}
}
/* Now see if any output operands that are marked "earlyclobber"
in this alternative conflict with any input operands
or any memory addresses. */
1992-02-28 11:23:25 +01:00
for (i = 0; i < noperands; i++)
if (this_alternative_earlyclobber[i]
&& (this_alternative_win[i] || this_alternative_match_win[i]))
{
struct decomposition early_data;
1992-02-28 11:23:25 +01:00
early_data = decompose (recog_data.operand[i]);
1992-02-28 11:23:25 +01:00
gcc_assert (modified[i] != RELOAD_READ);
if (this_alternative[i] == NO_REGS)
{
this_alternative_earlyclobber[i] = 0;
gcc_assert (this_insn_is_asm);
error_for_asm (this_insn,
"%<&%> constraint used with no register class");
}
1992-02-28 11:23:25 +01:00
for (j = 0; j < noperands; j++)
/* Is this an input operand or a memory ref? */
if ((MEM_P (recog_data.operand[j])
|| modified[j] != RELOAD_WRITE)
&& j != i
/* Ignore things like match_operator operands. */
&& !recog_data.is_operator[j]
/* Don't count an input operand that is constrained to match
the early clobber operand. */
&& ! (this_alternative_matches[j] == i
&& rtx_equal_p (recog_data.operand[i],
recog_data.operand[j]))
/* Is it altered by storing the earlyclobber operand? */
&& !immune_p (recog_data.operand[j], recog_data.operand[i],
early_data))
1992-02-28 11:23:25 +01:00
{
/* If the output is in a non-empty few-regs class,
it's costly to reload it, so reload the input instead. */
if (small_register_class_p (this_alternative[i])
&& (REG_P (recog_data.operand[j])
|| GET_CODE (recog_data.operand[j]) == SUBREG))
{
losers++;
this_alternative_win[j] = 0;
this_alternative_match_win[j] = 0;
}
else
break;
1992-02-28 11:23:25 +01:00
}
/* If an earlyclobber operand conflicts with something,
it must be reloaded, so request this and count the cost. */
if (j != noperands)
{
losers++;
this_alternative_win[i] = 0;
this_alternative_match_win[j] = 0;
for (j = 0; j < noperands; j++)
if (this_alternative_matches[j] == i
&& this_alternative_match_win[j])
{
this_alternative_win[j] = 0;
this_alternative_match_win[j] = 0;
losers++;
}
}
1992-02-28 11:23:25 +01:00
}
/* If one alternative accepts all the operands, no reload required,
choose that alternative; don't consider the remaining ones. */
if (losers == 0)
invoke.texi (-fsched-pressure): Document it. 2009-09-02 Vladimir Makarov <vmakarov@redhat.com> * doc/invoke.texi (-fsched-pressure): Document it. (-fsched-reg-pressure-heuristic): Remove it. * reload.c (ira.h): Include. (find_reloads): Add choosing reload on number of small spilled classes. * haifa-sched.c (ira.h): Include. (sched_pressure_p, sched_regno_cover_class, curr_reg_pressure, saved_reg_pressure, curr_reg_live, saved_reg_live, region_ref_regs): New variables. (sched_init_region_reg_pressure_info, mark_regno_birth_or_death, initiate_reg_pressure_info, setup_ref_regs, initiate_bb_reg_pressure_info, save_reg_pressure, restore_reg_pressure, dying_use_p, print_curr_reg_pressure): New functions. (setup_insn_reg_pressure_info): New function. (rank_for_schedule): Add pressure checking and insn issue time. Remove comparison of insn reg weights. (ready_sort): Set insn reg pressure info. (update_register_pressure, setup_insn_max_reg_pressure, update_reg_and_insn_max_reg_pressure, sched_setup_bb_reg_pressure_info): New functions. (schedule_insn): Add code for printing and updating reg pressure info. (find_set_reg_weight, find_insn_reg_weight): Remove. (ok_for_early_queue_removal): Do nothing if pressure_only_p. (debug_ready_list): Print reg pressure info. (schedule_block): Ditto. Check insn issue time. (sched_init): Set up sched_pressure_p. Allocate and set up some reg pressure related info. (sched_finish): Free some reg pressure related info. (fix_tick_ready): Make insn always ready if pressure_p. (init_h_i_d): Don't call find_insn_reg_weight. (haifa_finish_h_i_d): Free insn reg pressure info. * ira-int.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move to ira.h. * ira-lives.c (single_reg_class): Check mode to find how many registers are necessary for operand. (ira_implicitly_set_insn_hard_regs): New. * common.opt (fsched-pressure): New options. (fsched-reg-pressure-heuristic): Remove. * ira.c (setup_eliminable_regset): Rename to ira_setup_eliminable_regset. Make it external. (expand_reg_info): Pass cover class to setup_reg_classes. (ira): Call resize_reg_info instead of allocate_reg_info. * sched-deps.c: Include ira.h. (implicit_reg_pending_clobbers, implicit_reg_pending_uses): New. (create_insn_reg_use, create_insn_reg_set, setup_insn_reg_uses, reg_pressure_info, insn_use_p, mark_insn_pseudo_birth, mark_insn_hard_regno_birth, mark_insn_reg_birth, mark_pseudo_death, mark_hard_regno_death, mark_reg_death, mark_insn_reg_store, mark_insn_reg_clobber, setup_insn_reg_pressure_info): New. (sched_analyze_1): Update implicit_reg_pending_uses. (sched_analyze_insn): Find implicit sets, uses, clobbers of regs. Use them to create dependencies. Set insn reg uses and pressure info. Process reg_pending_uses in one place. (free_deps): Free implicit sets. (remove_from_deps): Remove implicit sets if necessary. Check implicit sets when clearing reg_last_in_use. (init_deps_global): Clear implicit_reg_pending_clobbers and implicit_reg_pending_uses. * ira.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move from ira-int.h. (ira_setup_eliminable_regset, ira_set_pseudo_classes, ira_implicitly_set_insn_hard_regs): New prototypes. * ira-costs.c (pseudo_classes_defined_p, allocno_p, cost_elements_num): New variables. (allocno_costs, total_costs): Rename to costs and total_allocno_costs. (COSTS_OF_ALLOCNO): Rename to COSTS. (allocno_pref): Rename to pref. (allocno_pref_buffer): Rename to pref_buffer. (common_classes): Rename to regno_cover_class. (COST_INDEX): New. (record_reg_classes): Set allocno attributes only if allocno_p. (record_address_regs): Ditto. Use COST_INDEX instead of ALLOCNO_NUM. (scan_one_insn): Use COST_INDEX and COSTS instead of ALLOCNO_NUM and COSTS_OF_ALLOCNO. (print_costs): Rename to print_allocno_costs. (print_pseudo_costs): New. (process_bb_node_for_costs): Split into 2 functions with new function process_bb_for_costs. Pass BB to process_bb_for_costs. (find_allocno_class_costs): Rename to find_costs_and_classes. Add new parameter dump_file. Use cost_elements_num instead of ira_allocnos_num. Make one iteration if preferred classes were already calculated for scheduler. Make 2 versions of code depending on allocno_p. (setup_allocno_cover_class_and_costs): Check allocno_p. Use regno_cover_class and COSTS instead of common_classes and COSTS_OF_ALLOCNO. (init_costs, finish_costs): New. (ira_costs): Set up allocno_p and cost_elements_num. Call init_costs and finish_costs. (ira_set_pseudo_classes): New. * rtl.h (allocate_reg_info): Remove. (resize_reg_info): Change return type. (reg_cover_class): New. (setup_reg_classes): Add new parameter. * sched-int.h (struct deps_reg): New member implicit_sets. (sched_pressure_p, sched_regno_cover_class): New external definitions. (INCREASE_BITS): New macro. (struct reg_pressure_data, struct reg_use_data): New. (struct _haifa_insn_data): Remove reg_weight. Add members reg_pressure, reg_use_list, reg_set_list, and reg_pressure_excess_cost_change. (struct deps): New member implicit_sets. (pressure_p): New variable. (COVER_CLASS_BITS, INCREASE_BITS): New macros. (struct reg_pressure_data, struct reg_use_data): New. (INSN_REG_WEIGHT): Remove. (INSN_REG_PRESSURE, INSN_MAX_REG_PRESSURE, INSN_REG_USE_LIST, INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New macros. (sched_init_region_reg_pressure_info, sched_setup_bb_reg_pressure_info): New prototypes. * reginfo.c (struct reg_pref): New member coverclass. (reg_cover_class): New function. (reginfo_init, pass_reginfo_init): Move after free_reg_info. (reg_info_size): New variable. (allocate_reg_info): Make static. Setup reg_info_size. (resize_reg_info): Use reg_info_size. Return flag of resizing. (setup_reg_classes): Add a new parameter. Setup cover class too. * Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to the dependencies. * sched-rgn.c (deps_join): Set up implicit_sets. (schedule_region): Set up region and basic blocks pressure relative info. * passes.c (init_optimization_passes): Move pass_subregs_of_mode_init before pass_sched. From-SVN: r151348
2009-09-02 20:54:25 +02:00
{
/* Unswap these so that they are never swapped at `finish'. */
if (swapped)
{
recog_data.operand[commutative] = substed_operand[commutative];
recog_data.operand[commutative + 1]
= substed_operand[commutative + 1];
}
invoke.texi (-fsched-pressure): Document it. 2009-09-02 Vladimir Makarov <vmakarov@redhat.com> * doc/invoke.texi (-fsched-pressure): Document it. (-fsched-reg-pressure-heuristic): Remove it. * reload.c (ira.h): Include. (find_reloads): Add choosing reload on number of small spilled classes. * haifa-sched.c (ira.h): Include. (sched_pressure_p, sched_regno_cover_class, curr_reg_pressure, saved_reg_pressure, curr_reg_live, saved_reg_live, region_ref_regs): New variables. (sched_init_region_reg_pressure_info, mark_regno_birth_or_death, initiate_reg_pressure_info, setup_ref_regs, initiate_bb_reg_pressure_info, save_reg_pressure, restore_reg_pressure, dying_use_p, print_curr_reg_pressure): New functions. (setup_insn_reg_pressure_info): New function. (rank_for_schedule): Add pressure checking and insn issue time. Remove comparison of insn reg weights. (ready_sort): Set insn reg pressure info. (update_register_pressure, setup_insn_max_reg_pressure, update_reg_and_insn_max_reg_pressure, sched_setup_bb_reg_pressure_info): New functions. (schedule_insn): Add code for printing and updating reg pressure info. (find_set_reg_weight, find_insn_reg_weight): Remove. (ok_for_early_queue_removal): Do nothing if pressure_only_p. (debug_ready_list): Print reg pressure info. (schedule_block): Ditto. Check insn issue time. (sched_init): Set up sched_pressure_p. Allocate and set up some reg pressure related info. (sched_finish): Free some reg pressure related info. (fix_tick_ready): Make insn always ready if pressure_p. (init_h_i_d): Don't call find_insn_reg_weight. (haifa_finish_h_i_d): Free insn reg pressure info. * ira-int.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move to ira.h. * ira-lives.c (single_reg_class): Check mode to find how many registers are necessary for operand. (ira_implicitly_set_insn_hard_regs): New. * common.opt (fsched-pressure): New options. (fsched-reg-pressure-heuristic): Remove. * ira.c (setup_eliminable_regset): Rename to ira_setup_eliminable_regset. Make it external. (expand_reg_info): Pass cover class to setup_reg_classes. (ira): Call resize_reg_info instead of allocate_reg_info. * sched-deps.c: Include ira.h. (implicit_reg_pending_clobbers, implicit_reg_pending_uses): New. (create_insn_reg_use, create_insn_reg_set, setup_insn_reg_uses, reg_pressure_info, insn_use_p, mark_insn_pseudo_birth, mark_insn_hard_regno_birth, mark_insn_reg_birth, mark_pseudo_death, mark_hard_regno_death, mark_reg_death, mark_insn_reg_store, mark_insn_reg_clobber, setup_insn_reg_pressure_info): New. (sched_analyze_1): Update implicit_reg_pending_uses. (sched_analyze_insn): Find implicit sets, uses, clobbers of regs. Use them to create dependencies. Set insn reg uses and pressure info. Process reg_pending_uses in one place. (free_deps): Free implicit sets. (remove_from_deps): Remove implicit sets if necessary. Check implicit sets when clearing reg_last_in_use. (init_deps_global): Clear implicit_reg_pending_clobbers and implicit_reg_pending_uses. * ira.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move from ira-int.h. (ira_setup_eliminable_regset, ira_set_pseudo_classes, ira_implicitly_set_insn_hard_regs): New prototypes. * ira-costs.c (pseudo_classes_defined_p, allocno_p, cost_elements_num): New variables. (allocno_costs, total_costs): Rename to costs and total_allocno_costs. (COSTS_OF_ALLOCNO): Rename to COSTS. (allocno_pref): Rename to pref. (allocno_pref_buffer): Rename to pref_buffer. (common_classes): Rename to regno_cover_class. (COST_INDEX): New. (record_reg_classes): Set allocno attributes only if allocno_p. (record_address_regs): Ditto. Use COST_INDEX instead of ALLOCNO_NUM. (scan_one_insn): Use COST_INDEX and COSTS instead of ALLOCNO_NUM and COSTS_OF_ALLOCNO. (print_costs): Rename to print_allocno_costs. (print_pseudo_costs): New. (process_bb_node_for_costs): Split into 2 functions with new function process_bb_for_costs. Pass BB to process_bb_for_costs. (find_allocno_class_costs): Rename to find_costs_and_classes. Add new parameter dump_file. Use cost_elements_num instead of ira_allocnos_num. Make one iteration if preferred classes were already calculated for scheduler. Make 2 versions of code depending on allocno_p. (setup_allocno_cover_class_and_costs): Check allocno_p. Use regno_cover_class and COSTS instead of common_classes and COSTS_OF_ALLOCNO. (init_costs, finish_costs): New. (ira_costs): Set up allocno_p and cost_elements_num. Call init_costs and finish_costs. (ira_set_pseudo_classes): New. * rtl.h (allocate_reg_info): Remove. (resize_reg_info): Change return type. (reg_cover_class): New. (setup_reg_classes): Add new parameter. * sched-int.h (struct deps_reg): New member implicit_sets. (sched_pressure_p, sched_regno_cover_class): New external definitions. (INCREASE_BITS): New macro. (struct reg_pressure_data, struct reg_use_data): New. (struct _haifa_insn_data): Remove reg_weight. Add members reg_pressure, reg_use_list, reg_set_list, and reg_pressure_excess_cost_change. (struct deps): New member implicit_sets. (pressure_p): New variable. (COVER_CLASS_BITS, INCREASE_BITS): New macros. (struct reg_pressure_data, struct reg_use_data): New. (INSN_REG_WEIGHT): Remove. (INSN_REG_PRESSURE, INSN_MAX_REG_PRESSURE, INSN_REG_USE_LIST, INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New macros. (sched_init_region_reg_pressure_info, sched_setup_bb_reg_pressure_info): New prototypes. * reginfo.c (struct reg_pref): New member coverclass. (reg_cover_class): New function. (reginfo_init, pass_reginfo_init): Move after free_reg_info. (reg_info_size): New variable. (allocate_reg_info): Make static. Setup reg_info_size. (resize_reg_info): Use reg_info_size. Return flag of resizing. (setup_reg_classes): Add a new parameter. Setup cover class too. * Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to the dependencies. * sched-rgn.c (deps_join): Set up implicit_sets. (schedule_region): Set up region and basic blocks pressure relative info. * passes.c (init_optimization_passes): Move pass_subregs_of_mode_init before pass_sched. From-SVN: r151348
2009-09-02 20:54:25 +02:00
for (i = 0; i < noperands; i++)
{
goal_alternative_win[i] = this_alternative_win[i];
goal_alternative_match_win[i] = this_alternative_match_win[i];
goal_alternative[i] = this_alternative[i];
goal_alternative_offmemok[i] = this_alternative_offmemok[i];
invoke.texi (-fsched-pressure): Document it. 2009-09-02 Vladimir Makarov <vmakarov@redhat.com> * doc/invoke.texi (-fsched-pressure): Document it. (-fsched-reg-pressure-heuristic): Remove it. * reload.c (ira.h): Include. (find_reloads): Add choosing reload on number of small spilled classes. * haifa-sched.c (ira.h): Include. (sched_pressure_p, sched_regno_cover_class, curr_reg_pressure, saved_reg_pressure, curr_reg_live, saved_reg_live, region_ref_regs): New variables. (sched_init_region_reg_pressure_info, mark_regno_birth_or_death, initiate_reg_pressure_info, setup_ref_regs, initiate_bb_reg_pressure_info, save_reg_pressure, restore_reg_pressure, dying_use_p, print_curr_reg_pressure): New functions. (setup_insn_reg_pressure_info): New function. (rank_for_schedule): Add pressure checking and insn issue time. Remove comparison of insn reg weights. (ready_sort): Set insn reg pressure info. (update_register_pressure, setup_insn_max_reg_pressure, update_reg_and_insn_max_reg_pressure, sched_setup_bb_reg_pressure_info): New functions. (schedule_insn): Add code for printing and updating reg pressure info. (find_set_reg_weight, find_insn_reg_weight): Remove. (ok_for_early_queue_removal): Do nothing if pressure_only_p. (debug_ready_list): Print reg pressure info. (schedule_block): Ditto. Check insn issue time. (sched_init): Set up sched_pressure_p. Allocate and set up some reg pressure related info. (sched_finish): Free some reg pressure related info. (fix_tick_ready): Make insn always ready if pressure_p. (init_h_i_d): Don't call find_insn_reg_weight. (haifa_finish_h_i_d): Free insn reg pressure info. * ira-int.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move to ira.h. * ira-lives.c (single_reg_class): Check mode to find how many registers are necessary for operand. (ira_implicitly_set_insn_hard_regs): New. * common.opt (fsched-pressure): New options. (fsched-reg-pressure-heuristic): Remove. * ira.c (setup_eliminable_regset): Rename to ira_setup_eliminable_regset. Make it external. (expand_reg_info): Pass cover class to setup_reg_classes. (ira): Call resize_reg_info instead of allocate_reg_info. * sched-deps.c: Include ira.h. (implicit_reg_pending_clobbers, implicit_reg_pending_uses): New. (create_insn_reg_use, create_insn_reg_set, setup_insn_reg_uses, reg_pressure_info, insn_use_p, mark_insn_pseudo_birth, mark_insn_hard_regno_birth, mark_insn_reg_birth, mark_pseudo_death, mark_hard_regno_death, mark_reg_death, mark_insn_reg_store, mark_insn_reg_clobber, setup_insn_reg_pressure_info): New. (sched_analyze_1): Update implicit_reg_pending_uses. (sched_analyze_insn): Find implicit sets, uses, clobbers of regs. Use them to create dependencies. Set insn reg uses and pressure info. Process reg_pending_uses in one place. (free_deps): Free implicit sets. (remove_from_deps): Remove implicit sets if necessary. Check implicit sets when clearing reg_last_in_use. (init_deps_global): Clear implicit_reg_pending_clobbers and implicit_reg_pending_uses. * ira.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move from ira-int.h. (ira_setup_eliminable_regset, ira_set_pseudo_classes, ira_implicitly_set_insn_hard_regs): New prototypes. * ira-costs.c (pseudo_classes_defined_p, allocno_p, cost_elements_num): New variables. (allocno_costs, total_costs): Rename to costs and total_allocno_costs. (COSTS_OF_ALLOCNO): Rename to COSTS. (allocno_pref): Rename to pref. (allocno_pref_buffer): Rename to pref_buffer. (common_classes): Rename to regno_cover_class. (COST_INDEX): New. (record_reg_classes): Set allocno attributes only if allocno_p. (record_address_regs): Ditto. Use COST_INDEX instead of ALLOCNO_NUM. (scan_one_insn): Use COST_INDEX and COSTS instead of ALLOCNO_NUM and COSTS_OF_ALLOCNO. (print_costs): Rename to print_allocno_costs. (print_pseudo_costs): New. (process_bb_node_for_costs): Split into 2 functions with new function process_bb_for_costs. Pass BB to process_bb_for_costs. (find_allocno_class_costs): Rename to find_costs_and_classes. Add new parameter dump_file. Use cost_elements_num instead of ira_allocnos_num. Make one iteration if preferred classes were already calculated for scheduler. Make 2 versions of code depending on allocno_p. (setup_allocno_cover_class_and_costs): Check allocno_p. Use regno_cover_class and COSTS instead of common_classes and COSTS_OF_ALLOCNO. (init_costs, finish_costs): New. (ira_costs): Set up allocno_p and cost_elements_num. Call init_costs and finish_costs. (ira_set_pseudo_classes): New. * rtl.h (allocate_reg_info): Remove. (resize_reg_info): Change return type. (reg_cover_class): New. (setup_reg_classes): Add new parameter. * sched-int.h (struct deps_reg): New member implicit_sets. (sched_pressure_p, sched_regno_cover_class): New external definitions. (INCREASE_BITS): New macro. (struct reg_pressure_data, struct reg_use_data): New. (struct _haifa_insn_data): Remove reg_weight. Add members reg_pressure, reg_use_list, reg_set_list, and reg_pressure_excess_cost_change. (struct deps): New member implicit_sets. (pressure_p): New variable. (COVER_CLASS_BITS, INCREASE_BITS): New macros. (struct reg_pressure_data, struct reg_use_data): New. (INSN_REG_WEIGHT): Remove. (INSN_REG_PRESSURE, INSN_MAX_REG_PRESSURE, INSN_REG_USE_LIST, INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New macros. (sched_init_region_reg_pressure_info, sched_setup_bb_reg_pressure_info): New prototypes. * reginfo.c (struct reg_pref): New member coverclass. (reg_cover_class): New function. (reginfo_init, pass_reginfo_init): Move after free_reg_info. (reg_info_size): New variable. (allocate_reg_info): Make static. Setup reg_info_size. (resize_reg_info): Use reg_info_size. Return flag of resizing. (setup_reg_classes): Add a new parameter. Setup cover class too. * Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to the dependencies. * sched-rgn.c (deps_join): Set up implicit_sets. (schedule_region): Set up region and basic blocks pressure relative info. * passes.c (init_optimization_passes): Move pass_subregs_of_mode_init before pass_sched. From-SVN: r151348
2009-09-02 20:54:25 +02:00
goal_alternative_matches[i] = this_alternative_matches[i];
goal_alternative_earlyclobber[i]
= this_alternative_earlyclobber[i];
}
goal_alternative_number = this_alternative_number;
goal_alternative_swapped = swapped;
invoke.texi (-fsched-pressure): Document it. 2009-09-02 Vladimir Makarov <vmakarov@redhat.com> * doc/invoke.texi (-fsched-pressure): Document it. (-fsched-reg-pressure-heuristic): Remove it. * reload.c (ira.h): Include. (find_reloads): Add choosing reload on number of small spilled classes. * haifa-sched.c (ira.h): Include. (sched_pressure_p, sched_regno_cover_class, curr_reg_pressure, saved_reg_pressure, curr_reg_live, saved_reg_live, region_ref_regs): New variables. (sched_init_region_reg_pressure_info, mark_regno_birth_or_death, initiate_reg_pressure_info, setup_ref_regs, initiate_bb_reg_pressure_info, save_reg_pressure, restore_reg_pressure, dying_use_p, print_curr_reg_pressure): New functions. (setup_insn_reg_pressure_info): New function. (rank_for_schedule): Add pressure checking and insn issue time. Remove comparison of insn reg weights. (ready_sort): Set insn reg pressure info. (update_register_pressure, setup_insn_max_reg_pressure, update_reg_and_insn_max_reg_pressure, sched_setup_bb_reg_pressure_info): New functions. (schedule_insn): Add code for printing and updating reg pressure info. (find_set_reg_weight, find_insn_reg_weight): Remove. (ok_for_early_queue_removal): Do nothing if pressure_only_p. (debug_ready_list): Print reg pressure info. (schedule_block): Ditto. Check insn issue time. (sched_init): Set up sched_pressure_p. Allocate and set up some reg pressure related info. (sched_finish): Free some reg pressure related info. (fix_tick_ready): Make insn always ready if pressure_p. (init_h_i_d): Don't call find_insn_reg_weight. (haifa_finish_h_i_d): Free insn reg pressure info. * ira-int.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move to ira.h. * ira-lives.c (single_reg_class): Check mode to find how many registers are necessary for operand. (ira_implicitly_set_insn_hard_regs): New. * common.opt (fsched-pressure): New options. (fsched-reg-pressure-heuristic): Remove. * ira.c (setup_eliminable_regset): Rename to ira_setup_eliminable_regset. Make it external. (expand_reg_info): Pass cover class to setup_reg_classes. (ira): Call resize_reg_info instead of allocate_reg_info. * sched-deps.c: Include ira.h. (implicit_reg_pending_clobbers, implicit_reg_pending_uses): New. (create_insn_reg_use, create_insn_reg_set, setup_insn_reg_uses, reg_pressure_info, insn_use_p, mark_insn_pseudo_birth, mark_insn_hard_regno_birth, mark_insn_reg_birth, mark_pseudo_death, mark_hard_regno_death, mark_reg_death, mark_insn_reg_store, mark_insn_reg_clobber, setup_insn_reg_pressure_info): New. (sched_analyze_1): Update implicit_reg_pending_uses. (sched_analyze_insn): Find implicit sets, uses, clobbers of regs. Use them to create dependencies. Set insn reg uses and pressure info. Process reg_pending_uses in one place. (free_deps): Free implicit sets. (remove_from_deps): Remove implicit sets if necessary. Check implicit sets when clearing reg_last_in_use. (init_deps_global): Clear implicit_reg_pending_clobbers and implicit_reg_pending_uses. * ira.h (ira_hard_regno_cover_class, ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs, ira_class_hard_regs_num, ira_no_alloc_regs, ira_available_class_regs, ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate): Move from ira-int.h. (ira_setup_eliminable_regset, ira_set_pseudo_classes, ira_implicitly_set_insn_hard_regs): New prototypes. * ira-costs.c (pseudo_classes_defined_p, allocno_p, cost_elements_num): New variables. (allocno_costs, total_costs): Rename to costs and total_allocno_costs. (COSTS_OF_ALLOCNO): Rename to COSTS. (allocno_pref): Rename to pref. (allocno_pref_buffer): Rename to pref_buffer. (common_classes): Rename to regno_cover_class. (COST_INDEX): New. (record_reg_classes): Set allocno attributes only if allocno_p. (record_address_regs): Ditto. Use COST_INDEX instead of ALLOCNO_NUM. (scan_one_insn): Use COST_INDEX and COSTS instead of ALLOCNO_NUM and COSTS_OF_ALLOCNO. (print_costs): Rename to print_allocno_costs. (print_pseudo_costs): New. (process_bb_node_for_costs): Split into 2 functions with new function process_bb_for_costs. Pass BB to process_bb_for_costs. (find_allocno_class_costs): Rename to find_costs_and_classes. Add new parameter dump_file. Use cost_elements_num instead of ira_allocnos_num. Make one iteration if preferred classes were already calculated for scheduler. Make 2 versions of code depending on allocno_p. (setup_allocno_cover_class_and_costs): Check allocno_p. Use regno_cover_class and COSTS instead of common_classes and COSTS_OF_ALLOCNO. (init_costs, finish_costs): New. (ira_costs): Set up allocno_p and cost_elements_num. Call init_costs and finish_costs. (ira_set_pseudo_classes): New. * rtl.h (allocate_reg_info): Remove. (resize_reg_info): Change return type. (reg_cover_class): New. (setup_reg_classes): Add new parameter. * sched-int.h (struct deps_reg): New member implicit_sets. (sched_pressure_p, sched_regno_cover_class): New external definitions. (INCREASE_BITS): New macro. (struct reg_pressure_data, struct reg_use_data): New. (struct _haifa_insn_data): Remove reg_weight. Add members reg_pressure, reg_use_list, reg_set_list, and reg_pressure_excess_cost_change. (struct deps): New member implicit_sets. (pressure_p): New variable. (COVER_CLASS_BITS, INCREASE_BITS): New macros. (struct reg_pressure_data, struct reg_use_data): New. (INSN_REG_WEIGHT): Remove. (INSN_REG_PRESSURE, INSN_MAX_REG_PRESSURE, INSN_REG_USE_LIST, INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New macros. (sched_init_region_reg_pressure_info, sched_setup_bb_reg_pressure_info): New prototypes. * reginfo.c (struct reg_pref): New member coverclass. (reg_cover_class): New function. (reginfo_init, pass_reginfo_init): Move after free_reg_info. (reg_info_size): New variable. (allocate_reg_info): Make static. Setup reg_info_size. (resize_reg_info): Use reg_info_size. Return flag of resizing. (setup_reg_classes): Add a new parameter. Setup cover class too. * Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to the dependencies. * sched-rgn.c (deps_join): Set up implicit_sets. (schedule_region): Set up region and basic blocks pressure relative info. * passes.c (init_optimization_passes): Move pass_subregs_of_mode_init before pass_sched. From-SVN: r151348
2009-09-02 20:54:25 +02:00
goal_earlyclobber = this_earlyclobber;
goto finish;
1992-02-28 11:23:25 +01:00
}
/* REJECT, set by the ! and ? constraint characters and when a register
would be reloaded into a non-preferred class, discourages the use of
this alternative for a reload goal. REJECT is incremented by six
for each ? and two for each non-preferred class. */
losers = losers * 6 + reject;
1992-02-28 11:23:25 +01:00
/* If this alternative can be made to work by reloading,
and it needs less reloading than the others checked so far,
record it as the chosen goal for reloading. */
if (! bad)
{
if (best > losers)
{
for (i = 0; i < noperands; i++)
{
goal_alternative[i] = this_alternative[i];
goal_alternative_win[i] = this_alternative_win[i];
goal_alternative_match_win[i]
= this_alternative_match_win[i];
goal_alternative_offmemok[i]
= this_alternative_offmemok[i];
goal_alternative_matches[i] = this_alternative_matches[i];
goal_alternative_earlyclobber[i]
= this_alternative_earlyclobber[i];
}
goal_alternative_swapped = swapped;
best = losers;
goal_alternative_number = this_alternative_number;
goal_earlyclobber = this_earlyclobber;
}
}
1992-02-28 11:23:25 +01:00
if (swapped)
{
enum reg_class tclass;
int t;
/* If the commutative operands have been swapped, swap
them back in order to check the next alternative. */
recog_data.operand[commutative] = substed_operand[commutative];
recog_data.operand[commutative + 1] = substed_operand[commutative + 1];
/* Unswap the duplicates too. */
for (i = 0; i < recog_data.n_dups; i++)
if (recog_data.dup_num[i] == commutative
|| recog_data.dup_num[i] == commutative + 1)
*recog_data.dup_loc[i]
= recog_data.operand[(int) recog_data.dup_num[i]];
/* Unswap the operand related information as well. */
tclass = preferred_class[commutative];
preferred_class[commutative] = preferred_class[commutative + 1];
preferred_class[commutative + 1] = tclass;
t = pref_or_nothing[commutative];
pref_or_nothing[commutative] = pref_or_nothing[commutative + 1];
pref_or_nothing[commutative + 1] = t;
t = address_reloaded[commutative];
address_reloaded[commutative] = address_reloaded[commutative + 1];
address_reloaded[commutative + 1] = t;
}
1992-02-28 11:23:25 +01:00
}
}
/* The operands don't meet the constraints.
goal_alternative describes the alternative
that we could reach by reloading the fewest operands.
Reload so as to fit it. */
if (best == MAX_RECOG_OPERANDS * 2 + 600)
1992-02-28 11:23:25 +01:00
{
/* No alternative works with reloads?? */
if (insn_code_number >= 0)
c-decl.c (duplicate_decls, [...]): Remove leading capital from diagnostics. * c-decl.c (duplicate_decls, push_parm_decl): Remove leading capital from diagnostics. * c-lex.c (cb_file_change): Similarly. * c-parse.in : Similarly. * cfgrtl.c (verify_flow_info): Similarly. * collect2.c: Similarly. * cppfiles.c (find_include_file): Similarly. * cppinit.c (cpp_handle_option): Similarly. * cpplex.c (cpp_spell_token): Similarly. * cppmain.c (do_preprocessing): Similarly. * gcc.c (translate_options, process_command, do_spec1, main, pfatal_execute): Similarly. * genattr.c (main): Similarly. * genattrtab.c (check_attr_test, operate_exp, simplify_test_exp, write_test_expr, main): Similarly. * gencodes.c (main): Similarly. * genconfig.c (main): Similarly. * genconstants.c (main): Similarly. * genemit.c (main): Similarly. * genextract.c (main): Similarly. * genflags.c (main): Similarly. * genopinit.c (main): Similarly. * genoutput.c (process_template, main): Similarly. * genpeep.c (main): Similarly. * genrecog.c (main): Similarly. * gensupport.c (is_predicable, identify_predicable_attribute, alter_predicate_for_insn, init_md_reader_args, main): Similarly. * ggc-page.c (alloc_anon): Similarly. * mips-tfile.c (add_string, add_procedure, add_file, read_line, parse_begin, parse_bend, parse_def, parse_end, parse_file, parse_stabs_common, parse_stabs, write_varray, write_object, read_seek, copy_object, main, error): Similarly. * profile.c (compute_branch_probabilities): Similarly. * reg-stack.c (check_asm_stack_operands): Similarly. * reload.c (find_reloads): Similarly. * reload1.c (spill_failure, failed_reload): Similarly. * rtl-error.c (_fatal_insn_not_found): Similarly. * toplev.c (read_integral_parameter, crash_signal, decode_f_option, set_target_switch, parse_options_and_default_flags) : Similarly. * tradcif.y (parse_number, yylex): Similarly. * tradcpp.c (main, fancy_abort): Similarly. * tree.c (tree_check_failed): Similarly. * varray.c (varray_check_failed): Similarly. * xcoffout.c (xcoff_output_standard_types): Similarly. cp: * call.c (build_java_interface_fn_ref): Similarly. * except.c (is_admissible_throw_operand): Similarly. * init.c (build_java_class_ref): Similarly. * xref.c (open_xref_file): Similarly. objc: * objc-act.c (get_object_ref, lookup_and_install_protocols, build_objc_string_object, objc_declare_alias, build_ivar_chain, finish_message_expr, build_protocol_expr, is_public, start_class): Similarly. testsuite: * objc.dg/alias.m: Update. * objc.dg/class-1.m: Update. * objc.dg/const-str-1.m: Update. * objc.dg/fwd-proto-1.m: Update. * objc.dg/id-1.m: Update. * objc.dg/super-class-1.m: Update. From-SVN: r47518
2001-12-02 01:04:36 +01:00
fatal_insn ("unable to generate reloads for:", insn);
error_for_asm (insn, "inconsistent operand constraints in an %<asm%>");
1992-02-28 11:23:25 +01:00
/* Avoid further trouble with this insn. */
PATTERN (insn) = gen_rtx_USE (VOIDmode, const0_rtx);
1992-02-28 11:23:25 +01:00
n_reloads = 0;
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
return 0;
1992-02-28 11:23:25 +01:00
}
/* Jump to `finish' from above if all operands are valid already.
In that case, goal_alternative_win is all 1. */
finish:
/* Right now, for any pair of operands I and J that are required to match,
with I < J,
goal_alternative_matches[J] is I.
Set up goal_alternative_matched as the inverse function:
goal_alternative_matched[I] = J. */
for (i = 0; i < noperands; i++)
goal_alternative_matched[i] = -1;
1992-02-28 11:23:25 +01:00
for (i = 0; i < noperands; i++)
if (! goal_alternative_win[i]
&& goal_alternative_matches[i] >= 0)
goal_alternative_matched[goal_alternative_matches[i]] = i;
for (i = 0; i < noperands; i++)
goal_alternative_win[i] |= goal_alternative_match_win[i];
1992-02-28 11:23:25 +01:00
/* If the best alternative is with operands 1 and 2 swapped,
consider them swapped before reporting the reloads. Update the
operand numbers of any reloads already pushed. */
1992-02-28 11:23:25 +01:00
if (goal_alternative_swapped)
{
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 tem;
1992-02-28 11:23:25 +01:00
tem = substed_operand[commutative];
substed_operand[commutative] = substed_operand[commutative + 1];
substed_operand[commutative + 1] = tem;
tem = recog_data.operand[commutative];
recog_data.operand[commutative] = recog_data.operand[commutative + 1];
recog_data.operand[commutative + 1] = tem;
tem = *recog_data.operand_loc[commutative];
*recog_data.operand_loc[commutative]
= *recog_data.operand_loc[commutative + 1];
*recog_data.operand_loc[commutative + 1] = tem;
for (i = 0; i < n_reloads; i++)
{
if (rld[i].opnum == commutative)
rld[i].opnum = commutative + 1;
else if (rld[i].opnum == commutative + 1)
rld[i].opnum = commutative;
}
1992-02-28 11:23:25 +01:00
}
for (i = 0; i < noperands; i++)
{
operand_reloadnum[i] = -1;
/* If this is an earlyclobber operand, we need to widen the scope.
The reload must remain valid from the start of the insn being
reloaded until after the operand is stored into its destination.
We approximate this with RELOAD_OTHER even though we know that we
do not conflict with RELOAD_FOR_INPUT_ADDRESS reloads.
One special case that is worth checking is when we have an
output that is earlyclobber but isn't used past the insn (typically
a SCRATCH). In this case, we only need have the reload live
through the insn itself, but not for any of our input or output
reloads.
But we must not accidentally narrow the scope of an existing
RELOAD_OTHER reload - leave these alone.
In any case, anything needed to address this operand can remain
however they were previously categorized. */
if (goal_alternative_earlyclobber[i] && operand_type[i] != RELOAD_OTHER)
operand_type[i]
= (find_reg_note (insn, REG_UNUSED, recog_data.operand[i])
? RELOAD_FOR_INSN : RELOAD_OTHER);
1992-02-28 11:23:25 +01:00
}
/* Any constants that aren't allowed and can't be reloaded
into registers are here changed into memory references. */
for (i = 0; i < noperands; i++)
if (! goal_alternative_win[i])
1992-02-28 11:23:25 +01:00
{
rtx op = recog_data.operand[i];
rtx subreg = NULL_RTX;
rtx plus = NULL_RTX;
enum machine_mode mode = operand_mode[i];
/* Reloads of SUBREGs of CONSTANT RTXs are handled later in
push_reload so we have to let them pass here. */
if (GET_CODE (op) == SUBREG)
{
subreg = op;
op = SUBREG_REG (op);
mode = GET_MODE (op);
}
if (GET_CODE (op) == PLUS)
{
plus = op;
op = XEXP (op, 1);
}
1992-02-28 11:23:25 +01:00
target.def (cannot_force_const_mem): Add a mode argument. gcc/ * target.def (cannot_force_const_mem): Add a mode argument. * doc/tm.texi.in (TARGET_CANNOT_FORCE_CONST_MEM): Update accordingly. * doc/tm.texi: Regenerate. * hooks.h (hook_bool_mode_rtx_false): Declare. * hooks.c (hook_bool_mode_const_rtx_false): Fix commentary. (hook_bool_mode_const_rtx_true): Likewise. (hook_bool_mode_rtx_false): New function. * reload.c (CONST_POOL_OK_P): Take a mode argument and require it to be non-VOID. Update call to cannot_force_const_mem. (find_reloads): Update accordingly. * varasm.c (force_const_mem): Update call to cannot_force_const_mem. * config/alpha/alpha.c (alpha_cannot_force_const_mem): Add a mode argument. * config/arm/arm-protos.h (arm_cannot_force_const_mem): Likewise. * config/arm/arm.h (LEGITIMATE_CONSTANT_P): Update call. * config/arm/arm.c (arm_cannot_force_const_mem): Add a mode argument. * config/bfin/bfin.c (bfin_cannot_force_const_mem): Likewise. * config/frv/frv.c (frv_cannot_force_const_mem): Likewise. * config/i386/i386.c (ix86_cannot_force_const_mem): Likewise. * config/ia64/ia64.c (ia64_cannot_force_const_mem): Likewise. * config/m68k/m68k.c (TARGET_CANNOT_FORCE_CONST_MEM): Redefine to... (m68k_cannot_force_const_mem): ...this new function. * config/mips/mips.c (mips_cannot_force_const_mem): Add a mode argument. (mips_const_insns, mips_legitimize_const_move): Update calls. (mips_secondary_reload_class): Likewise. * config/pa/pa.c (TARGET_CANNOT_FORCE_CONST_MEM): Redefine to... (pa_cannot_force_const_mem): ...this new function. * config/rs6000/rs6000.c (TARGET_CANNOT_FORCE_CONST_MEM): Reefine to... (rs6000_cannot_force_const_mem): ...this new function. * config/s390/s390.c (s390_cannot_force_const_mem): Add a mode argument. * config/sparc/sparc.c (sparc_cannot_force_const_mem): Likewise. * config/xtensa/xtensa.c (TARGET_CANNOT_FORCE_CONST_MEM): Redefine to... (xtensa_cannot_force_const_mem): ...this new function. From-SVN: r172813
2011-04-21 11:37:44 +02:00
if (CONST_POOL_OK_P (mode, op)
&& ((targetm.preferred_reload_class (op, goal_alternative[i])
== NO_REGS)
target.def (cannot_force_const_mem): Add a mode argument. gcc/ * target.def (cannot_force_const_mem): Add a mode argument. * doc/tm.texi.in (TARGET_CANNOT_FORCE_CONST_MEM): Update accordingly. * doc/tm.texi: Regenerate. * hooks.h (hook_bool_mode_rtx_false): Declare. * hooks.c (hook_bool_mode_const_rtx_false): Fix commentary. (hook_bool_mode_const_rtx_true): Likewise. (hook_bool_mode_rtx_false): New function. * reload.c (CONST_POOL_OK_P): Take a mode argument and require it to be non-VOID. Update call to cannot_force_const_mem. (find_reloads): Update accordingly. * varasm.c (force_const_mem): Update call to cannot_force_const_mem. * config/alpha/alpha.c (alpha_cannot_force_const_mem): Add a mode argument. * config/arm/arm-protos.h (arm_cannot_force_const_mem): Likewise. * config/arm/arm.h (LEGITIMATE_CONSTANT_P): Update call. * config/arm/arm.c (arm_cannot_force_const_mem): Add a mode argument. * config/bfin/bfin.c (bfin_cannot_force_const_mem): Likewise. * config/frv/frv.c (frv_cannot_force_const_mem): Likewise. * config/i386/i386.c (ix86_cannot_force_const_mem): Likewise. * config/ia64/ia64.c (ia64_cannot_force_const_mem): Likewise. * config/m68k/m68k.c (TARGET_CANNOT_FORCE_CONST_MEM): Redefine to... (m68k_cannot_force_const_mem): ...this new function. * config/mips/mips.c (mips_cannot_force_const_mem): Add a mode argument. (mips_const_insns, mips_legitimize_const_move): Update calls. (mips_secondary_reload_class): Likewise. * config/pa/pa.c (TARGET_CANNOT_FORCE_CONST_MEM): Redefine to... (pa_cannot_force_const_mem): ...this new function. * config/rs6000/rs6000.c (TARGET_CANNOT_FORCE_CONST_MEM): Reefine to... (rs6000_cannot_force_const_mem): ...this new function. * config/s390/s390.c (s390_cannot_force_const_mem): Add a mode argument. * config/sparc/sparc.c (sparc_cannot_force_const_mem): Likewise. * config/xtensa/xtensa.c (TARGET_CANNOT_FORCE_CONST_MEM): Redefine to... (xtensa_cannot_force_const_mem): ...this new function. From-SVN: r172813
2011-04-21 11:37:44 +02:00
|| no_input_reloads))
{
int this_address_reloaded;
rtx tem = force_const_mem (mode, op);
/* If we stripped a SUBREG or a PLUS above add it back. */
if (plus != NULL_RTX)
tem = gen_rtx_PLUS (mode, XEXP (plus, 0), tem);
if (subreg != NULL_RTX)
tem = gen_rtx_SUBREG (operand_mode[i], tem, SUBREG_BYTE (subreg));
this_address_reloaded = 0;
substed_operand[i] = recog_data.operand[i]
= find_reloads_toplev (tem, i, address_type[i], ind_levels,
0, insn, &this_address_reloaded);
/* If the alternative accepts constant pool refs directly
there will be no reload needed at all. */
if (plus == NULL_RTX
&& subreg == NULL_RTX
&& alternative_allows_const_pool_ref (this_address_reloaded == 0
? substed_operand[i]
: NULL,
recog_data.constraints[i],
goal_alternative_number))
goal_alternative_win[i] = 1;
}
}
/* Record the values of the earlyclobber operands for the caller. */
if (goal_earlyclobber)
for (i = 0; i < noperands; i++)
if (goal_alternative_earlyclobber[i])
reload_earlyclobbers[n_earlyclobbers++] = recog_data.operand[i];
1992-02-28 11:23:25 +01:00
/* Now record reloads for all the operands that need them. */
for (i = 0; i < noperands; i++)
if (! goal_alternative_win[i])
{
/* Operands that match previous ones have already been handled. */
if (goal_alternative_matches[i] >= 0)
;
/* Handle an operand with a nonoffsettable address
appearing where an offsettable address will do
by reloading the address into a base register.
??? We can also do this when the operand is a register and
reg_equiv_mem is not offsettable, but this is a bit tricky,
so we don't bother with it. It may not be worth doing. */
1992-02-28 11:23:25 +01:00
else if (goal_alternative_matched[i] == -1
&& goal_alternative_offmemok[i]
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 (recog_data.operand[i]))
1992-02-28 11:23:25 +01:00
{
/* If the address to be reloaded is a VOIDmode constant,
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
use the default address mode as mode of the reload register,
as would have been done by find_reloads_address. */
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
addr_space_t as = MEM_ADDR_SPACE (recog_data.operand[i]);
enum machine_mode address_mode;
address_mode = get_address_mode (recog_data.operand[i]);
1992-02-28 11:23:25 +01:00
operand_reloadnum[i]
= push_reload (XEXP (recog_data.operand[i], 0), NULL_RTX,
&XEXP (recog_data.operand[i], 0), (rtx*) 0,
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
base_reg_class (VOIDmode, as, MEM, SCRATCH),
address_mode,
VOIDmode, 0, 0, i, RELOAD_FOR_INPUT);
rld[operand_reloadnum[i]].inc
= GET_MODE_SIZE (GET_MODE (recog_data.operand[i]));
/* If this operand is an output, we will have made any
reloads for its address as RELOAD_FOR_OUTPUT_ADDRESS, but
now we are treating part of the operand as an input, so
we must change these to RELOAD_FOR_INPUT_ADDRESS. */
if (modified[i] == RELOAD_WRITE)
{
for (j = 0; j < n_reloads; j++)
{
if (rld[j].opnum == i)
{
if (rld[j].when_needed == RELOAD_FOR_OUTPUT_ADDRESS)
rld[j].when_needed = RELOAD_FOR_INPUT_ADDRESS;
else if (rld[j].when_needed
== RELOAD_FOR_OUTADDR_ADDRESS)
rld[j].when_needed = RELOAD_FOR_INPADDR_ADDRESS;
}
}
}
1992-02-28 11:23:25 +01:00
}
else if (goal_alternative_matched[i] == -1)
{
operand_reloadnum[i]
= push_reload ((modified[i] != RELOAD_WRITE
? recog_data.operand[i] : 0),
(modified[i] != RELOAD_READ
? recog_data.operand[i] : 0),
(modified[i] != RELOAD_WRITE
? recog_data.operand_loc[i] : 0),
(modified[i] != RELOAD_READ
? recog_data.operand_loc[i] : 0),
(enum reg_class) goal_alternative[i],
(modified[i] == RELOAD_WRITE
? VOIDmode : operand_mode[i]),
(modified[i] == RELOAD_READ
? VOIDmode : operand_mode[i]),
(insn_code_number < 0 ? 0
: insn_data[insn_code_number].operand[i].strict_low),
0, i, operand_type[i]);
}
1992-02-28 11:23:25 +01:00
/* In a matching pair of operands, one must be input only
and the other must be output only.
Pass the input operand as IN and the other as OUT. */
else if (modified[i] == RELOAD_READ
&& modified[goal_alternative_matched[i]] == RELOAD_WRITE)
{
operand_reloadnum[i]
= push_reload (recog_data.operand[i],
recog_data.operand[goal_alternative_matched[i]],
recog_data.operand_loc[i],
recog_data.operand_loc[goal_alternative_matched[i]],
1992-02-28 11:23:25 +01:00
(enum reg_class) goal_alternative[i],
operand_mode[i],
operand_mode[goal_alternative_matched[i]],
0, 0, i, RELOAD_OTHER);
1992-02-28 11:23:25 +01:00
operand_reloadnum[goal_alternative_matched[i]] = output_reloadnum;
}
else if (modified[i] == RELOAD_WRITE
&& modified[goal_alternative_matched[i]] == RELOAD_READ)
{
operand_reloadnum[goal_alternative_matched[i]]
= push_reload (recog_data.operand[goal_alternative_matched[i]],
recog_data.operand[i],
recog_data.operand_loc[goal_alternative_matched[i]],
recog_data.operand_loc[i],
1992-02-28 11:23:25 +01:00
(enum reg_class) goal_alternative[i],
operand_mode[goal_alternative_matched[i]],
operand_mode[i],
0, 0, i, RELOAD_OTHER);
1992-02-28 11:23:25 +01:00
operand_reloadnum[i] = output_reloadnum;
}
else
{
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 (insn_code_number < 0);
error_for_asm (insn, "inconsistent operand constraints "
"in an %<asm%>");
1992-02-28 11:23:25 +01:00
/* Avoid further trouble with this insn. */
PATTERN (insn) = gen_rtx_USE (VOIDmode, const0_rtx);
1992-02-28 11:23:25 +01:00
n_reloads = 0;
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
return 0;
1992-02-28 11:23:25 +01:00
}
}
else if (goal_alternative_matched[i] < 0
&& goal_alternative_matches[i] < 0
&& address_operand_reloaded[i] != 1
&& optimize)
1992-02-28 11:23:25 +01:00
{
/* For each non-matching operand that's a MEM or a pseudo-register
1992-02-28 11:23:25 +01:00
that didn't get a hard register, make an optional reload.
This may get done even if the insn needs no reloads otherwise. */
rtx operand = recog_data.operand[i];
1992-02-28 11:23:25 +01:00
while (GET_CODE (operand) == 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
operand = SUBREG_REG (operand);
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 (operand)
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 (operand)
&& REGNO (operand) >= FIRST_PSEUDO_REGISTER))
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
/* If this is only for an output, the optional reload would not
actually cause us to use a register now, just note that
something is stored here. */
&& (goal_alternative[i] != NO_REGS
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
|| modified[i] == RELOAD_WRITE)
&& ! no_input_reloads
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
/* An optional output reload might allow to delete INSN later.
We mustn't make in-out reloads on insns that are not permitted
output reloads.
If this is an asm, we can't delete it; we must not even call
push_reload for an optional output reload in this case,
because we can't be sure that the constraint allows a register,
and push_reload verifies the constraints for asms. */
1992-02-28 11:23:25 +01:00
&& (modified[i] == RELOAD_READ
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
|| (! no_output_reloads && ! this_insn_is_asm)))
1992-02-28 11:23:25 +01:00
operand_reloadnum[i]
= push_reload ((modified[i] != RELOAD_WRITE
? recog_data.operand[i] : 0),
(modified[i] != RELOAD_READ
? recog_data.operand[i] : 0),
(modified[i] != RELOAD_WRITE
? recog_data.operand_loc[i] : 0),
(modified[i] != RELOAD_READ
? recog_data.operand_loc[i] : 0),
1992-02-28 11:23:25 +01:00
(enum reg_class) goal_alternative[i],
(modified[i] == RELOAD_WRITE
? VOIDmode : operand_mode[i]),
(modified[i] == RELOAD_READ
? VOIDmode : operand_mode[i]),
1992-02-28 11:23:25 +01:00
(insn_code_number < 0 ? 0
: insn_data[insn_code_number].operand[i].strict_low),
1, i, operand_type[i]);
/* If a memory reference remains (either as a MEM or a pseudo that
did not get a hard register), yet we can't make an optional
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
reload, check if this is actually a pseudo register reference;
we then need to emit a USE and/or a CLOBBER so that reload
inheritance will do the right thing. */
else if (replace
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 (operand)
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 (operand)
&& REGNO (operand) >= FIRST_PSEUDO_REGISTER
&& reg_renumber [REGNO (operand)] < 0)))
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
{
operand = *recog_data.operand_loc[i];
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
while (GET_CODE (operand) == 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
operand = SUBREG_REG (operand);
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 (operand))
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
{
if (modified[i] != RELOAD_WRITE)
/* We mark the USE with QImode so that we recognize
it as one that can be safely deleted at the end
of reload. */
PUT_MODE (emit_insn_before (gen_rtx_USE (VOIDmode, operand),
insn), QImode);
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
if (modified[i] != RELOAD_READ)
rtl.h (emit_clobber, [...]): Declare. gcc/ * rtl.h (emit_clobber, gen_clobber, emit_use, gen_use): Declare. * emit-rtl.c (emit_clobber, gen_clobber, emit_use, gen_use): New functions. Do not emit uses and clobbers of CONCATs; individually use and clobber their operands. * builtins.c (expand_builtin_setjmp_receiver): Use emit_clobber, gen_clobber, emit_use and gen_use. (expand_builtin_longjmp, expand_builtin_nonlocal_goto): Likewise. (expand_builtin_return): Likewise. * cfgbuild.c (count_basic_blocks): Likewise. * cfgrtl.c (rtl_flow_call_edges_add): Likewise. * explow.c (emit_stack_restore): Likewise. * expmed.c (extract_bit_field_1): Likewise. * expr.c (convert_move, emit_move_complex_parts): Likewise. (emit_move_multi_word, store_constructor): Likewise. * function.c (do_clobber_return_reg, do_use_return_reg): Likewise. (thread_prologue_and_epilogue_insns): Likewise. * lower-subreg.c (resolve_simple_move): Likewise. * optabs.c (widen_operand, expand_binop): Likewise. (expand_doubleword_bswap, emit_no_conflict_block): Likewise. * reload.c (find_reloads): Likewise. * reload1.c (eliminate_regs_in_insn): Likewise. * stmt.c (expand_nl_goto_receiver): Likewise. * config/alpha/alpha.md (builtin_longjmp): Likewise. * config/arc/arc.md (*movdi_insn, *movdf_insn): Likewise. * config/arm/arm.c (arm_load_pic_register): Likewise. (thumb1_expand_epilogue, thumb_set_return_address): Likewise. * config/arm/arm.md (untyped_return): Likewise. * config/arm/linux-elf.h (PROFILE_HOOK): Likewise. * config/avr/avr.c (expand_prologue): Likewise. * config/bfin/bfin.c (do_unlink): Likewise. * config/bfin/bfin.md (<optab>di3, adddi3, subdi3): Likewise. * config/cris/cris.c (cris_expand_prologue): Likewise. * config/darwin.c (machopic_indirect_data_reference): Likewise. (machopic_legitimize_pic_address): Likewise. * config/frv/frv.c (frv_frame_access, frv_expand_epilogue): Likewise. (frv_ifcvt_modify_insn, frv_expand_mdpackh_builtin): Likewise. * config/i386/i386.c (ix86_expand_vector_move_misalign): Likewise. (ix86_expand_convert_uns_didf_sse): Likewise. (ix86_expand_vector_init_general): Likewise. * config/ia64/ia64.md (eh_epilogue): Likewise. * config/iq2000/iq2000.c (iq2000_expand_epilogue): Likewise. * config/m32c/m32c.c (m32c_emit_eh_epilogue): Likewise. * config/m32r/m32r.c (m32r_reload_lr): Likewise. (config/iq2000/iq2000.c): Likewise. * config/mips/mips.md (fixuns_truncdfsi2): Likewise. (fixuns_truncdfdi2, fixuns_truncsfsi2, fixuns_truncsfdi2): Likewise. (builtin_longjmp): Likewise. * config/mn10300/mn10300.md (call, call_value): Likewise. * config/pa/pa.md (nonlocal_goto, nonlocal_longjmp): Likewise. * config/pdp11/pdp11.md (abshi2): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Likewise. * config/s390/s390.c (s390_emit_prologue): Likewise. * config/s390/s390.md (movmem_long, setmem_long): Likewise. (cmpmem_long, extendsidi2, zero_extendsidi2, udivmoddi4): Likewise. (builtin_setjmp_receiver, restore_stack_nonlocal): Likewise. * config/sh/sh.c (prepare_move_operands): Likewise. (output_stack_adjust, sh_expand_epilogue): Likewise. (sh_set_return_address, sh_expand_t_scc): Likewise. * config/sparc/sparc.c (load_pic_register): Likewise. * config/sparc/sparc.md (untyped_return, nonlocal_goto): Likewise. * config/spu/spu.c (spu_expand_epilogue): Likewise. * config/v850/v850.c (expand_epilogue): Likewise. From-SVN: r136251
2008-06-01 11:47:28 +02:00
emit_insn_after (gen_clobber (operand), insn);
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
}
}
1992-02-28 11:23:25 +01:00
}
else if (goal_alternative_matches[i] >= 0
&& goal_alternative_win[goal_alternative_matches[i]]
&& modified[i] == RELOAD_READ
&& modified[goal_alternative_matches[i]] == RELOAD_WRITE
&& ! no_input_reloads && ! no_output_reloads
&& optimize)
{
/* Similarly, make an optional reload for a pair of matching
objects that are in MEM or a pseudo that didn't get a hard reg. */
1992-02-28 11:23:25 +01:00
rtx operand = recog_data.operand[i];
while (GET_CODE (operand) == 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
operand = SUBREG_REG (operand);
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 (operand)
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 (operand)
&& REGNO (operand) >= FIRST_PSEUDO_REGISTER))
&& (goal_alternative[goal_alternative_matches[i]] != NO_REGS))
operand_reloadnum[i] = operand_reloadnum[goal_alternative_matches[i]]
= push_reload (recog_data.operand[goal_alternative_matches[i]],
recog_data.operand[i],
recog_data.operand_loc[goal_alternative_matches[i]],
recog_data.operand_loc[i],
(enum reg_class) goal_alternative[goal_alternative_matches[i]],
operand_mode[goal_alternative_matches[i]],
operand_mode[i],
0, 1, goal_alternative_matches[i], RELOAD_OTHER);
}
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
/* Perform whatever substitutions on the operands we are supposed
to make due to commutativity or replacement of registers
with equivalent constants or memory slots. */
for (i = 0; i < noperands; i++)
{
/* We only do this on the last pass through reload, because it is
possible for some data (like reg_equiv_address) to be changed during
later passes. Moreover, we lose the opportunity to get a useful
reload_{in,out}_reg when we do these replacements. */
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
if (replace)
{
rtx substitution = substed_operand[i];
*recog_data.operand_loc[i] = substitution;
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're replacing an operand with a LABEL_REF, we need to
make sure that there's a REG_LABEL_OPERAND note attached to
this instruction. */
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 (substitution) == LABEL_REF
&& !find_reg_note (insn, REG_LABEL_OPERAND,
XEXP (substitution, 0))
/* For a JUMP_P, if it was a branch target it must have
already been recorded as such. */
&& (!JUMP_P (insn)
|| !label_is_jump_target_p (XEXP (substitution, 0),
insn)))
{
add_reg_note (insn, REG_LABEL_OPERAND, XEXP (substitution, 0));
if (LABEL_P (XEXP (substitution, 0)))
++LABEL_NUSES (XEXP (substitution, 0));
}
}
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
else
retval |= (substed_operand[i] != *recog_data.operand_loc[i]);
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
}
1992-02-28 11:23:25 +01:00
/* If this insn pattern contains any MATCH_DUP's, make sure that
they will be substituted if the operands they match are substituted.
Also do now any substitutions we already did on the operands.
Don't do this if we aren't making replacements because we might be
propagating things allocated by frame pointer elimination into places
it doesn't expect. */
if (insn_code_number >= 0 && replace)
for (i = insn_data[insn_code_number].n_dups - 1; i >= 0; i--)
1992-02-28 11:23:25 +01:00
{
int opno = recog_data.dup_num[i];
*recog_data.dup_loc[i] = *recog_data.operand_loc[opno];
dup_replacements (recog_data.dup_loc[i], recog_data.operand_loc[opno]);
1992-02-28 11:23:25 +01:00
}
#if 0
/* This loses because reloading of prior insns can invalidate the equivalence
(or at least find_equiv_reg isn't smart enough to find it any more),
causing this insn to need more reload regs than it needed before.
It may be too late to make the reload regs available.
Now this optimization is done safely in choose_reload_regs. */
/* For each reload of a reg into some other class of reg,
search for an existing equivalent reg (same value now) in the right class.
We can use it as long as we don't need to change its contents. */
for (i = 0; i < n_reloads; i++)
if (rld[i].reg_rtx == 0
&& rld[i].in != 0
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 (rld[i].in)
&& rld[i].out == 0)
1992-02-28 11:23:25 +01:00
{
rld[i].reg_rtx
= find_equiv_reg (rld[i].in, insn, rld[i].rclass, -1,
static_reload_reg_p, 0, rld[i].inmode);
1992-02-28 11:23:25 +01:00
/* Prevent generation of insn to load the value
because the one we found already has the value. */
if (rld[i].reg_rtx)
rld[i].in = rld[i].reg_rtx;
1992-02-28 11:23:25 +01:00
}
#endif
/* If we detected error and replaced asm instruction by USE, forget about the
reloads. */
if (GET_CODE (PATTERN (insn)) == USE
&& CONST_INT_P (XEXP (PATTERN (insn), 0)))
n_reloads = 0;
/* Perhaps an output reload can be combined with another
to reduce needs by one. */
if (!goal_earlyclobber)
combine_reloads ();
/* If we have a pair of reloads for parts of an address, they are reloading
the same object, the operands themselves were not reloaded, and they
are for two operands that are supposed to match, merge the reloads and
1996-07-04 00:07:53 +02:00
change the type of the surviving reload to RELOAD_FOR_OPERAND_ADDRESS. */
for (i = 0; i < n_reloads; i++)
{
int k;
for (j = i + 1; j < n_reloads; j++)
if ((rld[i].when_needed == RELOAD_FOR_INPUT_ADDRESS
|| rld[i].when_needed == RELOAD_FOR_OUTPUT_ADDRESS
|| rld[i].when_needed == RELOAD_FOR_INPADDR_ADDRESS
|| rld[i].when_needed == RELOAD_FOR_OUTADDR_ADDRESS)
&& (rld[j].when_needed == RELOAD_FOR_INPUT_ADDRESS
|| rld[j].when_needed == RELOAD_FOR_OUTPUT_ADDRESS
|| rld[j].when_needed == RELOAD_FOR_INPADDR_ADDRESS
|| rld[j].when_needed == RELOAD_FOR_OUTADDR_ADDRESS)
&& rtx_equal_p (rld[i].in, rld[j].in)
&& (operand_reloadnum[rld[i].opnum] < 0
|| rld[operand_reloadnum[rld[i].opnum]].optional)
&& (operand_reloadnum[rld[j].opnum] < 0
|| rld[operand_reloadnum[rld[j].opnum]].optional)
&& (goal_alternative_matches[rld[i].opnum] == rld[j].opnum
|| (goal_alternative_matches[rld[j].opnum]
== rld[i].opnum)))
{
for (k = 0; k < n_replacements; k++)
if (replacements[k].what == j)
replacements[k].what = i;
if (rld[i].when_needed == RELOAD_FOR_INPADDR_ADDRESS
|| rld[i].when_needed == RELOAD_FOR_OUTADDR_ADDRESS)
rld[i].when_needed = RELOAD_FOR_OPADDR_ADDR;
else
rld[i].when_needed = RELOAD_FOR_OPERAND_ADDRESS;
rld[j].in = 0;
}
}
/* Scan all the reloads and update their type.
If a reload is for the address of an operand and we didn't reload
that operand, change the type. Similarly, change the operand number
of a reload when two operands match. If a reload is optional, treat it
as though the operand isn't reloaded.
??? This latter case is somewhat odd because if we do the optional
reload, it means the object is hanging around. Thus we need only
do the address reload if the optional reload was NOT done.
Change secondary reloads to be the address type of their operand, not
the normal type.
If an operand's reload is now RELOAD_OTHER, change any
RELOAD_FOR_INPUT_ADDRESS reloads of that operand to
RELOAD_FOR_OTHER_ADDRESS. */
for (i = 0; i < n_reloads; i++)
{
if (rld[i].secondary_p
&& rld[i].when_needed == operand_type[rld[i].opnum])
rld[i].when_needed = address_type[rld[i].opnum];
if ((rld[i].when_needed == RELOAD_FOR_INPUT_ADDRESS
|| rld[i].when_needed == RELOAD_FOR_OUTPUT_ADDRESS
|| rld[i].when_needed == RELOAD_FOR_INPADDR_ADDRESS
|| rld[i].when_needed == RELOAD_FOR_OUTADDR_ADDRESS)
&& (operand_reloadnum[rld[i].opnum] < 0
|| rld[operand_reloadnum[rld[i].opnum]].optional))
{
/* If we have a secondary reload to go along with this reload,
1996-07-04 00:07:53 +02:00
change its type to RELOAD_FOR_OPADDR_ADDR. */
if ((rld[i].when_needed == RELOAD_FOR_INPUT_ADDRESS
|| rld[i].when_needed == RELOAD_FOR_INPADDR_ADDRESS)
&& rld[i].secondary_in_reload != -1)
{
int secondary_in_reload = rld[i].secondary_in_reload;
rld[secondary_in_reload].when_needed = RELOAD_FOR_OPADDR_ADDR;
1996-07-04 00:07:53 +02:00
/* If there's a tertiary reload we have to change it also. */
if (secondary_in_reload > 0
&& rld[secondary_in_reload].secondary_in_reload != -1)
rld[rld[secondary_in_reload].secondary_in_reload].when_needed
= RELOAD_FOR_OPADDR_ADDR;
}
if ((rld[i].when_needed == RELOAD_FOR_OUTPUT_ADDRESS
|| rld[i].when_needed == RELOAD_FOR_OUTADDR_ADDRESS)
&& rld[i].secondary_out_reload != -1)
{
int secondary_out_reload = rld[i].secondary_out_reload;
rld[secondary_out_reload].when_needed = RELOAD_FOR_OPADDR_ADDR;
1996-07-04 00:07:53 +02:00
/* If there's a tertiary reload we have to change it also. */
if (secondary_out_reload
&& rld[secondary_out_reload].secondary_out_reload != -1)
rld[rld[secondary_out_reload].secondary_out_reload].when_needed
= RELOAD_FOR_OPADDR_ADDR;
}
if (rld[i].when_needed == RELOAD_FOR_INPADDR_ADDRESS
|| rld[i].when_needed == RELOAD_FOR_OUTADDR_ADDRESS)
rld[i].when_needed = RELOAD_FOR_OPADDR_ADDR;
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
else
rld[i].when_needed = RELOAD_FOR_OPERAND_ADDRESS;
}
if ((rld[i].when_needed == RELOAD_FOR_INPUT_ADDRESS
|| rld[i].when_needed == RELOAD_FOR_INPADDR_ADDRESS)
&& operand_reloadnum[rld[i].opnum] >= 0
&& (rld[operand_reloadnum[rld[i].opnum]].when_needed
== RELOAD_OTHER))
rld[i].when_needed = RELOAD_FOR_OTHER_ADDRESS;
if (goal_alternative_matches[rld[i].opnum] >= 0)
rld[i].opnum = goal_alternative_matches[rld[i].opnum];
}
/* Scan all the reloads, and check for RELOAD_FOR_OPERAND_ADDRESS reloads.
If we have more than one, then convert all RELOAD_FOR_OPADDR_ADDR
reloads to RELOAD_FOR_OPERAND_ADDRESS reloads.
choose_reload_regs assumes that RELOAD_FOR_OPADDR_ADDR reloads never
conflict with RELOAD_FOR_OPERAND_ADDRESS reloads. This is true for a
single pair of RELOAD_FOR_OPADDR_ADDR/RELOAD_FOR_OPERAND_ADDRESS reloads.
However, if there is more than one RELOAD_FOR_OPERAND_ADDRESS reload,
then a RELOAD_FOR_OPADDR_ADDR reload conflicts with all
RELOAD_FOR_OPERAND_ADDRESS reloads other than the one that uses it.
This is complicated by the fact that a single operand can have more
than one RELOAD_FOR_OPERAND_ADDRESS reload. It is very difficult to fix
choose_reload_regs without affecting code quality, and cases that
actually fail are extremely rare, so it turns out to be better to fix
the problem here by not generating cases that choose_reload_regs will
fail for. */
1998-09-08 15:42:58 +02:00
/* There is a similar problem with RELOAD_FOR_INPUT_ADDRESS /
RELOAD_FOR_OUTPUT_ADDRESS when there is more than one of a kind for
a single operand.
We can reduce the register pressure by exploiting that a
RELOAD_FOR_X_ADDR_ADDR that precedes all RELOAD_FOR_X_ADDRESS reloads
does not conflict with any of them, if it is only used for the first of
the RELOAD_FOR_X_ADDRESS reloads. */
{
int first_op_addr_num = -2;
int first_inpaddr_num[MAX_RECOG_OPERANDS];
int first_outpaddr_num[MAX_RECOG_OPERANDS];
int need_change = 0;
/* We use last_op_addr_reload and the contents of the above arrays
first as flags - -2 means no instance encountered, -1 means exactly
one instance encountered.
If more than one instance has been encountered, we store the reload
number of the first reload of the kind in question; reload numbers
are known to be non-negative. */
for (i = 0; i < noperands; i++)
first_inpaddr_num[i] = first_outpaddr_num[i] = -2;
for (i = n_reloads - 1; i >= 0; i--)
{
switch (rld[i].when_needed)
{
case RELOAD_FOR_OPERAND_ADDRESS:
if (++first_op_addr_num >= 0)
{
first_op_addr_num = i;
need_change = 1;
}
break;
case RELOAD_FOR_INPUT_ADDRESS:
if (++first_inpaddr_num[rld[i].opnum] >= 0)
{
first_inpaddr_num[rld[i].opnum] = i;
need_change = 1;
}
break;
case RELOAD_FOR_OUTPUT_ADDRESS:
if (++first_outpaddr_num[rld[i].opnum] >= 0)
{
first_outpaddr_num[rld[i].opnum] = i;
need_change = 1;
}
break;
default:
break;
}
}
if (need_change)
{
for (i = 0; i < n_reloads; i++)
{
int first_num;
enum reload_type type;
switch (rld[i].when_needed)
{
case RELOAD_FOR_OPADDR_ADDR:
first_num = first_op_addr_num;
type = RELOAD_FOR_OPERAND_ADDRESS;
break;
case RELOAD_FOR_INPADDR_ADDRESS:
first_num = first_inpaddr_num[rld[i].opnum];
type = RELOAD_FOR_INPUT_ADDRESS;
break;
case RELOAD_FOR_OUTADDR_ADDRESS:
first_num = first_outpaddr_num[rld[i].opnum];
type = RELOAD_FOR_OUTPUT_ADDRESS;
break;
default:
continue;
}
if (first_num < 0)
continue;
else if (i > first_num)
rld[i].when_needed = type;
else
{
/* Check if the only TYPE reload that uses reload I is
reload FIRST_NUM. */
for (j = n_reloads - 1; j > first_num; j--)
{
if (rld[j].when_needed == type
&& (rld[i].secondary_p
? rld[j].secondary_in_reload == i
: reg_mentioned_p (rld[i].in, rld[j].in)))
{
rld[i].when_needed = type;
break;
}
}
}
}
}
}
/* See if we have any reloads that are now allowed to be merged
because we've changed when the reload is needed to
RELOAD_FOR_OPERAND_ADDRESS or RELOAD_FOR_OTHER_ADDRESS. Only
check for the most common cases. */
for (i = 0; i < n_reloads; i++)
if (rld[i].in != 0 && rld[i].out == 0
&& (rld[i].when_needed == RELOAD_FOR_OPERAND_ADDRESS
|| rld[i].when_needed == RELOAD_FOR_OPADDR_ADDR
|| rld[i].when_needed == RELOAD_FOR_OTHER_ADDRESS))
for (j = 0; j < n_reloads; j++)
if (i != j && rld[j].in != 0 && rld[j].out == 0
&& rld[j].when_needed == rld[i].when_needed
&& MATCHES (rld[i].in, rld[j].in)
&& rld[i].rclass == rld[j].rclass
&& !rld[i].nocombine && !rld[j].nocombine
&& rld[i].reg_rtx == rld[j].reg_rtx)
{
rld[i].opnum = MIN (rld[i].opnum, rld[j].opnum);
transfer_replacements (i, j);
rld[j].in = 0;
}
[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
#ifdef HAVE_cc0
/* If we made any reloads for addresses, see if they violate a
"no input reloads" requirement for this insn. But loads that we
do after the insn (such as for output addresses) are fine. */
if (no_input_reloads)
for (i = 0; i < n_reloads; i++)
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 (rld[i].in == 0
|| rld[i].when_needed == RELOAD_FOR_OUTADDR_ADDRESS
|| rld[i].when_needed == RELOAD_FOR_OUTPUT_ADDRESS);
[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
#endif
1999-10-26 15:45:31 +02:00
/* Compute reload_mode and reload_nregs. */
for (i = 0; i < n_reloads; i++)
{
rld[i].mode
= (rld[i].inmode == VOIDmode
|| (GET_MODE_SIZE (rld[i].outmode)
> GET_MODE_SIZE (rld[i].inmode)))
? rld[i].outmode : rld[i].inmode;
target.def (class_max_nregs): New hook. * target.def (class_max_nregs): New hook. * doc/tm.texi.in (TARGET_CLASS_MAX_NREGS): Document. * doc/tm.texi: Regenerate. * targhooks.c (default_class_max_nregs): New function. * targhooks.h (default_class_max_nregs): Declare. * ira.h (target_ira): Change type x_ira_reg_class_max_nregs and x_ira_reg_class_min_nregs arrays to unsigned char. * ira.c (setup_reg_class_nregs): Use TARGET_CLASS_MAX_NREGS target hook instead of CLASS_MAX_NREGS macro. * reginfo.c (restore_register_info): Ditto. * ira-conflicts.c (process_regs_for_copy): Use ira_reg_class_max_nregs array instead of CLASS_MAX_NREGS macro. Change type rclass and aclass vars to reg_class_t. * ira-costs.c (record_reg_classes): Use ira_reg_class_max_nregs array instead of CLASS_MAX_NREGS macro. Change type rclass var to reg_class_t. * reload.c (combine_reloads, find_reloads, find_reloads_address_1): Use ira_reg_class_max_nregs array instead of CLASS_MAX_NREGS macro. * config/i386/i386.h (CLASS_MAX_NREGS): Remove. * config/i386/i386.c (ix86_class_max_nregs): New function. (ix86_register_move_cost): Use TARGET_CLASS_MAX_NREGS target hook instead of CLASS_MAX_NREGS macro. (TARGET_CLASS_MAX_NREGS): Define. * config/avr/avr.h (CLASS_MAX_NREGS): Remove. * config/avr/avr-protos.h (class_max_nregs): Remove declaration. * config/avr/avr.c (class_max_nregs): Remove function. * config/alpha/alpha.h (CLASS_MAX_NREGS): Remove. * config/spu/spu.h (CLASS_MAX_NREGS): Remove. * config/mep/mep.h (CLASS_MAX_NREGS): Remove. * config/m32r/m32r.h (CLASS_MAX_NREGS): Remove. * config/microblaze/microblaze.h (CLASS_MAX_NREGS): Remove. * config/xtensa/xtensa.h (CLASS_MAX_NREGS): Remove. * config/stormy16/stormy16.h (CLASS_MAX_NREGS): Remove. * config/lm32/lm32.h (CLASS_MAX_NREGS): Remove. * config/moxie/moxie.h (CLASS_MAX_NREGS): Remove. * config/iq2000/iq2000.h (CLASS_MAX_NREGS): Remove. * config/mn10300/mn10300.h (CLASS_MAX_NREGS): Remove. * config/score/score.h (CLASS_MAX_NREGS): Remove. * config/vax/vax.h (CLASS_MAX_NREGS): Remove. * config/h8300/h8300.h (CLASS_MAX_NREGS): Remove. * config/v850/v850.h (CLASS_MAX_NREGS): Remove. From-SVN: r176490
2011-07-20 00:34:31 +02:00
rld[i].nregs = ira_reg_class_max_nregs [rld[i].rclass][rld[i].mode];
1999-10-26 15:45:31 +02:00
}
/* Special case a simple move with an input reload and a
destination of a hard reg, if the hard reg is ok, use it. */
for (i = 0; i < n_reloads; i++)
if (rld[i].when_needed == RELOAD_FOR_INPUT
&& GET_CODE (PATTERN (insn)) == 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 (PATTERN (insn)))
&& (SET_SRC (PATTERN (insn)) == rld[i].in
|| SET_SRC (PATTERN (insn)) == rld[i].in_reg)
&& !elimination_target_reg_p (SET_DEST (PATTERN (insn))))
{
rtx dest = SET_DEST (PATTERN (insn));
unsigned int regno = REGNO (dest);
if (regno < FIRST_PSEUDO_REGISTER
&& TEST_HARD_REG_BIT (reg_class_contents[rld[i].rclass], regno)
&& HARD_REGNO_MODE_OK (regno, rld[i].mode))
{
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
int nr = hard_regno_nregs[regno][rld[i].mode];
int ok = 1, nri;
for (nri = 1; nri < nr; nri ++)
if (! TEST_HARD_REG_BIT (reg_class_contents[rld[i].rclass], regno + nri))
{
ok = 0;
break;
}
if (ok)
rld[i].reg_rtx = dest;
}
}
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
return retval;
1992-02-28 11:23:25 +01:00
}
/* Return true if alternative number ALTNUM in constraint-string
CONSTRAINT is guaranteed to accept a reloaded constant-pool reference.
MEM gives the reference if it didn't need any reloads, otherwise it
is null. */
1992-02-28 11:23:25 +01:00
static bool
alternative_allows_const_pool_ref (rtx mem ATTRIBUTE_UNUSED,
const char *constraint, int altnum)
1992-02-28 11:23:25 +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 c;
1992-02-28 11:23:25 +01:00
/* Skip alternatives before the one requested. */
while (altnum > 0)
{
while (*constraint++ != ',')
;
1992-02-28 11:23:25 +01:00
altnum--;
}
/* Scan the requested alternative for TARGET_MEM_CONSTRAINT or 'o'.
If one of them is present, this alternative accepts the result of
passing a constant-pool reference through find_reloads_toplev.
The same is true of extra memory constraints if the address
was reloaded into a register. However, the target may elect
to disallow the original constant address, forcing it to be
reloaded into a register instead. */
defaults.h (EXTRA_MEMORY_CONSTRAINT): Add STR argument. * defaults.h (EXTRA_MEMORY_CONSTRAINT): Add STR argument. (EXTRA_ADDRESS_CONSTRAINT): Likewise. (CONSTRAINT_LEN): Provide default definition. (CONST_OK_FOR_CONSTRAINT_P): Likewise. (CONST_DOUBLE_OK_FOR_CONSTRAINT_P): Likewise. (EXTRA_CONSTRAINT_STR): Likewise. (REG_CLASS_FROM_CONSTRAINT): Define. * genoutput.c (check_constraint_len, constraint_len): New functions. (validate_insn_alternatives): Check CONSTRAINT_LEN for each constraint / modifier. (gen_insn): Call check_constraint_len. * local-alloc.c (block_alloc): Update to use new macros / pass second argument to EXTRA_{MEMORY,ADDRESS}_CONSTRAINT. * ra-build.c (handle_asm_insn): Likewise. * recog.c (asm_operand_ok, preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. * regclass.c (record_operand_costs, record_reg_classes): Likewise. * regmove.c (find_matches): Likewise. * reload.c (push_secondary_reload, find_reloads): Likewise. (alternative_allows_memconst): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. (reload_cse_simplify_operands): Likewise. * stmt.c (parse_output_constraint, parse_input_constraint): Likewise. * doc/tm.texi (CONSTRAINT_LEN, REG_CLASS_FROM_CONSTRAINT): Document. (CONST_OK_FOR_CONSTRAINT_P): Likewise. (CONST_DOUBLE_OK_FOR_CONSTRAINT_P, EXTRA_CONSTRAINT_STR): Likewise. (EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT): Add STR argument. * config/s390/s390.h (EXTRA_MEMORY_CONSTRAINT): Likewise. From-SVN: r61119
2003-01-09 18:28:49 +01:00
for (; (c = *constraint) && c != ',' && c != '#';
constraint += CONSTRAINT_LEN (c, constraint))
{
system.h (REG_CLASS_FROM_CONSTRAINT): Poison. gcc/ * system.h (REG_CLASS_FROM_CONSTRAINT): Poison. (REG_CLASS_FOR_CONSTRAINT, EXTRA_CONSTRAINT_STR): Likewise. (EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT): Likewise. * genpreds.c (print_type_tree): New function. (write_tm_preds_h): Remove REG_CLASS_FROM_CONSTRAINT, REG_CLASS_FOR_CONSTRAINT, EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT and EXTRA_CONSTRAINT_STR. Write out enum constraint_type and get_constraint_type. * lra-constraints.c (satisfies_memory_constraint_p): Take a constraint_num rather than a constraint string. (satisfies_address_constraint_p): Likewise. (reg_class_from_constraints): Avoid old constraint macros. (process_alt_operands, process_address_1): Likewise. (curr_insn_transform): Likewise. * ira-costs.c (record_reg_classes): Likewise. (record_operand_costs): Likewise. * ira-lives.c (single_reg_class): Likewise. (ira_implicitly_set_insn_hard_regs): Likewise. * ira.c (ira_setup_alts, ira_get_dup_out_num): Likewise. * postreload.c (reload_cse_simplify_operands): Likewise. * recog.c (asm_operand_ok, preprocess_constraints): Likewise. (constrain_operands, peep2_find_free_register): Likewise. * reload.c (push_secondary_reload, scratch_reload_class): Likewise. (find_reloads, alternative_allows_const_pool_ref): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. * stmt.c (parse_output_constraint, parse_input_constraint): Likewise. * targhooks.c (default_secondary_reload): Likewise. * config/m32c/m32c.c (m32c_matches_constraint_p): Avoid reference to EXTRA_CONSTRAINT_STR. * config/sparc/constraints.md (U): Likewise REG_CLASS_FROM_CONSTRAINT. From-SVN: r211471
2014-06-11 18:58:35 +02:00
enum constraint_num cn = lookup_constraint (constraint);
if (insn_extra_memory_constraint (cn)
&& (mem == NULL || constraint_satisfied_p (mem, cn)))
return true;
}
return false;
1992-02-28 11:23:25 +01:00
}
/* Scan X for memory references and scan the addresses for reloading.
Also checks for references to "constant" regs that we want to eliminate
and replaces them with the values they stand for.
We may alter X destructively if it contains a reference to such.
1992-02-28 11:23:25 +01:00
If X is just a constant reg, we return the equivalent value
instead of X.
IND_LEVELS says how many levels of indirect addressing this machine
supports.
OPNUM and TYPE identify the purpose of the reload.
1992-02-28 11:23:25 +01:00
IS_SET_DEST is true if X is the destination of a SET, which is not
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
appropriate to be replaced by a constant.
INSN, if nonzero, is the insn in which we do the reload. It is used
to determine if we may generate output reloads, and where to put USEs
for pseudos that we have to replace with stack slots.
ADDRESS_RELOADED. If nonzero, is a pointer to where we put the
result of find_reloads_address. */
1992-02-28 11:23:25 +01:00
static rtx
find_reloads_toplev (rtx x, int opnum, enum reload_type type,
reload: Use rtx_insn (also touches caller-save.c and config/arc/arc) gcc/ * reload.h (struct insn_chain): Strengthen field "insn" from rtx to rtx_insn *. (find_reloads): Likewise for param 1. (subst_reloads): Likewise for sole param. (find_equiv_reg): Likwise for param 2. (regno_clobbered_p): Likwise for param 2. (reload): Likewise for param 1. * caller-save.c (save_call_clobbered_regs): Strengthen local "insn" from rtx to rtx_insn *. (insert_one_insn): Likewise for local "insn". * reload.c (this_insn): Likewise for this global. (find_reloads): Likewise for param "insn". (find_reloads_toplev): Likewise. (find_reloads_address): Likewise. (subst_reg_equivs): Likewise. (update_auto_inc_notes): Likewise. (find_reloads_address_1): Likewise. (find_reloads_subreg_address): Likewise. (subst_reloads): Likewise. (find_equiv_reg): Likewise, also for local "p". (regno_clobbered_p): Likewise for param "insn". * reload1.c (reg_reloaded_insn): Likewise for the elements of this array. (spill_reg_store): Likewise for the elements of this array. (remove_init_insns): Likewise for local "equiv_insn". (will_delete_init_insn_p): Likewise for param "insn". (reload): Likewise for param ""first" and local "insn". (calculate_needs_all_insns): Strengthen local "insn" from rtx to rtx_insn *. (calculate_elim_costs_all_insns): Likewise. (delete_caller_save_insns): Likewise. (spill_failure): Likewise for param "insn". (delete_dead_insn): Likewise. (set_label_offsets): Likewise. (eliminate_regs_in_insn): Likewise, also for locals "base_insn" and "prev_insn". (elimination_costs_in_insn): Likewise for param "insn". (set_initial_eh_label_offset): Replace use of NULL_RTX with NULL when referring to an insn. (set_initial_label_offsets): Likewise. (set_offsets_for_label): Strengthen param "insn" from rtx to rtx_insn *. (init_eliminable_invariants): Likewise for param "first" and local "insn". (fixup_eh_region_note): Likewise for param "insn". (reload_as_needed): Likewise for locals "prev", "insn", "old_next", "old_prev", "next". (gen_reload_chain_without_interm_reg_p): Likewise for locals "insn", "last". (reload_inheritance_insn): Strengthen elements of this array from rtx to rtx_insn *. (failed_reload): Likewise for param "insn". (choose_reload_regs): Likewise for local "insn". Replace use of NULL_RTX with NULL when referring to an insn. (input_reload_insns): Strengthen elements of this array from rtx to rtx_insn *. (other_input_address_reload_insns): Likewise for this global. (other_input_reload_insns): Likewise for this global. (input_address_reload_insns): Likwise for the elements of this array. (inpaddr_address_reload_insns): Likwise for the elements of this array. (output_reload_insns): Likewise for the elements of this array. (output_address_reload_insns): Likewise for the elements of this array. (outaddr_address_reload_insns): Likewise for the elements of this array. (operand_reload_insns): Likewise for this global. (other_operand_reload_insns): Likewise for this global. (other_output_reload_insns): Likewise for the elements of this array. (new_spill_reg_store): Likewise for the elements of this array. (emit_input_reload_insns): Likewise for locals "insn", "temp". Strengthen local "where" from rtx * to rtx_insn **. (emit_output_reload_insns): Strengthen locals "insn", "p", "next" from rtx to rtx_insn *. (do_input_reload): Likewise for local "insn". (do_output_reload): Likewise for local "insn". (emit_reload_insns): Likewise for locals "insn" and "store_insn". (emit_insn_if_valid_for_reload): Likewise for return type and local "last". Add checked cast to rtx_insn when returning "insn" since this has been through emit_insn. (gen_reload): Strengthen return type and locals "last", "insn", "set" from rtx to rtx_insn *. Add checked cast to rtx_insn when returning "insn" since it's been through emit_insn_if_valid_for_reload at this point. (delete_output_reload): Strengthen param "insn" and locals "output_reload_insn", "i2" from rtx to rtx_insn *. (delete_address_reloads): Likewise for params "dead_insn", "current_insn" and locals "prev", "next". (delete_address_reloads_1): Likewise for params "dead_insn", "current_insn" and locals "prev", "i2". (inc_for_reload): Likewise for locals "last", "add_insn". (add_auto_inc_notes): Strengthen param "insn" from rtx to rtx_insn *. * config/arc/arc-protos.h (regno_clobbered_p): Likewise for 2nd param of this duplicate of the prototype from reload.h From-SVN: r214370
2014-08-22 22:49:31 +02:00
int ind_levels, int is_set_dest, rtx_insn *insn,
int *address_reloaded)
1992-02-28 11:23:25 +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_CODE code = GET_CODE (x);
1992-02-28 11:23:25 +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 = GET_RTX_FORMAT (code);
int i;
int copied;
1992-02-28 11:23:25 +01:00
if (code == REG)
{
/* This code is duplicated for speed in find_reloads. */
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 regno = REGNO (x);
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
if (reg_equiv_constant (regno) != 0 && !is_set_dest)
x = reg_equiv_constant (regno);
1992-02-28 11:23:25 +01:00
#if 0
/* This creates (subreg (mem...)) which would cause an unnecessary
reload of the mem. */
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
else if (reg_equiv_mem (regno) != 0)
x = reg_equiv_mem (regno);
1992-02-28 11:23:25 +01:00
#endif
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
else if (reg_equiv_memory_loc (regno)
&& (reg_equiv_address (regno) != 0 || num_not_at_initial_offset))
1992-02-28 11:23:25 +01:00
{
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
rtx mem = make_memloc (x, regno);
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
if (reg_equiv_address (regno)
|| ! rtx_equal_p (mem, reg_equiv_mem (regno)))
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
{
/* If this is not a toplevel operand, find_reloads doesn't see
this substitution. We have to emit a USE of the pseudo so
that delete_output_reload can see it. */
if (replace_reloads && recog_data.operand[opnum] != x)
/* We mark the USE with QImode so that we recognize it
as one that can be safely deleted at the end of
reload. */
PUT_MODE (emit_insn_before (gen_rtx_USE (VOIDmode, x), insn),
QImode);
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
x = mem;
i = find_reloads_address (GET_MODE (x), &x, XEXP (x, 0), &XEXP (x, 0),
opnum, type, ind_levels, insn);
if (!rtx_equal_p (x, mem))
push_reg_equiv_alt_mem (regno, x);
if (address_reloaded)
*address_reloaded = i;
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
}
1992-02-28 11:23:25 +01:00
}
return x;
}
if (code == MEM)
{
rtx tem = x;
i = find_reloads_address (GET_MODE (x), &tem, XEXP (x, 0), &XEXP (x, 0),
opnum, type, ind_levels, insn);
if (address_reloaded)
*address_reloaded = i;
1992-02-28 11:23:25 +01:00
return 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 (code == SUBREG && REG_P (SUBREG_REG (x)))
1992-02-28 11:23:25 +01:00
{
lambda.h (lambda_vector_min_nz): Likewise. * lambda.h (lambda_vector_min_nz): Likewise. * langhooks.h (struct lang_hooks_for_types, struct lang_hooks): Likewise. * output.h (assemble_integer, this_is_asm_operands): Likewise. * tree.h: Likewise. * vec.h: Likewise. * tree-flow-inline.h (relink_imm_use): Use gcc_assert. * optabs.c (prepare_cmp_insn, emit_cmp_and_jump_insns): Reword comments to avoid 'abort'. Use gcc_assert as necessary. * opts.c (common_handle_option): Likewise. * pretty-print.c (pp_base_format_text): Likewise. * print-rtl.c (print_rtx): Likewise. * read-rtl.c (read_rtx_filename, read_rtx_1): Likewise. * regmove.c (try_auto_increment): Likewise. * reload.c (find_valid_class, find_reloads_toplev, find_equiv_reg): Likewise. * reload1.c (reload, forget_old_reloads_1, function_invariant_p, merge_assigned_reloads): Likewise. * tree-inline.c (inline_forbidden_p_1, estimate_num_insns_1): Likewise. * tree-optimize.c (execute_todo): Likewise. * tree-outof-ssa.c (eliminate_phi): Likewise. * tree-ssa-alias.c (add_pointed_to_expr): Likewise. * tree-ssa-ccp.c (maybe_fold_stmt_indirect): Likewise. * tree-ssa-operands.c (parse_ssa_operands, get_indirect_ref_operands, create_ssa_artficial_load_stmt): Likewise. * tree-ssa-pre.c (find_or_generate_expression): Likewise. * tree-ssanames.c (release_ssa_name): Likewise. * tree.c (int_bit_position, int_byte_position, tree_low_cst, walk_tree): Likewise. * tree-ssa-operands.c (verify_abort): Fold into .. (verify_imm_links): ... here. From-SVN: r98519
2005-04-21 20:05:34 +02:00
/* Check for SUBREG containing a REG that's equivalent to a
constant. If the constant has a known value, truncate it
right now. Similarly if we are extracting a single-word of a
multi-word constant. If the constant is symbolic, allow it
to be substituted normally. push_reload will strip the
subreg later. The constant must not be VOIDmode, because we
will lose the mode of the register (this should never happen
because one of the cases above should handle it). */
1992-02-28 11:23:25 +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 regno = REGNO (SUBREG_REG (x));
1992-02-28 11:23:25 +01:00
rtx tem;
if (regno >= FIRST_PSEUDO_REGISTER
&& reg_renumber[regno] < 0
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
&& reg_equiv_constant (regno) != 0)
{
tem =
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
simplify_gen_subreg (GET_MODE (x), reg_equiv_constant (regno),
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 (tem);
target.def (legitimate_constant_p): New hook. gcc/ * target.def (legitimate_constant_p): New hook. * doc/tm.texi.in (LEGITIMATE_CONSTANT_P): Replace with... (TARGET_LEGITIMATE_CONSTANT_P): ...this. * doc/tm.texi: Regenerate. * hooks.h (hook_bool_mode_rtx_true): Declare. * hooks.c (hook_bool_mode_rtx_true): Define. * system.h (LEGITIMATE_CONSTANT_P): Poison. * calls.c (precompute_register_parameters): Replace uses of LEGITIMATE_CONSTANT_P with targetm.legitimate_constant_p. (emit_library_call_value_1): Likewise. * expr.c (move_block_to_reg, can_store_by_pieces, emit_move_insn) (compress_float_constant, emit_push_insn, expand_expr_real_1): Likewise. * ira-costs.c (scan_one_insn): Likewise. * recog.c (general_operand, immediate_operand): Likewise. * reload.c (find_reloads_toplev, find_reloads_address_part): Likewise. * reload1.c (init_eliminable_invariants): Likewise. * config/alpha/alpha-protos.h (alpha_legitimate_constant_p): Add a mode argument. * config/alpha/alpha.h (LEGITIMATE_CONSTANT_P): Delete. * config/alpha/alpha.c (alpha_legitimate_constant_p): Add a mode argument. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/alpha/predicates.md (input_operand): Update call to alpha_legitimate_constant_p. * config/arm/arm-protos.h (arm_cannot_force_const_mem): Delete. * config/arm/arm.h (ARM_LEGITIMATE_CONSTANT_P): Likewise. (THUMB_LEGITIMATE_CONSTANT_P, LEGITIMATE_CONSTANT_P): Likewise. * config/arm/arm.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (arm_legitimate_constant_p_1, thumb_legitimate_constant_p) (arm_legitimate_constant_p): New functions. (arm_cannot_force_const_mem): Make static. * config/avr/avr.h (LEGITIMATE_CONSTANT_P): Delete. * config/bfin/bfin-protos.h (bfin_legitimate_constant_p): Delete. * config/bfin/bfin.h (LEGITIMATE_CONSTANT_P): Delete. * config/bfin/bfin.c (expand_move): Use targetm.legitimate_constant_p instead of bfin_legitimate_constant_p. (bfin_legitimate_constant_p): Make static. Add a mode argument. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/cris/cris.h (LEGITIMATE_CONSTANT_P): Delete. * config/fr30/fr30.h (LEGITIMATE_CONSTANT_P): Delete. * config/frv/frv-protos.h (frv_legitimate_constant_p): Delete. * config/frv/frv.h (LEGITIMATE_CONSTANT_P): Delete. * config/frv/frv.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (frv_legitimate_constant_p): Make static. Add a mode argument. * config/h8300/h8300-protos.h (h8300_legitimate_constant_p): Delete. * config/h8300/h8300.h (LEGITIMATE_CONSTANT_P): Likewise. * config/h8300/h8300.c (h8300_legitimate_constant_p): Likewise. * config/i386/i386-protos.h (legitimate_constant_p): Delete. * config/i386/i386.h (LEGITIMATE_CONSTANT_P): Likewise. * config/i386/i386.c (legitimate_constant_p): Rename to... (ix86_legitimate_constant_p): ...this. Make static. Add a mode argument. (ix86_cannot_force_const_mem): Update accordingly. (ix86_legitimate_address_p): Likewise. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/i386/i386.md: Update commentary. * config/ia64/ia64-protos.h (ia64_legitimate_constant_p): Delete. * config/ia64/ia64.h (LEGITIMATE_CONSTANT_P): Likewise. * config/ia64/ia64.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (ia64_legitimate_constant_p): Make static. Add a mode argument. * config/iq2000/iq2000.h (LEGITIMATE_CONSTANT_P): Delete. * config/lm32/lm32-protos.h (lm32_legitimate_constant_p): Delete. * config/lm32/lm32.h (LEGITIMATE_CONSTANT_P): Likewise. * config/lm32/lm32.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (lm32_legitimate_constant_p): Make static. Add a mode argument. * config/m32c/m32c-protos.h (m32c_legitimate_constant_p): Delete. * config/m32c/m32c.h (LEGITIMATE_CONSTANT_P): Likewise. * config/m32c/m32c.c (m32c_legitimate_constant_p): Likewise. * config/m32r/m32r.h (LEGITIMATE_CONSTANT_P): Delete. * config/m32r/m32r.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (m32r_legitimate_constant_p): New function. * config/m68k/m68k-protos.h (m68k_legitimate_constant_p): Declare. * config/m68k/m68k.h (CONSTANT_ADDRESS_P): Call it instead of LEGITIMATE_CONSTANT_P. (LEGITIMATE_CONSTANT_P): Delete. * config/m68k/m68k.c (m68k_expand_prologue): Call m68k_legitimate_constant_p instead of LEGITIMATE_CONSTANT_P. (m68k_legitimate_constant_p): New function. * config/m68k/m68k.md: Update comments. * config/mcore/mcore.h (LEGITIMATE_CONSTANT_P): Delete. * config/mcore/mcore.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (mcore_legitimate_constant_p): New function. * config/mep/mep-protos.h (mep_legitimate_constant_p): Delete. * config/mep/mep.h (LEGITIMATE_CONSTANT_P): Likewise. * config/mep/mep.c (mep_legitimate_constant_p): Make static. Add a mode argument. (mep_legitimate_address): Update accordingly. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/microblaze/microblaze-protos.h (microblaze_const_double_ok): Delete. * config/microblaze/microblaze.h (LEGITIMATE_CONSTANT_P): Likewise. * config/microblaze/microblaze.c (microblaze_const_double_ok): Make static. Check OP's mode for VOIDmode. (microblaze_legitimate_constant_p): New function. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/mips/mips.h (LEGITIMATE_CONSTANT_P): Delete. * config/mips/mips.c (mips_legitimate_constant_p): New function. (mips_cannot_force_const_mem): Use it instead of LEGITIMATE_CONSTANT_P. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/mips/predicates.md: Update comments. * config/mmix/mmix-protos.h (mmix_legitimate_constant_p): Delete. * config/mmix/mmix.h (LEGITIMATE_CONSTANT_P): Likewise. * config/mmix/mmix.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (mmix_legitimate_constant_p): Make static, return a bool, and take a mode argument. (mmix_print_operand_address): Update accordingly. * config/mn10300/mn10300-protos.h (mn10300_legitimate_constant_p): Delete. * config/mn10300/mn10300.h (LEGITIMATE_CONSTANT_P): Likewise. * config/mn10300/mn10300.c (mn10300_legitimate_constant_p): Make static. Add a mode argument. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/moxie/moxie.h (LEGITIMATE_CONSTANT_P): Delete. * config/pa/pa.h (LEGITIMATE_CONSTANT_P): Delete. * config/pa/pa.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (pa_legitimate_constant_p): New function. * config/picochip/picochip.h (LEGITIMATE_CONSTANT_P): Delete. * config/pdp11/pdp11.h (LEGITIMATE_CONSTANT_P): Delete. * config/pdp11/pdp11.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (pdp11_legitimate_constant_p): New function. * config/rs6000/rs6000.h (LEGITIMATE_CONSTANT_P): Delete. * config/rs6000/rs6000.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (rs6000_legitimate_constant_p): New function. * config/rx/rx-protos.h (rx_is_legitimate_constant): Replace with... (rx_legitimate_constant_p): ...this. * config/rx/rx.h (LEGITIMATE_CONSTANT_P): Delete. * config/rx/rx.c (rx_is_legitimate_constant): Replace with... (rx_legitimate_constant_p): ...this. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/rx/rx.md (mov<register_modes:mode>): Update accordingly. * config/s390/s390-protos.h (legitimate_constant_p): Delete. * config/s390/s390.h (LEGITIMATE_CONSTANT_P): Likewise. * config/s390/s390.c (legitimate_constant_p): Rename to... (s390_legitimate_constant_p): ...this. Make static, return a bool, and add a mode argument. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/score/score.h (LEGITIMATE_CONSTANT_P): Delete. * config/sh/sh.h (LEGITIMATE_CONSTANT_P): Delete. * config/sh/sh.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (sh_legitimate_constant_p): New function. * config/sparc/sparc-protos.h (legitimate_constant_p): Delete. * config/sparc/sparc.h (LEGITIMATE_CONSTANT_P): Delete. * config/sparc/sparc.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (legitimate_constant_p): Rename to... (sparc_legitimate_constant_p): ...this. Make static. Add a mode argument. (constant_address_p): Update accordingly. * config/spu/spu-protos.h (spu_legitimate_constant_p): Add a mode argument and return a bool. * config/spu/spu.h (LEGITIMATE_CONSTANT_P): Delete. * config/spu/spu.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (spu_legitimate_constant_p): Add a mode argument and return a bool. (spu_rtx_costs): Update accordingly. * config/spu/predicates.md (vec_imm_operand): Likewise. * config/stormy16/stormy16.h (LEGITIMATE_CONSTANT_P): Delete. * config/v850/v850.h (LEGITIMATE_CONSTANT_P): Delete. * config/v850/v850.c (v850_legitimate_constant_p): New function. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/vax/vax-protos.h (legitimate_constant_p): Delete. * config/vax/vax.h (LEGITIMATE_CONSTANT_P): Likewise. * config/vax/vax.c (legitimate_constant_p): Likewise. * config/xtensa/xtensa.h (LEGITIMATE_CONSTANT_P): Delete. * config/xtensa/xtensa.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (xtensa_legitimate_constant_p): New function. From-SVN: r172814
2011-04-21 11:38:43 +02:00
if (CONSTANT_P (tem)
&& !targetm.legitimate_constant_p (GET_MODE (x), tem))
{
tem = force_const_mem (GET_MODE (x), tem);
i = find_reloads_address (GET_MODE (tem), &tem, XEXP (tem, 0),
&XEXP (tem, 0), opnum, type,
ind_levels, insn);
if (address_reloaded)
*address_reloaded = i;
}
return tem;
}
1992-02-28 11:23:25 +01:00
/* If the subreg contains a reg that will be converted to a mem,
attempt to convert the whole subreg to a (narrower or wider)
memory reference instead. If this succeeds, we're done --
otherwise fall through to check whether the inner reg still
needs address reloads anyway. */
1992-02-28 11:23:25 +01:00
if (regno >= FIRST_PSEUDO_REGISTER
&& reg_equiv_memory_loc (regno) != 0)
{
tem = find_reloads_subreg_address (x, opnum, type, ind_levels,
insn, address_reloaded);
if (tem)
return tem;
}
1992-02-28 11:23:25 +01:00
}
for (copied = 0, i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
1992-02-28 11:23:25 +01:00
{
if (fmt[i] == 'e')
{
rtx new_part = find_reloads_toplev (XEXP (x, i), opnum, type,
ind_levels, is_set_dest, insn,
address_reloaded);
/* If we have replaced a reg with it's equivalent memory loc -
that can still be handled here e.g. if it's in a paradoxical
subreg - we must make the change in a copy, rather than using
a destructive change. This way, find_reloads can still elect
not to do the change. */
if (new_part != XEXP (x, i) && ! CONSTANT_P (new_part) && ! copied)
{
x = shallow_copy_rtx (x);
copied = 1;
}
XEXP (x, i) = new_part;
}
1992-02-28 11:23:25 +01:00
}
return x;
}
/* Return a mem ref for the memory equivalent of reg REGNO.
This mem ref is not shared with anything. */
1992-02-28 11:23:25 +01:00
static rtx
make_memloc (rtx ad, int regno)
1992-02-28 11:23:25 +01:00
{
/* We must rerun eliminate_regs, in case the elimination
offsets have changed. */
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
rtx tem
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
= XEXP (eliminate_regs (reg_equiv_memory_loc (regno), VOIDmode, NULL_RTX),
Fix enum conversions which are invalid in C++: gcc/: Fix enum conversions which are invalid in C++: * auto-inc-dec.c (attempt_change): Change 0 to SET in function call. * calls.c (store_one_arg): Change 0 to EXPAND_NORMAL in function call. * cse.c (hash_rtx_cb): Change 0 to VOIDmode in function call. * dbgcnt.c (dbg_cnt_set_limit_by_name): Add cast to enum type. * dbxout.c (dbxout_symbol): Change 0 to VOIDmode in function call. (dbxout_parms): Likewise. * df-core.c (df_set_flags): Change changeable_flags parameter to int. (df_clear_flags): Likewise. * df-problems.c (df_rd_bb_local_compute_process_def): Change top_flag parameter to int. (df_chain_create_bb_process_use): Likewise. (df_chain_add_problem): Change chain_flags parameter to unsigned int. Remove cast. * df-scan.c (df_ref_create): Change ref_flags parameter to int. (df_ref_create_structure, df_def_record_1): Likewise. (df_defs_record, df_uses_record, df_get_call_refs): Likewise. (df_notes_rescan): Change 0 to VOIDmode in function call. (df_get_call_refs, df_insn_refs_collect): Likewise. (df_bb_regs_collect): Likewise. (df_entry_block_defs_collect): Likewise. (df_exit_block_uses_collect): Likewise. * df.h: Update declarations. * double-int.c (double_int_divmod): Add cast to enum type. * dse.c (replace_inc_dec): Reverse parameters to gen_int_mode. * dwarf2out.c (new_reg_loc_descr): Add casts to enum type. (based_loc_descr): Likewise. (loc_descriptor_from_tree_1): Change first_op and second_op to enum dwarf_location_atom. Add cast to enum type. * expmed.c (init_expmed): Change 0 to SET in function call. * expr.c (init_expr_target): Change 0 to VOIDmode in function call. (expand_expr_real_1): Change 0 to EXPAND_NORMAL in function call. (do_store_flag): Likewise. * fixed-value.h (struct fixed_value): Change mode to enum machine_mode. * function.c (assign_parms): Change 0 to VOIDmode in function call. * genautomata.c (insert_automaton_decl): Change 1 to INSERT in function call. (insert_insn_decl, insert_decl, insert_state): Likewise. (automata_list_finish): Likewise. * genrecog.c (process_define_predicate): Add cast to enum type. * gensupport.c (init_predicate_table): Add cast to enum type. * gimple.c (gimple_build_return): Change 0 to ERROR_MARK in function call. (gimple_build_call_1, gimple_build_label): Likewise. (gimple_build_goto, gimple_build_asm_1): Likewise. (gimple_build_switch_1, gimple_build_cdt): Likewise. * gimple.h (GIMPLE_CHECK): Change 0 to ERROR_MARK in function call. (enum fallback): Rename from enum fallback_t. (fallback_t): Typedef as int. * gimple-low.c (lower_builtin_setjmp): Change TSI_SAME_STMT to GSI_SAME_STMT in function call. * ira.c (setup_class_subset_and_memory_move_costs): Add casts to enum type. (setup_reg_class_relations): Likewise. (setup_reg_class_nregs): Change cl to int. Add casts to enum type. (setup_prohibited_class_mode_regs): Add cast to enum type. (setup_prohibited_mode_move_regs): Likewise. * ira-costs.c (record_reg_classes): Change rclass to enum reg_class. (record_address_regs): Change i to enum reg_class. * lists.c (alloc_EXPR_LIST): Add cast to enum type. * machmode.h (GET_MODE_CLASS): Cast value to enum mode_class. (GET_MODE_WIDER_MODE): Cast value to enum machine_mode. (GET_MODE_2XWIDER_MODE): Likewise. (GET_CLASS_NARROWEST_MODE): Likewise. * omp-low.c (expand_omp_for): Add cast to enum type. * optabs.c (debug_optab_libfuncs): Add casts to enum type. * opts.c (enable_warning_as_error): Change kind to diagostic_t. * postreload.c (reload_cse_simplify_operands): Change rclass local to enum reg_class. * predict.c (combine_predictions_for_insn): Change best_predictor and predictor to enum br_predictor. (combine_predictions_for_bb): Likewise. (build_predict_expr): Change assignment to PREDICT_EXPR_OUTCOME to use SET_PREDICT_EXPR_OUTCOME. * real.c (real_arithmetic): Change icode to code in function call. * reginfo.c (init_move_cost): Add casts to enum type. (init_reg_sets_1, init_fake_stack_mems): Likewise. * regmove.c (regclass_compatible_p): Change class0 and class1 to enum reg_class. * reload.c (find_valid_class): Add casts to enum type. (push_reload): Change 0 to NO_REGS in function call. (find_reloads): Change this_alternative to array of enum reg_class. Remove some now-unnecessary casts. (make_memloc): Change 0 to VOIDmode in function call. * reload1.c (reload): Change 0 to VOIDmode in function call. (eliminate_regs_1, elimination_effects): Likewise. (eliminate_regs_in_insn): Likewise. (emit_input_reload_insns): Add cast to enum type. (delete_output_reload): Change 0 to VOIDmode in function call. * reorg.c (insn_sets_resource_p): Convert include_delayed_effects to enum type in function call. * tree.h (PREDICT_EXPR_OUTCOME): Add cast to enum type. (SET_PREDICT_EXPR_OUTCOME): Define. * tree-dump.c (get_dump_file_info): Change phase parameter to int. (get_dump_file_name, dump_begin, dump_enabled_p): Likewise. (dump_initialized_p, dump_flag_name, dump_end): Likewise. (dump_function): Likewise. * tree-dump.h: Update declarations. * tree-pass.h: Update declarations. * varasm.c (assemble_integer): Change mclass to enum mode_class. * config/arm/arm.c (thumb_legitimize_reload_address): Add cast to enum type. (arm_rtx_costs_1): Correct parenthesization. (arm_rtx_costs): Add casts to enum type. (adjacent_mem_locations): Reverse arguments to const_ok_for_op. (vfp_emit_fstmd): Use add_rg_note. (emit_multi_reg_push, emit_sfm): Likewise. (thumb_set_frame_pointer): Likewise. (arm_expand_prologue): Likewise. (arm_regno_class): Change return type to enum reg_class. (thumb1_expand_prologue): Use add_reg_note. * config/arm/arm-protos.h (arm_regno_class): Update declaration. * config/arm/arm.h (INITIALIZE_TRAMPOLINE): Change 0 to LCT_NORMAL in function call. * config/arm/gentune.sh: Add cast to enum type. * config/arm/arm-tune.md: Rebuild. * config/i386/i386.c (ix86_expand_prologue): Use add_reg_note. (ix86_split_fp_branch, predict_jump): Likewise. (ix86_expand_multi_arg_builtin): Change sub_code from enum insn_code to enum rtx_code. (ix86_builtin_vectorized_function): Add cast to enum type. * config/i386/i386.md (truncdfsf2): Change slot to enum ix86_stack_slot. (truncxf<mode>2, isinf<mode>2): Likewise. * config/i386/i386-c.c (ix86_pragma_target_parse): Add cast to enum type. * config/ia64/ia64.c (ia64_split_tmode_move): Use add_reg_note. (spill_restore_mem, do_spill, ia64_expand_prologue): Likewise. (insert_bundle_state): Change 1 to INSERT in function call. (ia64_add_bundle_selector_before): Likewise. * config/ia64/ia64.md (cpu attr): Add cast to enum type. (save_stack_nonlocal): Change 0 to LCT_NORMAL in function call. (restore_stack_nonlocal): Likewise. * config/mips/mips.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL in function call. * config/mips/mips.c (mips_binary_cost): Change 0 to SET in function call. (mips_rtx_costs): Likewise. (mips_override_options): Add casts to enum type. * config/mips/sdemtk.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL in function call. * config/pa/pa.c (legitimize_pic_address): Use add_reg_note. (store_reg, set_reg_plus_d): Likewise. (hppa_expand_prologue, hppa_profile_hook): Likewise. * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Add cast to enum type. (altivec_expand_vec_set_builtin): Change 0 to EXPAND_NORMAL in function call. (emit_unlikely_jump): Use add_reg_note. (rs6000_emit_allocate_stack): Likewise. (rs6000_frame_related, rs6000_emit_prologue): Likewise. (output_toc): Change 1 to INSERT in function call. (output_profile_hook): Change 0 to LCT_NORMAL in function call. (rs6000_initialize_trampoline): Likewise. (rs6000_init_dwarf_reg_sizes_extra): Change 0 to EXPAND_NORMAL in function call. * config/s390/s390.c (s390_rtx_costs): Add cast to enum type. (s390_expand_movmem): Change 0 to OPTAB_DIRECT in function call. (s390_expand_setmem, s390_expand_cmpmem): Likewise. (save_gprs): Use add_reg_note. (s390_emit_prologue): Likewise. (s390_expand_builtin): Change 0 to EXPAND_NORMAL in function call. * config/sparc/sparc.c (sparc_expand_prologue): Use add_reg_note. (sparc_fold_builtin): Add cast to enum type. * config/spu/spu.c (spu_emit_branch_or_set): Change ior_code to enum insn_code. (spu_expand_prologue): Use add_reg_note. (expand_builtin_args): Change 0 to EXPAND_NORMAL in function call. * c-parser.c (c_parser_attributes): Change VEC back to tree list. (c_parser_postfix_expression_after_primary): Get VEC for list of arguments. Get original types of arguments. Call build_function_call_vec. (cached_expr_list_1, cached_expr_list_2): New static variables. (c_parser_expr_list): Change return type to VEC *. Add p_orig_types parameter. Change all callers. (c_parser_release_expr): New static function. (c_parser_vec_to_tree_list): New static function. * c-typeck.c (build_function_call): Rewrite to build a VEC and call build_function_call_vec. (build_function_call_vec): New function, based on old build_function_call. (convert_arguments): Remove nargs and argarray parameters. Change values to a VEC. Add origtypes parameter. (build_modify_expr): Add rhs_origtype parameter. Change all callers. (convert_for_assignment): Add origtype parameter. Change all callers. If warn_cxx_compat, check for conversion to an enum type when calling a function. (store_init_value): Add origtype parameter. Change all callers. (digest_init): Likewise. (struct init_node): Add origtype field. (add_pending_init): Add origtype parameter. Change all callers. (output_init_element): Likewise. (output_pending_init_elements): Pass origtype from init_node to output_init_element. (process_init_elemnt): Pass origtype from c_expr to output_init_element. (c_finish_return): Add origtype parameter. Change all callers. * c-common.c (sync_resolve_size): Change params to VEC *. Change caller. (sync_resolve_params): Likewise. (sync_resolve_return): Change params to first_param. Change caller. (resolve_overloaded_builtins): Change params to VEC *. Change callers. Save first parameter around call to build_function_call_vec. * c-decl.c (finish_decl): Add origtype parameter. Change all callers. Call build_function_call_vec rather than build_function_call for cleanup. * c-tree.h: Update declarations. * c-common.h: Update declarations. * stub-objc.c (objc_rewrite_function_call): Change parameter from params to first_param. * target.h (struct gcc_target): Change resolve_overloaded_builtin params parameter from tree to void *. * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Change arglist parameter to have type void *, and to be a pointer to a VEC. * config/rs6000/rs6000-protos.h (altivec_resolve_overloaded_builtin): Update declaration. * config/spu/spu-c.c (spu_resolved_overloaded_builtin): Change fnargs parameter to have type void *, and to be a pointer to a VEC. Call build_function_call_vec instead of build_function_call. * config/spu/spu-protos.h (spu_expand_builtin): Update declaration. gcc/cp/: * typeck.c (build_function_call_vec): New function. (cp_build_function_call): Only pass first parameter to objc_rewrite_function_call. (build_modify_expr): Add rhs_origtype parameter. Change all callers. * decl.c (finish_decl): Add origtype parameter. Change all callers. * semantics.c (finish_call_expr): Pass VEC to resolve_overloaded_builtin. gcc/objc: * objc-act.c (objc_rewrite_function_call): Change parameter from params to first_param. Change all callers. gcc/testsuite: * gcc.dg/Wcxx-compat-3.c: New testcase. From-SVN: r146451
2009-04-20 21:35:00 +02:00
0);
1992-02-28 11:23:25 +01:00
/* If TEM might contain a pseudo, we must copy it to avoid
modifying it when we do the substitution for the reload. */
if (rtx_varies_p (tem, 0))
1992-02-28 11:23:25 +01:00
tem = copy_rtx (tem);
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
tem = replace_equiv_address_nv (reg_equiv_memory_loc (regno), tem);
tem = adjust_address_nv (tem, GET_MODE (ad), 0);
/* Copy the result if it's still the same as the equivalence, to avoid
modifying it when we do the substitution for the reload. */
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
if (tem == reg_equiv_memory_loc (regno))
tem = copy_rtx (tem);
return tem;
1992-02-28 11:23:25 +01:00
}
/* Returns true if AD could be turned into a valid memory reference
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
to mode MODE in address space AS by reloading the part pointed to
by PART into a register. */
static 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
maybe_memory_address_addr_space_p (enum machine_mode mode, rtx ad,
addr_space_t as, rtx *part)
{
int retv;
rtx tem = *part;
rtx reg = gen_rtx_REG (GET_MODE (tem), max_reg_num ());
*part = reg;
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
retv = memory_address_addr_space_p (mode, ad, as);
*part = tem;
return retv;
}
1992-02-28 11:23:25 +01:00
/* Record all reloads needed for handling memory address AD
which appears in *LOC in a memory reference to mode MODE
which itself is found in location *MEMREFLOC.
Note that we take shortcuts assuming that no multi-reg machine mode
occurs as part of an address.
OPNUM and TYPE specify the purpose of this reload.
1992-02-28 11:23:25 +01:00
IND_LEVELS says how many levels of indirect addressing this machine
supports.
INSN, if nonzero, is the insn in which we do the reload. It is used
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
to determine if we may generate output reloads, and where to put USEs
for pseudos that we have to replace with stack slots.
Value is one if this address is reloaded or replaced as a whole; it is
zero if the top level of this address was not reloaded or replaced, and
it is -1 if it may or may not have been reloaded or replaced.
1992-02-28 11:23:25 +01:00
Note that there is no verification that the address will be valid after
this routine does its work. Instead, we rely on the fact that the address
was valid when reload started. So we need only undo things that reload
could have broken. These are wrong register types, pseudos not allocated
to a hard register, and frame pointer elimination. */
static int
find_reloads_address (enum machine_mode mode, rtx *memrefloc, rtx ad,
rtx *loc, int opnum, enum reload_type type,
reload: Use rtx_insn (also touches caller-save.c and config/arc/arc) gcc/ * reload.h (struct insn_chain): Strengthen field "insn" from rtx to rtx_insn *. (find_reloads): Likewise for param 1. (subst_reloads): Likewise for sole param. (find_equiv_reg): Likwise for param 2. (regno_clobbered_p): Likwise for param 2. (reload): Likewise for param 1. * caller-save.c (save_call_clobbered_regs): Strengthen local "insn" from rtx to rtx_insn *. (insert_one_insn): Likewise for local "insn". * reload.c (this_insn): Likewise for this global. (find_reloads): Likewise for param "insn". (find_reloads_toplev): Likewise. (find_reloads_address): Likewise. (subst_reg_equivs): Likewise. (update_auto_inc_notes): Likewise. (find_reloads_address_1): Likewise. (find_reloads_subreg_address): Likewise. (subst_reloads): Likewise. (find_equiv_reg): Likewise, also for local "p". (regno_clobbered_p): Likewise for param "insn". * reload1.c (reg_reloaded_insn): Likewise for the elements of this array. (spill_reg_store): Likewise for the elements of this array. (remove_init_insns): Likewise for local "equiv_insn". (will_delete_init_insn_p): Likewise for param "insn". (reload): Likewise for param ""first" and local "insn". (calculate_needs_all_insns): Strengthen local "insn" from rtx to rtx_insn *. (calculate_elim_costs_all_insns): Likewise. (delete_caller_save_insns): Likewise. (spill_failure): Likewise for param "insn". (delete_dead_insn): Likewise. (set_label_offsets): Likewise. (eliminate_regs_in_insn): Likewise, also for locals "base_insn" and "prev_insn". (elimination_costs_in_insn): Likewise for param "insn". (set_initial_eh_label_offset): Replace use of NULL_RTX with NULL when referring to an insn. (set_initial_label_offsets): Likewise. (set_offsets_for_label): Strengthen param "insn" from rtx to rtx_insn *. (init_eliminable_invariants): Likewise for param "first" and local "insn". (fixup_eh_region_note): Likewise for param "insn". (reload_as_needed): Likewise for locals "prev", "insn", "old_next", "old_prev", "next". (gen_reload_chain_without_interm_reg_p): Likewise for locals "insn", "last". (reload_inheritance_insn): Strengthen elements of this array from rtx to rtx_insn *. (failed_reload): Likewise for param "insn". (choose_reload_regs): Likewise for local "insn". Replace use of NULL_RTX with NULL when referring to an insn. (input_reload_insns): Strengthen elements of this array from rtx to rtx_insn *. (other_input_address_reload_insns): Likewise for this global. (other_input_reload_insns): Likewise for this global. (input_address_reload_insns): Likwise for the elements of this array. (inpaddr_address_reload_insns): Likwise for the elements of this array. (output_reload_insns): Likewise for the elements of this array. (output_address_reload_insns): Likewise for the elements of this array. (outaddr_address_reload_insns): Likewise for the elements of this array. (operand_reload_insns): Likewise for this global. (other_operand_reload_insns): Likewise for this global. (other_output_reload_insns): Likewise for the elements of this array. (new_spill_reg_store): Likewise for the elements of this array. (emit_input_reload_insns): Likewise for locals "insn", "temp". Strengthen local "where" from rtx * to rtx_insn **. (emit_output_reload_insns): Strengthen locals "insn", "p", "next" from rtx to rtx_insn *. (do_input_reload): Likewise for local "insn". (do_output_reload): Likewise for local "insn". (emit_reload_insns): Likewise for locals "insn" and "store_insn". (emit_insn_if_valid_for_reload): Likewise for return type and local "last". Add checked cast to rtx_insn when returning "insn" since this has been through emit_insn. (gen_reload): Strengthen return type and locals "last", "insn", "set" from rtx to rtx_insn *. Add checked cast to rtx_insn when returning "insn" since it's been through emit_insn_if_valid_for_reload at this point. (delete_output_reload): Strengthen param "insn" and locals "output_reload_insn", "i2" from rtx to rtx_insn *. (delete_address_reloads): Likewise for params "dead_insn", "current_insn" and locals "prev", "next". (delete_address_reloads_1): Likewise for params "dead_insn", "current_insn" and locals "prev", "i2". (inc_for_reload): Likewise for locals "last", "add_insn". (add_auto_inc_notes): Strengthen param "insn" from rtx to rtx_insn *. * config/arc/arc-protos.h (regno_clobbered_p): Likewise for 2nd param of this duplicate of the prototype from reload.h From-SVN: r214370
2014-08-22 22:49:31 +02:00
int ind_levels, rtx_insn *insn)
1992-02-28 11:23:25 +01:00
{
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
addr_space_t as = memrefloc? MEM_ADDR_SPACE (*memrefloc)
: ADDR_SPACE_GENERIC;
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 regno;
int removed_and = 0;
int op_index;
1992-02-28 11:23:25 +01:00
rtx tem;
/* If the address is a register, see if it is a legitimate address and
reload if not. We first handle the cases where we need not reload
or where we must reload in a non-standard way. */
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 (ad))
1992-02-28 11:23:25 +01:00
{
regno = REGNO (ad);
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
if (reg_equiv_constant (regno) != 0)
1992-02-28 11:23:25 +01:00
{
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
find_reloads_address_part (reg_equiv_constant (regno), loc,
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
base_reg_class (mode, as, MEM, SCRATCH),
GET_MODE (ad), opnum, type, ind_levels);
return 1;
1992-02-28 11:23:25 +01:00
}
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
tem = reg_equiv_memory_loc (regno);
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
if (tem != 0)
1992-02-28 11:23:25 +01:00
{
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
if (reg_equiv_address (regno) != 0 || num_not_at_initial_offset)
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
{
tem = make_memloc (ad, regno);
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 (! strict_memory_address_addr_space_p (GET_MODE (tem),
XEXP (tem, 0),
MEM_ADDR_SPACE (tem)))
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
{
rtx orig = tem;
find_reloads_address (GET_MODE (tem), &tem, XEXP (tem, 0),
&XEXP (tem, 0), opnum,
ADDR_TYPE (type), ind_levels, insn);
if (!rtx_equal_p (tem, orig))
push_reg_equiv_alt_mem (regno, tem);
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
}
/* We can avoid a reload if the register's equivalent memory
expression is valid as an indirect memory address.
But not all addresses are valid in a mem used as an indirect
address: only reg or reg+constant. */
if (ind_levels > 0
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
&& strict_memory_address_addr_space_p (mode, tem, as)
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 (tem, 0))
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
|| (GET_CODE (XEXP (tem, 0)) == PLUS
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 (tem, 0), 0))
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
&& CONSTANT_P (XEXP (XEXP (tem, 0), 1)))))
{
/* TEM is not the same as what we'll be replacing the
pseudo with after reload, put a USE in front of INSN
in the final reload pass. */
if (replace_reloads
&& num_not_at_initial_offset
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
&& ! rtx_equal_p (tem, reg_equiv_mem (regno)))
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
{
*loc = tem;
/* We mark the USE with QImode so that we
recognize it as one that can be safely
deleted at the end of reload. */
PUT_MODE (emit_insn_before (gen_rtx_USE (VOIDmode, ad),
insn), QImode);
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
/* This doesn't really count as replacing the address
as a whole, since it is still a memory access. */
}
return 0;
}
ad = tem;
}
1992-02-28 11:23:25 +01:00
}
/* The only remaining case where we can avoid a reload is if this is a
hard register that is valid as a base register and which is not the
subject of a CLOBBER in this insn. */
else if (regno < FIRST_PSEUDO_REGISTER
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
&& regno_ok_for_base_p (regno, mode, as, MEM, SCRATCH)
&& ! regno_clobbered_p (regno, this_insn, mode, 0))
1992-02-28 11:23:25 +01:00
return 0;
/* If we do not have one of the cases above, we must do the reload. */
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
push_reload (ad, NULL_RTX, loc, (rtx*) 0,
base_reg_class (mode, as, MEM, SCRATCH),
GET_MODE (ad), VOIDmode, 0, 0, opnum, type);
1992-02-28 11:23:25 +01:00
return 1;
}
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 (strict_memory_address_addr_space_p (mode, ad, as))
1992-02-28 11:23:25 +01:00
{
/* The address appears valid, so reloads are not needed.
But the address may contain an eliminable register.
This can happen because a machine with indirect addressing
may consider a pseudo register by itself a valid address even when
it has failed to get a hard reg.
So do a tree-walk to find and eliminate all such regs. */
/* But first quickly dispose of a common case. */
if (GET_CODE (ad) == PLUS
&& CONST_INT_P (XEXP (ad, 1))
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 (ad, 0))
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
&& reg_equiv_constant (REGNO (XEXP (ad, 0))) == 0)
1992-02-28 11:23:25 +01:00
return 0;
subst_reg_equivs_changed = 0;
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
*loc = subst_reg_equivs (ad, insn);
1992-02-28 11:23:25 +01:00
if (! subst_reg_equivs_changed)
return 0;
/* Check result for validity after substitution. */
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 (strict_memory_address_addr_space_p (mode, ad, as))
1992-02-28 11:23:25 +01:00
return 0;
}
#ifdef LEGITIMIZE_RELOAD_ADDRESS
do
{
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 (memrefloc && ADDR_SPACE_GENERIC_P (as))
{
LEGITIMIZE_RELOAD_ADDRESS (ad, GET_MODE (*memrefloc), opnum, type,
ind_levels, win);
}
break;
win:
*memrefloc = copy_rtx (*memrefloc);
XEXP (*memrefloc, 0) = ad;
move_replacements (&ad, &XEXP (*memrefloc, 0));
return -1;
}
while (0);
#endif
/* The address is not valid. We have to figure out why. First see if
we have an outer AND and remove it if so. Then analyze what's inside. */
if (GET_CODE (ad) == AND)
{
removed_and = 1;
loc = &XEXP (ad, 0);
ad = *loc;
}
/* One possibility for why the address is invalid is that it is itself
a MEM. This can happen when the frame pointer is being eliminated, a
pseudo is not allocated to a hard register, and the offset between the
frame and stack pointers is not its initial value. In that case the
pseudo will have been replaced by a MEM referring to the
stack pointer. */
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 (ad))
1992-02-28 11:23:25 +01:00
{
/* First ensure that the address in this MEM is valid. Then, unless
indirect addresses are valid, reload the MEM into a register. */
tem = ad;
find_reloads_address (GET_MODE (ad), &tem, XEXP (ad, 0), &XEXP (ad, 0),
opnum, ADDR_TYPE (type),
ind_levels == 0 ? 0 : ind_levels - 1, insn);
/* If tem was changed, then we must create a new memory reference to
hold it and store it back into memrefloc. */
if (tem != ad && memrefloc)
{
*memrefloc = copy_rtx (*memrefloc);
copy_replacements (tem, XEXP (*memrefloc, 0));
loc = &XEXP (*memrefloc, 0);
if (removed_and)
loc = &XEXP (*loc, 0);
}
1992-02-28 11:23:25 +01:00
/* Check similar cases as for indirect addresses as above except
that we can allow pseudos and a MEM since they should have been
taken care of above. */
if (ind_levels == 0
|| (GET_CODE (XEXP (tem, 0)) == SYMBOL_REF && ! indirect_symref_ok)
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 (XEXP (tem, 0))
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 (tem, 0))
1992-02-28 11:23:25 +01:00
|| (GET_CODE (XEXP (tem, 0)) == PLUS
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 (tem, 0), 0))
&& CONST_INT_P (XEXP (XEXP (tem, 0), 1)))))
1992-02-28 11:23:25 +01:00
{
/* Must use TEM here, not AD, since it is the one that will
have any subexpressions reloaded, if needed. */
push_reload (tem, NULL_RTX, loc, (rtx*) 0,
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
base_reg_class (mode, as, MEM, SCRATCH), GET_MODE (tem),
VOIDmode, 0,
0, opnum, type);
return ! removed_and;
1992-02-28 11:23:25 +01:00
}
else
return 0;
}
/* If we have address of a stack slot but it's not valid because the
displacement is too large, compute the sum in a register.
Handle all base registers here, not just fp/ap/sp, because on some
targets (namely SH) we can also get too large displacements from
big-endian corrections. */
1992-02-28 11:23:25 +01:00
else if (GET_CODE (ad) == PLUS
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 (ad, 0))
&& REGNO (XEXP (ad, 0)) < FIRST_PSEUDO_REGISTER
&& CONST_INT_P (XEXP (ad, 1))
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
&& (regno_ok_for_base_p (REGNO (XEXP (ad, 0)), mode, as, PLUS,
CONST_INT)
/* Similarly, if we were to reload the base register and the
mem+offset address is still invalid, then we want to reload
the whole address, not just the base register. */
|| ! maybe_memory_address_addr_space_p
(mode, ad, as, &(XEXP (ad, 0)))))
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
1992-02-28 11:23:25 +01:00
{
/* Unshare the MEM rtx so we can safely alter it. */
if (memrefloc)
{
*memrefloc = copy_rtx (*memrefloc);
loc = &XEXP (*memrefloc, 0);
if (removed_and)
loc = &XEXP (*loc, 0);
1992-02-28 11:23:25 +01:00
}
if (double_reg_address_ok
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
&& regno_ok_for_base_p (REGNO (XEXP (ad, 0)), mode, as,
PLUS, CONST_INT))
1992-02-28 11:23:25 +01:00
{
/* Unshare the sum as well. */
*loc = ad = copy_rtx (ad);
1992-02-28 11:23:25 +01:00
/* Reload the displacement into an index reg.
We assume the frame pointer or arg pointer is a base reg. */
find_reloads_address_part (XEXP (ad, 1), &XEXP (ad, 1),
INDEX_REG_CLASS, GET_MODE (ad), opnum,
type, ind_levels);
return 0;
1992-02-28 11:23:25 +01:00
}
else
{
/* If the sum of two regs is not necessarily valid,
reload the sum into a base reg.
That will at least work. */
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
find_reloads_address_part (ad, loc,
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
base_reg_class (mode, as, MEM, SCRATCH),
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
GET_MODE (ad), opnum, type, ind_levels);
1992-02-28 11:23:25 +01:00
}
return ! removed_and;
1992-02-28 11:23:25 +01:00
}
/* If we have an indexed stack slot, there are three possible reasons why
it might be invalid: The index might need to be reloaded, the address
might have been made by frame pointer elimination and hence have a
constant out of range, or both reasons might apply.
1992-02-28 11:23:25 +01:00
We can easily check for an index needing reload, but even if that is the
case, we might also have an invalid constant. To avoid making the
conservative assumption and requiring two reloads, we see if this address
is valid when not interpreted strictly. If it is, the only problem is
that the index needs a reload and find_reloads_address_1 will take care
of it.
Handle all base registers here, not just fp/ap/sp, because on some
targets (namely SPARC) we can also get invalid addresses from preventive
subreg big-endian corrections made by find_reloads_toplev. We
can also get expressions involving LO_SUM (rather than PLUS) from
find_reloads_subreg_address.
If we decide to do something, it must be that `double_reg_address_ok'
is true. We generate a reload of the base register + constant and
1992-02-28 11:23:25 +01:00
rework the sum so that the reload register will be added to the index.
This is safe because we know the address isn't shared.
We check for the base register as both the first and second operand of
the innermost PLUS and/or LO_SUM. */
for (op_index = 0; op_index < 2; ++op_index)
1992-02-28 11:23:25 +01:00
{
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
rtx operand, addend;
enum rtx_code inner_code;
if (GET_CODE (ad) != PLUS)
continue;
1992-02-28 11:23:25 +01:00
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
inner_code = GET_CODE (XEXP (ad, 0));
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 (!(GET_CODE (ad) == PLUS
&& CONST_INT_P (XEXP (ad, 1))
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
&& (inner_code == PLUS || inner_code == LO_SUM)))
continue;
operand = XEXP (XEXP (ad, 0), op_index);
if (!REG_P (operand) || REGNO (operand) >= FIRST_PSEUDO_REGISTER)
continue;
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
addend = XEXP (XEXP (ad, 0), 1 - op_index);
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
if ((regno_ok_for_base_p (REGNO (operand), mode, as, inner_code,
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
GET_CODE (addend))
|| operand == frame_pointer_rtx
optc-gen.awk: Generate global_options initializer instead of individual variables. gcc: * optc-gen.awk: Generate global_options initializer instead of individual variables. Add x_ prefix to names of structure members. * opth-gen.awk: Generate gcc_options structure. Add x_ prefix to names of structure members. * doc/tm.texi.in (HARD_FRAME_POINTER_IS_FRAME_POINTER, HARD_FRAME_POINTER_IS_ARG_POINTER): Document. * doc/tm.texi: Regenerate. * alias.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER * builtins.c: Use HARD_FRAME_POINTER_IS_ARG_POINTER. * c-parser.c (disable_extension_diagnostics, restore_extension_diagnostics): Update names of cpp_options members. * combine.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER * common.opt (fcompare-debug-second): Don't use Var. * config/alpha/alpha.h (target_flags): Remove. * config/arm/arm.h (HARD_FRAME_POINTER_IS_FRAME_POINTER, HARD_FRAME_POINTER_IS_ARG_POINTER): Define. * config/bfin/bfin.h (target_flags): Remove. * config/cris/cris.h (target_flags): Remove. * config/i386/i386-c.c (ix86_pragma_target_parse): Update names of cl_target_option members. * config/i386/i386.c (ix86_force_align_arg_pointer): Remove. (ix86_function_specific_print, ix86_valid_target_attribute_tree, ix86_can_inline_p): Update names of cl_target_option members. * config/i386/i386.h (ix86_isa_flags): Remove. * config/lm32/lm32.h (target_flags): Remove. * config/mcore/mcore.h (mcore_stack_increment): Remove. * config/mcore/mcore.md (addsi3): Remove extern declaration of flag_omit_frame_pointer. * config/mep/mep.h (target_flags): Remove. * config/mips/mips.h (HARD_FRAME_POINTER_IS_FRAME_POINTER, HARD_FRAME_POINTER_IS_ARG_POINTER): Define. * config/mmix/mmix.h (target_flags): Remove. * config/rs6000/rs6000.h (rs6000_xilinx_fpu, flag_pic, flag_expensive_optimizations): Remove. * config/s390/s390.h (flag_pic): Remove. * config/score/score-conv.h (target_flags): Remove. * config/sh/sh.h (sh_fixed_range_str): Remove. * config/spu/spu.h (target_flags, spu_fixed_range_string): Remove. * dbxout.c: Use HARD_FRAME_POINTER_IS_ARG_POINTER * df-scan.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER. * diagnostic.c (diagnostic_initialize): Update names of diagnostic_context members. * diagnostic.h (diagnostic_context): Rename inhibit_warnings and warn_system_headers. (diagnostic_report_warnings_p): Update for new names. * dwarf2out.c: Use HARD_FRAME_POINTER_IS_ARG_POINTER * emit-rtl.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER and HARD_FRAME_POINTER_IS_ARG_POINTER. * flags.h (flag_compare_debug): Declare. * ira.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER * opts.c (flag_compare_debug): Define. (common_handle_option): Update names of diagnostic_context members. Handle -fcompare-debug-second. (fast_math_flags_struct_set_p): Update names of cl_optimization members. * reginfo.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER. * regrename.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER. * reload.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER. * reload1.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER. * resource.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER. * rtl.h (HARD_FRAME_POINTER_IS_FRAME_POINTER, HARD_FRAME_POINTER_IS_ARG_POINTER): Define and use. * sel-sched.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER * stmt.c: Use HARD_FRAME_POINTER_IS_ARG_POINTER. gcc/c-family: * c-common.c (c_cpp_error): Update names of diagnostic_context members. * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of cl_optimization members. * c-opts.c (warning_as_error_callback, c_common_handle_option, sanitize_cpp_opts, finish_options): Update names of cpp_options members. gcc/fortran: * cpp.c (cpp_define_builtins): Update names of gfc_option_t members. (gfc_cpp_post_options): Update names of cpp_options members. (cb_cpp_error): Update names of diagnostic_context members. * f95-lang.c (gfc_init_builtin_functions): Update names of gfc_option_t members. * gfortran.h (gfc_option_t): Rename warn_conversion and flag_openmp. * intrinsic.c (gfc_convert_type_warn): Update names of gfc_option_t members. * options.c (gfc_init_options, gfc_post_options, set_Wall, gfc_handle_option): Update names of gfc_option_t members. * parse.c (next_free, next_fixed): Update names of gfc_option_t members. * scanner.c (pedantic): Remove extern declaration. (skip_free_comments, skip_fixed_comments, include_line): Update names of gfc_option_t members. * trans-decl.c (gfc_generate_function_code): Update names of gfc_option_t members. gcc/java: * java-tree.h (flag_filelist_file, flag_assert, flag_jni, flag_force_classes_archive_check, flag_redundant, flag_newer, flag_use_divide_subroutine, flag_use_atomic_builtins, flag_use_boehm_gc, flag_hash_synchronization, flag_check_references, flag_optimize_sci, flag_indirect_classes, flag_indirect_dispatch, flag_store_check, flag_reduced_reflection): Remove. * jcf-dump.c (flag_newer): Remove. * jcf.h (quiet_flag): Remove. * parse.h (quiet_flag): Remove. libcpp: * include/cpplib.h (cpp_options): Rename warn_deprecated, warn_traditional, warn_long_long and pedantic. * directives.c (directive_diagnostics, _cpp_handle_directive): Update names of cpp_options members. * expr.c (cpp_classify_number, eval_token): Update names of cpp_options members. * init.c (cpp_create_reader, post_options): Update names of cpp_options members. * internal.h (CPP_PEDANTIC, CPP_WTRADITIONAL): Update names of cpp_options members. * macro.c (parse_params): Update names of cpp_options members. From-SVN: r164723
2010-09-29 16:49:14 +02:00
#if !HARD_FRAME_POINTER_IS_FRAME_POINTER
|| operand == hard_frame_pointer_rtx
#endif
#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
|| operand == arg_pointer_rtx
#endif
|| operand == stack_pointer_rtx)
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
&& ! maybe_memory_address_addr_space_p
(mode, ad, as, &XEXP (XEXP (ad, 0), 1 - op_index)))
{
rtx offset_reg;
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
enum reg_class cls;
rtl.h (plus_constant, [...]): Merge into a single plus_constant function. gcc/ * rtl.h (plus_constant, plus_constant_mode): Merge into a single plus_constant function. * explow.c (plus_constant, plus_constant_mode): Likewise. Assert that the mode is sensible. (use_anchored_address, round_push, allocate_dynamic_stack_space) (probe_stack_range, anti_adjust_stack_and_probe): Update calls to plus_constant. * alias.c (canon_rtx): Likewise. (init_alias_analysis): Likewise. * builtins.c (expand_builtin_return_addr) (expand_builtin_setjmp_setup, expand_builtin_longjmp) (expand_builtin_nonlocal_goto, expand_builtin_update_setjmp_buf) (expand_builtin_apply_args_1, expand_builtin_apply, expand_movstr) (expand_builtin_stpcpy): Likewise. * calls.c (save_fixed_argument_area, restore_fixed_argument_area) (compute_argument_addresses, internal_arg_pointer_based_exp) (expand_call, emit_library_call_value_1): Likewise. * cfgexpand.c (expand_one_stack_var_at, expand_debug_expr): Likewise. * combine-stack-adj.c (try_apply_stack_adjustment): Likewise. * combine.c (combine_simplify_rtx, force_to_mode): Likewise. * cse.c (insert_const_anchor, find_reg_offset_for_const) (use_related_value, fold_rtx): Likewise. * cselib.c (cselib_subst_to_values): Likewise. * dse.c (record_store, check_mem_read_rtx): Likewise. * dwarf2out.c (rtl_for_decl_location, gen_variable_die): Likewise. * emit-rtl.c (adjust_address_1): Likewise. * except.c (sjlj_emit_function_enter) (expand_builtin_extract_return_addr) (expand_builtin_frob_return_addr): Likewise. * expmed.c (expand_divmod): Likewise. * expr.c (move_by_pieces, store_by_pieces, store_by_pieces_1) (emit_move_resolve_push, push_block, emit_push_insn, store_expr) (expand_expr_addr_expr_1, expand_expr_real_1): Likewise. * function.c (assign_stack_local_1) (instantiate_virtual_regs_in_rtx): Likewise. * optabs.c (prepare_cmp_insn): Likewise. * recog.c (offsettable_address_addr_space_p): Likewise. * reload.c (find_reloads_address, form_sum) (find_reloads_subreg_address): Likewise. * reload1.c (init_reload, eliminate_regs_1) (eliminate_regs_in_insn): Likewise. * simplify-rtx.c (simplify_unary_operation_1) (simplify_binary_operation_1, simplify_plus_minus): Likewise. * var-tracking.c (compute_cfa_pointer, prepare_call_arguments) (vt_add_function_parameter): Likewise. * config/alpha/alpha.h (EH_RETURN_HANDLER_RTX): Likewise. * config/alpha/vms.h (EH_RETURN_HANDLER_RTX): Likewise. * config/alpha/alpha.c (alpha_legitimize_address_1) (get_unaligned_address, alpha_expand_unaligned_load) (alpha_expand_unaligned_store, alpha_expand_unaligned_load_words) (alpha_expand_unaligned_store_words, alpha_expand_block_clear) (alpha_expand_builtin_establish_vms_condition_handler) (alpha_setup_incoming_varargs, emit_frame_store_1) (alpha_expand_prologue, alpha_expand_epilogue) (alpha_use_linkage): Likewise. * config/alpha/alpha.md: Likewise. * config/arm/arm.c (arm_trampoline_init, legitimize_pic_address) (arm_load_pic_register, arm_pic_static_addr, arm_legitimize_address) (thumb_legitimize_address, arm_gen_load_multiple_1) (arm_gen_store_multiple_1, arm_gen_multiple_op, gen_ldm_seq) (gen_stm_seq, gen_const_stm_seq, arm_block_move_unaligned_straight) (arm_block_move_unaligned_loop, arm_gen_movmemqi, arm_reload_in_hi) (arm_reload_out_hi, arm_reorg, vfp_emit_fstmd, emit_multi_reg_push) (emit_sfm, thumb_set_frame_pointer, arm_expand_prologue) (thumb1_emit_multi_reg_push, thumb1_expand_prologue) (thumb_expand_movmemqi, arm_set_return_address) (thumb_set_return_address): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr.c (avr_incoming_return_addr_rtx) (avr_prologue_setup_frame, expand_epilogue) (avr_const_address_lo16): Likewise. * config/bfin/bfin.h (EH_RETURN_HANDLER_RTX): Likewise. * config/bfin/bfin.c (setup_incoming_varargs, bfin_load_pic_reg) (bfin_expand_prologue, bfin_trampoline_init, bfin_expand_call) (bfin_output_mi_thunk): Likewise. * config/c6x/c6x.c (c6x_initialize_trampoline) (c6x_output_mi_thunk): Likewise. * config/cr16/cr16.h (EH_RETURN_HANDLER_RTX): Likewise. * config/cr16/cr16.c (cr16_create_dwarf_for_multi_push): Likewise. * config/cris/cris.c (cris_return_addr_rtx, cris_split_movdx) (cris_expand_prologue, cris_expand_epilogue, cris_gen_movem_load) (cris_emit_movem_store, cris_trampoline_init): Likewise. * config/cris/cris.md: Likewise. * config/darwin.c (machopic_indirect_data_reference) (machopic_legitimize_pic_address): Likewise. * config/epiphany/epiphany.c (epiphany_emit_save_restore) (epiphany_expand_prologue, epiphany_expand_epilogue) (epiphany_trampoline_init): Likewise. * config/epiphany/epiphany.md: Likewise. * config/fr30/fr30.c (fr30_move_double): Likewise. * config/frv/frv.c (frv_dwarf_store, frv_expand_prologue) (frv_expand_block_move, frv_expand_block_clear, frv_return_addr_rtx) (frv_index_memory, unspec_got_name, frv_find_base_term) (frv_output_dwarf_dtprel): Likewise. * config/h8300/h8300.c (h8300_push_pop, h8300_return_addr_rtx) (h8300_swap_into_er6, h8300_swap_out_of_er6): Likewise. * config/i386/i386.h (RETURN_ADDR_RTX): Likewise. * config/i386/i386.c (setup_incoming_varargs_64) (setup_incoming_varargs_ms_64, choose_baseaddr) (ix86_emit_save_reg_using_mov, ix86_adjust_stack_and_probe) (ix86_emit_probe_stack_range, ix86_expand_prologue) (ix86_emit_restore_reg_using_pop, ix86_emit_leave) (ix86_expand_epilogue, legitimize_pic_address, ix86_legitimize_address) (ix86_split_long_move, ix86_expand_movmem, ix86_expand_setmem) (ix86_static_chain, ix86_trampoline_init, x86_this_parameter) (x86_output_mi_thunk): Likewise. * config/i386/i386.md: Likewise. * config/ia64/ia64.c (ia64_expand_load_address) (ia64_expand_tls_address, ia64_expand_move, ia64_split_tmode) (do_spill, ia64_trampoline_init): Likewise. * config/iq2000/iq2000.c (iq2000_va_start) (iq2000_emit_frame_related_store, iq2000_expand_prologue) (iq2000_expand_eh_return, iq2000_setup_incoming_varargs) (iq2000_print_operand, iq2000_legitimize_address): Likewise. * config/lm32/lm32.c (lm32_setup_incoming_varargs): Likewise. * config/m32c/m32c.c (m32c_return_addr_rtx) (m32c_expand_insv): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs) (m32r_legitimize_pic_address, m32r_print_operand) (m32r_print_operand_address): Likewise. * config/m68k/linux.h (FINALIZE_TRAMPOLINE): Likewise. * config/m68k/m68k.h (RETURN_ADDR_RTX): Likewise. (EH_RETURN_HANDLER_RTX): Likewise. * config/m68k/m68k.c (m68k_emit_movem, m68k_expand_prologue) (m68k_expand_epilogue, legitimize_pic_address) (m68k_output_mi_thunk): Likewise. * config/m68k/m68k.md: Likewise. * config/mcore/mcore.c (mcore_expand_prolog): Likewise. (mcore_expand_epilog): Likewise. * config/mcore/mcore.md: Likewise. * config/mep/mep.c (mep_allocate_initial_value) (mep_expand_prologue, mep_expand_epilogue): Likewise. * config/microblaze/microblaze.c (double_memory_operand) (microblaze_block_move_loop): Likewise. * config/mips/mips.c (mips_strip_unspec_address, mips_add_offset) (mips_setup_incoming_varargs, mips_va_start, mips_block_move_loop) (mips_print_operand, mips16e_save_restore_reg, mips_save_restore_reg) (mips_expand_prologue, mips_epilogue_set_cfa) (mips_expand_epilogue): Likewise. * config/mips/mips.md: Likewise. * config/mmix/mmix.c (mmix_dynamic_chain_address, mmix_return_addr_rtx) (mmix_expand_prologue, mmix_expand_epilogue): Likewise. * config/mn10300/mn10300.c (mn10300_gen_multiple_store) (mn10300_builtin_saveregs, mn10300_trampoline_init): Likewise. * config/moxie/moxie.h (INCOMING_RETURN_ADDR_RTX): Likewise. (EH_RETURN_HANDLER_RTX): Likewise. * config/moxie/moxie.c (moxie_static_chain): Likewise. * config/pa/pa.c (legitimize_pic_address, hppa_legitimize_address) (store_reg, set_reg_plus_d, pa_expand_prologue, load_reg) (pa_return_addr_rtx, hppa_builtin_saveregs) (pa_trampoline_init): Likewise. * config/pa/pa.md: Likewise. * config/pdp11/pdp11.c (pdp11_expand_epilogue): Likewise. * config/picochip/picochip.c (picochip_static_chain): Likewise. * config/rs6000/rs6000.h (RS6000_SAVE_TOC): Likewise. * config/rs6000/rs6000.c (rs6000_legitimize_address) (setup_incoming_varargs, print_operand, rs6000_return_addr) (rs6000_emit_eh_reg_restore, rs6000_emit_probe_stack_range) (rs6000_emit_epilogue) (rs6000_machopic_legitimize_pic_address): Likewise. * config/rx/rx.c (gen_rx_rtsd_vector, gen_rx_popm_vector): Likewise. * config/s390/s390.h (INITIAL_FRAME_ADDRESS_RTX): Likewise. (DYNAMIC_CHAIN_ADDRESS): Likewise. * config/s390/s390.c (s390_decompose_address, legitimize_pic_address) (s390_delegitimize_address, print_operand, annotate_constant_pool_refs) (replace_constant_pool_ref, s390_return_addr_rtx, s390_back_chain_rtx) (save_fpr, restore_fpr, save_gprs, restore_gprs, s390_emit_prologue) (s390_emit_epilogue, s390_function_profiler): Likewise. * config/s390/s390.md: Likewise. * config/score/score.c (score_add_offset, score_prologue): Likewise. * config/sh/sh.c (expand_block_move, push_regs, sh_builtin_saveregs) (sh_output_mi_thunk): Likewise. * config/sh/sh.md: Likewise. * config/sparc/sparc.h (DYNAMIC_CHAIN_ADDRESS, FRAME_ADDR_RTX) (RETURN_ADDR_RTX, INCOMING_RETURN_ADDR_RTX): Likewise. * config/sparc/sparc.c (sparc_legitimize_pic_address) (sparc_emit_probe_stack_range, emit_save_or_restore_regs) (emit_window_save, sparc_flat_expand_prologue, sparc_struct_value_rtx) (emit_and_preserve): Likewise. * config/sparc/sparc.md: Likewise. * config/spu/spu.h (DYNAMIC_CHAIN_ADDRESS): Likewise. * config/spu/spu.c (spu_expand_insv, spu_machine_dependent_reorg) (spu_setup_incoming_varargs, ea_load_store_inline) (spu_expand_load): Likewise. * config/stormy16/stormy16.c (xstormy16_expand_prologue) (combine_bnp): Likewise. * config/tilegx/tilegx.h (DYNAMIC_CHAIN_ADDRESS): Likewise. * config/tilegx/tilegx.c (tilegx_setup_incoming_varargs) (tilegx_expand_unaligned_load, tilegx_trampoline_init): Likewise. * config/tilepro/tilepro.h (DYNAMIC_CHAIN_ADDRESS): Likewise. * config/tilepro/tilepro.c (tilepro_setup_incoming_varargs) (tilepro_expand_unaligned_load, tilepro_trampoline_init): Likewise. * config/v850/v850.c (expand_prologue, expand_epilogue): Likewise. * config/v850/v850.md: Likewise. * config/vax/elf.h (EH_RETURN_STACKADJ_RTX): Likewise. (EH_RETURN_HANDLER_RTX): Likewise. * config/vax/vax.h (DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX): Likewise. * config/vax/vax.c (vax_add_reg_cfa_offset, vax_expand_prologue) (print_operand_address, vax_trampoline_init): Likewise. * config/xtensa/xtensa.c (xtensa_expand_prologue, xtensa_return_addr) (xtensa_function_value_regno_p): Likewise. From-SVN: r187199
2012-05-05 19:41:49 +02:00
offset_reg = plus_constant (GET_MODE (ad), operand,
INTVAL (XEXP (ad, 1)));
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
/* Form the adjusted address. */
if (GET_CODE (XEXP (ad, 0)) == PLUS)
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
ad = gen_rtx_PLUS (GET_MODE (ad),
op_index == 0 ? offset_reg : addend,
op_index == 0 ? addend : offset_reg);
else
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
ad = gen_rtx_LO_SUM (GET_MODE (ad),
op_index == 0 ? offset_reg : addend,
op_index == 0 ? addend : offset_reg);
*loc = ad;
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
cls = base_reg_class (mode, as, MEM, GET_CODE (addend));
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
find_reloads_address_part (XEXP (ad, op_index),
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
&XEXP (ad, op_index), cls,
GET_MODE (ad), opnum, type, ind_levels);
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
find_reloads_address_1 (mode, as,
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
XEXP (ad, 1 - op_index), 1, GET_CODE (ad),
GET_CODE (XEXP (ad, op_index)),
&XEXP (ad, 1 - op_index), opnum,
type, 0, insn);
1992-02-28 11:23:25 +01:00
return 0;
}
1992-02-28 11:23:25 +01:00
}
1992-02-28 11:23:25 +01:00
/* See if address becomes valid when an eliminable register
in a sum is replaced. */
tem = ad;
if (GET_CODE (ad) == PLUS)
tem = subst_indexed_address (ad);
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 (tem != ad && strict_memory_address_addr_space_p (mode, tem, as))
1992-02-28 11:23:25 +01:00
{
/* Ok, we win that way. Replace any additional eliminable
registers. */
subst_reg_equivs_changed = 0;
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
tem = subst_reg_equivs (tem, insn);
1992-02-28 11:23:25 +01:00
/* Make sure that didn't make the address invalid again. */
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 (! subst_reg_equivs_changed
|| strict_memory_address_addr_space_p (mode, tem, as))
1992-02-28 11:23:25 +01:00
{
*loc = tem;
return 0;
}
}
/* If constants aren't valid addresses, reload the constant address
into a register. */
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 (CONSTANT_P (ad) && ! strict_memory_address_addr_space_p (mode, ad, as))
1992-02-28 11:23:25 +01:00
{
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
enum machine_mode address_mode = GET_MODE (ad);
if (address_mode == VOIDmode)
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
address_mode = targetm.addr_space.address_mode (as);
/* If AD is an address in the constant pool, the MEM rtx may be shared.
1992-02-28 11:23:25 +01:00
Unshare it so we can safely alter it. */
if (memrefloc && GET_CODE (ad) == SYMBOL_REF
&& CONSTANT_POOL_ADDRESS_P (ad))
{
*memrefloc = copy_rtx (*memrefloc);
loc = &XEXP (*memrefloc, 0);
if (removed_and)
loc = &XEXP (*loc, 0);
1992-02-28 11:23:25 +01:00
}
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
find_reloads_address_part (ad, loc,
base_reg_class (mode, as, MEM, SCRATCH),
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
address_mode, opnum, type, ind_levels);
return ! removed_and;
1992-02-28 11:23:25 +01:00
}
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
return find_reloads_address_1 (mode, as, ad, 0, MEM, SCRATCH, loc,
opnum, type, ind_levels, insn);
1992-02-28 11:23:25 +01:00
}
/* Find all pseudo regs appearing in AD
that are eliminable in favor of equivalent values
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
and do not have hard regs; replace them by their equivalents.
INSN, if nonzero, is the insn in which we do the reload. We put USEs in
front of it for pseudos that we have to replace with stack slots. */
1992-02-28 11:23:25 +01:00
static rtx
reload: Use rtx_insn (also touches caller-save.c and config/arc/arc) gcc/ * reload.h (struct insn_chain): Strengthen field "insn" from rtx to rtx_insn *. (find_reloads): Likewise for param 1. (subst_reloads): Likewise for sole param. (find_equiv_reg): Likwise for param 2. (regno_clobbered_p): Likwise for param 2. (reload): Likewise for param 1. * caller-save.c (save_call_clobbered_regs): Strengthen local "insn" from rtx to rtx_insn *. (insert_one_insn): Likewise for local "insn". * reload.c (this_insn): Likewise for this global. (find_reloads): Likewise for param "insn". (find_reloads_toplev): Likewise. (find_reloads_address): Likewise. (subst_reg_equivs): Likewise. (update_auto_inc_notes): Likewise. (find_reloads_address_1): Likewise. (find_reloads_subreg_address): Likewise. (subst_reloads): Likewise. (find_equiv_reg): Likewise, also for local "p". (regno_clobbered_p): Likewise for param "insn". * reload1.c (reg_reloaded_insn): Likewise for the elements of this array. (spill_reg_store): Likewise for the elements of this array. (remove_init_insns): Likewise for local "equiv_insn". (will_delete_init_insn_p): Likewise for param "insn". (reload): Likewise for param ""first" and local "insn". (calculate_needs_all_insns): Strengthen local "insn" from rtx to rtx_insn *. (calculate_elim_costs_all_insns): Likewise. (delete_caller_save_insns): Likewise. (spill_failure): Likewise for param "insn". (delete_dead_insn): Likewise. (set_label_offsets): Likewise. (eliminate_regs_in_insn): Likewise, also for locals "base_insn" and "prev_insn". (elimination_costs_in_insn): Likewise for param "insn". (set_initial_eh_label_offset): Replace use of NULL_RTX with NULL when referring to an insn. (set_initial_label_offsets): Likewise. (set_offsets_for_label): Strengthen param "insn" from rtx to rtx_insn *. (init_eliminable_invariants): Likewise for param "first" and local "insn". (fixup_eh_region_note): Likewise for param "insn". (reload_as_needed): Likewise for locals "prev", "insn", "old_next", "old_prev", "next". (gen_reload_chain_without_interm_reg_p): Likewise for locals "insn", "last". (reload_inheritance_insn): Strengthen elements of this array from rtx to rtx_insn *. (failed_reload): Likewise for param "insn". (choose_reload_regs): Likewise for local "insn". Replace use of NULL_RTX with NULL when referring to an insn. (input_reload_insns): Strengthen elements of this array from rtx to rtx_insn *. (other_input_address_reload_insns): Likewise for this global. (other_input_reload_insns): Likewise for this global. (input_address_reload_insns): Likwise for the elements of this array. (inpaddr_address_reload_insns): Likwise for the elements of this array. (output_reload_insns): Likewise for the elements of this array. (output_address_reload_insns): Likewise for the elements of this array. (outaddr_address_reload_insns): Likewise for the elements of this array. (operand_reload_insns): Likewise for this global. (other_operand_reload_insns): Likewise for this global. (other_output_reload_insns): Likewise for the elements of this array. (new_spill_reg_store): Likewise for the elements of this array. (emit_input_reload_insns): Likewise for locals "insn", "temp". Strengthen local "where" from rtx * to rtx_insn **. (emit_output_reload_insns): Strengthen locals "insn", "p", "next" from rtx to rtx_insn *. (do_input_reload): Likewise for local "insn". (do_output_reload): Likewise for local "insn". (emit_reload_insns): Likewise for locals "insn" and "store_insn". (emit_insn_if_valid_for_reload): Likewise for return type and local "last". Add checked cast to rtx_insn when returning "insn" since this has been through emit_insn. (gen_reload): Strengthen return type and locals "last", "insn", "set" from rtx to rtx_insn *. Add checked cast to rtx_insn when returning "insn" since it's been through emit_insn_if_valid_for_reload at this point. (delete_output_reload): Strengthen param "insn" and locals "output_reload_insn", "i2" from rtx to rtx_insn *. (delete_address_reloads): Likewise for params "dead_insn", "current_insn" and locals "prev", "next". (delete_address_reloads_1): Likewise for params "dead_insn", "current_insn" and locals "prev", "i2". (inc_for_reload): Likewise for locals "last", "add_insn". (add_auto_inc_notes): Strengthen param "insn" from rtx to rtx_insn *. * config/arc/arc-protos.h (regno_clobbered_p): Likewise for 2nd param of this duplicate of the prototype from reload.h From-SVN: r214370
2014-08-22 22:49:31 +02:00
subst_reg_equivs (rtx ad, rtx_insn *insn)
1992-02-28 11:23:25 +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_CODE code = GET_CODE (ad);
int i;
const char *fmt;
1992-02-28 11:23:25 +01:00
switch (code)
{
case HIGH:
case CONST:
alias.c (rtx_equal_for_memref_p): Convert constant cases. 2012-08-23 Kenneth Zadeck <zadeck@naturalbridge.com> * alias.c (rtx_equal_for_memref_p): Convert constant cases. * combine.c (find_single_use_1, mark_used_regs_combine): Convert to CASE_CONST_ANY. * cse.c (exp_equiv_p, canon_reg, fold_rtx, cse_process_notes_1, count_reg_usage): Convert constant cases. * cselib.c (cselib_expand_value_rtx_1): Convert to CASE_CONST_ANY. (cselib_subst_to_values): Convert constant cases. * df-scan.c (df_uses_record): Ditto. * dse.c (const_or_frame_p): Convert case statements to explicit if-then-else using mode classes. * emit-rtl.c (verify_rtx_sharing, copy_insn_1): Convert constant cases. * explow.c (convert_memory_address_addr_space): Ditto. * gcse.c (want_to_gcse_p, oprs_unchanged_p, compute_transp): Ditto. * genattrtab.c (attr_copy_rtx, clear_struct_flag): Ditto. * ira.c (equiv_init_varies_p, contains_replace_regs, memref_referenced_p, rtx_moveable_p): Ditto. * jump.c (mark_jump_label_1): Remove constant cases. (rtx_renumbered_equal_p): Convert to CASE_CONST_UNIQUE. * loop-invariant.c (check_maybe_invariant, hash_invariant_expr_1, invariant_expr_equal_p): Convert to CASE_CONST_ANY. * postreload-gcse.c (oprs_unchanged_p): Convert constant cases. * reginfo.c (reg_scan_mark_refs): Ditto. * regrename.c (scan_rtx): Ditto. * reload1.c (eliminate_regs_1, elimination_effects, scan_paradoxical_subregs): Ditto. * reload.c (operands_match_p, subst_reg_equivs): Ditto. * resource.c (mark_referenced_resources, mark_set_resources): Ditto. * rtlanal.c (rtx_unstable_p, rtx_varies_p, count_occurrences) (reg_mentioned_p, modified_between_p, modified_in_p) (volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1, inequality_comparisons_p, computed_jump_p_1): Ditto. * rtl.c (copy_rtx, rtx_equal_p_cb, rtx_equal_p): Ditto. * sched-deps.c (sched_analyze_2): Ditto. * valtrack.c (cleanup_auto_inc_dec): Ditto. * rtl.h: (CASE_CONST_SCALAR_INT, CASE_CONST_UNIQUE, CASE_CONST_ANY): New macros. From-SVN: r190627
2012-08-23 20:46:18 +02:00
CASE_CONST_ANY:
1992-02-28 11:23:25 +01:00
case SYMBOL_REF:
case LABEL_REF:
case PC:
case CC0:
return ad;
case REG:
{
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 regno = REGNO (ad);
1992-02-28 11:23:25 +01:00
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
if (reg_equiv_constant (regno) != 0)
1992-02-28 11:23:25 +01:00
{
subst_reg_equivs_changed = 1;
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
return reg_equiv_constant (regno);
1992-02-28 11:23:25 +01:00
}
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
if (reg_equiv_memory_loc (regno) && num_not_at_initial_offset)
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
{
rtx mem = make_memloc (ad, regno);
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
if (! rtx_equal_p (mem, reg_equiv_mem (regno)))
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
{
subst_reg_equivs_changed = 1;
/* We mark the USE with QImode so that we recognize it
as one that can be safely deleted at the end of
reload. */
PUT_MODE (emit_insn_before (gen_rtx_USE (VOIDmode, ad), insn),
QImode);
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
return mem;
}
}
1992-02-28 11:23:25 +01:00
}
return ad;
case PLUS:
/* Quickly dispose of a common case. */
if (XEXP (ad, 0) == frame_pointer_rtx
&& CONST_INT_P (XEXP (ad, 1)))
1992-02-28 11:23:25 +01:00
return ad;
break;
default:
break;
1992-02-28 11:23:25 +01:00
}
fmt = GET_RTX_FORMAT (code);
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
if (fmt[i] == 'e')
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
XEXP (ad, i) = subst_reg_equivs (XEXP (ad, i), insn);
1992-02-28 11:23:25 +01:00
return ad;
}
/* Compute the sum of X and Y, making canonicalizations assumed in an
address, namely: sum constant integers, surround the sum of two
constants with a CONST, put the constant as the second operand, and
group the constant on the outermost sum.
This routine assumes both inputs are already in canonical form. */
rtx
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
form_sum (enum machine_mode mode, rtx x, rtx y)
1992-02-28 11:23:25 +01:00
{
rtx tem;
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
gcc_assert (GET_MODE (x) == mode || GET_MODE (x) == VOIDmode);
gcc_assert (GET_MODE (y) == mode || GET_MODE (y) == VOIDmode);
1992-02-28 11:23:25 +01:00
if (CONST_INT_P (x))
rtl.h (plus_constant, [...]): Merge into a single plus_constant function. gcc/ * rtl.h (plus_constant, plus_constant_mode): Merge into a single plus_constant function. * explow.c (plus_constant, plus_constant_mode): Likewise. Assert that the mode is sensible. (use_anchored_address, round_push, allocate_dynamic_stack_space) (probe_stack_range, anti_adjust_stack_and_probe): Update calls to plus_constant. * alias.c (canon_rtx): Likewise. (init_alias_analysis): Likewise. * builtins.c (expand_builtin_return_addr) (expand_builtin_setjmp_setup, expand_builtin_longjmp) (expand_builtin_nonlocal_goto, expand_builtin_update_setjmp_buf) (expand_builtin_apply_args_1, expand_builtin_apply, expand_movstr) (expand_builtin_stpcpy): Likewise. * calls.c (save_fixed_argument_area, restore_fixed_argument_area) (compute_argument_addresses, internal_arg_pointer_based_exp) (expand_call, emit_library_call_value_1): Likewise. * cfgexpand.c (expand_one_stack_var_at, expand_debug_expr): Likewise. * combine-stack-adj.c (try_apply_stack_adjustment): Likewise. * combine.c (combine_simplify_rtx, force_to_mode): Likewise. * cse.c (insert_const_anchor, find_reg_offset_for_const) (use_related_value, fold_rtx): Likewise. * cselib.c (cselib_subst_to_values): Likewise. * dse.c (record_store, check_mem_read_rtx): Likewise. * dwarf2out.c (rtl_for_decl_location, gen_variable_die): Likewise. * emit-rtl.c (adjust_address_1): Likewise. * except.c (sjlj_emit_function_enter) (expand_builtin_extract_return_addr) (expand_builtin_frob_return_addr): Likewise. * expmed.c (expand_divmod): Likewise. * expr.c (move_by_pieces, store_by_pieces, store_by_pieces_1) (emit_move_resolve_push, push_block, emit_push_insn, store_expr) (expand_expr_addr_expr_1, expand_expr_real_1): Likewise. * function.c (assign_stack_local_1) (instantiate_virtual_regs_in_rtx): Likewise. * optabs.c (prepare_cmp_insn): Likewise. * recog.c (offsettable_address_addr_space_p): Likewise. * reload.c (find_reloads_address, form_sum) (find_reloads_subreg_address): Likewise. * reload1.c (init_reload, eliminate_regs_1) (eliminate_regs_in_insn): Likewise. * simplify-rtx.c (simplify_unary_operation_1) (simplify_binary_operation_1, simplify_plus_minus): Likewise. * var-tracking.c (compute_cfa_pointer, prepare_call_arguments) (vt_add_function_parameter): Likewise. * config/alpha/alpha.h (EH_RETURN_HANDLER_RTX): Likewise. * config/alpha/vms.h (EH_RETURN_HANDLER_RTX): Likewise. * config/alpha/alpha.c (alpha_legitimize_address_1) (get_unaligned_address, alpha_expand_unaligned_load) (alpha_expand_unaligned_store, alpha_expand_unaligned_load_words) (alpha_expand_unaligned_store_words, alpha_expand_block_clear) (alpha_expand_builtin_establish_vms_condition_handler) (alpha_setup_incoming_varargs, emit_frame_store_1) (alpha_expand_prologue, alpha_expand_epilogue) (alpha_use_linkage): Likewise. * config/alpha/alpha.md: Likewise. * config/arm/arm.c (arm_trampoline_init, legitimize_pic_address) (arm_load_pic_register, arm_pic_static_addr, arm_legitimize_address) (thumb_legitimize_address, arm_gen_load_multiple_1) (arm_gen_store_multiple_1, arm_gen_multiple_op, gen_ldm_seq) (gen_stm_seq, gen_const_stm_seq, arm_block_move_unaligned_straight) (arm_block_move_unaligned_loop, arm_gen_movmemqi, arm_reload_in_hi) (arm_reload_out_hi, arm_reorg, vfp_emit_fstmd, emit_multi_reg_push) (emit_sfm, thumb_set_frame_pointer, arm_expand_prologue) (thumb1_emit_multi_reg_push, thumb1_expand_prologue) (thumb_expand_movmemqi, arm_set_return_address) (thumb_set_return_address): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr.c (avr_incoming_return_addr_rtx) (avr_prologue_setup_frame, expand_epilogue) (avr_const_address_lo16): Likewise. * config/bfin/bfin.h (EH_RETURN_HANDLER_RTX): Likewise. * config/bfin/bfin.c (setup_incoming_varargs, bfin_load_pic_reg) (bfin_expand_prologue, bfin_trampoline_init, bfin_expand_call) (bfin_output_mi_thunk): Likewise. * config/c6x/c6x.c (c6x_initialize_trampoline) (c6x_output_mi_thunk): Likewise. * config/cr16/cr16.h (EH_RETURN_HANDLER_RTX): Likewise. * config/cr16/cr16.c (cr16_create_dwarf_for_multi_push): Likewise. * config/cris/cris.c (cris_return_addr_rtx, cris_split_movdx) (cris_expand_prologue, cris_expand_epilogue, cris_gen_movem_load) (cris_emit_movem_store, cris_trampoline_init): Likewise. * config/cris/cris.md: Likewise. * config/darwin.c (machopic_indirect_data_reference) (machopic_legitimize_pic_address): Likewise. * config/epiphany/epiphany.c (epiphany_emit_save_restore) (epiphany_expand_prologue, epiphany_expand_epilogue) (epiphany_trampoline_init): Likewise. * config/epiphany/epiphany.md: Likewise. * config/fr30/fr30.c (fr30_move_double): Likewise. * config/frv/frv.c (frv_dwarf_store, frv_expand_prologue) (frv_expand_block_move, frv_expand_block_clear, frv_return_addr_rtx) (frv_index_memory, unspec_got_name, frv_find_base_term) (frv_output_dwarf_dtprel): Likewise. * config/h8300/h8300.c (h8300_push_pop, h8300_return_addr_rtx) (h8300_swap_into_er6, h8300_swap_out_of_er6): Likewise. * config/i386/i386.h (RETURN_ADDR_RTX): Likewise. * config/i386/i386.c (setup_incoming_varargs_64) (setup_incoming_varargs_ms_64, choose_baseaddr) (ix86_emit_save_reg_using_mov, ix86_adjust_stack_and_probe) (ix86_emit_probe_stack_range, ix86_expand_prologue) (ix86_emit_restore_reg_using_pop, ix86_emit_leave) (ix86_expand_epilogue, legitimize_pic_address, ix86_legitimize_address) (ix86_split_long_move, ix86_expand_movmem, ix86_expand_setmem) (ix86_static_chain, ix86_trampoline_init, x86_this_parameter) (x86_output_mi_thunk): Likewise. * config/i386/i386.md: Likewise. * config/ia64/ia64.c (ia64_expand_load_address) (ia64_expand_tls_address, ia64_expand_move, ia64_split_tmode) (do_spill, ia64_trampoline_init): Likewise. * config/iq2000/iq2000.c (iq2000_va_start) (iq2000_emit_frame_related_store, iq2000_expand_prologue) (iq2000_expand_eh_return, iq2000_setup_incoming_varargs) (iq2000_print_operand, iq2000_legitimize_address): Likewise. * config/lm32/lm32.c (lm32_setup_incoming_varargs): Likewise. * config/m32c/m32c.c (m32c_return_addr_rtx) (m32c_expand_insv): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs) (m32r_legitimize_pic_address, m32r_print_operand) (m32r_print_operand_address): Likewise. * config/m68k/linux.h (FINALIZE_TRAMPOLINE): Likewise. * config/m68k/m68k.h (RETURN_ADDR_RTX): Likewise. (EH_RETURN_HANDLER_RTX): Likewise. * config/m68k/m68k.c (m68k_emit_movem, m68k_expand_prologue) (m68k_expand_epilogue, legitimize_pic_address) (m68k_output_mi_thunk): Likewise. * config/m68k/m68k.md: Likewise. * config/mcore/mcore.c (mcore_expand_prolog): Likewise. (mcore_expand_epilog): Likewise. * config/mcore/mcore.md: Likewise. * config/mep/mep.c (mep_allocate_initial_value) (mep_expand_prologue, mep_expand_epilogue): Likewise. * config/microblaze/microblaze.c (double_memory_operand) (microblaze_block_move_loop): Likewise. * config/mips/mips.c (mips_strip_unspec_address, mips_add_offset) (mips_setup_incoming_varargs, mips_va_start, mips_block_move_loop) (mips_print_operand, mips16e_save_restore_reg, mips_save_restore_reg) (mips_expand_prologue, mips_epilogue_set_cfa) (mips_expand_epilogue): Likewise. * config/mips/mips.md: Likewise. * config/mmix/mmix.c (mmix_dynamic_chain_address, mmix_return_addr_rtx) (mmix_expand_prologue, mmix_expand_epilogue): Likewise. * config/mn10300/mn10300.c (mn10300_gen_multiple_store) (mn10300_builtin_saveregs, mn10300_trampoline_init): Likewise. * config/moxie/moxie.h (INCOMING_RETURN_ADDR_RTX): Likewise. (EH_RETURN_HANDLER_RTX): Likewise. * config/moxie/moxie.c (moxie_static_chain): Likewise. * config/pa/pa.c (legitimize_pic_address, hppa_legitimize_address) (store_reg, set_reg_plus_d, pa_expand_prologue, load_reg) (pa_return_addr_rtx, hppa_builtin_saveregs) (pa_trampoline_init): Likewise. * config/pa/pa.md: Likewise. * config/pdp11/pdp11.c (pdp11_expand_epilogue): Likewise. * config/picochip/picochip.c (picochip_static_chain): Likewise. * config/rs6000/rs6000.h (RS6000_SAVE_TOC): Likewise. * config/rs6000/rs6000.c (rs6000_legitimize_address) (setup_incoming_varargs, print_operand, rs6000_return_addr) (rs6000_emit_eh_reg_restore, rs6000_emit_probe_stack_range) (rs6000_emit_epilogue) (rs6000_machopic_legitimize_pic_address): Likewise. * config/rx/rx.c (gen_rx_rtsd_vector, gen_rx_popm_vector): Likewise. * config/s390/s390.h (INITIAL_FRAME_ADDRESS_RTX): Likewise. (DYNAMIC_CHAIN_ADDRESS): Likewise. * config/s390/s390.c (s390_decompose_address, legitimize_pic_address) (s390_delegitimize_address, print_operand, annotate_constant_pool_refs) (replace_constant_pool_ref, s390_return_addr_rtx, s390_back_chain_rtx) (save_fpr, restore_fpr, save_gprs, restore_gprs, s390_emit_prologue) (s390_emit_epilogue, s390_function_profiler): Likewise. * config/s390/s390.md: Likewise. * config/score/score.c (score_add_offset, score_prologue): Likewise. * config/sh/sh.c (expand_block_move, push_regs, sh_builtin_saveregs) (sh_output_mi_thunk): Likewise. * config/sh/sh.md: Likewise. * config/sparc/sparc.h (DYNAMIC_CHAIN_ADDRESS, FRAME_ADDR_RTX) (RETURN_ADDR_RTX, INCOMING_RETURN_ADDR_RTX): Likewise. * config/sparc/sparc.c (sparc_legitimize_pic_address) (sparc_emit_probe_stack_range, emit_save_or_restore_regs) (emit_window_save, sparc_flat_expand_prologue, sparc_struct_value_rtx) (emit_and_preserve): Likewise. * config/sparc/sparc.md: Likewise. * config/spu/spu.h (DYNAMIC_CHAIN_ADDRESS): Likewise. * config/spu/spu.c (spu_expand_insv, spu_machine_dependent_reorg) (spu_setup_incoming_varargs, ea_load_store_inline) (spu_expand_load): Likewise. * config/stormy16/stormy16.c (xstormy16_expand_prologue) (combine_bnp): Likewise. * config/tilegx/tilegx.h (DYNAMIC_CHAIN_ADDRESS): Likewise. * config/tilegx/tilegx.c (tilegx_setup_incoming_varargs) (tilegx_expand_unaligned_load, tilegx_trampoline_init): Likewise. * config/tilepro/tilepro.h (DYNAMIC_CHAIN_ADDRESS): Likewise. * config/tilepro/tilepro.c (tilepro_setup_incoming_varargs) (tilepro_expand_unaligned_load, tilepro_trampoline_init): Likewise. * config/v850/v850.c (expand_prologue, expand_epilogue): Likewise. * config/v850/v850.md: Likewise. * config/vax/elf.h (EH_RETURN_STACKADJ_RTX): Likewise. (EH_RETURN_HANDLER_RTX): Likewise. * config/vax/vax.h (DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX): Likewise. * config/vax/vax.c (vax_add_reg_cfa_offset, vax_expand_prologue) (print_operand_address, vax_trampoline_init): Likewise. * config/xtensa/xtensa.c (xtensa_expand_prologue, xtensa_return_addr) (xtensa_function_value_regno_p): Likewise. From-SVN: r187199
2012-05-05 19:41:49 +02:00
return plus_constant (mode, y, INTVAL (x));
else if (CONST_INT_P (y))
rtl.h (plus_constant, [...]): Merge into a single plus_constant function. gcc/ * rtl.h (plus_constant, plus_constant_mode): Merge into a single plus_constant function. * explow.c (plus_constant, plus_constant_mode): Likewise. Assert that the mode is sensible. (use_anchored_address, round_push, allocate_dynamic_stack_space) (probe_stack_range, anti_adjust_stack_and_probe): Update calls to plus_constant. * alias.c (canon_rtx): Likewise. (init_alias_analysis): Likewise. * builtins.c (expand_builtin_return_addr) (expand_builtin_setjmp_setup, expand_builtin_longjmp) (expand_builtin_nonlocal_goto, expand_builtin_update_setjmp_buf) (expand_builtin_apply_args_1, expand_builtin_apply, expand_movstr) (expand_builtin_stpcpy): Likewise. * calls.c (save_fixed_argument_area, restore_fixed_argument_area) (compute_argument_addresses, internal_arg_pointer_based_exp) (expand_call, emit_library_call_value_1): Likewise. * cfgexpand.c (expand_one_stack_var_at, expand_debug_expr): Likewise. * combine-stack-adj.c (try_apply_stack_adjustment): Likewise. * combine.c (combine_simplify_rtx, force_to_mode): Likewise. * cse.c (insert_const_anchor, find_reg_offset_for_const) (use_related_value, fold_rtx): Likewise. * cselib.c (cselib_subst_to_values): Likewise. * dse.c (record_store, check_mem_read_rtx): Likewise. * dwarf2out.c (rtl_for_decl_location, gen_variable_die): Likewise. * emit-rtl.c (adjust_address_1): Likewise. * except.c (sjlj_emit_function_enter) (expand_builtin_extract_return_addr) (expand_builtin_frob_return_addr): Likewise. * expmed.c (expand_divmod): Likewise. * expr.c (move_by_pieces, store_by_pieces, store_by_pieces_1) (emit_move_resolve_push, push_block, emit_push_insn, store_expr) (expand_expr_addr_expr_1, expand_expr_real_1): Likewise. * function.c (assign_stack_local_1) (instantiate_virtual_regs_in_rtx): Likewise. * optabs.c (prepare_cmp_insn): Likewise. * recog.c (offsettable_address_addr_space_p): Likewise. * reload.c (find_reloads_address, form_sum) (find_reloads_subreg_address): Likewise. * reload1.c (init_reload, eliminate_regs_1) (eliminate_regs_in_insn): Likewise. * simplify-rtx.c (simplify_unary_operation_1) (simplify_binary_operation_1, simplify_plus_minus): Likewise. * var-tracking.c (compute_cfa_pointer, prepare_call_arguments) (vt_add_function_parameter): Likewise. * config/alpha/alpha.h (EH_RETURN_HANDLER_RTX): Likewise. * config/alpha/vms.h (EH_RETURN_HANDLER_RTX): Likewise. * config/alpha/alpha.c (alpha_legitimize_address_1) (get_unaligned_address, alpha_expand_unaligned_load) (alpha_expand_unaligned_store, alpha_expand_unaligned_load_words) (alpha_expand_unaligned_store_words, alpha_expand_block_clear) (alpha_expand_builtin_establish_vms_condition_handler) (alpha_setup_incoming_varargs, emit_frame_store_1) (alpha_expand_prologue, alpha_expand_epilogue) (alpha_use_linkage): Likewise. * config/alpha/alpha.md: Likewise. * config/arm/arm.c (arm_trampoline_init, legitimize_pic_address) (arm_load_pic_register, arm_pic_static_addr, arm_legitimize_address) (thumb_legitimize_address, arm_gen_load_multiple_1) (arm_gen_store_multiple_1, arm_gen_multiple_op, gen_ldm_seq) (gen_stm_seq, gen_const_stm_seq, arm_block_move_unaligned_straight) (arm_block_move_unaligned_loop, arm_gen_movmemqi, arm_reload_in_hi) (arm_reload_out_hi, arm_reorg, vfp_emit_fstmd, emit_multi_reg_push) (emit_sfm, thumb_set_frame_pointer, arm_expand_prologue) (thumb1_emit_multi_reg_push, thumb1_expand_prologue) (thumb_expand_movmemqi, arm_set_return_address) (thumb_set_return_address): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr.c (avr_incoming_return_addr_rtx) (avr_prologue_setup_frame, expand_epilogue) (avr_const_address_lo16): Likewise. * config/bfin/bfin.h (EH_RETURN_HANDLER_RTX): Likewise. * config/bfin/bfin.c (setup_incoming_varargs, bfin_load_pic_reg) (bfin_expand_prologue, bfin_trampoline_init, bfin_expand_call) (bfin_output_mi_thunk): Likewise. * config/c6x/c6x.c (c6x_initialize_trampoline) (c6x_output_mi_thunk): Likewise. * config/cr16/cr16.h (EH_RETURN_HANDLER_RTX): Likewise. * config/cr16/cr16.c (cr16_create_dwarf_for_multi_push): Likewise. * config/cris/cris.c (cris_return_addr_rtx, cris_split_movdx) (cris_expand_prologue, cris_expand_epilogue, cris_gen_movem_load) (cris_emit_movem_store, cris_trampoline_init): Likewise. * config/cris/cris.md: Likewise. * config/darwin.c (machopic_indirect_data_reference) (machopic_legitimize_pic_address): Likewise. * config/epiphany/epiphany.c (epiphany_emit_save_restore) (epiphany_expand_prologue, epiphany_expand_epilogue) (epiphany_trampoline_init): Likewise. * config/epiphany/epiphany.md: Likewise. * config/fr30/fr30.c (fr30_move_double): Likewise. * config/frv/frv.c (frv_dwarf_store, frv_expand_prologue) (frv_expand_block_move, frv_expand_block_clear, frv_return_addr_rtx) (frv_index_memory, unspec_got_name, frv_find_base_term) (frv_output_dwarf_dtprel): Likewise. * config/h8300/h8300.c (h8300_push_pop, h8300_return_addr_rtx) (h8300_swap_into_er6, h8300_swap_out_of_er6): Likewise. * config/i386/i386.h (RETURN_ADDR_RTX): Likewise. * config/i386/i386.c (setup_incoming_varargs_64) (setup_incoming_varargs_ms_64, choose_baseaddr) (ix86_emit_save_reg_using_mov, ix86_adjust_stack_and_probe) (ix86_emit_probe_stack_range, ix86_expand_prologue) (ix86_emit_restore_reg_using_pop, ix86_emit_leave) (ix86_expand_epilogue, legitimize_pic_address, ix86_legitimize_address) (ix86_split_long_move, ix86_expand_movmem, ix86_expand_setmem) (ix86_static_chain, ix86_trampoline_init, x86_this_parameter) (x86_output_mi_thunk): Likewise. * config/i386/i386.md: Likewise. * config/ia64/ia64.c (ia64_expand_load_address) (ia64_expand_tls_address, ia64_expand_move, ia64_split_tmode) (do_spill, ia64_trampoline_init): Likewise. * config/iq2000/iq2000.c (iq2000_va_start) (iq2000_emit_frame_related_store, iq2000_expand_prologue) (iq2000_expand_eh_return, iq2000_setup_incoming_varargs) (iq2000_print_operand, iq2000_legitimize_address): Likewise. * config/lm32/lm32.c (lm32_setup_incoming_varargs): Likewise. * config/m32c/m32c.c (m32c_return_addr_rtx) (m32c_expand_insv): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs) (m32r_legitimize_pic_address, m32r_print_operand) (m32r_print_operand_address): Likewise. * config/m68k/linux.h (FINALIZE_TRAMPOLINE): Likewise. * config/m68k/m68k.h (RETURN_ADDR_RTX): Likewise. (EH_RETURN_HANDLER_RTX): Likewise. * config/m68k/m68k.c (m68k_emit_movem, m68k_expand_prologue) (m68k_expand_epilogue, legitimize_pic_address) (m68k_output_mi_thunk): Likewise. * config/m68k/m68k.md: Likewise. * config/mcore/mcore.c (mcore_expand_prolog): Likewise. (mcore_expand_epilog): Likewise. * config/mcore/mcore.md: Likewise. * config/mep/mep.c (mep_allocate_initial_value) (mep_expand_prologue, mep_expand_epilogue): Likewise. * config/microblaze/microblaze.c (double_memory_operand) (microblaze_block_move_loop): Likewise. * config/mips/mips.c (mips_strip_unspec_address, mips_add_offset) (mips_setup_incoming_varargs, mips_va_start, mips_block_move_loop) (mips_print_operand, mips16e_save_restore_reg, mips_save_restore_reg) (mips_expand_prologue, mips_epilogue_set_cfa) (mips_expand_epilogue): Likewise. * config/mips/mips.md: Likewise. * config/mmix/mmix.c (mmix_dynamic_chain_address, mmix_return_addr_rtx) (mmix_expand_prologue, mmix_expand_epilogue): Likewise. * config/mn10300/mn10300.c (mn10300_gen_multiple_store) (mn10300_builtin_saveregs, mn10300_trampoline_init): Likewise. * config/moxie/moxie.h (INCOMING_RETURN_ADDR_RTX): Likewise. (EH_RETURN_HANDLER_RTX): Likewise. * config/moxie/moxie.c (moxie_static_chain): Likewise. * config/pa/pa.c (legitimize_pic_address, hppa_legitimize_address) (store_reg, set_reg_plus_d, pa_expand_prologue, load_reg) (pa_return_addr_rtx, hppa_builtin_saveregs) (pa_trampoline_init): Likewise. * config/pa/pa.md: Likewise. * config/pdp11/pdp11.c (pdp11_expand_epilogue): Likewise. * config/picochip/picochip.c (picochip_static_chain): Likewise. * config/rs6000/rs6000.h (RS6000_SAVE_TOC): Likewise. * config/rs6000/rs6000.c (rs6000_legitimize_address) (setup_incoming_varargs, print_operand, rs6000_return_addr) (rs6000_emit_eh_reg_restore, rs6000_emit_probe_stack_range) (rs6000_emit_epilogue) (rs6000_machopic_legitimize_pic_address): Likewise. * config/rx/rx.c (gen_rx_rtsd_vector, gen_rx_popm_vector): Likewise. * config/s390/s390.h (INITIAL_FRAME_ADDRESS_RTX): Likewise. (DYNAMIC_CHAIN_ADDRESS): Likewise. * config/s390/s390.c (s390_decompose_address, legitimize_pic_address) (s390_delegitimize_address, print_operand, annotate_constant_pool_refs) (replace_constant_pool_ref, s390_return_addr_rtx, s390_back_chain_rtx) (save_fpr, restore_fpr, save_gprs, restore_gprs, s390_emit_prologue) (s390_emit_epilogue, s390_function_profiler): Likewise. * config/s390/s390.md: Likewise. * config/score/score.c (score_add_offset, score_prologue): Likewise. * config/sh/sh.c (expand_block_move, push_regs, sh_builtin_saveregs) (sh_output_mi_thunk): Likewise. * config/sh/sh.md: Likewise. * config/sparc/sparc.h (DYNAMIC_CHAIN_ADDRESS, FRAME_ADDR_RTX) (RETURN_ADDR_RTX, INCOMING_RETURN_ADDR_RTX): Likewise. * config/sparc/sparc.c (sparc_legitimize_pic_address) (sparc_emit_probe_stack_range, emit_save_or_restore_regs) (emit_window_save, sparc_flat_expand_prologue, sparc_struct_value_rtx) (emit_and_preserve): Likewise. * config/sparc/sparc.md: Likewise. * config/spu/spu.h (DYNAMIC_CHAIN_ADDRESS): Likewise. * config/spu/spu.c (spu_expand_insv, spu_machine_dependent_reorg) (spu_setup_incoming_varargs, ea_load_store_inline) (spu_expand_load): Likewise. * config/stormy16/stormy16.c (xstormy16_expand_prologue) (combine_bnp): Likewise. * config/tilegx/tilegx.h (DYNAMIC_CHAIN_ADDRESS): Likewise. * config/tilegx/tilegx.c (tilegx_setup_incoming_varargs) (tilegx_expand_unaligned_load, tilegx_trampoline_init): Likewise. * config/tilepro/tilepro.h (DYNAMIC_CHAIN_ADDRESS): Likewise. * config/tilepro/tilepro.c (tilepro_setup_incoming_varargs) (tilepro_expand_unaligned_load, tilepro_trampoline_init): Likewise. * config/v850/v850.c (expand_prologue, expand_epilogue): Likewise. * config/v850/v850.md: Likewise. * config/vax/elf.h (EH_RETURN_STACKADJ_RTX): Likewise. (EH_RETURN_HANDLER_RTX): Likewise. * config/vax/vax.h (DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX): Likewise. * config/vax/vax.c (vax_add_reg_cfa_offset, vax_expand_prologue) (print_operand_address, vax_trampoline_init): Likewise. * config/xtensa/xtensa.c (xtensa_expand_prologue, xtensa_return_addr) (xtensa_function_value_regno_p): Likewise. From-SVN: r187199
2012-05-05 19:41:49 +02:00
return plus_constant (mode, x, INTVAL (y));
1992-02-28 11:23:25 +01:00
else if (CONSTANT_P (x))
tem = x, x = y, y = tem;
if (GET_CODE (x) == PLUS && CONSTANT_P (XEXP (x, 1)))
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
return form_sum (mode, XEXP (x, 0), form_sum (mode, XEXP (x, 1), y));
1992-02-28 11:23:25 +01:00
/* Note that if the operands of Y are specified in the opposite
order in the recursive calls below, infinite recursion will occur. */
if (GET_CODE (y) == PLUS && CONSTANT_P (XEXP (y, 1)))
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
return form_sum (mode, form_sum (mode, x, XEXP (y, 0)), XEXP (y, 1));
1992-02-28 11:23:25 +01:00
/* If both constant, encapsulate sum. Otherwise, just form sum. A
constant will have been placed second. */
if (CONSTANT_P (x) && CONSTANT_P (y))
{
if (GET_CODE (x) == CONST)
x = XEXP (x, 0);
if (GET_CODE (y) == CONST)
y = XEXP (y, 0);
return gen_rtx_CONST (VOIDmode, gen_rtx_PLUS (mode, x, y));
1992-02-28 11:23:25 +01:00
}
return gen_rtx_PLUS (mode, x, y);
1992-02-28 11:23:25 +01:00
}
/* If ADDR is a sum containing a pseudo register that should be
replaced with a constant (from reg_equiv_constant),
return the result of doing so, and also apply the associative
law so that the result is more likely to be a valid address.
(But it is not guaranteed to be one.)
Note that at most one register is replaced, even if more are
replaceable. Also, we try to put the result into a canonical form
so it is more likely to be a valid address.
In all other cases, return ADDR. */
static rtx
subst_indexed_address (rtx addr)
1992-02-28 11:23:25 +01:00
{
rtx op0 = 0, op1 = 0, op2 = 0;
rtx tem;
int regno;
if (GET_CODE (addr) == PLUS)
{
/* Try to find a register to replace. */
op0 = XEXP (addr, 0), op1 = XEXP (addr, 1), op2 = 0;
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 (op0)
1992-02-28 11:23:25 +01:00
&& (regno = REGNO (op0)) >= FIRST_PSEUDO_REGISTER
&& reg_renumber[regno] < 0
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
&& reg_equiv_constant (regno) != 0)
op0 = reg_equiv_constant (regno);
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
else if (REG_P (op1)
&& (regno = REGNO (op1)) >= FIRST_PSEUDO_REGISTER
&& reg_renumber[regno] < 0
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
&& reg_equiv_constant (regno) != 0)
op1 = reg_equiv_constant (regno);
1992-02-28 11:23:25 +01:00
else if (GET_CODE (op0) == PLUS
&& (tem = subst_indexed_address (op0)) != op0)
op0 = tem;
else if (GET_CODE (op1) == PLUS
&& (tem = subst_indexed_address (op1)) != op1)
op1 = tem;
else
return addr;
/* Pick out up to three things to add. */
if (GET_CODE (op1) == PLUS)
op2 = XEXP (op1, 1), op1 = XEXP (op1, 0);
else if (GET_CODE (op0) == PLUS)
op2 = op1, op1 = XEXP (op0, 1), op0 = XEXP (op0, 0);
/* Compute the sum. */
if (op2 != 0)
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
op1 = form_sum (GET_MODE (addr), op1, op2);
1992-02-28 11:23:25 +01:00
if (op1 != 0)
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
op0 = form_sum (GET_MODE (addr), op0, op1);
1992-02-28 11:23:25 +01:00
return op0;
}
return addr;
}
/* Update the REG_INC notes for an insn. It updates all REG_INC
notes for the instruction which refer to REGNO the to refer
to the reload number.
INSN is the insn for which any REG_INC notes need updating.
REGNO is the register number which has been reloaded.
RELOADNUM is the reload number. */
static void
reload: Use rtx_insn (also touches caller-save.c and config/arc/arc) gcc/ * reload.h (struct insn_chain): Strengthen field "insn" from rtx to rtx_insn *. (find_reloads): Likewise for param 1. (subst_reloads): Likewise for sole param. (find_equiv_reg): Likwise for param 2. (regno_clobbered_p): Likwise for param 2. (reload): Likewise for param 1. * caller-save.c (save_call_clobbered_regs): Strengthen local "insn" from rtx to rtx_insn *. (insert_one_insn): Likewise for local "insn". * reload.c (this_insn): Likewise for this global. (find_reloads): Likewise for param "insn". (find_reloads_toplev): Likewise. (find_reloads_address): Likewise. (subst_reg_equivs): Likewise. (update_auto_inc_notes): Likewise. (find_reloads_address_1): Likewise. (find_reloads_subreg_address): Likewise. (subst_reloads): Likewise. (find_equiv_reg): Likewise, also for local "p". (regno_clobbered_p): Likewise for param "insn". * reload1.c (reg_reloaded_insn): Likewise for the elements of this array. (spill_reg_store): Likewise for the elements of this array. (remove_init_insns): Likewise for local "equiv_insn". (will_delete_init_insn_p): Likewise for param "insn". (reload): Likewise for param ""first" and local "insn". (calculate_needs_all_insns): Strengthen local "insn" from rtx to rtx_insn *. (calculate_elim_costs_all_insns): Likewise. (delete_caller_save_insns): Likewise. (spill_failure): Likewise for param "insn". (delete_dead_insn): Likewise. (set_label_offsets): Likewise. (eliminate_regs_in_insn): Likewise, also for locals "base_insn" and "prev_insn". (elimination_costs_in_insn): Likewise for param "insn". (set_initial_eh_label_offset): Replace use of NULL_RTX with NULL when referring to an insn. (set_initial_label_offsets): Likewise. (set_offsets_for_label): Strengthen param "insn" from rtx to rtx_insn *. (init_eliminable_invariants): Likewise for param "first" and local "insn". (fixup_eh_region_note): Likewise for param "insn". (reload_as_needed): Likewise for locals "prev", "insn", "old_next", "old_prev", "next". (gen_reload_chain_without_interm_reg_p): Likewise for locals "insn", "last". (reload_inheritance_insn): Strengthen elements of this array from rtx to rtx_insn *. (failed_reload): Likewise for param "insn". (choose_reload_regs): Likewise for local "insn". Replace use of NULL_RTX with NULL when referring to an insn. (input_reload_insns): Strengthen elements of this array from rtx to rtx_insn *. (other_input_address_reload_insns): Likewise for this global. (other_input_reload_insns): Likewise for this global. (input_address_reload_insns): Likwise for the elements of this array. (inpaddr_address_reload_insns): Likwise for the elements of this array. (output_reload_insns): Likewise for the elements of this array. (output_address_reload_insns): Likewise for the elements of this array. (outaddr_address_reload_insns): Likewise for the elements of this array. (operand_reload_insns): Likewise for this global. (other_operand_reload_insns): Likewise for this global. (other_output_reload_insns): Likewise for the elements of this array. (new_spill_reg_store): Likewise for the elements of this array. (emit_input_reload_insns): Likewise for locals "insn", "temp". Strengthen local "where" from rtx * to rtx_insn **. (emit_output_reload_insns): Strengthen locals "insn", "p", "next" from rtx to rtx_insn *. (do_input_reload): Likewise for local "insn". (do_output_reload): Likewise for local "insn". (emit_reload_insns): Likewise for locals "insn" and "store_insn". (emit_insn_if_valid_for_reload): Likewise for return type and local "last". Add checked cast to rtx_insn when returning "insn" since this has been through emit_insn. (gen_reload): Strengthen return type and locals "last", "insn", "set" from rtx to rtx_insn *. Add checked cast to rtx_insn when returning "insn" since it's been through emit_insn_if_valid_for_reload at this point. (delete_output_reload): Strengthen param "insn" and locals "output_reload_insn", "i2" from rtx to rtx_insn *. (delete_address_reloads): Likewise for params "dead_insn", "current_insn" and locals "prev", "next". (delete_address_reloads_1): Likewise for params "dead_insn", "current_insn" and locals "prev", "i2". (inc_for_reload): Likewise for locals "last", "add_insn". (add_auto_inc_notes): Strengthen param "insn" from rtx to rtx_insn *. * config/arc/arc-protos.h (regno_clobbered_p): Likewise for 2nd param of this duplicate of the prototype from reload.h From-SVN: r214370
2014-08-22 22:49:31 +02:00
update_auto_inc_notes (rtx_insn *insn ATTRIBUTE_UNUSED, int regno ATTRIBUTE_UNUSED,
int reloadnum ATTRIBUTE_UNUSED)
{
#ifdef AUTO_INC_DEC
rtx link;
for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
if (REG_NOTE_KIND (link) == REG_INC
&& (int) REGNO (XEXP (link, 0)) == regno)
push_replacement (&XEXP (link, 0), reloadnum, VOIDmode);
#endif
}
/* Record the pseudo registers we must reload into hard registers in a
subexpression of a would-be memory address, X referring to a value
in mode MODE. (This function is not called if the address we find
is strictly valid.)
1992-02-28 11:23:25 +01:00
CONTEXT = 1 means we are considering regs as index regs,
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
= 0 means we are considering them as base regs.
OUTER_CODE is the code of the enclosing RTX, typically a MEM, a PLUS,
or an autoinc code.
If CONTEXT == 0 and OUTER_CODE is a PLUS or LO_SUM, then INDEX_CODE
is the code of the index part of the address. Otherwise, pass SCRATCH
for this argument.
OPNUM and TYPE specify the purpose of any reloads made.
1992-02-28 11:23:25 +01:00
IND_LEVELS says how many levels of indirect addressing are
supported at this point in the address.
INSN, if nonzero, is the insn in which we do the reload. It is used
to determine if we may generate output reloads.
1992-02-28 11:23:25 +01:00
We return nonzero if X, as a whole, is reloaded or replaced. */
/* Note that we take shortcuts assuming that no multi-reg machine mode
occurs as part of an address.
Also, this is not fully machine-customizable; it works for machines
such as VAXen and 68000's and 32000's, but other possible machines
could have addressing modes that this does not handle right.
If you add push_reload calls here, you need to make sure gen_reload
handles those cases gracefully. */
1992-02-28 11:23:25 +01:00
static int
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
find_reloads_address_1 (enum machine_mode mode, addr_space_t as,
rtx x, int context,
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
enum rtx_code outer_code, enum rtx_code index_code,
rtx *loc, int opnum, enum reload_type type,
reload: Use rtx_insn (also touches caller-save.c and config/arc/arc) gcc/ * reload.h (struct insn_chain): Strengthen field "insn" from rtx to rtx_insn *. (find_reloads): Likewise for param 1. (subst_reloads): Likewise for sole param. (find_equiv_reg): Likwise for param 2. (regno_clobbered_p): Likwise for param 2. (reload): Likewise for param 1. * caller-save.c (save_call_clobbered_regs): Strengthen local "insn" from rtx to rtx_insn *. (insert_one_insn): Likewise for local "insn". * reload.c (this_insn): Likewise for this global. (find_reloads): Likewise for param "insn". (find_reloads_toplev): Likewise. (find_reloads_address): Likewise. (subst_reg_equivs): Likewise. (update_auto_inc_notes): Likewise. (find_reloads_address_1): Likewise. (find_reloads_subreg_address): Likewise. (subst_reloads): Likewise. (find_equiv_reg): Likewise, also for local "p". (regno_clobbered_p): Likewise for param "insn". * reload1.c (reg_reloaded_insn): Likewise for the elements of this array. (spill_reg_store): Likewise for the elements of this array. (remove_init_insns): Likewise for local "equiv_insn". (will_delete_init_insn_p): Likewise for param "insn". (reload): Likewise for param ""first" and local "insn". (calculate_needs_all_insns): Strengthen local "insn" from rtx to rtx_insn *. (calculate_elim_costs_all_insns): Likewise. (delete_caller_save_insns): Likewise. (spill_failure): Likewise for param "insn". (delete_dead_insn): Likewise. (set_label_offsets): Likewise. (eliminate_regs_in_insn): Likewise, also for locals "base_insn" and "prev_insn". (elimination_costs_in_insn): Likewise for param "insn". (set_initial_eh_label_offset): Replace use of NULL_RTX with NULL when referring to an insn. (set_initial_label_offsets): Likewise. (set_offsets_for_label): Strengthen param "insn" from rtx to rtx_insn *. (init_eliminable_invariants): Likewise for param "first" and local "insn". (fixup_eh_region_note): Likewise for param "insn". (reload_as_needed): Likewise for locals "prev", "insn", "old_next", "old_prev", "next". (gen_reload_chain_without_interm_reg_p): Likewise for locals "insn", "last". (reload_inheritance_insn): Strengthen elements of this array from rtx to rtx_insn *. (failed_reload): Likewise for param "insn". (choose_reload_regs): Likewise for local "insn". Replace use of NULL_RTX with NULL when referring to an insn. (input_reload_insns): Strengthen elements of this array from rtx to rtx_insn *. (other_input_address_reload_insns): Likewise for this global. (other_input_reload_insns): Likewise for this global. (input_address_reload_insns): Likwise for the elements of this array. (inpaddr_address_reload_insns): Likwise for the elements of this array. (output_reload_insns): Likewise for the elements of this array. (output_address_reload_insns): Likewise for the elements of this array. (outaddr_address_reload_insns): Likewise for the elements of this array. (operand_reload_insns): Likewise for this global. (other_operand_reload_insns): Likewise for this global. (other_output_reload_insns): Likewise for the elements of this array. (new_spill_reg_store): Likewise for the elements of this array. (emit_input_reload_insns): Likewise for locals "insn", "temp". Strengthen local "where" from rtx * to rtx_insn **. (emit_output_reload_insns): Strengthen locals "insn", "p", "next" from rtx to rtx_insn *. (do_input_reload): Likewise for local "insn". (do_output_reload): Likewise for local "insn". (emit_reload_insns): Likewise for locals "insn" and "store_insn". (emit_insn_if_valid_for_reload): Likewise for return type and local "last". Add checked cast to rtx_insn when returning "insn" since this has been through emit_insn. (gen_reload): Strengthen return type and locals "last", "insn", "set" from rtx to rtx_insn *. Add checked cast to rtx_insn when returning "insn" since it's been through emit_insn_if_valid_for_reload at this point. (delete_output_reload): Strengthen param "insn" and locals "output_reload_insn", "i2" from rtx to rtx_insn *. (delete_address_reloads): Likewise for params "dead_insn", "current_insn" and locals "prev", "next". (delete_address_reloads_1): Likewise for params "dead_insn", "current_insn" and locals "prev", "i2". (inc_for_reload): Likewise for locals "last", "add_insn". (add_auto_inc_notes): Strengthen param "insn" from rtx to rtx_insn *. * config/arc/arc-protos.h (regno_clobbered_p): Likewise for 2nd param of this duplicate of the prototype from reload.h From-SVN: r214370
2014-08-22 22:49:31 +02:00
int ind_levels, rtx_insn *insn)
1992-02-28 11:23:25 +01:00
{
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
#define REG_OK_FOR_CONTEXT(CONTEXT, REGNO, MODE, AS, OUTER, INDEX) \
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
((CONTEXT) == 0 \
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
? regno_ok_for_base_p (REGNO, MODE, AS, OUTER, INDEX) \
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
: REGNO_OK_FOR_INDEX_P (REGNO))
enum reg_class context_reg_class;
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_CODE code = GET_CODE (x);
bool reloaded_inner_of_autoinc = false;
1992-02-28 11:23:25 +01:00
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
if (context == 1)
context_reg_class = INDEX_REG_CLASS;
else
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
context_reg_class = base_reg_class (mode, as, outer_code, index_code);
switch (code)
1992-02-28 11:23:25 +01:00
{
case PLUS:
{
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 orig_op0 = XEXP (x, 0);
rtx orig_op1 = XEXP (x, 1);
RTX_CODE code0 = GET_CODE (orig_op0);
RTX_CODE code1 = GET_CODE (orig_op1);
rtx op0 = orig_op0;
rtx op1 = orig_op1;
if (GET_CODE (op0) == SUBREG)
{
op0 = SUBREG_REG (op0);
code0 = GET_CODE (op0);
if (code0 == REG && REGNO (op0) < FIRST_PSEUDO_REGISTER)
op0 = gen_rtx_REG (word_mode,
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 (op0) +
subreg_regno_offset (REGNO (SUBREG_REG (orig_op0)),
GET_MODE (SUBREG_REG (orig_op0)),
SUBREG_BYTE (orig_op0),
GET_MODE (orig_op0))));
}
if (GET_CODE (op1) == SUBREG)
{
op1 = SUBREG_REG (op1);
code1 = GET_CODE (op1);
if (code1 == REG && REGNO (op1) < 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
/* ??? Why is this given op1's mode and above for
??? op0 SUBREGs we use word_mode? */
op1 = gen_rtx_REG (GET_MODE (op1),
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 (op1) +
subreg_regno_offset (REGNO (SUBREG_REG (orig_op1)),
GET_MODE (SUBREG_REG (orig_op1)),
SUBREG_BYTE (orig_op1),
GET_MODE (orig_op1))));
}
/* Plus in the index register may be created only as a result of
register rematerialization for expression like &localvar*4. Reload it.
It may be possible to combine the displacement on the outer level,
but it is probably not worthwhile to do so. */
if (context == 1)
{
find_reloads_address (GET_MODE (x), loc, XEXP (x, 0), &XEXP (x, 0),
opnum, ADDR_TYPE (type), ind_levels, insn);
push_reload (*loc, NULL_RTX, loc, (rtx*) 0,
context_reg_class,
GET_MODE (x), VOIDmode, 0, 0, opnum, type);
return 1;
}
if (code0 == MULT || code0 == SIGN_EXTEND || code0 == TRUNCATE
|| code0 == ZERO_EXTEND || code1 == MEM)
{
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
find_reloads_address_1 (mode, as, orig_op0, 1, PLUS, SCRATCH,
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
&XEXP (x, 0), opnum, type, ind_levels,
insn);
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
find_reloads_address_1 (mode, as, orig_op1, 0, PLUS, code0,
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
&XEXP (x, 1), opnum, type, ind_levels,
insn);
}
else if (code1 == MULT || code1 == SIGN_EXTEND || code1 == TRUNCATE
|| code1 == ZERO_EXTEND || code0 == MEM)
{
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
find_reloads_address_1 (mode, as, orig_op0, 0, PLUS, code1,
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
&XEXP (x, 0), opnum, type, ind_levels,
insn);
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
find_reloads_address_1 (mode, as, orig_op1, 1, PLUS, SCRATCH,
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
&XEXP (x, 1), opnum, type, ind_levels,
insn);
}
else if (code0 == CONST_INT || code0 == CONST
|| code0 == SYMBOL_REF || code0 == LABEL_REF)
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
find_reloads_address_1 (mode, as, orig_op1, 0, PLUS, code0,
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
&XEXP (x, 1), opnum, type, ind_levels,
insn);
else if (code1 == CONST_INT || code1 == CONST
|| code1 == SYMBOL_REF || code1 == LABEL_REF)
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
find_reloads_address_1 (mode, as, orig_op0, 0, PLUS, code1,
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
&XEXP (x, 0), opnum, type, ind_levels,
insn);
else if (code0 == REG && code1 == REG)
{
if (REGNO_OK_FOR_INDEX_P (REGNO (op1))
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
&& regno_ok_for_base_p (REGNO (op0), mode, as, PLUS, REG))
return 0;
else if (REGNO_OK_FOR_INDEX_P (REGNO (op0))
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
&& regno_ok_for_base_p (REGNO (op1), mode, as, PLUS, REG))
return 0;
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
else if (regno_ok_for_base_p (REGNO (op0), mode, as, PLUS, REG))
find_reloads_address_1 (mode, as, orig_op1, 1, PLUS, SCRATCH,
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
&XEXP (x, 1), opnum, type, ind_levels,
insn);
else if (REGNO_OK_FOR_INDEX_P (REGNO (op1)))
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
find_reloads_address_1 (mode, as, orig_op0, 0, PLUS, REG,
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
&XEXP (x, 0), opnum, type, ind_levels,
insn);
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
else if (regno_ok_for_base_p (REGNO (op1), mode, as, PLUS, REG))
find_reloads_address_1 (mode, as, orig_op0, 1, PLUS, SCRATCH,
&XEXP (x, 0), opnum, type, ind_levels,
insn);
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
else if (REGNO_OK_FOR_INDEX_P (REGNO (op0)))
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
find_reloads_address_1 (mode, as, orig_op1, 0, PLUS, REG,
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
&XEXP (x, 1), opnum, type, ind_levels,
insn);
else
{
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
find_reloads_address_1 (mode, as, orig_op0, 0, PLUS, REG,
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
&XEXP (x, 0), opnum, type, ind_levels,
insn);
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
find_reloads_address_1 (mode, as, orig_op1, 1, PLUS, SCRATCH,
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
&XEXP (x, 1), opnum, type, ind_levels,
insn);
}
}
else if (code0 == REG)
{
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
find_reloads_address_1 (mode, as, orig_op0, 1, PLUS, SCRATCH,
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
&XEXP (x, 0), opnum, type, ind_levels,
insn);
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
find_reloads_address_1 (mode, as, orig_op1, 0, PLUS, REG,
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
&XEXP (x, 1), opnum, type, ind_levels,
insn);
}
else if (code1 == REG)
{
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
find_reloads_address_1 (mode, as, orig_op1, 1, PLUS, SCRATCH,
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
&XEXP (x, 1), opnum, type, ind_levels,
insn);
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
find_reloads_address_1 (mode, as, orig_op0, 0, PLUS, REG,
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
&XEXP (x, 0), opnum, type, ind_levels,
insn);
}
}
return 0;
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 POST_MODIFY:
case PRE_MODIFY:
{
rtx op0 = XEXP (x, 0);
rtx op1 = XEXP (x, 1);
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
enum rtx_code index_code;
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
int regno;
int reloadnum;
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
if (GET_CODE (op1) != PLUS && GET_CODE (op1) != MINUS)
return 0;
/* Currently, we only support {PRE,POST}_MODIFY constructs
where a base register is {inc,dec}remented by the contents
of another register or by a constant value. Thus, these
operands must match. */
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 (op0 == XEXP (op1, 0));
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
/* Require index register (or constant). Let's just handle the
register case in the meantime... If the target allows
auto-modify by a constant then we could try replacing a pseudo
register with its equivalent constant where applicable.
We also handle the case where the register was eliminated
resulting in a PLUS subexpression.
If we later decide to reload the whole PRE_MODIFY or
POST_MODIFY, inc_for_reload might clobber the reload register
before reading the index. The index register might therefore
need to live longer than a TYPE reload normally would, so be
conservative and class it as RELOAD_OTHER. */
if ((REG_P (XEXP (op1, 1))
&& !REGNO_OK_FOR_INDEX_P (REGNO (XEXP (op1, 1))))
|| GET_CODE (XEXP (op1, 1)) == PLUS)
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
find_reloads_address_1 (mode, as, XEXP (op1, 1), 1, code, SCRATCH,
&XEXP (op1, 1), opnum, RELOAD_OTHER,
ind_levels, insn);
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
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 (XEXP (op1, 0)));
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
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
regno = REGNO (XEXP (op1, 0));
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
index_code = GET_CODE (XEXP (op1, 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
/* A register that is incremented cannot be constant! */
gcc_assert (regno < FIRST_PSEUDO_REGISTER
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
|| reg_equiv_constant (regno) == 0);
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
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
/* Handle a register that is equivalent to a memory location
which cannot be addressed directly. */
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
if (reg_equiv_memory_loc (regno) != 0
&& (reg_equiv_address (regno) != 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
|| num_not_at_initial_offset))
{
rtx tem = make_memloc (XEXP (x, 0), regno);
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
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
if (reg_equiv_address (regno)
|| ! rtx_equal_p (tem, reg_equiv_mem (regno)))
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
{
rtx orig = tem;
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
/* First reload the memory location's address.
We can't use ADDR_TYPE (type) here, because we need to
write back the value after reading it, hence we actually
need two registers. */
find_reloads_address (GET_MODE (tem), &tem, XEXP (tem, 0),
&XEXP (tem, 0), opnum,
RELOAD_OTHER,
ind_levels, insn);
if (!rtx_equal_p (tem, orig))
push_reg_equiv_alt_mem (regno, tem);
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
/* Then reload the memory location into a base
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
register. */
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
reloadnum = push_reload (tem, tem, &XEXP (x, 0),
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
&XEXP (op1, 0),
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
base_reg_class (mode, as,
code, index_code),
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
GET_MODE (x), GET_MODE (x), 0,
0, opnum, RELOAD_OTHER);
update_auto_inc_notes (this_insn, regno, reloadnum);
return 0;
}
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
}
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
if (reg_renumber[regno] >= 0)
regno = reg_renumber[regno];
/* We require a base register here... */
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
if (!regno_ok_for_base_p (regno, GET_MODE (x), as, code, index_code))
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
{
reloadnum = push_reload (XEXP (op1, 0), XEXP (x, 0),
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
&XEXP (op1, 0), &XEXP (x, 0),
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
base_reg_class (mode, as,
code, index_code),
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
GET_MODE (x), GET_MODE (x), 0, 0,
opnum, RELOAD_OTHER);
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
update_auto_inc_notes (this_insn, regno, reloadnum);
return 0;
}
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 0;
case POST_INC:
case POST_DEC:
case PRE_INC:
case PRE_DEC:
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 (XEXP (x, 0)))
1992-02-28 11:23:25 +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 regno = REGNO (XEXP (x, 0));
1992-02-28 11:23:25 +01:00
int value = 0;
rtx x_orig = x;
/* A register that is incremented cannot be constant! */
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 < FIRST_PSEUDO_REGISTER
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
|| reg_equiv_constant (regno) == 0);
1992-02-28 11:23:25 +01:00
/* Handle a register that is equivalent to a memory location
which cannot be addressed directly. */
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
if (reg_equiv_memory_loc (regno) != 0
&& (reg_equiv_address (regno) != 0 || num_not_at_initial_offset))
1992-02-28 11:23:25 +01:00
{
rtx tem = make_memloc (XEXP (x, 0), regno);
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
if (reg_equiv_address (regno)
|| ! rtx_equal_p (tem, reg_equiv_mem (regno)))
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
{
rtx orig = tem;
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
/* First reload the memory location's address.
We can't use ADDR_TYPE (type) here, because we need to
write back the value after reading it, hence we actually
need two registers. */
find_reloads_address (GET_MODE (tem), &tem, XEXP (tem, 0),
&XEXP (tem, 0), opnum, type,
ind_levels, insn);
reloaded_inner_of_autoinc = true;
if (!rtx_equal_p (tem, orig))
push_reg_equiv_alt_mem (regno, tem);
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
/* Put this inside a new increment-expression. */
x = gen_rtx_fmt_e (GET_CODE (x), GET_MODE (x), tem);
/* Proceed to reload that, as if it contained a register. */
}
1992-02-28 11:23:25 +01:00
}
/* If we have a hard register that is ok in this incdec context,
don't make a reload. If the register isn't nice enough for
autoincdec, we can reload it. But, if an autoincrement of a
register that we here verified as playing nice, still outside
1992-02-28 11:23:25 +01:00
isn't "valid", it must be that no autoincrement is "valid".
If that is true and something made an autoincrement anyway,
this must be a special context where one is allowed.
(For example, a "push" instruction.)
We can't improve this address, so leave it alone. */
/* Otherwise, reload the autoincrement into a suitable hard reg
and record how much to increment by. */
if (reg_renumber[regno] >= 0)
regno = reg_renumber[regno];
if (regno >= FIRST_PSEUDO_REGISTER
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
|| !REG_OK_FOR_CONTEXT (context, regno, mode, as, code,
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
index_code))
1992-02-28 11:23:25 +01:00
{
int reloadnum;
/* If we can output the register afterwards, do so, this
saves the extra update.
We can do so if we have an INSN - i.e. no JUMP_INSN nor
CALL_INSN - and it does not set CC0.
But don't do this if we cannot directly address the
memory location, since this will make it harder to
1997-12-07 01:31:01 +01:00
reuse address reloads, and increases register pressure.
Also don't do this if we can probably update x directly. */
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
rtx equiv = (MEM_P (XEXP (x, 0))
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
? XEXP (x, 0)
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
: reg_equiv_mem (regno));
enum insn_code icode = optab_handler (add_optab, GET_MODE (x));
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 (insn && NONJUMP_INSN_P (insn) && equiv
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
&& memory_operand (equiv, GET_MODE (equiv))
#ifdef HAVE_cc0
&& ! sets_cc0_p (PATTERN (insn))
#endif
&& ! (icode != CODE_FOR_nothing
&& insn_operand_matches (icode, 0, equiv)
&& insn_operand_matches (icode, 1, equiv))
/* Using RELOAD_OTHER means we emit this and the reload we
made earlier in the wrong order. */
&& !reloaded_inner_of_autoinc)
{
/* We use the original pseudo for loc, so that
emit_reload_insns() knows which pseudo this
reload refers to and updates the pseudo rtx, not
its equivalent memory location, as well as the
corresponding entry in reg_last_reload_reg. */
loc = &XEXP (x_orig, 0);
x = XEXP (x, 0);
reloadnum
= push_reload (x, x, loc, loc,
context_reg_class,
GET_MODE (x), GET_MODE (x), 0, 0,
opnum, RELOAD_OTHER);
}
else
{
reloadnum
= push_reload (x, x, loc, (rtx*) 0,
context_reg_class,
GET_MODE (x), GET_MODE (x), 0, 0,
opnum, type);
rld[reloadnum].inc
= find_inc_amount (PATTERN (this_insn), XEXP (x_orig, 0));
value = 1;
}
1992-02-28 11:23:25 +01:00
update_auto_inc_notes (this_insn, REGNO (XEXP (x_orig, 0)),
reloadnum);
1992-02-28 11:23:25 +01:00
}
return value;
}
return 0;
case TRUNCATE:
case SIGN_EXTEND:
case ZERO_EXTEND:
/* Look for parts to reload in the inner expression and reload them
too, in addition to this operation. Reloading all inner parts in
addition to this one shouldn't be necessary, but at this point,
we don't know if we can possibly omit any part that *can* be
reloaded. Targets that are better off reloading just either part
(or perhaps even a different part of an outer expression), should
define LEGITIMIZE_RELOAD_ADDRESS. */
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
find_reloads_address_1 (GET_MODE (XEXP (x, 0)), as, XEXP (x, 0),
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
context, code, SCRATCH, &XEXP (x, 0), opnum,
type, ind_levels, insn);
push_reload (x, NULL_RTX, loc, (rtx*) 0,
context_reg_class,
GET_MODE (x), VOIDmode, 0, 0, opnum, type);
return 1;
case MEM:
/* This is probably the result of a substitution, by eliminate_regs, of
an equivalent address for a pseudo that was not allocated to a hard
register. Verify that the specified address is valid and reload it
into a register.
1992-02-28 11:23:25 +01:00
Since we know we are going to reload this item, don't decrement for
the indirection level.
1992-02-28 11:23:25 +01:00
Note that this is actually conservative: it would be slightly more
efficient to use the value of SPILL_INDIRECT_LEVELS from
reload1.c here. */
find_reloads_address (GET_MODE (x), loc, XEXP (x, 0), &XEXP (x, 0),
opnum, ADDR_TYPE (type), ind_levels, insn);
push_reload (*loc, NULL_RTX, loc, (rtx*) 0,
context_reg_class,
GET_MODE (x), VOIDmode, 0, 0, opnum, type);
1992-02-28 11:23:25 +01:00
return 1;
case REG:
{
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 regno = REGNO (x);
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
if (reg_equiv_constant (regno) != 0)
{
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
find_reloads_address_part (reg_equiv_constant (regno), loc,
context_reg_class,
GET_MODE (x), opnum, type, ind_levels);
return 1;
}
1992-02-28 11:23:25 +01:00
#if 0 /* This might screw code in reload1.c to delete prior output-reload
that feeds this insn. */
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
if (reg_equiv_mem (regno) != 0)
{
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
push_reload (reg_equiv_mem (regno), NULL_RTX, loc, (rtx*) 0,
context_reg_class,
GET_MODE (x), VOIDmode, 0, 0, opnum, type);
return 1;
}
1992-02-28 11:23:25 +01:00
#endif
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
if (reg_equiv_memory_loc (regno)
&& (reg_equiv_address (regno) != 0 || num_not_at_initial_offset))
{
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
rtx tem = make_memloc (x, regno);
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
if (reg_equiv_address (regno) != 0
|| ! rtx_equal_p (tem, reg_equiv_mem (regno)))
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
{
x = tem;
find_reloads_address (GET_MODE (x), &x, XEXP (x, 0),
&XEXP (x, 0), opnum, ADDR_TYPE (type),
ind_levels, insn);
if (!rtx_equal_p (x, tem))
push_reg_equiv_alt_mem (regno, x);
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
}
}
1992-02-28 11:23:25 +01:00
if (reg_renumber[regno] >= 0)
regno = reg_renumber[regno];
if (regno >= FIRST_PSEUDO_REGISTER
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
|| !REG_OK_FOR_CONTEXT (context, regno, mode, as, outer_code,
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
index_code))
{
push_reload (x, NULL_RTX, loc, (rtx*) 0,
context_reg_class,
GET_MODE (x), VOIDmode, 0, 0, opnum, type);
return 1;
}
/* If a register appearing in an address is the subject of a CLOBBER
in this insn, reload it into some other register to be safe.
The CLOBBER is supposed to make the register unavailable
from before this insn to after it. */
if (regno_clobbered_p (regno, this_insn, GET_MODE (x), 0))
{
push_reload (x, NULL_RTX, loc, (rtx*) 0,
context_reg_class,
GET_MODE (x), VOIDmode, 0, 0, opnum, type);
return 1;
}
}
return 0;
case 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
if (REG_P (SUBREG_REG (x)))
1992-02-28 11:23:25 +01:00
{
/* If this is a SUBREG of a hard register and the resulting register
is of the wrong class, reload the whole SUBREG. This avoids
needless copies if SUBREG_REG is multi-word. */
if (REGNO (SUBREG_REG (x)) < FIRST_PSEUDO_REGISTER)
{
int regno ATTRIBUTE_UNUSED = subreg_regno (x);
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
if (!REG_OK_FOR_CONTEXT (context, regno, mode, as, outer_code,
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
index_code))
{
push_reload (x, NULL_RTX, loc, (rtx*) 0,
context_reg_class,
GET_MODE (x), VOIDmode, 0, 0, opnum, type);
return 1;
}
}
1995-08-28 12:54:22 +02:00
/* If this is a SUBREG of a pseudo-register, and the pseudo-register
is larger than the class size, then reload the whole SUBREG. */
else
{
enum reg_class rclass = context_reg_class;
target.def (class_max_nregs): New hook. * target.def (class_max_nregs): New hook. * doc/tm.texi.in (TARGET_CLASS_MAX_NREGS): Document. * doc/tm.texi: Regenerate. * targhooks.c (default_class_max_nregs): New function. * targhooks.h (default_class_max_nregs): Declare. * ira.h (target_ira): Change type x_ira_reg_class_max_nregs and x_ira_reg_class_min_nregs arrays to unsigned char. * ira.c (setup_reg_class_nregs): Use TARGET_CLASS_MAX_NREGS target hook instead of CLASS_MAX_NREGS macro. * reginfo.c (restore_register_info): Ditto. * ira-conflicts.c (process_regs_for_copy): Use ira_reg_class_max_nregs array instead of CLASS_MAX_NREGS macro. Change type rclass and aclass vars to reg_class_t. * ira-costs.c (record_reg_classes): Use ira_reg_class_max_nregs array instead of CLASS_MAX_NREGS macro. Change type rclass var to reg_class_t. * reload.c (combine_reloads, find_reloads, find_reloads_address_1): Use ira_reg_class_max_nregs array instead of CLASS_MAX_NREGS macro. * config/i386/i386.h (CLASS_MAX_NREGS): Remove. * config/i386/i386.c (ix86_class_max_nregs): New function. (ix86_register_move_cost): Use TARGET_CLASS_MAX_NREGS target hook instead of CLASS_MAX_NREGS macro. (TARGET_CLASS_MAX_NREGS): Define. * config/avr/avr.h (CLASS_MAX_NREGS): Remove. * config/avr/avr-protos.h (class_max_nregs): Remove declaration. * config/avr/avr.c (class_max_nregs): Remove function. * config/alpha/alpha.h (CLASS_MAX_NREGS): Remove. * config/spu/spu.h (CLASS_MAX_NREGS): Remove. * config/mep/mep.h (CLASS_MAX_NREGS): Remove. * config/m32r/m32r.h (CLASS_MAX_NREGS): Remove. * config/microblaze/microblaze.h (CLASS_MAX_NREGS): Remove. * config/xtensa/xtensa.h (CLASS_MAX_NREGS): Remove. * config/stormy16/stormy16.h (CLASS_MAX_NREGS): Remove. * config/lm32/lm32.h (CLASS_MAX_NREGS): Remove. * config/moxie/moxie.h (CLASS_MAX_NREGS): Remove. * config/iq2000/iq2000.h (CLASS_MAX_NREGS): Remove. * config/mn10300/mn10300.h (CLASS_MAX_NREGS): Remove. * config/score/score.h (CLASS_MAX_NREGS): Remove. * config/vax/vax.h (CLASS_MAX_NREGS): Remove. * config/h8300/h8300.h (CLASS_MAX_NREGS): Remove. * config/v850/v850.h (CLASS_MAX_NREGS): Remove. From-SVN: r176490
2011-07-20 00:34:31 +02:00
if (ira_reg_class_max_nregs [rclass][GET_MODE (SUBREG_REG (x))]
> reg_class_size[(int) rclass])
{
/* If the inner register will be replaced by a memory
reference, we can do this only if we can replace the
whole subreg by a (narrower) memory reference. If
this is not possible, fall through and reload just
the inner register (including address reloads). */
if (reg_equiv_memory_loc (REGNO (SUBREG_REG (x))) != 0)
{
rtx tem = find_reloads_subreg_address (x, opnum,
ADDR_TYPE (type),
ind_levels, insn,
NULL);
if (tem)
{
push_reload (tem, NULL_RTX, loc, (rtx*) 0, rclass,
GET_MODE (tem), VOIDmode, 0, 0,
opnum, type);
return 1;
}
}
else
{
push_reload (x, NULL_RTX, loc, (rtx*) 0, rclass,
GET_MODE (x), VOIDmode, 0, 0, opnum, type);
return 1;
}
}
}
1992-02-28 11:23:25 +01:00
}
break;
default:
break;
1992-02-28 11:23:25 +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 = GET_RTX_FORMAT (code);
int i;
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
{
if (fmt[i] == 'e')
bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
2006-03-21 14:07:33 +01:00
/* Pass SCRATCH for INDEX_CODE, since CODE can never be a PLUS once
we get here. */
tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. * doc/tm.texi.in (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * doc/tm.texi: Regenerate. * config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. * config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space argument. (REGNO_MODE_CODE_OK_FOR_BASE_P): Ditto. * config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. * config/avr/avr.c (avr_mode_code_base_reg_class): Ditto. (avr_regno_mode_code_ok_for_base_p): Ditto. (avr_reg_ok_for_addr_p): Pass AS down to avr_regno_mode_code_ok_for_base_p. * addresses.h (base_reg_class): Add address space argument. Pass to MODE_CODE_BASE_REG_CLASS. (ok_for_base_p_1): Add address space argument. Pass to REGNO_MODE_CODE_OK_FOR_BASE_P. (regno_ok_for_base_p): Add address space argument. Pass to ok_for_base_p_1. * regrename.c (scan_rtx_address): Add address space argument. Pass address space to regno_ok_for_base_p and base_reg_class. Update recursive calls. (scan_rtx): Pass address space to scan_rtx_address. (build_def_use): Likewise. * regcprop.c (replace_oldest_value_addr): Add address space argument. Pass to regno_ok_for_base_p and base_reg_class. Update recursive calls. (replace_oldest_value_mem): Pass address space to replace_oldest_value_addr. (copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads_address_1): Add address space argument. Pass address space to base_reg_class and regno_ok_for_base_p. Update recursive calls. (find_reloads_address): Pass address space to base_reg_class, regno_ok_for_base_p, and find_reloads_address_1. (find_reloads): Pass address space to base_reg_class. (find_reloads_subreg_address): Likewise. * ira-costs.c (record_reg_classes): Update calls to base_reg_class. (ok_for_base_p_nonstrict): Add address space argument. Pass to ok_for_base_p_1. (record_address_regs): Add address space argument. Pass to base_reg_class and ok_for_base_p_nonstrict. Update recursive calls. (record_operand_costs): Pass address space to record_address_regs. (scan_one_insn): Likewise. * caller-save.c (init_caller_save): Update call to base_reg_class. * ira-conflicts.c (ira_build_conflicts): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. Co-Authored-By: Georg-Johann Lay <avr@gjlay.de> From-SVN: r181175
2011-11-08 18:36:45 +01:00
find_reloads_address_1 (mode, as, XEXP (x, i), context,
code, SCRATCH, &XEXP (x, i),
opnum, type, ind_levels, insn);
}
}
#undef REG_OK_FOR_CONTEXT
1992-02-28 11:23:25 +01:00
return 0;
}
/* X, which is found at *LOC, is a part of an address that needs to be
reloaded into a register of class RCLASS. If X is a constant, or if
1992-02-28 11:23:25 +01:00
X is a PLUS that contains a constant, check that the constant is a
legitimate operand and that we are supposed to be able to load
it into the register.
If not, force the constant into memory and reload the MEM instead.
MODE is the mode to use, in case X is an integer constant.
OPNUM and TYPE describe the purpose of any reloads made.
1992-02-28 11:23:25 +01:00
IND_LEVELS says how many levels of indirect addressing this machine
supports. */
static void
find_reloads_address_part (rtx x, rtx *loc, enum reg_class rclass,
enum machine_mode mode, int opnum,
enum reload_type type, int ind_levels)
1992-02-28 11:23:25 +01:00
{
if (CONSTANT_P (x)
target.def (legitimate_constant_p): New hook. gcc/ * target.def (legitimate_constant_p): New hook. * doc/tm.texi.in (LEGITIMATE_CONSTANT_P): Replace with... (TARGET_LEGITIMATE_CONSTANT_P): ...this. * doc/tm.texi: Regenerate. * hooks.h (hook_bool_mode_rtx_true): Declare. * hooks.c (hook_bool_mode_rtx_true): Define. * system.h (LEGITIMATE_CONSTANT_P): Poison. * calls.c (precompute_register_parameters): Replace uses of LEGITIMATE_CONSTANT_P with targetm.legitimate_constant_p. (emit_library_call_value_1): Likewise. * expr.c (move_block_to_reg, can_store_by_pieces, emit_move_insn) (compress_float_constant, emit_push_insn, expand_expr_real_1): Likewise. * ira-costs.c (scan_one_insn): Likewise. * recog.c (general_operand, immediate_operand): Likewise. * reload.c (find_reloads_toplev, find_reloads_address_part): Likewise. * reload1.c (init_eliminable_invariants): Likewise. * config/alpha/alpha-protos.h (alpha_legitimate_constant_p): Add a mode argument. * config/alpha/alpha.h (LEGITIMATE_CONSTANT_P): Delete. * config/alpha/alpha.c (alpha_legitimate_constant_p): Add a mode argument. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/alpha/predicates.md (input_operand): Update call to alpha_legitimate_constant_p. * config/arm/arm-protos.h (arm_cannot_force_const_mem): Delete. * config/arm/arm.h (ARM_LEGITIMATE_CONSTANT_P): Likewise. (THUMB_LEGITIMATE_CONSTANT_P, LEGITIMATE_CONSTANT_P): Likewise. * config/arm/arm.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (arm_legitimate_constant_p_1, thumb_legitimate_constant_p) (arm_legitimate_constant_p): New functions. (arm_cannot_force_const_mem): Make static. * config/avr/avr.h (LEGITIMATE_CONSTANT_P): Delete. * config/bfin/bfin-protos.h (bfin_legitimate_constant_p): Delete. * config/bfin/bfin.h (LEGITIMATE_CONSTANT_P): Delete. * config/bfin/bfin.c (expand_move): Use targetm.legitimate_constant_p instead of bfin_legitimate_constant_p. (bfin_legitimate_constant_p): Make static. Add a mode argument. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/cris/cris.h (LEGITIMATE_CONSTANT_P): Delete. * config/fr30/fr30.h (LEGITIMATE_CONSTANT_P): Delete. * config/frv/frv-protos.h (frv_legitimate_constant_p): Delete. * config/frv/frv.h (LEGITIMATE_CONSTANT_P): Delete. * config/frv/frv.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (frv_legitimate_constant_p): Make static. Add a mode argument. * config/h8300/h8300-protos.h (h8300_legitimate_constant_p): Delete. * config/h8300/h8300.h (LEGITIMATE_CONSTANT_P): Likewise. * config/h8300/h8300.c (h8300_legitimate_constant_p): Likewise. * config/i386/i386-protos.h (legitimate_constant_p): Delete. * config/i386/i386.h (LEGITIMATE_CONSTANT_P): Likewise. * config/i386/i386.c (legitimate_constant_p): Rename to... (ix86_legitimate_constant_p): ...this. Make static. Add a mode argument. (ix86_cannot_force_const_mem): Update accordingly. (ix86_legitimate_address_p): Likewise. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/i386/i386.md: Update commentary. * config/ia64/ia64-protos.h (ia64_legitimate_constant_p): Delete. * config/ia64/ia64.h (LEGITIMATE_CONSTANT_P): Likewise. * config/ia64/ia64.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (ia64_legitimate_constant_p): Make static. Add a mode argument. * config/iq2000/iq2000.h (LEGITIMATE_CONSTANT_P): Delete. * config/lm32/lm32-protos.h (lm32_legitimate_constant_p): Delete. * config/lm32/lm32.h (LEGITIMATE_CONSTANT_P): Likewise. * config/lm32/lm32.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (lm32_legitimate_constant_p): Make static. Add a mode argument. * config/m32c/m32c-protos.h (m32c_legitimate_constant_p): Delete. * config/m32c/m32c.h (LEGITIMATE_CONSTANT_P): Likewise. * config/m32c/m32c.c (m32c_legitimate_constant_p): Likewise. * config/m32r/m32r.h (LEGITIMATE_CONSTANT_P): Delete. * config/m32r/m32r.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (m32r_legitimate_constant_p): New function. * config/m68k/m68k-protos.h (m68k_legitimate_constant_p): Declare. * config/m68k/m68k.h (CONSTANT_ADDRESS_P): Call it instead of LEGITIMATE_CONSTANT_P. (LEGITIMATE_CONSTANT_P): Delete. * config/m68k/m68k.c (m68k_expand_prologue): Call m68k_legitimate_constant_p instead of LEGITIMATE_CONSTANT_P. (m68k_legitimate_constant_p): New function. * config/m68k/m68k.md: Update comments. * config/mcore/mcore.h (LEGITIMATE_CONSTANT_P): Delete. * config/mcore/mcore.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (mcore_legitimate_constant_p): New function. * config/mep/mep-protos.h (mep_legitimate_constant_p): Delete. * config/mep/mep.h (LEGITIMATE_CONSTANT_P): Likewise. * config/mep/mep.c (mep_legitimate_constant_p): Make static. Add a mode argument. (mep_legitimate_address): Update accordingly. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/microblaze/microblaze-protos.h (microblaze_const_double_ok): Delete. * config/microblaze/microblaze.h (LEGITIMATE_CONSTANT_P): Likewise. * config/microblaze/microblaze.c (microblaze_const_double_ok): Make static. Check OP's mode for VOIDmode. (microblaze_legitimate_constant_p): New function. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/mips/mips.h (LEGITIMATE_CONSTANT_P): Delete. * config/mips/mips.c (mips_legitimate_constant_p): New function. (mips_cannot_force_const_mem): Use it instead of LEGITIMATE_CONSTANT_P. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/mips/predicates.md: Update comments. * config/mmix/mmix-protos.h (mmix_legitimate_constant_p): Delete. * config/mmix/mmix.h (LEGITIMATE_CONSTANT_P): Likewise. * config/mmix/mmix.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (mmix_legitimate_constant_p): Make static, return a bool, and take a mode argument. (mmix_print_operand_address): Update accordingly. * config/mn10300/mn10300-protos.h (mn10300_legitimate_constant_p): Delete. * config/mn10300/mn10300.h (LEGITIMATE_CONSTANT_P): Likewise. * config/mn10300/mn10300.c (mn10300_legitimate_constant_p): Make static. Add a mode argument. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/moxie/moxie.h (LEGITIMATE_CONSTANT_P): Delete. * config/pa/pa.h (LEGITIMATE_CONSTANT_P): Delete. * config/pa/pa.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (pa_legitimate_constant_p): New function. * config/picochip/picochip.h (LEGITIMATE_CONSTANT_P): Delete. * config/pdp11/pdp11.h (LEGITIMATE_CONSTANT_P): Delete. * config/pdp11/pdp11.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (pdp11_legitimate_constant_p): New function. * config/rs6000/rs6000.h (LEGITIMATE_CONSTANT_P): Delete. * config/rs6000/rs6000.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (rs6000_legitimate_constant_p): New function. * config/rx/rx-protos.h (rx_is_legitimate_constant): Replace with... (rx_legitimate_constant_p): ...this. * config/rx/rx.h (LEGITIMATE_CONSTANT_P): Delete. * config/rx/rx.c (rx_is_legitimate_constant): Replace with... (rx_legitimate_constant_p): ...this. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/rx/rx.md (mov<register_modes:mode>): Update accordingly. * config/s390/s390-protos.h (legitimate_constant_p): Delete. * config/s390/s390.h (LEGITIMATE_CONSTANT_P): Likewise. * config/s390/s390.c (legitimate_constant_p): Rename to... (s390_legitimate_constant_p): ...this. Make static, return a bool, and add a mode argument. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/score/score.h (LEGITIMATE_CONSTANT_P): Delete. * config/sh/sh.h (LEGITIMATE_CONSTANT_P): Delete. * config/sh/sh.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (sh_legitimate_constant_p): New function. * config/sparc/sparc-protos.h (legitimate_constant_p): Delete. * config/sparc/sparc.h (LEGITIMATE_CONSTANT_P): Delete. * config/sparc/sparc.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (legitimate_constant_p): Rename to... (sparc_legitimate_constant_p): ...this. Make static. Add a mode argument. (constant_address_p): Update accordingly. * config/spu/spu-protos.h (spu_legitimate_constant_p): Add a mode argument and return a bool. * config/spu/spu.h (LEGITIMATE_CONSTANT_P): Delete. * config/spu/spu.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (spu_legitimate_constant_p): Add a mode argument and return a bool. (spu_rtx_costs): Update accordingly. * config/spu/predicates.md (vec_imm_operand): Likewise. * config/stormy16/stormy16.h (LEGITIMATE_CONSTANT_P): Delete. * config/v850/v850.h (LEGITIMATE_CONSTANT_P): Delete. * config/v850/v850.c (v850_legitimate_constant_p): New function. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/vax/vax-protos.h (legitimate_constant_p): Delete. * config/vax/vax.h (LEGITIMATE_CONSTANT_P): Likewise. * config/vax/vax.c (legitimate_constant_p): Likewise. * config/xtensa/xtensa.h (LEGITIMATE_CONSTANT_P): Delete. * config/xtensa/xtensa.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (xtensa_legitimate_constant_p): New function. From-SVN: r172814
2011-04-21 11:38:43 +02:00
&& (!targetm.legitimate_constant_p (mode, x)
|| targetm.preferred_reload_class (x, rclass) == NO_REGS))
1992-02-28 11:23:25 +01:00
{
x = force_const_mem (mode, x);
find_reloads_address (mode, &x, XEXP (x, 0), &XEXP (x, 0),
opnum, type, ind_levels, 0);
1992-02-28 11:23:25 +01:00
}
else if (GET_CODE (x) == PLUS
&& CONSTANT_P (XEXP (x, 1))
target.def (legitimate_constant_p): New hook. gcc/ * target.def (legitimate_constant_p): New hook. * doc/tm.texi.in (LEGITIMATE_CONSTANT_P): Replace with... (TARGET_LEGITIMATE_CONSTANT_P): ...this. * doc/tm.texi: Regenerate. * hooks.h (hook_bool_mode_rtx_true): Declare. * hooks.c (hook_bool_mode_rtx_true): Define. * system.h (LEGITIMATE_CONSTANT_P): Poison. * calls.c (precompute_register_parameters): Replace uses of LEGITIMATE_CONSTANT_P with targetm.legitimate_constant_p. (emit_library_call_value_1): Likewise. * expr.c (move_block_to_reg, can_store_by_pieces, emit_move_insn) (compress_float_constant, emit_push_insn, expand_expr_real_1): Likewise. * ira-costs.c (scan_one_insn): Likewise. * recog.c (general_operand, immediate_operand): Likewise. * reload.c (find_reloads_toplev, find_reloads_address_part): Likewise. * reload1.c (init_eliminable_invariants): Likewise. * config/alpha/alpha-protos.h (alpha_legitimate_constant_p): Add a mode argument. * config/alpha/alpha.h (LEGITIMATE_CONSTANT_P): Delete. * config/alpha/alpha.c (alpha_legitimate_constant_p): Add a mode argument. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/alpha/predicates.md (input_operand): Update call to alpha_legitimate_constant_p. * config/arm/arm-protos.h (arm_cannot_force_const_mem): Delete. * config/arm/arm.h (ARM_LEGITIMATE_CONSTANT_P): Likewise. (THUMB_LEGITIMATE_CONSTANT_P, LEGITIMATE_CONSTANT_P): Likewise. * config/arm/arm.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (arm_legitimate_constant_p_1, thumb_legitimate_constant_p) (arm_legitimate_constant_p): New functions. (arm_cannot_force_const_mem): Make static. * config/avr/avr.h (LEGITIMATE_CONSTANT_P): Delete. * config/bfin/bfin-protos.h (bfin_legitimate_constant_p): Delete. * config/bfin/bfin.h (LEGITIMATE_CONSTANT_P): Delete. * config/bfin/bfin.c (expand_move): Use targetm.legitimate_constant_p instead of bfin_legitimate_constant_p. (bfin_legitimate_constant_p): Make static. Add a mode argument. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/cris/cris.h (LEGITIMATE_CONSTANT_P): Delete. * config/fr30/fr30.h (LEGITIMATE_CONSTANT_P): Delete. * config/frv/frv-protos.h (frv_legitimate_constant_p): Delete. * config/frv/frv.h (LEGITIMATE_CONSTANT_P): Delete. * config/frv/frv.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (frv_legitimate_constant_p): Make static. Add a mode argument. * config/h8300/h8300-protos.h (h8300_legitimate_constant_p): Delete. * config/h8300/h8300.h (LEGITIMATE_CONSTANT_P): Likewise. * config/h8300/h8300.c (h8300_legitimate_constant_p): Likewise. * config/i386/i386-protos.h (legitimate_constant_p): Delete. * config/i386/i386.h (LEGITIMATE_CONSTANT_P): Likewise. * config/i386/i386.c (legitimate_constant_p): Rename to... (ix86_legitimate_constant_p): ...this. Make static. Add a mode argument. (ix86_cannot_force_const_mem): Update accordingly. (ix86_legitimate_address_p): Likewise. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/i386/i386.md: Update commentary. * config/ia64/ia64-protos.h (ia64_legitimate_constant_p): Delete. * config/ia64/ia64.h (LEGITIMATE_CONSTANT_P): Likewise. * config/ia64/ia64.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (ia64_legitimate_constant_p): Make static. Add a mode argument. * config/iq2000/iq2000.h (LEGITIMATE_CONSTANT_P): Delete. * config/lm32/lm32-protos.h (lm32_legitimate_constant_p): Delete. * config/lm32/lm32.h (LEGITIMATE_CONSTANT_P): Likewise. * config/lm32/lm32.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (lm32_legitimate_constant_p): Make static. Add a mode argument. * config/m32c/m32c-protos.h (m32c_legitimate_constant_p): Delete. * config/m32c/m32c.h (LEGITIMATE_CONSTANT_P): Likewise. * config/m32c/m32c.c (m32c_legitimate_constant_p): Likewise. * config/m32r/m32r.h (LEGITIMATE_CONSTANT_P): Delete. * config/m32r/m32r.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (m32r_legitimate_constant_p): New function. * config/m68k/m68k-protos.h (m68k_legitimate_constant_p): Declare. * config/m68k/m68k.h (CONSTANT_ADDRESS_P): Call it instead of LEGITIMATE_CONSTANT_P. (LEGITIMATE_CONSTANT_P): Delete. * config/m68k/m68k.c (m68k_expand_prologue): Call m68k_legitimate_constant_p instead of LEGITIMATE_CONSTANT_P. (m68k_legitimate_constant_p): New function. * config/m68k/m68k.md: Update comments. * config/mcore/mcore.h (LEGITIMATE_CONSTANT_P): Delete. * config/mcore/mcore.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (mcore_legitimate_constant_p): New function. * config/mep/mep-protos.h (mep_legitimate_constant_p): Delete. * config/mep/mep.h (LEGITIMATE_CONSTANT_P): Likewise. * config/mep/mep.c (mep_legitimate_constant_p): Make static. Add a mode argument. (mep_legitimate_address): Update accordingly. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/microblaze/microblaze-protos.h (microblaze_const_double_ok): Delete. * config/microblaze/microblaze.h (LEGITIMATE_CONSTANT_P): Likewise. * config/microblaze/microblaze.c (microblaze_const_double_ok): Make static. Check OP's mode for VOIDmode. (microblaze_legitimate_constant_p): New function. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/mips/mips.h (LEGITIMATE_CONSTANT_P): Delete. * config/mips/mips.c (mips_legitimate_constant_p): New function. (mips_cannot_force_const_mem): Use it instead of LEGITIMATE_CONSTANT_P. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/mips/predicates.md: Update comments. * config/mmix/mmix-protos.h (mmix_legitimate_constant_p): Delete. * config/mmix/mmix.h (LEGITIMATE_CONSTANT_P): Likewise. * config/mmix/mmix.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (mmix_legitimate_constant_p): Make static, return a bool, and take a mode argument. (mmix_print_operand_address): Update accordingly. * config/mn10300/mn10300-protos.h (mn10300_legitimate_constant_p): Delete. * config/mn10300/mn10300.h (LEGITIMATE_CONSTANT_P): Likewise. * config/mn10300/mn10300.c (mn10300_legitimate_constant_p): Make static. Add a mode argument. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/moxie/moxie.h (LEGITIMATE_CONSTANT_P): Delete. * config/pa/pa.h (LEGITIMATE_CONSTANT_P): Delete. * config/pa/pa.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (pa_legitimate_constant_p): New function. * config/picochip/picochip.h (LEGITIMATE_CONSTANT_P): Delete. * config/pdp11/pdp11.h (LEGITIMATE_CONSTANT_P): Delete. * config/pdp11/pdp11.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (pdp11_legitimate_constant_p): New function. * config/rs6000/rs6000.h (LEGITIMATE_CONSTANT_P): Delete. * config/rs6000/rs6000.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (rs6000_legitimate_constant_p): New function. * config/rx/rx-protos.h (rx_is_legitimate_constant): Replace with... (rx_legitimate_constant_p): ...this. * config/rx/rx.h (LEGITIMATE_CONSTANT_P): Delete. * config/rx/rx.c (rx_is_legitimate_constant): Replace with... (rx_legitimate_constant_p): ...this. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/rx/rx.md (mov<register_modes:mode>): Update accordingly. * config/s390/s390-protos.h (legitimate_constant_p): Delete. * config/s390/s390.h (LEGITIMATE_CONSTANT_P): Likewise. * config/s390/s390.c (legitimate_constant_p): Rename to... (s390_legitimate_constant_p): ...this. Make static, return a bool, and add a mode argument. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/score/score.h (LEGITIMATE_CONSTANT_P): Delete. * config/sh/sh.h (LEGITIMATE_CONSTANT_P): Delete. * config/sh/sh.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (sh_legitimate_constant_p): New function. * config/sparc/sparc-protos.h (legitimate_constant_p): Delete. * config/sparc/sparc.h (LEGITIMATE_CONSTANT_P): Delete. * config/sparc/sparc.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (legitimate_constant_p): Rename to... (sparc_legitimate_constant_p): ...this. Make static. Add a mode argument. (constant_address_p): Update accordingly. * config/spu/spu-protos.h (spu_legitimate_constant_p): Add a mode argument and return a bool. * config/spu/spu.h (LEGITIMATE_CONSTANT_P): Delete. * config/spu/spu.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (spu_legitimate_constant_p): Add a mode argument and return a bool. (spu_rtx_costs): Update accordingly. * config/spu/predicates.md (vec_imm_operand): Likewise. * config/stormy16/stormy16.h (LEGITIMATE_CONSTANT_P): Delete. * config/v850/v850.h (LEGITIMATE_CONSTANT_P): Delete. * config/v850/v850.c (v850_legitimate_constant_p): New function. (TARGET_LEGITIMATE_CONSTANT_P): Define. * config/vax/vax-protos.h (legitimate_constant_p): Delete. * config/vax/vax.h (LEGITIMATE_CONSTANT_P): Likewise. * config/vax/vax.c (legitimate_constant_p): Likewise. * config/xtensa/xtensa.h (LEGITIMATE_CONSTANT_P): Delete. * config/xtensa/xtensa.c (TARGET_LEGITIMATE_CONSTANT_P): Define. (xtensa_legitimate_constant_p): New function. From-SVN: r172814
2011-04-21 11:38:43 +02:00
&& (!targetm.legitimate_constant_p (GET_MODE (x), XEXP (x, 1))
|| targetm.preferred_reload_class (XEXP (x, 1), rclass)
== NO_REGS))
1992-02-28 11:23:25 +01:00
{
rtx tem;
tem = force_const_mem (GET_MODE (x), XEXP (x, 1));
x = gen_rtx_PLUS (GET_MODE (x), XEXP (x, 0), tem);
find_reloads_address (mode, &XEXP (x, 1), XEXP (tem, 0), &XEXP (tem, 0),
opnum, type, ind_levels, 0);
1992-02-28 11:23:25 +01:00
}
push_reload (x, NULL_RTX, loc, (rtx*) 0, rclass,
mode, VOIDmode, 0, 0, opnum, type);
1992-02-28 11:23:25 +01:00
}
/* X, a subreg of a pseudo, is a part of an address that needs to be
reloaded, and the pseusdo is equivalent to a memory location.
Attempt to replace the whole subreg by a (possibly narrower or wider)
memory reference. If this is possible, return this new memory
reference, and push all required address reloads. Otherwise,
return NULL.
OPNUM and TYPE identify the purpose of the reload.
IND_LEVELS says how many levels of indirect addressing are
supported at this point in the address.
INSN, if nonzero, is the insn in which we do the reload. It is used
to determine where to put USEs for pseudos that we have to replace with
stack slots. */
static rtx
find_reloads_subreg_address (rtx x, int opnum, enum reload_type type,
reload: Use rtx_insn (also touches caller-save.c and config/arc/arc) gcc/ * reload.h (struct insn_chain): Strengthen field "insn" from rtx to rtx_insn *. (find_reloads): Likewise for param 1. (subst_reloads): Likewise for sole param. (find_equiv_reg): Likwise for param 2. (regno_clobbered_p): Likwise for param 2. (reload): Likewise for param 1. * caller-save.c (save_call_clobbered_regs): Strengthen local "insn" from rtx to rtx_insn *. (insert_one_insn): Likewise for local "insn". * reload.c (this_insn): Likewise for this global. (find_reloads): Likewise for param "insn". (find_reloads_toplev): Likewise. (find_reloads_address): Likewise. (subst_reg_equivs): Likewise. (update_auto_inc_notes): Likewise. (find_reloads_address_1): Likewise. (find_reloads_subreg_address): Likewise. (subst_reloads): Likewise. (find_equiv_reg): Likewise, also for local "p". (regno_clobbered_p): Likewise for param "insn". * reload1.c (reg_reloaded_insn): Likewise for the elements of this array. (spill_reg_store): Likewise for the elements of this array. (remove_init_insns): Likewise for local "equiv_insn". (will_delete_init_insn_p): Likewise for param "insn". (reload): Likewise for param ""first" and local "insn". (calculate_needs_all_insns): Strengthen local "insn" from rtx to rtx_insn *. (calculate_elim_costs_all_insns): Likewise. (delete_caller_save_insns): Likewise. (spill_failure): Likewise for param "insn". (delete_dead_insn): Likewise. (set_label_offsets): Likewise. (eliminate_regs_in_insn): Likewise, also for locals "base_insn" and "prev_insn". (elimination_costs_in_insn): Likewise for param "insn". (set_initial_eh_label_offset): Replace use of NULL_RTX with NULL when referring to an insn. (set_initial_label_offsets): Likewise. (set_offsets_for_label): Strengthen param "insn" from rtx to rtx_insn *. (init_eliminable_invariants): Likewise for param "first" and local "insn". (fixup_eh_region_note): Likewise for param "insn". (reload_as_needed): Likewise for locals "prev", "insn", "old_next", "old_prev", "next". (gen_reload_chain_without_interm_reg_p): Likewise for locals "insn", "last". (reload_inheritance_insn): Strengthen elements of this array from rtx to rtx_insn *. (failed_reload): Likewise for param "insn". (choose_reload_regs): Likewise for local "insn". Replace use of NULL_RTX with NULL when referring to an insn. (input_reload_insns): Strengthen elements of this array from rtx to rtx_insn *. (other_input_address_reload_insns): Likewise for this global. (other_input_reload_insns): Likewise for this global. (input_address_reload_insns): Likwise for the elements of this array. (inpaddr_address_reload_insns): Likwise for the elements of this array. (output_reload_insns): Likewise for the elements of this array. (output_address_reload_insns): Likewise for the elements of this array. (outaddr_address_reload_insns): Likewise for the elements of this array. (operand_reload_insns): Likewise for this global. (other_operand_reload_insns): Likewise for this global. (other_output_reload_insns): Likewise for the elements of this array. (new_spill_reg_store): Likewise for the elements of this array. (emit_input_reload_insns): Likewise for locals "insn", "temp". Strengthen local "where" from rtx * to rtx_insn **. (emit_output_reload_insns): Strengthen locals "insn", "p", "next" from rtx to rtx_insn *. (do_input_reload): Likewise for local "insn". (do_output_reload): Likewise for local "insn". (emit_reload_insns): Likewise for locals "insn" and "store_insn". (emit_insn_if_valid_for_reload): Likewise for return type and local "last". Add checked cast to rtx_insn when returning "insn" since this has been through emit_insn. (gen_reload): Strengthen return type and locals "last", "insn", "set" from rtx to rtx_insn *. Add checked cast to rtx_insn when returning "insn" since it's been through emit_insn_if_valid_for_reload at this point. (delete_output_reload): Strengthen param "insn" and locals "output_reload_insn", "i2" from rtx to rtx_insn *. (delete_address_reloads): Likewise for params "dead_insn", "current_insn" and locals "prev", "next". (delete_address_reloads_1): Likewise for params "dead_insn", "current_insn" and locals "prev", "i2". (inc_for_reload): Likewise for locals "last", "add_insn". (add_auto_inc_notes): Strengthen param "insn" from rtx to rtx_insn *. * config/arc/arc-protos.h (regno_clobbered_p): Likewise for 2nd param of this duplicate of the prototype from reload.h From-SVN: r214370
2014-08-22 22:49:31 +02:00
int ind_levels, rtx_insn *insn,
int *address_reloaded)
{
enum machine_mode outer_mode = GET_MODE (x);
enum machine_mode inner_mode = GET_MODE (SUBREG_REG (x));
int regno = REGNO (SUBREG_REG (x));
int reloaded = 0;
rtx tem, orig;
int offset;
gcc_assert (reg_equiv_memory_loc (regno) != 0);
/* We cannot replace the subreg with a modified memory reference if:
- we have a paradoxical subreg that implicitly acts as a zero or
sign extension operation due to LOAD_EXTEND_OP;
- we have a subreg that is implicitly supposed to act on the full
register due to WORD_REGISTER_OPERATIONS (see also eliminate_regs);
- the address of the equivalent memory location is mode-dependent; or
- we have a paradoxical subreg and the resulting memory is not
sufficiently aligned to allow access in the wider mode.
In addition, we choose not to perform the replacement for *any*
paradoxical subreg, even if it were possible in principle. This
is to avoid generating wider memory references than necessary.
This corresponds to how previous versions of reload used to handle
paradoxical subregs where no address reload was required. */
if (paradoxical_subreg_p (x))
return NULL;
#ifdef WORD_REGISTER_OPERATIONS
if (GET_MODE_SIZE (outer_mode) < GET_MODE_SIZE (inner_mode)
&& ((GET_MODE_SIZE (outer_mode) - 1) / UNITS_PER_WORD
== (GET_MODE_SIZE (inner_mode) - 1) / UNITS_PER_WORD))
return NULL;
#endif
/* Since we don't attempt to handle paradoxical subregs, we can just
call into simplify_subreg, which will handle all remaining checks
for us. */
orig = make_memloc (SUBREG_REG (x), regno);
offset = SUBREG_BYTE (x);
tem = simplify_subreg (outer_mode, orig, inner_mode, offset);
if (!tem || !MEM_P (tem))
return NULL;
/* Now push all required address reloads, if any. */
reloaded = find_reloads_address (GET_MODE (tem), &tem,
XEXP (tem, 0), &XEXP (tem, 0),
opnum, type, ind_levels, insn);
/* ??? Do we need to handle nonzero offsets somehow? */
if (!offset && !rtx_equal_p (tem, orig))
push_reg_equiv_alt_mem (regno, tem);
/* For some processors an address may be valid in the original mode but
not in a smaller mode. For example, ARM accepts a scaled index register
in SImode but not in HImode. Note that this is only a problem if the
address in reg_equiv_mem is already invalid in the new mode; other
cases would be fixed by find_reloads_address as usual.
??? We attempt to handle such cases here by doing an additional reload
of the full address after the usual processing by find_reloads_address.
Note that this may not work in the general case, but it seems to cover
the cases where this situation currently occurs. A more general fix
might be to reload the *value* instead of the address, but this would
not be expected by the callers of this routine as-is.
If find_reloads_address already completed replaced the address, there
is nothing further to do. */
if (reloaded == 0
&& reg_equiv_mem (regno) != 0
&& !strict_memory_address_addr_space_p
(GET_MODE (x), XEXP (reg_equiv_mem (regno), 0),
MEM_ADDR_SPACE (reg_equiv_mem (regno))))
{
push_reload (XEXP (tem, 0), NULL_RTX, &XEXP (tem, 0), (rtx*) 0,
base_reg_class (GET_MODE (tem), MEM_ADDR_SPACE (tem),
MEM, SCRATCH),
GET_MODE (XEXP (tem, 0)), VOIDmode, 0, 0, opnum, type);
reloaded = 1;
}
/* If this is not a toplevel operand, find_reloads doesn't see this
substitution. We have to emit a USE of the pseudo so that
delete_output_reload can see it. */
if (replace_reloads && recog_data.operand[opnum] != x)
/* We mark the USE with QImode so that we recognize it as one that
can be safely deleted at the end of reload. */
PUT_MODE (emit_insn_before (gen_rtx_USE (VOIDmode, SUBREG_REG (x)), insn),
QImode);
if (address_reloaded)
*address_reloaded = reloaded;
return tem;
}
/* Substitute into the current INSN the registers into which we have reloaded
1992-02-28 11:23:25 +01:00
the things that need reloading. The array `replacements'
contains the locations of all pointers that must be changed
1992-02-28 11:23:25 +01:00
and says what to replace them with.
Return the rtx that X translates into; usually X, but modified. */
void
reload: Use rtx_insn (also touches caller-save.c and config/arc/arc) gcc/ * reload.h (struct insn_chain): Strengthen field "insn" from rtx to rtx_insn *. (find_reloads): Likewise for param 1. (subst_reloads): Likewise for sole param. (find_equiv_reg): Likwise for param 2. (regno_clobbered_p): Likwise for param 2. (reload): Likewise for param 1. * caller-save.c (save_call_clobbered_regs): Strengthen local "insn" from rtx to rtx_insn *. (insert_one_insn): Likewise for local "insn". * reload.c (this_insn): Likewise for this global. (find_reloads): Likewise for param "insn". (find_reloads_toplev): Likewise. (find_reloads_address): Likewise. (subst_reg_equivs): Likewise. (update_auto_inc_notes): Likewise. (find_reloads_address_1): Likewise. (find_reloads_subreg_address): Likewise. (subst_reloads): Likewise. (find_equiv_reg): Likewise, also for local "p". (regno_clobbered_p): Likewise for param "insn". * reload1.c (reg_reloaded_insn): Likewise for the elements of this array. (spill_reg_store): Likewise for the elements of this array. (remove_init_insns): Likewise for local "equiv_insn". (will_delete_init_insn_p): Likewise for param "insn". (reload): Likewise for param ""first" and local "insn". (calculate_needs_all_insns): Strengthen local "insn" from rtx to rtx_insn *. (calculate_elim_costs_all_insns): Likewise. (delete_caller_save_insns): Likewise. (spill_failure): Likewise for param "insn". (delete_dead_insn): Likewise. (set_label_offsets): Likewise. (eliminate_regs_in_insn): Likewise, also for locals "base_insn" and "prev_insn". (elimination_costs_in_insn): Likewise for param "insn". (set_initial_eh_label_offset): Replace use of NULL_RTX with NULL when referring to an insn. (set_initial_label_offsets): Likewise. (set_offsets_for_label): Strengthen param "insn" from rtx to rtx_insn *. (init_eliminable_invariants): Likewise for param "first" and local "insn". (fixup_eh_region_note): Likewise for param "insn". (reload_as_needed): Likewise for locals "prev", "insn", "old_next", "old_prev", "next". (gen_reload_chain_without_interm_reg_p): Likewise for locals "insn", "last". (reload_inheritance_insn): Strengthen elements of this array from rtx to rtx_insn *. (failed_reload): Likewise for param "insn". (choose_reload_regs): Likewise for local "insn". Replace use of NULL_RTX with NULL when referring to an insn. (input_reload_insns): Strengthen elements of this array from rtx to rtx_insn *. (other_input_address_reload_insns): Likewise for this global. (other_input_reload_insns): Likewise for this global. (input_address_reload_insns): Likwise for the elements of this array. (inpaddr_address_reload_insns): Likwise for the elements of this array. (output_reload_insns): Likewise for the elements of this array. (output_address_reload_insns): Likewise for the elements of this array. (outaddr_address_reload_insns): Likewise for the elements of this array. (operand_reload_insns): Likewise for this global. (other_operand_reload_insns): Likewise for this global. (other_output_reload_insns): Likewise for the elements of this array. (new_spill_reg_store): Likewise for the elements of this array. (emit_input_reload_insns): Likewise for locals "insn", "temp". Strengthen local "where" from rtx * to rtx_insn **. (emit_output_reload_insns): Strengthen locals "insn", "p", "next" from rtx to rtx_insn *. (do_input_reload): Likewise for local "insn". (do_output_reload): Likewise for local "insn". (emit_reload_insns): Likewise for locals "insn" and "store_insn". (emit_insn_if_valid_for_reload): Likewise for return type and local "last". Add checked cast to rtx_insn when returning "insn" since this has been through emit_insn. (gen_reload): Strengthen return type and locals "last", "insn", "set" from rtx to rtx_insn *. Add checked cast to rtx_insn when returning "insn" since it's been through emit_insn_if_valid_for_reload at this point. (delete_output_reload): Strengthen param "insn" and locals "output_reload_insn", "i2" from rtx to rtx_insn *. (delete_address_reloads): Likewise for params "dead_insn", "current_insn" and locals "prev", "next". (delete_address_reloads_1): Likewise for params "dead_insn", "current_insn" and locals "prev", "i2". (inc_for_reload): Likewise for locals "last", "add_insn". (add_auto_inc_notes): Strengthen param "insn" from rtx to rtx_insn *. * config/arc/arc-protos.h (regno_clobbered_p): Likewise for 2nd param of this duplicate of the prototype from reload.h From-SVN: r214370
2014-08-22 22:49:31 +02:00
subst_reloads (rtx_insn *insn)
1992-02-28 11:23:25 +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;
1992-02-28 11:23:25 +01:00
for (i = 0; i < n_replacements; i++)
{
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
struct replacement *r = &replacements[i];
rtx reloadreg = rld[r->what].reg_rtx;
1992-02-28 11:23:25 +01:00
if (reloadreg)
{
#ifdef DEBUG_RELOAD
/* This checking takes a very long time on some platforms
causing the gcc.c-torture/compile/limits-fnargs.c test
to time out during testing. See PR 31850.
Internal consistency test. Check that we don't modify
anything in the equivalence arrays. Whenever something from
those arrays needs to be reloaded, it must be unshared before
being substituted into; the equivalence must not be modified.
Otherwise, if the equivalence is used after that, it will
have been modified, and the thing substituted (probably a
register) is likely overwritten and not a usable equivalence. */
int check_regno;
for (check_regno = 0; check_regno < max_regno; check_regno++)
{
#define CHECK_MODF(ARRAY) \
gcc_assert (!(*reg_equivs)[check_regno].ARRAY \
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
|| !loc_mentioned_in_p (r->where, \
(*reg_equivs)[check_regno].ARRAY))
CHECK_MODF (constant);
CHECK_MODF (memory_loc);
CHECK_MODF (address);
CHECK_MODF (mem);
#undef CHECK_MODF
}
#endif /* DEBUG_RELOAD */
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're replacing a LABEL_REF with a register, there must
already be an indication (to e.g. flow) which label this
register refers to. */
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
gcc_assert (GET_CODE (*r->where) != LABEL_REF
|| !JUMP_P (insn)
|| find_reg_note (insn,
REG_LABEL_OPERAND,
XEXP (*r->where, 0))
|| label_is_jump_target_p (XEXP (*r->where, 0), insn));
1992-02-28 11:23:25 +01:00
/* Encapsulate RELOADREG so its machine mode matches what
used to be there. Note that gen_lowpart_common will
do the wrong thing if RELOADREG is multi-word. RELOADREG
will always be a REG here. */
1992-02-28 11:23:25 +01:00
if (GET_MODE (reloadreg) != r->mode && r->mode != VOIDmode)
reloadreg = reload_adjust_reg_for_mode (reloadreg, r->mode);
1992-02-28 11:23:25 +01:00
*r->where = reloadreg;
1992-02-28 11:23:25 +01:00
}
/* If reload got no reg and isn't optional, something's wrong. */
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
else
gcc_assert (rld[r->what].optional);
1992-02-28 11:23:25 +01:00
}
}
/* Make a copy of any replacements being done into X and move those
copies to locations in Y, a copy of X. */
1992-02-28 11:23:25 +01:00
void
copy_replacements (rtx x, rtx y)
1992-02-28 11:23:25 +01:00
{
copy_replacements_1 (&x, &y, n_replacements);
}
static void
copy_replacements_1 (rtx *px, rtx *py, int orig_replacements)
{
int i, j;
rtx x, y;
struct replacement *r;
enum rtx_code code;
const char *fmt;
for (j = 0; j < orig_replacements; j++)
if (replacements[j].where == px)
{
r = &replacements[n_replacements++];
r->where = py;
r->what = replacements[j].what;
r->mode = replacements[j].mode;
}
x = *px;
y = *py;
code = GET_CODE (x);
fmt = GET_RTX_FORMAT (code);
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
{
if (fmt[i] == 'e')
copy_replacements_1 (&XEXP (x, i), &XEXP (y, i), orig_replacements);
else if (fmt[i] == 'E')
for (j = XVECLEN (x, i); --j >= 0; )
copy_replacements_1 (&XVECEXP (x, i, j), &XVECEXP (y, i, j),
orig_replacements);
}
1992-02-28 11:23:25 +01:00
}
/* Change any replacements being done to *X to be done to *Y. */
void
move_replacements (rtx *x, rtx *y)
{
int i;
for (i = 0; i < n_replacements; i++)
if (replacements[i].where == x)
replacements[i].where = y;
}
1992-02-28 11:23:25 +01:00
/* If LOC was scheduled to be replaced by something, return the replacement.
Otherwise, return *LOC. */
rtx
find_replacement (rtx *loc)
{
struct replacement *r;
for (r = &replacements[0]; r < &replacements[n_replacements]; r++)
{
rtx reloadreg = rld[r->what].reg_rtx;
if (reloadreg && r->where == loc)
{
if (r->mode != VOIDmode && GET_MODE (reloadreg) != r->mode)
reloadreg = reload_adjust_reg_for_mode (reloadreg, r->mode);
return reloadreg;
}
else if (reloadreg && GET_CODE (*loc) == SUBREG
&& r->where == &SUBREG_REG (*loc))
{
if (r->mode != VOIDmode && GET_MODE (reloadreg) != r->mode)
reloadreg = reload_adjust_reg_for_mode (reloadreg, r->mode);
return simplify_gen_subreg (GET_MODE (*loc), reloadreg,
GET_MODE (SUBREG_REG (*loc)),
SUBREG_BYTE (*loc));
}
}
1997-12-07 01:31:01 +01:00
/* If *LOC is a PLUS, MINUS, or MULT, see if a replacement is scheduled for
what's inside and make a new rtl if so. */
if (GET_CODE (*loc) == PLUS || GET_CODE (*loc) == MINUS
|| GET_CODE (*loc) == MULT)
{
rtx x = find_replacement (&XEXP (*loc, 0));
rtx y = find_replacement (&XEXP (*loc, 1));
if (x != XEXP (*loc, 0) || y != XEXP (*loc, 1))
return gen_rtx_fmt_ee (GET_CODE (*loc), GET_MODE (*loc), x, y);
1997-12-07 01:31:01 +01:00
}
return *loc;
}
1992-02-28 11:23:25 +01:00
/* Return nonzero if register in range [REGNO, ENDREGNO)
appears either explicitly or implicitly in X
other than being stored into (except for earlyclobber operands).
1992-02-28 11:23:25 +01:00
References contained within the substructure at LOC do not count.
LOC may be zero, meaning don't ignore anything.
This is similar to refers_to_regno_p in rtlanal.c except that we
look at equivalences for pseudos that didn't get hard registers. */
static int
refers_to_regno_for_reload_p (unsigned int regno, unsigned int endregno,
rtx x, rtx *loc)
1992-02-28 11:23:25 +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 r;
RTX_CODE code;
const char *fmt;
1992-02-28 11:23:25 +01:00
if (x == 0)
return 0;
repeat:
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
r = REGNO (x);
1992-02-28 11:23:25 +01:00
/* If this is a pseudo, a hard register must not have been allocated.
X must therefore either be a constant or be in memory. */
* 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 (r >= FIRST_PSEUDO_REGISTER)
{
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
if (reg_equiv_memory_loc (r))
return refers_to_regno_for_reload_p (regno, endregno,
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
reg_equiv_memory_loc (r),
(rtx*) 0);
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
gcc_assert (reg_equiv_constant (r) || reg_equiv_invariant (r));
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
return 0;
}
1992-02-28 11:23:25 +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
return (endregno > r
&& regno < r + (r < FIRST_PSEUDO_REGISTER
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
? hard_regno_nregs[r][GET_MODE (x)]
1992-02-28 11:23:25 +01:00
: 1));
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))
1992-02-28 11:23:25 +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);
1992-02-28 11:23:25 +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)))
1992-02-28 11:23:25 +01:00
&& REGNO (SUBREG_REG (SET_DEST (x))) >= FIRST_PSEUDO_REGISTER
&& refers_to_regno_for_reload_p (regno, endregno,
SUBREG_REG (SET_DEST (x)),
loc))
1995-08-28 12:54:22 +02:00
/* If the output is an earlyclobber operand, this is
a conflict. */
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))
|| earlyclobber_operand_p (SET_DEST (x)))
1992-02-28 11:23:25 +01:00
&& refers_to_regno_for_reload_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;
1992-02-28 11:23:25 +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_for_reload_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--)
1992-02-28 11:23:25 +01:00
if (loc != &XVECEXP (x, i, j)
&& refers_to_regno_for_reload_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.
This function is similar to reg_overlap_mentioned_p in rtlanal.c except
that we look at equivalences for pseudos that didn't get hard registers. */
int
reg_overlap_mentioned_for_reload_p (rtx x, rtx in)
{
int regno, endregno;
/* Overly conservative. */
if (GET_CODE (x) == STRICT_LOW_PART
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
|| GET_RTX_CLASS (GET_CODE (x)) == RTX_AUTOINC)
x = XEXP (x, 0);
/* If either argument is a constant, then modifying X can not affect IN. */
if (CONSTANT_P (x) || CONSTANT_P (in))
return 0;
else if (GET_CODE (x) == SUBREG && MEM_P (SUBREG_REG (x)))
return refers_to_mem_for_reload_p (in);
else if (GET_CODE (x) == SUBREG)
{
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_offset (REGNO (SUBREG_REG (x)),
GET_MODE (SUBREG_REG (x)),
SUBREG_BYTE (x),
GET_MODE (x));
endregno = regno + (regno < FIRST_PSEUDO_REGISTER
? subreg_nregs (x) : 1);
return refers_to_regno_for_reload_p (regno, endregno, in, (rtx*) 0);
}
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
else if (REG_P (x))
{
regno = REGNO (x);
/* If this is a pseudo, it must not have been assigned a hard register.
Therefore, it must either be in memory or be a constant. */
if (regno >= FIRST_PSEUDO_REGISTER)
{
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
if (reg_equiv_memory_loc (regno))
return refers_to_mem_for_reload_p (in);
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
gcc_assert (reg_equiv_constant (regno));
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
return 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
endregno = END_HARD_REGNO (x);
return refers_to_regno_for_reload_p (regno, endregno, in, (rtx*) 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
else if (MEM_P (x))
return refers_to_mem_for_reload_p (in);
else if (GET_CODE (x) == SCRATCH || GET_CODE (x) == PC
|| GET_CODE (x) == CC0)
return reg_mentioned_p (x, in);
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
else
{
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_CODE (x) == PLUS);
/* We actually want to know if X is mentioned somewhere inside IN.
We must not say that (plus (sp) (const_int 124)) is in
(plus (sp) (const_int 64)), since that can lead to incorrect reload
allocation when spuriously changing a RELOAD_FOR_OUTPUT_ADDRESS
into a RELOAD_OTHER on behalf of another RELOAD_OTHER. */
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
while (MEM_P (in))
in = XEXP (in, 0);
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 (in))
return 0;
else if (GET_CODE (in) == PLUS)
return (rtx_equal_p (x, in)
|| reg_overlap_mentioned_for_reload_p (x, XEXP (in, 0))
|| reg_overlap_mentioned_for_reload_p (x, XEXP (in, 1)));
else return (reg_overlap_mentioned_for_reload_p (XEXP (x, 0), in)
|| reg_overlap_mentioned_for_reload_p (XEXP (x, 1), in));
}
gcc_unreachable ();
}
/* Return nonzero if anything in X contains a MEM. Look also for pseudo
registers. */
static int
refers_to_mem_for_reload_p (rtx 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;
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 (x))
return 1;
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))
return (REGNO (x) >= FIRST_PSEUDO_REGISTER
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
&& reg_equiv_memory_loc (REGNO (x)));
fmt = GET_RTX_FORMAT (GET_CODE (x));
for (i = GET_RTX_LENGTH (GET_CODE (x)) - 1; i >= 0; i--)
if (fmt[i] == 'e'
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 (XEXP (x, i))
|| refers_to_mem_for_reload_p (XEXP (x, i))))
return 1;
return 0;
}
1992-02-28 11:23:25 +01:00
/* Check the insns before INSN to see if there is a suitable register
containing the same value as GOAL.
If OTHER is -1, look for a register in class RCLASS.
1992-02-28 11:23:25 +01:00
Otherwise, just see if register number OTHER shares GOAL's value.
Return an rtx for the register found, or zero if none is found.
If RELOAD_REG_P is (short *)1,
we reject any hard reg that appears in reload_reg_rtx
because such a hard reg is also needed coming into this insn.
If RELOAD_REG_P is any other nonzero value,
it is a vector indexed by hard reg number
and we reject any hard reg whose element in the vector is nonnegative
as well as any that appears in reload_reg_rtx.
If GOAL is zero, then GOALREG is a register number; we look
for an equivalent for that register.
MODE is the machine mode of the value we want an equivalence for.
If GOAL is nonzero and not VOIDmode, then it must have mode MODE.
This function is used by jump.c as well as in the reload pass.
If GOAL is the sum of the stack pointer and a constant, we treat it
as if it were a constant except that sp is required to be unchanging. */
rtx
reload: Use rtx_insn (also touches caller-save.c and config/arc/arc) gcc/ * reload.h (struct insn_chain): Strengthen field "insn" from rtx to rtx_insn *. (find_reloads): Likewise for param 1. (subst_reloads): Likewise for sole param. (find_equiv_reg): Likwise for param 2. (regno_clobbered_p): Likwise for param 2. (reload): Likewise for param 1. * caller-save.c (save_call_clobbered_regs): Strengthen local "insn" from rtx to rtx_insn *. (insert_one_insn): Likewise for local "insn". * reload.c (this_insn): Likewise for this global. (find_reloads): Likewise for param "insn". (find_reloads_toplev): Likewise. (find_reloads_address): Likewise. (subst_reg_equivs): Likewise. (update_auto_inc_notes): Likewise. (find_reloads_address_1): Likewise. (find_reloads_subreg_address): Likewise. (subst_reloads): Likewise. (find_equiv_reg): Likewise, also for local "p". (regno_clobbered_p): Likewise for param "insn". * reload1.c (reg_reloaded_insn): Likewise for the elements of this array. (spill_reg_store): Likewise for the elements of this array. (remove_init_insns): Likewise for local "equiv_insn". (will_delete_init_insn_p): Likewise for param "insn". (reload): Likewise for param ""first" and local "insn". (calculate_needs_all_insns): Strengthen local "insn" from rtx to rtx_insn *. (calculate_elim_costs_all_insns): Likewise. (delete_caller_save_insns): Likewise. (spill_failure): Likewise for param "insn". (delete_dead_insn): Likewise. (set_label_offsets): Likewise. (eliminate_regs_in_insn): Likewise, also for locals "base_insn" and "prev_insn". (elimination_costs_in_insn): Likewise for param "insn". (set_initial_eh_label_offset): Replace use of NULL_RTX with NULL when referring to an insn. (set_initial_label_offsets): Likewise. (set_offsets_for_label): Strengthen param "insn" from rtx to rtx_insn *. (init_eliminable_invariants): Likewise for param "first" and local "insn". (fixup_eh_region_note): Likewise for param "insn". (reload_as_needed): Likewise for locals "prev", "insn", "old_next", "old_prev", "next". (gen_reload_chain_without_interm_reg_p): Likewise for locals "insn", "last". (reload_inheritance_insn): Strengthen elements of this array from rtx to rtx_insn *. (failed_reload): Likewise for param "insn". (choose_reload_regs): Likewise for local "insn". Replace use of NULL_RTX with NULL when referring to an insn. (input_reload_insns): Strengthen elements of this array from rtx to rtx_insn *. (other_input_address_reload_insns): Likewise for this global. (other_input_reload_insns): Likewise for this global. (input_address_reload_insns): Likwise for the elements of this array. (inpaddr_address_reload_insns): Likwise for the elements of this array. (output_reload_insns): Likewise for the elements of this array. (output_address_reload_insns): Likewise for the elements of this array. (outaddr_address_reload_insns): Likewise for the elements of this array. (operand_reload_insns): Likewise for this global. (other_operand_reload_insns): Likewise for this global. (other_output_reload_insns): Likewise for the elements of this array. (new_spill_reg_store): Likewise for the elements of this array. (emit_input_reload_insns): Likewise for locals "insn", "temp". Strengthen local "where" from rtx * to rtx_insn **. (emit_output_reload_insns): Strengthen locals "insn", "p", "next" from rtx to rtx_insn *. (do_input_reload): Likewise for local "insn". (do_output_reload): Likewise for local "insn". (emit_reload_insns): Likewise for locals "insn" and "store_insn". (emit_insn_if_valid_for_reload): Likewise for return type and local "last". Add checked cast to rtx_insn when returning "insn" since this has been through emit_insn. (gen_reload): Strengthen return type and locals "last", "insn", "set" from rtx to rtx_insn *. Add checked cast to rtx_insn when returning "insn" since it's been through emit_insn_if_valid_for_reload at this point. (delete_output_reload): Strengthen param "insn" and locals "output_reload_insn", "i2" from rtx to rtx_insn *. (delete_address_reloads): Likewise for params "dead_insn", "current_insn" and locals "prev", "next". (delete_address_reloads_1): Likewise for params "dead_insn", "current_insn" and locals "prev", "i2". (inc_for_reload): Likewise for locals "last", "add_insn". (add_auto_inc_notes): Strengthen param "insn" from rtx to rtx_insn *. * config/arc/arc-protos.h (regno_clobbered_p): Likewise for 2nd param of this duplicate of the prototype from reload.h From-SVN: r214370
2014-08-22 22:49:31 +02:00
find_equiv_reg (rtx goal, rtx_insn *insn, enum reg_class rclass, int other,
short *reload_reg_p, int goalreg, enum machine_mode mode)
1992-02-28 11:23:25 +01:00
{
reload: Use rtx_insn (also touches caller-save.c and config/arc/arc) gcc/ * reload.h (struct insn_chain): Strengthen field "insn" from rtx to rtx_insn *. (find_reloads): Likewise for param 1. (subst_reloads): Likewise for sole param. (find_equiv_reg): Likwise for param 2. (regno_clobbered_p): Likwise for param 2. (reload): Likewise for param 1. * caller-save.c (save_call_clobbered_regs): Strengthen local "insn" from rtx to rtx_insn *. (insert_one_insn): Likewise for local "insn". * reload.c (this_insn): Likewise for this global. (find_reloads): Likewise for param "insn". (find_reloads_toplev): Likewise. (find_reloads_address): Likewise. (subst_reg_equivs): Likewise. (update_auto_inc_notes): Likewise. (find_reloads_address_1): Likewise. (find_reloads_subreg_address): Likewise. (subst_reloads): Likewise. (find_equiv_reg): Likewise, also for local "p". (regno_clobbered_p): Likewise for param "insn". * reload1.c (reg_reloaded_insn): Likewise for the elements of this array. (spill_reg_store): Likewise for the elements of this array. (remove_init_insns): Likewise for local "equiv_insn". (will_delete_init_insn_p): Likewise for param "insn". (reload): Likewise for param ""first" and local "insn". (calculate_needs_all_insns): Strengthen local "insn" from rtx to rtx_insn *. (calculate_elim_costs_all_insns): Likewise. (delete_caller_save_insns): Likewise. (spill_failure): Likewise for param "insn". (delete_dead_insn): Likewise. (set_label_offsets): Likewise. (eliminate_regs_in_insn): Likewise, also for locals "base_insn" and "prev_insn". (elimination_costs_in_insn): Likewise for param "insn". (set_initial_eh_label_offset): Replace use of NULL_RTX with NULL when referring to an insn. (set_initial_label_offsets): Likewise. (set_offsets_for_label): Strengthen param "insn" from rtx to rtx_insn *. (init_eliminable_invariants): Likewise for param "first" and local "insn". (fixup_eh_region_note): Likewise for param "insn". (reload_as_needed): Likewise for locals "prev", "insn", "old_next", "old_prev", "next". (gen_reload_chain_without_interm_reg_p): Likewise for locals "insn", "last". (reload_inheritance_insn): Strengthen elements of this array from rtx to rtx_insn *. (failed_reload): Likewise for param "insn". (choose_reload_regs): Likewise for local "insn". Replace use of NULL_RTX with NULL when referring to an insn. (input_reload_insns): Strengthen elements of this array from rtx to rtx_insn *. (other_input_address_reload_insns): Likewise for this global. (other_input_reload_insns): Likewise for this global. (input_address_reload_insns): Likwise for the elements of this array. (inpaddr_address_reload_insns): Likwise for the elements of this array. (output_reload_insns): Likewise for the elements of this array. (output_address_reload_insns): Likewise for the elements of this array. (outaddr_address_reload_insns): Likewise for the elements of this array. (operand_reload_insns): Likewise for this global. (other_operand_reload_insns): Likewise for this global. (other_output_reload_insns): Likewise for the elements of this array. (new_spill_reg_store): Likewise for the elements of this array. (emit_input_reload_insns): Likewise for locals "insn", "temp". Strengthen local "where" from rtx * to rtx_insn **. (emit_output_reload_insns): Strengthen locals "insn", "p", "next" from rtx to rtx_insn *. (do_input_reload): Likewise for local "insn". (do_output_reload): Likewise for local "insn". (emit_reload_insns): Likewise for locals "insn" and "store_insn". (emit_insn_if_valid_for_reload): Likewise for return type and local "last". Add checked cast to rtx_insn when returning "insn" since this has been through emit_insn. (gen_reload): Strengthen return type and locals "last", "insn", "set" from rtx to rtx_insn *. Add checked cast to rtx_insn when returning "insn" since it's been through emit_insn_if_valid_for_reload at this point. (delete_output_reload): Strengthen param "insn" and locals "output_reload_insn", "i2" from rtx to rtx_insn *. (delete_address_reloads): Likewise for params "dead_insn", "current_insn" and locals "prev", "next". (delete_address_reloads_1): Likewise for params "dead_insn", "current_insn" and locals "prev", "i2". (inc_for_reload): Likewise for locals "last", "add_insn". (add_auto_inc_notes): Strengthen param "insn" from rtx to rtx_insn *. * config/arc/arc-protos.h (regno_clobbered_p): Likewise for 2nd param of this duplicate of the prototype from reload.h From-SVN: r214370
2014-08-22 22:49:31 +02:00
rtx_insn *p = insn;
rtx goaltry, valtry, value, where;
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 pat;
int regno = -1;
1992-02-28 11:23:25 +01:00
int valueno;
int goal_mem = 0;
int goal_const = 0;
int goal_mem_addr_varies = 0;
int need_stable_sp = 0;
int nregs;
int valuenregs;
int num = 0;
1992-02-28 11:23:25 +01:00
if (goal == 0)
regno = goalreg;
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
else if (REG_P (goal))
1992-02-28 11:23:25 +01:00
regno = REGNO (goal);
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
else if (MEM_P (goal))
1992-02-28 11:23:25 +01:00
{
enum rtx_code code = GET_CODE (XEXP (goal, 0));
if (MEM_VOLATILE_P (goal))
return 0;
if (flag_float_store && SCALAR_FLOAT_MODE_P (GET_MODE (goal)))
1992-02-28 11:23:25 +01:00
return 0;
/* An address with side effects must be reexecuted. */
switch (code)
{
case POST_INC:
case PRE_INC:
case POST_DEC:
case PRE_DEC:
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 POST_MODIFY:
case PRE_MODIFY:
1992-02-28 11:23:25 +01:00
return 0;
default:
break;
1992-02-28 11:23:25 +01:00
}
goal_mem = 1;
}
else if (CONSTANT_P (goal))
goal_const = 1;
else if (GET_CODE (goal) == PLUS
&& XEXP (goal, 0) == stack_pointer_rtx
&& CONSTANT_P (XEXP (goal, 1)))
goal_const = need_stable_sp = 1;
else if (GET_CODE (goal) == PLUS
&& XEXP (goal, 0) == frame_pointer_rtx
&& CONSTANT_P (XEXP (goal, 1)))
goal_const = 1;
1992-02-28 11:23:25 +01:00
else
return 0;
num = 0;
1992-02-28 11:23:25 +01:00
/* Scan insns back from INSN, looking for one that copies
a value into or out of GOAL.
Stop and give up if we reach a label. */
while (1)
{
p = PREV_INSN (p);
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 (p && DEBUG_INSN_P (p))
continue;
num++;
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 (p == 0 || LABEL_P (p)
|| num > PARAM_VALUE (PARAM_MAX_RELOAD_SEARCH_INSNS))
1992-02-28 11:23:25 +01:00
return 0;
* 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
/* Don't reuse register contents from before a setjmp-type
function call; on the second return (from the longjmp) it
might have been clobbered by a later reuse. It doesn't
seem worthwhile to actually go and see if it is actually
reused even if that information would be readily available;
just don't reuse it across the setjmp call. */
if (CALL_P (p) && find_reg_note (p, REG_SETJMP, NULL_RTX))
return 0;
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 (NONJUMP_INSN_P (p)
1996-07-04 00:07:53 +02:00
/* If we don't want spill regs ... */
&& (! (reload_reg_p != 0
&& reload_reg_p != (short *) (HOST_WIDE_INT) 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
/* ... then ignore insns introduced by reload; they aren't
useful and can cause results in reload_as_needed to be
different from what they were when calculating the need for
spills. If we notice an input-reload insn here, we will
reject it below, but it might hide a usable equivalent.
lambda.h (lambda_vector_min_nz): Likewise. * lambda.h (lambda_vector_min_nz): Likewise. * langhooks.h (struct lang_hooks_for_types, struct lang_hooks): Likewise. * output.h (assemble_integer, this_is_asm_operands): Likewise. * tree.h: Likewise. * vec.h: Likewise. * tree-flow-inline.h (relink_imm_use): Use gcc_assert. * optabs.c (prepare_cmp_insn, emit_cmp_and_jump_insns): Reword comments to avoid 'abort'. Use gcc_assert as necessary. * opts.c (common_handle_option): Likewise. * pretty-print.c (pp_base_format_text): Likewise. * print-rtl.c (print_rtx): Likewise. * read-rtl.c (read_rtx_filename, read_rtx_1): Likewise. * regmove.c (try_auto_increment): Likewise. * reload.c (find_valid_class, find_reloads_toplev, find_equiv_reg): Likewise. * reload1.c (reload, forget_old_reloads_1, function_invariant_p, merge_assigned_reloads): Likewise. * tree-inline.c (inline_forbidden_p_1, estimate_num_insns_1): Likewise. * tree-optimize.c (execute_todo): Likewise. * tree-outof-ssa.c (eliminate_phi): Likewise. * tree-ssa-alias.c (add_pointed_to_expr): Likewise. * tree-ssa-ccp.c (maybe_fold_stmt_indirect): Likewise. * tree-ssa-operands.c (parse_ssa_operands, get_indirect_ref_operands, create_ssa_artficial_load_stmt): Likewise. * tree-ssa-pre.c (find_or_generate_expression): Likewise. * tree-ssanames.c (release_ssa_name): Likewise. * tree.c (int_bit_position, int_byte_position, tree_low_cst, walk_tree): Likewise. * tree-ssa-operands.c (verify_abort): Fold into .. (verify_imm_links): ... here. From-SVN: r98519
2005-04-21 20:05:34 +02:00
That makes bad code. It may even fail: perhaps no reg was
* 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
spilled for this insn because it was assumed we would find
that equivalent. */
1992-02-28 11:23:25 +01:00
|| INSN_UID (p) < reload_first_uid))
{
rtx tem;
1992-02-28 11:23:25 +01:00
pat = single_set (p);
* 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
1992-02-28 11:23:25 +01:00
/* First check for something that sets some reg equal to GOAL. */
if (pat != 0
&& ((regno >= 0
&& true_regnum (SET_SRC (pat)) == regno
&& (valueno = true_regnum (valtry = SET_DEST (pat))) >= 0)
||
(regno >= 0
&& true_regnum (SET_DEST (pat)) == regno
&& (valueno = true_regnum (valtry = SET_SRC (pat))) >= 0)
||
(goal_const && rtx_equal_p (SET_SRC (pat), goal)
/* When looking for stack pointer + const,
make sure we don't use a stack adjust. */
&& !reg_overlap_mentioned_for_reload_p (SET_DEST (pat), goal)
1992-02-28 11:23:25 +01:00
&& (valueno = true_regnum (valtry = SET_DEST (pat))) >= 0)
|| (goal_mem
&& (valueno = true_regnum (valtry = SET_DEST (pat))) >= 0
&& rtx_renumbered_equal_p (goal, SET_SRC (pat)))
|| (goal_mem
&& (valueno = true_regnum (valtry = SET_SRC (pat))) >= 0
&& rtx_renumbered_equal_p (goal, SET_DEST (pat)))
/* If we are looking for a constant,
and something equivalent to that constant was copied
into a reg, we can use that reg. */
|| (goal_const && REG_NOTES (p) != 0
&& (tem = find_reg_note (p, REG_EQUIV, NULL_RTX))
&& ((rtx_equal_p (XEXP (tem, 0), goal)
&& (valueno
= true_regnum (valtry = SET_DEST (pat))) >= 0)
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 (pat))
&& CONST_DOUBLE_AS_FLOAT_P (XEXP (tem, 0))
&& SCALAR_FLOAT_MODE_P (GET_MODE (XEXP (tem, 0)))
&& CONST_INT_P (goal)
&& 0 != (goaltry
= operand_subword (XEXP (tem, 0), 0, 0,
VOIDmode))
&& rtx_equal_p (goal, goaltry)
&& (valtry
= operand_subword (SET_DEST (pat), 0, 0,
VOIDmode))
&& (valueno = true_regnum (valtry)) >= 0)))
|| (goal_const && (tem = find_reg_note (p, REG_EQUIV,
NULL_RTX))
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 (pat))
&& CONST_DOUBLE_AS_FLOAT_P (XEXP (tem, 0))
&& SCALAR_FLOAT_MODE_P (GET_MODE (XEXP (tem, 0)))
&& CONST_INT_P (goal)
&& 0 != (goaltry = operand_subword (XEXP (tem, 0), 1, 0,
VOIDmode))
&& rtx_equal_p (goal, goaltry)
&& (valtry
= operand_subword (SET_DEST (pat), 1, 0, VOIDmode))
&& (valueno = true_regnum (valtry)) >= 0)))
{
if (other >= 0)
{
if (valueno != other)
continue;
}
else if ((unsigned) valueno >= FIRST_PSEUDO_REGISTER)
continue;
else if (!in_hard_reg_set_p (reg_class_contents[(int) rclass],
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
mode, valueno))
continue;
value = valtry;
where = p;
break;
}
1992-02-28 11:23:25 +01:00
}
}
/* We found a previous insn copying GOAL into a suitable other reg VALUE
(or copying VALUE into GOAL, if GOAL is also a register).
Now verify that VALUE is really valid. */
/* VALUENO is the register number of VALUE; a hard register. */
/* Don't try to re-use something that is killed in this insn. We want
to be able to trust REG_UNUSED notes. */
if (REG_NOTES (where) != 0 && find_reg_note (where, REG_UNUSED, value))
1992-02-28 11:23:25 +01:00
return 0;
/* If we propose to get the value from the stack pointer or if GOAL is
a MEM based on the stack pointer, we need a stable SP. */
if (valueno == STACK_POINTER_REGNUM || regno == STACK_POINTER_REGNUM
|| (goal_mem && reg_overlap_mentioned_for_reload_p (stack_pointer_rtx,
goal)))
1992-02-28 11:23:25 +01:00
need_stable_sp = 1;
/* Reject VALUE if the copy-insn moved the wrong sort of datum. */
if (GET_MODE (value) != mode)
return 0;
/* Reject VALUE if it was loaded from GOAL
and is also a register that appears in the address of GOAL. */
if (goal_mem && value == SET_DEST (single_set (where))
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
&& refers_to_regno_for_reload_p (valueno, end_hard_regno (mode, valueno),
goal, (rtx*) 0))
1992-02-28 11:23:25 +01:00
return 0;
/* Reject registers that overlap GOAL. */
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
if (regno >= 0 && regno < FIRST_PSEUDO_REGISTER)
nregs = hard_regno_nregs[regno][mode];
else
nregs = 1;
valuenregs = hard_regno_nregs[valueno][mode];
if (!goal_mem && !goal_const
&& regno + nregs > valueno && regno < valueno + valuenregs)
return 0;
1992-02-28 11:23:25 +01:00
/* Reject VALUE if it is one of the regs reserved for reloads.
Reload1 knows how to reuse them anyway, and it would get
confused if we allocated one without its knowledge.
(Now that insns introduced by reload are ignored above,
this case shouldn't happen, but I'm not positive.) */
if (reload_reg_p != 0 && reload_reg_p != (short *) (HOST_WIDE_INT) 1)
{
int i;
for (i = 0; i < valuenregs; ++i)
if (reload_reg_p[valueno + i] >= 0)
return 0;
}
1992-02-28 11:23:25 +01:00
/* Reject VALUE if it is a register being used for an input reload
even if it is not one of those reserved. */
if (reload_reg_p != 0)
{
int i;
for (i = 0; i < n_reloads; i++)
if (rld[i].reg_rtx != 0 && rld[i].in)
1992-02-28 11:23:25 +01:00
{
int regno1 = REGNO (rld[i].reg_rtx);
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
int nregs1 = hard_regno_nregs[regno1]
[GET_MODE (rld[i].reg_rtx)];
1992-02-28 11:23:25 +01:00
if (regno1 < valueno + valuenregs
&& regno1 + nregs1 > valueno)
return 0;
}
}
if (goal_mem)
/* We must treat frame pointer as varying here,
since it can vary--in a nonlocal goto as generated by expand_goto. */
goal_mem_addr_varies = !CONSTANT_ADDRESS_P (XEXP (goal, 0));
1992-02-28 11:23:25 +01:00
/* Now verify that the values of GOAL and VALUE remain unaltered
until INSN is reached. */
p = insn;
while (1)
{
p = PREV_INSN (p);
if (p == where)
return value;
/* Don't trust the conversion past a function call
if either of the two is in a call-clobbered register, or memory. */
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 (p))
{
int i;
if (goal_mem || need_stable_sp)
return 0;
if (regno >= 0 && regno < FIRST_PSEUDO_REGISTER)
for (i = 0; i < nregs; ++i)
if (call_used_regs[regno + i]
|| HARD_REGNO_CALL_PART_CLOBBERED (regno + i, mode))
return 0;
if (valueno >= 0 && valueno < FIRST_PSEUDO_REGISTER)
for (i = 0; i < valuenregs; ++i)
if (call_used_regs[valueno + i]
|| HARD_REGNO_CALL_PART_CLOBBERED (valueno + i, mode))
return 0;
}
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))
1992-02-28 11:23:25 +01:00
{
pat = PATTERN (p);
/* Watch out for unspec_volatile, and volatile asms. */
if (volatile_insn_p (pat))
return 0;
1992-02-28 11:23:25 +01:00
/* If this insn P stores in either GOAL or VALUE, return 0.
If GOAL is a memory ref and this insn writes memory, return 0.
If GOAL is a memory ref and its address is not constant,
and this insn P changes a register used in GOAL, return 0. */
if (GET_CODE (pat) == COND_EXEC)
pat = COND_EXEC_CODE (pat);
1992-02-28 11:23:25 +01:00
if (GET_CODE (pat) == SET || GET_CODE (pat) == CLOBBER)
{
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 dest = SET_DEST (pat);
1992-02-28 11:23:25 +01:00
while (GET_CODE (dest) == SUBREG
|| GET_CODE (dest) == ZERO_EXTRACT
|| GET_CODE (dest) == STRICT_LOW_PART)
dest = XEXP (dest, 0);
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 (dest))
1992-02-28 11:23:25 +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 xregno = REGNO (dest);
1992-02-28 11:23:25 +01:00
int xnregs;
if (REGNO (dest) < FIRST_PSEUDO_REGISTER)
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
xnregs = hard_regno_nregs[xregno][GET_MODE (dest)];
1992-02-28 11:23:25 +01:00
else
xnregs = 1;
if (xregno < regno + nregs && xregno + xnregs > regno)
return 0;
if (xregno < valueno + valuenregs
&& xregno + xnregs > valueno)
return 0;
if (goal_mem_addr_varies
&& reg_overlap_mentioned_for_reload_p (dest, goal))
1992-02-28 11:23:25 +01:00
return 0;
if (xregno == STACK_POINTER_REGNUM && need_stable_sp)
return 0;
1992-02-28 11:23:25 +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
else if (goal_mem && MEM_P (dest)
1992-02-28 11:23:25 +01:00
&& ! push_operand (dest, GET_MODE (dest)))
return 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
else if (MEM_P (dest) && regno >= FIRST_PSEUDO_REGISTER
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
&& reg_equiv_memory_loc (regno) != 0)
return 0;
1992-02-28 11:23:25 +01:00
else if (need_stable_sp && push_operand (dest, GET_MODE (dest)))
return 0;
}
else if (GET_CODE (pat) == PARALLEL)
{
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;
1992-02-28 11:23:25 +01:00
for (i = XVECLEN (pat, 0) - 1; i >= 0; i--)
{
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 v1 = XVECEXP (pat, 0, i);
if (GET_CODE (v1) == COND_EXEC)
v1 = COND_EXEC_CODE (v1);
1992-02-28 11:23:25 +01:00
if (GET_CODE (v1) == SET || GET_CODE (v1) == CLOBBER)
{
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 dest = SET_DEST (v1);
1992-02-28 11:23:25 +01:00
while (GET_CODE (dest) == SUBREG
|| GET_CODE (dest) == ZERO_EXTRACT
|| GET_CODE (dest) == STRICT_LOW_PART)
dest = XEXP (dest, 0);
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 (dest))
1992-02-28 11:23:25 +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 xregno = REGNO (dest);
1992-02-28 11:23:25 +01:00
int xnregs;
if (REGNO (dest) < FIRST_PSEUDO_REGISTER)
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
xnregs = hard_regno_nregs[xregno][GET_MODE (dest)];
1992-02-28 11:23:25 +01:00
else
xnregs = 1;
if (xregno < regno + nregs
&& xregno + xnregs > regno)
return 0;
if (xregno < valueno + valuenregs
&& xregno + xnregs > valueno)
return 0;
if (goal_mem_addr_varies
&& reg_overlap_mentioned_for_reload_p (dest,
goal))
1992-02-28 11:23:25 +01:00
return 0;
if (xregno == STACK_POINTER_REGNUM && need_stable_sp)
return 0;
1992-02-28 11:23:25 +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
else if (goal_mem && MEM_P (dest)
1992-02-28 11:23:25 +01:00
&& ! push_operand (dest, GET_MODE (dest)))
return 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
else if (MEM_P (dest) && regno >= FIRST_PSEUDO_REGISTER
reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. * reload.h (reg_equiv_constant): Move into new structure reg_equivs, define accessor macro. (reg_equiv_invariant, reg_equiv_memory_loc): Likewise. (reg_equiv_address, reg_equiv_mem, reg_equiv_alt_mem_list): Likewise. (reg_equiv_init): Likewise. (reg_equivs_size): New variable. (reg_equiv_init_size): Remove. (allocate_initial_values): Move prototype to here from.... * integrate.h (allocate_initial_values): Remove prototype. * integrate.c: Include reload.h. (allocate_initial_values): Corresponding changes. * ira.c (find_reg_equiv_invariant_cost): Corresponding changes. (fix_reg_equiv_init, no_equiv): Corresponding changes. (update_equiv_regs): Corresponding changes. (ira): Corresponding changes. * reload.c (push_reg_equiv_alt_mem): Corresponding changes. (push_secondary_reload): Corresponding changes. (push_reload, find_reloads, find_reloads_toplev): Corresponding changes. (make_memloc, find_reloads_address): Corresponding changes. (subst_reg_equivs, subst_indexed_address): Corresponding changes. (find_reloads_address_1): Corresponding changes. (find_reloads_subreg_address, subst_reloads): Corresponding changes. (refers_to_regno_for_reload_p): Corresponding changes. (reg_overlap_mentioned_for_reload_p): Corresponding changes. (refers_to_mem_for_reload_p, find_equiv_reg): Corresponding changes. * reload1.c: Include ggc.h. (grow_reg_equivs): New function. (replace_pseudos_in, reload): Corresponding changes. (calculate_needs_all_insns, alter_regs): Corresponding changes. (eliminate_regs_1, elimination_effects): Corresponding changes. (emit_input_reload_insns, emit_output_reload_insns): Likewise. (delete_output_reload): Likewise. * caller-save.c (mark_referenced_regs): Corresponding changes. * alpha/alpha.c (resolve_reload_operand): Corresponding changes. * frv/predicates.md (frv_load_operand): Corresponding changes. * microblaze/microblaze.c (double_memory_operand): Corresponding changes. * avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Corresponding changes. * xtensa/xtensa.c (fixup_subreg_mem): Corresponding changes. * mn10300/mn10300.c (mn10300_secondary_reload): Corresponding changes. * m68k/m68k.c (emit_move_sequence): Corresponding changes. * arm/arm.c (arm_reload_in_hi, arm_reload_out_hi): Corresponding changes. * pa/pa.c (emit_move_sequence): Corresponding changes. * vax/vax.c (nonindexed_address_p): Corresponding changes. From-SVN: r171731
2011-03-30 17:18:30 +02:00
&& reg_equiv_memory_loc (regno) != 0)
return 0;
else if (need_stable_sp
&& push_operand (dest, GET_MODE (dest)))
return 0;
}
}
}
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 (p) && CALL_INSN_FUNCTION_USAGE (p))
{
rtx link;
for (link = CALL_INSN_FUNCTION_USAGE (p); XEXP (link, 1) != 0;
link = XEXP (link, 1))
{
pat = XEXP (link, 0);
if (GET_CODE (pat) == CLOBBER)
{
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 dest = SET_DEST (pat);
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 (dest))
{
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 xregno = REGNO (dest);
int xnregs
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
= hard_regno_nregs[xregno][GET_MODE (dest)];
if (xregno < regno + nregs
&& xregno + xnregs > regno)
return 0;
else if (xregno < valueno + valuenregs
&& xregno + xnregs > valueno)
return 0;
else if (goal_mem_addr_varies
&& reg_overlap_mentioned_for_reload_p (dest,
goal))
return 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
else if (goal_mem && MEM_P (dest)
&& ! push_operand (dest, GET_MODE (dest)))
return 0;
1992-02-28 11:23:25 +01:00
else if (need_stable_sp
&& push_operand (dest, GET_MODE (dest)))
return 0;
}
}
}
#ifdef AUTO_INC_DEC
/* If this insn auto-increments or auto-decrements
either regno or valueno, return 0 now.
If GOAL is a memory ref and its address is not constant,
and this insn P increments a register used in GOAL, return 0. */
{
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;
1992-02-28 11:23:25 +01:00
for (link = REG_NOTES (p); link; link = XEXP (link, 1))
if (REG_NOTE_KIND (link) == REG_INC
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)))
1992-02-28 11:23:25 +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 incno = REGNO (XEXP (link, 0));
1992-02-28 11:23:25 +01:00
if (incno < regno + nregs && incno >= regno)
return 0;
if (incno < valueno + valuenregs && incno >= valueno)
return 0;
if (goal_mem_addr_varies
&& reg_overlap_mentioned_for_reload_p (XEXP (link, 0),
goal))
1992-02-28 11:23:25 +01:00
return 0;
}
}
#endif
}
}
}
/* Find a place where INCED appears in an increment or decrement operator
within X, and return the amount INCED is incremented or decremented by.
The value is always positive. */
static int
find_inc_amount (rtx x, rtx inced)
1992-02-28 11:23:25 +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);
const char *fmt;
int i;
1992-02-28 11:23:25 +01:00
if (code == MEM)
{
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 addr = XEXP (x, 0);
1992-02-28 11:23:25 +01:00
if ((GET_CODE (addr) == PRE_DEC
|| GET_CODE (addr) == POST_DEC
|| GET_CODE (addr) == PRE_INC
|| GET_CODE (addr) == POST_INC)
&& XEXP (addr, 0) == inced)
return GET_MODE_SIZE (GET_MODE (x));
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
else if ((GET_CODE (addr) == PRE_MODIFY
|| GET_CODE (addr) == POST_MODIFY)
&& GET_CODE (XEXP (addr, 1)) == PLUS
&& XEXP (addr, 0) == XEXP (XEXP (addr, 1), 0)
&& XEXP (addr, 0) == inced
&& CONST_INT_P (XEXP (XEXP (addr, 1), 1)))
{
i = INTVAL (XEXP (XEXP (addr, 1), 1));
return i < 0 ? -i : i;
}
}
1992-02-28 11:23:25 +01:00
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 tem = find_inc_amount (XEXP (x, i), inced);
1992-02-28 11:23:25 +01:00
if (tem != 0)
return tem;
}
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;
1992-02-28 11:23:25 +01:00
for (j = XVECLEN (x, i) - 1; j >= 0; j--)
{
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 tem = find_inc_amount (XVECEXP (x, i, j), inced);
1992-02-28 11:23:25 +01:00
if (tem != 0)
return tem;
}
}
}
return 0;
}
/* Return 1 if registers from REGNO to ENDREGNO are the subjects of a
REG_INC note in insn INSN. REGNO must refer to a hard register. */
#ifdef AUTO_INC_DEC
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
static int
reg_inc_found_and_valid_p (unsigned int regno, unsigned int endregno,
rtx insn)
{
rtx link;
gcc_assert (insn);
if (! INSN_P (insn))
return 0;
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
for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
if (REG_NOTE_KIND (link) == REG_INC)
{
unsigned int test = (int) REGNO (XEXP (link, 0));
if (test >= regno && test < endregno)
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
return 1;
}
return 0;
}
#else
#define reg_inc_found_and_valid_p(regno,endregno,insn) 0
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
#endif
/* Return 1 if register REGNO is the subject of a clobber in insn INSN.
If SETS is 1, also consider SETs. If SETS is 2, enable checking
REG_INC. REGNO must refer to a hard register. */
1992-02-28 11:23:25 +01:00
int
reload: Use rtx_insn (also touches caller-save.c and config/arc/arc) gcc/ * reload.h (struct insn_chain): Strengthen field "insn" from rtx to rtx_insn *. (find_reloads): Likewise for param 1. (subst_reloads): Likewise for sole param. (find_equiv_reg): Likwise for param 2. (regno_clobbered_p): Likwise for param 2. (reload): Likewise for param 1. * caller-save.c (save_call_clobbered_regs): Strengthen local "insn" from rtx to rtx_insn *. (insert_one_insn): Likewise for local "insn". * reload.c (this_insn): Likewise for this global. (find_reloads): Likewise for param "insn". (find_reloads_toplev): Likewise. (find_reloads_address): Likewise. (subst_reg_equivs): Likewise. (update_auto_inc_notes): Likewise. (find_reloads_address_1): Likewise. (find_reloads_subreg_address): Likewise. (subst_reloads): Likewise. (find_equiv_reg): Likewise, also for local "p". (regno_clobbered_p): Likewise for param "insn". * reload1.c (reg_reloaded_insn): Likewise for the elements of this array. (spill_reg_store): Likewise for the elements of this array. (remove_init_insns): Likewise for local "equiv_insn". (will_delete_init_insn_p): Likewise for param "insn". (reload): Likewise for param ""first" and local "insn". (calculate_needs_all_insns): Strengthen local "insn" from rtx to rtx_insn *. (calculate_elim_costs_all_insns): Likewise. (delete_caller_save_insns): Likewise. (spill_failure): Likewise for param "insn". (delete_dead_insn): Likewise. (set_label_offsets): Likewise. (eliminate_regs_in_insn): Likewise, also for locals "base_insn" and "prev_insn". (elimination_costs_in_insn): Likewise for param "insn". (set_initial_eh_label_offset): Replace use of NULL_RTX with NULL when referring to an insn. (set_initial_label_offsets): Likewise. (set_offsets_for_label): Strengthen param "insn" from rtx to rtx_insn *. (init_eliminable_invariants): Likewise for param "first" and local "insn". (fixup_eh_region_note): Likewise for param "insn". (reload_as_needed): Likewise for locals "prev", "insn", "old_next", "old_prev", "next". (gen_reload_chain_without_interm_reg_p): Likewise for locals "insn", "last". (reload_inheritance_insn): Strengthen elements of this array from rtx to rtx_insn *. (failed_reload): Likewise for param "insn". (choose_reload_regs): Likewise for local "insn". Replace use of NULL_RTX with NULL when referring to an insn. (input_reload_insns): Strengthen elements of this array from rtx to rtx_insn *. (other_input_address_reload_insns): Likewise for this global. (other_input_reload_insns): Likewise for this global. (input_address_reload_insns): Likwise for the elements of this array. (inpaddr_address_reload_insns): Likwise for the elements of this array. (output_reload_insns): Likewise for the elements of this array. (output_address_reload_insns): Likewise for the elements of this array. (outaddr_address_reload_insns): Likewise for the elements of this array. (operand_reload_insns): Likewise for this global. (other_operand_reload_insns): Likewise for this global. (other_output_reload_insns): Likewise for the elements of this array. (new_spill_reg_store): Likewise for the elements of this array. (emit_input_reload_insns): Likewise for locals "insn", "temp". Strengthen local "where" from rtx * to rtx_insn **. (emit_output_reload_insns): Strengthen locals "insn", "p", "next" from rtx to rtx_insn *. (do_input_reload): Likewise for local "insn". (do_output_reload): Likewise for local "insn". (emit_reload_insns): Likewise for locals "insn" and "store_insn". (emit_insn_if_valid_for_reload): Likewise for return type and local "last". Add checked cast to rtx_insn when returning "insn" since this has been through emit_insn. (gen_reload): Strengthen return type and locals "last", "insn", "set" from rtx to rtx_insn *. Add checked cast to rtx_insn when returning "insn" since it's been through emit_insn_if_valid_for_reload at this point. (delete_output_reload): Strengthen param "insn" and locals "output_reload_insn", "i2" from rtx to rtx_insn *. (delete_address_reloads): Likewise for params "dead_insn", "current_insn" and locals "prev", "next". (delete_address_reloads_1): Likewise for params "dead_insn", "current_insn" and locals "prev", "i2". (inc_for_reload): Likewise for locals "last", "add_insn". (add_auto_inc_notes): Strengthen param "insn" from rtx to rtx_insn *. * config/arc/arc-protos.h (regno_clobbered_p): Likewise for 2nd param of this duplicate of the prototype from reload.h From-SVN: r214370
2014-08-22 22:49:31 +02:00
regno_clobbered_p (unsigned int regno, rtx_insn *insn, enum machine_mode mode,
int sets)
1992-02-28 11:23:25 +01:00
{
unsigned int nregs, endregno;
/* regno must be a hard register. */
gcc_assert (regno < FIRST_PSEUDO_REGISTER);
nregs = hard_regno_nregs[regno][mode];
endregno = regno + nregs;
if ((GET_CODE (PATTERN (insn)) == CLOBBER
|| (sets == 1 && GET_CODE (PATTERN (insn)) == 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 (XEXP (PATTERN (insn), 0)))
{
regmove.c (replace_in_call_usage): Fix warnings. 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl> * regmove.c (replace_in_call_usage): Fix warnings. * sched-deps.c (add_dependence): Fix warnings. * simplify-rtx.c (simplify_subreg): Likewise. Return NULL_RTX instead of NULL. * reg-stack.c (emit_swap_insn): Eliminate warnings. (subst_asm_stack_regs): Likewise. * combine.c (num_sign_bit_copies): Cast bitwidth to int to avoid warnings. * dwarf2out.c (output_call_frame_info): Declare i as int. (build_abbrev_table): Declare n_alloc as int. (dwarf2out_finish): Initialize die. * except.c: Declare sjlj_funcdef_number as unsigned. (connect_post_landing_pads): Declare j as unsigned. (convert_to_eh_region_ranges): Initialize call_site. (output_function_exception_table): Initialize tt_format_size. * expr.c (move_by_pieces_1): Initialize to1. (store_constructor): Initialize minelt and maxelt. * flow.c (mark_regs_live_at_end): Declare i as unsigned. * function.c (instantiate_decls): Avoid signed/unsigned warning. * c-decl.c (combine_parm_decls): Unused, remove. * c-tree.h: Remove prototype for combine_parm_decls. * reload.c (push_reload): Fix warning. (regno_clobbered_p): Likewise. * reload1.c (replace_pseudos_in_call_usage): Likewise. (reload_combine): Likewise. * bitmap.c: Rename bitmap_zero to bitmap_zero_bits to fix warnings. * bitmap.h: Rename bitmap_zero to bitmap_zero_bits to fix warnings. * bitmap.c (bitmap_operation): Change user. * bitmap.h (EXECUTE_IF_AND_COMPL_IN_BITMAP): Likewise. For cp/: 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl> * call.c (build_op_delete_call): Initialize fn. (convert_like_real): Delete conditional. (joust): Initialize *w and *l. * class.c: Add prototype for binfo_ctor_vtable. (get_primary_binfo): Initialize result. * init.c (build_java_class_ref): Initialize name. * typeck.c (unary_complex_lvalue): Do not duplicate the argument to modify, pre-, or post-increment when used as an lvalue and when the argument has side-effects. For ch/: 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl> * ch-tree.h: Remove prototype for combine_parm_decls, unused function. From-SVN: r43893
2001-07-10 12:38:10 +02:00
unsigned int test = REGNO (XEXP (PATTERN (insn), 0));
2000-09-11 15:13:00 +02:00
return test >= regno && test < endregno;
}
1992-02-28 11:23:25 +01:00
if (sets == 2 && reg_inc_found_and_valid_p (regno, endregno, insn))
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
return 1;
1992-02-28 11:23:25 +01:00
if (GET_CODE (PATTERN (insn)) == PARALLEL)
{
int i = XVECLEN (PATTERN (insn), 0) - 1;
for (; i >= 0; i--)
{
rtx elt = XVECEXP (PATTERN (insn), 0, i);
if ((GET_CODE (elt) == CLOBBER
|| (sets == 1 && GET_CODE (elt) == 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 (XEXP (elt, 0)))
{
regmove.c (replace_in_call_usage): Fix warnings. 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl> * regmove.c (replace_in_call_usage): Fix warnings. * sched-deps.c (add_dependence): Fix warnings. * simplify-rtx.c (simplify_subreg): Likewise. Return NULL_RTX instead of NULL. * reg-stack.c (emit_swap_insn): Eliminate warnings. (subst_asm_stack_regs): Likewise. * combine.c (num_sign_bit_copies): Cast bitwidth to int to avoid warnings. * dwarf2out.c (output_call_frame_info): Declare i as int. (build_abbrev_table): Declare n_alloc as int. (dwarf2out_finish): Initialize die. * except.c: Declare sjlj_funcdef_number as unsigned. (connect_post_landing_pads): Declare j as unsigned. (convert_to_eh_region_ranges): Initialize call_site. (output_function_exception_table): Initialize tt_format_size. * expr.c (move_by_pieces_1): Initialize to1. (store_constructor): Initialize minelt and maxelt. * flow.c (mark_regs_live_at_end): Declare i as unsigned. * function.c (instantiate_decls): Avoid signed/unsigned warning. * c-decl.c (combine_parm_decls): Unused, remove. * c-tree.h: Remove prototype for combine_parm_decls. * reload.c (push_reload): Fix warning. (regno_clobbered_p): Likewise. * reload1.c (replace_pseudos_in_call_usage): Likewise. (reload_combine): Likewise. * bitmap.c: Rename bitmap_zero to bitmap_zero_bits to fix warnings. * bitmap.h: Rename bitmap_zero to bitmap_zero_bits to fix warnings. * bitmap.c (bitmap_operation): Change user. * bitmap.h (EXECUTE_IF_AND_COMPL_IN_BITMAP): Likewise. For cp/: 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl> * call.c (build_op_delete_call): Initialize fn. (convert_like_real): Delete conditional. (joust): Initialize *w and *l. * class.c: Add prototype for binfo_ctor_vtable. (get_primary_binfo): Initialize result. * init.c (build_java_class_ref): Initialize name. * typeck.c (unary_complex_lvalue): Do not duplicate the argument to modify, pre-, or post-increment when used as an lvalue and when the argument has side-effects. For ch/: 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl> * ch-tree.h: Remove prototype for combine_parm_decls, unused function. From-SVN: r43893
2001-07-10 12:38:10 +02:00
unsigned int test = REGNO (XEXP (elt, 0));
2000-09-11 15:13:00 +02:00
if (test >= regno && test < endregno)
return 1;
}
if (sets == 2
&& reg_inc_found_and_valid_p (regno, endregno, elt))
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
return 1;
1992-02-28 11:23:25 +01:00
}
}
return 0;
}
/* Find the low part, with mode MODE, of a hard regno RELOADREG. */
rtx
reload_adjust_reg_for_mode (rtx reloadreg, enum machine_mode mode)
{
int regno;
if (GET_MODE (reloadreg) == mode)
return reloadreg;
regno = REGNO (reloadreg);
if (REG_WORDS_BIG_ENDIAN)
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
regno += (int) hard_regno_nregs[regno][GET_MODE (reloadreg)]
- (int) hard_regno_nregs[regno][mode];
return gen_rtx_REG (mode, regno);
}
c-common.c (c_tree_code_name): Const-ification. * c-common.c (c_tree_code_name): Const-ification. * c-decl.c (c_decode_option): Likewise. * c-typeck.c (warn_for_assignment): Likewise. * collect2.c (libexts, is_ctor_dtor, main, ignore_library): Likewise. * cppinit.c (output_deps): Likewise. * dependence.c (dependence_string, direction_string): Likewise. * dwarf2out.c (output_ranges): Likewise. * fixinc/fixfixes.c (emit_gnu_type): Likewise. * fixinc/gnu-regex.c (re_error_msgid): Likewise. * gcc.c (standard_exec_prefix, standard_exec_prefix_1, standard_startfile_prefix, standard_startfile_prefix_1, standard_startfile_prefix_2, tooldir_base_prefix, standard_bindir_prefix, find_a_file): Likewise. * genattrtab.c (make_length_attrs): Likewise. * gencheck.c (tree_codes): Likewise. * genemit.c (gen_split): Likewise. * genrecog.c (special_mode_pred_table): Likewise. * graph.c (graph_ext): Likewise. * protoize (default_include): Likewise. * reload.c (reload_when_needed_name): Likewise. * sched-vis.c (visualize_stall_cycles): Likewise. * tlink.c (recompile_files): Likewise. * toplev.c (decode_g_option): Likewise. * tradcpp.c (output_deps): Likewise. * varasm.c (decode_reg_name): Likewise. * arm.c (arm_condition_codes, strings_fpa, thumb_condition_code): Const-ification. * arm.md: Likewise. * avr.c (avr_regnames, encode_section_info): Likewise. * c4x.c (float_reg_names): Likewise. * darwin.h (ASM_GLOBALIZE_LABEL): Likewise. * elfos.h (const_section): Likewise. * i386.c (ix86_comp_type_attributes): Likewise. * i386/win32.h (STRIP_NAME_ENCODING): Likewise. * ia64/aix.h (UNIQUE_SECTION): Likewise. * ia64.c (type_names): Likewise. * m68hc11.c (reg_class_names): Likewise. * m88k.c (m_options): Likewise. * mips.c (mips_output_conditional_branch, mips_unique_section): Likewise. * rs6000/sysv4.h (ASM_DECLARE_FUNCTION_NAME): Likewise. * sparc.c (sparc_flat_function_prologue, sparc_flat_function_epilogue, ultra_code_names): Likewise. * sparc.h (OVERRIDE_OPTIONS): Likewise. From-SVN: r45567
2001-09-12 19:18:03 +02:00
static const char *const reload_when_needed_name[] =
{
"RELOAD_FOR_INPUT",
"RELOAD_FOR_OUTPUT",
"RELOAD_FOR_INSN",
"RELOAD_FOR_INPUT_ADDRESS",
"RELOAD_FOR_INPADDR_ADDRESS",
"RELOAD_FOR_OUTPUT_ADDRESS",
"RELOAD_FOR_OUTADDR_ADDRESS",
"RELOAD_FOR_OPERAND_ADDRESS",
"RELOAD_FOR_OPADDR_ADDR",
"RELOAD_OTHER",
"RELOAD_FOR_OTHER_ADDRESS"
};
/* These functions are used to print the variables set by 'find_reloads' */
tree-vrp.c (debug_value_range, [...]): Annotate with DEBUG_FUNCTION. * tree-vrp.c (debug_value_range, debug_all_value_ranges, debug_asserts_for, debug_all_asserts): Annotate with DEBUG_FUNCTION. * tree-into-ssa.c (debug_decl_set, debug_defs_stack, debug_currdefs, debug_tree_ssa, debug_tree_ssa_stats, debug_def_blocks, debug_names_replaced_by, debug_update_ssa): Likewise. * sbitmap.c (debug_sbitmap): Likewise. * genrecog.c (debug_decision, debug_decision_list): Likewise. * tree-pretty-print.c (debug_generic_expr, debug_generic_stmt, debug_tree_chain): Likewise. * tree-loop-distribution.c (debug_rdg_partitions): Likewise. * cgraph.c (debug_cgraph_node, debug_cgraph): Likewise. * optabs.c (debug_optab_libfuncs): Likewise. (verify_loop_closed_ssa): Likewise. * value-prof.c (verify_histograms): Likewise. * reload.c (debug_reload_to_stream, debug_reload): Likewise. * bitmap.c (debug_bitmap_file, debug_bitmap, bitmap_print): Likewise. * cfghooks.c (verify_flow_info): Likewise. * fold-const.c (debug_fold_checksum): Likewise. * omp-low.c (debug_omp_region, debug_all_omp_regions): Likewise. * cfg.c (debug_regset, debug_flow_info, debug_bb, debug_bb_n): Likewise. * omega.c (debug_omega_problem): Likewise. * cgraphunit.c (verify_cgraph_node, verify_cgraph): Likewise. * tree-ssa-ccp.c (debug_lattice_value): Likewise. * dominance.c (verify_dominators, debug_dominance_info, debug_dominance_tree): Likewise. * df-core.c (df_insn_uid_debug, df_insn_debug, df_insn_debug_regno, * df_regno_debug, df_ref_debug, debug_df_insn, debug_df_reg, debug_df_regno, debug_df_ref, debug_df_defno, debug_df_useno, debug_df_chain): Likewise. * tree-ssa-dom.c (debug_dominator_optimization_stats): Likewise. * sel-sched.c (debug_state): Likewise. * tree-ssa-alias.c (debug_alias_info, debug_points_to_info_for): Likewise. * cfganal.c (print_edge_list, verify_edge_list): Likewise. * dwarf2out.c (debug_dwarf_die, debug_dwarf): Likewise. * tree-eh.c (verify_eh_edges, verify_eh_dispatch_edge): Likewise. * gimple-pretty-print.c (debug_gimple_stmt, debug_gimple_seq): Likewise. * c-pretty-print.c (debug_c_tree): Likewise. * sel-sched-dump.c (debug_insn_rtx, debug_vinsn, debug_expr, debug_insn debug_av_set, debug_lv_set, debug_ilist, debug_blist, debug_insn_vector, debug_hard_reg_set, debug_mem_addr_value): Likewise. * ebitmap.c (debug_ebitmap): Likewise. * function.c (debug_find_var_in_block_tree): Likewise. * print-rtl.c (debug_rtx): Likewise. (debug_rtx_count): Likewise. (debug_rtx_list, debug_rtx_range, debug_rtx_find): Likewise. * stor-layout.c (debug_rli): Likewise. * ipa.c (debug_cgraph_node_set, debug_varpool_node_set): Likewise. * tree-data-ref.c (debug_data_references, debug_data_dependence_relations, debug_data_reference, debug_data_dependence_relation, debug_rdg_vertex, debug_rdg_component, debug_rdg): Likewise. * tree-affine.c (debug_aff): Likewise. * tree-dfa.c (debug_referenced_vars, debug_variable, debug_dfa_stats): Likewise. * except.c (debug_eh_tree, verify_eh_tree): Likewise. * emit-rtl.c (verify_rtl_sharing): Likewise. * tree-ssa-pre.c (debug_pre_expr, debug_bitmap_set, debug_value_expressions): Likewise. * tree-ssa-live.c (debug_scope_block, debug_scope_blocks): Likewise. * sese.c (debug_rename_map, debug_ivtype_map): Likewise. * print-tree.c (debug_tree, debug_vec_tree): Likewise. * cfglayout.c (verify_insn_chain): Likewise. * graphite-clast-to-gimple.c (debug_clast_name_indexes, debug_clast_stmt, debug_generated_program): Likewise. * ggc-page.c (debug_print_page_list): Likewise. * tree-ssa-ter.c (debug_ter): Likewise. * graphite-dependences.c (debug_pddr): Likewise. * sched-deps.c (debug_ds): Likewise. * tree-ssa.c (verify_ssa): Likewise. * graphite-poly.c (debug_scattering_function, debug_iteration_domain, debug_scattering_functions, debug_iteration_domains, debug_pdr, debug_pdrs, debug_pbb_domain, debug_pbb, debug_scop_context, debug_scop, debug_cloog, debug_scop_params, debug_lst): Likewise. * tree-inline.c (debug_find_tree): Likewise. * graphite-ppl.c (debug_ppl_linear_expr, debug_ppl_polyhedron_matrix, debug_ppl_powerset_matrix): Likewise. * var-tracking.c (debug_dv): Likewise. * system.h (DEBUG_FUNCTION, DEBUG_VARIABLE): Define. * cfgloop.c (verify_loop_structure): Likewise. * plugin.c (dump_active_plugins, debug_active_plugins): Likewise. * c-common.c (verify_sequence_points): Likewise. * sched-rgn.c (debug_regions, debug_region, debug_candidate, debug_candidates, debug_rgn_dependencies): Likewise. * tree-ssa-structalias.c (debug_constraint, debug_constraints, * debug_constraint_graph, debug_solution_for_var, debug_sa_points_to_info): Likewise. * sched-vis.c (debug_insn_slim, debug_bb_slim, debug_bb_n_slim): Likewie. * tree-cfg.c (debug_cfg_stats, verify_stmts, debug_function, debug_loops, debug_loop, debug_loop_num): Likewise. * passes.c (debug_pass): Likewise. (dump_properties): Likewise; add cfglayout property. (debug_properties): Likewise. * tree-ssa-reassoc.c (debug_ops_vector): Likewise. * varpool.c (debug_varpool): Likewise. * regcprop.c (debug_value_data): Likewise. * tree-ssa-operands.c (verify_imm_links, debug_immediate_uses, debug_immediate_uses_for): Likewise. From-SVN: r160036
2010-05-29 22:31:45 +02:00
DEBUG_FUNCTION void
debug_reload_to_stream (FILE *f)
{
int r;
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 *prefix;
if (! f)
f = stderr;
for (r = 0; r < n_reloads; r++)
{
fprintf (f, "Reload %d: ", r);
if (rld[r].in != 0)
{
fprintf (f, "reload_in (%s) = ",
GET_MODE_NAME (rld[r].inmode));
print_inline_rtx (f, rld[r].in, 24);
fprintf (f, "\n\t");
}
if (rld[r].out != 0)
{
fprintf (f, "reload_out (%s) = ",
GET_MODE_NAME (rld[r].outmode));
print_inline_rtx (f, rld[r].out, 24);
fprintf (f, "\n\t");
}
fprintf (f, "%s, ", reg_class_names[(int) rld[r].rclass]);
fprintf (f, "%s (opnum = %d)",
reload_when_needed_name[(int) rld[r].when_needed],
rld[r].opnum);
if (rld[r].optional)
fprintf (f, ", optional");
if (rld[r].nongroup)
fprintf (f, ", nongroup");
if (rld[r].inc != 0)
fprintf (f, ", inc by %d", rld[r].inc);
if (rld[r].nocombine)
fprintf (f, ", can't combine");
if (rld[r].secondary_p)
fprintf (f, ", secondary_reload_p");
if (rld[r].in_reg != 0)
{
fprintf (f, "\n\treload_in_reg: ");
print_inline_rtx (f, rld[r].in_reg, 24);
}
if (rld[r].out_reg != 0)
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
{
fprintf (f, "\n\treload_out_reg: ");
print_inline_rtx (f, rld[r].out_reg, 24);
Fix consistency problems with reg_equiv_{mem,address}; Improve reload inheritance; * reload.c (reload_out_reg): New variable. (loc_mentioned_in_p, remove_address_replacements): New functions. (remove_replacements): Deleted. (push_reload): Set reload_out_reg[i]. When merging, also set reload_{in,out}_reg[i], and remove duplicate address reloads. (combine_reloads): Copy reload_out_reg[i]. (find_reloads): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. Include *recog_operand_loc in commutativity operand changes. Generate optional output reloads. Delete reference to n_memlocs. Don't set *recog_operand_loc before processing operands. Call make_memloc in reg_equiv_address code. Set *recog_operand_loc only after processing operands, and only if replace is true. Return a value. When changing address reload types for operands that didn't get reloaded, use RELOAD_FOR_OPADDR_ADDRESS for RELOAD_FOR_INPADDR_ADDRESS / RELOAD_FOR_OUTADDR_ADDRESS reloads. Don't emit USEs for pseudo SUBREGs when not replacing. (find_reloads_address): Do make_memloc substitution also when reg_equiv_memory_loc[regno] and num_not_at_initial_offset are both nonzero. (find_reloads_toplev): Likewise. Call make_memloc in reg_equiv_address code. (debug_reload_to_stream): Add code to output reload_out_reg. (make_memloc): Delete local variable i, ifdefed out code, and references to memlocs and n_memlocs. (memlocs, n_memlocs): Delete. (push_secondary_reload): Clear reload_out_reg. (find_reloads_address_1): Provide memrefloc argument to all calls to find_reloads_address. In AUTO_INC code, handle non-directly addressable equivalences properly. * reload.h (reload_out_reg, num_not_at_initial_offset): Declare. (find_reloads): Add return type. (remove_address_replacements, deallocate_reload_reg): Declare. * reload1.c (num_not_at_initial_offset): No longer static. (delete_address_reloads, delete_address_reloads_1): Likewise. (deallocate_reload_reg): New function. (spill_reg_stored_to): New array. (eliminate_regs): Don't substitute from reg_equiv_memory_loc. (eliminate_regs_in_insn): Move assignments of previous_offset and max_offset fields, and recalculation of num_not_at_initial_offset into new static function: (update_eliminable_offsets) . (reload_as_needed): Call update_eliminable_offsetss after calling find_reloads. Call forget_old_reloads_1 with contents of reloaded auto_inc expressions if the actual addressing can't be changed to match the auto_inc. (choose_reload_regs): For inheritance, replace reload_reg_free_before_p test with reload_reg_ions. (emit_reload_insns): If reload_in is a MEM, set OLD to reload_in_reg[j]. Don't reload directly from oldequiv; if it's a pseudo with a stack slot, use reload_in[j]. Check that reload_in_reg[j] is a MEM before replacing reload_in from reg_reloaded_contents. Include non-spill registers in reload inheritance processing. Also try to use reload_out_reg to set spill_reg_store / reg_last_reload_reg. In code to set new_spill_reg_store, use single_set to find out if there is a single set. Add code that allows to delete optional output reloads. Add code to allow deletion of output reloads that use no spill reg. At the end, set reload_override_in to oldequiv. Also call delete_output_reload if reload_out_reg is equal to old in oldequiv code. Add code to call delete_output_reload for stores with no matching load. Set / use spill_reg_stored_to. Handle case where secondary output reload uses a temporary, but actual store isn't found. When looking for a store of a value not loaded in order to call delete_output_reload, count_occurences should return 0 for no loads; but discount inherited input reloadill_reg_stored_to. Do checks for extra uses of REG. Changed all callers. Use delete_address_reloads. (reload): Take return value of find_reloads into account. If a no-op set needs more than one reload, delete it. (reload_reg_free_before_p): RELOAD_FOR_INPUT can ignore RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS for the same operand. (clear_reload_reg_in_use): Check for other reloads that keep a register in use. (reload_reg_free_for_value_p): handle RELOAD_FOR_OPERAND_ADDRESS / RELOAD_FOR_OPADDR_ADDR. Take into account when an address address reload is only needed for the address reload we are considering. (count_occurrences): Use rtx_equal_p for MEMs. (inc_for_reload): Return instruction that stores into RELOADREG. New argument two, IN, and rtx. Changed all callers. (calculate_needs_all_insns, reload_as_needed): Don't clear after_call for a CLOBBER. Keep track of how many hard registers need to be copied from after_call, and don't clear after_call before we have seen that much copies, or we see a different instruction. From-SVN: r23143
1998-10-16 21:54:38 +02:00
}
if (rld[r].reg_rtx != 0)
{
fprintf (f, "\n\treload_reg_rtx: ");
print_inline_rtx (f, rld[r].reg_rtx, 24);
}
prefix = "\n\t";
if (rld[r].secondary_in_reload != -1)
{
fprintf (f, "%ssecondary_in_reload = %d",
prefix, rld[r].secondary_in_reload);
prefix = ", ";
}
if (rld[r].secondary_out_reload != -1)
fprintf (f, "%ssecondary_out_reload = %d\n",
prefix, rld[r].secondary_out_reload);
prefix = "\n\t";
if (rld[r].secondary_in_icode != CODE_FOR_nothing)
{
fprintf (f, "%ssecondary_in_icode = %s", prefix,
insn_data[rld[r].secondary_in_icode].name);
prefix = ", ";
}
if (rld[r].secondary_out_icode != CODE_FOR_nothing)
fprintf (f, "%ssecondary_out_icode = %s", prefix,
insn_data[rld[r].secondary_out_icode].name);
fprintf (f, "\n");
}
}
tree-vrp.c (debug_value_range, [...]): Annotate with DEBUG_FUNCTION. * tree-vrp.c (debug_value_range, debug_all_value_ranges, debug_asserts_for, debug_all_asserts): Annotate with DEBUG_FUNCTION. * tree-into-ssa.c (debug_decl_set, debug_defs_stack, debug_currdefs, debug_tree_ssa, debug_tree_ssa_stats, debug_def_blocks, debug_names_replaced_by, debug_update_ssa): Likewise. * sbitmap.c (debug_sbitmap): Likewise. * genrecog.c (debug_decision, debug_decision_list): Likewise. * tree-pretty-print.c (debug_generic_expr, debug_generic_stmt, debug_tree_chain): Likewise. * tree-loop-distribution.c (debug_rdg_partitions): Likewise. * cgraph.c (debug_cgraph_node, debug_cgraph): Likewise. * optabs.c (debug_optab_libfuncs): Likewise. (verify_loop_closed_ssa): Likewise. * value-prof.c (verify_histograms): Likewise. * reload.c (debug_reload_to_stream, debug_reload): Likewise. * bitmap.c (debug_bitmap_file, debug_bitmap, bitmap_print): Likewise. * cfghooks.c (verify_flow_info): Likewise. * fold-const.c (debug_fold_checksum): Likewise. * omp-low.c (debug_omp_region, debug_all_omp_regions): Likewise. * cfg.c (debug_regset, debug_flow_info, debug_bb, debug_bb_n): Likewise. * omega.c (debug_omega_problem): Likewise. * cgraphunit.c (verify_cgraph_node, verify_cgraph): Likewise. * tree-ssa-ccp.c (debug_lattice_value): Likewise. * dominance.c (verify_dominators, debug_dominance_info, debug_dominance_tree): Likewise. * df-core.c (df_insn_uid_debug, df_insn_debug, df_insn_debug_regno, * df_regno_debug, df_ref_debug, debug_df_insn, debug_df_reg, debug_df_regno, debug_df_ref, debug_df_defno, debug_df_useno, debug_df_chain): Likewise. * tree-ssa-dom.c (debug_dominator_optimization_stats): Likewise. * sel-sched.c (debug_state): Likewise. * tree-ssa-alias.c (debug_alias_info, debug_points_to_info_for): Likewise. * cfganal.c (print_edge_list, verify_edge_list): Likewise. * dwarf2out.c (debug_dwarf_die, debug_dwarf): Likewise. * tree-eh.c (verify_eh_edges, verify_eh_dispatch_edge): Likewise. * gimple-pretty-print.c (debug_gimple_stmt, debug_gimple_seq): Likewise. * c-pretty-print.c (debug_c_tree): Likewise. * sel-sched-dump.c (debug_insn_rtx, debug_vinsn, debug_expr, debug_insn debug_av_set, debug_lv_set, debug_ilist, debug_blist, debug_insn_vector, debug_hard_reg_set, debug_mem_addr_value): Likewise. * ebitmap.c (debug_ebitmap): Likewise. * function.c (debug_find_var_in_block_tree): Likewise. * print-rtl.c (debug_rtx): Likewise. (debug_rtx_count): Likewise. (debug_rtx_list, debug_rtx_range, debug_rtx_find): Likewise. * stor-layout.c (debug_rli): Likewise. * ipa.c (debug_cgraph_node_set, debug_varpool_node_set): Likewise. * tree-data-ref.c (debug_data_references, debug_data_dependence_relations, debug_data_reference, debug_data_dependence_relation, debug_rdg_vertex, debug_rdg_component, debug_rdg): Likewise. * tree-affine.c (debug_aff): Likewise. * tree-dfa.c (debug_referenced_vars, debug_variable, debug_dfa_stats): Likewise. * except.c (debug_eh_tree, verify_eh_tree): Likewise. * emit-rtl.c (verify_rtl_sharing): Likewise. * tree-ssa-pre.c (debug_pre_expr, debug_bitmap_set, debug_value_expressions): Likewise. * tree-ssa-live.c (debug_scope_block, debug_scope_blocks): Likewise. * sese.c (debug_rename_map, debug_ivtype_map): Likewise. * print-tree.c (debug_tree, debug_vec_tree): Likewise. * cfglayout.c (verify_insn_chain): Likewise. * graphite-clast-to-gimple.c (debug_clast_name_indexes, debug_clast_stmt, debug_generated_program): Likewise. * ggc-page.c (debug_print_page_list): Likewise. * tree-ssa-ter.c (debug_ter): Likewise. * graphite-dependences.c (debug_pddr): Likewise. * sched-deps.c (debug_ds): Likewise. * tree-ssa.c (verify_ssa): Likewise. * graphite-poly.c (debug_scattering_function, debug_iteration_domain, debug_scattering_functions, debug_iteration_domains, debug_pdr, debug_pdrs, debug_pbb_domain, debug_pbb, debug_scop_context, debug_scop, debug_cloog, debug_scop_params, debug_lst): Likewise. * tree-inline.c (debug_find_tree): Likewise. * graphite-ppl.c (debug_ppl_linear_expr, debug_ppl_polyhedron_matrix, debug_ppl_powerset_matrix): Likewise. * var-tracking.c (debug_dv): Likewise. * system.h (DEBUG_FUNCTION, DEBUG_VARIABLE): Define. * cfgloop.c (verify_loop_structure): Likewise. * plugin.c (dump_active_plugins, debug_active_plugins): Likewise. * c-common.c (verify_sequence_points): Likewise. * sched-rgn.c (debug_regions, debug_region, debug_candidate, debug_candidates, debug_rgn_dependencies): Likewise. * tree-ssa-structalias.c (debug_constraint, debug_constraints, * debug_constraint_graph, debug_solution_for_var, debug_sa_points_to_info): Likewise. * sched-vis.c (debug_insn_slim, debug_bb_slim, debug_bb_n_slim): Likewie. * tree-cfg.c (debug_cfg_stats, verify_stmts, debug_function, debug_loops, debug_loop, debug_loop_num): Likewise. * passes.c (debug_pass): Likewise. (dump_properties): Likewise; add cfglayout property. (debug_properties): Likewise. * tree-ssa-reassoc.c (debug_ops_vector): Likewise. * varpool.c (debug_varpool): Likewise. * regcprop.c (debug_value_data): Likewise. * tree-ssa-operands.c (verify_imm_links, debug_immediate_uses, debug_immediate_uses_for): Likewise. From-SVN: r160036
2010-05-29 22:31:45 +02:00
DEBUG_FUNCTION void
debug_reload (void)
{
debug_reload_to_stream (stderr);
}