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,
|
2004-01-12 19:37:40 +01:00
|
|
|
|
1999, 2000, 2001, 2002, 2003, 2004 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
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
1999-09-04 15:09:56 +02:00
|
|
|
|
struct function;
|
|
|
|
|
|
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)
|
|
|
|
|
#define RTX_EXPR_FIRST (RTX_COMPARE)
|
|
|
|
|
#define RTX_EXPR_LAST (RTX_UNARY)
|
|
|
|
|
|
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
|
|
|
|
{
|
|
|
|
|
int rtint;
|
* Rework fields used to describe positions of bitfields and
modify sizes to be unsigned and use HOST_WIDE_INT.
* alias.c (reg_known_value_size): Now unsigned.
* c-typeck.c (build_unary_op, case ADDR_EXPR): Use byte_position.
(really_start_incremental_init): Use bitsize_zero_node.
(push_init_level, pop_init_level, output_init_element): Likewise.
Use bitsize_unit_node and bitsize_one_node.
(output_pending_init_elements, process_init_element): Likewise.
* combine.c (combine_max_regno, reg_sign_bit_copies): Now unsigned.
(make_extraction): Position and length HOST_WIDE_INT and unsigned
HOST_WIDE_INT, respectively.
(get_pos_from_mask): Passed in value is unsigned HOST_WIDE_INT.
(num_sign_bit_copies): Returns unsigned.
BITWIDTH now unsigned; rework arithmetic.
Remove recursive call from arg to MAX.
(combine_instructions, init_reg_last_arrays): NREGS now unsigned.
(setup_incoming_promotions, can_combine_p, try_combine, simplify_set):
REGNO now unsigned.
(set_nonzero_bit_and_sign_copies): NUM now unsigned.
(find_split_point, expand_compound_operation, make_extraction): LEN
now unsigned HOST_WIDE_INT, POS now HOST_WIDE_INT.
(make_field_assignment): Likewise.
(combine_simplify_rtx): Add cast.
(expand_compound_operation): MODEWIDTH now unsigned; rework arithmetic.
(force_to_mode): WIDTH now unsigned; add cast.
(if_then_else_cond): SIZE now unsigned.
(nonzero_bits): MODE_WIDTH, RESULT_WIDTH, and WIDTH now unsigned.
(extended_count): Now returns unsigned.
(simplify_shift_const): COUNT unsigned; arg is now INPUT_COUNT.
Add SIGNED_COUNT variable; MODE_WORDS and FIRST_COUNT now unsigned.
(simplify_comparison): MODE_WIDTH now unsigned.
(update_table_tick): REGNO and ENDREGNO now unsigned; new var R.
(mark_used_regs_combine): Likewise; rework arithmetic.
(record_value_for_reg): REGNO, ENDREGNO, and I now unsigned.
(record_dead_and_set_regs, reg_dead_at_p, distribute_notes): Likewise.
(record_promoted_value): REGNO now unsigned.
(get_last_value_validate): REGNO, ENDREGNO, and J now unsigned.
(get_last_value): REGNO now unsigned.
(use_crosses_set_p): REGNO and ENDREGNO now unsigned.
(reg_dead_regno, reg_dead_endregno): Now unsigned.
(remove_death): Arg REGNO now unsigned.
(move_deaths): REGNO, DEADREGNO, DEADEND, OUREND, and I now unsigned.
(reg_bitfield_target_p): REGNO, REGNO, ENDREGNO, and ENDTREGNO
now unsigned.
* convert.c (convert_to_integer): INPREC and OUTPREC now unsigned.
* cse.c (struct qty_table_elem): FIRST_REG and LAST_REG now unsigned.
(struct cse_reg_info): REGNO now unsigned.
(cached_regno): Now unsigned.
(REGNO_QTY_VALID_P): Add cast.
(make_new_qty, make_regs_eqv, delete_reg_eqiv): Regno args unsigned.
(remove_invalid_regs): Likewise.
(remove_invalid_subreg_refs): Likewise; arg WORD also unsigned
as are variables END and I.
(get_cse_reg_info, insert): Likewise.
(mention_regs, invalidate_for_call): REGNO, ENDREGNO, and I unsigned.
(canon_hash): Likewise.
(insert_regs, lookup_for_remove): REGNO now unsigned.
(invalidate): REGNO, ENDREGNO, TREGNO, and TENDREGNO now unsigned.
New variable RN.
* dbxout.c (dbxout_parms, dbxout_reg_parms): Don't check for REGNO < 0.
* dwarf2out.c (dwarf2ou_frame_debug_expr): Remove cast.
* emit-rtl.c (subreg_realpart_p): Add cast.
(operand_subword): Arg I is now unsigned as is var PARTWORDS.
(operand_subword_force): Arg I is now unsigned.
* except.c (eh_regs): Variable I is now unsigned.
* explow.c (hard_function_value): BYTES is unsigned HOST_WIDE_INT.
* expmed.c (store_fixed_bit_field): Position is HOST_WIDE_INT;
length is unsigned HOST_WIDE_INT; likewise for internal variables.
(store_split_bit_field, extract_fixed_bit_field): Likewise.
(extract_split_bit_field, store_bit_field, extract_bit_field):
Likewise.
* expr.c (store_constructor_fields, store_constructor, store_field):
Positions are HOST_WIDE_INT and lengths are unsigned HOST_WIDE_INT.
(expand_assignment, expand_expr, expand_expr_unaligned): Likewise.
(do_jump): Likewise.
(move_by_pieces, move_by_pieces_ninsns, clear_by_pieces):
MAX_SIZE is now unsigned.
(emit_group_load): BYTEPOS is HOST_WIDE_INT; BYTELEN is unsigned.
(emit_group_store): Likewise.
(emit_move_insn): I now unsigned.
(store_constructor): Use host_integerp, tree_low_cst, and
bitsize_unit_node.
(get_inner_reference): Return bitpos and bitsize as HOST_WIDE_INT.
Rework all calculations to use trees and new fields.
* expr.h (promoted_input_arg): Regno now unsigned.
(store_bit_field, extract_bit_field): Adjust types of pos and size.
(mark_seen_cases): Arg is HOST_WIDE_INT.
* flow.c (verify_wide_reg_1): REGNO now unsigned.
* fold-const.c (decode_field_reference): Size and pos HOST_WIDE_INT;
precisions and alignments are unsigned.
(optimize_bit_field_compare, fold_truthop): Likewise.
(int_const_binop): Adjust threshold for size_int_type_wide call.
(fold_convert): Likewise.
(size_int_type_wide): Make table larger and fix thinko that only
had half of table used.
(all_ones_mask_p, fold): Precisions are unsigned.
* function.c (put_reg_info_stack): REGNO is unsigned.
(instantiate_decl): Size is HOST_WIDE_INT.
(instantiate_virtual_regs): I is unsigned.
(assign_parms): REGNO, REGNOI, and REGNOR are unsigned.
(promoted_input_arg): REGNO is unsigned.
* function.h (struct function): x_max_parm_reg is now unsigned.
* gcse.c (max_gcse_regno): Now unsigned.
(struct null_pointer_info): min_reg and max_reg now unsigned.
(lookup_set, next_set): REGNO arg now unsigned.
(compute_hash_table): REGNO and I now unsigned.
(handle_avail_expr): regnum_for_replacing now unsigned.
(cprop_insn): REGNO now unsigned.
(delete_null_pointer_checks_1): BLOCK_REG now pointer to unsigned.
* ggc-common.c (ggc_mark_tree_children, case FIELD_DECL): New case.
* global.c (set_preference): SRC_REGNO, DEST_REGNO, and I now unsigned.
* hard-reg-set.h (reg_class_size): Now unsigned.
* integrate.c (mark_stores): LAST_REG and I now unsigned; new UREGNO.
* jump.c (mark_modified_reg): I now unsigned; add cast.
(rtx_equal_for_thread_p): Add cast.
* loop.c (max_reg_before_loop): Now unsigned.
(struct_movable): REGNO now unsigned.
(try_copy_prop): REGNO arg unsigned.
(regs_match_p): XN and YN now unsigned.
(consec_sets_invariant_p, maybe_eliminate_biv): REGNO now unsigned.
(strength_reduce): Likewise; NREGS also unsigned.
(first_increment_giv, last_increment_giv unsigned): Now unsigned.
* loop.h (struct iv_class): REGNO now unsigned.
(max_reg_before_loop, first_increment_giv, last_increment_giv):
Now unsigned.
* machmode.h (mode_size, mode_unit_size): Now unsigned.
(mode_for_size, smallest_mode_for_size): Pass size as unsigned.
* optabs.c (expand_binop): I and NWORDS now unsigned.
(expand_unop): I now unsigned.
* print-tree.c (print_node): Don't print DECL_FIELD_BITPOS, but do
print DECL_FIELD_OFFSET and DECL_FIELD_BIT_OFFSET.
* real.c (significand_size): Now returns unsigned.
* real.h (significand_size): Likewise.
* regclass.c (reg_class_size): Now unsigned.
(choose_hard_reg_mode): Both operands now unsigned.
(record_reg_classes): REGNO and NR now unsigned.
(reg_scan): NREGS now unsigned.
(reg_scan_update): old_max_regno now unsigned.
(reg_scan_mark_refs): Arg MIN_REGNO and var REGNO now unsigned.
* reload.c (find_valid_class): BEST_SIZE now unsigned.
(find_dummy_reload): REGNO, NWORDS, and I now unsigned.
(hard_reg_set_here_p): Args BEG_REGNO and END_REGNO now unsigned.
Likewise for variable R.
(refers_to_regno_for_reload_p): Args REGNO and END_REGNO now unsigned,
as are variables INNER_REGNO and INNER_ENDREGNO; add new variable R.
(find_equiv_reg): Add casts.
(regno_clobbered_p): Arg REGNO now unsigned.
* reload.h (struct reload): NREGS now unsigned.
(refers_to_regno_for_reload_p): Regno args are unsigned.
(regno_clobbered_p): Likewise.
* reload1.c (reg_max_ref_width, spill_stack_slot_width): Now unsigned.
(compute_use_by_pseudos): REGNO now unsigned.
(find_reg): I and J now unsigned, new variable K, and change loop
variables accordingly; THIS_NREGS now unsigned.
(alter_reg): INHERENT_SIZE and TOTAL_SIZE now unsigned.
(spill_hard_reg): REGNO arg now unsigned; add casts.
(forget_old_reloads_1): REGNO, NR, and I now unsigned.
(mark_reload_reg_in_use): Arg REGNO and vars NREGS and I now unsigned.
(clear_reload_reg_in_use): Arg REGNO and vars NREGS, START_REGNO,
END_REGNO, CONFLICT_START, and CONFLICT_END now unsigned.
(reload_reg_free_p, reload_reg_reaches_end_p): Arg REGNO now unsigned.
(choose_reload_regs): MAX_GROUP_SIZE now unsigned.
(emit_reload_insns): REGNO now unsigned.
(reload_cse_move2add): Add cast.
(move2add_note_store): REGNO and I now unsigned; new variable ENDREGNO
and rework loop.
* resource.c (mark_referenced_resources, mark_set_resources): New
variable R; REGNO and LAST_REGNO now unsigned.
(mark_target_live_regs): J and REGNO now unsigned.
* rtl.c (mode_size, mode_unit_size): Now unsigned.
* rtl.h (union rtunion_def): New field rtuint.
(XCUINT): New macro.
(ADDRESSOF_REGNO, REGNO, SUBREG_WORD): New XCUINT.
(operand_subword, operand_subword_force): Word number is unsigned.
(choose_hard_reg_mode): Operands are unsigned.
(refers_to-regno_p, dead_or_set_regno_p): Regno arg is unsigned.
(find_regno_note, find_regno_fusage, replace_regs): Likewise.
(regno_use_in, combine_instructions, remove_death): Likewise.
(reg_scan, reg_scan_update): Likewise.
(extended_count): Return is unsigned.
* rtlanal.c (refers_to_regno_p): Args REGNO and ENDREGNO and vars I,
INNER_REGNO, and INNER_ENDREGNO now unsigned; new variable X_REGNO.
(reg_overlap_mentioned_p): REGNO and ENDREGNO now unsigned.
(reg_set_last_first_regno, reg_set_last_last_regno): Now unsigned.
(reg_reg_last_1): FIRS and LAST now unsigned.
(dead_or_set_p): REGNO, LAST_REGNO, and I now unsigned.
(dead_or_set_regno_p): Arg TEST_REGNO and vars REGNO and ENDREGNO
now unsigned.
(find_regno_note, regno_use_in): Arg REGNO now unsigned.
(find_regno_fusage): Likewise; also var REGNOTE now unsigned.
(find_reg_fusage): Variables REGNO, END_REGNO, and I now unsigned.
(replace_regs): Arg NREGS now unsigned.
* sdbout.c (sdbout_parms, sdbout_reg_parms): Don't check REGNO < 0.
* simplify-rtx.c (simplify_unary_operation): WIDTH now unsigned.
(simplify_binary_operation): Likewise.
(cselib_invalidate_regno): Arg REGNO and variables ENDREGNO, I, and
THIS_LAST now unsigned.
(cselib_record_set): Add cast.
* ssa.c (ssa_max_reg_num): Now unsigned.
(rename_block): REGNO now unsigned.
* stmt.c (expand_return): Bit positions unsigned HOST_WIDE_INT;
sizes now unsigned.
(all_cases_count): Just return -1 not -2.
COUNT, MINVAL, and LASTVAL now HOST_WIDE_INT.
Rework tests to use trees whenever possible.
Use host_integerp and tree_low_cst.
(mark_seen_cases): COUNT arg now HOST_WIDE_INT;
Likewise variable NEXT_NODE_OFFSET; XLO now unsigned.
(check_for_full_enumeration_handing): BYTES_NEEDED, I to HOST_WIDE_INT.
* stor-layout.c (mode_for_size): SIZE arg now unsigned.
(smallest_mode_for_size): Likewise.
(layout_decl): Simplify handing of a specified DECL_SIZE_UNIT.
KNOWN_ALIGN is now an alignment, so simplify code.
Don't turn off DECL_BIT_FIELD if field is BLKmode, but not type.
(start_record_layout): Renamed from new_record_layout_info.
Update to new fields.
(debug_rli, normalize_rli, rli_size_unit_so_far, rli_size_so_far):
New functions.
(place_union_field): Renamed from layout_union_field.
Update to use new fields in rli.
(place_field): Renamed from layout_field.
Major rewrite to use new fields in rli; pass alignment to layout_decl.
(finalize_record_size): Rework to use new fields in rli and handle
union.
(compute_record_mode): Rework to simplify and to use new DECL fields.
(finalize_type_size): Make rounding more consistent.
(finish_union_layout): Deleted.
(layout_type, case VOID_TYPE): Don't set TYPE_SIZE_UNIT either.
(layout_type, case RECORD_TYPE): Call new function names.
(initialize_sizetypes): Set TYPE_IS_SIZETYPE.
(set_sizetype): Set TYPE_IS_SIZETYPE earlier.
(get_best_mode): UNIT is now unsigned; remove casts.
* tree.c (bit_position): Compute from new fields.
(byte_position, int_byte_position): New functions.
(print_type_hash_statistics): Cast to remove warning.
(build_range_type): Use host_integerp and tree_low_cst to try to hash.
(build_index_type): Likewise; make subtype of sizetype.
(build_index_2_type): Pass sizetype to build_range_type.
(build_common_tree_nodes): Use size_int and bitsize_int to
initialize nodes; add bitsize_{zero,one,unit}_node.
* tree.h (DECL_FIELD_CONTEXT): Use FIELD_DECL_CHECK.
(DECL_BIT_FIELD_TYPE, DECL_QUALIFIER, DECL_FCONTEXT): Likewise.
(DECL_PACKED, DECL_BIT_FIELD): Likewise.
(DECL_FIELD_BITPOS): Deleted.
(DECL_FIELD_OFFSET, DECL_FIELD_BIT_OFFSET): New fields.
(DECL_RESULT, DECL_SAVED_INSNS): Use FUNCTION_DECL_CHECK.
(DECL_FRAME_SIZE, DECL_FUNCTION_CODE, DECL_NO_STATIC_CHAIN): Likewise.
(DECL_INLINE, DECL_BUILT_IN_NONANSI, DECL_IS_MALLOC): Likewise.
(DECL_BUILT_IN_CLASS, DECL_STATIC_CONSTRUCTOR): Likewise.
(DECL_STATIC_DESTRUCTOR, DECL_NO_CHECK_MEMORY_USAGE): Likewise.
(DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT, DECL_NO_LIMIT_STACK) Likewise.
(DECL_ORIGINAL_TYPE, TYPE_DECL_SUPPRESS_DEBUG): Use TYPE_DECL_CHECK.
(DECL_ARG_TYPE_AS_WRITEN, DECL_ARG_TYPE): Use PARM_DECL_CHECK.
(DECL_INCOMING_RTL, DECL_TRANSPARENT_UNION): Likewise.
(DECL_ALIGN): Adjust to new field in union.
(DECL_OFFSET_ALIGN): New field.
(DECL_ERROR_ISSUED, DECL_TOO_LATE): Use LABEL_DECL_CHECK.
(DECL_IN_TEXT_SECTION): Use VAR_DECL_CHECK.
(union tree_decl): Add struct for both aligns.
(enum tree_index): Add TI_BITSIZE_{ZERO,ONE,UNIT}.
(bitsize_zero_node, bitsize_one_node, bitsize_unit_node): Added.
(struct record_layout_info): Rework fields to have offset
alignment and byte and bit position.
(start_record_layout, place_field): Renamed from old names.
(rli_size_so_far, rli_size_unit_so_far, normalize_rli): New decls.
(byte_position, int_byte_position): Likewise.
(get_inner_reference): Change types of position and length.
* unroll.c (unroll_loop): New variable R; use for some loops.
MAX_LOCAL_REGNUM and MAXREGNUM now unsigned.
(calculate_giv_inc): Arg REGNO now unsigned.
(copy_loop_body): REGNO and SRC_REGNO now unsigned.
* varasm.c (assemble_variable): Clean up handling of size using
host_integerp and tree_low_cst.
(decode_addr_const): Use byte, not bit, position.
(output_constructor): bitpos and offsets are HOST_WIDE_INT;
use tree_low_cst and int_bit_position.
* objc/objc-act.c (build_ivar_list_initializer): Use byte_position.
* ch/actions.c (check_missing_cases): BYTES_NEEDED is HOST_WIDE_INT.
* ch/typeck.c (expand_constant_to_buffer): Use int_byte_position.
(extract_constant_from_buffer): Likewise.
* cp/class.c (build_vbase_pointer_fields): layout_field now
place_field.
(get_vfield_offset): Use byte_position.
(set_rtti_entry): Set OFFSET to ssizetype zero.
(get_binfo_offset_as_int): Deleted.
(dfs_record_base_offsets): Use tree_low_cst.
(dfs_search_base_offsets): Likewise.
(layout_nonempty_base_or_field): Reflect changes in RLI format
and call byte_position.
(layout_empty_base): Convert offset to ssizetype.
(build_base_field): use rli_size_unit_so_far.
(dfs_propagate_binfo_offsets): Do computation in proper type.
(layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
(layout_class_type): Reflect changes in RLI names and fields.
(finish_struct_1): Set DECL_FIELD_OFFSET.
* cp/dump.c (dequeue_and_dump): Call bit_position.
* cp/expr.c (cplus_expand_constant): Use byte_position.
* cp/rtti.c (expand_class_desc): Use bitsize_one_node.
* cp/typeck.c (build_component_addr): Use byte_position and don't
special case for zero offset.
* f/com.c (ffecom_tree_canonize_ptr_): Use bitsize_zero_node.
(ffecom_tree_canonize_ref_): Likewise.
* java/class.c (make_field_value): Use byte_position.
* java/expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
(java_array_data_offset): Likewise.
* java/java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
bzero call.
From-SVN: r32742
2000-03-25 19:34:13 +01:00
|
|
|
|
unsigned int rtuint;
|
rtl.h (rtunion_def): Constify member `rtstr'.
* rtl.h (rtunion_def): Constify member `rtstr'.
(emit_line_note_after, emit_line_note, emit_line_note_force,
emit_note, decode_asm_operands): Constify.
* cse.c (canon_hash): Likewise.
* dbxout.c (dbxout_block): Likewise.
* diagnostic.c (file_and_line_for_asm, v_error_for_asm,
v_warning_for_asm): Likewise.
* dwarfout.c (function_start_label): Likewise.
* emit-rtl.c (emit_line_note_after, emit_line_note, emit_note,
emit_line_note_force): Likewise.
* final.c (last_filename, asm_insn_count, final_scan_insn,
output_source_line): Likewise.
* function.h (struct emit_status): Likewise.
* gcse.c (hash_expr_1): Likewise.
* genattr.c (gen_attr, main): Likewise.
* genattrtab.c (struct function_unit, current_alternative_string,
write_attr_valueq, n_comma_elts, next_comma_elt, attr_eq,
attr_numeral, check_attr_test, check_attr_value,
convert_set_attr_alternative, convert_set_attr,
compute_alternative_mask, simplify_by_exploding, gen_attr,
gen_unit): Likewise.
* genflags.c (gen_insn): Likewise.
* gengenrtl.c (type_from_format): Likewise.
* genopinit.c (gen_insn): Likewise.
* genoutput.c (n_occurrences, process_template, process_template):
Likewise.
* ggc-page.c (ggc_set_mark, ggc_mark_if_gcable, ggc_get_size):
Likewise.
* ggc-simple.c (ggc_set_mark, ggc_mark_if_gcable, ggc_get_size):
Likewise.
* ggc.h (ggc_mark_string, ggc_mark, ggc_mark_if_gcable,
ggc_set_mark, ggc_get_size): Likewise.
* objc/objc-act.c (build_module_descriptor, finish_objc): Likewise.
* optabs.c (init_one_libfunc): Likewise.
* output.h (assemble_start_function): Likewise.
* recog.c (decode_asm_operands): Likewise.
* toplev.c (rest_of_compilation): Likewise.
* tree.h (emit_line_note_after, emit_line_note,
emit_line_note_force): Likewise.
* varasm.c (asm_output_bss, asm_output_aligned_bss,
asm_emit_uninitialised, assemble_start_function,
assemble_variable, const_hash, compare_constant_1,
find_pool_constant, mark_constant_pool, assemble_alias): Likewise.
* xcoffout.h (DBX_FINISH_SYMBOL): Likewise.
* alpha/alpha.md (call_vms, call_value_vms): Likewise.
* arm/aof.h (ASM_OUTPUT_ASCII): Likewise.
* arm/aout.h (ASM_OUTPUT_ASCII): Likewise.
* arm/arm-protos.h (output_ascii_pseudo_op, arm_dllexport_name_p,
arm_dllimport_name_p): Likewise.
* arm/arm.c (arm_encode_call_attribute, output_ascii_pseudo_op):
Likewise.
* arm/arm.h (ASM_OUTPUT_MI_THUNK): Likewise.
* arm/elf.h (ASM_FINISH_DECLARE_OBJECT): Likewise.
* arm/pe.c (arm_dllexport_name_p, arm_dllimport_name_p,
arm_mark_dllexport, arm_mark_dllimport,
arm_pe_encode_section_info): Likewise.
* arm/telf.h (ASM_OUTPUT_DEF_FROM_DECLS,
ASM_FINISH_DECLARE_OBJECT): Likewise.
* arm/thumb.c (thumb_function_prologue): Likewise.
* arm/thumb.h (ASM_OUTPUT_ASCII): Likewise.
* avr/avr.h (ASM_FINISH_DECLARE_OBJECT): Likewise.
* clipper/clix.h (ASM_OUTPUT_ASCII): Likewise.
* fx80/fx80.h (ASM_OUTPUT_ASCII): Likewise.
* i386/cygwin.h (ASM_OUTPUT_SECTION_NAME): Likewise.
* i386/freebsd.h (ASM_FINISH_DECLARE_OBJECT): Likewise.
* i386/i386-interix.h (ASM_OUTPUT_LIMITED_STRING,
ASM_OUTPUT_ASCII, ASM_OUTPUT_SECTION_NAME): Likewise.
* i386/i386-protos.h (asm_output_function_prefix): Likewise.
* i386/i386.c (asm_output_function_prefix): Likewise.
* i386/i386elf.h (ASM_OUTPUT_ASCII): Likewise.
* i386/osfrose.h (ASM_FINISH_DECLARE_OBJECT): Likewise.
* i386/ptx4-i.h (ASM_OUTPUT_ASCII): Likewise.
* i386/sco5.h (ASM_FINISH_DECLARE_OBJECT,
ASM_OUTPUT_LIMITED_STRING, ASM_OUTPUT_ASCII,
ASM_OUTPUT_SECTION_NAME): Likewise.
* i386/sysv4.h (ASM_OUTPUT_ASCII): Likewise.
* i860/paragon.h (ASM_OUTPUT_ASCII): Likewise.
* i860/sysv3.h (ASM_OUTPUT_ASCII): Likewise.
* m32r/m32r.c (m32r_encode_section_info): Likewise.
* mcore-elf.h (ASM_FINISH_DECLARE_OBJECT): Likewise.
* mcore/mcore.c (mcore_encode_section_info): Likewise.
* mips/elf.h (ASM_FINISH_DECLARE_OBJECT): Likewise.
* mips/elf64.h (ASM_FINISH_DECLARE_OBJECT): Likewise.
* mips/iris6.h (ASM_FINISH_DECLARE_OBJECT): Likewise.
* mips/mips.h (ASM_OUTPUT_IDENT): Likewise.
* mips/mips.md (movdi, movsi): Likewise.
* mips/netbsd.h (ASM_FINISH_DECLARE_OBJECT): Likewise.
* netbsd.h (ASM_FINISH_DECLARE_OBJECT): Likewise.
* openbsd.h (ASM_FINISH_DECLARE_OBJECT): Likewise.
* ptx4.h (ASM_FINISH_DECLARE_OBJECT, ASM_OUTPUT_LIMITED_STRING,
ASM_OUTPUT_ASCII): Likewise.
* rs6000/rs6000.c (rs6000_allocate_stack_space, output_epilog,
output_mi_thunk, output_toc): Likewise.
* rs6000/rs6000.md (movsi): Likewise.
* rs6000/sysv4.h (ASM_OUTPUT_INT, ASM_OUTPUT_SECTION_NAME): Likewise.
* tahoe/harris.h (ASM_OUTPUT_ASCII): Likewise.
* v850/v850.c (print_operand, print_operand_address,
v850_encode_data_area): Likewise.
ch:
* grant.c (globalize_decl): Constify a char*.
cp:
* decl2.c (finish_objects): Constify a char*.
* method.c (emit_thunk): Likewise.
From-SVN: r32388
2000-03-07 21:39:10 +01:00
|
|
|
|
const char *rtstr;
|
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
|
|
|
|
rtx rtx;
|
|
|
|
|
rtvec rtvec;
|
1991-12-06 22:00:31 +01:00
|
|
|
|
enum machine_mode rttype;
|
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;
|
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
|
|
|
|
struct bitmap_head_def *rtbit;
|
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
|
|
|
|
tree rttree;
|
1999-02-26 00:45:42 +01:00
|
|
|
|
struct basic_block_def *bb;
|
2001-10-01 13:00:47 +02:00
|
|
|
|
mem_attrs *rtmem;
|
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
|
|
|
|
reg_attrs *rtreg;
|
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.
|
|
|
|
|
1 in a LABEL_REF if this is a reference to a label outside the
|
|
|
|
|
current loop.
|
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;
|
2000-08-02 06:21:27 +02:00
|
|
|
|
cleared before used.
|
2002-12-26 19:15:56 +01:00
|
|
|
|
1 in an INSN, JUMP_INSN or CALL_INSN or related rtx if this insn is
|
|
|
|
|
dead code. Valid only during dead-code elimination phase; cleared
|
|
|
|
|
before use. */
|
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;
|
|
|
|
|
/* Nonzero if this rtx came from procedure integration.
|
2002-11-27 03:29:12 +01:00
|
|
|
|
1 in a REG or PARALLEL means this rtx refers to the return value
|
2001-05-13 23:16:58 +02:00
|
|
|
|
of the current function.
|
|
|
|
|
1 in a SYMBOL_REF if the symbol is weak. */
|
1991-12-06 22:00:31 +01:00
|
|
|
|
unsigned integrated : 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.
|
1999-01-19 11:32:33 +01:00
|
|
|
|
1 in a MEM if the MEM refers to a scalar, rather than a member of
|
2000-11-14 18:37:19 +01:00
|
|
|
|
an aggregate.
|
2000-11-30 07:31:19 +01:00
|
|
|
|
1 in a REG if the register 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;
|
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.
|
|
|
|
|
*/
|
|
|
|
|
#define RTX_PREV(X) ((GET_CODE (X) == INSN \
|
|
|
|
|
|| GET_CODE (X) == CALL_INSN \
|
|
|
|
|
|| GET_CODE (X) == JUMP_INSN \
|
|
|
|
|
|| GET_CODE (X) == NOTE \
|
|
|
|
|
|| GET_CODE (X) == BARRIER \
|
|
|
|
|
|| GET_CODE (X) == CODE_LABEL) \
|
|
|
|
|
&& 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
|
|
|
|
|
2000-08-02 06:21:27 +02:00
|
|
|
|
/* Predicate yielding nonzero iff X is an rtl for a register. */
|
1991-12-06 22:00:31 +01:00
|
|
|
|
#define REG_P(X) (GET_CODE (X) == REG)
|
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
|
|
/* 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 an insn. */
|
|
|
|
|
#define INSN_P(X) \
|
|
|
|
|
(GET_RTX_CLASS (GET_CODE(X)) == RTX_INSN)
|
|
|
|
|
|
|
|
|
|
/* 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) \
|
alias.c (rtx_equal_for_memref_p): Use predicates to test rtx classes and new rtx class codes...
2004-02-07 Paolo Bonzini <bonzini@gnu.org>
* alias.c (rtx_equal_for_memref_p): Use predicates
to test rtx classes and new rtx class codes, possibly
splitting conditionals that tested against '<' and 'o'.
* caller-save.c (save_call_clobbered_regs): Likewise.
* combine.c (contains_muldiv, find_split_point, subst,
combine_simplify_rtx, simplify_if_then_else,
simplify_set, simplify_logical, expand_compound_operation,
make_compound_operation, if_then_else_cond, known_cond,
apply_distributive_law, cached_nonzero_bits,
cached_num_sign_bit_copies, simplify_shift_const,
gen_binary, simplify_comparison, update_table_tick,
record_value_for_reg, get_lsat_value_validate): Likewise.
* cse.c (mention_regs, find_best_addr, find_comparison_args,
fold_rtx, cse_insn, invalidate_memory, cse_basic_block):
Likewise.
* emit-rtl.c (copy_insn_1): Likewise.
* expr.c (force_operand): Likewise.
* final.c (final_scan_insn, get_mem_expr_from_op): Likewise.
* flow.c (notice_stack_pointer_modification_1,
invalidate_mems_from_autoinc, ior_reg_cond, not_reg_cond,
and_reg_cond, elim_reg_cond): Likewise.
* function.c (update_epilogue_consts): Likewise.
* genattrtab.c (attr_rtx_1): Likewise.
* genopinit.c (gen_insn): Likewise.
* integrate.c (subst_constants): Likewise.
* jump.c (reversed_comparison_code_parts,
reversed_comparison_code, delete_related_insns,
rtx_renumbered_equal_p): Likewise.
* local-alloc.c (block_alloc): Likewise.
* loop.c (rtx_equal_for_prefetch_p, maybe_eliminate_biv,
canonicalize_condition): Likewise.
* loop-iv.c (simplify_using_conditions, iv_number_of_iterations):
Likewise.
* optabs.c (add_equal_node, expand_binop): Likewise.
* predict.c (estimate_probability): Likewise.
* ra-debug.c (ra_print_rtx_2op, ra_print_rtx): Likewise.
* recog.c (validate_replace_rtx_1, comparison_operator,
offsettable_address_p, constrain_operands): Likewise.
* reg-stack.c (swap_rtx_condition_1, subst_stack_regs_pat):
Likewise.
* regclass.c (scan_one_insn): Likewise.
* regmove.c (stable_and_no_regs_but_for_p): Likewise.
* regrename.c (kill_autoinc_value): Likewise.
* reload.c (find_reusable_reload, find_reloads,
reg_overlap_mentioned_for_reload_p): Likewise.
* reload1.c (gen_reload, delete_address_reloads_1): Likewise.
* rtl.c (copy_rtx): Likewise.
* rtl.h (CONSTANT_P, INSN_P): Likewise.
* rtlanal.c (commutative_operand_precedence): Likewise.
* sched-deps.c (conditions_mutex_p): Likewise.
* sched-rgn.c (is_cfg_nonregular): Likewise.
* simplify-rtx.c (simplify_gen_binary,
simplify_gen_relational, simplify_replace_rtx,
simplify_unary_operation, simplify_binary_operation,
simplify_ternary_operation, simplify_rtx): Likewise.
* unroll.c (reg_dead_after_loop): Likewise.
* config/alpha/alpha.c (alpha_swapped_comparison_operator,
print_operand): Likewise.
* config/arc/arc.c (proper_comparison_operator): Likewise.
* config/arm/arm.c (arm_arm_address_cost, arm_select_cc_mode):
Likewise.
* config/avr/avr.c (_reg_unused_after): Likewise.
* config/frv/frv.c (frv_ifcvt_modify_tests,
frv_ifcvt_modify_insn, frv_pack_insn): Likewise.
* config/i386/i386.c (ix86_comparison_operator,
ix86_carry_flag_operator, fcmov_comparison_operator,
arith_or_logical_operator, print_operand,
ix86_expand_binary_operator, ix86_binary_operator_ok):
Likewise.
* config/i386/i386.md: Likewise.
* config/ia64/ia64.c (not_postinc_memory_operand,
ia64_print_operand, update_set_flags, errata_emit_nops):
Likewise.
* config/ia64/ia64.h (PREFERRED_RELOAD_CLASS,
CONSTRAINT_OK_FOR_S): Likewise.
* config/ip2k/ip2k.c (mdr_resequence_xy_yx,
mdr_try_move_dp_reload, ip2k_check_can_adjust_stack_ref,
ip2k_xexp_not_uses_reg_for_mem, ip2k_xexp_not_uses_reg_p,
ip2k_composite_xexp_not_uses_reg_p, ip2k_unary_operator):
Likewise.
* config/iq2000/iq2000.c (cmp_op, symbolic_expression_p,
eqne_comparison_operator, signed_comparison_operator):
Likewise.
* config/mips/mips.c (cmp_op, symbolic_expression_p):
Likewise.
* config/mmix/mmix (mmix_foldable_comparison_operator,
mmix_comparison_operator): Likewise.
* config/pa/pa.c (hppa_legitimize_address): Likewise.
* config/rs6000/rs6000.c (stmw_operation,
branch_comparison_operator, trap_comparison_operator,
ccr_bit): Likewise.
* config/rs6000/rs6000.h (SELECT_CC_MODE): Likewise.
* config/s390/s390.c (s390_alc_comparison,
s390_slb_comparison):L Likewise.
* config/sh/sh.c (gen_block_redirect, reg_unused_after):
Likewise.
* config/sparc/sparc.c (eq_or_neq, normal_comp_operator,
noov_compare_op, noov_compare64_op, v9_regcmp_op,
emit_hard_tfmode_operation, reg_unused_after)
* doc/md.texi, doc/rtl.texi: Likewise.
* ra-debug.c: Add 2004 to list of copyright years.
* unroll.c: Likewise.
* combine.c (simplify_logical): Remove dummy test,
(apply_distributive_law): Fix typo in comment.
GET_CODE (x) == AND so x is a commutative binary op.
* jump.c (delete_related_insns): simplify loop
condition, move testing of RTX codes inside the loop.
(rtx_renumbered_equal_p): do not use RTX_CODE.
* rtl.c (rtx_class): Declare as enum rtx_class.
* rtl.def (EQ, NE, UNEQ, LTGT, UNORDERED, ORDERED):
Move to RTX_COMM_COMPARE class.
(HIGH, SYMBOL_REF, LABEL_REF, CONST, CONST_INT, CONST_DOUBLE):
Move to RTX_CONST_OBJ class.
* rtl.h (enum rtx_class): New declaration,
(RTX_OBJ_MASK, RTX_OBJ_RESULT, RTX_COMPARE_MASK,
RTX_COMPARE_RESULT, RTX_ARITHMETIC_MASK, RTX_ARITHMETIC_RESULT,
RTX_BINARY_MASK, RTX_BINARY_RESULT, RTX_COMMUTATIVE_MASK,
RTX_COMMUTATIVE_RESULT, RTX_NON_COMMUTATIVE_RESULT,
RTX_EXPR_FIRST, RTX_EXPR_LAST, UNARY_P, BINARY_P,
ARITHMETIC_P, COMMUTATIVE_ARITHMETIC_P, COMPARISON_P,
SWAPPABLE_OPERANDS_P, NON_COMMUTATIVE_P, COMMUTATIVE_P,
OBJECT_P): New macros.
* config/sparc/sparc.c (noov_compare_op): Remove register
from parameter.
From-SVN: r78824
2004-03-03 09:35:33 +01:00
|
|
|
|
(GET_RTX_CLASS (GET_CODE (X)) == RTX_CONST_OBJ \
|
2002-02-19 03:53:41 +01:00
|
|
|
|
|| GET_CODE (X) == CONST_VECTOR \
|
1999-01-21 03:21:28 +01:00
|
|
|
|
|| GET_CODE (X) == CONSTANT_P_RTX)
|
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
|
|
|
|
|
|
|
|
|
|
#define CLEAR_RTX_FLAGS(RTX) \
|
|
|
|
|
do { \
|
|
|
|
|
rtx const _rtx = (RTX); \
|
|
|
|
|
_rtx->call = 0; \
|
|
|
|
|
_rtx->frame_related = 0; \
|
|
|
|
|
_rtx->in_struct = 0; \
|
|
|
|
|
_rtx->integrated = 0; \
|
|
|
|
|
_rtx->jump = 0; \
|
|
|
|
|
_rtx->unchanging = 0; \
|
|
|
|
|
_rtx->used = 0; \
|
|
|
|
|
_rtx->volatil = 0; \
|
|
|
|
|
} while (0)
|
|
|
|
|
|
2002-01-03 06:11:05 +01:00
|
|
|
|
#define XINT(RTX, N) (RTL_CHECK2 (RTX, N, 'i', 'n').rtint)
|
|
|
|
|
#define XSTR(RTX, N) (RTL_CHECK2 (RTX, N, 's', 'S').rtstr)
|
|
|
|
|
#define XEXP(RTX, N) (RTL_CHECK2 (RTX, N, 'e', 'u').rtx)
|
|
|
|
|
#define XVEC(RTX, N) (RTL_CHECK2 (RTX, N, 'E', 'V').rtvec)
|
|
|
|
|
#define XMODE(RTX, N) (RTL_CHECK1 (RTX, N, 'M').rttype)
|
|
|
|
|
#define XBITMAP(RTX, N) (RTL_CHECK1 (RTX, N, 'b').rtbit)
|
|
|
|
|
#define XTREE(RTX, N) (RTL_CHECK1 (RTX, N, 't').rttree)
|
|
|
|
|
#define XBBDEF(RTX, N) (RTL_CHECK1 (RTX, N, 'B').bb)
|
|
|
|
|
#define XTMPL(RTX, N) (RTL_CHECK1 (RTX, N, 'T').rtstr)
|
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. */
|
|
|
|
|
|
2002-01-03 06:11:05 +01:00
|
|
|
|
#define X0INT(RTX, N) (RTL_CHECK1 (RTX, N, '0').rtint)
|
|
|
|
|
#define X0UINT(RTX, N) (RTL_CHECK1 (RTX, N, '0').rtuint)
|
|
|
|
|
#define X0STR(RTX, N) (RTL_CHECK1 (RTX, N, '0').rtstr)
|
|
|
|
|
#define X0EXP(RTX, N) (RTL_CHECK1 (RTX, N, '0').rtx)
|
|
|
|
|
#define X0VEC(RTX, N) (RTL_CHECK1 (RTX, N, '0').rtvec)
|
|
|
|
|
#define X0MODE(RTX, N) (RTL_CHECK1 (RTX, N, '0').rttype)
|
|
|
|
|
#define X0BITMAP(RTX, N) (RTL_CHECK1 (RTX, N, '0').rtbit)
|
|
|
|
|
#define X0TREE(RTX, N) (RTL_CHECK1 (RTX, N, '0').rttree)
|
|
|
|
|
#define X0BBDEF(RTX, N) (RTL_CHECK1 (RTX, N, '0').bb)
|
|
|
|
|
#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)
|
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
|
|
|
|
#define X0MEMATTR(RTX, N) (RTL_CHECKC1 (RTX, N, MEM).rtmem)
|
|
|
|
|
#define X0REGATTR(RTX, N) (RTL_CHECKC1 (RTX, N, REG).rtreg)
|
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')
|
|
|
|
|
|
2002-01-03 06:11:05 +01:00
|
|
|
|
#define XCINT(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rtint)
|
|
|
|
|
#define XCUINT(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rtuint)
|
|
|
|
|
#define XCSTR(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rtstr)
|
|
|
|
|
#define XCEXP(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rtx)
|
|
|
|
|
#define XCVEC(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rtvec)
|
|
|
|
|
#define XCMODE(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rttype)
|
|
|
|
|
#define XCBITMAP(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rtbit)
|
|
|
|
|
#define XCTREE(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rttree)
|
|
|
|
|
#define XCBBDEF(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).bb)
|
|
|
|
|
#define XCADVFLAGS(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_addr_diff_vec_flags)
|
|
|
|
|
#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))
|
|
|
|
|
|
2002-01-03 06:11:05 +01:00
|
|
|
|
#define XC2EXP(RTX, N, C1, C2) (RTL_CHECKC2 (RTX, N, C1, C2).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_INTEGRATED_P(RTX) \
|
|
|
|
|
(RTL_FLAG_CHECK8("RTX_INTEGRATED_P", (RTX), INSN, CALL_INSN, \
|
|
|
|
|
JUMP_INSN, INSN_LIST, BARRIER, CODE_LABEL, CONST, \
|
|
|
|
|
NOTE)->integrated)
|
|
|
|
|
#define RTX_UNCHANGING_P(RTX) \
|
|
|
|
|
(RTL_FLAG_CHECK3("RTX_UNCHANGING_P", (RTX), REG, MEM, CONCAT)->unchanging)
|
|
|
|
|
#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 that is dead code. Valid only for dead-code
|
|
|
|
|
elimination phase. */
|
|
|
|
|
#define INSN_DEAD_CODE_P(RTX) \
|
2002-12-26 19:15:56 +01:00
|
|
|
|
(RTL_FLAG_CHECK3("INSN_DEAD_CODE_P", (RTX), INSN, CALL_INSN, JUMP_INSN)->in_struct)
|
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
|
|
|
|
|
2000-03-29 03:56:04 +02:00
|
|
|
|
#define ADDR_DIFF_VEC_FLAGS(RTX) X0ADVFLAGS(RTX, 4)
|
|
|
|
|
|
|
|
|
|
#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. */
|
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 REG_NOTES(INSN) XEXP(INSN, 8)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
|
|
|
|
/* Don't forget to change reg_note_name in rtl.c. */
|
2000-03-29 03:56:04 +02:00
|
|
|
|
enum reg_note
|
|
|
|
|
{
|
|
|
|
|
/* The value in REG dies in this insn (i.e., it is not needed past
|
|
|
|
|
this insn). If REG is set in this insn, the REG_DEAD note may,
|
|
|
|
|
but need not, be omitted. */
|
|
|
|
|
REG_DEAD = 1,
|
|
|
|
|
|
|
|
|
|
/* The REG is autoincremented or autodecremented. */
|
|
|
|
|
REG_INC,
|
|
|
|
|
|
|
|
|
|
/* Describes the insn as a whole; it says that the insn sets a register
|
|
|
|
|
to a constant value or to be equivalent to a memory address. If the
|
|
|
|
|
register is spilled to the stack then the constant value should be
|
|
|
|
|
substituted for it. The contents of the REG_EQUIV is the constant
|
|
|
|
|
value or memory address, which may be different from the source of
|
|
|
|
|
the SET although it has the same value. A REG_EQUIV note may also
|
|
|
|
|
appear on an insn which copies a register parameter to a pseudo-register,
|
|
|
|
|
if there is a memory address which could be used to hold that
|
|
|
|
|
pseudo-register throughout the function. */
|
2000-05-12 18:26:15 +02:00
|
|
|
|
REG_EQUIV,
|
2000-03-29 03:56:04 +02:00
|
|
|
|
|
|
|
|
|
/* Like REG_EQUIV except that the destination is only momentarily equal
|
|
|
|
|
to the specified rtx. Therefore, it cannot be used for substitution;
|
|
|
|
|
but it can be used for cse. */
|
|
|
|
|
REG_EQUAL,
|
|
|
|
|
|
|
|
|
|
/* This insn copies the return-value of a library call out of the hard reg
|
|
|
|
|
for return values. This note is actually an INSN_LIST and it points to
|
|
|
|
|
the first insn involved in setting up arguments for the call. flow.c
|
|
|
|
|
uses this to delete the entire library call when its result is dead. */
|
|
|
|
|
REG_RETVAL,
|
|
|
|
|
|
|
|
|
|
/* The inverse of REG_RETVAL: it goes on the first insn of the library call
|
2000-05-12 18:26:15 +02:00
|
|
|
|
and points at the one that has the REG_RETVAL. This note is also an
|
|
|
|
|
INSN_LIST. */
|
2000-03-29 03:56:04 +02:00
|
|
|
|
REG_LIBCALL,
|
|
|
|
|
|
|
|
|
|
/* The register is always nonnegative during the containing loop. This is
|
|
|
|
|
used in branches so that decrement and branch instructions terminating
|
|
|
|
|
on zero can be matched. There must be an insn pattern in the md file
|
|
|
|
|
named `decrement_and_branch_until_zero' or else this will never be added
|
|
|
|
|
to any instructions. */
|
|
|
|
|
REG_NONNEG,
|
|
|
|
|
|
|
|
|
|
/* There is no conflict *after this insn* between the register in the note
|
|
|
|
|
and the destination of this insn. */
|
|
|
|
|
REG_NO_CONFLICT,
|
|
|
|
|
|
|
|
|
|
/* Identifies a register set in this insn and never used. */
|
|
|
|
|
REG_UNUSED,
|
|
|
|
|
|
|
|
|
|
/* REG_CC_SETTER and REG_CC_USER link a pair of insns that set and use CC0,
|
|
|
|
|
respectively. Normally, these are required to be consecutive insns, but
|
|
|
|
|
we permit putting a cc0-setting insn in the delay slot of a branch as
|
|
|
|
|
long as only one copy of the insn exists. In that case, these notes
|
|
|
|
|
point from one to the other to allow code generation to determine what
|
2000-05-12 18:26:15 +02:00
|
|
|
|
any require information and to properly update CC_STATUS. These notes
|
|
|
|
|
are INSN_LISTs. */
|
2000-03-29 03:56:04 +02:00
|
|
|
|
REG_CC_SETTER, REG_CC_USER,
|
|
|
|
|
|
|
|
|
|
/* Points to a CODE_LABEL. Used by non-JUMP_INSNs to say that the
|
2003-06-01 17:59:10 +02:00
|
|
|
|
CODE_LABEL contained in the REG_LABEL note is used by the insn.
|
2000-05-12 18:26:15 +02:00
|
|
|
|
This note is an INSN_LIST. */
|
2000-03-29 03:56:04 +02:00
|
|
|
|
REG_LABEL,
|
|
|
|
|
|
|
|
|
|
/* REG_DEP_ANTI and REG_DEP_OUTPUT are used in LOG_LINKS to represent
|
|
|
|
|
write-after-read and write-after-write dependencies respectively.
|
|
|
|
|
Data dependencies, which are the only type of LOG_LINK created by
|
|
|
|
|
flow, are represented by a 0 reg note kind. */
|
|
|
|
|
REG_DEP_ANTI, REG_DEP_OUTPUT,
|
|
|
|
|
|
2001-06-10 00:39:25 +02:00
|
|
|
|
/* REG_BR_PROB is attached to JUMP_INSNs and CALL_INSNs.
|
|
|
|
|
It has an integer value. For jumps, it is the probability that this is a
|
|
|
|
|
taken branch. For calls, it is the probability that this call won't
|
|
|
|
|
return. */
|
2000-03-29 03:56:04 +02:00
|
|
|
|
REG_BR_PROB,
|
|
|
|
|
|
2003-07-30 21:23:34 +02:00
|
|
|
|
/* REG_VALUE_PROFILE is attached when the profile is read in to an insn
|
|
|
|
|
before that the code to profile the value is inserted. It contains
|
|
|
|
|
the results of profiling. */
|
|
|
|
|
REG_VALUE_PROFILE,
|
|
|
|
|
|
2000-03-29 03:56:04 +02:00
|
|
|
|
/* Attached to a call insn; indicates that the call is malloc-like and
|
|
|
|
|
that the pointer returned cannot alias anything else. */
|
|
|
|
|
REG_NOALIAS,
|
|
|
|
|
|
|
|
|
|
/* Used to optimize rtl generated by dynamic stack allocations for targets
|
|
|
|
|
where SETJMP_VIA_SAVE_AREA is true. */
|
|
|
|
|
REG_SAVE_AREA,
|
|
|
|
|
|
2001-06-10 00:39:25 +02:00
|
|
|
|
/* REG_BR_PRED is attached to JUMP_INSNs and CALL_INSNSs. It contains
|
|
|
|
|
CONCAT of two integer value. First specifies the branch predictor
|
|
|
|
|
that added the note, second specifies the predicted hitrate of branch
|
|
|
|
|
in the same format as REG_BR_PROB note uses. */
|
2000-03-29 03:56:04 +02:00
|
|
|
|
REG_BR_PRED,
|
|
|
|
|
|
|
|
|
|
/* Attached to insns that are RTX_FRAME_RELATED_P, but are too complex
|
|
|
|
|
for DWARF to interpret what they imply. The attached rtx is used
|
|
|
|
|
instead of intuition. */
|
|
|
|
|
REG_FRAME_RELATED_EXPR,
|
|
|
|
|
|
|
|
|
|
/* Indicates that REG holds the exception context for the function.
|
|
|
|
|
This context is shared by inline functions, so the code to acquire
|
|
|
|
|
the real exception context is delayed until after inlining. */
|
|
|
|
|
REG_EH_CONTEXT,
|
|
|
|
|
|
|
|
|
|
/* Indicates what exception region an INSN belongs in. This is used to
|
|
|
|
|
indicate what region to which a call may throw. REGION 0 indicates
|
|
|
|
|
that a call cannot throw at all. REGION -1 indicates that it cannot
|
|
|
|
|
throw, nor will it execute a non-local goto. */
|
|
|
|
|
REG_EH_REGION,
|
|
|
|
|
|
|
|
|
|
/* Used by haifa-sched to save NOTE_INSN notes across scheduling. */
|
2000-08-02 02:53:59 +02:00
|
|
|
|
REG_SAVE_NOTE,
|
|
|
|
|
|
|
|
|
|
/* Indicates that this insn (which is part of the prologue) computes
|
|
|
|
|
a value which might not be used later, and if so it's OK to delete
|
2003-06-01 17:59:10 +02:00
|
|
|
|
the insn. Normally, deleting any insn in the prologue is an error.
|
2000-08-02 02:53:59 +02:00
|
|
|
|
At present the parameter is unused and set to (const_int 0). */
|
2000-09-02 00:22:54 +02:00
|
|
|
|
REG_MAYBE_DEAD,
|
|
|
|
|
|
|
|
|
|
/* Indicates that a call does not return. */
|
2000-12-21 02:11:31 +01:00
|
|
|
|
REG_NORETURN,
|
|
|
|
|
|
2003-06-01 17:59:10 +02:00
|
|
|
|
/* Indicates that an indirect jump is a non-local goto instead of a
|
2000-12-21 02:11:31 +01:00
|
|
|
|
computed goto. */
|
2001-08-07 22:24:08 +02:00
|
|
|
|
REG_NON_LOCAL_GOTO,
|
|
|
|
|
|
|
|
|
|
/* This kind of note is generated at each to `setjmp',
|
|
|
|
|
and similar functions that can return twice. */
|
2001-08-08 21:07:47 +02:00
|
|
|
|
REG_SETJMP,
|
|
|
|
|
|
|
|
|
|
/* Indicate calls that always returns. */
|
2001-10-11 20:48:42 +02:00
|
|
|
|
REG_ALWAYS_RETURN,
|
|
|
|
|
|
|
|
|
|
/* Indicate that the memory load references a vtable. The expression
|
|
|
|
|
is of the form (plus (symbol_ref vtable_sym) (const_int offset)). */
|
|
|
|
|
REG_VTABLE_REF
|
2000-03-29 03:56:04 +02:00
|
|
|
|
};
|
|
|
|
|
|
1997-03-28 23:39:00 +01:00
|
|
|
|
/* The base value for branch probability notes. */
|
|
|
|
|
#define REG_BR_PROB_BASE 10000
|
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
|
|
|
|
|
|
|
|
|
#define LINE_NUMBER 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
|
|
|
|
/* 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)
|
2003-06-01 17:59:10 +02:00
|
|
|
|
#define NOTE_SOURCE_FILE(INSN) XCSTR (INSN, 4, 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 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)
|
|
|
|
|
#define NOTE_PREDICTION(INSN) XCINT (INSN, 4, NOTE)
|
2002-10-07 19:55:46 +02:00
|
|
|
|
#define NOTE_PRECONDITIONED(INSN) XCINT (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)
|
|
|
|
|
|
cfglayout.c (function_tail_eff_head): Rename to ...
* cfglayout.c (function_tail_eff_head): Rename to ...
(function_footer): ... this one.
(unlink_insn_chain): New functions.
(label_for_bb): Only call block_label and emit debug message.
(record_effective_endpoints): Actually unlink the headers and footers.
(fixup_reorder_cahin): Re-insert the unlinked sequences.
(cfg_layout_duplicate_bb): Use duplicate_insn_chain.
* cfglayout.h (struct reorder_block_def): New fields footer/header;
remove eff_head/eff_end.
* rtl.h (set_first_insn): Declare.
* emit-rtl.c (set_first_insn): New function.
* cfglayout.c (fixup_reorder_chain): Dump duplicated
(cfg_layout_can_duplicate_bb_p, cfg_layout_rerirect_edge,
cfg_layout_duplicate_bb): New global function.
(duplicate_insn_chain): New static function.
* cfglayout.h (cfg_layout_can_duplicate_bb_p, cfg_layout_rerirect_edge,
cfg_layout_duplicate_bb): Declare.
(struct reorder_block_def): Add "original" field.
* emit-rtl.c (emit_copy_of_insn_after): New function.
* rtl.h (emit_copy_of_insn_after): Declare.
* cfglayout.c (fixup_fallthru_exit_predecessor): Kill.
(fixup_reorder_chain): properly handle edges to exit block.
Wed May 8 11:10:31 CEST 2002 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
Jan Hubicka <jh@suse.cz>
* basic-block.h (note_prediction_to_br_prob): declare.
* c-semantics.c: Inlucde predit.h
(expand_stmt): predict GOTO_STMT as not taken.
* cfgcleanup.c: (delete_unreachable_blocks): Make global.
(cleanup_cfg): Do not free tail_recursion_list.
* cfgrtl.c (can_delete_note_p): Delete NOTE_INSN_PREDICTION.
(flow_delete_block): Kill predictions past end of basic block.
* output.h (delete_unreachable_blocks): Declare.
* predict.c (predicted_by_p, process_note_predictions,
process_note_prediction, last_block_p): New function.
(estimate_probability): Bypass loop on PRED_CONTINUE;
do not handle noreturn heuristics; kill PRED_RETURN; add
PRED_EARLY_RETURN.
* predict.def (PRED_CONTINUE, PRED_EARLY_RETURN, PRED_GOTO,
PRED_CONST_RETURN, PRED_NEGATIVE_RETURN, PRED_NULL_RETURN): New.
* predict.h (IS_TAKEN): New constant.
* print-rtl.c (print_rtx): Pretty print NOTE_INSN_PREDICTION.
* rtl.c (NOTE_INSN_PREDICTION): New.
* rtl.h (NOTE_PREDICTION, NOTE_PREDICTION_ALG, NOTE_PREDICTION_FLAGS):
New macro.
(insn_note): add NOTE_INSN_PREDICTION.
* sibcall.c (optimize_sibling_and_tail_recursive_call): Do not build
CFG; free tail_recursion_label_list.
* stmt.c: Include predict.h;
(return_prediction): New.
(expand_value_return): Use it.
* toplev.c: Lower NOTE_INSN_PREDICTION before sibcall.
From-SVN: r53285
2002-05-08 11:17:27 +02:00
|
|
|
|
/* Algorithm and flags for prediction. */
|
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_PREDICTION_ALG(INSN) (XCINT(INSN, 4, NOTE)>>8)
|
|
|
|
|
#define NOTE_PREDICTION_FLAGS(INSN) (XCINT(INSN, 4, NOTE)&0xff)
|
cfglayout.c (function_tail_eff_head): Rename to ...
* cfglayout.c (function_tail_eff_head): Rename to ...
(function_footer): ... this one.
(unlink_insn_chain): New functions.
(label_for_bb): Only call block_label and emit debug message.
(record_effective_endpoints): Actually unlink the headers and footers.
(fixup_reorder_cahin): Re-insert the unlinked sequences.
(cfg_layout_duplicate_bb): Use duplicate_insn_chain.
* cfglayout.h (struct reorder_block_def): New fields footer/header;
remove eff_head/eff_end.
* rtl.h (set_first_insn): Declare.
* emit-rtl.c (set_first_insn): New function.
* cfglayout.c (fixup_reorder_chain): Dump duplicated
(cfg_layout_can_duplicate_bb_p, cfg_layout_rerirect_edge,
cfg_layout_duplicate_bb): New global function.
(duplicate_insn_chain): New static function.
* cfglayout.h (cfg_layout_can_duplicate_bb_p, cfg_layout_rerirect_edge,
cfg_layout_duplicate_bb): Declare.
(struct reorder_block_def): Add "original" field.
* emit-rtl.c (emit_copy_of_insn_after): New function.
* rtl.h (emit_copy_of_insn_after): Declare.
* cfglayout.c (fixup_fallthru_exit_predecessor): Kill.
(fixup_reorder_chain): properly handle edges to exit block.
Wed May 8 11:10:31 CEST 2002 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
Jan Hubicka <jh@suse.cz>
* basic-block.h (note_prediction_to_br_prob): declare.
* c-semantics.c: Inlucde predit.h
(expand_stmt): predict GOTO_STMT as not taken.
* cfgcleanup.c: (delete_unreachable_blocks): Make global.
(cleanup_cfg): Do not free tail_recursion_list.
* cfgrtl.c (can_delete_note_p): Delete NOTE_INSN_PREDICTION.
(flow_delete_block): Kill predictions past end of basic block.
* output.h (delete_unreachable_blocks): Declare.
* predict.c (predicted_by_p, process_note_predictions,
process_note_prediction, last_block_p): New function.
(estimate_probability): Bypass loop on PRED_CONTINUE;
do not handle noreturn heuristics; kill PRED_RETURN; add
PRED_EARLY_RETURN.
* predict.def (PRED_CONTINUE, PRED_EARLY_RETURN, PRED_GOTO,
PRED_CONST_RETURN, PRED_NEGATIVE_RETURN, PRED_NULL_RETURN): New.
* predict.h (IS_TAKEN): New constant.
* print-rtl.c (print_rtx): Pretty print NOTE_INSN_PREDICTION.
* rtl.c (NOTE_INSN_PREDICTION): New.
* rtl.h (NOTE_PREDICTION, NOTE_PREDICTION_ALG, NOTE_PREDICTION_FLAGS):
New macro.
(insn_note): add NOTE_INSN_PREDICTION.
* sibcall.c (optimize_sibling_and_tail_recursive_call): Do not build
CFG; free tail_recursion_label_list.
* stmt.c: Include predict.h;
(return_prediction): New.
(expand_value_return): Use it.
* toplev.c: Lower NOTE_INSN_PREDICTION before sibcall.
From-SVN: r53285
2002-05-08 11:17:27 +02:00
|
|
|
|
#define NOTE_PREDICT(ALG,FLAGS) ((ALG<<8)+(FLAGS))
|
|
|
|
|
|
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
|
|
|
|
/* Codes that appear in the NOTE_LINE_NUMBER field
|
1993-04-26 02:18:16 +02:00
|
|
|
|
for kinds of notes that are not line numbers.
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
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
|
|
|
|
|
and destructor routines for some C++ translation unit.
|
|
|
|
|
|
|
|
|
|
If you should change any of the following values, or if you
|
|
|
|
|
should add a new value here, don't forget to change the
|
|
|
|
|
note_insn_name array in rtl.c. */
|
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,
|
|
|
|
|
|
|
|
|
|
/* This note is used to get rid of an insn
|
|
|
|
|
when it isn't safe to patch the insn out of the chain. */
|
|
|
|
|
NOTE_INSN_DELETED,
|
|
|
|
|
|
|
|
|
|
/* These are used to mark the beginning and end of a lexical block.
|
|
|
|
|
See NOTE_BLOCK, identify_blocks and reorder_blocks. */
|
|
|
|
|
NOTE_INSN_BLOCK_BEG,
|
|
|
|
|
NOTE_INSN_BLOCK_END,
|
|
|
|
|
|
|
|
|
|
/* These mark the extremes of a loop. */
|
|
|
|
|
NOTE_INSN_LOOP_BEG,
|
|
|
|
|
NOTE_INSN_LOOP_END,
|
|
|
|
|
|
|
|
|
|
/* Generated at the place in a loop that `continue' jumps to. */
|
|
|
|
|
NOTE_INSN_LOOP_CONT,
|
|
|
|
|
/* Generated at the start of a duplicated exit test. */
|
|
|
|
|
NOTE_INSN_LOOP_VTOP,
|
|
|
|
|
|
2002-01-31 07:21:31 +01:00
|
|
|
|
/* Generated at the end of a conditional at the top of the loop.
|
|
|
|
|
This is used to perform a lame form of loop rotation in lieu
|
|
|
|
|
of actually understanding the loop structure. The note is
|
|
|
|
|
discarded after rotation is complete. */
|
|
|
|
|
NOTE_INSN_LOOP_END_TOP_COND,
|
|
|
|
|
|
2000-04-16 22:23:02 +02:00
|
|
|
|
/* This kind of note is generated at the end of the function body,
|
|
|
|
|
just before the return insn or return label. In an optimizing
|
|
|
|
|
compilation it is deleted by the first jump optimization, after
|
|
|
|
|
enabling that optimizer to determine whether control can fall
|
|
|
|
|
off the end of the function body without a return statement. */
|
|
|
|
|
NOTE_INSN_FUNCTION_END,
|
|
|
|
|
|
|
|
|
|
/* This marks the point immediately after the last prologue insn. */
|
|
|
|
|
NOTE_INSN_PROLOGUE_END,
|
|
|
|
|
|
|
|
|
|
/* This marks the point immediately prior to the first epilogue insn. */
|
|
|
|
|
NOTE_INSN_EPILOGUE_BEG,
|
|
|
|
|
|
|
|
|
|
/* Generated in place of user-declared labels when they are deleted. */
|
|
|
|
|
NOTE_INSN_DELETED_LABEL,
|
|
|
|
|
|
|
|
|
|
/* This note indicates the start of the real body of the function,
|
|
|
|
|
i.e. the point just after all of the parms have been moved into
|
|
|
|
|
their homes, etc. */
|
|
|
|
|
NOTE_INSN_FUNCTION_BEG,
|
|
|
|
|
|
2003-06-01 17:59:10 +02:00
|
|
|
|
/* These note where exception handling regions begin and end.
|
2000-04-16 22:23:02 +02:00
|
|
|
|
Uses NOTE_EH_HANDLER to identify the region in question. */
|
|
|
|
|
NOTE_INSN_EH_REGION_BEG,
|
|
|
|
|
NOTE_INSN_EH_REGION_END,
|
|
|
|
|
|
|
|
|
|
/* Generated whenever a duplicate line number note is output. For example,
|
|
|
|
|
one is output after the end of an inline function, in order to prevent
|
2001-10-11 14:43:43 +02:00
|
|
|
|
the line containing the inline call from being counted twice in gcov. */
|
2000-04-21 21:32:10 +02:00
|
|
|
|
NOTE_INSN_REPEATED_LINE_NUMBER,
|
2000-04-16 22:23:02 +02:00
|
|
|
|
|
2001-10-11 14:43:43 +02:00
|
|
|
|
/* Record the struct for the following basic block. Uses NOTE_BASIC_BLOCK. */
|
2000-04-16 22:23:02 +02:00
|
|
|
|
NOTE_INSN_BASIC_BLOCK,
|
|
|
|
|
|
2000-04-17 18:49:00 +02:00
|
|
|
|
/* Record the expected value of a register at a location. Uses
|
|
|
|
|
NOTE_EXPECTED_VALUE; stored as (eq (reg) (const_int)). */
|
|
|
|
|
NOTE_INSN_EXPECTED_VALUE,
|
|
|
|
|
|
2002-09-08 14:47:27 +02:00
|
|
|
|
/* Record a prediction. Uses NOTE_PREDICTION. */
|
cfglayout.c (function_tail_eff_head): Rename to ...
* cfglayout.c (function_tail_eff_head): Rename to ...
(function_footer): ... this one.
(unlink_insn_chain): New functions.
(label_for_bb): Only call block_label and emit debug message.
(record_effective_endpoints): Actually unlink the headers and footers.
(fixup_reorder_cahin): Re-insert the unlinked sequences.
(cfg_layout_duplicate_bb): Use duplicate_insn_chain.
* cfglayout.h (struct reorder_block_def): New fields footer/header;
remove eff_head/eff_end.
* rtl.h (set_first_insn): Declare.
* emit-rtl.c (set_first_insn): New function.
* cfglayout.c (fixup_reorder_chain): Dump duplicated
(cfg_layout_can_duplicate_bb_p, cfg_layout_rerirect_edge,
cfg_layout_duplicate_bb): New global function.
(duplicate_insn_chain): New static function.
* cfglayout.h (cfg_layout_can_duplicate_bb_p, cfg_layout_rerirect_edge,
cfg_layout_duplicate_bb): Declare.
(struct reorder_block_def): Add "original" field.
* emit-rtl.c (emit_copy_of_insn_after): New function.
* rtl.h (emit_copy_of_insn_after): Declare.
* cfglayout.c (fixup_fallthru_exit_predecessor): Kill.
(fixup_reorder_chain): properly handle edges to exit block.
Wed May 8 11:10:31 CEST 2002 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
Jan Hubicka <jh@suse.cz>
* basic-block.h (note_prediction_to_br_prob): declare.
* c-semantics.c: Inlucde predit.h
(expand_stmt): predict GOTO_STMT as not taken.
* cfgcleanup.c: (delete_unreachable_blocks): Make global.
(cleanup_cfg): Do not free tail_recursion_list.
* cfgrtl.c (can_delete_note_p): Delete NOTE_INSN_PREDICTION.
(flow_delete_block): Kill predictions past end of basic block.
* output.h (delete_unreachable_blocks): Declare.
* predict.c (predicted_by_p, process_note_predictions,
process_note_prediction, last_block_p): New function.
(estimate_probability): Bypass loop on PRED_CONTINUE;
do not handle noreturn heuristics; kill PRED_RETURN; add
PRED_EARLY_RETURN.
* predict.def (PRED_CONTINUE, PRED_EARLY_RETURN, PRED_GOTO,
PRED_CONST_RETURN, PRED_NEGATIVE_RETURN, PRED_NULL_RETURN): New.
* predict.h (IS_TAKEN): New constant.
* print-rtl.c (print_rtx): Pretty print NOTE_INSN_PREDICTION.
* rtl.c (NOTE_INSN_PREDICTION): New.
* rtl.h (NOTE_PREDICTION, NOTE_PREDICTION_ALG, NOTE_PREDICTION_FLAGS):
New macro.
(insn_note): add NOTE_INSN_PREDICTION.
* sibcall.c (optimize_sibling_and_tail_recursive_call): Do not build
CFG; free tail_recursion_label_list.
* stmt.c: Include predict.h;
(return_prediction): New.
(expand_value_return): Use it.
* toplev.c: Lower NOTE_INSN_PREDICTION before sibcall.
From-SVN: r53285
2002-05-08 11:17:27 +02:00
|
|
|
|
NOTE_INSN_PREDICTION,
|
|
|
|
|
|
2004-02-06 21:03:45 +01:00
|
|
|
|
/* The location of a variable. */
|
|
|
|
|
NOTE_INSN_VAR_LOCATION,
|
|
|
|
|
|
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
|
|
|
|
|
1997-11-02 22:19:36 +01:00
|
|
|
|
/* The original regno this ADDRESSOF was built for. */
|
2002-01-03 06:11:05 +01:00
|
|
|
|
#define ADDRESSOF_REGNO(RTX) XCUINT (RTX, 1, ADDRESSOF)
|
1997-11-02 22:19:36 +01:00
|
|
|
|
|
|
|
|
|
/* The variable in the register we took the address of. */
|
2002-01-03 06:11:05 +01:00
|
|
|
|
#define ADDRESSOF_DECL(RTX) XCTREE (RTX, 2, ADDRESSOF)
|
1997-11-02 22:19:36 +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.
|
|
|
|
|
This chain is set up in flow.c. */
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
/* Once basic blocks are found in flow.c,
|
|
|
|
|
Each LABEL_REF points to its containing instruction with this field. */
|
|
|
|
|
|
2002-01-03 06:11:05 +01:00
|
|
|
|
#define CONTAINING_INSN(RTX) XCEXP (RTX, 2, 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) \
|
2002-11-27 03:29:12 +01:00
|
|
|
|
(RTL_FLAG_CHECK2("REG_FUNCTION_VALUE_P", (RTX), REG, PARALLEL)->integrated)
|
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
|
|
|
|
|
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:
|
2002-09-20 19:50:48 +02:00
|
|
|
|
For a DImode, there are two integers CONST_DOUBLE_LOW is the
|
|
|
|
|
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 */
|
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);
|
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))
|
|
|
|
|
#define ASM_OPERANDS_SOURCE_FILE(RTX) XCSTR (RTX, 5, ASM_OPERANDS)
|
|
|
|
|
#define ASM_OPERANDS_SOURCE_LINE(RTX) XCINT (RTX, 6, ASM_OPERANDS)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
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
|
|
|
|
|
2002-05-09 00:37:21 +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) \
|
|
|
|
|
(RTL_FLAG_CHECK1("MEM_SCALAR_P", (RTX), MEM)->frame_related)
|
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), \
|
2001-10-25 14:55:16 +02:00
|
|
|
|
RTX_UNCHANGING_P (LHS) = RTX_UNCHANGING_P (RHS), \
|
|
|
|
|
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
|
|
|
|
/* 1 if RTX is a reg that is used only in an exit test of a loop. */
|
|
|
|
|
#define REG_LOOP_TEST_P(RTX) \
|
|
|
|
|
(RTL_FLAG_CHECK1("REG_LOOP_TEST_P", (RTX), REG)->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) \
|
|
|
|
|
(RTL_FLAG_CHECK1("SYMBOL_REF_WEAK", (RTX), SYMBOL_REF)->integrated)
|
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
|
|
|
|
|
|
2000-04-06 23:22:49 +02:00
|
|
|
|
/* Determine if the insn is a PHI node. */
|
|
|
|
|
#define PHI_NODE_P(X) \
|
2002-01-03 06:11:05 +01:00
|
|
|
|
((X) && GET_CODE (X) == INSN \
|
2000-04-06 23:22:49 +02:00
|
|
|
|
&& GET_CODE (PATTERN (X)) == SET \
|
|
|
|
|
&& GET_CODE (SET_SRC (PATTERN (X))) == PHI)
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
1999-08-24 14:05:09 +02:00
|
|
|
|
/* Nonzero if we need to distinguish between the return value of this function
|
|
|
|
|
and the return value of a function called by this function. This helps
|
|
|
|
|
integrate.c.
|
|
|
|
|
This is 1 until after the rtl generation pass. */
|
|
|
|
|
extern int rtx_equal_function_value_matters;
|
|
|
|
|
|
2000-09-01 03:03:29 +02:00
|
|
|
|
/* Nonzero when we are generating CONCATs. */
|
|
|
|
|
extern int generating_concat_p;
|
|
|
|
|
|
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
|
|
|
|
|
2002-01-03 06:11:05 +01:00
|
|
|
|
#define plus_constant(X, C) plus_constant_wide ((X), (HOST_WIDE_INT) (C))
|
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);
|
|
|
|
|
extern void purge_builtin_constant_p (void);
|
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);
|
|
|
|
|
extern rtx plus_constant_wide (rtx, HOST_WIDE_INT);
|
|
|
|
|
extern rtx plus_constant_for_output_wide (rtx, HOST_WIDE_INT);
|
|
|
|
|
extern void optimize_save_area_alloca (rtx);
|
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);
|
2000-07-23 01:29:14 +02:00
|
|
|
|
|
|
|
|
|
/* In rtl.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtx rtx_alloc (RTX_CODE);
|
|
|
|
|
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 */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtx copy_most_rtx (rtx, rtx);
|
|
|
|
|
extern rtx shallow_copy_rtx (rtx);
|
|
|
|
|
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 int subreg_hard_regno (rtx, int);
|
|
|
|
|
extern rtx gen_lowpart_common (enum machine_mode, rtx);
|
2004-01-31 10:21:18 +01:00
|
|
|
|
extern rtx gen_lowpart_general (enum machine_mode, rtx);
|
|
|
|
|
extern rtx (*gen_lowpart) (enum machine_mode mode, rtx x);
|
|
|
|
|
|
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 gen_realpart (enum machine_mode, rtx);
|
|
|
|
|
extern rtx gen_imagpart (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 void push_to_full_sequence (rtx, rtx);
|
|
|
|
|
extern rtx immed_double_const (HOST_WIDE_INT, HOST_WIDE_INT,
|
|
|
|
|
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 */
|
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 enum machine_mode get_pool_mode_for_function (struct function *, rtx);
|
|
|
|
|
extern int get_pool_offset (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);
|
|
|
|
|
extern rtx emit_insn_before_setloc (rtx, rtx, int);
|
|
|
|
|
extern rtx emit_jump_insn_before (rtx, rtx);
|
|
|
|
|
extern rtx emit_jump_insn_before_setloc (rtx, rtx, int);
|
|
|
|
|
extern rtx emit_call_insn_before (rtx, rtx);
|
|
|
|
|
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);
|
|
|
|
|
extern rtx emit_insn_after_setloc (rtx, rtx, int);
|
|
|
|
|
extern rtx emit_jump_insn_after (rtx, rtx);
|
|
|
|
|
extern rtx emit_jump_insn_after_setloc (rtx, rtx, int);
|
|
|
|
|
extern rtx emit_call_insn_after (rtx, rtx);
|
|
|
|
|
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);
|
|
|
|
|
extern rtx next_cc0_user (rtx);
|
|
|
|
|
extern rtx prev_cc0_setter (rtx);
|
2000-07-23 01:29:14 +02:00
|
|
|
|
|
2004-01-17 23:14:17 +01:00
|
|
|
|
#define emit_insn_before_sameloc(INSN, BEFORE) \
|
|
|
|
|
emit_insn_before_setloc (INSN, BEFORE, INSN_LOCATOR (BEFORE))
|
|
|
|
|
#define emit_jump_insn_before_sameloc(INSN, BEFORE) \
|
|
|
|
|
emit_jump_insn_before_setloc (INSN, BEFORE, INSN_LOCATOR (BEFORE))
|
|
|
|
|
#define emit_call_insn_before_sameloc(INSN, BEFORE) \
|
|
|
|
|
emit_call_insn_before_setloc (INSN, BEFORE, INSN_LOCATOR (BEFORE))
|
|
|
|
|
#define emit_insn_after_sameloc(INSN, AFTER) \
|
|
|
|
|
emit_insn_after_setloc (INSN, AFTER, INSN_LOCATOR (AFTER))
|
|
|
|
|
#define emit_jump_insn_after_sameloc(INSN, AFTER) \
|
|
|
|
|
emit_jump_insn_after_setloc (INSN, AFTER, INSN_LOCATOR (AFTER))
|
|
|
|
|
#define emit_call_insn_after_sameloc(INSN, AFTER) \
|
|
|
|
|
emit_call_insn_after_setloc (INSN, AFTER, INSN_LOCATOR (AFTER))
|
|
|
|
|
|
2002-06-21 04:09:11 +02:00
|
|
|
|
/* In cfglayout.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern tree choose_inner_scope (tree, tree);
|
|
|
|
|
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 void delete_barrier (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 */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtx simplify_unary_operation (enum rtx_code, enum machine_mode, rtx,
|
|
|
|
|
enum machine_mode);
|
|
|
|
|
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);
|
|
|
|
|
extern rtx simplify_relational_operation (enum rtx_code, enum machine_mode,
|
|
|
|
|
rtx, rtx);
|
|
|
|
|
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);
|
2000-07-23 01:29:14 +02:00
|
|
|
|
|
|
|
|
|
/* In function.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern rtx gen_mem_addressof (rtx, tree, int);
|
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 rtx get_jump_table_offset (rtx, 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_referenced_between_p (rtx, rtx, rtx);
|
|
|
|
|
extern int reg_set_between_p (rtx, rtx, rtx);
|
|
|
|
|
extern int regs_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 no_jumps_between_p (rtx, rtx);
|
|
|
|
|
extern int modified_in_p (rtx, rtx);
|
|
|
|
|
extern int insn_dependent_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 rtx reg_set_last (rtx, rtx);
|
|
|
|
|
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);
|
1991-12-06 22:00:31 +01:00
|
|
|
|
|
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 rtx get_first_nonparm_insn (void);
|
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. */
|
|
|
|
|
|
|
|
|
|
#ifndef NO_GENRTL_H
|
|
|
|
|
#include "genrtl.h"
|
|
|
|
|
#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
|
|
|
|
|
1998-04-02 01:18:11 +02:00
|
|
|
|
/* We need the cast here to ensure that we get the same result both with
|
|
|
|
|
and without prototypes. */
|
|
|
|
|
#define GEN_INT(N) gen_rtx_CONST_INT (VOIDmode, (HOST_WIDE_INT) (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
|
|
|
|
|
2003-05-13 18:23:02 +02:00
|
|
|
|
/* Called from integrate.c when a deferred constant is inlined. */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void notice_rtl_inlining_of_deferred_constant (void);
|
2003-05-13 18:23:02 +02: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 */
|
|
|
|
|
struct cse_basic_block_data;
|
2000-09-12 10:39:36 +02: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)
|
|
|
|
|
|
2004-01-06 17:51:21 +01:00
|
|
|
|
/* Maximum cost of an rtl expression. This value has the special meaning
|
2000-09-12 10:39:36 +02:00
|
|
|
|
not to use an rtx with this cost under any circumstances. */
|
|
|
|
|
#define MAX_COST INT_MAX
|
|
|
|
|
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern int rtx_cost (rtx, enum rtx_code);
|
|
|
|
|
extern int address_cost (rtx, enum machine_mode);
|
|
|
|
|
extern int delete_trivially_dead_insns (rtx, int);
|
1997-12-09 09:20:07 +01:00
|
|
|
|
#ifdef BUFSIZ
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern int cse_main (rtx, int, int, FILE *);
|
1997-12-09 09:20:07 +01:00
|
|
|
|
#endif
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void cse_end_of_basic_block (rtx, struct cse_basic_block_data *,
|
|
|
|
|
int, int, int);
|
2004-01-23 22:05:21 +01:00
|
|
|
|
extern void cse_condition_code_reg (void);
|
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 int safe_to_remove_jump_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);
|
|
|
|
|
extern int redirect_jump (rtx, rtx, int);
|
|
|
|
|
extern void rebuild_jump_labels (rtx);
|
|
|
|
|
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 never_reached_warning (rtx, rtx);
|
|
|
|
|
extern void purge_line_number_notes (rtx);
|
|
|
|
|
extern void copy_loop_headers (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);
|
|
|
|
|
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 reverse_comparison (rtx);
|
|
|
|
|
extern void set_new_first_and_last_insn (rtx, rtx);
|
|
|
|
|
extern void set_new_last_label_num (int);
|
|
|
|
|
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 enum rtx_code classify_insn (rtx);
|
|
|
|
|
extern rtx emit (rtx);
|
1998-02-17 11:26:44 +01:00
|
|
|
|
/* Query and clear/ restore no_line_numbers. This is used by the
|
|
|
|
|
switch / case handling in stmt.c to give proper line numbers in
|
|
|
|
|
warnings about unreachable code. */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
int force_line_numbers (void);
|
|
|
|
|
void restore_line_number_status (int old_value);
|
|
|
|
|
extern void renumber_insns (FILE *);
|
|
|
|
|
extern void remove_unnecessary_notes (void);
|
|
|
|
|
extern rtx delete_insn (rtx);
|
|
|
|
|
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);
|
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);
|
1997-12-09 09:20:07 +01:00
|
|
|
|
#ifdef BUFSIZ
|
2003-06-08 16:21:54 +02:00
|
|
|
|
extern void dump_combine_stats (FILE *);
|
|
|
|
|
extern void dump_combine_total_stats (FILE *);
|
1997-12-09 09:20:07 +01:00
|
|
|
|
#endif
|
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. */
|
1997-12-09 09:20:07 +01:00
|
|
|
|
#ifdef BUFSIZ
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void schedule_insns (FILE *);
|
2004-02-10 12:38:12 +01:00
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* In sched-ebb.c. */
|
|
|
|
|
#ifdef BUFSIZ
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void schedule_ebbs (FILE *);
|
1997-12-09 09:20:07 +01:00
|
|
|
|
#endif
|
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);
|
1997-12-09 09:20:07 +01:00
|
|
|
|
#ifdef BUFSIZ
|
2003-07-06 11:56:09 +02:00
|
|
|
|
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
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* In loop.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void init_loop (void);
|
|
|
|
|
extern rtx libcall_other_reg (rtx, rtx);
|
1997-12-09 09:20:07 +01:00
|
|
|
|
#ifdef BUFSIZ
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void loop_optimize (rtx, FILE *, int);
|
1997-12-09 09:20:07 +01:00
|
|
|
|
#endif
|
2003-06-18 21:43:55 +02:00
|
|
|
|
extern void branch_target_load_optimize (rtx, bool);
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void record_excess_regs (rtx, rtx, rtx *);
|
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 preserve_rtl_expr_result (rtx);
|
|
|
|
|
extern void mark_temp_addr_taken (rtx);
|
|
|
|
|
extern void update_temp_slot_address (rtx, rtx);
|
|
|
|
|
extern void purge_addressof (rtx);
|
|
|
|
|
extern void purge_hard_subreg_sets (rtx);
|
1997-12-09 09:20:07 +01:00
|
|
|
|
|
|
|
|
|
/* In stmt.c */
|
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 void set_file_and_line_for_stmt (location_t);
|
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);
|
|
|
|
|
extern int preserve_subexpressions_p (void);
|
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 */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void recompute_reg_usage (rtx, int);
|
|
|
|
|
extern int initialize_uninitialized_subregs (void);
|
|
|
|
|
extern void delete_dead_jumptables (void);
|
1997-12-09 09:20:07 +01:00
|
|
|
|
#ifdef BUFSIZ
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void print_rtl_with_bb (FILE *, rtx);
|
|
|
|
|
extern void dump_flow_info (FILE *);
|
1997-12-09 09:20:07 +01:00
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* 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);
|
|
|
|
|
extern rtx expand_mult_highpart (enum machine_mode, rtx,
|
|
|
|
|
unsigned HOST_WIDE_INT, rtx, int, int);
|
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);
|
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
|
|
|
|
#ifdef BUFSIZ
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern int gcse_main (rtx, FILE *);
|
|
|
|
|
extern int bypass_jumps (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
|
|
|
|
#endif
|
|
|
|
|
|
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);
|
1997-12-09 09:20:07 +01:00
|
|
|
|
#ifdef BUFSIZ
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern int global_alloc (FILE *);
|
|
|
|
|
extern void dump_global_regs (FILE *);
|
1997-12-09 09:20:07 +01:00
|
|
|
|
#endif
|
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 regset_release_memory (void);
|
|
|
|
|
extern void regclass_init (void);
|
|
|
|
|
extern void regclass (rtx, int, FILE *);
|
|
|
|
|
extern void reg_scan (rtx, unsigned int, int);
|
|
|
|
|
extern void reg_scan_update (rtx, rtx, unsigned int);
|
|
|
|
|
extern void fix_register (const char *, int, int);
|
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
|
|
|
|
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern int delete_null_pointer_checks (rtx);
|
1999-12-04 04:00:04 +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 */
|
|
|
|
|
#ifdef BUFSIZ
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void regmove_optimize (rtx, int, 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
|
|
|
|
#endif
|
2003-07-06 11:56:09 +02:00
|
|
|
|
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 */
|
|
|
|
|
#ifdef BUFSIZ
|
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
|
|
|
|
#endif
|
|
|
|
|
|
1997-12-09 09:20:07 +01:00
|
|
|
|
/* In local-alloc.c */
|
|
|
|
|
#ifdef BUFSIZ
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void dump_local_alloc (FILE *);
|
1997-12-09 09:20:07 +01:00
|
|
|
|
#endif
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern int local_alloc (void);
|
|
|
|
|
extern int function_invariant_p (rtx);
|
1997-12-09 09:20:07 +01:00
|
|
|
|
|
|
|
|
|
/* In profile.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void init_branch_prob (void);
|
|
|
|
|
extern void branch_prob (void);
|
|
|
|
|
extern void end_branch_prob (void);
|
1997-12-09 09:20:07 +01:00
|
|
|
|
|
|
|
|
|
/* In reg-stack.c */
|
|
|
|
|
#ifdef BUFSIZ
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern bool reg_to_stack (rtx, FILE *);
|
1997-12-09 09:20:07 +01:00
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* 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,
|
2001-09-21 22:26:44 +02:00
|
|
|
|
LCT_ALWAYS_RETURN = 7,
|
|
|
|
|
LCT_RETURNS_TWICE = 8
|
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 unroll.c */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern int set_dominates_use (int, int, int, rtx, rtx);
|
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 init_rtl (void);
|
|
|
|
|
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
|
|
|
|
|
1999-10-14 05:43:49 +02:00
|
|
|
|
#ifdef BUFSIZ
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern int read_skip_spaces (FILE *);
|
|
|
|
|
extern rtx read_rtx (FILE *);
|
1999-10-14 05:43:49 +02:00
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
extern const char *read_rtx_filename;
|
|
|
|
|
extern int read_rtx_lineno;
|
|
|
|
|
|
system.h: Don't redefine abort or trim_filename.
1999-08-25 22:10 -0700 Zack Weinberg <zack@bitmover.com>
* system.h: Don't redefine abort or trim_filename.
* rtl.h: Define abort to fancy_abort (__FILE__, __LINE__, 0)
or fancy_abort (__FILE__, __LINE__, __FUNCTION__) depending on
whether or not __FUNCTION__ is available.
* tree.h: Duplicate rtl.h's definition of abort, for files
that don't include rtl.h. Delete all code to perform type
checking with a compiler other than GCC.
* varray.h: Delete all code to perform type checking with a
compiler other than GCC. Make VARRAY_CHECK() always evaluate
its arguments exactly once, using a statement expression.
Adjust the VARRAY_<type> accessor macros to match.
* toplev.h (fatal_insn, fatal_insn_not_found): Kill.
(_fatal_insn, _fatal_insn_not_found): New fns, take info on
caller's location. Define fatal_insn and fatal_insn_not_found
as macros that use _fatal_insn and _fatal_insn_not_found.
(fancy_abort, trim_filename): Kill prototypes.
* rtl.c (trim_filename): Move here from toplev.c.
(fancy_abort): New function.
(DIR_SEPARATOR): Provide default definition.
* tree.c (tree_check_failed, tree_class_check_failed): Go
through fancy_abort.
(tree_check, tree_class_check, cst_or_constructor_check,
expr_check): Delete.
* varray.c (varray_check_failed): New function.
* toplev.c (fatal_insn, fatal_insn_not_found): Replace with
_fatal_insn and _fatal_insn_not_found. Go through
fancy_abort.
(trim_filename, fancy_abort): Delete.
* builtins.c (expand_builtin_args_info): Report ICE with abort.
* except.c (start_catch_handler): Report ICE with error/abort
combo.
* final.c (output_operand_lossage): Likewise.
* flow.c (verify_flow_info): Likewise.
* gcc.c: Prototype fatal.
* gengenrtl.c: Undef abort after including rtl.h not system.h.
* genattr.c, genattrtab.c, genemit.c, genextract.c,
genflags.c, genopinit.c, genoutput.c, genpeep.c, genrecog.c:
Don't define fancy_abort.
From-SVN: r28889
1999-08-26 07:18:44 +02:00
|
|
|
|
/* Redefine abort to report an internal error w/o coredump, and
|
|
|
|
|
reporting the location of the error in the source file. This logic
|
|
|
|
|
is duplicated in rtl.h and tree.h because every file that needs the
|
|
|
|
|
special abort includes one or both. toplev.h gets too few files,
|
|
|
|
|
system.h gets too many. */
|
|
|
|
|
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void fancy_abort (const char *, int, const char *)
|
system.h: Don't redefine abort or trim_filename.
1999-08-25 22:10 -0700 Zack Weinberg <zack@bitmover.com>
* system.h: Don't redefine abort or trim_filename.
* rtl.h: Define abort to fancy_abort (__FILE__, __LINE__, 0)
or fancy_abort (__FILE__, __LINE__, __FUNCTION__) depending on
whether or not __FUNCTION__ is available.
* tree.h: Duplicate rtl.h's definition of abort, for files
that don't include rtl.h. Delete all code to perform type
checking with a compiler other than GCC.
* varray.h: Delete all code to perform type checking with a
compiler other than GCC. Make VARRAY_CHECK() always evaluate
its arguments exactly once, using a statement expression.
Adjust the VARRAY_<type> accessor macros to match.
* toplev.h (fatal_insn, fatal_insn_not_found): Kill.
(_fatal_insn, _fatal_insn_not_found): New fns, take info on
caller's location. Define fatal_insn and fatal_insn_not_found
as macros that use _fatal_insn and _fatal_insn_not_found.
(fancy_abort, trim_filename): Kill prototypes.
* rtl.c (trim_filename): Move here from toplev.c.
(fancy_abort): New function.
(DIR_SEPARATOR): Provide default definition.
* tree.c (tree_check_failed, tree_class_check_failed): Go
through fancy_abort.
(tree_check, tree_class_check, cst_or_constructor_check,
expr_check): Delete.
* varray.c (varray_check_failed): New function.
* toplev.c (fatal_insn, fatal_insn_not_found): Replace with
_fatal_insn and _fatal_insn_not_found. Go through
fancy_abort.
(trim_filename, fancy_abort): Delete.
* builtins.c (expand_builtin_args_info): Report ICE with abort.
* except.c (start_catch_handler): Report ICE with error/abort
combo.
* final.c (output_operand_lossage): Likewise.
* flow.c (verify_flow_info): Likewise.
* gcc.c: Prototype fatal.
* gengenrtl.c: Undef abort after including rtl.h not system.h.
* genattr.c, genattrtab.c, genemit.c, genextract.c,
genflags.c, genopinit.c, genoutput.c, genpeep.c, genrecog.c:
Don't define fancy_abort.
From-SVN: r28889
1999-08-26 07:18:44 +02:00
|
|
|
|
ATTRIBUTE_NORETURN;
|
2000-07-21 09:10:36 +02:00
|
|
|
|
#define abort() fancy_abort (__FILE__, __LINE__, __FUNCTION__)
|
system.h: Don't redefine abort or trim_filename.
1999-08-25 22:10 -0700 Zack Weinberg <zack@bitmover.com>
* system.h: Don't redefine abort or trim_filename.
* rtl.h: Define abort to fancy_abort (__FILE__, __LINE__, 0)
or fancy_abort (__FILE__, __LINE__, __FUNCTION__) depending on
whether or not __FUNCTION__ is available.
* tree.h: Duplicate rtl.h's definition of abort, for files
that don't include rtl.h. Delete all code to perform type
checking with a compiler other than GCC.
* varray.h: Delete all code to perform type checking with a
compiler other than GCC. Make VARRAY_CHECK() always evaluate
its arguments exactly once, using a statement expression.
Adjust the VARRAY_<type> accessor macros to match.
* toplev.h (fatal_insn, fatal_insn_not_found): Kill.
(_fatal_insn, _fatal_insn_not_found): New fns, take info on
caller's location. Define fatal_insn and fatal_insn_not_found
as macros that use _fatal_insn and _fatal_insn_not_found.
(fancy_abort, trim_filename): Kill prototypes.
* rtl.c (trim_filename): Move here from toplev.c.
(fancy_abort): New function.
(DIR_SEPARATOR): Provide default definition.
* tree.c (tree_check_failed, tree_class_check_failed): Go
through fancy_abort.
(tree_check, tree_class_check, cst_or_constructor_check,
expr_check): Delete.
* varray.c (varray_check_failed): New function.
* toplev.c (fatal_insn, fatal_insn_not_found): Replace with
_fatal_insn and _fatal_insn_not_found. Go through
fancy_abort.
(trim_filename, fancy_abort): Delete.
* builtins.c (expand_builtin_args_info): Report ICE with abort.
* except.c (start_catch_handler): Report ICE with error/abort
combo.
* final.c (output_operand_lossage): Likewise.
* flow.c (verify_flow_info): Likewise.
* gcc.c: Prototype fatal.
* gengenrtl.c: Undef abort after including rtl.h not system.h.
* genattr.c, genattrtab.c, genemit.c, genextract.c,
genflags.c, genopinit.c, genoutput.c, genpeep.c, genrecog.c:
Don't define fancy_abort.
From-SVN: r28889
1999-08-26 07:18:44 +02:00
|
|
|
|
|
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);
|
2003-09-12 17:07:50 +02:00
|
|
|
|
extern int unchanging_anti_dependence (rtx, rtx);
|
2003-06-15 15:43:32 +02:00
|
|
|
|
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 rtx addr_side_effect_eval (rtx, int, int);
|
|
|
|
|
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);
|
1998-06-27 17:51:49 +02:00
|
|
|
|
|
2000-03-17 23:40:45 +01:00
|
|
|
|
/* In sibcall.c */
|
|
|
|
|
typedef enum {
|
|
|
|
|
sibcall_use_normal = 1,
|
|
|
|
|
sibcall_use_tail_recursion,
|
|
|
|
|
sibcall_use_sibcall
|
|
|
|
|
} sibcall_use_t;
|
|
|
|
|
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void optimize_sibling_and_tail_recursive_calls (void);
|
|
|
|
|
extern void replace_call_placeholder (rtx, sibcall_use_t);
|
2000-03-17 23:40:45 +01: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 */
|
2003-07-06 11:56:09 +02:00
|
|
|
|
extern void tracer (void);
|
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. */
|
|
|
|
|
extern void get_mode_bounds (enum machine_mode, int, rtx *, rtx *);
|
|
|
|
|
|
|
|
|
|
/* 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);
|
|
|
|
|
|
2001-05-26 03:31:47 +02:00
|
|
|
|
#endif /* ! GCC_RTL_H */
|