convert.c, [...]: Replace overly specific references to "GNU C" and "GNU C Compiler" with...
* convert.c, dwarf2out.c, dwarfout.c, emit-rtl.c, function.c,
lists.c, print-rtl.c, print-tree.c, read-rtl.c, rtl-error.c,
stmt.c, toplev.c, integrate.h, loop.h, machmode.h, rtl.h,
ssa.h, tree.def: Replace overly specific references to "GNU C"
and "GNU C Compiler" with references to "GCC".
From-SVN: r68004
2003-06-16 13:30:25 +02:00
|
|
|
|
/* Register Transfer Language (RTL) definitions for GCC
|
2000-02-26 15:26:24 +01:00
|
|
|
|
Copyright (C) 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
|
bb-reorder.c (fix_edges_for_rarely_executed_code): Remove last parameter to reg_scan.
2005-01-15 Paolo Bonzini <bonzini@gnu.org>
* bb-reorder.c (fix_edges_for_rarely_executed_code): Remove
last parameter to reg_scan.
* loop.c (loop_optimize): Likewise.
* passes.c (rest_of_handle_tracer, rest_of_handle_if_conversion,
rest_of_handle_web, rest_of_handle_cfg, rest_of_handle_jump_bypass,
rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2,
rest_of_handle_gcse, rest_of_handle_loop_optimize,
rest_of_handle_loop2, rest_of_handle_jump2): Likewise.
* regclass.c (reg_scan): Likewise, for the declaration.
* rtl.h (reg_scan): Likewise, for the prototype.
From-SVN: r93758
2005-01-17 09:46:19 +01:00
|
|
|
|
1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
Makefile.in, [...]: replace "GNU CC" with "GCC".
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,
bitmap.h, builtin-types.def, builtins.c, builtins.def,
c-aux-info.c, c-common.c, c-common.def, c-common.h,
c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c,
c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in,
c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c,
caller-save.c, calls.c, collect2.c, collect2.h, combine.c,
conditions.h, config.gcc, configure.frag, configure.in,
conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c,
cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h,
dependence.c, df.c, df.h, diagnostic.c, diagnostic.h,
doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c,
dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c,
emit-rtl.c, errors.c, errors.h, except.c, except.h,
exgettext, explow.c, expmed.c, expr.c, expr.h, final.c,
fixproto, flags.h, flow.c, fold-const.c, fp-test.c,
function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp,
gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c,
gencheck.c, gencodes.c, genconfig.c, genemit.c,
genextract.c, genflags.c, gengenrtl.c, genmultilib,
genopinit.c, genoutput.c, genpeep.c, genrecog.c,
gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c,
ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c,
graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h,
gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h,
gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h,
hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h,
integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c,
libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h,
machmode.def, machmode.h, main.c, mbchar.c, mbchar.h,
mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk,
mkmap-symver.awk, optabs.c, output.h, params.c, params.def,
params.h, predict.c, predict.def, predict.h, prefix.c,
prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c,
read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c,
regclass.c, regmove.c, regrename.c, regs.h, reload.c,
reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c,
rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h,
sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c,
sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c,
ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c,
stringpool.c, system.h, timevar.c, timevar.def, timevar.h,
tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h,
tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h,
unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h,
unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c,
xcoffout.h: replace "GNU CC" with "GCC".
From-SVN: r45105
2001-08-22 16:35:51 +02:00
|
|
|
|
This file is part of GCC.
|
1991-12-06 22:00:31 +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 2, or (at your option) any later
|
|
|
|
|
version.
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
Makefile.in, [...]: replace "GNU CC" with "GCC".
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,
bitmap.h, builtin-types.def, builtins.c, builtins.def,
c-aux-info.c, c-common.c, c-common.def, c-common.h,
c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c,
c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in,
c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c,
caller-save.c, calls.c, collect2.c, collect2.h, combine.c,
conditions.h, config.gcc, configure.frag, configure.in,
conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c,
cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h,
dependence.c, df.c, df.h, diagnostic.c, diagnostic.h,
doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c,
dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c,
emit-rtl.c, errors.c, errors.h, except.c, except.h,
exgettext, explow.c, expmed.c, expr.c, expr.h, final.c,
fixproto, flags.h, flow.c, fold-const.c, fp-test.c,
function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp,
gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c,
gencheck.c, gencodes.c, genconfig.c, genemit.c,
genextract.c, genflags.c, gengenrtl.c, genmultilib,
genopinit.c, genoutput.c, genpeep.c, genrecog.c,
gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c,
ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c,
graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h,
gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h,
gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h,
hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h,
integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c,
libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h,
machmode.def, machmode.h, main.c, mbchar.c, mbchar.h,
mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk,
mkmap-symver.awk, optabs.c, output.h, params.c, params.def,
params.h, predict.c, predict.def, predict.h, prefix.c,
prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c,
read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c,
regclass.c, regmove.c, regrename.c, regs.h, reload.c,
reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c,
rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h,
sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c,
sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c,
ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c,
stringpool.c, system.h, timevar.c, timevar.def, timevar.h,
tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h,
tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h,
unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h,
unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c,
xcoffout.h: replace "GNU CC" with "GCC".
From-SVN: r45105
2001-08-22 16:35:51 +02:00
|
|
|
|
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
|
for more details.
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
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
|
|
|
|
along with GCC; see the file COPYING. If not, write to the Free
|
|
|
|
|
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|
|
|
|
02111-1307, USA. */
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2001-05-26 03:31:47 +02:00
|
|
|
|
#ifndef GCC_RTL_H
|
|
|
|
|
#define GCC_RTL_H
|
1999-09-04 15:09:56 +02:00
|
|
|
|
|
Makefile.in (RTL_BASE_H, RTL_H): Correct.
* Makefile.in (RTL_BASE_H, RTL_H): Correct.
(BUILD_RTL): Remove $(BUILD_PREFIX) from ggc-none.o.
(genobjs): Add errors.o, ggc-none.o, and min-insn-modes.o.
(read-rtl.o, gensupport.o, genconfig.o, genflags.o, gencodes.o)
(genconstants.o, genemit.o, genopinit.o, genrecog.o, genextract.o)
(genpeep.o, genattr.o, genattrtab.o, genautomata.o, genoutput.o)
(genconditions.o): Depend on $(RTL_BASE_H) not $(RTL_H).
(ggc-none.o, errors.o): Move rule to generators section;
correct dependencies.
(min-insn-modes.o): Move rule to generators section; remove
unnecessary explicit command; correct dependencies.
(print-rtl.o, print-rtl1.o): Correct dependencies.
($(BUILD_PREFIX_1)errors.o. $(BUILD_PREFIX_1)ggc-none.o): Delete rule.
(mostlyclean): Update.
* errors.c: Include bconfig.h not config.h. Correct comment.
* gengtype.c, genpreds.c: Don't define NO_GENRTL_H.
* ggc-none.c: Include bconfig.h; not config.h or tm.h.
* print-rtl.c: Don't include tm_p.h.
* rtl.h: Move forward-decl of struct function down where it's
needed. Include genrtl.h #ifndef GENERATOR_FILE, not
#ifndef NO_GENRTL_H. Remove unnecessary #ifdef BUFSIZ statements.
From-SVN: r85574
2004-08-04 22:55:08 +02:00
|
|
|
|
#include "statistics.h"
|
1991-12-06 22:00:31 +01:00
|
|
|
|
#include "machmode.h"
|
2003-06-16 10:27:05 +02:00
|
|
|
|
#include "input.h"
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
|
|
|
|
#undef FFS /* Some systems predefine this symbol; don't let it interfere. */
|
1991-12-24 00:18:04 +01:00
|
|
|
|
#undef FLOAT /* Likewise. */
|
1993-02-09 11:46:08 +01:00
|
|
|
|
#undef ABS /* Likewise. */
|
1993-05-29 18:16:01 +02:00
|
|
|
|
#undef PC /* Likewise. */
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2001-10-01 13:00:47 +02:00
|
|
|
|
/* Value used by some passes to "recognize" noop moves as valid
|
2001-10-11 14:43:43 +02:00
|
|
|
|
instructions. */
|
2001-07-29 21:44:42 +02:00
|
|
|
|
#define NOOP_MOVE_INSN_CODE INT_MAX
|
|
|
|
|
|
1991-12-06 22:00:31 +01:00
|
|
|
|
/* Register Transfer Language EXPRESSIONS CODES */
|
|
|
|
|
|
|
|
|
|
#define RTX_CODE enum rtx_code
|
|
|
|
|
enum rtx_code {
|
|
|
|
|
|
|
|
|
|
#define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) ENUM ,
|
|
|
|
|
#include "rtl.def" /* rtl expressions are documented here */
|
|
|
|
|
#undef DEF_RTL_EXPR
|
|
|
|
|
|
1992-05-07 08:41:23 +02:00
|
|
|
|
LAST_AND_UNUSED_RTX_CODE}; /* A convenient way to get a value for
|
1991-12-06 22:00:31 +01:00
|
|
|
|
NUM_RTX_CODE.
|
1992-05-07 08:41:23 +02:00
|
|
|
|
Assumes default enum value assignment. */
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2002-01-22 15:33:35 +01:00
|
|
|
|
#define NUM_RTX_CODE ((int) LAST_AND_UNUSED_RTX_CODE)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
/* The cast here, saves many elsewhere. */
|
|
|
|
|
|
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
|
|
|
|
/* Register Transfer Language EXPRESSIONS CODE CLASSES */
|
|
|
|
|
|
|
|
|
|
enum rtx_class {
|
|
|
|
|
/* We check bit 0-1 of some rtx class codes in the predicates below. */
|
|
|
|
|
|
|
|
|
|
/* Bit 0 = comparison if 0, arithmetic is 1
|
|
|
|
|
Bit 1 = 1 if commutative. */
|
|
|
|
|
RTX_COMPARE, /* 0 */
|
|
|
|
|
RTX_COMM_COMPARE,
|
|
|
|
|
RTX_BIN_ARITH,
|
|
|
|
|
RTX_COMM_ARITH,
|
|
|
|
|
|
|
|
|
|
/* Must follow the four preceding values. */
|
|
|
|
|
RTX_UNARY, /* 4 */
|
|
|
|
|
|
|
|
|
|
RTX_EXTRA,
|
|
|
|
|
RTX_MATCH,
|
|
|
|
|
RTX_INSN,
|
|
|
|
|
|
|
|
|
|
/* Bit 0 = 1 if constant. */
|
|
|
|
|
RTX_OBJ, /* 8 */
|
|
|
|
|
RTX_CONST_OBJ,
|
|
|
|
|
|
|
|
|
|
RTX_TERNARY,
|
|
|
|
|
RTX_BITFIELD_OPS,
|
|
|
|
|
RTX_AUTOINC
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#define RTX_OBJ_MASK (~1)
|
|
|
|
|
#define RTX_OBJ_RESULT (RTX_OBJ & RTX_OBJ_MASK)
|
|
|
|
|
#define RTX_COMPARE_MASK (~1)
|
|
|
|
|
#define RTX_COMPARE_RESULT (RTX_COMPARE & RTX_COMPARE_MASK)
|
|
|
|
|
#define RTX_ARITHMETIC_MASK (~1)
|
|
|
|
|
#define RTX_ARITHMETIC_RESULT (RTX_COMM_ARITH & RTX_ARITHMETIC_MASK)
|
|
|
|
|
#define RTX_BINARY_MASK (~3)
|
|
|
|
|
#define RTX_BINARY_RESULT (RTX_COMPARE & RTX_BINARY_MASK)
|
|
|
|
|
#define RTX_COMMUTATIVE_MASK (~2)
|
|
|
|
|
#define RTX_COMMUTATIVE_RESULT (RTX_COMM_COMPARE & RTX_COMMUTATIVE_MASK)
|
|
|
|
|
#define RTX_NON_COMMUTATIVE_RESULT (RTX_COMPARE & RTX_COMMUTATIVE_MASK)
|
|
|
|
|
|
machmode.h (mode_name, [...]): Set array size in declaration to NUM_MACHINE_MODES.
* machmode.h (mode_name, mode_class, mode_size, mode_unit_size,
mode_bitsize, mode_mask_array, mode_wider_mode): Set array size in
declaration to NUM_MACHINE_MODES.
(mode_size, mode_unit_size): Set array type to unsigned char.
(mode_bitsize): Set array type to unsigned short.
* rtl.c (rtx_length): Set array type to unsigned char.
(rtx_length, rtx_name, rtx_format, rtx_class): Set array size to
NUM_RTX_CODE.
(mode_bitsize): Set array type to unsigned short.
(mode_size, mode_unit_size): Set array type to unsigned char.
(mode_name, mode_class, mode_bitsize, mode_size, mode_unit_size,
mode_wider_mode, mode_mask_array): Set array size to
NUM_MACHINE_MODES.
* rtl.h (rtx_length, rtx_name, rtx_format, rtx_class): Set array
size in declaration to NUM_RTX_CODE.
From-SVN: r48139
2001-12-18 03:37:06 +01:00
|
|
|
|
extern const unsigned char rtx_length[NUM_RTX_CODE];
|
1996-07-04 00:07:53 +02:00
|
|
|
|
#define GET_RTX_LENGTH(CODE) (rtx_length[(int) (CODE)])
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
machmode.h (mode_name, [...]): Set array size in declaration to NUM_MACHINE_MODES.
* machmode.h (mode_name, mode_class, mode_size, mode_unit_size,
mode_bitsize, mode_mask_array, mode_wider_mode): Set array size in
declaration to NUM_MACHINE_MODES.
(mode_size, mode_unit_size): Set array type to unsigned char.
(mode_bitsize): Set array type to unsigned short.
* rtl.c (rtx_length): Set array type to unsigned char.
(rtx_length, rtx_name, rtx_format, rtx_class): Set array size to
NUM_RTX_CODE.
(mode_bitsize): Set array type to unsigned short.
(mode_size, mode_unit_size): Set array type to unsigned char.
(mode_name, mode_class, mode_bitsize, mode_size, mode_unit_size,
mode_wider_mode, mode_mask_array): Set array size to
NUM_MACHINE_MODES.
* rtl.h (rtx_length, rtx_name, rtx_format, rtx_class): Set array
size in declaration to NUM_RTX_CODE.
From-SVN: r48139
2001-12-18 03:37:06 +01:00
|
|
|
|
extern const char * const rtx_name[NUM_RTX_CODE];
|
1996-07-04 00:07:53 +02:00
|
|
|
|
#define GET_RTX_NAME(CODE) (rtx_name[(int) (CODE)])
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
machmode.h (mode_name, [...]): Set array size in declaration to NUM_MACHINE_MODES.
* machmode.h (mode_name, mode_class, mode_size, mode_unit_size,
mode_bitsize, mode_mask_array, mode_wider_mode): Set array size in
declaration to NUM_MACHINE_MODES.
(mode_size, mode_unit_size): Set array type to unsigned char.
(mode_bitsize): Set array type to unsigned short.
* rtl.c (rtx_length): Set array type to unsigned char.
(rtx_length, rtx_name, rtx_format, rtx_class): Set array size to
NUM_RTX_CODE.
(mode_bitsize): Set array type to unsigned short.
(mode_size, mode_unit_size): Set array type to unsigned char.
(mode_name, mode_class, mode_bitsize, mode_size, mode_unit_size,
mode_wider_mode, mode_mask_array): Set array size to
NUM_MACHINE_MODES.
* rtl.h (rtx_length, rtx_name, rtx_format, rtx_class): Set array
size in declaration to NUM_RTX_CODE.
From-SVN: r48139
2001-12-18 03:37:06 +01:00
|
|
|
|
extern const char * const rtx_format[NUM_RTX_CODE];
|
1996-07-04 00:07:53 +02:00
|
|
|
|
#define GET_RTX_FORMAT(CODE) (rtx_format[(int) (CODE)])
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
alias.c (rtx_equal_for_memref_p): Use predicates to test rtx classes and new rtx class codes...
2004-02-07 Paolo Bonzini <bonzini@gnu.org>
* alias.c (rtx_equal_for_memref_p): Use predicates
to test rtx classes and new rtx class codes, possibly
splitting conditionals that tested against '<' and 'o'.
* caller-save.c (save_call_clobbered_regs): Likewise.
* combine.c (contains_muldiv, find_split_point, subst,
combine_simplify_rtx, simplify_if_then_else,
simplify_set, simplify_logical, expand_compound_operation,
make_compound_operation, if_then_else_cond, known_cond,
apply_distributive_law, cached_nonzero_bits,
cached_num_sign_bit_copies, simplify_shift_const,
gen_binary, simplify_comparison, update_table_tick,
record_value_for_reg, get_lsat_value_validate): Likewise.
* cse.c (mention_regs, find_best_addr, find_comparison_args,
fold_rtx, cse_insn, invalidate_memory, cse_basic_block):
Likewise.
* emit-rtl.c (copy_insn_1): Likewise.
* expr.c (force_operand): Likewise.
* final.c (final_scan_insn, get_mem_expr_from_op): Likewise.
* flow.c (notice_stack_pointer_modification_1,
invalidate_mems_from_autoinc, ior_reg_cond, not_reg_cond,
and_reg_cond, elim_reg_cond): Likewise.
* function.c (update_epilogue_consts): Likewise.
* genattrtab.c (attr_rtx_1): Likewise.
* genopinit.c (gen_insn): Likewise.
* integrate.c (subst_constants): Likewise.
* jump.c (reversed_comparison_code_parts,
reversed_comparison_code, delete_related_insns,
rtx_renumbered_equal_p): Likewise.
* local-alloc.c (block_alloc): Likewise.
* loop.c (rtx_equal_for_prefetch_p, maybe_eliminate_biv,
canonicalize_condition): Likewise.
* loop-iv.c (simplify_using_conditions, iv_number_of_iterations):
Likewise.
* optabs.c (add_equal_node, expand_binop): Likewise.
* predict.c (estimate_probability): Likewise.
* ra-debug.c (ra_print_rtx_2op, ra_print_rtx): Likewise.
* recog.c (validate_replace_rtx_1, comparison_operator,
offsettable_address_p, constrain_operands): Likewise.
* reg-stack.c (swap_rtx_condition_1, subst_stack_regs_pat):
Likewise.
* regclass.c (scan_one_insn): Likewise.
* regmove.c (stable_and_no_regs_but_for_p): Likewise.
* regrename.c (kill_autoinc_value): Likewise.
* reload.c (find_reusable_reload, find_reloads,
reg_overlap_mentioned_for_reload_p): Likewise.
* reload1.c (gen_reload, delete_address_reloads_1): Likewise.
* rtl.c (copy_rtx): Likewise.
* rtl.h (CONSTANT_P, INSN_P): Likewise.
* rtlanal.c (commutative_operand_precedence): Likewise.
* sched-deps.c (conditions_mutex_p): Likewise.
* sched-rgn.c (is_cfg_nonregular): Likewise.
* simplify-rtx.c (simplify_gen_binary,
simplify_gen_relational, simplify_replace_rtx,
simplify_unary_operation, simplify_binary_operation,
simplify_ternary_operation, simplify_rtx): Likewise.
* unroll.c (reg_dead_after_loop): Likewise.
* config/alpha/alpha.c (alpha_swapped_comparison_operator,
print_operand): Likewise.
* config/arc/arc.c (proper_comparison_operator): Likewise.
* config/arm/arm.c (arm_arm_address_cost, arm_select_cc_mode):
Likewise.
* config/avr/avr.c (_reg_unused_after): Likewise.
* config/frv/frv.c (frv_ifcvt_modify_tests,
frv_ifcvt_modify_insn, frv_pack_insn): Likewise.
* config/i386/i386.c (ix86_comparison_operator,
ix86_carry_flag_operator, fcmov_comparison_operator,
arith_or_logical_operator, print_operand,
ix86_expand_binary_operator, ix86_binary_operator_ok):
Likewise.
* config/i386/i386.md: Likewise.
* config/ia64/ia64.c (not_postinc_memory_operand,
ia64_print_operand, update_set_flags, errata_emit_nops):
Likewise.
* config/ia64/ia64.h (PREFERRED_RELOAD_CLASS,
CONSTRAINT_OK_FOR_S): Likewise.
* config/ip2k/ip2k.c (mdr_resequence_xy_yx,
mdr_try_move_dp_reload, ip2k_check_can_adjust_stack_ref,
ip2k_xexp_not_uses_reg_for_mem, ip2k_xexp_not_uses_reg_p,
ip2k_composite_xexp_not_uses_reg_p, ip2k_unary_operator):
Likewise.
* config/iq2000/iq2000.c (cmp_op, symbolic_expression_p,
eqne_comparison_operator, signed_comparison_operator):
Likewise.
* config/mips/mips.c (cmp_op, symbolic_expression_p):
Likewise.
* config/mmix/mmix (mmix_foldable_comparison_operator,
mmix_comparison_operator): Likewise.
* config/pa/pa.c (hppa_legitimize_address): Likewise.
* config/rs6000/rs6000.c (stmw_operation,
branch_comparison_operator, trap_comparison_operator,
ccr_bit): Likewise.
* config/rs6000/rs6000.h (SELECT_CC_MODE): Likewise.
* config/s390/s390.c (s390_alc_comparison,
s390_slb_comparison):L Likewise.
* config/sh/sh.c (gen_block_redirect, reg_unused_after):
Likewise.
* config/sparc/sparc.c (eq_or_neq, normal_comp_operator,
noov_compare_op, noov_compare64_op, v9_regcmp_op,
emit_hard_tfmode_operation, reg_unused_after)
* doc/md.texi, doc/rtl.texi: Likewise.
* ra-debug.c: Add 2004 to list of copyright years.
* unroll.c: Likewise.
* combine.c (simplify_logical): Remove dummy test,
(apply_distributive_law): Fix typo in comment.
GET_CODE (x) == AND so x is a commutative binary op.
* jump.c (delete_related_insns): simplify loop
condition, move testing of RTX codes inside the loop.
(rtx_renumbered_equal_p): do not use RTX_CODE.
* rtl.c (rtx_class): Declare as enum rtx_class.
* rtl.def (EQ, NE, UNEQ, LTGT, UNORDERED, ORDERED):
Move to RTX_COMM_COMPARE class.
(HIGH, SYMBOL_REF, LABEL_REF, CONST, CONST_INT, CONST_DOUBLE):
Move to RTX_CONST_OBJ class.
* rtl.h (enum rtx_class): New declaration,
(RTX_OBJ_MASK, RTX_OBJ_RESULT, RTX_COMPARE_MASK,
RTX_COMPARE_RESULT, RTX_ARITHMETIC_MASK, RTX_ARITHMETIC_RESULT,
RTX_BINARY_MASK, RTX_BINARY_RESULT, RTX_COMMUTATIVE_MASK,
RTX_COMMUTATIVE_RESULT, RTX_NON_COMMUTATIVE_RESULT,
RTX_EXPR_FIRST, RTX_EXPR_LAST, UNARY_P, BINARY_P,
ARITHMETIC_P, COMMUTATIVE_ARITHMETIC_P, COMPARISON_P,
SWAPPABLE_OPERANDS_P, NON_COMMUTATIVE_P, COMMUTATIVE_P,
OBJECT_P): New macros.
* config/sparc/sparc.c (noov_compare_op): Remove register
from parameter.
From-SVN: r78824
2004-03-03 09:35:33 +01:00
|
|
|
|
extern const enum rtx_class rtx_class[NUM_RTX_CODE];
|
1996-07-04 00:07:53 +02:00
|
|
|
|
#define GET_RTX_CLASS(CODE) (rtx_class[(int) (CODE)])
|
2002-09-16 20:33:23 +02:00
|
|
|
|
|
2003-10-18 20:45:16 +02:00
|
|
|
|
extern const unsigned char rtx_size[NUM_RTX_CODE];
|
2002-09-16 20:33:23 +02:00
|
|
|
|
extern const unsigned char rtx_next[NUM_RTX_CODE];
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
rtl.h (addr_diff_vec_flags): New typedef.
* rtl.h (addr_diff_vec_flags): New typedef.
(union rtunion_def): New member rt_addr_diff_vec_flags.
(ADDR_DIFF_VEC_FLAGS): New macro.
* sh.c (output_branch): Fix offset overflow problems.
* final.c (shorten_branches): Implement CASE_VECTOR_SHORTEN_MODE.
(final_scan_insn): New argument BODY for ASM_OUTPUT_ADDR_DIFF_ELT.
* rtl.def (ADDR_DIFF_VEC): Three new fields (min, max and flags).
* stmt.c (expand_end_case): Supply new arguments to
gen_rtx_ADDR_DIFF_VEC.
* 1750a.h (ASM_OUTPUT_ADDR_DIFF_ELT): New argument BODY.
* alpha.h, arc.h, clipper.h, convex.h : Likewise.
* dsp16xx.h, elxsi.h, fx80.h, gmicro.h, h8300.h : Likewise.
* i370.h, i386.h, i860.h, i960.h, m32r.h, m68k.h, m88k.h : Likewise.
* mips.h, mn10200.h, mn10300.h, ns32k.h, pa.h, pyr.h : Likewise.
* rs6000.h, sh.h, sparc.h, spur.h, tahoe.h, v850.h : Likewise.
* vax.h, we32k.h, alpha/vms.h, arm/aof.h, arm/aout.h : Likewise.
* i386/386bsd.h, i386/freebsd-elf.h : Likewise.
* i386/freebsd.h, i386/linux.h : Likewise.
* i386/netbsd.h, i386/osfrose.h, i386/ptx4-i.h, i386/sco5.h : Likewise.
* i386/sysv4.h, m68k/3b1.h, m68k/dpx2.h, m68k/hp320.h : Likewise.
* m68k/mot3300.h, m68k/sgs.h : Likewise.
* m68k/tower-as.h, ns32k/encore.h, sparc/pbd.h : Likewise.
* sh.h (INSN_ALIGN, INSN_LENGTH_ALIGNMENT): Define.
(CASE_VECTOR_SHORTEN_MODE): Define.
(short_cbranch_p, align_length, addr_diff_vec_adjust): Don't declare.
(med_branch_p, braf_branch_p): Don't declare.
(mdep_reorg_phase, barrier_align): Declare.
(ADJUST_INSN_LENGTH): Remove alignment handling.
* sh.c (uid_align, uid_align_max): Deleted.
(max_uid_before_fixup_addr_diff_vecs, branch_offset): Deleted.
(short_cbranch_p, med_branch_p, braf_branch_p, align_length): Deleted.
(cache_align_p, fixup_aligns, addr_diff_vec_adjust): Deleted.
(output_far_jump): Don't use braf_branch_p.
(output_branchy_insn): Don't use branch_offset.
(find_barrier): Remove checks for max_uid_before_fixup_addr_diff_vecs.
Remove paired barrier stuff.
Don't use cache_align_p.
Take alignment insns into account.
(fixup_addr_diff_vecs): Reduce to only fixing up the base label of
the addr_diff_vec.
(barrier_align, branch_dest): New function.
(machine_dependent_reorg, split_branches): Remove infrastructure
for branch shortening that is now provided in the backend.
* sh.md (short_cbranch_p, med_branch_p, med_cbranch_p): New attributes.
(braf_branch_p, braf_cbranch_p): Likewise.
(attribute length): Use new attributes.
(casesi_worker): Get mode and unsignednedd from ADDR_DIFF_VEC.
(addr_diff_vec_adjust): Delete.
(align_2): Now a define_expand.
(align_log): Now length 0.
From-SVN: r18433
1998-03-06 15:54:07 +01:00
|
|
|
|
/* The flags and bitfields of an ADDR_DIFF_VEC. BASE is the base label
|
|
|
|
|
relative to which the offsets are calculated, as explained in rtl.def. */
|
|
|
|
|
typedef struct
|
|
|
|
|
{
|
|
|
|
|
/* Set at the start of shorten_branches - ONLY WHEN OPTIMIZING - : */
|
|
|
|
|
unsigned min_align: 8;
|
|
|
|
|
/* Flags: */
|
|
|
|
|
unsigned base_after_vec: 1; /* BASE is after the ADDR_DIFF_VEC. */
|
2001-10-01 13:00:47 +02:00
|
|
|
|
unsigned min_after_vec: 1; /* minimum address target label is
|
|
|
|
|
after the ADDR_DIFF_VEC. */
|
|
|
|
|
unsigned max_after_vec: 1; /* maximum address target label is
|
|
|
|
|
after the ADDR_DIFF_VEC. */
|
|
|
|
|
unsigned min_after_base: 1; /* minimum address target label is
|
|
|
|
|
after BASE. */
|
|
|
|
|
unsigned max_after_base: 1; /* maximum address target label is
|
|
|
|
|
after BASE. */
|
rtl.h (addr_diff_vec_flags): New typedef.
* rtl.h (addr_diff_vec_flags): New typedef.
(union rtunion_def): New member rt_addr_diff_vec_flags.
(ADDR_DIFF_VEC_FLAGS): New macro.
* sh.c (output_branch): Fix offset overflow problems.
* final.c (shorten_branches): Implement CASE_VECTOR_SHORTEN_MODE.
(final_scan_insn): New argument BODY for ASM_OUTPUT_ADDR_DIFF_ELT.
* rtl.def (ADDR_DIFF_VEC): Three new fields (min, max and flags).
* stmt.c (expand_end_case): Supply new arguments to
gen_rtx_ADDR_DIFF_VEC.
* 1750a.h (ASM_OUTPUT_ADDR_DIFF_ELT): New argument BODY.
* alpha.h, arc.h, clipper.h, convex.h : Likewise.
* dsp16xx.h, elxsi.h, fx80.h, gmicro.h, h8300.h : Likewise.
* i370.h, i386.h, i860.h, i960.h, m32r.h, m68k.h, m88k.h : Likewise.
* mips.h, mn10200.h, mn10300.h, ns32k.h, pa.h, pyr.h : Likewise.
* rs6000.h, sh.h, sparc.h, spur.h, tahoe.h, v850.h : Likewise.
* vax.h, we32k.h, alpha/vms.h, arm/aof.h, arm/aout.h : Likewise.
* i386/386bsd.h, i386/freebsd-elf.h : Likewise.
* i386/freebsd.h, i386/linux.h : Likewise.
* i386/netbsd.h, i386/osfrose.h, i386/ptx4-i.h, i386/sco5.h : Likewise.
* i386/sysv4.h, m68k/3b1.h, m68k/dpx2.h, m68k/hp320.h : Likewise.
* m68k/mot3300.h, m68k/sgs.h : Likewise.
* m68k/tower-as.h, ns32k/encore.h, sparc/pbd.h : Likewise.
* sh.h (INSN_ALIGN, INSN_LENGTH_ALIGNMENT): Define.
(CASE_VECTOR_SHORTEN_MODE): Define.
(short_cbranch_p, align_length, addr_diff_vec_adjust): Don't declare.
(med_branch_p, braf_branch_p): Don't declare.
(mdep_reorg_phase, barrier_align): Declare.
(ADJUST_INSN_LENGTH): Remove alignment handling.
* sh.c (uid_align, uid_align_max): Deleted.
(max_uid_before_fixup_addr_diff_vecs, branch_offset): Deleted.
(short_cbranch_p, med_branch_p, braf_branch_p, align_length): Deleted.
(cache_align_p, fixup_aligns, addr_diff_vec_adjust): Deleted.
(output_far_jump): Don't use braf_branch_p.
(output_branchy_insn): Don't use branch_offset.
(find_barrier): Remove checks for max_uid_before_fixup_addr_diff_vecs.
Remove paired barrier stuff.
Don't use cache_align_p.
Take alignment insns into account.
(fixup_addr_diff_vecs): Reduce to only fixing up the base label of
the addr_diff_vec.
(barrier_align, branch_dest): New function.
(machine_dependent_reorg, split_branches): Remove infrastructure
for branch shortening that is now provided in the backend.
* sh.md (short_cbranch_p, med_branch_p, med_cbranch_p): New attributes.
(braf_branch_p, braf_cbranch_p): Likewise.
(attribute length): Use new attributes.
(casesi_worker): Get mode and unsignednedd from ADDR_DIFF_VEC.
(addr_diff_vec_adjust): Delete.
(align_2): Now a define_expand.
(align_log): Now length 0.
From-SVN: r18433
1998-03-06 15:54:07 +01:00
|
|
|
|
/* Set by the actual branch shortening process - ONLY WHEN OPTIMIZING - : */
|
|
|
|
|
unsigned offset_unsigned: 1; /* offsets have to be treated as unsigned. */
|
|
|
|
|
unsigned : 2;
|
|
|
|
|
unsigned scale : 8;
|
|
|
|
|
} addr_diff_vec_flags;
|
|
|
|
|
|
2001-10-01 13:00:47 +02:00
|
|
|
|
/* Structure used to describe the attributes of a MEM. These are hashed
|
|
|
|
|
so MEMs that the same attributes share a data structure. This means
|
|
|
|
|
they cannot be modified in place. If any element is nonzero, it means
|
|
|
|
|
the value of the corresponding attribute is unknown. */
|
2002-07-25 20:00:38 +02:00
|
|
|
|
/* ALIGN and SIZE are the alignment and size of the MEM itself,
|
|
|
|
|
while EXPR can describe a larger underlying object, which might have a
|
|
|
|
|
stricter alignment; OFFSET is the offset of the MEM within that object. */
|
2002-06-04 09:11:05 +02:00
|
|
|
|
typedef struct mem_attrs GTY(())
|
2001-10-01 13:00:47 +02:00
|
|
|
|
{
|
2001-10-11 14:43:43 +02:00
|
|
|
|
HOST_WIDE_INT alias; /* Memory alias set. */
|
2001-12-02 20:04:23 +01:00
|
|
|
|
tree expr; /* expr corresponding to MEM. */
|
2001-10-11 14:43:43 +02:00
|
|
|
|
rtx offset; /* Offset from start of DECL, as CONST_INT. */
|
2001-10-01 13:00:47 +02:00
|
|
|
|
rtx size; /* Size in bytes, as a CONST_INT. */
|
2001-10-20 14:30:26 +02:00
|
|
|
|
unsigned int align; /* Alignment of MEM in bits. */
|
2001-10-01 13:00:47 +02:00
|
|
|
|
} mem_attrs;
|
|
|
|
|
|
emit-rtl.c (reg_attrs_htab): New static variable.
* emit-rtl.c (reg_attrs_htab): New static variable.
(reg_attrs_htab_hash, reg_attrs_htab_eq, get_reg_attrs): New static
functions.
(reg_rtx): Do not maintain regno_decl.
(gen_rtx_REG_offset, set_reg_attrs_from_mem, set_delc_rtx,
set_mem_attrs_from_reg): New global function.
(init_emit): Do not initialize regno_decl.
(init_emit_once): initialize reg_attrs_htab.
* final.c (alter_subreg): Do not replace REG by SUBREG.
(gen_mem_expr_from_op): Improve output.
(output_asm_operands): Likewise.
* function.c (assign_params): Do not set REGNO_DECL.
* function.h (struct function): Kill regno_decl.
(REGNO_DECL): Kill.
* gengtype.c (adjust_field_rtx_def): Handle new field of reg.
* print_rtl.c (print_rtx): Output REG information.
* regclass.c (reg_scan_mark_refs): Update attrs.
* reload1.c (alter_reg): Likewise.
* simplify_rtx.c (simplify_subreg): Likewise.
* stmt.c (expand_decl): Likewise.
* rtl.def (REG): Add new field.
* rtl.h (struct reg_attrs): New.
(rtunion_def): At rtreg.
(X0MEMATTR): Add checking.
(X0REGATTR, REG_ATTRS, REG_EXPR, REG_OFFSET): New macro.
(set_reg_attrs_from_mem, set_mem_attrs_from_reg, gen_rtx_REG_offset):
Declare.
* tree.h (SET_DECL_RTL): Call set_decl_rtl.
From-SVN: r61741
2003-01-24 23:45:58 +01:00
|
|
|
|
/* Structure used to describe the attributes of a REG in similar way as
|
|
|
|
|
mem_attrs does for MEM above. */
|
|
|
|
|
|
|
|
|
|
typedef struct reg_attrs GTY(())
|
|
|
|
|
{
|
|
|
|
|
tree decl; /* decl corresponding to REG. */
|
|
|
|
|
HOST_WIDE_INT offset; /* Offset from start of DECL. */
|
|
|
|
|
} reg_attrs;
|
|
|
|
|
|
1991-12-06 22:00:31 +01:00
|
|
|
|
/* Common union for an element of an rtx. */
|
|
|
|
|
|
2002-09-16 20:33:23 +02:00
|
|
|
|
union rtunion_def
|
1991-12-06 22:00:31 +01:00
|
|
|
|
{
|
rtl.h (union rtunion_def): Have all members start with the prefix "rt_".
* rtl.h (union rtunion_def): Have all members start with the
prefix "rt_".
(XINT, XSTR, XEXP, XVEC, XMODE, XBITMAP, XTREE, XBBDEF, XTMPL,
X0INT, X0UINT, X0STR, X0EXP, X0VEC, X0MODE, X0BITMAP, X0TREE,
X0MEMATTR, X0BBDEF, X0REGATTR, XCINT, XCUINT, XCSTR, XCEXP,
XCVEC, XCMODE, XCBITMAP, XCTREE, XCBBDEF, XC2EXP): Adjust
members
access.
* gengtype.c (adjust_field_rtx_def): Likewise.
* rtlanal.c (loc_mentioned_in_p): Likewise.
From-SVN: r85434
2004-08-02 12:29:26 +02:00
|
|
|
|
int rt_int;
|
|
|
|
|
unsigned int rt_uint;
|
|
|
|
|
const char *rt_str;
|
|
|
|
|
rtx rt_rtx;
|
|
|
|
|
rtvec rt_rtvec;
|
|
|
|
|
enum machine_mode rt_type;
|
rtl.h (addr_diff_vec_flags): New typedef.
* rtl.h (addr_diff_vec_flags): New typedef.
(union rtunion_def): New member rt_addr_diff_vec_flags.
(ADDR_DIFF_VEC_FLAGS): New macro.
* sh.c (output_branch): Fix offset overflow problems.
* final.c (shorten_branches): Implement CASE_VECTOR_SHORTEN_MODE.
(final_scan_insn): New argument BODY for ASM_OUTPUT_ADDR_DIFF_ELT.
* rtl.def (ADDR_DIFF_VEC): Three new fields (min, max and flags).
* stmt.c (expand_end_case): Supply new arguments to
gen_rtx_ADDR_DIFF_VEC.
* 1750a.h (ASM_OUTPUT_ADDR_DIFF_ELT): New argument BODY.
* alpha.h, arc.h, clipper.h, convex.h : Likewise.
* dsp16xx.h, elxsi.h, fx80.h, gmicro.h, h8300.h : Likewise.
* i370.h, i386.h, i860.h, i960.h, m32r.h, m68k.h, m88k.h : Likewise.
* mips.h, mn10200.h, mn10300.h, ns32k.h, pa.h, pyr.h : Likewise.
* rs6000.h, sh.h, sparc.h, spur.h, tahoe.h, v850.h : Likewise.
* vax.h, we32k.h, alpha/vms.h, arm/aof.h, arm/aout.h : Likewise.
* i386/386bsd.h, i386/freebsd-elf.h : Likewise.
* i386/freebsd.h, i386/linux.h : Likewise.
* i386/netbsd.h, i386/osfrose.h, i386/ptx4-i.h, i386/sco5.h : Likewise.
* i386/sysv4.h, m68k/3b1.h, m68k/dpx2.h, m68k/hp320.h : Likewise.
* m68k/mot3300.h, m68k/sgs.h : Likewise.
* m68k/tower-as.h, ns32k/encore.h, sparc/pbd.h : Likewise.
* sh.h (INSN_ALIGN, INSN_LENGTH_ALIGNMENT): Define.
(CASE_VECTOR_SHORTEN_MODE): Define.
(short_cbranch_p, align_length, addr_diff_vec_adjust): Don't declare.
(med_branch_p, braf_branch_p): Don't declare.
(mdep_reorg_phase, barrier_align): Declare.
(ADJUST_INSN_LENGTH): Remove alignment handling.
* sh.c (uid_align, uid_align_max): Deleted.
(max_uid_before_fixup_addr_diff_vecs, branch_offset): Deleted.
(short_cbranch_p, med_branch_p, braf_branch_p, align_length): Deleted.
(cache_align_p, fixup_aligns, addr_diff_vec_adjust): Deleted.
(output_far_jump): Don't use braf_branch_p.
(output_branchy_insn): Don't use branch_offset.
(find_barrier): Remove checks for max_uid_before_fixup_addr_diff_vecs.
Remove paired barrier stuff.
Don't use cache_align_p.
Take alignment insns into account.
(fixup_addr_diff_vecs): Reduce to only fixing up the base label of
the addr_diff_vec.
(barrier_align, branch_dest): New function.
(machine_dependent_reorg, split_branches): Remove infrastructure
for branch shortening that is now provided in the backend.
* sh.md (short_cbranch_p, med_branch_p, med_cbranch_p): New attributes.
(braf_branch_p, braf_cbranch_p): Likewise.
(attribute length): Use new attributes.
(casesi_worker): Get mode and unsignednedd from ADDR_DIFF_VEC.
(addr_diff_vec_adjust): Delete.
(align_2): Now a define_expand.
(align_log): Now length 0.
From-SVN: r18433
1998-03-06 15:54:07 +01:00
|
|
|
|
addr_diff_vec_flags rt_addr_diff_vec_flags;
|
2000-03-14 19:36:18 +01:00
|
|
|
|
struct cselib_val_struct *rt_cselib;
|
rtl.h (union rtunion_def): Have all members start with the prefix "rt_".
* rtl.h (union rtunion_def): Have all members start with the
prefix "rt_".
(XINT, XSTR, XEXP, XVEC, XMODE, XBITMAP, XTREE, XBBDEF, XTMPL,
X0INT, X0UINT, X0STR, X0EXP, X0VEC, X0MODE, X0BITMAP, X0TREE,
X0MEMATTR, X0BBDEF, X0REGATTR, XCINT, XCUINT, XCSTR, XCEXP,
XCVEC, XCMODE, XCBITMAP, XCTREE, XCBBDEF, XC2EXP): Adjust
members
access.
* gengtype.c (adjust_field_rtx_def): Likewise.
* rtlanal.c (loc_mentioned_in_p): Likewise.
From-SVN: r85434
2004-08-02 12:29:26 +02:00
|
|
|
|
struct bitmap_head_def *rt_bit;
|
|
|
|
|
tree rt_tree;
|
|
|
|
|
struct basic_block_def *rt_bb;
|
|
|
|
|
mem_attrs *rt_mem;
|
|
|
|
|
reg_attrs *rt_reg;
|
2002-09-16 20:33:23 +02:00
|
|
|
|
};
|
|
|
|
|
typedef union rtunion_def rtunion;
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
|
|
|
|
/* RTL expression ("rtx"). */
|
|
|
|
|
|
2003-06-01 17:59:10 +02:00
|
|
|
|
struct rtx_def GTY((chain_next ("RTX_NEXT (&%h)"),
|
2002-09-16 20:33:23 +02:00
|
|
|
|
chain_prev ("RTX_PREV (&%h)")))
|
1991-12-06 22:00:31 +01:00
|
|
|
|
{
|
|
|
|
|
/* The kind of expression this is. */
|
2000-04-18 21:42:30 +02:00
|
|
|
|
ENUM_BITFIELD(rtx_code) code: 16;
|
1999-09-28 08:28:33 +02:00
|
|
|
|
|
1991-12-06 22:00:31 +01:00
|
|
|
|
/* The kind of value the expression has. */
|
2000-04-18 21:42:30 +02:00
|
|
|
|
ENUM_BITFIELD(machine_mode) mode : 8;
|
|
|
|
|
|
2002-05-07 02:18:48 +02:00
|
|
|
|
/* 1 in a MEM if we should keep the alias set for this mem unchanged
|
|
|
|
|
when we access a component.
|
|
|
|
|
1 in a CALL_INSN if it is a sibling call.
|
2002-07-20 01:11:19 +02:00
|
|
|
|
1 in a SET that is for a return.
|
|
|
|
|
In a CODE_LABEL, part of the two-bit alternate entry field. */
|
1991-12-06 22:00:31 +01:00
|
|
|
|
unsigned int jump : 1;
|
2003-04-23 01:17:46 +02:00
|
|
|
|
/* In a CODE_LABEL, part of the two-bit alternate entry field.
|
|
|
|
|
1 in a MEM if it cannot trap. */
|
1991-12-06 22:00:31 +01:00
|
|
|
|
unsigned int call : 1;
|
2002-05-07 02:18:48 +02:00
|
|
|
|
/* 1 in a REG, MEM, or CONCAT if the value is set at most once, anywhere.
|
|
|
|
|
1 in a SUBREG if it references an unsigned object whose mode has been
|
|
|
|
|
from a promoted to a wider mode.
|
1991-12-06 22:00:31 +01:00
|
|
|
|
1 in a SYMBOL_REF if it addresses something in the per-function
|
|
|
|
|
constants pool.
|
2002-05-07 02:18:48 +02:00
|
|
|
|
1 in a CALL_INSN, NOTE, or EXPR_LIST for a const or pure call.
|
2002-05-10 22:13:02 +02:00
|
|
|
|
1 in a JUMP_INSN, CALL_INSN, or INSN of an annulling branch. */
|
1991-12-06 22:00:31 +01:00
|
|
|
|
unsigned int unchanging : 1;
|
2002-05-07 02:18:48 +02:00
|
|
|
|
/* 1 in a MEM or ASM_OPERANDS expression if the memory reference is volatile.
|
|
|
|
|
1 in an INSN, CALL_INSN, JUMP_INSN, CODE_LABEL, BARRIER, or NOTE
|
|
|
|
|
if it has been deleted.
|
|
|
|
|
1 in a REG expression if corresponds to a variable declared by the user,
|
1991-12-06 22:00:31 +01:00
|
|
|
|
0 for an internally generated temporary.
|
2002-05-07 02:18:48 +02:00
|
|
|
|
1 in a SUBREG with a negative value.
|
|
|
|
|
1 in a LABEL_REF or in a REG_LABEL note for a non-local label.
|
|
|
|
|
In a SYMBOL_REF, this flag is used for machine-specific purposes. */
|
1991-12-06 22:00:31 +01:00
|
|
|
|
unsigned int volatil : 1;
|
1998-06-11 01:39:46 +02:00
|
|
|
|
/* 1 in a MEM referring to a field of an aggregate.
|
1991-12-06 22:00:31 +01:00
|
|
|
|
0 if the MEM was a variable or the result of a * operator in C;
|
|
|
|
|
1 if it was the result of a . or -> operator (on a struct) in C.
|
|
|
|
|
1 in a REG if the register is used only in exit code a loop.
|
2000-03-29 03:56:04 +02:00
|
|
|
|
1 in a SUBREG expression if was generated from a variable with a
|
1992-09-19 21:44:05 +02:00
|
|
|
|
promoted mode.
|
1991-12-06 22:00:31 +01:00
|
|
|
|
1 in a CODE_LABEL if the label is used for nonlocal gotos
|
|
|
|
|
and must not be deleted even if its count is zero.
|
2002-06-14 20:58:10 +02:00
|
|
|
|
1 in an INSN, JUMP_INSN or CALL_INSN if this insn must be scheduled
|
|
|
|
|
together with the preceding insn. Valid only within sched.
|
1991-12-06 22:00:31 +01:00
|
|
|
|
1 in an INSN, JUMP_INSN, or CALL_INSN if insn is in a delay slot and
|
|
|
|
|
from the target of a branch. Valid from reorg until end of compilation;
|
cse.c (CHEAP_REGNO): Redefine using REGNO_PTR_FRAME_P and HARD_REGISTER_NUM_P.
* cse.c (CHEAP_REGNO): Redefine using REGNO_PTR_FRAME_P and
HARD_REGISTER_NUM_P.
* cselib.c (new_cselib_val): Make comment correct and more detailed.
* flow.c (mark_set_1): Likewise.
* except.c (duplicate_eh_region_1, duplicate_eh_region_2,
duplicate_eh_regions): Remove.
* except.h (duplicate_eh_regions): Remove prototype.
* integrate.c (get_label_from_map, copy_rtx_and_substitute,
global_const_equiv_varray): Remove.
* integrate.h (get_label_from_map, copy_rtx_and_substitute,
global_const_equiv_varray, set_label_in_map): Remove prototypes,
extern declaration, and #define.
(MAYBE_EXTEND_CONST_EQUIV_VARRAY, SET_CONST_EQUIV_DATA): Remove.
(struct inline_remap): Remove.
* varray.c (struct element): Remove entry for const_equiv_data.
* varray.h (struct const_equiv_data): Remove.
(enum varray_data_enum) <VARRAY_DATA_CONST_EQUIV>: Remove.
(union varray_data_tag) <const_equiv>: Remove.
(VARRAY_CONST_EQUIV_INIT, VARRAY_CONST_EQUIV,
VARRAY_PUSH_CONST_EQUIV, VARRAY_TOP_CONST_EQUIV): Remove.
* regstack.c (record_label_references): Remove unused function.
* rtl.def (VALUE): Update comment.
(LABEL_REF): Remove unused operand 2.
* rtl.h (struct rtx_def): Update for removed accessor macros.
(XCADVFLAGS, INSN_DEAD_CODE_P, LINE_NUMBER, CONTAINING_INSN,
REG_LOOP_TEST_P): Remove.
(ADDR_DIFF_VEC_FLAGS, CSELIB_VAL_PTR, LABEL_NEXTREF): Add comments.
* web.c (entry_register): Don't copy REG_LOOP_TEST_P.
* doc/rtl.texi (INSN_DEAD_CODE_P, REG_LOOP_TEST_P): Remove.
From-SVN: r90580
2004-11-13 15:18:04 +01:00
|
|
|
|
cleared before used. */
|
1991-12-06 22:00:31 +01:00
|
|
|
|
unsigned int in_struct : 1;
|
2002-05-07 02:18:48 +02:00
|
|
|
|
/* At the end of RTL generation, 1 if this rtx is used. This is used for
|
|
|
|
|
copying shared structure. See `unshare_all_rtl'.
|
2000-03-29 03:56:04 +02:00
|
|
|
|
In a REG, this is not needed for that purpose, and used instead
|
1991-12-06 22:00:31 +01:00
|
|
|
|
in `leaf_renumber_regs_insn'.
|
2002-05-07 02:18:48 +02:00
|
|
|
|
1 in a SYMBOL_REF, means that emit_library_call
|
1991-12-06 22:00:31 +01:00
|
|
|
|
has used it as the function. */
|
|
|
|
|
unsigned int used : 1;
|
1999-03-25 13:04:22 +01:00
|
|
|
|
/* 1 in an INSN or a SET if this rtx is related to the call frame,
|
1999-01-19 11:32:33 +01:00
|
|
|
|
either changing how we compute the frame address or saving and
|
2000-03-29 03:56:04 +02:00
|
|
|
|
restoring registers in the prologue and epilogue.
|
2004-03-21 00:08:57 +01:00
|
|
|
|
1 in a REG or MEM if it is a pointer.
|
2000-11-14 18:37:19 +01:00
|
|
|
|
1 in a SYMBOL_REF if it addresses something in the per-function
|
|
|
|
|
constant string pool. */
|
1996-12-13 02:31:47 +01:00
|
|
|
|
unsigned frame_related : 1;
|
2004-05-13 08:41:07 +02:00
|
|
|
|
/* 1 in a REG or PARALLEL that is the current function's return value.
|
2004-07-05 09:22:45 +02:00
|
|
|
|
1 in a MEM if it refers to a scalar.
|
2004-05-13 08:41:07 +02:00
|
|
|
|
1 in a SYMBOL_REF for a weak symbol. */
|
|
|
|
|
unsigned return_val : 1;
|
1999-09-04 20:25:41 +02:00
|
|
|
|
|
1991-12-06 22:00:31 +01:00
|
|
|
|
/* The first element of the operands of this rtx.
|
|
|
|
|
The number of operands and their types are controlled
|
|
|
|
|
by the `code' field, according to rtl.def. */
|
2003-10-18 20:45:16 +02:00
|
|
|
|
union u {
|
|
|
|
|
rtunion fld[1];
|
|
|
|
|
HOST_WIDE_INT hwint[1];
|
|
|
|
|
} GTY ((special ("rtx_def"), desc ("GET_CODE (&%0)"))) u;
|
system.h: Forward-declare struct rtx_def, struct rtvec_def, and union tree_node.
* system.h: Forward-declare struct rtx_def, struct rtvec_def,
and union tree_node. Typedef rtx, rtvec, and tree. Fix comment.
* rtl.h: Don't forward-declare union tree_node here. Don't
typedef rtx or rtvec here. Change all uses of struct rtx_def *,
struct rtvec_def *, or union tree_node * to use rtx, rtvec,
and tree respectively.
* tree.h: Don't forward-declare struct rtx_def here. Don't
typedef tree here. Change all uses of struct rtx_def *,
struct rtvec_def *, or union tree_node * to use rtx, rtvec,
and tree respectively.
From-SVN: r44980
2001-08-17 22:29:21 +02:00
|
|
|
|
};
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2003-10-18 20:45:16 +02:00
|
|
|
|
/* The size in bytes of an rtx header (code, mode and flags). */
|
|
|
|
|
#define RTX_HDR_SIZE offsetof (struct rtx_def, u)
|
|
|
|
|
|
|
|
|
|
/* The size in bytes of an rtx with code CODE. */
|
|
|
|
|
#define RTX_SIZE(CODE) rtx_size[CODE]
|
|
|
|
|
|
1991-12-06 22:00:31 +01:00
|
|
|
|
#define NULL_RTX (rtx) 0
|
|
|
|
|
|
2002-09-16 20:33:23 +02:00
|
|
|
|
/* The "next" and "previous" RTX, relative to this one. */
|
|
|
|
|
|
|
|
|
|
#define RTX_NEXT(X) (rtx_next[GET_CODE (X)] == 0 ? NULL \
|
|
|
|
|
: *(rtx *)(((char *)X) + rtx_next[GET_CODE (X)]))
|
|
|
|
|
|
|
|
|
|
/* FIXME: the "NEXT_INSN (PREV_INSN (X)) == X" condition shouldn't be needed.
|
|
|
|
|
*/
|
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
|
|
|
|
#define RTX_PREV(X) ((INSN_P (X) \
|
|
|
|
|
|| NOTE_P (X) \
|
|
|
|
|
|| BARRIER_P (X) \
|
|
|
|
|
|| LABEL_P (X)) \
|
2002-09-16 20:33:23 +02:00
|
|
|
|
&& PREV_INSN (X) != NULL \
|
|
|
|
|
&& NEXT_INSN (PREV_INSN (X)) == X \
|
|
|
|
|
? PREV_INSN (X) : NULL)
|
|
|
|
|
|
1991-12-06 22:00:31 +01:00
|
|
|
|
/* Define macros to access the `code' field of the rtx. */
|
|
|
|
|
|
2001-03-02 22:41:37 +01:00
|
|
|
|
#define GET_CODE(RTX) ((enum rtx_code) (RTX)->code)
|
2003-12-02 11:14:40 +01:00
|
|
|
|
#define PUT_CODE(RTX, CODE) ((RTX)->code = (CODE))
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2001-03-02 22:41:37 +01:00
|
|
|
|
#define GET_MODE(RTX) ((enum machine_mode) (RTX)->mode)
|
2003-12-02 11:14:40 +01:00
|
|
|
|
#define PUT_MODE(RTX, MODE) ((RTX)->mode = (MODE))
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
|
|
|
|
/* RTL vector. These appear inside RTX's when there is a need
|
|
|
|
|
for a variable number of things. The principle use is inside
|
|
|
|
|
PARALLEL expressions. */
|
|
|
|
|
|
2002-06-04 09:11:05 +02:00
|
|
|
|
struct rtvec_def GTY(()) {
|
1997-11-02 22:19:36 +01:00
|
|
|
|
int num_elem; /* number of elements */
|
2002-06-04 09:11:05 +02:00
|
|
|
|
rtx GTY ((length ("%h.num_elem"))) elem[1];
|
system.h: Forward-declare struct rtx_def, struct rtvec_def, and union tree_node.
* system.h: Forward-declare struct rtx_def, struct rtvec_def,
and union tree_node. Typedef rtx, rtvec, and tree. Fix comment.
* rtl.h: Don't forward-declare union tree_node here. Don't
typedef rtx or rtvec here. Change all uses of struct rtx_def *,
struct rtvec_def *, or union tree_node * to use rtx, rtvec,
and tree respectively.
* tree.h: Don't forward-declare struct rtx_def here. Don't
typedef tree here. Change all uses of struct rtx_def *,
struct rtvec_def *, or union tree_node * to use rtx, rtvec,
and tree respectively.
From-SVN: r44980
2001-08-17 22:29:21 +02:00
|
|
|
|
};
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
|
|
|
|
#define NULL_RTVEC (rtvec) 0
|
|
|
|
|
|
|
|
|
|
#define GET_NUM_ELEM(RTVEC) ((RTVEC)->num_elem)
|
1997-11-02 22:19:36 +01:00
|
|
|
|
#define PUT_NUM_ELEM(RTVEC, NUM) ((RTVEC)->num_elem = (NUM))
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2004-06-12 14:50:42 +02:00
|
|
|
|
/* Predicate yielding nonzero iff X is an rtx for a register. */
|
1991-12-06 22:00:31 +01:00
|
|
|
|
#define REG_P(X) (GET_CODE (X) == REG)
|
|
|
|
|
|
2004-06-12 14:50:42 +02:00
|
|
|
|
/* Predicate yielding nonzero iff X is an rtx for a memory location. */
|
|
|
|
|
#define MEM_P(X) (GET_CODE (X) == MEM)
|
|
|
|
|
|
2000-08-02 06:21:27 +02:00
|
|
|
|
/* Predicate yielding nonzero iff X is a label insn. */
|
|
|
|
|
#define LABEL_P(X) (GET_CODE (X) == CODE_LABEL)
|
|
|
|
|
|
|
|
|
|
/* Predicate yielding nonzero iff X is a jump insn. */
|
|
|
|
|
#define JUMP_P(X) (GET_CODE (X) == JUMP_INSN)
|
|
|
|
|
|
2004-06-12 14:50:42 +02:00
|
|
|
|
/* Predicate yielding nonzero iff X is a call insn. */
|
|
|
|
|
#define CALL_P(X) (GET_CODE (X) == CALL_INSN)
|
|
|
|
|
|
|
|
|
|
/* Predicate yielding nonzero iff X is an insn that cannot jump. */
|
|
|
|
|
#define NONJUMP_INSN_P(X) (GET_CODE (X) == INSN)
|
|
|
|
|
|
|
|
|
|
/* Predicate yielding nonzero iff X is a real insn. */
|
|
|
|
|
#define INSN_P(X) \
|
|
|
|
|
(NONJUMP_INSN_P (X) || JUMP_P (X) || CALL_P (X))
|
|
|
|
|
|
2000-08-02 06:21:27 +02:00
|
|
|
|
/* Predicate yielding nonzero iff X is a note insn. */
|
|
|
|
|
#define NOTE_P(X) (GET_CODE (X) == NOTE)
|
|
|
|
|
|
|
|
|
|
/* Predicate yielding nonzero iff X is a barrier insn. */
|
|
|
|
|
#define BARRIER_P(X) (GET_CODE (X) == BARRIER)
|
|
|
|
|
|
|
|
|
|
/* Predicate yielding nonzero iff X is a data for a jump table. */
|
|
|
|
|
#define JUMP_TABLE_DATA_P(INSN) \
|
|
|
|
|
(JUMP_P (INSN) && (GET_CODE (PATTERN (INSN)) == ADDR_VEC || \
|
|
|
|
|
GET_CODE (PATTERN (INSN)) == ADDR_DIFF_VEC))
|
|
|
|
|
|
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
|
|
|
|
/* 1 if X is a unary operator. */
|
|
|
|
|
|
|
|
|
|
#define UNARY_P(X) \
|
|
|
|
|
(GET_RTX_CLASS (GET_CODE (X)) == RTX_UNARY)
|
|
|
|
|
|
|
|
|
|
/* 1 if X is a binary operator. */
|
|
|
|
|
|
|
|
|
|
#define BINARY_P(X) \
|
|
|
|
|
((GET_RTX_CLASS (GET_CODE (X)) & RTX_BINARY_MASK) == RTX_BINARY_RESULT)
|
|
|
|
|
|
|
|
|
|
/* 1 if X is an arithmetic operator. */
|
|
|
|
|
|
|
|
|
|
#define ARITHMETIC_P(X) \
|
|
|
|
|
((GET_RTX_CLASS (GET_CODE (X)) & RTX_ARITHMETIC_MASK) \
|
|
|
|
|
== RTX_ARITHMETIC_RESULT)
|
|
|
|
|
|
|
|
|
|
/* 1 if X is an arithmetic operator. */
|
|
|
|
|
|
|
|
|
|
#define COMMUTATIVE_ARITH_P(X) \
|
|
|
|
|
(GET_RTX_CLASS (GET_CODE (X)) == RTX_COMM_ARITH)
|
|
|
|
|
|
|
|
|
|
/* 1 if X is a commutative arithmetic operator or a comparison operator.
|
|
|
|
|
These two are sometimes selected together because it is possible to
|
|
|
|
|
swap the two operands. */
|
|
|
|
|
|
|
|
|
|
#define SWAPPABLE_OPERANDS_P(X) \
|
|
|
|
|
((1 << GET_RTX_CLASS (GET_CODE (X))) \
|
|
|
|
|
& ((1 << RTX_COMM_ARITH) | (1 << RTX_COMM_COMPARE) \
|
|
|
|
|
| (1 << RTX_COMPARE)))
|
|
|
|
|
|
|
|
|
|
/* 1 if X is a non-commutative operator. */
|
|
|
|
|
|
|
|
|
|
#define NON_COMMUTATIVE_P(X) \
|
|
|
|
|
((GET_RTX_CLASS (GET_CODE (X)) & RTX_COMMUTATIVE_MASK) \
|
|
|
|
|
== RTX_NON_COMMUTATIVE_RESULT)
|
|
|
|
|
|
|
|
|
|
/* 1 if X is a commutative operator on integers. */
|
|
|
|
|
|
|
|
|
|
#define COMMUTATIVE_P(X) \
|
|
|
|
|
((GET_RTX_CLASS (GET_CODE (X)) & RTX_COMMUTATIVE_MASK) \
|
|
|
|
|
== RTX_COMMUTATIVE_RESULT)
|
|
|
|
|
|
|
|
|
|
/* 1 if X is a relational operator. */
|
|
|
|
|
|
|
|
|
|
#define COMPARISON_P(X) \
|
|
|
|
|
((GET_RTX_CLASS (GET_CODE (X)) & RTX_COMPARE_MASK) == RTX_COMPARE_RESULT)
|
|
|
|
|
|
1991-12-06 22:00:31 +01:00
|
|
|
|
/* 1 if X is a constant value that is an integer. */
|
|
|
|
|
|
|
|
|
|
#define CONSTANT_P(X) \
|
2005-01-20 12:03:23 +01:00
|
|
|
|
(GET_RTX_CLASS (GET_CODE (X)) == RTX_CONST_OBJ)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
alias.c (rtx_equal_for_memref_p): Use predicates to test rtx classes and new rtx class codes...
2004-02-07 Paolo Bonzini <bonzini@gnu.org>
* alias.c (rtx_equal_for_memref_p): Use predicates
to test rtx classes and new rtx class codes, possibly
splitting conditionals that tested against '<' and 'o'.
* caller-save.c (save_call_clobbered_regs): Likewise.
* combine.c (contains_muldiv, find_split_point, subst,
combine_simplify_rtx, simplify_if_then_else,
simplify_set, simplify_logical, expand_compound_operation,
make_compound_operation, if_then_else_cond, known_cond,
apply_distributive_law, cached_nonzero_bits,
cached_num_sign_bit_copies, simplify_shift_const,
gen_binary, simplify_comparison, update_table_tick,
record_value_for_reg, get_lsat_value_validate): Likewise.
* cse.c (mention_regs, find_best_addr, find_comparison_args,
fold_rtx, cse_insn, invalidate_memory, cse_basic_block):
Likewise.
* emit-rtl.c (copy_insn_1): Likewise.
* expr.c (force_operand): Likewise.
* final.c (final_scan_insn, get_mem_expr_from_op): Likewise.
* flow.c (notice_stack_pointer_modification_1,
invalidate_mems_from_autoinc, ior_reg_cond, not_reg_cond,
and_reg_cond, elim_reg_cond): Likewise.
* function.c (update_epilogue_consts): Likewise.
* genattrtab.c (attr_rtx_1): Likewise.
* genopinit.c (gen_insn): Likewise.
* integrate.c (subst_constants): Likewise.
* jump.c (reversed_comparison_code_parts,
reversed_comparison_code, delete_related_insns,
rtx_renumbered_equal_p): Likewise.
* local-alloc.c (block_alloc): Likewise.
* loop.c (rtx_equal_for_prefetch_p, maybe_eliminate_biv,
canonicalize_condition): Likewise.
* loop-iv.c (simplify_using_conditions, iv_number_of_iterations):
Likewise.
* optabs.c (add_equal_node, expand_binop): Likewise.
* predict.c (estimate_probability): Likewise.
* ra-debug.c (ra_print_rtx_2op, ra_print_rtx): Likewise.
* recog.c (validate_replace_rtx_1, comparison_operator,
offsettable_address_p, constrain_operands): Likewise.
* reg-stack.c (swap_rtx_condition_1, subst_stack_regs_pat):
Likewise.
* regclass.c (scan_one_insn): Likewise.
* regmove.c (stable_and_no_regs_but_for_p): Likewise.
* regrename.c (kill_autoinc_value): Likewise.
* reload.c (find_reusable_reload, find_reloads,
reg_overlap_mentioned_for_reload_p): Likewise.
* reload1.c (gen_reload, delete_address_reloads_1): Likewise.
* rtl.c (copy_rtx): Likewise.
* rtl.h (CONSTANT_P, INSN_P): Likewise.
* rtlanal.c (commutative_operand_precedence): Likewise.
* sched-deps.c (conditions_mutex_p): Likewise.
* sched-rgn.c (is_cfg_nonregular): Likewise.
* simplify-rtx.c (simplify_gen_binary,
simplify_gen_relational, simplify_replace_rtx,
simplify_unary_operation, simplify_binary_operation,
simplify_ternary_operation, simplify_rtx): Likewise.
* unroll.c (reg_dead_after_loop): Likewise.
* config/alpha/alpha.c (alpha_swapped_comparison_operator,
print_operand): Likewise.
* config/arc/arc.c (proper_comparison_operator): Likewise.
* config/arm/arm.c (arm_arm_address_cost, arm_select_cc_mode):
Likewise.
* config/avr/avr.c (_reg_unused_after): Likewise.
* config/frv/frv.c (frv_ifcvt_modify_tests,
frv_ifcvt_modify_insn, frv_pack_insn): Likewise.
* config/i386/i386.c (ix86_comparison_operator,
ix86_carry_flag_operator, fcmov_comparison_operator,
arith_or_logical_operator, print_operand,
ix86_expand_binary_operator, ix86_binary_operator_ok):
Likewise.
* config/i386/i386.md: Likewise.
* config/ia64/ia64.c (not_postinc_memory_operand,
ia64_print_operand, update_set_flags, errata_emit_nops):
Likewise.
* config/ia64/ia64.h (PREFERRED_RELOAD_CLASS,
CONSTRAINT_OK_FOR_S): Likewise.
* config/ip2k/ip2k.c (mdr_resequence_xy_yx,
mdr_try_move_dp_reload, ip2k_check_can_adjust_stack_ref,
ip2k_xexp_not_uses_reg_for_mem, ip2k_xexp_not_uses_reg_p,
ip2k_composite_xexp_not_uses_reg_p, ip2k_unary_operator):
Likewise.
* config/iq2000/iq2000.c (cmp_op, symbolic_expression_p,
eqne_comparison_operator, signed_comparison_operator):
Likewise.
* config/mips/mips.c (cmp_op, symbolic_expression_p):
Likewise.
* config/mmix/mmix (mmix_foldable_comparison_operator,
mmix_comparison_operator): Likewise.
* config/pa/pa.c (hppa_legitimize_address): Likewise.
* config/rs6000/rs6000.c (stmw_operation,
branch_comparison_operator, trap_comparison_operator,
ccr_bit): Likewise.
* config/rs6000/rs6000.h (SELECT_CC_MODE): Likewise.
* config/s390/s390.c (s390_alc_comparison,
s390_slb_comparison):L Likewise.
* config/sh/sh.c (gen_block_redirect, reg_unused_after):
Likewise.
* config/sparc/sparc.c (eq_or_neq, normal_comp_operator,
noov_compare_op, noov_compare64_op, v9_regcmp_op,
emit_hard_tfmode_operation, reg_unused_after)
* doc/md.texi, doc/rtl.texi: Likewise.
* ra-debug.c: Add 2004 to list of copyright years.
* unroll.c: Likewise.
* combine.c (simplify_logical): Remove dummy test,
(apply_distributive_law): Fix typo in comment.
GET_CODE (x) == AND so x is a commutative binary op.
* jump.c (delete_related_insns): simplify loop
condition, move testing of RTX codes inside the loop.
(rtx_renumbered_equal_p): do not use RTX_CODE.
* rtl.c (rtx_class): Declare as enum rtx_class.
* rtl.def (EQ, NE, UNEQ, LTGT, UNORDERED, ORDERED):
Move to RTX_COMM_COMPARE class.
(HIGH, SYMBOL_REF, LABEL_REF, CONST, CONST_INT, CONST_DOUBLE):
Move to RTX_CONST_OBJ class.
* rtl.h (enum rtx_class): New declaration,
(RTX_OBJ_MASK, RTX_OBJ_RESULT, RTX_COMPARE_MASK,
RTX_COMPARE_RESULT, RTX_ARITHMETIC_MASK, RTX_ARITHMETIC_RESULT,
RTX_BINARY_MASK, RTX_BINARY_RESULT, RTX_COMMUTATIVE_MASK,
RTX_COMMUTATIVE_RESULT, RTX_NON_COMMUTATIVE_RESULT,
RTX_EXPR_FIRST, RTX_EXPR_LAST, UNARY_P, BINARY_P,
ARITHMETIC_P, COMMUTATIVE_ARITHMETIC_P, COMPARISON_P,
SWAPPABLE_OPERANDS_P, NON_COMMUTATIVE_P, COMMUTATIVE_P,
OBJECT_P): New macros.
* config/sparc/sparc.c (noov_compare_op): Remove register
from parameter.
From-SVN: r78824
2004-03-03 09:35:33 +01:00
|
|
|
|
/* 1 if X can be used to represent an object. */
|
|
|
|
|
#define OBJECT_P(X) \
|
|
|
|
|
((GET_RTX_CLASS (GET_CODE (X)) & RTX_OBJ_MASK) == RTX_OBJ_RESULT)
|
|
|
|
|
|
1991-12-06 22:00:31 +01:00
|
|
|
|
/* General accessor macros for accessing the fields of an rtx. */
|
|
|
|
|
|
acconfig.h: New ENABLE flags: TREE_CHECKING, RTL_CHECKING, GC_CHECKING, GC_ALWAYS_COLLECT.
1999-12-26 Zack Weinberg <zack@wolery.cumb.org>
* acconfig.h: New ENABLE flags: TREE_CHECKING, RTL_CHECKING,
GC_CHECKING, GC_ALWAYS_COLLECT.
* configure.in: Allow --enable-checking with an argument
listing check modes to enable.
* config.in, configure: Rebuilt.
* ggc-page.c, ggc-simple.c: Define GGC_POISON (and
GGC_ALWAYS_VERIFY for ggc-simple.c) only if
ENABLE_GC_CHECKING. Define GGC_ALWAYS_COLLECT only if
ENABLE_GC_ALWAYS_COLLECT.
* rtl.h, rtl.c: Change ENABLE_CHECKING to ENABLE_RTL_CHECKING
throughout.
* tree.h, tree.c: Change ENABLE_CHECKING to
ENABLE_TREE_CHECKING throughout.
* cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
throughout.
From-SVN: r31093
1999-12-27 00:06:54 +01:00
|
|
|
|
#if defined ENABLE_RTL_CHECKING && (GCC_VERSION >= 2007)
|
rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and bounds- check RTL accesses if --enable-checking.
1999-08-31 12:20 -0700 Zack Weinberg <zack@bitmover.com>
* rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and
bounds- check RTL accesses if --enable-checking.
(RTVEC_ELT): Bounds check if --enable-checking.
(XWINT, XINT, XSTR, XEXP, XVEC, XMODE, XBITMAP, XTREE,
XBBDEF): Use RTL_CHECK1/RTL_CHECK2 as appropriate.
(XVECEXP, XVECLEN): Define in terms of XVEC, RTVEC_ELT, and
GET_NUM_ELEM.
(X0WINT, X0INT, X0STR, X0EXP, X0VEC, X0MODE, X0BITMAP, X0TREE,
X0BBDEF, X0ADVFLAGS): New macros for accessing '0' slots of RTXes.
(ADDR_DIFF_VEC_FLAGS): Use X0ADVFLAGS.
(NOTE_SOURCE_FILE): Use X0STR.
(NOTE_BLOCK_NUMBER, NOTE_EH_HANDLER, LABEL_NUSES,
MEM_ALIAS_SET): Use X0INT.
(NOTE_RANGE_INFO, NOTE_LIVE_INFO, NOTE_BASIC_BLOCK,
JUMP_LABEL, LABEL_REFS, LABEL_NEXTREF, CONTAINING_INSN):
Use X0EXP.
* real.h (CONST_DOUBLE_CHAIN): Use X0EXP.
* rtl.c (copy_rtx, copy_most_rtx): Copy '0' slots with X0WINT.
(rtl_check_failed_bounds, rtl_check_failed_type1,
rtl_check_failed_type2, rtvec_check_failed_bounds): New
functions.
(fancy_abort): Fix comment.
* cse.c (canon_hash): Read CONST_DOUBLE data slots with XWINT.
(cse_insn): Decrement LABEL_NUSES for jump target before
deleting jump insn.
* emit-rtl.c (gen_rtx_CONST_DOUBLE): Use X0EXP for slot 1.
* final.c (alter_subreg): Compute regno before changing x to
REG; set REGNO(x) after changing it.
* flow.c (count_basic_blocks): Use XWINT to inspect EH_REGION
notes containing CONST_INTs.
(delete_eh_regions): Use NOTE_EH_HANDLER.
* function.c (put_reg_into_stack): Make reg a MEM before
initializing it.
(fixup_var_refs_insns): Save REG_NOTES (insn) in case we
delete insn.
(gen_mem_addressof): Make reg a MEM before initializing it.
* integrate.c (copy_rtx_and_substitute): Copy '0' slots with
X0WINT.
* local-alloc.c (update_equiv_regs): Zap REG_NOTES before
deleting an insn, not after.
(block_alloc): Only look at PATTERN(insn) if we have to, and
only if it's format class 'i'.
* loop.c (check_dbra_loop): Check bl->biv->add_val is a
CONST_INT before using its INTVAL.
* print-rtl.c (print_rtx): Use X0STR.
* regmove.c (fixup_match_1): Don't look at PATTERN of
non-class-'i' insn chain elements.
* reload.c (loc_mentioned_in_p): Take address of
in->fld[1].rtx directly.
* reload1.c (reload): Change reg to a MEM before initializing
it.
* varasm.c (mark_constant_pool): Skip CONST_DOUBLES, which
have no names.
* config/i386/i386.md (decrement_and_branch_if_zero): Fix typo.
From-SVN: r29008
1999-08-31 21:39:10 +02:00
|
|
|
|
/* The bit with a star outside the statement expr and an & inside is
|
|
|
|
|
so that N can be evaluated only once. */
|
2000-05-06 22:00:03 +02:00
|
|
|
|
#define RTL_CHECK1(RTX, N, C1) __extension__ \
|
2002-04-01 05:18:49 +02:00
|
|
|
|
(*({ rtx const _rtx = (RTX); const int _n = (N); \
|
|
|
|
|
const enum rtx_code _code = GET_CODE (_rtx); \
|
rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and bounds- check RTL accesses if --enable-checking.
1999-08-31 12:20 -0700 Zack Weinberg <zack@bitmover.com>
* rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and
bounds- check RTL accesses if --enable-checking.
(RTVEC_ELT): Bounds check if --enable-checking.
(XWINT, XINT, XSTR, XEXP, XVEC, XMODE, XBITMAP, XTREE,
XBBDEF): Use RTL_CHECK1/RTL_CHECK2 as appropriate.
(XVECEXP, XVECLEN): Define in terms of XVEC, RTVEC_ELT, and
GET_NUM_ELEM.
(X0WINT, X0INT, X0STR, X0EXP, X0VEC, X0MODE, X0BITMAP, X0TREE,
X0BBDEF, X0ADVFLAGS): New macros for accessing '0' slots of RTXes.
(ADDR_DIFF_VEC_FLAGS): Use X0ADVFLAGS.
(NOTE_SOURCE_FILE): Use X0STR.
(NOTE_BLOCK_NUMBER, NOTE_EH_HANDLER, LABEL_NUSES,
MEM_ALIAS_SET): Use X0INT.
(NOTE_RANGE_INFO, NOTE_LIVE_INFO, NOTE_BASIC_BLOCK,
JUMP_LABEL, LABEL_REFS, LABEL_NEXTREF, CONTAINING_INSN):
Use X0EXP.
* real.h (CONST_DOUBLE_CHAIN): Use X0EXP.
* rtl.c (copy_rtx, copy_most_rtx): Copy '0' slots with X0WINT.
(rtl_check_failed_bounds, rtl_check_failed_type1,
rtl_check_failed_type2, rtvec_check_failed_bounds): New
functions.
(fancy_abort): Fix comment.
* cse.c (canon_hash): Read CONST_DOUBLE data slots with XWINT.
(cse_insn): Decrement LABEL_NUSES for jump target before
deleting jump insn.
* emit-rtl.c (gen_rtx_CONST_DOUBLE): Use X0EXP for slot 1.
* final.c (alter_subreg): Compute regno before changing x to
REG; set REGNO(x) after changing it.
* flow.c (count_basic_blocks): Use XWINT to inspect EH_REGION
notes containing CONST_INTs.
(delete_eh_regions): Use NOTE_EH_HANDLER.
* function.c (put_reg_into_stack): Make reg a MEM before
initializing it.
(fixup_var_refs_insns): Save REG_NOTES (insn) in case we
delete insn.
(gen_mem_addressof): Make reg a MEM before initializing it.
* integrate.c (copy_rtx_and_substitute): Copy '0' slots with
X0WINT.
* local-alloc.c (update_equiv_regs): Zap REG_NOTES before
deleting an insn, not after.
(block_alloc): Only look at PATTERN(insn) if we have to, and
only if it's format class 'i'.
* loop.c (check_dbra_loop): Check bl->biv->add_val is a
CONST_INT before using its INTVAL.
* print-rtl.c (print_rtx): Use X0STR.
* regmove.c (fixup_match_1): Don't look at PATTERN of
non-class-'i' insn chain elements.
* reload.c (loc_mentioned_in_p): Take address of
in->fld[1].rtx directly.
* reload1.c (reload): Change reg to a MEM before initializing
it.
* varasm.c (mark_constant_pool): Skip CONST_DOUBLES, which
have no names.
* config/i386/i386.md (decrement_and_branch_if_zero): Fix typo.
From-SVN: r29008
1999-08-31 21:39:10 +02:00
|
|
|
|
if (_n < 0 || _n >= GET_RTX_LENGTH (_code)) \
|
2002-01-03 06:11:05 +01:00
|
|
|
|
rtl_check_failed_bounds (_rtx, _n, __FILE__, __LINE__, \
|
|
|
|
|
__FUNCTION__); \
|
rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and bounds- check RTL accesses if --enable-checking.
1999-08-31 12:20 -0700 Zack Weinberg <zack@bitmover.com>
* rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and
bounds- check RTL accesses if --enable-checking.
(RTVEC_ELT): Bounds check if --enable-checking.
(XWINT, XINT, XSTR, XEXP, XVEC, XMODE, XBITMAP, XTREE,
XBBDEF): Use RTL_CHECK1/RTL_CHECK2 as appropriate.
(XVECEXP, XVECLEN): Define in terms of XVEC, RTVEC_ELT, and
GET_NUM_ELEM.
(X0WINT, X0INT, X0STR, X0EXP, X0VEC, X0MODE, X0BITMAP, X0TREE,
X0BBDEF, X0ADVFLAGS): New macros for accessing '0' slots of RTXes.
(ADDR_DIFF_VEC_FLAGS): Use X0ADVFLAGS.
(NOTE_SOURCE_FILE): Use X0STR.
(NOTE_BLOCK_NUMBER, NOTE_EH_HANDLER, LABEL_NUSES,
MEM_ALIAS_SET): Use X0INT.
(NOTE_RANGE_INFO, NOTE_LIVE_INFO, NOTE_BASIC_BLOCK,
JUMP_LABEL, LABEL_REFS, LABEL_NEXTREF, CONTAINING_INSN):
Use X0EXP.
* real.h (CONST_DOUBLE_CHAIN): Use X0EXP.
* rtl.c (copy_rtx, copy_most_rtx): Copy '0' slots with X0WINT.
(rtl_check_failed_bounds, rtl_check_failed_type1,
rtl_check_failed_type2, rtvec_check_failed_bounds): New
functions.
(fancy_abort): Fix comment.
* cse.c (canon_hash): Read CONST_DOUBLE data slots with XWINT.
(cse_insn): Decrement LABEL_NUSES for jump target before
deleting jump insn.
* emit-rtl.c (gen_rtx_CONST_DOUBLE): Use X0EXP for slot 1.
* final.c (alter_subreg): Compute regno before changing x to
REG; set REGNO(x) after changing it.
* flow.c (count_basic_blocks): Use XWINT to inspect EH_REGION
notes containing CONST_INTs.
(delete_eh_regions): Use NOTE_EH_HANDLER.
* function.c (put_reg_into_stack): Make reg a MEM before
initializing it.
(fixup_var_refs_insns): Save REG_NOTES (insn) in case we
delete insn.
(gen_mem_addressof): Make reg a MEM before initializing it.
* integrate.c (copy_rtx_and_substitute): Copy '0' slots with
X0WINT.
* local-alloc.c (update_equiv_regs): Zap REG_NOTES before
deleting an insn, not after.
(block_alloc): Only look at PATTERN(insn) if we have to, and
only if it's format class 'i'.
* loop.c (check_dbra_loop): Check bl->biv->add_val is a
CONST_INT before using its INTVAL.
* print-rtl.c (print_rtx): Use X0STR.
* regmove.c (fixup_match_1): Don't look at PATTERN of
non-class-'i' insn chain elements.
* reload.c (loc_mentioned_in_p): Take address of
in->fld[1].rtx directly.
* reload1.c (reload): Change reg to a MEM before initializing
it.
* varasm.c (mark_constant_pool): Skip CONST_DOUBLES, which
have no names.
* config/i386/i386.md (decrement_and_branch_if_zero): Fix typo.
From-SVN: r29008
1999-08-31 21:39:10 +02:00
|
|
|
|
if (GET_RTX_FORMAT(_code)[_n] != C1) \
|
2002-01-03 06:11:05 +01:00
|
|
|
|
rtl_check_failed_type1 (_rtx, _n, C1, __FILE__, __LINE__, \
|
|
|
|
|
__FUNCTION__); \
|
2003-10-18 20:45:16 +02:00
|
|
|
|
&_rtx->u.fld[_n]; }))
|
rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and bounds- check RTL accesses if --enable-checking.
1999-08-31 12:20 -0700 Zack Weinberg <zack@bitmover.com>
* rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and
bounds- check RTL accesses if --enable-checking.
(RTVEC_ELT): Bounds check if --enable-checking.
(XWINT, XINT, XSTR, XEXP, XVEC, XMODE, XBITMAP, XTREE,
XBBDEF): Use RTL_CHECK1/RTL_CHECK2 as appropriate.
(XVECEXP, XVECLEN): Define in terms of XVEC, RTVEC_ELT, and
GET_NUM_ELEM.
(X0WINT, X0INT, X0STR, X0EXP, X0VEC, X0MODE, X0BITMAP, X0TREE,
X0BBDEF, X0ADVFLAGS): New macros for accessing '0' slots of RTXes.
(ADDR_DIFF_VEC_FLAGS): Use X0ADVFLAGS.
(NOTE_SOURCE_FILE): Use X0STR.
(NOTE_BLOCK_NUMBER, NOTE_EH_HANDLER, LABEL_NUSES,
MEM_ALIAS_SET): Use X0INT.
(NOTE_RANGE_INFO, NOTE_LIVE_INFO, NOTE_BASIC_BLOCK,
JUMP_LABEL, LABEL_REFS, LABEL_NEXTREF, CONTAINING_INSN):
Use X0EXP.
* real.h (CONST_DOUBLE_CHAIN): Use X0EXP.
* rtl.c (copy_rtx, copy_most_rtx): Copy '0' slots with X0WINT.
(rtl_check_failed_bounds, rtl_check_failed_type1,
rtl_check_failed_type2, rtvec_check_failed_bounds): New
functions.
(fancy_abort): Fix comment.
* cse.c (canon_hash): Read CONST_DOUBLE data slots with XWINT.
(cse_insn): Decrement LABEL_NUSES for jump target before
deleting jump insn.
* emit-rtl.c (gen_rtx_CONST_DOUBLE): Use X0EXP for slot 1.
* final.c (alter_subreg): Compute regno before changing x to
REG; set REGNO(x) after changing it.
* flow.c (count_basic_blocks): Use XWINT to inspect EH_REGION
notes containing CONST_INTs.
(delete_eh_regions): Use NOTE_EH_HANDLER.
* function.c (put_reg_into_stack): Make reg a MEM before
initializing it.
(fixup_var_refs_insns): Save REG_NOTES (insn) in case we
delete insn.
(gen_mem_addressof): Make reg a MEM before initializing it.
* integrate.c (copy_rtx_and_substitute): Copy '0' slots with
X0WINT.
* local-alloc.c (update_equiv_regs): Zap REG_NOTES before
deleting an insn, not after.
(block_alloc): Only look at PATTERN(insn) if we have to, and
only if it's format class 'i'.
* loop.c (check_dbra_loop): Check bl->biv->add_val is a
CONST_INT before using its INTVAL.
* print-rtl.c (print_rtx): Use X0STR.
* regmove.c (fixup_match_1): Don't look at PATTERN of
non-class-'i' insn chain elements.
* reload.c (loc_mentioned_in_p): Take address of
in->fld[1].rtx directly.
* reload1.c (reload): Change reg to a MEM before initializing
it.
* varasm.c (mark_constant_pool): Skip CONST_DOUBLES, which
have no names.
* config/i386/i386.md (decrement_and_branch_if_zero): Fix typo.
From-SVN: r29008
1999-08-31 21:39:10 +02:00
|
|
|
|
|
2000-05-06 22:00:03 +02:00
|
|
|
|
#define RTL_CHECK2(RTX, N, C1, C2) __extension__ \
|
2002-04-01 05:18:49 +02:00
|
|
|
|
(*({ rtx const _rtx = (RTX); const int _n = (N); \
|
|
|
|
|
const enum rtx_code _code = GET_CODE (_rtx); \
|
rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and bounds- check RTL accesses if --enable-checking.
1999-08-31 12:20 -0700 Zack Weinberg <zack@bitmover.com>
* rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and
bounds- check RTL accesses if --enable-checking.
(RTVEC_ELT): Bounds check if --enable-checking.
(XWINT, XINT, XSTR, XEXP, XVEC, XMODE, XBITMAP, XTREE,
XBBDEF): Use RTL_CHECK1/RTL_CHECK2 as appropriate.
(XVECEXP, XVECLEN): Define in terms of XVEC, RTVEC_ELT, and
GET_NUM_ELEM.
(X0WINT, X0INT, X0STR, X0EXP, X0VEC, X0MODE, X0BITMAP, X0TREE,
X0BBDEF, X0ADVFLAGS): New macros for accessing '0' slots of RTXes.
(ADDR_DIFF_VEC_FLAGS): Use X0ADVFLAGS.
(NOTE_SOURCE_FILE): Use X0STR.
(NOTE_BLOCK_NUMBER, NOTE_EH_HANDLER, LABEL_NUSES,
MEM_ALIAS_SET): Use X0INT.
(NOTE_RANGE_INFO, NOTE_LIVE_INFO, NOTE_BASIC_BLOCK,
JUMP_LABEL, LABEL_REFS, LABEL_NEXTREF, CONTAINING_INSN):
Use X0EXP.
* real.h (CONST_DOUBLE_CHAIN): Use X0EXP.
* rtl.c (copy_rtx, copy_most_rtx): Copy '0' slots with X0WINT.
(rtl_check_failed_bounds, rtl_check_failed_type1,
rtl_check_failed_type2, rtvec_check_failed_bounds): New
functions.
(fancy_abort): Fix comment.
* cse.c (canon_hash): Read CONST_DOUBLE data slots with XWINT.
(cse_insn): Decrement LABEL_NUSES for jump target before
deleting jump insn.
* emit-rtl.c (gen_rtx_CONST_DOUBLE): Use X0EXP for slot 1.
* final.c (alter_subreg): Compute regno before changing x to
REG; set REGNO(x) after changing it.
* flow.c (count_basic_blocks): Use XWINT to inspect EH_REGION
notes containing CONST_INTs.
(delete_eh_regions): Use NOTE_EH_HANDLER.
* function.c (put_reg_into_stack): Make reg a MEM before
initializing it.
(fixup_var_refs_insns): Save REG_NOTES (insn) in case we
delete insn.
(gen_mem_addressof): Make reg a MEM before initializing it.
* integrate.c (copy_rtx_and_substitute): Copy '0' slots with
X0WINT.
* local-alloc.c (update_equiv_regs): Zap REG_NOTES before
deleting an insn, not after.
(block_alloc): Only look at PATTERN(insn) if we have to, and
only if it's format class 'i'.
* loop.c (check_dbra_loop): Check bl->biv->add_val is a
CONST_INT before using its INTVAL.
* print-rtl.c (print_rtx): Use X0STR.
* regmove.c (fixup_match_1): Don't look at PATTERN of
non-class-'i' insn chain elements.
* reload.c (loc_mentioned_in_p): Take address of
in->fld[1].rtx directly.
* reload1.c (reload): Change reg to a MEM before initializing
it.
* varasm.c (mark_constant_pool): Skip CONST_DOUBLES, which
have no names.
* config/i386/i386.md (decrement_and_branch_if_zero): Fix typo.
From-SVN: r29008
1999-08-31 21:39:10 +02:00
|
|
|
|
if (_n < 0 || _n >= GET_RTX_LENGTH (_code)) \
|
2002-01-03 06:11:05 +01:00
|
|
|
|
rtl_check_failed_bounds (_rtx, _n, __FILE__, __LINE__, \
|
|
|
|
|
__FUNCTION__); \
|
rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and bounds- check RTL accesses if --enable-checking.
1999-08-31 12:20 -0700 Zack Weinberg <zack@bitmover.com>
* rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and
bounds- check RTL accesses if --enable-checking.
(RTVEC_ELT): Bounds check if --enable-checking.
(XWINT, XINT, XSTR, XEXP, XVEC, XMODE, XBITMAP, XTREE,
XBBDEF): Use RTL_CHECK1/RTL_CHECK2 as appropriate.
(XVECEXP, XVECLEN): Define in terms of XVEC, RTVEC_ELT, and
GET_NUM_ELEM.
(X0WINT, X0INT, X0STR, X0EXP, X0VEC, X0MODE, X0BITMAP, X0TREE,
X0BBDEF, X0ADVFLAGS): New macros for accessing '0' slots of RTXes.
(ADDR_DIFF_VEC_FLAGS): Use X0ADVFLAGS.
(NOTE_SOURCE_FILE): Use X0STR.
(NOTE_BLOCK_NUMBER, NOTE_EH_HANDLER, LABEL_NUSES,
MEM_ALIAS_SET): Use X0INT.
(NOTE_RANGE_INFO, NOTE_LIVE_INFO, NOTE_BASIC_BLOCK,
JUMP_LABEL, LABEL_REFS, LABEL_NEXTREF, CONTAINING_INSN):
Use X0EXP.
* real.h (CONST_DOUBLE_CHAIN): Use X0EXP.
* rtl.c (copy_rtx, copy_most_rtx): Copy '0' slots with X0WINT.
(rtl_check_failed_bounds, rtl_check_failed_type1,
rtl_check_failed_type2, rtvec_check_failed_bounds): New
functions.
(fancy_abort): Fix comment.
* cse.c (canon_hash): Read CONST_DOUBLE data slots with XWINT.
(cse_insn): Decrement LABEL_NUSES for jump target before
deleting jump insn.
* emit-rtl.c (gen_rtx_CONST_DOUBLE): Use X0EXP for slot 1.
* final.c (alter_subreg): Compute regno before changing x to
REG; set REGNO(x) after changing it.
* flow.c (count_basic_blocks): Use XWINT to inspect EH_REGION
notes containing CONST_INTs.
(delete_eh_regions): Use NOTE_EH_HANDLER.
* function.c (put_reg_into_stack): Make reg a MEM before
initializing it.
(fixup_var_refs_insns): Save REG_NOTES (insn) in case we
delete insn.
(gen_mem_addressof): Make reg a MEM before initializing it.
* integrate.c (copy_rtx_and_substitute): Copy '0' slots with
X0WINT.
* local-alloc.c (update_equiv_regs): Zap REG_NOTES before
deleting an insn, not after.
(block_alloc): Only look at PATTERN(insn) if we have to, and
only if it's format class 'i'.
* loop.c (check_dbra_loop): Check bl->biv->add_val is a
CONST_INT before using its INTVAL.
* print-rtl.c (print_rtx): Use X0STR.
* regmove.c (fixup_match_1): Don't look at PATTERN of
non-class-'i' insn chain elements.
* reload.c (loc_mentioned_in_p): Take address of
in->fld[1].rtx directly.
* reload1.c (reload): Change reg to a MEM before initializing
it.
* varasm.c (mark_constant_pool): Skip CONST_DOUBLES, which
have no names.
* config/i386/i386.md (decrement_and_branch_if_zero): Fix typo.
From-SVN: r29008
1999-08-31 21:39:10 +02:00
|
|
|
|
if (GET_RTX_FORMAT(_code)[_n] != C1 \
|
|
|
|
|
&& GET_RTX_FORMAT(_code)[_n] != C2) \
|
|
|
|
|
rtl_check_failed_type2 (_rtx, _n, C1, C2, __FILE__, __LINE__, \
|
2000-07-21 09:10:36 +02:00
|
|
|
|
__FUNCTION__); \
|
2003-10-18 20:45:16 +02:00
|
|
|
|
&_rtx->u.fld[_n]; }))
|
rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and bounds- check RTL accesses if --enable-checking.
1999-08-31 12:20 -0700 Zack Weinberg <zack@bitmover.com>
* rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and
bounds- check RTL accesses if --enable-checking.
(RTVEC_ELT): Bounds check if --enable-checking.
(XWINT, XINT, XSTR, XEXP, XVEC, XMODE, XBITMAP, XTREE,
XBBDEF): Use RTL_CHECK1/RTL_CHECK2 as appropriate.
(XVECEXP, XVECLEN): Define in terms of XVEC, RTVEC_ELT, and
GET_NUM_ELEM.
(X0WINT, X0INT, X0STR, X0EXP, X0VEC, X0MODE, X0BITMAP, X0TREE,
X0BBDEF, X0ADVFLAGS): New macros for accessing '0' slots of RTXes.
(ADDR_DIFF_VEC_FLAGS): Use X0ADVFLAGS.
(NOTE_SOURCE_FILE): Use X0STR.
(NOTE_BLOCK_NUMBER, NOTE_EH_HANDLER, LABEL_NUSES,
MEM_ALIAS_SET): Use X0INT.
(NOTE_RANGE_INFO, NOTE_LIVE_INFO, NOTE_BASIC_BLOCK,
JUMP_LABEL, LABEL_REFS, LABEL_NEXTREF, CONTAINING_INSN):
Use X0EXP.
* real.h (CONST_DOUBLE_CHAIN): Use X0EXP.
* rtl.c (copy_rtx, copy_most_rtx): Copy '0' slots with X0WINT.
(rtl_check_failed_bounds, rtl_check_failed_type1,
rtl_check_failed_type2, rtvec_check_failed_bounds): New
functions.
(fancy_abort): Fix comment.
* cse.c (canon_hash): Read CONST_DOUBLE data slots with XWINT.
(cse_insn): Decrement LABEL_NUSES for jump target before
deleting jump insn.
* emit-rtl.c (gen_rtx_CONST_DOUBLE): Use X0EXP for slot 1.
* final.c (alter_subreg): Compute regno before changing x to
REG; set REGNO(x) after changing it.
* flow.c (count_basic_blocks): Use XWINT to inspect EH_REGION
notes containing CONST_INTs.
(delete_eh_regions): Use NOTE_EH_HANDLER.
* function.c (put_reg_into_stack): Make reg a MEM before
initializing it.
(fixup_var_refs_insns): Save REG_NOTES (insn) in case we
delete insn.
(gen_mem_addressof): Make reg a MEM before initializing it.
* integrate.c (copy_rtx_and_substitute): Copy '0' slots with
X0WINT.
* local-alloc.c (update_equiv_regs): Zap REG_NOTES before
deleting an insn, not after.
(block_alloc): Only look at PATTERN(insn) if we have to, and
only if it's format class 'i'.
* loop.c (check_dbra_loop): Check bl->biv->add_val is a
CONST_INT before using its INTVAL.
* print-rtl.c (print_rtx): Use X0STR.
* regmove.c (fixup_match_1): Don't look at PATTERN of
non-class-'i' insn chain elements.
* reload.c (loc_mentioned_in_p): Take address of
in->fld[1].rtx directly.
* reload1.c (reload): Change reg to a MEM before initializing
it.
* varasm.c (mark_constant_pool): Skip CONST_DOUBLES, which
have no names.
* config/i386/i386.md (decrement_and_branch_if_zero): Fix typo.
From-SVN: r29008
1999-08-31 21:39:10 +02:00
|
|
|
|
|
2000-05-06 22:00:03 +02:00
|
|
|
|
#define RTL_CHECKC1(RTX, N, C) __extension__ \
|
2002-04-01 05:18:49 +02:00
|
|
|
|
(*({ rtx const _rtx = (RTX); const int _n = (N); \
|
2002-01-03 06:11:05 +01:00
|
|
|
|
if (GET_CODE (_rtx) != (C)) \
|
|
|
|
|
rtl_check_failed_code1 (_rtx, (C), __FILE__, __LINE__, \
|
|
|
|
|
__FUNCTION__); \
|
2003-10-18 20:45:16 +02:00
|
|
|
|
&_rtx->u.fld[_n]; }))
|
flow.c (propagate_block): Use XEXP not SET_DEST for a USE.
* flow.c (propagate_block): Use XEXP not SET_DEST for a USE.
(recompute_reg_usage): Likewise.
* rtlanal.c (find_regno_fusage): Likewise.
* rtl.c (rtl_check_failed_code1): New function.
(rtl_check_failed_code2): New.
* rtl.h (RTL_CHECK1, RTL_CHECK2, RTVEC_ELT): Parenthesize args.
(RTL_CHECKC1, RTL_CHECKC2): New.
(XC*): New accessor macros.
(NOTE_*, LABEL_NAME, LABEL_NUSES, ADDRESSOF_REGNO): Use them.
(ADDRESSOF_DECL, JUMP_LABEL, LABEL_REFS, LABEL_NEXTREF): Likewise.
(CONTAINING_INSN, REGNO, INTVAL, SUBREG_REG, SUBREG_WORD): Likewise.
(ASM_OPERANDS_*, MEM_ALIAS_SET, SET_SRC, SET_DEST): Likewise.
(TRAP_*, RANGE_INFO_*): Likewise.
From-SVN: r29089
1999-09-04 00:23:11 +02:00
|
|
|
|
|
2000-05-06 22:00:03 +02:00
|
|
|
|
#define RTL_CHECKC2(RTX, N, C1, C2) __extension__ \
|
2002-04-01 05:18:49 +02:00
|
|
|
|
(*({ rtx const _rtx = (RTX); const int _n = (N); \
|
|
|
|
|
const enum rtx_code _code = GET_CODE (_rtx); \
|
2002-01-03 06:11:05 +01:00
|
|
|
|
if (_code != (C1) && _code != (C2)) \
|
|
|
|
|
rtl_check_failed_code2 (_rtx, (C1), (C2), __FILE__, __LINE__, \
|
|
|
|
|
__FUNCTION__); \
|
2003-10-18 20:45:16 +02:00
|
|
|
|
&_rtx->u.fld[_n]; }))
|
flow.c (propagate_block): Use XEXP not SET_DEST for a USE.
* flow.c (propagate_block): Use XEXP not SET_DEST for a USE.
(recompute_reg_usage): Likewise.
* rtlanal.c (find_regno_fusage): Likewise.
* rtl.c (rtl_check_failed_code1): New function.
(rtl_check_failed_code2): New.
* rtl.h (RTL_CHECK1, RTL_CHECK2, RTVEC_ELT): Parenthesize args.
(RTL_CHECKC1, RTL_CHECKC2): New.
(XC*): New accessor macros.
(NOTE_*, LABEL_NAME, LABEL_NUSES, ADDRESSOF_REGNO): Use them.
(ADDRESSOF_DECL, JUMP_LABEL, LABEL_REFS, LABEL_NEXTREF): Likewise.
(CONTAINING_INSN, REGNO, INTVAL, SUBREG_REG, SUBREG_WORD): Likewise.
(ASM_OPERANDS_*, MEM_ALIAS_SET, SET_SRC, SET_DEST): Likewise.
(TRAP_*, RANGE_INFO_*): Likewise.
From-SVN: r29089
1999-09-04 00:23:11 +02:00
|
|
|
|
|
2000-05-06 22:00:03 +02:00
|
|
|
|
#define RTVEC_ELT(RTVEC, I) __extension__ \
|
2002-04-01 05:18:49 +02:00
|
|
|
|
(*({ rtvec const _rtvec = (RTVEC); const int _i = (I); \
|
rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and bounds- check RTL accesses if --enable-checking.
1999-08-31 12:20 -0700 Zack Weinberg <zack@bitmover.com>
* rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and
bounds- check RTL accesses if --enable-checking.
(RTVEC_ELT): Bounds check if --enable-checking.
(XWINT, XINT, XSTR, XEXP, XVEC, XMODE, XBITMAP, XTREE,
XBBDEF): Use RTL_CHECK1/RTL_CHECK2 as appropriate.
(XVECEXP, XVECLEN): Define in terms of XVEC, RTVEC_ELT, and
GET_NUM_ELEM.
(X0WINT, X0INT, X0STR, X0EXP, X0VEC, X0MODE, X0BITMAP, X0TREE,
X0BBDEF, X0ADVFLAGS): New macros for accessing '0' slots of RTXes.
(ADDR_DIFF_VEC_FLAGS): Use X0ADVFLAGS.
(NOTE_SOURCE_FILE): Use X0STR.
(NOTE_BLOCK_NUMBER, NOTE_EH_HANDLER, LABEL_NUSES,
MEM_ALIAS_SET): Use X0INT.
(NOTE_RANGE_INFO, NOTE_LIVE_INFO, NOTE_BASIC_BLOCK,
JUMP_LABEL, LABEL_REFS, LABEL_NEXTREF, CONTAINING_INSN):
Use X0EXP.
* real.h (CONST_DOUBLE_CHAIN): Use X0EXP.
* rtl.c (copy_rtx, copy_most_rtx): Copy '0' slots with X0WINT.
(rtl_check_failed_bounds, rtl_check_failed_type1,
rtl_check_failed_type2, rtvec_check_failed_bounds): New
functions.
(fancy_abort): Fix comment.
* cse.c (canon_hash): Read CONST_DOUBLE data slots with XWINT.
(cse_insn): Decrement LABEL_NUSES for jump target before
deleting jump insn.
* emit-rtl.c (gen_rtx_CONST_DOUBLE): Use X0EXP for slot 1.
* final.c (alter_subreg): Compute regno before changing x to
REG; set REGNO(x) after changing it.
* flow.c (count_basic_blocks): Use XWINT to inspect EH_REGION
notes containing CONST_INTs.
(delete_eh_regions): Use NOTE_EH_HANDLER.
* function.c (put_reg_into_stack): Make reg a MEM before
initializing it.
(fixup_var_refs_insns): Save REG_NOTES (insn) in case we
delete insn.
(gen_mem_addressof): Make reg a MEM before initializing it.
* integrate.c (copy_rtx_and_substitute): Copy '0' slots with
X0WINT.
* local-alloc.c (update_equiv_regs): Zap REG_NOTES before
deleting an insn, not after.
(block_alloc): Only look at PATTERN(insn) if we have to, and
only if it's format class 'i'.
* loop.c (check_dbra_loop): Check bl->biv->add_val is a
CONST_INT before using its INTVAL.
* print-rtl.c (print_rtx): Use X0STR.
* regmove.c (fixup_match_1): Don't look at PATTERN of
non-class-'i' insn chain elements.
* reload.c (loc_mentioned_in_p): Take address of
in->fld[1].rtx directly.
* reload1.c (reload): Change reg to a MEM before initializing
it.
* varasm.c (mark_constant_pool): Skip CONST_DOUBLES, which
have no names.
* config/i386/i386.md (decrement_and_branch_if_zero): Fix typo.
From-SVN: r29008
1999-08-31 21:39:10 +02:00
|
|
|
|
if (_i < 0 || _i >= GET_NUM_ELEM (_rtvec)) \
|
|
|
|
|
rtvec_check_failed_bounds (_rtvec, _i, __FILE__, __LINE__, \
|
2000-07-21 09:10:36 +02:00
|
|
|
|
__FUNCTION__); \
|
rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and bounds- check RTL accesses if --enable-checking.
1999-08-31 12:20 -0700 Zack Weinberg <zack@bitmover.com>
* rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and
bounds- check RTL accesses if --enable-checking.
(RTVEC_ELT): Bounds check if --enable-checking.
(XWINT, XINT, XSTR, XEXP, XVEC, XMODE, XBITMAP, XTREE,
XBBDEF): Use RTL_CHECK1/RTL_CHECK2 as appropriate.
(XVECEXP, XVECLEN): Define in terms of XVEC, RTVEC_ELT, and
GET_NUM_ELEM.
(X0WINT, X0INT, X0STR, X0EXP, X0VEC, X0MODE, X0BITMAP, X0TREE,
X0BBDEF, X0ADVFLAGS): New macros for accessing '0' slots of RTXes.
(ADDR_DIFF_VEC_FLAGS): Use X0ADVFLAGS.
(NOTE_SOURCE_FILE): Use X0STR.
(NOTE_BLOCK_NUMBER, NOTE_EH_HANDLER, LABEL_NUSES,
MEM_ALIAS_SET): Use X0INT.
(NOTE_RANGE_INFO, NOTE_LIVE_INFO, NOTE_BASIC_BLOCK,
JUMP_LABEL, LABEL_REFS, LABEL_NEXTREF, CONTAINING_INSN):
Use X0EXP.
* real.h (CONST_DOUBLE_CHAIN): Use X0EXP.
* rtl.c (copy_rtx, copy_most_rtx): Copy '0' slots with X0WINT.
(rtl_check_failed_bounds, rtl_check_failed_type1,
rtl_check_failed_type2, rtvec_check_failed_bounds): New
functions.
(fancy_abort): Fix comment.
* cse.c (canon_hash): Read CONST_DOUBLE data slots with XWINT.
(cse_insn): Decrement LABEL_NUSES for jump target before
deleting jump insn.
* emit-rtl.c (gen_rtx_CONST_DOUBLE): Use X0EXP for slot 1.
* final.c (alter_subreg): Compute regno before changing x to
REG; set REGNO(x) after changing it.
* flow.c (count_basic_blocks): Use XWINT to inspect EH_REGION
notes containing CONST_INTs.
(delete_eh_regions): Use NOTE_EH_HANDLER.
* function.c (put_reg_into_stack): Make reg a MEM before
initializing it.
(fixup_var_refs_insns): Save REG_NOTES (insn) in case we
delete insn.
(gen_mem_addressof): Make reg a MEM before initializing it.
* integrate.c (copy_rtx_and_substitute): Copy '0' slots with
X0WINT.
* local-alloc.c (update_equiv_regs): Zap REG_NOTES before
deleting an insn, not after.
(block_alloc): Only look at PATTERN(insn) if we have to, and
only if it's format class 'i'.
* loop.c (check_dbra_loop): Check bl->biv->add_val is a
CONST_INT before using its INTVAL.
* print-rtl.c (print_rtx): Use X0STR.
* regmove.c (fixup_match_1): Don't look at PATTERN of
non-class-'i' insn chain elements.
* reload.c (loc_mentioned_in_p): Take address of
in->fld[1].rtx directly.
* reload1.c (reload): Change reg to a MEM before initializing
it.
* varasm.c (mark_constant_pool): Skip CONST_DOUBLES, which
have no names.
* config/i386/i386.md (decrement_and_branch_if_zero): Fix typo.
From-SVN: r29008
1999-08-31 21:39:10 +02:00
|
|
|
|
&_rtvec->elem[_i]; }))
|
|
|
|
|
|
2003-10-18 20:45:16 +02:00
|
|
|
|
#define XWINT(RTX, N) __extension__ \
|
|
|
|
|
(*({ rtx const _rtx = (RTX); const int _n = (N); \
|
|
|
|
|
const enum rtx_code _code = GET_CODE (_rtx); \
|
|
|
|
|
if (_n < 0 || _n >= GET_RTX_LENGTH (_code)) \
|
|
|
|
|
rtl_check_failed_bounds (_rtx, _n, __FILE__, __LINE__, \
|
|
|
|
|
__FUNCTION__); \
|
|
|
|
|
if (GET_RTX_FORMAT(_code)[_n] != 'w') \
|
|
|
|
|
rtl_check_failed_type1 (_rtx, _n, 'w', __FILE__, __LINE__, \
|
|
|
|
|
__FUNCTION__); \
|
|
|
|
|
&_rtx->u.hwint[_n]; }))
|
|
|
|
|
|
|
|
|
|
#define XCWINT(RTX, N, C) __extension__ \
|
|
|
|
|
(*({ rtx const _rtx = (RTX); \
|
|
|
|
|
if (GET_CODE (_rtx) != (C)) \
|
|
|
|
|
rtl_check_failed_code1 (_rtx, (C), __FILE__, __LINE__, \
|
|
|
|
|
__FUNCTION__); \
|
|
|
|
|
&_rtx->u.hwint[N]; }))
|
|
|
|
|
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void rtl_check_failed_bounds (rtx, int, const char *, int,
|
|
|
|
|
const char *)
|
rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and bounds- check RTL accesses if --enable-checking.
1999-08-31 12:20 -0700 Zack Weinberg <zack@bitmover.com>
* rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and
bounds- check RTL accesses if --enable-checking.
(RTVEC_ELT): Bounds check if --enable-checking.
(XWINT, XINT, XSTR, XEXP, XVEC, XMODE, XBITMAP, XTREE,
XBBDEF): Use RTL_CHECK1/RTL_CHECK2 as appropriate.
(XVECEXP, XVECLEN): Define in terms of XVEC, RTVEC_ELT, and
GET_NUM_ELEM.
(X0WINT, X0INT, X0STR, X0EXP, X0VEC, X0MODE, X0BITMAP, X0TREE,
X0BBDEF, X0ADVFLAGS): New macros for accessing '0' slots of RTXes.
(ADDR_DIFF_VEC_FLAGS): Use X0ADVFLAGS.
(NOTE_SOURCE_FILE): Use X0STR.
(NOTE_BLOCK_NUMBER, NOTE_EH_HANDLER, LABEL_NUSES,
MEM_ALIAS_SET): Use X0INT.
(NOTE_RANGE_INFO, NOTE_LIVE_INFO, NOTE_BASIC_BLOCK,
JUMP_LABEL, LABEL_REFS, LABEL_NEXTREF, CONTAINING_INSN):
Use X0EXP.
* real.h (CONST_DOUBLE_CHAIN): Use X0EXP.
* rtl.c (copy_rtx, copy_most_rtx): Copy '0' slots with X0WINT.
(rtl_check_failed_bounds, rtl_check_failed_type1,
rtl_check_failed_type2, rtvec_check_failed_bounds): New
functions.
(fancy_abort): Fix comment.
* cse.c (canon_hash): Read CONST_DOUBLE data slots with XWINT.
(cse_insn): Decrement LABEL_NUSES for jump target before
deleting jump insn.
* emit-rtl.c (gen_rtx_CONST_DOUBLE): Use X0EXP for slot 1.
* final.c (alter_subreg): Compute regno before changing x to
REG; set REGNO(x) after changing it.
* flow.c (count_basic_blocks): Use XWINT to inspect EH_REGION
notes containing CONST_INTs.
(delete_eh_regions): Use NOTE_EH_HANDLER.
* function.c (put_reg_into_stack): Make reg a MEM before
initializing it.
(fixup_var_refs_insns): Save REG_NOTES (insn) in case we
delete insn.
(gen_mem_addressof): Make reg a MEM before initializing it.
* integrate.c (copy_rtx_and_substitute): Copy '0' slots with
X0WINT.
* local-alloc.c (update_equiv_regs): Zap REG_NOTES before
deleting an insn, not after.
(block_alloc): Only look at PATTERN(insn) if we have to, and
only if it's format class 'i'.
* loop.c (check_dbra_loop): Check bl->biv->add_val is a
CONST_INT before using its INTVAL.
* print-rtl.c (print_rtx): Use X0STR.
* regmove.c (fixup_match_1): Don't look at PATTERN of
non-class-'i' insn chain elements.
* reload.c (loc_mentioned_in_p): Take address of
in->fld[1].rtx directly.
* reload1.c (reload): Change reg to a MEM before initializing
it.
* varasm.c (mark_constant_pool): Skip CONST_DOUBLES, which
have no names.
* config/i386/i386.md (decrement_and_branch_if_zero): Fix typo.
From-SVN: r29008
1999-08-31 21:39:10 +02:00
|
|
|
|
ATTRIBUTE_NORETURN;
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void rtl_check_failed_type1 (rtx, int, int, const char *, int,
|
|
|
|
|
const char *)
|
rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and bounds- check RTL accesses if --enable-checking.
1999-08-31 12:20 -0700 Zack Weinberg <zack@bitmover.com>
* rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and
bounds- check RTL accesses if --enable-checking.
(RTVEC_ELT): Bounds check if --enable-checking.
(XWINT, XINT, XSTR, XEXP, XVEC, XMODE, XBITMAP, XTREE,
XBBDEF): Use RTL_CHECK1/RTL_CHECK2 as appropriate.
(XVECEXP, XVECLEN): Define in terms of XVEC, RTVEC_ELT, and
GET_NUM_ELEM.
(X0WINT, X0INT, X0STR, X0EXP, X0VEC, X0MODE, X0BITMAP, X0TREE,
X0BBDEF, X0ADVFLAGS): New macros for accessing '0' slots of RTXes.
(ADDR_DIFF_VEC_FLAGS): Use X0ADVFLAGS.
(NOTE_SOURCE_FILE): Use X0STR.
(NOTE_BLOCK_NUMBER, NOTE_EH_HANDLER, LABEL_NUSES,
MEM_ALIAS_SET): Use X0INT.
(NOTE_RANGE_INFO, NOTE_LIVE_INFO, NOTE_BASIC_BLOCK,
JUMP_LABEL, LABEL_REFS, LABEL_NEXTREF, CONTAINING_INSN):
Use X0EXP.
* real.h (CONST_DOUBLE_CHAIN): Use X0EXP.
* rtl.c (copy_rtx, copy_most_rtx): Copy '0' slots with X0WINT.
(rtl_check_failed_bounds, rtl_check_failed_type1,
rtl_check_failed_type2, rtvec_check_failed_bounds): New
functions.
(fancy_abort): Fix comment.
* cse.c (canon_hash): Read CONST_DOUBLE data slots with XWINT.
(cse_insn): Decrement LABEL_NUSES for jump target before
deleting jump insn.
* emit-rtl.c (gen_rtx_CONST_DOUBLE): Use X0EXP for slot 1.
* final.c (alter_subreg): Compute regno before changing x to
REG; set REGNO(x) after changing it.
* flow.c (count_basic_blocks): Use XWINT to inspect EH_REGION
notes containing CONST_INTs.
(delete_eh_regions): Use NOTE_EH_HANDLER.
* function.c (put_reg_into_stack): Make reg a MEM before
initializing it.
(fixup_var_refs_insns): Save REG_NOTES (insn) in case we
delete insn.
(gen_mem_addressof): Make reg a MEM before initializing it.
* integrate.c (copy_rtx_and_substitute): Copy '0' slots with
X0WINT.
* local-alloc.c (update_equiv_regs): Zap REG_NOTES before
deleting an insn, not after.
(block_alloc): Only look at PATTERN(insn) if we have to, and
only if it's format class 'i'.
* loop.c (check_dbra_loop): Check bl->biv->add_val is a
CONST_INT before using its INTVAL.
* print-rtl.c (print_rtx): Use X0STR.
* regmove.c (fixup_match_1): Don't look at PATTERN of
non-class-'i' insn chain elements.
* reload.c (loc_mentioned_in_p): Take address of
in->fld[1].rtx directly.
* reload1.c (reload): Change reg to a MEM before initializing
it.
* varasm.c (mark_constant_pool): Skip CONST_DOUBLES, which
have no names.
* config/i386/i386.md (decrement_and_branch_if_zero): Fix typo.
From-SVN: r29008
1999-08-31 21:39:10 +02:00
|
|
|
|
ATTRIBUTE_NORETURN;
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void rtl_check_failed_type2 (rtx, int, int, int, const char *,
|
|
|
|
|
int, const char *)
|
rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and bounds- check RTL accesses if --enable-checking.
1999-08-31 12:20 -0700 Zack Weinberg <zack@bitmover.com>
* rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and
bounds- check RTL accesses if --enable-checking.
(RTVEC_ELT): Bounds check if --enable-checking.
(XWINT, XINT, XSTR, XEXP, XVEC, XMODE, XBITMAP, XTREE,
XBBDEF): Use RTL_CHECK1/RTL_CHECK2 as appropriate.
(XVECEXP, XVECLEN): Define in terms of XVEC, RTVEC_ELT, and
GET_NUM_ELEM.
(X0WINT, X0INT, X0STR, X0EXP, X0VEC, X0MODE, X0BITMAP, X0TREE,
X0BBDEF, X0ADVFLAGS): New macros for accessing '0' slots of RTXes.
(ADDR_DIFF_VEC_FLAGS): Use X0ADVFLAGS.
(NOTE_SOURCE_FILE): Use X0STR.
(NOTE_BLOCK_NUMBER, NOTE_EH_HANDLER, LABEL_NUSES,
MEM_ALIAS_SET): Use X0INT.
(NOTE_RANGE_INFO, NOTE_LIVE_INFO, NOTE_BASIC_BLOCK,
JUMP_LABEL, LABEL_REFS, LABEL_NEXTREF, CONTAINING_INSN):
Use X0EXP.
* real.h (CONST_DOUBLE_CHAIN): Use X0EXP.
* rtl.c (copy_rtx, copy_most_rtx): Copy '0' slots with X0WINT.
(rtl_check_failed_bounds, rtl_check_failed_type1,
rtl_check_failed_type2, rtvec_check_failed_bounds): New
functions.
(fancy_abort): Fix comment.
* cse.c (canon_hash): Read CONST_DOUBLE data slots with XWINT.
(cse_insn): Decrement LABEL_NUSES for jump target before
deleting jump insn.
* emit-rtl.c (gen_rtx_CONST_DOUBLE): Use X0EXP for slot 1.
* final.c (alter_subreg): Compute regno before changing x to
REG; set REGNO(x) after changing it.
* flow.c (count_basic_blocks): Use XWINT to inspect EH_REGION
notes containing CONST_INTs.
(delete_eh_regions): Use NOTE_EH_HANDLER.
* function.c (put_reg_into_stack): Make reg a MEM before
initializing it.
(fixup_var_refs_insns): Save REG_NOTES (insn) in case we
delete insn.
(gen_mem_addressof): Make reg a MEM before initializing it.
* integrate.c (copy_rtx_and_substitute): Copy '0' slots with
X0WINT.
* local-alloc.c (update_equiv_regs): Zap REG_NOTES before
deleting an insn, not after.
(block_alloc): Only look at PATTERN(insn) if we have to, and
only if it's format class 'i'.
* loop.c (check_dbra_loop): Check bl->biv->add_val is a
CONST_INT before using its INTVAL.
* print-rtl.c (print_rtx): Use X0STR.
* regmove.c (fixup_match_1): Don't look at PATTERN of
non-class-'i' insn chain elements.
* reload.c (loc_mentioned_in_p): Take address of
in->fld[1].rtx directly.
* reload1.c (reload): Change reg to a MEM before initializing
it.
* varasm.c (mark_constant_pool): Skip CONST_DOUBLES, which
have no names.
* config/i386/i386.md (decrement_and_branch_if_zero): Fix typo.
From-SVN: r29008
1999-08-31 21:39:10 +02:00
|
|
|
|
ATTRIBUTE_NORETURN;
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void rtl_check_failed_code1 (rtx, enum rtx_code, const char *,
|
|
|
|
|
int, const char *)
|
flow.c (propagate_block): Use XEXP not SET_DEST for a USE.
* flow.c (propagate_block): Use XEXP not SET_DEST for a USE.
(recompute_reg_usage): Likewise.
* rtlanal.c (find_regno_fusage): Likewise.
* rtl.c (rtl_check_failed_code1): New function.
(rtl_check_failed_code2): New.
* rtl.h (RTL_CHECK1, RTL_CHECK2, RTVEC_ELT): Parenthesize args.
(RTL_CHECKC1, RTL_CHECKC2): New.
(XC*): New accessor macros.
(NOTE_*, LABEL_NAME, LABEL_NUSES, ADDRESSOF_REGNO): Use them.
(ADDRESSOF_DECL, JUMP_LABEL, LABEL_REFS, LABEL_NEXTREF): Likewise.
(CONTAINING_INSN, REGNO, INTVAL, SUBREG_REG, SUBREG_WORD): Likewise.
(ASM_OPERANDS_*, MEM_ALIAS_SET, SET_SRC, SET_DEST): Likewise.
(TRAP_*, RANGE_INFO_*): Likewise.
From-SVN: r29089
1999-09-04 00:23:11 +02:00
|
|
|
|
ATTRIBUTE_NORETURN;
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void rtl_check_failed_code2 (rtx, enum rtx_code, enum rtx_code,
|
|
|
|
|
const char *, int, const char *)
|
flow.c (propagate_block): Use XEXP not SET_DEST for a USE.
* flow.c (propagate_block): Use XEXP not SET_DEST for a USE.
(recompute_reg_usage): Likewise.
* rtlanal.c (find_regno_fusage): Likewise.
* rtl.c (rtl_check_failed_code1): New function.
(rtl_check_failed_code2): New.
* rtl.h (RTL_CHECK1, RTL_CHECK2, RTVEC_ELT): Parenthesize args.
(RTL_CHECKC1, RTL_CHECKC2): New.
(XC*): New accessor macros.
(NOTE_*, LABEL_NAME, LABEL_NUSES, ADDRESSOF_REGNO): Use them.
(ADDRESSOF_DECL, JUMP_LABEL, LABEL_REFS, LABEL_NEXTREF): Likewise.
(CONTAINING_INSN, REGNO, INTVAL, SUBREG_REG, SUBREG_WORD): Likewise.
(ASM_OPERANDS_*, MEM_ALIAS_SET, SET_SRC, SET_DEST): Likewise.
(TRAP_*, RANGE_INFO_*): Likewise.
From-SVN: r29089
1999-09-04 00:23:11 +02:00
|
|
|
|
ATTRIBUTE_NORETURN;
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void rtvec_check_failed_bounds (rtvec, int, const char *, int,
|
|
|
|
|
const char *)
|
rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and bounds- check RTL accesses if --enable-checking.
1999-08-31 12:20 -0700 Zack Weinberg <zack@bitmover.com>
* rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and
bounds- check RTL accesses if --enable-checking.
(RTVEC_ELT): Bounds check if --enable-checking.
(XWINT, XINT, XSTR, XEXP, XVEC, XMODE, XBITMAP, XTREE,
XBBDEF): Use RTL_CHECK1/RTL_CHECK2 as appropriate.
(XVECEXP, XVECLEN): Define in terms of XVEC, RTVEC_ELT, and
GET_NUM_ELEM.
(X0WINT, X0INT, X0STR, X0EXP, X0VEC, X0MODE, X0BITMAP, X0TREE,
X0BBDEF, X0ADVFLAGS): New macros for accessing '0' slots of RTXes.
(ADDR_DIFF_VEC_FLAGS): Use X0ADVFLAGS.
(NOTE_SOURCE_FILE): Use X0STR.
(NOTE_BLOCK_NUMBER, NOTE_EH_HANDLER, LABEL_NUSES,
MEM_ALIAS_SET): Use X0INT.
(NOTE_RANGE_INFO, NOTE_LIVE_INFO, NOTE_BASIC_BLOCK,
JUMP_LABEL, LABEL_REFS, LABEL_NEXTREF, CONTAINING_INSN):
Use X0EXP.
* real.h (CONST_DOUBLE_CHAIN): Use X0EXP.
* rtl.c (copy_rtx, copy_most_rtx): Copy '0' slots with X0WINT.
(rtl_check_failed_bounds, rtl_check_failed_type1,
rtl_check_failed_type2, rtvec_check_failed_bounds): New
functions.
(fancy_abort): Fix comment.
* cse.c (canon_hash): Read CONST_DOUBLE data slots with XWINT.
(cse_insn): Decrement LABEL_NUSES for jump target before
deleting jump insn.
* emit-rtl.c (gen_rtx_CONST_DOUBLE): Use X0EXP for slot 1.
* final.c (alter_subreg): Compute regno before changing x to
REG; set REGNO(x) after changing it.
* flow.c (count_basic_blocks): Use XWINT to inspect EH_REGION
notes containing CONST_INTs.
(delete_eh_regions): Use NOTE_EH_HANDLER.
* function.c (put_reg_into_stack): Make reg a MEM before
initializing it.
(fixup_var_refs_insns): Save REG_NOTES (insn) in case we
delete insn.
(gen_mem_addressof): Make reg a MEM before initializing it.
* integrate.c (copy_rtx_and_substitute): Copy '0' slots with
X0WINT.
* local-alloc.c (update_equiv_regs): Zap REG_NOTES before
deleting an insn, not after.
(block_alloc): Only look at PATTERN(insn) if we have to, and
only if it's format class 'i'.
* loop.c (check_dbra_loop): Check bl->biv->add_val is a
CONST_INT before using its INTVAL.
* print-rtl.c (print_rtx): Use X0STR.
* regmove.c (fixup_match_1): Don't look at PATTERN of
non-class-'i' insn chain elements.
* reload.c (loc_mentioned_in_p): Take address of
in->fld[1].rtx directly.
* reload1.c (reload): Change reg to a MEM before initializing
it.
* varasm.c (mark_constant_pool): Skip CONST_DOUBLES, which
have no names.
* config/i386/i386.md (decrement_and_branch_if_zero): Fix typo.
From-SVN: r29008
1999-08-31 21:39:10 +02:00
|
|
|
|
ATTRIBUTE_NORETURN;
|
|
|
|
|
|
acconfig.h: New ENABLE flags: TREE_CHECKING, RTL_CHECKING, GC_CHECKING, GC_ALWAYS_COLLECT.
1999-12-26 Zack Weinberg <zack@wolery.cumb.org>
* acconfig.h: New ENABLE flags: TREE_CHECKING, RTL_CHECKING,
GC_CHECKING, GC_ALWAYS_COLLECT.
* configure.in: Allow --enable-checking with an argument
listing check modes to enable.
* config.in, configure: Rebuilt.
* ggc-page.c, ggc-simple.c: Define GGC_POISON (and
GGC_ALWAYS_VERIFY for ggc-simple.c) only if
ENABLE_GC_CHECKING. Define GGC_ALWAYS_COLLECT only if
ENABLE_GC_ALWAYS_COLLECT.
* rtl.h, rtl.c: Change ENABLE_CHECKING to ENABLE_RTL_CHECKING
throughout.
* tree.h, tree.c: Change ENABLE_CHECKING to
ENABLE_TREE_CHECKING throughout.
* cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
throughout.
From-SVN: r31093
1999-12-27 00:06:54 +01:00
|
|
|
|
#else /* not ENABLE_RTL_CHECKING */
|
rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and bounds- check RTL accesses if --enable-checking.
1999-08-31 12:20 -0700 Zack Weinberg <zack@bitmover.com>
* rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and
bounds- check RTL accesses if --enable-checking.
(RTVEC_ELT): Bounds check if --enable-checking.
(XWINT, XINT, XSTR, XEXP, XVEC, XMODE, XBITMAP, XTREE,
XBBDEF): Use RTL_CHECK1/RTL_CHECK2 as appropriate.
(XVECEXP, XVECLEN): Define in terms of XVEC, RTVEC_ELT, and
GET_NUM_ELEM.
(X0WINT, X0INT, X0STR, X0EXP, X0VEC, X0MODE, X0BITMAP, X0TREE,
X0BBDEF, X0ADVFLAGS): New macros for accessing '0' slots of RTXes.
(ADDR_DIFF_VEC_FLAGS): Use X0ADVFLAGS.
(NOTE_SOURCE_FILE): Use X0STR.
(NOTE_BLOCK_NUMBER, NOTE_EH_HANDLER, LABEL_NUSES,
MEM_ALIAS_SET): Use X0INT.
(NOTE_RANGE_INFO, NOTE_LIVE_INFO, NOTE_BASIC_BLOCK,
JUMP_LABEL, LABEL_REFS, LABEL_NEXTREF, CONTAINING_INSN):
Use X0EXP.
* real.h (CONST_DOUBLE_CHAIN): Use X0EXP.
* rtl.c (copy_rtx, copy_most_rtx): Copy '0' slots with X0WINT.
(rtl_check_failed_bounds, rtl_check_failed_type1,
rtl_check_failed_type2, rtvec_check_failed_bounds): New
functions.
(fancy_abort): Fix comment.
* cse.c (canon_hash): Read CONST_DOUBLE data slots with XWINT.
(cse_insn): Decrement LABEL_NUSES for jump target before
deleting jump insn.
* emit-rtl.c (gen_rtx_CONST_DOUBLE): Use X0EXP for slot 1.
* final.c (alter_subreg): Compute regno before changing x to
REG; set REGNO(x) after changing it.
* flow.c (count_basic_blocks): Use XWINT to inspect EH_REGION
notes containing CONST_INTs.
(delete_eh_regions): Use NOTE_EH_HANDLER.
* function.c (put_reg_into_stack): Make reg a MEM before
initializing it.
(fixup_var_refs_insns): Save REG_NOTES (insn) in case we
delete insn.
(gen_mem_addressof): Make reg a MEM before initializing it.
* integrate.c (copy_rtx_and_substitute): Copy '0' slots with
X0WINT.
* local-alloc.c (update_equiv_regs): Zap REG_NOTES before
deleting an insn, not after.
(block_alloc): Only look at PATTERN(insn) if we have to, and
only if it's format class 'i'.
* loop.c (check_dbra_loop): Check bl->biv->add_val is a
CONST_INT before using its INTVAL.
* print-rtl.c (print_rtx): Use X0STR.
* regmove.c (fixup_match_1): Don't look at PATTERN of
non-class-'i' insn chain elements.
* reload.c (loc_mentioned_in_p): Take address of
in->fld[1].rtx directly.
* reload1.c (reload): Change reg to a MEM before initializing
it.
* varasm.c (mark_constant_pool): Skip CONST_DOUBLES, which
have no names.
* config/i386/i386.md (decrement_and_branch_if_zero): Fix typo.
From-SVN: r29008
1999-08-31 21:39:10 +02:00
|
|
|
|
|
2003-10-18 20:45:16 +02:00
|
|
|
|
#define RTL_CHECK1(RTX, N, C1) ((RTX)->u.fld[N])
|
|
|
|
|
#define RTL_CHECK2(RTX, N, C1, C2) ((RTX)->u.fld[N])
|
|
|
|
|
#define RTL_CHECKC1(RTX, N, C) ((RTX)->u.fld[N])
|
|
|
|
|
#define RTL_CHECKC2(RTX, N, C1, C2) ((RTX)->u.fld[N])
|
flow.c (propagate_block): Use XEXP not SET_DEST for a USE.
* flow.c (propagate_block): Use XEXP not SET_DEST for a USE.
(recompute_reg_usage): Likewise.
* rtlanal.c (find_regno_fusage): Likewise.
* rtl.c (rtl_check_failed_code1): New function.
(rtl_check_failed_code2): New.
* rtl.h (RTL_CHECK1, RTL_CHECK2, RTVEC_ELT): Parenthesize args.
(RTL_CHECKC1, RTL_CHECKC2): New.
(XC*): New accessor macros.
(NOTE_*, LABEL_NAME, LABEL_NUSES, ADDRESSOF_REGNO): Use them.
(ADDRESSOF_DECL, JUMP_LABEL, LABEL_REFS, LABEL_NEXTREF): Likewise.
(CONTAINING_INSN, REGNO, INTVAL, SUBREG_REG, SUBREG_WORD): Likewise.
(ASM_OPERANDS_*, MEM_ALIAS_SET, SET_SRC, SET_DEST): Likewise.
(TRAP_*, RANGE_INFO_*): Likewise.
From-SVN: r29089
1999-09-04 00:23:11 +02:00
|
|
|
|
#define RTVEC_ELT(RTVEC, I) ((RTVEC)->elem[I])
|
2003-10-18 20:45:16 +02:00
|
|
|
|
#define XWINT(RTX, N) ((RTX)->u.hwint[N])
|
|
|
|
|
#define XCWINT(RTX, N, C) ((RTX)->u.hwint[N])
|
rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and bounds- check RTL accesses if --enable-checking.
1999-08-31 12:20 -0700 Zack Weinberg <zack@bitmover.com>
* rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and
bounds- check RTL accesses if --enable-checking.
(RTVEC_ELT): Bounds check if --enable-checking.
(XWINT, XINT, XSTR, XEXP, XVEC, XMODE, XBITMAP, XTREE,
XBBDEF): Use RTL_CHECK1/RTL_CHECK2 as appropriate.
(XVECEXP, XVECLEN): Define in terms of XVEC, RTVEC_ELT, and
GET_NUM_ELEM.
(X0WINT, X0INT, X0STR, X0EXP, X0VEC, X0MODE, X0BITMAP, X0TREE,
X0BBDEF, X0ADVFLAGS): New macros for accessing '0' slots of RTXes.
(ADDR_DIFF_VEC_FLAGS): Use X0ADVFLAGS.
(NOTE_SOURCE_FILE): Use X0STR.
(NOTE_BLOCK_NUMBER, NOTE_EH_HANDLER, LABEL_NUSES,
MEM_ALIAS_SET): Use X0INT.
(NOTE_RANGE_INFO, NOTE_LIVE_INFO, NOTE_BASIC_BLOCK,
JUMP_LABEL, LABEL_REFS, LABEL_NEXTREF, CONTAINING_INSN):
Use X0EXP.
* real.h (CONST_DOUBLE_CHAIN): Use X0EXP.
* rtl.c (copy_rtx, copy_most_rtx): Copy '0' slots with X0WINT.
(rtl_check_failed_bounds, rtl_check_failed_type1,
rtl_check_failed_type2, rtvec_check_failed_bounds): New
functions.
(fancy_abort): Fix comment.
* cse.c (canon_hash): Read CONST_DOUBLE data slots with XWINT.
(cse_insn): Decrement LABEL_NUSES for jump target before
deleting jump insn.
* emit-rtl.c (gen_rtx_CONST_DOUBLE): Use X0EXP for slot 1.
* final.c (alter_subreg): Compute regno before changing x to
REG; set REGNO(x) after changing it.
* flow.c (count_basic_blocks): Use XWINT to inspect EH_REGION
notes containing CONST_INTs.
(delete_eh_regions): Use NOTE_EH_HANDLER.
* function.c (put_reg_into_stack): Make reg a MEM before
initializing it.
(fixup_var_refs_insns): Save REG_NOTES (insn) in case we
delete insn.
(gen_mem_addressof): Make reg a MEM before initializing it.
* integrate.c (copy_rtx_and_substitute): Copy '0' slots with
X0WINT.
* local-alloc.c (update_equiv_regs): Zap REG_NOTES before
deleting an insn, not after.
(block_alloc): Only look at PATTERN(insn) if we have to, and
only if it's format class 'i'.
* loop.c (check_dbra_loop): Check bl->biv->add_val is a
CONST_INT before using its INTVAL.
* print-rtl.c (print_rtx): Use X0STR.
* regmove.c (fixup_match_1): Don't look at PATTERN of
non-class-'i' insn chain elements.
* reload.c (loc_mentioned_in_p): Take address of
in->fld[1].rtx directly.
* reload1.c (reload): Change reg to a MEM before initializing
it.
* varasm.c (mark_constant_pool): Skip CONST_DOUBLES, which
have no names.
* config/i386/i386.md (decrement_and_branch_if_zero): Fix typo.
From-SVN: r29008
1999-08-31 21:39:10 +02:00
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
2002-05-07 02:18:48 +02:00
|
|
|
|
/* General accessor macros for accessing the flags of an rtx. */
|
|
|
|
|
|
|
|
|
|
/* Access an individual rtx flag, with no checking of any kind. */
|
|
|
|
|
#define RTX_FLAG(RTX, FLAG) ((RTX)->FLAG)
|
|
|
|
|
|
2002-05-10 03:30:03 +02:00
|
|
|
|
#if defined ENABLE_RTL_FLAG_CHECKING && (GCC_VERSION >= 2007)
|
2002-05-09 00:37:21 +02:00
|
|
|
|
#define RTL_FLAG_CHECK1(NAME, RTX, C1) __extension__ \
|
2002-05-07 02:18:48 +02:00
|
|
|
|
({ rtx const _rtx = (RTX); \
|
|
|
|
|
if (GET_CODE(_rtx) != C1) \
|
2002-05-09 00:37:21 +02:00
|
|
|
|
rtl_check_failed_flag (NAME, _rtx, __FILE__, __LINE__, \
|
2003-06-01 17:59:10 +02:00
|
|
|
|
__FUNCTION__); \
|
2002-05-07 02:18:48 +02:00
|
|
|
|
_rtx; })
|
|
|
|
|
|
2002-05-09 00:37:21 +02:00
|
|
|
|
#define RTL_FLAG_CHECK2(NAME, RTX, C1, C2) __extension__ \
|
2002-05-07 02:18:48 +02:00
|
|
|
|
({ rtx const _rtx = (RTX); \
|
|
|
|
|
if (GET_CODE(_rtx) != C1 && GET_CODE(_rtx) != C2) \
|
2002-05-09 00:37:21 +02:00
|
|
|
|
rtl_check_failed_flag (NAME,_rtx, __FILE__, __LINE__, \
|
2003-06-01 17:59:10 +02:00
|
|
|
|
__FUNCTION__); \
|
2002-05-07 02:18:48 +02:00
|
|
|
|
_rtx; })
|
|
|
|
|
|
2002-05-09 00:37:21 +02:00
|
|
|
|
#define RTL_FLAG_CHECK3(NAME, RTX, C1, C2, C3) __extension__ \
|
2002-05-07 02:18:48 +02:00
|
|
|
|
({ rtx const _rtx = (RTX); \
|
2003-06-01 17:59:10 +02:00
|
|
|
|
if (GET_CODE(_rtx) != C1 && GET_CODE(_rtx) != C2 \
|
2002-05-07 02:18:48 +02:00
|
|
|
|
&& GET_CODE(_rtx) != C3) \
|
2002-05-09 00:37:21 +02:00
|
|
|
|
rtl_check_failed_flag (NAME, _rtx, __FILE__, __LINE__, \
|
2003-06-01 17:59:10 +02:00
|
|
|
|
__FUNCTION__); \
|
2002-05-07 02:18:48 +02:00
|
|
|
|
_rtx; })
|
|
|
|
|
|
2002-05-09 00:37:21 +02:00
|
|
|
|
#define RTL_FLAG_CHECK4(NAME, RTX, C1, C2, C3, C4) __extension__ \
|
2002-05-07 02:18:48 +02:00
|
|
|
|
({ rtx const _rtx = (RTX); \
|
2003-06-01 17:59:10 +02:00
|
|
|
|
if (GET_CODE(_rtx) != C1 && GET_CODE(_rtx) != C2 \
|
2002-05-07 02:18:48 +02:00
|
|
|
|
&& GET_CODE(_rtx) != C3 && GET_CODE(_rtx) != C4) \
|
2002-05-09 00:37:21 +02:00
|
|
|
|
rtl_check_failed_flag (NAME, _rtx, __FILE__, __LINE__, \
|
2003-06-01 17:59:10 +02:00
|
|
|
|
__FUNCTION__); \
|
2002-05-07 02:18:48 +02:00
|
|
|
|
_rtx; })
|
|
|
|
|
|
2002-05-09 00:37:21 +02:00
|
|
|
|
#define RTL_FLAG_CHECK5(NAME, RTX, C1, C2, C3, C4, C5) __extension__ \
|
2002-05-07 02:18:48 +02:00
|
|
|
|
({ rtx const _rtx = (RTX); \
|
2003-06-01 17:59:10 +02:00
|
|
|
|
if (GET_CODE(_rtx) != C1 && GET_CODE(_rtx) != C2 \
|
2002-05-07 02:18:48 +02:00
|
|
|
|
&& GET_CODE(_rtx) != C3 && GET_CODE(_rtx) != C4 \
|
|
|
|
|
&& GET_CODE(_rtx) != C5) \
|
2002-05-09 00:37:21 +02:00
|
|
|
|
rtl_check_failed_flag (NAME, _rtx, __FILE__, __LINE__, \
|
2003-06-01 17:59:10 +02:00
|
|
|
|
__FUNCTION__); \
|
2002-05-07 02:18:48 +02:00
|
|
|
|
_rtx; })
|
|
|
|
|
|
2002-05-09 00:37:21 +02:00
|
|
|
|
#define RTL_FLAG_CHECK6(NAME, RTX, C1, C2, C3, C4, C5, C6) \
|
|
|
|
|
__extension__ \
|
2002-05-07 02:18:48 +02:00
|
|
|
|
({ rtx const _rtx = (RTX); \
|
2003-06-01 17:59:10 +02:00
|
|
|
|
if (GET_CODE(_rtx) != C1 && GET_CODE(_rtx) != C2 \
|
2002-05-07 02:18:48 +02:00
|
|
|
|
&& GET_CODE(_rtx) != C3 && GET_CODE(_rtx) != C4 \
|
|
|
|
|
&& GET_CODE(_rtx) != C5 && GET_CODE(_rtx) != C6) \
|
2002-05-09 00:37:21 +02:00
|
|
|
|
rtl_check_failed_flag (NAME,_rtx, __FILE__, __LINE__, \
|
2003-06-01 17:59:10 +02:00
|
|
|
|
__FUNCTION__); \
|
2002-05-07 02:18:48 +02:00
|
|
|
|
_rtx; })
|
|
|
|
|
|
2002-05-09 00:37:21 +02:00
|
|
|
|
#define RTL_FLAG_CHECK7(NAME, RTX, C1, C2, C3, C4, C5, C6, C7) \
|
|
|
|
|
__extension__ \
|
2002-05-07 02:18:48 +02:00
|
|
|
|
({ rtx const _rtx = (RTX); \
|
2003-06-01 17:59:10 +02:00
|
|
|
|
if (GET_CODE(_rtx) != C1 && GET_CODE(_rtx) != C2 \
|
2002-05-07 02:18:48 +02:00
|
|
|
|
&& GET_CODE(_rtx) != C3 && GET_CODE(_rtx) != C4 \
|
|
|
|
|
&& GET_CODE(_rtx) != C5 && GET_CODE(_rtx) != C6 \
|
|
|
|
|
&& GET_CODE(_rtx) != C7) \
|
2002-05-09 00:37:21 +02:00
|
|
|
|
rtl_check_failed_flag (NAME, _rtx, __FILE__, __LINE__, \
|
2003-06-01 17:59:10 +02:00
|
|
|
|
__FUNCTION__); \
|
2002-05-07 02:18:48 +02:00
|
|
|
|
_rtx; })
|
|
|
|
|
|
2002-05-09 00:37:21 +02:00
|
|
|
|
#define RTL_FLAG_CHECK8(NAME, RTX, C1, C2, C3, C4, C5, C6, C7, C8) \
|
|
|
|
|
__extension__ \
|
2002-05-07 02:18:48 +02:00
|
|
|
|
({ rtx const _rtx = (RTX); \
|
2003-06-01 17:59:10 +02:00
|
|
|
|
if (GET_CODE(_rtx) != C1 && GET_CODE(_rtx) != C2 \
|
2002-05-07 02:18:48 +02:00
|
|
|
|
&& GET_CODE(_rtx) != C3 && GET_CODE(_rtx) != C4 \
|
|
|
|
|
&& GET_CODE(_rtx) != C5 && GET_CODE(_rtx) != C6 \
|
|
|
|
|
&& GET_CODE(_rtx) != C7 && GET_CODE(_rtx) != C8) \
|
2002-05-09 00:37:21 +02:00
|
|
|
|
rtl_check_failed_flag (NAME, _rtx, __FILE__, __LINE__, \
|
2003-06-01 17:59:10 +02:00
|
|
|
|
__FUNCTION__); \
|
2002-05-07 02:18:48 +02:00
|
|
|
|
_rtx; })
|
|
|
|
|
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void rtl_check_failed_flag (const char *, rtx, const char *,
|
|
|
|
|
int, const char *)
|
2002-05-07 02:18:48 +02:00
|
|
|
|
ATTRIBUTE_NORETURN
|
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
#else /* not ENABLE_RTL_FLAG_CHECKING */
|
|
|
|
|
|
2002-05-09 00:37:21 +02:00
|
|
|
|
#define RTL_FLAG_CHECK1(NAME, RTX, C1) (RTX)
|
|
|
|
|
#define RTL_FLAG_CHECK2(NAME, RTX, C1, C2) (RTX)
|
|
|
|
|
#define RTL_FLAG_CHECK3(NAME, RTX, C1, C2, C3) (RTX)
|
|
|
|
|
#define RTL_FLAG_CHECK4(NAME, RTX, C1, C2, C3, C4) (RTX)
|
2003-06-01 17:59:10 +02:00
|
|
|
|
#define RTL_FLAG_CHECK5(NAME, RTX, C1, C2, C3, C4, C5) (RTX)
|
2002-05-09 00:37:21 +02:00
|
|
|
|
#define RTL_FLAG_CHECK6(NAME, RTX, C1, C2, C3, C4, C5, C6) (RTX)
|
|
|
|
|
#define RTL_FLAG_CHECK7(NAME, RTX, C1, C2, C3, C4, C5, C6, C7) (RTX)
|
|
|
|
|
#define RTL_FLAG_CHECK8(NAME, RTX, C1, C2, C3, C4, C5, C6, C7, C8) (RTX)
|
2002-05-07 02:18:48 +02:00
|
|
|
|
#endif
|
|
|
|
|
|
rtl.h (union rtunion_def): Have all members start with the prefix "rt_".
* rtl.h (union rtunion_def): Have all members start with the
prefix "rt_".
(XINT, XSTR, XEXP, XVEC, XMODE, XBITMAP, XTREE, XBBDEF, XTMPL,
X0INT, X0UINT, X0STR, X0EXP, X0VEC, X0MODE, X0BITMAP, X0TREE,
X0MEMATTR, X0BBDEF, X0REGATTR, XCINT, XCUINT, XCSTR, XCEXP,
XCVEC, XCMODE, XCBITMAP, XCTREE, XCBBDEF, XC2EXP): Adjust
members
access.
* gengtype.c (adjust_field_rtx_def): Likewise.
* rtlanal.c (loc_mentioned_in_p): Likewise.
From-SVN: r85434
2004-08-02 12:29:26 +02:00
|
|
|
|
#define XINT(RTX, N) (RTL_CHECK2 (RTX, N, 'i', 'n').rt_int)
|
|
|
|
|
#define XSTR(RTX, N) (RTL_CHECK2 (RTX, N, 's', 'S').rt_str)
|
|
|
|
|
#define XEXP(RTX, N) (RTL_CHECK2 (RTX, N, 'e', 'u').rt_rtx)
|
|
|
|
|
#define XVEC(RTX, N) (RTL_CHECK2 (RTX, N, 'E', 'V').rt_rtvec)
|
|
|
|
|
#define XMODE(RTX, N) (RTL_CHECK1 (RTX, N, 'M').rt_type)
|
|
|
|
|
#define XBITMAP(RTX, N) (RTL_CHECK1 (RTX, N, 'b').rt_bit)
|
|
|
|
|
#define XTREE(RTX, N) (RTL_CHECK1 (RTX, N, 't').rt_tree)
|
|
|
|
|
#define XBBDEF(RTX, N) (RTL_CHECK1 (RTX, N, 'B').rt_bb)
|
|
|
|
|
#define XTMPL(RTX, N) (RTL_CHECK1 (RTX, N, 'T').rt_str)
|
rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and bounds- check RTL accesses if --enable-checking.
1999-08-31 12:20 -0700 Zack Weinberg <zack@bitmover.com>
* rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and
bounds- check RTL accesses if --enable-checking.
(RTVEC_ELT): Bounds check if --enable-checking.
(XWINT, XINT, XSTR, XEXP, XVEC, XMODE, XBITMAP, XTREE,
XBBDEF): Use RTL_CHECK1/RTL_CHECK2 as appropriate.
(XVECEXP, XVECLEN): Define in terms of XVEC, RTVEC_ELT, and
GET_NUM_ELEM.
(X0WINT, X0INT, X0STR, X0EXP, X0VEC, X0MODE, X0BITMAP, X0TREE,
X0BBDEF, X0ADVFLAGS): New macros for accessing '0' slots of RTXes.
(ADDR_DIFF_VEC_FLAGS): Use X0ADVFLAGS.
(NOTE_SOURCE_FILE): Use X0STR.
(NOTE_BLOCK_NUMBER, NOTE_EH_HANDLER, LABEL_NUSES,
MEM_ALIAS_SET): Use X0INT.
(NOTE_RANGE_INFO, NOTE_LIVE_INFO, NOTE_BASIC_BLOCK,
JUMP_LABEL, LABEL_REFS, LABEL_NEXTREF, CONTAINING_INSN):
Use X0EXP.
* real.h (CONST_DOUBLE_CHAIN): Use X0EXP.
* rtl.c (copy_rtx, copy_most_rtx): Copy '0' slots with X0WINT.
(rtl_check_failed_bounds, rtl_check_failed_type1,
rtl_check_failed_type2, rtvec_check_failed_bounds): New
functions.
(fancy_abort): Fix comment.
* cse.c (canon_hash): Read CONST_DOUBLE data slots with XWINT.
(cse_insn): Decrement LABEL_NUSES for jump target before
deleting jump insn.
* emit-rtl.c (gen_rtx_CONST_DOUBLE): Use X0EXP for slot 1.
* final.c (alter_subreg): Compute regno before changing x to
REG; set REGNO(x) after changing it.
* flow.c (count_basic_blocks): Use XWINT to inspect EH_REGION
notes containing CONST_INTs.
(delete_eh_regions): Use NOTE_EH_HANDLER.
* function.c (put_reg_into_stack): Make reg a MEM before
initializing it.
(fixup_var_refs_insns): Save REG_NOTES (insn) in case we
delete insn.
(gen_mem_addressof): Make reg a MEM before initializing it.
* integrate.c (copy_rtx_and_substitute): Copy '0' slots with
X0WINT.
* local-alloc.c (update_equiv_regs): Zap REG_NOTES before
deleting an insn, not after.
(block_alloc): Only look at PATTERN(insn) if we have to, and
only if it's format class 'i'.
* loop.c (check_dbra_loop): Check bl->biv->add_val is a
CONST_INT before using its INTVAL.
* print-rtl.c (print_rtx): Use X0STR.
* regmove.c (fixup_match_1): Don't look at PATTERN of
non-class-'i' insn chain elements.
* reload.c (loc_mentioned_in_p): Take address of
in->fld[1].rtx directly.
* reload1.c (reload): Change reg to a MEM before initializing
it.
* varasm.c (mark_constant_pool): Skip CONST_DOUBLES, which
have no names.
* config/i386/i386.md (decrement_and_branch_if_zero): Fix typo.
From-SVN: r29008
1999-08-31 21:39:10 +02:00
|
|
|
|
|
|
|
|
|
#define XVECEXP(RTX, N, M) RTVEC_ELT (XVEC (RTX, N), M)
|
|
|
|
|
#define XVECLEN(RTX, N) GET_NUM_ELEM (XVEC (RTX, N))
|
|
|
|
|
|
2003-10-18 20:45:16 +02:00
|
|
|
|
/* These are like XINT, etc. except that they expect a '0' field instead
|
rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and bounds- check RTL accesses if --enable-checking.
1999-08-31 12:20 -0700 Zack Weinberg <zack@bitmover.com>
* rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and
bounds- check RTL accesses if --enable-checking.
(RTVEC_ELT): Bounds check if --enable-checking.
(XWINT, XINT, XSTR, XEXP, XVEC, XMODE, XBITMAP, XTREE,
XBBDEF): Use RTL_CHECK1/RTL_CHECK2 as appropriate.
(XVECEXP, XVECLEN): Define in terms of XVEC, RTVEC_ELT, and
GET_NUM_ELEM.
(X0WINT, X0INT, X0STR, X0EXP, X0VEC, X0MODE, X0BITMAP, X0TREE,
X0BBDEF, X0ADVFLAGS): New macros for accessing '0' slots of RTXes.
(ADDR_DIFF_VEC_FLAGS): Use X0ADVFLAGS.
(NOTE_SOURCE_FILE): Use X0STR.
(NOTE_BLOCK_NUMBER, NOTE_EH_HANDLER, LABEL_NUSES,
MEM_ALIAS_SET): Use X0INT.
(NOTE_RANGE_INFO, NOTE_LIVE_INFO, NOTE_BASIC_BLOCK,
JUMP_LABEL, LABEL_REFS, LABEL_NEXTREF, CONTAINING_INSN):
Use X0EXP.
* real.h (CONST_DOUBLE_CHAIN): Use X0EXP.
* rtl.c (copy_rtx, copy_most_rtx): Copy '0' slots with X0WINT.
(rtl_check_failed_bounds, rtl_check_failed_type1,
rtl_check_failed_type2, rtvec_check_failed_bounds): New
functions.
(fancy_abort): Fix comment.
* cse.c (canon_hash): Read CONST_DOUBLE data slots with XWINT.
(cse_insn): Decrement LABEL_NUSES for jump target before
deleting jump insn.
* emit-rtl.c (gen_rtx_CONST_DOUBLE): Use X0EXP for slot 1.
* final.c (alter_subreg): Compute regno before changing x to
REG; set REGNO(x) after changing it.
* flow.c (count_basic_blocks): Use XWINT to inspect EH_REGION
notes containing CONST_INTs.
(delete_eh_regions): Use NOTE_EH_HANDLER.
* function.c (put_reg_into_stack): Make reg a MEM before
initializing it.
(fixup_var_refs_insns): Save REG_NOTES (insn) in case we
delete insn.
(gen_mem_addressof): Make reg a MEM before initializing it.
* integrate.c (copy_rtx_and_substitute): Copy '0' slots with
X0WINT.
* local-alloc.c (update_equiv_regs): Zap REG_NOTES before
deleting an insn, not after.
(block_alloc): Only look at PATTERN(insn) if we have to, and
only if it's format class 'i'.
* loop.c (check_dbra_loop): Check bl->biv->add_val is a
CONST_INT before using its INTVAL.
* print-rtl.c (print_rtx): Use X0STR.
* regmove.c (fixup_match_1): Don't look at PATTERN of
non-class-'i' insn chain elements.
* reload.c (loc_mentioned_in_p): Take address of
in->fld[1].rtx directly.
* reload1.c (reload): Change reg to a MEM before initializing
it.
* varasm.c (mark_constant_pool): Skip CONST_DOUBLES, which
have no names.
* config/i386/i386.md (decrement_and_branch_if_zero): Fix typo.
From-SVN: r29008
1999-08-31 21:39:10 +02:00
|
|
|
|
of the normal type code. */
|
|
|
|
|
|
rtl.h (union rtunion_def): Have all members start with the prefix "rt_".
* rtl.h (union rtunion_def): Have all members start with the
prefix "rt_".
(XINT, XSTR, XEXP, XVEC, XMODE, XBITMAP, XTREE, XBBDEF, XTMPL,
X0INT, X0UINT, X0STR, X0EXP, X0VEC, X0MODE, X0BITMAP, X0TREE,
X0MEMATTR, X0BBDEF, X0REGATTR, XCINT, XCUINT, XCSTR, XCEXP,
XCVEC, XCMODE, XCBITMAP, XCTREE, XCBBDEF, XC2EXP): Adjust
members
access.
* gengtype.c (adjust_field_rtx_def): Likewise.
* rtlanal.c (loc_mentioned_in_p): Likewise.
From-SVN: r85434
2004-08-02 12:29:26 +02:00
|
|
|
|
#define X0INT(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_int)
|
|
|
|
|
#define X0UINT(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_uint)
|
|
|
|
|
#define X0STR(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_str)
|
|
|
|
|
#define X0EXP(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_rtx)
|
|
|
|
|
#define X0VEC(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_rtvec)
|
|
|
|
|
#define X0MODE(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_type)
|
|
|
|
|
#define X0BITMAP(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_bit)
|
|
|
|
|
#define X0TREE(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_tree)
|
|
|
|
|
#define X0BBDEF(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_bb)
|
2002-01-03 06:11:05 +01:00
|
|
|
|
#define X0ADVFLAGS(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_addr_diff_vec_flags)
|
|
|
|
|
#define X0CSELIB(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_cselib)
|
rtl.h (union rtunion_def): Have all members start with the prefix "rt_".
* rtl.h (union rtunion_def): Have all members start with the
prefix "rt_".
(XINT, XSTR, XEXP, XVEC, XMODE, XBITMAP, XTREE, XBBDEF, XTMPL,
X0INT, X0UINT, X0STR, X0EXP, X0VEC, X0MODE, X0BITMAP, X0TREE,
X0MEMATTR, X0BBDEF, X0REGATTR, XCINT, XCUINT, XCSTR, XCEXP,
XCVEC, XCMODE, XCBITMAP, XCTREE, XCBBDEF, XC2EXP): Adjust
members
access.
* gengtype.c (adjust_field_rtx_def): Likewise.
* rtlanal.c (loc_mentioned_in_p): Likewise.
From-SVN: r85434
2004-08-02 12:29:26 +02:00
|
|
|
|
#define X0MEMATTR(RTX, N) (RTL_CHECKC1 (RTX, N, MEM).rt_mem)
|
|
|
|
|
#define X0REGATTR(RTX, N) (RTL_CHECKC1 (RTX, N, REG).rt_reg)
|
2002-01-03 06:11:05 +01:00
|
|
|
|
|
2003-10-18 20:45:16 +02:00
|
|
|
|
/* Access a '0' field with any type. */
|
|
|
|
|
#define X0ANY(RTX, N) RTL_CHECK1 (RTX, N, '0')
|
|
|
|
|
|
rtl.h (union rtunion_def): Have all members start with the prefix "rt_".
* rtl.h (union rtunion_def): Have all members start with the
prefix "rt_".
(XINT, XSTR, XEXP, XVEC, XMODE, XBITMAP, XTREE, XBBDEF, XTMPL,
X0INT, X0UINT, X0STR, X0EXP, X0VEC, X0MODE, X0BITMAP, X0TREE,
X0MEMATTR, X0BBDEF, X0REGATTR, XCINT, XCUINT, XCSTR, XCEXP,
XCVEC, XCMODE, XCBITMAP, XCTREE, XCBBDEF, XC2EXP): Adjust
members
access.
* gengtype.c (adjust_field_rtx_def): Likewise.
* rtlanal.c (loc_mentioned_in_p): Likewise.
From-SVN: r85434
2004-08-02 12:29:26 +02:00
|
|
|
|
#define XCINT(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_int)
|
|
|
|
|
#define XCUINT(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_uint)
|
|
|
|
|
#define XCSTR(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_str)
|
|
|
|
|
#define XCEXP(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_rtx)
|
|
|
|
|
#define XCVEC(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_rtvec)
|
|
|
|
|
#define XCMODE(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_type)
|
|
|
|
|
#define XCBITMAP(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_bit)
|
|
|
|
|
#define XCTREE(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_tree)
|
|
|
|
|
#define XCBBDEF(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_bb)
|
2002-01-03 06:11:05 +01:00
|
|
|
|
#define XCCSELIB(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_cselib)
|
flow.c (propagate_block): Use XEXP not SET_DEST for a USE.
* flow.c (propagate_block): Use XEXP not SET_DEST for a USE.
(recompute_reg_usage): Likewise.
* rtlanal.c (find_regno_fusage): Likewise.
* rtl.c (rtl_check_failed_code1): New function.
(rtl_check_failed_code2): New.
* rtl.h (RTL_CHECK1, RTL_CHECK2, RTVEC_ELT): Parenthesize args.
(RTL_CHECKC1, RTL_CHECKC2): New.
(XC*): New accessor macros.
(NOTE_*, LABEL_NAME, LABEL_NUSES, ADDRESSOF_REGNO): Use them.
(ADDRESSOF_DECL, JUMP_LABEL, LABEL_REFS, LABEL_NEXTREF): Likewise.
(CONTAINING_INSN, REGNO, INTVAL, SUBREG_REG, SUBREG_WORD): Likewise.
(ASM_OPERANDS_*, MEM_ALIAS_SET, SET_SRC, SET_DEST): Likewise.
(TRAP_*, RANGE_INFO_*): Likewise.
From-SVN: r29089
1999-09-04 00:23:11 +02:00
|
|
|
|
|
|
|
|
|
#define XCVECEXP(RTX, N, M, C) RTVEC_ELT (XCVEC (RTX, N, C), M)
|
|
|
|
|
#define XCVECLEN(RTX, N, C) GET_NUM_ELEM (XCVEC (RTX, N, C))
|
|
|
|
|
|
rtl.h (union rtunion_def): Have all members start with the prefix "rt_".
* rtl.h (union rtunion_def): Have all members start with the
prefix "rt_".
(XINT, XSTR, XEXP, XVEC, XMODE, XBITMAP, XTREE, XBBDEF, XTMPL,
X0INT, X0UINT, X0STR, X0EXP, X0VEC, X0MODE, X0BITMAP, X0TREE,
X0MEMATTR, X0BBDEF, X0REGATTR, XCINT, XCUINT, XCSTR, XCEXP,
XCVEC, XCMODE, XCBITMAP, XCTREE, XCBBDEF, XC2EXP): Adjust
members
access.
* gengtype.c (adjust_field_rtx_def): Likewise.
* rtlanal.c (loc_mentioned_in_p): Likewise.
From-SVN: r85434
2004-08-02 12:29:26 +02:00
|
|
|
|
#define XC2EXP(RTX, N, C1, C2) (RTL_CHECKC2 (RTX, N, C1, C2).rt_rtx)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
|
|
|
|
/* ACCESS MACROS for particular fields of insns. */
|
|
|
|
|
|
|
|
|
|
/* Holds a unique number for each insn.
|
|
|
|
|
These are not necessarily sequentially increasing. */
|
2002-01-03 06:11:05 +01:00
|
|
|
|
#define INSN_UID(INSN) XINT (INSN, 0)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
|
|
|
|
/* Chain insns together in sequence. */
|
2002-01-03 06:11:05 +01:00
|
|
|
|
#define PREV_INSN(INSN) XEXP (INSN, 1)
|
|
|
|
|
#define NEXT_INSN(INSN) XEXP (INSN, 2)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
loop.c (emit_prefetch_instructions): Properly place the address computation.
* loop.c (emit_prefetch_instructions): Properly place the address computation.
* basic-block.h (basic_block_for_insn, BLOCK_FOR_INSN): Kill.
(set_block_for_insn): Turn into macro.
* cfgbuild.c (find_basic_block): Do not clear basic_block_for_insn.
* cfglayout.c (insn_scopes): Kill.
(scope_to_insns_initialize): Do not use insn_scopes.
(scope_to_insns_finalize): Likewise.
(duplicate_insn_chain): Likewise.
(cfg_layout_initialize, cfg_layout_finalize): Do not turn scopes to notes.
* cfgrtl.c (basic_block_for_insn): Kill.
(delete_insn_and_edges, delete_insn_chain_and_edges): Simplify.
(create_basic_block_structure): Use reorder_insns.
(compute_bb_for_insn): Do not use basic_block_for_insn.
(merge_blocks_nomove): Likewise.
(update_bb_for_insn): Likewise.
(verify_flow_info): Likewise.
(set_block_for_insn): Kill.
* combine.c (try_combine): Update gen_rtx_INSN call.
* emit-rtl.c (gen_label_rtx): Update gen_rtx_CODE_LABEL call.
(mark_insn_raw, make_jump_insn_raw, make_call_insn_raw): Clear
scopes and BBs.
(add_insn_after, add_insn_before, remove_insn, reorder_insns): Simplify.
(emit_note_before, emit_note_after, emit_line_note_after, emit_note):
Clear BB.
(emit_insns_after): Simplify.
(emit_copy_of_insn_after): Copy scope.
* final.c (final_start_function): Lower scopes.
* flow.c (check_function_return_warnings): Do not rely on deleted insn.
* integrate.c (copy_insn_list): Cope scopes.
* jump.c (duplicate_loop_exit_test): LIkewise; simplify.
* loop.c (loop_optimize): Do not care block notes.
* print-rtl.c (print_rtx): Print BB.
* recog.c (apply_change_group): Simplify.
* rtl.c (copy_rtx): Handle 'B'.
* rtl.def (INSN, CALL_INSN, JUMP_INSN, NOTE): Add extra fields.
* rtl.h (Field accessors): Update indexes.
* sched-ebb.c (schedule_ebbs): Do not lower notes.
* sched-rgn.c (schedule_insns): Likewise.
* toplev.c (rest_of_compilation): Lower notes.
* unroll.c (unroll_loop): Do not care scoping notes.
(copy_loop_body): Copy scopes.
From-SVN: r54188
2002-06-02 23:09:54 +02:00
|
|
|
|
#define BLOCK_FOR_INSN(INSN) XBBDEF (INSN, 3)
|
cfglayout.c (insn_scope): New static function
* cfglayout.c (insn_scope): New static function
(block_locators_*, line_locators*, file_locators*): New static varrays.
(scope_to_insns_initialize): Use them.
(insn_line, insn_file): New functions.
(scope_to_insns_finalize): Use insn_scope.
(prologue_locator, epilogue_locator): New global variables.
* emit-rt.c (try_split, make_insn_raw, make_jump_insn_raw,
make_call_insn_raw, emit_copy_of_insn_after): Use locators.
(emit_insn_after_scope, emit_insn_before_scope
emit_jump_insn_after_scope, emit_jump_insn_before_scope
emit_call_insn_after_scope, emit_call_insn_before_scope): Rename to...
(emit_insn_after_setloc, emit_insn_before_setloc
emit_jump_insn_after_setloc, emit_jump_insn_before_setloc
emit_call_insn_after_setloc, emit_call_insn_before_setloc): ... these;
use locators.
* final.c (notice_source_line): Use locators.
(final_start_function): Set initial source file and line.
(final_scan_insn): Use locators.
* ifcvt.c (noce_try_store_flag, noce_try_store_flag_constants,
noce_try_addcc, noce_try_store_flag_mask, noce_try_cmove,
noce_try_cmove_arith, noce_try_minmax, noce_try_abs,
noce_process_if_block, find_cond_trap): Likewise.
* integrate.c (copy_insn_list): Likewise.
* jump.c (duplicate_loop_exit_test): LIkewise.
* print-rtl.c (print_rtx): Print locators.
* recog.c (peephole2_optimize): Likewise.
* rtl.h (INSN_SCOPE): Remove.
(emit_insn_after_scope, emit_insn_before_scope
emit_jump_insn_after_scope, emit_jump_insn_before_scope
emit_call_insn_after_scope, emit_call_insn_before_scope): Rename to...
(emit_insn_after_setloc, emit_insn_before_setloc
emit_jump_insn_after_setloc, emit_jump_insn_before_setloc
emit_call_insn_after_setloc, emit_call_insn_before_setloc): ... these;
(insn_file, insn_line, prologue_locator, epilogue_locator): Declare.
* unroll.c (copy_loop_body): Use locators.
* function.c (set_insn_locators): New function.
(thread_prologue_and_epilogue_insns): Set the locators accordingly.
From-SVN: r67637
2003-06-08 21:35:54 +02:00
|
|
|
|
#define INSN_LOCATOR(INSN) XINT (INSN, 4)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
/* The body of an insn. */
|
loop.c (emit_prefetch_instructions): Properly place the address computation.
* loop.c (emit_prefetch_instructions): Properly place the address computation.
* basic-block.h (basic_block_for_insn, BLOCK_FOR_INSN): Kill.
(set_block_for_insn): Turn into macro.
* cfgbuild.c (find_basic_block): Do not clear basic_block_for_insn.
* cfglayout.c (insn_scopes): Kill.
(scope_to_insns_initialize): Do not use insn_scopes.
(scope_to_insns_finalize): Likewise.
(duplicate_insn_chain): Likewise.
(cfg_layout_initialize, cfg_layout_finalize): Do not turn scopes to notes.
* cfgrtl.c (basic_block_for_insn): Kill.
(delete_insn_and_edges, delete_insn_chain_and_edges): Simplify.
(create_basic_block_structure): Use reorder_insns.
(compute_bb_for_insn): Do not use basic_block_for_insn.
(merge_blocks_nomove): Likewise.
(update_bb_for_insn): Likewise.
(verify_flow_info): Likewise.
(set_block_for_insn): Kill.
* combine.c (try_combine): Update gen_rtx_INSN call.
* emit-rtl.c (gen_label_rtx): Update gen_rtx_CODE_LABEL call.
(mark_insn_raw, make_jump_insn_raw, make_call_insn_raw): Clear
scopes and BBs.
(add_insn_after, add_insn_before, remove_insn, reorder_insns): Simplify.
(emit_note_before, emit_note_after, emit_line_note_after, emit_note):
Clear BB.
(emit_insns_after): Simplify.
(emit_copy_of_insn_after): Copy scope.
* final.c (final_start_function): Lower scopes.
* flow.c (check_function_return_warnings): Do not rely on deleted insn.
* integrate.c (copy_insn_list): Cope scopes.
* jump.c (duplicate_loop_exit_test): LIkewise; simplify.
* loop.c (loop_optimize): Do not care block notes.
* print-rtl.c (print_rtx): Print BB.
* recog.c (apply_change_group): Simplify.
* rtl.c (copy_rtx): Handle 'B'.
* rtl.def (INSN, CALL_INSN, JUMP_INSN, NOTE): Add extra fields.
* rtl.h (Field accessors): Update indexes.
* sched-ebb.c (schedule_ebbs): Do not lower notes.
* sched-rgn.c (schedule_insns): Likewise.
* toplev.c (rest_of_compilation): Lower notes.
* unroll.c (unroll_loop): Do not care scoping notes.
(copy_loop_body): Copy scopes.
From-SVN: r54188
2002-06-02 23:09:54 +02:00
|
|
|
|
#define PATTERN(INSN) XEXP (INSN, 5)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
|
|
|
|
/* Code number of instruction, from when it was recognized.
|
|
|
|
|
-1 means this instruction has not been recognized yet. */
|
loop.c (emit_prefetch_instructions): Properly place the address computation.
* loop.c (emit_prefetch_instructions): Properly place the address computation.
* basic-block.h (basic_block_for_insn, BLOCK_FOR_INSN): Kill.
(set_block_for_insn): Turn into macro.
* cfgbuild.c (find_basic_block): Do not clear basic_block_for_insn.
* cfglayout.c (insn_scopes): Kill.
(scope_to_insns_initialize): Do not use insn_scopes.
(scope_to_insns_finalize): Likewise.
(duplicate_insn_chain): Likewise.
(cfg_layout_initialize, cfg_layout_finalize): Do not turn scopes to notes.
* cfgrtl.c (basic_block_for_insn): Kill.
(delete_insn_and_edges, delete_insn_chain_and_edges): Simplify.
(create_basic_block_structure): Use reorder_insns.
(compute_bb_for_insn): Do not use basic_block_for_insn.
(merge_blocks_nomove): Likewise.
(update_bb_for_insn): Likewise.
(verify_flow_info): Likewise.
(set_block_for_insn): Kill.
* combine.c (try_combine): Update gen_rtx_INSN call.
* emit-rtl.c (gen_label_rtx): Update gen_rtx_CODE_LABEL call.
(mark_insn_raw, make_jump_insn_raw, make_call_insn_raw): Clear
scopes and BBs.
(add_insn_after, add_insn_before, remove_insn, reorder_insns): Simplify.
(emit_note_before, emit_note_after, emit_line_note_after, emit_note):
Clear BB.
(emit_insns_after): Simplify.
(emit_copy_of_insn_after): Copy scope.
* final.c (final_start_function): Lower scopes.
* flow.c (check_function_return_warnings): Do not rely on deleted insn.
* integrate.c (copy_insn_list): Cope scopes.
* jump.c (duplicate_loop_exit_test): LIkewise; simplify.
* loop.c (loop_optimize): Do not care block notes.
* print-rtl.c (print_rtx): Print BB.
* recog.c (apply_change_group): Simplify.
* rtl.c (copy_rtx): Handle 'B'.
* rtl.def (INSN, CALL_INSN, JUMP_INSN, NOTE): Add extra fields.
* rtl.h (Field accessors): Update indexes.
* sched-ebb.c (schedule_ebbs): Do not lower notes.
* sched-rgn.c (schedule_insns): Likewise.
* toplev.c (rest_of_compilation): Lower notes.
* unroll.c (unroll_loop): Do not care scoping notes.
(copy_loop_body): Copy scopes.
From-SVN: r54188
2002-06-02 23:09:54 +02:00
|
|
|
|
#define INSN_CODE(INSN) XINT (INSN, 6)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
|
|
|
|
/* Set up in flow.c; empty before then.
|
|
|
|
|
Holds a chain of INSN_LIST rtx's whose first operands point at
|
|
|
|
|
previous insns with direct data-flow connections to this one.
|
|
|
|
|
That means that those insns set variables whose next use is in this insn.
|
|
|
|
|
They are always in the same basic block as this insn. */
|
loop.c (emit_prefetch_instructions): Properly place the address computation.
* loop.c (emit_prefetch_instructions): Properly place the address computation.
* basic-block.h (basic_block_for_insn, BLOCK_FOR_INSN): Kill.
(set_block_for_insn): Turn into macro.
* cfgbuild.c (find_basic_block): Do not clear basic_block_for_insn.
* cfglayout.c (insn_scopes): Kill.
(scope_to_insns_initialize): Do not use insn_scopes.
(scope_to_insns_finalize): Likewise.
(duplicate_insn_chain): Likewise.
(cfg_layout_initialize, cfg_layout_finalize): Do not turn scopes to notes.
* cfgrtl.c (basic_block_for_insn): Kill.
(delete_insn_and_edges, delete_insn_chain_and_edges): Simplify.
(create_basic_block_structure): Use reorder_insns.
(compute_bb_for_insn): Do not use basic_block_for_insn.
(merge_blocks_nomove): Likewise.
(update_bb_for_insn): Likewise.
(verify_flow_info): Likewise.
(set_block_for_insn): Kill.
* combine.c (try_combine): Update gen_rtx_INSN call.
* emit-rtl.c (gen_label_rtx): Update gen_rtx_CODE_LABEL call.
(mark_insn_raw, make_jump_insn_raw, make_call_insn_raw): Clear
scopes and BBs.
(add_insn_after, add_insn_before, remove_insn, reorder_insns): Simplify.
(emit_note_before, emit_note_after, emit_line_note_after, emit_note):
Clear BB.
(emit_insns_after): Simplify.
(emit_copy_of_insn_after): Copy scope.
* final.c (final_start_function): Lower scopes.
* flow.c (check_function_return_warnings): Do not rely on deleted insn.
* integrate.c (copy_insn_list): Cope scopes.
* jump.c (duplicate_loop_exit_test): LIkewise; simplify.
* loop.c (loop_optimize): Do not care block notes.
* print-rtl.c (print_rtx): Print BB.
* recog.c (apply_change_group): Simplify.
* rtl.c (copy_rtx): Handle 'B'.
* rtl.def (INSN, CALL_INSN, JUMP_INSN, NOTE): Add extra fields.
* rtl.h (Field accessors): Update indexes.
* sched-ebb.c (schedule_ebbs): Do not lower notes.
* sched-rgn.c (schedule_insns): Likewise.
* toplev.c (rest_of_compilation): Lower notes.
* unroll.c (unroll_loop): Do not care scoping notes.
(copy_loop_body): Copy scopes.
From-SVN: r54188
2002-06-02 23:09:54 +02:00
|
|
|
|
#define LOG_LINKS(INSN) XEXP(INSN, 7)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2002-05-09 00:37:21 +02:00
|
|
|
|
#define RTX_FRAME_RELATED_P(RTX) \
|
|
|
|
|
(RTL_FLAG_CHECK5("RTX_FRAME_RELATED_P", (RTX), INSN, CALL_INSN, \
|
|
|
|
|
JUMP_INSN, BARRIER, SET)->frame_related)
|
|
|
|
|
|
|
|
|
|
/* 1 if RTX is an insn that has been deleted. */
|
|
|
|
|
#define INSN_DELETED_P(RTX) \
|
|
|
|
|
(RTL_FLAG_CHECK6("INSN_DELETED_P", (RTX), INSN, CALL_INSN, JUMP_INSN, \
|
|
|
|
|
CODE_LABEL, BARRIER, NOTE)->volatil)
|
|
|
|
|
|
|
|
|
|
/* 1 if RTX is a call to a const or pure function. */
|
|
|
|
|
#define CONST_OR_PURE_CALL_P(RTX) \
|
|
|
|
|
(RTL_FLAG_CHECK3("CONST_OR_PURE_CALL_P", (RTX), CALL_INSN, NOTE, \
|
|
|
|
|
EXPR_LIST)->unchanging)
|
|
|
|
|
|
|
|
|
|
/* 1 if RTX is a call_insn for a sibling call. */
|
|
|
|
|
#define SIBLING_CALL_P(RTX) \
|
|
|
|
|
(RTL_FLAG_CHECK1("SIBLING_CALL_P", (RTX), CALL_INSN)->jump)
|
|
|
|
|
|
2002-05-10 22:13:02 +02:00
|
|
|
|
/* 1 if RTX is a jump_insn, call_insn, or insn that is an annulling branch. */
|
2002-05-09 00:37:21 +02:00
|
|
|
|
#define INSN_ANNULLED_BRANCH_P(RTX) \
|
2002-05-10 22:13:02 +02:00
|
|
|
|
(RTL_FLAG_CHECK3("INSN_ANNULLED_BRANCH_P", (RTX), JUMP_INSN, CALL_INSN, INSN)->unchanging)
|
2002-05-09 00:37:21 +02:00
|
|
|
|
|
|
|
|
|
/* 1 if RTX is an insn in a delay slot and is from the target of the branch.
|
|
|
|
|
If the branch insn has INSN_ANNULLED_BRANCH_P set, this insn should only be
|
1991-12-06 22:00:31 +01:00
|
|
|
|
executed if the branch is taken. For annulled branches with this bit
|
|
|
|
|
clear, the insn should be executed only if the branch is not taken. */
|
2002-05-09 00:37:21 +02:00
|
|
|
|
#define INSN_FROM_TARGET_P(RTX) \
|
2002-05-10 14:50:11 +02:00
|
|
|
|
(RTL_FLAG_CHECK3("INSN_FROM_TARGET_P", (RTX), INSN, JUMP_INSN, CALL_INSN)->in_struct)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
cse.c (CHEAP_REGNO): Redefine using REGNO_PTR_FRAME_P and HARD_REGISTER_NUM_P.
* cse.c (CHEAP_REGNO): Redefine using REGNO_PTR_FRAME_P and
HARD_REGISTER_NUM_P.
* cselib.c (new_cselib_val): Make comment correct and more detailed.
* flow.c (mark_set_1): Likewise.
* except.c (duplicate_eh_region_1, duplicate_eh_region_2,
duplicate_eh_regions): Remove.
* except.h (duplicate_eh_regions): Remove prototype.
* integrate.c (get_label_from_map, copy_rtx_and_substitute,
global_const_equiv_varray): Remove.
* integrate.h (get_label_from_map, copy_rtx_and_substitute,
global_const_equiv_varray, set_label_in_map): Remove prototypes,
extern declaration, and #define.
(MAYBE_EXTEND_CONST_EQUIV_VARRAY, SET_CONST_EQUIV_DATA): Remove.
(struct inline_remap): Remove.
* varray.c (struct element): Remove entry for const_equiv_data.
* varray.h (struct const_equiv_data): Remove.
(enum varray_data_enum) <VARRAY_DATA_CONST_EQUIV>: Remove.
(union varray_data_tag) <const_equiv>: Remove.
(VARRAY_CONST_EQUIV_INIT, VARRAY_CONST_EQUIV,
VARRAY_PUSH_CONST_EQUIV, VARRAY_TOP_CONST_EQUIV): Remove.
* regstack.c (record_label_references): Remove unused function.
* rtl.def (VALUE): Update comment.
(LABEL_REF): Remove unused operand 2.
* rtl.h (struct rtx_def): Update for removed accessor macros.
(XCADVFLAGS, INSN_DEAD_CODE_P, LINE_NUMBER, CONTAINING_INSN,
REG_LOOP_TEST_P): Remove.
(ADDR_DIFF_VEC_FLAGS, CSELIB_VAL_PTR, LABEL_NEXTREF): Add comments.
* web.c (entry_register): Don't copy REG_LOOP_TEST_P.
* doc/rtl.texi (INSN_DEAD_CODE_P, REG_LOOP_TEST_P): Remove.
From-SVN: r90580
2004-11-13 15:18:04 +01:00
|
|
|
|
/* In an ADDR_DIFF_VEC, the flags for RTX for use by branch shortening.
|
|
|
|
|
See the comments for ADDR_DIFF_VEC in rtl.def. */
|
2000-03-29 03:56:04 +02:00
|
|
|
|
#define ADDR_DIFF_VEC_FLAGS(RTX) X0ADVFLAGS(RTX, 4)
|
|
|
|
|
|
cse.c (CHEAP_REGNO): Redefine using REGNO_PTR_FRAME_P and HARD_REGISTER_NUM_P.
* cse.c (CHEAP_REGNO): Redefine using REGNO_PTR_FRAME_P and
HARD_REGISTER_NUM_P.
* cselib.c (new_cselib_val): Make comment correct and more detailed.
* flow.c (mark_set_1): Likewise.
* except.c (duplicate_eh_region_1, duplicate_eh_region_2,
duplicate_eh_regions): Remove.
* except.h (duplicate_eh_regions): Remove prototype.
* integrate.c (get_label_from_map, copy_rtx_and_substitute,
global_const_equiv_varray): Remove.
* integrate.h (get_label_from_map, copy_rtx_and_substitute,
global_const_equiv_varray, set_label_in_map): Remove prototypes,
extern declaration, and #define.
(MAYBE_EXTEND_CONST_EQUIV_VARRAY, SET_CONST_EQUIV_DATA): Remove.
(struct inline_remap): Remove.
* varray.c (struct element): Remove entry for const_equiv_data.
* varray.h (struct const_equiv_data): Remove.
(enum varray_data_enum) <VARRAY_DATA_CONST_EQUIV>: Remove.
(union varray_data_tag) <const_equiv>: Remove.
(VARRAY_CONST_EQUIV_INIT, VARRAY_CONST_EQUIV,
VARRAY_PUSH_CONST_EQUIV, VARRAY_TOP_CONST_EQUIV): Remove.
* regstack.c (record_label_references): Remove unused function.
* rtl.def (VALUE): Update comment.
(LABEL_REF): Remove unused operand 2.
* rtl.h (struct rtx_def): Update for removed accessor macros.
(XCADVFLAGS, INSN_DEAD_CODE_P, LINE_NUMBER, CONTAINING_INSN,
REG_LOOP_TEST_P): Remove.
(ADDR_DIFF_VEC_FLAGS, CSELIB_VAL_PTR, LABEL_NEXTREF): Add comments.
* web.c (entry_register): Don't copy REG_LOOP_TEST_P.
* doc/rtl.texi (INSN_DEAD_CODE_P, REG_LOOP_TEST_P): Remove.
From-SVN: r90580
2004-11-13 15:18:04 +01:00
|
|
|
|
/* In a VALUE, the value cselib has assigned to RTX.
|
|
|
|
|
This is a "struct cselib_val_struct", see cselib.h. */
|
2000-03-29 03:56:04 +02:00
|
|
|
|
#define CSELIB_VAL_PTR(RTX) X0CSELIB(RTX, 0)
|
|
|
|
|
|
1991-12-06 22:00:31 +01:00
|
|
|
|
/* Holds a list of notes on what this insn does to various REGs.
|
2000-03-29 03:56:04 +02:00
|
|
|
|
It is a chain of EXPR_LIST rtx's, where the second operand is the
|
|
|
|
|
chain pointer and the first operand is the REG being described.
|
1991-12-06 22:00:31 +01:00
|
|
|
|
The mode field of the EXPR_LIST contains not a real machine mode
|
2000-03-29 03:56:04 +02:00
|
|
|
|
but a value from enum reg_note. */
|
loop.c (emit_prefetch_instructions): Properly place the address computation.
* loop.c (emit_prefetch_instructions): Properly place the address computation.
* basic-block.h (basic_block_for_insn, BLOCK_FOR_INSN): Kill.
(set_block_for_insn): Turn into macro.
* cfgbuild.c (find_basic_block): Do not clear basic_block_for_insn.
* cfglayout.c (insn_scopes): Kill.
(scope_to_insns_initialize): Do not use insn_scopes.
(scope_to_insns_finalize): Likewise.
(duplicate_insn_chain): Likewise.
(cfg_layout_initialize, cfg_layout_finalize): Do not turn scopes to notes.
* cfgrtl.c (basic_block_for_insn): Kill.
(delete_insn_and_edges, delete_insn_chain_and_edges): Simplify.
(create_basic_block_structure): Use reorder_insns.
(compute_bb_for_insn): Do not use basic_block_for_insn.
(merge_blocks_nomove): Likewise.
(update_bb_for_insn): Likewise.
(verify_flow_info): Likewise.
(set_block_for_insn): Kill.
* combine.c (try_combine): Update gen_rtx_INSN call.
* emit-rtl.c (gen_label_rtx): Update gen_rtx_CODE_LABEL call.
(mark_insn_raw, make_jump_insn_raw, make_call_insn_raw): Clear
scopes and BBs.
(add_insn_after, add_insn_before, remove_insn, reorder_insns): Simplify.
(emit_note_before, emit_note_after, emit_line_note_after, emit_note):
Clear BB.
(emit_insns_after): Simplify.
(emit_copy_of_insn_after): Copy scope.
* final.c (final_start_function): Lower scopes.
* flow.c (check_function_return_warnings): Do not rely on deleted insn.
* integrate.c (copy_insn_list): Cope scopes.
* jump.c (duplicate_loop_exit_test): LIkewise; simplify.
* loop.c (loop_optimize): Do not care block notes.
* print-rtl.c (print_rtx): Print BB.
* recog.c (apply_change_group): Simplify.
* rtl.c (copy_rtx): Handle 'B'.
* rtl.def (INSN, CALL_INSN, JUMP_INSN, NOTE): Add extra fields.
* rtl.h (Field accessors): Update indexes.
* sched-ebb.c (schedule_ebbs): Do not lower notes.
* sched-rgn.c (schedule_insns): Likewise.
* toplev.c (rest_of_compilation): Lower notes.
* unroll.c (unroll_loop): Do not care scoping notes.
(copy_loop_body): Copy scopes.
From-SVN: r54188
2002-06-02 23:09:54 +02:00
|
|
|
|
#define REG_NOTES(INSN) XEXP(INSN, 8)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2000-03-29 03:56:04 +02:00
|
|
|
|
enum reg_note
|
|
|
|
|
{
|
2004-08-19 00:31:03 +02:00
|
|
|
|
#define DEF_REG_NOTE(NAME) NAME,
|
|
|
|
|
#include "reg-notes.def"
|
|
|
|
|
#undef DEF_REG_NOTE
|
|
|
|
|
REG_NOTE_MAX
|
2000-03-29 03:56:04 +02:00
|
|
|
|
};
|
|
|
|
|
|
1991-12-06 22:00:31 +01:00
|
|
|
|
/* Define macros to extract and insert the reg-note kind in an EXPR_LIST. */
|
|
|
|
|
#define REG_NOTE_KIND(LINK) ((enum reg_note) GET_MODE (LINK))
|
2002-01-03 06:11:05 +01:00
|
|
|
|
#define PUT_REG_NOTE_KIND(LINK, KIND) \
|
|
|
|
|
PUT_MODE (LINK, (enum machine_mode) (KIND))
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
|
|
|
|
/* Names for REG_NOTE's in EXPR_LIST insn's. */
|
|
|
|
|
|
1999-08-21 01:11:19 +02:00
|
|
|
|
extern const char * const reg_note_name[];
|
1996-07-04 00:07:53 +02:00
|
|
|
|
#define GET_REG_NOTE_NAME(MODE) (reg_note_name[(int) (MODE)])
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
1994-05-06 23:40:25 +02:00
|
|
|
|
/* This field is only present on CALL_INSNs. It holds a chain of EXPR_LIST of
|
|
|
|
|
USE and CLOBBER expressions.
|
|
|
|
|
USE expressions list the registers filled with arguments that
|
|
|
|
|
are passed to the function.
|
|
|
|
|
CLOBBER expressions document the registers explicitly clobbered
|
|
|
|
|
by this CALL_INSN.
|
|
|
|
|
Pseudo registers can not be mentioned in this list. */
|
loop.c (emit_prefetch_instructions): Properly place the address computation.
* loop.c (emit_prefetch_instructions): Properly place the address computation.
* basic-block.h (basic_block_for_insn, BLOCK_FOR_INSN): Kill.
(set_block_for_insn): Turn into macro.
* cfgbuild.c (find_basic_block): Do not clear basic_block_for_insn.
* cfglayout.c (insn_scopes): Kill.
(scope_to_insns_initialize): Do not use insn_scopes.
(scope_to_insns_finalize): Likewise.
(duplicate_insn_chain): Likewise.
(cfg_layout_initialize, cfg_layout_finalize): Do not turn scopes to notes.
* cfgrtl.c (basic_block_for_insn): Kill.
(delete_insn_and_edges, delete_insn_chain_and_edges): Simplify.
(create_basic_block_structure): Use reorder_insns.
(compute_bb_for_insn): Do not use basic_block_for_insn.
(merge_blocks_nomove): Likewise.
(update_bb_for_insn): Likewise.
(verify_flow_info): Likewise.
(set_block_for_insn): Kill.
* combine.c (try_combine): Update gen_rtx_INSN call.
* emit-rtl.c (gen_label_rtx): Update gen_rtx_CODE_LABEL call.
(mark_insn_raw, make_jump_insn_raw, make_call_insn_raw): Clear
scopes and BBs.
(add_insn_after, add_insn_before, remove_insn, reorder_insns): Simplify.
(emit_note_before, emit_note_after, emit_line_note_after, emit_note):
Clear BB.
(emit_insns_after): Simplify.
(emit_copy_of_insn_after): Copy scope.
* final.c (final_start_function): Lower scopes.
* flow.c (check_function_return_warnings): Do not rely on deleted insn.
* integrate.c (copy_insn_list): Cope scopes.
* jump.c (duplicate_loop_exit_test): LIkewise; simplify.
* loop.c (loop_optimize): Do not care block notes.
* print-rtl.c (print_rtx): Print BB.
* recog.c (apply_change_group): Simplify.
* rtl.c (copy_rtx): Handle 'B'.
* rtl.def (INSN, CALL_INSN, JUMP_INSN, NOTE): Add extra fields.
* rtl.h (Field accessors): Update indexes.
* sched-ebb.c (schedule_ebbs): Do not lower notes.
* sched-rgn.c (schedule_insns): Likewise.
* toplev.c (rest_of_compilation): Lower notes.
* unroll.c (unroll_loop): Do not care scoping notes.
(copy_loop_body): Copy scopes.
From-SVN: r54188
2002-06-02 23:09:54 +02:00
|
|
|
|
#define CALL_INSN_FUNCTION_USAGE(INSN) XEXP(INSN, 9)
|
1994-05-06 23:40:25 +02:00
|
|
|
|
|
1991-12-06 22:00:31 +01:00
|
|
|
|
/* The label-number of a code-label. The assembler label
|
|
|
|
|
is made from `L' and the label-number printed in decimal.
|
|
|
|
|
Label numbers are unique in a compilation. */
|
loop.c (emit_prefetch_instructions): Properly place the address computation.
* loop.c (emit_prefetch_instructions): Properly place the address computation.
* basic-block.h (basic_block_for_insn, BLOCK_FOR_INSN): Kill.
(set_block_for_insn): Turn into macro.
* cfgbuild.c (find_basic_block): Do not clear basic_block_for_insn.
* cfglayout.c (insn_scopes): Kill.
(scope_to_insns_initialize): Do not use insn_scopes.
(scope_to_insns_finalize): Likewise.
(duplicate_insn_chain): Likewise.
(cfg_layout_initialize, cfg_layout_finalize): Do not turn scopes to notes.
* cfgrtl.c (basic_block_for_insn): Kill.
(delete_insn_and_edges, delete_insn_chain_and_edges): Simplify.
(create_basic_block_structure): Use reorder_insns.
(compute_bb_for_insn): Do not use basic_block_for_insn.
(merge_blocks_nomove): Likewise.
(update_bb_for_insn): Likewise.
(verify_flow_info): Likewise.
(set_block_for_insn): Kill.
* combine.c (try_combine): Update gen_rtx_INSN call.
* emit-rtl.c (gen_label_rtx): Update gen_rtx_CODE_LABEL call.
(mark_insn_raw, make_jump_insn_raw, make_call_insn_raw): Clear
scopes and BBs.
(add_insn_after, add_insn_before, remove_insn, reorder_insns): Simplify.
(emit_note_before, emit_note_after, emit_line_note_after, emit_note):
Clear BB.
(emit_insns_after): Simplify.
(emit_copy_of_insn_after): Copy scope.
* final.c (final_start_function): Lower scopes.
* flow.c (check_function_return_warnings): Do not rely on deleted insn.
* integrate.c (copy_insn_list): Cope scopes.
* jump.c (duplicate_loop_exit_test): LIkewise; simplify.
* loop.c (loop_optimize): Do not care block notes.
* print-rtl.c (print_rtx): Print BB.
* recog.c (apply_change_group): Simplify.
* rtl.c (copy_rtx): Handle 'B'.
* rtl.def (INSN, CALL_INSN, JUMP_INSN, NOTE): Add extra fields.
* rtl.h (Field accessors): Update indexes.
* sched-ebb.c (schedule_ebbs): Do not lower notes.
* sched-rgn.c (schedule_insns): Likewise.
* toplev.c (rest_of_compilation): Lower notes.
* unroll.c (unroll_loop): Do not care scoping notes.
(copy_loop_body): Copy scopes.
From-SVN: r54188
2002-06-02 23:09:54 +02:00
|
|
|
|
#define CODE_LABEL_NUMBER(INSN) XINT (INSN, 6)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
Makefile.in (HOST_RTL): Add $(HOST_PREFIX)bitmap.o.
* Makefile.in (HOST_RTL): Add $(HOST_PREFIX)bitmap.o.
(rtl.o, emit-rtl.o): Add dependency on bitmap.h.
($(HOST_PREFIX_1)rtl.o): Likewise.
($(HOST_PREFIX_1)bitmap.o): New host object.
* emit-rtl.c (toplevel): Include bitmap.h.
(gen_rtx): Handle 't' and 'b' nodes.
* print-rtl.c (print_rtx): Handle printing NOTE_INSN_LIVE notes.
Print block number for block begin/end notes. Print 't' type
nodes as a pointer. Know that the 3rd argument of live range
start/stop notes is really a range_info rtx. If type is 'b', print
out argument as a bitmap.
* rtl.c: Include bitmap.c.
(copy_rtx): Copy tree nodes as is. Copy bitmaps if type is 'b'.
(note_insn_name): Add NOTE_INSN_RANGE_{START,END}, NOTE_INSN_LIVE.
* rtl.def (RANGE_LIVE): New node to hold live information while we
recalculate the basic blocks.
(RANGE_REG, RANGE_INFO): New rtl types for live range splitting.
(RANGE_VAR): New node, to hold information saved in symbol node for New
communicating live range information to the debug output functions.
* rtl.h (rtunion_def): Add rttree and rtbit fields.
(XBITMAP, XTREE): New accessor macros.
(NOTE_LIVE_INFO): Overload NOTE_SOURCE_FILE for NOTE_INSN_LIVE notes.
(NOTE_RANGE_INFO): Similarly for NOTE_INSN_RANGE_{START,END} notes.
(NOTE_BLOCK_LIVE_RANGE_BLOCK): Define.
(NOTE_INSN_RANGE_START, NOTE_INSN_RANGE_END, NOTE_INSN_LIVE): New notes.
(RANGE_LIVE_{BITMAP,ORIG_BLOCK}): New accessor macros.
(RANGE_REG_{SYMBOL,BLOCK}_NODE, RANGE_VAR_*): New accessor macros.
(RANGE_INFO_*): Likewise.
* sched.c (sched_analyze): Keep live range start/stop notes.
(unlink_other_notes): Likewise.
* haifa-sched.c (sched_analyze): Keep live range start/stop notes.
(unlink_other_notes): Likewise.
* tree.h (BLOCK_LIVE_RANGE_{START,END,VAR_FLAG}): New accessor macros.
(BLOCK_LIVE_RANGE_FLAG): Likewise.
(DECL_LIVE_RANGE_RTL): Likewise.
(struct tree_block): Add live_range_flag, live_range_var_flag,
live_range_start and live_range_end.
(struct tree_decl): Add live_range_rtl field.
* gengenrtl.c (type_from_format): Handle 'b' and 't'.
(accessor_from_format): Likewise.
Co-Authored-By: Jeffrey A Law <law@cygnus.com>
From-SVN: r19727
1998-05-13 23:13:47 +02:00
|
|
|
|
/* In a NOTE that is a line number, this is a string for the file name that the
|
|
|
|
|
line is in. We use the same field to record block numbers temporarily in
|
|
|
|
|
NOTE_INSN_BLOCK_BEG and NOTE_INSN_BLOCK_END notes. (We avoid lots of casts
|
|
|
|
|
between ints and pointers if we use a different macro for the block number.)
|
2002-06-04 19:32:59 +02:00
|
|
|
|
*/
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2003-06-16 10:27:05 +02:00
|
|
|
|
/* Opaque data. */
|
2003-07-03 11:52:26 +02:00
|
|
|
|
#define NOTE_DATA(INSN) RTL_CHECKC1 (INSN, 4, NOTE)
|
Conditionally compile support for --enable-mapped_location.
* input.h: #include line-map.h for source_location typedef.
(BUILTINS_LOCATION, UNKNOWN_LOCATION, expand_location,
LOCATION_FILE, LOCATION_LINE): New macros and functions.
(expanded_location, source_locus): New typedefs.
(push_srcloc): Change parameter list if USE_MAPPED_LOCATION.
* rtl.def (NOTE, ASM_OPERANDS): Modify specifcation, if
USE_MAPPED_LOCATION.
* rtl.h (NOTE_DELETED_LABEL_NAME): New macro.
(NOTE_SOURCE_LOCATION, NOTE_EXPNDED_LOCATION, SET_INSN_DELETED):
New conditional macros.
(ASM_OPERANDS_SOURCE_FILE, ASM_OPERANDS_SOURCE_LINE): Replace
by ASM_OPERANDS_SOURCE_LOCATION if USE_MAPPED_LOCATION.
* tree.h (EXPR_LOCATION, SET_EXPR_LOCATION, EXPR_HAS_LOCATION,
EXPR_LOCUS, SET_EXPR_LOCUS, EXPR_FILENAME, EXPR_LINENO,
DECL_IS_BUILTIN): New macros, most depending on USE_MAPPED__LOCATION.
(tree_exp): Change type of locus to use new source_locus typedef.
* tree.c (build1_stat): Use SET_EXPR_LOCATION.
(annotate_with_locus, annotate_with_file_line): Conditionalize.
(expand_location): New function.
* toplev.c (unknown_location): New static, when USE_MAPPED_LOCATION.
(push_srcloc, pop_loc): Adjust parameter handling.
(process_options): Don't set input_filename by itself.
(lang_dependent_init): Save, set input_location to <built-in>.
(warn_deprecated_use): Use expand_location.
From-SVN: r83918
2004-06-30 19:58:21 +02:00
|
|
|
|
#define NOTE_DELETED_LABEL_NAME(INSN) XCSTR (INSN, 4, NOTE)
|
|
|
|
|
#ifdef USE_MAPPED_LOCATION
|
|
|
|
|
#define NOTE_SOURCE_LOCATION(INSN) XCUINT (INSN, 5, NOTE)
|
|
|
|
|
#define NOTE_EXPANDED_LOCATION(XLOC, INSN) \
|
|
|
|
|
(XLOC) = expand_location (NOTE_SOURCE_LOCATION (INSN))
|
|
|
|
|
#define SET_INSN_DELETED(INSN) \
|
|
|
|
|
(PUT_CODE (INSN, NOTE), NOTE_LINE_NUMBER (INSN) = NOTE_INSN_DELETED)
|
|
|
|
|
#else
|
|
|
|
|
#define NOTE_EXPANDED_LOCATION(XLOC, INSN) \
|
|
|
|
|
((XLOC).file = NOTE_SOURCE_FILE (INSN), \
|
|
|
|
|
(XLOC).line = NOTE_LINE_NUMBER (INSN))
|
2003-06-01 17:59:10 +02:00
|
|
|
|
#define NOTE_SOURCE_FILE(INSN) XCSTR (INSN, 4, NOTE)
|
Conditionally compile support for --enable-mapped_location.
* input.h: #include line-map.h for source_location typedef.
(BUILTINS_LOCATION, UNKNOWN_LOCATION, expand_location,
LOCATION_FILE, LOCATION_LINE): New macros and functions.
(expanded_location, source_locus): New typedefs.
(push_srcloc): Change parameter list if USE_MAPPED_LOCATION.
* rtl.def (NOTE, ASM_OPERANDS): Modify specifcation, if
USE_MAPPED_LOCATION.
* rtl.h (NOTE_DELETED_LABEL_NAME): New macro.
(NOTE_SOURCE_LOCATION, NOTE_EXPNDED_LOCATION, SET_INSN_DELETED):
New conditional macros.
(ASM_OPERANDS_SOURCE_FILE, ASM_OPERANDS_SOURCE_LINE): Replace
by ASM_OPERANDS_SOURCE_LOCATION if USE_MAPPED_LOCATION.
* tree.h (EXPR_LOCATION, SET_EXPR_LOCATION, EXPR_HAS_LOCATION,
EXPR_LOCUS, SET_EXPR_LOCUS, EXPR_FILENAME, EXPR_LINENO,
DECL_IS_BUILTIN): New macros, most depending on USE_MAPPED__LOCATION.
(tree_exp): Change type of locus to use new source_locus typedef.
* tree.c (build1_stat): Use SET_EXPR_LOCATION.
(annotate_with_locus, annotate_with_file_line): Conditionalize.
(expand_location): New function.
* toplev.c (unknown_location): New static, when USE_MAPPED_LOCATION.
(push_srcloc, pop_loc): Adjust parameter handling.
(process_options): Don't set input_filename by itself.
(lang_dependent_init): Save, set input_location to <built-in>.
(warn_deprecated_use): Use expand_location.
From-SVN: r83918
2004-06-30 19:58:21 +02:00
|
|
|
|
#define SET_INSN_DELETED(INSN) \
|
|
|
|
|
(PUT_CODE (INSN, NOTE), NOTE_SOURCE_FILE (INSN) = 0, \
|
|
|
|
|
NOTE_LINE_NUMBER (INSN) = NOTE_INSN_DELETED)
|
|
|
|
|
#endif
|
loop.c (emit_prefetch_instructions): Properly place the address computation.
* loop.c (emit_prefetch_instructions): Properly place the address computation.
* basic-block.h (basic_block_for_insn, BLOCK_FOR_INSN): Kill.
(set_block_for_insn): Turn into macro.
* cfgbuild.c (find_basic_block): Do not clear basic_block_for_insn.
* cfglayout.c (insn_scopes): Kill.
(scope_to_insns_initialize): Do not use insn_scopes.
(scope_to_insns_finalize): Likewise.
(duplicate_insn_chain): Likewise.
(cfg_layout_initialize, cfg_layout_finalize): Do not turn scopes to notes.
* cfgrtl.c (basic_block_for_insn): Kill.
(delete_insn_and_edges, delete_insn_chain_and_edges): Simplify.
(create_basic_block_structure): Use reorder_insns.
(compute_bb_for_insn): Do not use basic_block_for_insn.
(merge_blocks_nomove): Likewise.
(update_bb_for_insn): Likewise.
(verify_flow_info): Likewise.
(set_block_for_insn): Kill.
* combine.c (try_combine): Update gen_rtx_INSN call.
* emit-rtl.c (gen_label_rtx): Update gen_rtx_CODE_LABEL call.
(mark_insn_raw, make_jump_insn_raw, make_call_insn_raw): Clear
scopes and BBs.
(add_insn_after, add_insn_before, remove_insn, reorder_insns): Simplify.
(emit_note_before, emit_note_after, emit_line_note_after, emit_note):
Clear BB.
(emit_insns_after): Simplify.
(emit_copy_of_insn_after): Copy scope.
* final.c (final_start_function): Lower scopes.
* flow.c (check_function_return_warnings): Do not rely on deleted insn.
* integrate.c (copy_insn_list): Cope scopes.
* jump.c (duplicate_loop_exit_test): LIkewise; simplify.
* loop.c (loop_optimize): Do not care block notes.
* print-rtl.c (print_rtx): Print BB.
* recog.c (apply_change_group): Simplify.
* rtl.c (copy_rtx): Handle 'B'.
* rtl.def (INSN, CALL_INSN, JUMP_INSN, NOTE): Add extra fields.
* rtl.h (Field accessors): Update indexes.
* sched-ebb.c (schedule_ebbs): Do not lower notes.
* sched-rgn.c (schedule_insns): Likewise.
* toplev.c (rest_of_compilation): Lower notes.
* unroll.c (unroll_loop): Do not care scoping notes.
(copy_loop_body): Copy scopes.
From-SVN: r54188
2002-06-02 23:09:54 +02:00
|
|
|
|
#define NOTE_BLOCK(INSN) XCTREE (INSN, 4, NOTE)
|
|
|
|
|
#define NOTE_EH_HANDLER(INSN) XCINT (INSN, 4, NOTE)
|
|
|
|
|
#define NOTE_BASIC_BLOCK(INSN) XCBBDEF (INSN, 4, NOTE)
|
|
|
|
|
#define NOTE_EXPECTED_VALUE(INSN) XCEXP (INSN, 4, NOTE)
|
2004-02-06 21:03:45 +01:00
|
|
|
|
#define NOTE_VAR_LOCATION(INSN) XCEXP (INSN, 4, NOTE)
|
Makefile.in (HOST_RTL): Add $(HOST_PREFIX)bitmap.o.
* Makefile.in (HOST_RTL): Add $(HOST_PREFIX)bitmap.o.
(rtl.o, emit-rtl.o): Add dependency on bitmap.h.
($(HOST_PREFIX_1)rtl.o): Likewise.
($(HOST_PREFIX_1)bitmap.o): New host object.
* emit-rtl.c (toplevel): Include bitmap.h.
(gen_rtx): Handle 't' and 'b' nodes.
* print-rtl.c (print_rtx): Handle printing NOTE_INSN_LIVE notes.
Print block number for block begin/end notes. Print 't' type
nodes as a pointer. Know that the 3rd argument of live range
start/stop notes is really a range_info rtx. If type is 'b', print
out argument as a bitmap.
* rtl.c: Include bitmap.c.
(copy_rtx): Copy tree nodes as is. Copy bitmaps if type is 'b'.
(note_insn_name): Add NOTE_INSN_RANGE_{START,END}, NOTE_INSN_LIVE.
* rtl.def (RANGE_LIVE): New node to hold live information while we
recalculate the basic blocks.
(RANGE_REG, RANGE_INFO): New rtl types for live range splitting.
(RANGE_VAR): New node, to hold information saved in symbol node for New
communicating live range information to the debug output functions.
* rtl.h (rtunion_def): Add rttree and rtbit fields.
(XBITMAP, XTREE): New accessor macros.
(NOTE_LIVE_INFO): Overload NOTE_SOURCE_FILE for NOTE_INSN_LIVE notes.
(NOTE_RANGE_INFO): Similarly for NOTE_INSN_RANGE_{START,END} notes.
(NOTE_BLOCK_LIVE_RANGE_BLOCK): Define.
(NOTE_INSN_RANGE_START, NOTE_INSN_RANGE_END, NOTE_INSN_LIVE): New notes.
(RANGE_LIVE_{BITMAP,ORIG_BLOCK}): New accessor macros.
(RANGE_REG_{SYMBOL,BLOCK}_NODE, RANGE_VAR_*): New accessor macros.
(RANGE_INFO_*): Likewise.
* sched.c (sched_analyze): Keep live range start/stop notes.
(unlink_other_notes): Likewise.
* haifa-sched.c (sched_analyze): Keep live range start/stop notes.
(unlink_other_notes): Likewise.
* tree.h (BLOCK_LIVE_RANGE_{START,END,VAR_FLAG}): New accessor macros.
(BLOCK_LIVE_RANGE_FLAG): Likewise.
(DECL_LIVE_RANGE_RTL): Likewise.
(struct tree_block): Add live_range_flag, live_range_var_flag,
live_range_start and live_range_end.
(struct tree_decl): Add live_range_rtl field.
* gengenrtl.c (type_from_format): Handle 'b' and 't'.
(accessor_from_format): Likewise.
Co-Authored-By: Jeffrey A Law <law@cygnus.com>
From-SVN: r19727
1998-05-13 23:13:47 +02:00
|
|
|
|
|
1991-12-06 22:00:31 +01:00
|
|
|
|
/* In a NOTE that is a line number, this is the line number.
|
|
|
|
|
Other kinds of NOTEs are identified by negative numbers here. */
|
loop.c (emit_prefetch_instructions): Properly place the address computation.
* loop.c (emit_prefetch_instructions): Properly place the address computation.
* basic-block.h (basic_block_for_insn, BLOCK_FOR_INSN): Kill.
(set_block_for_insn): Turn into macro.
* cfgbuild.c (find_basic_block): Do not clear basic_block_for_insn.
* cfglayout.c (insn_scopes): Kill.
(scope_to_insns_initialize): Do not use insn_scopes.
(scope_to_insns_finalize): Likewise.
(duplicate_insn_chain): Likewise.
(cfg_layout_initialize, cfg_layout_finalize): Do not turn scopes to notes.
* cfgrtl.c (basic_block_for_insn): Kill.
(delete_insn_and_edges, delete_insn_chain_and_edges): Simplify.
(create_basic_block_structure): Use reorder_insns.
(compute_bb_for_insn): Do not use basic_block_for_insn.
(merge_blocks_nomove): Likewise.
(update_bb_for_insn): Likewise.
(verify_flow_info): Likewise.
(set_block_for_insn): Kill.
* combine.c (try_combine): Update gen_rtx_INSN call.
* emit-rtl.c (gen_label_rtx): Update gen_rtx_CODE_LABEL call.
(mark_insn_raw, make_jump_insn_raw, make_call_insn_raw): Clear
scopes and BBs.
(add_insn_after, add_insn_before, remove_insn, reorder_insns): Simplify.
(emit_note_before, emit_note_after, emit_line_note_after, emit_note):
Clear BB.
(emit_insns_after): Simplify.
(emit_copy_of_insn_after): Copy scope.
* final.c (final_start_function): Lower scopes.
* flow.c (check_function_return_warnings): Do not rely on deleted insn.
* integrate.c (copy_insn_list): Cope scopes.
* jump.c (duplicate_loop_exit_test): LIkewise; simplify.
* loop.c (loop_optimize): Do not care block notes.
* print-rtl.c (print_rtx): Print BB.
* recog.c (apply_change_group): Simplify.
* rtl.c (copy_rtx): Handle 'B'.
* rtl.def (INSN, CALL_INSN, JUMP_INSN, NOTE): Add extra fields.
* rtl.h (Field accessors): Update indexes.
* sched-ebb.c (schedule_ebbs): Do not lower notes.
* sched-rgn.c (schedule_insns): Likewise.
* toplev.c (rest_of_compilation): Lower notes.
* unroll.c (unroll_loop): Do not care scoping notes.
(copy_loop_body): Copy scopes.
From-SVN: r54188
2002-06-02 23:09:54 +02:00
|
|
|
|
#define NOTE_LINE_NUMBER(INSN) XCINT (INSN, 5, NOTE)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2000-07-27 19:25:14 +02:00
|
|
|
|
/* Nonzero if INSN is a note marking the beginning of a basic block. */
|
2003-06-01 17:59:10 +02:00
|
|
|
|
#define NOTE_INSN_BASIC_BLOCK_P(INSN) \
|
2000-07-27 19:25:14 +02:00
|
|
|
|
(GET_CODE (INSN) == NOTE \
|
|
|
|
|
&& NOTE_LINE_NUMBER (INSN) == NOTE_INSN_BASIC_BLOCK)
|
|
|
|
|
|
2004-02-06 21:03:45 +01:00
|
|
|
|
/* Variable declaration and the location of a variable. */
|
|
|
|
|
#define NOTE_VAR_LOCATION_DECL(INSN) (XCTREE (XCEXP (INSN, 4, NOTE), \
|
|
|
|
|
0, VAR_LOCATION))
|
|
|
|
|
#define NOTE_VAR_LOCATION_LOC(INSN) (XCEXP (XCEXP (INSN, 4, NOTE), \
|
|
|
|
|
1, VAR_LOCATION))
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2004-08-19 00:31:03 +02:00
|
|
|
|
/* Codes that appear in the NOTE_LINE_NUMBER field for kinds of notes
|
|
|
|
|
that are not line numbers. These codes are all negative.
|
|
|
|
|
|
1993-04-26 02:18:16 +02:00
|
|
|
|
Notice that we do not try to use zero here for any of
|
|
|
|
|
the special note codes because sometimes the source line
|
|
|
|
|
actually can be zero! This happens (for example) when we
|
|
|
|
|
are generating code for the per-translation-unit constructor
|
2004-08-19 00:31:03 +02:00
|
|
|
|
and destructor routines for some C++ translation unit. */
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2000-04-16 22:23:02 +02:00
|
|
|
|
enum insn_note
|
|
|
|
|
{
|
|
|
|
|
/* Keep all of these numbers negative. Adjust as needed. */
|
|
|
|
|
NOTE_INSN_BIAS = -100,
|
|
|
|
|
|
2004-08-19 00:31:03 +02:00
|
|
|
|
#define DEF_INSN_NOTE(NAME) NAME,
|
|
|
|
|
#include "insn-notes.def"
|
|
|
|
|
#undef DEF_INSN_NOTE
|
2004-02-06 21:03:45 +01:00
|
|
|
|
|
2000-04-16 22:23:02 +02:00
|
|
|
|
NOTE_INSN_MAX
|
|
|
|
|
};
|
1992-07-12 20:05:02 +02:00
|
|
|
|
|
1991-12-06 22:00:31 +01:00
|
|
|
|
/* Names for NOTE insn's other than line numbers. */
|
|
|
|
|
|
2000-04-16 22:23:02 +02:00
|
|
|
|
extern const char * const note_insn_name[NOTE_INSN_MAX - NOTE_INSN_BIAS];
|
|
|
|
|
#define GET_NOTE_INSN_NAME(NOTE_CODE) \
|
2001-03-02 22:41:37 +01:00
|
|
|
|
(note_insn_name[(NOTE_CODE) - (int) NOTE_INSN_BIAS])
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
|
|
|
|
/* The name of a label, in case it corresponds to an explicit label
|
|
|
|
|
in the input source code. */
|
loop.c (emit_prefetch_instructions): Properly place the address computation.
* loop.c (emit_prefetch_instructions): Properly place the address computation.
* basic-block.h (basic_block_for_insn, BLOCK_FOR_INSN): Kill.
(set_block_for_insn): Turn into macro.
* cfgbuild.c (find_basic_block): Do not clear basic_block_for_insn.
* cfglayout.c (insn_scopes): Kill.
(scope_to_insns_initialize): Do not use insn_scopes.
(scope_to_insns_finalize): Likewise.
(duplicate_insn_chain): Likewise.
(cfg_layout_initialize, cfg_layout_finalize): Do not turn scopes to notes.
* cfgrtl.c (basic_block_for_insn): Kill.
(delete_insn_and_edges, delete_insn_chain_and_edges): Simplify.
(create_basic_block_structure): Use reorder_insns.
(compute_bb_for_insn): Do not use basic_block_for_insn.
(merge_blocks_nomove): Likewise.
(update_bb_for_insn): Likewise.
(verify_flow_info): Likewise.
(set_block_for_insn): Kill.
* combine.c (try_combine): Update gen_rtx_INSN call.
* emit-rtl.c (gen_label_rtx): Update gen_rtx_CODE_LABEL call.
(mark_insn_raw, make_jump_insn_raw, make_call_insn_raw): Clear
scopes and BBs.
(add_insn_after, add_insn_before, remove_insn, reorder_insns): Simplify.
(emit_note_before, emit_note_after, emit_line_note_after, emit_note):
Clear BB.
(emit_insns_after): Simplify.
(emit_copy_of_insn_after): Copy scope.
* final.c (final_start_function): Lower scopes.
* flow.c (check_function_return_warnings): Do not rely on deleted insn.
* integrate.c (copy_insn_list): Cope scopes.
* jump.c (duplicate_loop_exit_test): LIkewise; simplify.
* loop.c (loop_optimize): Do not care block notes.
* print-rtl.c (print_rtx): Print BB.
* recog.c (apply_change_group): Simplify.
* rtl.c (copy_rtx): Handle 'B'.
* rtl.def (INSN, CALL_INSN, JUMP_INSN, NOTE): Add extra fields.
* rtl.h (Field accessors): Update indexes.
* sched-ebb.c (schedule_ebbs): Do not lower notes.
* sched-rgn.c (schedule_insns): Likewise.
* toplev.c (rest_of_compilation): Lower notes.
* unroll.c (unroll_loop): Do not care scoping notes.
(copy_loop_body): Copy scopes.
From-SVN: r54188
2002-06-02 23:09:54 +02:00
|
|
|
|
#define LABEL_NAME(RTX) XCSTR (RTX, 7, CODE_LABEL)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
|
|
|
|
/* In jump.c, each label contains a count of the number
|
|
|
|
|
of LABEL_REFs that point at it, so unused labels can be deleted. */
|
loop.c (emit_prefetch_instructions): Properly place the address computation.
* loop.c (emit_prefetch_instructions): Properly place the address computation.
* basic-block.h (basic_block_for_insn, BLOCK_FOR_INSN): Kill.
(set_block_for_insn): Turn into macro.
* cfgbuild.c (find_basic_block): Do not clear basic_block_for_insn.
* cfglayout.c (insn_scopes): Kill.
(scope_to_insns_initialize): Do not use insn_scopes.
(scope_to_insns_finalize): Likewise.
(duplicate_insn_chain): Likewise.
(cfg_layout_initialize, cfg_layout_finalize): Do not turn scopes to notes.
* cfgrtl.c (basic_block_for_insn): Kill.
(delete_insn_and_edges, delete_insn_chain_and_edges): Simplify.
(create_basic_block_structure): Use reorder_insns.
(compute_bb_for_insn): Do not use basic_block_for_insn.
(merge_blocks_nomove): Likewise.
(update_bb_for_insn): Likewise.
(verify_flow_info): Likewise.
(set_block_for_insn): Kill.
* combine.c (try_combine): Update gen_rtx_INSN call.
* emit-rtl.c (gen_label_rtx): Update gen_rtx_CODE_LABEL call.
(mark_insn_raw, make_jump_insn_raw, make_call_insn_raw): Clear
scopes and BBs.
(add_insn_after, add_insn_before, remove_insn, reorder_insns): Simplify.
(emit_note_before, emit_note_after, emit_line_note_after, emit_note):
Clear BB.
(emit_insns_after): Simplify.
(emit_copy_of_insn_after): Copy scope.
* final.c (final_start_function): Lower scopes.
* flow.c (check_function_return_warnings): Do not rely on deleted insn.
* integrate.c (copy_insn_list): Cope scopes.
* jump.c (duplicate_loop_exit_test): LIkewise; simplify.
* loop.c (loop_optimize): Do not care block notes.
* print-rtl.c (print_rtx): Print BB.
* recog.c (apply_change_group): Simplify.
* rtl.c (copy_rtx): Handle 'B'.
* rtl.def (INSN, CALL_INSN, JUMP_INSN, NOTE): Add extra fields.
* rtl.h (Field accessors): Update indexes.
* sched-ebb.c (schedule_ebbs): Do not lower notes.
* sched-rgn.c (schedule_insns): Likewise.
* toplev.c (rest_of_compilation): Lower notes.
* unroll.c (unroll_loop): Do not care scoping notes.
(copy_loop_body): Copy scopes.
From-SVN: r54188
2002-06-02 23:09:54 +02:00
|
|
|
|
#define LABEL_NUSES(RTX) XCINT (RTX, 4, CODE_LABEL)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2002-07-20 01:11:19 +02:00
|
|
|
|
/* Labels carry a two-bit field composed of the ->jump and ->call
|
|
|
|
|
bits. This field indicates whether the label is an alternate
|
|
|
|
|
entry point, and if so, what kind. */
|
|
|
|
|
enum label_kind
|
|
|
|
|
{
|
|
|
|
|
LABEL_NORMAL = 0, /* ordinary label */
|
|
|
|
|
LABEL_STATIC_ENTRY, /* alternate entry point, not exported */
|
|
|
|
|
LABEL_GLOBAL_ENTRY, /* alternate entry point, exported */
|
|
|
|
|
LABEL_WEAK_ENTRY /* alternate entry point, exported as weak symbol */
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#if defined ENABLE_RTL_FLAG_CHECKING && (GCC_VERSION > 2007)
|
|
|
|
|
|
|
|
|
|
/* Retrieve the kind of LABEL. */
|
|
|
|
|
#define LABEL_KIND(LABEL) __extension__ \
|
|
|
|
|
({ rtx const _label = (LABEL); \
|
|
|
|
|
if (GET_CODE (_label) != CODE_LABEL) \
|
|
|
|
|
rtl_check_failed_flag ("LABEL_KIND", _label, __FILE__, __LINE__, \
|
|
|
|
|
__FUNCTION__); \
|
|
|
|
|
(enum label_kind) ((_label->jump << 1) | _label->call); })
|
|
|
|
|
|
|
|
|
|
/* Set the kind of LABEL. */
|
|
|
|
|
#define SET_LABEL_KIND(LABEL, KIND) do { \
|
|
|
|
|
rtx _label = (LABEL); \
|
|
|
|
|
unsigned int _kind = (KIND); \
|
|
|
|
|
if (GET_CODE (_label) != CODE_LABEL) \
|
|
|
|
|
rtl_check_failed_flag ("SET_LABEL_KIND", _label, __FILE__, __LINE__, \
|
|
|
|
|
__FUNCTION__); \
|
|
|
|
|
_label->jump = ((_kind >> 1) & 1); \
|
|
|
|
|
_label->call = (_kind & 1); \
|
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
|
|
/* Retrieve the kind of LABEL. */
|
|
|
|
|
#define LABEL_KIND(LABEL) \
|
|
|
|
|
((enum label_kind) (((LABEL)->jump << 1) | (LABEL)->call))
|
|
|
|
|
|
|
|
|
|
/* Set the kind of LABEL. */
|
|
|
|
|
#define SET_LABEL_KIND(LABEL, KIND) do { \
|
|
|
|
|
rtx _label = (LABEL); \
|
|
|
|
|
unsigned int _kind = (KIND); \
|
|
|
|
|
_label->jump = ((_kind >> 1) & 1); \
|
|
|
|
|
_label->call = (_kind & 1); \
|
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
|
|
#endif /* rtl flag checking */
|
|
|
|
|
|
|
|
|
|
#define LABEL_ALT_ENTRY_P(LABEL) (LABEL_KIND (LABEL) != LABEL_NORMAL)
|
1999-11-03 22:55:51 +01:00
|
|
|
|
|
1991-12-06 22:00:31 +01:00
|
|
|
|
/* In jump.c, each JUMP_INSN can point to a label that it can jump to,
|
|
|
|
|
so that if the JUMP_INSN is deleted, the label's LABEL_NUSES can
|
|
|
|
|
be decremented and possibly the label can be deleted. */
|
loop.c (emit_prefetch_instructions): Properly place the address computation.
* loop.c (emit_prefetch_instructions): Properly place the address computation.
* basic-block.h (basic_block_for_insn, BLOCK_FOR_INSN): Kill.
(set_block_for_insn): Turn into macro.
* cfgbuild.c (find_basic_block): Do not clear basic_block_for_insn.
* cfglayout.c (insn_scopes): Kill.
(scope_to_insns_initialize): Do not use insn_scopes.
(scope_to_insns_finalize): Likewise.
(duplicate_insn_chain): Likewise.
(cfg_layout_initialize, cfg_layout_finalize): Do not turn scopes to notes.
* cfgrtl.c (basic_block_for_insn): Kill.
(delete_insn_and_edges, delete_insn_chain_and_edges): Simplify.
(create_basic_block_structure): Use reorder_insns.
(compute_bb_for_insn): Do not use basic_block_for_insn.
(merge_blocks_nomove): Likewise.
(update_bb_for_insn): Likewise.
(verify_flow_info): Likewise.
(set_block_for_insn): Kill.
* combine.c (try_combine): Update gen_rtx_INSN call.
* emit-rtl.c (gen_label_rtx): Update gen_rtx_CODE_LABEL call.
(mark_insn_raw, make_jump_insn_raw, make_call_insn_raw): Clear
scopes and BBs.
(add_insn_after, add_insn_before, remove_insn, reorder_insns): Simplify.
(emit_note_before, emit_note_after, emit_line_note_after, emit_note):
Clear BB.
(emit_insns_after): Simplify.
(emit_copy_of_insn_after): Copy scope.
* final.c (final_start_function): Lower scopes.
* flow.c (check_function_return_warnings): Do not rely on deleted insn.
* integrate.c (copy_insn_list): Cope scopes.
* jump.c (duplicate_loop_exit_test): LIkewise; simplify.
* loop.c (loop_optimize): Do not care block notes.
* print-rtl.c (print_rtx): Print BB.
* recog.c (apply_change_group): Simplify.
* rtl.c (copy_rtx): Handle 'B'.
* rtl.def (INSN, CALL_INSN, JUMP_INSN, NOTE): Add extra fields.
* rtl.h (Field accessors): Update indexes.
* sched-ebb.c (schedule_ebbs): Do not lower notes.
* sched-rgn.c (schedule_insns): Likewise.
* toplev.c (rest_of_compilation): Lower notes.
* unroll.c (unroll_loop): Do not care scoping notes.
(copy_loop_body): Copy scopes.
From-SVN: r54188
2002-06-02 23:09:54 +02:00
|
|
|
|
#define JUMP_LABEL(INSN) XCEXP (INSN, 9, JUMP_INSN)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
|
|
|
|
/* Once basic blocks are found in flow.c,
|
|
|
|
|
each CODE_LABEL starts a chain that goes through
|
|
|
|
|
all the LABEL_REFs that jump to that label.
|
2000-05-12 18:26:15 +02:00
|
|
|
|
The chain eventually winds up at the CODE_LABEL: it is circular. */
|
loop.c (emit_prefetch_instructions): Properly place the address computation.
* loop.c (emit_prefetch_instructions): Properly place the address computation.
* basic-block.h (basic_block_for_insn, BLOCK_FOR_INSN): Kill.
(set_block_for_insn): Turn into macro.
* cfgbuild.c (find_basic_block): Do not clear basic_block_for_insn.
* cfglayout.c (insn_scopes): Kill.
(scope_to_insns_initialize): Do not use insn_scopes.
(scope_to_insns_finalize): Likewise.
(duplicate_insn_chain): Likewise.
(cfg_layout_initialize, cfg_layout_finalize): Do not turn scopes to notes.
* cfgrtl.c (basic_block_for_insn): Kill.
(delete_insn_and_edges, delete_insn_chain_and_edges): Simplify.
(create_basic_block_structure): Use reorder_insns.
(compute_bb_for_insn): Do not use basic_block_for_insn.
(merge_blocks_nomove): Likewise.
(update_bb_for_insn): Likewise.
(verify_flow_info): Likewise.
(set_block_for_insn): Kill.
* combine.c (try_combine): Update gen_rtx_INSN call.
* emit-rtl.c (gen_label_rtx): Update gen_rtx_CODE_LABEL call.
(mark_insn_raw, make_jump_insn_raw, make_call_insn_raw): Clear
scopes and BBs.
(add_insn_after, add_insn_before, remove_insn, reorder_insns): Simplify.
(emit_note_before, emit_note_after, emit_line_note_after, emit_note):
Clear BB.
(emit_insns_after): Simplify.
(emit_copy_of_insn_after): Copy scope.
* final.c (final_start_function): Lower scopes.
* flow.c (check_function_return_warnings): Do not rely on deleted insn.
* integrate.c (copy_insn_list): Cope scopes.
* jump.c (duplicate_loop_exit_test): LIkewise; simplify.
* loop.c (loop_optimize): Do not care block notes.
* print-rtl.c (print_rtx): Print BB.
* recog.c (apply_change_group): Simplify.
* rtl.c (copy_rtx): Handle 'B'.
* rtl.def (INSN, CALL_INSN, JUMP_INSN, NOTE): Add extra fields.
* rtl.h (Field accessors): Update indexes.
* sched-ebb.c (schedule_ebbs): Do not lower notes.
* sched-rgn.c (schedule_insns): Likewise.
* toplev.c (rest_of_compilation): Lower notes.
* unroll.c (unroll_loop): Do not care scoping notes.
(copy_loop_body): Copy scopes.
From-SVN: r54188
2002-06-02 23:09:54 +02:00
|
|
|
|
#define LABEL_REFS(LABEL) XCEXP (LABEL, 5, CODE_LABEL)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
|
|
|
|
/* This is the field in the LABEL_REF through which the circular chain
|
|
|
|
|
of references to a particular label is linked.
|
cse.c (CHEAP_REGNO): Redefine using REGNO_PTR_FRAME_P and HARD_REGISTER_NUM_P.
* cse.c (CHEAP_REGNO): Redefine using REGNO_PTR_FRAME_P and
HARD_REGISTER_NUM_P.
* cselib.c (new_cselib_val): Make comment correct and more detailed.
* flow.c (mark_set_1): Likewise.
* except.c (duplicate_eh_region_1, duplicate_eh_region_2,
duplicate_eh_regions): Remove.
* except.h (duplicate_eh_regions): Remove prototype.
* integrate.c (get_label_from_map, copy_rtx_and_substitute,
global_const_equiv_varray): Remove.
* integrate.h (get_label_from_map, copy_rtx_and_substitute,
global_const_equiv_varray, set_label_in_map): Remove prototypes,
extern declaration, and #define.
(MAYBE_EXTEND_CONST_EQUIV_VARRAY, SET_CONST_EQUIV_DATA): Remove.
(struct inline_remap): Remove.
* varray.c (struct element): Remove entry for const_equiv_data.
* varray.h (struct const_equiv_data): Remove.
(enum varray_data_enum) <VARRAY_DATA_CONST_EQUIV>: Remove.
(union varray_data_tag) <const_equiv>: Remove.
(VARRAY_CONST_EQUIV_INIT, VARRAY_CONST_EQUIV,
VARRAY_PUSH_CONST_EQUIV, VARRAY_TOP_CONST_EQUIV): Remove.
* regstack.c (record_label_references): Remove unused function.
* rtl.def (VALUE): Update comment.
(LABEL_REF): Remove unused operand 2.
* rtl.h (struct rtx_def): Update for removed accessor macros.
(XCADVFLAGS, INSN_DEAD_CODE_P, LINE_NUMBER, CONTAINING_INSN,
REG_LOOP_TEST_P): Remove.
(ADDR_DIFF_VEC_FLAGS, CSELIB_VAL_PTR, LABEL_NEXTREF): Add comments.
* web.c (entry_register): Don't copy REG_LOOP_TEST_P.
* doc/rtl.texi (INSN_DEAD_CODE_P, REG_LOOP_TEST_P): Remove.
From-SVN: r90580
2004-11-13 15:18:04 +01:00
|
|
|
|
FIXME: This chain is used in loop.c and in the SH backend.
|
|
|
|
|
Since loop.c is about to go away, it could be a win to replace
|
|
|
|
|
the uses of this in the SH backend with something else. */
|
2002-01-03 06:11:05 +01:00
|
|
|
|
#define LABEL_NEXTREF(REF) XCEXP (REF, 1, LABEL_REF)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2000-12-29 18:35:57 +01:00
|
|
|
|
/* For a REG rtx, REGNO extracts the register number. ORIGINAL_REGNO holds
|
|
|
|
|
the number the register originally had; for a pseudo register turned into
|
|
|
|
|
a hard reg this will hold the old pseudo register number. */
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2002-01-03 06:11:05 +01:00
|
|
|
|
#define REGNO(RTX) XCUINT (RTX, 0, REG)
|
|
|
|
|
#define ORIGINAL_REGNO(RTX) X0UINT (RTX, 1)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2002-11-27 03:29:12 +01:00
|
|
|
|
/* 1 if RTX is a reg or parallel that is the current function's return
|
|
|
|
|
value. */
|
2002-05-09 00:37:21 +02:00
|
|
|
|
#define REG_FUNCTION_VALUE_P(RTX) \
|
2004-05-13 08:41:07 +02:00
|
|
|
|
(RTL_FLAG_CHECK2("REG_FUNCTION_VALUE_P", (RTX), REG, PARALLEL)->return_val)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2002-05-09 00:37:21 +02:00
|
|
|
|
/* 1 if RTX is a reg that corresponds to a variable declared by the user. */
|
|
|
|
|
#define REG_USERVAR_P(RTX) \
|
|
|
|
|
(RTL_FLAG_CHECK1("REG_USERVAR_P", (RTX), REG)->volatil)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2002-05-09 00:37:21 +02:00
|
|
|
|
/* 1 if RTX is a reg that holds a pointer value. */
|
|
|
|
|
#define REG_POINTER(RTX) \
|
|
|
|
|
(RTL_FLAG_CHECK1("REG_POINTER", (RTX), REG)->frame_related)
|
2000-11-30 07:31:19 +01:00
|
|
|
|
|
2004-03-21 00:08:57 +01:00
|
|
|
|
/* 1 if RTX is a mem that holds a pointer value. */
|
|
|
|
|
#define MEM_POINTER(RTX) \
|
|
|
|
|
(RTL_FLAG_CHECK1("MEM_POINTER", (RTX), MEM)->frame_related)
|
|
|
|
|
|
2000-07-31 19:33:28 +02:00
|
|
|
|
/* 1 if the given register REG corresponds to a hard register. */
|
|
|
|
|
#define HARD_REGISTER_P(REG) (HARD_REGISTER_NUM_P (REGNO (REG)))
|
|
|
|
|
|
|
|
|
|
/* 1 if the given register number REG_NO corresponds to a hard register. */
|
2002-01-03 06:11:05 +01:00
|
|
|
|
#define HARD_REGISTER_NUM_P(REG_NO) ((REG_NO) < FIRST_PSEUDO_REGISTER)
|
2000-07-31 19:33:28 +02:00
|
|
|
|
|
1991-12-06 22:00:31 +01:00
|
|
|
|
/* For a CONST_INT rtx, INTVAL extracts the integer. */
|
flow.c (propagate_block): Use XEXP not SET_DEST for a USE.
* flow.c (propagate_block): Use XEXP not SET_DEST for a USE.
(recompute_reg_usage): Likewise.
* rtlanal.c (find_regno_fusage): Likewise.
* rtl.c (rtl_check_failed_code1): New function.
(rtl_check_failed_code2): New.
* rtl.h (RTL_CHECK1, RTL_CHECK2, RTVEC_ELT): Parenthesize args.
(RTL_CHECKC1, RTL_CHECKC2): New.
(XC*): New accessor macros.
(NOTE_*, LABEL_NAME, LABEL_NUSES, ADDRESSOF_REGNO): Use them.
(ADDRESSOF_DECL, JUMP_LABEL, LABEL_REFS, LABEL_NEXTREF): Likewise.
(CONTAINING_INSN, REGNO, INTVAL, SUBREG_REG, SUBREG_WORD): Likewise.
(ASM_OPERANDS_*, MEM_ALIAS_SET, SET_SRC, SET_DEST): Likewise.
(TRAP_*, RANGE_INFO_*): Likewise.
From-SVN: r29089
1999-09-04 00:23:11 +02:00
|
|
|
|
#define INTVAL(RTX) XCWINT(RTX, 0, CONST_INT)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
[multiple changes]
2000-08-04 Andreas Schwab <schwab@suse.de>
* cppmain.c (cb_def_pragma): Skip the first two tokens from the
token list, which are always `#' and `pragma'.
2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
* tree.c (tree_expr_nonnegative_p): Move to...
* fold-const.c: ... here. Also handle BIND_EXPR and RTL_EXPR.
(rtl_expr_nonnegative_p): New.
* tree.h: Add prototype for rtl_expr_nonnegative_p.
* real.h (CONST_DOUBLE_LOW, CONST_DOUBLE_HIGH, CONST_DOUBLE_MEM,
CONST_DOUBLE_CHAIN: Move to...
* rtl.h: ...here. Use XCINT/XCEXP.
* Makefile.in: Remove toplev.o from OBJS. Add rule to make
libbackend.a; add libbackend.a to STAGESTUFF. Add BACKEND
variable. Use BACKEND when linking cc1, not OBJS. Add BACKEND
to VOL_FILES.
* objc/Make-lang.in (cc1obj): Link with $(BACKEND).
ch:
* Make-lang.in (cc1chill): Depend on $(BACKEND), not stamp-objlist.
* Makefile.in (cc1chill): Link with $(BACKEND). Define BACKEND,
eliminate C_OBJS (was commented out), OBJS, OBJDEPS.
cp:
* Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
* Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
(cc1plus): Link with $(BACKEND) and $(C_OBJS).
f:
* Make-lang.in (f771): Depend on $(BACKEND), not stamp-objlist.
* Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
(f771): Link with $(BACKEND).
java:
* Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
* Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
(jc1): Link with $(BACKEND).
(jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
From-SVN: r35501
2000-08-05 02:50:02 +02:00
|
|
|
|
/* For a CONST_DOUBLE:
|
2005-04-23 07:25:26 +02:00
|
|
|
|
For a VOIDmode, there are two integers CONST_DOUBLE_LOW is the
|
2002-09-20 19:50:48 +02:00
|
|
|
|
low-order word and ..._HIGH the high-order.
|
2003-06-01 17:59:10 +02:00
|
|
|
|
For a float, there is a REAL_VALUE_TYPE structure, and
|
2002-09-20 19:50:48 +02:00
|
|
|
|
CONST_DOUBLE_REAL_VALUE(r) is a pointer to it. */
|
emit-rtl.c (global_rtl): Update comment.
* emit-rtl.c (global_rtl): Update comment.
(const_double_htab, const_double_htab_hash,
const_double_htab_hash, lookup_const_double): New.
(const_int_htab_hash, const_int_htab_eq): Remove const
qualifiers, which cause tons of warnings with RTL checking on.
(gen_rtx_CONST_DOUBLE): Deleted.
(const_double_from_real_value): New function - bears some
resemblance to the former immed_real_const_1.
(immed_double_const): Moved here from varasm.c and
simplified.
(gen_rtx_REG): Make REGNO unsigned to squelch warnings.
(gen_rtx_SUBREG): Use gen_rtx_raw_SUBREG.
(gen_rtx): Use immed_double_const.
(init_emit_once): Initialize the const_double_htab. Use
REAL_VALUE_FROM_INT where possible. Can now use
CONST_DOUBLE_FROM_REAL_VALUE when setting up const_tiny_rtx.
* varasm.c (struct varasm_status): Remove x_const_double_chain.
(const_double_chain, immed_real_const, clear_const_double_mem): Delete.
(immed_double_const, immed_real_const_1): Moved to emit-rtl.c.
(init_varasm_status, mark_varasm_status): Don't touch
x_const_double_chain.
* output.h: Delete prototype for clear_const_double_mem.
* real.h: Make REAL_VALUE_TYPE a macro again. Remove leading
'0' slot from all CONST_DOUBLE_FORMAT definitions. Prototype
const_double_from_real_value, not immed_real_const_1, and use
it to define CONST_DOUBLE_FROM_REAL_VALUE. Define new macro
CONST_DOUBLE_ATOF.
* rtl.h (CONST_DOUBLE_CHAIN): Kill.
(CONST_DOUBLE_LOW, CONST_DOUBLE_HIGH): Adjust.
(gen_rtx_CONST_DOUBLE, immed_real_const): Delete prototypes.
(gen_rtx_REG): Second arg is unsigned.
* gengenrtl.c (special_rtx): Take out CONST_DOUBLE.
(excluded_rtx): New, return true for CONST_DOUBLE.
(genmacro): Write nothing for excluded codes.
* combine.c (combine_simplify_rtx): Use CONST_DOUBLE_FROM_REAL_VALUE.
* expr.c (expand_expr): Likewise.
* ggc-common.c (ggc_mark_rtx_children_1): Don't mark the
CONST_DOUBLE_CHAIN.
* toplev.c (rest_of_compilation): Don't call
clear_const_double_mem.
* config/rs6000/rs6000.c (rs6000_float_const): Delete.
(rs6000_hash_constant): Remove CONST_DOUBLE special case.
(toc_hash_eq): Remove CONST_DOUBLE and LABEL_REF special cases.
* config/rs6000/rs6000-protos.h: Don't prototype rs6000_float_const.
* config/c4x/c4x.md, config/rs6000/rs6000.md: Use CONST_DOUBLE_ATOF.
* config/dsp16xx/dsp16xx.md, config/mips/mips.md,
config/pa/pa.md: Use CONST_DOUBLE_FROM_REAL_VALUE.
* config/sparc/sparc.md, config/sparc/sparc.c: Use immed_double_const.
From-SVN: r53409
2002-05-13 06:50:20 +02:00
|
|
|
|
#define CONST_DOUBLE_LOW(r) XCWINT (r, 0, CONST_DOUBLE)
|
|
|
|
|
#define CONST_DOUBLE_HIGH(r) XCWINT (r, 1, CONST_DOUBLE)
|
2002-09-20 19:50:48 +02:00
|
|
|
|
#define CONST_DOUBLE_REAL_VALUE(r) ((struct real_value *)&CONST_DOUBLE_LOW(r))
|
[multiple changes]
2000-08-04 Andreas Schwab <schwab@suse.de>
* cppmain.c (cb_def_pragma): Skip the first two tokens from the
token list, which are always `#' and `pragma'.
2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
* tree.c (tree_expr_nonnegative_p): Move to...
* fold-const.c: ... here. Also handle BIND_EXPR and RTL_EXPR.
(rtl_expr_nonnegative_p): New.
* tree.h: Add prototype for rtl_expr_nonnegative_p.
* real.h (CONST_DOUBLE_LOW, CONST_DOUBLE_HIGH, CONST_DOUBLE_MEM,
CONST_DOUBLE_CHAIN: Move to...
* rtl.h: ...here. Use XCINT/XCEXP.
* Makefile.in: Remove toplev.o from OBJS. Add rule to make
libbackend.a; add libbackend.a to STAGESTUFF. Add BACKEND
variable. Use BACKEND when linking cc1, not OBJS. Add BACKEND
to VOL_FILES.
* objc/Make-lang.in (cc1obj): Link with $(BACKEND).
ch:
* Make-lang.in (cc1chill): Depend on $(BACKEND), not stamp-objlist.
* Makefile.in (cc1chill): Link with $(BACKEND). Define BACKEND,
eliminate C_OBJS (was commented out), OBJS, OBJDEPS.
cp:
* Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
* Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
(cc1plus): Link with $(BACKEND) and $(C_OBJS).
f:
* Make-lang.in (f771): Depend on $(BACKEND), not stamp-objlist.
* Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
(f771): Link with $(BACKEND).
java:
* Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
* Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
(jc1): Link with $(BACKEND).
(jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
From-SVN: r35501
2000-08-05 02:50:02 +02:00
|
|
|
|
|
2002-02-19 03:53:41 +01:00
|
|
|
|
/* For a CONST_VECTOR, return element #n. */
|
|
|
|
|
#define CONST_VECTOR_ELT(RTX, N) XCVECEXP (RTX, 0, N, CONST_VECTOR)
|
|
|
|
|
|
|
|
|
|
/* For a CONST_VECTOR, return the number of elements in a vector. */
|
|
|
|
|
#define CONST_VECTOR_NUNITS(RTX) XCVECLEN (RTX, 0, CONST_VECTOR)
|
|
|
|
|
|
1991-12-06 22:00:31 +01:00
|
|
|
|
/* For a SUBREG rtx, SUBREG_REG extracts the value we want a subreg of.
|
Use byte offsets in SUBREGs instead of words.
2001-04-03 Jakub Jelinek <jakub@redhat.com>
David S. Miller <davem@pierdol.cobaltmicro.com>
Andrew MacLeod <amacleod@redhat.com>
Use byte offsets in SUBREGs instead of words.
* alias.c (nonlocal_mentioned_p): Use subreg_regno function.
* caller-save.c (mark_set_regs): Change callers of subreg_hard_regno
to pass new argument.
(add_stored_regs): Use subreg_regno_offset function.
* calls.c (expand_call): For non-paradoxical SUBREG take endianess
into account.
(precompute_arguments): Use gen_lowpart_SUBREG.
* combine.c (try_combine): Replace explicit XEXP with SUBREG_REG.
(combine_simplify_rtx): Rework to use SUBREG_BYTE.
(simplify_set): Rework to use SUBREG_BYTE.
(expand_field_assignment): Use SUBREG_BYTE.
(make_extraction): Use SUBREG_BYTE.
(if_then_else_cond): Use SUBREG_BYTE.
(apply_distributive_law): Use SUBREG_BYTE and fixup subreg comments.
(gen_lowpart_for_combine): Compute full byte offset.
* cse.c (mention_regs): Use SUBREG_BYTE.
(remove_invalid_subreg_refs): Rework to use SUBREG_BYTE.
(canon_hash): Use SUBREG_BYTE.
(fold_rtx): Pass SUBREG_BYTE div UNITS_PER_WORD to operand_subword.
(gen_lowpart_if_possible): Formatting.
* dbxout.c (dbxout_symbol_location): Compute SUBREG hard regnos
correctly.
* dwarf2out.c (is_pseudo_reg): Fixup explicit XEXP into SUBREG_REG
(mem_loc_descriptor): Fixup explicit XEXP into SUBREG_REG
(loc_descriptor): Fixup explicit XEXP into SUBREG_REG
* dwarfout.c (is_pseudo_reg): Fixup explicit XEXP into SUBREG_REG
(output_mem_loc_descriptor): Fixup explicit XEXP into SUBREG_REG
(output_loc_descriptor): Fixup explicit XEXP into SUBREG_REG
* emit-rtl.c (gen_rtx_SUBREG): New function, used to verify
certain invariants about SUBREGs the compiler creates.
(gen_lowpart_SUBREG): New function.
(subreg_hard_regno): New function to get the final register number.
(gen_lowpart_common): Use SUBREG_BYTE.
(gen_imagpart): Spacing nits.
(subreg_realpart_p): Use SUBREG_BYTE.
(gen_highpart): Use SUBREG_BYTE.
(subreg_lowpart_p): Always compute endian corrected goal offset,
even at the byte level, then compare against that.
(constant_subword): New function, pulled out all constant cases
from operand_subword and changed second argument name to offset.
(operand_subword): Detect non REG/SUBREG/CONCAT/MEM cases early
and call constant_subword to do the work. Return const0_rtx if
looking for a word outside of OP.
(operand_subword_force): Change second arg name to offset.
* expmed.c (store_bit_field): Use SUBREG_BYTE.
(store_split_bit_field): Use SUBREG_BYTE.
(extract_bit_field): Use SUBREG_BYTE.
(extract_split_bit_field): Use SUBREG_BYTE.
(expand_shift): Use SUBREG_BYTE.
* expr.c (store_expr, expand_expr): Use gen_lowpart_SUBREG.
* final.c (alter_subreg) Use subreg_hard_regno and SUBREG_BYTE.
* flow.c (set_noop_p): Use SUBREG_BYTE.
(mark_set_1): Remove ALTER_HARD_SUBREG. Use subreg_regno_offset instead.
* function.c (fixup_var_refs_1): Fixup explicit XEXP into a SUBREG_REG.
(fixup_memory_subreg): Use SUBREG_BYTE and remove byte endian
correction code.
(optimize_bit_field): Use SUBREG_BYTE.
(purge_addressof_1): Use SUBREG_BYTE.
(purge_single_hard_subreg_set): Use subreg_regno_offset function.
(assign_params): Mark arguments SUBREG_PROMOTED_VAR_P if they are
actually promoted by the caller and PROMOTE_FOR_CALLS_ONLY is true.
* gengenrtl.c (special_rtx): Add SUBREG.
* global.c (mark_reg_store): Use SUBREG_BYTE.
(set_preference): Rework to use subreg_regno_offset and SUBREG_BYTE.
* ifcvt (noce_emit_move_insn): Use SUBREG_BYTE.
* integrate.c (copy_rtx_and_substitute): Use SUBREG_BYTE and make sure
final byte offset is congruent to subreg's mode size.
(subst_constants): Use SUBREG_BYTE.
(mark_stores): Use subreg_regno_offset function.
* jump.c (rtx_renumbered_equal_p, true_regnum): Use subreg_regno_offset
function and SUBREG_BYTE.
* local-alloc.c (combine_regs): Use subreg_regno_offset function.
(reg_is_born): Use subreg_hard_regno.
* recog.c (valid_replace_rtx_1): Use SUBREG_BYTE and remove byte
endian correction code. Don't combine subregs unless resulting
offset aligns with type. Fix subreg constant extraction for DImode.
Simplify SUBREG of VOIDmode CONST_DOUBLE.
(general_operand): Remove dead mode_altering_drug code.
(indirect_operand): Use SUBREG_BYTE.
(constrain_operands): Use subreg_regno_offset function.
* reg-stack.c (get_true_reg): Use subreg_regno_offset function.
* regmove.c (regmove_optimize): Use SUBREG_BYTE.
(optimize_reg_copy_3): Use gen_lowpart_SUBREG.
* regs.h (REG_SIZE): Allow target to override.
(REGMODE_NATURAL_SIZE): New macro which target can override.
* reload.c (reload_inner_reg_of_subreg): subreg_regno should be used
on the entire subreg rtx.
(push_reload): Use SUBREG_BYTE in comments and code.
(find_dummy_reload): Use subreg_regno_offset. Only adjust offsets
for hard registers inside subregs.
(operands_match_p): Use subreg_regno_offset.
(find_reloads): Use SUBREG_BYTE and only advance offset for subregs
containing hard regs.
(find_reload_toplev): Use SUBREG_BYTE. Remove byte endian
corrections when fixing up MEM subregs.
(find_reloads_address_1): Use SUBREG_BYTE, subreg_regno, and
subreg_regno_offset where appropriate.
(find_reloads_subreg_address): Use SUBREG_BYTE. Remove
byte endian corrections when fixing up MEM subregs.
(subst_reloads): When combining two subregs, make sure final
offset is congruent to subreg's mode size.
(find_replacement): Use SUBREG_BYTE and subreg_regno_offset.
(refers_to_regno_for_reload_p): Use subreg_regno.
(reg_overlap_mentioned_for_reload_p): Use subreg_regno_offset.
* reload1.c (eliminate_regs) Use SUBREG_BYTE. Remove byte endian
correction code for memory subreg fixups.
(forget_old_reload_1): Use subreg_regno_offset.
(choose_reload_regs): Use subreg_regno.
(emit_input_reload_insns): Use SUBREG_BYTE.
(reload_combine_note_store): Use subreg_regno_offset.
(move2add_note_store): Use subreg_regno_offset.
* resource.c (update_live_status, mark_referenced_resources): Use
subreg_regno function.
(mark_set_resources): Use subreg_regno function.
* rtl.h (SUBREG_WORD): Rename to SUBREG_BYTE.
(subreg_regno_offset, subreg_regno): Define prototypes.
(subreg_hard_regno, constant_subword, gen_rtx_SUBREG): Newi functions.
(gen_lowpart_SUBREG): Add prototype.
* rtl.texi (subreg): Update to reflect new byte offset representation.
Add mentioning of the effect that BYTES_BIG_ENDIAN has on subregs now.
* rtlanal.c (refers_to_regno_p): Use subreg_regno.
(reg_overlap_mentioned_p): Use subreg_regno.
(replace_regs); Make sure final offset of combined subreg is
congruent to size of subreg's mode.
(subreg_regno_offset): New function.
(subreg_regno): New function.
* sched-vis.c (print_value): Change SUBREG_WORD to SUBREG_BYTE.
* sdbout.c (sdbout_symbol): Compute offset using alter_subreg.
* stmt.c (expand_anon_union_decl): Use gen_lowpart_SUBREG.
* tm.texi (ALTER_HARD_SUBREG): Remove, it is now dead.
(SUBREG_REGNO_OFFSET): Describe SUBREG_REGNO_OFFSET overrides.
* config/a29k/a29k.c (gpc_reg_operand): Use subreg_regno.
(a29k_get_reloaded_address): Use SUBREG_BYTE.
(print_operand): Use SUBREG_BYTE.
* config/alpha/alpha.c (print_operand_address): Use SUBREG_BYTE.
* config/arm/arm.c (arm_reload_in_hi): Use SUBREG_BYTE.
(arm_reload_out_hi): Use SUBREG_BYTE.
* config/d30v/d30v.c (d30v_split_double): Use subreg_regno_offset
instead of SUBREG_WORD.
(d30v_print_operand_memory_reference): Use subreg_regno_offset.
* config/dsp16xx/dsp16xx.md (extendqihi2, zero_extendqihi2): Fix
SUBREG creation to use byte offset.
* config/h8300/h8300.md (Unnamed HImode zero extraction and 16bit
inverted load insns): Fix explicit rtl subregs to use byte
offsets.
* config/i370/i370.md (cmpstrsi, movstrsi, mulsi3, divsi3,
udivsi3, umodsi3): Generate SUBREGs with byte offsets.
* config/i860/i860.c (single_insn_src_p): Use SUBREG_BYTE.
* config/i860/i860.md (mulsi3_big): Fixup explicit SUBREGs in rtl
to use byte offsets.
(unnamed fmlow.dd insn): Fixup SUBREGS to use byte offsets.
* config/i960/i960.md (extendhisi2): Generate SUBREGs with byte
offsets, also make sure it is congruent to SUBREG's mode size.
(extendqisi2, extendqihi2, zero_extendhisi2, zero_extendqisi2,
unnamed ldob insn): Generate SUBREGs with byte offset.
(zero_extendqihi2): SUBREG's are byte offsets.
* config/m68hc11/m68hc11.c (m68hc11_gen_lowpart): Use SUBREG_BYTE.
(m68hc11_gen_highpart): Use SUBREG_BYTE.
* config/m68k/m68k.md (zero_extendhisi2, zero_extendqihi2,
zero-extendqisi2): Generate SUBREGs with byte offset.
(umulsidi3, mulsidi3, subreghi1ashrdi_const32,
subregsi1ashrdi_const32, subreg1lshrdi_const32): Fixup explicit
subregs in rtl to use byte offsets.
* config/m88k/m88k.md (extendsidi2): fixup subregs to use byte offset.
* config/mips/mips.c (mips_move_1word): Use subreg_regno_offset.
(mips_move_2words): Use subreg_regno_offset.
(mips_secondary_reload_class): Use subreg_regno_offset.
* config/mips/mips.md (DImode plus, minus, move, and logical op
splits): Fixup explicit subregs in rtl to use byte offsets.
* config/mn10200/mn10200.c (print_operand): Use subreg_regno function.
* config/mn10300/mn10300.c (print_operand): Use subreg_regno function.
* config/ns32k/ns32k.md (udivmoddisi4): Fix explicit subregs in
rtl to use byte offsets.
* config/pa/pa.c (emit_move_sequence): Use SUBREG_BYTE.
* config/pa/pa.md (floatunssisf2, floatunssidf2, mulsi3): fix explicit
subregs to use byte offsets.
* config/pdp11/pdp11.md (zero_extendhisi2, modhi3, modhi3+1):
Fixup explicit subregs in rtl to use byte offsets.
* config/romp/romp.c (memory_offset_in_range_p): Use SUBREG_BYTE
and remove byte endian correction code.
* config/sh/sh.c (output_movedouble): Use subreg_regno.
(gen_ashift_hi): Use SUBREG_BYTE.
(regs_used): Use subreg_regno_offset.
(machine_dependent_reorg): Use subreg_regno_offset.
* config/sh/sh.h (INDEX_REGISTER_RTX_P): Use SUBREG_BYTE.
* config/sh/sh.md (DImode and DFmode move splits): Use subreg_regno.
(movdf_i4): Subregs are byte offsets now.
* config/sparc/sparc.c (ultra_find_type): Use SUBREG_BYTE.
* config/sparc/sparc.h (ALTER_HARD_SUBREG): Removed.
(REGMODE_NATURAL_SIZE): Override.
(REG_SIZE): For SUBREG check float mode on SUBREG_REG's mode.
* config/sparc/sparc.md (TFmode move splits): Generate SUBREGs
with byte offsets.
(zero_extendhisi2, zero_extendqidi2_insn, extendhisi2,
extendqihi2, sign_extendqihi2_insn, sign_extendqisi2_insn,
extendqidi2): Generate SUBREGs with byte offsets, also make sure
it is congruent to SUBREG's mode size.
(smulsi3_highpart_v8plus): Fix explicit subregs in rtl to use byte
offsets.
(cmp_siqi_trunc, cmp_siqi_trunc_set, cmp_diqi_trunc,
cmp_diqi_trunc_set, lshrdi3_v8plus+1, lshrdi3_v8plus+2,
lshrdi3_v8plus+3, lshrdi3_v8plus+4): Use proper
SUBREG_BYTE offset for non-paradoxical subregs in patterns.
* config/v850/v850.c (print_operand, output_move_double): Use
subreg_regno function.
Co-Authored-By: Andrew MacLeod <amacleod@redhat.com>
Co-Authored-By: David S. Miller <davem@pierdol.cobaltmicro.com>
From-SVN: r41058
2001-04-03 17:06:12 +02:00
|
|
|
|
SUBREG_BYTE extracts the byte-number. */
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2002-01-03 06:11:05 +01:00
|
|
|
|
#define SUBREG_REG(RTX) XCEXP (RTX, 0, SUBREG)
|
|
|
|
|
#define SUBREG_BYTE(RTX) XCUINT (RTX, 1, 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 rtlanal.c */
|
2004-03-05 11:32:54 +01:00
|
|
|
|
/* Return the right cost to give to an operation
|
|
|
|
|
to make the cost of the corresponding register-to-register instruction
|
|
|
|
|
N times that of a fast register-to-register instruction. */
|
|
|
|
|
#define COSTS_N_INSNS(N) ((N) * 4)
|
|
|
|
|
|
|
|
|
|
/* Maximum cost of an rtl expression. This value has the special meaning
|
|
|
|
|
not to use an rtx with this cost under any circumstances. */
|
|
|
|
|
#define MAX_COST INT_MAX
|
|
|
|
|
|
2005-01-24 09:55:47 +01:00
|
|
|
|
extern void init_rtlanal (void);
|
2004-03-05 11:32:54 +01:00
|
|
|
|
extern int rtx_cost (rtx, enum rtx_code);
|
|
|
|
|
extern int address_cost (rtx, enum machine_mode);
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern unsigned int subreg_lsb (rtx);
|
2004-01-22 13:44:54 +01:00
|
|
|
|
extern unsigned int subreg_lsb_1 (enum machine_mode, enum machine_mode,
|
|
|
|
|
unsigned int);
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern unsigned int subreg_regno_offset (unsigned int, enum machine_mode,
|
|
|
|
|
unsigned int, enum machine_mode);
|
|
|
|
|
extern bool subreg_offset_representable_p (unsigned int, enum machine_mode,
|
|
|
|
|
unsigned int, enum machine_mode);
|
|
|
|
|
extern unsigned int subreg_regno (rtx);
|
Makefile.in (OBJS): Add rtlhooks.o.
2004-05-25 Paolo Bonzini <bonzini@gnu.org>
* Makefile.in (OBJS): Add rtlhooks.o.
(rtlanal.o): Depend on function.h.
(cse.o): Depend on rtlhooks-def.h.
(combine.o): Depend on rtlhooks-def.h.
(rtlhooks.o): New rule.
* combine.c: Include rtlhooks-def.h.
(nonzero_bits, cached_nonzero_bits, nonzero_bits1,
num_sign_bit_copies, cached_num_sign_bit_copies,
num_sign_bit_copies1): Move most of the code to rtlanal.c.
(reg_nonzero_bits_for_combine,
reg_num_sign_bit_copies_for_combine): New functions holding
the remnants of the above.
(combine_rtl_hooks): New.
(combine_instructions): Set rtl_hooks instead of gen_lowpart.
* cse.c: Include rtlhooks-def.h.
(cse_rtl_hooks): New.
(cse_main): Set rtl_hooks instead of gen_lowpart.
* emit-rtl.c (gen_lowpart): Remove.
(gen_lowpart_general): Move to rtlhooks.c.
* rtl.h (nonzero_bits, num_sign_bit_copies,
struct rtl_hooks, rtl_hooks, general_rtl_hooks): New.
(gen_lowpart_general): Remove.
(gen_lowpart): Temporarily redefine as a macro.
* rtlanal.c: Include function.h.
(nonzero_bits, cached_nonzero_bits, nonzero_bits1,
num_sign_bit_copies, cached_num_sign_bit_copies,
num_sign_bit_copies1): New, from combine.c.
* rtlhooks.c: New file.
From-SVN: r82234
2004-05-25 14:04:17 +02:00
|
|
|
|
extern unsigned HOST_WIDE_INT nonzero_bits (rtx, enum machine_mode);
|
|
|
|
|
extern unsigned int num_sign_bit_copies (rtx, enum machine_mode);
|
|
|
|
|
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2002-05-09 00:37:21 +02:00
|
|
|
|
/* 1 if RTX is a subreg containing a reg that is already known to be
|
|
|
|
|
sign- or zero-extended from the mode of the subreg to the mode of
|
1992-09-19 21:44:05 +02:00
|
|
|
|
the reg. SUBREG_PROMOTED_UNSIGNED_P gives the signedness of the
|
2000-03-29 03:56:04 +02:00
|
|
|
|
extension.
|
1992-09-19 21:44:05 +02:00
|
|
|
|
|
|
|
|
|
When used as a LHS, is means that this extension must be done
|
|
|
|
|
when assigning to SUBREG_REG. */
|
|
|
|
|
|
2002-05-09 00:37:21 +02:00
|
|
|
|
#define SUBREG_PROMOTED_VAR_P(RTX) \
|
|
|
|
|
(RTL_FLAG_CHECK1("SUBREG_PROMOTED", (RTX), SUBREG)->in_struct)
|
|
|
|
|
|
|
|
|
|
#define SUBREG_PROMOTED_UNSIGNED_SET(RTX, VAL) \
|
|
|
|
|
do { \
|
2002-05-21 17:39:31 +02:00
|
|
|
|
rtx const _rtx = RTL_FLAG_CHECK1("SUBREG_PROMOTED_UNSIGNED_SET", (RTX), SUBREG); \
|
2002-05-09 00:37:21 +02:00
|
|
|
|
if ((VAL) < 0) \
|
2002-05-21 17:39:31 +02:00
|
|
|
|
_rtx->volatil = 1; \
|
2002-05-09 00:37:21 +02:00
|
|
|
|
else { \
|
2002-05-21 17:39:31 +02:00
|
|
|
|
_rtx->volatil = 0; \
|
|
|
|
|
_rtx->unchanging = (VAL); \
|
2002-05-09 00:37:21 +02:00
|
|
|
|
} \
|
2002-03-01 02:19:52 +01:00
|
|
|
|
} while (0)
|
2002-05-07 02:18:48 +02:00
|
|
|
|
#define SUBREG_PROMOTED_UNSIGNED_P(RTX) \
|
2002-05-09 00:37:21 +02:00
|
|
|
|
((RTL_FLAG_CHECK1("SUBREG_PROMOTED_UNSIGNED_P", (RTX), SUBREG)->volatil) \
|
|
|
|
|
? -1 : (RTX)->unchanging)
|
1992-09-19 21:44:05 +02:00
|
|
|
|
|
1991-12-06 22:00:31 +01:00
|
|
|
|
/* Access various components of an ASM_OPERANDS rtx. */
|
|
|
|
|
|
2002-01-03 06:11:05 +01:00
|
|
|
|
#define ASM_OPERANDS_TEMPLATE(RTX) XCSTR (RTX, 0, ASM_OPERANDS)
|
|
|
|
|
#define ASM_OPERANDS_OUTPUT_CONSTRAINT(RTX) XCSTR (RTX, 1, ASM_OPERANDS)
|
|
|
|
|
#define ASM_OPERANDS_OUTPUT_IDX(RTX) XCINT (RTX, 2, ASM_OPERANDS)
|
|
|
|
|
#define ASM_OPERANDS_INPUT_VEC(RTX) XCVEC (RTX, 3, ASM_OPERANDS)
|
|
|
|
|
#define ASM_OPERANDS_INPUT_CONSTRAINT_VEC(RTX) XCVEC (RTX, 4, ASM_OPERANDS)
|
|
|
|
|
#define ASM_OPERANDS_INPUT(RTX, N) XCVECEXP (RTX, 3, N, ASM_OPERANDS)
|
|
|
|
|
#define ASM_OPERANDS_INPUT_LENGTH(RTX) XCVECLEN (RTX, 3, ASM_OPERANDS)
|
2000-09-02 04:54:55 +02:00
|
|
|
|
#define ASM_OPERANDS_INPUT_CONSTRAINT_EXP(RTX, N) \
|
2002-01-03 06:11:05 +01:00
|
|
|
|
XCVECEXP (RTX, 4, N, ASM_OPERANDS)
|
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
|
|
|
|
#define ASM_OPERANDS_INPUT_CONSTRAINT(RTX, N) \
|
2002-01-03 06:11:05 +01:00
|
|
|
|
XSTR (XCVECEXP (RTX, 4, N, ASM_OPERANDS), 0)
|
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
|
|
|
|
#define ASM_OPERANDS_INPUT_MODE(RTX, N) \
|
2002-01-03 06:11:05 +01:00
|
|
|
|
GET_MODE (XCVECEXP (RTX, 4, N, ASM_OPERANDS))
|
Conditionally compile support for --enable-mapped_location.
* input.h: #include line-map.h for source_location typedef.
(BUILTINS_LOCATION, UNKNOWN_LOCATION, expand_location,
LOCATION_FILE, LOCATION_LINE): New macros and functions.
(expanded_location, source_locus): New typedefs.
(push_srcloc): Change parameter list if USE_MAPPED_LOCATION.
* rtl.def (NOTE, ASM_OPERANDS): Modify specifcation, if
USE_MAPPED_LOCATION.
* rtl.h (NOTE_DELETED_LABEL_NAME): New macro.
(NOTE_SOURCE_LOCATION, NOTE_EXPNDED_LOCATION, SET_INSN_DELETED):
New conditional macros.
(ASM_OPERANDS_SOURCE_FILE, ASM_OPERANDS_SOURCE_LINE): Replace
by ASM_OPERANDS_SOURCE_LOCATION if USE_MAPPED_LOCATION.
* tree.h (EXPR_LOCATION, SET_EXPR_LOCATION, EXPR_HAS_LOCATION,
EXPR_LOCUS, SET_EXPR_LOCUS, EXPR_FILENAME, EXPR_LINENO,
DECL_IS_BUILTIN): New macros, most depending on USE_MAPPED__LOCATION.
(tree_exp): Change type of locus to use new source_locus typedef.
* tree.c (build1_stat): Use SET_EXPR_LOCATION.
(annotate_with_locus, annotate_with_file_line): Conditionalize.
(expand_location): New function.
* toplev.c (unknown_location): New static, when USE_MAPPED_LOCATION.
(push_srcloc, pop_loc): Adjust parameter handling.
(process_options): Don't set input_filename by itself.
(lang_dependent_init): Save, set input_location to <built-in>.
(warn_deprecated_use): Use expand_location.
From-SVN: r83918
2004-06-30 19:58:21 +02:00
|
|
|
|
#ifdef USE_MAPPED_LOCATION
|
|
|
|
|
#define ASM_OPERANDS_SOURCE_LOCATION(RTX) XCUINT (RTX, 5, ASM_OPERANDS)
|
|
|
|
|
#else
|
2002-01-03 06:11:05 +01:00
|
|
|
|
#define ASM_OPERANDS_SOURCE_FILE(RTX) XCSTR (RTX, 5, ASM_OPERANDS)
|
|
|
|
|
#define ASM_OPERANDS_SOURCE_LINE(RTX) XCINT (RTX, 6, ASM_OPERANDS)
|
Conditionally compile support for --enable-mapped_location.
* input.h: #include line-map.h for source_location typedef.
(BUILTINS_LOCATION, UNKNOWN_LOCATION, expand_location,
LOCATION_FILE, LOCATION_LINE): New macros and functions.
(expanded_location, source_locus): New typedefs.
(push_srcloc): Change parameter list if USE_MAPPED_LOCATION.
* rtl.def (NOTE, ASM_OPERANDS): Modify specifcation, if
USE_MAPPED_LOCATION.
* rtl.h (NOTE_DELETED_LABEL_NAME): New macro.
(NOTE_SOURCE_LOCATION, NOTE_EXPNDED_LOCATION, SET_INSN_DELETED):
New conditional macros.
(ASM_OPERANDS_SOURCE_FILE, ASM_OPERANDS_SOURCE_LINE): Replace
by ASM_OPERANDS_SOURCE_LOCATION if USE_MAPPED_LOCATION.
* tree.h (EXPR_LOCATION, SET_EXPR_LOCATION, EXPR_HAS_LOCATION,
EXPR_LOCUS, SET_EXPR_LOCUS, EXPR_FILENAME, EXPR_LINENO,
DECL_IS_BUILTIN): New macros, most depending on USE_MAPPED__LOCATION.
(tree_exp): Change type of locus to use new source_locus typedef.
* tree.c (build1_stat): Use SET_EXPR_LOCATION.
(annotate_with_locus, annotate_with_file_line): Conditionalize.
(expand_location): New function.
* toplev.c (unknown_location): New static, when USE_MAPPED_LOCATION.
(push_srcloc, pop_loc): Adjust parameter handling.
(process_options): Don't set input_filename by itself.
(lang_dependent_init): Save, set input_location to <built-in>.
(warn_deprecated_use): Use expand_location.
From-SVN: r83918
2004-06-30 19:58:21 +02:00
|
|
|
|
#endif
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
rtl.h (MEM_READONLY_P): Replace RTX_UNCHANGING_P.
* rtl.h (MEM_READONLY_P): Replace RTX_UNCHANGING_P.
* alias.c (true_dependence): Update to match new semantics.
(canon_true_dependence, write_dependence_p): Likewise.
(anti_dependence, output_dependence): Update write_dependence_p args.
(unchanging_anti_dependence): Remove.
* calls.c (purge_mem_unchanging_flag): Remove.
(fixup_tail_calls): Don't call it.
(expand_call): Don't add unchanging memory to function usage.
* expr.c (emit_block_move_via_libcall): Likewise.
(clear_storage_via_libcall): Don't clobber RTX_UNCHANGING_P mems.
(get_subtarget): Don't use RTX_UNCHANGING_P.
(expand_assignment, store_constructor, expand_expr_real_1): Likewise.
(do_tablejump): Set MEM_READONLY_P, not RTX_UNCHANGING_P.
* combine.c (get_last_value_validate): Use MEM_READONLY_P.
* cse.c (insert): Don't use RTX_UNCHANGING_P.
(cse_insn, canon_hash): Use MEM_READONLY_P.
* emit-rtl.c (set_mem_attributes_minus_bitpos): Use MEM_READONLY_P
instead of RTX_UNCHANGING_P.
* explow.c (maybe_set_unchanging): Remove.
* expr.h (maybe_set_unchanging): Remove.
* flow.c (insn_dead_p, mark_used_regs): Use anti_dependence.
* function.c (assign_stack_temp_for_type): Don't use RTX_UNCHANGING_P.
(assign_parm_setup_reg, expand_function_start): Likewise.
* integrate.c (copy_rtx_and_substitute): Likewise.
* ra-rewrite.c (emit_colors): Likewise.
* regmove.c (copy_src_to_dest, regmove_optimize): Likewise.
(fixup_match_1): Likewise.
* reload1.c (reload, alter_reg): Likewise.
* local-alloc.c (validate_equiv_mem): Check MEM_READONLY_P,
not RTX_UNCHANGING_P.
(equiv_init_varies_p): Likewise.
* loop-invariant.c (check_maybe_invariant): Likewise.
* resource.c (mark_referenced_resources, mark_set_resources): Likewise.
* loop.c (note_addr_stored): Likewise.
(prescan_loop): Likewise. Don't check function usage for clobbered
unchanging memory.
* rtlanal.c (rtx_unstable_p): Check MEM_READONLY_P,
not RTX_UNCHANGING_P.
(rtx_varies_p, modified_between_p, modified_in_p): Likewise.
* varasm.c (force_const_mem): Likewise.
* stmt.c (expand_decl): Don't set RTX_UNCHANGING_P.
* web.c (entry_register): Likewise.
* tree-gimple.h (get_base_address): Move decl ...
* tree.h: ... here.
* doc/rtl.texi (MEM_READONLY_P): Replace RTX_UNCHANGING_P.
* config/alpha/alpha.c (alpha_set_memflags_1): Rewrite to be
called via for_each_rtx. Copy MEM_SCALAR_P, MEM_NOTRAP_P too.
(alpha_set_memflags): Update to match.
* config/darwin.c (machopic_indirect_data_reference): Set
MEM_READONLY_P instead of RTX_UNCHANGING_P.
(machopic_indirect_call_target): Likewise.
(machopic_legitimize_pic_address): Likewise.
* config/arm/arm.c (legitimize_pic_address, arm_gen_load_multiple,
arm_gen_store_multiple, arm_gen_movmemqi): Likewise.
* config/arm/arm.md (load_multiple, store_multiple): Likewise.
* config/frv/frv.md (symGOT2reg): Likewise.
* config/i386/i386.c (legitimize_pic_address,
legitimize_tls_address, ix86_split_to_parts): Likewise.
* config/ia64/ia64.c (ia64_expand_tls_address): Likewise.
* config/ia64/ia64.md (load_fptr): Likewise.
* config/m32r/m32r.c (m32r_legitimize_pic_address): Likewise.
* config/m68k/m68k.c (legitimize_pic_address): Likewise.
* config/mcore/mcore.c (block_move_sequence): Likewise.
* config/mn10300/mn10300.md (symGOT2reg): Likewise.
* config/pa/pa.c (legitimize_pic_address): Likewise.
* config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Likewise.
(rs6000_emit_move): Likewise.
* config/s390/s390.c (legitimize_pic_address): Likewise.
(legitimize_tls_address): Likewise.
* config/s390/s390.md (casesi): Likewise.
* config/sh/sh.c (prepare_move_operands, sh_reorg): Likewise.
* config/sh/sh.md (symGOT2reg): Likewise.
* config/sparc/sparc.c (legitimize_pic_address): Likewise.
* config/v850/v850.md (casesi): Likewise.
* config/ia64/ia64.c (gen_thread_pointer): Don't set RTX_UNCHANGING_P.
* config/iq2000/iq2000.c (save_restore_insns): Likewise.
* config/mips/mips.c (mips_restore_gp): Likewise.
(mips_save_restore_reg, mips16_gp_pseudo_reg): Likewise.
* config/sh/sh.c (sh_reorg): Likewise.
From-SVN: r86178
2004-08-18 10:25:01 +02:00
|
|
|
|
/* 1 if RTX is a mem that is statically allocated in read-only memory. */
|
|
|
|
|
#define MEM_READONLY_P(RTX) \
|
|
|
|
|
(RTL_FLAG_CHECK1("MEM_READONLY_P", (RTX), MEM)->unchanging)
|
|
|
|
|
|
2002-05-09 00:37:21 +02:00
|
|
|
|
/* 1 if RTX is a mem and we should keep the alias set for this mem
|
2001-10-25 14:55:16 +02:00
|
|
|
|
unchanged when we access a component. Set to 1, or example, when we
|
|
|
|
|
are already in a non-addressable component of an aggregate. */
|
2002-05-09 00:37:21 +02:00
|
|
|
|
#define MEM_KEEP_ALIAS_SET_P(RTX) \
|
|
|
|
|
(RTL_FLAG_CHECK1("MEM_KEEP_ALIAS_SET_P", (RTX), MEM)->jump)
|
2001-10-25 14:55:16 +02:00
|
|
|
|
|
2002-05-09 00:37:21 +02:00
|
|
|
|
/* 1 if RTX is a mem or asm_operand for a volatile reference. */
|
|
|
|
|
#define MEM_VOLATILE_P(RTX) \
|
|
|
|
|
(RTL_FLAG_CHECK3("MEM_VOLATILE_P", (RTX), MEM, ASM_OPERANDS, \
|
|
|
|
|
ASM_INPUT)->volatil)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2002-05-09 00:37:21 +02:00
|
|
|
|
/* 1 if RTX is a mem that refers to an aggregate, either to the
|
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
|
|
|
|
aggregate itself of to a field of the aggregate. If zero, RTX may
|
2000-07-23 01:29:14 +02:00
|
|
|
|
or may not be such a reference. */
|
2002-05-09 00:37:21 +02:00
|
|
|
|
#define MEM_IN_STRUCT_P(RTX) \
|
|
|
|
|
(RTL_FLAG_CHECK1("MEM_IN_STRUCT_P", (RTX), MEM)->in_struct)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2004-07-05 09:22:45 +02:00
|
|
|
|
/* 1 if RTX is a MEM that refers to a scalar. If zero, RTX may or may
|
2002-01-18 14:40:36 +01:00
|
|
|
|
not refer to a scalar. */
|
2002-05-09 00:37:21 +02:00
|
|
|
|
#define MEM_SCALAR_P(RTX) \
|
2004-07-05 09:22:45 +02:00
|
|
|
|
(RTL_FLAG_CHECK1("MEM_SCALAR_P", (RTX), MEM)->return_val)
|
1999-01-19 11:32:33 +01:00
|
|
|
|
|
2003-04-23 01:17:46 +02:00
|
|
|
|
/* 1 if RTX is a mem that cannot trap. */
|
|
|
|
|
#define MEM_NOTRAP_P(RTX) \
|
|
|
|
|
(RTL_FLAG_CHECK1("MEM_NOTRAP_P", (RTX), MEM)->call)
|
|
|
|
|
|
2002-09-27 00:25:14 +02:00
|
|
|
|
/* If VAL is nonzero, set MEM_IN_STRUCT_P and clear MEM_SCALAR_P in
|
1999-01-19 11:32:33 +01:00
|
|
|
|
RTX. Otherwise, vice versa. Use this macro only when you are
|
|
|
|
|
*sure* that you know that the MEM is in a structure, or is a
|
|
|
|
|
scalar. VAL is evaluated only once. */
|
2002-01-03 06:11:05 +01:00
|
|
|
|
#define MEM_SET_IN_STRUCT_P(RTX, VAL) \
|
|
|
|
|
do { \
|
2000-05-04 23:15:05 +02:00
|
|
|
|
if (VAL) \
|
|
|
|
|
{ \
|
|
|
|
|
MEM_IN_STRUCT_P (RTX) = 1; \
|
|
|
|
|
MEM_SCALAR_P (RTX) = 0; \
|
|
|
|
|
} \
|
|
|
|
|
else \
|
|
|
|
|
{ \
|
|
|
|
|
MEM_IN_STRUCT_P (RTX) = 0; \
|
|
|
|
|
MEM_SCALAR_P (RTX) = 1; \
|
|
|
|
|
} \
|
|
|
|
|
} while (0)
|
1999-01-19 11:32:33 +01:00
|
|
|
|
|
2001-10-01 13:00:47 +02:00
|
|
|
|
/* The memory attribute block. We provide access macros for each value
|
|
|
|
|
in the block and provide defaults if none specified. */
|
|
|
|
|
#define MEM_ATTRS(RTX) X0MEMATTR (RTX, 1)
|
|
|
|
|
|
emit-rtl.c (reg_attrs_htab): New static variable.
* emit-rtl.c (reg_attrs_htab): New static variable.
(reg_attrs_htab_hash, reg_attrs_htab_eq, get_reg_attrs): New static
functions.
(reg_rtx): Do not maintain regno_decl.
(gen_rtx_REG_offset, set_reg_attrs_from_mem, set_delc_rtx,
set_mem_attrs_from_reg): New global function.
(init_emit): Do not initialize regno_decl.
(init_emit_once): initialize reg_attrs_htab.
* final.c (alter_subreg): Do not replace REG by SUBREG.
(gen_mem_expr_from_op): Improve output.
(output_asm_operands): Likewise.
* function.c (assign_params): Do not set REGNO_DECL.
* function.h (struct function): Kill regno_decl.
(REGNO_DECL): Kill.
* gengtype.c (adjust_field_rtx_def): Handle new field of reg.
* print_rtl.c (print_rtx): Output REG information.
* regclass.c (reg_scan_mark_refs): Update attrs.
* reload1.c (alter_reg): Likewise.
* simplify_rtx.c (simplify_subreg): Likewise.
* stmt.c (expand_decl): Likewise.
* rtl.def (REG): Add new field.
* rtl.h (struct reg_attrs): New.
(rtunion_def): At rtreg.
(X0MEMATTR): Add checking.
(X0REGATTR, REG_ATTRS, REG_EXPR, REG_OFFSET): New macro.
(set_reg_attrs_from_mem, set_mem_attrs_from_reg, gen_rtx_REG_offset):
Declare.
* tree.h (SET_DECL_RTL): Call set_decl_rtl.
From-SVN: r61741
2003-01-24 23:45:58 +01:00
|
|
|
|
/* The register attribute block. We provide access macros for each value
|
|
|
|
|
in the block and provide defaults if none specified. */
|
|
|
|
|
#define REG_ATTRS(RTX) X0REGATTR (RTX, 2)
|
|
|
|
|
|
1998-06-25 17:14:41 +02:00
|
|
|
|
/* For a MEM rtx, the alias set. If 0, this MEM is not in any alias
|
|
|
|
|
set, and may alias anything. Otherwise, the MEM can only alias
|
2003-04-17 03:11:21 +02:00
|
|
|
|
MEMs in a conflicting alias set. This value is set in a
|
1998-06-25 17:14:41 +02:00
|
|
|
|
language-dependent manner in the front-end, and should not be
|
2003-04-17 03:11:21 +02:00
|
|
|
|
altered in the back-end. These set numbers are tested with
|
|
|
|
|
alias_sets_conflict_p. */
|
2001-10-01 13:00:47 +02:00
|
|
|
|
#define MEM_ALIAS_SET(RTX) (MEM_ATTRS (RTX) == 0 ? 0 : MEM_ATTRS (RTX)->alias)
|
|
|
|
|
|
|
|
|
|
/* For a MEM rtx, the decl it is known to refer to, if it is known to
|
2001-12-02 20:04:23 +01:00
|
|
|
|
refer to part of a DECL. It may also be a COMPONENT_REF. */
|
|
|
|
|
#define MEM_EXPR(RTX) (MEM_ATTRS (RTX) == 0 ? 0 : MEM_ATTRS (RTX)->expr)
|
2001-10-01 13:00:47 +02:00
|
|
|
|
|
2001-12-02 20:04:23 +01:00
|
|
|
|
/* For a MEM rtx, the offset from the start of MEM_EXPR, if known, as a
|
2001-10-01 13:00:47 +02:00
|
|
|
|
RTX that is always a CONST_INT. */
|
|
|
|
|
#define MEM_OFFSET(RTX) (MEM_ATTRS (RTX) == 0 ? 0 : MEM_ATTRS (RTX)->offset)
|
|
|
|
|
|
|
|
|
|
/* For a MEM rtx, the size in bytes of the MEM, if known, as an RTX that
|
|
|
|
|
is always a CONST_INT. */
|
2001-10-25 14:55:16 +02:00
|
|
|
|
#define MEM_SIZE(RTX) \
|
|
|
|
|
(MEM_ATTRS (RTX) != 0 ? MEM_ATTRS (RTX)->size \
|
|
|
|
|
: GET_MODE (RTX) != BLKmode ? GEN_INT (GET_MODE_SIZE (GET_MODE (RTX))) \
|
|
|
|
|
: 0)
|
2001-10-01 13:00:47 +02:00
|
|
|
|
|
2002-01-27 19:29:33 +01:00
|
|
|
|
/* For a MEM rtx, the alignment in bits. We can use the alignment of the
|
|
|
|
|
mode as a default when STRICT_ALIGNMENT, but not if not. */
|
alias.c (can_address_p): Compnonents are not addressable if the containing type has alias set 0.
* alias.c (can_address_p): Compnonents are not addressable if
the containing type has alias set 0.
(get_alias_set): Rework to use STRIP_NOPS.
Only call front-end routine on object, type, or object with
NOPs stripped, not inner values.
Use language hook to call front-end routine.
* builtins.c (get_memory_rtx): Always call set_mem_attributes.
(expand_builtin_apply): Call set_mem_align on MEMs we make.
Don't pass alignment to emit_block_move.
(expand_builtin_memcpy, expand_builtin_va_copy): Likewise.
(expand_builtin_memset): Likewise, but for clear_storage.
* c-common.c (lang_get_alias_set): Renamed to c_common_alias_set
and remove C++ specific parts.
* c-common.h (c_common_get_alias_set): Add declaration.
* c-lang.c (LANG_HOOKS_GET_ALIAS_SET): New macro.
* calls.c (emit_call_1): Fix typo in sibcall_pop case.
(save_fixed_argument_area): Call set_mem_align.
Remove alignment in call to emit_block_move.
(emit_library_call_value_1, store_one_arg): Likewise.
(target_for_arg): Remove; disabled long ago.
* emit-rtl.c (set_mem_attributes): Rework to only call get_mem_attrs
once and similar cleanups.
(offset_address): Use proper introductory comment.
* expr.c (emit_block_move): Use alignment from that of MEM args, not
from explicit operand; all callers changed.
(clear_storage): Likewise.
(expand_assignment): Don't call set_mem_alias_set on to_rtx.
(store_field): Remove kludge on alias set used for to_rtx.
(highest_pow2_factor, case *_DIV_EXPR): Never return 0.
(expand_expr_unaligned): Call set_mem_attributes instead of
set_mem_alias_set.
* expr.h (emit_block_move, clear_storage): Remove ALIGN argument.
* function.c (assign_stack_temp_for_type): Set MEM alignment.
(expand_function_end): Track MEM attributes of trampolines.
* ifcvt.c (noce_try_cmove_arith): Set alignment of new MEM.
* integrate.c (copy_rtx_and_substitute, case CALL): Copy memory
attributes from original.
* langhooks.c (lang_hook_default_get_alias_set): New function.
(hook_get_alias_set_0): New function.
* langhooks.h (hook_get_alias_set_0): New declaration.
(lang_hook_default_get_alias_set): Likewise.
(LANG_HOOKS_GET_ALIAS_SET): New macro; add to initializer.
* reload1.c (alter_reg): Use adjust_address_nv.
* rtl.c (get_mode_alignment): Moved to here.
* rtl.h (MEM_ALIGN): Take default from mode, if not BLKmode, and
change default if unknown from 1 to BITS_PER_UNIT.
* stor-layout.c (get_mode_alignment): Remove from here.
* toplev.h (struct lang_hoks): Add get_alias_set field.
* tree.h (lang_get_alias_set): Delete declaration.
* config/arc/arc.c (arc_setup_incoming_varags): Set MEM alignment.
* config/i386/i386.c (ix86_setup_incoming_varargs): Likewise.
(ix86_va_arg): Likewise.
* config/i960/i960.c (i960_setup_incoming_varargs): Likewise.
* config/pa/pa.c (hppa_builtin_saveregs): Likewise.
* config/sparc/sparc.c (sparc_va_arg): Likewise.
* config/rs6000/rs6000.c (setup_incoming_varargs): Likewise.
(expand_block_move_mem): Remove dead code.
* cp/cp-lang.c (cxx_get_alias_set): New function.
Point LANG_HOOKS_GET_ALIAS_SET to it.
* f/com.c (LANG_HOOKS_GET_ALIAS_SET): New macro.
(lang_get_alias_set): Delete.
* java/lang.c (lang_get_alias_set): Deleted.
From-SVN: r46440
2001-10-23 20:51:18 +02:00
|
|
|
|
#define MEM_ALIGN(RTX) \
|
|
|
|
|
(MEM_ATTRS (RTX) != 0 ? MEM_ATTRS (RTX)->align \
|
2002-01-27 19:29:33 +01:00
|
|
|
|
: (STRICT_ALIGNMENT && GET_MODE (RTX) != BLKmode \
|
|
|
|
|
? GET_MODE_ALIGNMENT (GET_MODE (RTX)) : BITS_PER_UNIT))
|
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
|
|
|
|
|
emit-rtl.c (reg_attrs_htab): New static variable.
* emit-rtl.c (reg_attrs_htab): New static variable.
(reg_attrs_htab_hash, reg_attrs_htab_eq, get_reg_attrs): New static
functions.
(reg_rtx): Do not maintain regno_decl.
(gen_rtx_REG_offset, set_reg_attrs_from_mem, set_delc_rtx,
set_mem_attrs_from_reg): New global function.
(init_emit): Do not initialize regno_decl.
(init_emit_once): initialize reg_attrs_htab.
* final.c (alter_subreg): Do not replace REG by SUBREG.
(gen_mem_expr_from_op): Improve output.
(output_asm_operands): Likewise.
* function.c (assign_params): Do not set REGNO_DECL.
* function.h (struct function): Kill regno_decl.
(REGNO_DECL): Kill.
* gengtype.c (adjust_field_rtx_def): Handle new field of reg.
* print_rtl.c (print_rtx): Output REG information.
* regclass.c (reg_scan_mark_refs): Update attrs.
* reload1.c (alter_reg): Likewise.
* simplify_rtx.c (simplify_subreg): Likewise.
* stmt.c (expand_decl): Likewise.
* rtl.def (REG): Add new field.
* rtl.h (struct reg_attrs): New.
(rtunion_def): At rtreg.
(X0MEMATTR): Add checking.
(X0REGATTR, REG_ATTRS, REG_EXPR, REG_OFFSET): New macro.
(set_reg_attrs_from_mem, set_mem_attrs_from_reg, gen_rtx_REG_offset):
Declare.
* tree.h (SET_DECL_RTL): Call set_decl_rtl.
From-SVN: r61741
2003-01-24 23:45:58 +01:00
|
|
|
|
/* For a REG rtx, the decl it is known to refer to, if it is known to
|
|
|
|
|
refer to part of a DECL. */
|
|
|
|
|
#define REG_EXPR(RTX) (REG_ATTRS (RTX) == 0 ? 0 : REG_ATTRS (RTX)->decl)
|
|
|
|
|
|
|
|
|
|
/* For a MEM rtx, the offset from the start of MEM_DECL, if known, as a
|
|
|
|
|
RTX that is always a CONST_INT. */
|
|
|
|
|
#define REG_OFFSET(RTX) (REG_ATTRS (RTX) == 0 ? 0 : REG_ATTRS (RTX)->offset)
|
|
|
|
|
|
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
|
|
|
|
/* Copy the attributes that apply to memory locations from RHS to LHS. */
|
2001-10-25 14:55:16 +02:00
|
|
|
|
#define MEM_COPY_ATTRIBUTES(LHS, RHS) \
|
|
|
|
|
(MEM_VOLATILE_P (LHS) = MEM_VOLATILE_P (RHS), \
|
|
|
|
|
MEM_IN_STRUCT_P (LHS) = MEM_IN_STRUCT_P (RHS), \
|
|
|
|
|
MEM_SCALAR_P (LHS) = MEM_SCALAR_P (RHS), \
|
2003-04-23 01:17:46 +02:00
|
|
|
|
MEM_NOTRAP_P (LHS) = MEM_NOTRAP_P (RHS), \
|
rtl.h (MEM_READONLY_P): Replace RTX_UNCHANGING_P.
* rtl.h (MEM_READONLY_P): Replace RTX_UNCHANGING_P.
* alias.c (true_dependence): Update to match new semantics.
(canon_true_dependence, write_dependence_p): Likewise.
(anti_dependence, output_dependence): Update write_dependence_p args.
(unchanging_anti_dependence): Remove.
* calls.c (purge_mem_unchanging_flag): Remove.
(fixup_tail_calls): Don't call it.
(expand_call): Don't add unchanging memory to function usage.
* expr.c (emit_block_move_via_libcall): Likewise.
(clear_storage_via_libcall): Don't clobber RTX_UNCHANGING_P mems.
(get_subtarget): Don't use RTX_UNCHANGING_P.
(expand_assignment, store_constructor, expand_expr_real_1): Likewise.
(do_tablejump): Set MEM_READONLY_P, not RTX_UNCHANGING_P.
* combine.c (get_last_value_validate): Use MEM_READONLY_P.
* cse.c (insert): Don't use RTX_UNCHANGING_P.
(cse_insn, canon_hash): Use MEM_READONLY_P.
* emit-rtl.c (set_mem_attributes_minus_bitpos): Use MEM_READONLY_P
instead of RTX_UNCHANGING_P.
* explow.c (maybe_set_unchanging): Remove.
* expr.h (maybe_set_unchanging): Remove.
* flow.c (insn_dead_p, mark_used_regs): Use anti_dependence.
* function.c (assign_stack_temp_for_type): Don't use RTX_UNCHANGING_P.
(assign_parm_setup_reg, expand_function_start): Likewise.
* integrate.c (copy_rtx_and_substitute): Likewise.
* ra-rewrite.c (emit_colors): Likewise.
* regmove.c (copy_src_to_dest, regmove_optimize): Likewise.
(fixup_match_1): Likewise.
* reload1.c (reload, alter_reg): Likewise.
* local-alloc.c (validate_equiv_mem): Check MEM_READONLY_P,
not RTX_UNCHANGING_P.
(equiv_init_varies_p): Likewise.
* loop-invariant.c (check_maybe_invariant): Likewise.
* resource.c (mark_referenced_resources, mark_set_resources): Likewise.
* loop.c (note_addr_stored): Likewise.
(prescan_loop): Likewise. Don't check function usage for clobbered
unchanging memory.
* rtlanal.c (rtx_unstable_p): Check MEM_READONLY_P,
not RTX_UNCHANGING_P.
(rtx_varies_p, modified_between_p, modified_in_p): Likewise.
* varasm.c (force_const_mem): Likewise.
* stmt.c (expand_decl): Don't set RTX_UNCHANGING_P.
* web.c (entry_register): Likewise.
* tree-gimple.h (get_base_address): Move decl ...
* tree.h: ... here.
* doc/rtl.texi (MEM_READONLY_P): Replace RTX_UNCHANGING_P.
* config/alpha/alpha.c (alpha_set_memflags_1): Rewrite to be
called via for_each_rtx. Copy MEM_SCALAR_P, MEM_NOTRAP_P too.
(alpha_set_memflags): Update to match.
* config/darwin.c (machopic_indirect_data_reference): Set
MEM_READONLY_P instead of RTX_UNCHANGING_P.
(machopic_indirect_call_target): Likewise.
(machopic_legitimize_pic_address): Likewise.
* config/arm/arm.c (legitimize_pic_address, arm_gen_load_multiple,
arm_gen_store_multiple, arm_gen_movmemqi): Likewise.
* config/arm/arm.md (load_multiple, store_multiple): Likewise.
* config/frv/frv.md (symGOT2reg): Likewise.
* config/i386/i386.c (legitimize_pic_address,
legitimize_tls_address, ix86_split_to_parts): Likewise.
* config/ia64/ia64.c (ia64_expand_tls_address): Likewise.
* config/ia64/ia64.md (load_fptr): Likewise.
* config/m32r/m32r.c (m32r_legitimize_pic_address): Likewise.
* config/m68k/m68k.c (legitimize_pic_address): Likewise.
* config/mcore/mcore.c (block_move_sequence): Likewise.
* config/mn10300/mn10300.md (symGOT2reg): Likewise.
* config/pa/pa.c (legitimize_pic_address): Likewise.
* config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Likewise.
(rs6000_emit_move): Likewise.
* config/s390/s390.c (legitimize_pic_address): Likewise.
(legitimize_tls_address): Likewise.
* config/s390/s390.md (casesi): Likewise.
* config/sh/sh.c (prepare_move_operands, sh_reorg): Likewise.
* config/sh/sh.md (symGOT2reg): Likewise.
* config/sparc/sparc.c (legitimize_pic_address): Likewise.
* config/v850/v850.md (casesi): Likewise.
* config/ia64/ia64.c (gen_thread_pointer): Don't set RTX_UNCHANGING_P.
* config/iq2000/iq2000.c (save_restore_insns): Likewise.
* config/mips/mips.c (mips_restore_gp): Likewise.
(mips_save_restore_reg, mips16_gp_pseudo_reg): Likewise.
* config/sh/sh.c (sh_reorg): Likewise.
From-SVN: r86178
2004-08-18 10:25:01 +02:00
|
|
|
|
MEM_READONLY_P (LHS) = MEM_READONLY_P (RHS), \
|
2001-10-25 14:55:16 +02:00
|
|
|
|
MEM_KEEP_ALIAS_SET_P (LHS) = MEM_KEEP_ALIAS_SET_P (RHS), \
|
2001-10-01 13:00:47 +02:00
|
|
|
|
MEM_ATTRS (LHS) = MEM_ATTRS (RHS))
|
1998-06-25 17:14:41 +02:00
|
|
|
|
|
2002-05-09 00:37:21 +02:00
|
|
|
|
/* 1 if RTX is a label_ref to a label outside the loop containing the
|
|
|
|
|
reference. */
|
|
|
|
|
#define LABEL_OUTSIDE_LOOP_P(RTX) \
|
|
|
|
|
(RTL_FLAG_CHECK1("LABEL_OUTSIDE_LOOP_P", (RTX), LABEL_REF)->in_struct)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2002-05-09 00:37:21 +02:00
|
|
|
|
/* 1 if RTX is a label_ref for a nonlocal label. */
|
|
|
|
|
/* Likewise in an expr_list for a reg_label note. */
|
|
|
|
|
#define LABEL_REF_NONLOCAL_P(RTX) \
|
|
|
|
|
(RTL_FLAG_CHECK2("LABEL_REF_NONLOCAL_P", (RTX), LABEL_REF, \
|
|
|
|
|
REG_LABEL)->volatil)
|
1992-07-19 08:28:24 +02:00
|
|
|
|
|
2002-05-09 00:37:21 +02:00
|
|
|
|
/* 1 if RTX is a code_label that should always be considered to be needed. */
|
|
|
|
|
#define LABEL_PRESERVE_P(RTX) \
|
|
|
|
|
(RTL_FLAG_CHECK2("LABEL_PRESERVE_P", (RTX), CODE_LABEL, NOTE)->in_struct)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2002-05-09 00:37:21 +02:00
|
|
|
|
/* During sched, 1 if RTX is an insn that must be scheduled together
|
1992-03-14 06:07:15 +01:00
|
|
|
|
with the preceding insn. */
|
2002-05-09 00:37:21 +02:00
|
|
|
|
#define SCHED_GROUP_P(RTX) \
|
2002-06-14 20:58:10 +02:00
|
|
|
|
(RTL_FLAG_CHECK3("SCHED_GROUP_P", (RTX), INSN, JUMP_INSN, CALL_INSN \
|
|
|
|
|
)->in_struct)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
|
|
|
|
/* For a SET rtx, SET_DEST is the place that is set
|
|
|
|
|
and SET_SRC is the value it is set to. */
|
flow.c (propagate_block): Use XEXP not SET_DEST for a USE.
* flow.c (propagate_block): Use XEXP not SET_DEST for a USE.
(recompute_reg_usage): Likewise.
* rtlanal.c (find_regno_fusage): Likewise.
* rtl.c (rtl_check_failed_code1): New function.
(rtl_check_failed_code2): New.
* rtl.h (RTL_CHECK1, RTL_CHECK2, RTVEC_ELT): Parenthesize args.
(RTL_CHECKC1, RTL_CHECKC2): New.
(XC*): New accessor macros.
(NOTE_*, LABEL_NAME, LABEL_NUSES, ADDRESSOF_REGNO): Use them.
(ADDRESSOF_DECL, JUMP_LABEL, LABEL_REFS, LABEL_NEXTREF): Likewise.
(CONTAINING_INSN, REGNO, INTVAL, SUBREG_REG, SUBREG_WORD): Likewise.
(ASM_OPERANDS_*, MEM_ALIAS_SET, SET_SRC, SET_DEST): Likewise.
(TRAP_*, RANGE_INFO_*): Likewise.
From-SVN: r29089
1999-09-04 00:23:11 +02:00
|
|
|
|
#define SET_DEST(RTX) XC2EXP(RTX, 0, SET, CLOBBER)
|
|
|
|
|
#define SET_SRC(RTX) XCEXP(RTX, 1, SET)
|
2002-05-09 00:37:21 +02:00
|
|
|
|
#define SET_IS_RETURN_P(RTX) \
|
|
|
|
|
(RTL_FLAG_CHECK1("SET_IS_RETURN_P", (RTX), SET)->jump)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
|
|
|
|
/* For a TRAP_IF rtx, TRAP_CONDITION is an expression. */
|
2002-01-03 06:11:05 +01:00
|
|
|
|
#define TRAP_CONDITION(RTX) XCEXP (RTX, 0, TRAP_IF)
|
|
|
|
|
#define TRAP_CODE(RTX) XCEXP (RTX, 1, TRAP_IF)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2000-04-07 11:24:45 +02:00
|
|
|
|
/* For a COND_EXEC rtx, COND_EXEC_TEST is the condition to base
|
|
|
|
|
conditionally executing the code on, COND_EXEC_CODE is the code
|
|
|
|
|
to execute if the condition is true. */
|
2002-01-03 06:11:05 +01:00
|
|
|
|
#define COND_EXEC_TEST(RTX) XCEXP (RTX, 0, COND_EXEC)
|
|
|
|
|
#define COND_EXEC_CODE(RTX) XCEXP (RTX, 1, COND_EXEC)
|
2000-04-07 11:24:45 +02:00
|
|
|
|
|
2003-05-14 19:44:01 +02:00
|
|
|
|
/* 1 if RTX is a symbol_ref that addresses this function's rtl
|
|
|
|
|
constants pool. */
|
2002-05-09 00:37:21 +02:00
|
|
|
|
#define CONSTANT_POOL_ADDRESS_P(RTX) \
|
|
|
|
|
(RTL_FLAG_CHECK1("CONSTANT_POOL_ADDRESS_P", (RTX), SYMBOL_REF)->unchanging)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2003-05-14 19:44:01 +02:00
|
|
|
|
/* 1 if RTX is a symbol_ref that addresses a value in the file's
|
|
|
|
|
tree constant pool. This information is private to varasm.c. */
|
|
|
|
|
#define TREE_CONSTANT_POOL_ADDRESS_P(RTX) \
|
|
|
|
|
(RTL_FLAG_CHECK1("TREE_CONSTANT_POOL_ADDRESS_P", \
|
|
|
|
|
(RTX), SYMBOL_REF)->frame_related)
|
2000-11-14 18:37:19 +01:00
|
|
|
|
|
2002-05-09 00:37:21 +02:00
|
|
|
|
/* Used if RTX is a symbol_ref, for machine-specific purposes. */
|
|
|
|
|
#define SYMBOL_REF_FLAG(RTX) \
|
|
|
|
|
(RTL_FLAG_CHECK1("SYMBOL_REF_FLAG", (RTX), SYMBOL_REF)->volatil)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2002-05-09 00:37:21 +02:00
|
|
|
|
/* 1 if RTX is a symbol_ref that has been the library function in
|
|
|
|
|
emit_library_call. */
|
|
|
|
|
#define SYMBOL_REF_USED(RTX) \
|
|
|
|
|
(RTL_FLAG_CHECK1("SYMBOL_REF_USED", (RTX), SYMBOL_REF)->used)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2002-05-09 00:37:21 +02:00
|
|
|
|
/* 1 if RTX is a symbol_ref for a weak symbol. */
|
|
|
|
|
#define SYMBOL_REF_WEAK(RTX) \
|
2004-05-13 08:41:07 +02:00
|
|
|
|
(RTL_FLAG_CHECK1("SYMBOL_REF_WEAK", (RTX), SYMBOL_REF)->return_val)
|
2001-05-13 23:16:58 +02:00
|
|
|
|
|
varasm.c (const_str_htab_hash, [...]): Kill.
* varasm.c (const_str_htab_hash, const_str_htab_eq, STRHASH,
struct deferred_string, const_str_htab): Kill.
(n_deferred_strings): New static variable.
(build_constant_desc): Set SYMBOL_REF_DECL of the new
symbol_ref to point to the constant.
(output_constant_def): When a deferred string is forced out,
just clear STRING_POOL_ADDRESS_P and decrement n_deferred_strings.
(mark_constant): Likewise.
(maybe_output_constant_def_contents): When deferring a string
constant, just set STRING_POOL_ADDRESS_P and increment
n_deferred_strings.
(mark_constant_pool): Check n_deferred_strings, not the size
of const_str_htab.
(init_varasm_once): No need to create const_str_htab.
* rtl.def, rtl.h, doc/rtl.texi: Document possibility that
SYMBOL_REF_DECL points to a constant.
From-SVN: r66133
2003-04-27 20:57:51 +02:00
|
|
|
|
/* The tree (decl or constant) associated with the symbol, or null. */
|
2003-04-11 23:15:36 +02:00
|
|
|
|
#define SYMBOL_REF_DECL(RTX) X0TREE ((RTX), 2)
|
|
|
|
|
|
|
|
|
|
/* A set of flags on a symbol_ref that are, in some respects, redundant with
|
|
|
|
|
information derivable from the tree decl associated with this symbol.
|
|
|
|
|
Except that we build a *lot* of SYMBOL_REFs that aren't associated with a
|
|
|
|
|
decl. In some cases this is a bug. But beyond that, it's nice to cache
|
|
|
|
|
this information to avoid recomputing it. Finally, this allows space for
|
|
|
|
|
the target to store more than one bit of information, as with
|
|
|
|
|
SYMBOL_REF_FLAG. */
|
|
|
|
|
#define SYMBOL_REF_FLAGS(RTX) X0INT ((RTX), 1)
|
|
|
|
|
|
|
|
|
|
/* These flags are common enough to be defined for all targets. They
|
|
|
|
|
are computed by the default version of targetm.encode_section_info. */
|
|
|
|
|
|
|
|
|
|
/* Set if this symbol is a function. */
|
|
|
|
|
#define SYMBOL_FLAG_FUNCTION (1 << 0)
|
|
|
|
|
#define SYMBOL_REF_FUNCTION_P(RTX) \
|
|
|
|
|
((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_FUNCTION) != 0)
|
|
|
|
|
/* Set if targetm.binds_local_p is true. */
|
|
|
|
|
#define SYMBOL_FLAG_LOCAL (1 << 1)
|
|
|
|
|
#define SYMBOL_REF_LOCAL_P(RTX) \
|
|
|
|
|
((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_LOCAL) != 0)
|
|
|
|
|
/* Set if targetm.in_small_data_p is true. */
|
|
|
|
|
#define SYMBOL_FLAG_SMALL (1 << 2)
|
|
|
|
|
#define SYMBOL_REF_SMALL_P(RTX) \
|
|
|
|
|
((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_SMALL) != 0)
|
|
|
|
|
/* The three-bit field at [5:3] is true for TLS variables; use
|
|
|
|
|
SYMBOL_REF_TLS_MODEL to extract the field as an enum tls_model. */
|
|
|
|
|
#define SYMBOL_FLAG_TLS_SHIFT 3
|
|
|
|
|
#define SYMBOL_REF_TLS_MODEL(RTX) \
|
2003-04-15 00:35:45 +02:00
|
|
|
|
((enum tls_model) ((SYMBOL_REF_FLAGS (RTX) >> SYMBOL_FLAG_TLS_SHIFT) & 7))
|
2003-04-11 23:15:36 +02:00
|
|
|
|
/* Set if this symbol is not defined in this translation unit. */
|
|
|
|
|
#define SYMBOL_FLAG_EXTERNAL (1 << 6)
|
|
|
|
|
#define SYMBOL_REF_EXTERNAL_P(RTX) \
|
|
|
|
|
((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_EXTERNAL) != 0)
|
|
|
|
|
|
|
|
|
|
/* Subsequent bits are available for the target to use. */
|
2003-04-17 10:49:53 +02:00
|
|
|
|
#define SYMBOL_FLAG_MACH_DEP_SHIFT 7
|
|
|
|
|
#define SYMBOL_FLAG_MACH_DEP (1 << SYMBOL_FLAG_MACH_DEP_SHIFT)
|
2003-04-11 23:15:36 +02:00
|
|
|
|
|
1991-12-06 22:00:31 +01:00
|
|
|
|
/* Define a macro to look for REG_INC notes,
|
|
|
|
|
but save time on machines where they never exist. */
|
|
|
|
|
|
1992-03-31 00:54:10 +02:00
|
|
|
|
#if (defined (HAVE_PRE_INCREMENT) || defined (HAVE_PRE_DECREMENT) || defined (HAVE_POST_INCREMENT) || defined (HAVE_POST_DECREMENT))
|
2002-01-03 06:11:05 +01:00
|
|
|
|
#define FIND_REG_INC_NOTE(INSN, REG) \
|
|
|
|
|
((REG) != NULL_RTX && REG_P ((REG)) \
|
|
|
|
|
? find_regno_note ((INSN), REG_INC, REGNO (REG)) \
|
|
|
|
|
: find_reg_note ((INSN), REG_INC, (REG)))
|
1991-12-06 22:00:31 +01:00
|
|
|
|
#else
|
2002-01-03 06:11:05 +01:00
|
|
|
|
#define FIND_REG_INC_NOTE(INSN, REG) 0
|
1991-12-06 22:00:31 +01:00
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* Indicate whether the machine has any sort of auto increment addressing.
|
|
|
|
|
If not, we can avoid checking for REG_INC notes. */
|
|
|
|
|
|
1992-03-31 00:54:10 +02:00
|
|
|
|
#if (defined (HAVE_PRE_INCREMENT) || defined (HAVE_PRE_DECREMENT) || defined (HAVE_POST_INCREMENT) || defined (HAVE_POST_DECREMENT))
|
1991-12-06 22:00:31 +01:00
|
|
|
|
#define AUTO_INC_DEC
|
|
|
|
|
#endif
|
Makefile.in (HOST_RTL): Add $(HOST_PREFIX)bitmap.o.
* Makefile.in (HOST_RTL): Add $(HOST_PREFIX)bitmap.o.
(rtl.o, emit-rtl.o): Add dependency on bitmap.h.
($(HOST_PREFIX_1)rtl.o): Likewise.
($(HOST_PREFIX_1)bitmap.o): New host object.
* emit-rtl.c (toplevel): Include bitmap.h.
(gen_rtx): Handle 't' and 'b' nodes.
* print-rtl.c (print_rtx): Handle printing NOTE_INSN_LIVE notes.
Print block number for block begin/end notes. Print 't' type
nodes as a pointer. Know that the 3rd argument of live range
start/stop notes is really a range_info rtx. If type is 'b', print
out argument as a bitmap.
* rtl.c: Include bitmap.c.
(copy_rtx): Copy tree nodes as is. Copy bitmaps if type is 'b'.
(note_insn_name): Add NOTE_INSN_RANGE_{START,END}, NOTE_INSN_LIVE.
* rtl.def (RANGE_LIVE): New node to hold live information while we
recalculate the basic blocks.
(RANGE_REG, RANGE_INFO): New rtl types for live range splitting.
(RANGE_VAR): New node, to hold information saved in symbol node for New
communicating live range information to the debug output functions.
* rtl.h (rtunion_def): Add rttree and rtbit fields.
(XBITMAP, XTREE): New accessor macros.
(NOTE_LIVE_INFO): Overload NOTE_SOURCE_FILE for NOTE_INSN_LIVE notes.
(NOTE_RANGE_INFO): Similarly for NOTE_INSN_RANGE_{START,END} notes.
(NOTE_BLOCK_LIVE_RANGE_BLOCK): Define.
(NOTE_INSN_RANGE_START, NOTE_INSN_RANGE_END, NOTE_INSN_LIVE): New notes.
(RANGE_LIVE_{BITMAP,ORIG_BLOCK}): New accessor macros.
(RANGE_REG_{SYMBOL,BLOCK}_NODE, RANGE_VAR_*): New accessor macros.
(RANGE_INFO_*): Likewise.
* sched.c (sched_analyze): Keep live range start/stop notes.
(unlink_other_notes): Likewise.
* haifa-sched.c (sched_analyze): Keep live range start/stop notes.
(unlink_other_notes): Likewise.
* tree.h (BLOCK_LIVE_RANGE_{START,END,VAR_FLAG}): New accessor macros.
(BLOCK_LIVE_RANGE_FLAG): Likewise.
(DECL_LIVE_RANGE_RTL): Likewise.
(struct tree_block): Add live_range_flag, live_range_var_flag,
live_range_start and live_range_end.
(struct tree_decl): Add live_range_rtl field.
* gengenrtl.c (type_from_format): Handle 'b' and 't'.
(accessor_from_format): Likewise.
Co-Authored-By: Jeffrey A Law <law@cygnus.com>
From-SVN: r19727
1998-05-13 23:13:47 +02:00
|
|
|
|
|
1998-11-25 00:15:19 +01:00
|
|
|
|
#ifndef HAVE_PRE_INCREMENT
|
|
|
|
|
#define HAVE_PRE_INCREMENT 0
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef HAVE_PRE_DECREMENT
|
|
|
|
|
#define HAVE_PRE_DECREMENT 0
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef HAVE_POST_INCREMENT
|
|
|
|
|
#define HAVE_POST_INCREMENT 0
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef HAVE_POST_DECREMENT
|
|
|
|
|
#define HAVE_POST_DECREMENT 0
|
|
|
|
|
#endif
|
|
|
|
|
|
2000-07-28 19:46:18 +02:00
|
|
|
|
#ifndef HAVE_POST_MODIFY_DISP
|
|
|
|
|
#define HAVE_POST_MODIFY_DISP 0
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef HAVE_POST_MODIFY_REG
|
|
|
|
|
#define HAVE_POST_MODIFY_REG 0
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef HAVE_PRE_MODIFY_DISP
|
|
|
|
|
#define HAVE_PRE_MODIFY_DISP 0
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef HAVE_PRE_MODIFY_REG
|
|
|
|
|
#define HAVE_PRE_MODIFY_REG 0
|
|
|
|
|
#endif
|
|
|
|
|
|
tm.texi (USE_LOAD_POST_DECREMENT, [...]): Document.
* tm.texi (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT): Document.
(USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Fix documentation.
* rtl.h (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT,
USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Provide default
definition.
* expr.c: (USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Delete default
definition.
From-SVN: r26134
1999-04-02 17:39:55 +02:00
|
|
|
|
|
|
|
|
|
/* Some architectures do not have complete pre/post increment/decrement
|
|
|
|
|
instruction sets, or only move some modes efficiently. These macros
|
|
|
|
|
allow us to tune autoincrement generation. */
|
|
|
|
|
|
|
|
|
|
#ifndef USE_LOAD_POST_INCREMENT
|
|
|
|
|
#define USE_LOAD_POST_INCREMENT(MODE) HAVE_POST_INCREMENT
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef USE_LOAD_POST_DECREMENT
|
|
|
|
|
#define USE_LOAD_POST_DECREMENT(MODE) HAVE_POST_DECREMENT
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef USE_LOAD_PRE_INCREMENT
|
|
|
|
|
#define USE_LOAD_PRE_INCREMENT(MODE) HAVE_PRE_INCREMENT
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef USE_LOAD_PRE_DECREMENT
|
|
|
|
|
#define USE_LOAD_PRE_DECREMENT(MODE) HAVE_PRE_DECREMENT
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef USE_STORE_POST_INCREMENT
|
|
|
|
|
#define USE_STORE_POST_INCREMENT(MODE) HAVE_POST_INCREMENT
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef USE_STORE_POST_DECREMENT
|
|
|
|
|
#define USE_STORE_POST_DECREMENT(MODE) HAVE_POST_DECREMENT
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef USE_STORE_PRE_INCREMENT
|
|
|
|
|
#define USE_STORE_PRE_INCREMENT(MODE) HAVE_PRE_INCREMENT
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef USE_STORE_PRE_DECREMENT
|
|
|
|
|
#define USE_STORE_PRE_DECREMENT(MODE) HAVE_PRE_DECREMENT
|
|
|
|
|
#endif
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2000-09-01 03:03:29 +02:00
|
|
|
|
/* Nonzero when we are generating CONCATs. */
|
|
|
|
|
extern int generating_concat_p;
|
|
|
|
|
|
2004-07-29 09:37:16 +02:00
|
|
|
|
/* Nonzero when we are expanding trees to RTL. */
|
|
|
|
|
extern int currently_expanding_to_rtl;
|
|
|
|
|
|
1991-12-06 22:00:31 +01:00
|
|
|
|
/* Generally useful functions. */
|
|
|
|
|
|
1997-12-09 09:20:07 +01:00
|
|
|
|
/* In expmed.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern int ceil_log2 (unsigned HOST_WIDE_INT);
|
1992-07-06 22:04:00 +02:00
|
|
|
|
|
2001-06-20 09:18:18 +02:00
|
|
|
|
/* In builtins.c */
|
2003-06-15 15:43:32 +02:00
|
|
|
|
extern rtx expand_builtin_expect_jump (tree, rtx, rtx);
|
2001-06-20 09:18:18 +02:00
|
|
|
|
|
Warning fixes:
* Makefile.in (varasm.o): Depend on dbxout.h.
(cse.o): Depend on toplev.h and output.h.
(gcse.o): Depend on output.h.
* mips.c: Include system.h and toplev.h and remove redundant code.
Include output.h after tree.h so all its prototypes get activated.
* mips.md (table_jump): Remove unused variable `dest'.
* sparc.h: Add prototype for `v8plus_regcmp_op'.
* crtstuff.c (fini_dummy, init_dummy): Mark function definitions
with __attribute__ ((__unused__)).
(__frame_dummy): Provide prototype before use, wrap it with
EH_FRAME_SECTION_ASM_OP.
* cse.c: Move inclusion of <setjmp.h> above local headers.
Include toplev.h and output.h.
* dbxout.h: Add prototype for `dbxout_begin_function'.
* final.c (final_scan_insn): Wrap variable `max_skip' in macro
ASM_OUTPUT_MAX_SKIP_ALIGN.
* gcse.c: Include system.h and output.h.
(dump_cuid_table, dump_rd_table, dump_cprop_data, dump_pre_data):
Make extern instead of static.
(compute_can_copy): Only declare variables `reg' and `insn' when
AVOID_CCMODE_COPIES is not defined.
(record_set_info): Mark parameter `setter' with ATTRIBUTE_UNUSED.
(hash_scan_clobber): Likewise for `x' and `insn'.
(hash_scan_call): Likewise.
(record_last_set_info): Likewise for `setter'.
(mark_call): Likewise for `pat'.
(pre_insert_insn): Wrap variable `note' in macro HAVE_cc0.
* libgcc2.c (__bb_init_prg): Replace bzero with memset and fix the
length parameter so that it multiplies the number of elements by
the sizeof(element).
* output.h: Add prototype for `weak_finish'.
* recog.h: Likewise for `validate_replace_src'.
* rtl.h: Likewise for `optimize_save_area_alloca',
`fix_sched_param', `purge_addressof', `gcse_main',
`regmove_optimize', `dbr_schedule', `branch_prob' and
`end_branch_prob'.
* toplev.h: Likewise for `set_float_handler' and
`output_quoted_string'.
* varasm.c: Include dbxout.h.
From-SVN: r20351
1998-06-08 20:30:27 +02:00
|
|
|
|
/* In explow.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void set_stack_check_libfunc (rtx);
|
|
|
|
|
extern HOST_WIDE_INT trunc_int_for_mode (HOST_WIDE_INT, enum machine_mode);
|
2004-07-21 01:02:36 +02:00
|
|
|
|
extern rtx plus_constant (rtx, HOST_WIDE_INT);
|
1992-07-06 22:04:00 +02:00
|
|
|
|
|
2000-07-23 01:29:14 +02:00
|
|
|
|
/* In emit-rtl.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtvec gen_rtvec (int, ...);
|
|
|
|
|
extern rtx copy_insn_1 (rtx);
|
|
|
|
|
extern rtx copy_insn (rtx);
|
|
|
|
|
extern rtx gen_int_mode (HOST_WIDE_INT, enum machine_mode);
|
|
|
|
|
extern rtx emit_copy_of_insn_after (rtx, rtx);
|
|
|
|
|
extern void set_reg_attrs_from_mem (rtx, rtx);
|
|
|
|
|
extern void set_mem_attrs_from_reg (rtx, rtx);
|
|
|
|
|
extern void set_reg_attrs_for_parm (rtx, rtx);
|
2004-03-06 02:21:28 +01:00
|
|
|
|
extern int mem_expr_equal_p (tree, tree);
|
2000-07-23 01:29:14 +02:00
|
|
|
|
|
|
|
|
|
/* In rtl.c */
|
ggc-common.c (ggc_alloc_cleared_stat, [...]): Rename from ...; make statistics transparent.
* ggc-common.c (ggc_alloc_cleared_stat, ggc_realloc_stat):
Rename from ...; make statistics transparent.
(ggc_alloc_cleared, ggc_realloc_stat): ... these.
(loc_descriptor): New structure.
(hash_descriptor, eq_descriptor, loc_descriptor, cmp_statistics,
add_statistics):
New static function.
(ggc_record_overhead, dump_statistics): New global function.
* ggc-none.c (ggc_alloc_types_stat, ggc_alloc_stat, ggc_alloc_zone_stat,
ggc_alloc_cleared_stat, ggc_realloc_stat, ggc_alloc_typed_stat): Rename
from ...; accept locations
(ggc_alloc_types, ggc_alloc, ggc_alloc_zone, ggc_alloc_cleared,
ggc_realloc, ggc_alloc_typed): ... this one.
from ...; accept locations
* ggc-page.c (ggc_alloc_typed_stat, ggc_alloc_zone_stat,
ggc_alloc_stat): Rename from ... ; pass locations
* ggc-page.c (ggc_alloc_typed, ggc_alloc_zone, ggc_alloc):
... this one.
(ggc_alloc_stat): Record overehead.
* ggc.h (ggc_alloc_types, ggc_alloc, ggc_alloc_zone, ggc_alloc_cleared,
ggc_realloc, ggc_alloc_typed): Turn to macros
(ggc_alloc_types_stat, ggc_alloc_stat, ggc_alloc_zone_stat,
ggc_alloc_cleared_stat, ggc_realloc_stat, ggc_alloc_typed_stat): Declare.
(dump_ggc_loc_satistics, ggc_record_overehead): Declare.
* langhooks.h (lhd_make_node): Declare.
(LANG_HOOKS_MAKE_TYPE): Default to new function,
* langhooks.c (lhd_make_node): New.
* rtl.c (rtx_alloc_stat, swallow_copy_rtx_stat): Rename from ... ; pass
locations.
(rtx_alloc, swallow_copy_rtx): ... this one.
* rtl.h (rtx_alloc, swallow_copy_rtx): Turn to macros.
* rtl.c (rtx_alloc_stat, swallow_copy_rtx_stat): Declare.
* toplpev.c (finalize): Dump stats.
* tree.c (make_node_stat, copy_node_stat, make_tree_vec_stat,
build_tree_list_stat, tree_cons_stat, build?_stat, build_decl_stat):
Rename from ... ; pass locators.
(make_node, copy_node, make_tree_vec, build_tree_list, tree_cons,
build?, build_decl): Declare.
* tree.h (make_node_stat, copy_node_stat, make_tree_vec_stat,
build_tree_list_stat, tree_cons_stat, build?_stat, build_decl_stat):
Declare.
(make_node, copy_node, make_tree_vec, build_tree_list, tree_cons,
build?, build_decl): New macros.
* Makefile.in (RTL_H, TREE_H): Add statistics.h dependency.
* statistics.h: New file.
From-SVN: r78826
2004-03-03 12:25:51 +01:00
|
|
|
|
extern rtx rtx_alloc_stat (RTX_CODE MEM_STAT_DECL);
|
|
|
|
|
#define rtx_alloc(c) rtx_alloc_stat (c MEM_STAT_INFO)
|
|
|
|
|
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtvec rtvec_alloc (int);
|
|
|
|
|
extern rtx copy_rtx (rtx);
|
2003-12-22 08:42:43 +01:00
|
|
|
|
extern void dump_rtx_statistics (void);
|
2000-07-23 01:29:14 +02:00
|
|
|
|
|
|
|
|
|
/* In emit-rtl.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtx copy_rtx_if_shared (rtx);
|
2000-07-23 01:29:14 +02:00
|
|
|
|
|
|
|
|
|
/* In rtl.c */
|
ggc-common.c (ggc_alloc_cleared_stat, [...]): Rename from ...; make statistics transparent.
* ggc-common.c (ggc_alloc_cleared_stat, ggc_realloc_stat):
Rename from ...; make statistics transparent.
(ggc_alloc_cleared, ggc_realloc_stat): ... these.
(loc_descriptor): New structure.
(hash_descriptor, eq_descriptor, loc_descriptor, cmp_statistics,
add_statistics):
New static function.
(ggc_record_overhead, dump_statistics): New global function.
* ggc-none.c (ggc_alloc_types_stat, ggc_alloc_stat, ggc_alloc_zone_stat,
ggc_alloc_cleared_stat, ggc_realloc_stat, ggc_alloc_typed_stat): Rename
from ...; accept locations
(ggc_alloc_types, ggc_alloc, ggc_alloc_zone, ggc_alloc_cleared,
ggc_realloc, ggc_alloc_typed): ... this one.
from ...; accept locations
* ggc-page.c (ggc_alloc_typed_stat, ggc_alloc_zone_stat,
ggc_alloc_stat): Rename from ... ; pass locations
* ggc-page.c (ggc_alloc_typed, ggc_alloc_zone, ggc_alloc):
... this one.
(ggc_alloc_stat): Record overehead.
* ggc.h (ggc_alloc_types, ggc_alloc, ggc_alloc_zone, ggc_alloc_cleared,
ggc_realloc, ggc_alloc_typed): Turn to macros
(ggc_alloc_types_stat, ggc_alloc_stat, ggc_alloc_zone_stat,
ggc_alloc_cleared_stat, ggc_realloc_stat, ggc_alloc_typed_stat): Declare.
(dump_ggc_loc_satistics, ggc_record_overehead): Declare.
* langhooks.h (lhd_make_node): Declare.
(LANG_HOOKS_MAKE_TYPE): Default to new function,
* langhooks.c (lhd_make_node): New.
* rtl.c (rtx_alloc_stat, swallow_copy_rtx_stat): Rename from ... ; pass
locations.
(rtx_alloc, swallow_copy_rtx): ... this one.
* rtl.h (rtx_alloc, swallow_copy_rtx): Turn to macros.
* rtl.c (rtx_alloc_stat, swallow_copy_rtx_stat): Declare.
* toplpev.c (finalize): Dump stats.
* tree.c (make_node_stat, copy_node_stat, make_tree_vec_stat,
build_tree_list_stat, tree_cons_stat, build?_stat, build_decl_stat):
Rename from ... ; pass locators.
(make_node, copy_node, make_tree_vec, build_tree_list, tree_cons,
build?, build_decl): Declare.
* tree.h (make_node_stat, copy_node_stat, make_tree_vec_stat,
build_tree_list_stat, tree_cons_stat, build?_stat, build_decl_stat):
Declare.
(make_node, copy_node, make_tree_vec, build_tree_list, tree_cons,
build?, build_decl): New macros.
* Makefile.in (RTL_H, TREE_H): Add statistics.h dependency.
* statistics.h: New file.
From-SVN: r78826
2004-03-03 12:25:51 +01:00
|
|
|
|
extern rtx shallow_copy_rtx_stat (rtx MEM_STAT_DECL);
|
|
|
|
|
#define shallow_copy_rtx(a) shallow_copy_rtx_stat (a MEM_STAT_INFO)
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern int rtx_equal_p (rtx, rtx);
|
2000-07-23 01:29:14 +02:00
|
|
|
|
|
|
|
|
|
/* In emit-rtl.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtvec gen_rtvec_v (int, rtx *);
|
|
|
|
|
extern rtx gen_reg_rtx (enum machine_mode);
|
|
|
|
|
extern rtx gen_rtx_REG_offset (rtx, enum machine_mode, unsigned int, int);
|
|
|
|
|
extern rtx gen_label_rtx (void);
|
|
|
|
|
extern rtx gen_lowpart_common (enum machine_mode, rtx);
|
2000-07-23 01:29:14 +02:00
|
|
|
|
|
|
|
|
|
/* In cse.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtx gen_lowpart_if_possible (enum machine_mode, rtx);
|
2000-07-23 01:29:14 +02:00
|
|
|
|
|
|
|
|
|
/* In emit-rtl.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtx gen_highpart (enum machine_mode, rtx);
|
|
|
|
|
extern rtx gen_highpart_mode (enum machine_mode, enum machine_mode, rtx);
|
|
|
|
|
extern rtx operand_subword (rtx, unsigned int, int, enum machine_mode);
|
2000-07-23 01:29:14 +02:00
|
|
|
|
|
|
|
|
|
/* In emit-rtl.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtx operand_subword_force (rtx, unsigned int, enum machine_mode);
|
|
|
|
|
extern int subreg_lowpart_p (rtx);
|
|
|
|
|
extern unsigned int subreg_lowpart_offset (enum machine_mode,
|
|
|
|
|
enum machine_mode);
|
|
|
|
|
extern unsigned int subreg_highpart_offset (enum machine_mode,
|
|
|
|
|
enum machine_mode);
|
|
|
|
|
extern rtx make_safe_from (rtx, rtx);
|
|
|
|
|
extern rtx convert_memory_address (enum machine_mode, rtx);
|
|
|
|
|
extern rtx get_insns (void);
|
|
|
|
|
extern const char *get_insn_name (int);
|
|
|
|
|
extern rtx get_last_insn (void);
|
|
|
|
|
extern rtx get_last_insn_anywhere (void);
|
|
|
|
|
extern rtx get_first_nonnote_insn (void);
|
|
|
|
|
extern rtx get_last_nonnote_insn (void);
|
|
|
|
|
extern void start_sequence (void);
|
|
|
|
|
extern void push_to_sequence (rtx);
|
|
|
|
|
extern void end_sequence (void);
|
|
|
|
|
extern rtx immed_double_const (HOST_WIDE_INT, HOST_WIDE_INT,
|
|
|
|
|
enum machine_mode);
|
2004-01-06 23:51:00 +01:00
|
|
|
|
|
2004-10-07 08:20:34 +02:00
|
|
|
|
/* In loop-iv.c */
|
|
|
|
|
|
|
|
|
|
extern rtx lowpart_subreg (enum machine_mode, rtx, enum machine_mode);
|
|
|
|
|
|
2004-01-06 23:51:00 +01:00
|
|
|
|
/* In varasm.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtx force_const_mem (enum machine_mode, rtx);
|
2000-07-23 01:29:14 +02:00
|
|
|
|
|
|
|
|
|
/* In varasm.c */
|
Makefile.in (RTL_BASE_H, RTL_H): Correct.
* Makefile.in (RTL_BASE_H, RTL_H): Correct.
(BUILD_RTL): Remove $(BUILD_PREFIX) from ggc-none.o.
(genobjs): Add errors.o, ggc-none.o, and min-insn-modes.o.
(read-rtl.o, gensupport.o, genconfig.o, genflags.o, gencodes.o)
(genconstants.o, genemit.o, genopinit.o, genrecog.o, genextract.o)
(genpeep.o, genattr.o, genattrtab.o, genautomata.o, genoutput.o)
(genconditions.o): Depend on $(RTL_BASE_H) not $(RTL_H).
(ggc-none.o, errors.o): Move rule to generators section;
correct dependencies.
(min-insn-modes.o): Move rule to generators section; remove
unnecessary explicit command; correct dependencies.
(print-rtl.o, print-rtl1.o): Correct dependencies.
($(BUILD_PREFIX_1)errors.o. $(BUILD_PREFIX_1)ggc-none.o): Delete rule.
(mostlyclean): Update.
* errors.c: Include bconfig.h not config.h. Correct comment.
* gengtype.c, genpreds.c: Don't define NO_GENRTL_H.
* ggc-none.c: Include bconfig.h; not config.h or tm.h.
* print-rtl.c: Don't include tm_p.h.
* rtl.h: Move forward-decl of struct function down where it's
needed. Include genrtl.h #ifndef GENERATOR_FILE, not
#ifndef NO_GENRTL_H. Remove unnecessary #ifdef BUFSIZ statements.
From-SVN: r85574
2004-08-04 22:55:08 +02:00
|
|
|
|
|
|
|
|
|
struct function;
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtx get_pool_constant (rtx);
|
|
|
|
|
extern rtx get_pool_constant_mark (rtx, bool *);
|
|
|
|
|
extern enum machine_mode get_pool_mode (rtx);
|
|
|
|
|
extern rtx get_pool_constant_for_function (struct function *, rtx);
|
|
|
|
|
extern rtx simplify_subtraction (rtx);
|
2000-07-23 01:29:14 +02:00
|
|
|
|
|
|
|
|
|
/* In function.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtx assign_stack_local (enum machine_mode, HOST_WIDE_INT, int);
|
|
|
|
|
extern rtx assign_stack_temp (enum machine_mode, HOST_WIDE_INT, int);
|
|
|
|
|
extern rtx assign_stack_temp_for_type (enum machine_mode,
|
|
|
|
|
HOST_WIDE_INT, int, tree);
|
|
|
|
|
extern rtx assign_temp (tree, int, int, int);
|
2003-06-16 10:27:05 +02:00
|
|
|
|
|
2000-07-23 01:29:14 +02:00
|
|
|
|
/* In emit-rtl.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtx emit_insn_before (rtx, rtx);
|
2004-09-30 23:25:52 +02:00
|
|
|
|
extern rtx emit_insn_before_noloc (rtx, rtx);
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtx emit_insn_before_setloc (rtx, rtx, int);
|
|
|
|
|
extern rtx emit_jump_insn_before (rtx, rtx);
|
2004-09-30 23:25:52 +02:00
|
|
|
|
extern rtx emit_jump_insn_before_noloc (rtx, rtx);
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtx emit_jump_insn_before_setloc (rtx, rtx, int);
|
|
|
|
|
extern rtx emit_call_insn_before (rtx, rtx);
|
2004-09-30 23:25:52 +02:00
|
|
|
|
extern rtx emit_call_insn_before_noloc (rtx, rtx);
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtx emit_call_insn_before_setloc (rtx, rtx, int);
|
|
|
|
|
extern rtx emit_barrier_before (rtx);
|
|
|
|
|
extern rtx emit_label_before (rtx, rtx);
|
|
|
|
|
extern rtx emit_note_before (int, rtx);
|
|
|
|
|
extern rtx emit_insn_after (rtx, rtx);
|
2004-09-30 23:25:52 +02:00
|
|
|
|
extern rtx emit_insn_after_noloc (rtx, rtx);
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtx emit_insn_after_setloc (rtx, rtx, int);
|
|
|
|
|
extern rtx emit_jump_insn_after (rtx, rtx);
|
2004-09-30 23:25:52 +02:00
|
|
|
|
extern rtx emit_jump_insn_after_noloc (rtx, rtx);
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtx emit_jump_insn_after_setloc (rtx, rtx, int);
|
|
|
|
|
extern rtx emit_call_insn_after (rtx, rtx);
|
2004-09-30 23:25:52 +02:00
|
|
|
|
extern rtx emit_call_insn_after_noloc (rtx, rtx);
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtx emit_call_insn_after_setloc (rtx, rtx, int);
|
|
|
|
|
extern rtx emit_barrier_after (rtx);
|
|
|
|
|
extern rtx emit_label_after (rtx, rtx);
|
|
|
|
|
extern rtx emit_note_after (int, rtx);
|
|
|
|
|
extern rtx emit_note_copy_after (rtx, rtx);
|
|
|
|
|
extern rtx emit_insn (rtx);
|
|
|
|
|
extern rtx emit_jump_insn (rtx);
|
|
|
|
|
extern rtx emit_call_insn (rtx);
|
|
|
|
|
extern rtx emit_label (rtx);
|
|
|
|
|
extern rtx emit_barrier (void);
|
|
|
|
|
extern rtx emit_note (int);
|
|
|
|
|
extern rtx emit_note_copy (rtx);
|
rtl.h (emit_line_note): Take a location_t.
* rtl.h (emit_line_note): Take a location_t.
(emit_line_note_force): Remove.
(set_file_and_line_for_statement): Take a location_t.
* tree.g (emit_line_note): Take a location_t.
* emit-rtl.c (emit_line_note): Take a location_t.
(emit_line_note_force): Remove.
* function.c (init_function_start): Adjust emit_line_note call.
(expand_function_end): Use force_next_line_note, not
emit_line_note_force.
* c-parse.in (maybe_type_qual): Adjust emit_line_note calls.
* c-semantics.c (genrtl_do_pushlevel, genrtl_goto_stmt,
genrtl_expr_stmt_value, genrtl_decl_stmt, genrtl_if_stmt,
genrtl_while_stmt, genrtl_do_stmt_1, genrtl_return_stmt,
genrtl_for_stmt, genrtl_break_stmt, genrtl_continue_stmt,
genrtl_continue_stmt, genrtl_switch_stmt,
genrtl_asm_stmt): Likewise.
* expr.c (expand_expr): Likewise.
* integrate.c (expand_inline_function): Likewise.
* stmt.c (set_file_and_line_for_stmt): Take a location_t.
(expand_decl_init): Adjust emit_line_note call.
* ada/trans.c (build_unit_elab, set_lineno): Adjust emit_line_note
calls.
* cp/semantics.c: (genrtl_try_block) Adjust emit_line_note
calls.
* f/com.c (bison_rule_pushlevel_, bison_rule_compstmt_): Adjust
emit_line_note calls.
* f/ste.c (ffeste_emit_line_note_): Likewise.
* java/expr.c (expand_byte_code):
* treelang/treetree.c (tree_code_if_start, tree_code_if_else,
tree_code_if_end, tree_code_create_function_initial,
tree_code_create_function_wrapup, tree_code_generate_return,
tree_code_output_expression_statement): Adjust emit_line_note
calls.
From-SVN: r69047
2003-07-07 19:57:30 +02:00
|
|
|
|
extern rtx emit_line_note (location_t);
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtx make_insn_raw (rtx);
|
|
|
|
|
extern void add_function_usage_to (rtx, rtx);
|
|
|
|
|
extern rtx last_call_insn (void);
|
|
|
|
|
extern rtx previous_insn (rtx);
|
|
|
|
|
extern rtx next_insn (rtx);
|
|
|
|
|
extern rtx prev_nonnote_insn (rtx);
|
|
|
|
|
extern rtx next_nonnote_insn (rtx);
|
|
|
|
|
extern rtx prev_real_insn (rtx);
|
|
|
|
|
extern rtx next_real_insn (rtx);
|
|
|
|
|
extern rtx prev_active_insn (rtx);
|
|
|
|
|
extern rtx next_active_insn (rtx);
|
|
|
|
|
extern int active_insn_p (rtx);
|
|
|
|
|
extern rtx prev_label (rtx);
|
|
|
|
|
extern rtx next_label (rtx);
|
2004-05-28 08:27:31 +02:00
|
|
|
|
extern rtx skip_consecutive_labels (rtx);
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtx next_cc0_user (rtx);
|
|
|
|
|
extern rtx prev_cc0_setter (rtx);
|
2000-07-23 01:29:14 +02:00
|
|
|
|
|
2002-06-21 04:09:11 +02:00
|
|
|
|
/* In cfglayout.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern int insn_line (rtx);
|
|
|
|
|
extern const char * insn_file (rtx);
|
2003-07-14 23:18:15 +02:00
|
|
|
|
extern int locator_line (int);
|
|
|
|
|
extern const char * locator_file (int);
|
cfglayout.c (insn_scope): New static function
* cfglayout.c (insn_scope): New static function
(block_locators_*, line_locators*, file_locators*): New static varrays.
(scope_to_insns_initialize): Use them.
(insn_line, insn_file): New functions.
(scope_to_insns_finalize): Use insn_scope.
(prologue_locator, epilogue_locator): New global variables.
* emit-rt.c (try_split, make_insn_raw, make_jump_insn_raw,
make_call_insn_raw, emit_copy_of_insn_after): Use locators.
(emit_insn_after_scope, emit_insn_before_scope
emit_jump_insn_after_scope, emit_jump_insn_before_scope
emit_call_insn_after_scope, emit_call_insn_before_scope): Rename to...
(emit_insn_after_setloc, emit_insn_before_setloc
emit_jump_insn_after_setloc, emit_jump_insn_before_setloc
emit_call_insn_after_setloc, emit_call_insn_before_setloc): ... these;
use locators.
* final.c (notice_source_line): Use locators.
(final_start_function): Set initial source file and line.
(final_scan_insn): Use locators.
* ifcvt.c (noce_try_store_flag, noce_try_store_flag_constants,
noce_try_addcc, noce_try_store_flag_mask, noce_try_cmove,
noce_try_cmove_arith, noce_try_minmax, noce_try_abs,
noce_process_if_block, find_cond_trap): Likewise.
* integrate.c (copy_insn_list): Likewise.
* jump.c (duplicate_loop_exit_test): LIkewise.
* print-rtl.c (print_rtx): Print locators.
* recog.c (peephole2_optimize): Likewise.
* rtl.h (INSN_SCOPE): Remove.
(emit_insn_after_scope, emit_insn_before_scope
emit_jump_insn_after_scope, emit_jump_insn_before_scope
emit_call_insn_after_scope, emit_call_insn_before_scope): Rename to...
(emit_insn_after_setloc, emit_insn_before_setloc
emit_jump_insn_after_setloc, emit_jump_insn_before_setloc
emit_call_insn_after_setloc, emit_call_insn_before_setloc): ... these;
(insn_file, insn_line, prologue_locator, epilogue_locator): Declare.
* unroll.c (copy_loop_body): Use locators.
* function.c (set_insn_locators): New function.
(thread_prologue_and_epilogue_insns): Set the locators accordingly.
From-SVN: r67637
2003-06-08 21:35:54 +02:00
|
|
|
|
extern int prologue_locator, epilogue_locator;
|
2002-06-21 04:09:11 +02:00
|
|
|
|
|
2000-07-23 01:29:14 +02:00
|
|
|
|
/* In jump.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern enum rtx_code reverse_condition (enum rtx_code);
|
|
|
|
|
extern enum rtx_code reverse_condition_maybe_unordered (enum rtx_code);
|
|
|
|
|
extern enum rtx_code swap_condition (enum rtx_code);
|
|
|
|
|
extern enum rtx_code unsigned_condition (enum rtx_code);
|
|
|
|
|
extern enum rtx_code signed_condition (enum rtx_code);
|
|
|
|
|
extern void mark_jump_label (rtx, rtx, int);
|
|
|
|
|
extern void cleanup_barriers (void);
|
2000-07-23 01:29:14 +02:00
|
|
|
|
|
|
|
|
|
/* In jump.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern bool squeeze_notes (rtx *, rtx *);
|
|
|
|
|
extern rtx delete_related_insns (rtx);
|
|
|
|
|
extern void delete_jump (rtx);
|
|
|
|
|
extern rtx get_label_before (rtx);
|
|
|
|
|
extern rtx get_label_after (rtx);
|
|
|
|
|
extern rtx follow_jumps (rtx);
|
2000-07-23 01:29:14 +02:00
|
|
|
|
|
|
|
|
|
/* In recog.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtx *find_constant_term_loc (rtx *);
|
2000-07-23 01:29:14 +02:00
|
|
|
|
|
|
|
|
|
/* In emit-rtl.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtx try_split (rtx, rtx, int);
|
2001-07-22 23:42:35 +02:00
|
|
|
|
extern int split_branch_probability;
|
2000-07-23 01:29:14 +02:00
|
|
|
|
|
|
|
|
|
/* In unknown file */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtx split_insns (rtx, rtx);
|
2000-07-23 01:29:14 +02:00
|
|
|
|
|
|
|
|
|
/* In simplify-rtx.c */
|
2005-02-28 16:29:43 +01:00
|
|
|
|
extern rtx simplify_const_unary_operation (enum rtx_code, enum machine_mode,
|
|
|
|
|
rtx, enum machine_mode);
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtx simplify_unary_operation (enum rtx_code, enum machine_mode, rtx,
|
|
|
|
|
enum machine_mode);
|
2005-02-28 16:29:43 +01:00
|
|
|
|
extern rtx simplify_const_binary_operation (enum rtx_code, enum machine_mode,
|
|
|
|
|
rtx, rtx);
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtx simplify_binary_operation (enum rtx_code, enum machine_mode, rtx,
|
|
|
|
|
rtx);
|
|
|
|
|
extern rtx simplify_ternary_operation (enum rtx_code, enum machine_mode,
|
|
|
|
|
enum machine_mode, rtx, rtx, rtx);
|
2004-03-09 18:06:25 +01:00
|
|
|
|
extern rtx simplify_const_relational_operation (enum rtx_code,
|
|
|
|
|
enum machine_mode, rtx, rtx);
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtx simplify_relational_operation (enum rtx_code, enum machine_mode,
|
2004-03-09 18:06:25 +01:00
|
|
|
|
enum machine_mode, rtx, rtx);
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtx simplify_gen_binary (enum rtx_code, enum machine_mode, rtx, rtx);
|
|
|
|
|
extern rtx simplify_gen_unary (enum rtx_code, enum machine_mode, rtx,
|
|
|
|
|
enum machine_mode);
|
|
|
|
|
extern rtx simplify_gen_ternary (enum rtx_code, enum machine_mode,
|
|
|
|
|
enum machine_mode, rtx, rtx, rtx);
|
|
|
|
|
extern rtx simplify_gen_relational (enum rtx_code, enum machine_mode,
|
|
|
|
|
enum machine_mode, rtx, rtx);
|
|
|
|
|
extern rtx simplify_subreg (enum machine_mode, rtx, enum machine_mode,
|
|
|
|
|
unsigned int);
|
|
|
|
|
extern rtx simplify_gen_subreg (enum machine_mode, rtx, enum machine_mode,
|
|
|
|
|
unsigned int);
|
|
|
|
|
extern rtx simplify_replace_rtx (rtx, rtx, rtx);
|
|
|
|
|
extern rtx simplify_rtx (rtx);
|
|
|
|
|
extern rtx avoid_constant_pool_reference (rtx);
|
2004-10-18 20:46:06 +02:00
|
|
|
|
extern bool mode_signbit_p (enum machine_mode, rtx);
|
2000-07-23 01:29:14 +02:00
|
|
|
|
|
|
|
|
|
/* In regclass.c */
|
2003-07-11 16:09:29 +02:00
|
|
|
|
extern enum machine_mode choose_hard_reg_mode (unsigned int, unsigned int,
|
|
|
|
|
bool);
|
2000-07-23 01:29:14 +02:00
|
|
|
|
|
|
|
|
|
/* In emit-rtl.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtx set_unique_reg_note (rtx, enum reg_note, rtx);
|
* Integrate alias analysis changes from jfc@mit.edu
* Makefile.in (OBJS): Add alias.o
(alias.o): Add dependencies.
* alias.c: New file.
* sched.c: Remove alias analysis code. It lives in alias.c now.
(reg_last_uses_size): Declare.
(sched_analyze_2): Add new arguments to true_dependence.
(sched_analyze_insn): Use reg_last_uses_size instead of max_reg.
(schedule_block): Initialize reg_last_uses_size.
(schedule_insns): Always call init_alias_analysis.
* calls.c (expand_call): Note calls to malloc, calloc, and realloc;
mark return value from such functions as a pointer and keep track of
them for alias analysis. If a return value from a function is a
pointer, mark it as such.
* combine.c (distribute_notes): Handle REG_NOALIAS.
* cse.c (struct write_data): Delete. No longer needed.
(invalidate): Don't call set_nonvarying_address_components anymore.
Use true_dependence to decide if an entry should be removed from
the hash table.
(invalidate_memory): Remove WRITES argument, simplify appropriately.
Fix all callers.
(note_mem_written): Similarly for WRITE_PTR argument.
(invalidate_from_clobbers): Similarly for W argument.
(invalidate_for_call): Remove memory elements from the hash table.
(refers_to_mem_p, cse_rtx_addr_varies_p): Deleted.
(cse_rtx_varies_p): New function. Derived from old
cse_rtx_addr_varies_p.
(cse_insn): Remove WRITES_MEMORY and INIT variables and all references.
Don't call note_mem_written anymore. Stack pushes invalidate the stack
pointer if PUSH_ROUNDING is defined. No longer need to call
cse_rtx_addr_varies_p to decide if a MEM should be invalidated.
(skipped_writes_memory): Remove variable.
(invalidate_skipped_set): Simplify and wewrite to use invalidate_memory.
(invalidate_skipped_block): Simplify for new alias analysis code.
(cse_set_around_loop): Likewise.
(cse_main): Call init_alias_analysis.
* flags.h (flag_alias_check, flag_argument_noalias): Declare.
* toplev.c (flag_alias_check, flag_argument_noalias): Define.
(f_options): Add new alias checking arguments.
(main): Set flag_alias_check when optimizing.
* local_alloc (validate_equiv_mem_from_store): Add new arguments
to true_dependence.
(memref_referenced_p): Likewise.
* loop.c (NUM_STORES): Increase to 30.
(prescan_loop): Only non-constant calls set unknown_address_altered.
(invariant_p): Add new arguments to true_dependence.
(record_giv): Initialize unrolled and shared fields.
(emit_iv_add_mult): Call record_base_value as needed.
* loop.h (struct induction): Add unrolled and shared fields.
* unroll.c (unroll_loop): Call record_base_value as needed.
(copy_loop_body): Likewise.
(final_biv_value): Likewise.
(final_giv_value): Likewise.
(find_splittable_regs): Likewise. Only create one new pseudo
if we have multiple address GIVs that were combined with the same
dst_reg GIV. Note when a new register is created due to unrolling.
* rtl.c (reg_note_name): Add REG_NOALIAS.
* rtl.h (enum reg_note): Similarly.
(rtx_varies_p, may_trap_p, side_effects_p): Declare.
(volatile_refs_p, volatile_insn_p, remove_note): Likewise.
(note_stores, refers_to_regno_p, reg_overlap_mentioned_p): Likewise.
(true_dependence, read_dependence, anti_dependence): Likewise.
(output_dependence, init_alias_analysis, end_alias_analysis): Likewise.
(mark_user_reg, mark_reg_pointer): Likewise.
jfc's alias analysis code.
From-SVN: r14768
1997-08-11 22:07:24 +02:00
|
|
|
|
|
1997-11-02 22:19:36 +01:00
|
|
|
|
/* Functions in rtlanal.c */
|
|
|
|
|
|
2000-09-29 13:24:13 +02:00
|
|
|
|
/* Single set is implemented as macro for performance reasons. */
|
|
|
|
|
#define single_set(I) (INSN_P (I) \
|
|
|
|
|
? (GET_CODE (PATTERN (I)) == SET \
|
|
|
|
|
? PATTERN (I) : single_set_1 (I)) \
|
|
|
|
|
: NULL_RTX)
|
2000-12-21 19:26:07 +01:00
|
|
|
|
#define single_set_1(I) single_set_2 (I, PATTERN (I))
|
2000-09-29 13:24:13 +02:00
|
|
|
|
|
2003-03-10 18:23:44 +01:00
|
|
|
|
/* Structure used for passing data to REPLACE_LABEL. */
|
2003-03-15 23:51:37 +01:00
|
|
|
|
typedef struct replace_label_data
|
2003-03-10 18:23:44 +01:00
|
|
|
|
{
|
|
|
|
|
rtx r1;
|
|
|
|
|
rtx r2;
|
2003-03-15 23:51:37 +01:00
|
|
|
|
bool update_label_nuses;
|
|
|
|
|
} replace_label_data;
|
2003-03-10 18:23:44 +01:00
|
|
|
|
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern int rtx_addr_can_trap_p (rtx);
|
|
|
|
|
extern bool nonzero_address_p (rtx);
|
|
|
|
|
extern int rtx_unstable_p (rtx);
|
|
|
|
|
extern int rtx_varies_p (rtx, int);
|
|
|
|
|
extern int rtx_addr_varies_p (rtx, int);
|
|
|
|
|
extern HOST_WIDE_INT get_integer_term (rtx);
|
|
|
|
|
extern rtx get_related_value (rtx);
|
|
|
|
|
extern int global_reg_mentioned_p (rtx);
|
|
|
|
|
extern int reg_mentioned_p (rtx, rtx);
|
|
|
|
|
extern int count_occurrences (rtx, rtx, int);
|
|
|
|
|
extern int reg_referenced_p (rtx, rtx);
|
|
|
|
|
extern int reg_used_between_p (rtx, rtx, rtx);
|
|
|
|
|
extern int reg_set_between_p (rtx, rtx, rtx);
|
|
|
|
|
extern int commutative_operand_precedence (rtx);
|
|
|
|
|
extern int swap_commutative_operands_p (rtx, rtx);
|
|
|
|
|
extern int modified_between_p (rtx, rtx, rtx);
|
|
|
|
|
extern int no_labels_between_p (rtx, rtx);
|
|
|
|
|
extern int modified_in_p (rtx, rtx);
|
|
|
|
|
extern int reg_set_p (rtx, rtx);
|
|
|
|
|
extern rtx single_set_2 (rtx, rtx);
|
|
|
|
|
extern int multiple_sets (rtx);
|
|
|
|
|
extern int set_noop_p (rtx);
|
|
|
|
|
extern int noop_move_p (rtx);
|
|
|
|
|
extern rtx find_last_value (rtx, rtx *, rtx, int);
|
|
|
|
|
extern int refers_to_regno_p (unsigned int, unsigned int, rtx, rtx *);
|
|
|
|
|
extern int reg_overlap_mentioned_p (rtx, rtx);
|
|
|
|
|
extern rtx set_of (rtx, rtx);
|
|
|
|
|
extern void note_stores (rtx, void (*) (rtx, rtx, void *), void *);
|
|
|
|
|
extern void note_uses (rtx *, void (*) (rtx *, void *), void *);
|
|
|
|
|
extern int dead_or_set_p (rtx, rtx);
|
|
|
|
|
extern int dead_or_set_regno_p (rtx, unsigned int);
|
|
|
|
|
extern rtx find_reg_note (rtx, enum reg_note, rtx);
|
|
|
|
|
extern rtx find_regno_note (rtx, enum reg_note, unsigned int);
|
|
|
|
|
extern rtx find_reg_equal_equiv_note (rtx);
|
|
|
|
|
extern int find_reg_fusage (rtx, enum rtx_code, rtx);
|
|
|
|
|
extern int find_regno_fusage (rtx, enum rtx_code, unsigned int);
|
|
|
|
|
extern int pure_call_p (rtx);
|
|
|
|
|
extern void remove_note (rtx, rtx);
|
|
|
|
|
extern int side_effects_p (rtx);
|
|
|
|
|
extern int volatile_refs_p (rtx);
|
|
|
|
|
extern int volatile_insn_p (rtx);
|
|
|
|
|
extern int may_trap_p (rtx);
|
|
|
|
|
extern int inequality_comparisons_p (rtx);
|
|
|
|
|
extern rtx replace_rtx (rtx, rtx, rtx);
|
|
|
|
|
extern rtx replace_regs (rtx, rtx *, unsigned int, int);
|
|
|
|
|
extern int replace_label (rtx *, void *);
|
|
|
|
|
extern int rtx_referenced_p (rtx, rtx);
|
|
|
|
|
extern bool tablejump_p (rtx, rtx *, rtx *);
|
|
|
|
|
extern int computed_jump_p (rtx);
|
|
|
|
|
typedef int (*rtx_function) (rtx *, void *);
|
|
|
|
|
extern int for_each_rtx (rtx *, rtx_function, void *);
|
|
|
|
|
extern rtx regno_use_in (unsigned int, rtx);
|
|
|
|
|
extern int auto_inc_p (rtx);
|
|
|
|
|
extern int in_expr_list_p (rtx, rtx);
|
|
|
|
|
extern void remove_node_from_expr_list (rtx, rtx *);
|
|
|
|
|
extern int insns_safe_to_move_p (rtx, rtx, rtx *);
|
|
|
|
|
extern int loc_mentioned_in_p (rtx *, rtx);
|
|
|
|
|
extern rtx find_first_parameter_load (rtx, rtx);
|
|
|
|
|
extern bool keep_with_call_p (rtx);
|
2004-01-12 17:32:12 +01:00
|
|
|
|
extern bool label_is_jump_target_p (rtx, rtx);
|
2004-07-11 16:37:57 +02:00
|
|
|
|
extern int insn_rtx_cost (rtx);
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2004-11-02 18:59:46 +01:00
|
|
|
|
/* Given an insn and condition, return a canonical description of
|
|
|
|
|
the test being made. */
|
|
|
|
|
extern rtx canonicalize_condition (rtx, rtx, int, rtx *, rtx, int, int);
|
|
|
|
|
|
|
|
|
|
/* Given a JUMP_INSN, return a canonical description of the test
|
|
|
|
|
being made. */
|
|
|
|
|
extern rtx get_condition (rtx, rtx *, int, int);
|
|
|
|
|
|
|
|
|
|
|
1998-10-14 01:41:11 +02:00
|
|
|
|
/* flow.c */
|
|
|
|
|
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtx find_use_as_address (rtx, rtx, HOST_WIDE_INT);
|
2002-06-04 09:11:05 +02:00
|
|
|
|
|
|
|
|
|
/* lists.c */
|
|
|
|
|
|
2003-06-01 17:59:10 +02:00
|
|
|
|
void free_EXPR_LIST_list (rtx *);
|
|
|
|
|
void free_INSN_LIST_list (rtx *);
|
|
|
|
|
void free_EXPR_LIST_node (rtx);
|
|
|
|
|
void free_INSN_LIST_node (rtx);
|
|
|
|
|
rtx alloc_INSN_LIST (rtx, rtx);
|
|
|
|
|
rtx alloc_EXPR_LIST (int, rtx, rtx);
|
1998-10-14 01:41:11 +02:00
|
|
|
|
|
|
|
|
|
/* regclass.c */
|
|
|
|
|
|
1991-12-06 22:00:31 +01:00
|
|
|
|
/* Maximum number of parallel sets and clobbers in any insn in this fn.
|
2003-11-21 07:52:23 +01:00
|
|
|
|
Always at least 3, since the combiner could put that many together
|
1991-12-06 22:00:31 +01:00
|
|
|
|
and we want this to remain correct for all the remaining passes. */
|
|
|
|
|
|
|
|
|
|
extern int max_parallel;
|
|
|
|
|
|
1998-10-28 01:06:22 +01:00
|
|
|
|
/* Free up register info memory. */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void free_reg_info (void);
|
1998-10-28 01:06:22 +01:00
|
|
|
|
|
1998-10-14 01:41:11 +02:00
|
|
|
|
/* recog.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern int asm_noperands (rtx);
|
|
|
|
|
extern const char *decode_asm_operands (rtx, rtx *, rtx **, const char **,
|
|
|
|
|
enum machine_mode *);
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern enum reg_class reg_preferred_class (int);
|
|
|
|
|
extern enum reg_class reg_alternate_class (int);
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void split_all_insns (int);
|
|
|
|
|
extern void split_all_insns_noflow (void);
|
1999-02-03 02:26:55 +01:00
|
|
|
|
|
1997-12-12 01:27:40 +01:00
|
|
|
|
#define MAX_SAVED_CONST_INT 64
|
2002-06-04 09:11:05 +02:00
|
|
|
|
extern GTY(()) rtx const_int_rtx[MAX_SAVED_CONST_INT * 2 + 1];
|
1997-12-12 01:27:40 +01:00
|
|
|
|
|
1999-09-18 20:16:44 +02:00
|
|
|
|
#define const0_rtx (const_int_rtx[MAX_SAVED_CONST_INT])
|
|
|
|
|
#define const1_rtx (const_int_rtx[MAX_SAVED_CONST_INT+1])
|
|
|
|
|
#define const2_rtx (const_int_rtx[MAX_SAVED_CONST_INT+2])
|
|
|
|
|
#define constm1_rtx (const_int_rtx[MAX_SAVED_CONST_INT-1])
|
2002-06-04 09:11:05 +02:00
|
|
|
|
extern GTY(()) rtx const_true_rtx;
|
1992-01-15 22:58:02 +01:00
|
|
|
|
|
2002-06-04 09:11:05 +02:00
|
|
|
|
extern GTY(()) rtx const_tiny_rtx[3][(int) MAX_MACHINE_MODE];
|
1992-01-15 22:58:02 +01:00
|
|
|
|
|
2000-03-29 03:56:04 +02:00
|
|
|
|
/* Returns a constant 0 rtx in mode MODE. Integer modes are treated the
|
1992-01-15 22:58:02 +01:00
|
|
|
|
same as VOIDmode. */
|
|
|
|
|
|
|
|
|
|
#define CONST0_RTX(MODE) (const_tiny_rtx[0][(int) (MODE)])
|
|
|
|
|
|
|
|
|
|
/* Likewise, for the constants 1 and 2. */
|
|
|
|
|
|
|
|
|
|
#define CONST1_RTX(MODE) (const_tiny_rtx[1][(int) (MODE)])
|
|
|
|
|
#define CONST2_RTX(MODE) (const_tiny_rtx[2][(int) (MODE)])
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
1999-09-18 20:16:44 +02:00
|
|
|
|
/* If HARD_FRAME_POINTER_REGNUM is defined, then a special dummy reg
|
|
|
|
|
is used to represent the frame pointer. This is because the
|
|
|
|
|
hard frame pointer and the automatic variables are separated by an amount
|
|
|
|
|
that cannot be determined until after register allocation. We can assume
|
|
|
|
|
that in this case ELIMINABLE_REGS will be defined, one action of which
|
2001-10-11 14:43:43 +02:00
|
|
|
|
will be to eliminate FRAME_POINTER_REGNUM into HARD_FRAME_POINTER_REGNUM. */
|
1999-09-18 20:16:44 +02:00
|
|
|
|
#ifndef HARD_FRAME_POINTER_REGNUM
|
|
|
|
|
#define HARD_FRAME_POINTER_REGNUM FRAME_POINTER_REGNUM
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* Index labels for global_rtl. */
|
|
|
|
|
enum global_rtl_index
|
1997-12-12 01:27:40 +01:00
|
|
|
|
{
|
1999-09-18 20:16:44 +02:00
|
|
|
|
GR_PC,
|
|
|
|
|
GR_CC0,
|
|
|
|
|
GR_STACK_POINTER,
|
|
|
|
|
GR_FRAME_POINTER,
|
|
|
|
|
/* For register elimination to work properly these hard_frame_pointer_rtx,
|
|
|
|
|
frame_pointer_rtx, and arg_pointer_rtx must be the same if they refer to
|
|
|
|
|
the same register. */
|
|
|
|
|
#if FRAME_POINTER_REGNUM == ARG_POINTER_REGNUM
|
|
|
|
|
GR_ARG_POINTER = GR_FRAME_POINTER,
|
|
|
|
|
#endif
|
|
|
|
|
#if HARD_FRAME_POINTER_REGNUM == FRAME_POINTER_REGNUM
|
|
|
|
|
GR_HARD_FRAME_POINTER = GR_FRAME_POINTER,
|
|
|
|
|
#else
|
|
|
|
|
GR_HARD_FRAME_POINTER,
|
|
|
|
|
#endif
|
|
|
|
|
#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
|
|
|
|
|
#if HARD_FRAME_POINTER_REGNUM == ARG_POINTER_REGNUM
|
|
|
|
|
GR_ARG_POINTER = GR_HARD_FRAME_POINTER,
|
|
|
|
|
#else
|
|
|
|
|
GR_ARG_POINTER,
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
GR_VIRTUAL_INCOMING_ARGS,
|
|
|
|
|
GR_VIRTUAL_STACK_ARGS,
|
|
|
|
|
GR_VIRTUAL_STACK_DYNAMIC,
|
|
|
|
|
GR_VIRTUAL_OUTGOING_ARGS,
|
|
|
|
|
GR_VIRTUAL_CFA,
|
|
|
|
|
|
|
|
|
|
GR_MAX
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/* Pointers to standard pieces of rtx are stored here. */
|
2002-06-04 09:11:05 +02:00
|
|
|
|
extern GTY(()) rtx global_rtl[GR_MAX];
|
1999-09-18 20:16:44 +02:00
|
|
|
|
|
|
|
|
|
/* Standard pieces of rtx, to be substituted directly into things. */
|
|
|
|
|
#define pc_rtx (global_rtl[GR_PC])
|
|
|
|
|
#define cc0_rtx (global_rtl[GR_CC0])
|
1997-12-12 01:27:40 +01:00
|
|
|
|
|
1991-12-06 22:00:31 +01:00
|
|
|
|
/* All references to certain hard regs, except those created
|
|
|
|
|
by allocating pseudo regs into them (when that's possible),
|
|
|
|
|
go through these unique rtx objects. */
|
1999-09-18 20:16:44 +02:00
|
|
|
|
#define stack_pointer_rtx (global_rtl[GR_STACK_POINTER])
|
|
|
|
|
#define frame_pointer_rtx (global_rtl[GR_FRAME_POINTER])
|
|
|
|
|
#define hard_frame_pointer_rtx (global_rtl[GR_HARD_FRAME_POINTER])
|
|
|
|
|
#define arg_pointer_rtx (global_rtl[GR_ARG_POINTER])
|
1997-12-12 01:27:40 +01:00
|
|
|
|
|
2002-06-04 09:11:05 +02:00
|
|
|
|
extern GTY(()) rtx pic_offset_table_rtx;
|
|
|
|
|
extern GTY(()) rtx static_chain_rtx;
|
|
|
|
|
extern GTY(()) rtx static_chain_incoming_rtx;
|
|
|
|
|
extern GTY(()) rtx return_address_pointer_rtx;
|
1998-01-08 22:17:05 +01:00
|
|
|
|
|
|
|
|
|
/* Include the RTL generation functions. */
|
|
|
|
|
|
Makefile.in (RTL_BASE_H, RTL_H): Correct.
* Makefile.in (RTL_BASE_H, RTL_H): Correct.
(BUILD_RTL): Remove $(BUILD_PREFIX) from ggc-none.o.
(genobjs): Add errors.o, ggc-none.o, and min-insn-modes.o.
(read-rtl.o, gensupport.o, genconfig.o, genflags.o, gencodes.o)
(genconstants.o, genemit.o, genopinit.o, genrecog.o, genextract.o)
(genpeep.o, genattr.o, genattrtab.o, genautomata.o, genoutput.o)
(genconditions.o): Depend on $(RTL_BASE_H) not $(RTL_H).
(ggc-none.o, errors.o): Move rule to generators section;
correct dependencies.
(min-insn-modes.o): Move rule to generators section; remove
unnecessary explicit command; correct dependencies.
(print-rtl.o, print-rtl1.o): Correct dependencies.
($(BUILD_PREFIX_1)errors.o. $(BUILD_PREFIX_1)ggc-none.o): Delete rule.
(mostlyclean): Update.
* errors.c: Include bconfig.h not config.h. Correct comment.
* gengtype.c, genpreds.c: Don't define NO_GENRTL_H.
* ggc-none.c: Include bconfig.h; not config.h or tm.h.
* print-rtl.c: Don't include tm_p.h.
* rtl.h: Move forward-decl of struct function down where it's
needed. Include genrtl.h #ifndef GENERATOR_FILE, not
#ifndef NO_GENRTL_H. Remove unnecessary #ifdef BUFSIZ statements.
From-SVN: r85574
2004-08-04 22:55:08 +02:00
|
|
|
|
#ifndef GENERATOR_FILE
|
1998-01-08 22:17:05 +01:00
|
|
|
|
#include "genrtl.h"
|
Conditionally compile support for --enable-mapped_location.
* input.h: #include line-map.h for source_location typedef.
(BUILTINS_LOCATION, UNKNOWN_LOCATION, expand_location,
LOCATION_FILE, LOCATION_LINE): New macros and functions.
(expanded_location, source_locus): New typedefs.
(push_srcloc): Change parameter list if USE_MAPPED_LOCATION.
* rtl.def (NOTE, ASM_OPERANDS): Modify specifcation, if
USE_MAPPED_LOCATION.
* rtl.h (NOTE_DELETED_LABEL_NAME): New macro.
(NOTE_SOURCE_LOCATION, NOTE_EXPNDED_LOCATION, SET_INSN_DELETED):
New conditional macros.
(ASM_OPERANDS_SOURCE_FILE, ASM_OPERANDS_SOURCE_LINE): Replace
by ASM_OPERANDS_SOURCE_LOCATION if USE_MAPPED_LOCATION.
* tree.h (EXPR_LOCATION, SET_EXPR_LOCATION, EXPR_HAS_LOCATION,
EXPR_LOCUS, SET_EXPR_LOCUS, EXPR_FILENAME, EXPR_LINENO,
DECL_IS_BUILTIN): New macros, most depending on USE_MAPPED__LOCATION.
(tree_exp): Change type of locus to use new source_locus typedef.
* tree.c (build1_stat): Use SET_EXPR_LOCATION.
(annotate_with_locus, annotate_with_file_line): Conditionalize.
(expand_location): New function.
* toplev.c (unknown_location): New static, when USE_MAPPED_LOCATION.
(push_srcloc, pop_loc): Adjust parameter handling.
(process_options): Don't set input_filename by itself.
(lang_dependent_init): Save, set input_location to <built-in>.
(warn_deprecated_use): Use expand_location.
From-SVN: r83918
2004-06-30 19:58:21 +02:00
|
|
|
|
#ifndef USE_MAPPED_LOCATION
|
|
|
|
|
#undef gen_rtx_ASM_OPERANDS
|
|
|
|
|
#define gen_rtx_ASM_OPERANDS(MODE, ARG0, ARG1, ARG2, ARG3, ARG4, LOC) \
|
|
|
|
|
gen_rtx_fmt_ssiEEsi (ASM_OPERANDS, (MODE), (ARG0), (ARG1), (ARG2), (ARG3), (ARG4), (LOC).file, (LOC).line)
|
|
|
|
|
#endif
|
1998-01-08 22:17:05 +01:00
|
|
|
|
#endif
|
|
|
|
|
|
1998-06-25 17:14:41 +02:00
|
|
|
|
/* There are some RTL codes that require special attention; the
|
|
|
|
|
generation functions included above do the raw handling. If you
|
2004-02-04 07:12:54 +01:00
|
|
|
|
add to this list, modify special_rtx in gengenrtl.c as well. */
|
1998-01-08 22:17:05 +01:00
|
|
|
|
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtx gen_rtx_CONST_INT (enum machine_mode, HOST_WIDE_INT);
|
|
|
|
|
extern rtx gen_rtx_CONST_VECTOR (enum machine_mode, rtvec);
|
|
|
|
|
extern rtx gen_raw_REG (enum machine_mode, int);
|
|
|
|
|
extern rtx gen_rtx_REG (enum machine_mode, unsigned);
|
|
|
|
|
extern rtx gen_rtx_SUBREG (enum machine_mode, rtx, int);
|
|
|
|
|
extern rtx gen_rtx_MEM (enum machine_mode, rtx);
|
1998-01-08 22:17:05 +01:00
|
|
|
|
|
2004-07-21 01:02:36 +02:00
|
|
|
|
#define GEN_INT(N) gen_rtx_CONST_INT (VOIDmode, (N))
|
1998-01-08 22:17:05 +01:00
|
|
|
|
|
1991-12-06 22:00:31 +01:00
|
|
|
|
/* Virtual registers are used during RTL generation to refer to locations into
|
|
|
|
|
the stack frame when the actual location isn't known until RTL generation
|
|
|
|
|
is complete. The routine instantiate_virtual_regs replaces these with
|
|
|
|
|
the proper value, which is normally {frame,arg,stack}_pointer_rtx plus
|
|
|
|
|
a constant. */
|
|
|
|
|
|
|
|
|
|
#define FIRST_VIRTUAL_REGISTER (FIRST_PSEUDO_REGISTER)
|
|
|
|
|
|
|
|
|
|
/* This points to the first word of the incoming arguments passed on the stack,
|
|
|
|
|
either by the caller or by the callee when pretending it was passed by the
|
|
|
|
|
caller. */
|
|
|
|
|
|
1999-09-18 20:16:44 +02:00
|
|
|
|
#define virtual_incoming_args_rtx (global_rtl[GR_VIRTUAL_INCOMING_ARGS])
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
|
|
|
|
#define VIRTUAL_INCOMING_ARGS_REGNUM (FIRST_VIRTUAL_REGISTER)
|
|
|
|
|
|
1993-06-30 00:15:59 +02:00
|
|
|
|
/* If FRAME_GROWS_DOWNWARD, this points to immediately above the first
|
1991-12-06 22:00:31 +01:00
|
|
|
|
variable on the stack. Otherwise, it points to the first variable on
|
|
|
|
|
the stack. */
|
|
|
|
|
|
1999-09-18 20:16:44 +02:00
|
|
|
|
#define virtual_stack_vars_rtx (global_rtl[GR_VIRTUAL_STACK_ARGS])
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
|
|
|
|
#define VIRTUAL_STACK_VARS_REGNUM ((FIRST_VIRTUAL_REGISTER) + 1)
|
|
|
|
|
|
|
|
|
|
/* This points to the location of dynamically-allocated memory on the stack
|
|
|
|
|
immediately after the stack pointer has been adjusted by the amount
|
|
|
|
|
desired. */
|
|
|
|
|
|
1999-09-18 20:16:44 +02:00
|
|
|
|
#define virtual_stack_dynamic_rtx (global_rtl[GR_VIRTUAL_STACK_DYNAMIC])
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
|
|
|
|
#define VIRTUAL_STACK_DYNAMIC_REGNUM ((FIRST_VIRTUAL_REGISTER) + 2)
|
|
|
|
|
|
|
|
|
|
/* This points to the location in the stack at which outgoing arguments should
|
|
|
|
|
be written when the stack is pre-pushed (arguments pushed using push
|
|
|
|
|
insns always use sp). */
|
|
|
|
|
|
1999-09-18 20:16:44 +02:00
|
|
|
|
#define virtual_outgoing_args_rtx (global_rtl[GR_VIRTUAL_OUTGOING_ARGS])
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
|
|
|
|
#define VIRTUAL_OUTGOING_ARGS_REGNUM ((FIRST_VIRTUAL_REGISTER) + 3)
|
|
|
|
|
|
tree.h (BUILT_IN_CALLER_RETURN_ADDRESS): Unused.
* tree.h (BUILT_IN_CALLER_RETURN_ADDRESS): Unused. Kill.
(BUILT_IN_FP, BUILT_IN_SP, BUILT_IN_SET_RETURN_ADDR_REG): Kill.
(BUILT_IN_EH_STUB_OLD, BUILT_IN_EH_STUB, BUILT_IN_SET_EH_REGS): Kill.
(BUILT_IN_EH_RETURN, BUILT_IN_DWARF_CFA): New.
* c-decl.c (init_decl_processing): Update accordingly.
* expr.c (expand_builtin): Likewise.
* cp/decl.c (init_decl_processing): Likewise.
* rtl.h (global_rtl): Add cfa entry.
(virtual_cfa_rtx, VIRTUAL_CFA_REGNUM): New.
(LAST_VIRTUAL_REGISTER): Update.
* emit-rtl.c (global_rtl): Add cfa entry.
(init_emit): Initialize it.
* function.c (cfa_offset): New.
(instantiate_virtual_regs): Initialize it.
(instantiate_virtual_regs_1): Instantiate virtual_cfa_rtx.
(expand_function_end): Call expand_eh_return.
* tm.texi (ARG_POINTER_CFA_OFFSET): New.
* except.c (current_function_eh_stub_label): Kill.
(current_function_eh_old_stub_label): Likwise; update all references.
(expand_builtin_set_return_addr_reg): Kill.
(expand_builtin_eh_stub_old, expand_builtin_eh_stub): Kill.
(expand_builtin_set_eh_regs): Kill.
(eh_regs): Produce a third reg for the actual handler address.
(eh_return_context, eh_return_stack_adjust): New.
(eh_return_handler, eh_return_stub_label): New.
(init_eh_for_function): Initialize them.
(expand_builtin_eh_return, expand_eh_return): New.
* except.h: Update prototypes.
* flow.c (find_basic_blocks_1): Update references to the stub label.
* function.h (struct function): Kill stub label elements.
* libgcc2.c (in_reg_window): For REG_SAVED_REG, check that the
register number is one that would be in the previous window.
Provide a dummy definition for non-windowed targets.
(get_reg_addr): New function.
(get_reg, put_reg, copy_reg): Use it.
(__throw): Rely on in_reg_window, not INCOMING_REGNO. Kill stub
generating code and use __builtin_eh_return. Use __builtin_dwarf_cfa.
* alpha.c (alpha_eh_epilogue_sp_ofs): New.
(alpha_init_expanders): Initialize it.
(alpha_expand_epilogue): Use it.
* alpha.h: Declare it.
* alpha.md (eh_epilogue): New.
* m68h.h (ARG_POINTER_CFA_OFFSET): New.
* sparc.h (ARG_POINTER_CFA_OFFSET): New.
From-SVN: r22436
1998-09-15 21:19:12 +02:00
|
|
|
|
/* This points to the Canonical Frame Address of the function. This
|
2002-12-24 09:30:34 +01:00
|
|
|
|
should correspond to the CFA produced by INCOMING_FRAME_SP_OFFSET,
|
tree.h (BUILT_IN_CALLER_RETURN_ADDRESS): Unused.
* tree.h (BUILT_IN_CALLER_RETURN_ADDRESS): Unused. Kill.
(BUILT_IN_FP, BUILT_IN_SP, BUILT_IN_SET_RETURN_ADDR_REG): Kill.
(BUILT_IN_EH_STUB_OLD, BUILT_IN_EH_STUB, BUILT_IN_SET_EH_REGS): Kill.
(BUILT_IN_EH_RETURN, BUILT_IN_DWARF_CFA): New.
* c-decl.c (init_decl_processing): Update accordingly.
* expr.c (expand_builtin): Likewise.
* cp/decl.c (init_decl_processing): Likewise.
* rtl.h (global_rtl): Add cfa entry.
(virtual_cfa_rtx, VIRTUAL_CFA_REGNUM): New.
(LAST_VIRTUAL_REGISTER): Update.
* emit-rtl.c (global_rtl): Add cfa entry.
(init_emit): Initialize it.
* function.c (cfa_offset): New.
(instantiate_virtual_regs): Initialize it.
(instantiate_virtual_regs_1): Instantiate virtual_cfa_rtx.
(expand_function_end): Call expand_eh_return.
* tm.texi (ARG_POINTER_CFA_OFFSET): New.
* except.c (current_function_eh_stub_label): Kill.
(current_function_eh_old_stub_label): Likwise; update all references.
(expand_builtin_set_return_addr_reg): Kill.
(expand_builtin_eh_stub_old, expand_builtin_eh_stub): Kill.
(expand_builtin_set_eh_regs): Kill.
(eh_regs): Produce a third reg for the actual handler address.
(eh_return_context, eh_return_stack_adjust): New.
(eh_return_handler, eh_return_stub_label): New.
(init_eh_for_function): Initialize them.
(expand_builtin_eh_return, expand_eh_return): New.
* except.h: Update prototypes.
* flow.c (find_basic_blocks_1): Update references to the stub label.
* function.h (struct function): Kill stub label elements.
* libgcc2.c (in_reg_window): For REG_SAVED_REG, check that the
register number is one that would be in the previous window.
Provide a dummy definition for non-windowed targets.
(get_reg_addr): New function.
(get_reg, put_reg, copy_reg): Use it.
(__throw): Rely on in_reg_window, not INCOMING_REGNO. Kill stub
generating code and use __builtin_eh_return. Use __builtin_dwarf_cfa.
* alpha.c (alpha_eh_epilogue_sp_ofs): New.
(alpha_init_expanders): Initialize it.
(alpha_expand_epilogue): Use it.
* alpha.h: Declare it.
* alpha.md (eh_epilogue): New.
* m68h.h (ARG_POINTER_CFA_OFFSET): New.
* sparc.h (ARG_POINTER_CFA_OFFSET): New.
From-SVN: r22436
1998-09-15 21:19:12 +02:00
|
|
|
|
but is calculated relative to the arg pointer for simplicity; the
|
2000-03-29 03:56:04 +02:00
|
|
|
|
frame pointer nor stack pointer are necessarily fixed relative to
|
tree.h (BUILT_IN_CALLER_RETURN_ADDRESS): Unused.
* tree.h (BUILT_IN_CALLER_RETURN_ADDRESS): Unused. Kill.
(BUILT_IN_FP, BUILT_IN_SP, BUILT_IN_SET_RETURN_ADDR_REG): Kill.
(BUILT_IN_EH_STUB_OLD, BUILT_IN_EH_STUB, BUILT_IN_SET_EH_REGS): Kill.
(BUILT_IN_EH_RETURN, BUILT_IN_DWARF_CFA): New.
* c-decl.c (init_decl_processing): Update accordingly.
* expr.c (expand_builtin): Likewise.
* cp/decl.c (init_decl_processing): Likewise.
* rtl.h (global_rtl): Add cfa entry.
(virtual_cfa_rtx, VIRTUAL_CFA_REGNUM): New.
(LAST_VIRTUAL_REGISTER): Update.
* emit-rtl.c (global_rtl): Add cfa entry.
(init_emit): Initialize it.
* function.c (cfa_offset): New.
(instantiate_virtual_regs): Initialize it.
(instantiate_virtual_regs_1): Instantiate virtual_cfa_rtx.
(expand_function_end): Call expand_eh_return.
* tm.texi (ARG_POINTER_CFA_OFFSET): New.
* except.c (current_function_eh_stub_label): Kill.
(current_function_eh_old_stub_label): Likwise; update all references.
(expand_builtin_set_return_addr_reg): Kill.
(expand_builtin_eh_stub_old, expand_builtin_eh_stub): Kill.
(expand_builtin_set_eh_regs): Kill.
(eh_regs): Produce a third reg for the actual handler address.
(eh_return_context, eh_return_stack_adjust): New.
(eh_return_handler, eh_return_stub_label): New.
(init_eh_for_function): Initialize them.
(expand_builtin_eh_return, expand_eh_return): New.
* except.h: Update prototypes.
* flow.c (find_basic_blocks_1): Update references to the stub label.
* function.h (struct function): Kill stub label elements.
* libgcc2.c (in_reg_window): For REG_SAVED_REG, check that the
register number is one that would be in the previous window.
Provide a dummy definition for non-windowed targets.
(get_reg_addr): New function.
(get_reg, put_reg, copy_reg): Use it.
(__throw): Rely on in_reg_window, not INCOMING_REGNO. Kill stub
generating code and use __builtin_eh_return. Use __builtin_dwarf_cfa.
* alpha.c (alpha_eh_epilogue_sp_ofs): New.
(alpha_init_expanders): Initialize it.
(alpha_expand_epilogue): Use it.
* alpha.h: Declare it.
* alpha.md (eh_epilogue): New.
* m68h.h (ARG_POINTER_CFA_OFFSET): New.
* sparc.h (ARG_POINTER_CFA_OFFSET): New.
From-SVN: r22436
1998-09-15 21:19:12 +02:00
|
|
|
|
the CFA until after reload. */
|
|
|
|
|
|
1999-09-18 20:16:44 +02:00
|
|
|
|
#define virtual_cfa_rtx (global_rtl[GR_VIRTUAL_CFA])
|
tree.h (BUILT_IN_CALLER_RETURN_ADDRESS): Unused.
* tree.h (BUILT_IN_CALLER_RETURN_ADDRESS): Unused. Kill.
(BUILT_IN_FP, BUILT_IN_SP, BUILT_IN_SET_RETURN_ADDR_REG): Kill.
(BUILT_IN_EH_STUB_OLD, BUILT_IN_EH_STUB, BUILT_IN_SET_EH_REGS): Kill.
(BUILT_IN_EH_RETURN, BUILT_IN_DWARF_CFA): New.
* c-decl.c (init_decl_processing): Update accordingly.
* expr.c (expand_builtin): Likewise.
* cp/decl.c (init_decl_processing): Likewise.
* rtl.h (global_rtl): Add cfa entry.
(virtual_cfa_rtx, VIRTUAL_CFA_REGNUM): New.
(LAST_VIRTUAL_REGISTER): Update.
* emit-rtl.c (global_rtl): Add cfa entry.
(init_emit): Initialize it.
* function.c (cfa_offset): New.
(instantiate_virtual_regs): Initialize it.
(instantiate_virtual_regs_1): Instantiate virtual_cfa_rtx.
(expand_function_end): Call expand_eh_return.
* tm.texi (ARG_POINTER_CFA_OFFSET): New.
* except.c (current_function_eh_stub_label): Kill.
(current_function_eh_old_stub_label): Likwise; update all references.
(expand_builtin_set_return_addr_reg): Kill.
(expand_builtin_eh_stub_old, expand_builtin_eh_stub): Kill.
(expand_builtin_set_eh_regs): Kill.
(eh_regs): Produce a third reg for the actual handler address.
(eh_return_context, eh_return_stack_adjust): New.
(eh_return_handler, eh_return_stub_label): New.
(init_eh_for_function): Initialize them.
(expand_builtin_eh_return, expand_eh_return): New.
* except.h: Update prototypes.
* flow.c (find_basic_blocks_1): Update references to the stub label.
* function.h (struct function): Kill stub label elements.
* libgcc2.c (in_reg_window): For REG_SAVED_REG, check that the
register number is one that would be in the previous window.
Provide a dummy definition for non-windowed targets.
(get_reg_addr): New function.
(get_reg, put_reg, copy_reg): Use it.
(__throw): Rely on in_reg_window, not INCOMING_REGNO. Kill stub
generating code and use __builtin_eh_return. Use __builtin_dwarf_cfa.
* alpha.c (alpha_eh_epilogue_sp_ofs): New.
(alpha_init_expanders): Initialize it.
(alpha_expand_epilogue): Use it.
* alpha.h: Declare it.
* alpha.md (eh_epilogue): New.
* m68h.h (ARG_POINTER_CFA_OFFSET): New.
* sparc.h (ARG_POINTER_CFA_OFFSET): New.
From-SVN: r22436
1998-09-15 21:19:12 +02:00
|
|
|
|
|
|
|
|
|
#define VIRTUAL_CFA_REGNUM ((FIRST_VIRTUAL_REGISTER) + 4)
|
|
|
|
|
|
|
|
|
|
#define LAST_VIRTUAL_REGISTER ((FIRST_VIRTUAL_REGISTER) + 4)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
2001-11-16 00:44:58 +01:00
|
|
|
|
/* Nonzero if REGNUM is a pointer into the stack frame. */
|
2003-06-01 17:59:10 +02:00
|
|
|
|
#define REGNO_PTR_FRAME_P(REGNUM) \
|
2001-11-16 00:44:58 +01:00
|
|
|
|
((REGNUM) == STACK_POINTER_REGNUM \
|
|
|
|
|
|| (REGNUM) == FRAME_POINTER_REGNUM \
|
|
|
|
|
|| (REGNUM) == HARD_FRAME_POINTER_REGNUM \
|
|
|
|
|
|| (REGNUM) == ARG_POINTER_REGNUM \
|
|
|
|
|
|| ((REGNUM) >= FIRST_VIRTUAL_REGISTER \
|
|
|
|
|
&& (REGNUM) <= LAST_VIRTUAL_REGISTER))
|
|
|
|
|
|
2001-02-13 21:17:45 +01:00
|
|
|
|
/* REGNUM never really appearing in the INSN stream. */
|
2002-01-22 15:33:35 +01:00
|
|
|
|
#define INVALID_REGNUM (~(unsigned int) 0)
|
2001-02-13 21:17:45 +01:00
|
|
|
|
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtx output_constant_def (tree, int);
|
2003-08-01 23:51:13 +02:00
|
|
|
|
extern rtx lookup_constant_def (tree);
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
1998-11-04 21:45:01 +01:00
|
|
|
|
/* Nonzero after the second flow pass has completed.
|
|
|
|
|
Set to 1 or 0 by toplev.c */
|
|
|
|
|
extern int flow2_completed;
|
|
|
|
|
|
1991-12-06 22:00:31 +01:00
|
|
|
|
/* Nonzero after end of reload pass.
|
1998-11-04 21:45:01 +01:00
|
|
|
|
Set to 1 or 0 by reload1.c. */
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
|
|
|
|
extern int reload_completed;
|
|
|
|
|
|
2003-06-18 21:43:55 +02:00
|
|
|
|
/* Nonzero after thread_prologue_and_epilogue_insns has run. */
|
|
|
|
|
extern int epilogue_completed;
|
|
|
|
|
|
1991-12-06 22:00:31 +01:00
|
|
|
|
/* Set to 1 while reload_as_needed is operating.
|
|
|
|
|
Required by some machines to handle any generated moves differently. */
|
|
|
|
|
|
|
|
|
|
extern int reload_in_progress;
|
|
|
|
|
|
|
|
|
|
/* If this is nonzero, we do not bother generating VOLATILE
|
|
|
|
|
around volatile memory references, and we are willing to
|
|
|
|
|
output indirect addresses. If cse is to follow, we reject
|
|
|
|
|
indirect addresses so a useful potential cse is generated;
|
|
|
|
|
if it is used only once, instruction combination will produce
|
|
|
|
|
the same indirect address eventually. */
|
|
|
|
|
extern int cse_not_expected;
|
|
|
|
|
|
1998-11-25 11:31:24 +01:00
|
|
|
|
/* Set to nonzero before life analysis to indicate that it is unsafe to
|
|
|
|
|
generate any new pseudo registers. */
|
|
|
|
|
extern int no_new_pseudos;
|
|
|
|
|
|
1993-03-31 07:54:38 +02:00
|
|
|
|
/* Translates rtx code to tree code, for those codes needed by
|
1994-04-21 21:23:14 +02:00
|
|
|
|
REAL_ARITHMETIC. The function returns an int because the caller may not
|
|
|
|
|
know what `enum tree_code' means. */
|
|
|
|
|
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern int rtx_to_tree_code (enum rtx_code);
|
* Integrate alias analysis changes from jfc@mit.edu
* Makefile.in (OBJS): Add alias.o
(alias.o): Add dependencies.
* alias.c: New file.
* sched.c: Remove alias analysis code. It lives in alias.c now.
(reg_last_uses_size): Declare.
(sched_analyze_2): Add new arguments to true_dependence.
(sched_analyze_insn): Use reg_last_uses_size instead of max_reg.
(schedule_block): Initialize reg_last_uses_size.
(schedule_insns): Always call init_alias_analysis.
* calls.c (expand_call): Note calls to malloc, calloc, and realloc;
mark return value from such functions as a pointer and keep track of
them for alias analysis. If a return value from a function is a
pointer, mark it as such.
* combine.c (distribute_notes): Handle REG_NOALIAS.
* cse.c (struct write_data): Delete. No longer needed.
(invalidate): Don't call set_nonvarying_address_components anymore.
Use true_dependence to decide if an entry should be removed from
the hash table.
(invalidate_memory): Remove WRITES argument, simplify appropriately.
Fix all callers.
(note_mem_written): Similarly for WRITE_PTR argument.
(invalidate_from_clobbers): Similarly for W argument.
(invalidate_for_call): Remove memory elements from the hash table.
(refers_to_mem_p, cse_rtx_addr_varies_p): Deleted.
(cse_rtx_varies_p): New function. Derived from old
cse_rtx_addr_varies_p.
(cse_insn): Remove WRITES_MEMORY and INIT variables and all references.
Don't call note_mem_written anymore. Stack pushes invalidate the stack
pointer if PUSH_ROUNDING is defined. No longer need to call
cse_rtx_addr_varies_p to decide if a MEM should be invalidated.
(skipped_writes_memory): Remove variable.
(invalidate_skipped_set): Simplify and wewrite to use invalidate_memory.
(invalidate_skipped_block): Simplify for new alias analysis code.
(cse_set_around_loop): Likewise.
(cse_main): Call init_alias_analysis.
* flags.h (flag_alias_check, flag_argument_noalias): Declare.
* toplev.c (flag_alias_check, flag_argument_noalias): Define.
(f_options): Add new alias checking arguments.
(main): Set flag_alias_check when optimizing.
* local_alloc (validate_equiv_mem_from_store): Add new arguments
to true_dependence.
(memref_referenced_p): Likewise.
* loop.c (NUM_STORES): Increase to 30.
(prescan_loop): Only non-constant calls set unknown_address_altered.
(invariant_p): Add new arguments to true_dependence.
(record_giv): Initialize unrolled and shared fields.
(emit_iv_add_mult): Call record_base_value as needed.
* loop.h (struct induction): Add unrolled and shared fields.
* unroll.c (unroll_loop): Call record_base_value as needed.
(copy_loop_body): Likewise.
(final_biv_value): Likewise.
(final_giv_value): Likewise.
(find_splittable_regs): Likewise. Only create one new pseudo
if we have multiple address GIVs that were combined with the same
dst_reg GIV. Note when a new register is created due to unrolling.
* rtl.c (reg_note_name): Add REG_NOALIAS.
* rtl.h (enum reg_note): Similarly.
(rtx_varies_p, may_trap_p, side_effects_p): Declare.
(volatile_refs_p, volatile_insn_p, remove_note): Likewise.
(note_stores, refers_to_regno_p, reg_overlap_mentioned_p): Likewise.
(true_dependence, read_dependence, anti_dependence): Likewise.
(output_dependence, init_alias_analysis, end_alias_analysis): Likewise.
(mark_user_reg, mark_reg_pointer): Likewise.
jfc's alias analysis code.
From-SVN: r14768
1997-08-11 22:07:24 +02:00
|
|
|
|
|
1997-12-09 09:20:07 +01:00
|
|
|
|
/* In cse.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern int delete_trivially_dead_insns (rtx, int);
|
2004-08-25 14:31:01 +02:00
|
|
|
|
extern int cse_main (rtx, int, FILE *);
|
2004-01-23 22:05:21 +01:00
|
|
|
|
extern void cse_condition_code_reg (void);
|
Makefile.in (OBJS-common): Add postreload-gcse.c.
* Makefile.in (OBJS-common): Add postreload-gcse.c.
Add new postreload-gcse.o.
* cse.c (SAFE_HASH): Define as wrapper around safe_hash.
(lookup_as_function, insert, rehash_using_reg, use_related_value,
equiv_constant): Use SAFE_HASH instead of safe_hash.
(exp_equiv_p): Export. Add for_gcse argument when comparing
for GCSE.
(lookup, lookup_for_remove, merge_equiv_classes, find_best_addr,
find_comparison_args, fold_rtx, cse_insn): Update callers.
(hash_rtx): New function derived from old canon_hash and bits
from gcse.c hash_expr_1.
(canon_hash_string): Rename to hash_rtx_string.
(canon_hash, safe_hash): Make static inline. Call hash_rtx.
* cselib.c (hash_rtx): Rename to cselib_hash_rtx.
(cselib_lookup): Update this caller.
* gcse.c (modify_mem_list_set, canon_modify_mem_list_set):
Make static.
(hash_expr): Call hash_rtx.
(ldst_entry): Likewise.
(expr_equiv_p): Call exp_equiv_p.
(struct unoccr, hash_expr_1, hash_string_1, lookup_expr,
reg_used_on_edge, reg_set_between_after_reload_p,
reg_used_between_after_reload_p, get_avail_load_store_reg,
is_jump_table_basic_block, bb_has_well_behaved_predecessors,
get_bb_avail_insn, hash_scan_set_after_reload,
compute_hash_table_after_reload,
eliminate_partially_redundant_loads, gcse_after_reload,
get_bb_avail_insn, gcse_after_reload_main): Remove.
* postreload-gcse.c: New file, reincarnating most of the above.
* rtl.h (exp_equiv_p, hash_rtx): New prototypes.
(gcse_after_reload_main): Update prototype.
* timevar.def (TV_GCSE_AFTER_RELOAD): New timevar.
* passes.c (rest_of_handle_gcse2): Use it.
From-SVN: r86206
2004-08-18 22:53:59 +02:00
|
|
|
|
extern int exp_equiv_p (rtx, rtx, int, bool);
|
|
|
|
|
extern unsigned hash_rtx (rtx x, enum machine_mode, int *, int *, bool);
|
1997-12-09 09:20:07 +01:00
|
|
|
|
|
|
|
|
|
/* In jump.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern int comparison_dominates_p (enum rtx_code, enum rtx_code);
|
|
|
|
|
extern int condjump_p (rtx);
|
|
|
|
|
extern int any_condjump_p (rtx);
|
|
|
|
|
extern int any_uncondjump_p (rtx);
|
|
|
|
|
extern rtx pc_set (rtx);
|
|
|
|
|
extern rtx condjump_label (rtx);
|
|
|
|
|
extern int simplejump_p (rtx);
|
|
|
|
|
extern int returnjump_p (rtx);
|
|
|
|
|
extern int onlyjump_p (rtx);
|
|
|
|
|
extern int only_sets_cc0_p (rtx);
|
|
|
|
|
extern int sets_cc0_p (rtx);
|
|
|
|
|
extern int invert_jump_1 (rtx, rtx);
|
|
|
|
|
extern int invert_jump (rtx, rtx, int);
|
|
|
|
|
extern int rtx_renumbered_equal_p (rtx, rtx);
|
|
|
|
|
extern int true_regnum (rtx);
|
|
|
|
|
extern unsigned int reg_or_subregno (rtx);
|
|
|
|
|
extern int redirect_jump_1 (rtx, rtx);
|
2005-03-02 23:02:32 +01:00
|
|
|
|
extern void redirect_jump_2 (rtx, rtx, rtx, int, int);
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern int redirect_jump (rtx, rtx, int);
|
|
|
|
|
extern void rebuild_jump_labels (rtx);
|
2005-03-21 15:38:01 +01:00
|
|
|
|
extern rtx reversed_comparison (rtx, enum machine_mode);
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern enum rtx_code reversed_comparison_code (rtx, rtx);
|
|
|
|
|
extern enum rtx_code reversed_comparison_code_parts (enum rtx_code,
|
|
|
|
|
rtx, rtx, rtx);
|
|
|
|
|
extern void delete_for_peephole (rtx, rtx);
|
|
|
|
|
extern int condjump_in_parallel_p (rtx);
|
|
|
|
|
extern void purge_line_number_notes (rtx);
|
1998-04-27 08:05:55 +02:00
|
|
|
|
|
2001-10-11 14:43:43 +02:00
|
|
|
|
/* In emit-rtl.c. */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern int max_reg_num (void);
|
|
|
|
|
extern int max_label_num (void);
|
|
|
|
|
extern int get_first_label_num (void);
|
2004-05-13 08:41:07 +02:00
|
|
|
|
extern void maybe_set_first_label_num (rtx);
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void delete_insns_since (rtx);
|
|
|
|
|
extern void mark_reg_pointer (rtx, int);
|
|
|
|
|
extern void mark_user_reg (rtx);
|
|
|
|
|
extern void reset_used_flags (rtx);
|
emit-rtl.c (set_used_flags): New.
* emit-rtl.c (set_used_flags): New.
(verify_rtx_sharing, verify_rtl_sharing): New.
(unshare_all_rtl_1): Rename to....
(unshare_all_rtl_in_chain): ... this one; make static.
(copy_rtx_if_shared): LABEL_REF chan be shared.
* ifcvt.c (unshare_ifcvt_sequence): New.
(noce_try_move, noce_try_store_flag, noce_try_store_flag_constants,
noce_try_addcc, noce_try_addcc, noce_try_store_flag_mask,
noce_try_cmove, noce_try_store_flag_mask, noce_try_minmax,
noce_try_abs, noce_process_if_block, find_cond_trap
* rtl.h (verify_rtl_sharing, set_used_flags, unshare_all_rtl_in_chain):
Declare.
From-SVN: r74030
2003-11-29 02:13:43 +01:00
|
|
|
|
extern void set_used_flags (rtx);
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void reorder_insns (rtx, rtx, rtx);
|
|
|
|
|
extern void reorder_insns_nobb (rtx, rtx, rtx);
|
|
|
|
|
extern int get_max_uid (void);
|
|
|
|
|
extern int in_sequence_p (void);
|
|
|
|
|
extern void force_next_line_note (void);
|
|
|
|
|
extern void init_emit (void);
|
|
|
|
|
extern void init_emit_once (int);
|
|
|
|
|
extern void push_topmost_sequence (void);
|
|
|
|
|
extern void pop_topmost_sequence (void);
|
|
|
|
|
extern void set_new_first_and_last_insn (rtx, rtx);
|
2004-06-18 09:33:08 +02:00
|
|
|
|
extern void unshare_all_rtl (void);
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void unshare_all_rtl_again (rtx);
|
emit-rtl.c (set_used_flags): New.
* emit-rtl.c (set_used_flags): New.
(verify_rtx_sharing, verify_rtl_sharing): New.
(unshare_all_rtl_1): Rename to....
(unshare_all_rtl_in_chain): ... this one; make static.
(copy_rtx_if_shared): LABEL_REF chan be shared.
* ifcvt.c (unshare_ifcvt_sequence): New.
(noce_try_move, noce_try_store_flag, noce_try_store_flag_constants,
noce_try_addcc, noce_try_addcc, noce_try_store_flag_mask,
noce_try_cmove, noce_try_store_flag_mask, noce_try_minmax,
noce_try_abs, noce_process_if_block, find_cond_trap
* rtl.h (verify_rtl_sharing, set_used_flags, unshare_all_rtl_in_chain):
Declare.
From-SVN: r74030
2003-11-29 02:13:43 +01:00
|
|
|
|
extern void unshare_all_rtl_in_chain (rtx);
|
|
|
|
|
extern void verify_rtl_sharing (void);
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void set_first_insn (rtx);
|
|
|
|
|
extern void set_last_insn (rtx);
|
|
|
|
|
extern void link_cc0_insns (rtx);
|
|
|
|
|
extern void add_insn (rtx);
|
|
|
|
|
extern void add_insn_before (rtx, rtx);
|
|
|
|
|
extern void add_insn_after (rtx, rtx);
|
|
|
|
|
extern void remove_insn (rtx);
|
|
|
|
|
extern void emit_insn_after_with_line_notes (rtx, rtx, rtx);
|
|
|
|
|
extern rtx emit (rtx);
|
|
|
|
|
extern void renumber_insns (FILE *);
|
|
|
|
|
extern void remove_unnecessary_notes (void);
|
|
|
|
|
extern rtx delete_insn (rtx);
|
2004-06-20 19:03:04 +02:00
|
|
|
|
extern rtx entry_of_function (void);
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void delete_insn_chain (rtx, rtx);
|
|
|
|
|
extern rtx unlink_insn_chain (rtx, rtx);
|
|
|
|
|
extern rtx delete_insn_and_edges (rtx);
|
|
|
|
|
extern void delete_insn_chain_and_edges (rtx, rtx);
|
2004-02-10 12:38:12 +01:00
|
|
|
|
extern rtx gen_lowpart_SUBREG (enum machine_mode, rtx);
|
2004-08-18 23:08:35 +02:00
|
|
|
|
extern rtx gen_const_mem (enum machine_mode, rtx);
|
2004-11-24 01:09:03 +01:00
|
|
|
|
extern bool validate_subreg (enum machine_mode, enum machine_mode,
|
|
|
|
|
rtx, unsigned int);
|
1997-12-09 09:20:07 +01:00
|
|
|
|
|
|
|
|
|
/* In combine.c */
|
2003-06-08 16:21:54 +02:00
|
|
|
|
extern int combine_instructions (rtx, unsigned int);
|
|
|
|
|
extern unsigned int extended_count (rtx, enum machine_mode, int);
|
|
|
|
|
extern rtx remove_death (unsigned int, rtx);
|
|
|
|
|
extern void dump_combine_stats (FILE *);
|
|
|
|
|
extern void dump_combine_total_stats (FILE *);
|
2003-10-12 00:57:48 +02:00
|
|
|
|
/* In web.c */
|
2003-12-01 14:07:14 +01:00
|
|
|
|
extern void web_main (void);
|
1997-12-09 09:20:07 +01:00
|
|
|
|
|
2004-02-10 12:38:12 +01:00
|
|
|
|
/* In sched-rgn.c. */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void schedule_insns (FILE *);
|
2004-02-10 12:38:12 +01:00
|
|
|
|
|
|
|
|
|
/* In sched-ebb.c. */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void schedule_ebbs (FILE *);
|
2004-02-10 12:38:12 +01:00
|
|
|
|
|
|
|
|
|
/* In haifa-sched.c. */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void fix_sched_param (const char *, const char *);
|
1997-12-09 09:20:07 +01:00
|
|
|
|
|
|
|
|
|
/* In print-rtl.c */
|
2000-10-16 18:24:54 +02:00
|
|
|
|
extern const char *print_rtx_head;
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void debug_rtx (rtx);
|
|
|
|
|
extern void debug_rtx_list (rtx, int);
|
|
|
|
|
extern void debug_rtx_range (rtx, rtx);
|
|
|
|
|
extern rtx debug_rtx_find (rtx, int);
|
|
|
|
|
extern void print_mem_expr (FILE *, tree);
|
|
|
|
|
extern void print_rtl (FILE *, rtx);
|
|
|
|
|
extern void print_simple_rtl (FILE *, rtx);
|
|
|
|
|
extern int print_rtl_single (FILE *, rtx);
|
|
|
|
|
extern void print_inline_rtx (FILE *, rtx, int);
|
1997-12-09 09:20:07 +01:00
|
|
|
|
|
|
|
|
|
/* In loop.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void init_loop (void);
|
|
|
|
|
extern void loop_optimize (rtx, FILE *, int);
|
2004-11-02 18:59:46 +01:00
|
|
|
|
|
|
|
|
|
/* In bt-load.c */
|
2004-05-15 11:39:30 +02:00
|
|
|
|
extern void branch_target_load_optimize (bool);
|
1997-12-09 09:20:07 +01:00
|
|
|
|
|
|
|
|
|
/* In function.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void reposition_prologue_and_epilogue_notes (rtx);
|
|
|
|
|
extern void thread_prologue_and_epilogue_insns (rtx);
|
|
|
|
|
extern int prologue_epilogue_contains (rtx);
|
|
|
|
|
extern int sibcall_epilogue_contains (rtx);
|
|
|
|
|
extern void mark_temp_addr_taken (rtx);
|
|
|
|
|
extern void update_temp_slot_address (rtx, rtx);
|
1997-12-09 09:20:07 +01:00
|
|
|
|
|
|
|
|
|
/* In stmt.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void expand_null_return (void);
|
2003-12-05 07:46:35 +01:00
|
|
|
|
extern void expand_naked_return (void);
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void emit_jump (rtx);
|
1997-12-09 09:20:07 +01:00
|
|
|
|
|
|
|
|
|
/* In expr.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtx move_by_pieces (rtx, rtx, unsigned HOST_WIDE_INT,
|
|
|
|
|
unsigned int, int);
|
1998-08-17 18:37:49 +02:00
|
|
|
|
|
1997-12-09 09:20:07 +01:00
|
|
|
|
/* In flow.c */
|
2005-02-15 08:19:51 +01:00
|
|
|
|
extern void recompute_reg_usage (void);
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern int initialize_uninitialized_subregs (void);
|
|
|
|
|
extern void delete_dead_jumptables (void);
|
|
|
|
|
extern void print_rtl_with_bb (FILE *, rtx);
|
|
|
|
|
extern void dump_flow_info (FILE *);
|
1997-12-09 09:20:07 +01:00
|
|
|
|
|
|
|
|
|
/* In expmed.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void init_expmed (void);
|
|
|
|
|
extern void expand_inc (rtx, rtx);
|
|
|
|
|
extern void expand_dec (rtx, rtx);
|
1997-12-09 09:20:07 +01:00
|
|
|
|
|
Warning fixes:
* Makefile.in (varasm.o): Depend on dbxout.h.
(cse.o): Depend on toplev.h and output.h.
(gcse.o): Depend on output.h.
* mips.c: Include system.h and toplev.h and remove redundant code.
Include output.h after tree.h so all its prototypes get activated.
* mips.md (table_jump): Remove unused variable `dest'.
* sparc.h: Add prototype for `v8plus_regcmp_op'.
* crtstuff.c (fini_dummy, init_dummy): Mark function definitions
with __attribute__ ((__unused__)).
(__frame_dummy): Provide prototype before use, wrap it with
EH_FRAME_SECTION_ASM_OP.
* cse.c: Move inclusion of <setjmp.h> above local headers.
Include toplev.h and output.h.
* dbxout.h: Add prototype for `dbxout_begin_function'.
* final.c (final_scan_insn): Wrap variable `max_skip' in macro
ASM_OUTPUT_MAX_SKIP_ALIGN.
* gcse.c: Include system.h and output.h.
(dump_cuid_table, dump_rd_table, dump_cprop_data, dump_pre_data):
Make extern instead of static.
(compute_can_copy): Only declare variables `reg' and `insn' when
AVOID_CCMODE_COPIES is not defined.
(record_set_info): Mark parameter `setter' with ATTRIBUTE_UNUSED.
(hash_scan_clobber): Likewise for `x' and `insn'.
(hash_scan_call): Likewise.
(record_last_set_info): Likewise for `setter'.
(mark_call): Likewise for `pat'.
(pre_insert_insn): Wrap variable `note' in macro HAVE_cc0.
* libgcc2.c (__bb_init_prg): Replace bzero with memset and fix the
length parameter so that it multiplies the number of elements by
the sizeof(element).
* output.h: Add prototype for `weak_finish'.
* recog.h: Likewise for `validate_replace_src'.
* rtl.h: Likewise for `optimize_save_area_alloca',
`fix_sched_param', `purge_addressof', `gcse_main',
`regmove_optimize', `dbr_schedule', `branch_prob' and
`end_branch_prob'.
* toplev.h: Likewise for `set_float_handler' and
`output_quoted_string'.
* varasm.c: Include dbxout.h.
From-SVN: r20351
1998-06-08 20:30:27 +02:00
|
|
|
|
/* In gcse.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern bool can_copy_p (enum machine_mode);
|
|
|
|
|
extern rtx fis_get_condition (rtx);
|
|
|
|
|
extern int gcse_main (rtx, FILE *);
|
|
|
|
|
extern int bypass_jumps (FILE *);
|
Makefile.in (OBJS-common): Add postreload-gcse.c.
* Makefile.in (OBJS-common): Add postreload-gcse.c.
Add new postreload-gcse.o.
* cse.c (SAFE_HASH): Define as wrapper around safe_hash.
(lookup_as_function, insert, rehash_using_reg, use_related_value,
equiv_constant): Use SAFE_HASH instead of safe_hash.
(exp_equiv_p): Export. Add for_gcse argument when comparing
for GCSE.
(lookup, lookup_for_remove, merge_equiv_classes, find_best_addr,
find_comparison_args, fold_rtx, cse_insn): Update callers.
(hash_rtx): New function derived from old canon_hash and bits
from gcse.c hash_expr_1.
(canon_hash_string): Rename to hash_rtx_string.
(canon_hash, safe_hash): Make static inline. Call hash_rtx.
* cselib.c (hash_rtx): Rename to cselib_hash_rtx.
(cselib_lookup): Update this caller.
* gcse.c (modify_mem_list_set, canon_modify_mem_list_set):
Make static.
(hash_expr): Call hash_rtx.
(ldst_entry): Likewise.
(expr_equiv_p): Call exp_equiv_p.
(struct unoccr, hash_expr_1, hash_string_1, lookup_expr,
reg_used_on_edge, reg_set_between_after_reload_p,
reg_used_between_after_reload_p, get_avail_load_store_reg,
is_jump_table_basic_block, bb_has_well_behaved_predecessors,
get_bb_avail_insn, hash_scan_set_after_reload,
compute_hash_table_after_reload,
eliminate_partially_redundant_loads, gcse_after_reload,
get_bb_avail_insn, gcse_after_reload_main): Remove.
* postreload-gcse.c: New file, reincarnating most of the above.
* rtl.h (exp_equiv_p, hash_rtx): New prototypes.
(gcse_after_reload_main): Update prototype.
* timevar.def (TV_GCSE_AFTER_RELOAD): New timevar.
* passes.c (rest_of_handle_gcse2): Use it.
From-SVN: r86206
2004-08-18 22:53:59 +02:00
|
|
|
|
|
|
|
|
|
/* In postreload-gcse.c */
|
|
|
|
|
extern void gcse_after_reload_main (rtx);
|
Warning fixes:
* Makefile.in (varasm.o): Depend on dbxout.h.
(cse.o): Depend on toplev.h and output.h.
(gcse.o): Depend on output.h.
* mips.c: Include system.h and toplev.h and remove redundant code.
Include output.h after tree.h so all its prototypes get activated.
* mips.md (table_jump): Remove unused variable `dest'.
* sparc.h: Add prototype for `v8plus_regcmp_op'.
* crtstuff.c (fini_dummy, init_dummy): Mark function definitions
with __attribute__ ((__unused__)).
(__frame_dummy): Provide prototype before use, wrap it with
EH_FRAME_SECTION_ASM_OP.
* cse.c: Move inclusion of <setjmp.h> above local headers.
Include toplev.h and output.h.
* dbxout.h: Add prototype for `dbxout_begin_function'.
* final.c (final_scan_insn): Wrap variable `max_skip' in macro
ASM_OUTPUT_MAX_SKIP_ALIGN.
* gcse.c: Include system.h and output.h.
(dump_cuid_table, dump_rd_table, dump_cprop_data, dump_pre_data):
Make extern instead of static.
(compute_can_copy): Only declare variables `reg' and `insn' when
AVOID_CCMODE_COPIES is not defined.
(record_set_info): Mark parameter `setter' with ATTRIBUTE_UNUSED.
(hash_scan_clobber): Likewise for `x' and `insn'.
(hash_scan_call): Likewise.
(record_last_set_info): Likewise for `setter'.
(mark_call): Likewise for `pat'.
(pre_insert_insn): Wrap variable `note' in macro HAVE_cc0.
* libgcc2.c (__bb_init_prg): Replace bzero with memset and fix the
length parameter so that it multiplies the number of elements by
the sizeof(element).
* output.h: Add prototype for `weak_finish'.
* recog.h: Likewise for `validate_replace_src'.
* rtl.h: Likewise for `optimize_save_area_alloca',
`fix_sched_param', `purge_addressof', `gcse_main',
`regmove_optimize', `dbr_schedule', `branch_prob' and
`end_branch_prob'.
* toplev.h: Likewise for `set_float_handler' and
`output_quoted_string'.
* varasm.c: Include dbxout.h.
From-SVN: r20351
1998-06-08 20:30:27 +02:00
|
|
|
|
|
1997-12-09 09:20:07 +01:00
|
|
|
|
/* In global.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void mark_elimination (int, int);
|
|
|
|
|
extern int global_alloc (FILE *);
|
|
|
|
|
extern void dump_global_regs (FILE *);
|
1998-06-18 08:46:35 +02:00
|
|
|
|
#ifdef HARD_CONST
|
2002-11-04 17:58:39 +01:00
|
|
|
|
/* Yes, this ifdef is silly, but HARD_REG_SET is not always defined. */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void retry_global_alloc (int, HARD_REG_SET);
|
1998-06-18 08:46:35 +02:00
|
|
|
|
#endif
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void build_insn_chain (rtx);
|
1997-12-09 09:20:07 +01:00
|
|
|
|
|
|
|
|
|
/* In regclass.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern int reg_classes_intersect_p (enum reg_class, enum reg_class);
|
|
|
|
|
extern int reg_class_subset_p (enum reg_class, enum reg_class);
|
|
|
|
|
extern void globalize_reg (int);
|
2003-08-14 03:47:31 +02:00
|
|
|
|
extern void init_reg_modes_once (void);
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void init_regs (void);
|
|
|
|
|
extern void init_fake_stack_mems (void);
|
|
|
|
|
extern void init_reg_sets (void);
|
|
|
|
|
extern void regclass_init (void);
|
|
|
|
|
extern void regclass (rtx, int, FILE *);
|
bb-reorder.c (fix_edges_for_rarely_executed_code): Remove last parameter to reg_scan.
2005-01-15 Paolo Bonzini <bonzini@gnu.org>
* bb-reorder.c (fix_edges_for_rarely_executed_code): Remove
last parameter to reg_scan.
* loop.c (loop_optimize): Likewise.
* passes.c (rest_of_handle_tracer, rest_of_handle_if_conversion,
rest_of_handle_web, rest_of_handle_cfg, rest_of_handle_jump_bypass,
rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2,
rest_of_handle_gcse, rest_of_handle_loop_optimize,
rest_of_handle_loop2, rest_of_handle_jump2): Likewise.
* regclass.c (reg_scan): Likewise, for the declaration.
* rtl.h (reg_scan): Likewise, for the prototype.
From-SVN: r93758
2005-01-17 09:46:19 +01:00
|
|
|
|
extern void reg_scan (rtx, unsigned int);
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void reg_scan_update (rtx, rtx, unsigned int);
|
|
|
|
|
extern void fix_register (const char *, int, int);
|
2004-09-24 21:47:05 +02:00
|
|
|
|
extern void init_subregs_of_mode (void);
|
|
|
|
|
extern void record_subregs_of_mode (rtx);
|
2002-11-04 17:58:39 +01:00
|
|
|
|
#ifdef HARD_CONST
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void cannot_change_mode_set_regs (HARD_REG_SET *,
|
|
|
|
|
enum machine_mode, unsigned int);
|
2002-11-04 17:58:39 +01:00
|
|
|
|
#endif
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern bool invalid_mode_change_p (unsigned int, enum reg_class,
|
|
|
|
|
enum machine_mode);
|
2000-01-17 16:47:29 +01:00
|
|
|
|
|
Warning fixes:
* Makefile.in (varasm.o): Depend on dbxout.h.
(cse.o): Depend on toplev.h and output.h.
(gcse.o): Depend on output.h.
* mips.c: Include system.h and toplev.h and remove redundant code.
Include output.h after tree.h so all its prototypes get activated.
* mips.md (table_jump): Remove unused variable `dest'.
* sparc.h: Add prototype for `v8plus_regcmp_op'.
* crtstuff.c (fini_dummy, init_dummy): Mark function definitions
with __attribute__ ((__unused__)).
(__frame_dummy): Provide prototype before use, wrap it with
EH_FRAME_SECTION_ASM_OP.
* cse.c: Move inclusion of <setjmp.h> above local headers.
Include toplev.h and output.h.
* dbxout.h: Add prototype for `dbxout_begin_function'.
* final.c (final_scan_insn): Wrap variable `max_skip' in macro
ASM_OUTPUT_MAX_SKIP_ALIGN.
* gcse.c: Include system.h and output.h.
(dump_cuid_table, dump_rd_table, dump_cprop_data, dump_pre_data):
Make extern instead of static.
(compute_can_copy): Only declare variables `reg' and `insn' when
AVOID_CCMODE_COPIES is not defined.
(record_set_info): Mark parameter `setter' with ATTRIBUTE_UNUSED.
(hash_scan_clobber): Likewise for `x' and `insn'.
(hash_scan_call): Likewise.
(record_last_set_info): Likewise for `setter'.
(mark_call): Likewise for `pat'.
(pre_insert_insn): Wrap variable `note' in macro HAVE_cc0.
* libgcc2.c (__bb_init_prg): Replace bzero with memset and fix the
length parameter so that it multiplies the number of elements by
the sizeof(element).
* output.h: Add prototype for `weak_finish'.
* recog.h: Likewise for `validate_replace_src'.
* rtl.h: Likewise for `optimize_save_area_alloca',
`fix_sched_param', `purge_addressof', `gcse_main',
`regmove_optimize', `dbr_schedule', `branch_prob' and
`end_branch_prob'.
* toplev.h: Likewise for `set_float_handler' and
`output_quoted_string'.
* varasm.c: Include dbxout.h.
From-SVN: r20351
1998-06-08 20:30:27 +02:00
|
|
|
|
/* In regmove.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void regmove_optimize (rtx, int, FILE *);
|
|
|
|
|
extern void combine_stack_adjustments (void);
|
Warning fixes:
* Makefile.in (varasm.o): Depend on dbxout.h.
(cse.o): Depend on toplev.h and output.h.
(gcse.o): Depend on output.h.
* mips.c: Include system.h and toplev.h and remove redundant code.
Include output.h after tree.h so all its prototypes get activated.
* mips.md (table_jump): Remove unused variable `dest'.
* sparc.h: Add prototype for `v8plus_regcmp_op'.
* crtstuff.c (fini_dummy, init_dummy): Mark function definitions
with __attribute__ ((__unused__)).
(__frame_dummy): Provide prototype before use, wrap it with
EH_FRAME_SECTION_ASM_OP.
* cse.c: Move inclusion of <setjmp.h> above local headers.
Include toplev.h and output.h.
* dbxout.h: Add prototype for `dbxout_begin_function'.
* final.c (final_scan_insn): Wrap variable `max_skip' in macro
ASM_OUTPUT_MAX_SKIP_ALIGN.
* gcse.c: Include system.h and output.h.
(dump_cuid_table, dump_rd_table, dump_cprop_data, dump_pre_data):
Make extern instead of static.
(compute_can_copy): Only declare variables `reg' and `insn' when
AVOID_CCMODE_COPIES is not defined.
(record_set_info): Mark parameter `setter' with ATTRIBUTE_UNUSED.
(hash_scan_clobber): Likewise for `x' and `insn'.
(hash_scan_call): Likewise.
(record_last_set_info): Likewise for `setter'.
(mark_call): Likewise for `pat'.
(pre_insert_insn): Wrap variable `note' in macro HAVE_cc0.
* libgcc2.c (__bb_init_prg): Replace bzero with memset and fix the
length parameter so that it multiplies the number of elements by
the sizeof(element).
* output.h: Add prototype for `weak_finish'.
* recog.h: Likewise for `validate_replace_src'.
* rtl.h: Likewise for `optimize_save_area_alloca',
`fix_sched_param', `purge_addressof', `gcse_main',
`regmove_optimize', `dbr_schedule', `branch_prob' and
`end_branch_prob'.
* toplev.h: Likewise for `set_float_handler' and
`output_quoted_string'.
* varasm.c: Include dbxout.h.
From-SVN: r20351
1998-06-08 20:30:27 +02:00
|
|
|
|
|
|
|
|
|
/* In reorg.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void dbr_schedule (rtx, FILE *);
|
Warning fixes:
* Makefile.in (varasm.o): Depend on dbxout.h.
(cse.o): Depend on toplev.h and output.h.
(gcse.o): Depend on output.h.
* mips.c: Include system.h and toplev.h and remove redundant code.
Include output.h after tree.h so all its prototypes get activated.
* mips.md (table_jump): Remove unused variable `dest'.
* sparc.h: Add prototype for `v8plus_regcmp_op'.
* crtstuff.c (fini_dummy, init_dummy): Mark function definitions
with __attribute__ ((__unused__)).
(__frame_dummy): Provide prototype before use, wrap it with
EH_FRAME_SECTION_ASM_OP.
* cse.c: Move inclusion of <setjmp.h> above local headers.
Include toplev.h and output.h.
* dbxout.h: Add prototype for `dbxout_begin_function'.
* final.c (final_scan_insn): Wrap variable `max_skip' in macro
ASM_OUTPUT_MAX_SKIP_ALIGN.
* gcse.c: Include system.h and output.h.
(dump_cuid_table, dump_rd_table, dump_cprop_data, dump_pre_data):
Make extern instead of static.
(compute_can_copy): Only declare variables `reg' and `insn' when
AVOID_CCMODE_COPIES is not defined.
(record_set_info): Mark parameter `setter' with ATTRIBUTE_UNUSED.
(hash_scan_clobber): Likewise for `x' and `insn'.
(hash_scan_call): Likewise.
(record_last_set_info): Likewise for `setter'.
(mark_call): Likewise for `pat'.
(pre_insert_insn): Wrap variable `note' in macro HAVE_cc0.
* libgcc2.c (__bb_init_prg): Replace bzero with memset and fix the
length parameter so that it multiplies the number of elements by
the sizeof(element).
* output.h: Add prototype for `weak_finish'.
* recog.h: Likewise for `validate_replace_src'.
* rtl.h: Likewise for `optimize_save_area_alloca',
`fix_sched_param', `purge_addressof', `gcse_main',
`regmove_optimize', `dbr_schedule', `branch_prob' and
`end_branch_prob'.
* toplev.h: Likewise for `set_float_handler' and
`output_quoted_string'.
* varasm.c: Include dbxout.h.
From-SVN: r20351
1998-06-08 20:30:27 +02:00
|
|
|
|
|
1997-12-09 09:20:07 +01:00
|
|
|
|
/* In local-alloc.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void dump_local_alloc (FILE *);
|
|
|
|
|
extern int local_alloc (void);
|
1997-12-09 09:20:07 +01:00
|
|
|
|
|
2005-06-01 13:38:53 +02:00
|
|
|
|
/* In reload1.c */
|
|
|
|
|
extern int function_invariant_p (rtx);
|
|
|
|
|
|
1997-12-09 09:20:07 +01:00
|
|
|
|
/* In reg-stack.c */
|
2004-05-15 11:39:30 +02:00
|
|
|
|
extern bool reg_to_stack (FILE *);
|
1997-12-09 09:20:07 +01:00
|
|
|
|
|
|
|
|
|
/* In calls.c */
|
2000-09-17 14:45:51 +02:00
|
|
|
|
enum libcall_type
|
|
|
|
|
{
|
|
|
|
|
LCT_NORMAL = 0,
|
|
|
|
|
LCT_CONST = 1,
|
|
|
|
|
LCT_PURE = 2,
|
|
|
|
|
LCT_CONST_MAKE_BLOCK = 3,
|
2001-03-28 05:35:05 +02:00
|
|
|
|
LCT_PURE_MAKE_BLOCK = 4,
|
2001-04-04 02:48:51 +02:00
|
|
|
|
LCT_NORETURN = 5,
|
2001-08-08 21:07:47 +02:00
|
|
|
|
LCT_THROW = 6,
|
2005-02-28 19:18:26 +01:00
|
|
|
|
LCT_RETURNS_TWICE = 7
|
2000-09-17 14:45:51 +02:00
|
|
|
|
};
|
|
|
|
|
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void emit_library_call (rtx, enum libcall_type, enum machine_mode, int,
|
|
|
|
|
...);
|
|
|
|
|
extern rtx emit_library_call_value (rtx, rtx, enum libcall_type,
|
|
|
|
|
enum machine_mode, int, ...);
|
1997-12-09 09:20:07 +01:00
|
|
|
|
|
|
|
|
|
/* In varasm.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern int in_data_section (void);
|
|
|
|
|
extern void init_varasm_once (void);
|
1997-12-09 09:20:07 +01:00
|
|
|
|
|
|
|
|
|
/* In rtl.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void traverse_md_constants (int (*) (void **, void *), void *);
|
2000-11-22 02:22:02 +01:00
|
|
|
|
struct md_constant { char *name, *value; };
|
1997-12-09 09:20:07 +01:00
|
|
|
|
|
Makefile.in (RTL_BASE_H, RTL_H): Correct.
* Makefile.in (RTL_BASE_H, RTL_H): Correct.
(BUILD_RTL): Remove $(BUILD_PREFIX) from ggc-none.o.
(genobjs): Add errors.o, ggc-none.o, and min-insn-modes.o.
(read-rtl.o, gensupport.o, genconfig.o, genflags.o, gencodes.o)
(genconstants.o, genemit.o, genopinit.o, genrecog.o, genextract.o)
(genpeep.o, genattr.o, genattrtab.o, genautomata.o, genoutput.o)
(genconditions.o): Depend on $(RTL_BASE_H) not $(RTL_H).
(ggc-none.o, errors.o): Move rule to generators section;
correct dependencies.
(min-insn-modes.o): Move rule to generators section; remove
unnecessary explicit command; correct dependencies.
(print-rtl.o, print-rtl1.o): Correct dependencies.
($(BUILD_PREFIX_1)errors.o. $(BUILD_PREFIX_1)ggc-none.o): Delete rule.
(mostlyclean): Update.
* errors.c: Include bconfig.h not config.h. Correct comment.
* gengtype.c, genpreds.c: Don't define NO_GENRTL_H.
* ggc-none.c: Include bconfig.h; not config.h or tm.h.
* print-rtl.c: Don't include tm_p.h.
* rtl.h: Move forward-decl of struct function down where it's
needed. Include genrtl.h #ifndef GENERATOR_FILE, not
#ifndef NO_GENRTL_H. Remove unnecessary #ifdef BUFSIZ statements.
From-SVN: r85574
2004-08-04 22:55:08 +02:00
|
|
|
|
/* In read-rtl.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern int read_skip_spaces (FILE *);
|
2004-08-27 12:12:51 +02:00
|
|
|
|
extern bool read_rtx (FILE *, rtx *, int *);
|
* rtl.h (copy_rtx_ptr_loc, print_rtx_ptr_loc, join_c_conditions)
(print_c_condition): Declare.
* read-rtl.c (ptr_loc): New structure.
(ptr_locs, ptr_loc_obstack, joined_conditions)
(joined_conditions_obstack): New variables.
(leading_ptr_hash, leading_ptr_eq_p, set_rtx_ptr_loc)
(get_rtx_ptr_loc, copy_rtx_ptr_loc, print_rtx_ptr_loc)
(join_c_conditions, print_c_condition): New functions.
(apply_macro_to_string): Associate the new string with the same
source location as the old one.
(add_condition_to_string): Use join_c_conditions.
(read_string): Use set_rtx_ptr_loc to record a filename and line
number for the string.
(read_rtx): Initialize the new variables above.
* genattrtab.c (write_test_expr, write_attr_value): Use
print_c_condition.
* genconditions.c (write_header): Don't define MAYBE_EVAL. Move its
comment above the GCC_VERSION check.
(write_one_condition): Use print_rtx_ptr_loc and print_c_condition.
Inline the definition of MAYBE_EVAL.
* genemit.c (gen_expand, gen_split): Use print_rtx_ptr_loc.
* genoutput.c (process_template): Likewise.
* genpreds.c (write_predicate_subfunction): Likewise.
(write_predicate_expr): Use print_c_condition.
* genrecog.c (write_cond): Likewise.
* gensupport.c (process_rtx): Use join_c_conditions to join the
conditions of a define_insn_and_split. Record a source location
for the string after the "&&".
(alter_test_for_insn): Use join_c_conditions.
From-SVN: r95883
2005-03-04 12:10:35 +01:00
|
|
|
|
extern void copy_rtx_ptr_loc (const void *, const void *);
|
|
|
|
|
extern void print_rtx_ptr_loc (const void *);
|
|
|
|
|
extern const char *join_c_conditions (const char *, const char *);
|
|
|
|
|
extern void print_c_condition (const char *);
|
1999-10-14 05:43:49 +02:00
|
|
|
|
extern const char *read_rtx_filename;
|
|
|
|
|
extern int read_rtx_lineno;
|
|
|
|
|
|
1997-12-09 09:20:07 +01:00
|
|
|
|
/* In alias.c */
|
2003-06-15 15:43:32 +02:00
|
|
|
|
extern void clear_reg_alias_info (rtx);
|
|
|
|
|
extern rtx canon_rtx (rtx);
|
|
|
|
|
extern int true_dependence (rtx, enum machine_mode, rtx, int (*)(rtx, int));
|
|
|
|
|
extern rtx get_addr (rtx);
|
|
|
|
|
extern int canon_true_dependence (rtx, enum machine_mode, rtx, rtx,
|
|
|
|
|
int (*)(rtx, int));
|
|
|
|
|
extern int read_dependence (rtx, rtx);
|
|
|
|
|
extern int anti_dependence (rtx, rtx);
|
|
|
|
|
extern int output_dependence (rtx, rtx);
|
|
|
|
|
extern void mark_constant_function (void);
|
|
|
|
|
extern void init_alias_once (void);
|
|
|
|
|
extern void init_alias_analysis (void);
|
|
|
|
|
extern void end_alias_analysis (void);
|
|
|
|
|
extern bool memory_modified_in_insn_p (rtx, rtx);
|
|
|
|
|
extern rtx find_base_term (rtx);
|
2004-01-20 23:16:59 +01:00
|
|
|
|
extern rtx gen_hard_reg_clobber (enum machine_mode, unsigned int);
|
2004-03-25 01:58:57 +01:00
|
|
|
|
extern rtx get_reg_known_value (unsigned int);
|
|
|
|
|
extern bool get_reg_known_equiv_p (unsigned int);
|
1998-06-27 17:51:49 +02:00
|
|
|
|
|
1999-04-12 03:39:00 +02:00
|
|
|
|
#ifdef STACK_REGS
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern int stack_regs_mentioned (rtx insn);
|
1999-04-12 03:39:00 +02:00
|
|
|
|
#endif
|
|
|
|
|
|
1999-12-04 04:00:04 +01:00
|
|
|
|
/* In toplev.c */
|
2002-06-04 09:11:05 +02:00
|
|
|
|
extern GTY(()) rtx stack_limit_rtx;
|
1999-09-20 15:58:33 +02:00
|
|
|
|
|
2000-04-05 02:32:45 +02:00
|
|
|
|
/* In regrename.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void regrename_optimize (void);
|
|
|
|
|
extern void copyprop_hardreg_forward (void);
|
2000-04-05 02:32:45 +02:00
|
|
|
|
|
2001-06-10 00:39:25 +02:00
|
|
|
|
/* In ifcvt.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void if_convert (int);
|
2000-04-27 09:20:29 +02:00
|
|
|
|
|
2001-06-10 00:39:25 +02:00
|
|
|
|
/* In predict.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void invert_br_probabilities (rtx);
|
|
|
|
|
extern bool expensive_function_p (int);
|
2002-06-01 23:31:42 +02:00
|
|
|
|
/* In tracer.c */
|
2004-07-26 16:34:19 +02:00
|
|
|
|
extern void tracer (unsigned int);
|
2002-11-04 17:58:39 +01:00
|
|
|
|
|
2004-02-06 21:03:45 +01:00
|
|
|
|
/* In var-tracking.c */
|
|
|
|
|
extern void variable_tracking_main (void);
|
|
|
|
|
|
loop-iv.c: New file.
* loop-iv.c: New file.
* Makefile.in (loop-iv.o): New.
* basic_block.h (FOR_BB_INSNS, FOR_BB_INSNS_REVERSE): New macros.
* cfgloop.c (fill_sons_in_loop, get_loop_body_in_dom_order,
num_loop_branches): New functions.
* cfgloop.h (get_loop_body_in_dom_order, num_loop_branches,
iv_analysis_loop_init, iv_get_reaching_def, iv_analyse, get_iv_value,
find_simple_exit, iv_number_of_iterations, iv_analysis_done,
get_simple_loop_desc, free_simple_loop_desc): Declare.
(simple_loop_desc): New inline function.
(struct rtx_iv, struct niter_desc): New.
* cfgloopmanip.c (loopify): Specify semantics more precisely.
* expr.c (force_operand): Handle subregs of expressions created by
loop unroller.
* loop-init.c (loop_optimizer_init, loop_optimizer_finalize): Move
parts of the initialization to toplev.c
* loop-unroll.c (loop_exit_at_end_p): New.
(unroll_and_peel_loops): Call iv_analysis_done.
(decide_peel_once_rolling, decide_peel_completely,
decide_unroll_stupid, decide_unroll_constant_iterations,
decide_unroll_runtime_iterations, decide_peel_simple,
peel_loop_simple, unroll_loop_stupid, unroll_loop_constant_iterations,
unroll_loop_runtime_iterations): Use new simple loop analysis.
* loop-unswitch.c (compare_and_jump_seq): New.
(may_unswitch_on_p): Renamed to ...
(may_unswitch_on): Use new iv analysis.
(reversed_condition): Export.
(unswitch_single_loop, unswitch_loop): Use new iv analysis.
* predict.c (estimate_probability): Use new simple loop analysis.
* rtl.h (get_mode_bounds, reversed_condition,compare_and_jump_seq,
canon_condition, simplify_using_condition): Declare.
* stor-layout.c (get_mode_bounds): New.
* toplev.c (rest_of_handle_loop2): Some parts of
initialization/finalization moved here from loop-init.c.
From-SVN: r77951
2004-02-17 17:41:44 +01:00
|
|
|
|
/* In stor-layout.c. */
|
Multiple fixes: PRs 14692, 15274 and 15463
PR c++/15463
* loop-iv.c (iv_number_of_iterations): Use trunc_int_for_mode on
result of inverse.
PR rtl-optimization/15274
* loop-iv.c (determine_max_iter, shorten_into_mode,
iv_number_of_iterations): Handle constants correctly.
* rtl.h (get_mode_bounds): Declaration changed.
* stor-layout.c (get_mode_bounds): Return a constant suitable for
the target mode.
PR rtl-optimization/14692
* loop-unswitch.c (may_unswitch_on): Try folding the result.
(unswitch_single_loop): Work correctly when may_unswitch_on
returns a folded constant.
* loop-iv.c (implies_p): Handle A < B ==> A + 1 <= B.
* simplify-rtx.c (simplify_const_relational_operation): Optimize
comparisons with mode bounds.
* function.c (struct temp_slot): Add new field prev.
(free_after_compilation, init_temp_slots): Free new fields.
(cut_slot_from_list, insert_slot_to_list,
temp_slots_at_level, max_slot_level, move_slot_to_level,
make_slot_available): New functions.
(assign_stack_temp_for_type, combine_temp_slots,
find_temp_slot_from_address, preserve_temp_slots,
preserve_rtl_expr_result, free_temp_slots,
free_temps_for_rtl_expr, pop_temp_slots): Work with
the new structure of lists.
(mark_all_temps_used): Removed.
* function.h (struct function): Field x_temp_slots
replaced by x_used_temp_slots and x_avail_temp_slots.
(temp_slots): Replaced by ...
(used_temp_slots, avail_temp_slots): New.
* tree.h (mark_all_temps_used): Declaration removed.
* loop-iv.c (mark_single_set, get_biv_step_1, iv_analyze,
simplify_using_assignment): Take the expression out of
the expr_list wrapper.
* loop-iv.c (iv_number_of_iterations): Improve clasification of
infinite loops.
From-SVN: r82028
2004-05-19 19:53:45 +02:00
|
|
|
|
extern void get_mode_bounds (enum machine_mode, int, enum machine_mode,
|
|
|
|
|
rtx *, rtx *);
|
loop-iv.c: New file.
* loop-iv.c: New file.
* Makefile.in (loop-iv.o): New.
* basic_block.h (FOR_BB_INSNS, FOR_BB_INSNS_REVERSE): New macros.
* cfgloop.c (fill_sons_in_loop, get_loop_body_in_dom_order,
num_loop_branches): New functions.
* cfgloop.h (get_loop_body_in_dom_order, num_loop_branches,
iv_analysis_loop_init, iv_get_reaching_def, iv_analyse, get_iv_value,
find_simple_exit, iv_number_of_iterations, iv_analysis_done,
get_simple_loop_desc, free_simple_loop_desc): Declare.
(simple_loop_desc): New inline function.
(struct rtx_iv, struct niter_desc): New.
* cfgloopmanip.c (loopify): Specify semantics more precisely.
* expr.c (force_operand): Handle subregs of expressions created by
loop unroller.
* loop-init.c (loop_optimizer_init, loop_optimizer_finalize): Move
parts of the initialization to toplev.c
* loop-unroll.c (loop_exit_at_end_p): New.
(unroll_and_peel_loops): Call iv_analysis_done.
(decide_peel_once_rolling, decide_peel_completely,
decide_unroll_stupid, decide_unroll_constant_iterations,
decide_unroll_runtime_iterations, decide_peel_simple,
peel_loop_simple, unroll_loop_stupid, unroll_loop_constant_iterations,
unroll_loop_runtime_iterations): Use new simple loop analysis.
* loop-unswitch.c (compare_and_jump_seq): New.
(may_unswitch_on_p): Renamed to ...
(may_unswitch_on): Use new iv analysis.
(reversed_condition): Export.
(unswitch_single_loop, unswitch_loop): Use new iv analysis.
* predict.c (estimate_probability): Use new simple loop analysis.
* rtl.h (get_mode_bounds, reversed_condition,compare_and_jump_seq,
canon_condition, simplify_using_condition): Declare.
* stor-layout.c (get_mode_bounds): New.
* toplev.c (rest_of_handle_loop2): Some parts of
initialization/finalization moved here from loop-init.c.
From-SVN: r77951
2004-02-17 17:41:44 +01:00
|
|
|
|
|
|
|
|
|
/* In loop-unswitch.c */
|
|
|
|
|
extern rtx reversed_condition (rtx);
|
|
|
|
|
extern rtx compare_and_jump_seq (rtx, rtx, enum rtx_code, rtx, int, rtx);
|
|
|
|
|
|
|
|
|
|
/* In loop-iv.c */
|
|
|
|
|
extern rtx canon_condition (rtx);
|
|
|
|
|
extern void simplify_using_condition (rtx, rtx *, struct bitmap_head_def *);
|
|
|
|
|
|
passes.c: New file.
* passes.c: New file.
* Makefile.in (OBJS-common): Add it.
* diagnostic.c (rtl_dump_and_exit): Move decl ...
* flags.h (rtl_dump_and_exit): ... here.
* output.h (size_directive_output, last_assemble_variable_decl):
Move from toplev.c.
* rtl.h (reg_alloc): Move from toplev.c.
* toplev.c (HAVE_conditional_execution, DUMPFILE_FORMAT,
struct dump_file_info, enum dump_file_index, dump_file_tbl,
open_dump_file, close_dump_file, rest_of_decl_compilation,
rest_of_type_compilation, rest_of_handle_final,
rest_of_handle_delay_slots, rest_of_handle_stack_regs,
rest_of_handle_variable_tracking, rest_of_handle_machine_reorg,
rest_of_handle_new_regalloc, rest_of_handle_old_regalloc,
rest_of_handle_regrename, rest_of_handle_reorder_blocks,
rest_of_handle_sched, rest_of_handle_sched2, rest_of_handle_regmove,
rest_of_handle_tracer, rest_of_handle_if_conversion,
rest_of_handle_if_after_combine, rest_of_handle_web,
rest_of_handle_branch_prob,
rest_of_handle_value_profile_transformations, rest_of_handle_cfg,
rest_of_handle_addressof, rest_of_handle_sibling_calls,
rest_of_handle_jump_bypass, rest_of_handle_inlining,
rest_of_handle_null_pointer, rest_of_handle_combine,
rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2,
rest_of_handle_gcse, rest_of_handle_loop_optimize,
rest_of_handle_loop2, rest_of_compilation): Move to passes.c.
(decode_d_option): Use enable_rtl_dump_file.
(compile_file, finalize, do_compile): Move profile+combine+graph
cleanup to finish_optimization_passes.
* toplev.h (init_optimization_passes, finish_optimization_passes,
enable_rtl_dump_file): Declare.
From-SVN: r78561
2004-02-27 09:54:31 +01:00
|
|
|
|
/* In ra.c. */
|
|
|
|
|
extern void reg_alloc (void);
|
|
|
|
|
|
ddg.h, [...]: New files.
* ddg.h, ddg.c, modulo-sched.c: New files.
* cfglayout.c (duplicate_insn_chain): Remove "static" and push
internals to "dupicate_insn".
(duplicate_insn): New function.
* cfglayout.h (duplicate_insn_chain, duplicate_insn): New
declarations.
* common.opt (fmodulo-sched): New flag.
* df.c (df_bb_regno_last_use_find, df_bb_regno_first_def_find):
Remove static and forward declaration.
(df_find_def, df_reg_used, df_bb_regno_last_def_find): New
functions.
* df.h (df_bb_regno_last_use_find, df_bb_regno_first_def_find,
df_bb_regno_last_def_find, df_find_def, df_reg_used): New
declarations.
* flags.h (flag_modulo_sched): New flag.
* opts.c (common_handle_option): Handle modulo-sched flag.
* params.def (max-sms-loop-number, sms-max-ii-factor,
sms-dfa-history, sms-loop-average-count-threshold): New
parameters.
* params.h (MAX_SMS_LOOP_NUMBER, SMS_MAX_II_FACTOR,
SMS_DFA_HISTORY, SMS_LOOP_AVERAGE_COUNT_THRESHOLD): New
parameters.
* passes.c ("sms", "sms-vcg"): New dumps.
(rest_of_handle_sched): Call sms_schedule.
* rtl.h (sms_schedule): New declaration.
* timevar.def (TV_SMS): New.
* toplev.c (flag_modulo_sched): Initialize.
(f_options): Handle -fmodulo-sched option.
* docs/invoke.texi: Document -fmodulo-sched & -dm options.
* docs/passes.texi: Document new SMS pass.f toplev.c doc/invoke.texi doc/passes.texi
Co-Authored-By: Mostafa Hagog <mustafa@il.ibm.com>
From-SVN: r82235
2004-05-25 14:55:06 +02:00
|
|
|
|
/* In modulo-sched.c. */
|
|
|
|
|
extern void sms_schedule (FILE *);
|
Makefile.in (OBJS): Add rtlhooks.o.
2004-05-25 Paolo Bonzini <bonzini@gnu.org>
* Makefile.in (OBJS): Add rtlhooks.o.
(rtlanal.o): Depend on function.h.
(cse.o): Depend on rtlhooks-def.h.
(combine.o): Depend on rtlhooks-def.h.
(rtlhooks.o): New rule.
* combine.c: Include rtlhooks-def.h.
(nonzero_bits, cached_nonzero_bits, nonzero_bits1,
num_sign_bit_copies, cached_num_sign_bit_copies,
num_sign_bit_copies1): Move most of the code to rtlanal.c.
(reg_nonzero_bits_for_combine,
reg_num_sign_bit_copies_for_combine): New functions holding
the remnants of the above.
(combine_rtl_hooks): New.
(combine_instructions): Set rtl_hooks instead of gen_lowpart.
* cse.c: Include rtlhooks-def.h.
(cse_rtl_hooks): New.
(cse_main): Set rtl_hooks instead of gen_lowpart.
* emit-rtl.c (gen_lowpart): Remove.
(gen_lowpart_general): Move to rtlhooks.c.
* rtl.h (nonzero_bits, num_sign_bit_copies,
struct rtl_hooks, rtl_hooks, general_rtl_hooks): New.
(gen_lowpart_general): Remove.
(gen_lowpart): Temporarily redefine as a macro.
* rtlanal.c: Include function.h.
(nonzero_bits, cached_nonzero_bits, nonzero_bits1,
num_sign_bit_copies, cached_num_sign_bit_copies,
num_sign_bit_copies1): New, from combine.c.
* rtlhooks.c: New file.
From-SVN: r82234
2004-05-25 14:04:17 +02:00
|
|
|
|
|
|
|
|
|
struct rtl_hooks
|
|
|
|
|
{
|
|
|
|
|
rtx (*gen_lowpart) (enum machine_mode, rtx);
|
2005-03-21 15:30:51 +01:00
|
|
|
|
rtx (*gen_lowpart_no_emit) (enum machine_mode, rtx);
|
Makefile.in (OBJS): Add rtlhooks.o.
2004-05-25 Paolo Bonzini <bonzini@gnu.org>
* Makefile.in (OBJS): Add rtlhooks.o.
(rtlanal.o): Depend on function.h.
(cse.o): Depend on rtlhooks-def.h.
(combine.o): Depend on rtlhooks-def.h.
(rtlhooks.o): New rule.
* combine.c: Include rtlhooks-def.h.
(nonzero_bits, cached_nonzero_bits, nonzero_bits1,
num_sign_bit_copies, cached_num_sign_bit_copies,
num_sign_bit_copies1): Move most of the code to rtlanal.c.
(reg_nonzero_bits_for_combine,
reg_num_sign_bit_copies_for_combine): New functions holding
the remnants of the above.
(combine_rtl_hooks): New.
(combine_instructions): Set rtl_hooks instead of gen_lowpart.
* cse.c: Include rtlhooks-def.h.
(cse_rtl_hooks): New.
(cse_main): Set rtl_hooks instead of gen_lowpart.
* emit-rtl.c (gen_lowpart): Remove.
(gen_lowpart_general): Move to rtlhooks.c.
* rtl.h (nonzero_bits, num_sign_bit_copies,
struct rtl_hooks, rtl_hooks, general_rtl_hooks): New.
(gen_lowpart_general): Remove.
(gen_lowpart): Temporarily redefine as a macro.
* rtlanal.c: Include function.h.
(nonzero_bits, cached_nonzero_bits, nonzero_bits1,
num_sign_bit_copies, cached_num_sign_bit_copies,
num_sign_bit_copies1): New, from combine.c.
* rtlhooks.c: New file.
From-SVN: r82234
2004-05-25 14:04:17 +02:00
|
|
|
|
rtx (*reg_nonzero_bits) (rtx, enum machine_mode, rtx, enum machine_mode,
|
|
|
|
|
unsigned HOST_WIDE_INT, unsigned HOST_WIDE_INT *);
|
|
|
|
|
rtx (*reg_num_sign_bit_copies) (rtx, enum machine_mode, rtx, enum machine_mode,
|
|
|
|
|
unsigned int, unsigned int *);
|
|
|
|
|
|
|
|
|
|
/* Whenever you add entries here, make sure you adjust hosthooks-def.h. */
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/* Each pass can provide its own. */
|
|
|
|
|
extern struct rtl_hooks rtl_hooks;
|
|
|
|
|
|
|
|
|
|
/* ... but then it has to restore these. */
|
|
|
|
|
extern const struct rtl_hooks general_rtl_hooks;
|
|
|
|
|
|
|
|
|
|
/* Keep this for the nonce. */
|
|
|
|
|
#define gen_lowpart rtl_hooks.gen_lowpart
|
|
|
|
|
|
2001-05-26 03:31:47 +02:00
|
|
|
|
#endif /* ! GCC_RTL_H */
|