gcc/gcc/rtl.h

2281 lines
83 KiB
C
Raw Normal View History

/* Register Transfer Language (RTL) definitions for GCC
Copyright (C) 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
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
2005-06-25 04:02:01 +02:00
Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. */
1991-12-06 22:00:31 +01:00
#ifndef GCC_RTL_H
#define GCC_RTL_H
#include "statistics.h"
1991-12-06 22:00:31 +01:00
#include "machmode.h"
#include "input.h"
#include "real.h"
re PR target/9703 ([arm] Accessing data through constant pool more times could be solved in less instructions) * cselib.c (cselib_init): Change RTX_SIZE to RTX_CODE_SIZE. * emit-rtl.c (copy_rtx_if_shared_1): Use shallow_copy_rtx. (copy_insn_1): Likewise. Don't copy each field individually. Reindent. * read-rtl.c (apply_macro_to_rtx): Use RTX_CODE_SIZE instead of RTX_SIZE. * reload1.c (eliminate_regs): Use shallow_copy_rtx. * rtl.c (rtx_size): Rename variable to... (rtx_code_size): ...this. (rtx_size): New function. (rtx_alloc_stat): Use RTX_CODE_SIZE instead of RTX_SIZE. (copy_rtx): Use shallow_copy_rtx. Don't copy each field individually. Reindent. (shallow_copy_rtx_stat): Use rtx_size instead of RTX_SIZE. * rtl.h (rtx_code_size): New variable. (rtx_size): Change from a variable to a function. (RTX_SIZE): Rename to... (RTX_CODE_SIZE): ...this. PR target/9703 PR tree-optimization/17106 * doc/tm.texi (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Document. (Anchored Addresses): New section. * doc/invoke.texi (-fsection-anchors): Document. * doc/rtl.texi (SYMBOL_REF_IN_BLOCK_P, SYMBOL_FLAG_IN_BLOCK): Likewise. (SYMBOL_REF_ANCHOR_P, SYMBOL_FLAG_ANCHOR): Likewise. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): Likewise. * hooks.c (hook_bool_mode_rtx_false): New function. * hooks.h (hook_bool_mode_rtx_false): Declare. * gengtype.c (create_optional_field): New function. (adjust_field_rtx_def): Add the "block_sym" field for SYMBOL_REFs when SYMBOL_REF_IN_BLOCK_P is true. * target.h (output_anchor, use_blocks_for_constant_p): New hooks. (min_anchor_offset, max_anchor_offset): Likewise. (use_anchors_for_symbol_p): New hook. * toplev.c (compile_file): Call output_object_blocks. (target_supports_section_anchors_p): New function. (process_options): Check that -fsection-anchors is only used on targets that support it and when -funit-at-a-time is in effect. * tree-ssa-loop-ivopts.c (prepare_decl_rtl): Only create DECL_RTL if the decl doesn't have one. * dwarf2out.c: Remove instantiations of VEC(rtx,gc). * expr.c (emit_move_multi_word, emit_move_insn): Pass the result of force_const_mem through use_anchored_address. (expand_expr_constant): New function. (expand_expr_addr_expr_1): Call it. Use the same modifier when calling expand_expr for INDIRECT_REF. (expand_expr_real_1): Pass DECL_RTL through use_anchored_address for all modifiers except EXPAND_INITIALIZER. Use expand_expr_constant. * expr.h (use_anchored_address): Declare. * loop-unroll.c: Don't declare rtx vectors here. * explow.c: Include output.h. (validize_mem): Call use_anchored_address. (use_anchored_address): New function. * common.opt (-fsection-anchors): New switch. * varasm.c (object_block_htab, anchor_labelno): New variables. (hash_section, object_block_entry_eq, object_block_entry_hash) (use_object_blocks_p, get_block_for_section, create_block_symbol) (use_blocks_for_decl_p, change_symbol_section): New functions. (get_variable_section): New function, split out from assemble_variable. (make_decl_rtl): Create a block symbol if use_object_blocks_p and use_blocks_for_decl_p say so. Use change_symbol_section if the symbol has already been created. (assemble_variable_contents): New function, split out from... (assemble_variable): ...here. Don't output any code for block symbols; just pass them to place_block_symbol. Use get_variable_section and assemble_variable_contents. (get_constant_alignment, get_constant_section, get_constant_size): New functions, split from output_constant_def_contents. (build_constant_desc): Create a block symbol if use_object_blocks_p says so. Or into SYMBOL_REF_FLAGS. (assemble_constant_contents): New function, split from... (output_constant_def_contents): ...here. Don't output any code for block symbols; just pass them to place_section_symbol. Use get_constant_section and get_constant_alignment. (force_const_mem): Create a block symbol if use_object_blocks_p and use_blocks_for_constant_p say so. Or into SYMBOL_REF_FLAGS. (output_constant_pool_1): Add an explicit alignment argument. Don't switch sections here. (output_constant_pool): Adjust call to output_constant_pool_1. Switch sections here instead. Don't output anything for block symbols; just pass them to place_block_symbol. (init_varasm_once): Initialize object_block_htab. (default_encode_section_info): Keep the old SYMBOL_FLAG_IN_BLOCK. (default_asm_output_anchor, default_use_aenchors_for_symbol_p) (place_block_symbol, get_section_anchor, output_object_block) (output_object_block_htab, output_object_blocks): New functions. * target-def.h (TARGET_ASM_OUTPUT_ANCHOR): New macro. (TARGET_ASM_OUT): Include it. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): New macro. (TARGET_MIN_ANCHOR_OFFSET, TARGET_MAX_ANCHOR_OFFSET): New macros. (TARGET_USE_ANCHORS_FOR_SYMBOL_P): New macro. (TARGET_INITIALIZER): Include them. * rtl.c (rtl_check_failed_block_symbol): New function. * rtl.h: Include vec.h. Declare heap and gc rtx vectors. (block_symbol, object_block): New structures. (rtx_def): Add a block_symbol field to the union. (BLOCK_SYMBOL_CHECK): New macro. (rtl_check_failed_block_symbol): Declare. (SYMBOL_FLAG_IN_BLOCK, SYMBOL_FLAG_ANCHOR): New SYMBOL_REF flags. (SYMBOL_REF_IN_BLOCK_P, SYMBOL_REF_ANCHOR_P): New predicates. (SYMBOL_FLAG_MACH_DEP_SHIFT): Bump by 2. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): New accessors. * output.h (output_section_symbols): Declare. (object_block): Name structure. (place_section_symbol, get_section_anchor, default_asm_output_anchor) (default_use_anchors_for_symbol_p): Declare. * Makefile.in (RTL_BASE_H): Add vec.h. (explow.o): Depend on output.h. * config/rs6000/rs6000.c (TARGET_MIN_ANCHOR_OFFSET): Override default. (TARGET_MAX_ANCHOR_OFFSET): Likewise. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise. (rs6000_use_blocks_for_constant_p): New function. From-SVN: r111254
2006-02-18 23:06:53 +01:00
#include "vec.h"
1991-12-06 22:00:31 +01:00
#undef FFS /* Some systems predefine this symbol; don't let it interfere. */
#undef FLOAT /* Likewise. */
#undef ABS /* Likewise. */
1993-05-29 18:16:01 +02:00
#undef PC /* Likewise. */
1991-12-06 22:00:31 +01:00
/* Value used by some passes to "recognize" noop moves as valid
instructions. */
#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
LAST_AND_UNUSED_RTX_CODE}; /* A convenient way to get a value for
1991-12-06 22:00:31 +01:00
NUM_RTX_CODE.
Assumes default enum value assignment. */
1991-12-06 22:00:31 +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)
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
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
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)])
Index: gcc/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * ggc-common.c (ggc_mark_rtx_children_1): Update for changed name mangling. The following changes are merged from pch-branch: * doc/gty.texi (GTY Options): Document %a. * gengtype.c (do_scalar_typedef): New function. (process_gc_options): Handle `length' option. (set_gc_used_type): A pointer to an array of structures doesn't qualify as a pointer to a structure. (output_escaped_param): Add `%a' escape. (write_gc_structure_fields): Allow 'desc' on array of unions. (main): Define `uint8', `jword' and `JCF_u2' as scalars; use do_scalar_typedef. * gengtype.c (enum rtx_code): Make global. (rtx_format): Make global. (rtx_next): New. (gen_rtx_next): New. (write_rtx_next): New. (adjust_field_rtx_def): Skip fields marked by chain_next. (open_base_files): Delete redundant prototype. (write_enum_defn): New. (output_mangled_typename): Correct abort call. (write_gc_marker_routine_for_structure): Handle chain_next and chain_prev options. (finish_root_table): Don't output redundant \n. (main): Call gen_rtx_next, write_rtx_next, write_enum_defn. * c-tree.h (union lang_tree_node): Add chain_next option. * gengtype.h (NUM_PARAM): New definition. (struct type): For TYPE_PARAM_STRUCT, allow multiple parameters. * gengtype.c (find_param_structure): New. (adjust_field_type): Handle param<n>_is option. (process_gc_options): Detect use_params option. Update callers. (set_gc_used_type): Add 'param' parameter, update callers. Handle 'use_params' option. (open_base_files): Add splay-tree.h to list of files included. (output_mangled_typename): New. (write_gc_structure_fields): Update 'param' parameter to support multiple parameters. Change name mangling. Allow parameterized fields to have an apparent scalar type. Handle param<n>_is options, use_param option. (write_gc_marker_routine_for_structure): Update for change to name mangling. Better guess the output file for parameterized types. (write_gc_types): Update for change to name mangling. (write_gc_root): Update for change to name mangling. Handle (ignore) param<n>_is options. * doc/gty.texi (GTY Options): Add description of param<n>_is options, use_params option. * ggc.h (ggc_mark_rtx): Update for changed name mangling. * gengtype-lex.l: Produce token for param<n>_is. * gengtype-yacc.y: Parse param<n>_is. * gengtype.c (adjust_field_tree_exp): Don't name a variable 'rindex'. * rtl.c: Update comment describing rtx_format. * rtl.h (union rtunion): Separate definition and typedef. (struct rtx_def): Use gengtype to mark. * Makefile.in (gengtype.o): Also depend on rtl.def. * ggc.h (ggc_mark_rtx_children): Delete prototype. (ggc_mark_rtx): Change to alias of gengtype-generated routine. * ggc-common.c (ggc_mark_rtx_children): Delete. (ggc_mark_rtx_children_1): Delete. (gt_ggc_m_rtx_def): Delete. * gengtype.c (adjust_field_rtx_def): New. (adjust_field_type): Call adjust_field_rtx_def. (write_gc_structure_fields): Add 'default' case to switch if none is specified; remove unused code. * tree.h (struct tree_exp): Update for change to meaning of special. * gengtype.c (adjust_field_tree_exp): New function. (adjust_field_type): Handle `tree_exp' special here. (write_gc_structure_fields): Don't handle `tree_exp' special here. Handle new `dot' option. * gengtype.h: Make `info' a pointer-to-const. * gengtype-yacc.y (yacc_ids): Use xasprintf. * gengtype.c (write_gc_structure_fields): Remove implementation of `always' option, add `default' option. * doc/gty.texi (GTY Options): Remove documentation of `always', add `default'. Index: gcc/cp/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * cp-tree.h (union lang_tree_node): Add chain_next option. Index: gcc/f/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * com.c (union lang_tree_node): Add chain_next option. Index: gcc/java/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * java-tree.h (union lang_tree_node): Add chain_next option. From-SVN: r57206
2002-09-16 20:33:23 +02:00
re PR target/9703 ([arm] Accessing data through constant pool more times could be solved in less instructions) * cselib.c (cselib_init): Change RTX_SIZE to RTX_CODE_SIZE. * emit-rtl.c (copy_rtx_if_shared_1): Use shallow_copy_rtx. (copy_insn_1): Likewise. Don't copy each field individually. Reindent. * read-rtl.c (apply_macro_to_rtx): Use RTX_CODE_SIZE instead of RTX_SIZE. * reload1.c (eliminate_regs): Use shallow_copy_rtx. * rtl.c (rtx_size): Rename variable to... (rtx_code_size): ...this. (rtx_size): New function. (rtx_alloc_stat): Use RTX_CODE_SIZE instead of RTX_SIZE. (copy_rtx): Use shallow_copy_rtx. Don't copy each field individually. Reindent. (shallow_copy_rtx_stat): Use rtx_size instead of RTX_SIZE. * rtl.h (rtx_code_size): New variable. (rtx_size): Change from a variable to a function. (RTX_SIZE): Rename to... (RTX_CODE_SIZE): ...this. PR target/9703 PR tree-optimization/17106 * doc/tm.texi (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Document. (Anchored Addresses): New section. * doc/invoke.texi (-fsection-anchors): Document. * doc/rtl.texi (SYMBOL_REF_IN_BLOCK_P, SYMBOL_FLAG_IN_BLOCK): Likewise. (SYMBOL_REF_ANCHOR_P, SYMBOL_FLAG_ANCHOR): Likewise. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): Likewise. * hooks.c (hook_bool_mode_rtx_false): New function. * hooks.h (hook_bool_mode_rtx_false): Declare. * gengtype.c (create_optional_field): New function. (adjust_field_rtx_def): Add the "block_sym" field for SYMBOL_REFs when SYMBOL_REF_IN_BLOCK_P is true. * target.h (output_anchor, use_blocks_for_constant_p): New hooks. (min_anchor_offset, max_anchor_offset): Likewise. (use_anchors_for_symbol_p): New hook. * toplev.c (compile_file): Call output_object_blocks. (target_supports_section_anchors_p): New function. (process_options): Check that -fsection-anchors is only used on targets that support it and when -funit-at-a-time is in effect. * tree-ssa-loop-ivopts.c (prepare_decl_rtl): Only create DECL_RTL if the decl doesn't have one. * dwarf2out.c: Remove instantiations of VEC(rtx,gc). * expr.c (emit_move_multi_word, emit_move_insn): Pass the result of force_const_mem through use_anchored_address. (expand_expr_constant): New function. (expand_expr_addr_expr_1): Call it. Use the same modifier when calling expand_expr for INDIRECT_REF. (expand_expr_real_1): Pass DECL_RTL through use_anchored_address for all modifiers except EXPAND_INITIALIZER. Use expand_expr_constant. * expr.h (use_anchored_address): Declare. * loop-unroll.c: Don't declare rtx vectors here. * explow.c: Include output.h. (validize_mem): Call use_anchored_address. (use_anchored_address): New function. * common.opt (-fsection-anchors): New switch. * varasm.c (object_block_htab, anchor_labelno): New variables. (hash_section, object_block_entry_eq, object_block_entry_hash) (use_object_blocks_p, get_block_for_section, create_block_symbol) (use_blocks_for_decl_p, change_symbol_section): New functions. (get_variable_section): New function, split out from assemble_variable. (make_decl_rtl): Create a block symbol if use_object_blocks_p and use_blocks_for_decl_p say so. Use change_symbol_section if the symbol has already been created. (assemble_variable_contents): New function, split out from... (assemble_variable): ...here. Don't output any code for block symbols; just pass them to place_block_symbol. Use get_variable_section and assemble_variable_contents. (get_constant_alignment, get_constant_section, get_constant_size): New functions, split from output_constant_def_contents. (build_constant_desc): Create a block symbol if use_object_blocks_p says so. Or into SYMBOL_REF_FLAGS. (assemble_constant_contents): New function, split from... (output_constant_def_contents): ...here. Don't output any code for block symbols; just pass them to place_section_symbol. Use get_constant_section and get_constant_alignment. (force_const_mem): Create a block symbol if use_object_blocks_p and use_blocks_for_constant_p say so. Or into SYMBOL_REF_FLAGS. (output_constant_pool_1): Add an explicit alignment argument. Don't switch sections here. (output_constant_pool): Adjust call to output_constant_pool_1. Switch sections here instead. Don't output anything for block symbols; just pass them to place_block_symbol. (init_varasm_once): Initialize object_block_htab. (default_encode_section_info): Keep the old SYMBOL_FLAG_IN_BLOCK. (default_asm_output_anchor, default_use_aenchors_for_symbol_p) (place_block_symbol, get_section_anchor, output_object_block) (output_object_block_htab, output_object_blocks): New functions. * target-def.h (TARGET_ASM_OUTPUT_ANCHOR): New macro. (TARGET_ASM_OUT): Include it. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): New macro. (TARGET_MIN_ANCHOR_OFFSET, TARGET_MAX_ANCHOR_OFFSET): New macros. (TARGET_USE_ANCHORS_FOR_SYMBOL_P): New macro. (TARGET_INITIALIZER): Include them. * rtl.c (rtl_check_failed_block_symbol): New function. * rtl.h: Include vec.h. Declare heap and gc rtx vectors. (block_symbol, object_block): New structures. (rtx_def): Add a block_symbol field to the union. (BLOCK_SYMBOL_CHECK): New macro. (rtl_check_failed_block_symbol): Declare. (SYMBOL_FLAG_IN_BLOCK, SYMBOL_FLAG_ANCHOR): New SYMBOL_REF flags. (SYMBOL_REF_IN_BLOCK_P, SYMBOL_REF_ANCHOR_P): New predicates. (SYMBOL_FLAG_MACH_DEP_SHIFT): Bump by 2. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): New accessors. * output.h (output_section_symbols): Declare. (object_block): Name structure. (place_section_symbol, get_section_anchor, default_asm_output_anchor) (default_use_anchors_for_symbol_p): Declare. * Makefile.in (RTL_BASE_H): Add vec.h. (explow.o): Depend on output.h. * config/rs6000/rs6000.c (TARGET_MIN_ANCHOR_OFFSET): Override default. (TARGET_MAX_ANCHOR_OFFSET): Likewise. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise. (rs6000_use_blocks_for_constant_p): New function. From-SVN: r111254
2006-02-18 23:06:53 +01:00
extern const unsigned char rtx_code_size[NUM_RTX_CODE];
Index: gcc/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * ggc-common.c (ggc_mark_rtx_children_1): Update for changed name mangling. The following changes are merged from pch-branch: * doc/gty.texi (GTY Options): Document %a. * gengtype.c (do_scalar_typedef): New function. (process_gc_options): Handle `length' option. (set_gc_used_type): A pointer to an array of structures doesn't qualify as a pointer to a structure. (output_escaped_param): Add `%a' escape. (write_gc_structure_fields): Allow 'desc' on array of unions. (main): Define `uint8', `jword' and `JCF_u2' as scalars; use do_scalar_typedef. * gengtype.c (enum rtx_code): Make global. (rtx_format): Make global. (rtx_next): New. (gen_rtx_next): New. (write_rtx_next): New. (adjust_field_rtx_def): Skip fields marked by chain_next. (open_base_files): Delete redundant prototype. (write_enum_defn): New. (output_mangled_typename): Correct abort call. (write_gc_marker_routine_for_structure): Handle chain_next and chain_prev options. (finish_root_table): Don't output redundant \n. (main): Call gen_rtx_next, write_rtx_next, write_enum_defn. * c-tree.h (union lang_tree_node): Add chain_next option. * gengtype.h (NUM_PARAM): New definition. (struct type): For TYPE_PARAM_STRUCT, allow multiple parameters. * gengtype.c (find_param_structure): New. (adjust_field_type): Handle param<n>_is option. (process_gc_options): Detect use_params option. Update callers. (set_gc_used_type): Add 'param' parameter, update callers. Handle 'use_params' option. (open_base_files): Add splay-tree.h to list of files included. (output_mangled_typename): New. (write_gc_structure_fields): Update 'param' parameter to support multiple parameters. Change name mangling. Allow parameterized fields to have an apparent scalar type. Handle param<n>_is options, use_param option. (write_gc_marker_routine_for_structure): Update for change to name mangling. Better guess the output file for parameterized types. (write_gc_types): Update for change to name mangling. (write_gc_root): Update for change to name mangling. Handle (ignore) param<n>_is options. * doc/gty.texi (GTY Options): Add description of param<n>_is options, use_params option. * ggc.h (ggc_mark_rtx): Update for changed name mangling. * gengtype-lex.l: Produce token for param<n>_is. * gengtype-yacc.y: Parse param<n>_is. * gengtype.c (adjust_field_tree_exp): Don't name a variable 'rindex'. * rtl.c: Update comment describing rtx_format. * rtl.h (union rtunion): Separate definition and typedef. (struct rtx_def): Use gengtype to mark. * Makefile.in (gengtype.o): Also depend on rtl.def. * ggc.h (ggc_mark_rtx_children): Delete prototype. (ggc_mark_rtx): Change to alias of gengtype-generated routine. * ggc-common.c (ggc_mark_rtx_children): Delete. (ggc_mark_rtx_children_1): Delete. (gt_ggc_m_rtx_def): Delete. * gengtype.c (adjust_field_rtx_def): New. (adjust_field_type): Call adjust_field_rtx_def. (write_gc_structure_fields): Add 'default' case to switch if none is specified; remove unused code. * tree.h (struct tree_exp): Update for change to meaning of special. * gengtype.c (adjust_field_tree_exp): New function. (adjust_field_type): Handle `tree_exp' special here. (write_gc_structure_fields): Don't handle `tree_exp' special here. Handle new `dot' option. * gengtype.h: Make `info' a pointer-to-const. * gengtype-yacc.y (yacc_ids): Use xasprintf. * gengtype.c (write_gc_structure_fields): Remove implementation of `always' option, add `default' option. * doc/gty.texi (GTY Options): Remove documentation of `always', add `default'. Index: gcc/cp/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * cp-tree.h (union lang_tree_node): Add chain_next option. Index: gcc/f/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * com.c (union lang_tree_node): Add chain_next option. Index: gcc/java/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * java-tree.h (union lang_tree_node): Add chain_next option. From-SVN: r57206
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. */
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;
/* 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. */
/* 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. */
typedef struct mem_attrs GTY(())
{
HOST_WIDE_INT alias; /* Memory alias set. */
tree expr; /* expr corresponding to MEM. */
rtx offset; /* Offset from start of DECL, as CONST_INT. */
rtx size; /* Size in bytes, as a CONST_INT. */
unsigned int align; /* Alignment of MEM in bits. */
} mem_attrs;
/* 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. */
Index: gcc/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * ggc-common.c (ggc_mark_rtx_children_1): Update for changed name mangling. The following changes are merged from pch-branch: * doc/gty.texi (GTY Options): Document %a. * gengtype.c (do_scalar_typedef): New function. (process_gc_options): Handle `length' option. (set_gc_used_type): A pointer to an array of structures doesn't qualify as a pointer to a structure. (output_escaped_param): Add `%a' escape. (write_gc_structure_fields): Allow 'desc' on array of unions. (main): Define `uint8', `jword' and `JCF_u2' as scalars; use do_scalar_typedef. * gengtype.c (enum rtx_code): Make global. (rtx_format): Make global. (rtx_next): New. (gen_rtx_next): New. (write_rtx_next): New. (adjust_field_rtx_def): Skip fields marked by chain_next. (open_base_files): Delete redundant prototype. (write_enum_defn): New. (output_mangled_typename): Correct abort call. (write_gc_marker_routine_for_structure): Handle chain_next and chain_prev options. (finish_root_table): Don't output redundant \n. (main): Call gen_rtx_next, write_rtx_next, write_enum_defn. * c-tree.h (union lang_tree_node): Add chain_next option. * gengtype.h (NUM_PARAM): New definition. (struct type): For TYPE_PARAM_STRUCT, allow multiple parameters. * gengtype.c (find_param_structure): New. (adjust_field_type): Handle param<n>_is option. (process_gc_options): Detect use_params option. Update callers. (set_gc_used_type): Add 'param' parameter, update callers. Handle 'use_params' option. (open_base_files): Add splay-tree.h to list of files included. (output_mangled_typename): New. (write_gc_structure_fields): Update 'param' parameter to support multiple parameters. Change name mangling. Allow parameterized fields to have an apparent scalar type. Handle param<n>_is options, use_param option. (write_gc_marker_routine_for_structure): Update for change to name mangling. Better guess the output file for parameterized types. (write_gc_types): Update for change to name mangling. (write_gc_root): Update for change to name mangling. Handle (ignore) param<n>_is options. * doc/gty.texi (GTY Options): Add description of param<n>_is options, use_params option. * ggc.h (ggc_mark_rtx): Update for changed name mangling. * gengtype-lex.l: Produce token for param<n>_is. * gengtype-yacc.y: Parse param<n>_is. * gengtype.c (adjust_field_tree_exp): Don't name a variable 'rindex'. * rtl.c: Update comment describing rtx_format. * rtl.h (union rtunion): Separate definition and typedef. (struct rtx_def): Use gengtype to mark. * Makefile.in (gengtype.o): Also depend on rtl.def. * ggc.h (ggc_mark_rtx_children): Delete prototype. (ggc_mark_rtx): Change to alias of gengtype-generated routine. * ggc-common.c (ggc_mark_rtx_children): Delete. (ggc_mark_rtx_children_1): Delete. (gt_ggc_m_rtx_def): Delete. * gengtype.c (adjust_field_rtx_def): New. (adjust_field_type): Call adjust_field_rtx_def. (write_gc_structure_fields): Add 'default' case to switch if none is specified; remove unused code. * tree.h (struct tree_exp): Update for change to meaning of special. * gengtype.c (adjust_field_tree_exp): New function. (adjust_field_type): Handle `tree_exp' special here. (write_gc_structure_fields): Don't handle `tree_exp' special here. Handle new `dot' option. * gengtype.h: Make `info' a pointer-to-const. * gengtype-yacc.y (yacc_ids): Use xasprintf. * gengtype.c (write_gc_structure_fields): Remove implementation of `always' option, add `default' option. * doc/gty.texi (GTY Options): Remove documentation of `always', add `default'. Index: gcc/cp/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * cp-tree.h (union lang_tree_node): Add chain_next option. Index: gcc/f/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * com.c (union lang_tree_node): Add chain_next option. Index: gcc/java/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * java-tree.h (union lang_tree_node): Add chain_next option. From-SVN: r57206
2002-09-16 20:33:23 +02:00
union rtunion_def
1991-12-06 22:00:31 +01:00
{
int rt_int;
unsigned int rt_uint;
const char *rt_str;
rtx rt_rtx;
rtvec rt_rtvec;
enum machine_mode rt_type;
rtl.h (addr_diff_vec_flags): New typedef. * rtl.h (addr_diff_vec_flags): New typedef. (union rtunion_def): New member rt_addr_diff_vec_flags. (ADDR_DIFF_VEC_FLAGS): New macro. * sh.c (output_branch): Fix offset overflow problems. * final.c (shorten_branches): Implement CASE_VECTOR_SHORTEN_MODE. (final_scan_insn): New argument BODY for ASM_OUTPUT_ADDR_DIFF_ELT. * rtl.def (ADDR_DIFF_VEC): Three new fields (min, max and flags). * stmt.c (expand_end_case): Supply new arguments to gen_rtx_ADDR_DIFF_VEC. * 1750a.h (ASM_OUTPUT_ADDR_DIFF_ELT): New argument BODY. * alpha.h, arc.h, clipper.h, convex.h : Likewise. * dsp16xx.h, elxsi.h, fx80.h, gmicro.h, h8300.h : Likewise. * i370.h, i386.h, i860.h, i960.h, m32r.h, m68k.h, m88k.h : Likewise. * mips.h, mn10200.h, mn10300.h, ns32k.h, pa.h, pyr.h : Likewise. * rs6000.h, sh.h, sparc.h, spur.h, tahoe.h, v850.h : Likewise. * vax.h, we32k.h, alpha/vms.h, arm/aof.h, arm/aout.h : Likewise. * i386/386bsd.h, i386/freebsd-elf.h : Likewise. * i386/freebsd.h, i386/linux.h : Likewise. * i386/netbsd.h, i386/osfrose.h, i386/ptx4-i.h, i386/sco5.h : Likewise. * i386/sysv4.h, m68k/3b1.h, m68k/dpx2.h, m68k/hp320.h : Likewise. * m68k/mot3300.h, m68k/sgs.h : Likewise. * m68k/tower-as.h, ns32k/encore.h, sparc/pbd.h : Likewise. * sh.h (INSN_ALIGN, INSN_LENGTH_ALIGNMENT): Define. (CASE_VECTOR_SHORTEN_MODE): Define. (short_cbranch_p, align_length, addr_diff_vec_adjust): Don't declare. (med_branch_p, braf_branch_p): Don't declare. (mdep_reorg_phase, barrier_align): Declare. (ADJUST_INSN_LENGTH): Remove alignment handling. * sh.c (uid_align, uid_align_max): Deleted. (max_uid_before_fixup_addr_diff_vecs, branch_offset): Deleted. (short_cbranch_p, med_branch_p, braf_branch_p, align_length): Deleted. (cache_align_p, fixup_aligns, addr_diff_vec_adjust): Deleted. (output_far_jump): Don't use braf_branch_p. (output_branchy_insn): Don't use branch_offset. (find_barrier): Remove checks for max_uid_before_fixup_addr_diff_vecs. Remove paired barrier stuff. Don't use cache_align_p. Take alignment insns into account. (fixup_addr_diff_vecs): Reduce to only fixing up the base label of the addr_diff_vec. (barrier_align, branch_dest): New function. (machine_dependent_reorg, split_branches): Remove infrastructure for branch shortening that is now provided in the backend. * sh.md (short_cbranch_p, med_branch_p, med_cbranch_p): New attributes. (braf_branch_p, braf_cbranch_p): Likewise. (attribute length): Use new attributes. (casesi_worker): Get mode and unsignednedd from ADDR_DIFF_VEC. (addr_diff_vec_adjust): Delete. (align_2): Now a define_expand. (align_log): Now length 0. From-SVN: r18433
1998-03-06 15:54:07 +01:00
addr_diff_vec_flags rt_addr_diff_vec_flags;
struct cselib_val_struct *rt_cselib;
struct bitmap_head_def *rt_bit;
tree rt_tree;
struct basic_block_def *rt_bb;
mem_attrs *rt_mem;
reg_attrs *rt_reg;
rtl.texi (SYMBOL_REF_CONSTANT, [...]): Document. * doc/rtl.texi (SYMBOL_REF_CONSTANT, SYMBOL_REF_DATA): Document. * gengtype.c (adjust_field_rtx_def): Garbage-collect field 2 of a SYMBOL_REF as either a tree or a constant_descriptor_rtx, depending on the value of CONSTANT_POOL_ADDRESS_P. * optabs.c (init_one_libfunc): Nullify SYMBOL_REF_DATA rather than SYMBOL_REF_DECL. * varasm.c (make_decl_rtl, build_constant_desc): Set SYMBOL_REF_DATA rather than SYMBOL_REF_DECL. (rtx_constant_pool): Remove const_rtx_sym_htab. (const_desc_rtx_sym_hash, const_desc_rtx_sym_eq): Delete. (init_varasm_status): Don't initialize const_rtx_sym_htab. (force_const_mem): Point SYMBOL_REF_DATA to the constant pool entry. Remove handling of const_rtx_sym_htab. (find_pool_constant): Delete. (get_pool_constant, get_pool_constant_mark): Use SYMBOL_REF_CONSTANT rather than find_pool_constant. (get_pool_constant_for_function): Delete. (get_pool_mode, mark_constant): Use SYMBOL_REF_CONSTANT rather than find_pool_constant. * rtl.h (rtunion_def): Add rt_constant and rt_ptr fields. (X0CONSTANT, X0PTR, SYMBOL_REF_DATA): New macros. (SYMBOL_REF_DECL): Return NULL if CONSTANT_POOL_ADDRESS_P. (SYMBOL_REF_CONSTANT): New macro. (get_pool_constant_for_function): Delete. * config/i386/winnt.c (i386_pe_mark_dllexport): Set SYMBOL_REF_DATA rather than SYMBOL_REF_DECL. (i386_pe_mark_dllimport): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Copy SYMBOL_REF_DATA rather than SYMBOL_REF_DECL. * config/darwin.c (machopic_indirect_data_reference): Likewise. (machopic_indirect_call_target): Likewise. From-SVN: r110210
2006-01-25 10:10:56 +01:00
struct constant_descriptor_rtx *rt_constant;
Index: gcc/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * ggc-common.c (ggc_mark_rtx_children_1): Update for changed name mangling. The following changes are merged from pch-branch: * doc/gty.texi (GTY Options): Document %a. * gengtype.c (do_scalar_typedef): New function. (process_gc_options): Handle `length' option. (set_gc_used_type): A pointer to an array of structures doesn't qualify as a pointer to a structure. (output_escaped_param): Add `%a' escape. (write_gc_structure_fields): Allow 'desc' on array of unions. (main): Define `uint8', `jword' and `JCF_u2' as scalars; use do_scalar_typedef. * gengtype.c (enum rtx_code): Make global. (rtx_format): Make global. (rtx_next): New. (gen_rtx_next): New. (write_rtx_next): New. (adjust_field_rtx_def): Skip fields marked by chain_next. (open_base_files): Delete redundant prototype. (write_enum_defn): New. (output_mangled_typename): Correct abort call. (write_gc_marker_routine_for_structure): Handle chain_next and chain_prev options. (finish_root_table): Don't output redundant \n. (main): Call gen_rtx_next, write_rtx_next, write_enum_defn. * c-tree.h (union lang_tree_node): Add chain_next option. * gengtype.h (NUM_PARAM): New definition. (struct type): For TYPE_PARAM_STRUCT, allow multiple parameters. * gengtype.c (find_param_structure): New. (adjust_field_type): Handle param<n>_is option. (process_gc_options): Detect use_params option. Update callers. (set_gc_used_type): Add 'param' parameter, update callers. Handle 'use_params' option. (open_base_files): Add splay-tree.h to list of files included. (output_mangled_typename): New. (write_gc_structure_fields): Update 'param' parameter to support multiple parameters. Change name mangling. Allow parameterized fields to have an apparent scalar type. Handle param<n>_is options, use_param option. (write_gc_marker_routine_for_structure): Update for change to name mangling. Better guess the output file for parameterized types. (write_gc_types): Update for change to name mangling. (write_gc_root): Update for change to name mangling. Handle (ignore) param<n>_is options. * doc/gty.texi (GTY Options): Add description of param<n>_is options, use_params option. * ggc.h (ggc_mark_rtx): Update for changed name mangling. * gengtype-lex.l: Produce token for param<n>_is. * gengtype-yacc.y: Parse param<n>_is. * gengtype.c (adjust_field_tree_exp): Don't name a variable 'rindex'. * rtl.c: Update comment describing rtx_format. * rtl.h (union rtunion): Separate definition and typedef. (struct rtx_def): Use gengtype to mark. * Makefile.in (gengtype.o): Also depend on rtl.def. * ggc.h (ggc_mark_rtx_children): Delete prototype. (ggc_mark_rtx): Change to alias of gengtype-generated routine. * ggc-common.c (ggc_mark_rtx_children): Delete. (ggc_mark_rtx_children_1): Delete. (gt_ggc_m_rtx_def): Delete. * gengtype.c (adjust_field_rtx_def): New. (adjust_field_type): Call adjust_field_rtx_def. (write_gc_structure_fields): Add 'default' case to switch if none is specified; remove unused code. * tree.h (struct tree_exp): Update for change to meaning of special. * gengtype.c (adjust_field_tree_exp): New function. (adjust_field_type): Handle `tree_exp' special here. (write_gc_structure_fields): Don't handle `tree_exp' special here. Handle new `dot' option. * gengtype.h: Make `info' a pointer-to-const. * gengtype-yacc.y (yacc_ids): Use xasprintf. * gengtype.c (write_gc_structure_fields): Remove implementation of `always' option, add `default' option. * doc/gty.texi (GTY Options): Remove documentation of `always', add `default'. Index: gcc/cp/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * cp-tree.h (union lang_tree_node): Add chain_next option. Index: gcc/f/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * com.c (union lang_tree_node): Add chain_next option. Index: gcc/java/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * java-tree.h (union lang_tree_node): Add chain_next option. From-SVN: r57206
2002-09-16 20:33:23 +02:00
};
typedef union rtunion_def rtunion;
1991-12-06 22:00:31 +01:00
re PR target/9703 ([arm] Accessing data through constant pool more times could be solved in less instructions) * cselib.c (cselib_init): Change RTX_SIZE to RTX_CODE_SIZE. * emit-rtl.c (copy_rtx_if_shared_1): Use shallow_copy_rtx. (copy_insn_1): Likewise. Don't copy each field individually. Reindent. * read-rtl.c (apply_macro_to_rtx): Use RTX_CODE_SIZE instead of RTX_SIZE. * reload1.c (eliminate_regs): Use shallow_copy_rtx. * rtl.c (rtx_size): Rename variable to... (rtx_code_size): ...this. (rtx_size): New function. (rtx_alloc_stat): Use RTX_CODE_SIZE instead of RTX_SIZE. (copy_rtx): Use shallow_copy_rtx. Don't copy each field individually. Reindent. (shallow_copy_rtx_stat): Use rtx_size instead of RTX_SIZE. * rtl.h (rtx_code_size): New variable. (rtx_size): Change from a variable to a function. (RTX_SIZE): Rename to... (RTX_CODE_SIZE): ...this. PR target/9703 PR tree-optimization/17106 * doc/tm.texi (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Document. (Anchored Addresses): New section. * doc/invoke.texi (-fsection-anchors): Document. * doc/rtl.texi (SYMBOL_REF_IN_BLOCK_P, SYMBOL_FLAG_IN_BLOCK): Likewise. (SYMBOL_REF_ANCHOR_P, SYMBOL_FLAG_ANCHOR): Likewise. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): Likewise. * hooks.c (hook_bool_mode_rtx_false): New function. * hooks.h (hook_bool_mode_rtx_false): Declare. * gengtype.c (create_optional_field): New function. (adjust_field_rtx_def): Add the "block_sym" field for SYMBOL_REFs when SYMBOL_REF_IN_BLOCK_P is true. * target.h (output_anchor, use_blocks_for_constant_p): New hooks. (min_anchor_offset, max_anchor_offset): Likewise. (use_anchors_for_symbol_p): New hook. * toplev.c (compile_file): Call output_object_blocks. (target_supports_section_anchors_p): New function. (process_options): Check that -fsection-anchors is only used on targets that support it and when -funit-at-a-time is in effect. * tree-ssa-loop-ivopts.c (prepare_decl_rtl): Only create DECL_RTL if the decl doesn't have one. * dwarf2out.c: Remove instantiations of VEC(rtx,gc). * expr.c (emit_move_multi_word, emit_move_insn): Pass the result of force_const_mem through use_anchored_address. (expand_expr_constant): New function. (expand_expr_addr_expr_1): Call it. Use the same modifier when calling expand_expr for INDIRECT_REF. (expand_expr_real_1): Pass DECL_RTL through use_anchored_address for all modifiers except EXPAND_INITIALIZER. Use expand_expr_constant. * expr.h (use_anchored_address): Declare. * loop-unroll.c: Don't declare rtx vectors here. * explow.c: Include output.h. (validize_mem): Call use_anchored_address. (use_anchored_address): New function. * common.opt (-fsection-anchors): New switch. * varasm.c (object_block_htab, anchor_labelno): New variables. (hash_section, object_block_entry_eq, object_block_entry_hash) (use_object_blocks_p, get_block_for_section, create_block_symbol) (use_blocks_for_decl_p, change_symbol_section): New functions. (get_variable_section): New function, split out from assemble_variable. (make_decl_rtl): Create a block symbol if use_object_blocks_p and use_blocks_for_decl_p say so. Use change_symbol_section if the symbol has already been created. (assemble_variable_contents): New function, split out from... (assemble_variable): ...here. Don't output any code for block symbols; just pass them to place_block_symbol. Use get_variable_section and assemble_variable_contents. (get_constant_alignment, get_constant_section, get_constant_size): New functions, split from output_constant_def_contents. (build_constant_desc): Create a block symbol if use_object_blocks_p says so. Or into SYMBOL_REF_FLAGS. (assemble_constant_contents): New function, split from... (output_constant_def_contents): ...here. Don't output any code for block symbols; just pass them to place_section_symbol. Use get_constant_section and get_constant_alignment. (force_const_mem): Create a block symbol if use_object_blocks_p and use_blocks_for_constant_p say so. Or into SYMBOL_REF_FLAGS. (output_constant_pool_1): Add an explicit alignment argument. Don't switch sections here. (output_constant_pool): Adjust call to output_constant_pool_1. Switch sections here instead. Don't output anything for block symbols; just pass them to place_block_symbol. (init_varasm_once): Initialize object_block_htab. (default_encode_section_info): Keep the old SYMBOL_FLAG_IN_BLOCK. (default_asm_output_anchor, default_use_aenchors_for_symbol_p) (place_block_symbol, get_section_anchor, output_object_block) (output_object_block_htab, output_object_blocks): New functions. * target-def.h (TARGET_ASM_OUTPUT_ANCHOR): New macro. (TARGET_ASM_OUT): Include it. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): New macro. (TARGET_MIN_ANCHOR_OFFSET, TARGET_MAX_ANCHOR_OFFSET): New macros. (TARGET_USE_ANCHORS_FOR_SYMBOL_P): New macro. (TARGET_INITIALIZER): Include them. * rtl.c (rtl_check_failed_block_symbol): New function. * rtl.h: Include vec.h. Declare heap and gc rtx vectors. (block_symbol, object_block): New structures. (rtx_def): Add a block_symbol field to the union. (BLOCK_SYMBOL_CHECK): New macro. (rtl_check_failed_block_symbol): Declare. (SYMBOL_FLAG_IN_BLOCK, SYMBOL_FLAG_ANCHOR): New SYMBOL_REF flags. (SYMBOL_REF_IN_BLOCK_P, SYMBOL_REF_ANCHOR_P): New predicates. (SYMBOL_FLAG_MACH_DEP_SHIFT): Bump by 2. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): New accessors. * output.h (output_section_symbols): Declare. (object_block): Name structure. (place_section_symbol, get_section_anchor, default_asm_output_anchor) (default_use_anchors_for_symbol_p): Declare. * Makefile.in (RTL_BASE_H): Add vec.h. (explow.o): Depend on output.h. * config/rs6000/rs6000.c (TARGET_MIN_ANCHOR_OFFSET): Override default. (TARGET_MAX_ANCHOR_OFFSET): Likewise. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise. (rs6000_use_blocks_for_constant_p): New function. From-SVN: r111254
2006-02-18 23:06:53 +01:00
/* This structure remembers the position of a SYMBOL_REF within an
object_block structure. A SYMBOL_REF only provides this information
if SYMBOL_REF_HAS_BLOCK_INFO_P is true. */
re PR target/9703 ([arm] Accessing data through constant pool more times could be solved in less instructions) * cselib.c (cselib_init): Change RTX_SIZE to RTX_CODE_SIZE. * emit-rtl.c (copy_rtx_if_shared_1): Use shallow_copy_rtx. (copy_insn_1): Likewise. Don't copy each field individually. Reindent. * read-rtl.c (apply_macro_to_rtx): Use RTX_CODE_SIZE instead of RTX_SIZE. * reload1.c (eliminate_regs): Use shallow_copy_rtx. * rtl.c (rtx_size): Rename variable to... (rtx_code_size): ...this. (rtx_size): New function. (rtx_alloc_stat): Use RTX_CODE_SIZE instead of RTX_SIZE. (copy_rtx): Use shallow_copy_rtx. Don't copy each field individually. Reindent. (shallow_copy_rtx_stat): Use rtx_size instead of RTX_SIZE. * rtl.h (rtx_code_size): New variable. (rtx_size): Change from a variable to a function. (RTX_SIZE): Rename to... (RTX_CODE_SIZE): ...this. PR target/9703 PR tree-optimization/17106 * doc/tm.texi (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Document. (Anchored Addresses): New section. * doc/invoke.texi (-fsection-anchors): Document. * doc/rtl.texi (SYMBOL_REF_IN_BLOCK_P, SYMBOL_FLAG_IN_BLOCK): Likewise. (SYMBOL_REF_ANCHOR_P, SYMBOL_FLAG_ANCHOR): Likewise. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): Likewise. * hooks.c (hook_bool_mode_rtx_false): New function. * hooks.h (hook_bool_mode_rtx_false): Declare. * gengtype.c (create_optional_field): New function. (adjust_field_rtx_def): Add the "block_sym" field for SYMBOL_REFs when SYMBOL_REF_IN_BLOCK_P is true. * target.h (output_anchor, use_blocks_for_constant_p): New hooks. (min_anchor_offset, max_anchor_offset): Likewise. (use_anchors_for_symbol_p): New hook. * toplev.c (compile_file): Call output_object_blocks. (target_supports_section_anchors_p): New function. (process_options): Check that -fsection-anchors is only used on targets that support it and when -funit-at-a-time is in effect. * tree-ssa-loop-ivopts.c (prepare_decl_rtl): Only create DECL_RTL if the decl doesn't have one. * dwarf2out.c: Remove instantiations of VEC(rtx,gc). * expr.c (emit_move_multi_word, emit_move_insn): Pass the result of force_const_mem through use_anchored_address. (expand_expr_constant): New function. (expand_expr_addr_expr_1): Call it. Use the same modifier when calling expand_expr for INDIRECT_REF. (expand_expr_real_1): Pass DECL_RTL through use_anchored_address for all modifiers except EXPAND_INITIALIZER. Use expand_expr_constant. * expr.h (use_anchored_address): Declare. * loop-unroll.c: Don't declare rtx vectors here. * explow.c: Include output.h. (validize_mem): Call use_anchored_address. (use_anchored_address): New function. * common.opt (-fsection-anchors): New switch. * varasm.c (object_block_htab, anchor_labelno): New variables. (hash_section, object_block_entry_eq, object_block_entry_hash) (use_object_blocks_p, get_block_for_section, create_block_symbol) (use_blocks_for_decl_p, change_symbol_section): New functions. (get_variable_section): New function, split out from assemble_variable. (make_decl_rtl): Create a block symbol if use_object_blocks_p and use_blocks_for_decl_p say so. Use change_symbol_section if the symbol has already been created. (assemble_variable_contents): New function, split out from... (assemble_variable): ...here. Don't output any code for block symbols; just pass them to place_block_symbol. Use get_variable_section and assemble_variable_contents. (get_constant_alignment, get_constant_section, get_constant_size): New functions, split from output_constant_def_contents. (build_constant_desc): Create a block symbol if use_object_blocks_p says so. Or into SYMBOL_REF_FLAGS. (assemble_constant_contents): New function, split from... (output_constant_def_contents): ...here. Don't output any code for block symbols; just pass them to place_section_symbol. Use get_constant_section and get_constant_alignment. (force_const_mem): Create a block symbol if use_object_blocks_p and use_blocks_for_constant_p say so. Or into SYMBOL_REF_FLAGS. (output_constant_pool_1): Add an explicit alignment argument. Don't switch sections here. (output_constant_pool): Adjust call to output_constant_pool_1. Switch sections here instead. Don't output anything for block symbols; just pass them to place_block_symbol. (init_varasm_once): Initialize object_block_htab. (default_encode_section_info): Keep the old SYMBOL_FLAG_IN_BLOCK. (default_asm_output_anchor, default_use_aenchors_for_symbol_p) (place_block_symbol, get_section_anchor, output_object_block) (output_object_block_htab, output_object_blocks): New functions. * target-def.h (TARGET_ASM_OUTPUT_ANCHOR): New macro. (TARGET_ASM_OUT): Include it. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): New macro. (TARGET_MIN_ANCHOR_OFFSET, TARGET_MAX_ANCHOR_OFFSET): New macros. (TARGET_USE_ANCHORS_FOR_SYMBOL_P): New macro. (TARGET_INITIALIZER): Include them. * rtl.c (rtl_check_failed_block_symbol): New function. * rtl.h: Include vec.h. Declare heap and gc rtx vectors. (block_symbol, object_block): New structures. (rtx_def): Add a block_symbol field to the union. (BLOCK_SYMBOL_CHECK): New macro. (rtl_check_failed_block_symbol): Declare. (SYMBOL_FLAG_IN_BLOCK, SYMBOL_FLAG_ANCHOR): New SYMBOL_REF flags. (SYMBOL_REF_IN_BLOCK_P, SYMBOL_REF_ANCHOR_P): New predicates. (SYMBOL_FLAG_MACH_DEP_SHIFT): Bump by 2. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): New accessors. * output.h (output_section_symbols): Declare. (object_block): Name structure. (place_section_symbol, get_section_anchor, default_asm_output_anchor) (default_use_anchors_for_symbol_p): Declare. * Makefile.in (RTL_BASE_H): Add vec.h. (explow.o): Depend on output.h. * config/rs6000/rs6000.c (TARGET_MIN_ANCHOR_OFFSET): Override default. (TARGET_MAX_ANCHOR_OFFSET): Likewise. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise. (rs6000_use_blocks_for_constant_p): New function. From-SVN: r111254
2006-02-18 23:06:53 +01:00
struct block_symbol GTY(()) {
/* The usual SYMBOL_REF fields. */
rtunion GTY ((skip)) fld[3];
/* The block that contains this object. */
struct object_block *block;
/* The offset of this object from the start of its block. It is negative
if the symbol has not yet been assigned an offset. */
HOST_WIDE_INT offset;
};
DEF_VEC_P(rtx);
DEF_VEC_ALLOC_P(rtx,heap);
DEF_VEC_ALLOC_P(rtx,gc);
/* Describes a group of objects that are to be placed together in such
a way that their relative positions are known. */
struct object_block GTY(())
{
/* The section in which these objects should be placed. */
section *sect;
/* The alignment of the first object, measured in bits. */
unsigned int alignment;
/* The total size of the objects, measured in bytes. */
HOST_WIDE_INT size;
/* The SYMBOL_REFs for each object. The vector is sorted in
order of increasing offset and the following conditions will
hold for each element X:
SYMBOL_REF_HAS_BLOCK_INFO_P (X)
re PR target/9703 ([arm] Accessing data through constant pool more times could be solved in less instructions) * cselib.c (cselib_init): Change RTX_SIZE to RTX_CODE_SIZE. * emit-rtl.c (copy_rtx_if_shared_1): Use shallow_copy_rtx. (copy_insn_1): Likewise. Don't copy each field individually. Reindent. * read-rtl.c (apply_macro_to_rtx): Use RTX_CODE_SIZE instead of RTX_SIZE. * reload1.c (eliminate_regs): Use shallow_copy_rtx. * rtl.c (rtx_size): Rename variable to... (rtx_code_size): ...this. (rtx_size): New function. (rtx_alloc_stat): Use RTX_CODE_SIZE instead of RTX_SIZE. (copy_rtx): Use shallow_copy_rtx. Don't copy each field individually. Reindent. (shallow_copy_rtx_stat): Use rtx_size instead of RTX_SIZE. * rtl.h (rtx_code_size): New variable. (rtx_size): Change from a variable to a function. (RTX_SIZE): Rename to... (RTX_CODE_SIZE): ...this. PR target/9703 PR tree-optimization/17106 * doc/tm.texi (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Document. (Anchored Addresses): New section. * doc/invoke.texi (-fsection-anchors): Document. * doc/rtl.texi (SYMBOL_REF_IN_BLOCK_P, SYMBOL_FLAG_IN_BLOCK): Likewise. (SYMBOL_REF_ANCHOR_P, SYMBOL_FLAG_ANCHOR): Likewise. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): Likewise. * hooks.c (hook_bool_mode_rtx_false): New function. * hooks.h (hook_bool_mode_rtx_false): Declare. * gengtype.c (create_optional_field): New function. (adjust_field_rtx_def): Add the "block_sym" field for SYMBOL_REFs when SYMBOL_REF_IN_BLOCK_P is true. * target.h (output_anchor, use_blocks_for_constant_p): New hooks. (min_anchor_offset, max_anchor_offset): Likewise. (use_anchors_for_symbol_p): New hook. * toplev.c (compile_file): Call output_object_blocks. (target_supports_section_anchors_p): New function. (process_options): Check that -fsection-anchors is only used on targets that support it and when -funit-at-a-time is in effect. * tree-ssa-loop-ivopts.c (prepare_decl_rtl): Only create DECL_RTL if the decl doesn't have one. * dwarf2out.c: Remove instantiations of VEC(rtx,gc). * expr.c (emit_move_multi_word, emit_move_insn): Pass the result of force_const_mem through use_anchored_address. (expand_expr_constant): New function. (expand_expr_addr_expr_1): Call it. Use the same modifier when calling expand_expr for INDIRECT_REF. (expand_expr_real_1): Pass DECL_RTL through use_anchored_address for all modifiers except EXPAND_INITIALIZER. Use expand_expr_constant. * expr.h (use_anchored_address): Declare. * loop-unroll.c: Don't declare rtx vectors here. * explow.c: Include output.h. (validize_mem): Call use_anchored_address. (use_anchored_address): New function. * common.opt (-fsection-anchors): New switch. * varasm.c (object_block_htab, anchor_labelno): New variables. (hash_section, object_block_entry_eq, object_block_entry_hash) (use_object_blocks_p, get_block_for_section, create_block_symbol) (use_blocks_for_decl_p, change_symbol_section): New functions. (get_variable_section): New function, split out from assemble_variable. (make_decl_rtl): Create a block symbol if use_object_blocks_p and use_blocks_for_decl_p say so. Use change_symbol_section if the symbol has already been created. (assemble_variable_contents): New function, split out from... (assemble_variable): ...here. Don't output any code for block symbols; just pass them to place_block_symbol. Use get_variable_section and assemble_variable_contents. (get_constant_alignment, get_constant_section, get_constant_size): New functions, split from output_constant_def_contents. (build_constant_desc): Create a block symbol if use_object_blocks_p says so. Or into SYMBOL_REF_FLAGS. (assemble_constant_contents): New function, split from... (output_constant_def_contents): ...here. Don't output any code for block symbols; just pass them to place_section_symbol. Use get_constant_section and get_constant_alignment. (force_const_mem): Create a block symbol if use_object_blocks_p and use_blocks_for_constant_p say so. Or into SYMBOL_REF_FLAGS. (output_constant_pool_1): Add an explicit alignment argument. Don't switch sections here. (output_constant_pool): Adjust call to output_constant_pool_1. Switch sections here instead. Don't output anything for block symbols; just pass them to place_block_symbol. (init_varasm_once): Initialize object_block_htab. (default_encode_section_info): Keep the old SYMBOL_FLAG_IN_BLOCK. (default_asm_output_anchor, default_use_aenchors_for_symbol_p) (place_block_symbol, get_section_anchor, output_object_block) (output_object_block_htab, output_object_blocks): New functions. * target-def.h (TARGET_ASM_OUTPUT_ANCHOR): New macro. (TARGET_ASM_OUT): Include it. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): New macro. (TARGET_MIN_ANCHOR_OFFSET, TARGET_MAX_ANCHOR_OFFSET): New macros. (TARGET_USE_ANCHORS_FOR_SYMBOL_P): New macro. (TARGET_INITIALIZER): Include them. * rtl.c (rtl_check_failed_block_symbol): New function. * rtl.h: Include vec.h. Declare heap and gc rtx vectors. (block_symbol, object_block): New structures. (rtx_def): Add a block_symbol field to the union. (BLOCK_SYMBOL_CHECK): New macro. (rtl_check_failed_block_symbol): Declare. (SYMBOL_FLAG_IN_BLOCK, SYMBOL_FLAG_ANCHOR): New SYMBOL_REF flags. (SYMBOL_REF_IN_BLOCK_P, SYMBOL_REF_ANCHOR_P): New predicates. (SYMBOL_FLAG_MACH_DEP_SHIFT): Bump by 2. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): New accessors. * output.h (output_section_symbols): Declare. (object_block): Name structure. (place_section_symbol, get_section_anchor, default_asm_output_anchor) (default_use_anchors_for_symbol_p): Declare. * Makefile.in (RTL_BASE_H): Add vec.h. (explow.o): Depend on output.h. * config/rs6000/rs6000.c (TARGET_MIN_ANCHOR_OFFSET): Override default. (TARGET_MAX_ANCHOR_OFFSET): Likewise. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise. (rs6000_use_blocks_for_constant_p): New function. From-SVN: r111254
2006-02-18 23:06:53 +01:00
!SYMBOL_REF_ANCHOR_P (X)
SYMBOL_REF_BLOCK (X) == [address of this structure]
SYMBOL_REF_BLOCK_OFFSET (X) >= 0. */
VEC(rtx,gc) *objects;
/* All the anchor SYMBOL_REFs used to address these objects, sorted
in order of increasing offset, and then increasing TLS model.
The following conditions will hold for each element X in this vector:
SYMBOL_REF_HAS_BLOCK_INFO_P (X)
re PR target/9703 ([arm] Accessing data through constant pool more times could be solved in less instructions) * cselib.c (cselib_init): Change RTX_SIZE to RTX_CODE_SIZE. * emit-rtl.c (copy_rtx_if_shared_1): Use shallow_copy_rtx. (copy_insn_1): Likewise. Don't copy each field individually. Reindent. * read-rtl.c (apply_macro_to_rtx): Use RTX_CODE_SIZE instead of RTX_SIZE. * reload1.c (eliminate_regs): Use shallow_copy_rtx. * rtl.c (rtx_size): Rename variable to... (rtx_code_size): ...this. (rtx_size): New function. (rtx_alloc_stat): Use RTX_CODE_SIZE instead of RTX_SIZE. (copy_rtx): Use shallow_copy_rtx. Don't copy each field individually. Reindent. (shallow_copy_rtx_stat): Use rtx_size instead of RTX_SIZE. * rtl.h (rtx_code_size): New variable. (rtx_size): Change from a variable to a function. (RTX_SIZE): Rename to... (RTX_CODE_SIZE): ...this. PR target/9703 PR tree-optimization/17106 * doc/tm.texi (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Document. (Anchored Addresses): New section. * doc/invoke.texi (-fsection-anchors): Document. * doc/rtl.texi (SYMBOL_REF_IN_BLOCK_P, SYMBOL_FLAG_IN_BLOCK): Likewise. (SYMBOL_REF_ANCHOR_P, SYMBOL_FLAG_ANCHOR): Likewise. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): Likewise. * hooks.c (hook_bool_mode_rtx_false): New function. * hooks.h (hook_bool_mode_rtx_false): Declare. * gengtype.c (create_optional_field): New function. (adjust_field_rtx_def): Add the "block_sym" field for SYMBOL_REFs when SYMBOL_REF_IN_BLOCK_P is true. * target.h (output_anchor, use_blocks_for_constant_p): New hooks. (min_anchor_offset, max_anchor_offset): Likewise. (use_anchors_for_symbol_p): New hook. * toplev.c (compile_file): Call output_object_blocks. (target_supports_section_anchors_p): New function. (process_options): Check that -fsection-anchors is only used on targets that support it and when -funit-at-a-time is in effect. * tree-ssa-loop-ivopts.c (prepare_decl_rtl): Only create DECL_RTL if the decl doesn't have one. * dwarf2out.c: Remove instantiations of VEC(rtx,gc). * expr.c (emit_move_multi_word, emit_move_insn): Pass the result of force_const_mem through use_anchored_address. (expand_expr_constant): New function. (expand_expr_addr_expr_1): Call it. Use the same modifier when calling expand_expr for INDIRECT_REF. (expand_expr_real_1): Pass DECL_RTL through use_anchored_address for all modifiers except EXPAND_INITIALIZER. Use expand_expr_constant. * expr.h (use_anchored_address): Declare. * loop-unroll.c: Don't declare rtx vectors here. * explow.c: Include output.h. (validize_mem): Call use_anchored_address. (use_anchored_address): New function. * common.opt (-fsection-anchors): New switch. * varasm.c (object_block_htab, anchor_labelno): New variables. (hash_section, object_block_entry_eq, object_block_entry_hash) (use_object_blocks_p, get_block_for_section, create_block_symbol) (use_blocks_for_decl_p, change_symbol_section): New functions. (get_variable_section): New function, split out from assemble_variable. (make_decl_rtl): Create a block symbol if use_object_blocks_p and use_blocks_for_decl_p say so. Use change_symbol_section if the symbol has already been created. (assemble_variable_contents): New function, split out from... (assemble_variable): ...here. Don't output any code for block symbols; just pass them to place_block_symbol. Use get_variable_section and assemble_variable_contents. (get_constant_alignment, get_constant_section, get_constant_size): New functions, split from output_constant_def_contents. (build_constant_desc): Create a block symbol if use_object_blocks_p says so. Or into SYMBOL_REF_FLAGS. (assemble_constant_contents): New function, split from... (output_constant_def_contents): ...here. Don't output any code for block symbols; just pass them to place_section_symbol. Use get_constant_section and get_constant_alignment. (force_const_mem): Create a block symbol if use_object_blocks_p and use_blocks_for_constant_p say so. Or into SYMBOL_REF_FLAGS. (output_constant_pool_1): Add an explicit alignment argument. Don't switch sections here. (output_constant_pool): Adjust call to output_constant_pool_1. Switch sections here instead. Don't output anything for block symbols; just pass them to place_block_symbol. (init_varasm_once): Initialize object_block_htab. (default_encode_section_info): Keep the old SYMBOL_FLAG_IN_BLOCK. (default_asm_output_anchor, default_use_aenchors_for_symbol_p) (place_block_symbol, get_section_anchor, output_object_block) (output_object_block_htab, output_object_blocks): New functions. * target-def.h (TARGET_ASM_OUTPUT_ANCHOR): New macro. (TARGET_ASM_OUT): Include it. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): New macro. (TARGET_MIN_ANCHOR_OFFSET, TARGET_MAX_ANCHOR_OFFSET): New macros. (TARGET_USE_ANCHORS_FOR_SYMBOL_P): New macro. (TARGET_INITIALIZER): Include them. * rtl.c (rtl_check_failed_block_symbol): New function. * rtl.h: Include vec.h. Declare heap and gc rtx vectors. (block_symbol, object_block): New structures. (rtx_def): Add a block_symbol field to the union. (BLOCK_SYMBOL_CHECK): New macro. (rtl_check_failed_block_symbol): Declare. (SYMBOL_FLAG_IN_BLOCK, SYMBOL_FLAG_ANCHOR): New SYMBOL_REF flags. (SYMBOL_REF_IN_BLOCK_P, SYMBOL_REF_ANCHOR_P): New predicates. (SYMBOL_FLAG_MACH_DEP_SHIFT): Bump by 2. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): New accessors. * output.h (output_section_symbols): Declare. (object_block): Name structure. (place_section_symbol, get_section_anchor, default_asm_output_anchor) (default_use_anchors_for_symbol_p): Declare. * Makefile.in (RTL_BASE_H): Add vec.h. (explow.o): Depend on output.h. * config/rs6000/rs6000.c (TARGET_MIN_ANCHOR_OFFSET): Override default. (TARGET_MAX_ANCHOR_OFFSET): Likewise. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise. (rs6000_use_blocks_for_constant_p): New function. From-SVN: r111254
2006-02-18 23:06:53 +01:00
SYMBOL_REF_ANCHOR_P (X)
SYMBOL_REF_BLOCK (X) == [address of this structure]
SYMBOL_REF_BLOCK_OFFSET (X) >= 0. */
VEC(rtx,gc) *anchors;
};
1991-12-06 22:00:31 +01:00
/* RTL expression ("rtx"). */
struct rtx_def GTY((chain_next ("RTX_NEXT (&%h)"),
Index: gcc/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * ggc-common.c (ggc_mark_rtx_children_1): Update for changed name mangling. The following changes are merged from pch-branch: * doc/gty.texi (GTY Options): Document %a. * gengtype.c (do_scalar_typedef): New function. (process_gc_options): Handle `length' option. (set_gc_used_type): A pointer to an array of structures doesn't qualify as a pointer to a structure. (output_escaped_param): Add `%a' escape. (write_gc_structure_fields): Allow 'desc' on array of unions. (main): Define `uint8', `jword' and `JCF_u2' as scalars; use do_scalar_typedef. * gengtype.c (enum rtx_code): Make global. (rtx_format): Make global. (rtx_next): New. (gen_rtx_next): New. (write_rtx_next): New. (adjust_field_rtx_def): Skip fields marked by chain_next. (open_base_files): Delete redundant prototype. (write_enum_defn): New. (output_mangled_typename): Correct abort call. (write_gc_marker_routine_for_structure): Handle chain_next and chain_prev options. (finish_root_table): Don't output redundant \n. (main): Call gen_rtx_next, write_rtx_next, write_enum_defn. * c-tree.h (union lang_tree_node): Add chain_next option. * gengtype.h (NUM_PARAM): New definition. (struct type): For TYPE_PARAM_STRUCT, allow multiple parameters. * gengtype.c (find_param_structure): New. (adjust_field_type): Handle param<n>_is option. (process_gc_options): Detect use_params option. Update callers. (set_gc_used_type): Add 'param' parameter, update callers. Handle 'use_params' option. (open_base_files): Add splay-tree.h to list of files included. (output_mangled_typename): New. (write_gc_structure_fields): Update 'param' parameter to support multiple parameters. Change name mangling. Allow parameterized fields to have an apparent scalar type. Handle param<n>_is options, use_param option. (write_gc_marker_routine_for_structure): Update for change to name mangling. Better guess the output file for parameterized types. (write_gc_types): Update for change to name mangling. (write_gc_root): Update for change to name mangling. Handle (ignore) param<n>_is options. * doc/gty.texi (GTY Options): Add description of param<n>_is options, use_params option. * ggc.h (ggc_mark_rtx): Update for changed name mangling. * gengtype-lex.l: Produce token for param<n>_is. * gengtype-yacc.y: Parse param<n>_is. * gengtype.c (adjust_field_tree_exp): Don't name a variable 'rindex'. * rtl.c: Update comment describing rtx_format. * rtl.h (union rtunion): Separate definition and typedef. (struct rtx_def): Use gengtype to mark. * Makefile.in (gengtype.o): Also depend on rtl.def. * ggc.h (ggc_mark_rtx_children): Delete prototype. (ggc_mark_rtx): Change to alias of gengtype-generated routine. * ggc-common.c (ggc_mark_rtx_children): Delete. (ggc_mark_rtx_children_1): Delete. (gt_ggc_m_rtx_def): Delete. * gengtype.c (adjust_field_rtx_def): New. (adjust_field_type): Call adjust_field_rtx_def. (write_gc_structure_fields): Add 'default' case to switch if none is specified; remove unused code. * tree.h (struct tree_exp): Update for change to meaning of special. * gengtype.c (adjust_field_tree_exp): New function. (adjust_field_type): Handle `tree_exp' special here. (write_gc_structure_fields): Don't handle `tree_exp' special here. Handle new `dot' option. * gengtype.h: Make `info' a pointer-to-const. * gengtype-yacc.y (yacc_ids): Use xasprintf. * gengtype.c (write_gc_structure_fields): Remove implementation of `always' option, add `default' option. * doc/gty.texi (GTY Options): Remove documentation of `always', add `default'. Index: gcc/cp/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * cp-tree.h (union lang_tree_node): Add chain_next option. Index: gcc/f/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * com.c (union lang_tree_node): Add chain_next option. Index: gcc/java/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * java-tree.h (union lang_tree_node): Add chain_next option. From-SVN: r57206
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. */
ENUM_BITFIELD(rtx_code) code: 16;
1991-12-06 22:00:31 +01:00
/* The kind of value the expression has. */
ENUM_BITFIELD(machine_mode) mode : 8;
/* 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.
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;
/* 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;
/* 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.
1 in a CALL_INSN, NOTE, or EXPR_LIST for a const or pure call.
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;
/* 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.
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;
/* 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.
1 in a SUBREG expression if was generated from a variable with a
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 an INSN, JUMP_INSN or CALL_INSN if this insn must be scheduled
together with the preceding insn. Valid only within sched.
1991-12-06 22:00:31 +01:00
1 in an INSN, JUMP_INSN, or CALL_INSN if insn is in a delay slot and
from the target of a branch. Valid from reorg until end of compilation;
cse.c (CHEAP_REGNO): Redefine using REGNO_PTR_FRAME_P and HARD_REGISTER_NUM_P. * cse.c (CHEAP_REGNO): Redefine using REGNO_PTR_FRAME_P and HARD_REGISTER_NUM_P. * cselib.c (new_cselib_val): Make comment correct and more detailed. * flow.c (mark_set_1): Likewise. * except.c (duplicate_eh_region_1, duplicate_eh_region_2, duplicate_eh_regions): Remove. * except.h (duplicate_eh_regions): Remove prototype. * integrate.c (get_label_from_map, copy_rtx_and_substitute, global_const_equiv_varray): Remove. * integrate.h (get_label_from_map, copy_rtx_and_substitute, global_const_equiv_varray, set_label_in_map): Remove prototypes, extern declaration, and #define. (MAYBE_EXTEND_CONST_EQUIV_VARRAY, SET_CONST_EQUIV_DATA): Remove. (struct inline_remap): Remove. * varray.c (struct element): Remove entry for const_equiv_data. * varray.h (struct const_equiv_data): Remove. (enum varray_data_enum) <VARRAY_DATA_CONST_EQUIV>: Remove. (union varray_data_tag) <const_equiv>: Remove. (VARRAY_CONST_EQUIV_INIT, VARRAY_CONST_EQUIV, VARRAY_PUSH_CONST_EQUIV, VARRAY_TOP_CONST_EQUIV): Remove. * regstack.c (record_label_references): Remove unused function. * rtl.def (VALUE): Update comment. (LABEL_REF): Remove unused operand 2. * rtl.h (struct rtx_def): Update for removed accessor macros. (XCADVFLAGS, INSN_DEAD_CODE_P, LINE_NUMBER, CONTAINING_INSN, REG_LOOP_TEST_P): Remove. (ADDR_DIFF_VEC_FLAGS, CSELIB_VAL_PTR, LABEL_NEXTREF): Add comments. * web.c (entry_register): Don't copy REG_LOOP_TEST_P. * doc/rtl.texi (INSN_DEAD_CODE_P, REG_LOOP_TEST_P): Remove. From-SVN: r90580
2004-11-13 15:18:04 +01:00
cleared before used. */
1991-12-06 22:00:31 +01:00
unsigned int in_struct : 1;
/* At the end of RTL generation, 1 if this rtx is used. This is used for
copying shared structure. See `unshare_all_rtl'.
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'.
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;
/* 1 in an INSN or a SET if this rtx is related to the call frame,
rtl.h (rtx_def): Update documentation. * rtl.h (rtx_def): Update documentation. (MEM_IN_STRUCT_P): Likewise. (MEM_SCALAR_P): New macro. (MEM_COPY_ATTRIBUTES): Likewise. (MEM_SET_IN_STRUCT_P): Likewise. * rtl.texi (MEM_SCALAR_P): Document. * alias.c (canon_rtx): Use MEM_COPY_ATTRIBUTES. (fixed_scalar_and_varying_struct_p): New function. Use MEM_SCALAR_P rather than !MEM_IN_STRUCT_P. (aliases_everything_p): Likewise. (true_dependence): Use them. (write_dependence_p): New function, containing code common to anti_dependence and output_dependence. (anti_dependence): Use it. (output_dependence): Likewise. * calls.c (save_fixed_argument_area): Don't clear MEM_IN_STRUCT_P. (expand_call): Use MEM_SET_IN_STRUCT_P. (emit_library_call): Don't clear MEM_IN_STRUCT_P. (emit_library_call_value): Likewise. (store_one_arg): Use MEM_SET_IN_STRUCT_P. * combine.c (simplify_rtx): Use MEM_COPY_ATTRIBUTES. (make_extraction): Likewise. (simplify_shift_const): Likewise. (gen_lowpart_for_combine): Likewise. * cse.c (gen_lowpart_if_possible): Use MEM_COPY_ATTRIBUTES. * emit-rtl.c (operand_subword): Likewise. (change_address): Likewise. * explow.c (stabilize): Use MEM_COPY_ATTRIBUTES. * expr.c (protect_from_queue): Use MEM_COPY_ATTRIBUTES. (emit_group_store): Use MEM_SET_IN_STRUCT_P. (copy_blkmode_from_reg): Likewise. (store_field): Likewise. (expand_expr): Remove bogus guesswork setting MEM_IN_STRUCT_P heuristically. Use MEM_SET_IN_STRUCT_P. (get_memory_rtx): Likewise. * final.c (alter_subreg): Use MEM_COPY_ATTRIBUTES. * function.c (assign_stack_temp): Clear MEM_SCALAR_P and MEM_ALIAS_SET on newly returned MEMs. (assign_temp): Use MEM_SET_IN_STRUCT_P. (put_reg_into_stack): Likewise. (fixup_var_refs1): Use MEM_COPY_ATTRIBUTES. (gen_mem_addressof): Use MEM_SET_IN_STRUCT_P. (assign_parms): Likewise. (expand_function): Likewise. * integrate.c (expand_inline_function): Likewise. (copy_rtx_and_substitute): Use MEM_COPY_ATTRIBUTES. * loop.c (note_addr_stored): Remove check on MEM_IN_STRUCT_P. * optabs.c (gen_move_insn): Use MEM_COPY_ATTRIBUTES. * print-rtl.c (print_rtx): Print /f for frame_related. * recog.c (validate_replace_rtx_1): Use MEM_COPY_ATTRIBUTES. * reload1.c (reload): Copy MEM_SCALAR_P as well. * stmt.c (expand_decl): Use MEM_SET_IN_STRUCT_P. (expand_anon_union_decl): Use MEM_COPY_ATTRIBUTES. * varasm.c (make_decl_rtl): Use MEM_SET_IN_STRUCT_P. (output_constant_def): Likewise. * a29k.c (a29k_set_memflags_1): Take scalar_p. Set MEM_SCALAR_P. (a29k_set_memflags): Use it. * alpha.c (get_aligned_mem): Use MEM_COPY_ATTRIBUTES. * c4x.c (c4x_scan_for_ld): Likewise. * h8300.c (fix_bit_operand): Likewise. * m88k.c (legitimize_address): Likewise. (block_move_loop): Likewise. (block_move_no_loop): Likewise. (block_move_sequence): Likewise. (m88k_builtin_saveregs): Use MEM_SET_IN_STRUCT_P. * mips/abi64.h (SETUP_INCOMING_VARARGS): Likewise. * rs6000.c (expand_block_move_insn): Use MEM_COPY_ATTRIBUTES. * sh.c (sh_builtin_saveregs): Use MEM_SET_IN_STRUCT_P. * arm.h (arm_gen_load_multiple): Take scalar_p. (arm_store_load_multiple): Likewise. * arm.c (arm_gen_load_multiple): Likewise. (arm_gen_store_multiple): Likewise. (arm_gen_movstrqi): Treat MEM_SCALAR_P like MEM_IN_STRUCT_P. From-SVN: r24759
1999-01-19 11:32:33 +01:00
either changing how we compute the frame address or saving and
restoring registers in the prologue and epilogue.
1 in a REG or MEM if it is a pointer.
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;
/* 1 in a REG or PARALLEL that is the current function's return value.
1 in a MEM if it refers to a scalar.
1 in a SYMBOL_REF for a weak symbol. */
unsigned return_val : 1;
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. */
union u {
rtunion fld[1];
HOST_WIDE_INT hwint[1];
re PR target/9703 ([arm] Accessing data through constant pool more times could be solved in less instructions) * cselib.c (cselib_init): Change RTX_SIZE to RTX_CODE_SIZE. * emit-rtl.c (copy_rtx_if_shared_1): Use shallow_copy_rtx. (copy_insn_1): Likewise. Don't copy each field individually. Reindent. * read-rtl.c (apply_macro_to_rtx): Use RTX_CODE_SIZE instead of RTX_SIZE. * reload1.c (eliminate_regs): Use shallow_copy_rtx. * rtl.c (rtx_size): Rename variable to... (rtx_code_size): ...this. (rtx_size): New function. (rtx_alloc_stat): Use RTX_CODE_SIZE instead of RTX_SIZE. (copy_rtx): Use shallow_copy_rtx. Don't copy each field individually. Reindent. (shallow_copy_rtx_stat): Use rtx_size instead of RTX_SIZE. * rtl.h (rtx_code_size): New variable. (rtx_size): Change from a variable to a function. (RTX_SIZE): Rename to... (RTX_CODE_SIZE): ...this. PR target/9703 PR tree-optimization/17106 * doc/tm.texi (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Document. (Anchored Addresses): New section. * doc/invoke.texi (-fsection-anchors): Document. * doc/rtl.texi (SYMBOL_REF_IN_BLOCK_P, SYMBOL_FLAG_IN_BLOCK): Likewise. (SYMBOL_REF_ANCHOR_P, SYMBOL_FLAG_ANCHOR): Likewise. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): Likewise. * hooks.c (hook_bool_mode_rtx_false): New function. * hooks.h (hook_bool_mode_rtx_false): Declare. * gengtype.c (create_optional_field): New function. (adjust_field_rtx_def): Add the "block_sym" field for SYMBOL_REFs when SYMBOL_REF_IN_BLOCK_P is true. * target.h (output_anchor, use_blocks_for_constant_p): New hooks. (min_anchor_offset, max_anchor_offset): Likewise. (use_anchors_for_symbol_p): New hook. * toplev.c (compile_file): Call output_object_blocks. (target_supports_section_anchors_p): New function. (process_options): Check that -fsection-anchors is only used on targets that support it and when -funit-at-a-time is in effect. * tree-ssa-loop-ivopts.c (prepare_decl_rtl): Only create DECL_RTL if the decl doesn't have one. * dwarf2out.c: Remove instantiations of VEC(rtx,gc). * expr.c (emit_move_multi_word, emit_move_insn): Pass the result of force_const_mem through use_anchored_address. (expand_expr_constant): New function. (expand_expr_addr_expr_1): Call it. Use the same modifier when calling expand_expr for INDIRECT_REF. (expand_expr_real_1): Pass DECL_RTL through use_anchored_address for all modifiers except EXPAND_INITIALIZER. Use expand_expr_constant. * expr.h (use_anchored_address): Declare. * loop-unroll.c: Don't declare rtx vectors here. * explow.c: Include output.h. (validize_mem): Call use_anchored_address. (use_anchored_address): New function. * common.opt (-fsection-anchors): New switch. * varasm.c (object_block_htab, anchor_labelno): New variables. (hash_section, object_block_entry_eq, object_block_entry_hash) (use_object_blocks_p, get_block_for_section, create_block_symbol) (use_blocks_for_decl_p, change_symbol_section): New functions. (get_variable_section): New function, split out from assemble_variable. (make_decl_rtl): Create a block symbol if use_object_blocks_p and use_blocks_for_decl_p say so. Use change_symbol_section if the symbol has already been created. (assemble_variable_contents): New function, split out from... (assemble_variable): ...here. Don't output any code for block symbols; just pass them to place_block_symbol. Use get_variable_section and assemble_variable_contents. (get_constant_alignment, get_constant_section, get_constant_size): New functions, split from output_constant_def_contents. (build_constant_desc): Create a block symbol if use_object_blocks_p says so. Or into SYMBOL_REF_FLAGS. (assemble_constant_contents): New function, split from... (output_constant_def_contents): ...here. Don't output any code for block symbols; just pass them to place_section_symbol. Use get_constant_section and get_constant_alignment. (force_const_mem): Create a block symbol if use_object_blocks_p and use_blocks_for_constant_p say so. Or into SYMBOL_REF_FLAGS. (output_constant_pool_1): Add an explicit alignment argument. Don't switch sections here. (output_constant_pool): Adjust call to output_constant_pool_1. Switch sections here instead. Don't output anything for block symbols; just pass them to place_block_symbol. (init_varasm_once): Initialize object_block_htab. (default_encode_section_info): Keep the old SYMBOL_FLAG_IN_BLOCK. (default_asm_output_anchor, default_use_aenchors_for_symbol_p) (place_block_symbol, get_section_anchor, output_object_block) (output_object_block_htab, output_object_blocks): New functions. * target-def.h (TARGET_ASM_OUTPUT_ANCHOR): New macro. (TARGET_ASM_OUT): Include it. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): New macro. (TARGET_MIN_ANCHOR_OFFSET, TARGET_MAX_ANCHOR_OFFSET): New macros. (TARGET_USE_ANCHORS_FOR_SYMBOL_P): New macro. (TARGET_INITIALIZER): Include them. * rtl.c (rtl_check_failed_block_symbol): New function. * rtl.h: Include vec.h. Declare heap and gc rtx vectors. (block_symbol, object_block): New structures. (rtx_def): Add a block_symbol field to the union. (BLOCK_SYMBOL_CHECK): New macro. (rtl_check_failed_block_symbol): Declare. (SYMBOL_FLAG_IN_BLOCK, SYMBOL_FLAG_ANCHOR): New SYMBOL_REF flags. (SYMBOL_REF_IN_BLOCK_P, SYMBOL_REF_ANCHOR_P): New predicates. (SYMBOL_FLAG_MACH_DEP_SHIFT): Bump by 2. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): New accessors. * output.h (output_section_symbols): Declare. (object_block): Name structure. (place_section_symbol, get_section_anchor, default_asm_output_anchor) (default_use_anchors_for_symbol_p): Declare. * Makefile.in (RTL_BASE_H): Add vec.h. (explow.o): Depend on output.h. * config/rs6000/rs6000.c (TARGET_MIN_ANCHOR_OFFSET): Override default. (TARGET_MAX_ANCHOR_OFFSET): Likewise. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise. (rs6000_use_blocks_for_constant_p): New function. From-SVN: r111254
2006-02-18 23:06:53 +01:00
struct block_symbol block_sym;
struct real_value rv;
} GTY ((special ("rtx_def"), desc ("GET_CODE (&%0)"))) u;
};
1991-12-06 22:00:31 +01: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. */
re PR target/9703 ([arm] Accessing data through constant pool more times could be solved in less instructions) * cselib.c (cselib_init): Change RTX_SIZE to RTX_CODE_SIZE. * emit-rtl.c (copy_rtx_if_shared_1): Use shallow_copy_rtx. (copy_insn_1): Likewise. Don't copy each field individually. Reindent. * read-rtl.c (apply_macro_to_rtx): Use RTX_CODE_SIZE instead of RTX_SIZE. * reload1.c (eliminate_regs): Use shallow_copy_rtx. * rtl.c (rtx_size): Rename variable to... (rtx_code_size): ...this. (rtx_size): New function. (rtx_alloc_stat): Use RTX_CODE_SIZE instead of RTX_SIZE. (copy_rtx): Use shallow_copy_rtx. Don't copy each field individually. Reindent. (shallow_copy_rtx_stat): Use rtx_size instead of RTX_SIZE. * rtl.h (rtx_code_size): New variable. (rtx_size): Change from a variable to a function. (RTX_SIZE): Rename to... (RTX_CODE_SIZE): ...this. PR target/9703 PR tree-optimization/17106 * doc/tm.texi (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Document. (Anchored Addresses): New section. * doc/invoke.texi (-fsection-anchors): Document. * doc/rtl.texi (SYMBOL_REF_IN_BLOCK_P, SYMBOL_FLAG_IN_BLOCK): Likewise. (SYMBOL_REF_ANCHOR_P, SYMBOL_FLAG_ANCHOR): Likewise. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): Likewise. * hooks.c (hook_bool_mode_rtx_false): New function. * hooks.h (hook_bool_mode_rtx_false): Declare. * gengtype.c (create_optional_field): New function. (adjust_field_rtx_def): Add the "block_sym" field for SYMBOL_REFs when SYMBOL_REF_IN_BLOCK_P is true. * target.h (output_anchor, use_blocks_for_constant_p): New hooks. (min_anchor_offset, max_anchor_offset): Likewise. (use_anchors_for_symbol_p): New hook. * toplev.c (compile_file): Call output_object_blocks. (target_supports_section_anchors_p): New function. (process_options): Check that -fsection-anchors is only used on targets that support it and when -funit-at-a-time is in effect. * tree-ssa-loop-ivopts.c (prepare_decl_rtl): Only create DECL_RTL if the decl doesn't have one. * dwarf2out.c: Remove instantiations of VEC(rtx,gc). * expr.c (emit_move_multi_word, emit_move_insn): Pass the result of force_const_mem through use_anchored_address. (expand_expr_constant): New function. (expand_expr_addr_expr_1): Call it. Use the same modifier when calling expand_expr for INDIRECT_REF. (expand_expr_real_1): Pass DECL_RTL through use_anchored_address for all modifiers except EXPAND_INITIALIZER. Use expand_expr_constant. * expr.h (use_anchored_address): Declare. * loop-unroll.c: Don't declare rtx vectors here. * explow.c: Include output.h. (validize_mem): Call use_anchored_address. (use_anchored_address): New function. * common.opt (-fsection-anchors): New switch. * varasm.c (object_block_htab, anchor_labelno): New variables. (hash_section, object_block_entry_eq, object_block_entry_hash) (use_object_blocks_p, get_block_for_section, create_block_symbol) (use_blocks_for_decl_p, change_symbol_section): New functions. (get_variable_section): New function, split out from assemble_variable. (make_decl_rtl): Create a block symbol if use_object_blocks_p and use_blocks_for_decl_p say so. Use change_symbol_section if the symbol has already been created. (assemble_variable_contents): New function, split out from... (assemble_variable): ...here. Don't output any code for block symbols; just pass them to place_block_symbol. Use get_variable_section and assemble_variable_contents. (get_constant_alignment, get_constant_section, get_constant_size): New functions, split from output_constant_def_contents. (build_constant_desc): Create a block symbol if use_object_blocks_p says so. Or into SYMBOL_REF_FLAGS. (assemble_constant_contents): New function, split from... (output_constant_def_contents): ...here. Don't output any code for block symbols; just pass them to place_section_symbol. Use get_constant_section and get_constant_alignment. (force_const_mem): Create a block symbol if use_object_blocks_p and use_blocks_for_constant_p say so. Or into SYMBOL_REF_FLAGS. (output_constant_pool_1): Add an explicit alignment argument. Don't switch sections here. (output_constant_pool): Adjust call to output_constant_pool_1. Switch sections here instead. Don't output anything for block symbols; just pass them to place_block_symbol. (init_varasm_once): Initialize object_block_htab. (default_encode_section_info): Keep the old SYMBOL_FLAG_IN_BLOCK. (default_asm_output_anchor, default_use_aenchors_for_symbol_p) (place_block_symbol, get_section_anchor, output_object_block) (output_object_block_htab, output_object_blocks): New functions. * target-def.h (TARGET_ASM_OUTPUT_ANCHOR): New macro. (TARGET_ASM_OUT): Include it. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): New macro. (TARGET_MIN_ANCHOR_OFFSET, TARGET_MAX_ANCHOR_OFFSET): New macros. (TARGET_USE_ANCHORS_FOR_SYMBOL_P): New macro. (TARGET_INITIALIZER): Include them. * rtl.c (rtl_check_failed_block_symbol): New function. * rtl.h: Include vec.h. Declare heap and gc rtx vectors. (block_symbol, object_block): New structures. (rtx_def): Add a block_symbol field to the union. (BLOCK_SYMBOL_CHECK): New macro. (rtl_check_failed_block_symbol): Declare. (SYMBOL_FLAG_IN_BLOCK, SYMBOL_FLAG_ANCHOR): New SYMBOL_REF flags. (SYMBOL_REF_IN_BLOCK_P, SYMBOL_REF_ANCHOR_P): New predicates. (SYMBOL_FLAG_MACH_DEP_SHIFT): Bump by 2. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): New accessors. * output.h (output_section_symbols): Declare. (object_block): Name structure. (place_section_symbol, get_section_anchor, default_asm_output_anchor) (default_use_anchors_for_symbol_p): Declare. * Makefile.in (RTL_BASE_H): Add vec.h. (explow.o): Depend on output.h. * config/rs6000/rs6000.c (TARGET_MIN_ANCHOR_OFFSET): Override default. (TARGET_MAX_ANCHOR_OFFSET): Likewise. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise. (rs6000_use_blocks_for_constant_p): New function. From-SVN: r111254
2006-02-18 23:06:53 +01:00
#define RTX_CODE_SIZE(CODE) rtx_code_size[CODE]
1991-12-06 22:00:31 +01:00
#define NULL_RTX (rtx) 0
Index: gcc/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * ggc-common.c (ggc_mark_rtx_children_1): Update for changed name mangling. The following changes are merged from pch-branch: * doc/gty.texi (GTY Options): Document %a. * gengtype.c (do_scalar_typedef): New function. (process_gc_options): Handle `length' option. (set_gc_used_type): A pointer to an array of structures doesn't qualify as a pointer to a structure. (output_escaped_param): Add `%a' escape. (write_gc_structure_fields): Allow 'desc' on array of unions. (main): Define `uint8', `jword' and `JCF_u2' as scalars; use do_scalar_typedef. * gengtype.c (enum rtx_code): Make global. (rtx_format): Make global. (rtx_next): New. (gen_rtx_next): New. (write_rtx_next): New. (adjust_field_rtx_def): Skip fields marked by chain_next. (open_base_files): Delete redundant prototype. (write_enum_defn): New. (output_mangled_typename): Correct abort call. (write_gc_marker_routine_for_structure): Handle chain_next and chain_prev options. (finish_root_table): Don't output redundant \n. (main): Call gen_rtx_next, write_rtx_next, write_enum_defn. * c-tree.h (union lang_tree_node): Add chain_next option. * gengtype.h (NUM_PARAM): New definition. (struct type): For TYPE_PARAM_STRUCT, allow multiple parameters. * gengtype.c (find_param_structure): New. (adjust_field_type): Handle param<n>_is option. (process_gc_options): Detect use_params option. Update callers. (set_gc_used_type): Add 'param' parameter, update callers. Handle 'use_params' option. (open_base_files): Add splay-tree.h to list of files included. (output_mangled_typename): New. (write_gc_structure_fields): Update 'param' parameter to support multiple parameters. Change name mangling. Allow parameterized fields to have an apparent scalar type. Handle param<n>_is options, use_param option. (write_gc_marker_routine_for_structure): Update for change to name mangling. Better guess the output file for parameterized types. (write_gc_types): Update for change to name mangling. (write_gc_root): Update for change to name mangling. Handle (ignore) param<n>_is options. * doc/gty.texi (GTY Options): Add description of param<n>_is options, use_params option. * ggc.h (ggc_mark_rtx): Update for changed name mangling. * gengtype-lex.l: Produce token for param<n>_is. * gengtype-yacc.y: Parse param<n>_is. * gengtype.c (adjust_field_tree_exp): Don't name a variable 'rindex'. * rtl.c: Update comment describing rtx_format. * rtl.h (union rtunion): Separate definition and typedef. (struct rtx_def): Use gengtype to mark. * Makefile.in (gengtype.o): Also depend on rtl.def. * ggc.h (ggc_mark_rtx_children): Delete prototype. (ggc_mark_rtx): Change to alias of gengtype-generated routine. * ggc-common.c (ggc_mark_rtx_children): Delete. (ggc_mark_rtx_children_1): Delete. (gt_ggc_m_rtx_def): Delete. * gengtype.c (adjust_field_rtx_def): New. (adjust_field_type): Call adjust_field_rtx_def. (write_gc_structure_fields): Add 'default' case to switch if none is specified; remove unused code. * tree.h (struct tree_exp): Update for change to meaning of special. * gengtype.c (adjust_field_tree_exp): New function. (adjust_field_type): Handle `tree_exp' special here. (write_gc_structure_fields): Don't handle `tree_exp' special here. Handle new `dot' option. * gengtype.h: Make `info' a pointer-to-const. * gengtype-yacc.y (yacc_ids): Use xasprintf. * gengtype.c (write_gc_structure_fields): Remove implementation of `always' option, add `default' option. * doc/gty.texi (GTY Options): Remove documentation of `always', add `default'. Index: gcc/cp/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * cp-tree.h (union lang_tree_node): Add chain_next option. Index: gcc/f/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * com.c (union lang_tree_node): Add chain_next option. Index: gcc/java/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * java-tree.h (union lang_tree_node): Add chain_next option. From-SVN: r57206
2002-09-16 20:33:23 +02:00
/* The "next" and "previous" RTX, relative to this one. */
#define RTX_NEXT(X) (rtx_next[GET_CODE (X)] == 0 ? NULL \
: *(rtx *)(((char *)X) + rtx_next[GET_CODE (X)]))
/* FIXME: the "NEXT_INSN (PREV_INSN (X)) == X" condition shouldn't be needed.
*/
alias.c (nonlocal_mentioned_p, [...]): Use, LABEL_P, JUMP_P, CALL_P, NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P. 2004-07-08 Jerry Quinn <jlquinn@optonline.net> * alias.c (nonlocal_mentioned_p, nonlocal_referenced_p, nonlocal_set_p, init_alias_analysis): Use, LABEL_P, JUMP_P, CALL_P, NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P. * bb-reorder.c (mark_bb_for_unlikely_executed_section, add_labels_and_missing_jumps, find_jump_block, fix_crossing_unconditional_branches, add_reg_crossing_jump_notes): Likewise. * bt-load.c (btr_referenced_p, compute_defs_uses_and_gen, link_btr_uses, move_btr_def): Likewise. * builtins.c (expand_builtin_longjmp, expand_builtin_nonlocal_goto, expand_builtin_expect_jump): Likewise. * caller-save.c (save_call_clobbered_regs, insert_one_insn): Likewise. * calls.c (expand_call, emit_library_call_value_1): Likewise. * cfganal.c (forwarder_block_p): Likewise. * cfgbuild.c (inside_basic_block_p, count_basic_blocks, make_label_edge, rtl_make_eh_edge, make_edges, find_basic_blocks_1, find_bb_boundaries): Likewise. * cfgcleanup.c (try_simplify_condjump, try_forward_edges, merge_blocks_move_predecessor_nojumps, merge_blocks_move_successor_nojumps, insns_match_p, flow_find_cross_jump, outgoing_edges_match, try_crossjump_to_edge, try_optimize_cfg): Likewise. * cfgexpand.c (expand_block, construct_exit_block): Likewise. * cfglayout.c (skip_insns_after_block, label_for_bb, record_effective_endpoints, insn_locators_initialize, fixup_reorder_chain, update_unlikely_executed_notes): Likewise. * cfgmainloop.c (create_loop_notes): Likewise. * cfgrtl.c (delete_insn, delete_insn_chain, create_basic_block_structure, rtl_delete_block, free_bb_for_insn, update_bb_for_insn, rtl_merge_blocks, rtl_can_merge_blocks, block_label, try_redirect_by_replacing_jump, last_loop_beg_note, redirect_branch_edge, force_nonfallthru_and_redirect, rtl_tidy_fallthru_edge, back_edge_of_syntactic_loop_p, rtl_split_edge, commit_one_edge_insertion, print_rtl_with_bb, update_br_prob_note, rtl_verify_flow_info_1, rtl_verify_flow_info, purge_dead_edges, cfg_layout_redirect_edge_and_branch, cfg_layout_delete_block, cfg_layout_can_merge_blocks_p, cfg_layout_merge_blocks, rtl_block_ends_with_call_p, need_fake_edge_p, rtl_flow_call_edges_add): Likewise. * combine.c (combine_instructions, can_combine_p, try_combine, find_split_point, record_dead_and_set_regs, reg_dead_at_p, distribute_notes, distribute_links, insn_cuid): Likewise. * cse.c (fold_rtx, cse_insn, cse_around_loop, invalidate_skipped_block, cse_set_around_loop, cse_end_of_basic_block, cse_main, cse_basic_block, cse_condition_code_reg): Likewise. * cselib.c (cselib_process_insn): Likewise. * ddg.c (create_ddg): Likewise. * df.c (df_insn_refs_record, df_bb_rd_local_compute, df_insns_modify): Likewise. * dwarf2out.c (dwarf2out_stack_adjust, dwarf2out_frame_debug, gen_label_die, dwarf2out_var_location): Likewise. * emit-rtl.c (get_first_nonnote_insn, get_last_nonnote_insn, next_insn, previous_insn, next_nonnote_insn, prev_nonnote_insn, last_call_insn, active_insn_p, next_label, prev_label, link_cc0_insns, next_cc0_user, try_split, add_insn_after, add_insn_before, remove_insn, add_function_usage_to, reorder_insns, find_line_note, remove_unnecessary_notes, emit_insn_after_1, classify_insn): Likewise. * except.c (convert_from_eh_region_ranges_1, emit_to_new_bb_before, connect_post_landing_pads, sjlj_mark_call_sites, sjlj_emit_function_enter, sjlj_emit_function_exit, reachable_handlers, can_throw_internal, can_throw_external, set_nothrow_function_flags, convert_to_eh_region_ranges): Likewise. * explow.c (optimize_save_area_alloca): Likewise. * expr.c (expand_expr_real): Likewise. * final.c (insn_current_reference_address, compute_alignments, shorten_branches, final, scan_ahead_for_unlikely_executed_note, final_scan_insn, output_asm_label, leaf_function_p): Likewise. * flow.c (first_insn_after_basic_block_note, delete_dead_jumptables, propagate_block_delete_insn, propagate_one_insn, init_propagate_block_info, propagate_block, libcall_dead_p, mark_set_1, attempt_auto_inc, find_auto_inc, try_pre_increment): Likewise. * function.c (instantiate_virtual_regs, reorder_blocks_1, expand_function_start, expand_function_end, contains, thread_prologue_and_epilogue_insns, reposition_prologue_and_epilogue_notes): Likewise. * gcse.c (constprop_register, bypass_conditional_jumps, insert_insn_end_bb, gcse_after_reload): Likewise. * genemit.c (gen_expand, gen_split): Likewise. * genpeep.c (gen_peephole, main): Likewise. * global.c (build_insn_chain): Likewise. * graph.c (node_data, print_rtl_graph_with_bb): Likewise. * haifa-sched.c (unlink_other_notes, unlink_line_notes, get_block_head_tail, no_real_insns_p, rm_line_notes, save_line_notes, restore_line_notes, rm_redundant_line_notes, rm_other_notes, ok_for_early_queue_removal, set_priorities, sched_init): Likewise. * ifcvt.c (count_bb_insns, first_active_insn, last_active_insn, cond_exec_process_insns, end_ifcvt_sequence, noce_process_if_block, merge_if_block, block_jumps_and_fallthru_p, find_if_block, dead_or_predicable): Likewise. * integrate.c (try_constants): Likewise. * jump.c (rebuild_jump_labels, cleanup_barriers, purge_line_number_notes, init_label_info, mark_all_labels, squeeze_notes, get_label_before, get_label_after, reversed_comparison_code_parts, simplejump_p, pc_set, returnjump_p, onlyjump_p, follow_jumps, mark_jump_label, delete_barrier, delete_prior_computation, delete_computation, delete_related_insns, delete_for_peephole, redirect_jump): Likewise. * lcm.c (optimize_mode_switching): Likewise. * local-alloc.c (validate_equiv_mem, update_equiv_regs, block_alloc): Likewise. * loop-doloop.c (doloop_valid_p, doloop_optimize): Likewise. * loop-invariant.c (find_exits, find_invariants_bb): Likewise. * loop-iv.c (simplify_using_assignment): Likewise. * loop.c (compute_luids, loop_optimize, scan_loop, libcall_other_reg, libcall_benefit, skip_consec_insns, move_movables, prescan_loop, find_and_verify_loops, labels_in_range_p, for_each_insn_in_loop, loop_bivs_init_find, strength_reduce, check_insn_for_bivs, check_insn_for_givs, check_final_value, update_giv_derive, basic_induction_var, product_cheap_p, check_dbra_loop, loop_insn_first_p, last_use_this_basic_block, canonicalize_condition, get_condition, loop_regs_scan, load_mems, try_copy_prop, LOOP_BLOCK_NUM, loop_dump_aux): Likewise. * modulo-sched.c (doloop_register_get, find_line_note, sms_schedule, sms_schedule_by_order): Likewise. * optabs.c (emit_no_conflict_block, emit_libcall_block): Likewise. * postreload.c (reload_cse_simplify_operands, reload_combine, reload_cse_move2add): Likewise. * predict.c (can_predict_insn_p, estimate_probability, expected_value_to_br_prob, process_note_predictions): Likewise. * print-rtl.c (print_rtx, print_rtl, print_rtl_single): Likewise. * profile.c (branch_prob): Likewise. * ra-build.c (live_out_1, livethrough_conflicts_bb, detect_webs_set_in_cond_jump): Likewise. * ra-debug.c (ra_print_rtx_object, ra_debug_insns, ra_print_rtl_with_bb): Likewise. * ra-rewrite.c (insert_stores, rewrite_program2): Likewise. * recog.c (next_insn_tests_no_inequality, find_single_use, split_all_insns, peephole2_optimize, if_test_bypass_p): Likewise. * reg-stack.c (next_flags_user, record_label_references, emit_swap_insn, swap_rtx_condition, subst_stack_regs, compensate_edge, convert_regs_1): Likewise. * regclass.c (scan_one_insn): Likewise. * regmove.c (optimize_reg_copy_1, optimize_reg_copy_2, fixup_match_2, regmove_optimize, fixup_match_1, single_set_for_csa, combine_stack_adjustments_for_block): Likewise. * regrename.c (build_def_use, copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads, find_reloads_address_1, subst_reloads, find_equiv_reg): Likewise. * reload1.c (reload, calculate_needs_all_insns, set_label_offsets, reload_as_needed, emit_input_reload_insns, do_output_reload, delete_output_reload, delete_address_reloads_1, fixup_abnormal_edges): Likewise. * reorg.c (find_end_label, emit_delay_sequence, delete_from_delay_slot, delete_scheduled_jump, optimize_skip, get_jump_flags, rare_destination, mostly_true_jump, try_merge_delay_insns, redundant_insn, own_thread_p, fill_simple_delay_slots, fill_slots_from_thread, fill_eager_delay_slots, relax_delay_slots, make_return_insns, dbr_schedule): Likewise. * resource.c (find_basic_block, next_insn_no_annul, find_dead_or_set_registers, mark_target_live_regs): Likewise. * rtl.h (RTX_PREV): Likewise. * rtlanal.c (global_reg_mentioned_p, no_labels_between_p, no_jumps_between_p, reg_used_between_p, reg_referenced_between_p, reg_set_p, find_last_value, dead_or_set_regno_p, find_reg_fusage, find_regno_fusage, pure_call_p, replace_label, rtx_referenced_p_1, tablejump_p, computed_jump_p, insns_safe_to_move_p, find_first_parameter_load, can_hoist_insn_p): Likewise. * sched-deps.c (get_condition, add_dependence, sched_analyze_2, sched_analyze_insn, sched_analyze, add_forward_dependence): Likewise. * sched-ebb.c (fix_basic_block_boundaries, add_deps_for_risky_insns, schedule_ebbs): Likewise. * sched-rgn.c (is_cfg_nonregular, find_conditional_protection, is_conditionally_protected, can_schedule_ready_p, add_branch_dependences, debug_dependencies): Likewise. * stmt.c (emit_nop, expand_start_case, emit_jump_if_reachable): Likewise. * unroll.c (unroll_loop, copy_loop_body, back_branch_in_range_p, reg_dead_after_loop, loop_find_equiv_value, loop_iterations, set_dominates_use, ujump_to_loop_cont): Likewise. * var-tracking.c (prologue_stack_adjust, vt_initialize): Likewise. * varasm.c (output_constant_pool_1): Likewise. From-SVN: r84341
2004-07-09 05:29:35 +02:00
#define RTX_PREV(X) ((INSN_P (X) \
|| NOTE_P (X) \
|| BARRIER_P (X) \
|| LABEL_P (X)) \
Index: gcc/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * ggc-common.c (ggc_mark_rtx_children_1): Update for changed name mangling. The following changes are merged from pch-branch: * doc/gty.texi (GTY Options): Document %a. * gengtype.c (do_scalar_typedef): New function. (process_gc_options): Handle `length' option. (set_gc_used_type): A pointer to an array of structures doesn't qualify as a pointer to a structure. (output_escaped_param): Add `%a' escape. (write_gc_structure_fields): Allow 'desc' on array of unions. (main): Define `uint8', `jword' and `JCF_u2' as scalars; use do_scalar_typedef. * gengtype.c (enum rtx_code): Make global. (rtx_format): Make global. (rtx_next): New. (gen_rtx_next): New. (write_rtx_next): New. (adjust_field_rtx_def): Skip fields marked by chain_next. (open_base_files): Delete redundant prototype. (write_enum_defn): New. (output_mangled_typename): Correct abort call. (write_gc_marker_routine_for_structure): Handle chain_next and chain_prev options. (finish_root_table): Don't output redundant \n. (main): Call gen_rtx_next, write_rtx_next, write_enum_defn. * c-tree.h (union lang_tree_node): Add chain_next option. * gengtype.h (NUM_PARAM): New definition. (struct type): For TYPE_PARAM_STRUCT, allow multiple parameters. * gengtype.c (find_param_structure): New. (adjust_field_type): Handle param<n>_is option. (process_gc_options): Detect use_params option. Update callers. (set_gc_used_type): Add 'param' parameter, update callers. Handle 'use_params' option. (open_base_files): Add splay-tree.h to list of files included. (output_mangled_typename): New. (write_gc_structure_fields): Update 'param' parameter to support multiple parameters. Change name mangling. Allow parameterized fields to have an apparent scalar type. Handle param<n>_is options, use_param option. (write_gc_marker_routine_for_structure): Update for change to name mangling. Better guess the output file for parameterized types. (write_gc_types): Update for change to name mangling. (write_gc_root): Update for change to name mangling. Handle (ignore) param<n>_is options. * doc/gty.texi (GTY Options): Add description of param<n>_is options, use_params option. * ggc.h (ggc_mark_rtx): Update for changed name mangling. * gengtype-lex.l: Produce token for param<n>_is. * gengtype-yacc.y: Parse param<n>_is. * gengtype.c (adjust_field_tree_exp): Don't name a variable 'rindex'. * rtl.c: Update comment describing rtx_format. * rtl.h (union rtunion): Separate definition and typedef. (struct rtx_def): Use gengtype to mark. * Makefile.in (gengtype.o): Also depend on rtl.def. * ggc.h (ggc_mark_rtx_children): Delete prototype. (ggc_mark_rtx): Change to alias of gengtype-generated routine. * ggc-common.c (ggc_mark_rtx_children): Delete. (ggc_mark_rtx_children_1): Delete. (gt_ggc_m_rtx_def): Delete. * gengtype.c (adjust_field_rtx_def): New. (adjust_field_type): Call adjust_field_rtx_def. (write_gc_structure_fields): Add 'default' case to switch if none is specified; remove unused code. * tree.h (struct tree_exp): Update for change to meaning of special. * gengtype.c (adjust_field_tree_exp): New function. (adjust_field_type): Handle `tree_exp' special here. (write_gc_structure_fields): Don't handle `tree_exp' special here. Handle new `dot' option. * gengtype.h: Make `info' a pointer-to-const. * gengtype-yacc.y (yacc_ids): Use xasprintf. * gengtype.c (write_gc_structure_fields): Remove implementation of `always' option, add `default' option. * doc/gty.texi (GTY Options): Remove documentation of `always', add `default'. Index: gcc/cp/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * cp-tree.h (union lang_tree_node): Add chain_next option. Index: gcc/f/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * com.c (union lang_tree_node): Add chain_next option. Index: gcc/java/ChangeLog 2002-09-12 Geoffrey Keating <geoffk@apple.com> * java-tree.h (union lang_tree_node): Add chain_next option. From-SVN: r57206
2002-09-16 20:33:23 +02:00
&& PREV_INSN (X) != NULL \
&& NEXT_INSN (PREV_INSN (X)) == X \
? PREV_INSN (X) : NULL)
1991-12-06 22:00:31 +01:00
/* Define macros to access the `code' field of the rtx. */
print-rtl.c (print_rtx): Cast enums to int for comparison. * print-rtl.c (print_rtx): Cast enums to int for comparison. * c-decl.c (grokdeclarator): Cast enums to int for comparison and shifts. * c-format.c (C_STD_VER): Cast to int for comparisons. (check_function_format): Cast various enums to int for &. (maybe_read_dollar_number): Likewise. (check_format_info): Likewise. (check_format_info_main): Likewise. * expr.c (emit_move_insn_1): Cast enums to unsigned int for comparison. (safe_from_p): Likewise. * varasm.c (const_hash): Cast enum to int for %. * emit-rtl.c (init_emit_once): Use int loop variable to work around pcc enum problems with < and ++ operators. * regclass.c (init_reg_sets_1): Cast enums for comparison. (choose_hard_reg_mode): Use unsigned int to iterate over CCmodes. (regclass_init): Change enum class to int to iterate over reg_classes. * genrecog.c (merge_trees): Cast enums for comparison. * rtl.h (GET_CODE): Cast to enum rtx_code. (PUT_CODE): Cast to ENUM_BITFIELD(rtx_code). (GET_MODE): Cast to enum machine_mode. (PUT_MODE): Cast to ENUM_BITFIELD(machine_mode). (GET_NOTE_INSN_NAME): Cast enum to int. * tree.h (TREE_CODE): Cast to enum tree_code. (TREE_SET_CODE): Cast VALUE to ENUM_BITFIELD(tree_code). * timevar.c (timevar_print): Change loop variable id from enum to unsigned int. * fixinc/fixincl.c (VLEVEL): Cast enums in comparison to unsigned int. * config/i386/i386.md: Use PUT_MODE for mode assignment. * toplev.c (compile_file): Cast enum DFI to int. (decode_d_option): Likewise. From-SVN: r40193
2001-03-02 22:41:37 +01:00
#define GET_CODE(RTX) ((enum rtx_code) (RTX)->code)
#define PUT_CODE(RTX, CODE) ((RTX)->code = (CODE))
1991-12-06 22:00:31 +01:00
print-rtl.c (print_rtx): Cast enums to int for comparison. * print-rtl.c (print_rtx): Cast enums to int for comparison. * c-decl.c (grokdeclarator): Cast enums to int for comparison and shifts. * c-format.c (C_STD_VER): Cast to int for comparisons. (check_function_format): Cast various enums to int for &. (maybe_read_dollar_number): Likewise. (check_format_info): Likewise. (check_format_info_main): Likewise. * expr.c (emit_move_insn_1): Cast enums to unsigned int for comparison. (safe_from_p): Likewise. * varasm.c (const_hash): Cast enum to int for %. * emit-rtl.c (init_emit_once): Use int loop variable to work around pcc enum problems with < and ++ operators. * regclass.c (init_reg_sets_1): Cast enums for comparison. (choose_hard_reg_mode): Use unsigned int to iterate over CCmodes. (regclass_init): Change enum class to int to iterate over reg_classes. * genrecog.c (merge_trees): Cast enums for comparison. * rtl.h (GET_CODE): Cast to enum rtx_code. (PUT_CODE): Cast to ENUM_BITFIELD(rtx_code). (GET_MODE): Cast to enum machine_mode. (PUT_MODE): Cast to ENUM_BITFIELD(machine_mode). (GET_NOTE_INSN_NAME): Cast enum to int. * tree.h (TREE_CODE): Cast to enum tree_code. (TREE_SET_CODE): Cast VALUE to ENUM_BITFIELD(tree_code). * timevar.c (timevar_print): Change loop variable id from enum to unsigned int. * fixinc/fixincl.c (VLEVEL): Cast enums in comparison to unsigned int. * config/i386/i386.md: Use PUT_MODE for mode assignment. * toplev.c (compile_file): Cast enum DFI to int. (decode_d_option): Likewise. From-SVN: r40193
2001-03-02 22:41:37 +01:00
#define GET_MODE(RTX) ((enum machine_mode) (RTX)->mode)
#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. */
struct rtvec_def GTY(()) {
int num_elem; /* number of elements */
rtx GTY ((length ("%h.num_elem"))) elem[1];
};
1991-12-06 22:00:31 +01:00
#define NULL_RTVEC (rtvec) 0
#define GET_NUM_ELEM(RTVEC) ((RTVEC)->num_elem)
#define PUT_NUM_ELEM(RTVEC, NUM) ((RTVEC)->num_elem = (NUM))
1991-12-06 22:00:31 +01:00
/* Predicate yielding nonzero iff X is an rtx for a register. */
1991-12-06 22:00:31 +01:00
#define REG_P(X) (GET_CODE (X) == REG)
/* Predicate yielding nonzero iff X is an rtx for a memory location. */
#define MEM_P(X) (GET_CODE (X) == MEM)
/* Predicate yielding nonzero iff X is an rtx for a constant integer. */
#define CONST_INT_P(X) (GET_CODE (X) == CONST_INT)
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 call insn. */
#define CALL_P(X) (GET_CODE (X) == CALL_INSN)
/* Predicate yielding nonzero iff X is an insn that cannot jump. */
#define NONJUMP_INSN_P(X) (GET_CODE (X) == INSN)
/* Predicate yielding nonzero iff X is a real insn. */
#define INSN_P(X) \
(NONJUMP_INSN_P (X) || JUMP_P (X) || CALL_P (X))
2000-08-02 06:21:27 +02:00
/* Predicate yielding nonzero iff X is a note insn. */
#define NOTE_P(X) (GET_CODE (X) == NOTE)
/* Predicate yielding nonzero iff X is a barrier insn. */
#define BARRIER_P(X) (GET_CODE (X) == BARRIER)
/* Predicate yielding nonzero iff X is a data for a jump table. */
#define JUMP_TABLE_DATA_P(INSN) \
(JUMP_P (INSN) && (GET_CODE (PATTERN (INSN)) == ADDR_VEC || \
GET_CODE (PATTERN (INSN)) == ADDR_DIFF_VEC))
alias.c (rtx_equal_for_memref_p): Use predicates to test rtx classes and new rtx class codes... 2004-02-07 Paolo Bonzini <bonzini@gnu.org> * alias.c (rtx_equal_for_memref_p): Use predicates to test rtx classes and new rtx class codes, possibly splitting conditionals that tested against '<' and 'o'. * caller-save.c (save_call_clobbered_regs): Likewise. * combine.c (contains_muldiv, find_split_point, subst, combine_simplify_rtx, simplify_if_then_else, simplify_set, simplify_logical, expand_compound_operation, make_compound_operation, if_then_else_cond, known_cond, apply_distributive_law, cached_nonzero_bits, cached_num_sign_bit_copies, simplify_shift_const, gen_binary, simplify_comparison, update_table_tick, record_value_for_reg, get_lsat_value_validate): Likewise. * cse.c (mention_regs, find_best_addr, find_comparison_args, fold_rtx, cse_insn, invalidate_memory, cse_basic_block): Likewise. * emit-rtl.c (copy_insn_1): Likewise. * expr.c (force_operand): Likewise. * final.c (final_scan_insn, get_mem_expr_from_op): Likewise. * flow.c (notice_stack_pointer_modification_1, invalidate_mems_from_autoinc, ior_reg_cond, not_reg_cond, and_reg_cond, elim_reg_cond): Likewise. * function.c (update_epilogue_consts): Likewise. * genattrtab.c (attr_rtx_1): Likewise. * genopinit.c (gen_insn): Likewise. * integrate.c (subst_constants): Likewise. * jump.c (reversed_comparison_code_parts, reversed_comparison_code, delete_related_insns, rtx_renumbered_equal_p): Likewise. * local-alloc.c (block_alloc): Likewise. * loop.c (rtx_equal_for_prefetch_p, maybe_eliminate_biv, canonicalize_condition): Likewise. * loop-iv.c (simplify_using_conditions, iv_number_of_iterations): Likewise. * optabs.c (add_equal_node, expand_binop): Likewise. * predict.c (estimate_probability): Likewise. * ra-debug.c (ra_print_rtx_2op, ra_print_rtx): Likewise. * recog.c (validate_replace_rtx_1, comparison_operator, offsettable_address_p, constrain_operands): Likewise. * reg-stack.c (swap_rtx_condition_1, subst_stack_regs_pat): Likewise. * regclass.c (scan_one_insn): Likewise. * regmove.c (stable_and_no_regs_but_for_p): Likewise. * regrename.c (kill_autoinc_value): Likewise. * reload.c (find_reusable_reload, find_reloads, reg_overlap_mentioned_for_reload_p): Likewise. * reload1.c (gen_reload, delete_address_reloads_1): Likewise. * rtl.c (copy_rtx): Likewise. * rtl.h (CONSTANT_P, INSN_P): Likewise. * rtlanal.c (commutative_operand_precedence): Likewise. * sched-deps.c (conditions_mutex_p): Likewise. * sched-rgn.c (is_cfg_nonregular): Likewise. * simplify-rtx.c (simplify_gen_binary, simplify_gen_relational, simplify_replace_rtx, simplify_unary_operation, simplify_binary_operation, simplify_ternary_operation, simplify_rtx): Likewise. * unroll.c (reg_dead_after_loop): Likewise. * config/alpha/alpha.c (alpha_swapped_comparison_operator, print_operand): Likewise. * config/arc/arc.c (proper_comparison_operator): Likewise. * config/arm/arm.c (arm_arm_address_cost, arm_select_cc_mode): Likewise. * config/avr/avr.c (_reg_unused_after): Likewise. * config/frv/frv.c (frv_ifcvt_modify_tests, frv_ifcvt_modify_insn, frv_pack_insn): Likewise. * config/i386/i386.c (ix86_comparison_operator, ix86_carry_flag_operator, fcmov_comparison_operator, arith_or_logical_operator, print_operand, ix86_expand_binary_operator, ix86_binary_operator_ok): Likewise. * config/i386/i386.md: Likewise. * config/ia64/ia64.c (not_postinc_memory_operand, ia64_print_operand, update_set_flags, errata_emit_nops): Likewise. * config/ia64/ia64.h (PREFERRED_RELOAD_CLASS, CONSTRAINT_OK_FOR_S): Likewise. * config/ip2k/ip2k.c (mdr_resequence_xy_yx, mdr_try_move_dp_reload, ip2k_check_can_adjust_stack_ref, ip2k_xexp_not_uses_reg_for_mem, ip2k_xexp_not_uses_reg_p, ip2k_composite_xexp_not_uses_reg_p, ip2k_unary_operator): Likewise. * config/iq2000/iq2000.c (cmp_op, symbolic_expression_p, eqne_comparison_operator, signed_comparison_operator): Likewise. * config/mips/mips.c (cmp_op, symbolic_expression_p): Likewise. * config/mmix/mmix (mmix_foldable_comparison_operator, mmix_comparison_operator): Likewise. * config/pa/pa.c (hppa_legitimize_address): Likewise. * config/rs6000/rs6000.c (stmw_operation, branch_comparison_operator, trap_comparison_operator, ccr_bit): Likewise. * config/rs6000/rs6000.h (SELECT_CC_MODE): Likewise. * config/s390/s390.c (s390_alc_comparison, s390_slb_comparison):L Likewise. * config/sh/sh.c (gen_block_redirect, reg_unused_after): Likewise. * config/sparc/sparc.c (eq_or_neq, normal_comp_operator, noov_compare_op, noov_compare64_op, v9_regcmp_op, emit_hard_tfmode_operation, reg_unused_after) * doc/md.texi, doc/rtl.texi: Likewise. * ra-debug.c: Add 2004 to list of copyright years. * unroll.c: Likewise. * combine.c (simplify_logical): Remove dummy test, (apply_distributive_law): Fix typo in comment. GET_CODE (x) == AND so x is a commutative binary op. * jump.c (delete_related_insns): simplify loop condition, move testing of RTX codes inside the loop. (rtx_renumbered_equal_p): do not use RTX_CODE. * rtl.c (rtx_class): Declare as enum rtx_class. * rtl.def (EQ, NE, UNEQ, LTGT, UNORDERED, ORDERED): Move to RTX_COMM_COMPARE class. (HIGH, SYMBOL_REF, LABEL_REF, CONST, CONST_INT, CONST_DOUBLE): Move to RTX_CONST_OBJ class. * rtl.h (enum rtx_class): New declaration, (RTX_OBJ_MASK, RTX_OBJ_RESULT, RTX_COMPARE_MASK, RTX_COMPARE_RESULT, RTX_ARITHMETIC_MASK, RTX_ARITHMETIC_RESULT, RTX_BINARY_MASK, RTX_BINARY_RESULT, RTX_COMMUTATIVE_MASK, RTX_COMMUTATIVE_RESULT, RTX_NON_COMMUTATIVE_RESULT, RTX_EXPR_FIRST, RTX_EXPR_LAST, UNARY_P, BINARY_P, ARITHMETIC_P, COMMUTATIVE_ARITHMETIC_P, COMPARISON_P, SWAPPABLE_OPERANDS_P, NON_COMMUTATIVE_P, COMMUTATIVE_P, OBJECT_P): New macros. * config/sparc/sparc.c (noov_compare_op): Remove register from parameter. From-SVN: r78824
2004-03-03 09:35:33 +01:00
/* 1 if X is a unary operator. */
#define UNARY_P(X) \
(GET_RTX_CLASS (GET_CODE (X)) == RTX_UNARY)
/* 1 if X is a binary operator. */
#define BINARY_P(X) \
((GET_RTX_CLASS (GET_CODE (X)) & RTX_BINARY_MASK) == RTX_BINARY_RESULT)
/* 1 if X is an arithmetic operator. */
#define ARITHMETIC_P(X) \
((GET_RTX_CLASS (GET_CODE (X)) & RTX_ARITHMETIC_MASK) \
== RTX_ARITHMETIC_RESULT)
/* 1 if X is an arithmetic operator. */
#define COMMUTATIVE_ARITH_P(X) \
(GET_RTX_CLASS (GET_CODE (X)) == RTX_COMM_ARITH)
/* 1 if X is a commutative arithmetic operator or a comparison operator.
These two are sometimes selected together because it is possible to
swap the two operands. */
#define SWAPPABLE_OPERANDS_P(X) \
((1 << GET_RTX_CLASS (GET_CODE (X))) \
& ((1 << RTX_COMM_ARITH) | (1 << RTX_COMM_COMPARE) \
| (1 << RTX_COMPARE)))
/* 1 if X is a non-commutative operator. */
#define NON_COMMUTATIVE_P(X) \
((GET_RTX_CLASS (GET_CODE (X)) & RTX_COMMUTATIVE_MASK) \
== RTX_NON_COMMUTATIVE_RESULT)
/* 1 if X is a commutative operator on integers. */
#define COMMUTATIVE_P(X) \
((GET_RTX_CLASS (GET_CODE (X)) & RTX_COMMUTATIVE_MASK) \
== RTX_COMMUTATIVE_RESULT)
/* 1 if X is a relational operator. */
#define COMPARISON_P(X) \
((GET_RTX_CLASS (GET_CODE (X)) & RTX_COMPARE_MASK) == RTX_COMPARE_RESULT)
1991-12-06 22:00:31 +01:00
/* 1 if X is a constant value that is an integer. */
#define CONSTANT_P(X) \
(GET_RTX_CLASS (GET_CODE (X)) == RTX_CONST_OBJ)
1991-12-06 22:00:31 +01:00
alias.c (rtx_equal_for_memref_p): Use predicates to test rtx classes and new rtx class codes... 2004-02-07 Paolo Bonzini <bonzini@gnu.org> * alias.c (rtx_equal_for_memref_p): Use predicates to test rtx classes and new rtx class codes, possibly splitting conditionals that tested against '<' and 'o'. * caller-save.c (save_call_clobbered_regs): Likewise. * combine.c (contains_muldiv, find_split_point, subst, combine_simplify_rtx, simplify_if_then_else, simplify_set, simplify_logical, expand_compound_operation, make_compound_operation, if_then_else_cond, known_cond, apply_distributive_law, cached_nonzero_bits, cached_num_sign_bit_copies, simplify_shift_const, gen_binary, simplify_comparison, update_table_tick, record_value_for_reg, get_lsat_value_validate): Likewise. * cse.c (mention_regs, find_best_addr, find_comparison_args, fold_rtx, cse_insn, invalidate_memory, cse_basic_block): Likewise. * emit-rtl.c (copy_insn_1): Likewise. * expr.c (force_operand): Likewise. * final.c (final_scan_insn, get_mem_expr_from_op): Likewise. * flow.c (notice_stack_pointer_modification_1, invalidate_mems_from_autoinc, ior_reg_cond, not_reg_cond, and_reg_cond, elim_reg_cond): Likewise. * function.c (update_epilogue_consts): Likewise. * genattrtab.c (attr_rtx_1): Likewise. * genopinit.c (gen_insn): Likewise. * integrate.c (subst_constants): Likewise. * jump.c (reversed_comparison_code_parts, reversed_comparison_code, delete_related_insns, rtx_renumbered_equal_p): Likewise. * local-alloc.c (block_alloc): Likewise. * loop.c (rtx_equal_for_prefetch_p, maybe_eliminate_biv, canonicalize_condition): Likewise. * loop-iv.c (simplify_using_conditions, iv_number_of_iterations): Likewise. * optabs.c (add_equal_node, expand_binop): Likewise. * predict.c (estimate_probability): Likewise. * ra-debug.c (ra_print_rtx_2op, ra_print_rtx): Likewise. * recog.c (validate_replace_rtx_1, comparison_operator, offsettable_address_p, constrain_operands): Likewise. * reg-stack.c (swap_rtx_condition_1, subst_stack_regs_pat): Likewise. * regclass.c (scan_one_insn): Likewise. * regmove.c (stable_and_no_regs_but_for_p): Likewise. * regrename.c (kill_autoinc_value): Likewise. * reload.c (find_reusable_reload, find_reloads, reg_overlap_mentioned_for_reload_p): Likewise. * reload1.c (gen_reload, delete_address_reloads_1): Likewise. * rtl.c (copy_rtx): Likewise. * rtl.h (CONSTANT_P, INSN_P): Likewise. * rtlanal.c (commutative_operand_precedence): Likewise. * sched-deps.c (conditions_mutex_p): Likewise. * sched-rgn.c (is_cfg_nonregular): Likewise. * simplify-rtx.c (simplify_gen_binary, simplify_gen_relational, simplify_replace_rtx, simplify_unary_operation, simplify_binary_operation, simplify_ternary_operation, simplify_rtx): Likewise. * unroll.c (reg_dead_after_loop): Likewise. * config/alpha/alpha.c (alpha_swapped_comparison_operator, print_operand): Likewise. * config/arc/arc.c (proper_comparison_operator): Likewise. * config/arm/arm.c (arm_arm_address_cost, arm_select_cc_mode): Likewise. * config/avr/avr.c (_reg_unused_after): Likewise. * config/frv/frv.c (frv_ifcvt_modify_tests, frv_ifcvt_modify_insn, frv_pack_insn): Likewise. * config/i386/i386.c (ix86_comparison_operator, ix86_carry_flag_operator, fcmov_comparison_operator, arith_or_logical_operator, print_operand, ix86_expand_binary_operator, ix86_binary_operator_ok): Likewise. * config/i386/i386.md: Likewise. * config/ia64/ia64.c (not_postinc_memory_operand, ia64_print_operand, update_set_flags, errata_emit_nops): Likewise. * config/ia64/ia64.h (PREFERRED_RELOAD_CLASS, CONSTRAINT_OK_FOR_S): Likewise. * config/ip2k/ip2k.c (mdr_resequence_xy_yx, mdr_try_move_dp_reload, ip2k_check_can_adjust_stack_ref, ip2k_xexp_not_uses_reg_for_mem, ip2k_xexp_not_uses_reg_p, ip2k_composite_xexp_not_uses_reg_p, ip2k_unary_operator): Likewise. * config/iq2000/iq2000.c (cmp_op, symbolic_expression_p, eqne_comparison_operator, signed_comparison_operator): Likewise. * config/mips/mips.c (cmp_op, symbolic_expression_p): Likewise. * config/mmix/mmix (mmix_foldable_comparison_operator, mmix_comparison_operator): Likewise. * config/pa/pa.c (hppa_legitimize_address): Likewise. * config/rs6000/rs6000.c (stmw_operation, branch_comparison_operator, trap_comparison_operator, ccr_bit): Likewise. * config/rs6000/rs6000.h (SELECT_CC_MODE): Likewise. * config/s390/s390.c (s390_alc_comparison, s390_slb_comparison):L Likewise. * config/sh/sh.c (gen_block_redirect, reg_unused_after): Likewise. * config/sparc/sparc.c (eq_or_neq, normal_comp_operator, noov_compare_op, noov_compare64_op, v9_regcmp_op, emit_hard_tfmode_operation, reg_unused_after) * doc/md.texi, doc/rtl.texi: Likewise. * ra-debug.c: Add 2004 to list of copyright years. * unroll.c: Likewise. * combine.c (simplify_logical): Remove dummy test, (apply_distributive_law): Fix typo in comment. GET_CODE (x) == AND so x is a commutative binary op. * jump.c (delete_related_insns): simplify loop condition, move testing of RTX codes inside the loop. (rtx_renumbered_equal_p): do not use RTX_CODE. * rtl.c (rtx_class): Declare as enum rtx_class. * rtl.def (EQ, NE, UNEQ, LTGT, UNORDERED, ORDERED): Move to RTX_COMM_COMPARE class. (HIGH, SYMBOL_REF, LABEL_REF, CONST, CONST_INT, CONST_DOUBLE): Move to RTX_CONST_OBJ class. * rtl.h (enum rtx_class): New declaration, (RTX_OBJ_MASK, RTX_OBJ_RESULT, RTX_COMPARE_MASK, RTX_COMPARE_RESULT, RTX_ARITHMETIC_MASK, RTX_ARITHMETIC_RESULT, RTX_BINARY_MASK, RTX_BINARY_RESULT, RTX_COMMUTATIVE_MASK, RTX_COMMUTATIVE_RESULT, RTX_NON_COMMUTATIVE_RESULT, RTX_EXPR_FIRST, RTX_EXPR_LAST, UNARY_P, BINARY_P, ARITHMETIC_P, COMMUTATIVE_ARITHMETIC_P, COMPARISON_P, SWAPPABLE_OPERANDS_P, NON_COMMUTATIVE_P, COMMUTATIVE_P, OBJECT_P): New macros. * config/sparc/sparc.c (noov_compare_op): Remove register from parameter. From-SVN: r78824
2004-03-03 09:35:33 +01:00
/* 1 if X can be used to represent an object. */
#define OBJECT_P(X) \
((GET_RTX_CLASS (GET_CODE (X)) & RTX_OBJ_MASK) == RTX_OBJ_RESULT)
1991-12-06 22:00:31 +01:00
/* General accessor macros for accessing the fields of an rtx. */
#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. */
#define RTL_CHECK1(RTX, N, C1) __extension__ \
(*({ 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)) \
rtl.h: Update copyright date. * rtl.h: Update copyright date. (RTL_CHECK1): Wrap long line. (RTL_CHECK2): Likewise. (RTL_CHECKC1): Wrap long line and whitespace. (RTL_CHECKC2): Likewise. (XWINT): Whitespace. (XINT): Likewise. (XSTR): Likewise. (XEXP): Likewise. (XVEC): Likewise. (XMODE): Likewise. (XBITMAP): Likewise. (XTREE): Likewise. (XBBDEF): Likewise. (XTMPL): Likewise. (X0WINT): Likewise. (X0INT):Likewise. (X0UINT): Likewise. (X0STR): Likewise. (X0EXP): Likewise. (X0VEC): Likewise. (X0MODE): Likewise. (X0BITMAP): Likewise. (X0TREE): Likewise. (X0BBDEF): Likewise. (X0ADVFLAGS): Likewise. (X0CSELIB): Likewise. (X0MEMATTR): Likewise. (XCWINT): Likewise. (XCINT): Likewise. (XCUINT): Likewise. (XCSTR): Likewise. (XCEXP): Likewise. (XCVEC): Likewise. (XCMODE): Likewise. (XCBITMAP): Likewise. (XCTREE): Likewise. (XCBBDEF): Likewise. (XCADVFLAGS): Likewise. (XCCSELIB): Likewise. (XC2EXP): Likewise. (INSN_UID): Likewise. (PREV_INSN): Likewise. (PATTERN): Likewise. (INSN_CODE): Likewise. (PUT_REG_NOTE_KIND): Likewise. (CODE_LABEL_NUMBER): Likewise. (NOTE_SOURCE_FILE): Likewise. (NOTE_BLOCK): Likewise. (NOTE_EH_HANDLER): Likewise. (NOTE_RANGE_INFO): Likewise. (NOTE_LIVE_INFO): Likewise. (NOTE_BASIC_BLOCK): Likewise. (NOTE_EXPECTED_VALUE): Likewise. (NOTE_LINE_NUMBER): Likewise. (LABEL_NAME): Likewise. (LABEL_NUSES): Likewise. (LABEL_ALTERNATE_NAME): Likewise. (ADDRESSOF_DECL): Likewise. (JUMP_LABEL): Likewise. (LABEL_NEXTREF): Likewise. (REGNO): Likewise. (ORIGINAL_REGNO: Likewise. (HARD_REGISTER_NUM_P): Add parenthesis. (SUBREG_REG): Whitespace. (SUBREG_BYTE): Likewise. (ASM_OPERANDS_TEMPLATE): Remove parenthesis. (ASM_OPERANDS_OUTPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_OUTPUT_IDX): Likewise. (ASM_OPERANDS_INPUT_VEC): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_VEC): Likewise. (ASM_OPERANDS_INPUT): Likewise. (ASM_OPERANDS_INPUT_LENGTH): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_INPUT_MODE): Likewise. (ASM_OPERANDS_SOURCE_FILE): Likewise. (ASM_OPERANDS_SOURCE_LINE): Likewise. (MEM_SET_IN_STRUCT_P): Minor reformat. (TRAP_CONDITION): Whitespace. (TRAP_CODE): Likewise. (COND_EXEC_TEST): Likewise. (COND_EXEC_CODE): Likewise. (FIND_REG_INC_NOTE): Uppercase macro args and add parenthesis. (PHI_NODE_P): Add parenthesis. (plus_constant): Whitespace and add paraenthese. From-SVN: r48497
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) \
rtl.h: Update copyright date. * rtl.h: Update copyright date. (RTL_CHECK1): Wrap long line. (RTL_CHECK2): Likewise. (RTL_CHECKC1): Wrap long line and whitespace. (RTL_CHECKC2): Likewise. (XWINT): Whitespace. (XINT): Likewise. (XSTR): Likewise. (XEXP): Likewise. (XVEC): Likewise. (XMODE): Likewise. (XBITMAP): Likewise. (XTREE): Likewise. (XBBDEF): Likewise. (XTMPL): Likewise. (X0WINT): Likewise. (X0INT):Likewise. (X0UINT): Likewise. (X0STR): Likewise. (X0EXP): Likewise. (X0VEC): Likewise. (X0MODE): Likewise. (X0BITMAP): Likewise. (X0TREE): Likewise. (X0BBDEF): Likewise. (X0ADVFLAGS): Likewise. (X0CSELIB): Likewise. (X0MEMATTR): Likewise. (XCWINT): Likewise. (XCINT): Likewise. (XCUINT): Likewise. (XCSTR): Likewise. (XCEXP): Likewise. (XCVEC): Likewise. (XCMODE): Likewise. (XCBITMAP): Likewise. (XCTREE): Likewise. (XCBBDEF): Likewise. (XCADVFLAGS): Likewise. (XCCSELIB): Likewise. (XC2EXP): Likewise. (INSN_UID): Likewise. (PREV_INSN): Likewise. (PATTERN): Likewise. (INSN_CODE): Likewise. (PUT_REG_NOTE_KIND): Likewise. (CODE_LABEL_NUMBER): Likewise. (NOTE_SOURCE_FILE): Likewise. (NOTE_BLOCK): Likewise. (NOTE_EH_HANDLER): Likewise. (NOTE_RANGE_INFO): Likewise. (NOTE_LIVE_INFO): Likewise. (NOTE_BASIC_BLOCK): Likewise. (NOTE_EXPECTED_VALUE): Likewise. (NOTE_LINE_NUMBER): Likewise. (LABEL_NAME): Likewise. (LABEL_NUSES): Likewise. (LABEL_ALTERNATE_NAME): Likewise. (ADDRESSOF_DECL): Likewise. (JUMP_LABEL): Likewise. (LABEL_NEXTREF): Likewise. (REGNO): Likewise. (ORIGINAL_REGNO: Likewise. (HARD_REGISTER_NUM_P): Add parenthesis. (SUBREG_REG): Whitespace. (SUBREG_BYTE): Likewise. (ASM_OPERANDS_TEMPLATE): Remove parenthesis. (ASM_OPERANDS_OUTPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_OUTPUT_IDX): Likewise. (ASM_OPERANDS_INPUT_VEC): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_VEC): Likewise. (ASM_OPERANDS_INPUT): Likewise. (ASM_OPERANDS_INPUT_LENGTH): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_INPUT_MODE): Likewise. (ASM_OPERANDS_SOURCE_FILE): Likewise. (ASM_OPERANDS_SOURCE_LINE): Likewise. (MEM_SET_IN_STRUCT_P): Minor reformat. (TRAP_CONDITION): Whitespace. (TRAP_CODE): Likewise. (COND_EXEC_TEST): Likewise. (COND_EXEC_CODE): Likewise. (FIND_REG_INC_NOTE): Uppercase macro args and add parenthesis. (PHI_NODE_P): Add parenthesis. (plus_constant): Whitespace and add paraenthese. From-SVN: r48497
2002-01-03 06:11:05 +01:00
rtl_check_failed_type1 (_rtx, _n, C1, __FILE__, __LINE__, \
__FUNCTION__); \
&_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
#define RTL_CHECK2(RTX, N, C1, C2) __extension__ \
(*({ 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)) \
rtl.h: Update copyright date. * rtl.h: Update copyright date. (RTL_CHECK1): Wrap long line. (RTL_CHECK2): Likewise. (RTL_CHECKC1): Wrap long line and whitespace. (RTL_CHECKC2): Likewise. (XWINT): Whitespace. (XINT): Likewise. (XSTR): Likewise. (XEXP): Likewise. (XVEC): Likewise. (XMODE): Likewise. (XBITMAP): Likewise. (XTREE): Likewise. (XBBDEF): Likewise. (XTMPL): Likewise. (X0WINT): Likewise. (X0INT):Likewise. (X0UINT): Likewise. (X0STR): Likewise. (X0EXP): Likewise. (X0VEC): Likewise. (X0MODE): Likewise. (X0BITMAP): Likewise. (X0TREE): Likewise. (X0BBDEF): Likewise. (X0ADVFLAGS): Likewise. (X0CSELIB): Likewise. (X0MEMATTR): Likewise. (XCWINT): Likewise. (XCINT): Likewise. (XCUINT): Likewise. (XCSTR): Likewise. (XCEXP): Likewise. (XCVEC): Likewise. (XCMODE): Likewise. (XCBITMAP): Likewise. (XCTREE): Likewise. (XCBBDEF): Likewise. (XCADVFLAGS): Likewise. (XCCSELIB): Likewise. (XC2EXP): Likewise. (INSN_UID): Likewise. (PREV_INSN): Likewise. (PATTERN): Likewise. (INSN_CODE): Likewise. (PUT_REG_NOTE_KIND): Likewise. (CODE_LABEL_NUMBER): Likewise. (NOTE_SOURCE_FILE): Likewise. (NOTE_BLOCK): Likewise. (NOTE_EH_HANDLER): Likewise. (NOTE_RANGE_INFO): Likewise. (NOTE_LIVE_INFO): Likewise. (NOTE_BASIC_BLOCK): Likewise. (NOTE_EXPECTED_VALUE): Likewise. (NOTE_LINE_NUMBER): Likewise. (LABEL_NAME): Likewise. (LABEL_NUSES): Likewise. (LABEL_ALTERNATE_NAME): Likewise. (ADDRESSOF_DECL): Likewise. (JUMP_LABEL): Likewise. (LABEL_NEXTREF): Likewise. (REGNO): Likewise. (ORIGINAL_REGNO: Likewise. (HARD_REGISTER_NUM_P): Add parenthesis. (SUBREG_REG): Whitespace. (SUBREG_BYTE): Likewise. (ASM_OPERANDS_TEMPLATE): Remove parenthesis. (ASM_OPERANDS_OUTPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_OUTPUT_IDX): Likewise. (ASM_OPERANDS_INPUT_VEC): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_VEC): Likewise. (ASM_OPERANDS_INPUT): Likewise. (ASM_OPERANDS_INPUT_LENGTH): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_INPUT_MODE): Likewise. (ASM_OPERANDS_SOURCE_FILE): Likewise. (ASM_OPERANDS_SOURCE_LINE): Likewise. (MEM_SET_IN_STRUCT_P): Minor reformat. (TRAP_CONDITION): Whitespace. (TRAP_CODE): Likewise. (COND_EXEC_TEST): Likewise. (COND_EXEC_CODE): Likewise. (FIND_REG_INC_NOTE): Uppercase macro args and add parenthesis. (PHI_NODE_P): Add parenthesis. (plus_constant): Whitespace and add paraenthese. From-SVN: r48497
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__, \
__FUNCTION__); \
&_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
#define RTL_CHECKC1(RTX, N, C) __extension__ \
(*({ rtx const _rtx = (RTX); const int _n = (N); \
rtl.h: Update copyright date. * rtl.h: Update copyright date. (RTL_CHECK1): Wrap long line. (RTL_CHECK2): Likewise. (RTL_CHECKC1): Wrap long line and whitespace. (RTL_CHECKC2): Likewise. (XWINT): Whitespace. (XINT): Likewise. (XSTR): Likewise. (XEXP): Likewise. (XVEC): Likewise. (XMODE): Likewise. (XBITMAP): Likewise. (XTREE): Likewise. (XBBDEF): Likewise. (XTMPL): Likewise. (X0WINT): Likewise. (X0INT):Likewise. (X0UINT): Likewise. (X0STR): Likewise. (X0EXP): Likewise. (X0VEC): Likewise. (X0MODE): Likewise. (X0BITMAP): Likewise. (X0TREE): Likewise. (X0BBDEF): Likewise. (X0ADVFLAGS): Likewise. (X0CSELIB): Likewise. (X0MEMATTR): Likewise. (XCWINT): Likewise. (XCINT): Likewise. (XCUINT): Likewise. (XCSTR): Likewise. (XCEXP): Likewise. (XCVEC): Likewise. (XCMODE): Likewise. (XCBITMAP): Likewise. (XCTREE): Likewise. (XCBBDEF): Likewise. (XCADVFLAGS): Likewise. (XCCSELIB): Likewise. (XC2EXP): Likewise. (INSN_UID): Likewise. (PREV_INSN): Likewise. (PATTERN): Likewise. (INSN_CODE): Likewise. (PUT_REG_NOTE_KIND): Likewise. (CODE_LABEL_NUMBER): Likewise. (NOTE_SOURCE_FILE): Likewise. (NOTE_BLOCK): Likewise. (NOTE_EH_HANDLER): Likewise. (NOTE_RANGE_INFO): Likewise. (NOTE_LIVE_INFO): Likewise. (NOTE_BASIC_BLOCK): Likewise. (NOTE_EXPECTED_VALUE): Likewise. (NOTE_LINE_NUMBER): Likewise. (LABEL_NAME): Likewise. (LABEL_NUSES): Likewise. (LABEL_ALTERNATE_NAME): Likewise. (ADDRESSOF_DECL): Likewise. (JUMP_LABEL): Likewise. (LABEL_NEXTREF): Likewise. (REGNO): Likewise. (ORIGINAL_REGNO: Likewise. (HARD_REGISTER_NUM_P): Add parenthesis. (SUBREG_REG): Whitespace. (SUBREG_BYTE): Likewise. (ASM_OPERANDS_TEMPLATE): Remove parenthesis. (ASM_OPERANDS_OUTPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_OUTPUT_IDX): Likewise. (ASM_OPERANDS_INPUT_VEC): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_VEC): Likewise. (ASM_OPERANDS_INPUT): Likewise. (ASM_OPERANDS_INPUT_LENGTH): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_INPUT_MODE): Likewise. (ASM_OPERANDS_SOURCE_FILE): Likewise. (ASM_OPERANDS_SOURCE_LINE): Likewise. (MEM_SET_IN_STRUCT_P): Minor reformat. (TRAP_CONDITION): Whitespace. (TRAP_CODE): Likewise. (COND_EXEC_TEST): Likewise. (COND_EXEC_CODE): Likewise. (FIND_REG_INC_NOTE): Uppercase macro args and add parenthesis. (PHI_NODE_P): Add parenthesis. (plus_constant): Whitespace and add paraenthese. From-SVN: r48497
2002-01-03 06:11:05 +01:00
if (GET_CODE (_rtx) != (C)) \
rtl_check_failed_code1 (_rtx, (C), __FILE__, __LINE__, \
__FUNCTION__); \
&_rtx->u.fld[_n]; }))
#define RTL_CHECKC2(RTX, N, C1, C2) __extension__ \
(*({ rtx const _rtx = (RTX); const int _n = (N); \
const enum rtx_code _code = GET_CODE (_rtx); \
rtl.h: Update copyright date. * rtl.h: Update copyright date. (RTL_CHECK1): Wrap long line. (RTL_CHECK2): Likewise. (RTL_CHECKC1): Wrap long line and whitespace. (RTL_CHECKC2): Likewise. (XWINT): Whitespace. (XINT): Likewise. (XSTR): Likewise. (XEXP): Likewise. (XVEC): Likewise. (XMODE): Likewise. (XBITMAP): Likewise. (XTREE): Likewise. (XBBDEF): Likewise. (XTMPL): Likewise. (X0WINT): Likewise. (X0INT):Likewise. (X0UINT): Likewise. (X0STR): Likewise. (X0EXP): Likewise. (X0VEC): Likewise. (X0MODE): Likewise. (X0BITMAP): Likewise. (X0TREE): Likewise. (X0BBDEF): Likewise. (X0ADVFLAGS): Likewise. (X0CSELIB): Likewise. (X0MEMATTR): Likewise. (XCWINT): Likewise. (XCINT): Likewise. (XCUINT): Likewise. (XCSTR): Likewise. (XCEXP): Likewise. (XCVEC): Likewise. (XCMODE): Likewise. (XCBITMAP): Likewise. (XCTREE): Likewise. (XCBBDEF): Likewise. (XCADVFLAGS): Likewise. (XCCSELIB): Likewise. (XC2EXP): Likewise. (INSN_UID): Likewise. (PREV_INSN): Likewise. (PATTERN): Likewise. (INSN_CODE): Likewise. (PUT_REG_NOTE_KIND): Likewise. (CODE_LABEL_NUMBER): Likewise. (NOTE_SOURCE_FILE): Likewise. (NOTE_BLOCK): Likewise. (NOTE_EH_HANDLER): Likewise. (NOTE_RANGE_INFO): Likewise. (NOTE_LIVE_INFO): Likewise. (NOTE_BASIC_BLOCK): Likewise. (NOTE_EXPECTED_VALUE): Likewise. (NOTE_LINE_NUMBER): Likewise. (LABEL_NAME): Likewise. (LABEL_NUSES): Likewise. (LABEL_ALTERNATE_NAME): Likewise. (ADDRESSOF_DECL): Likewise. (JUMP_LABEL): Likewise. (LABEL_NEXTREF): Likewise. (REGNO): Likewise. (ORIGINAL_REGNO: Likewise. (HARD_REGISTER_NUM_P): Add parenthesis. (SUBREG_REG): Whitespace. (SUBREG_BYTE): Likewise. (ASM_OPERANDS_TEMPLATE): Remove parenthesis. (ASM_OPERANDS_OUTPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_OUTPUT_IDX): Likewise. (ASM_OPERANDS_INPUT_VEC): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_VEC): Likewise. (ASM_OPERANDS_INPUT): Likewise. (ASM_OPERANDS_INPUT_LENGTH): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_INPUT_MODE): Likewise. (ASM_OPERANDS_SOURCE_FILE): Likewise. (ASM_OPERANDS_SOURCE_LINE): Likewise. (MEM_SET_IN_STRUCT_P): Minor reformat. (TRAP_CONDITION): Whitespace. (TRAP_CODE): Likewise. (COND_EXEC_TEST): Likewise. (COND_EXEC_CODE): Likewise. (FIND_REG_INC_NOTE): Uppercase macro args and add parenthesis. (PHI_NODE_P): Add parenthesis. (plus_constant): Whitespace and add paraenthese. From-SVN: r48497
2002-01-03 06:11:05 +01:00
if (_code != (C1) && _code != (C2)) \
rtl_check_failed_code2 (_rtx, (C1), (C2), __FILE__, __LINE__, \
__FUNCTION__); \
&_rtx->u.fld[_n]; }))
#define RTVEC_ELT(RTVEC, I) __extension__ \
(*({ 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__, \
__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]; }))
#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]; }))
#define XCMWINT(RTX, N, C, M) __extension__ \
(*({ rtx const _rtx = (RTX); \
if (GET_CODE (_rtx) != (C) || GET_MODE (_rtx) != (M)) \
rtl_check_failed_code_mode (_rtx, (C), (M), false, __FILE__, \
__LINE__, __FUNCTION__); \
&_rtx->u.hwint[N]; }))
#define XCNMPRV(RTX, C, M) __extension__ \
({ rtx const _rtx = (RTX); \
if (GET_CODE (_rtx) != (C) || GET_MODE (_rtx) == (M)) \
rtl_check_failed_code_mode (_rtx, (C), (M), true, __FILE__, \
__LINE__, __FUNCTION__); \
&_rtx->u.rv; })
re PR target/9703 ([arm] Accessing data through constant pool more times could be solved in less instructions) * cselib.c (cselib_init): Change RTX_SIZE to RTX_CODE_SIZE. * emit-rtl.c (copy_rtx_if_shared_1): Use shallow_copy_rtx. (copy_insn_1): Likewise. Don't copy each field individually. Reindent. * read-rtl.c (apply_macro_to_rtx): Use RTX_CODE_SIZE instead of RTX_SIZE. * reload1.c (eliminate_regs): Use shallow_copy_rtx. * rtl.c (rtx_size): Rename variable to... (rtx_code_size): ...this. (rtx_size): New function. (rtx_alloc_stat): Use RTX_CODE_SIZE instead of RTX_SIZE. (copy_rtx): Use shallow_copy_rtx. Don't copy each field individually. Reindent. (shallow_copy_rtx_stat): Use rtx_size instead of RTX_SIZE. * rtl.h (rtx_code_size): New variable. (rtx_size): Change from a variable to a function. (RTX_SIZE): Rename to... (RTX_CODE_SIZE): ...this. PR target/9703 PR tree-optimization/17106 * doc/tm.texi (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Document. (Anchored Addresses): New section. * doc/invoke.texi (-fsection-anchors): Document. * doc/rtl.texi (SYMBOL_REF_IN_BLOCK_P, SYMBOL_FLAG_IN_BLOCK): Likewise. (SYMBOL_REF_ANCHOR_P, SYMBOL_FLAG_ANCHOR): Likewise. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): Likewise. * hooks.c (hook_bool_mode_rtx_false): New function. * hooks.h (hook_bool_mode_rtx_false): Declare. * gengtype.c (create_optional_field): New function. (adjust_field_rtx_def): Add the "block_sym" field for SYMBOL_REFs when SYMBOL_REF_IN_BLOCK_P is true. * target.h (output_anchor, use_blocks_for_constant_p): New hooks. (min_anchor_offset, max_anchor_offset): Likewise. (use_anchors_for_symbol_p): New hook. * toplev.c (compile_file): Call output_object_blocks. (target_supports_section_anchors_p): New function. (process_options): Check that -fsection-anchors is only used on targets that support it and when -funit-at-a-time is in effect. * tree-ssa-loop-ivopts.c (prepare_decl_rtl): Only create DECL_RTL if the decl doesn't have one. * dwarf2out.c: Remove instantiations of VEC(rtx,gc). * expr.c (emit_move_multi_word, emit_move_insn): Pass the result of force_const_mem through use_anchored_address. (expand_expr_constant): New function. (expand_expr_addr_expr_1): Call it. Use the same modifier when calling expand_expr for INDIRECT_REF. (expand_expr_real_1): Pass DECL_RTL through use_anchored_address for all modifiers except EXPAND_INITIALIZER. Use expand_expr_constant. * expr.h (use_anchored_address): Declare. * loop-unroll.c: Don't declare rtx vectors here. * explow.c: Include output.h. (validize_mem): Call use_anchored_address. (use_anchored_address): New function. * common.opt (-fsection-anchors): New switch. * varasm.c (object_block_htab, anchor_labelno): New variables. (hash_section, object_block_entry_eq, object_block_entry_hash) (use_object_blocks_p, get_block_for_section, create_block_symbol) (use_blocks_for_decl_p, change_symbol_section): New functions. (get_variable_section): New function, split out from assemble_variable. (make_decl_rtl): Create a block symbol if use_object_blocks_p and use_blocks_for_decl_p say so. Use change_symbol_section if the symbol has already been created. (assemble_variable_contents): New function, split out from... (assemble_variable): ...here. Don't output any code for block symbols; just pass them to place_block_symbol. Use get_variable_section and assemble_variable_contents. (get_constant_alignment, get_constant_section, get_constant_size): New functions, split from output_constant_def_contents. (build_constant_desc): Create a block symbol if use_object_blocks_p says so. Or into SYMBOL_REF_FLAGS. (assemble_constant_contents): New function, split from... (output_constant_def_contents): ...here. Don't output any code for block symbols; just pass them to place_section_symbol. Use get_constant_section and get_constant_alignment. (force_const_mem): Create a block symbol if use_object_blocks_p and use_blocks_for_constant_p say so. Or into SYMBOL_REF_FLAGS. (output_constant_pool_1): Add an explicit alignment argument. Don't switch sections here. (output_constant_pool): Adjust call to output_constant_pool_1. Switch sections here instead. Don't output anything for block symbols; just pass them to place_block_symbol. (init_varasm_once): Initialize object_block_htab. (default_encode_section_info): Keep the old SYMBOL_FLAG_IN_BLOCK. (default_asm_output_anchor, default_use_aenchors_for_symbol_p) (place_block_symbol, get_section_anchor, output_object_block) (output_object_block_htab, output_object_blocks): New functions. * target-def.h (TARGET_ASM_OUTPUT_ANCHOR): New macro. (TARGET_ASM_OUT): Include it. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): New macro. (TARGET_MIN_ANCHOR_OFFSET, TARGET_MAX_ANCHOR_OFFSET): New macros. (TARGET_USE_ANCHORS_FOR_SYMBOL_P): New macro. (TARGET_INITIALIZER): Include them. * rtl.c (rtl_check_failed_block_symbol): New function. * rtl.h: Include vec.h. Declare heap and gc rtx vectors. (block_symbol, object_block): New structures. (rtx_def): Add a block_symbol field to the union. (BLOCK_SYMBOL_CHECK): New macro. (rtl_check_failed_block_symbol): Declare. (SYMBOL_FLAG_IN_BLOCK, SYMBOL_FLAG_ANCHOR): New SYMBOL_REF flags. (SYMBOL_REF_IN_BLOCK_P, SYMBOL_REF_ANCHOR_P): New predicates. (SYMBOL_FLAG_MACH_DEP_SHIFT): Bump by 2. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): New accessors. * output.h (output_section_symbols): Declare. (object_block): Name structure. (place_section_symbol, get_section_anchor, default_asm_output_anchor) (default_use_anchors_for_symbol_p): Declare. * Makefile.in (RTL_BASE_H): Add vec.h. (explow.o): Depend on output.h. * config/rs6000/rs6000.c (TARGET_MIN_ANCHOR_OFFSET): Override default. (TARGET_MAX_ANCHOR_OFFSET): Likewise. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise. (rs6000_use_blocks_for_constant_p): New function. From-SVN: r111254
2006-02-18 23:06:53 +01:00
#define BLOCK_SYMBOL_CHECK(RTX) __extension__ \
({ rtx const _symbol = (RTX); \
unsigned int flags = RTL_CHECKC1 (_symbol, 1, SYMBOL_REF).rt_int; \
if ((flags & SYMBOL_FLAG_HAS_BLOCK_INFO) == 0) \
re PR target/9703 ([arm] Accessing data through constant pool more times could be solved in less instructions) * cselib.c (cselib_init): Change RTX_SIZE to RTX_CODE_SIZE. * emit-rtl.c (copy_rtx_if_shared_1): Use shallow_copy_rtx. (copy_insn_1): Likewise. Don't copy each field individually. Reindent. * read-rtl.c (apply_macro_to_rtx): Use RTX_CODE_SIZE instead of RTX_SIZE. * reload1.c (eliminate_regs): Use shallow_copy_rtx. * rtl.c (rtx_size): Rename variable to... (rtx_code_size): ...this. (rtx_size): New function. (rtx_alloc_stat): Use RTX_CODE_SIZE instead of RTX_SIZE. (copy_rtx): Use shallow_copy_rtx. Don't copy each field individually. Reindent. (shallow_copy_rtx_stat): Use rtx_size instead of RTX_SIZE. * rtl.h (rtx_code_size): New variable. (rtx_size): Change from a variable to a function. (RTX_SIZE): Rename to... (RTX_CODE_SIZE): ...this. PR target/9703 PR tree-optimization/17106 * doc/tm.texi (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Document. (Anchored Addresses): New section. * doc/invoke.texi (-fsection-anchors): Document. * doc/rtl.texi (SYMBOL_REF_IN_BLOCK_P, SYMBOL_FLAG_IN_BLOCK): Likewise. (SYMBOL_REF_ANCHOR_P, SYMBOL_FLAG_ANCHOR): Likewise. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): Likewise. * hooks.c (hook_bool_mode_rtx_false): New function. * hooks.h (hook_bool_mode_rtx_false): Declare. * gengtype.c (create_optional_field): New function. (adjust_field_rtx_def): Add the "block_sym" field for SYMBOL_REFs when SYMBOL_REF_IN_BLOCK_P is true. * target.h (output_anchor, use_blocks_for_constant_p): New hooks. (min_anchor_offset, max_anchor_offset): Likewise. (use_anchors_for_symbol_p): New hook. * toplev.c (compile_file): Call output_object_blocks. (target_supports_section_anchors_p): New function. (process_options): Check that -fsection-anchors is only used on targets that support it and when -funit-at-a-time is in effect. * tree-ssa-loop-ivopts.c (prepare_decl_rtl): Only create DECL_RTL if the decl doesn't have one. * dwarf2out.c: Remove instantiations of VEC(rtx,gc). * expr.c (emit_move_multi_word, emit_move_insn): Pass the result of force_const_mem through use_anchored_address. (expand_expr_constant): New function. (expand_expr_addr_expr_1): Call it. Use the same modifier when calling expand_expr for INDIRECT_REF. (expand_expr_real_1): Pass DECL_RTL through use_anchored_address for all modifiers except EXPAND_INITIALIZER. Use expand_expr_constant. * expr.h (use_anchored_address): Declare. * loop-unroll.c: Don't declare rtx vectors here. * explow.c: Include output.h. (validize_mem): Call use_anchored_address. (use_anchored_address): New function. * common.opt (-fsection-anchors): New switch. * varasm.c (object_block_htab, anchor_labelno): New variables. (hash_section, object_block_entry_eq, object_block_entry_hash) (use_object_blocks_p, get_block_for_section, create_block_symbol) (use_blocks_for_decl_p, change_symbol_section): New functions. (get_variable_section): New function, split out from assemble_variable. (make_decl_rtl): Create a block symbol if use_object_blocks_p and use_blocks_for_decl_p say so. Use change_symbol_section if the symbol has already been created. (assemble_variable_contents): New function, split out from... (assemble_variable): ...here. Don't output any code for block symbols; just pass them to place_block_symbol. Use get_variable_section and assemble_variable_contents. (get_constant_alignment, get_constant_section, get_constant_size): New functions, split from output_constant_def_contents. (build_constant_desc): Create a block symbol if use_object_blocks_p says so. Or into SYMBOL_REF_FLAGS. (assemble_constant_contents): New function, split from... (output_constant_def_contents): ...here. Don't output any code for block symbols; just pass them to place_section_symbol. Use get_constant_section and get_constant_alignment. (force_const_mem): Create a block symbol if use_object_blocks_p and use_blocks_for_constant_p say so. Or into SYMBOL_REF_FLAGS. (output_constant_pool_1): Add an explicit alignment argument. Don't switch sections here. (output_constant_pool): Adjust call to output_constant_pool_1. Switch sections here instead. Don't output anything for block symbols; just pass them to place_block_symbol. (init_varasm_once): Initialize object_block_htab. (default_encode_section_info): Keep the old SYMBOL_FLAG_IN_BLOCK. (default_asm_output_anchor, default_use_aenchors_for_symbol_p) (place_block_symbol, get_section_anchor, output_object_block) (output_object_block_htab, output_object_blocks): New functions. * target-def.h (TARGET_ASM_OUTPUT_ANCHOR): New macro. (TARGET_ASM_OUT): Include it. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): New macro. (TARGET_MIN_ANCHOR_OFFSET, TARGET_MAX_ANCHOR_OFFSET): New macros. (TARGET_USE_ANCHORS_FOR_SYMBOL_P): New macro. (TARGET_INITIALIZER): Include them. * rtl.c (rtl_check_failed_block_symbol): New function. * rtl.h: Include vec.h. Declare heap and gc rtx vectors. (block_symbol, object_block): New structures. (rtx_def): Add a block_symbol field to the union. (BLOCK_SYMBOL_CHECK): New macro. (rtl_check_failed_block_symbol): Declare. (SYMBOL_FLAG_IN_BLOCK, SYMBOL_FLAG_ANCHOR): New SYMBOL_REF flags. (SYMBOL_REF_IN_BLOCK_P, SYMBOL_REF_ANCHOR_P): New predicates. (SYMBOL_FLAG_MACH_DEP_SHIFT): Bump by 2. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): New accessors. * output.h (output_section_symbols): Declare. (object_block): Name structure. (place_section_symbol, get_section_anchor, default_asm_output_anchor) (default_use_anchors_for_symbol_p): Declare. * Makefile.in (RTL_BASE_H): Add vec.h. (explow.o): Depend on output.h. * config/rs6000/rs6000.c (TARGET_MIN_ANCHOR_OFFSET): Override default. (TARGET_MAX_ANCHOR_OFFSET): Likewise. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise. (rs6000_use_blocks_for_constant_p): New function. From-SVN: r111254
2006-02-18 23:06:53 +01:00
rtl_check_failed_block_symbol (__FILE__, __LINE__, \
__FUNCTION__); \
&_symbol->u.block_sym; })
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;
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;
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;
extern void rtl_check_failed_code1 (rtx, enum rtx_code, const char *,
int, const char *)
ATTRIBUTE_NORETURN;
extern void rtl_check_failed_code2 (rtx, enum rtx_code, enum rtx_code,
const char *, int, const char *)
ATTRIBUTE_NORETURN;
extern void rtl_check_failed_code_mode (rtx, enum rtx_code, enum machine_mode,
bool, const char *, int, const char *)
ATTRIBUTE_NORETURN;
re PR target/9703 ([arm] Accessing data through constant pool more times could be solved in less instructions) * cselib.c (cselib_init): Change RTX_SIZE to RTX_CODE_SIZE. * emit-rtl.c (copy_rtx_if_shared_1): Use shallow_copy_rtx. (copy_insn_1): Likewise. Don't copy each field individually. Reindent. * read-rtl.c (apply_macro_to_rtx): Use RTX_CODE_SIZE instead of RTX_SIZE. * reload1.c (eliminate_regs): Use shallow_copy_rtx. * rtl.c (rtx_size): Rename variable to... (rtx_code_size): ...this. (rtx_size): New function. (rtx_alloc_stat): Use RTX_CODE_SIZE instead of RTX_SIZE. (copy_rtx): Use shallow_copy_rtx. Don't copy each field individually. Reindent. (shallow_copy_rtx_stat): Use rtx_size instead of RTX_SIZE. * rtl.h (rtx_code_size): New variable. (rtx_size): Change from a variable to a function. (RTX_SIZE): Rename to... (RTX_CODE_SIZE): ...this. PR target/9703 PR tree-optimization/17106 * doc/tm.texi (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Document. (Anchored Addresses): New section. * doc/invoke.texi (-fsection-anchors): Document. * doc/rtl.texi (SYMBOL_REF_IN_BLOCK_P, SYMBOL_FLAG_IN_BLOCK): Likewise. (SYMBOL_REF_ANCHOR_P, SYMBOL_FLAG_ANCHOR): Likewise. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): Likewise. * hooks.c (hook_bool_mode_rtx_false): New function. * hooks.h (hook_bool_mode_rtx_false): Declare. * gengtype.c (create_optional_field): New function. (adjust_field_rtx_def): Add the "block_sym" field for SYMBOL_REFs when SYMBOL_REF_IN_BLOCK_P is true. * target.h (output_anchor, use_blocks_for_constant_p): New hooks. (min_anchor_offset, max_anchor_offset): Likewise. (use_anchors_for_symbol_p): New hook. * toplev.c (compile_file): Call output_object_blocks. (target_supports_section_anchors_p): New function. (process_options): Check that -fsection-anchors is only used on targets that support it and when -funit-at-a-time is in effect. * tree-ssa-loop-ivopts.c (prepare_decl_rtl): Only create DECL_RTL if the decl doesn't have one. * dwarf2out.c: Remove instantiations of VEC(rtx,gc). * expr.c (emit_move_multi_word, emit_move_insn): Pass the result of force_const_mem through use_anchored_address. (expand_expr_constant): New function. (expand_expr_addr_expr_1): Call it. Use the same modifier when calling expand_expr for INDIRECT_REF. (expand_expr_real_1): Pass DECL_RTL through use_anchored_address for all modifiers except EXPAND_INITIALIZER. Use expand_expr_constant. * expr.h (use_anchored_address): Declare. * loop-unroll.c: Don't declare rtx vectors here. * explow.c: Include output.h. (validize_mem): Call use_anchored_address. (use_anchored_address): New function. * common.opt (-fsection-anchors): New switch. * varasm.c (object_block_htab, anchor_labelno): New variables. (hash_section, object_block_entry_eq, object_block_entry_hash) (use_object_blocks_p, get_block_for_section, create_block_symbol) (use_blocks_for_decl_p, change_symbol_section): New functions. (get_variable_section): New function, split out from assemble_variable. (make_decl_rtl): Create a block symbol if use_object_blocks_p and use_blocks_for_decl_p say so. Use change_symbol_section if the symbol has already been created. (assemble_variable_contents): New function, split out from... (assemble_variable): ...here. Don't output any code for block symbols; just pass them to place_block_symbol. Use get_variable_section and assemble_variable_contents. (get_constant_alignment, get_constant_section, get_constant_size): New functions, split from output_constant_def_contents. (build_constant_desc): Create a block symbol if use_object_blocks_p says so. Or into SYMBOL_REF_FLAGS. (assemble_constant_contents): New function, split from... (output_constant_def_contents): ...here. Don't output any code for block symbols; just pass them to place_section_symbol. Use get_constant_section and get_constant_alignment. (force_const_mem): Create a block symbol if use_object_blocks_p and use_blocks_for_constant_p say so. Or into SYMBOL_REF_FLAGS. (output_constant_pool_1): Add an explicit alignment argument. Don't switch sections here. (output_constant_pool): Adjust call to output_constant_pool_1. Switch sections here instead. Don't output anything for block symbols; just pass them to place_block_symbol. (init_varasm_once): Initialize object_block_htab. (default_encode_section_info): Keep the old SYMBOL_FLAG_IN_BLOCK. (default_asm_output_anchor, default_use_aenchors_for_symbol_p) (place_block_symbol, get_section_anchor, output_object_block) (output_object_block_htab, output_object_blocks): New functions. * target-def.h (TARGET_ASM_OUTPUT_ANCHOR): New macro. (TARGET_ASM_OUT): Include it. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): New macro. (TARGET_MIN_ANCHOR_OFFSET, TARGET_MAX_ANCHOR_OFFSET): New macros. (TARGET_USE_ANCHORS_FOR_SYMBOL_P): New macro. (TARGET_INITIALIZER): Include them. * rtl.c (rtl_check_failed_block_symbol): New function. * rtl.h: Include vec.h. Declare heap and gc rtx vectors. (block_symbol, object_block): New structures. (rtx_def): Add a block_symbol field to the union. (BLOCK_SYMBOL_CHECK): New macro. (rtl_check_failed_block_symbol): Declare. (SYMBOL_FLAG_IN_BLOCK, SYMBOL_FLAG_ANCHOR): New SYMBOL_REF flags. (SYMBOL_REF_IN_BLOCK_P, SYMBOL_REF_ANCHOR_P): New predicates. (SYMBOL_FLAG_MACH_DEP_SHIFT): Bump by 2. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): New accessors. * output.h (output_section_symbols): Declare. (object_block): Name structure. (place_section_symbol, get_section_anchor, default_asm_output_anchor) (default_use_anchors_for_symbol_p): Declare. * Makefile.in (RTL_BASE_H): Add vec.h. (explow.o): Depend on output.h. * config/rs6000/rs6000.c (TARGET_MIN_ANCHOR_OFFSET): Override default. (TARGET_MAX_ANCHOR_OFFSET): Likewise. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise. (rs6000_use_blocks_for_constant_p): New function. From-SVN: r111254
2006-02-18 23:06:53 +01:00
extern void rtl_check_failed_block_symbol (const char *, int, const char *)
ATTRIBUTE_NORETURN;
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;
#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
#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])
#define RTVEC_ELT(RTVEC, I) ((RTVEC)->elem[I])
#define XWINT(RTX, N) ((RTX)->u.hwint[N])
#define XCWINT(RTX, N, C) ((RTX)->u.hwint[N])
#define XCMWINT(RTX, N, C, M) ((RTX)->u.hwint[N])
#define XCNMWINT(RTX, N, C, M) ((RTX)->u.hwint[N])
#define XCNMPRV(RTX, C, M) (&(RTX)->u.rv)
re PR target/9703 ([arm] Accessing data through constant pool more times could be solved in less instructions) * cselib.c (cselib_init): Change RTX_SIZE to RTX_CODE_SIZE. * emit-rtl.c (copy_rtx_if_shared_1): Use shallow_copy_rtx. (copy_insn_1): Likewise. Don't copy each field individually. Reindent. * read-rtl.c (apply_macro_to_rtx): Use RTX_CODE_SIZE instead of RTX_SIZE. * reload1.c (eliminate_regs): Use shallow_copy_rtx. * rtl.c (rtx_size): Rename variable to... (rtx_code_size): ...this. (rtx_size): New function. (rtx_alloc_stat): Use RTX_CODE_SIZE instead of RTX_SIZE. (copy_rtx): Use shallow_copy_rtx. Don't copy each field individually. Reindent. (shallow_copy_rtx_stat): Use rtx_size instead of RTX_SIZE. * rtl.h (rtx_code_size): New variable. (rtx_size): Change from a variable to a function. (RTX_SIZE): Rename to... (RTX_CODE_SIZE): ...this. PR target/9703 PR tree-optimization/17106 * doc/tm.texi (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Document. (Anchored Addresses): New section. * doc/invoke.texi (-fsection-anchors): Document. * doc/rtl.texi (SYMBOL_REF_IN_BLOCK_P, SYMBOL_FLAG_IN_BLOCK): Likewise. (SYMBOL_REF_ANCHOR_P, SYMBOL_FLAG_ANCHOR): Likewise. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): Likewise. * hooks.c (hook_bool_mode_rtx_false): New function. * hooks.h (hook_bool_mode_rtx_false): Declare. * gengtype.c (create_optional_field): New function. (adjust_field_rtx_def): Add the "block_sym" field for SYMBOL_REFs when SYMBOL_REF_IN_BLOCK_P is true. * target.h (output_anchor, use_blocks_for_constant_p): New hooks. (min_anchor_offset, max_anchor_offset): Likewise. (use_anchors_for_symbol_p): New hook. * toplev.c (compile_file): Call output_object_blocks. (target_supports_section_anchors_p): New function. (process_options): Check that -fsection-anchors is only used on targets that support it and when -funit-at-a-time is in effect. * tree-ssa-loop-ivopts.c (prepare_decl_rtl): Only create DECL_RTL if the decl doesn't have one. * dwarf2out.c: Remove instantiations of VEC(rtx,gc). * expr.c (emit_move_multi_word, emit_move_insn): Pass the result of force_const_mem through use_anchored_address. (expand_expr_constant): New function. (expand_expr_addr_expr_1): Call it. Use the same modifier when calling expand_expr for INDIRECT_REF. (expand_expr_real_1): Pass DECL_RTL through use_anchored_address for all modifiers except EXPAND_INITIALIZER. Use expand_expr_constant. * expr.h (use_anchored_address): Declare. * loop-unroll.c: Don't declare rtx vectors here. * explow.c: Include output.h. (validize_mem): Call use_anchored_address. (use_anchored_address): New function. * common.opt (-fsection-anchors): New switch. * varasm.c (object_block_htab, anchor_labelno): New variables. (hash_section, object_block_entry_eq, object_block_entry_hash) (use_object_blocks_p, get_block_for_section, create_block_symbol) (use_blocks_for_decl_p, change_symbol_section): New functions. (get_variable_section): New function, split out from assemble_variable. (make_decl_rtl): Create a block symbol if use_object_blocks_p and use_blocks_for_decl_p say so. Use change_symbol_section if the symbol has already been created. (assemble_variable_contents): New function, split out from... (assemble_variable): ...here. Don't output any code for block symbols; just pass them to place_block_symbol. Use get_variable_section and assemble_variable_contents. (get_constant_alignment, get_constant_section, get_constant_size): New functions, split from output_constant_def_contents. (build_constant_desc): Create a block symbol if use_object_blocks_p says so. Or into SYMBOL_REF_FLAGS. (assemble_constant_contents): New function, split from... (output_constant_def_contents): ...here. Don't output any code for block symbols; just pass them to place_section_symbol. Use get_constant_section and get_constant_alignment. (force_const_mem): Create a block symbol if use_object_blocks_p and use_blocks_for_constant_p say so. Or into SYMBOL_REF_FLAGS. (output_constant_pool_1): Add an explicit alignment argument. Don't switch sections here. (output_constant_pool): Adjust call to output_constant_pool_1. Switch sections here instead. Don't output anything for block symbols; just pass them to place_block_symbol. (init_varasm_once): Initialize object_block_htab. (default_encode_section_info): Keep the old SYMBOL_FLAG_IN_BLOCK. (default_asm_output_anchor, default_use_aenchors_for_symbol_p) (place_block_symbol, get_section_anchor, output_object_block) (output_object_block_htab, output_object_blocks): New functions. * target-def.h (TARGET_ASM_OUTPUT_ANCHOR): New macro. (TARGET_ASM_OUT): Include it. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): New macro. (TARGET_MIN_ANCHOR_OFFSET, TARGET_MAX_ANCHOR_OFFSET): New macros. (TARGET_USE_ANCHORS_FOR_SYMBOL_P): New macro. (TARGET_INITIALIZER): Include them. * rtl.c (rtl_check_failed_block_symbol): New function. * rtl.h: Include vec.h. Declare heap and gc rtx vectors. (block_symbol, object_block): New structures. (rtx_def): Add a block_symbol field to the union. (BLOCK_SYMBOL_CHECK): New macro. (rtl_check_failed_block_symbol): Declare. (SYMBOL_FLAG_IN_BLOCK, SYMBOL_FLAG_ANCHOR): New SYMBOL_REF flags. (SYMBOL_REF_IN_BLOCK_P, SYMBOL_REF_ANCHOR_P): New predicates. (SYMBOL_FLAG_MACH_DEP_SHIFT): Bump by 2. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): New accessors. * output.h (output_section_symbols): Declare. (object_block): Name structure. (place_section_symbol, get_section_anchor, default_asm_output_anchor) (default_use_anchors_for_symbol_p): Declare. * Makefile.in (RTL_BASE_H): Add vec.h. (explow.o): Depend on output.h. * config/rs6000/rs6000.c (TARGET_MIN_ANCHOR_OFFSET): Override default. (TARGET_MAX_ANCHOR_OFFSET): Likewise. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise. (rs6000_use_blocks_for_constant_p): New function. From-SVN: r111254
2006-02-18 23:06:53 +01:00
#define BLOCK_SYMBOL_CHECK(RTX) (&(RTX)->u.block_sym)
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
/* 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)
#if defined ENABLE_RTL_FLAG_CHECKING && (GCC_VERSION >= 2007)
#define RTL_FLAG_CHECK1(NAME, RTX, C1) __extension__ \
({ rtx const _rtx = (RTX); \
if (GET_CODE(_rtx) != C1) \
rtl_check_failed_flag (NAME, _rtx, __FILE__, __LINE__, \
__FUNCTION__); \
_rtx; })
#define RTL_FLAG_CHECK2(NAME, RTX, C1, C2) __extension__ \
({ rtx const _rtx = (RTX); \
if (GET_CODE(_rtx) != C1 && GET_CODE(_rtx) != C2) \
rtl_check_failed_flag (NAME,_rtx, __FILE__, __LINE__, \
__FUNCTION__); \
_rtx; })
#define RTL_FLAG_CHECK3(NAME, RTX, C1, C2, C3) __extension__ \
({ rtx const _rtx = (RTX); \
if (GET_CODE(_rtx) != C1 && GET_CODE(_rtx) != C2 \
&& GET_CODE(_rtx) != C3) \
rtl_check_failed_flag (NAME, _rtx, __FILE__, __LINE__, \
__FUNCTION__); \
_rtx; })
#define RTL_FLAG_CHECK4(NAME, RTX, C1, C2, C3, C4) __extension__ \
({ rtx const _rtx = (RTX); \
if (GET_CODE(_rtx) != C1 && GET_CODE(_rtx) != C2 \
&& GET_CODE(_rtx) != C3 && GET_CODE(_rtx) != C4) \
rtl_check_failed_flag (NAME, _rtx, __FILE__, __LINE__, \
__FUNCTION__); \
_rtx; })
#define RTL_FLAG_CHECK5(NAME, RTX, C1, C2, C3, C4, C5) __extension__ \
({ rtx const _rtx = (RTX); \
if (GET_CODE(_rtx) != C1 && GET_CODE(_rtx) != C2 \
&& GET_CODE(_rtx) != C3 && GET_CODE(_rtx) != C4 \
&& GET_CODE(_rtx) != C5) \
rtl_check_failed_flag (NAME, _rtx, __FILE__, __LINE__, \
__FUNCTION__); \
_rtx; })
#define RTL_FLAG_CHECK6(NAME, RTX, C1, C2, C3, C4, C5, C6) \
__extension__ \
({ rtx const _rtx = (RTX); \
if (GET_CODE(_rtx) != C1 && GET_CODE(_rtx) != C2 \
&& GET_CODE(_rtx) != C3 && GET_CODE(_rtx) != C4 \
&& GET_CODE(_rtx) != C5 && GET_CODE(_rtx) != C6) \
rtl_check_failed_flag (NAME,_rtx, __FILE__, __LINE__, \
__FUNCTION__); \
_rtx; })
#define RTL_FLAG_CHECK7(NAME, RTX, C1, C2, C3, C4, C5, C6, C7) \
__extension__ \
({ rtx const _rtx = (RTX); \
if (GET_CODE(_rtx) != C1 && GET_CODE(_rtx) != C2 \
&& GET_CODE(_rtx) != C3 && GET_CODE(_rtx) != C4 \
&& GET_CODE(_rtx) != C5 && GET_CODE(_rtx) != C6 \
&& GET_CODE(_rtx) != C7) \
rtl_check_failed_flag (NAME, _rtx, __FILE__, __LINE__, \
__FUNCTION__); \
_rtx; })
#define RTL_FLAG_CHECK8(NAME, RTX, C1, C2, C3, C4, C5, C6, C7, C8) \
__extension__ \
({ rtx const _rtx = (RTX); \
if (GET_CODE(_rtx) != C1 && GET_CODE(_rtx) != C2 \
&& GET_CODE(_rtx) != C3 && GET_CODE(_rtx) != C4 \
&& GET_CODE(_rtx) != C5 && GET_CODE(_rtx) != C6 \
&& GET_CODE(_rtx) != C7 && GET_CODE(_rtx) != C8) \
rtl_check_failed_flag (NAME, _rtx, __FILE__, __LINE__, \
__FUNCTION__); \
_rtx; })
extern void rtl_check_failed_flag (const char *, rtx, const char *,
int, const char *)
ATTRIBUTE_NORETURN
;
#else /* not ENABLE_RTL_FLAG_CHECKING */
#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)
#define RTL_FLAG_CHECK5(NAME, RTX, C1, C2, C3, C4, C5) (RTX)
#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)
#endif
#define XINT(RTX, N) (RTL_CHECK2 (RTX, N, 'i', 'n').rt_int)
#define XSTR(RTX, N) (RTL_CHECK2 (RTX, N, 's', 'S').rt_str)
#define XEXP(RTX, N) (RTL_CHECK2 (RTX, N, 'e', 'u').rt_rtx)
#define XVEC(RTX, N) (RTL_CHECK2 (RTX, N, 'E', 'V').rt_rtvec)
#define XMODE(RTX, N) (RTL_CHECK1 (RTX, N, 'M').rt_type)
#define XBITMAP(RTX, N) (RTL_CHECK1 (RTX, N, 'b').rt_bit)
#define XTREE(RTX, N) (RTL_CHECK1 (RTX, N, 't').rt_tree)
#define XBBDEF(RTX, N) (RTL_CHECK1 (RTX, N, 'B').rt_bb)
#define XTMPL(RTX, N) (RTL_CHECK1 (RTX, N, 'T').rt_str)
rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and bounds- check RTL accesses if --enable-checking. 1999-08-31 12:20 -0700 Zack Weinberg <zack@bitmover.com> * rtl.h (RTL_CHECK1, RTL_CHECK2): New macros which type- and bounds- check RTL accesses if --enable-checking. (RTVEC_ELT): Bounds check if --enable-checking. (XWINT, XINT, XSTR, XEXP, XVEC, XMODE, XBITMAP, XTREE, XBBDEF): Use RTL_CHECK1/RTL_CHECK2 as appropriate. (XVECEXP, XVECLEN): Define in terms of XVEC, RTVEC_ELT, and GET_NUM_ELEM. (X0WINT, X0INT, X0STR, X0EXP, X0VEC, X0MODE, X0BITMAP, X0TREE, X0BBDEF, X0ADVFLAGS): New macros for accessing '0' slots of RTXes. (ADDR_DIFF_VEC_FLAGS): Use X0ADVFLAGS. (NOTE_SOURCE_FILE): Use X0STR. (NOTE_BLOCK_NUMBER, NOTE_EH_HANDLER, LABEL_NUSES, MEM_ALIAS_SET): Use X0INT. (NOTE_RANGE_INFO, NOTE_LIVE_INFO, NOTE_BASIC_BLOCK, JUMP_LABEL, LABEL_REFS, LABEL_NEXTREF, CONTAINING_INSN): Use X0EXP. * real.h (CONST_DOUBLE_CHAIN): Use X0EXP. * rtl.c (copy_rtx, copy_most_rtx): Copy '0' slots with X0WINT. (rtl_check_failed_bounds, rtl_check_failed_type1, rtl_check_failed_type2, rtvec_check_failed_bounds): New functions. (fancy_abort): Fix comment. * cse.c (canon_hash): Read CONST_DOUBLE data slots with XWINT. (cse_insn): Decrement LABEL_NUSES for jump target before deleting jump insn. * emit-rtl.c (gen_rtx_CONST_DOUBLE): Use X0EXP for slot 1. * final.c (alter_subreg): Compute regno before changing x to REG; set REGNO(x) after changing it. * flow.c (count_basic_blocks): Use XWINT to inspect EH_REGION notes containing CONST_INTs. (delete_eh_regions): Use NOTE_EH_HANDLER. * function.c (put_reg_into_stack): Make reg a MEM before initializing it. (fixup_var_refs_insns): Save REG_NOTES (insn) in case we delete insn. (gen_mem_addressof): Make reg a MEM before initializing it. * integrate.c (copy_rtx_and_substitute): Copy '0' slots with X0WINT. * local-alloc.c (update_equiv_regs): Zap REG_NOTES before deleting an insn, not after. (block_alloc): Only look at PATTERN(insn) if we have to, and only if it's format class 'i'. * loop.c (check_dbra_loop): Check bl->biv->add_val is a CONST_INT before using its INTVAL. * print-rtl.c (print_rtx): Use X0STR. * regmove.c (fixup_match_1): Don't look at PATTERN of non-class-'i' insn chain elements. * reload.c (loc_mentioned_in_p): Take address of in->fld[1].rtx directly. * reload1.c (reload): Change reg to a MEM before initializing it. * varasm.c (mark_constant_pool): Skip CONST_DOUBLES, which have no names. * config/i386/i386.md (decrement_and_branch_if_zero): Fix typo. From-SVN: r29008
1999-08-31 21:39:10 +02:00
#define XVECEXP(RTX, N, M) RTVEC_ELT (XVEC (RTX, N), M)
#define XVECLEN(RTX, N) GET_NUM_ELEM (XVEC (RTX, N))
/* 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. */
#define X0INT(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_int)
#define X0UINT(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_uint)
#define X0STR(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_str)
#define X0EXP(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_rtx)
#define X0VEC(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_rtvec)
#define X0MODE(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_type)
#define X0BITMAP(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_bit)
#define X0TREE(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_tree)
#define X0BBDEF(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_bb)
rtl.h: Update copyright date. * rtl.h: Update copyright date. (RTL_CHECK1): Wrap long line. (RTL_CHECK2): Likewise. (RTL_CHECKC1): Wrap long line and whitespace. (RTL_CHECKC2): Likewise. (XWINT): Whitespace. (XINT): Likewise. (XSTR): Likewise. (XEXP): Likewise. (XVEC): Likewise. (XMODE): Likewise. (XBITMAP): Likewise. (XTREE): Likewise. (XBBDEF): Likewise. (XTMPL): Likewise. (X0WINT): Likewise. (X0INT):Likewise. (X0UINT): Likewise. (X0STR): Likewise. (X0EXP): Likewise. (X0VEC): Likewise. (X0MODE): Likewise. (X0BITMAP): Likewise. (X0TREE): Likewise. (X0BBDEF): Likewise. (X0ADVFLAGS): Likewise. (X0CSELIB): Likewise. (X0MEMATTR): Likewise. (XCWINT): Likewise. (XCINT): Likewise. (XCUINT): Likewise. (XCSTR): Likewise. (XCEXP): Likewise. (XCVEC): Likewise. (XCMODE): Likewise. (XCBITMAP): Likewise. (XCTREE): Likewise. (XCBBDEF): Likewise. (XCADVFLAGS): Likewise. (XCCSELIB): Likewise. (XC2EXP): Likewise. (INSN_UID): Likewise. (PREV_INSN): Likewise. (PATTERN): Likewise. (INSN_CODE): Likewise. (PUT_REG_NOTE_KIND): Likewise. (CODE_LABEL_NUMBER): Likewise. (NOTE_SOURCE_FILE): Likewise. (NOTE_BLOCK): Likewise. (NOTE_EH_HANDLER): Likewise. (NOTE_RANGE_INFO): Likewise. (NOTE_LIVE_INFO): Likewise. (NOTE_BASIC_BLOCK): Likewise. (NOTE_EXPECTED_VALUE): Likewise. (NOTE_LINE_NUMBER): Likewise. (LABEL_NAME): Likewise. (LABEL_NUSES): Likewise. (LABEL_ALTERNATE_NAME): Likewise. (ADDRESSOF_DECL): Likewise. (JUMP_LABEL): Likewise. (LABEL_NEXTREF): Likewise. (REGNO): Likewise. (ORIGINAL_REGNO: Likewise. (HARD_REGISTER_NUM_P): Add parenthesis. (SUBREG_REG): Whitespace. (SUBREG_BYTE): Likewise. (ASM_OPERANDS_TEMPLATE): Remove parenthesis. (ASM_OPERANDS_OUTPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_OUTPUT_IDX): Likewise. (ASM_OPERANDS_INPUT_VEC): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_VEC): Likewise. (ASM_OPERANDS_INPUT): Likewise. (ASM_OPERANDS_INPUT_LENGTH): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_INPUT_MODE): Likewise. (ASM_OPERANDS_SOURCE_FILE): Likewise. (ASM_OPERANDS_SOURCE_LINE): Likewise. (MEM_SET_IN_STRUCT_P): Minor reformat. (TRAP_CONDITION): Whitespace. (TRAP_CODE): Likewise. (COND_EXEC_TEST): Likewise. (COND_EXEC_CODE): Likewise. (FIND_REG_INC_NOTE): Uppercase macro args and add parenthesis. (PHI_NODE_P): Add parenthesis. (plus_constant): Whitespace and add paraenthese. From-SVN: r48497
2002-01-03 06:11:05 +01:00
#define X0ADVFLAGS(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_addr_diff_vec_flags)
#define X0CSELIB(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_cselib)
#define X0MEMATTR(RTX, N) (RTL_CHECKC1 (RTX, N, MEM).rt_mem)
#define X0REGATTR(RTX, N) (RTL_CHECKC1 (RTX, N, REG).rt_reg)
rtl.texi (SYMBOL_REF_CONSTANT, [...]): Document. * doc/rtl.texi (SYMBOL_REF_CONSTANT, SYMBOL_REF_DATA): Document. * gengtype.c (adjust_field_rtx_def): Garbage-collect field 2 of a SYMBOL_REF as either a tree or a constant_descriptor_rtx, depending on the value of CONSTANT_POOL_ADDRESS_P. * optabs.c (init_one_libfunc): Nullify SYMBOL_REF_DATA rather than SYMBOL_REF_DECL. * varasm.c (make_decl_rtl, build_constant_desc): Set SYMBOL_REF_DATA rather than SYMBOL_REF_DECL. (rtx_constant_pool): Remove const_rtx_sym_htab. (const_desc_rtx_sym_hash, const_desc_rtx_sym_eq): Delete. (init_varasm_status): Don't initialize const_rtx_sym_htab. (force_const_mem): Point SYMBOL_REF_DATA to the constant pool entry. Remove handling of const_rtx_sym_htab. (find_pool_constant): Delete. (get_pool_constant, get_pool_constant_mark): Use SYMBOL_REF_CONSTANT rather than find_pool_constant. (get_pool_constant_for_function): Delete. (get_pool_mode, mark_constant): Use SYMBOL_REF_CONSTANT rather than find_pool_constant. * rtl.h (rtunion_def): Add rt_constant and rt_ptr fields. (X0CONSTANT, X0PTR, SYMBOL_REF_DATA): New macros. (SYMBOL_REF_DECL): Return NULL if CONSTANT_POOL_ADDRESS_P. (SYMBOL_REF_CONSTANT): New macro. (get_pool_constant_for_function): Delete. * config/i386/winnt.c (i386_pe_mark_dllexport): Set SYMBOL_REF_DATA rather than SYMBOL_REF_DECL. (i386_pe_mark_dllimport): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Copy SYMBOL_REF_DATA rather than SYMBOL_REF_DECL. * config/darwin.c (machopic_indirect_data_reference): Likewise. (machopic_indirect_call_target): Likewise. From-SVN: r110210
2006-01-25 10:10:56 +01:00
#define X0CONSTANT(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_constant)
rtl.h: Update copyright date. * rtl.h: Update copyright date. (RTL_CHECK1): Wrap long line. (RTL_CHECK2): Likewise. (RTL_CHECKC1): Wrap long line and whitespace. (RTL_CHECKC2): Likewise. (XWINT): Whitespace. (XINT): Likewise. (XSTR): Likewise. (XEXP): Likewise. (XVEC): Likewise. (XMODE): Likewise. (XBITMAP): Likewise. (XTREE): Likewise. (XBBDEF): Likewise. (XTMPL): Likewise. (X0WINT): Likewise. (X0INT):Likewise. (X0UINT): Likewise. (X0STR): Likewise. (X0EXP): Likewise. (X0VEC): Likewise. (X0MODE): Likewise. (X0BITMAP): Likewise. (X0TREE): Likewise. (X0BBDEF): Likewise. (X0ADVFLAGS): Likewise. (X0CSELIB): Likewise. (X0MEMATTR): Likewise. (XCWINT): Likewise. (XCINT): Likewise. (XCUINT): Likewise. (XCSTR): Likewise. (XCEXP): Likewise. (XCVEC): Likewise. (XCMODE): Likewise. (XCBITMAP): Likewise. (XCTREE): Likewise. (XCBBDEF): Likewise. (XCADVFLAGS): Likewise. (XCCSELIB): Likewise. (XC2EXP): Likewise. (INSN_UID): Likewise. (PREV_INSN): Likewise. (PATTERN): Likewise. (INSN_CODE): Likewise. (PUT_REG_NOTE_KIND): Likewise. (CODE_LABEL_NUMBER): Likewise. (NOTE_SOURCE_FILE): Likewise. (NOTE_BLOCK): Likewise. (NOTE_EH_HANDLER): Likewise. (NOTE_RANGE_INFO): Likewise. (NOTE_LIVE_INFO): Likewise. (NOTE_BASIC_BLOCK): Likewise. (NOTE_EXPECTED_VALUE): Likewise. (NOTE_LINE_NUMBER): Likewise. (LABEL_NAME): Likewise. (LABEL_NUSES): Likewise. (LABEL_ALTERNATE_NAME): Likewise. (ADDRESSOF_DECL): Likewise. (JUMP_LABEL): Likewise. (LABEL_NEXTREF): Likewise. (REGNO): Likewise. (ORIGINAL_REGNO: Likewise. (HARD_REGISTER_NUM_P): Add parenthesis. (SUBREG_REG): Whitespace. (SUBREG_BYTE): Likewise. (ASM_OPERANDS_TEMPLATE): Remove parenthesis. (ASM_OPERANDS_OUTPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_OUTPUT_IDX): Likewise. (ASM_OPERANDS_INPUT_VEC): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_VEC): Likewise. (ASM_OPERANDS_INPUT): Likewise. (ASM_OPERANDS_INPUT_LENGTH): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_INPUT_MODE): Likewise. (ASM_OPERANDS_SOURCE_FILE): Likewise. (ASM_OPERANDS_SOURCE_LINE): Likewise. (MEM_SET_IN_STRUCT_P): Minor reformat. (TRAP_CONDITION): Whitespace. (TRAP_CODE): Likewise. (COND_EXEC_TEST): Likewise. (COND_EXEC_CODE): Likewise. (FIND_REG_INC_NOTE): Uppercase macro args and add parenthesis. (PHI_NODE_P): Add parenthesis. (plus_constant): Whitespace and add paraenthese. From-SVN: r48497
2002-01-03 06:11:05 +01:00
/* Access a '0' field with any type. */
#define X0ANY(RTX, N) RTL_CHECK1 (RTX, N, '0')
#define XCINT(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_int)
#define XCUINT(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_uint)
#define XCSTR(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_str)
#define XCEXP(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_rtx)
#define XCVEC(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_rtvec)
#define XCMODE(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_type)
#define XCBITMAP(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_bit)
#define XCTREE(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_tree)
#define XCBBDEF(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_bb)
rtl.h: Update copyright date. * rtl.h: Update copyright date. (RTL_CHECK1): Wrap long line. (RTL_CHECK2): Likewise. (RTL_CHECKC1): Wrap long line and whitespace. (RTL_CHECKC2): Likewise. (XWINT): Whitespace. (XINT): Likewise. (XSTR): Likewise. (XEXP): Likewise. (XVEC): Likewise. (XMODE): Likewise. (XBITMAP): Likewise. (XTREE): Likewise. (XBBDEF): Likewise. (XTMPL): Likewise. (X0WINT): Likewise. (X0INT):Likewise. (X0UINT): Likewise. (X0STR): Likewise. (X0EXP): Likewise. (X0VEC): Likewise. (X0MODE): Likewise. (X0BITMAP): Likewise. (X0TREE): Likewise. (X0BBDEF): Likewise. (X0ADVFLAGS): Likewise. (X0CSELIB): Likewise. (X0MEMATTR): Likewise. (XCWINT): Likewise. (XCINT): Likewise. (XCUINT): Likewise. (XCSTR): Likewise. (XCEXP): Likewise. (XCVEC): Likewise. (XCMODE): Likewise. (XCBITMAP): Likewise. (XCTREE): Likewise. (XCBBDEF): Likewise. (XCADVFLAGS): Likewise. (XCCSELIB): Likewise. (XC2EXP): Likewise. (INSN_UID): Likewise. (PREV_INSN): Likewise. (PATTERN): Likewise. (INSN_CODE): Likewise. (PUT_REG_NOTE_KIND): Likewise. (CODE_LABEL_NUMBER): Likewise. (NOTE_SOURCE_FILE): Likewise. (NOTE_BLOCK): Likewise. (NOTE_EH_HANDLER): Likewise. (NOTE_RANGE_INFO): Likewise. (NOTE_LIVE_INFO): Likewise. (NOTE_BASIC_BLOCK): Likewise. (NOTE_EXPECTED_VALUE): Likewise. (NOTE_LINE_NUMBER): Likewise. (LABEL_NAME): Likewise. (LABEL_NUSES): Likewise. (LABEL_ALTERNATE_NAME): Likewise. (ADDRESSOF_DECL): Likewise. (JUMP_LABEL): Likewise. (LABEL_NEXTREF): Likewise. (REGNO): Likewise. (ORIGINAL_REGNO: Likewise. (HARD_REGISTER_NUM_P): Add parenthesis. (SUBREG_REG): Whitespace. (SUBREG_BYTE): Likewise. (ASM_OPERANDS_TEMPLATE): Remove parenthesis. (ASM_OPERANDS_OUTPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_OUTPUT_IDX): Likewise. (ASM_OPERANDS_INPUT_VEC): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_VEC): Likewise. (ASM_OPERANDS_INPUT): Likewise. (ASM_OPERANDS_INPUT_LENGTH): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_INPUT_MODE): Likewise. (ASM_OPERANDS_SOURCE_FILE): Likewise. (ASM_OPERANDS_SOURCE_LINE): Likewise. (MEM_SET_IN_STRUCT_P): Minor reformat. (TRAP_CONDITION): Whitespace. (TRAP_CODE): Likewise. (COND_EXEC_TEST): Likewise. (COND_EXEC_CODE): Likewise. (FIND_REG_INC_NOTE): Uppercase macro args and add parenthesis. (PHI_NODE_P): Add parenthesis. (plus_constant): Whitespace and add paraenthese. From-SVN: r48497
2002-01-03 06:11:05 +01:00
#define XCCSELIB(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_cselib)
#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))
#define XC2EXP(RTX, N, C1, C2) (RTL_CHECKC2 (RTX, N, C1, C2).rt_rtx)
1991-12-06 22:00:31 +01:00
/* ACCESS MACROS for particular fields of insns. */
/* Holds a unique number for each insn.
These are not necessarily sequentially increasing. */
rtl.h: Update copyright date. * rtl.h: Update copyright date. (RTL_CHECK1): Wrap long line. (RTL_CHECK2): Likewise. (RTL_CHECKC1): Wrap long line and whitespace. (RTL_CHECKC2): Likewise. (XWINT): Whitespace. (XINT): Likewise. (XSTR): Likewise. (XEXP): Likewise. (XVEC): Likewise. (XMODE): Likewise. (XBITMAP): Likewise. (XTREE): Likewise. (XBBDEF): Likewise. (XTMPL): Likewise. (X0WINT): Likewise. (X0INT):Likewise. (X0UINT): Likewise. (X0STR): Likewise. (X0EXP): Likewise. (X0VEC): Likewise. (X0MODE): Likewise. (X0BITMAP): Likewise. (X0TREE): Likewise. (X0BBDEF): Likewise. (X0ADVFLAGS): Likewise. (X0CSELIB): Likewise. (X0MEMATTR): Likewise. (XCWINT): Likewise. (XCINT): Likewise. (XCUINT): Likewise. (XCSTR): Likewise. (XCEXP): Likewise. (XCVEC): Likewise. (XCMODE): Likewise. (XCBITMAP): Likewise. (XCTREE): Likewise. (XCBBDEF): Likewise. (XCADVFLAGS): Likewise. (XCCSELIB): Likewise. (XC2EXP): Likewise. (INSN_UID): Likewise. (PREV_INSN): Likewise. (PATTERN): Likewise. (INSN_CODE): Likewise. (PUT_REG_NOTE_KIND): Likewise. (CODE_LABEL_NUMBER): Likewise. (NOTE_SOURCE_FILE): Likewise. (NOTE_BLOCK): Likewise. (NOTE_EH_HANDLER): Likewise. (NOTE_RANGE_INFO): Likewise. (NOTE_LIVE_INFO): Likewise. (NOTE_BASIC_BLOCK): Likewise. (NOTE_EXPECTED_VALUE): Likewise. (NOTE_LINE_NUMBER): Likewise. (LABEL_NAME): Likewise. (LABEL_NUSES): Likewise. (LABEL_ALTERNATE_NAME): Likewise. (ADDRESSOF_DECL): Likewise. (JUMP_LABEL): Likewise. (LABEL_NEXTREF): Likewise. (REGNO): Likewise. (ORIGINAL_REGNO: Likewise. (HARD_REGISTER_NUM_P): Add parenthesis. (SUBREG_REG): Whitespace. (SUBREG_BYTE): Likewise. (ASM_OPERANDS_TEMPLATE): Remove parenthesis. (ASM_OPERANDS_OUTPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_OUTPUT_IDX): Likewise. (ASM_OPERANDS_INPUT_VEC): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_VEC): Likewise. (ASM_OPERANDS_INPUT): Likewise. (ASM_OPERANDS_INPUT_LENGTH): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_INPUT_MODE): Likewise. (ASM_OPERANDS_SOURCE_FILE): Likewise. (ASM_OPERANDS_SOURCE_LINE): Likewise. (MEM_SET_IN_STRUCT_P): Minor reformat. (TRAP_CONDITION): Whitespace. (TRAP_CODE): Likewise. (COND_EXEC_TEST): Likewise. (COND_EXEC_CODE): Likewise. (FIND_REG_INC_NOTE): Uppercase macro args and add parenthesis. (PHI_NODE_P): Add parenthesis. (plus_constant): Whitespace and add paraenthese. From-SVN: r48497
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. */
rtl.h: Update copyright date. * rtl.h: Update copyright date. (RTL_CHECK1): Wrap long line. (RTL_CHECK2): Likewise. (RTL_CHECKC1): Wrap long line and whitespace. (RTL_CHECKC2): Likewise. (XWINT): Whitespace. (XINT): Likewise. (XSTR): Likewise. (XEXP): Likewise. (XVEC): Likewise. (XMODE): Likewise. (XBITMAP): Likewise. (XTREE): Likewise. (XBBDEF): Likewise. (XTMPL): Likewise. (X0WINT): Likewise. (X0INT):Likewise. (X0UINT): Likewise. (X0STR): Likewise. (X0EXP): Likewise. (X0VEC): Likewise. (X0MODE): Likewise. (X0BITMAP): Likewise. (X0TREE): Likewise. (X0BBDEF): Likewise. (X0ADVFLAGS): Likewise. (X0CSELIB): Likewise. (X0MEMATTR): Likewise. (XCWINT): Likewise. (XCINT): Likewise. (XCUINT): Likewise. (XCSTR): Likewise. (XCEXP): Likewise. (XCVEC): Likewise. (XCMODE): Likewise. (XCBITMAP): Likewise. (XCTREE): Likewise. (XCBBDEF): Likewise. (XCADVFLAGS): Likewise. (XCCSELIB): Likewise. (XC2EXP): Likewise. (INSN_UID): Likewise. (PREV_INSN): Likewise. (PATTERN): Likewise. (INSN_CODE): Likewise. (PUT_REG_NOTE_KIND): Likewise. (CODE_LABEL_NUMBER): Likewise. (NOTE_SOURCE_FILE): Likewise. (NOTE_BLOCK): Likewise. (NOTE_EH_HANDLER): Likewise. (NOTE_RANGE_INFO): Likewise. (NOTE_LIVE_INFO): Likewise. (NOTE_BASIC_BLOCK): Likewise. (NOTE_EXPECTED_VALUE): Likewise. (NOTE_LINE_NUMBER): Likewise. (LABEL_NAME): Likewise. (LABEL_NUSES): Likewise. (LABEL_ALTERNATE_NAME): Likewise. (ADDRESSOF_DECL): Likewise. (JUMP_LABEL): Likewise. (LABEL_NEXTREF): Likewise. (REGNO): Likewise. (ORIGINAL_REGNO: Likewise. (HARD_REGISTER_NUM_P): Add parenthesis. (SUBREG_REG): Whitespace. (SUBREG_BYTE): Likewise. (ASM_OPERANDS_TEMPLATE): Remove parenthesis. (ASM_OPERANDS_OUTPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_OUTPUT_IDX): Likewise. (ASM_OPERANDS_INPUT_VEC): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_VEC): Likewise. (ASM_OPERANDS_INPUT): Likewise. (ASM_OPERANDS_INPUT_LENGTH): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_INPUT_MODE): Likewise. (ASM_OPERANDS_SOURCE_FILE): Likewise. (ASM_OPERANDS_SOURCE_LINE): Likewise. (MEM_SET_IN_STRUCT_P): Minor reformat. (TRAP_CONDITION): Whitespace. (TRAP_CODE): Likewise. (COND_EXEC_TEST): Likewise. (COND_EXEC_CODE): Likewise. (FIND_REG_INC_NOTE): Uppercase macro args and add parenthesis. (PHI_NODE_P): Add parenthesis. (plus_constant): Whitespace and add paraenthese. From-SVN: r48497
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
#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)
/* 1 if RTX is a jump_insn, call_insn, or insn that is an annulling branch. */
#define INSN_ANNULLED_BRANCH_P(RTX) \
(RTL_FLAG_CHECK3("INSN_ANNULLED_BRANCH_P", (RTX), JUMP_INSN, CALL_INSN, INSN)->unchanging)
/* 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. */
#define INSN_FROM_TARGET_P(RTX) \
(RTL_FLAG_CHECK3("INSN_FROM_TARGET_P", (RTX), INSN, JUMP_INSN, CALL_INSN)->in_struct)
1991-12-06 22:00:31 +01:00
cse.c (CHEAP_REGNO): Redefine using REGNO_PTR_FRAME_P and HARD_REGISTER_NUM_P. * cse.c (CHEAP_REGNO): Redefine using REGNO_PTR_FRAME_P and HARD_REGISTER_NUM_P. * cselib.c (new_cselib_val): Make comment correct and more detailed. * flow.c (mark_set_1): Likewise. * except.c (duplicate_eh_region_1, duplicate_eh_region_2, duplicate_eh_regions): Remove. * except.h (duplicate_eh_regions): Remove prototype. * integrate.c (get_label_from_map, copy_rtx_and_substitute, global_const_equiv_varray): Remove. * integrate.h (get_label_from_map, copy_rtx_and_substitute, global_const_equiv_varray, set_label_in_map): Remove prototypes, extern declaration, and #define. (MAYBE_EXTEND_CONST_EQUIV_VARRAY, SET_CONST_EQUIV_DATA): Remove. (struct inline_remap): Remove. * varray.c (struct element): Remove entry for const_equiv_data. * varray.h (struct const_equiv_data): Remove. (enum varray_data_enum) <VARRAY_DATA_CONST_EQUIV>: Remove. (union varray_data_tag) <const_equiv>: Remove. (VARRAY_CONST_EQUIV_INIT, VARRAY_CONST_EQUIV, VARRAY_PUSH_CONST_EQUIV, VARRAY_TOP_CONST_EQUIV): Remove. * regstack.c (record_label_references): Remove unused function. * rtl.def (VALUE): Update comment. (LABEL_REF): Remove unused operand 2. * rtl.h (struct rtx_def): Update for removed accessor macros. (XCADVFLAGS, INSN_DEAD_CODE_P, LINE_NUMBER, CONTAINING_INSN, REG_LOOP_TEST_P): Remove. (ADDR_DIFF_VEC_FLAGS, CSELIB_VAL_PTR, LABEL_NEXTREF): Add comments. * web.c (entry_register): Don't copy REG_LOOP_TEST_P. * doc/rtl.texi (INSN_DEAD_CODE_P, REG_LOOP_TEST_P): Remove. From-SVN: r90580
2004-11-13 15:18:04 +01:00
/* In an ADDR_DIFF_VEC, the flags for RTX for use by branch shortening.
See the comments for ADDR_DIFF_VEC in rtl.def. */
#define ADDR_DIFF_VEC_FLAGS(RTX) X0ADVFLAGS(RTX, 4)
cse.c (CHEAP_REGNO): Redefine using REGNO_PTR_FRAME_P and HARD_REGISTER_NUM_P. * cse.c (CHEAP_REGNO): Redefine using REGNO_PTR_FRAME_P and HARD_REGISTER_NUM_P. * cselib.c (new_cselib_val): Make comment correct and more detailed. * flow.c (mark_set_1): Likewise. * except.c (duplicate_eh_region_1, duplicate_eh_region_2, duplicate_eh_regions): Remove. * except.h (duplicate_eh_regions): Remove prototype. * integrate.c (get_label_from_map, copy_rtx_and_substitute, global_const_equiv_varray): Remove. * integrate.h (get_label_from_map, copy_rtx_and_substitute, global_const_equiv_varray, set_label_in_map): Remove prototypes, extern declaration, and #define. (MAYBE_EXTEND_CONST_EQUIV_VARRAY, SET_CONST_EQUIV_DATA): Remove. (struct inline_remap): Remove. * varray.c (struct element): Remove entry for const_equiv_data. * varray.h (struct const_equiv_data): Remove. (enum varray_data_enum) <VARRAY_DATA_CONST_EQUIV>: Remove. (union varray_data_tag) <const_equiv>: Remove. (VARRAY_CONST_EQUIV_INIT, VARRAY_CONST_EQUIV, VARRAY_PUSH_CONST_EQUIV, VARRAY_TOP_CONST_EQUIV): Remove. * regstack.c (record_label_references): Remove unused function. * rtl.def (VALUE): Update comment. (LABEL_REF): Remove unused operand 2. * rtl.h (struct rtx_def): Update for removed accessor macros. (XCADVFLAGS, INSN_DEAD_CODE_P, LINE_NUMBER, CONTAINING_INSN, REG_LOOP_TEST_P): Remove. (ADDR_DIFF_VEC_FLAGS, CSELIB_VAL_PTR, LABEL_NEXTREF): Add comments. * web.c (entry_register): Don't copy REG_LOOP_TEST_P. * doc/rtl.texi (INSN_DEAD_CODE_P, REG_LOOP_TEST_P): Remove. From-SVN: r90580
2004-11-13 15:18:04 +01:00
/* In a VALUE, the value cselib has assigned to RTX.
This is a "struct cselib_val_struct", see cselib.h. */
#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.
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
but a value from enum reg_note. */
#define REG_NOTES(INSN) XEXP(INSN, 7)
1991-12-06 22:00:31 +01:00
enum reg_note
{
#define DEF_REG_NOTE(NAME) NAME,
#include "reg-notes.def"
#undef DEF_REG_NOTE
REG_NOTE_MAX
};
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))
rtl.h: Update copyright date. * rtl.h: Update copyright date. (RTL_CHECK1): Wrap long line. (RTL_CHECK2): Likewise. (RTL_CHECKC1): Wrap long line and whitespace. (RTL_CHECKC2): Likewise. (XWINT): Whitespace. (XINT): Likewise. (XSTR): Likewise. (XEXP): Likewise. (XVEC): Likewise. (XMODE): Likewise. (XBITMAP): Likewise. (XTREE): Likewise. (XBBDEF): Likewise. (XTMPL): Likewise. (X0WINT): Likewise. (X0INT):Likewise. (X0UINT): Likewise. (X0STR): Likewise. (X0EXP): Likewise. (X0VEC): Likewise. (X0MODE): Likewise. (X0BITMAP): Likewise. (X0TREE): Likewise. (X0BBDEF): Likewise. (X0ADVFLAGS): Likewise. (X0CSELIB): Likewise. (X0MEMATTR): Likewise. (XCWINT): Likewise. (XCINT): Likewise. (XCUINT): Likewise. (XCSTR): Likewise. (XCEXP): Likewise. (XCVEC): Likewise. (XCMODE): Likewise. (XCBITMAP): Likewise. (XCTREE): Likewise. (XCBBDEF): Likewise. (XCADVFLAGS): Likewise. (XCCSELIB): Likewise. (XC2EXP): Likewise. (INSN_UID): Likewise. (PREV_INSN): Likewise. (PATTERN): Likewise. (INSN_CODE): Likewise. (PUT_REG_NOTE_KIND): Likewise. (CODE_LABEL_NUMBER): Likewise. (NOTE_SOURCE_FILE): Likewise. (NOTE_BLOCK): Likewise. (NOTE_EH_HANDLER): Likewise. (NOTE_RANGE_INFO): Likewise. (NOTE_LIVE_INFO): Likewise. (NOTE_BASIC_BLOCK): Likewise. (NOTE_EXPECTED_VALUE): Likewise. (NOTE_LINE_NUMBER): Likewise. (LABEL_NAME): Likewise. (LABEL_NUSES): Likewise. (LABEL_ALTERNATE_NAME): Likewise. (ADDRESSOF_DECL): Likewise. (JUMP_LABEL): Likewise. (LABEL_NEXTREF): Likewise. (REGNO): Likewise. (ORIGINAL_REGNO: Likewise. (HARD_REGISTER_NUM_P): Add parenthesis. (SUBREG_REG): Whitespace. (SUBREG_BYTE): Likewise. (ASM_OPERANDS_TEMPLATE): Remove parenthesis. (ASM_OPERANDS_OUTPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_OUTPUT_IDX): Likewise. (ASM_OPERANDS_INPUT_VEC): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_VEC): Likewise. (ASM_OPERANDS_INPUT): Likewise. (ASM_OPERANDS_INPUT_LENGTH): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_INPUT_MODE): Likewise. (ASM_OPERANDS_SOURCE_FILE): Likewise. (ASM_OPERANDS_SOURCE_LINE): Likewise. (MEM_SET_IN_STRUCT_P): Minor reformat. (TRAP_CONDITION): Whitespace. (TRAP_CODE): Likewise. (COND_EXEC_TEST): Likewise. (COND_EXEC_CODE): Likewise. (FIND_REG_INC_NOTE): Uppercase macro args and add parenthesis. (PHI_NODE_P): Add parenthesis. (plus_constant): Whitespace and add paraenthese. From-SVN: r48497
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. */
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
/* 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. */
#define CALL_INSN_FUNCTION_USAGE(INSN) XEXP(INSN, 8)
1991-12-06 22:00:31 +01:00
/* The label-number of a code-label. The assembler label
is made from `L' and the label-number printed in decimal.
Label numbers are unique in a compilation. */
loop.c (emit_prefetch_instructions): Properly place the address computation. * loop.c (emit_prefetch_instructions): Properly place the address computation. * basic-block.h (basic_block_for_insn, BLOCK_FOR_INSN): Kill. (set_block_for_insn): Turn into macro. * cfgbuild.c (find_basic_block): Do not clear basic_block_for_insn. * cfglayout.c (insn_scopes): Kill. (scope_to_insns_initialize): Do not use insn_scopes. (scope_to_insns_finalize): Likewise. (duplicate_insn_chain): Likewise. (cfg_layout_initialize, cfg_layout_finalize): Do not turn scopes to notes. * cfgrtl.c (basic_block_for_insn): Kill. (delete_insn_and_edges, delete_insn_chain_and_edges): Simplify. (create_basic_block_structure): Use reorder_insns. (compute_bb_for_insn): Do not use basic_block_for_insn. (merge_blocks_nomove): Likewise. (update_bb_for_insn): Likewise. (verify_flow_info): Likewise. (set_block_for_insn): Kill. * combine.c (try_combine): Update gen_rtx_INSN call. * emit-rtl.c (gen_label_rtx): Update gen_rtx_CODE_LABEL call. (mark_insn_raw, make_jump_insn_raw, make_call_insn_raw): Clear scopes and BBs. (add_insn_after, add_insn_before, remove_insn, reorder_insns): Simplify. (emit_note_before, emit_note_after, emit_line_note_after, emit_note): Clear BB. (emit_insns_after): Simplify. (emit_copy_of_insn_after): Copy scope. * final.c (final_start_function): Lower scopes. * flow.c (check_function_return_warnings): Do not rely on deleted insn. * integrate.c (copy_insn_list): Cope scopes. * jump.c (duplicate_loop_exit_test): LIkewise; simplify. * loop.c (loop_optimize): Do not care block notes. * print-rtl.c (print_rtx): Print BB. * recog.c (apply_change_group): Simplify. * rtl.c (copy_rtx): Handle 'B'. * rtl.def (INSN, CALL_INSN, JUMP_INSN, NOTE): Add extra fields. * rtl.h (Field accessors): Update indexes. * sched-ebb.c (schedule_ebbs): Do not lower notes. * sched-rgn.c (schedule_insns): Likewise. * toplev.c (rest_of_compilation): Lower notes. * unroll.c (unroll_loop): Do not care scoping notes. (copy_loop_body): Copy scopes. From-SVN: r54188
2002-06-02 23:09:54 +02:00
#define CODE_LABEL_NUMBER(INSN) XINT (INSN, 6)
1991-12-06 22:00:31 +01:00
Makefile.in (HOST_RTL): Add $(HOST_PREFIX)bitmap.o. * Makefile.in (HOST_RTL): Add $(HOST_PREFIX)bitmap.o. (rtl.o, emit-rtl.o): Add dependency on bitmap.h. ($(HOST_PREFIX_1)rtl.o): Likewise. ($(HOST_PREFIX_1)bitmap.o): New host object. * emit-rtl.c (toplevel): Include bitmap.h. (gen_rtx): Handle 't' and 'b' nodes. * print-rtl.c (print_rtx): Handle printing NOTE_INSN_LIVE notes. Print block number for block begin/end notes. Print 't' type nodes as a pointer. Know that the 3rd argument of live range start/stop notes is really a range_info rtx. If type is 'b', print out argument as a bitmap. * rtl.c: Include bitmap.c. (copy_rtx): Copy tree nodes as is. Copy bitmaps if type is 'b'. (note_insn_name): Add NOTE_INSN_RANGE_{START,END}, NOTE_INSN_LIVE. * rtl.def (RANGE_LIVE): New node to hold live information while we recalculate the basic blocks. (RANGE_REG, RANGE_INFO): New rtl types for live range splitting. (RANGE_VAR): New node, to hold information saved in symbol node for New communicating live range information to the debug output functions. * rtl.h (rtunion_def): Add rttree and rtbit fields. (XBITMAP, XTREE): New accessor macros. (NOTE_LIVE_INFO): Overload NOTE_SOURCE_FILE for NOTE_INSN_LIVE notes. (NOTE_RANGE_INFO): Similarly for NOTE_INSN_RANGE_{START,END} notes. (NOTE_BLOCK_LIVE_RANGE_BLOCK): Define. (NOTE_INSN_RANGE_START, NOTE_INSN_RANGE_END, NOTE_INSN_LIVE): New notes. (RANGE_LIVE_{BITMAP,ORIG_BLOCK}): New accessor macros. (RANGE_REG_{SYMBOL,BLOCK}_NODE, RANGE_VAR_*): New accessor macros. (RANGE_INFO_*): Likewise. * sched.c (sched_analyze): Keep live range start/stop notes. (unlink_other_notes): Likewise. * haifa-sched.c (sched_analyze): Keep live range start/stop notes. (unlink_other_notes): Likewise. * tree.h (BLOCK_LIVE_RANGE_{START,END,VAR_FLAG}): New accessor macros. (BLOCK_LIVE_RANGE_FLAG): Likewise. (DECL_LIVE_RANGE_RTL): Likewise. (struct tree_block): Add live_range_flag, live_range_var_flag, live_range_start and live_range_end. (struct tree_decl): Add live_range_rtl field. * gengenrtl.c (type_from_format): Handle 'b' and 't'. (accessor_from_format): Likewise. Co-Authored-By: Jeffrey A Law <law@cygnus.com> From-SVN: r19727
1998-05-13 23:13:47 +02:00
/* In a NOTE that is a line number, this is a string for the file name that the
line is in. We use the same field to record block numbers temporarily in
NOTE_INSN_BLOCK_BEG and NOTE_INSN_BLOCK_END notes. (We avoid lots of casts
between ints and pointers if we use a different macro for the block number.)
*/
1991-12-06 22:00:31 +01:00
/* Opaque data. */
#define NOTE_DATA(INSN) RTL_CHECKC1 (INSN, 4, NOTE)
#define NOTE_DELETED_LABEL_NAME(INSN) XCSTR (INSN, 4, NOTE)
#define SET_INSN_DELETED(INSN) set_insn_deleted (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 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)
Josef Zlomek <zlomekj@suse.cz> Josef Zlomek <zlomekj@suse.cz> * Makefile.in (var-tracking.o): New. * common.opt (fvar-tracking): New. * flags.h (flag_var_tracking): New. * gengtype.c (adjust_field_rtx_def): NOTE_INSN_VAR_LOCATION was added. * opts.c (common_handle_option): Add OPT_fvar_tracking. * print-rtl.c (print_rtx): NOTE_INSN_VAR_LOCATION was added. * rtl.c (note_insn_name): Likewise. * rtl.def (VAR_LOCATION): New. * rtl.h (NOTE_VAR_LOCATION): New. (NOTE_VAR_LOCATION_DECL): New. (NOTE_VAR_LOCATION_LOC): New. (enum insn_note): NOTE_INSN_VAR_LOCATION was added. (variable_tracking_main): New exported function. * timevar.def (TV_VAR_TRACKING): New. * toplev.c (enum dump_file_index): Added DFI_vartrack. (dump_file): "vartrack" was added (-dV). (flag_var_tracking): New. (f_options): "var-tracking" was added. (rest_of_handle_variable_tracking): New function. (rest_of_compilation): Run variable tracking. (process_options): If user has not specified flag_var_tracking set it according to optimize, debug_info_level and debug_hooks. * tree.h (frame_base_decl): New. * var-tracking.c: New file. * config/ia64/ia64.c (ia64_flag_var_tracking): New variable. (ia64_override_options): Set flags to run variable tracking in machine dependent reorg instead of toplev.c. (ia64_reorg): Run variable tracking if wanted. * doc/invoke.texi: Mention variable tracking in -dV, add and -fvar-tracking. * doc/passes.texi: Added variable tracking pass. Daniel Berlin <dberlin@dberlin.org> * debug.h (struct gcc_debug_hooks): Added var_location debug hook. * dbxout.c (dbx_debug_hooks): Likewise. (xcoff_debug): Likewise. * debug.c (do_nothing_debug_hooks): Likewise. * dwarf2out.c (dwarf2_debug_hooks): Likewise. * dwarfout.c (dwarf_debug_hooks): Likewise. * sdbout.c (sdb_debug_hooks): Likewise. * vmsdbgout.c (vmsdbg_debug_hooks): Likewise. * final.c (final_scan_insn): Call var_location debug hook for each NOTE_INSN_VAR_LOCATION. Co-Authored-By: Daniel Berlin <dberlin@dberlin.org> From-SVN: r77418
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. */
gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of NOTE_LINE_NUMBER... * gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. * ddg.c (create_ddg): LIkewise. * final.c (final): Remove hunk moving line numbernotes around since they are no longer present at this stage. (final_scan_insn): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. (output_asm_label): Likewise. * reorg.c (dbr_schedule): Likewise. * haifa-sched.c (unlink_other_notes): Likewise. * mode-switching.c (optimize_mode_switching): Likewise. * graph.c (start_bb): Likewise. * rtl.def (NOTE): Update description. * jump.c (squeeze_notes): Delete. (mark_jump_label): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. * ifcvt.c (dead_or_predicable): Remove call of squeeze_notes. * dwarf2out.c (gen_label_die): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. (dwarf2out_var_location): Likewise. * cfgbuild.c (make_edges): Likewise. (find_basic_blocks_1): Likewise. * function.c (reorder_blocks_1): Likewise. (epilogue_done): Likewise. (reposition_prologue_and_epilogue_notes): Likewise. * print-rtl.c (print_rtx): Likewise; drop code for printing line number notes. (print_rtl): Likewise. (print_rtl_single): Likewise. * gcse.c (insert_insn_start_bb): Likewise. * alias.c (init_alias_analysis): Likewise. * calls.c (fixup_tail_calls): Likewise. * except.c (sjlj_emit_function_enter): Likewise. * emit-rtl.c (add_insn_after): Likeiwse. (emit_label_before): Likewise. (emit_label_after): Likewise. (emit_note_before, emit_note_after, emit_note): Update parameter to be enum insn_note; do not deal with source files. * cfgcleanup.c (merge_blocks_move_predecessor_nojumps): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. (merge_blocks_move_successor_nojumps): Simplify now when we don't have BLOCK notes. (try_optimize_cfg): Likewise. * cfglayout.c (skip_insns_after_block): Likewise. (record_effective_endpoints): Likewise. (duplicate_insn_chain): Likewise. * varasm.c (output_constant_pool_1): Likewise. * sched-deps.c (sched_analyze): Likewise. * rtl.c (NOTE_INSN_MAX_isnt_negative_adjust_NOTE_INSN_BIAS): Exterminate. (note_insn_name): Simplify now when NOTE_INSN_BIAS is gone. * rtl.h (NOTE_SOURCE_LOCATION, NOTE_EXPANDED_LOCATION): Exterminate. (SET_INSN_DELETED): Simplify. (NOTE_LINE_NUMBER): Exterminate. (NOTE_LINE_KIND): New. (NOTE_INSN_BASIC_BLOCK_P): Update. (enum insn_note): Simplify. (GET_NOTE_INSN_NAME) Simplify. (emit_note_before, emit_note_after, emit_note): Update prototype. (squeeze_notes): Remove. * sched-int.h (NOTE_NOT_BB_P): Update. * resource.c (mark_target_live_regs): Update. * sched-rgn.c (debug_dependencies): Update. * sched-vis.c (print_insn): Update. * config/alpha/alpha.c (alpha_handle_trap_shadows): Update. * config/i386/i386.c (ix86_output_function_epilogue): Update. * config/sh/sh.c (sh_adjust_unroll_max): Function dead since gcc 4.0.0. (TARGET_ADJUST_UNROLL_MAX): Likewise. (split_branches): Update. (sh_optimize_target_register_callee_saved): Remove hunk dead since gcc 4.0.0. (sh_adjust_unroll_max): Exterminate. * config/c4x/c4x.c (c4x_reorg): Use SET_INSN_DELETED. * config/m68hc11/m68hc11.c (m68hc11_check_z_replacement): Likewise. (m68hc11_reorg): Likewise. * config/ia64/ia64.c (emit_insn_group_barriers): Update. (emit_predicate_relation_info): Update. (process_for_unwind_directive): Update. * config/rs6000/rs6000.c (rs6000_output_function_epilogue): Update. (output_call): Update. * config/pa/pa.c (output_lbranch): Update. (output_millicode_call): Update. (output_call): Update. (pa_combine_instructions): Update. * config/mips/mips.c (mips16_gp_pseudo_reg): Update. * config/bfin/bfin.c (gen_one_bundle): Update. * cfgrtl.c (can_delete_note_p): Update. (delete_insn): Update. (rtl_merge_blocks): Update. (commit_one_edge_insertion): Update. (rtl_verify_flow_info): Update. * stmt.c (expand_case): Do not call squeeze_notes. From-SVN: r124895
2007-05-21 08:19:50 +02:00
#define NOTE_KIND(INSN) XCINT (INSN, 5, NOTE)
1991-12-06 22:00:31 +01:00
/* Nonzero if INSN is a note marking the beginning of a basic block. */
#define NOTE_INSN_BASIC_BLOCK_P(INSN) \
(GET_CODE (INSN) == NOTE \
gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of NOTE_LINE_NUMBER... * gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. * ddg.c (create_ddg): LIkewise. * final.c (final): Remove hunk moving line numbernotes around since they are no longer present at this stage. (final_scan_insn): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. (output_asm_label): Likewise. * reorg.c (dbr_schedule): Likewise. * haifa-sched.c (unlink_other_notes): Likewise. * mode-switching.c (optimize_mode_switching): Likewise. * graph.c (start_bb): Likewise. * rtl.def (NOTE): Update description. * jump.c (squeeze_notes): Delete. (mark_jump_label): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. * ifcvt.c (dead_or_predicable): Remove call of squeeze_notes. * dwarf2out.c (gen_label_die): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. (dwarf2out_var_location): Likewise. * cfgbuild.c (make_edges): Likewise. (find_basic_blocks_1): Likewise. * function.c (reorder_blocks_1): Likewise. (epilogue_done): Likewise. (reposition_prologue_and_epilogue_notes): Likewise. * print-rtl.c (print_rtx): Likewise; drop code for printing line number notes. (print_rtl): Likewise. (print_rtl_single): Likewise. * gcse.c (insert_insn_start_bb): Likewise. * alias.c (init_alias_analysis): Likewise. * calls.c (fixup_tail_calls): Likewise. * except.c (sjlj_emit_function_enter): Likewise. * emit-rtl.c (add_insn_after): Likeiwse. (emit_label_before): Likewise. (emit_label_after): Likewise. (emit_note_before, emit_note_after, emit_note): Update parameter to be enum insn_note; do not deal with source files. * cfgcleanup.c (merge_blocks_move_predecessor_nojumps): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. (merge_blocks_move_successor_nojumps): Simplify now when we don't have BLOCK notes. (try_optimize_cfg): Likewise. * cfglayout.c (skip_insns_after_block): Likewise. (record_effective_endpoints): Likewise. (duplicate_insn_chain): Likewise. * varasm.c (output_constant_pool_1): Likewise. * sched-deps.c (sched_analyze): Likewise. * rtl.c (NOTE_INSN_MAX_isnt_negative_adjust_NOTE_INSN_BIAS): Exterminate. (note_insn_name): Simplify now when NOTE_INSN_BIAS is gone. * rtl.h (NOTE_SOURCE_LOCATION, NOTE_EXPANDED_LOCATION): Exterminate. (SET_INSN_DELETED): Simplify. (NOTE_LINE_NUMBER): Exterminate. (NOTE_LINE_KIND): New. (NOTE_INSN_BASIC_BLOCK_P): Update. (enum insn_note): Simplify. (GET_NOTE_INSN_NAME) Simplify. (emit_note_before, emit_note_after, emit_note): Update prototype. (squeeze_notes): Remove. * sched-int.h (NOTE_NOT_BB_P): Update. * resource.c (mark_target_live_regs): Update. * sched-rgn.c (debug_dependencies): Update. * sched-vis.c (print_insn): Update. * config/alpha/alpha.c (alpha_handle_trap_shadows): Update. * config/i386/i386.c (ix86_output_function_epilogue): Update. * config/sh/sh.c (sh_adjust_unroll_max): Function dead since gcc 4.0.0. (TARGET_ADJUST_UNROLL_MAX): Likewise. (split_branches): Update. (sh_optimize_target_register_callee_saved): Remove hunk dead since gcc 4.0.0. (sh_adjust_unroll_max): Exterminate. * config/c4x/c4x.c (c4x_reorg): Use SET_INSN_DELETED. * config/m68hc11/m68hc11.c (m68hc11_check_z_replacement): Likewise. (m68hc11_reorg): Likewise. * config/ia64/ia64.c (emit_insn_group_barriers): Update. (emit_predicate_relation_info): Update. (process_for_unwind_directive): Update. * config/rs6000/rs6000.c (rs6000_output_function_epilogue): Update. (output_call): Update. * config/pa/pa.c (output_lbranch): Update. (output_millicode_call): Update. (output_call): Update. (pa_combine_instructions): Update. * config/mips/mips.c (mips16_gp_pseudo_reg): Update. * config/bfin/bfin.c (gen_one_bundle): Update. * cfgrtl.c (can_delete_note_p): Update. (delete_insn): Update. (rtl_merge_blocks): Update. (commit_one_edge_insertion): Update. (rtl_verify_flow_info): Update. * stmt.c (expand_case): Do not call squeeze_notes. From-SVN: r124895
2007-05-21 08:19:50 +02:00
&& NOTE_KIND (INSN) == NOTE_INSN_BASIC_BLOCK)
Josef Zlomek <zlomekj@suse.cz> Josef Zlomek <zlomekj@suse.cz> * Makefile.in (var-tracking.o): New. * common.opt (fvar-tracking): New. * flags.h (flag_var_tracking): New. * gengtype.c (adjust_field_rtx_def): NOTE_INSN_VAR_LOCATION was added. * opts.c (common_handle_option): Add OPT_fvar_tracking. * print-rtl.c (print_rtx): NOTE_INSN_VAR_LOCATION was added. * rtl.c (note_insn_name): Likewise. * rtl.def (VAR_LOCATION): New. * rtl.h (NOTE_VAR_LOCATION): New. (NOTE_VAR_LOCATION_DECL): New. (NOTE_VAR_LOCATION_LOC): New. (enum insn_note): NOTE_INSN_VAR_LOCATION was added. (variable_tracking_main): New exported function. * timevar.def (TV_VAR_TRACKING): New. * toplev.c (enum dump_file_index): Added DFI_vartrack. (dump_file): "vartrack" was added (-dV). (flag_var_tracking): New. (f_options): "var-tracking" was added. (rest_of_handle_variable_tracking): New function. (rest_of_compilation): Run variable tracking. (process_options): If user has not specified flag_var_tracking set it according to optimize, debug_info_level and debug_hooks. * tree.h (frame_base_decl): New. * var-tracking.c: New file. * config/ia64/ia64.c (ia64_flag_var_tracking): New variable. (ia64_override_options): Set flags to run variable tracking in machine dependent reorg instead of toplev.c. (ia64_reorg): Run variable tracking if wanted. * doc/invoke.texi: Mention variable tracking in -dV, add and -fvar-tracking. * doc/passes.texi: Added variable tracking pass. Daniel Berlin <dberlin@dberlin.org> * debug.h (struct gcc_debug_hooks): Added var_location debug hook. * dbxout.c (dbx_debug_hooks): Likewise. (xcoff_debug): Likewise. * debug.c (do_nothing_debug_hooks): Likewise. * dwarf2out.c (dwarf2_debug_hooks): Likewise. * dwarfout.c (dwarf_debug_hooks): Likewise. * sdbout.c (sdb_debug_hooks): Likewise. * vmsdbgout.c (vmsdbg_debug_hooks): Likewise. * final.c (final_scan_insn): Call var_location debug hook for each NOTE_INSN_VAR_LOCATION. Co-Authored-By: Daniel Berlin <dberlin@dberlin.org> From-SVN: r77418
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
gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of NOTE_LINE_NUMBER... * gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. * ddg.c (create_ddg): LIkewise. * final.c (final): Remove hunk moving line numbernotes around since they are no longer present at this stage. (final_scan_insn): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. (output_asm_label): Likewise. * reorg.c (dbr_schedule): Likewise. * haifa-sched.c (unlink_other_notes): Likewise. * mode-switching.c (optimize_mode_switching): Likewise. * graph.c (start_bb): Likewise. * rtl.def (NOTE): Update description. * jump.c (squeeze_notes): Delete. (mark_jump_label): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. * ifcvt.c (dead_or_predicable): Remove call of squeeze_notes. * dwarf2out.c (gen_label_die): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. (dwarf2out_var_location): Likewise. * cfgbuild.c (make_edges): Likewise. (find_basic_blocks_1): Likewise. * function.c (reorder_blocks_1): Likewise. (epilogue_done): Likewise. (reposition_prologue_and_epilogue_notes): Likewise. * print-rtl.c (print_rtx): Likewise; drop code for printing line number notes. (print_rtl): Likewise. (print_rtl_single): Likewise. * gcse.c (insert_insn_start_bb): Likewise. * alias.c (init_alias_analysis): Likewise. * calls.c (fixup_tail_calls): Likewise. * except.c (sjlj_emit_function_enter): Likewise. * emit-rtl.c (add_insn_after): Likeiwse. (emit_label_before): Likewise. (emit_label_after): Likewise. (emit_note_before, emit_note_after, emit_note): Update parameter to be enum insn_note; do not deal with source files. * cfgcleanup.c (merge_blocks_move_predecessor_nojumps): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. (merge_blocks_move_successor_nojumps): Simplify now when we don't have BLOCK notes. (try_optimize_cfg): Likewise. * cfglayout.c (skip_insns_after_block): Likewise. (record_effective_endpoints): Likewise. (duplicate_insn_chain): Likewise. * varasm.c (output_constant_pool_1): Likewise. * sched-deps.c (sched_analyze): Likewise. * rtl.c (NOTE_INSN_MAX_isnt_negative_adjust_NOTE_INSN_BIAS): Exterminate. (note_insn_name): Simplify now when NOTE_INSN_BIAS is gone. * rtl.h (NOTE_SOURCE_LOCATION, NOTE_EXPANDED_LOCATION): Exterminate. (SET_INSN_DELETED): Simplify. (NOTE_LINE_NUMBER): Exterminate. (NOTE_LINE_KIND): New. (NOTE_INSN_BASIC_BLOCK_P): Update. (enum insn_note): Simplify. (GET_NOTE_INSN_NAME) Simplify. (emit_note_before, emit_note_after, emit_note): Update prototype. (squeeze_notes): Remove. * sched-int.h (NOTE_NOT_BB_P): Update. * resource.c (mark_target_live_regs): Update. * sched-rgn.c (debug_dependencies): Update. * sched-vis.c (print_insn): Update. * config/alpha/alpha.c (alpha_handle_trap_shadows): Update. * config/i386/i386.c (ix86_output_function_epilogue): Update. * config/sh/sh.c (sh_adjust_unroll_max): Function dead since gcc 4.0.0. (TARGET_ADJUST_UNROLL_MAX): Likewise. (split_branches): Update. (sh_optimize_target_register_callee_saved): Remove hunk dead since gcc 4.0.0. (sh_adjust_unroll_max): Exterminate. * config/c4x/c4x.c (c4x_reorg): Use SET_INSN_DELETED. * config/m68hc11/m68hc11.c (m68hc11_check_z_replacement): Likewise. (m68hc11_reorg): Likewise. * config/ia64/ia64.c (emit_insn_group_barriers): Update. (emit_predicate_relation_info): Update. (process_for_unwind_directive): Update. * config/rs6000/rs6000.c (rs6000_output_function_epilogue): Update. (output_call): Update. * config/pa/pa.c (output_lbranch): Update. (output_millicode_call): Update. (output_call): Update. (pa_combine_instructions): Update. * config/mips/mips.c (mips16_gp_pseudo_reg): Update. * config/bfin/bfin.c (gen_one_bundle): Update. * cfgrtl.c (can_delete_note_p): Update. (delete_insn): Update. (rtl_merge_blocks): Update. (commit_one_edge_insertion): Update. (rtl_verify_flow_info): Update. * stmt.c (expand_case): Do not call squeeze_notes. From-SVN: r124895
2007-05-21 08:19:50 +02:00
/* Codes that appear in the NOTE_KIND field for kinds of notes
that are not line numbers. These codes are all negative.
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. */
1991-12-06 22:00:31 +01:00
enum insn_note
{
#define DEF_INSN_NOTE(NAME) NAME,
#include "insn-notes.def"
#undef DEF_INSN_NOTE
Josef Zlomek <zlomekj@suse.cz> Josef Zlomek <zlomekj@suse.cz> * Makefile.in (var-tracking.o): New. * common.opt (fvar-tracking): New. * flags.h (flag_var_tracking): New. * gengtype.c (adjust_field_rtx_def): NOTE_INSN_VAR_LOCATION was added. * opts.c (common_handle_option): Add OPT_fvar_tracking. * print-rtl.c (print_rtx): NOTE_INSN_VAR_LOCATION was added. * rtl.c (note_insn_name): Likewise. * rtl.def (VAR_LOCATION): New. * rtl.h (NOTE_VAR_LOCATION): New. (NOTE_VAR_LOCATION_DECL): New. (NOTE_VAR_LOCATION_LOC): New. (enum insn_note): NOTE_INSN_VAR_LOCATION was added. (variable_tracking_main): New exported function. * timevar.def (TV_VAR_TRACKING): New. * toplev.c (enum dump_file_index): Added DFI_vartrack. (dump_file): "vartrack" was added (-dV). (flag_var_tracking): New. (f_options): "var-tracking" was added. (rest_of_handle_variable_tracking): New function. (rest_of_compilation): Run variable tracking. (process_options): If user has not specified flag_var_tracking set it according to optimize, debug_info_level and debug_hooks. * tree.h (frame_base_decl): New. * var-tracking.c: New file. * config/ia64/ia64.c (ia64_flag_var_tracking): New variable. (ia64_override_options): Set flags to run variable tracking in machine dependent reorg instead of toplev.c. (ia64_reorg): Run variable tracking if wanted. * doc/invoke.texi: Mention variable tracking in -dV, add and -fvar-tracking. * doc/passes.texi: Added variable tracking pass. Daniel Berlin <dberlin@dberlin.org> * debug.h (struct gcc_debug_hooks): Added var_location debug hook. * dbxout.c (dbx_debug_hooks): Likewise. (xcoff_debug): Likewise. * debug.c (do_nothing_debug_hooks): Likewise. * dwarf2out.c (dwarf2_debug_hooks): Likewise. * dwarfout.c (dwarf_debug_hooks): Likewise. * sdbout.c (sdb_debug_hooks): Likewise. * vmsdbgout.c (vmsdbg_debug_hooks): Likewise. * final.c (final_scan_insn): Call var_location debug hook for each NOTE_INSN_VAR_LOCATION. Co-Authored-By: Daniel Berlin <dberlin@dberlin.org> From-SVN: r77418
2004-02-06 21:03:45 +01:00
NOTE_INSN_MAX
};
1991-12-06 22:00:31 +01:00
/* Names for NOTE insn's other than line numbers. */
gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of NOTE_LINE_NUMBER... * gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. * ddg.c (create_ddg): LIkewise. * final.c (final): Remove hunk moving line numbernotes around since they are no longer present at this stage. (final_scan_insn): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. (output_asm_label): Likewise. * reorg.c (dbr_schedule): Likewise. * haifa-sched.c (unlink_other_notes): Likewise. * mode-switching.c (optimize_mode_switching): Likewise. * graph.c (start_bb): Likewise. * rtl.def (NOTE): Update description. * jump.c (squeeze_notes): Delete. (mark_jump_label): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. * ifcvt.c (dead_or_predicable): Remove call of squeeze_notes. * dwarf2out.c (gen_label_die): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. (dwarf2out_var_location): Likewise. * cfgbuild.c (make_edges): Likewise. (find_basic_blocks_1): Likewise. * function.c (reorder_blocks_1): Likewise. (epilogue_done): Likewise. (reposition_prologue_and_epilogue_notes): Likewise. * print-rtl.c (print_rtx): Likewise; drop code for printing line number notes. (print_rtl): Likewise. (print_rtl_single): Likewise. * gcse.c (insert_insn_start_bb): Likewise. * alias.c (init_alias_analysis): Likewise. * calls.c (fixup_tail_calls): Likewise. * except.c (sjlj_emit_function_enter): Likewise. * emit-rtl.c (add_insn_after): Likeiwse. (emit_label_before): Likewise. (emit_label_after): Likewise. (emit_note_before, emit_note_after, emit_note): Update parameter to be enum insn_note; do not deal with source files. * cfgcleanup.c (merge_blocks_move_predecessor_nojumps): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. (merge_blocks_move_successor_nojumps): Simplify now when we don't have BLOCK notes. (try_optimize_cfg): Likewise. * cfglayout.c (skip_insns_after_block): Likewise. (record_effective_endpoints): Likewise. (duplicate_insn_chain): Likewise. * varasm.c (output_constant_pool_1): Likewise. * sched-deps.c (sched_analyze): Likewise. * rtl.c (NOTE_INSN_MAX_isnt_negative_adjust_NOTE_INSN_BIAS): Exterminate. (note_insn_name): Simplify now when NOTE_INSN_BIAS is gone. * rtl.h (NOTE_SOURCE_LOCATION, NOTE_EXPANDED_LOCATION): Exterminate. (SET_INSN_DELETED): Simplify. (NOTE_LINE_NUMBER): Exterminate. (NOTE_LINE_KIND): New. (NOTE_INSN_BASIC_BLOCK_P): Update. (enum insn_note): Simplify. (GET_NOTE_INSN_NAME) Simplify. (emit_note_before, emit_note_after, emit_note): Update prototype. (squeeze_notes): Remove. * sched-int.h (NOTE_NOT_BB_P): Update. * resource.c (mark_target_live_regs): Update. * sched-rgn.c (debug_dependencies): Update. * sched-vis.c (print_insn): Update. * config/alpha/alpha.c (alpha_handle_trap_shadows): Update. * config/i386/i386.c (ix86_output_function_epilogue): Update. * config/sh/sh.c (sh_adjust_unroll_max): Function dead since gcc 4.0.0. (TARGET_ADJUST_UNROLL_MAX): Likewise. (split_branches): Update. (sh_optimize_target_register_callee_saved): Remove hunk dead since gcc 4.0.0. (sh_adjust_unroll_max): Exterminate. * config/c4x/c4x.c (c4x_reorg): Use SET_INSN_DELETED. * config/m68hc11/m68hc11.c (m68hc11_check_z_replacement): Likewise. (m68hc11_reorg): Likewise. * config/ia64/ia64.c (emit_insn_group_barriers): Update. (emit_predicate_relation_info): Update. (process_for_unwind_directive): Update. * config/rs6000/rs6000.c (rs6000_output_function_epilogue): Update. (output_call): Update. * config/pa/pa.c (output_lbranch): Update. (output_millicode_call): Update. (output_call): Update. (pa_combine_instructions): Update. * config/mips/mips.c (mips16_gp_pseudo_reg): Update. * config/bfin/bfin.c (gen_one_bundle): Update. * cfgrtl.c (can_delete_note_p): Update. (delete_insn): Update. (rtl_merge_blocks): Update. (commit_one_edge_insertion): Update. (rtl_verify_flow_info): Update. * stmt.c (expand_case): Do not call squeeze_notes. From-SVN: r124895
2007-05-21 08:19:50 +02:00
extern const char * const note_insn_name[NOTE_INSN_MAX];
#define GET_NOTE_INSN_NAME(NOTE_CODE) \
gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of NOTE_LINE_NUMBER... * gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. * ddg.c (create_ddg): LIkewise. * final.c (final): Remove hunk moving line numbernotes around since they are no longer present at this stage. (final_scan_insn): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. (output_asm_label): Likewise. * reorg.c (dbr_schedule): Likewise. * haifa-sched.c (unlink_other_notes): Likewise. * mode-switching.c (optimize_mode_switching): Likewise. * graph.c (start_bb): Likewise. * rtl.def (NOTE): Update description. * jump.c (squeeze_notes): Delete. (mark_jump_label): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. * ifcvt.c (dead_or_predicable): Remove call of squeeze_notes. * dwarf2out.c (gen_label_die): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. (dwarf2out_var_location): Likewise. * cfgbuild.c (make_edges): Likewise. (find_basic_blocks_1): Likewise. * function.c (reorder_blocks_1): Likewise. (epilogue_done): Likewise. (reposition_prologue_and_epilogue_notes): Likewise. * print-rtl.c (print_rtx): Likewise; drop code for printing line number notes. (print_rtl): Likewise. (print_rtl_single): Likewise. * gcse.c (insert_insn_start_bb): Likewise. * alias.c (init_alias_analysis): Likewise. * calls.c (fixup_tail_calls): Likewise. * except.c (sjlj_emit_function_enter): Likewise. * emit-rtl.c (add_insn_after): Likeiwse. (emit_label_before): Likewise. (emit_label_after): Likewise. (emit_note_before, emit_note_after, emit_note): Update parameter to be enum insn_note; do not deal with source files. * cfgcleanup.c (merge_blocks_move_predecessor_nojumps): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. (merge_blocks_move_successor_nojumps): Simplify now when we don't have BLOCK notes. (try_optimize_cfg): Likewise. * cfglayout.c (skip_insns_after_block): Likewise. (record_effective_endpoints): Likewise. (duplicate_insn_chain): Likewise. * varasm.c (output_constant_pool_1): Likewise. * sched-deps.c (sched_analyze): Likewise. * rtl.c (NOTE_INSN_MAX_isnt_negative_adjust_NOTE_INSN_BIAS): Exterminate. (note_insn_name): Simplify now when NOTE_INSN_BIAS is gone. * rtl.h (NOTE_SOURCE_LOCATION, NOTE_EXPANDED_LOCATION): Exterminate. (SET_INSN_DELETED): Simplify. (NOTE_LINE_NUMBER): Exterminate. (NOTE_LINE_KIND): New. (NOTE_INSN_BASIC_BLOCK_P): Update. (enum insn_note): Simplify. (GET_NOTE_INSN_NAME) Simplify. (emit_note_before, emit_note_after, emit_note): Update prototype. (squeeze_notes): Remove. * sched-int.h (NOTE_NOT_BB_P): Update. * resource.c (mark_target_live_regs): Update. * sched-rgn.c (debug_dependencies): Update. * sched-vis.c (print_insn): Update. * config/alpha/alpha.c (alpha_handle_trap_shadows): Update. * config/i386/i386.c (ix86_output_function_epilogue): Update. * config/sh/sh.c (sh_adjust_unroll_max): Function dead since gcc 4.0.0. (TARGET_ADJUST_UNROLL_MAX): Likewise. (split_branches): Update. (sh_optimize_target_register_callee_saved): Remove hunk dead since gcc 4.0.0. (sh_adjust_unroll_max): Exterminate. * config/c4x/c4x.c (c4x_reorg): Use SET_INSN_DELETED. * config/m68hc11/m68hc11.c (m68hc11_check_z_replacement): Likewise. (m68hc11_reorg): Likewise. * config/ia64/ia64.c (emit_insn_group_barriers): Update. (emit_predicate_relation_info): Update. (process_for_unwind_directive): Update. * config/rs6000/rs6000.c (rs6000_output_function_epilogue): Update. (output_call): Update. * config/pa/pa.c (output_lbranch): Update. (output_millicode_call): Update. (output_call): Update. (pa_combine_instructions): Update. * config/mips/mips.c (mips16_gp_pseudo_reg): Update. * config/bfin/bfin.c (gen_one_bundle): Update. * cfgrtl.c (can_delete_note_p): Update. (delete_insn): Update. (rtl_merge_blocks): Update. (commit_one_edge_insertion): Update. (rtl_verify_flow_info): Update. * stmt.c (expand_case): Do not call squeeze_notes. From-SVN: r124895
2007-05-21 08:19:50 +02:00
(note_insn_name[(NOTE_CODE)])
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
/* 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)
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. */
#define JUMP_LABEL(INSN) XCEXP (INSN, 8, JUMP_INSN)
1991-12-06 22:00:31 +01:00
/* Once basic blocks are found, each CODE_LABEL starts a chain that
goes through all the LABEL_REFs that jump to that label. 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
/* For a REG rtx, REGNO extracts the register number. REGNO can only
be used on RHS. Use SET_REGNO to change the value. */
#define REGNO(RTX) (rhs_regno(RTX))
#define SET_REGNO(RTX,N) (df_ref_change_reg_with_loc (REGNO(RTX), N, RTX), XCUINT (RTX, 0, REG) = N)
/* 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. */
rtl.h: Update copyright date. * rtl.h: Update copyright date. (RTL_CHECK1): Wrap long line. (RTL_CHECK2): Likewise. (RTL_CHECKC1): Wrap long line and whitespace. (RTL_CHECKC2): Likewise. (XWINT): Whitespace. (XINT): Likewise. (XSTR): Likewise. (XEXP): Likewise. (XVEC): Likewise. (XMODE): Likewise. (XBITMAP): Likewise. (XTREE): Likewise. (XBBDEF): Likewise. (XTMPL): Likewise. (X0WINT): Likewise. (X0INT):Likewise. (X0UINT): Likewise. (X0STR): Likewise. (X0EXP): Likewise. (X0VEC): Likewise. (X0MODE): Likewise. (X0BITMAP): Likewise. (X0TREE): Likewise. (X0BBDEF): Likewise. (X0ADVFLAGS): Likewise. (X0CSELIB): Likewise. (X0MEMATTR): Likewise. (XCWINT): Likewise. (XCINT): Likewise. (XCUINT): Likewise. (XCSTR): Likewise. (XCEXP): Likewise. (XCVEC): Likewise. (XCMODE): Likewise. (XCBITMAP): Likewise. (XCTREE): Likewise. (XCBBDEF): Likewise. (XCADVFLAGS): Likewise. (XCCSELIB): Likewise. (XC2EXP): Likewise. (INSN_UID): Likewise. (PREV_INSN): Likewise. (PATTERN): Likewise. (INSN_CODE): Likewise. (PUT_REG_NOTE_KIND): Likewise. (CODE_LABEL_NUMBER): Likewise. (NOTE_SOURCE_FILE): Likewise. (NOTE_BLOCK): Likewise. (NOTE_EH_HANDLER): Likewise. (NOTE_RANGE_INFO): Likewise. (NOTE_LIVE_INFO): Likewise. (NOTE_BASIC_BLOCK): Likewise. (NOTE_EXPECTED_VALUE): Likewise. (NOTE_LINE_NUMBER): Likewise. (LABEL_NAME): Likewise. (LABEL_NUSES): Likewise. (LABEL_ALTERNATE_NAME): Likewise. (ADDRESSOF_DECL): Likewise. (JUMP_LABEL): Likewise. (LABEL_NEXTREF): Likewise. (REGNO): Likewise. (ORIGINAL_REGNO: Likewise. (HARD_REGISTER_NUM_P): Add parenthesis. (SUBREG_REG): Whitespace. (SUBREG_BYTE): Likewise. (ASM_OPERANDS_TEMPLATE): Remove parenthesis. (ASM_OPERANDS_OUTPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_OUTPUT_IDX): Likewise. (ASM_OPERANDS_INPUT_VEC): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_VEC): Likewise. (ASM_OPERANDS_INPUT): Likewise. (ASM_OPERANDS_INPUT_LENGTH): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_INPUT_MODE): Likewise. (ASM_OPERANDS_SOURCE_FILE): Likewise. (ASM_OPERANDS_SOURCE_LINE): Likewise. (MEM_SET_IN_STRUCT_P): Minor reformat. (TRAP_CONDITION): Whitespace. (TRAP_CODE): Likewise. (COND_EXEC_TEST): Likewise. (COND_EXEC_CODE): Likewise. (FIND_REG_INC_NOTE): Uppercase macro args and add parenthesis. (PHI_NODE_P): Add parenthesis. (plus_constant): Whitespace and add paraenthese. From-SVN: r48497
2002-01-03 06:11:05 +01:00
#define ORIGINAL_REGNO(RTX) X0UINT (RTX, 1)
1991-12-06 22:00:31 +01:00
/* Force the REGNO macro to only be used on the lhs. */
static inline unsigned int
rhs_regno (rtx x)
{
return XCUINT (x, 0, REG);
}
/* 1 if RTX is a reg or parallel that is the current function's return
value. */
#define REG_FUNCTION_VALUE_P(RTX) \
(RTL_FLAG_CHECK2("REG_FUNCTION_VALUE_P", (RTX), REG, PARALLEL)->return_val)
1991-12-06 22:00:31 +01: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
/* 1 if RTX is a reg that holds a pointer value. */
#define REG_POINTER(RTX) \
(RTL_FLAG_CHECK1("REG_POINTER", (RTX), REG)->frame_related)
function.h (emit_status): Delete member regno_pointer_flag and rename regno_pointer_flag_length to... * function.h (emit_status): Delete member regno_pointer_flag and rename regno_pointer_flag_length to regno_pointer_align_length. Delete define for REGNO_POINTER_FLAG. * integrate.h (inline_remap): Delete member regno_pointer_flag. Add member x_regno_reg_rtx. * rtl.h (rtx_def): Use frame_related bit to indicate register is a pointer in REG expressions. Define REG_POINTER macro. * alias.c (find_base_value, find_base_term): Use REG_POINTER instead of REGNO_POINTER_FLAG. * combine.c (nonzero_bits, num_sign_bit_copies): Likewise. * emit-rtl.c (gen_reg_rtx): Use regno_pointer_align_length instead of regno_pointer_flag_length. Remove code which refers to regno_pointer_flag. (mark_reg_pointer): Use REG_POINTER. (free_emit_status): Remove code which refers to regno_pointer_flag. (init_emit, mark_emit_status): Likewise. * flow.c (dump_flow_info): Likewise. * function.c (preserve_temp_slots): Likewise. * integrate.c (expand_inline_function, copy_rtx_and_substitute): Use x_regno_reg_rtx instead of regno_pointer_flag for function pointer determination in map. * loop.c (strength_reduce, maybe_eliminate_biv_1): Use REG_POINTER. * predict.c (estimate_probability): Likewise. * regclass.c (record_address_regs, reg_scan_mark_refs): Likewise. * unroll.c (unroll_loop): Use x_regno_reg_rtx instead of regno_pointer_flag for function pointer determination in map. * convex.h (RTX_COSTS): Don't test regno_pointer_flag and use REG_POINTER. * pa.c (hppa_legitimize_address, emit_move_sequence, basereg_operand): Use REG_POINTER. (restore_unscaled_index_insn_codes): Revise comment. From-SVN: r37863
2000-11-30 07:31:19 +01:00
/* 1 if RTX is a mem that holds a pointer value. */
#define MEM_POINTER(RTX) \
(RTL_FLAG_CHECK1("MEM_POINTER", (RTX), MEM)->frame_related)
Makefile.in (ssa.o): Updated header files in dependences. * Makefile.in (ssa.o): Updated header files in dependences. * basic-block.h: Added compute_immediate_postdominators declaration. * config/i386/i386.h (CONVERT_HARD_REGISTER_TO_SSA_P): Added definition. * flow.c (compute_immediate_dominators): Updated comment. (compute_immediate_postdominators): Added definition. * rtl.h (HARD_REGISTER_P): Added definition. * ssa.c: Include additional header files. (assert): Added definition. (ssa_rename_to_lookup): Added to reimplement ssa_rename_to to include select hard registers. (ssa_rename_to_insert): Likewise. (ssa_rename_from_initialize): Likewise. (ssa_rename_from_lookup): Likewise. (original_register): Likewise. (ssa_rename_from_insert): Added to reimplement ssa_rename_from to include select hard reigsters. (ssa_rename_from_traverse): Likewise. (ssa_rename_from_free): Likewise. (ssa_rename_from_print): Likewise. (ssa_rename_from_print_1): Likewise. (ssa_rename_from_hash_function): Likewise. (ssa_rename_from_equal): Likewise. (ssa_rename_from_delete): Likewise. (simplify_to_immediate_dominators): Removed in favor of flow.c:compute_immediate_dominators. (find_evaluations_1): Modified to work with hard registers. (insert_phi_node): Likewise. (insert_phi_nodes): Likewise. (struct rename_set_data): Updated prev_reg comment. (create_delayed_rename): Modified to work with hard registers. (RENAME_NO_RTX): Updated comment. (apply_delayed_renames): Modified to work with hard registers. (rename_insn_1): Likewise and added handling of CLOBBER rtls. (rename_block): Updated to use revised ssa_rename_to interface. (rename_registers): Updated to use revised ssa_rename_to and ssa_rename_from interface. (convert_to_ssa): Revised to use compute_immediate_dominators and deal with hard registers. (make_regs_equivalent_over_bad_edges): Modified to work with hard registers. Added check for illegal unification of hard register. (make_equivalent_phi_alternatives_equivalent): Modified to work with hard registers. (compute_conservative_reg_partition): Likewise. (coalesce_if_unconflicting): Modified to work with hard registers and check for conflicting hard registers. (mark_phi_and_copy_regs): Revised loop to work only on pseudo registers. (rename_equivalent_regs_in_insn): Modified to work with hard registers. (record_canonical_element_1): Added definition. (check_hard_regs_in_partition): Added definition. (convert_from_ssa): Added data structure deallocation and check for illegal hard register unification. (conflict_hard_regs_p): Added definition. * toplev.c (rest_of_compilation): Added comment. From-SVN: r35384
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. */
rtl.h: Update copyright date. * rtl.h: Update copyright date. (RTL_CHECK1): Wrap long line. (RTL_CHECK2): Likewise. (RTL_CHECKC1): Wrap long line and whitespace. (RTL_CHECKC2): Likewise. (XWINT): Whitespace. (XINT): Likewise. (XSTR): Likewise. (XEXP): Likewise. (XVEC): Likewise. (XMODE): Likewise. (XBITMAP): Likewise. (XTREE): Likewise. (XBBDEF): Likewise. (XTMPL): Likewise. (X0WINT): Likewise. (X0INT):Likewise. (X0UINT): Likewise. (X0STR): Likewise. (X0EXP): Likewise. (X0VEC): Likewise. (X0MODE): Likewise. (X0BITMAP): Likewise. (X0TREE): Likewise. (X0BBDEF): Likewise. (X0ADVFLAGS): Likewise. (X0CSELIB): Likewise. (X0MEMATTR): Likewise. (XCWINT): Likewise. (XCINT): Likewise. (XCUINT): Likewise. (XCSTR): Likewise. (XCEXP): Likewise. (XCVEC): Likewise. (XCMODE): Likewise. (XCBITMAP): Likewise. (XCTREE): Likewise. (XCBBDEF): Likewise. (XCADVFLAGS): Likewise. (XCCSELIB): Likewise. (XC2EXP): Likewise. (INSN_UID): Likewise. (PREV_INSN): Likewise. (PATTERN): Likewise. (INSN_CODE): Likewise. (PUT_REG_NOTE_KIND): Likewise. (CODE_LABEL_NUMBER): Likewise. (NOTE_SOURCE_FILE): Likewise. (NOTE_BLOCK): Likewise. (NOTE_EH_HANDLER): Likewise. (NOTE_RANGE_INFO): Likewise. (NOTE_LIVE_INFO): Likewise. (NOTE_BASIC_BLOCK): Likewise. (NOTE_EXPECTED_VALUE): Likewise. (NOTE_LINE_NUMBER): Likewise. (LABEL_NAME): Likewise. (LABEL_NUSES): Likewise. (LABEL_ALTERNATE_NAME): Likewise. (ADDRESSOF_DECL): Likewise. (JUMP_LABEL): Likewise. (LABEL_NEXTREF): Likewise. (REGNO): Likewise. (ORIGINAL_REGNO: Likewise. (HARD_REGISTER_NUM_P): Add parenthesis. (SUBREG_REG): Whitespace. (SUBREG_BYTE): Likewise. (ASM_OPERANDS_TEMPLATE): Remove parenthesis. (ASM_OPERANDS_OUTPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_OUTPUT_IDX): Likewise. (ASM_OPERANDS_INPUT_VEC): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_VEC): Likewise. (ASM_OPERANDS_INPUT): Likewise. (ASM_OPERANDS_INPUT_LENGTH): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_INPUT_MODE): Likewise. (ASM_OPERANDS_SOURCE_FILE): Likewise. (ASM_OPERANDS_SOURCE_LINE): Likewise. (MEM_SET_IN_STRUCT_P): Minor reformat. (TRAP_CONDITION): Whitespace. (TRAP_CODE): Likewise. (COND_EXEC_TEST): Likewise. (COND_EXEC_CODE): Likewise. (FIND_REG_INC_NOTE): Uppercase macro args and add parenthesis. (PHI_NODE_P): Add parenthesis. (plus_constant): Whitespace and add paraenthese. From-SVN: r48497
2002-01-03 06:11:05 +01:00
#define HARD_REGISTER_NUM_P(REG_NO) ((REG_NO) < FIRST_PSEUDO_REGISTER)
Makefile.in (ssa.o): Updated header files in dependences. * Makefile.in (ssa.o): Updated header files in dependences. * basic-block.h: Added compute_immediate_postdominators declaration. * config/i386/i386.h (CONVERT_HARD_REGISTER_TO_SSA_P): Added definition. * flow.c (compute_immediate_dominators): Updated comment. (compute_immediate_postdominators): Added definition. * rtl.h (HARD_REGISTER_P): Added definition. * ssa.c: Include additional header files. (assert): Added definition. (ssa_rename_to_lookup): Added to reimplement ssa_rename_to to include select hard registers. (ssa_rename_to_insert): Likewise. (ssa_rename_from_initialize): Likewise. (ssa_rename_from_lookup): Likewise. (original_register): Likewise. (ssa_rename_from_insert): Added to reimplement ssa_rename_from to include select hard reigsters. (ssa_rename_from_traverse): Likewise. (ssa_rename_from_free): Likewise. (ssa_rename_from_print): Likewise. (ssa_rename_from_print_1): Likewise. (ssa_rename_from_hash_function): Likewise. (ssa_rename_from_equal): Likewise. (ssa_rename_from_delete): Likewise. (simplify_to_immediate_dominators): Removed in favor of flow.c:compute_immediate_dominators. (find_evaluations_1): Modified to work with hard registers. (insert_phi_node): Likewise. (insert_phi_nodes): Likewise. (struct rename_set_data): Updated prev_reg comment. (create_delayed_rename): Modified to work with hard registers. (RENAME_NO_RTX): Updated comment. (apply_delayed_renames): Modified to work with hard registers. (rename_insn_1): Likewise and added handling of CLOBBER rtls. (rename_block): Updated to use revised ssa_rename_to interface. (rename_registers): Updated to use revised ssa_rename_to and ssa_rename_from interface. (convert_to_ssa): Revised to use compute_immediate_dominators and deal with hard registers. (make_regs_equivalent_over_bad_edges): Modified to work with hard registers. Added check for illegal unification of hard register. (make_equivalent_phi_alternatives_equivalent): Modified to work with hard registers. (compute_conservative_reg_partition): Likewise. (coalesce_if_unconflicting): Modified to work with hard registers and check for conflicting hard registers. (mark_phi_and_copy_regs): Revised loop to work only on pseudo registers. (rename_equivalent_regs_in_insn): Modified to work with hard registers. (record_canonical_element_1): Added definition. (check_hard_regs_in_partition): Added definition. (convert_from_ssa): Added data structure deallocation and check for illegal hard register unification. (conflict_hard_regs_p): Added definition. * toplev.c (rest_of_compilation): Added comment. From-SVN: r35384
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. */
#define INTVAL(RTX) XCWINT(RTX, 0, CONST_INT)
#define UINTVAL(RTX) ((unsigned HOST_WIDE_INT) INTVAL (RTX))
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:
For a VOIDmode, there are two integers CONST_DOUBLE_LOW is the
low-order word and ..._HIGH the high-order.
For a float, there is a REAL_VALUE_TYPE structure, and
CONST_DOUBLE_REAL_VALUE(r) is a pointer to it. */
#define CONST_DOUBLE_LOW(r) XCMWINT (r, 0, CONST_DOUBLE, VOIDmode)
#define CONST_DOUBLE_HIGH(r) XCMWINT (r, 1, CONST_DOUBLE, VOIDmode)
#define CONST_DOUBLE_REAL_VALUE(r) \
((const struct real_value *) XCNMPRV (r, CONST_DOUBLE, VOIDmode))
[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
i386.md ("mmx_uavgv8qi3"): Use const_vector. 2002-02-19 Aldy Hernandez <aldyh@redhat.com> * config/i386/i386.md ("mmx_uavgv8qi3"): Use const_vector. ("mmx_uavgv4hi3"): Same. ("pmulhrwv4hi3"): Same. * tree-inline.c (walk_tree): Handle vectors. * c-common.c (constant_expression_warning): Handle vectors. (overflow_warning): Same. * sched-deps.c (sched_analyze_2): Handle vectors. * rtlanal.c (rtx_unstable_p): Handle vectors. (rtx_varies_p): Same. (count_occurrences): Same. (regs_set_between_p): Same. (modified_between_p): Same. (modified_in_p): Same. (volatile_insn_p): Same. (volatile_refs_p): Same. (side_effects_p): Same. (may_trap_p): Same. (inequality_comparisons_p): Same. (replace_regs): Same. (computed_jump_p_1): Same. * rtl.c (DEF_MACHMODE): Change all definitions to accept 8th argument. (inner_mode_array): New. (copy_rtx): Handle vectors. (copy_most_rtx): Same. (rtx_equal_p): Same. (get_mode_alignment): Adjust for vectors. * resource.c (mark_referenced_resources): Handle vectors. (mark_set_resources): Same. * reload1.c (eliminate_regs): Handle vectors. (elimination_effects): Same. (scan_paradoxical_subregs): Same. * reload.c (subst_reg_equivs): Handle vectors. * regrename.c (scan_rtx): Handle vectors. * regclass.c (reg_scan_mark_refs): Handle vectors. * recog.c (find_single_use_1): Handle vectors. * local-alloc.c (equiv_init_varies_p): Handle vectors. (contains_replace_regs): Same. (memref_referenced_p): Same. * integrate.c (copy_rtx_and_substitute): Handle vectors. (subst_constants): Same. * genattrtab.c (attr_copy_rtx): Handle vectors. (encode_units_mask): Same. (clear_struct_flag): Same. (count_sub_rtxs): Same. * gcse.c (want_to_gcse_p): Handle vectors. (oprs_unchanged_p): Same. (hash_expr_1): Same. (oprs_not_set_p): Same. (expr_killed_p): Same. (compute_transp): Same. (store_ops_ok): Same. * function.c (purge_addressof_1): Do not allow paradoxical subregs of vectors. (fixup_var_refs_1): Same. (instantiate_virtual_regs_1): Same. * fold-const.c (operand_equal_p): Handle vectors. (fold): Same. (rtl_expr_nonnegative_p): Same. * flow.c (mark_used_regs): Handle vectors. * df.c (df_uses_record): Handle vectors. * cselib.c (cselib_subst_to_values): Handle vectors. (cselib_mem_conflict_p): Same. (hash_rtx): Same. * cse.c (canon_reg): Handle vectors. (fold_rt): Same. (cse_process_notes): Same. (count_reg_usage): Same. (canon_hash): Same. * alias.c (nonlocal_mentioned_p): Add case for CONST_VECTOR. * combine.c (mark_used_regs_combine): Add case for CONST_VECTOR. * emit-rtl.c (init_emit_once): Generate const0_rtx for vectors. (gen_rtx): Handle CONST_VECTOR. (gen_const_vector_0): New. (copy_rtx_if_shared): CONST_VECTORs can be shared. (reset_used_flags): Same. (copy_insn_1): Same. (initializer_constant_valid_p): Handle VECTOR_CST. * doc/c-tree.texi (Expression trees): Document VECTOR_CST. * doc/rtl.texi (Constants): Document const_vector. (CONST0_RTX): Update for vectors. (RTL sharing): Same. * print-tree.c (print_node): Add case for VECTOR_CST. * tree.h (TREE_VECTOR_CST_ELTS): New. (struct tree_vector): New. (union tree_node): Add vector node. (build_vector): Add prototype. * tree.def (VECTOR_CST): New. * tree.c (build_vector): New. * expmed.c (make_tree): Handle CONST_VECTOR. * rtl.h (CONSTANT_P): CONST_VECTORs are constants too. (CONST_VECTOR_ELT): New. (CONST_VECTOR_NUNITS): New. * machmode.h (GET_MODE_INNER): New. (DEF_MACHMODE): Accept 8th arg. * machmode.def: Add 8th argument for vector inner mode. Add inner vector modes for vectors. * rtl.def (VEC_CONST): Remove. (CONST_VECTOR): New. * expr.c (clear_storage): Allow vectors. (is_zeros_p): Handle VECTOR_CST. * varasm.c (output_constant_pool): Handle vectors. (rtx_const): Add veclo and vechi fields. (kind): Add RTX_VECTOR. (decode_rtx_const): Add case for vector. * config/rs6000/rs6000-protos.h: Add zero_constant. * config/rs6000/rs6000.c (rs6000_emit_move): Handle vector constants. Force easy vector constants into memory. (easy_vector_constant): New. (emit_easy_vector_constant): New. (rs6000_legitimize_reload_address): Do not generate bad reloads on darwin. * config/rs6000/rs6000.md ("altivec_lvx"): Reflect what instruction does. ("altivec_lvxl"): Same. (altivec_lvebx): Same. (altivec_lvehx): Same. (altivec_lvewx): Same. ("*movv4si_const0"): New. ("*movv4sf_const0"): New. ("*movv8hi_const0"): New. ("*movv16qi_const0"): New. From-SVN: r49853
2002-02-19 03:53:41 +01:00
/* 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
rtl.h: Update copyright date. * rtl.h: Update copyright date. (RTL_CHECK1): Wrap long line. (RTL_CHECK2): Likewise. (RTL_CHECKC1): Wrap long line and whitespace. (RTL_CHECKC2): Likewise. (XWINT): Whitespace. (XINT): Likewise. (XSTR): Likewise. (XEXP): Likewise. (XVEC): Likewise. (XMODE): Likewise. (XBITMAP): Likewise. (XTREE): Likewise. (XBBDEF): Likewise. (XTMPL): Likewise. (X0WINT): Likewise. (X0INT):Likewise. (X0UINT): Likewise. (X0STR): Likewise. (X0EXP): Likewise. (X0VEC): Likewise. (X0MODE): Likewise. (X0BITMAP): Likewise. (X0TREE): Likewise. (X0BBDEF): Likewise. (X0ADVFLAGS): Likewise. (X0CSELIB): Likewise. (X0MEMATTR): Likewise. (XCWINT): Likewise. (XCINT): Likewise. (XCUINT): Likewise. (XCSTR): Likewise. (XCEXP): Likewise. (XCVEC): Likewise. (XCMODE): Likewise. (XCBITMAP): Likewise. (XCTREE): Likewise. (XCBBDEF): Likewise. (XCADVFLAGS): Likewise. (XCCSELIB): Likewise. (XC2EXP): Likewise. (INSN_UID): Likewise. (PREV_INSN): Likewise. (PATTERN): Likewise. (INSN_CODE): Likewise. (PUT_REG_NOTE_KIND): Likewise. (CODE_LABEL_NUMBER): Likewise. (NOTE_SOURCE_FILE): Likewise. (NOTE_BLOCK): Likewise. (NOTE_EH_HANDLER): Likewise. (NOTE_RANGE_INFO): Likewise. (NOTE_LIVE_INFO): Likewise. (NOTE_BASIC_BLOCK): Likewise. (NOTE_EXPECTED_VALUE): Likewise. (NOTE_LINE_NUMBER): Likewise. (LABEL_NAME): Likewise. (LABEL_NUSES): Likewise. (LABEL_ALTERNATE_NAME): Likewise. (ADDRESSOF_DECL): Likewise. (JUMP_LABEL): Likewise. (LABEL_NEXTREF): Likewise. (REGNO): Likewise. (ORIGINAL_REGNO: Likewise. (HARD_REGISTER_NUM_P): Add parenthesis. (SUBREG_REG): Whitespace. (SUBREG_BYTE): Likewise. (ASM_OPERANDS_TEMPLATE): Remove parenthesis. (ASM_OPERANDS_OUTPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_OUTPUT_IDX): Likewise. (ASM_OPERANDS_INPUT_VEC): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_VEC): Likewise. (ASM_OPERANDS_INPUT): Likewise. (ASM_OPERANDS_INPUT_LENGTH): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_INPUT_MODE): Likewise. (ASM_OPERANDS_SOURCE_FILE): Likewise. (ASM_OPERANDS_SOURCE_LINE): Likewise. (MEM_SET_IN_STRUCT_P): Minor reformat. (TRAP_CONDITION): Whitespace. (TRAP_CODE): Likewise. (COND_EXEC_TEST): Likewise. (COND_EXEC_CODE): Likewise. (FIND_REG_INC_NOTE): Uppercase macro args and add parenthesis. (PHI_NODE_P): Add parenthesis. (plus_constant): Whitespace and add paraenthese. From-SVN: r48497
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 */
/* Return the right cost to give to an operation
to make the cost of the corresponding register-to-register instruction
N times that of a fast register-to-register instruction. */
#define COSTS_N_INSNS(N) ((N) * 4)
/* Maximum cost of an rtl expression. This value has the special meaning
not to use an rtx with this cost under any circumstances. */
#define MAX_COST INT_MAX
extern void init_rtlanal (void);
extern int rtx_cost (rtx, enum rtx_code);
extern int address_cost (rtx, enum machine_mode);
extern unsigned int subreg_lsb (rtx);
extern unsigned int subreg_lsb_1 (enum machine_mode, enum machine_mode,
unsigned int);
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);
extern unsigned int subreg_nregs (rtx);
extern unsigned HOST_WIDE_INT nonzero_bits (rtx, enum machine_mode);
extern unsigned int num_sign_bit_copies (rtx, enum machine_mode);
extern bool constant_pool_constant_p (rtx);
extern bool truncated_to_mode (enum machine_mode, rtx);
1991-12-06 22:00:31 +01: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
the reg. SUBREG_PROMOTED_UNSIGNED_P gives the signedness of the
extension.
When used as a LHS, is means that this extension must be done
when assigning to SUBREG_REG. */
#define SUBREG_PROMOTED_VAR_P(RTX) \
(RTL_FLAG_CHECK1("SUBREG_PROMOTED", (RTX), SUBREG)->in_struct)
#define SUBREG_PROMOTED_UNSIGNED_SET(RTX, VAL) \
do { \
rtx const _rtx = RTL_FLAG_CHECK1("SUBREG_PROMOTED_UNSIGNED_SET", (RTX), SUBREG); \
if ((VAL) < 0) \
_rtx->volatil = 1; \
else { \
_rtx->volatil = 0; \
_rtx->unchanging = (VAL); \
} \
} while (0)
#define SUBREG_PROMOTED_UNSIGNED_P(RTX) \
((RTL_FLAG_CHECK1("SUBREG_PROMOTED_UNSIGNED_P", (RTX), SUBREG)->volatil) \
? -1 : (RTX)->unchanging)
1991-12-06 22:00:31 +01:00
/* Access various components of an ASM_OPERANDS rtx. */
rtl.h: Update copyright date. * rtl.h: Update copyright date. (RTL_CHECK1): Wrap long line. (RTL_CHECK2): Likewise. (RTL_CHECKC1): Wrap long line and whitespace. (RTL_CHECKC2): Likewise. (XWINT): Whitespace. (XINT): Likewise. (XSTR): Likewise. (XEXP): Likewise. (XVEC): Likewise. (XMODE): Likewise. (XBITMAP): Likewise. (XTREE): Likewise. (XBBDEF): Likewise. (XTMPL): Likewise. (X0WINT): Likewise. (X0INT):Likewise. (X0UINT): Likewise. (X0STR): Likewise. (X0EXP): Likewise. (X0VEC): Likewise. (X0MODE): Likewise. (X0BITMAP): Likewise. (X0TREE): Likewise. (X0BBDEF): Likewise. (X0ADVFLAGS): Likewise. (X0CSELIB): Likewise. (X0MEMATTR): Likewise. (XCWINT): Likewise. (XCINT): Likewise. (XCUINT): Likewise. (XCSTR): Likewise. (XCEXP): Likewise. (XCVEC): Likewise. (XCMODE): Likewise. (XCBITMAP): Likewise. (XCTREE): Likewise. (XCBBDEF): Likewise. (XCADVFLAGS): Likewise. (XCCSELIB): Likewise. (XC2EXP): Likewise. (INSN_UID): Likewise. (PREV_INSN): Likewise. (PATTERN): Likewise. (INSN_CODE): Likewise. (PUT_REG_NOTE_KIND): Likewise. (CODE_LABEL_NUMBER): Likewise. (NOTE_SOURCE_FILE): Likewise. (NOTE_BLOCK): Likewise. (NOTE_EH_HANDLER): Likewise. (NOTE_RANGE_INFO): Likewise. (NOTE_LIVE_INFO): Likewise. (NOTE_BASIC_BLOCK): Likewise. (NOTE_EXPECTED_VALUE): Likewise. (NOTE_LINE_NUMBER): Likewise. (LABEL_NAME): Likewise. (LABEL_NUSES): Likewise. (LABEL_ALTERNATE_NAME): Likewise. (ADDRESSOF_DECL): Likewise. (JUMP_LABEL): Likewise. (LABEL_NEXTREF): Likewise. (REGNO): Likewise. (ORIGINAL_REGNO: Likewise. (HARD_REGISTER_NUM_P): Add parenthesis. (SUBREG_REG): Whitespace. (SUBREG_BYTE): Likewise. (ASM_OPERANDS_TEMPLATE): Remove parenthesis. (ASM_OPERANDS_OUTPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_OUTPUT_IDX): Likewise. (ASM_OPERANDS_INPUT_VEC): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_VEC): Likewise. (ASM_OPERANDS_INPUT): Likewise. (ASM_OPERANDS_INPUT_LENGTH): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_INPUT_MODE): Likewise. (ASM_OPERANDS_SOURCE_FILE): Likewise. (ASM_OPERANDS_SOURCE_LINE): Likewise. (MEM_SET_IN_STRUCT_P): Minor reformat. (TRAP_CONDITION): Whitespace. (TRAP_CODE): Likewise. (COND_EXEC_TEST): Likewise. (COND_EXEC_CODE): Likewise. (FIND_REG_INC_NOTE): Uppercase macro args and add parenthesis. (PHI_NODE_P): Add parenthesis. (plus_constant): Whitespace and add paraenthese. From-SVN: r48497
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)
#define ASM_OPERANDS_INPUT_CONSTRAINT_EXP(RTX, N) \
rtl.h: Update copyright date. * rtl.h: Update copyright date. (RTL_CHECK1): Wrap long line. (RTL_CHECK2): Likewise. (RTL_CHECKC1): Wrap long line and whitespace. (RTL_CHECKC2): Likewise. (XWINT): Whitespace. (XINT): Likewise. (XSTR): Likewise. (XEXP): Likewise. (XVEC): Likewise. (XMODE): Likewise. (XBITMAP): Likewise. (XTREE): Likewise. (XBBDEF): Likewise. (XTMPL): Likewise. (X0WINT): Likewise. (X0INT):Likewise. (X0UINT): Likewise. (X0STR): Likewise. (X0EXP): Likewise. (X0VEC): Likewise. (X0MODE): Likewise. (X0BITMAP): Likewise. (X0TREE): Likewise. (X0BBDEF): Likewise. (X0ADVFLAGS): Likewise. (X0CSELIB): Likewise. (X0MEMATTR): Likewise. (XCWINT): Likewise. (XCINT): Likewise. (XCUINT): Likewise. (XCSTR): Likewise. (XCEXP): Likewise. (XCVEC): Likewise. (XCMODE): Likewise. (XCBITMAP): Likewise. (XCTREE): Likewise. (XCBBDEF): Likewise. (XCADVFLAGS): Likewise. (XCCSELIB): Likewise. (XC2EXP): Likewise. (INSN_UID): Likewise. (PREV_INSN): Likewise. (PATTERN): Likewise. (INSN_CODE): Likewise. (PUT_REG_NOTE_KIND): Likewise. (CODE_LABEL_NUMBER): Likewise. (NOTE_SOURCE_FILE): Likewise. (NOTE_BLOCK): Likewise. (NOTE_EH_HANDLER): Likewise. (NOTE_RANGE_INFO): Likewise. (NOTE_LIVE_INFO): Likewise. (NOTE_BASIC_BLOCK): Likewise. (NOTE_EXPECTED_VALUE): Likewise. (NOTE_LINE_NUMBER): Likewise. (LABEL_NAME): Likewise. (LABEL_NUSES): Likewise. (LABEL_ALTERNATE_NAME): Likewise. (ADDRESSOF_DECL): Likewise. (JUMP_LABEL): Likewise. (LABEL_NEXTREF): Likewise. (REGNO): Likewise. (ORIGINAL_REGNO: Likewise. (HARD_REGISTER_NUM_P): Add parenthesis. (SUBREG_REG): Whitespace. (SUBREG_BYTE): Likewise. (ASM_OPERANDS_TEMPLATE): Remove parenthesis. (ASM_OPERANDS_OUTPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_OUTPUT_IDX): Likewise. (ASM_OPERANDS_INPUT_VEC): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_VEC): Likewise. (ASM_OPERANDS_INPUT): Likewise. (ASM_OPERANDS_INPUT_LENGTH): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_INPUT_MODE): Likewise. (ASM_OPERANDS_SOURCE_FILE): Likewise. (ASM_OPERANDS_SOURCE_LINE): Likewise. (MEM_SET_IN_STRUCT_P): Minor reformat. (TRAP_CONDITION): Whitespace. (TRAP_CODE): Likewise. (COND_EXEC_TEST): Likewise. (COND_EXEC_CODE): Likewise. (FIND_REG_INC_NOTE): Uppercase macro args and add parenthesis. (PHI_NODE_P): Add parenthesis. (plus_constant): Whitespace and add paraenthese. From-SVN: r48497
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) \
rtl.h: Update copyright date. * rtl.h: Update copyright date. (RTL_CHECK1): Wrap long line. (RTL_CHECK2): Likewise. (RTL_CHECKC1): Wrap long line and whitespace. (RTL_CHECKC2): Likewise. (XWINT): Whitespace. (XINT): Likewise. (XSTR): Likewise. (XEXP): Likewise. (XVEC): Likewise. (XMODE): Likewise. (XBITMAP): Likewise. (XTREE): Likewise. (XBBDEF): Likewise. (XTMPL): Likewise. (X0WINT): Likewise. (X0INT):Likewise. (X0UINT): Likewise. (X0STR): Likewise. (X0EXP): Likewise. (X0VEC): Likewise. (X0MODE): Likewise. (X0BITMAP): Likewise. (X0TREE): Likewise. (X0BBDEF): Likewise. (X0ADVFLAGS): Likewise. (X0CSELIB): Likewise. (X0MEMATTR): Likewise. (XCWINT): Likewise. (XCINT): Likewise. (XCUINT): Likewise. (XCSTR): Likewise. (XCEXP): Likewise. (XCVEC): Likewise. (XCMODE): Likewise. (XCBITMAP): Likewise. (XCTREE): Likewise. (XCBBDEF): Likewise. (XCADVFLAGS): Likewise. (XCCSELIB): Likewise. (XC2EXP): Likewise. (INSN_UID): Likewise. (PREV_INSN): Likewise. (PATTERN): Likewise. (INSN_CODE): Likewise. (PUT_REG_NOTE_KIND): Likewise. (CODE_LABEL_NUMBER): Likewise. (NOTE_SOURCE_FILE): Likewise. (NOTE_BLOCK): Likewise. (NOTE_EH_HANDLER): Likewise. (NOTE_RANGE_INFO): Likewise. (NOTE_LIVE_INFO): Likewise. (NOTE_BASIC_BLOCK): Likewise. (NOTE_EXPECTED_VALUE): Likewise. (NOTE_LINE_NUMBER): Likewise. (LABEL_NAME): Likewise. (LABEL_NUSES): Likewise. (LABEL_ALTERNATE_NAME): Likewise. (ADDRESSOF_DECL): Likewise. (JUMP_LABEL): Likewise. (LABEL_NEXTREF): Likewise. (REGNO): Likewise. (ORIGINAL_REGNO: Likewise. (HARD_REGISTER_NUM_P): Add parenthesis. (SUBREG_REG): Whitespace. (SUBREG_BYTE): Likewise. (ASM_OPERANDS_TEMPLATE): Remove parenthesis. (ASM_OPERANDS_OUTPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_OUTPUT_IDX): Likewise. (ASM_OPERANDS_INPUT_VEC): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_VEC): Likewise. (ASM_OPERANDS_INPUT): Likewise. (ASM_OPERANDS_INPUT_LENGTH): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_INPUT_MODE): Likewise. (ASM_OPERANDS_SOURCE_FILE): Likewise. (ASM_OPERANDS_SOURCE_LINE): Likewise. (MEM_SET_IN_STRUCT_P): Minor reformat. (TRAP_CONDITION): Whitespace. (TRAP_CODE): Likewise. (COND_EXEC_TEST): Likewise. (COND_EXEC_CODE): Likewise. (FIND_REG_INC_NOTE): Uppercase macro args and add parenthesis. (PHI_NODE_P): Add parenthesis. (plus_constant): Whitespace and add paraenthese. From-SVN: r48497
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) \
rtl.h: Update copyright date. * rtl.h: Update copyright date. (RTL_CHECK1): Wrap long line. (RTL_CHECK2): Likewise. (RTL_CHECKC1): Wrap long line and whitespace. (RTL_CHECKC2): Likewise. (XWINT): Whitespace. (XINT): Likewise. (XSTR): Likewise. (XEXP): Likewise. (XVEC): Likewise. (XMODE): Likewise. (XBITMAP): Likewise. (XTREE): Likewise. (XBBDEF): Likewise. (XTMPL): Likewise. (X0WINT): Likewise. (X0INT):Likewise. (X0UINT): Likewise. (X0STR): Likewise. (X0EXP): Likewise. (X0VEC): Likewise. (X0MODE): Likewise. (X0BITMAP): Likewise. (X0TREE): Likewise. (X0BBDEF): Likewise. (X0ADVFLAGS): Likewise. (X0CSELIB): Likewise. (X0MEMATTR): Likewise. (XCWINT): Likewise. (XCINT): Likewise. (XCUINT): Likewise. (XCSTR): Likewise. (XCEXP): Likewise. (XCVEC): Likewise. (XCMODE): Likewise. (XCBITMAP): Likewise. (XCTREE): Likewise. (XCBBDEF): Likewise. (XCADVFLAGS): Likewise. (XCCSELIB): Likewise. (XC2EXP): Likewise. (INSN_UID): Likewise. (PREV_INSN): Likewise. (PATTERN): Likewise. (INSN_CODE): Likewise. (PUT_REG_NOTE_KIND): Likewise. (CODE_LABEL_NUMBER): Likewise. (NOTE_SOURCE_FILE): Likewise. (NOTE_BLOCK): Likewise. (NOTE_EH_HANDLER): Likewise. (NOTE_RANGE_INFO): Likewise. (NOTE_LIVE_INFO): Likewise. (NOTE_BASIC_BLOCK): Likewise. (NOTE_EXPECTED_VALUE): Likewise. (NOTE_LINE_NUMBER): Likewise. (LABEL_NAME): Likewise. (LABEL_NUSES): Likewise. (LABEL_ALTERNATE_NAME): Likewise. (ADDRESSOF_DECL): Likewise. (JUMP_LABEL): Likewise. (LABEL_NEXTREF): Likewise. (REGNO): Likewise. (ORIGINAL_REGNO: Likewise. (HARD_REGISTER_NUM_P): Add parenthesis. (SUBREG_REG): Whitespace. (SUBREG_BYTE): Likewise. (ASM_OPERANDS_TEMPLATE): Remove parenthesis. (ASM_OPERANDS_OUTPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_OUTPUT_IDX): Likewise. (ASM_OPERANDS_INPUT_VEC): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_VEC): Likewise. (ASM_OPERANDS_INPUT): Likewise. (ASM_OPERANDS_INPUT_LENGTH): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_INPUT_MODE): Likewise. (ASM_OPERANDS_SOURCE_FILE): Likewise. (ASM_OPERANDS_SOURCE_LINE): Likewise. (MEM_SET_IN_STRUCT_P): Minor reformat. (TRAP_CONDITION): Whitespace. (TRAP_CODE): Likewise. (COND_EXEC_TEST): Likewise. (COND_EXEC_CODE): Likewise. (FIND_REG_INC_NOTE): Uppercase macro args and add parenthesis. (PHI_NODE_P): Add parenthesis. (plus_constant): Whitespace and add paraenthese. From-SVN: r48497
2002-01-03 06:11:05 +01:00
GET_MODE (XCVECEXP (RTX, 4, N, ASM_OPERANDS))
#ifdef USE_MAPPED_LOCATION
#define ASM_OPERANDS_SOURCE_LOCATION(RTX) XCUINT (RTX, 5, ASM_OPERANDS)
#define ASM_INPUT_SOURCE_LOCATION(RTX) XCUINT (RTX, 1, ASM_INPUT)
#else
rtl.h: Update copyright date. * rtl.h: Update copyright date. (RTL_CHECK1): Wrap long line. (RTL_CHECK2): Likewise. (RTL_CHECKC1): Wrap long line and whitespace. (RTL_CHECKC2): Likewise. (XWINT): Whitespace. (XINT): Likewise. (XSTR): Likewise. (XEXP): Likewise. (XVEC): Likewise. (XMODE): Likewise. (XBITMAP): Likewise. (XTREE): Likewise. (XBBDEF): Likewise. (XTMPL): Likewise. (X0WINT): Likewise. (X0INT):Likewise. (X0UINT): Likewise. (X0STR): Likewise. (X0EXP): Likewise. (X0VEC): Likewise. (X0MODE): Likewise. (X0BITMAP): Likewise. (X0TREE): Likewise. (X0BBDEF): Likewise. (X0ADVFLAGS): Likewise. (X0CSELIB): Likewise. (X0MEMATTR): Likewise. (XCWINT): Likewise. (XCINT): Likewise. (XCUINT): Likewise. (XCSTR): Likewise. (XCEXP): Likewise. (XCVEC): Likewise. (XCMODE): Likewise. (XCBITMAP): Likewise. (XCTREE): Likewise. (XCBBDEF): Likewise. (XCADVFLAGS): Likewise. (XCCSELIB): Likewise. (XC2EXP): Likewise. (INSN_UID): Likewise. (PREV_INSN): Likewise. (PATTERN): Likewise. (INSN_CODE): Likewise. (PUT_REG_NOTE_KIND): Likewise. (CODE_LABEL_NUMBER): Likewise. (NOTE_SOURCE_FILE): Likewise. (NOTE_BLOCK): Likewise. (NOTE_EH_HANDLER): Likewise. (NOTE_RANGE_INFO): Likewise. (NOTE_LIVE_INFO): Likewise. (NOTE_BASIC_BLOCK): Likewise. (NOTE_EXPECTED_VALUE): Likewise. (NOTE_LINE_NUMBER): Likewise. (LABEL_NAME): Likewise. (LABEL_NUSES): Likewise. (LABEL_ALTERNATE_NAME): Likewise. (ADDRESSOF_DECL): Likewise. (JUMP_LABEL): Likewise. (LABEL_NEXTREF): Likewise. (REGNO): Likewise. (ORIGINAL_REGNO: Likewise. (HARD_REGISTER_NUM_P): Add parenthesis. (SUBREG_REG): Whitespace. (SUBREG_BYTE): Likewise. (ASM_OPERANDS_TEMPLATE): Remove parenthesis. (ASM_OPERANDS_OUTPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_OUTPUT_IDX): Likewise. (ASM_OPERANDS_INPUT_VEC): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_VEC): Likewise. (ASM_OPERANDS_INPUT): Likewise. (ASM_OPERANDS_INPUT_LENGTH): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_INPUT_MODE): Likewise. (ASM_OPERANDS_SOURCE_FILE): Likewise. (ASM_OPERANDS_SOURCE_LINE): Likewise. (MEM_SET_IN_STRUCT_P): Minor reformat. (TRAP_CONDITION): Whitespace. (TRAP_CODE): Likewise. (COND_EXEC_TEST): Likewise. (COND_EXEC_CODE): Likewise. (FIND_REG_INC_NOTE): Uppercase macro args and add parenthesis. (PHI_NODE_P): Add parenthesis. (plus_constant): Whitespace and add paraenthese. From-SVN: r48497
2002-01-03 06:11:05 +01:00
#define ASM_OPERANDS_SOURCE_FILE(RTX) XCSTR (RTX, 5, ASM_OPERANDS)
#define ASM_OPERANDS_SOURCE_LINE(RTX) XCINT (RTX, 6, ASM_OPERANDS)
#define ASM_INPUT_SOURCE_FILE(RTX) XCSTR (RTX, 1, ASM_INPUT)
#define ASM_INPUT_SOURCE_LINE(RTX) XCINT (RTX, 2, ASM_INPUT)
#endif
1991-12-06 22:00:31 +01:00
rtl.h (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * rtl.h (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * alias.c (true_dependence): Update to match new semantics. (canon_true_dependence, write_dependence_p): Likewise. (anti_dependence, output_dependence): Update write_dependence_p args. (unchanging_anti_dependence): Remove. * calls.c (purge_mem_unchanging_flag): Remove. (fixup_tail_calls): Don't call it. (expand_call): Don't add unchanging memory to function usage. * expr.c (emit_block_move_via_libcall): Likewise. (clear_storage_via_libcall): Don't clobber RTX_UNCHANGING_P mems. (get_subtarget): Don't use RTX_UNCHANGING_P. (expand_assignment, store_constructor, expand_expr_real_1): Likewise. (do_tablejump): Set MEM_READONLY_P, not RTX_UNCHANGING_P. * combine.c (get_last_value_validate): Use MEM_READONLY_P. * cse.c (insert): Don't use RTX_UNCHANGING_P. (cse_insn, canon_hash): Use MEM_READONLY_P. * emit-rtl.c (set_mem_attributes_minus_bitpos): Use MEM_READONLY_P instead of RTX_UNCHANGING_P. * explow.c (maybe_set_unchanging): Remove. * expr.h (maybe_set_unchanging): Remove. * flow.c (insn_dead_p, mark_used_regs): Use anti_dependence. * function.c (assign_stack_temp_for_type): Don't use RTX_UNCHANGING_P. (assign_parm_setup_reg, expand_function_start): Likewise. * integrate.c (copy_rtx_and_substitute): Likewise. * ra-rewrite.c (emit_colors): Likewise. * regmove.c (copy_src_to_dest, regmove_optimize): Likewise. (fixup_match_1): Likewise. * reload1.c (reload, alter_reg): Likewise. * local-alloc.c (validate_equiv_mem): Check MEM_READONLY_P, not RTX_UNCHANGING_P. (equiv_init_varies_p): Likewise. * loop-invariant.c (check_maybe_invariant): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * loop.c (note_addr_stored): Likewise. (prescan_loop): Likewise. Don't check function usage for clobbered unchanging memory. * rtlanal.c (rtx_unstable_p): Check MEM_READONLY_P, not RTX_UNCHANGING_P. (rtx_varies_p, modified_between_p, modified_in_p): Likewise. * varasm.c (force_const_mem): Likewise. * stmt.c (expand_decl): Don't set RTX_UNCHANGING_P. * web.c (entry_register): Likewise. * tree-gimple.h (get_base_address): Move decl ... * tree.h: ... here. * doc/rtl.texi (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * config/alpha/alpha.c (alpha_set_memflags_1): Rewrite to be called via for_each_rtx. Copy MEM_SCALAR_P, MEM_NOTRAP_P too. (alpha_set_memflags): Update to match. * config/darwin.c (machopic_indirect_data_reference): Set MEM_READONLY_P instead of RTX_UNCHANGING_P. (machopic_indirect_call_target): Likewise. (machopic_legitimize_pic_address): Likewise. * config/arm/arm.c (legitimize_pic_address, arm_gen_load_multiple, arm_gen_store_multiple, arm_gen_movmemqi): Likewise. * config/arm/arm.md (load_multiple, store_multiple): Likewise. * config/frv/frv.md (symGOT2reg): Likewise. * config/i386/i386.c (legitimize_pic_address, legitimize_tls_address, ix86_split_to_parts): Likewise. * config/ia64/ia64.c (ia64_expand_tls_address): Likewise. * config/ia64/ia64.md (load_fptr): Likewise. * config/m32r/m32r.c (m32r_legitimize_pic_address): Likewise. * config/m68k/m68k.c (legitimize_pic_address): Likewise. * config/mcore/mcore.c (block_move_sequence): Likewise. * config/mn10300/mn10300.md (symGOT2reg): Likewise. * config/pa/pa.c (legitimize_pic_address): Likewise. * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Likewise. (rs6000_emit_move): Likewise. * config/s390/s390.c (legitimize_pic_address): Likewise. (legitimize_tls_address): Likewise. * config/s390/s390.md (casesi): Likewise. * config/sh/sh.c (prepare_move_operands, sh_reorg): Likewise. * config/sh/sh.md (symGOT2reg): Likewise. * config/sparc/sparc.c (legitimize_pic_address): Likewise. * config/v850/v850.md (casesi): Likewise. * config/ia64/ia64.c (gen_thread_pointer): Don't set RTX_UNCHANGING_P. * config/iq2000/iq2000.c (save_restore_insns): Likewise. * config/mips/mips.c (mips_restore_gp): Likewise. (mips_save_restore_reg, mips16_gp_pseudo_reg): Likewise. * config/sh/sh.c (sh_reorg): Likewise. From-SVN: r86178
2004-08-18 10:25:01 +02:00
/* 1 if RTX is a mem that is statically allocated in read-only memory. */
#define MEM_READONLY_P(RTX) \
(RTL_FLAG_CHECK1("MEM_READONLY_P", (RTX), MEM)->unchanging)
/* 1 if RTX is a mem and we should keep the alias set for this mem
unchanged when we access a component. Set to 1, or example, when we
are already in a non-addressable component of an aggregate. */
#define MEM_KEEP_ALIAS_SET_P(RTX) \
(RTL_FLAG_CHECK1("MEM_KEEP_ALIAS_SET_P", (RTX), MEM)->jump)
/* 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
/* 1 if RTX is a mem that refers to an aggregate, either to the
aggregate itself or to a field of the aggregate. If zero, RTX may
or may not be such a reference. */
#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
/* 1 if RTX is a MEM that refers to a scalar. If zero, RTX may or may
not refer to a scalar. */
#define MEM_SCALAR_P(RTX) \
(RTL_FLAG_CHECK1("MEM_SCALAR_P", (RTX), MEM)->return_val)
rtl.h (rtx_def): Update documentation. * rtl.h (rtx_def): Update documentation. (MEM_IN_STRUCT_P): Likewise. (MEM_SCALAR_P): New macro. (MEM_COPY_ATTRIBUTES): Likewise. (MEM_SET_IN_STRUCT_P): Likewise. * rtl.texi (MEM_SCALAR_P): Document. * alias.c (canon_rtx): Use MEM_COPY_ATTRIBUTES. (fixed_scalar_and_varying_struct_p): New function. Use MEM_SCALAR_P rather than !MEM_IN_STRUCT_P. (aliases_everything_p): Likewise. (true_dependence): Use them. (write_dependence_p): New function, containing code common to anti_dependence and output_dependence. (anti_dependence): Use it. (output_dependence): Likewise. * calls.c (save_fixed_argument_area): Don't clear MEM_IN_STRUCT_P. (expand_call): Use MEM_SET_IN_STRUCT_P. (emit_library_call): Don't clear MEM_IN_STRUCT_P. (emit_library_call_value): Likewise. (store_one_arg): Use MEM_SET_IN_STRUCT_P. * combine.c (simplify_rtx): Use MEM_COPY_ATTRIBUTES. (make_extraction): Likewise. (simplify_shift_const): Likewise. (gen_lowpart_for_combine): Likewise. * cse.c (gen_lowpart_if_possible): Use MEM_COPY_ATTRIBUTES. * emit-rtl.c (operand_subword): Likewise. (change_address): Likewise. * explow.c (stabilize): Use MEM_COPY_ATTRIBUTES. * expr.c (protect_from_queue): Use MEM_COPY_ATTRIBUTES. (emit_group_store): Use MEM_SET_IN_STRUCT_P. (copy_blkmode_from_reg): Likewise. (store_field): Likewise. (expand_expr): Remove bogus guesswork setting MEM_IN_STRUCT_P heuristically. Use MEM_SET_IN_STRUCT_P. (get_memory_rtx): Likewise. * final.c (alter_subreg): Use MEM_COPY_ATTRIBUTES. * function.c (assign_stack_temp): Clear MEM_SCALAR_P and MEM_ALIAS_SET on newly returned MEMs. (assign_temp): Use MEM_SET_IN_STRUCT_P. (put_reg_into_stack): Likewise. (fixup_var_refs1): Use MEM_COPY_ATTRIBUTES. (gen_mem_addressof): Use MEM_SET_IN_STRUCT_P. (assign_parms): Likewise. (expand_function): Likewise. * integrate.c (expand_inline_function): Likewise. (copy_rtx_and_substitute): Use MEM_COPY_ATTRIBUTES. * loop.c (note_addr_stored): Remove check on MEM_IN_STRUCT_P. * optabs.c (gen_move_insn): Use MEM_COPY_ATTRIBUTES. * print-rtl.c (print_rtx): Print /f for frame_related. * recog.c (validate_replace_rtx_1): Use MEM_COPY_ATTRIBUTES. * reload1.c (reload): Copy MEM_SCALAR_P as well. * stmt.c (expand_decl): Use MEM_SET_IN_STRUCT_P. (expand_anon_union_decl): Use MEM_COPY_ATTRIBUTES. * varasm.c (make_decl_rtl): Use MEM_SET_IN_STRUCT_P. (output_constant_def): Likewise. * a29k.c (a29k_set_memflags_1): Take scalar_p. Set MEM_SCALAR_P. (a29k_set_memflags): Use it. * alpha.c (get_aligned_mem): Use MEM_COPY_ATTRIBUTES. * c4x.c (c4x_scan_for_ld): Likewise. * h8300.c (fix_bit_operand): Likewise. * m88k.c (legitimize_address): Likewise. (block_move_loop): Likewise. (block_move_no_loop): Likewise. (block_move_sequence): Likewise. (m88k_builtin_saveregs): Use MEM_SET_IN_STRUCT_P. * mips/abi64.h (SETUP_INCOMING_VARARGS): Likewise. * rs6000.c (expand_block_move_insn): Use MEM_COPY_ATTRIBUTES. * sh.c (sh_builtin_saveregs): Use MEM_SET_IN_STRUCT_P. * arm.h (arm_gen_load_multiple): Take scalar_p. (arm_store_load_multiple): Likewise. * arm.c (arm_gen_load_multiple): Likewise. (arm_gen_store_multiple): Likewise. (arm_gen_movstrqi): Treat MEM_SCALAR_P like MEM_IN_STRUCT_P. From-SVN: r24759
1999-01-19 11:32:33 +01:00
/* 1 if RTX is a mem that cannot trap. */
#define MEM_NOTRAP_P(RTX) \
(RTL_FLAG_CHECK1("MEM_NOTRAP_P", (RTX), MEM)->call)
/* If VAL is nonzero, set MEM_IN_STRUCT_P and clear MEM_SCALAR_P in
rtl.h (rtx_def): Update documentation. * rtl.h (rtx_def): Update documentation. (MEM_IN_STRUCT_P): Likewise. (MEM_SCALAR_P): New macro. (MEM_COPY_ATTRIBUTES): Likewise. (MEM_SET_IN_STRUCT_P): Likewise. * rtl.texi (MEM_SCALAR_P): Document. * alias.c (canon_rtx): Use MEM_COPY_ATTRIBUTES. (fixed_scalar_and_varying_struct_p): New function. Use MEM_SCALAR_P rather than !MEM_IN_STRUCT_P. (aliases_everything_p): Likewise. (true_dependence): Use them. (write_dependence_p): New function, containing code common to anti_dependence and output_dependence. (anti_dependence): Use it. (output_dependence): Likewise. * calls.c (save_fixed_argument_area): Don't clear MEM_IN_STRUCT_P. (expand_call): Use MEM_SET_IN_STRUCT_P. (emit_library_call): Don't clear MEM_IN_STRUCT_P. (emit_library_call_value): Likewise. (store_one_arg): Use MEM_SET_IN_STRUCT_P. * combine.c (simplify_rtx): Use MEM_COPY_ATTRIBUTES. (make_extraction): Likewise. (simplify_shift_const): Likewise. (gen_lowpart_for_combine): Likewise. * cse.c (gen_lowpart_if_possible): Use MEM_COPY_ATTRIBUTES. * emit-rtl.c (operand_subword): Likewise. (change_address): Likewise. * explow.c (stabilize): Use MEM_COPY_ATTRIBUTES. * expr.c (protect_from_queue): Use MEM_COPY_ATTRIBUTES. (emit_group_store): Use MEM_SET_IN_STRUCT_P. (copy_blkmode_from_reg): Likewise. (store_field): Likewise. (expand_expr): Remove bogus guesswork setting MEM_IN_STRUCT_P heuristically. Use MEM_SET_IN_STRUCT_P. (get_memory_rtx): Likewise. * final.c (alter_subreg): Use MEM_COPY_ATTRIBUTES. * function.c (assign_stack_temp): Clear MEM_SCALAR_P and MEM_ALIAS_SET on newly returned MEMs. (assign_temp): Use MEM_SET_IN_STRUCT_P. (put_reg_into_stack): Likewise. (fixup_var_refs1): Use MEM_COPY_ATTRIBUTES. (gen_mem_addressof): Use MEM_SET_IN_STRUCT_P. (assign_parms): Likewise. (expand_function): Likewise. * integrate.c (expand_inline_function): Likewise. (copy_rtx_and_substitute): Use MEM_COPY_ATTRIBUTES. * loop.c (note_addr_stored): Remove check on MEM_IN_STRUCT_P. * optabs.c (gen_move_insn): Use MEM_COPY_ATTRIBUTES. * print-rtl.c (print_rtx): Print /f for frame_related. * recog.c (validate_replace_rtx_1): Use MEM_COPY_ATTRIBUTES. * reload1.c (reload): Copy MEM_SCALAR_P as well. * stmt.c (expand_decl): Use MEM_SET_IN_STRUCT_P. (expand_anon_union_decl): Use MEM_COPY_ATTRIBUTES. * varasm.c (make_decl_rtl): Use MEM_SET_IN_STRUCT_P. (output_constant_def): Likewise. * a29k.c (a29k_set_memflags_1): Take scalar_p. Set MEM_SCALAR_P. (a29k_set_memflags): Use it. * alpha.c (get_aligned_mem): Use MEM_COPY_ATTRIBUTES. * c4x.c (c4x_scan_for_ld): Likewise. * h8300.c (fix_bit_operand): Likewise. * m88k.c (legitimize_address): Likewise. (block_move_loop): Likewise. (block_move_no_loop): Likewise. (block_move_sequence): Likewise. (m88k_builtin_saveregs): Use MEM_SET_IN_STRUCT_P. * mips/abi64.h (SETUP_INCOMING_VARARGS): Likewise. * rs6000.c (expand_block_move_insn): Use MEM_COPY_ATTRIBUTES. * sh.c (sh_builtin_saveregs): Use MEM_SET_IN_STRUCT_P. * arm.h (arm_gen_load_multiple): Take scalar_p. (arm_store_load_multiple): Likewise. * arm.c (arm_gen_load_multiple): Likewise. (arm_gen_store_multiple): Likewise. (arm_gen_movstrqi): Treat MEM_SCALAR_P like MEM_IN_STRUCT_P. From-SVN: r24759
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. */
rtl.h: Update copyright date. * rtl.h: Update copyright date. (RTL_CHECK1): Wrap long line. (RTL_CHECK2): Likewise. (RTL_CHECKC1): Wrap long line and whitespace. (RTL_CHECKC2): Likewise. (XWINT): Whitespace. (XINT): Likewise. (XSTR): Likewise. (XEXP): Likewise. (XVEC): Likewise. (XMODE): Likewise. (XBITMAP): Likewise. (XTREE): Likewise. (XBBDEF): Likewise. (XTMPL): Likewise. (X0WINT): Likewise. (X0INT):Likewise. (X0UINT): Likewise. (X0STR): Likewise. (X0EXP): Likewise. (X0VEC): Likewise. (X0MODE): Likewise. (X0BITMAP): Likewise. (X0TREE): Likewise. (X0BBDEF): Likewise. (X0ADVFLAGS): Likewise. (X0CSELIB): Likewise. (X0MEMATTR): Likewise. (XCWINT): Likewise. (XCINT): Likewise. (XCUINT): Likewise. (XCSTR): Likewise. (XCEXP): Likewise. (XCVEC): Likewise. (XCMODE): Likewise. (XCBITMAP): Likewise. (XCTREE): Likewise. (XCBBDEF): Likewise. (XCADVFLAGS): Likewise. (XCCSELIB): Likewise. (XC2EXP): Likewise. (INSN_UID): Likewise. (PREV_INSN): Likewise. (PATTERN): Likewise. (INSN_CODE): Likewise. (PUT_REG_NOTE_KIND): Likewise. (CODE_LABEL_NUMBER): Likewise. (NOTE_SOURCE_FILE): Likewise. (NOTE_BLOCK): Likewise. (NOTE_EH_HANDLER): Likewise. (NOTE_RANGE_INFO): Likewise. (NOTE_LIVE_INFO): Likewise. (NOTE_BASIC_BLOCK): Likewise. (NOTE_EXPECTED_VALUE): Likewise. (NOTE_LINE_NUMBER): Likewise. (LABEL_NAME): Likewise. (LABEL_NUSES): Likewise. (LABEL_ALTERNATE_NAME): Likewise. (ADDRESSOF_DECL): Likewise. (JUMP_LABEL): Likewise. (LABEL_NEXTREF): Likewise. (REGNO): Likewise. (ORIGINAL_REGNO: Likewise. (HARD_REGISTER_NUM_P): Add parenthesis. (SUBREG_REG): Whitespace. (SUBREG_BYTE): Likewise. (ASM_OPERANDS_TEMPLATE): Remove parenthesis. (ASM_OPERANDS_OUTPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_OUTPUT_IDX): Likewise. (ASM_OPERANDS_INPUT_VEC): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_VEC): Likewise. (ASM_OPERANDS_INPUT): Likewise. (ASM_OPERANDS_INPUT_LENGTH): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_INPUT_MODE): Likewise. (ASM_OPERANDS_SOURCE_FILE): Likewise. (ASM_OPERANDS_SOURCE_LINE): Likewise. (MEM_SET_IN_STRUCT_P): Minor reformat. (TRAP_CONDITION): Whitespace. (TRAP_CODE): Likewise. (COND_EXEC_TEST): Likewise. (COND_EXEC_CODE): Likewise. (FIND_REG_INC_NOTE): Uppercase macro args and add parenthesis. (PHI_NODE_P): Add parenthesis. (plus_constant): Whitespace and add paraenthese. From-SVN: r48497
2002-01-03 06:11:05 +01:00
#define MEM_SET_IN_STRUCT_P(RTX, VAL) \
do { \
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)
rtl.h (rtx_def): Update documentation. * rtl.h (rtx_def): Update documentation. (MEM_IN_STRUCT_P): Likewise. (MEM_SCALAR_P): New macro. (MEM_COPY_ATTRIBUTES): Likewise. (MEM_SET_IN_STRUCT_P): Likewise. * rtl.texi (MEM_SCALAR_P): Document. * alias.c (canon_rtx): Use MEM_COPY_ATTRIBUTES. (fixed_scalar_and_varying_struct_p): New function. Use MEM_SCALAR_P rather than !MEM_IN_STRUCT_P. (aliases_everything_p): Likewise. (true_dependence): Use them. (write_dependence_p): New function, containing code common to anti_dependence and output_dependence. (anti_dependence): Use it. (output_dependence): Likewise. * calls.c (save_fixed_argument_area): Don't clear MEM_IN_STRUCT_P. (expand_call): Use MEM_SET_IN_STRUCT_P. (emit_library_call): Don't clear MEM_IN_STRUCT_P. (emit_library_call_value): Likewise. (store_one_arg): Use MEM_SET_IN_STRUCT_P. * combine.c (simplify_rtx): Use MEM_COPY_ATTRIBUTES. (make_extraction): Likewise. (simplify_shift_const): Likewise. (gen_lowpart_for_combine): Likewise. * cse.c (gen_lowpart_if_possible): Use MEM_COPY_ATTRIBUTES. * emit-rtl.c (operand_subword): Likewise. (change_address): Likewise. * explow.c (stabilize): Use MEM_COPY_ATTRIBUTES. * expr.c (protect_from_queue): Use MEM_COPY_ATTRIBUTES. (emit_group_store): Use MEM_SET_IN_STRUCT_P. (copy_blkmode_from_reg): Likewise. (store_field): Likewise. (expand_expr): Remove bogus guesswork setting MEM_IN_STRUCT_P heuristically. Use MEM_SET_IN_STRUCT_P. (get_memory_rtx): Likewise. * final.c (alter_subreg): Use MEM_COPY_ATTRIBUTES. * function.c (assign_stack_temp): Clear MEM_SCALAR_P and MEM_ALIAS_SET on newly returned MEMs. (assign_temp): Use MEM_SET_IN_STRUCT_P. (put_reg_into_stack): Likewise. (fixup_var_refs1): Use MEM_COPY_ATTRIBUTES. (gen_mem_addressof): Use MEM_SET_IN_STRUCT_P. (assign_parms): Likewise. (expand_function): Likewise. * integrate.c (expand_inline_function): Likewise. (copy_rtx_and_substitute): Use MEM_COPY_ATTRIBUTES. * loop.c (note_addr_stored): Remove check on MEM_IN_STRUCT_P. * optabs.c (gen_move_insn): Use MEM_COPY_ATTRIBUTES. * print-rtl.c (print_rtx): Print /f for frame_related. * recog.c (validate_replace_rtx_1): Use MEM_COPY_ATTRIBUTES. * reload1.c (reload): Copy MEM_SCALAR_P as well. * stmt.c (expand_decl): Use MEM_SET_IN_STRUCT_P. (expand_anon_union_decl): Use MEM_COPY_ATTRIBUTES. * varasm.c (make_decl_rtl): Use MEM_SET_IN_STRUCT_P. (output_constant_def): Likewise. * a29k.c (a29k_set_memflags_1): Take scalar_p. Set MEM_SCALAR_P. (a29k_set_memflags): Use it. * alpha.c (get_aligned_mem): Use MEM_COPY_ATTRIBUTES. * c4x.c (c4x_scan_for_ld): Likewise. * h8300.c (fix_bit_operand): Likewise. * m88k.c (legitimize_address): Likewise. (block_move_loop): Likewise. (block_move_no_loop): Likewise. (block_move_sequence): Likewise. (m88k_builtin_saveregs): Use MEM_SET_IN_STRUCT_P. * mips/abi64.h (SETUP_INCOMING_VARARGS): Likewise. * rs6000.c (expand_block_move_insn): Use MEM_COPY_ATTRIBUTES. * sh.c (sh_builtin_saveregs): Use MEM_SET_IN_STRUCT_P. * arm.h (arm_gen_load_multiple): Take scalar_p. (arm_store_load_multiple): Likewise. * arm.c (arm_gen_load_multiple): Likewise. (arm_gen_store_multiple): Likewise. (arm_gen_movstrqi): Treat MEM_SCALAR_P like MEM_IN_STRUCT_P. From-SVN: r24759
1999-01-19 11:32:33 +01: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)
/* 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)
invoke.texi (-fstrict-aliasing): Document. * invoke.texi (-fstrict-aliasing): Document. * rtl.texi (MEM_ALIAS_SET): Document. * flags.h (flag_strict_aliasing): Declare. * toplev.c (flag_strict_aliasing): Define. (f_options): Add -strict-aliasing. (main): Set flag_strict_aliasing if -O2 or higher. * tree.h (tree_type): Add alias_set field. (TYPE_ALIAS_SET): New macro. (TYPE_ALIAS_SET_KNOWN_P): Likewise. (get_alias_set): Declare. * tree.c (lang_get_alias_set): Define. (make_node): Initialize TYPE_ALIAS_SET. (get_alias_set): New function. * print-tree.c (print_node): Dump the alias set for a type. * c-tree.h (c_get_alias_set): Declare. * c-common.c (c_get_alias_set): New function. * c-decl.c (init_decl_processing): Set lang_get_alias_set. * expr.c (protect_from_queue): Propogage alias sets. (expand_assignment): Calculate alias set for new MEMs. (expand_expr): Likewise. * function.c (put_var_into_stack): Likewise. (put_reg_into_stack): Likewise. (gen_mem_addressof): Likewise. (assign_parms): Likewise. * stmt.c (expand_decl): Likewise. * varasm.c (make_decl_rtl): Eliminate redundant clearing of DECL_RTL. Calculate alias set for new MEMs. * rtl.def (REG): Add dummy operand. (MEM): Add extra operand to store the MEM_ALIAS_SET. * rtl.h (MEM_ALIAS_SET): New macro. (gen_rtx_MEM): Declare. * emit-rtl.c (gen_rtx_MEM): New function. * gengenrtl.c (sepcial_rtx): Make MEMs special. * alias.c (CHECK_ALIAS_SETS_FOR_CONSISTENCY): New macro. (DIFFERENT_ALIAS_SETS_P): Likewise. (canon_rtx): Propogate the alias set to the new MEM. (true_dependence): Check the alias sets. (anti_dependence): Likewise. (output_dependence): Likewise. * explow.c (stabilize): Progoate alias sets. * integrate.c (copy_rtx_and_substitute): Likewise. * final.c (alter_subreg): Make sure not to leave MEM_IN_STRUCT_P in an unpredictable state. Propogate alias sets. * reload1.c (reload): Clear MEM_ALIAS_SET for new MEMs about which we have no alias information. From-SVN: r20719
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
MEMs in a conflicting alias set. This value is set in a
invoke.texi (-fstrict-aliasing): Document. * invoke.texi (-fstrict-aliasing): Document. * rtl.texi (MEM_ALIAS_SET): Document. * flags.h (flag_strict_aliasing): Declare. * toplev.c (flag_strict_aliasing): Define. (f_options): Add -strict-aliasing. (main): Set flag_strict_aliasing if -O2 or higher. * tree.h (tree_type): Add alias_set field. (TYPE_ALIAS_SET): New macro. (TYPE_ALIAS_SET_KNOWN_P): Likewise. (get_alias_set): Declare. * tree.c (lang_get_alias_set): Define. (make_node): Initialize TYPE_ALIAS_SET. (get_alias_set): New function. * print-tree.c (print_node): Dump the alias set for a type. * c-tree.h (c_get_alias_set): Declare. * c-common.c (c_get_alias_set): New function. * c-decl.c (init_decl_processing): Set lang_get_alias_set. * expr.c (protect_from_queue): Propogage alias sets. (expand_assignment): Calculate alias set for new MEMs. (expand_expr): Likewise. * function.c (put_var_into_stack): Likewise. (put_reg_into_stack): Likewise. (gen_mem_addressof): Likewise. (assign_parms): Likewise. * stmt.c (expand_decl): Likewise. * varasm.c (make_decl_rtl): Eliminate redundant clearing of DECL_RTL. Calculate alias set for new MEMs. * rtl.def (REG): Add dummy operand. (MEM): Add extra operand to store the MEM_ALIAS_SET. * rtl.h (MEM_ALIAS_SET): New macro. (gen_rtx_MEM): Declare. * emit-rtl.c (gen_rtx_MEM): New function. * gengenrtl.c (sepcial_rtx): Make MEMs special. * alias.c (CHECK_ALIAS_SETS_FOR_CONSISTENCY): New macro. (DIFFERENT_ALIAS_SETS_P): Likewise. (canon_rtx): Propogate the alias set to the new MEM. (true_dependence): Check the alias sets. (anti_dependence): Likewise. (output_dependence): Likewise. * explow.c (stabilize): Progoate alias sets. * integrate.c (copy_rtx_and_substitute): Likewise. * final.c (alter_subreg): Make sure not to leave MEM_IN_STRUCT_P in an unpredictable state. Propogate alias sets. * reload1.c (reload): Clear MEM_ALIAS_SET for new MEMs about which we have no alias information. From-SVN: r20719
1998-06-25 17:14:41 +02:00
language-dependent manner in the front-end, and should not be
altered in the back-end. These set numbers are tested with
alias_sets_conflict_p. */
#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
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)
/* For a MEM rtx, the offset from the start of MEM_EXPR, if known, as a
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. */
#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)
/* 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 \
: (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
/* 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. */
#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), \
MEM_NOTRAP_P (LHS) = MEM_NOTRAP_P (RHS), \
rtl.h (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * rtl.h (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * alias.c (true_dependence): Update to match new semantics. (canon_true_dependence, write_dependence_p): Likewise. (anti_dependence, output_dependence): Update write_dependence_p args. (unchanging_anti_dependence): Remove. * calls.c (purge_mem_unchanging_flag): Remove. (fixup_tail_calls): Don't call it. (expand_call): Don't add unchanging memory to function usage. * expr.c (emit_block_move_via_libcall): Likewise. (clear_storage_via_libcall): Don't clobber RTX_UNCHANGING_P mems. (get_subtarget): Don't use RTX_UNCHANGING_P. (expand_assignment, store_constructor, expand_expr_real_1): Likewise. (do_tablejump): Set MEM_READONLY_P, not RTX_UNCHANGING_P. * combine.c (get_last_value_validate): Use MEM_READONLY_P. * cse.c (insert): Don't use RTX_UNCHANGING_P. (cse_insn, canon_hash): Use MEM_READONLY_P. * emit-rtl.c (set_mem_attributes_minus_bitpos): Use MEM_READONLY_P instead of RTX_UNCHANGING_P. * explow.c (maybe_set_unchanging): Remove. * expr.h (maybe_set_unchanging): Remove. * flow.c (insn_dead_p, mark_used_regs): Use anti_dependence. * function.c (assign_stack_temp_for_type): Don't use RTX_UNCHANGING_P. (assign_parm_setup_reg, expand_function_start): Likewise. * integrate.c (copy_rtx_and_substitute): Likewise. * ra-rewrite.c (emit_colors): Likewise. * regmove.c (copy_src_to_dest, regmove_optimize): Likewise. (fixup_match_1): Likewise. * reload1.c (reload, alter_reg): Likewise. * local-alloc.c (validate_equiv_mem): Check MEM_READONLY_P, not RTX_UNCHANGING_P. (equiv_init_varies_p): Likewise. * loop-invariant.c (check_maybe_invariant): Likewise. * resource.c (mark_referenced_resources, mark_set_resources): Likewise. * loop.c (note_addr_stored): Likewise. (prescan_loop): Likewise. Don't check function usage for clobbered unchanging memory. * rtlanal.c (rtx_unstable_p): Check MEM_READONLY_P, not RTX_UNCHANGING_P. (rtx_varies_p, modified_between_p, modified_in_p): Likewise. * varasm.c (force_const_mem): Likewise. * stmt.c (expand_decl): Don't set RTX_UNCHANGING_P. * web.c (entry_register): Likewise. * tree-gimple.h (get_base_address): Move decl ... * tree.h: ... here. * doc/rtl.texi (MEM_READONLY_P): Replace RTX_UNCHANGING_P. * config/alpha/alpha.c (alpha_set_memflags_1): Rewrite to be called via for_each_rtx. Copy MEM_SCALAR_P, MEM_NOTRAP_P too. (alpha_set_memflags): Update to match. * config/darwin.c (machopic_indirect_data_reference): Set MEM_READONLY_P instead of RTX_UNCHANGING_P. (machopic_indirect_call_target): Likewise. (machopic_legitimize_pic_address): Likewise. * config/arm/arm.c (legitimize_pic_address, arm_gen_load_multiple, arm_gen_store_multiple, arm_gen_movmemqi): Likewise. * config/arm/arm.md (load_multiple, store_multiple): Likewise. * config/frv/frv.md (symGOT2reg): Likewise. * config/i386/i386.c (legitimize_pic_address, legitimize_tls_address, ix86_split_to_parts): Likewise. * config/ia64/ia64.c (ia64_expand_tls_address): Likewise. * config/ia64/ia64.md (load_fptr): Likewise. * config/m32r/m32r.c (m32r_legitimize_pic_address): Likewise. * config/m68k/m68k.c (legitimize_pic_address): Likewise. * config/mcore/mcore.c (block_move_sequence): Likewise. * config/mn10300/mn10300.md (symGOT2reg): Likewise. * config/pa/pa.c (legitimize_pic_address): Likewise. * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Likewise. (rs6000_emit_move): Likewise. * config/s390/s390.c (legitimize_pic_address): Likewise. (legitimize_tls_address): Likewise. * config/s390/s390.md (casesi): Likewise. * config/sh/sh.c (prepare_move_operands, sh_reorg): Likewise. * config/sh/sh.md (symGOT2reg): Likewise. * config/sparc/sparc.c (legitimize_pic_address): Likewise. * config/v850/v850.md (casesi): Likewise. * config/ia64/ia64.c (gen_thread_pointer): Don't set RTX_UNCHANGING_P. * config/iq2000/iq2000.c (save_restore_insns): Likewise. * config/mips/mips.c (mips_restore_gp): Likewise. (mips_save_restore_reg, mips16_gp_pseudo_reg): Likewise. * config/sh/sh.c (sh_reorg): Likewise. From-SVN: r86178
2004-08-18 10:25:01 +02:00
MEM_READONLY_P (LHS) = MEM_READONLY_P (RHS), \
MEM_KEEP_ALIAS_SET_P (LHS) = MEM_KEEP_ALIAS_SET_P (RHS), \
MEM_POINTER (LHS) = MEM_POINTER (RHS), \
MEM_ATTRS (LHS) = MEM_ATTRS (RHS))
invoke.texi (-fstrict-aliasing): Document. * invoke.texi (-fstrict-aliasing): Document. * rtl.texi (MEM_ALIAS_SET): Document. * flags.h (flag_strict_aliasing): Declare. * toplev.c (flag_strict_aliasing): Define. (f_options): Add -strict-aliasing. (main): Set flag_strict_aliasing if -O2 or higher. * tree.h (tree_type): Add alias_set field. (TYPE_ALIAS_SET): New macro. (TYPE_ALIAS_SET_KNOWN_P): Likewise. (get_alias_set): Declare. * tree.c (lang_get_alias_set): Define. (make_node): Initialize TYPE_ALIAS_SET. (get_alias_set): New function. * print-tree.c (print_node): Dump the alias set for a type. * c-tree.h (c_get_alias_set): Declare. * c-common.c (c_get_alias_set): New function. * c-decl.c (init_decl_processing): Set lang_get_alias_set. * expr.c (protect_from_queue): Propogage alias sets. (expand_assignment): Calculate alias set for new MEMs. (expand_expr): Likewise. * function.c (put_var_into_stack): Likewise. (put_reg_into_stack): Likewise. (gen_mem_addressof): Likewise. (assign_parms): Likewise. * stmt.c (expand_decl): Likewise. * varasm.c (make_decl_rtl): Eliminate redundant clearing of DECL_RTL. Calculate alias set for new MEMs. * rtl.def (REG): Add dummy operand. (MEM): Add extra operand to store the MEM_ALIAS_SET. * rtl.h (MEM_ALIAS_SET): New macro. (gen_rtx_MEM): Declare. * emit-rtl.c (gen_rtx_MEM): New function. * gengenrtl.c (sepcial_rtx): Make MEMs special. * alias.c (CHECK_ALIAS_SETS_FOR_CONSISTENCY): New macro. (DIFFERENT_ALIAS_SETS_P): Likewise. (canon_rtx): Propogate the alias set to the new MEM. (true_dependence): Check the alias sets. (anti_dependence): Likewise. (output_dependence): Likewise. * explow.c (stabilize): Progoate alias sets. * integrate.c (copy_rtx_and_substitute): Likewise. * final.c (alter_subreg): Make sure not to leave MEM_IN_STRUCT_P in an unpredictable state. Propogate alias sets. * reload1.c (reload): Clear MEM_ALIAS_SET for new MEMs about which we have no alias information. From-SVN: r20719
1998-06-25 17:14:41 +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
/* 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
/* During sched, 1 if RTX is an insn that must be scheduled together
with the preceding insn. */
#define SCHED_GROUP_P(RTX) \
(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. */
#define SET_DEST(RTX) XC2EXP(RTX, 0, SET, CLOBBER)
#define SET_SRC(RTX) XCEXP(RTX, 1, SET)
#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. */
rtl.h: Update copyright date. * rtl.h: Update copyright date. (RTL_CHECK1): Wrap long line. (RTL_CHECK2): Likewise. (RTL_CHECKC1): Wrap long line and whitespace. (RTL_CHECKC2): Likewise. (XWINT): Whitespace. (XINT): Likewise. (XSTR): Likewise. (XEXP): Likewise. (XVEC): Likewise. (XMODE): Likewise. (XBITMAP): Likewise. (XTREE): Likewise. (XBBDEF): Likewise. (XTMPL): Likewise. (X0WINT): Likewise. (X0INT):Likewise. (X0UINT): Likewise. (X0STR): Likewise. (X0EXP): Likewise. (X0VEC): Likewise. (X0MODE): Likewise. (X0BITMAP): Likewise. (X0TREE): Likewise. (X0BBDEF): Likewise. (X0ADVFLAGS): Likewise. (X0CSELIB): Likewise. (X0MEMATTR): Likewise. (XCWINT): Likewise. (XCINT): Likewise. (XCUINT): Likewise. (XCSTR): Likewise. (XCEXP): Likewise. (XCVEC): Likewise. (XCMODE): Likewise. (XCBITMAP): Likewise. (XCTREE): Likewise. (XCBBDEF): Likewise. (XCADVFLAGS): Likewise. (XCCSELIB): Likewise. (XC2EXP): Likewise. (INSN_UID): Likewise. (PREV_INSN): Likewise. (PATTERN): Likewise. (INSN_CODE): Likewise. (PUT_REG_NOTE_KIND): Likewise. (CODE_LABEL_NUMBER): Likewise. (NOTE_SOURCE_FILE): Likewise. (NOTE_BLOCK): Likewise. (NOTE_EH_HANDLER): Likewise. (NOTE_RANGE_INFO): Likewise. (NOTE_LIVE_INFO): Likewise. (NOTE_BASIC_BLOCK): Likewise. (NOTE_EXPECTED_VALUE): Likewise. (NOTE_LINE_NUMBER): Likewise. (LABEL_NAME): Likewise. (LABEL_NUSES): Likewise. (LABEL_ALTERNATE_NAME): Likewise. (ADDRESSOF_DECL): Likewise. (JUMP_LABEL): Likewise. (LABEL_NEXTREF): Likewise. (REGNO): Likewise. (ORIGINAL_REGNO: Likewise. (HARD_REGISTER_NUM_P): Add parenthesis. (SUBREG_REG): Whitespace. (SUBREG_BYTE): Likewise. (ASM_OPERANDS_TEMPLATE): Remove parenthesis. (ASM_OPERANDS_OUTPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_OUTPUT_IDX): Likewise. (ASM_OPERANDS_INPUT_VEC): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_VEC): Likewise. (ASM_OPERANDS_INPUT): Likewise. (ASM_OPERANDS_INPUT_LENGTH): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_INPUT_MODE): Likewise. (ASM_OPERANDS_SOURCE_FILE): Likewise. (ASM_OPERANDS_SOURCE_LINE): Likewise. (MEM_SET_IN_STRUCT_P): Minor reformat. (TRAP_CONDITION): Whitespace. (TRAP_CODE): Likewise. (COND_EXEC_TEST): Likewise. (COND_EXEC_CODE): Likewise. (FIND_REG_INC_NOTE): Uppercase macro args and add parenthesis. (PHI_NODE_P): Add parenthesis. (plus_constant): Whitespace and add paraenthese. From-SVN: r48497
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
/* 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. */
rtl.h: Update copyright date. * rtl.h: Update copyright date. (RTL_CHECK1): Wrap long line. (RTL_CHECK2): Likewise. (RTL_CHECKC1): Wrap long line and whitespace. (RTL_CHECKC2): Likewise. (XWINT): Whitespace. (XINT): Likewise. (XSTR): Likewise. (XEXP): Likewise. (XVEC): Likewise. (XMODE): Likewise. (XBITMAP): Likewise. (XTREE): Likewise. (XBBDEF): Likewise. (XTMPL): Likewise. (X0WINT): Likewise. (X0INT):Likewise. (X0UINT): Likewise. (X0STR): Likewise. (X0EXP): Likewise. (X0VEC): Likewise. (X0MODE): Likewise. (X0BITMAP): Likewise. (X0TREE): Likewise. (X0BBDEF): Likewise. (X0ADVFLAGS): Likewise. (X0CSELIB): Likewise. (X0MEMATTR): Likewise. (XCWINT): Likewise. (XCINT): Likewise. (XCUINT): Likewise. (XCSTR): Likewise. (XCEXP): Likewise. (XCVEC): Likewise. (XCMODE): Likewise. (XCBITMAP): Likewise. (XCTREE): Likewise. (XCBBDEF): Likewise. (XCADVFLAGS): Likewise. (XCCSELIB): Likewise. (XC2EXP): Likewise. (INSN_UID): Likewise. (PREV_INSN): Likewise. (PATTERN): Likewise. (INSN_CODE): Likewise. (PUT_REG_NOTE_KIND): Likewise. (CODE_LABEL_NUMBER): Likewise. (NOTE_SOURCE_FILE): Likewise. (NOTE_BLOCK): Likewise. (NOTE_EH_HANDLER): Likewise. (NOTE_RANGE_INFO): Likewise. (NOTE_LIVE_INFO): Likewise. (NOTE_BASIC_BLOCK): Likewise. (NOTE_EXPECTED_VALUE): Likewise. (NOTE_LINE_NUMBER): Likewise. (LABEL_NAME): Likewise. (LABEL_NUSES): Likewise. (LABEL_ALTERNATE_NAME): Likewise. (ADDRESSOF_DECL): Likewise. (JUMP_LABEL): Likewise. (LABEL_NEXTREF): Likewise. (REGNO): Likewise. (ORIGINAL_REGNO: Likewise. (HARD_REGISTER_NUM_P): Add parenthesis. (SUBREG_REG): Whitespace. (SUBREG_BYTE): Likewise. (ASM_OPERANDS_TEMPLATE): Remove parenthesis. (ASM_OPERANDS_OUTPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_OUTPUT_IDX): Likewise. (ASM_OPERANDS_INPUT_VEC): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_VEC): Likewise. (ASM_OPERANDS_INPUT): Likewise. (ASM_OPERANDS_INPUT_LENGTH): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_INPUT_MODE): Likewise. (ASM_OPERANDS_SOURCE_FILE): Likewise. (ASM_OPERANDS_SOURCE_LINE): Likewise. (MEM_SET_IN_STRUCT_P): Minor reformat. (TRAP_CONDITION): Whitespace. (TRAP_CODE): Likewise. (COND_EXEC_TEST): Likewise. (COND_EXEC_CODE): Likewise. (FIND_REG_INC_NOTE): Uppercase macro args and add parenthesis. (PHI_NODE_P): Add parenthesis. (plus_constant): Whitespace and add paraenthese. From-SVN: r48497
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)
/* 1 if RTX is a symbol_ref that addresses this function's rtl
constants pool. */
#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
/* 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)
/* 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
/* 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
/* 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)->return_val)
rtl.texi (SYMBOL_REF_CONSTANT, [...]): Document. * doc/rtl.texi (SYMBOL_REF_CONSTANT, SYMBOL_REF_DATA): Document. * gengtype.c (adjust_field_rtx_def): Garbage-collect field 2 of a SYMBOL_REF as either a tree or a constant_descriptor_rtx, depending on the value of CONSTANT_POOL_ADDRESS_P. * optabs.c (init_one_libfunc): Nullify SYMBOL_REF_DATA rather than SYMBOL_REF_DECL. * varasm.c (make_decl_rtl, build_constant_desc): Set SYMBOL_REF_DATA rather than SYMBOL_REF_DECL. (rtx_constant_pool): Remove const_rtx_sym_htab. (const_desc_rtx_sym_hash, const_desc_rtx_sym_eq): Delete. (init_varasm_status): Don't initialize const_rtx_sym_htab. (force_const_mem): Point SYMBOL_REF_DATA to the constant pool entry. Remove handling of const_rtx_sym_htab. (find_pool_constant): Delete. (get_pool_constant, get_pool_constant_mark): Use SYMBOL_REF_CONSTANT rather than find_pool_constant. (get_pool_constant_for_function): Delete. (get_pool_mode, mark_constant): Use SYMBOL_REF_CONSTANT rather than find_pool_constant. * rtl.h (rtunion_def): Add rt_constant and rt_ptr fields. (X0CONSTANT, X0PTR, SYMBOL_REF_DATA): New macros. (SYMBOL_REF_DECL): Return NULL if CONSTANT_POOL_ADDRESS_P. (SYMBOL_REF_CONSTANT): New macro. (get_pool_constant_for_function): Delete. * config/i386/winnt.c (i386_pe_mark_dllexport): Set SYMBOL_REF_DATA rather than SYMBOL_REF_DECL. (i386_pe_mark_dllimport): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Copy SYMBOL_REF_DATA rather than SYMBOL_REF_DECL. * config/darwin.c (machopic_indirect_data_reference): Likewise. (machopic_indirect_call_target): Likewise. From-SVN: r110210
2006-01-25 10:10:56 +01:00
/* A pointer attached to the SYMBOL_REF; either SYMBOL_REF_DECL or
SYMBOL_REF_CONSTANT. */
#define SYMBOL_REF_DATA(RTX) X0ANY ((RTX), 2)
/* Set RTX's SYMBOL_REF_DECL to DECL. RTX must not be a constant
pool symbol. */
#define SET_SYMBOL_REF_DECL(RTX, DECL) \
(gcc_assert (!CONSTANT_POOL_ADDRESS_P (RTX)), X0TREE ((RTX), 2) = (DECL))
rtl.texi (SYMBOL_REF_CONSTANT, [...]): Document. * doc/rtl.texi (SYMBOL_REF_CONSTANT, SYMBOL_REF_DATA): Document. * gengtype.c (adjust_field_rtx_def): Garbage-collect field 2 of a SYMBOL_REF as either a tree or a constant_descriptor_rtx, depending on the value of CONSTANT_POOL_ADDRESS_P. * optabs.c (init_one_libfunc): Nullify SYMBOL_REF_DATA rather than SYMBOL_REF_DECL. * varasm.c (make_decl_rtl, build_constant_desc): Set SYMBOL_REF_DATA rather than SYMBOL_REF_DECL. (rtx_constant_pool): Remove const_rtx_sym_htab. (const_desc_rtx_sym_hash, const_desc_rtx_sym_eq): Delete. (init_varasm_status): Don't initialize const_rtx_sym_htab. (force_const_mem): Point SYMBOL_REF_DATA to the constant pool entry. Remove handling of const_rtx_sym_htab. (find_pool_constant): Delete. (get_pool_constant, get_pool_constant_mark): Use SYMBOL_REF_CONSTANT rather than find_pool_constant. (get_pool_constant_for_function): Delete. (get_pool_mode, mark_constant): Use SYMBOL_REF_CONSTANT rather than find_pool_constant. * rtl.h (rtunion_def): Add rt_constant and rt_ptr fields. (X0CONSTANT, X0PTR, SYMBOL_REF_DATA): New macros. (SYMBOL_REF_DECL): Return NULL if CONSTANT_POOL_ADDRESS_P. (SYMBOL_REF_CONSTANT): New macro. (get_pool_constant_for_function): Delete. * config/i386/winnt.c (i386_pe_mark_dllexport): Set SYMBOL_REF_DATA rather than SYMBOL_REF_DECL. (i386_pe_mark_dllimport): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Copy SYMBOL_REF_DATA rather than SYMBOL_REF_DECL. * config/darwin.c (machopic_indirect_data_reference): Likewise. (machopic_indirect_call_target): Likewise. From-SVN: r110210
2006-01-25 10:10:56 +01:00
/* The tree (decl or constant) associated with the symbol, or null. */
rtl.texi (SYMBOL_REF_CONSTANT, [...]): Document. * doc/rtl.texi (SYMBOL_REF_CONSTANT, SYMBOL_REF_DATA): Document. * gengtype.c (adjust_field_rtx_def): Garbage-collect field 2 of a SYMBOL_REF as either a tree or a constant_descriptor_rtx, depending on the value of CONSTANT_POOL_ADDRESS_P. * optabs.c (init_one_libfunc): Nullify SYMBOL_REF_DATA rather than SYMBOL_REF_DECL. * varasm.c (make_decl_rtl, build_constant_desc): Set SYMBOL_REF_DATA rather than SYMBOL_REF_DECL. (rtx_constant_pool): Remove const_rtx_sym_htab. (const_desc_rtx_sym_hash, const_desc_rtx_sym_eq): Delete. (init_varasm_status): Don't initialize const_rtx_sym_htab. (force_const_mem): Point SYMBOL_REF_DATA to the constant pool entry. Remove handling of const_rtx_sym_htab. (find_pool_constant): Delete. (get_pool_constant, get_pool_constant_mark): Use SYMBOL_REF_CONSTANT rather than find_pool_constant. (get_pool_constant_for_function): Delete. (get_pool_mode, mark_constant): Use SYMBOL_REF_CONSTANT rather than find_pool_constant. * rtl.h (rtunion_def): Add rt_constant and rt_ptr fields. (X0CONSTANT, X0PTR, SYMBOL_REF_DATA): New macros. (SYMBOL_REF_DECL): Return NULL if CONSTANT_POOL_ADDRESS_P. (SYMBOL_REF_CONSTANT): New macro. (get_pool_constant_for_function): Delete. * config/i386/winnt.c (i386_pe_mark_dllexport): Set SYMBOL_REF_DATA rather than SYMBOL_REF_DECL. (i386_pe_mark_dllimport): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Copy SYMBOL_REF_DATA rather than SYMBOL_REF_DECL. * config/darwin.c (machopic_indirect_data_reference): Likewise. (machopic_indirect_call_target): Likewise. From-SVN: r110210
2006-01-25 10:10:56 +01:00
#define SYMBOL_REF_DECL(RTX) \
(CONSTANT_POOL_ADDRESS_P (RTX) ? NULL : X0TREE ((RTX), 2))
/* Set RTX's SYMBOL_REF_CONSTANT to C. RTX must be a constant pool symbol. */
#define SET_SYMBOL_REF_CONSTANT(RTX, C) \
(gcc_assert (CONSTANT_POOL_ADDRESS_P (RTX)), X0CONSTANT ((RTX), 2) = (C))
rtl.texi (SYMBOL_REF_CONSTANT, [...]): Document. * doc/rtl.texi (SYMBOL_REF_CONSTANT, SYMBOL_REF_DATA): Document. * gengtype.c (adjust_field_rtx_def): Garbage-collect field 2 of a SYMBOL_REF as either a tree or a constant_descriptor_rtx, depending on the value of CONSTANT_POOL_ADDRESS_P. * optabs.c (init_one_libfunc): Nullify SYMBOL_REF_DATA rather than SYMBOL_REF_DECL. * varasm.c (make_decl_rtl, build_constant_desc): Set SYMBOL_REF_DATA rather than SYMBOL_REF_DECL. (rtx_constant_pool): Remove const_rtx_sym_htab. (const_desc_rtx_sym_hash, const_desc_rtx_sym_eq): Delete. (init_varasm_status): Don't initialize const_rtx_sym_htab. (force_const_mem): Point SYMBOL_REF_DATA to the constant pool entry. Remove handling of const_rtx_sym_htab. (find_pool_constant): Delete. (get_pool_constant, get_pool_constant_mark): Use SYMBOL_REF_CONSTANT rather than find_pool_constant. (get_pool_constant_for_function): Delete. (get_pool_mode, mark_constant): Use SYMBOL_REF_CONSTANT rather than find_pool_constant. * rtl.h (rtunion_def): Add rt_constant and rt_ptr fields. (X0CONSTANT, X0PTR, SYMBOL_REF_DATA): New macros. (SYMBOL_REF_DECL): Return NULL if CONSTANT_POOL_ADDRESS_P. (SYMBOL_REF_CONSTANT): New macro. (get_pool_constant_for_function): Delete. * config/i386/winnt.c (i386_pe_mark_dllexport): Set SYMBOL_REF_DATA rather than SYMBOL_REF_DECL. (i386_pe_mark_dllimport): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Copy SYMBOL_REF_DATA rather than SYMBOL_REF_DECL. * config/darwin.c (machopic_indirect_data_reference): Likewise. (machopic_indirect_call_target): Likewise. From-SVN: r110210
2006-01-25 10:10:56 +01:00
/* The rtx constant pool entry for a symbol, or null. */
#define SYMBOL_REF_CONSTANT(RTX) \
(CONSTANT_POOL_ADDRESS_P (RTX) ? X0CONSTANT ((RTX), 2) : NULL)
/* 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) \
((enum tls_model) ((SYMBOL_REF_FLAGS (RTX) >> SYMBOL_FLAG_TLS_SHIFT) & 7))
/* 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)
re PR target/9703 ([arm] Accessing data through constant pool more times could be solved in less instructions) * cselib.c (cselib_init): Change RTX_SIZE to RTX_CODE_SIZE. * emit-rtl.c (copy_rtx_if_shared_1): Use shallow_copy_rtx. (copy_insn_1): Likewise. Don't copy each field individually. Reindent. * read-rtl.c (apply_macro_to_rtx): Use RTX_CODE_SIZE instead of RTX_SIZE. * reload1.c (eliminate_regs): Use shallow_copy_rtx. * rtl.c (rtx_size): Rename variable to... (rtx_code_size): ...this. (rtx_size): New function. (rtx_alloc_stat): Use RTX_CODE_SIZE instead of RTX_SIZE. (copy_rtx): Use shallow_copy_rtx. Don't copy each field individually. Reindent. (shallow_copy_rtx_stat): Use rtx_size instead of RTX_SIZE. * rtl.h (rtx_code_size): New variable. (rtx_size): Change from a variable to a function. (RTX_SIZE): Rename to... (RTX_CODE_SIZE): ...this. PR target/9703 PR tree-optimization/17106 * doc/tm.texi (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Document. (Anchored Addresses): New section. * doc/invoke.texi (-fsection-anchors): Document. * doc/rtl.texi (SYMBOL_REF_IN_BLOCK_P, SYMBOL_FLAG_IN_BLOCK): Likewise. (SYMBOL_REF_ANCHOR_P, SYMBOL_FLAG_ANCHOR): Likewise. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): Likewise. * hooks.c (hook_bool_mode_rtx_false): New function. * hooks.h (hook_bool_mode_rtx_false): Declare. * gengtype.c (create_optional_field): New function. (adjust_field_rtx_def): Add the "block_sym" field for SYMBOL_REFs when SYMBOL_REF_IN_BLOCK_P is true. * target.h (output_anchor, use_blocks_for_constant_p): New hooks. (min_anchor_offset, max_anchor_offset): Likewise. (use_anchors_for_symbol_p): New hook. * toplev.c (compile_file): Call output_object_blocks. (target_supports_section_anchors_p): New function. (process_options): Check that -fsection-anchors is only used on targets that support it and when -funit-at-a-time is in effect. * tree-ssa-loop-ivopts.c (prepare_decl_rtl): Only create DECL_RTL if the decl doesn't have one. * dwarf2out.c: Remove instantiations of VEC(rtx,gc). * expr.c (emit_move_multi_word, emit_move_insn): Pass the result of force_const_mem through use_anchored_address. (expand_expr_constant): New function. (expand_expr_addr_expr_1): Call it. Use the same modifier when calling expand_expr for INDIRECT_REF. (expand_expr_real_1): Pass DECL_RTL through use_anchored_address for all modifiers except EXPAND_INITIALIZER. Use expand_expr_constant. * expr.h (use_anchored_address): Declare. * loop-unroll.c: Don't declare rtx vectors here. * explow.c: Include output.h. (validize_mem): Call use_anchored_address. (use_anchored_address): New function. * common.opt (-fsection-anchors): New switch. * varasm.c (object_block_htab, anchor_labelno): New variables. (hash_section, object_block_entry_eq, object_block_entry_hash) (use_object_blocks_p, get_block_for_section, create_block_symbol) (use_blocks_for_decl_p, change_symbol_section): New functions. (get_variable_section): New function, split out from assemble_variable. (make_decl_rtl): Create a block symbol if use_object_blocks_p and use_blocks_for_decl_p say so. Use change_symbol_section if the symbol has already been created. (assemble_variable_contents): New function, split out from... (assemble_variable): ...here. Don't output any code for block symbols; just pass them to place_block_symbol. Use get_variable_section and assemble_variable_contents. (get_constant_alignment, get_constant_section, get_constant_size): New functions, split from output_constant_def_contents. (build_constant_desc): Create a block symbol if use_object_blocks_p says so. Or into SYMBOL_REF_FLAGS. (assemble_constant_contents): New function, split from... (output_constant_def_contents): ...here. Don't output any code for block symbols; just pass them to place_section_symbol. Use get_constant_section and get_constant_alignment. (force_const_mem): Create a block symbol if use_object_blocks_p and use_blocks_for_constant_p say so. Or into SYMBOL_REF_FLAGS. (output_constant_pool_1): Add an explicit alignment argument. Don't switch sections here. (output_constant_pool): Adjust call to output_constant_pool_1. Switch sections here instead. Don't output anything for block symbols; just pass them to place_block_symbol. (init_varasm_once): Initialize object_block_htab. (default_encode_section_info): Keep the old SYMBOL_FLAG_IN_BLOCK. (default_asm_output_anchor, default_use_aenchors_for_symbol_p) (place_block_symbol, get_section_anchor, output_object_block) (output_object_block_htab, output_object_blocks): New functions. * target-def.h (TARGET_ASM_OUTPUT_ANCHOR): New macro. (TARGET_ASM_OUT): Include it. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): New macro. (TARGET_MIN_ANCHOR_OFFSET, TARGET_MAX_ANCHOR_OFFSET): New macros. (TARGET_USE_ANCHORS_FOR_SYMBOL_P): New macro. (TARGET_INITIALIZER): Include them. * rtl.c (rtl_check_failed_block_symbol): New function. * rtl.h: Include vec.h. Declare heap and gc rtx vectors. (block_symbol, object_block): New structures. (rtx_def): Add a block_symbol field to the union. (BLOCK_SYMBOL_CHECK): New macro. (rtl_check_failed_block_symbol): Declare. (SYMBOL_FLAG_IN_BLOCK, SYMBOL_FLAG_ANCHOR): New SYMBOL_REF flags. (SYMBOL_REF_IN_BLOCK_P, SYMBOL_REF_ANCHOR_P): New predicates. (SYMBOL_FLAG_MACH_DEP_SHIFT): Bump by 2. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): New accessors. * output.h (output_section_symbols): Declare. (object_block): Name structure. (place_section_symbol, get_section_anchor, default_asm_output_anchor) (default_use_anchors_for_symbol_p): Declare. * Makefile.in (RTL_BASE_H): Add vec.h. (explow.o): Depend on output.h. * config/rs6000/rs6000.c (TARGET_MIN_ANCHOR_OFFSET): Override default. (TARGET_MAX_ANCHOR_OFFSET): Likewise. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise. (rs6000_use_blocks_for_constant_p): New function. From-SVN: r111254
2006-02-18 23:06:53 +01:00
/* Set if this symbol has a block_symbol structure associated with it. */
#define SYMBOL_FLAG_HAS_BLOCK_INFO (1 << 7)
#define SYMBOL_REF_HAS_BLOCK_INFO_P(RTX) \
((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_HAS_BLOCK_INFO) != 0)
re PR target/9703 ([arm] Accessing data through constant pool more times could be solved in less instructions) * cselib.c (cselib_init): Change RTX_SIZE to RTX_CODE_SIZE. * emit-rtl.c (copy_rtx_if_shared_1): Use shallow_copy_rtx. (copy_insn_1): Likewise. Don't copy each field individually. Reindent. * read-rtl.c (apply_macro_to_rtx): Use RTX_CODE_SIZE instead of RTX_SIZE. * reload1.c (eliminate_regs): Use shallow_copy_rtx. * rtl.c (rtx_size): Rename variable to... (rtx_code_size): ...this. (rtx_size): New function. (rtx_alloc_stat): Use RTX_CODE_SIZE instead of RTX_SIZE. (copy_rtx): Use shallow_copy_rtx. Don't copy each field individually. Reindent. (shallow_copy_rtx_stat): Use rtx_size instead of RTX_SIZE. * rtl.h (rtx_code_size): New variable. (rtx_size): Change from a variable to a function. (RTX_SIZE): Rename to... (RTX_CODE_SIZE): ...this. PR target/9703 PR tree-optimization/17106 * doc/tm.texi (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Document. (Anchored Addresses): New section. * doc/invoke.texi (-fsection-anchors): Document. * doc/rtl.texi (SYMBOL_REF_IN_BLOCK_P, SYMBOL_FLAG_IN_BLOCK): Likewise. (SYMBOL_REF_ANCHOR_P, SYMBOL_FLAG_ANCHOR): Likewise. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): Likewise. * hooks.c (hook_bool_mode_rtx_false): New function. * hooks.h (hook_bool_mode_rtx_false): Declare. * gengtype.c (create_optional_field): New function. (adjust_field_rtx_def): Add the "block_sym" field for SYMBOL_REFs when SYMBOL_REF_IN_BLOCK_P is true. * target.h (output_anchor, use_blocks_for_constant_p): New hooks. (min_anchor_offset, max_anchor_offset): Likewise. (use_anchors_for_symbol_p): New hook. * toplev.c (compile_file): Call output_object_blocks. (target_supports_section_anchors_p): New function. (process_options): Check that -fsection-anchors is only used on targets that support it and when -funit-at-a-time is in effect. * tree-ssa-loop-ivopts.c (prepare_decl_rtl): Only create DECL_RTL if the decl doesn't have one. * dwarf2out.c: Remove instantiations of VEC(rtx,gc). * expr.c (emit_move_multi_word, emit_move_insn): Pass the result of force_const_mem through use_anchored_address. (expand_expr_constant): New function. (expand_expr_addr_expr_1): Call it. Use the same modifier when calling expand_expr for INDIRECT_REF. (expand_expr_real_1): Pass DECL_RTL through use_anchored_address for all modifiers except EXPAND_INITIALIZER. Use expand_expr_constant. * expr.h (use_anchored_address): Declare. * loop-unroll.c: Don't declare rtx vectors here. * explow.c: Include output.h. (validize_mem): Call use_anchored_address. (use_anchored_address): New function. * common.opt (-fsection-anchors): New switch. * varasm.c (object_block_htab, anchor_labelno): New variables. (hash_section, object_block_entry_eq, object_block_entry_hash) (use_object_blocks_p, get_block_for_section, create_block_symbol) (use_blocks_for_decl_p, change_symbol_section): New functions. (get_variable_section): New function, split out from assemble_variable. (make_decl_rtl): Create a block symbol if use_object_blocks_p and use_blocks_for_decl_p say so. Use change_symbol_section if the symbol has already been created. (assemble_variable_contents): New function, split out from... (assemble_variable): ...here. Don't output any code for block symbols; just pass them to place_block_symbol. Use get_variable_section and assemble_variable_contents. (get_constant_alignment, get_constant_section, get_constant_size): New functions, split from output_constant_def_contents. (build_constant_desc): Create a block symbol if use_object_blocks_p says so. Or into SYMBOL_REF_FLAGS. (assemble_constant_contents): New function, split from... (output_constant_def_contents): ...here. Don't output any code for block symbols; just pass them to place_section_symbol. Use get_constant_section and get_constant_alignment. (force_const_mem): Create a block symbol if use_object_blocks_p and use_blocks_for_constant_p say so. Or into SYMBOL_REF_FLAGS. (output_constant_pool_1): Add an explicit alignment argument. Don't switch sections here. (output_constant_pool): Adjust call to output_constant_pool_1. Switch sections here instead. Don't output anything for block symbols; just pass them to place_block_symbol. (init_varasm_once): Initialize object_block_htab. (default_encode_section_info): Keep the old SYMBOL_FLAG_IN_BLOCK. (default_asm_output_anchor, default_use_aenchors_for_symbol_p) (place_block_symbol, get_section_anchor, output_object_block) (output_object_block_htab, output_object_blocks): New functions. * target-def.h (TARGET_ASM_OUTPUT_ANCHOR): New macro. (TARGET_ASM_OUT): Include it. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): New macro. (TARGET_MIN_ANCHOR_OFFSET, TARGET_MAX_ANCHOR_OFFSET): New macros. (TARGET_USE_ANCHORS_FOR_SYMBOL_P): New macro. (TARGET_INITIALIZER): Include them. * rtl.c (rtl_check_failed_block_symbol): New function. * rtl.h: Include vec.h. Declare heap and gc rtx vectors. (block_symbol, object_block): New structures. (rtx_def): Add a block_symbol field to the union. (BLOCK_SYMBOL_CHECK): New macro. (rtl_check_failed_block_symbol): Declare. (SYMBOL_FLAG_IN_BLOCK, SYMBOL_FLAG_ANCHOR): New SYMBOL_REF flags. (SYMBOL_REF_IN_BLOCK_P, SYMBOL_REF_ANCHOR_P): New predicates. (SYMBOL_FLAG_MACH_DEP_SHIFT): Bump by 2. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): New accessors. * output.h (output_section_symbols): Declare. (object_block): Name structure. (place_section_symbol, get_section_anchor, default_asm_output_anchor) (default_use_anchors_for_symbol_p): Declare. * Makefile.in (RTL_BASE_H): Add vec.h. (explow.o): Depend on output.h. * config/rs6000/rs6000.c (TARGET_MIN_ANCHOR_OFFSET): Override default. (TARGET_MAX_ANCHOR_OFFSET): Likewise. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise. (rs6000_use_blocks_for_constant_p): New function. From-SVN: r111254
2006-02-18 23:06:53 +01:00
/* Set if this symbol is a section anchor. SYMBOL_REF_ANCHOR_P implies
SYMBOL_REF_HAS_BLOCK_INFO_P. */
re PR target/9703 ([arm] Accessing data through constant pool more times could be solved in less instructions) * cselib.c (cselib_init): Change RTX_SIZE to RTX_CODE_SIZE. * emit-rtl.c (copy_rtx_if_shared_1): Use shallow_copy_rtx. (copy_insn_1): Likewise. Don't copy each field individually. Reindent. * read-rtl.c (apply_macro_to_rtx): Use RTX_CODE_SIZE instead of RTX_SIZE. * reload1.c (eliminate_regs): Use shallow_copy_rtx. * rtl.c (rtx_size): Rename variable to... (rtx_code_size): ...this. (rtx_size): New function. (rtx_alloc_stat): Use RTX_CODE_SIZE instead of RTX_SIZE. (copy_rtx): Use shallow_copy_rtx. Don't copy each field individually. Reindent. (shallow_copy_rtx_stat): Use rtx_size instead of RTX_SIZE. * rtl.h (rtx_code_size): New variable. (rtx_size): Change from a variable to a function. (RTX_SIZE): Rename to... (RTX_CODE_SIZE): ...this. PR target/9703 PR tree-optimization/17106 * doc/tm.texi (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Document. (Anchored Addresses): New section. * doc/invoke.texi (-fsection-anchors): Document. * doc/rtl.texi (SYMBOL_REF_IN_BLOCK_P, SYMBOL_FLAG_IN_BLOCK): Likewise. (SYMBOL_REF_ANCHOR_P, SYMBOL_FLAG_ANCHOR): Likewise. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): Likewise. * hooks.c (hook_bool_mode_rtx_false): New function. * hooks.h (hook_bool_mode_rtx_false): Declare. * gengtype.c (create_optional_field): New function. (adjust_field_rtx_def): Add the "block_sym" field for SYMBOL_REFs when SYMBOL_REF_IN_BLOCK_P is true. * target.h (output_anchor, use_blocks_for_constant_p): New hooks. (min_anchor_offset, max_anchor_offset): Likewise. (use_anchors_for_symbol_p): New hook. * toplev.c (compile_file): Call output_object_blocks. (target_supports_section_anchors_p): New function. (process_options): Check that -fsection-anchors is only used on targets that support it and when -funit-at-a-time is in effect. * tree-ssa-loop-ivopts.c (prepare_decl_rtl): Only create DECL_RTL if the decl doesn't have one. * dwarf2out.c: Remove instantiations of VEC(rtx,gc). * expr.c (emit_move_multi_word, emit_move_insn): Pass the result of force_const_mem through use_anchored_address. (expand_expr_constant): New function. (expand_expr_addr_expr_1): Call it. Use the same modifier when calling expand_expr for INDIRECT_REF. (expand_expr_real_1): Pass DECL_RTL through use_anchored_address for all modifiers except EXPAND_INITIALIZER. Use expand_expr_constant. * expr.h (use_anchored_address): Declare. * loop-unroll.c: Don't declare rtx vectors here. * explow.c: Include output.h. (validize_mem): Call use_anchored_address. (use_anchored_address): New function. * common.opt (-fsection-anchors): New switch. * varasm.c (object_block_htab, anchor_labelno): New variables. (hash_section, object_block_entry_eq, object_block_entry_hash) (use_object_blocks_p, get_block_for_section, create_block_symbol) (use_blocks_for_decl_p, change_symbol_section): New functions. (get_variable_section): New function, split out from assemble_variable. (make_decl_rtl): Create a block symbol if use_object_blocks_p and use_blocks_for_decl_p say so. Use change_symbol_section if the symbol has already been created. (assemble_variable_contents): New function, split out from... (assemble_variable): ...here. Don't output any code for block symbols; just pass them to place_block_symbol. Use get_variable_section and assemble_variable_contents. (get_constant_alignment, get_constant_section, get_constant_size): New functions, split from output_constant_def_contents. (build_constant_desc): Create a block symbol if use_object_blocks_p says so. Or into SYMBOL_REF_FLAGS. (assemble_constant_contents): New function, split from... (output_constant_def_contents): ...here. Don't output any code for block symbols; just pass them to place_section_symbol. Use get_constant_section and get_constant_alignment. (force_const_mem): Create a block symbol if use_object_blocks_p and use_blocks_for_constant_p say so. Or into SYMBOL_REF_FLAGS. (output_constant_pool_1): Add an explicit alignment argument. Don't switch sections here. (output_constant_pool): Adjust call to output_constant_pool_1. Switch sections here instead. Don't output anything for block symbols; just pass them to place_block_symbol. (init_varasm_once): Initialize object_block_htab. (default_encode_section_info): Keep the old SYMBOL_FLAG_IN_BLOCK. (default_asm_output_anchor, default_use_aenchors_for_symbol_p) (place_block_symbol, get_section_anchor, output_object_block) (output_object_block_htab, output_object_blocks): New functions. * target-def.h (TARGET_ASM_OUTPUT_ANCHOR): New macro. (TARGET_ASM_OUT): Include it. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): New macro. (TARGET_MIN_ANCHOR_OFFSET, TARGET_MAX_ANCHOR_OFFSET): New macros. (TARGET_USE_ANCHORS_FOR_SYMBOL_P): New macro. (TARGET_INITIALIZER): Include them. * rtl.c (rtl_check_failed_block_symbol): New function. * rtl.h: Include vec.h. Declare heap and gc rtx vectors. (block_symbol, object_block): New structures. (rtx_def): Add a block_symbol field to the union. (BLOCK_SYMBOL_CHECK): New macro. (rtl_check_failed_block_symbol): Declare. (SYMBOL_FLAG_IN_BLOCK, SYMBOL_FLAG_ANCHOR): New SYMBOL_REF flags. (SYMBOL_REF_IN_BLOCK_P, SYMBOL_REF_ANCHOR_P): New predicates. (SYMBOL_FLAG_MACH_DEP_SHIFT): Bump by 2. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): New accessors. * output.h (output_section_symbols): Declare. (object_block): Name structure. (place_section_symbol, get_section_anchor, default_asm_output_anchor) (default_use_anchors_for_symbol_p): Declare. * Makefile.in (RTL_BASE_H): Add vec.h. (explow.o): Depend on output.h. * config/rs6000/rs6000.c (TARGET_MIN_ANCHOR_OFFSET): Override default. (TARGET_MAX_ANCHOR_OFFSET): Likewise. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise. (rs6000_use_blocks_for_constant_p): New function. From-SVN: r111254
2006-02-18 23:06:53 +01:00
#define SYMBOL_FLAG_ANCHOR (1 << 8)
#define SYMBOL_REF_ANCHOR_P(RTX) \
((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_ANCHOR) != 0)
/* Subsequent bits are available for the target to use. */
re PR target/9703 ([arm] Accessing data through constant pool more times could be solved in less instructions) * cselib.c (cselib_init): Change RTX_SIZE to RTX_CODE_SIZE. * emit-rtl.c (copy_rtx_if_shared_1): Use shallow_copy_rtx. (copy_insn_1): Likewise. Don't copy each field individually. Reindent. * read-rtl.c (apply_macro_to_rtx): Use RTX_CODE_SIZE instead of RTX_SIZE. * reload1.c (eliminate_regs): Use shallow_copy_rtx. * rtl.c (rtx_size): Rename variable to... (rtx_code_size): ...this. (rtx_size): New function. (rtx_alloc_stat): Use RTX_CODE_SIZE instead of RTX_SIZE. (copy_rtx): Use shallow_copy_rtx. Don't copy each field individually. Reindent. (shallow_copy_rtx_stat): Use rtx_size instead of RTX_SIZE. * rtl.h (rtx_code_size): New variable. (rtx_size): Change from a variable to a function. (RTX_SIZE): Rename to... (RTX_CODE_SIZE): ...this. PR target/9703 PR tree-optimization/17106 * doc/tm.texi (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Document. (Anchored Addresses): New section. * doc/invoke.texi (-fsection-anchors): Document. * doc/rtl.texi (SYMBOL_REF_IN_BLOCK_P, SYMBOL_FLAG_IN_BLOCK): Likewise. (SYMBOL_REF_ANCHOR_P, SYMBOL_FLAG_ANCHOR): Likewise. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): Likewise. * hooks.c (hook_bool_mode_rtx_false): New function. * hooks.h (hook_bool_mode_rtx_false): Declare. * gengtype.c (create_optional_field): New function. (adjust_field_rtx_def): Add the "block_sym" field for SYMBOL_REFs when SYMBOL_REF_IN_BLOCK_P is true. * target.h (output_anchor, use_blocks_for_constant_p): New hooks. (min_anchor_offset, max_anchor_offset): Likewise. (use_anchors_for_symbol_p): New hook. * toplev.c (compile_file): Call output_object_blocks. (target_supports_section_anchors_p): New function. (process_options): Check that -fsection-anchors is only used on targets that support it and when -funit-at-a-time is in effect. * tree-ssa-loop-ivopts.c (prepare_decl_rtl): Only create DECL_RTL if the decl doesn't have one. * dwarf2out.c: Remove instantiations of VEC(rtx,gc). * expr.c (emit_move_multi_word, emit_move_insn): Pass the result of force_const_mem through use_anchored_address. (expand_expr_constant): New function. (expand_expr_addr_expr_1): Call it. Use the same modifier when calling expand_expr for INDIRECT_REF. (expand_expr_real_1): Pass DECL_RTL through use_anchored_address for all modifiers except EXPAND_INITIALIZER. Use expand_expr_constant. * expr.h (use_anchored_address): Declare. * loop-unroll.c: Don't declare rtx vectors here. * explow.c: Include output.h. (validize_mem): Call use_anchored_address. (use_anchored_address): New function. * common.opt (-fsection-anchors): New switch. * varasm.c (object_block_htab, anchor_labelno): New variables. (hash_section, object_block_entry_eq, object_block_entry_hash) (use_object_blocks_p, get_block_for_section, create_block_symbol) (use_blocks_for_decl_p, change_symbol_section): New functions. (get_variable_section): New function, split out from assemble_variable. (make_decl_rtl): Create a block symbol if use_object_blocks_p and use_blocks_for_decl_p say so. Use change_symbol_section if the symbol has already been created. (assemble_variable_contents): New function, split out from... (assemble_variable): ...here. Don't output any code for block symbols; just pass them to place_block_symbol. Use get_variable_section and assemble_variable_contents. (get_constant_alignment, get_constant_section, get_constant_size): New functions, split from output_constant_def_contents. (build_constant_desc): Create a block symbol if use_object_blocks_p says so. Or into SYMBOL_REF_FLAGS. (assemble_constant_contents): New function, split from... (output_constant_def_contents): ...here. Don't output any code for block symbols; just pass them to place_section_symbol. Use get_constant_section and get_constant_alignment. (force_const_mem): Create a block symbol if use_object_blocks_p and use_blocks_for_constant_p say so. Or into SYMBOL_REF_FLAGS. (output_constant_pool_1): Add an explicit alignment argument. Don't switch sections here. (output_constant_pool): Adjust call to output_constant_pool_1. Switch sections here instead. Don't output anything for block symbols; just pass them to place_block_symbol. (init_varasm_once): Initialize object_block_htab. (default_encode_section_info): Keep the old SYMBOL_FLAG_IN_BLOCK. (default_asm_output_anchor, default_use_aenchors_for_symbol_p) (place_block_symbol, get_section_anchor, output_object_block) (output_object_block_htab, output_object_blocks): New functions. * target-def.h (TARGET_ASM_OUTPUT_ANCHOR): New macro. (TARGET_ASM_OUT): Include it. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): New macro. (TARGET_MIN_ANCHOR_OFFSET, TARGET_MAX_ANCHOR_OFFSET): New macros. (TARGET_USE_ANCHORS_FOR_SYMBOL_P): New macro. (TARGET_INITIALIZER): Include them. * rtl.c (rtl_check_failed_block_symbol): New function. * rtl.h: Include vec.h. Declare heap and gc rtx vectors. (block_symbol, object_block): New structures. (rtx_def): Add a block_symbol field to the union. (BLOCK_SYMBOL_CHECK): New macro. (rtl_check_failed_block_symbol): Declare. (SYMBOL_FLAG_IN_BLOCK, SYMBOL_FLAG_ANCHOR): New SYMBOL_REF flags. (SYMBOL_REF_IN_BLOCK_P, SYMBOL_REF_ANCHOR_P): New predicates. (SYMBOL_FLAG_MACH_DEP_SHIFT): Bump by 2. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): New accessors. * output.h (output_section_symbols): Declare. (object_block): Name structure. (place_section_symbol, get_section_anchor, default_asm_output_anchor) (default_use_anchors_for_symbol_p): Declare. * Makefile.in (RTL_BASE_H): Add vec.h. (explow.o): Depend on output.h. * config/rs6000/rs6000.c (TARGET_MIN_ANCHOR_OFFSET): Override default. (TARGET_MAX_ANCHOR_OFFSET): Likewise. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise. (rs6000_use_blocks_for_constant_p): New function. From-SVN: r111254
2006-02-18 23:06:53 +01:00
#define SYMBOL_FLAG_MACH_DEP_SHIFT 9
#define SYMBOL_FLAG_MACH_DEP (1 << SYMBOL_FLAG_MACH_DEP_SHIFT)
/* If SYMBOL_REF_HAS_BLOCK_INFO_P (RTX), this is the object_block
structure to which the symbol belongs, or NULL if it has not been
assigned a block. */
re PR target/9703 ([arm] Accessing data through constant pool more times could be solved in less instructions) * cselib.c (cselib_init): Change RTX_SIZE to RTX_CODE_SIZE. * emit-rtl.c (copy_rtx_if_shared_1): Use shallow_copy_rtx. (copy_insn_1): Likewise. Don't copy each field individually. Reindent. * read-rtl.c (apply_macro_to_rtx): Use RTX_CODE_SIZE instead of RTX_SIZE. * reload1.c (eliminate_regs): Use shallow_copy_rtx. * rtl.c (rtx_size): Rename variable to... (rtx_code_size): ...this. (rtx_size): New function. (rtx_alloc_stat): Use RTX_CODE_SIZE instead of RTX_SIZE. (copy_rtx): Use shallow_copy_rtx. Don't copy each field individually. Reindent. (shallow_copy_rtx_stat): Use rtx_size instead of RTX_SIZE. * rtl.h (rtx_code_size): New variable. (rtx_size): Change from a variable to a function. (RTX_SIZE): Rename to... (RTX_CODE_SIZE): ...this. PR target/9703 PR tree-optimization/17106 * doc/tm.texi (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Document. (Anchored Addresses): New section. * doc/invoke.texi (-fsection-anchors): Document. * doc/rtl.texi (SYMBOL_REF_IN_BLOCK_P, SYMBOL_FLAG_IN_BLOCK): Likewise. (SYMBOL_REF_ANCHOR_P, SYMBOL_FLAG_ANCHOR): Likewise. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): Likewise. * hooks.c (hook_bool_mode_rtx_false): New function. * hooks.h (hook_bool_mode_rtx_false): Declare. * gengtype.c (create_optional_field): New function. (adjust_field_rtx_def): Add the "block_sym" field for SYMBOL_REFs when SYMBOL_REF_IN_BLOCK_P is true. * target.h (output_anchor, use_blocks_for_constant_p): New hooks. (min_anchor_offset, max_anchor_offset): Likewise. (use_anchors_for_symbol_p): New hook. * toplev.c (compile_file): Call output_object_blocks. (target_supports_section_anchors_p): New function. (process_options): Check that -fsection-anchors is only used on targets that support it and when -funit-at-a-time is in effect. * tree-ssa-loop-ivopts.c (prepare_decl_rtl): Only create DECL_RTL if the decl doesn't have one. * dwarf2out.c: Remove instantiations of VEC(rtx,gc). * expr.c (emit_move_multi_word, emit_move_insn): Pass the result of force_const_mem through use_anchored_address. (expand_expr_constant): New function. (expand_expr_addr_expr_1): Call it. Use the same modifier when calling expand_expr for INDIRECT_REF. (expand_expr_real_1): Pass DECL_RTL through use_anchored_address for all modifiers except EXPAND_INITIALIZER. Use expand_expr_constant. * expr.h (use_anchored_address): Declare. * loop-unroll.c: Don't declare rtx vectors here. * explow.c: Include output.h. (validize_mem): Call use_anchored_address. (use_anchored_address): New function. * common.opt (-fsection-anchors): New switch. * varasm.c (object_block_htab, anchor_labelno): New variables. (hash_section, object_block_entry_eq, object_block_entry_hash) (use_object_blocks_p, get_block_for_section, create_block_symbol) (use_blocks_for_decl_p, change_symbol_section): New functions. (get_variable_section): New function, split out from assemble_variable. (make_decl_rtl): Create a block symbol if use_object_blocks_p and use_blocks_for_decl_p say so. Use change_symbol_section if the symbol has already been created. (assemble_variable_contents): New function, split out from... (assemble_variable): ...here. Don't output any code for block symbols; just pass them to place_block_symbol. Use get_variable_section and assemble_variable_contents. (get_constant_alignment, get_constant_section, get_constant_size): New functions, split from output_constant_def_contents. (build_constant_desc): Create a block symbol if use_object_blocks_p says so. Or into SYMBOL_REF_FLAGS. (assemble_constant_contents): New function, split from... (output_constant_def_contents): ...here. Don't output any code for block symbols; just pass them to place_section_symbol. Use get_constant_section and get_constant_alignment. (force_const_mem): Create a block symbol if use_object_blocks_p and use_blocks_for_constant_p say so. Or into SYMBOL_REF_FLAGS. (output_constant_pool_1): Add an explicit alignment argument. Don't switch sections here. (output_constant_pool): Adjust call to output_constant_pool_1. Switch sections here instead. Don't output anything for block symbols; just pass them to place_block_symbol. (init_varasm_once): Initialize object_block_htab. (default_encode_section_info): Keep the old SYMBOL_FLAG_IN_BLOCK. (default_asm_output_anchor, default_use_aenchors_for_symbol_p) (place_block_symbol, get_section_anchor, output_object_block) (output_object_block_htab, output_object_blocks): New functions. * target-def.h (TARGET_ASM_OUTPUT_ANCHOR): New macro. (TARGET_ASM_OUT): Include it. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): New macro. (TARGET_MIN_ANCHOR_OFFSET, TARGET_MAX_ANCHOR_OFFSET): New macros. (TARGET_USE_ANCHORS_FOR_SYMBOL_P): New macro. (TARGET_INITIALIZER): Include them. * rtl.c (rtl_check_failed_block_symbol): New function. * rtl.h: Include vec.h. Declare heap and gc rtx vectors. (block_symbol, object_block): New structures. (rtx_def): Add a block_symbol field to the union. (BLOCK_SYMBOL_CHECK): New macro. (rtl_check_failed_block_symbol): Declare. (SYMBOL_FLAG_IN_BLOCK, SYMBOL_FLAG_ANCHOR): New SYMBOL_REF flags. (SYMBOL_REF_IN_BLOCK_P, SYMBOL_REF_ANCHOR_P): New predicates. (SYMBOL_FLAG_MACH_DEP_SHIFT): Bump by 2. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): New accessors. * output.h (output_section_symbols): Declare. (object_block): Name structure. (place_section_symbol, get_section_anchor, default_asm_output_anchor) (default_use_anchors_for_symbol_p): Declare. * Makefile.in (RTL_BASE_H): Add vec.h. (explow.o): Depend on output.h. * config/rs6000/rs6000.c (TARGET_MIN_ANCHOR_OFFSET): Override default. (TARGET_MAX_ANCHOR_OFFSET): Likewise. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise. (rs6000_use_blocks_for_constant_p): New function. From-SVN: r111254
2006-02-18 23:06:53 +01:00
#define SYMBOL_REF_BLOCK(RTX) (BLOCK_SYMBOL_CHECK (RTX)->block)
/* If SYMBOL_REF_HAS_BLOCK_INFO_P (RTX), this is the offset of RTX from
the first object in SYMBOL_REF_BLOCK (RTX). The value is negative if
RTX has not yet been assigned to a block, or it has not been given an
offset within that block. */
re PR target/9703 ([arm] Accessing data through constant pool more times could be solved in less instructions) * cselib.c (cselib_init): Change RTX_SIZE to RTX_CODE_SIZE. * emit-rtl.c (copy_rtx_if_shared_1): Use shallow_copy_rtx. (copy_insn_1): Likewise. Don't copy each field individually. Reindent. * read-rtl.c (apply_macro_to_rtx): Use RTX_CODE_SIZE instead of RTX_SIZE. * reload1.c (eliminate_regs): Use shallow_copy_rtx. * rtl.c (rtx_size): Rename variable to... (rtx_code_size): ...this. (rtx_size): New function. (rtx_alloc_stat): Use RTX_CODE_SIZE instead of RTX_SIZE. (copy_rtx): Use shallow_copy_rtx. Don't copy each field individually. Reindent. (shallow_copy_rtx_stat): Use rtx_size instead of RTX_SIZE. * rtl.h (rtx_code_size): New variable. (rtx_size): Change from a variable to a function. (RTX_SIZE): Rename to... (RTX_CODE_SIZE): ...this. PR target/9703 PR tree-optimization/17106 * doc/tm.texi (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Document. (Anchored Addresses): New section. * doc/invoke.texi (-fsection-anchors): Document. * doc/rtl.texi (SYMBOL_REF_IN_BLOCK_P, SYMBOL_FLAG_IN_BLOCK): Likewise. (SYMBOL_REF_ANCHOR_P, SYMBOL_FLAG_ANCHOR): Likewise. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): Likewise. * hooks.c (hook_bool_mode_rtx_false): New function. * hooks.h (hook_bool_mode_rtx_false): Declare. * gengtype.c (create_optional_field): New function. (adjust_field_rtx_def): Add the "block_sym" field for SYMBOL_REFs when SYMBOL_REF_IN_BLOCK_P is true. * target.h (output_anchor, use_blocks_for_constant_p): New hooks. (min_anchor_offset, max_anchor_offset): Likewise. (use_anchors_for_symbol_p): New hook. * toplev.c (compile_file): Call output_object_blocks. (target_supports_section_anchors_p): New function. (process_options): Check that -fsection-anchors is only used on targets that support it and when -funit-at-a-time is in effect. * tree-ssa-loop-ivopts.c (prepare_decl_rtl): Only create DECL_RTL if the decl doesn't have one. * dwarf2out.c: Remove instantiations of VEC(rtx,gc). * expr.c (emit_move_multi_word, emit_move_insn): Pass the result of force_const_mem through use_anchored_address. (expand_expr_constant): New function. (expand_expr_addr_expr_1): Call it. Use the same modifier when calling expand_expr for INDIRECT_REF. (expand_expr_real_1): Pass DECL_RTL through use_anchored_address for all modifiers except EXPAND_INITIALIZER. Use expand_expr_constant. * expr.h (use_anchored_address): Declare. * loop-unroll.c: Don't declare rtx vectors here. * explow.c: Include output.h. (validize_mem): Call use_anchored_address. (use_anchored_address): New function. * common.opt (-fsection-anchors): New switch. * varasm.c (object_block_htab, anchor_labelno): New variables. (hash_section, object_block_entry_eq, object_block_entry_hash) (use_object_blocks_p, get_block_for_section, create_block_symbol) (use_blocks_for_decl_p, change_symbol_section): New functions. (get_variable_section): New function, split out from assemble_variable. (make_decl_rtl): Create a block symbol if use_object_blocks_p and use_blocks_for_decl_p say so. Use change_symbol_section if the symbol has already been created. (assemble_variable_contents): New function, split out from... (assemble_variable): ...here. Don't output any code for block symbols; just pass them to place_block_symbol. Use get_variable_section and assemble_variable_contents. (get_constant_alignment, get_constant_section, get_constant_size): New functions, split from output_constant_def_contents. (build_constant_desc): Create a block symbol if use_object_blocks_p says so. Or into SYMBOL_REF_FLAGS. (assemble_constant_contents): New function, split from... (output_constant_def_contents): ...here. Don't output any code for block symbols; just pass them to place_section_symbol. Use get_constant_section and get_constant_alignment. (force_const_mem): Create a block symbol if use_object_blocks_p and use_blocks_for_constant_p say so. Or into SYMBOL_REF_FLAGS. (output_constant_pool_1): Add an explicit alignment argument. Don't switch sections here. (output_constant_pool): Adjust call to output_constant_pool_1. Switch sections here instead. Don't output anything for block symbols; just pass them to place_block_symbol. (init_varasm_once): Initialize object_block_htab. (default_encode_section_info): Keep the old SYMBOL_FLAG_IN_BLOCK. (default_asm_output_anchor, default_use_aenchors_for_symbol_p) (place_block_symbol, get_section_anchor, output_object_block) (output_object_block_htab, output_object_blocks): New functions. * target-def.h (TARGET_ASM_OUTPUT_ANCHOR): New macro. (TARGET_ASM_OUT): Include it. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): New macro. (TARGET_MIN_ANCHOR_OFFSET, TARGET_MAX_ANCHOR_OFFSET): New macros. (TARGET_USE_ANCHORS_FOR_SYMBOL_P): New macro. (TARGET_INITIALIZER): Include them. * rtl.c (rtl_check_failed_block_symbol): New function. * rtl.h: Include vec.h. Declare heap and gc rtx vectors. (block_symbol, object_block): New structures. (rtx_def): Add a block_symbol field to the union. (BLOCK_SYMBOL_CHECK): New macro. (rtl_check_failed_block_symbol): Declare. (SYMBOL_FLAG_IN_BLOCK, SYMBOL_FLAG_ANCHOR): New SYMBOL_REF flags. (SYMBOL_REF_IN_BLOCK_P, SYMBOL_REF_ANCHOR_P): New predicates. (SYMBOL_FLAG_MACH_DEP_SHIFT): Bump by 2. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): New accessors. * output.h (output_section_symbols): Declare. (object_block): Name structure. (place_section_symbol, get_section_anchor, default_asm_output_anchor) (default_use_anchors_for_symbol_p): Declare. * Makefile.in (RTL_BASE_H): Add vec.h. (explow.o): Depend on output.h. * config/rs6000/rs6000.c (TARGET_MIN_ANCHOR_OFFSET): Override default. (TARGET_MAX_ANCHOR_OFFSET): Likewise. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise. (rs6000_use_blocks_for_constant_p): New function. From-SVN: r111254
2006-02-18 23:06:53 +01:00
#define SYMBOL_REF_BLOCK_OFFSET(RTX) (BLOCK_SYMBOL_CHECK (RTX)->offset)
/* Indicate whether the machine has any sort of auto increment addressing.
If not, we can avoid checking for REG_INC notes. */
#if (defined (HAVE_PRE_INCREMENT) || defined (HAVE_PRE_DECREMENT) \
|| defined (HAVE_POST_INCREMENT) || defined (HAVE_POST_DECREMENT) \
|| defined (HAVE_PRE_MODIFY_DISP) || defined (HAVE_PRE_MODIFY_DISP) \
|| defined (HAVE_PRE_MODIFY_REG) || defined (HAVE_POST_MODIFY_REG))
#define AUTO_INC_DEC
#endif
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. */
#ifdef AUTO_INC_DEC
rtl.h: Update copyright date. * rtl.h: Update copyright date. (RTL_CHECK1): Wrap long line. (RTL_CHECK2): Likewise. (RTL_CHECKC1): Wrap long line and whitespace. (RTL_CHECKC2): Likewise. (XWINT): Whitespace. (XINT): Likewise. (XSTR): Likewise. (XEXP): Likewise. (XVEC): Likewise. (XMODE): Likewise. (XBITMAP): Likewise. (XTREE): Likewise. (XBBDEF): Likewise. (XTMPL): Likewise. (X0WINT): Likewise. (X0INT):Likewise. (X0UINT): Likewise. (X0STR): Likewise. (X0EXP): Likewise. (X0VEC): Likewise. (X0MODE): Likewise. (X0BITMAP): Likewise. (X0TREE): Likewise. (X0BBDEF): Likewise. (X0ADVFLAGS): Likewise. (X0CSELIB): Likewise. (X0MEMATTR): Likewise. (XCWINT): Likewise. (XCINT): Likewise. (XCUINT): Likewise. (XCSTR): Likewise. (XCEXP): Likewise. (XCVEC): Likewise. (XCMODE): Likewise. (XCBITMAP): Likewise. (XCTREE): Likewise. (XCBBDEF): Likewise. (XCADVFLAGS): Likewise. (XCCSELIB): Likewise. (XC2EXP): Likewise. (INSN_UID): Likewise. (PREV_INSN): Likewise. (PATTERN): Likewise. (INSN_CODE): Likewise. (PUT_REG_NOTE_KIND): Likewise. (CODE_LABEL_NUMBER): Likewise. (NOTE_SOURCE_FILE): Likewise. (NOTE_BLOCK): Likewise. (NOTE_EH_HANDLER): Likewise. (NOTE_RANGE_INFO): Likewise. (NOTE_LIVE_INFO): Likewise. (NOTE_BASIC_BLOCK): Likewise. (NOTE_EXPECTED_VALUE): Likewise. (NOTE_LINE_NUMBER): Likewise. (LABEL_NAME): Likewise. (LABEL_NUSES): Likewise. (LABEL_ALTERNATE_NAME): Likewise. (ADDRESSOF_DECL): Likewise. (JUMP_LABEL): Likewise. (LABEL_NEXTREF): Likewise. (REGNO): Likewise. (ORIGINAL_REGNO: Likewise. (HARD_REGISTER_NUM_P): Add parenthesis. (SUBREG_REG): Whitespace. (SUBREG_BYTE): Likewise. (ASM_OPERANDS_TEMPLATE): Remove parenthesis. (ASM_OPERANDS_OUTPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_OUTPUT_IDX): Likewise. (ASM_OPERANDS_INPUT_VEC): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_VEC): Likewise. (ASM_OPERANDS_INPUT): Likewise. (ASM_OPERANDS_INPUT_LENGTH): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_INPUT_MODE): Likewise. (ASM_OPERANDS_SOURCE_FILE): Likewise. (ASM_OPERANDS_SOURCE_LINE): Likewise. (MEM_SET_IN_STRUCT_P): Minor reformat. (TRAP_CONDITION): Whitespace. (TRAP_CODE): Likewise. (COND_EXEC_TEST): Likewise. (COND_EXEC_CODE): Likewise. (FIND_REG_INC_NOTE): Uppercase macro args and add parenthesis. (PHI_NODE_P): Add parenthesis. (plus_constant): Whitespace and add paraenthese. From-SVN: r48497
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
rtl.h: Update copyright date. * rtl.h: Update copyright date. (RTL_CHECK1): Wrap long line. (RTL_CHECK2): Likewise. (RTL_CHECKC1): Wrap long line and whitespace. (RTL_CHECKC2): Likewise. (XWINT): Whitespace. (XINT): Likewise. (XSTR): Likewise. (XEXP): Likewise. (XVEC): Likewise. (XMODE): Likewise. (XBITMAP): Likewise. (XTREE): Likewise. (XBBDEF): Likewise. (XTMPL): Likewise. (X0WINT): Likewise. (X0INT):Likewise. (X0UINT): Likewise. (X0STR): Likewise. (X0EXP): Likewise. (X0VEC): Likewise. (X0MODE): Likewise. (X0BITMAP): Likewise. (X0TREE): Likewise. (X0BBDEF): Likewise. (X0ADVFLAGS): Likewise. (X0CSELIB): Likewise. (X0MEMATTR): Likewise. (XCWINT): Likewise. (XCINT): Likewise. (XCUINT): Likewise. (XCSTR): Likewise. (XCEXP): Likewise. (XCVEC): Likewise. (XCMODE): Likewise. (XCBITMAP): Likewise. (XCTREE): Likewise. (XCBBDEF): Likewise. (XCADVFLAGS): Likewise. (XCCSELIB): Likewise. (XC2EXP): Likewise. (INSN_UID): Likewise. (PREV_INSN): Likewise. (PATTERN): Likewise. (INSN_CODE): Likewise. (PUT_REG_NOTE_KIND): Likewise. (CODE_LABEL_NUMBER): Likewise. (NOTE_SOURCE_FILE): Likewise. (NOTE_BLOCK): Likewise. (NOTE_EH_HANDLER): Likewise. (NOTE_RANGE_INFO): Likewise. (NOTE_LIVE_INFO): Likewise. (NOTE_BASIC_BLOCK): Likewise. (NOTE_EXPECTED_VALUE): Likewise. (NOTE_LINE_NUMBER): Likewise. (LABEL_NAME): Likewise. (LABEL_NUSES): Likewise. (LABEL_ALTERNATE_NAME): Likewise. (ADDRESSOF_DECL): Likewise. (JUMP_LABEL): Likewise. (LABEL_NEXTREF): Likewise. (REGNO): Likewise. (ORIGINAL_REGNO: Likewise. (HARD_REGISTER_NUM_P): Add parenthesis. (SUBREG_REG): Whitespace. (SUBREG_BYTE): Likewise. (ASM_OPERANDS_TEMPLATE): Remove parenthesis. (ASM_OPERANDS_OUTPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_OUTPUT_IDX): Likewise. (ASM_OPERANDS_INPUT_VEC): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_VEC): Likewise. (ASM_OPERANDS_INPUT): Likewise. (ASM_OPERANDS_INPUT_LENGTH): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): Likewise. (ASM_OPERANDS_INPUT_CONSTRAINT): Likewise. (ASM_OPERANDS_INPUT_MODE): Likewise. (ASM_OPERANDS_SOURCE_FILE): Likewise. (ASM_OPERANDS_SOURCE_LINE): Likewise. (MEM_SET_IN_STRUCT_P): Minor reformat. (TRAP_CONDITION): Whitespace. (TRAP_CODE): Likewise. (COND_EXEC_TEST): Likewise. (COND_EXEC_CODE): Likewise. (FIND_REG_INC_NOTE): Uppercase macro args and add parenthesis. (PHI_NODE_P): Add parenthesis. (plus_constant): Whitespace and add paraenthese. From-SVN: r48497
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
#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
cse.c (canon_hash): Handle PRE_MODIFY/POST_MODIFY. * cse.c (canon_hash): Handle PRE_MODIFY/POST_MODIFY. (cse_insn): Likewise. (addr_affects_sp_p): Likewise. * expr.c (move_by_pieces): Likewise. (clear_by_pieces): Likewise. * gcse.c (oprs_unchanged_p): Likewise. * haifa-sched.c (sched_analyze_2): Likewise. * recog.c (offsettable_address_p): Likewise. * regclass.c (record_address_regs): Likewise. * reload.c (find_reusable_reload): Likewise. (push_reload): Likewise. (operands_match_p): Likewise. (decompose): Likewise. (find_reloads_address_1): Likewise. (find_inc_amount): Likewise. * reload1.c (elimination_effects): Likewise. * resource.c (mark_set_resources): Likewise. * flow.c (attempt_auto_inc): New function; mostly broken out of find_auto_inc. (find_auto_inc): Split into two functions and enhanced to generate POST_MODIFY. * rtl.def (PRE_MODIFY, POST_MODIFY): Adjust comment. * rtl.h (count_all_occurrences): Declare. (HAVE_{PRE,POST}_MODIFY_{DISP,REG}): Provide default of 0 if not defined. * rtlanal.c (count_all_occurrences): New function. * tm.texi (HAVE_POST_MODIFY_DISP, HAVE_PRE_MODIFY_DISP, HAVE_POST_MODIFY_REG, HAVE_PRE_MODIFY_REG): Document. * config/ia64/ia64-protos.h (destination_operand): Declare. * config/ia64/ia64.c (destination_operand): New function. (ia64_print_operand): Handle POST_MODIFY. (rtx_needs_barrier): Likewise. * config/ia64/ia64.h (HAVE_POST_MODIFY_DISP): Define to 1. (HAVE_POST_MODIFY_REG): Define to 1. (MAX_REGS_PER_ADDRESS): Change to 2. (GO_IF_LEGITIMATE_ADDRESS): Accept POST_MODIFY too. (LEGITIMATE_ADDRESS_REG): New helper macro. (LEGITIMATE_ADDRESS_DISP): Likewise. (PREDICATE_CODES): Add entry for destination_operand. * config/ia64/ia64.md (all mov patterns): Use destination_operand predicate for operand 0. From-SVN: r35321
2000-07-28 19:46:18 +02:00
#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
/* Some architectures do not have complete pre/post increment/decrement
instruction sets, or only move some modes efficiently. These macros
allow us to tune autoincrement generation. */
#ifndef USE_LOAD_POST_INCREMENT
#define USE_LOAD_POST_INCREMENT(MODE) HAVE_POST_INCREMENT
#endif
#ifndef USE_LOAD_POST_DECREMENT
#define USE_LOAD_POST_DECREMENT(MODE) HAVE_POST_DECREMENT
#endif
#ifndef USE_LOAD_PRE_INCREMENT
#define USE_LOAD_PRE_INCREMENT(MODE) HAVE_PRE_INCREMENT
#endif
#ifndef USE_LOAD_PRE_DECREMENT
#define USE_LOAD_PRE_DECREMENT(MODE) HAVE_PRE_DECREMENT
#endif
#ifndef USE_STORE_POST_INCREMENT
#define USE_STORE_POST_INCREMENT(MODE) HAVE_POST_INCREMENT
#endif
#ifndef USE_STORE_POST_DECREMENT
#define USE_STORE_POST_DECREMENT(MODE) HAVE_POST_DECREMENT
#endif
#ifndef USE_STORE_PRE_INCREMENT
#define USE_STORE_PRE_INCREMENT(MODE) HAVE_PRE_INCREMENT
#endif
#ifndef USE_STORE_PRE_DECREMENT
#define USE_STORE_PRE_DECREMENT(MODE) HAVE_PRE_DECREMENT
#endif
1991-12-06 22:00:31 +01:00
/* Nonzero when we are generating CONCATs. */
extern int generating_concat_p;
/* Nonzero when we are expanding trees to RTL. */
extern int currently_expanding_to_rtl;
1991-12-06 22:00:31 +01:00
/* Generally useful functions. */
/* In expmed.c */
extern int ceil_log2 (unsigned HOST_WIDE_INT);
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 */
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 (rtx, HOST_WIDE_INT);
/* In emit-rtl.c */
extern rtx gen_blockage (void);
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);
extern int mem_expr_equal_p (tree, tree);
/* In rtl.c */
ggc-common.c (ggc_alloc_cleared_stat, [...]): Rename from ...; make statistics transparent. * ggc-common.c (ggc_alloc_cleared_stat, ggc_realloc_stat): Rename from ...; make statistics transparent. (ggc_alloc_cleared, ggc_realloc_stat): ... these. (loc_descriptor): New structure. (hash_descriptor, eq_descriptor, loc_descriptor, cmp_statistics, add_statistics): New static function. (ggc_record_overhead, dump_statistics): New global function. * ggc-none.c (ggc_alloc_types_stat, ggc_alloc_stat, ggc_alloc_zone_stat, ggc_alloc_cleared_stat, ggc_realloc_stat, ggc_alloc_typed_stat): Rename from ...; accept locations (ggc_alloc_types, ggc_alloc, ggc_alloc_zone, ggc_alloc_cleared, ggc_realloc, ggc_alloc_typed): ... this one. from ...; accept locations * ggc-page.c (ggc_alloc_typed_stat, ggc_alloc_zone_stat, ggc_alloc_stat): Rename from ... ; pass locations * ggc-page.c (ggc_alloc_typed, ggc_alloc_zone, ggc_alloc): ... this one. (ggc_alloc_stat): Record overehead. * ggc.h (ggc_alloc_types, ggc_alloc, ggc_alloc_zone, ggc_alloc_cleared, ggc_realloc, ggc_alloc_typed): Turn to macros (ggc_alloc_types_stat, ggc_alloc_stat, ggc_alloc_zone_stat, ggc_alloc_cleared_stat, ggc_realloc_stat, ggc_alloc_typed_stat): Declare. (dump_ggc_loc_satistics, ggc_record_overehead): Declare. * langhooks.h (lhd_make_node): Declare. (LANG_HOOKS_MAKE_TYPE): Default to new function, * langhooks.c (lhd_make_node): New. * rtl.c (rtx_alloc_stat, swallow_copy_rtx_stat): Rename from ... ; pass locations. (rtx_alloc, swallow_copy_rtx): ... this one. * rtl.h (rtx_alloc, swallow_copy_rtx): Turn to macros. * rtl.c (rtx_alloc_stat, swallow_copy_rtx_stat): Declare. * toplpev.c (finalize): Dump stats. * tree.c (make_node_stat, copy_node_stat, make_tree_vec_stat, build_tree_list_stat, tree_cons_stat, build?_stat, build_decl_stat): Rename from ... ; pass locators. (make_node, copy_node, make_tree_vec, build_tree_list, tree_cons, build?, build_decl): Declare. * tree.h (make_node_stat, copy_node_stat, make_tree_vec_stat, build_tree_list_stat, tree_cons_stat, build?_stat, build_decl_stat): Declare. (make_node, copy_node, make_tree_vec, build_tree_list, tree_cons, build?, build_decl): New macros. * Makefile.in (RTL_H, TREE_H): Add statistics.h dependency. * statistics.h: New file. From-SVN: r78826
2004-03-03 12:25:51 +01:00
extern rtx rtx_alloc_stat (RTX_CODE MEM_STAT_DECL);
#define rtx_alloc(c) rtx_alloc_stat (c MEM_STAT_INFO)
extern rtvec rtvec_alloc (int);
extern bool shared_const_p (rtx);
extern rtx copy_rtx (rtx);
extern void dump_rtx_statistics (void);
/* In emit-rtl.c */
extern rtx copy_rtx_if_shared (rtx);
/* In rtl.c */
re PR target/9703 ([arm] Accessing data through constant pool more times could be solved in less instructions) * cselib.c (cselib_init): Change RTX_SIZE to RTX_CODE_SIZE. * emit-rtl.c (copy_rtx_if_shared_1): Use shallow_copy_rtx. (copy_insn_1): Likewise. Don't copy each field individually. Reindent. * read-rtl.c (apply_macro_to_rtx): Use RTX_CODE_SIZE instead of RTX_SIZE. * reload1.c (eliminate_regs): Use shallow_copy_rtx. * rtl.c (rtx_size): Rename variable to... (rtx_code_size): ...this. (rtx_size): New function. (rtx_alloc_stat): Use RTX_CODE_SIZE instead of RTX_SIZE. (copy_rtx): Use shallow_copy_rtx. Don't copy each field individually. Reindent. (shallow_copy_rtx_stat): Use rtx_size instead of RTX_SIZE. * rtl.h (rtx_code_size): New variable. (rtx_size): Change from a variable to a function. (RTX_SIZE): Rename to... (RTX_CODE_SIZE): ...this. PR target/9703 PR tree-optimization/17106 * doc/tm.texi (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Document. (Anchored Addresses): New section. * doc/invoke.texi (-fsection-anchors): Document. * doc/rtl.texi (SYMBOL_REF_IN_BLOCK_P, SYMBOL_FLAG_IN_BLOCK): Likewise. (SYMBOL_REF_ANCHOR_P, SYMBOL_FLAG_ANCHOR): Likewise. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): Likewise. * hooks.c (hook_bool_mode_rtx_false): New function. * hooks.h (hook_bool_mode_rtx_false): Declare. * gengtype.c (create_optional_field): New function. (adjust_field_rtx_def): Add the "block_sym" field for SYMBOL_REFs when SYMBOL_REF_IN_BLOCK_P is true. * target.h (output_anchor, use_blocks_for_constant_p): New hooks. (min_anchor_offset, max_anchor_offset): Likewise. (use_anchors_for_symbol_p): New hook. * toplev.c (compile_file): Call output_object_blocks. (target_supports_section_anchors_p): New function. (process_options): Check that -fsection-anchors is only used on targets that support it and when -funit-at-a-time is in effect. * tree-ssa-loop-ivopts.c (prepare_decl_rtl): Only create DECL_RTL if the decl doesn't have one. * dwarf2out.c: Remove instantiations of VEC(rtx,gc). * expr.c (emit_move_multi_word, emit_move_insn): Pass the result of force_const_mem through use_anchored_address. (expand_expr_constant): New function. (expand_expr_addr_expr_1): Call it. Use the same modifier when calling expand_expr for INDIRECT_REF. (expand_expr_real_1): Pass DECL_RTL through use_anchored_address for all modifiers except EXPAND_INITIALIZER. Use expand_expr_constant. * expr.h (use_anchored_address): Declare. * loop-unroll.c: Don't declare rtx vectors here. * explow.c: Include output.h. (validize_mem): Call use_anchored_address. (use_anchored_address): New function. * common.opt (-fsection-anchors): New switch. * varasm.c (object_block_htab, anchor_labelno): New variables. (hash_section, object_block_entry_eq, object_block_entry_hash) (use_object_blocks_p, get_block_for_section, create_block_symbol) (use_blocks_for_decl_p, change_symbol_section): New functions. (get_variable_section): New function, split out from assemble_variable. (make_decl_rtl): Create a block symbol if use_object_blocks_p and use_blocks_for_decl_p say so. Use change_symbol_section if the symbol has already been created. (assemble_variable_contents): New function, split out from... (assemble_variable): ...here. Don't output any code for block symbols; just pass them to place_block_symbol. Use get_variable_section and assemble_variable_contents. (get_constant_alignment, get_constant_section, get_constant_size): New functions, split from output_constant_def_contents. (build_constant_desc): Create a block symbol if use_object_blocks_p says so. Or into SYMBOL_REF_FLAGS. (assemble_constant_contents): New function, split from... (output_constant_def_contents): ...here. Don't output any code for block symbols; just pass them to place_section_symbol. Use get_constant_section and get_constant_alignment. (force_const_mem): Create a block symbol if use_object_blocks_p and use_blocks_for_constant_p say so. Or into SYMBOL_REF_FLAGS. (output_constant_pool_1): Add an explicit alignment argument. Don't switch sections here. (output_constant_pool): Adjust call to output_constant_pool_1. Switch sections here instead. Don't output anything for block symbols; just pass them to place_block_symbol. (init_varasm_once): Initialize object_block_htab. (default_encode_section_info): Keep the old SYMBOL_FLAG_IN_BLOCK. (default_asm_output_anchor, default_use_aenchors_for_symbol_p) (place_block_symbol, get_section_anchor, output_object_block) (output_object_block_htab, output_object_blocks): New functions. * target-def.h (TARGET_ASM_OUTPUT_ANCHOR): New macro. (TARGET_ASM_OUT): Include it. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): New macro. (TARGET_MIN_ANCHOR_OFFSET, TARGET_MAX_ANCHOR_OFFSET): New macros. (TARGET_USE_ANCHORS_FOR_SYMBOL_P): New macro. (TARGET_INITIALIZER): Include them. * rtl.c (rtl_check_failed_block_symbol): New function. * rtl.h: Include vec.h. Declare heap and gc rtx vectors. (block_symbol, object_block): New structures. (rtx_def): Add a block_symbol field to the union. (BLOCK_SYMBOL_CHECK): New macro. (rtl_check_failed_block_symbol): Declare. (SYMBOL_FLAG_IN_BLOCK, SYMBOL_FLAG_ANCHOR): New SYMBOL_REF flags. (SYMBOL_REF_IN_BLOCK_P, SYMBOL_REF_ANCHOR_P): New predicates. (SYMBOL_FLAG_MACH_DEP_SHIFT): Bump by 2. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): New accessors. * output.h (output_section_symbols): Declare. (object_block): Name structure. (place_section_symbol, get_section_anchor, default_asm_output_anchor) (default_use_anchors_for_symbol_p): Declare. * Makefile.in (RTL_BASE_H): Add vec.h. (explow.o): Depend on output.h. * config/rs6000/rs6000.c (TARGET_MIN_ANCHOR_OFFSET): Override default. (TARGET_MAX_ANCHOR_OFFSET): Likewise. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise. (rs6000_use_blocks_for_constant_p): New function. From-SVN: r111254
2006-02-18 23:06:53 +01:00
extern unsigned int rtx_size (rtx);
ggc-common.c (ggc_alloc_cleared_stat, [...]): Rename from ...; make statistics transparent. * ggc-common.c (ggc_alloc_cleared_stat, ggc_realloc_stat): Rename from ...; make statistics transparent. (ggc_alloc_cleared, ggc_realloc_stat): ... these. (loc_descriptor): New structure. (hash_descriptor, eq_descriptor, loc_descriptor, cmp_statistics, add_statistics): New static function. (ggc_record_overhead, dump_statistics): New global function. * ggc-none.c (ggc_alloc_types_stat, ggc_alloc_stat, ggc_alloc_zone_stat, ggc_alloc_cleared_stat, ggc_realloc_stat, ggc_alloc_typed_stat): Rename from ...; accept locations (ggc_alloc_types, ggc_alloc, ggc_alloc_zone, ggc_alloc_cleared, ggc_realloc, ggc_alloc_typed): ... this one. from ...; accept locations * ggc-page.c (ggc_alloc_typed_stat, ggc_alloc_zone_stat, ggc_alloc_stat): Rename from ... ; pass locations * ggc-page.c (ggc_alloc_typed, ggc_alloc_zone, ggc_alloc): ... this one. (ggc_alloc_stat): Record overehead. * ggc.h (ggc_alloc_types, ggc_alloc, ggc_alloc_zone, ggc_alloc_cleared, ggc_realloc, ggc_alloc_typed): Turn to macros (ggc_alloc_types_stat, ggc_alloc_stat, ggc_alloc_zone_stat, ggc_alloc_cleared_stat, ggc_realloc_stat, ggc_alloc_typed_stat): Declare. (dump_ggc_loc_satistics, ggc_record_overehead): Declare. * langhooks.h (lhd_make_node): Declare. (LANG_HOOKS_MAKE_TYPE): Default to new function, * langhooks.c (lhd_make_node): New. * rtl.c (rtx_alloc_stat, swallow_copy_rtx_stat): Rename from ... ; pass locations. (rtx_alloc, swallow_copy_rtx): ... this one. * rtl.h (rtx_alloc, swallow_copy_rtx): Turn to macros. * rtl.c (rtx_alloc_stat, swallow_copy_rtx_stat): Declare. * toplpev.c (finalize): Dump stats. * tree.c (make_node_stat, copy_node_stat, make_tree_vec_stat, build_tree_list_stat, tree_cons_stat, build?_stat, build_decl_stat): Rename from ... ; pass locators. (make_node, copy_node, make_tree_vec, build_tree_list, tree_cons, build?, build_decl): Declare. * tree.h (make_node_stat, copy_node_stat, make_tree_vec_stat, build_tree_list_stat, tree_cons_stat, build?_stat, build_decl_stat): Declare. (make_node, copy_node, make_tree_vec, build_tree_list, tree_cons, build?, build_decl): New macros. * Makefile.in (RTL_H, TREE_H): Add statistics.h dependency. * statistics.h: New file. From-SVN: r78826
2004-03-03 12:25:51 +01:00
extern rtx shallow_copy_rtx_stat (rtx MEM_STAT_DECL);
#define shallow_copy_rtx(a) shallow_copy_rtx_stat (a MEM_STAT_INFO)
extern int rtx_equal_p (rtx, rtx);
/* In emit-rtl.c */
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_reg_rtx_offset (rtx, enum machine_mode, int);
extern rtx gen_label_rtx (void);
extern rtx gen_lowpart_common (enum machine_mode, rtx);
/* In cse.c */
extern rtx gen_lowpart_if_possible (enum machine_mode, rtx);
/* In emit-rtl.c */
extern rtx gen_highpart (enum machine_mode, rtx);
extern rtx gen_highpart_mode (enum machine_mode, enum machine_mode, rtx);
extern rtx operand_subword (rtx, unsigned int, int, enum machine_mode);
/* In emit-rtl.c */
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 push_to_sequence2 (rtx, rtx);
extern void end_sequence (void);
extern rtx immed_double_const (HOST_WIDE_INT, HOST_WIDE_INT,
enum machine_mode);
/* In loop-iv.c */
extern rtx lowpart_subreg (enum machine_mode, rtx, enum machine_mode);
/* In varasm.c */
extern rtx force_const_mem (enum machine_mode, rtx);
/* In varasm.c */
struct function;
extern rtx get_pool_constant (rtx);
extern rtx get_pool_constant_mark (rtx, bool *);
extern enum machine_mode get_pool_mode (rtx);
extern rtx simplify_subtraction (rtx);
/* In function.c */
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);
/* In emit-rtl.c */
extern rtx emit_insn_before (rtx, rtx);
extern rtx emit_insn_before_noloc (rtx, rtx, struct basic_block_def *);
extern rtx emit_insn_before_setloc (rtx, rtx, int);
extern rtx emit_jump_insn_before (rtx, rtx);
extern rtx emit_jump_insn_before_noloc (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_noloc (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);
gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of NOTE_LINE_NUMBER... * gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. * ddg.c (create_ddg): LIkewise. * final.c (final): Remove hunk moving line numbernotes around since they are no longer present at this stage. (final_scan_insn): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. (output_asm_label): Likewise. * reorg.c (dbr_schedule): Likewise. * haifa-sched.c (unlink_other_notes): Likewise. * mode-switching.c (optimize_mode_switching): Likewise. * graph.c (start_bb): Likewise. * rtl.def (NOTE): Update description. * jump.c (squeeze_notes): Delete. (mark_jump_label): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. * ifcvt.c (dead_or_predicable): Remove call of squeeze_notes. * dwarf2out.c (gen_label_die): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. (dwarf2out_var_location): Likewise. * cfgbuild.c (make_edges): Likewise. (find_basic_blocks_1): Likewise. * function.c (reorder_blocks_1): Likewise. (epilogue_done): Likewise. (reposition_prologue_and_epilogue_notes): Likewise. * print-rtl.c (print_rtx): Likewise; drop code for printing line number notes. (print_rtl): Likewise. (print_rtl_single): Likewise. * gcse.c (insert_insn_start_bb): Likewise. * alias.c (init_alias_analysis): Likewise. * calls.c (fixup_tail_calls): Likewise. * except.c (sjlj_emit_function_enter): Likewise. * emit-rtl.c (add_insn_after): Likeiwse. (emit_label_before): Likewise. (emit_label_after): Likewise. (emit_note_before, emit_note_after, emit_note): Update parameter to be enum insn_note; do not deal with source files. * cfgcleanup.c (merge_blocks_move_predecessor_nojumps): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. (merge_blocks_move_successor_nojumps): Simplify now when we don't have BLOCK notes. (try_optimize_cfg): Likewise. * cfglayout.c (skip_insns_after_block): Likewise. (record_effective_endpoints): Likewise. (duplicate_insn_chain): Likewise. * varasm.c (output_constant_pool_1): Likewise. * sched-deps.c (sched_analyze): Likewise. * rtl.c (NOTE_INSN_MAX_isnt_negative_adjust_NOTE_INSN_BIAS): Exterminate. (note_insn_name): Simplify now when NOTE_INSN_BIAS is gone. * rtl.h (NOTE_SOURCE_LOCATION, NOTE_EXPANDED_LOCATION): Exterminate. (SET_INSN_DELETED): Simplify. (NOTE_LINE_NUMBER): Exterminate. (NOTE_LINE_KIND): New. (NOTE_INSN_BASIC_BLOCK_P): Update. (enum insn_note): Simplify. (GET_NOTE_INSN_NAME) Simplify. (emit_note_before, emit_note_after, emit_note): Update prototype. (squeeze_notes): Remove. * sched-int.h (NOTE_NOT_BB_P): Update. * resource.c (mark_target_live_regs): Update. * sched-rgn.c (debug_dependencies): Update. * sched-vis.c (print_insn): Update. * config/alpha/alpha.c (alpha_handle_trap_shadows): Update. * config/i386/i386.c (ix86_output_function_epilogue): Update. * config/sh/sh.c (sh_adjust_unroll_max): Function dead since gcc 4.0.0. (TARGET_ADJUST_UNROLL_MAX): Likewise. (split_branches): Update. (sh_optimize_target_register_callee_saved): Remove hunk dead since gcc 4.0.0. (sh_adjust_unroll_max): Exterminate. * config/c4x/c4x.c (c4x_reorg): Use SET_INSN_DELETED. * config/m68hc11/m68hc11.c (m68hc11_check_z_replacement): Likewise. (m68hc11_reorg): Likewise. * config/ia64/ia64.c (emit_insn_group_barriers): Update. (emit_predicate_relation_info): Update. (process_for_unwind_directive): Update. * config/rs6000/rs6000.c (rs6000_output_function_epilogue): Update. (output_call): Update. * config/pa/pa.c (output_lbranch): Update. (output_millicode_call): Update. (output_call): Update. (pa_combine_instructions): Update. * config/mips/mips.c (mips16_gp_pseudo_reg): Update. * config/bfin/bfin.c (gen_one_bundle): Update. * cfgrtl.c (can_delete_note_p): Update. (delete_insn): Update. (rtl_merge_blocks): Update. (commit_one_edge_insertion): Update. (rtl_verify_flow_info): Update. * stmt.c (expand_case): Do not call squeeze_notes. From-SVN: r124895
2007-05-21 08:19:50 +02:00
extern rtx emit_note_before (enum insn_note, rtx);
extern rtx emit_insn_after (rtx, rtx);
extern rtx emit_insn_after_noloc (rtx, rtx, struct basic_block_def *);
extern rtx emit_insn_after_setloc (rtx, rtx, int);
extern rtx emit_jump_insn_after (rtx, rtx);
extern rtx emit_jump_insn_after_noloc (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_noloc (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);
gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of NOTE_LINE_NUMBER... * gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. * ddg.c (create_ddg): LIkewise. * final.c (final): Remove hunk moving line numbernotes around since they are no longer present at this stage. (final_scan_insn): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. (output_asm_label): Likewise. * reorg.c (dbr_schedule): Likewise. * haifa-sched.c (unlink_other_notes): Likewise. * mode-switching.c (optimize_mode_switching): Likewise. * graph.c (start_bb): Likewise. * rtl.def (NOTE): Update description. * jump.c (squeeze_notes): Delete. (mark_jump_label): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. * ifcvt.c (dead_or_predicable): Remove call of squeeze_notes. * dwarf2out.c (gen_label_die): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. (dwarf2out_var_location): Likewise. * cfgbuild.c (make_edges): Likewise. (find_basic_blocks_1): Likewise. * function.c (reorder_blocks_1): Likewise. (epilogue_done): Likewise. (reposition_prologue_and_epilogue_notes): Likewise. * print-rtl.c (print_rtx): Likewise; drop code for printing line number notes. (print_rtl): Likewise. (print_rtl_single): Likewise. * gcse.c (insert_insn_start_bb): Likewise. * alias.c (init_alias_analysis): Likewise. * calls.c (fixup_tail_calls): Likewise. * except.c (sjlj_emit_function_enter): Likewise. * emit-rtl.c (add_insn_after): Likeiwse. (emit_label_before): Likewise. (emit_label_after): Likewise. (emit_note_before, emit_note_after, emit_note): Update parameter to be enum insn_note; do not deal with source files. * cfgcleanup.c (merge_blocks_move_predecessor_nojumps): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. (merge_blocks_move_successor_nojumps): Simplify now when we don't have BLOCK notes. (try_optimize_cfg): Likewise. * cfglayout.c (skip_insns_after_block): Likewise. (record_effective_endpoints): Likewise. (duplicate_insn_chain): Likewise. * varasm.c (output_constant_pool_1): Likewise. * sched-deps.c (sched_analyze): Likewise. * rtl.c (NOTE_INSN_MAX_isnt_negative_adjust_NOTE_INSN_BIAS): Exterminate. (note_insn_name): Simplify now when NOTE_INSN_BIAS is gone. * rtl.h (NOTE_SOURCE_LOCATION, NOTE_EXPANDED_LOCATION): Exterminate. (SET_INSN_DELETED): Simplify. (NOTE_LINE_NUMBER): Exterminate. (NOTE_LINE_KIND): New. (NOTE_INSN_BASIC_BLOCK_P): Update. (enum insn_note): Simplify. (GET_NOTE_INSN_NAME) Simplify. (emit_note_before, emit_note_after, emit_note): Update prototype. (squeeze_notes): Remove. * sched-int.h (NOTE_NOT_BB_P): Update. * resource.c (mark_target_live_regs): Update. * sched-rgn.c (debug_dependencies): Update. * sched-vis.c (print_insn): Update. * config/alpha/alpha.c (alpha_handle_trap_shadows): Update. * config/i386/i386.c (ix86_output_function_epilogue): Update. * config/sh/sh.c (sh_adjust_unroll_max): Function dead since gcc 4.0.0. (TARGET_ADJUST_UNROLL_MAX): Likewise. (split_branches): Update. (sh_optimize_target_register_callee_saved): Remove hunk dead since gcc 4.0.0. (sh_adjust_unroll_max): Exterminate. * config/c4x/c4x.c (c4x_reorg): Use SET_INSN_DELETED. * config/m68hc11/m68hc11.c (m68hc11_check_z_replacement): Likewise. (m68hc11_reorg): Likewise. * config/ia64/ia64.c (emit_insn_group_barriers): Update. (emit_predicate_relation_info): Update. (process_for_unwind_directive): Update. * config/rs6000/rs6000.c (rs6000_output_function_epilogue): Update. (output_call): Update. * config/pa/pa.c (output_lbranch): Update. (output_millicode_call): Update. (output_call): Update. (pa_combine_instructions): Update. * config/mips/mips.c (mips16_gp_pseudo_reg): Update. * config/bfin/bfin.c (gen_one_bundle): Update. * cfgrtl.c (can_delete_note_p): Update. (delete_insn): Update. (rtl_merge_blocks): Update. (commit_one_edge_insertion): Update. (rtl_verify_flow_info): Update. * stmt.c (expand_case): Do not call squeeze_notes. From-SVN: r124895
2007-05-21 08:19:50 +02:00
extern rtx emit_note_after (enum insn_note, 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);
gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of NOTE_LINE_NUMBER... * gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. * ddg.c (create_ddg): LIkewise. * final.c (final): Remove hunk moving line numbernotes around since they are no longer present at this stage. (final_scan_insn): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. (output_asm_label): Likewise. * reorg.c (dbr_schedule): Likewise. * haifa-sched.c (unlink_other_notes): Likewise. * mode-switching.c (optimize_mode_switching): Likewise. * graph.c (start_bb): Likewise. * rtl.def (NOTE): Update description. * jump.c (squeeze_notes): Delete. (mark_jump_label): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. * ifcvt.c (dead_or_predicable): Remove call of squeeze_notes. * dwarf2out.c (gen_label_die): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. (dwarf2out_var_location): Likewise. * cfgbuild.c (make_edges): Likewise. (find_basic_blocks_1): Likewise. * function.c (reorder_blocks_1): Likewise. (epilogue_done): Likewise. (reposition_prologue_and_epilogue_notes): Likewise. * print-rtl.c (print_rtx): Likewise; drop code for printing line number notes. (print_rtl): Likewise. (print_rtl_single): Likewise. * gcse.c (insert_insn_start_bb): Likewise. * alias.c (init_alias_analysis): Likewise. * calls.c (fixup_tail_calls): Likewise. * except.c (sjlj_emit_function_enter): Likewise. * emit-rtl.c (add_insn_after): Likeiwse. (emit_label_before): Likewise. (emit_label_after): Likewise. (emit_note_before, emit_note_after, emit_note): Update parameter to be enum insn_note; do not deal with source files. * cfgcleanup.c (merge_blocks_move_predecessor_nojumps): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. (merge_blocks_move_successor_nojumps): Simplify now when we don't have BLOCK notes. (try_optimize_cfg): Likewise. * cfglayout.c (skip_insns_after_block): Likewise. (record_effective_endpoints): Likewise. (duplicate_insn_chain): Likewise. * varasm.c (output_constant_pool_1): Likewise. * sched-deps.c (sched_analyze): Likewise. * rtl.c (NOTE_INSN_MAX_isnt_negative_adjust_NOTE_INSN_BIAS): Exterminate. (note_insn_name): Simplify now when NOTE_INSN_BIAS is gone. * rtl.h (NOTE_SOURCE_LOCATION, NOTE_EXPANDED_LOCATION): Exterminate. (SET_INSN_DELETED): Simplify. (NOTE_LINE_NUMBER): Exterminate. (NOTE_LINE_KIND): New. (NOTE_INSN_BASIC_BLOCK_P): Update. (enum insn_note): Simplify. (GET_NOTE_INSN_NAME) Simplify. (emit_note_before, emit_note_after, emit_note): Update prototype. (squeeze_notes): Remove. * sched-int.h (NOTE_NOT_BB_P): Update. * resource.c (mark_target_live_regs): Update. * sched-rgn.c (debug_dependencies): Update. * sched-vis.c (print_insn): Update. * config/alpha/alpha.c (alpha_handle_trap_shadows): Update. * config/i386/i386.c (ix86_output_function_epilogue): Update. * config/sh/sh.c (sh_adjust_unroll_max): Function dead since gcc 4.0.0. (TARGET_ADJUST_UNROLL_MAX): Likewise. (split_branches): Update. (sh_optimize_target_register_callee_saved): Remove hunk dead since gcc 4.0.0. (sh_adjust_unroll_max): Exterminate. * config/c4x/c4x.c (c4x_reorg): Use SET_INSN_DELETED. * config/m68hc11/m68hc11.c (m68hc11_check_z_replacement): Likewise. (m68hc11_reorg): Likewise. * config/ia64/ia64.c (emit_insn_group_barriers): Update. (emit_predicate_relation_info): Update. (process_for_unwind_directive): Update. * config/rs6000/rs6000.c (rs6000_output_function_epilogue): Update. (output_call): Update. * config/pa/pa.c (output_lbranch): Update. (output_millicode_call): Update. (output_call): Update. (pa_combine_instructions): Update. * config/mips/mips.c (mips16_gp_pseudo_reg): Update. * config/bfin/bfin.c (gen_one_bundle): Update. * cfgrtl.c (can_delete_note_p): Update. (delete_insn): Update. (rtl_merge_blocks): Update. (commit_one_edge_insertion): Update. (rtl_verify_flow_info): Update. * stmt.c (expand_case): Do not call squeeze_notes. From-SVN: r124895
2007-05-21 08:19:50 +02:00
extern rtx emit_note (enum insn_note);
extern rtx emit_note_copy (rtx);
extern rtx make_insn_raw (rtx);
extern rtx make_jump_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 skip_consecutive_labels (rtx);
extern rtx next_cc0_user (rtx);
extern rtx prev_cc0_setter (rtx);
/* In cfglayout.c */
extern int insn_line (rtx);
extern const char * insn_file (rtx);
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;
/* In jump.c */
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);
tree-vrp.c (execute_vrp): Return value. 2006-03-02 Daniel Berlin <dberlin@dberlin.org> * gcc/tree-vrp.c (execute_vrp): Return value. * gcc/regrename.c (rest_of_handle_regrename): Ditto. * gcc/tree-into-ssa.c (rewrite_into_ssa): Ditto. * gcc/tree-complex.c (tree_lower_complex): Ditto. (tree_lower_complex_O0): Ditto. * gcc/tracer.c (rest_of_handle_tracer): Ditto. * gcc/postreload-gcse.c (rest_of_handle_gcse2): Ditto. * gcc/postreload.c (rest_of_handle_postreload): Ditto. * gcc/tree-tailcall.c (execute_tail_recursion): Ditto. (execute_tail_calls): Ditto. * gcc/tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * gcc/tree.h (init_function_for_compilation): Ditto. * gcc/ipa-cp.c (ipcp_driver): Ditto. * gcc/tree-scalar-evolution.c (scev_const_prop): Ditto. * gcc/tree-scalar-evolution.h (scev_const_prop): Ditto. * gcc/final.c (compute_alignments): Ditto. (rest_of_handle_final): Ditto. (rest_of_handle_shorten_branches): Ditto. (rest_of_clean_state): Ditto. * gcc/omp-low.c (execute_expand_omp): Ditto. (execute_lower_omp): Ditto. * gcc/tree-ssa-dse.c (tree_ssa_dse): Ditto. * gcc/ipa-reference.c (static_execute): Ditto. * gcc/tree-ssa-uncprop.c (tree_ssa_uncprop): Ditto. * gcc/reorg.c (rest_of_handle_delay_slots): Ditto. (rest_of_handle_machine_reorg): Ditto. * gcc/cgraphunit.c (rebuild_cgraph_edges): Ditto. * gcc/flow.c (recompute_reg_usage): Ditto. (rest_of_handle_remove_death_notes): Ditto. (rest_of_handle_life): Ditto. (rest_of_handle_flow2): Ditto. * gcc/tree-ssa-copyrename.c (rename_ssa_copies): Ditto. * gcc/tree-ssa-ccp.c (do_ssa_ccp): Ditto. (do_ssa_store_ccp): Ditto. (execute_fold_all_builtins): Ditto. * gcc/mode-switching.c (rest_of_handle_mode_switching): Ditto. * gcc/modulo-sched.c (rest_of_handle_sms): Ditto. * gcc/ipa-pure-const.c (static_execute): Ditto. * gcc/cse.c (rest_of_handle_cse): Ditto. (rest_of_handle_cse2): Ditto. * gcc/web.c (rest_of_handle_web): Ditto. * gcc/tree-stdarg.c (execute_optimize_stdarg): Ditto. * gcc/tree-ssa-math-opts.c (execute_cse_reciprocals): Ditto. * gcc/tree-ssa-dom.c (tree_ssa_dominator_optimize): Ditto. * gcc/tree-nrv.c (tree_nrv): Ditto. (execute_return_slot_opt): Ditto. * gcc/tree-ssa-alias.c (compute_may_aliases): Ditto. (create_structure_vars): Ditto. * gcc/loop-init.c (rtl_loop_init): Ditto. (rtl_loop_done): Ditto. (rtl_move_loop_invariants): Ditto. (rtl_unswitch): Ditto. (rtl_unroll_and_peel_loops): Ditto. (rtl_doloop): Ditto. * gcc/gimple-low.c (lower_function_body): Ditto. (mark_used_blocks): Ditto. * gcc/tree-ssa-sink.c (execute_sink_code): Ditto. * gcc/ipa-inline.c (cgraph_decide_inlining): Ditto. (cgraph_early_inlining): Ditto. * gcc/global.c (rest_of_handle_global_alloc): Ditto. * gcc/jump.c (cleanup_barriers): Ditto. (purge_line_number_notes): Ditto. * gcc/ifcvt.c (rest_of_handle_if_conversion): Ditto. (rest_of_handle_if_after_reload): Ditto. * gcc/tree-ssa-loop.c (tree_ssa_loop_init): Ditto. (tree_ssa_loop_im): Ditto. (tree_ssa_loop_unswitch): Ditto. (tree_vectorize): Ditto. (tree_linear_transform): Ditto. (tree_ssa_loop_ivcanon): Ditto. (tree_ssa_empty_loop): Ditto. (tree_ssa_loop_bounds): Ditto. (tree_complete_unroll): Ditto. (tree_ssa_loop_prefetch): Ditto. (tree_ssa_loop_ivopts): Ditto. (tree_ssa_loop_done): Ditto. * gcc/predict.c (tree_estimate_probability): Ditto. * gcc/recog.c (split_all_insns_noflow): Ditto. (rest_of_handle_peephole2): Ditto. (rest_of_handle_split_all_insns): Ditto. * gcc/tree-eh.c (lower_eh_constructs): Ditto. * gcc/regmove.c (rest_of_handle_regmove): Ditto. (rest_of_handle_stack_adjustments): Ditto. * gcc/local-alloc.c (rest_of_handle_local_alloc): Ditto. * gcc/function.c (instantiate_virtual_regs): Ditto. (init_function_for_compilation): Ditto. (rest_of_handle_check_leaf_regs): Ditto. * gcc/gcse.c (rest_of_handle_jump_bypass): Ditto. (rest_of_handle_gcse): Ditto. * gcc/ipa-type-escape.c (type_escape_execute): Ditto. * gcc/alias.c (rest_of_handle_cfg): Ditto. * gcc/tree-if-conv.c (main_tree_if_conversion): Ditto. * gcc/profile.c (rest_of_handle_branch_prob): Ditto. * gcc/tree-ssa-phiopt.c (tree_ssa_phiopt): Ditto. * gcc/rtl-factoring.c (rest_of_rtl_seqabstr): Ditto. * gcc/bt-load.c (rest_of_handle_branch_target_load_optimize): Ditto * gcc/tree-dfa.c (find_referenced_vars): Ditto. * gcc/except.c (set_nothrow_function_flags): Ditto. (convert_to_eh_region_ranges): Ditto. (rest_of_handle_eh): Ditto. * gcc/emit-rtl.c (unshare_all_rtl): Ditto. (remove_unnecessary_notes): Ditto. * gcc/except.h (set_nothrow_function_flags): Ditto. (convert_to_eh_region_ranges): Ditto. * gcc/cfgexpand.c (tree_expand_cfg): Ditto. * gcc/tree-cfgcleanup.c (merge_phi_nodes): Ditto. * gcc/tree-ssa-pre.c (do_pre): Ditto. (execute_fre): Ditto. * gcc/cfgcleanup.c (rest_of_handle_jump): Ditto. (rest_of_handle_jump2): Ditto. * gcc/tree-sra.c (tree_sra): Ditto. * gcc/tree-mudflap.c (execute_mudflap_function_ops): Ditto. (execute_mudflap_function_decls): Ditto. * gcc/tree-ssa-copy.c (do_copy_prop): Ditto. (do_store_copy_prop): Ditto. * gcc/ipa-prop.h (ipcp_driver): Ditto. * gcc/cfglayout.c (insn_locators_initialize): Ditto. * gcc/tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_vars): Ditto. * gcc/cfglayout.h (insn_locators_initialize): Ditto. * gcc/tree-ssa-dce.c (tree_ssa_dce): Ditto. * gcc/tree-ssa.c (execute_early_warn_uninitialized): Ditto. (execute_late_warn_uninitialized): Ditto. * gcc/rtl.h (cleanup_barriers): Ditto. (split_all_insns_noflow): Ditto. (purge_line_number_notes): Ditto. (unshare_all_rtl): Ditto. (remove_unnecessary_notes): Ditto. (recompute_reg_usage): Ditto. (variable_tracking_main): Ditto. * gcc/integrate.c (emit_initial_value_sets): Ditto. * gcc/integrate.h (emit_initial_value_sets): Ditto. * gcc/tree-optimize.c (execute_free_datastructures): Ditto (execute_free_cfg_annotations): Ditto. (execute_fixup_cfg): Ditto. (execute_cleanup_cfg_pre_ipa): Ditto. (execute_cleanup_cfg_post_optimizing): Ditto. (execute_init_datastructures): Ditto. * gcc/tree-object-size.c (compute_object_sizes): Ditto. * gcc/combine.c (rest_of_handle_combine): Ditto. * gcc/tree-outof-ssa.c (rewrite_out_of_ssa): Ditto. * gcc/bb-reorder.c (duplicate_computed_gotos): Ditto. (rest_of_handle_reorder_blocks): Ditto. (rest_of_handle_partition_blocks): Ditto. * gcc/var-tracking.c (variable_tracking_main): Ditto. * gcc/tree-profile.c (tree_profiling): Ditto. * gcc/tree-vect-generic.c (expand_vector_operations): Ditto. * gcc/reg-stack.c (rest_of_handle_stack_regs): Ditto. * gcc/sched-rgn.c (rest_of_handle_sched): Ditto. (rest_of_handle_sched2): Ditto. * gcc/basic-block.h (free_bb_insn): Ditto. * gcc/tree-ssa-structalias.c (ipa_pta_execute): Ditto. * gcc/tree-cfg.c (execute_build_cfg): Ditto. (remove_useless_stmts): Ditto. (split_critical_edges): Ditto. (execute_warn_function_return): Ditto. (execute_warn_function_noreturn): Ditto. * gcc/tree-ssa-reassoc.c (execute_reassoc): Ditto. * gcc/cfgrtl.c (free_bb_for_insn): Ditto. * gcc/passes.c (execute_one_pass): Run additional todos returned by execute function. * gcc/tree-pass.h (struct tree_opt_pass): Make execute return a value. From-SVN: r111643
2006-03-02 20:00:11 +01:00
extern unsigned int cleanup_barriers (void);
/* In jump.c */
extern rtx delete_related_insns (rtx);
/* In recog.c */
extern rtx *find_constant_term_loc (rtx *);
/* In emit-rtl.c */
extern rtx try_split (rtx, rtx, int);
extern int split_branch_probability;
/* In unknown file */
extern rtx split_insns (rtx, rtx);
/* In simplify-rtx.c */
extern rtx simplify_const_unary_operation (enum rtx_code, enum machine_mode,
rtx, enum machine_mode);
extern rtx simplify_unary_operation (enum rtx_code, enum machine_mode, rtx,
enum machine_mode);
extern rtx simplify_const_binary_operation (enum rtx_code, enum machine_mode,
rtx, rtx);
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_const_relational_operation (enum rtx_code,
enum machine_mode, rtx, rtx);
extern rtx simplify_relational_operation (enum rtx_code, enum machine_mode,
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);
extern bool mode_signbit_p (enum machine_mode, rtx);
/* In regclass.c */
extern enum machine_mode choose_hard_reg_mode (unsigned int, unsigned int,
bool);
/* In emit-rtl.c */
extern rtx set_unique_reg_note (rtx, enum reg_note, rtx);
extern void set_insn_deleted (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
/* Functions in rtlanal.c */
/* 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)
#define single_set_1(I) single_set_2 (I, PATTERN (I))
/* Structure used for passing data to REPLACE_LABEL. */
typedef struct replace_label_data
{
rtx r1;
rtx r2;
bool update_label_nuses;
} replace_label_data;
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 bool offset_within_block_p (rtx, HOST_WIDE_INT);
extern void split_const (rtx, rtx *, rtx *);
extern int reg_mentioned_p (rtx, rtx);
extern int count_occurrences (rtx, rtx, int);
extern int reg_referenced_p (rtx, rtx);
extern int reg_used_between_p (rtx, rtx, rtx);
extern int reg_set_between_p (rtx, rtx, rtx);
extern int commutative_operand_precedence (rtx);
extern int swap_commutative_operands_p (rtx, rtx);
extern int modified_between_p (rtx, rtx, rtx);
extern int no_labels_between_p (rtx, rtx);
extern int modified_in_p (rtx, rtx);
extern int reg_set_p (rtx, rtx);
extern rtx single_set_2 (rtx, rtx);
extern int multiple_sets (rtx);
extern int set_noop_p (rtx);
extern int noop_move_p (rtx);
extern rtx find_last_value (rtx, rtx *, rtx, int);
extern int refers_to_regno_p (unsigned int, unsigned int, rtx, rtx *);
extern int reg_overlap_mentioned_p (rtx, rtx);
extern rtx set_of (rtx, rtx);
extern void note_stores (rtx, void (*) (rtx, rtx, void *), void *);
extern void note_uses (rtx *, void (*) (rtx *, void *), void *);
extern int dead_or_set_p (rtx, rtx);
extern int dead_or_set_regno_p (rtx, unsigned int);
extern rtx find_reg_note (rtx, enum reg_note, rtx);
extern rtx find_regno_note (rtx, enum reg_note, unsigned int);
extern rtx find_reg_equal_equiv_note (rtx);
extern rtx find_constant_src (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 void remove_reg_equal_equiv_notes (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 may_trap_after_code_motion_p (rtx);
extern int may_trap_or_fault_p (rtx);
extern int inequality_comparisons_p (rtx);
extern rtx replace_rtx (rtx, rtx, rtx);
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 loc_mentioned_in_p (rtx *, rtx);
extern rtx find_first_parameter_load (rtx, rtx);
extern bool keep_with_call_p (rtx);
extern bool label_is_jump_target_p (rtx, rtx);
extern int insn_rtx_cost (rtx);
1991-12-06 22:00:31 +01:00
/* Given an insn and condition, return a canonical description of
the test being made. */
extern rtx canonicalize_condition (rtx, rtx, int, rtx *, rtx, int, int);
/* Given a JUMP_INSN, return a canonical description of the test
being made. */
extern rtx get_condition (rtx, rtx *, int, int);
/* lists.c */
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);
sched-int.h (struct haifa_insn_data): New fields: resolved_deps, inter_tick, queue_index. 2006-03-16 Maxim Kuvyrkov <mkuvyrkov@ispras.ru> * sched-int.h (struct haifa_insn_data): New fields: resolved_deps, inter_tick, queue_index. (struct sched_info): Change signature of init_ready_list field. Adjust all initializations. (RESOLVED_DEPS): New access macro. (ready_add): Remove prototype. (try_ready): Add prototype. * sched-rgn.c (init_ready_list): Use try_ready. (schedule_region): Initialize current_sched_info->{sched_max_insns_priority, queue_must_finish_empty}. * sched-ebb.c (new_ready): Remove. Adjust ebb_sched_info. (init_ready_list): Use try_ready. (schedule_ebb): Initialize current_sched_info->sched_max_insns_priority. * lists.c (remove_list_elem): Remove `static'. (remove_free_INSN_LIST_elem): New function. * rtl.h (remove_list_elem, remove_free_INSN_LIST_elem): Add prototypes. * haifa-sched.c (INTER_TICK, QUEUE_INDEX): New macros. (INVALID_TICK, MIN_TICK, QUEUE_SCHEDULED, QUEUE_NOWHERE, QUEUE_READY): New constants. (readyp): New variable. (queue_remove, ready_remove_insn, fix_inter_tick, fix_tick_ready, change_queue_index, resolve_dep): New static functions. (try_ready): New function. Adjust callers in sched-rgn.c and sched-ebb.c to use it instead of ready_add. (clock_var): Move at the begining of file. (rank_for_schedule): Fix typo. (queue_insn): Add assertion. Handle QUEUE_INDEX. (ready_lastpos): Enforce assertion. (ready_add): Make it static. Handle QUEUE_INDEX. Add new argument, update all callers. (ready_remove_first, ready_remove): Handle QUEUE_INDEX. (schedule_insn): Rewrite to use try_ready and resolve_dep. (queue_to_ready): Use free_INSN_LIST_list. (early_queue_to_ready): Fix typo. (schedule_block): Init readyp. Move init_ready_list call after the initialization of clock_var. Fix error in rejecting insn by targetm.sched.dfa_new_cycle. Add call to fix_inter_tick. Remove code that previously corrected INSN_TICKs. Add code for handling QUEUE_INDEX. (set_priorities): Fix typo. (sched_init): Initialize INSN_TICK, INTER_TICK and QUEUE_INDEX. Clarify comment and code that keeps current_sched_info->next_tail non-null. From-SVN: r112127
2006-03-16 06:23:21 +01:00
void remove_free_INSN_LIST_elem (rtx, rtx *);
rtx remove_list_elem (rtx, rtx *);
/* regclass.c */
/* Free up register info memory. */
extern void free_reg_info (void);
/* recog.c */
extern int asm_noperands (rtx);
extern const char *decode_asm_operands (rtx, rtx *, rtx **, const char **,
enum machine_mode *, location_t *);
1991-12-06 22:00:31 +01: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
extern void split_all_insns (void);
tree-vrp.c (execute_vrp): Return value. 2006-03-02 Daniel Berlin <dberlin@dberlin.org> * gcc/tree-vrp.c (execute_vrp): Return value. * gcc/regrename.c (rest_of_handle_regrename): Ditto. * gcc/tree-into-ssa.c (rewrite_into_ssa): Ditto. * gcc/tree-complex.c (tree_lower_complex): Ditto. (tree_lower_complex_O0): Ditto. * gcc/tracer.c (rest_of_handle_tracer): Ditto. * gcc/postreload-gcse.c (rest_of_handle_gcse2): Ditto. * gcc/postreload.c (rest_of_handle_postreload): Ditto. * gcc/tree-tailcall.c (execute_tail_recursion): Ditto. (execute_tail_calls): Ditto. * gcc/tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * gcc/tree.h (init_function_for_compilation): Ditto. * gcc/ipa-cp.c (ipcp_driver): Ditto. * gcc/tree-scalar-evolution.c (scev_const_prop): Ditto. * gcc/tree-scalar-evolution.h (scev_const_prop): Ditto. * gcc/final.c (compute_alignments): Ditto. (rest_of_handle_final): Ditto. (rest_of_handle_shorten_branches): Ditto. (rest_of_clean_state): Ditto. * gcc/omp-low.c (execute_expand_omp): Ditto. (execute_lower_omp): Ditto. * gcc/tree-ssa-dse.c (tree_ssa_dse): Ditto. * gcc/ipa-reference.c (static_execute): Ditto. * gcc/tree-ssa-uncprop.c (tree_ssa_uncprop): Ditto. * gcc/reorg.c (rest_of_handle_delay_slots): Ditto. (rest_of_handle_machine_reorg): Ditto. * gcc/cgraphunit.c (rebuild_cgraph_edges): Ditto. * gcc/flow.c (recompute_reg_usage): Ditto. (rest_of_handle_remove_death_notes): Ditto. (rest_of_handle_life): Ditto. (rest_of_handle_flow2): Ditto. * gcc/tree-ssa-copyrename.c (rename_ssa_copies): Ditto. * gcc/tree-ssa-ccp.c (do_ssa_ccp): Ditto. (do_ssa_store_ccp): Ditto. (execute_fold_all_builtins): Ditto. * gcc/mode-switching.c (rest_of_handle_mode_switching): Ditto. * gcc/modulo-sched.c (rest_of_handle_sms): Ditto. * gcc/ipa-pure-const.c (static_execute): Ditto. * gcc/cse.c (rest_of_handle_cse): Ditto. (rest_of_handle_cse2): Ditto. * gcc/web.c (rest_of_handle_web): Ditto. * gcc/tree-stdarg.c (execute_optimize_stdarg): Ditto. * gcc/tree-ssa-math-opts.c (execute_cse_reciprocals): Ditto. * gcc/tree-ssa-dom.c (tree_ssa_dominator_optimize): Ditto. * gcc/tree-nrv.c (tree_nrv): Ditto. (execute_return_slot_opt): Ditto. * gcc/tree-ssa-alias.c (compute_may_aliases): Ditto. (create_structure_vars): Ditto. * gcc/loop-init.c (rtl_loop_init): Ditto. (rtl_loop_done): Ditto. (rtl_move_loop_invariants): Ditto. (rtl_unswitch): Ditto. (rtl_unroll_and_peel_loops): Ditto. (rtl_doloop): Ditto. * gcc/gimple-low.c (lower_function_body): Ditto. (mark_used_blocks): Ditto. * gcc/tree-ssa-sink.c (execute_sink_code): Ditto. * gcc/ipa-inline.c (cgraph_decide_inlining): Ditto. (cgraph_early_inlining): Ditto. * gcc/global.c (rest_of_handle_global_alloc): Ditto. * gcc/jump.c (cleanup_barriers): Ditto. (purge_line_number_notes): Ditto. * gcc/ifcvt.c (rest_of_handle_if_conversion): Ditto. (rest_of_handle_if_after_reload): Ditto. * gcc/tree-ssa-loop.c (tree_ssa_loop_init): Ditto. (tree_ssa_loop_im): Ditto. (tree_ssa_loop_unswitch): Ditto. (tree_vectorize): Ditto. (tree_linear_transform): Ditto. (tree_ssa_loop_ivcanon): Ditto. (tree_ssa_empty_loop): Ditto. (tree_ssa_loop_bounds): Ditto. (tree_complete_unroll): Ditto. (tree_ssa_loop_prefetch): Ditto. (tree_ssa_loop_ivopts): Ditto. (tree_ssa_loop_done): Ditto. * gcc/predict.c (tree_estimate_probability): Ditto. * gcc/recog.c (split_all_insns_noflow): Ditto. (rest_of_handle_peephole2): Ditto. (rest_of_handle_split_all_insns): Ditto. * gcc/tree-eh.c (lower_eh_constructs): Ditto. * gcc/regmove.c (rest_of_handle_regmove): Ditto. (rest_of_handle_stack_adjustments): Ditto. * gcc/local-alloc.c (rest_of_handle_local_alloc): Ditto. * gcc/function.c (instantiate_virtual_regs): Ditto. (init_function_for_compilation): Ditto. (rest_of_handle_check_leaf_regs): Ditto. * gcc/gcse.c (rest_of_handle_jump_bypass): Ditto. (rest_of_handle_gcse): Ditto. * gcc/ipa-type-escape.c (type_escape_execute): Ditto. * gcc/alias.c (rest_of_handle_cfg): Ditto. * gcc/tree-if-conv.c (main_tree_if_conversion): Ditto. * gcc/profile.c (rest_of_handle_branch_prob): Ditto. * gcc/tree-ssa-phiopt.c (tree_ssa_phiopt): Ditto. * gcc/rtl-factoring.c (rest_of_rtl_seqabstr): Ditto. * gcc/bt-load.c (rest_of_handle_branch_target_load_optimize): Ditto * gcc/tree-dfa.c (find_referenced_vars): Ditto. * gcc/except.c (set_nothrow_function_flags): Ditto. (convert_to_eh_region_ranges): Ditto. (rest_of_handle_eh): Ditto. * gcc/emit-rtl.c (unshare_all_rtl): Ditto. (remove_unnecessary_notes): Ditto. * gcc/except.h (set_nothrow_function_flags): Ditto. (convert_to_eh_region_ranges): Ditto. * gcc/cfgexpand.c (tree_expand_cfg): Ditto. * gcc/tree-cfgcleanup.c (merge_phi_nodes): Ditto. * gcc/tree-ssa-pre.c (do_pre): Ditto. (execute_fre): Ditto. * gcc/cfgcleanup.c (rest_of_handle_jump): Ditto. (rest_of_handle_jump2): Ditto. * gcc/tree-sra.c (tree_sra): Ditto. * gcc/tree-mudflap.c (execute_mudflap_function_ops): Ditto. (execute_mudflap_function_decls): Ditto. * gcc/tree-ssa-copy.c (do_copy_prop): Ditto. (do_store_copy_prop): Ditto. * gcc/ipa-prop.h (ipcp_driver): Ditto. * gcc/cfglayout.c (insn_locators_initialize): Ditto. * gcc/tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_vars): Ditto. * gcc/cfglayout.h (insn_locators_initialize): Ditto. * gcc/tree-ssa-dce.c (tree_ssa_dce): Ditto. * gcc/tree-ssa.c (execute_early_warn_uninitialized): Ditto. (execute_late_warn_uninitialized): Ditto. * gcc/rtl.h (cleanup_barriers): Ditto. (split_all_insns_noflow): Ditto. (purge_line_number_notes): Ditto. (unshare_all_rtl): Ditto. (remove_unnecessary_notes): Ditto. (recompute_reg_usage): Ditto. (variable_tracking_main): Ditto. * gcc/integrate.c (emit_initial_value_sets): Ditto. * gcc/integrate.h (emit_initial_value_sets): Ditto. * gcc/tree-optimize.c (execute_free_datastructures): Ditto (execute_free_cfg_annotations): Ditto. (execute_fixup_cfg): Ditto. (execute_cleanup_cfg_pre_ipa): Ditto. (execute_cleanup_cfg_post_optimizing): Ditto. (execute_init_datastructures): Ditto. * gcc/tree-object-size.c (compute_object_sizes): Ditto. * gcc/combine.c (rest_of_handle_combine): Ditto. * gcc/tree-outof-ssa.c (rewrite_out_of_ssa): Ditto. * gcc/bb-reorder.c (duplicate_computed_gotos): Ditto. (rest_of_handle_reorder_blocks): Ditto. (rest_of_handle_partition_blocks): Ditto. * gcc/var-tracking.c (variable_tracking_main): Ditto. * gcc/tree-profile.c (tree_profiling): Ditto. * gcc/tree-vect-generic.c (expand_vector_operations): Ditto. * gcc/reg-stack.c (rest_of_handle_stack_regs): Ditto. * gcc/sched-rgn.c (rest_of_handle_sched): Ditto. (rest_of_handle_sched2): Ditto. * gcc/basic-block.h (free_bb_insn): Ditto. * gcc/tree-ssa-structalias.c (ipa_pta_execute): Ditto. * gcc/tree-cfg.c (execute_build_cfg): Ditto. (remove_useless_stmts): Ditto. (split_critical_edges): Ditto. (execute_warn_function_return): Ditto. (execute_warn_function_noreturn): Ditto. * gcc/tree-ssa-reassoc.c (execute_reassoc): Ditto. * gcc/cfgrtl.c (free_bb_for_insn): Ditto. * gcc/passes.c (execute_one_pass): Run additional todos returned by execute function. * gcc/tree-pass.h (struct tree_opt_pass): Make execute return a value. From-SVN: r111643
2006-03-02 20:00:11 +01:00
extern unsigned int split_all_insns_noflow (void);
#define MAX_SAVED_CONST_INT 64
extern GTY(()) rtx const_int_rtx[MAX_SAVED_CONST_INT * 2 + 1];
#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])
extern GTY(()) rtx const_true_rtx;
extern GTY(()) rtx const_tiny_rtx[3][(int) MAX_MACHINE_MODE];
/* Returns a constant 0 rtx in mode MODE. Integer modes are treated the
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
/* 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
will be to eliminate FRAME_POINTER_REGNUM into HARD_FRAME_POINTER_REGNUM. */
#ifndef HARD_FRAME_POINTER_REGNUM
#define HARD_FRAME_POINTER_REGNUM FRAME_POINTER_REGNUM
#endif
/* Index labels for global_rtl. */
enum global_rtl_index
{
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. */
extern GTY(()) rtx global_rtl[GR_MAX];
/* Standard pieces of rtx, to be substituted directly into things. */
#define pc_rtx (global_rtl[GR_PC])
#define cc0_rtx (global_rtl[GR_CC0])
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. */
#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])
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;
/* Include the RTL generation functions. */
#ifndef GENERATOR_FILE
#include "genrtl.h"
#undef gen_rtx_ASM_INPUT
#ifdef USE_MAPPED_LOCATION
#define gen_rtx_ASM_INPUT(MODE, ARG0) \
gen_rtx_fmt_si (ASM_INPUT, (MODE), (ARG0), 0)
#define gen_rtx_ASM_INPUT_loc(MODE, ARG0, LOC) \
gen_rtx_fmt_si (ASM_INPUT, (MODE), (ARG0), (LOC))
#else
#define gen_rtx_ASM_INPUT(MODE, ARG0) \
gen_rtx_fmt_ssi (ASM_INPUT, (MODE), (ARG0), "", 0)
#define gen_rtx_ASM_INPUT_loc(MODE, ARG0, LOC) \
gen_rtx_fmt_ssi (ASM_INPUT, (MODE), (ARG0), (LOC).file, (LOC).line)
#undef gen_rtx_ASM_OPERANDS
#define gen_rtx_ASM_OPERANDS(MODE, ARG0, ARG1, ARG2, ARG3, ARG4, LOC) \
gen_rtx_fmt_ssiEEsi (ASM_OPERANDS, (MODE), (ARG0), (ARG1), (ARG2), (ARG3), (ARG4), (LOC).file, (LOC).line)
#endif
#endif
invoke.texi (-fstrict-aliasing): Document. * invoke.texi (-fstrict-aliasing): Document. * rtl.texi (MEM_ALIAS_SET): Document. * flags.h (flag_strict_aliasing): Declare. * toplev.c (flag_strict_aliasing): Define. (f_options): Add -strict-aliasing. (main): Set flag_strict_aliasing if -O2 or higher. * tree.h (tree_type): Add alias_set field. (TYPE_ALIAS_SET): New macro. (TYPE_ALIAS_SET_KNOWN_P): Likewise. (get_alias_set): Declare. * tree.c (lang_get_alias_set): Define. (make_node): Initialize TYPE_ALIAS_SET. (get_alias_set): New function. * print-tree.c (print_node): Dump the alias set for a type. * c-tree.h (c_get_alias_set): Declare. * c-common.c (c_get_alias_set): New function. * c-decl.c (init_decl_processing): Set lang_get_alias_set. * expr.c (protect_from_queue): Propogage alias sets. (expand_assignment): Calculate alias set for new MEMs. (expand_expr): Likewise. * function.c (put_var_into_stack): Likewise. (put_reg_into_stack): Likewise. (gen_mem_addressof): Likewise. (assign_parms): Likewise. * stmt.c (expand_decl): Likewise. * varasm.c (make_decl_rtl): Eliminate redundant clearing of DECL_RTL. Calculate alias set for new MEMs. * rtl.def (REG): Add dummy operand. (MEM): Add extra operand to store the MEM_ALIAS_SET. * rtl.h (MEM_ALIAS_SET): New macro. (gen_rtx_MEM): Declare. * emit-rtl.c (gen_rtx_MEM): New function. * gengenrtl.c (sepcial_rtx): Make MEMs special. * alias.c (CHECK_ALIAS_SETS_FOR_CONSISTENCY): New macro. (DIFFERENT_ALIAS_SETS_P): Likewise. (canon_rtx): Propogate the alias set to the new MEM. (true_dependence): Check the alias sets. (anti_dependence): Likewise. (output_dependence): Likewise. * explow.c (stabilize): Progoate alias sets. * integrate.c (copy_rtx_and_substitute): Likewise. * final.c (alter_subreg): Make sure not to leave MEM_IN_STRUCT_P in an unpredictable state. Propogate alias sets. * reload1.c (reload): Clear MEM_ALIAS_SET for new MEMs about which we have no alias information. From-SVN: r20719
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
add to this list, modify special_rtx in gengenrtl.c as well. */
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);
#define GEN_INT(N) gen_rtx_CONST_INT (VOIDmode, (N))
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. */
#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. */
#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. */
#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). */
#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
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
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. */
#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
alias.c (nonoverlapping_memrefs): Use REGNO_PTR_FRAME_P. * alias.c (nonoverlapping_memrefs): Use REGNO_PTR_FRAME_P. * emit-rtl.c (change_address): Fix typo in default alignment. (adjust_address_1): Use mode of NEW, not MODE, when setting size. * expr.c (highest_pow2_factor, case WITH_RECORD_EXPR): New case. * rtl.h (REGNO_PTR_FRAME_P): New macro. * expr.c (store_field): Pass tree instead of max size; callers changed. Change handling of alignment. Only copy to_rtx if is TARGET. (expand_expr_unaligned): Delete; callers now use expand_expr. (emit_cmp_insn): No longer take ALIGN parm; all callers changed. (expand_assignment): Change handling of alignment. Only copy to_rtx if was original. (get_inner_reference): No longer return alginment; callers changed. (expand_expr, case COMPONENT_REF): Change handling of alignment. (expand_expr, case ADDR_EXPR): Make copy if not sufficiently aligned. (compare_from_rtx): Delete ALIGN parm; all callers changed. (do_compare_rtx_and_jump): Likewise. * expr.h: Reflect above changes. * tree.h: Likewise. * dwarf2out.c (loc_descriptor_from_tree): Remove ALIGN parameter to get_inner_reference. * except.c: Remove ALIGN parameter in call to emit_cmp_and_jump_insns. * explow.c: Likewise. * loop.c: Likewise. * optabs.c: Likewise. (prepare_cmp_insn): Now static; remove ALIGN parm. Callers changed. (emit_cmp_and_jump_insns): Remove ALIGN parm; all callers changed. * fold-const.c: Remove PALIGN in calls to get_inner_reference. * function.c (assign_stack_temp_for_type): No longer static. * optabs.h (emit_cmp_insn): Remove ALIGN parm. (prepare_cmp_insn): Delete declaration. * rtl.h (assign_stack_temp_for_type): Add declaration. * config/d30v/d30v.c: Reflect above changes. * config/i860/i860.c, config/ia64/ia64.c: Likewise. * config/rs6000/rs6000.c, config/sh/sh.c: Likewise. * ada/trans.c, ada/utils2.c: Remove PALIGN parameter to get_inner_reference. From-SVN: r47075
2001-11-16 00:44:58 +01:00
/* Nonzero if REGNUM is a pointer into the stack frame. */
#define REGNO_PTR_FRAME_P(REGNUM) \
alias.c (nonoverlapping_memrefs): Use REGNO_PTR_FRAME_P. * alias.c (nonoverlapping_memrefs): Use REGNO_PTR_FRAME_P. * emit-rtl.c (change_address): Fix typo in default alignment. (adjust_address_1): Use mode of NEW, not MODE, when setting size. * expr.c (highest_pow2_factor, case WITH_RECORD_EXPR): New case. * rtl.h (REGNO_PTR_FRAME_P): New macro. * expr.c (store_field): Pass tree instead of max size; callers changed. Change handling of alignment. Only copy to_rtx if is TARGET. (expand_expr_unaligned): Delete; callers now use expand_expr. (emit_cmp_insn): No longer take ALIGN parm; all callers changed. (expand_assignment): Change handling of alignment. Only copy to_rtx if was original. (get_inner_reference): No longer return alginment; callers changed. (expand_expr, case COMPONENT_REF): Change handling of alignment. (expand_expr, case ADDR_EXPR): Make copy if not sufficiently aligned. (compare_from_rtx): Delete ALIGN parm; all callers changed. (do_compare_rtx_and_jump): Likewise. * expr.h: Reflect above changes. * tree.h: Likewise. * dwarf2out.c (loc_descriptor_from_tree): Remove ALIGN parameter to get_inner_reference. * except.c: Remove ALIGN parameter in call to emit_cmp_and_jump_insns. * explow.c: Likewise. * loop.c: Likewise. * optabs.c: Likewise. (prepare_cmp_insn): Now static; remove ALIGN parm. Callers changed. (emit_cmp_and_jump_insns): Remove ALIGN parm; all callers changed. * fold-const.c: Remove PALIGN in calls to get_inner_reference. * function.c (assign_stack_temp_for_type): No longer static. * optabs.h (emit_cmp_insn): Remove ALIGN parm. (prepare_cmp_insn): Delete declaration. * rtl.h (assign_stack_temp_for_type): Add declaration. * config/d30v/d30v.c: Reflect above changes. * config/i860/i860.c, config/ia64/ia64.c: Likewise. * config/rs6000/rs6000.c, config/sh/sh.c: Likewise. * ada/trans.c, ada/utils2.c: Remove PALIGN parameter to get_inner_reference. From-SVN: r47075
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))
/* REGNUM never really appearing in the INSN stream. */
#define INVALID_REGNUM (~(unsigned int) 0)
extern rtx output_constant_def (tree, int);
extern rtx lookup_constant_def (tree);
1991-12-06 22:00:31 +01:00
/* Nonzero after end of reload pass.
Set to 1 or 0 by reload1.c. */
1991-12-06 22:00:31 +01:00
extern int reload_completed;
bt-load.c: New file. 2003-06-18 Stephen Clarke <stephen.clarke@superh.com> J"orn Rennecke <joern.rennecke@superh.com> * bt-load.c: New file. * Makefile.in (OBJS): Include bt-load.o (bt-load.o): Add dependencies. * flags.h (flag_branch_target_load_optimize): Declare. (flag_branch_target_load_optimize2): Likewise. * hooks.c (hook_reg_class_void_no_regs): New function. (hook_bool_bool_false): Likewise. * hooks.h (hook_reg_class_void_no_regs, hook_bool_bool_false): Declare. * rtl.h (branch_target_load_optimize): Declare. * target-def.h (TARGET_BRANCH_TARGET_REGISTER_CLASS): Define. (TARGET_BRANCH_TARGET_REGISTER_CALLEE_SAVED): Likewise. (TARGET_INITIALIZER): Include these. * target.h (struct gcc_target): Add branch_target_register_class and branch_target_register_callee_saved members. * toplev.c (enum dump_file_index): Add DFI_branch_target_load (dump_file) Add "tars" entry. (flag_branch_target_load_optimize): New variable. (flag_branch_target_load_optimize2): Likewise. (lang_independent_options): Add entries for new options. (rest_of_compilation): Call branch_target_load_optimize. * doc/tm.texi (TARGET_BRANCH_TARGET_REGISTER_CLASS): Document. (TARGET_BRANCH_TARGET_REGISTER_CALLEE_SAVED): Likewise. * doc/invoke.texi: Document -fbranch-target-load-optimize and -fbranch-target-load-optimize2. * rtl.h (epilogue_completed): Declare. * recog.c (epilogue_completed): New variable. * toplev.c (rest_of_compilation): Set it. * flow.c (mark_regs_live_at_end): Use it. * config/ia64/ia64.c (ia64_output_mi_thunk): Set it. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * sh.c (shmedia_space_reserved_for_target_registers): New variable. (sh_target_reg_class): New function. (sh_optimize_target_register_callee_saved): Likwise. (shmedia_target_regs_stack_space): Likewise. (shmedia_reserve_space_for_target_registers_p): Likewise. (shmedia_target_regs_stack_adjust): Likewise. (TARGET_BRANCH_TARGET_REGISTER_CLASS): Override. (TARGET_BRANCH_TARGET_REGISTER_CALLEE_SAVED): Likewise. (calc_live_regs): If flag_branch_target_load_optimize2 and TARGET_SAVE_ALL_TARGET_REGS is enabled, and we have space reserved for target registers, make sure that we save all target registers. (sh_expand_prologue, sh_expand_epilogue): Take target register optimizations into account. Collapse stack adjustments if that is beneficial. (initial_elimination_offset): Reserve space for target registers if necessary. * sh.h (SAVE_ALL_TR_BIT, TARGET_SAVE_ALL_TARGET_REGS): Define. (OPTIMIZATION_OPTIONS): Enable flag_branch_target_load_optimize. Co-Authored-By: J"orn Rennecke <joern.rennecke@superh.com> From-SVN: r68165
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;
re PR rtl-optimization/26855 (ICE in add_deps_for_def with -fmodulo-sched -maltivec) 2006-05-19 Daniel Berlin <dberlin@dberlin.org> Kenneth Zadeck <zadeck@naturalbridge.com> PR rtl-optimization/26855 * df-scan.c (mw_reg_pool, mw_link_pool): New allocation pools for multiword refs. (df_scan_alloc): Added code to properly handle multiword hard registers and add all_blocks parameter. (df_scan_free_internal, df_insn_refs_delete, df_ref_record): Added code to properly handle multiword hard registers. (df_rescan_blocks): Added code to remove deleted blocks from bitmap. (df_ref_create_structure, df_ref_record): Added code to properly handle subregs. (df_ref_record_1): Changed DF_REF_CLOBBER into DF_REF_MUST_CLOBBER and set DF_REF_PARTIAL. (df_defs_record): Changed DF_REF_CLOBBER into DF_REF_MUST_CLOBBER. (df_uses_record): Added DF_REF_PARTIAL for subreg. (df_scan_add_problem): Added flags parameter. (df_ref_create_structure): Changed switching structure. (df_bb_refs_record): Fixed case where duplicate artificial refs were created. Changed location of flags. (df_record_entry_block_defs): Added code to make stack pointer live in entry block. Refined cases where frame pointer is needed. Changed location of flags. (df_record_exit_block_uses, df_insn_refs_record): Changed location of flags. (df_set_state): Removed function. (df_grow_reg_info, df_reg_chain_unlink, df_ref_remove, df_insn_create_insn_record, df_insn_refs_delete, df_ref_create_structure): Formatting changes. * df-core.c (df_mvs_dump, df_set_flags, df_clear_flags, df_delete_basic_block): New function. (df_init): Changed location of flags. (df_add_problem): Added flags parameter and the way flags are processed. (df_insn_uid_debug, df_ref_debug, debug_df_defno, debug_df_ref, debug_df_chain): Improved debugging output. (df_insn_debug, df_insn_uid_debug): Added multiword reg support. (df_refs_chain_dump): Removed df parameter. (df_iterative_dataflow): Added consistency check. (df_prune_to_subcfg): Made public. (df_analyze_problem): Added blocks_to_init parameter and made public. (df_ref_record, df_bb_refs_record, df_mark_reg, df_record_exit_block_uses): Whitespace changes. (df_dump): Whitespace changes. * df.h: Some reordering to remove forward references. (df_ref_flags.DF_REF_MW_HARDREG, DF_REF_PARTIAL, DF_REF_MUST_CLOBBER, DF_REF_MAY_CLOBBER): New fields. (df_ref_flags.DF_REF_CLOBBER): Deleted field. (dataflow.flags): New field. (df.flag): Deleted field. (df_alloc_function): Added additional bitmap parameter. (df_dependent_problem_function): New type. (df_problem.changeable_flags): New field. (df_ref_flags.DF_REF_DIES_AFTER_THIS_USE, DF_SCAN_INITIAL, DF_SCAN_GLOBAL, DF_SCAN_POST_ALLOC, df_state): Removed. (df_mw_hardreg): New struct. (DF_INSN_UID_MWS): New macro. (df_refs_chain_dump, df_ref_debug, df_chain_dump): Removed df parameter. (df_add_problem, df_ru_add_problem, df_rd_add_problem, df_lr_add_problem, df_ur_add_problem, df_urec_add_problem, df_ri_add_problem, df_scan_add_problem): Added flags parameter. (df_set_state): Removed function. (df_set_flags, df_clear_flags, df_delete_basic_block) New functions. * df-problems.c (df_chain_dump): Removed df parameter. (df_ru_alloc, df_rd_alloc, df_lr_alloc, df_ur_alloc, df_urec_alloc, df_chain_alloc, df_ri_alloc): Added all blocks parameter. (df_ru_alloc, df_rd_alloc): Now resets all blocks. (df_rd_bb_local_compute_process_def, df_ur_bb_local_compute, df_chain_create_bb, df_create_unused_note, df_ri_bb_compute): Split DF_REF_CLOBBER into DF_REF_MAY_CLOBBER and DF_REF_MUST_CLOBBER cases. (df_ru_bb_local_compute_process_def, df_rd_bb_local_compute_process_def, df_lr_bb_local_compute, df_lr_bb_local_compute, df_ur_bb_local_compute, df_chain_create_bb): Made subreg aware. (df_ru_bb_local_compute, df_rd_bb_local_compute, df_lr_bb_local_compute, df_lr_bb_local_compute, df_chain_create_bb): Cleanup to use proper macros. (df_ur_local_finalize, df_urec_local_finalize): Removed unnecessary code to fixup bitvectors. (df_ri_alloc): Cleared lifetime. (df_ignore_stack_reg, df_kill_notes, df_set_notes_for_mw, df_create_unused_note): New function. (df_ri_bb_compute, df_ri_compute): Added code to create/update REG_DEAD and REG_UNUSED notes as well as register information. (df_ru_dump, df_rd_dump, df_lr_dump, df_ur_dump, df_urec_dump, df_chains_dump): Fixed crash if problem was never run. (df_ru_add_problem, df_rd_add_problem, df_lr_add_problem, df_ur_add_problem, df_urec_add_problem, df_chain_add_problem, df_ri_add_problem): Processes flags in uniform manner. (df_ru_alloc, df_ru_local_compute, df_ru_confluence_n, df_ru_free, df_ru_dump, df_rd_local_compute, df_rd_confluence_n, df_rd_free, df_rd_dump, df_urec_free_bb_info): Formatting changes. (df_ru_free_bb_info, df_ru_bb_local_compute, df_ru_dump, df_rd_free_bb_info, df_rd_bb_local_compute_process_def, df_rd_bb_local_compute, df_rd_dump, df_lr_free_bb_info, df_lr_bb_local_compute, df_lr_local_compute, df_ur_free_bb_info, df_ur_dump, df_urec_free_bb_info, df_urec_dump, df_chain_create_bb, df_ri_bb_compute): Whitespace changes. * modulo-sched.c (sms_schedule): Added flag parameter to calls. * see.c (see_initialize_data): Ditto. * final.c (rest_of_clean_state) Added regstack_completed. * rtl.h (regstack_completed): Ditto. * reg-stack.c (regstack_completed): Ditto. From-SVN: r113915
2006-05-19 23:18:23 +02:00
#ifdef STACK_REGS
/* Nonzero after end of regstack pass.
Set to 1 or 0 by reg-stack.c. */
extern int regstack_completed;
#endif
1991-12-06 22:00:31 +01:00
/* 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;
/* Set to nonzero before life analysis to indicate that it is unsafe to
generate any new pseudo registers. */
extern int no_new_pseudos;
/* Translates rtx code to tree code, for those codes needed by
REAL_ARITHMETIC. The function returns an int because the caller may not
know what `enum tree_code' means. */
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
/* In cse.c */
extern int delete_trivially_dead_insns (rtx, int);
tree-vrp.c (execute_vrp): Do not pass dump argument to. * tree-vrp.c (execute_vrp): Do not pass dump argument to. loop_optimizer_init and loop_optimizer_finalize * tree-ssa-sink.c (execute_sink_code): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init, tree_ssa_loop_done): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Ditto. * sched-ebb.c: Include output.h. (schedule_ebbs): Do not use dump argument. * value-prof.h (struct profile_hooks): Remove profile_dump_file. * loop.c (loop_dump_stream): Removed. (loop_optimize, rest_of_handle_loop_optimize): Do not use dump argument. (scan_loop, move_movables, find_and_verify_loops, mark_loop_jump, emit_prefetch_instructions, loop_bivs_find, loop_bivs_check, final_biv_value, loop_biv_eliminable_p, loop_givs_rescan, loop_iterations, strength_reduce, record_biv, record_giv, final_giv_value, check_final_value, check_ext_dependent_givs, combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems, try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use dump_file instead of loop_dump_stream. * ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call argument dump_file. * reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use dump argument. * flow.c (life_analysis, rest_of_handle_life): Ditto. * haifa-sched.c: Include output.h (schedule_insns, sched_init): Do not use dump argument. * mode-switching.c (optimize_mode_switching): Ditto. * modulo-sched.c (stats_file): Removed. (print_node_sched_params): Do not call argument dump_file. (sms_schedule_by_order, loop_canon_p, sms_schedule, rest_of_handle_sms): Do not use dump argument. Use dump_file instead of stats_file. * cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not use dump argument. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize, rtl_loop_init, rtl_loop_done): Ditto. * global.c (global_alloc, rest_of_handle_global_alloc): Ditto. * predict.c (combine_predictions_for_bb, tree_estimate_probability): Ditto. * recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto. * lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto. * regmove.c (fixup_match_1, fixup_match_2, regmove_optimize, rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto. * emit-rtl.c (renumber_insns): Ditto. * cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr, expand_gimple_basic_block, tree_expand_cfg): Ditto. * regclass.c (regclass): Ditto. * tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts, remove_ssa_form, rewrite_out_of_ssa): Ditto. * reg-stack.c (compensate_edge, compensate_edges, convert_regs_1, convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs): Ditto. * sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto. * local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file to regclass. * gcse.c (gcse_file, debug_stderr): Removed. (gcse_main, bypass_jumps, rest_of_handle_jump_bypass, rest_of_handle_gcse): Do not use dump argument. (cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets, one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb, pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass, compute_code_hoist_vbeinout, compute_code_hoist_data, one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores, compute_store_table, build_store_vectors, insert_insn_start_bb, insert_store, remove_reachable_equiv_notes, replace_store_insn, store_motion): Use dump_file instead of gcse_file. * ipa-type-escape.c (type_escape_execute): Remove debugging comments. * profile.c (profile_dump_file): Removed. (branch_prob): Use dump_file instead of profile_dump_file. * ipa.c (cgraph_remove_unreachable_nodes): Do not call argument dump_file. * tree-ssa-copy.c (dump_copy_of): Ditto. * rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass dump file to life_analysis. * bt-load.c (branch_target_load_optimize): Ditto. * cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to renumber_insns. * rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs, regclass, dbr_schedule): Declaration changed. * sched-int.h (sched_init): Declaration changed. * tree-profile.c (tree_profile_dump_file): Removed. (tree_profile_hooks): Removed profile_dump_file hook. * rtl-profile (rtl_profile_dump_file): Removed. (rtl_profile_hooks): emoved profile_dump_file hook. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * c-gimplify.c (c_genericize): Do not call local variable dump_file. * tree-cfg.c (build_tree_cfg): Ditto. * Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency. * basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm): Declaration changed. * config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to life_analysis and schedule_insns. * config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to life_analysis. * config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to dbr_schedule. * config/mips/mips.c (mips_reorg): Ditto. * config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to schedule_ebbs. From-SVN: r110656
2006-02-06 19:20:47 +01:00
extern int cse_main (rtx, int);
Makefile.in (OBJS-common): Add postreload-gcse.c. * Makefile.in (OBJS-common): Add postreload-gcse.c. Add new postreload-gcse.o. * cse.c (SAFE_HASH): Define as wrapper around safe_hash. (lookup_as_function, insert, rehash_using_reg, use_related_value, equiv_constant): Use SAFE_HASH instead of safe_hash. (exp_equiv_p): Export. Add for_gcse argument when comparing for GCSE. (lookup, lookup_for_remove, merge_equiv_classes, find_best_addr, find_comparison_args, fold_rtx, cse_insn): Update callers. (hash_rtx): New function derived from old canon_hash and bits from gcse.c hash_expr_1. (canon_hash_string): Rename to hash_rtx_string. (canon_hash, safe_hash): Make static inline. Call hash_rtx. * cselib.c (hash_rtx): Rename to cselib_hash_rtx. (cselib_lookup): Update this caller. * gcse.c (modify_mem_list_set, canon_modify_mem_list_set): Make static. (hash_expr): Call hash_rtx. (ldst_entry): Likewise. (expr_equiv_p): Call exp_equiv_p. (struct unoccr, hash_expr_1, hash_string_1, lookup_expr, reg_used_on_edge, reg_set_between_after_reload_p, reg_used_between_after_reload_p, get_avail_load_store_reg, is_jump_table_basic_block, bb_has_well_behaved_predecessors, get_bb_avail_insn, hash_scan_set_after_reload, compute_hash_table_after_reload, eliminate_partially_redundant_loads, gcse_after_reload, get_bb_avail_insn, gcse_after_reload_main): Remove. * postreload-gcse.c: New file, reincarnating most of the above. * rtl.h (exp_equiv_p, hash_rtx): New prototypes. (gcse_after_reload_main): Update prototype. * timevar.def (TV_GCSE_AFTER_RELOAD): New timevar. * passes.c (rest_of_handle_gcse2): Use it. From-SVN: r86206
2004-08-18 22:53:59 +02:00
extern int exp_equiv_p (rtx, rtx, int, bool);
extern unsigned hash_rtx (rtx x, enum machine_mode, int *, int *, bool);
/* In jump.c */
extern int comparison_dominates_p (enum rtx_code, enum rtx_code);
extern int condjump_p (rtx);
extern int any_condjump_p (rtx);
extern int any_uncondjump_p (rtx);
extern rtx pc_set (rtx);
extern rtx condjump_label (rtx);
extern int simplejump_p (rtx);
extern int returnjump_p (rtx);
extern int onlyjump_p (rtx);
extern int only_sets_cc0_p (rtx);
extern int sets_cc0_p (rtx);
extern int invert_jump_1 (rtx, rtx);
extern int invert_jump (rtx, rtx, int);
extern int rtx_renumbered_equal_p (rtx, rtx);
extern int true_regnum (rtx);
extern unsigned int reg_or_subregno (rtx);
extern int redirect_jump_1 (rtx, rtx);
extern void redirect_jump_2 (rtx, rtx, rtx, int, int);
extern int redirect_jump (rtx, rtx, int);
extern void rebuild_jump_labels (rtx);
extern rtx reversed_comparison (rtx, enum machine_mode);
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);
/* In emit-rtl.c. */
extern int max_reg_num (void);
extern int max_label_num (void);
extern int get_first_label_num (void);
extern void maybe_set_first_label_num (rtx);
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);
extern void set_used_flags (rtx);
extern void reorder_insns (rtx, rtx, rtx);
extern void reorder_insns_nobb (rtx, rtx, rtx);
extern int get_max_uid (void);
extern int in_sequence_p (void);
extern void force_next_line_note (void);
extern void init_emit (void);
extern void init_emit_once (int);
extern void push_topmost_sequence (void);
extern void pop_topmost_sequence (void);
extern void set_new_first_and_last_insn (rtx, rtx);
tree-vrp.c (execute_vrp): Return value. 2006-03-02 Daniel Berlin <dberlin@dberlin.org> * gcc/tree-vrp.c (execute_vrp): Return value. * gcc/regrename.c (rest_of_handle_regrename): Ditto. * gcc/tree-into-ssa.c (rewrite_into_ssa): Ditto. * gcc/tree-complex.c (tree_lower_complex): Ditto. (tree_lower_complex_O0): Ditto. * gcc/tracer.c (rest_of_handle_tracer): Ditto. * gcc/postreload-gcse.c (rest_of_handle_gcse2): Ditto. * gcc/postreload.c (rest_of_handle_postreload): Ditto. * gcc/tree-tailcall.c (execute_tail_recursion): Ditto. (execute_tail_calls): Ditto. * gcc/tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * gcc/tree.h (init_function_for_compilation): Ditto. * gcc/ipa-cp.c (ipcp_driver): Ditto. * gcc/tree-scalar-evolution.c (scev_const_prop): Ditto. * gcc/tree-scalar-evolution.h (scev_const_prop): Ditto. * gcc/final.c (compute_alignments): Ditto. (rest_of_handle_final): Ditto. (rest_of_handle_shorten_branches): Ditto. (rest_of_clean_state): Ditto. * gcc/omp-low.c (execute_expand_omp): Ditto. (execute_lower_omp): Ditto. * gcc/tree-ssa-dse.c (tree_ssa_dse): Ditto. * gcc/ipa-reference.c (static_execute): Ditto. * gcc/tree-ssa-uncprop.c (tree_ssa_uncprop): Ditto. * gcc/reorg.c (rest_of_handle_delay_slots): Ditto. (rest_of_handle_machine_reorg): Ditto. * gcc/cgraphunit.c (rebuild_cgraph_edges): Ditto. * gcc/flow.c (recompute_reg_usage): Ditto. (rest_of_handle_remove_death_notes): Ditto. (rest_of_handle_life): Ditto. (rest_of_handle_flow2): Ditto. * gcc/tree-ssa-copyrename.c (rename_ssa_copies): Ditto. * gcc/tree-ssa-ccp.c (do_ssa_ccp): Ditto. (do_ssa_store_ccp): Ditto. (execute_fold_all_builtins): Ditto. * gcc/mode-switching.c (rest_of_handle_mode_switching): Ditto. * gcc/modulo-sched.c (rest_of_handle_sms): Ditto. * gcc/ipa-pure-const.c (static_execute): Ditto. * gcc/cse.c (rest_of_handle_cse): Ditto. (rest_of_handle_cse2): Ditto. * gcc/web.c (rest_of_handle_web): Ditto. * gcc/tree-stdarg.c (execute_optimize_stdarg): Ditto. * gcc/tree-ssa-math-opts.c (execute_cse_reciprocals): Ditto. * gcc/tree-ssa-dom.c (tree_ssa_dominator_optimize): Ditto. * gcc/tree-nrv.c (tree_nrv): Ditto. (execute_return_slot_opt): Ditto. * gcc/tree-ssa-alias.c (compute_may_aliases): Ditto. (create_structure_vars): Ditto. * gcc/loop-init.c (rtl_loop_init): Ditto. (rtl_loop_done): Ditto. (rtl_move_loop_invariants): Ditto. (rtl_unswitch): Ditto. (rtl_unroll_and_peel_loops): Ditto. (rtl_doloop): Ditto. * gcc/gimple-low.c (lower_function_body): Ditto. (mark_used_blocks): Ditto. * gcc/tree-ssa-sink.c (execute_sink_code): Ditto. * gcc/ipa-inline.c (cgraph_decide_inlining): Ditto. (cgraph_early_inlining): Ditto. * gcc/global.c (rest_of_handle_global_alloc): Ditto. * gcc/jump.c (cleanup_barriers): Ditto. (purge_line_number_notes): Ditto. * gcc/ifcvt.c (rest_of_handle_if_conversion): Ditto. (rest_of_handle_if_after_reload): Ditto. * gcc/tree-ssa-loop.c (tree_ssa_loop_init): Ditto. (tree_ssa_loop_im): Ditto. (tree_ssa_loop_unswitch): Ditto. (tree_vectorize): Ditto. (tree_linear_transform): Ditto. (tree_ssa_loop_ivcanon): Ditto. (tree_ssa_empty_loop): Ditto. (tree_ssa_loop_bounds): Ditto. (tree_complete_unroll): Ditto. (tree_ssa_loop_prefetch): Ditto. (tree_ssa_loop_ivopts): Ditto. (tree_ssa_loop_done): Ditto. * gcc/predict.c (tree_estimate_probability): Ditto. * gcc/recog.c (split_all_insns_noflow): Ditto. (rest_of_handle_peephole2): Ditto. (rest_of_handle_split_all_insns): Ditto. * gcc/tree-eh.c (lower_eh_constructs): Ditto. * gcc/regmove.c (rest_of_handle_regmove): Ditto. (rest_of_handle_stack_adjustments): Ditto. * gcc/local-alloc.c (rest_of_handle_local_alloc): Ditto. * gcc/function.c (instantiate_virtual_regs): Ditto. (init_function_for_compilation): Ditto. (rest_of_handle_check_leaf_regs): Ditto. * gcc/gcse.c (rest_of_handle_jump_bypass): Ditto. (rest_of_handle_gcse): Ditto. * gcc/ipa-type-escape.c (type_escape_execute): Ditto. * gcc/alias.c (rest_of_handle_cfg): Ditto. * gcc/tree-if-conv.c (main_tree_if_conversion): Ditto. * gcc/profile.c (rest_of_handle_branch_prob): Ditto. * gcc/tree-ssa-phiopt.c (tree_ssa_phiopt): Ditto. * gcc/rtl-factoring.c (rest_of_rtl_seqabstr): Ditto. * gcc/bt-load.c (rest_of_handle_branch_target_load_optimize): Ditto * gcc/tree-dfa.c (find_referenced_vars): Ditto. * gcc/except.c (set_nothrow_function_flags): Ditto. (convert_to_eh_region_ranges): Ditto. (rest_of_handle_eh): Ditto. * gcc/emit-rtl.c (unshare_all_rtl): Ditto. (remove_unnecessary_notes): Ditto. * gcc/except.h (set_nothrow_function_flags): Ditto. (convert_to_eh_region_ranges): Ditto. * gcc/cfgexpand.c (tree_expand_cfg): Ditto. * gcc/tree-cfgcleanup.c (merge_phi_nodes): Ditto. * gcc/tree-ssa-pre.c (do_pre): Ditto. (execute_fre): Ditto. * gcc/cfgcleanup.c (rest_of_handle_jump): Ditto. (rest_of_handle_jump2): Ditto. * gcc/tree-sra.c (tree_sra): Ditto. * gcc/tree-mudflap.c (execute_mudflap_function_ops): Ditto. (execute_mudflap_function_decls): Ditto. * gcc/tree-ssa-copy.c (do_copy_prop): Ditto. (do_store_copy_prop): Ditto. * gcc/ipa-prop.h (ipcp_driver): Ditto. * gcc/cfglayout.c (insn_locators_initialize): Ditto. * gcc/tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_vars): Ditto. * gcc/cfglayout.h (insn_locators_initialize): Ditto. * gcc/tree-ssa-dce.c (tree_ssa_dce): Ditto. * gcc/tree-ssa.c (execute_early_warn_uninitialized): Ditto. (execute_late_warn_uninitialized): Ditto. * gcc/rtl.h (cleanup_barriers): Ditto. (split_all_insns_noflow): Ditto. (purge_line_number_notes): Ditto. (unshare_all_rtl): Ditto. (remove_unnecessary_notes): Ditto. (recompute_reg_usage): Ditto. (variable_tracking_main): Ditto. * gcc/integrate.c (emit_initial_value_sets): Ditto. * gcc/integrate.h (emit_initial_value_sets): Ditto. * gcc/tree-optimize.c (execute_free_datastructures): Ditto (execute_free_cfg_annotations): Ditto. (execute_fixup_cfg): Ditto. (execute_cleanup_cfg_pre_ipa): Ditto. (execute_cleanup_cfg_post_optimizing): Ditto. (execute_init_datastructures): Ditto. * gcc/tree-object-size.c (compute_object_sizes): Ditto. * gcc/combine.c (rest_of_handle_combine): Ditto. * gcc/tree-outof-ssa.c (rewrite_out_of_ssa): Ditto. * gcc/bb-reorder.c (duplicate_computed_gotos): Ditto. (rest_of_handle_reorder_blocks): Ditto. (rest_of_handle_partition_blocks): Ditto. * gcc/var-tracking.c (variable_tracking_main): Ditto. * gcc/tree-profile.c (tree_profiling): Ditto. * gcc/tree-vect-generic.c (expand_vector_operations): Ditto. * gcc/reg-stack.c (rest_of_handle_stack_regs): Ditto. * gcc/sched-rgn.c (rest_of_handle_sched): Ditto. (rest_of_handle_sched2): Ditto. * gcc/basic-block.h (free_bb_insn): Ditto. * gcc/tree-ssa-structalias.c (ipa_pta_execute): Ditto. * gcc/tree-cfg.c (execute_build_cfg): Ditto. (remove_useless_stmts): Ditto. (split_critical_edges): Ditto. (execute_warn_function_return): Ditto. (execute_warn_function_noreturn): Ditto. * gcc/tree-ssa-reassoc.c (execute_reassoc): Ditto. * gcc/cfgrtl.c (free_bb_for_insn): Ditto. * gcc/passes.c (execute_one_pass): Run additional todos returned by execute function. * gcc/tree-pass.h (struct tree_opt_pass): Make execute return a value. From-SVN: r111643
2006-03-02 20:00:11 +01:00
extern unsigned int unshare_all_rtl (void);
extern void unshare_all_rtl_again (rtx);
extern void unshare_all_rtl_in_chain (rtx);
extern void verify_rtl_sharing (void);
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, struct basic_block_def *);
extern void add_insn_after (rtx, rtx, struct basic_block_def *);
extern void remove_insn (rtx);
extern rtx emit (rtx);
extern rtx delete_insn (rtx);
extern rtx entry_of_function (void);
extern void emit_insn_at_entry (rtx);
extern void delete_insn_chain (rtx, rtx, bool);
extern rtx unlink_insn_chain (rtx, rtx);
extern rtx delete_insn_and_edges (rtx);
extern void delete_insn_chain_and_edges (rtx, rtx);
extern rtx gen_lowpart_SUBREG (enum machine_mode, rtx);
extern rtx gen_const_mem (enum machine_mode, rtx);
extern rtx gen_frame_mem (enum machine_mode, rtx);
extern rtx gen_tmp_stack_mem (enum machine_mode, rtx);
extern bool validate_subreg (enum machine_mode, enum machine_mode,
rtx, unsigned int);
/* In combine.c */
extern unsigned int extended_count (rtx, enum machine_mode, int);
extern rtx remove_death (unsigned int, rtx);
extern void dump_combine_stats (FILE *);
extern void dump_combine_total_stats (FILE *);
/* In cfgcleanup.c */
extern void delete_dead_jumptables (void);
/* In sched-vis.c. */
extern void print_rtl_slim_with_bb (FILE *, rtx, int);
extern void dump_insn_slim (FILE *f, rtx x);
extern void debug_insn_slim (rtx x);
/* In sched-rgn.c. */
tree-vrp.c (execute_vrp): Do not pass dump argument to. * tree-vrp.c (execute_vrp): Do not pass dump argument to. loop_optimizer_init and loop_optimizer_finalize * tree-ssa-sink.c (execute_sink_code): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init, tree_ssa_loop_done): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Ditto. * sched-ebb.c: Include output.h. (schedule_ebbs): Do not use dump argument. * value-prof.h (struct profile_hooks): Remove profile_dump_file. * loop.c (loop_dump_stream): Removed. (loop_optimize, rest_of_handle_loop_optimize): Do not use dump argument. (scan_loop, move_movables, find_and_verify_loops, mark_loop_jump, emit_prefetch_instructions, loop_bivs_find, loop_bivs_check, final_biv_value, loop_biv_eliminable_p, loop_givs_rescan, loop_iterations, strength_reduce, record_biv, record_giv, final_giv_value, check_final_value, check_ext_dependent_givs, combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems, try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use dump_file instead of loop_dump_stream. * ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call argument dump_file. * reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use dump argument. * flow.c (life_analysis, rest_of_handle_life): Ditto. * haifa-sched.c: Include output.h (schedule_insns, sched_init): Do not use dump argument. * mode-switching.c (optimize_mode_switching): Ditto. * modulo-sched.c (stats_file): Removed. (print_node_sched_params): Do not call argument dump_file. (sms_schedule_by_order, loop_canon_p, sms_schedule, rest_of_handle_sms): Do not use dump argument. Use dump_file instead of stats_file. * cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not use dump argument. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize, rtl_loop_init, rtl_loop_done): Ditto. * global.c (global_alloc, rest_of_handle_global_alloc): Ditto. * predict.c (combine_predictions_for_bb, tree_estimate_probability): Ditto. * recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto. * lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto. * regmove.c (fixup_match_1, fixup_match_2, regmove_optimize, rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto. * emit-rtl.c (renumber_insns): Ditto. * cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr, expand_gimple_basic_block, tree_expand_cfg): Ditto. * regclass.c (regclass): Ditto. * tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts, remove_ssa_form, rewrite_out_of_ssa): Ditto. * reg-stack.c (compensate_edge, compensate_edges, convert_regs_1, convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs): Ditto. * sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto. * local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file to regclass. * gcse.c (gcse_file, debug_stderr): Removed. (gcse_main, bypass_jumps, rest_of_handle_jump_bypass, rest_of_handle_gcse): Do not use dump argument. (cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets, one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb, pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass, compute_code_hoist_vbeinout, compute_code_hoist_data, one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores, compute_store_table, build_store_vectors, insert_insn_start_bb, insert_store, remove_reachable_equiv_notes, replace_store_insn, store_motion): Use dump_file instead of gcse_file. * ipa-type-escape.c (type_escape_execute): Remove debugging comments. * profile.c (profile_dump_file): Removed. (branch_prob): Use dump_file instead of profile_dump_file. * ipa.c (cgraph_remove_unreachable_nodes): Do not call argument dump_file. * tree-ssa-copy.c (dump_copy_of): Ditto. * rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass dump file to life_analysis. * bt-load.c (branch_target_load_optimize): Ditto. * cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to renumber_insns. * rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs, regclass, dbr_schedule): Declaration changed. * sched-int.h (sched_init): Declaration changed. * tree-profile.c (tree_profile_dump_file): Removed. (tree_profile_hooks): Removed profile_dump_file hook. * rtl-profile (rtl_profile_dump_file): Removed. (rtl_profile_hooks): emoved profile_dump_file hook. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * c-gimplify.c (c_genericize): Do not call local variable dump_file. * tree-cfg.c (build_tree_cfg): Ditto. * Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency. * basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm): Declaration changed. * config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to life_analysis and schedule_insns. * config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to life_analysis. * config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to dbr_schedule. * config/mips/mips.c (mips_reorg): Ditto. * config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to schedule_ebbs. From-SVN: r110656
2006-02-06 19:20:47 +01:00
extern void schedule_insns (void);
/* In sched-ebb.c. */
tree-vrp.c (execute_vrp): Do not pass dump argument to. * tree-vrp.c (execute_vrp): Do not pass dump argument to. loop_optimizer_init and loop_optimizer_finalize * tree-ssa-sink.c (execute_sink_code): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init, tree_ssa_loop_done): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Ditto. * sched-ebb.c: Include output.h. (schedule_ebbs): Do not use dump argument. * value-prof.h (struct profile_hooks): Remove profile_dump_file. * loop.c (loop_dump_stream): Removed. (loop_optimize, rest_of_handle_loop_optimize): Do not use dump argument. (scan_loop, move_movables, find_and_verify_loops, mark_loop_jump, emit_prefetch_instructions, loop_bivs_find, loop_bivs_check, final_biv_value, loop_biv_eliminable_p, loop_givs_rescan, loop_iterations, strength_reduce, record_biv, record_giv, final_giv_value, check_final_value, check_ext_dependent_givs, combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems, try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use dump_file instead of loop_dump_stream. * ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call argument dump_file. * reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use dump argument. * flow.c (life_analysis, rest_of_handle_life): Ditto. * haifa-sched.c: Include output.h (schedule_insns, sched_init): Do not use dump argument. * mode-switching.c (optimize_mode_switching): Ditto. * modulo-sched.c (stats_file): Removed. (print_node_sched_params): Do not call argument dump_file. (sms_schedule_by_order, loop_canon_p, sms_schedule, rest_of_handle_sms): Do not use dump argument. Use dump_file instead of stats_file. * cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not use dump argument. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize, rtl_loop_init, rtl_loop_done): Ditto. * global.c (global_alloc, rest_of_handle_global_alloc): Ditto. * predict.c (combine_predictions_for_bb, tree_estimate_probability): Ditto. * recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto. * lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto. * regmove.c (fixup_match_1, fixup_match_2, regmove_optimize, rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto. * emit-rtl.c (renumber_insns): Ditto. * cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr, expand_gimple_basic_block, tree_expand_cfg): Ditto. * regclass.c (regclass): Ditto. * tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts, remove_ssa_form, rewrite_out_of_ssa): Ditto. * reg-stack.c (compensate_edge, compensate_edges, convert_regs_1, convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs): Ditto. * sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto. * local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file to regclass. * gcse.c (gcse_file, debug_stderr): Removed. (gcse_main, bypass_jumps, rest_of_handle_jump_bypass, rest_of_handle_gcse): Do not use dump argument. (cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets, one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb, pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass, compute_code_hoist_vbeinout, compute_code_hoist_data, one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores, compute_store_table, build_store_vectors, insert_insn_start_bb, insert_store, remove_reachable_equiv_notes, replace_store_insn, store_motion): Use dump_file instead of gcse_file. * ipa-type-escape.c (type_escape_execute): Remove debugging comments. * profile.c (profile_dump_file): Removed. (branch_prob): Use dump_file instead of profile_dump_file. * ipa.c (cgraph_remove_unreachable_nodes): Do not call argument dump_file. * tree-ssa-copy.c (dump_copy_of): Ditto. * rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass dump file to life_analysis. * bt-load.c (branch_target_load_optimize): Ditto. * cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to renumber_insns. * rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs, regclass, dbr_schedule): Declaration changed. * sched-int.h (sched_init): Declaration changed. * tree-profile.c (tree_profile_dump_file): Removed. (tree_profile_hooks): Removed profile_dump_file hook. * rtl-profile (rtl_profile_dump_file): Removed. (rtl_profile_hooks): emoved profile_dump_file hook. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * c-gimplify.c (c_genericize): Do not call local variable dump_file. * tree-cfg.c (build_tree_cfg): Ditto. * Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency. * basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm): Declaration changed. * config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to life_analysis and schedule_insns. * config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to life_analysis. * config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to dbr_schedule. * config/mips/mips.c (mips_reorg): Ditto. * config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to schedule_ebbs. From-SVN: r110656
2006-02-06 19:20:47 +01:00
extern void schedule_ebbs (void);
/* In haifa-sched.c. */
extern void fix_sched_param (const char *, const char *);
/* In print-rtl.c */
extern const char *print_rtx_head;
extern void debug_rtx (rtx);
extern void debug_rtx_list (rtx, int);
extern void debug_rtx_range (rtx, rtx);
extern rtx debug_rtx_find (rtx, int);
extern void print_mem_expr (FILE *, tree);
extern void print_rtl (FILE *, rtx);
extern void print_simple_rtl (FILE *, rtx);
extern int print_rtl_single (FILE *, rtx);
extern void print_inline_rtx (FILE *, rtx, int);
/* In function.c */
extern void reposition_prologue_and_epilogue_notes (void);
extern int prologue_epilogue_contains (rtx);
extern int sibcall_epilogue_contains (rtx);
extern void mark_temp_addr_taken (rtx);
extern void update_temp_slot_address (rtx, rtx);
/* In stmt.c */
extern void expand_null_return (void);
extern void expand_naked_return (void);
extern void emit_jump (rtx);
/* In expr.c */
extern rtx move_by_pieces (rtx, rtx, unsigned HOST_WIDE_INT,
unsigned int, int);
/* In cfgrtl.c */
extern void print_rtl_with_bb (FILE *, rtx);
/* In cfg.c. */
extern void dump_reg_info (FILE *);
extern void dump_flow_info (FILE *, int);
/* In expmed.c */
extern void init_expmed (void);
extern void expand_inc (rtx, rtx);
extern void expand_dec (rtx, 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
/* In gcse.c */
extern bool can_copy_p (enum machine_mode);
extern rtx fis_get_condition (rtx);
Makefile.in (OBJS-common): Add postreload-gcse.c. * Makefile.in (OBJS-common): Add postreload-gcse.c. Add new postreload-gcse.o. * cse.c (SAFE_HASH): Define as wrapper around safe_hash. (lookup_as_function, insert, rehash_using_reg, use_related_value, equiv_constant): Use SAFE_HASH instead of safe_hash. (exp_equiv_p): Export. Add for_gcse argument when comparing for GCSE. (lookup, lookup_for_remove, merge_equiv_classes, find_best_addr, find_comparison_args, fold_rtx, cse_insn): Update callers. (hash_rtx): New function derived from old canon_hash and bits from gcse.c hash_expr_1. (canon_hash_string): Rename to hash_rtx_string. (canon_hash, safe_hash): Make static inline. Call hash_rtx. * cselib.c (hash_rtx): Rename to cselib_hash_rtx. (cselib_lookup): Update this caller. * gcse.c (modify_mem_list_set, canon_modify_mem_list_set): Make static. (hash_expr): Call hash_rtx. (ldst_entry): Likewise. (expr_equiv_p): Call exp_equiv_p. (struct unoccr, hash_expr_1, hash_string_1, lookup_expr, reg_used_on_edge, reg_set_between_after_reload_p, reg_used_between_after_reload_p, get_avail_load_store_reg, is_jump_table_basic_block, bb_has_well_behaved_predecessors, get_bb_avail_insn, hash_scan_set_after_reload, compute_hash_table_after_reload, eliminate_partially_redundant_loads, gcse_after_reload, get_bb_avail_insn, gcse_after_reload_main): Remove. * postreload-gcse.c: New file, reincarnating most of the above. * rtl.h (exp_equiv_p, hash_rtx): New prototypes. (gcse_after_reload_main): Update prototype. * timevar.def (TV_GCSE_AFTER_RELOAD): New timevar. * passes.c (rest_of_handle_gcse2): Use it. From-SVN: r86206
2004-08-18 22:53:59 +02:00
/* In global.c */
extern void mark_elimination (int, int);
extern void dump_global_regs (FILE *);
#ifdef HARD_CONST
hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. 2002-11-04 Aldy Hernandez <aldyh@redhat.com> * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. * config/rs6000/rs6000.h (CLASS_CANNOT_CHANGE_MODE_P): Remove. (CLASS_CANNOT_CHANGE_MODE): Remove. (CANNOT_CHANGE_MODE_CLASS): New. * config/alpha/alpha.h: Same. * config/ia64/ia64.h: Same. * config/mips/mips.h: Same. * config/s390/s390.h: Same. * config/sh/sh.h: Same. * config/pa/pa64-regs.h: Same. * config/sh/sh-protos.h (sh_cannot_change_mode_class): Add prototype. * config/sh/sh.c (sh_cannot_change_mode_class): New. * config/mips/mips-protos.h (mips_cannot_change_mode_class): Add prototype. * config/mips/mips.c (mips_cannot_change_mode_class): New. * doc/tm.texi (Register Classes): Remove CLASS_CANNOT_CHANGE_MODE and CLASS_CANNOT_CHANGE_MODE_P. Document CANNOT_CHANGE_MODE_CLASS. * reload.c (push_reload): Use CANNOT_CHANGE_MODE_CLASS. (push_reload): Same. * simplify-rtx.c (simplify_subreg): Same. * reload1.c (choose_reload_regs): Same. * recog.c (register_operand): Same. * regrename.c (mode_change_ok): Change to use new CANNOT_CHANGE_MODE_CLASS infrastructure. * regclass.c (cannot_change_mode_set_regs): New. Declare subregs_of_mode. (regclass): Use subregs_of_mode. Remove references to reg_changes_mode. (init_reg_sets_1): Remove class_can_change_mode and reg_changes_mode code. (invalid_mode_change_p): New. (dump_regclass): Use invalid_mode_change_p instead of class_can_change_mode. (regclass): Same. (record_operand_costs): Do not set reg_changes_mode. * local-alloc.c (struct qty): Remove changes_mode field. (alloc_qty): Remove changes_mode initialization. (update_qty_class): Remove set of changes_mode. (find_free_reg): Use subregs_of_mode. * global.c (find_reg): Use subregs_of_mode info. * rtl.h (cannot_change_mode_set_regs): New prototype. (invalid_mode_change_p): Same. (REG_CANNOT_CHANGE_MODE_P): New macro. * flow.c (mark_used_regs): Calculate subregs_of_mode. Remove REG_CHANGES_MODE. (life_analysis): Clear subregs_of_mode. * combine.c (subst): Pass class to CLASS_CANNOT_CHANGE_MODE_P. Remove use of CLASS_CANNOT_CHANGE_MODE. (simplify_set): Same. (gen_lowpart_for_combine): Calculate subregs_of_mode. Remove REG_CHANGES_MODE. * regs.h: Add extern for subregs_of_mode; Include hard-reg-set and basic-block. (REG_CHANGES_MODE): Delete. From-SVN: r58794
2002-11-04 17:58:39 +01:00
/* Yes, this ifdef is silly, but HARD_REG_SET is not always defined. */
extern void retry_global_alloc (int, HARD_REG_SET);
#endif
extern void build_insn_chain (rtx);
/* In regclass.c */
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);
extern void init_reg_modes_once (void);
extern void init_regs (void);
extern void init_fake_stack_mems (void);
extern void init_reg_sets (void);
tree-vrp.c (execute_vrp): Do not pass dump argument to. * tree-vrp.c (execute_vrp): Do not pass dump argument to. loop_optimizer_init and loop_optimizer_finalize * tree-ssa-sink.c (execute_sink_code): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init, tree_ssa_loop_done): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Ditto. * sched-ebb.c: Include output.h. (schedule_ebbs): Do not use dump argument. * value-prof.h (struct profile_hooks): Remove profile_dump_file. * loop.c (loop_dump_stream): Removed. (loop_optimize, rest_of_handle_loop_optimize): Do not use dump argument. (scan_loop, move_movables, find_and_verify_loops, mark_loop_jump, emit_prefetch_instructions, loop_bivs_find, loop_bivs_check, final_biv_value, loop_biv_eliminable_p, loop_givs_rescan, loop_iterations, strength_reduce, record_biv, record_giv, final_giv_value, check_final_value, check_ext_dependent_givs, combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems, try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use dump_file instead of loop_dump_stream. * ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call argument dump_file. * reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use dump argument. * flow.c (life_analysis, rest_of_handle_life): Ditto. * haifa-sched.c: Include output.h (schedule_insns, sched_init): Do not use dump argument. * mode-switching.c (optimize_mode_switching): Ditto. * modulo-sched.c (stats_file): Removed. (print_node_sched_params): Do not call argument dump_file. (sms_schedule_by_order, loop_canon_p, sms_schedule, rest_of_handle_sms): Do not use dump argument. Use dump_file instead of stats_file. * cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not use dump argument. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize, rtl_loop_init, rtl_loop_done): Ditto. * global.c (global_alloc, rest_of_handle_global_alloc): Ditto. * predict.c (combine_predictions_for_bb, tree_estimate_probability): Ditto. * recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto. * lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto. * regmove.c (fixup_match_1, fixup_match_2, regmove_optimize, rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto. * emit-rtl.c (renumber_insns): Ditto. * cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr, expand_gimple_basic_block, tree_expand_cfg): Ditto. * regclass.c (regclass): Ditto. * tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts, remove_ssa_form, rewrite_out_of_ssa): Ditto. * reg-stack.c (compensate_edge, compensate_edges, convert_regs_1, convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs): Ditto. * sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto. * local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file to regclass. * gcse.c (gcse_file, debug_stderr): Removed. (gcse_main, bypass_jumps, rest_of_handle_jump_bypass, rest_of_handle_gcse): Do not use dump argument. (cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets, one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb, pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass, compute_code_hoist_vbeinout, compute_code_hoist_data, one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores, compute_store_table, build_store_vectors, insert_insn_start_bb, insert_store, remove_reachable_equiv_notes, replace_store_insn, store_motion): Use dump_file instead of gcse_file. * ipa-type-escape.c (type_escape_execute): Remove debugging comments. * profile.c (profile_dump_file): Removed. (branch_prob): Use dump_file instead of profile_dump_file. * ipa.c (cgraph_remove_unreachable_nodes): Do not call argument dump_file. * tree-ssa-copy.c (dump_copy_of): Ditto. * rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass dump file to life_analysis. * bt-load.c (branch_target_load_optimize): Ditto. * cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to renumber_insns. * rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs, regclass, dbr_schedule): Declaration changed. * sched-int.h (sched_init): Declaration changed. * tree-profile.c (tree_profile_dump_file): Removed. (tree_profile_hooks): Removed profile_dump_file hook. * rtl-profile (rtl_profile_dump_file): Removed. (rtl_profile_hooks): emoved profile_dump_file hook. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * c-gimplify.c (c_genericize): Do not call local variable dump_file. * tree-cfg.c (build_tree_cfg): Ditto. * Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency. * basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm): Declaration changed. * config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to life_analysis and schedule_insns. * config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to life_analysis. * config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to dbr_schedule. * config/mips/mips.c (mips_reorg): Ditto. * config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to schedule_ebbs. From-SVN: r110656
2006-02-06 19:20:47 +01:00
extern void regclass (rtx, int);
extern void reg_scan (rtx, unsigned int);
extern void fix_register (const char *, int, int);
hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. 2002-11-04 Aldy Hernandez <aldyh@redhat.com> * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. * config/rs6000/rs6000.h (CLASS_CANNOT_CHANGE_MODE_P): Remove. (CLASS_CANNOT_CHANGE_MODE): Remove. (CANNOT_CHANGE_MODE_CLASS): New. * config/alpha/alpha.h: Same. * config/ia64/ia64.h: Same. * config/mips/mips.h: Same. * config/s390/s390.h: Same. * config/sh/sh.h: Same. * config/pa/pa64-regs.h: Same. * config/sh/sh-protos.h (sh_cannot_change_mode_class): Add prototype. * config/sh/sh.c (sh_cannot_change_mode_class): New. * config/mips/mips-protos.h (mips_cannot_change_mode_class): Add prototype. * config/mips/mips.c (mips_cannot_change_mode_class): New. * doc/tm.texi (Register Classes): Remove CLASS_CANNOT_CHANGE_MODE and CLASS_CANNOT_CHANGE_MODE_P. Document CANNOT_CHANGE_MODE_CLASS. * reload.c (push_reload): Use CANNOT_CHANGE_MODE_CLASS. (push_reload): Same. * simplify-rtx.c (simplify_subreg): Same. * reload1.c (choose_reload_regs): Same. * recog.c (register_operand): Same. * regrename.c (mode_change_ok): Change to use new CANNOT_CHANGE_MODE_CLASS infrastructure. * regclass.c (cannot_change_mode_set_regs): New. Declare subregs_of_mode. (regclass): Use subregs_of_mode. Remove references to reg_changes_mode. (init_reg_sets_1): Remove class_can_change_mode and reg_changes_mode code. (invalid_mode_change_p): New. (dump_regclass): Use invalid_mode_change_p instead of class_can_change_mode. (regclass): Same. (record_operand_costs): Do not set reg_changes_mode. * local-alloc.c (struct qty): Remove changes_mode field. (alloc_qty): Remove changes_mode initialization. (update_qty_class): Remove set of changes_mode. (find_free_reg): Use subregs_of_mode. * global.c (find_reg): Use subregs_of_mode info. * rtl.h (cannot_change_mode_set_regs): New prototype. (invalid_mode_change_p): Same. (REG_CANNOT_CHANGE_MODE_P): New macro. * flow.c (mark_used_regs): Calculate subregs_of_mode. Remove REG_CHANGES_MODE. (life_analysis): Clear subregs_of_mode. * combine.c (subst): Pass class to CLASS_CANNOT_CHANGE_MODE_P. Remove use of CLASS_CANNOT_CHANGE_MODE. (simplify_set): Same. (gen_lowpart_for_combine): Calculate subregs_of_mode. Remove REG_CHANGES_MODE. * regs.h: Add extern for subregs_of_mode; Include hard-reg-set and basic-block. (REG_CHANGES_MODE): Delete. From-SVN: r58794
2002-11-04 17:58:39 +01:00
#ifdef HARD_CONST
extern void cannot_change_mode_set_regs (HARD_REG_SET *,
enum machine_mode, unsigned int);
hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. 2002-11-04 Aldy Hernandez <aldyh@redhat.com> * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. * config/rs6000/rs6000.h (CLASS_CANNOT_CHANGE_MODE_P): Remove. (CLASS_CANNOT_CHANGE_MODE): Remove. (CANNOT_CHANGE_MODE_CLASS): New. * config/alpha/alpha.h: Same. * config/ia64/ia64.h: Same. * config/mips/mips.h: Same. * config/s390/s390.h: Same. * config/sh/sh.h: Same. * config/pa/pa64-regs.h: Same. * config/sh/sh-protos.h (sh_cannot_change_mode_class): Add prototype. * config/sh/sh.c (sh_cannot_change_mode_class): New. * config/mips/mips-protos.h (mips_cannot_change_mode_class): Add prototype. * config/mips/mips.c (mips_cannot_change_mode_class): New. * doc/tm.texi (Register Classes): Remove CLASS_CANNOT_CHANGE_MODE and CLASS_CANNOT_CHANGE_MODE_P. Document CANNOT_CHANGE_MODE_CLASS. * reload.c (push_reload): Use CANNOT_CHANGE_MODE_CLASS. (push_reload): Same. * simplify-rtx.c (simplify_subreg): Same. * reload1.c (choose_reload_regs): Same. * recog.c (register_operand): Same. * regrename.c (mode_change_ok): Change to use new CANNOT_CHANGE_MODE_CLASS infrastructure. * regclass.c (cannot_change_mode_set_regs): New. Declare subregs_of_mode. (regclass): Use subregs_of_mode. Remove references to reg_changes_mode. (init_reg_sets_1): Remove class_can_change_mode and reg_changes_mode code. (invalid_mode_change_p): New. (dump_regclass): Use invalid_mode_change_p instead of class_can_change_mode. (regclass): Same. (record_operand_costs): Do not set reg_changes_mode. * local-alloc.c (struct qty): Remove changes_mode field. (alloc_qty): Remove changes_mode initialization. (update_qty_class): Remove set of changes_mode. (find_free_reg): Use subregs_of_mode. * global.c (find_reg): Use subregs_of_mode info. * rtl.h (cannot_change_mode_set_regs): New prototype. (invalid_mode_change_p): Same. (REG_CANNOT_CHANGE_MODE_P): New macro. * flow.c (mark_used_regs): Calculate subregs_of_mode. Remove REG_CHANGES_MODE. (life_analysis): Clear subregs_of_mode. * combine.c (subst): Pass class to CLASS_CANNOT_CHANGE_MODE_P. Remove use of CLASS_CANNOT_CHANGE_MODE. (simplify_set): Same. (gen_lowpart_for_combine): Calculate subregs_of_mode. Remove REG_CHANGES_MODE. * regs.h: Add extern for subregs_of_mode; Include hard-reg-set and basic-block. (REG_CHANGES_MODE): Delete. From-SVN: r58794
2002-11-04 17:58:39 +01:00
#endif
extern bool invalid_mode_change_p (unsigned int, enum reg_class,
enum machine_mode);
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 */
tree-vrp.c (execute_vrp): Do not pass dump argument to. * tree-vrp.c (execute_vrp): Do not pass dump argument to. loop_optimizer_init and loop_optimizer_finalize * tree-ssa-sink.c (execute_sink_code): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init, tree_ssa_loop_done): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Ditto. * sched-ebb.c: Include output.h. (schedule_ebbs): Do not use dump argument. * value-prof.h (struct profile_hooks): Remove profile_dump_file. * loop.c (loop_dump_stream): Removed. (loop_optimize, rest_of_handle_loop_optimize): Do not use dump argument. (scan_loop, move_movables, find_and_verify_loops, mark_loop_jump, emit_prefetch_instructions, loop_bivs_find, loop_bivs_check, final_biv_value, loop_biv_eliminable_p, loop_givs_rescan, loop_iterations, strength_reduce, record_biv, record_giv, final_giv_value, check_final_value, check_ext_dependent_givs, combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems, try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use dump_file instead of loop_dump_stream. * ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call argument dump_file. * reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use dump argument. * flow.c (life_analysis, rest_of_handle_life): Ditto. * haifa-sched.c: Include output.h (schedule_insns, sched_init): Do not use dump argument. * mode-switching.c (optimize_mode_switching): Ditto. * modulo-sched.c (stats_file): Removed. (print_node_sched_params): Do not call argument dump_file. (sms_schedule_by_order, loop_canon_p, sms_schedule, rest_of_handle_sms): Do not use dump argument. Use dump_file instead of stats_file. * cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not use dump argument. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize, rtl_loop_init, rtl_loop_done): Ditto. * global.c (global_alloc, rest_of_handle_global_alloc): Ditto. * predict.c (combine_predictions_for_bb, tree_estimate_probability): Ditto. * recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto. * lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto. * regmove.c (fixup_match_1, fixup_match_2, regmove_optimize, rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto. * emit-rtl.c (renumber_insns): Ditto. * cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr, expand_gimple_basic_block, tree_expand_cfg): Ditto. * regclass.c (regclass): Ditto. * tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts, remove_ssa_form, rewrite_out_of_ssa): Ditto. * reg-stack.c (compensate_edge, compensate_edges, convert_regs_1, convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs): Ditto. * sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto. * local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file to regclass. * gcse.c (gcse_file, debug_stderr): Removed. (gcse_main, bypass_jumps, rest_of_handle_jump_bypass, rest_of_handle_gcse): Do not use dump argument. (cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets, one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb, pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass, compute_code_hoist_vbeinout, compute_code_hoist_data, one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores, compute_store_table, build_store_vectors, insert_insn_start_bb, insert_store, remove_reachable_equiv_notes, replace_store_insn, store_motion): Use dump_file instead of gcse_file. * ipa-type-escape.c (type_escape_execute): Remove debugging comments. * profile.c (profile_dump_file): Removed. (branch_prob): Use dump_file instead of profile_dump_file. * ipa.c (cgraph_remove_unreachable_nodes): Do not call argument dump_file. * tree-ssa-copy.c (dump_copy_of): Ditto. * rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass dump file to life_analysis. * bt-load.c (branch_target_load_optimize): Ditto. * cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to renumber_insns. * rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs, regclass, dbr_schedule): Declaration changed. * sched-int.h (sched_init): Declaration changed. * tree-profile.c (tree_profile_dump_file): Removed. (tree_profile_hooks): Removed profile_dump_file hook. * rtl-profile (rtl_profile_dump_file): Removed. (rtl_profile_hooks): emoved profile_dump_file hook. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * c-gimplify.c (c_genericize): Do not call local variable dump_file. * tree-cfg.c (build_tree_cfg): Ditto. * Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency. * basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm): Declaration changed. * config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to life_analysis and schedule_insns. * config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to life_analysis. * config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to dbr_schedule. * config/mips/mips.c (mips_reorg): Ditto. * config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to schedule_ebbs. From-SVN: r110656
2006-02-06 19:20:47 +01:00
extern void dbr_schedule (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
/* In local-alloc.c */
extern void dump_local_alloc (FILE *);
/* In reload1.c */
extern int function_invariant_p (rtx);
/* In calls.c */
enum libcall_type
{
LCT_NORMAL = 0,
LCT_CONST = 1,
LCT_PURE = 2,
LCT_CONST_MAKE_BLOCK = 3,
LCT_PURE_MAKE_BLOCK = 4,
LCT_NORETURN = 5,
LCT_THROW = 6,
LCT_RETURNS_TWICE = 7
};
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, ...);
/* In varasm.c */
extern void init_varasm_once (void);
extern enum tls_model decl_default_tls_model (tree);
/* In rtl.c */
extern void traverse_md_constants (int (*) (void **, void *), void *);
struct md_constant { char *name, *value; };
/* In read-rtl.c */
extern int read_skip_spaces (FILE *);
extern bool read_rtx (FILE *, rtx *, int *);
extern void copy_rtx_ptr_loc (const void *, const void *);
extern void print_rtx_ptr_loc (const void *);
extern const char *join_c_conditions (const char *, const char *);
extern void print_c_condition (const char *);
extern const char *read_rtx_filename;
extern int read_rtx_lineno;
/* In alias.c */
extern rtx canon_rtx (rtx);
extern int true_dependence (rtx, enum machine_mode, rtx, int (*)(rtx, int));
extern rtx get_addr (rtx);
extern int canon_true_dependence (rtx, enum machine_mode, rtx, rtx,
int (*)(rtx, int));
extern int read_dependence (rtx, rtx);
extern int anti_dependence (rtx, rtx);
extern int output_dependence (rtx, rtx);
extern void init_alias_once (void);
extern void init_alias_analysis (void);
extern void end_alias_analysis (void);
extern bool memory_modified_in_insn_p (rtx, rtx);
extern rtx find_base_term (rtx);
extern rtx gen_hard_reg_clobber (enum machine_mode, unsigned int);
extern rtx get_reg_known_value (unsigned int);
extern bool get_reg_known_equiv_p (unsigned int);
#ifdef STACK_REGS
extern int stack_regs_mentioned (rtx insn);
#endif
c-common.c (enum attrs): Add A_NO_LIMIT_STACK. * c-common.c (enum attrs): Add A_NO_LIMIT_STACK. (init_attributes): Add A_NO_LIMIT_STACK. (decl_attributes): Handle A_NO_LIMIT_STACK. * c-decl.c (duplicate_decls): Handle DECL_NO_LIMIT_STACK. * explow.c (allocate_dynamic_stack_space) [!HAVE_allocate_stack]: Handle stack bounds checking. * flags.h (flag_stack_check): Use the word 'probe' rather than 'check', because the flag doesn't actually cause any checking to be done. * function.c (expand_function_start): Set current_function_limit_stack. * function.h (struct function): Add limit_stack. (current_function_limit_stack): Define. * invoke.texi (Code Gen Options): Document new options. * rtl.h: Declare stack_limit_rtx. * toplev.c (stack_limit_rtx): New variable. (decode_f_option): Handle new options -fstack-limit-register=REG, -fstack-limit-symbol=IDENT, -fno-stack-limit. (main): Add stack_limit_rtx as GC root. * tree.h (DECL_NO_LIMIT_STACK): New macro. (struct tree_decl): New member no_limit_stack. * config/rs6000/rs6000.c (rs6000_allocate_stack_space): Handle stack_limit_rtx. * config/rs6000/rs6000.md (allocate_stack): Handle stack_limit_rtx. (conditional_trap+1): Get new mnemonic correct. (conditional_trap+2): New pattern for DImode traps. * config/m68k/m68k.c (output_function_prologue): Handle stack_limit_rtx. * config/m68k/m68k.md (trap): New insn. (conditional_trap): New insn. * md.texi (Standard Names): Document `trap' and `conditional_trap'. * optabs.c (gen_cond_trap): Use start_sequence()/end_sequence() so a cc0 setter doesn't get emitted at some random place in the function. * config/i960/i960.md (trap): New insn. (conditional_trap): New expander. (conditional_trap+1, conditional_trap+2): New insns for signed and unsigned cases. * config/i960/i960.c (i960_function_prologue): Use STARTING_FRAME_OFFSET. Handle stack_limit_rtx. Co-Authored-By: Greg McGary <gkm@gnu.org> From-SVN: r30771
1999-12-04 04:00:04 +01:00
/* In toplev.c */
extern GTY(()) rtx stack_limit_rtx;
/* In predict.c */
extern void invert_br_probabilities (rtx);
extern bool expensive_function_p (int);
/* In cfgexpand.c */
extern void add_reg_br_prob_note (rtx last, int probability);
/* In tracer.c */
tracer.c (tracer): Don't take FLAGS argument. * tracer.c (tracer): Don't take FLAGS argument. Assert we are in cfglayout mode. Don't go into and out of cfglayout mode. Link the blocks in the order of the constructed traces. (rest_of_handle_tracer): Adjust call to tracer. * loop-init.c (rtl_loop_init): Assert we are in cfglayout mode. Don't go into cfglayout mode. (rtl_loop_done): Don't go out of cfglayout mode. * cfglayout.c (relink_block_chain): New function, split out from... (fixup_reorder_chain): ...here. Remove redundant checking. (cfg_layout_finalize): Don't clear the header, footer, and aux fields here, move the code to do so to relink_block_chain. Likewise for free_original_copy_tables. * rtl.h (tracer): Update prototype. * bb-reorder.c (reorder_basic_blocks): Don't take FLAGS argument. Assert we are in cfglayout mode. Don't go into and out of cfglayout mode. Use relink_block_chain to serialize the CFG according to the new basic block order. Move targetm.cannot_modify_jumps_p check from here... (gate_handle_reorder_blocks): ...to here. (duplicate_computed_gotos): Move targetm.cannot_modify_jumps_p check from here... (gate_duplicate_computed_gotos): ...to here. (rest_of_handle_reorder_blocks): Don't see if anything has changed, something always changes when going into and out of cfglayout mode. Perform an expensive cfg cleanup while going into cfglayout mode. Always update liveness information on HAVE_conditional_execution targets. Reserialize the basic blocks and go out of cfglayout mode. * reg-stack.c: Include cfglayout.h. (rest_of_handle_stack_regs): Go into and out of cfglayout mode around the call to reorder_basic_blocks. * basic-block.h (reorder_basic_blocks): Update prototype. (relink_block_chain): New prototype. * passes.c (pass_outof_cfg_layout_mode): Move after cse2. From-SVN: r123167
2007-03-24 00:05:28 +01:00
extern void tracer (void);
hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. 2002-11-04 Aldy Hernandez <aldyh@redhat.com> * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. * config/rs6000/rs6000.h (CLASS_CANNOT_CHANGE_MODE_P): Remove. (CLASS_CANNOT_CHANGE_MODE): Remove. (CANNOT_CHANGE_MODE_CLASS): New. * config/alpha/alpha.h: Same. * config/ia64/ia64.h: Same. * config/mips/mips.h: Same. * config/s390/s390.h: Same. * config/sh/sh.h: Same. * config/pa/pa64-regs.h: Same. * config/sh/sh-protos.h (sh_cannot_change_mode_class): Add prototype. * config/sh/sh.c (sh_cannot_change_mode_class): New. * config/mips/mips-protos.h (mips_cannot_change_mode_class): Add prototype. * config/mips/mips.c (mips_cannot_change_mode_class): New. * doc/tm.texi (Register Classes): Remove CLASS_CANNOT_CHANGE_MODE and CLASS_CANNOT_CHANGE_MODE_P. Document CANNOT_CHANGE_MODE_CLASS. * reload.c (push_reload): Use CANNOT_CHANGE_MODE_CLASS. (push_reload): Same. * simplify-rtx.c (simplify_subreg): Same. * reload1.c (choose_reload_regs): Same. * recog.c (register_operand): Same. * regrename.c (mode_change_ok): Change to use new CANNOT_CHANGE_MODE_CLASS infrastructure. * regclass.c (cannot_change_mode_set_regs): New. Declare subregs_of_mode. (regclass): Use subregs_of_mode. Remove references to reg_changes_mode. (init_reg_sets_1): Remove class_can_change_mode and reg_changes_mode code. (invalid_mode_change_p): New. (dump_regclass): Use invalid_mode_change_p instead of class_can_change_mode. (regclass): Same. (record_operand_costs): Do not set reg_changes_mode. * local-alloc.c (struct qty): Remove changes_mode field. (alloc_qty): Remove changes_mode initialization. (update_qty_class): Remove set of changes_mode. (find_free_reg): Use subregs_of_mode. * global.c (find_reg): Use subregs_of_mode info. * rtl.h (cannot_change_mode_set_regs): New prototype. (invalid_mode_change_p): Same. (REG_CANNOT_CHANGE_MODE_P): New macro. * flow.c (mark_used_regs): Calculate subregs_of_mode. Remove REG_CHANGES_MODE. (life_analysis): Clear subregs_of_mode. * combine.c (subst): Pass class to CLASS_CANNOT_CHANGE_MODE_P. Remove use of CLASS_CANNOT_CHANGE_MODE. (simplify_set): Same. (gen_lowpart_for_combine): Calculate subregs_of_mode. Remove REG_CHANGES_MODE. * regs.h: Add extern for subregs_of_mode; Include hard-reg-set and basic-block. (REG_CHANGES_MODE): Delete. From-SVN: r58794
2002-11-04 17:58:39 +01:00
Josef Zlomek <zlomekj@suse.cz> Josef Zlomek <zlomekj@suse.cz> * Makefile.in (var-tracking.o): New. * common.opt (fvar-tracking): New. * flags.h (flag_var_tracking): New. * gengtype.c (adjust_field_rtx_def): NOTE_INSN_VAR_LOCATION was added. * opts.c (common_handle_option): Add OPT_fvar_tracking. * print-rtl.c (print_rtx): NOTE_INSN_VAR_LOCATION was added. * rtl.c (note_insn_name): Likewise. * rtl.def (VAR_LOCATION): New. * rtl.h (NOTE_VAR_LOCATION): New. (NOTE_VAR_LOCATION_DECL): New. (NOTE_VAR_LOCATION_LOC): New. (enum insn_note): NOTE_INSN_VAR_LOCATION was added. (variable_tracking_main): New exported function. * timevar.def (TV_VAR_TRACKING): New. * toplev.c (enum dump_file_index): Added DFI_vartrack. (dump_file): "vartrack" was added (-dV). (flag_var_tracking): New. (f_options): "var-tracking" was added. (rest_of_handle_variable_tracking): New function. (rest_of_compilation): Run variable tracking. (process_options): If user has not specified flag_var_tracking set it according to optimize, debug_info_level and debug_hooks. * tree.h (frame_base_decl): New. * var-tracking.c: New file. * config/ia64/ia64.c (ia64_flag_var_tracking): New variable. (ia64_override_options): Set flags to run variable tracking in machine dependent reorg instead of toplev.c. (ia64_reorg): Run variable tracking if wanted. * doc/invoke.texi: Mention variable tracking in -dV, add and -fvar-tracking. * doc/passes.texi: Added variable tracking pass. Daniel Berlin <dberlin@dberlin.org> * debug.h (struct gcc_debug_hooks): Added var_location debug hook. * dbxout.c (dbx_debug_hooks): Likewise. (xcoff_debug): Likewise. * debug.c (do_nothing_debug_hooks): Likewise. * dwarf2out.c (dwarf2_debug_hooks): Likewise. * dwarfout.c (dwarf_debug_hooks): Likewise. * sdbout.c (sdb_debug_hooks): Likewise. * vmsdbgout.c (vmsdbg_debug_hooks): Likewise. * final.c (final_scan_insn): Call var_location debug hook for each NOTE_INSN_VAR_LOCATION. Co-Authored-By: Daniel Berlin <dberlin@dberlin.org> From-SVN: r77418
2004-02-06 21:03:45 +01:00
/* In var-tracking.c */
tree-vrp.c (execute_vrp): Return value. 2006-03-02 Daniel Berlin <dberlin@dberlin.org> * gcc/tree-vrp.c (execute_vrp): Return value. * gcc/regrename.c (rest_of_handle_regrename): Ditto. * gcc/tree-into-ssa.c (rewrite_into_ssa): Ditto. * gcc/tree-complex.c (tree_lower_complex): Ditto. (tree_lower_complex_O0): Ditto. * gcc/tracer.c (rest_of_handle_tracer): Ditto. * gcc/postreload-gcse.c (rest_of_handle_gcse2): Ditto. * gcc/postreload.c (rest_of_handle_postreload): Ditto. * gcc/tree-tailcall.c (execute_tail_recursion): Ditto. (execute_tail_calls): Ditto. * gcc/tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * gcc/tree.h (init_function_for_compilation): Ditto. * gcc/ipa-cp.c (ipcp_driver): Ditto. * gcc/tree-scalar-evolution.c (scev_const_prop): Ditto. * gcc/tree-scalar-evolution.h (scev_const_prop): Ditto. * gcc/final.c (compute_alignments): Ditto. (rest_of_handle_final): Ditto. (rest_of_handle_shorten_branches): Ditto. (rest_of_clean_state): Ditto. * gcc/omp-low.c (execute_expand_omp): Ditto. (execute_lower_omp): Ditto. * gcc/tree-ssa-dse.c (tree_ssa_dse): Ditto. * gcc/ipa-reference.c (static_execute): Ditto. * gcc/tree-ssa-uncprop.c (tree_ssa_uncprop): Ditto. * gcc/reorg.c (rest_of_handle_delay_slots): Ditto. (rest_of_handle_machine_reorg): Ditto. * gcc/cgraphunit.c (rebuild_cgraph_edges): Ditto. * gcc/flow.c (recompute_reg_usage): Ditto. (rest_of_handle_remove_death_notes): Ditto. (rest_of_handle_life): Ditto. (rest_of_handle_flow2): Ditto. * gcc/tree-ssa-copyrename.c (rename_ssa_copies): Ditto. * gcc/tree-ssa-ccp.c (do_ssa_ccp): Ditto. (do_ssa_store_ccp): Ditto. (execute_fold_all_builtins): Ditto. * gcc/mode-switching.c (rest_of_handle_mode_switching): Ditto. * gcc/modulo-sched.c (rest_of_handle_sms): Ditto. * gcc/ipa-pure-const.c (static_execute): Ditto. * gcc/cse.c (rest_of_handle_cse): Ditto. (rest_of_handle_cse2): Ditto. * gcc/web.c (rest_of_handle_web): Ditto. * gcc/tree-stdarg.c (execute_optimize_stdarg): Ditto. * gcc/tree-ssa-math-opts.c (execute_cse_reciprocals): Ditto. * gcc/tree-ssa-dom.c (tree_ssa_dominator_optimize): Ditto. * gcc/tree-nrv.c (tree_nrv): Ditto. (execute_return_slot_opt): Ditto. * gcc/tree-ssa-alias.c (compute_may_aliases): Ditto. (create_structure_vars): Ditto. * gcc/loop-init.c (rtl_loop_init): Ditto. (rtl_loop_done): Ditto. (rtl_move_loop_invariants): Ditto. (rtl_unswitch): Ditto. (rtl_unroll_and_peel_loops): Ditto. (rtl_doloop): Ditto. * gcc/gimple-low.c (lower_function_body): Ditto. (mark_used_blocks): Ditto. * gcc/tree-ssa-sink.c (execute_sink_code): Ditto. * gcc/ipa-inline.c (cgraph_decide_inlining): Ditto. (cgraph_early_inlining): Ditto. * gcc/global.c (rest_of_handle_global_alloc): Ditto. * gcc/jump.c (cleanup_barriers): Ditto. (purge_line_number_notes): Ditto. * gcc/ifcvt.c (rest_of_handle_if_conversion): Ditto. (rest_of_handle_if_after_reload): Ditto. * gcc/tree-ssa-loop.c (tree_ssa_loop_init): Ditto. (tree_ssa_loop_im): Ditto. (tree_ssa_loop_unswitch): Ditto. (tree_vectorize): Ditto. (tree_linear_transform): Ditto. (tree_ssa_loop_ivcanon): Ditto. (tree_ssa_empty_loop): Ditto. (tree_ssa_loop_bounds): Ditto. (tree_complete_unroll): Ditto. (tree_ssa_loop_prefetch): Ditto. (tree_ssa_loop_ivopts): Ditto. (tree_ssa_loop_done): Ditto. * gcc/predict.c (tree_estimate_probability): Ditto. * gcc/recog.c (split_all_insns_noflow): Ditto. (rest_of_handle_peephole2): Ditto. (rest_of_handle_split_all_insns): Ditto. * gcc/tree-eh.c (lower_eh_constructs): Ditto. * gcc/regmove.c (rest_of_handle_regmove): Ditto. (rest_of_handle_stack_adjustments): Ditto. * gcc/local-alloc.c (rest_of_handle_local_alloc): Ditto. * gcc/function.c (instantiate_virtual_regs): Ditto. (init_function_for_compilation): Ditto. (rest_of_handle_check_leaf_regs): Ditto. * gcc/gcse.c (rest_of_handle_jump_bypass): Ditto. (rest_of_handle_gcse): Ditto. * gcc/ipa-type-escape.c (type_escape_execute): Ditto. * gcc/alias.c (rest_of_handle_cfg): Ditto. * gcc/tree-if-conv.c (main_tree_if_conversion): Ditto. * gcc/profile.c (rest_of_handle_branch_prob): Ditto. * gcc/tree-ssa-phiopt.c (tree_ssa_phiopt): Ditto. * gcc/rtl-factoring.c (rest_of_rtl_seqabstr): Ditto. * gcc/bt-load.c (rest_of_handle_branch_target_load_optimize): Ditto * gcc/tree-dfa.c (find_referenced_vars): Ditto. * gcc/except.c (set_nothrow_function_flags): Ditto. (convert_to_eh_region_ranges): Ditto. (rest_of_handle_eh): Ditto. * gcc/emit-rtl.c (unshare_all_rtl): Ditto. (remove_unnecessary_notes): Ditto. * gcc/except.h (set_nothrow_function_flags): Ditto. (convert_to_eh_region_ranges): Ditto. * gcc/cfgexpand.c (tree_expand_cfg): Ditto. * gcc/tree-cfgcleanup.c (merge_phi_nodes): Ditto. * gcc/tree-ssa-pre.c (do_pre): Ditto. (execute_fre): Ditto. * gcc/cfgcleanup.c (rest_of_handle_jump): Ditto. (rest_of_handle_jump2): Ditto. * gcc/tree-sra.c (tree_sra): Ditto. * gcc/tree-mudflap.c (execute_mudflap_function_ops): Ditto. (execute_mudflap_function_decls): Ditto. * gcc/tree-ssa-copy.c (do_copy_prop): Ditto. (do_store_copy_prop): Ditto. * gcc/ipa-prop.h (ipcp_driver): Ditto. * gcc/cfglayout.c (insn_locators_initialize): Ditto. * gcc/tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_vars): Ditto. * gcc/cfglayout.h (insn_locators_initialize): Ditto. * gcc/tree-ssa-dce.c (tree_ssa_dce): Ditto. * gcc/tree-ssa.c (execute_early_warn_uninitialized): Ditto. (execute_late_warn_uninitialized): Ditto. * gcc/rtl.h (cleanup_barriers): Ditto. (split_all_insns_noflow): Ditto. (purge_line_number_notes): Ditto. (unshare_all_rtl): Ditto. (remove_unnecessary_notes): Ditto. (recompute_reg_usage): Ditto. (variable_tracking_main): Ditto. * gcc/integrate.c (emit_initial_value_sets): Ditto. * gcc/integrate.h (emit_initial_value_sets): Ditto. * gcc/tree-optimize.c (execute_free_datastructures): Ditto (execute_free_cfg_annotations): Ditto. (execute_fixup_cfg): Ditto. (execute_cleanup_cfg_pre_ipa): Ditto. (execute_cleanup_cfg_post_optimizing): Ditto. (execute_init_datastructures): Ditto. * gcc/tree-object-size.c (compute_object_sizes): Ditto. * gcc/combine.c (rest_of_handle_combine): Ditto. * gcc/tree-outof-ssa.c (rewrite_out_of_ssa): Ditto. * gcc/bb-reorder.c (duplicate_computed_gotos): Ditto. (rest_of_handle_reorder_blocks): Ditto. (rest_of_handle_partition_blocks): Ditto. * gcc/var-tracking.c (variable_tracking_main): Ditto. * gcc/tree-profile.c (tree_profiling): Ditto. * gcc/tree-vect-generic.c (expand_vector_operations): Ditto. * gcc/reg-stack.c (rest_of_handle_stack_regs): Ditto. * gcc/sched-rgn.c (rest_of_handle_sched): Ditto. (rest_of_handle_sched2): Ditto. * gcc/basic-block.h (free_bb_insn): Ditto. * gcc/tree-ssa-structalias.c (ipa_pta_execute): Ditto. * gcc/tree-cfg.c (execute_build_cfg): Ditto. (remove_useless_stmts): Ditto. (split_critical_edges): Ditto. (execute_warn_function_return): Ditto. (execute_warn_function_noreturn): Ditto. * gcc/tree-ssa-reassoc.c (execute_reassoc): Ditto. * gcc/cfgrtl.c (free_bb_for_insn): Ditto. * gcc/passes.c (execute_one_pass): Run additional todos returned by execute function. * gcc/tree-pass.h (struct tree_opt_pass): Make execute return a value. From-SVN: r111643
2006-03-02 20:00:11 +01:00
extern unsigned int variable_tracking_main (void);
Josef Zlomek <zlomekj@suse.cz> Josef Zlomek <zlomekj@suse.cz> * Makefile.in (var-tracking.o): New. * common.opt (fvar-tracking): New. * flags.h (flag_var_tracking): New. * gengtype.c (adjust_field_rtx_def): NOTE_INSN_VAR_LOCATION was added. * opts.c (common_handle_option): Add OPT_fvar_tracking. * print-rtl.c (print_rtx): NOTE_INSN_VAR_LOCATION was added. * rtl.c (note_insn_name): Likewise. * rtl.def (VAR_LOCATION): New. * rtl.h (NOTE_VAR_LOCATION): New. (NOTE_VAR_LOCATION_DECL): New. (NOTE_VAR_LOCATION_LOC): New. (enum insn_note): NOTE_INSN_VAR_LOCATION was added. (variable_tracking_main): New exported function. * timevar.def (TV_VAR_TRACKING): New. * toplev.c (enum dump_file_index): Added DFI_vartrack. (dump_file): "vartrack" was added (-dV). (flag_var_tracking): New. (f_options): "var-tracking" was added. (rest_of_handle_variable_tracking): New function. (rest_of_compilation): Run variable tracking. (process_options): If user has not specified flag_var_tracking set it according to optimize, debug_info_level and debug_hooks. * tree.h (frame_base_decl): New. * var-tracking.c: New file. * config/ia64/ia64.c (ia64_flag_var_tracking): New variable. (ia64_override_options): Set flags to run variable tracking in machine dependent reorg instead of toplev.c. (ia64_reorg): Run variable tracking if wanted. * doc/invoke.texi: Mention variable tracking in -dV, add and -fvar-tracking. * doc/passes.texi: Added variable tracking pass. Daniel Berlin <dberlin@dberlin.org> * debug.h (struct gcc_debug_hooks): Added var_location debug hook. * dbxout.c (dbx_debug_hooks): Likewise. (xcoff_debug): Likewise. * debug.c (do_nothing_debug_hooks): Likewise. * dwarf2out.c (dwarf2_debug_hooks): Likewise. * dwarfout.c (dwarf_debug_hooks): Likewise. * sdbout.c (sdb_debug_hooks): Likewise. * vmsdbgout.c (vmsdbg_debug_hooks): Likewise. * final.c (final_scan_insn): Call var_location debug hook for each NOTE_INSN_VAR_LOCATION. Co-Authored-By: Daniel Berlin <dberlin@dberlin.org> From-SVN: r77418
2004-02-06 21:03:45 +01:00
loop-iv.c: New file. * loop-iv.c: New file. * Makefile.in (loop-iv.o): New. * basic_block.h (FOR_BB_INSNS, FOR_BB_INSNS_REVERSE): New macros. * cfgloop.c (fill_sons_in_loop, get_loop_body_in_dom_order, num_loop_branches): New functions. * cfgloop.h (get_loop_body_in_dom_order, num_loop_branches, iv_analysis_loop_init, iv_get_reaching_def, iv_analyse, get_iv_value, find_simple_exit, iv_number_of_iterations, iv_analysis_done, get_simple_loop_desc, free_simple_loop_desc): Declare. (simple_loop_desc): New inline function. (struct rtx_iv, struct niter_desc): New. * cfgloopmanip.c (loopify): Specify semantics more precisely. * expr.c (force_operand): Handle subregs of expressions created by loop unroller. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize): Move parts of the initialization to toplev.c * loop-unroll.c (loop_exit_at_end_p): New. (unroll_and_peel_loops): Call iv_analysis_done. (decide_peel_once_rolling, decide_peel_completely, decide_unroll_stupid, decide_unroll_constant_iterations, decide_unroll_runtime_iterations, decide_peel_simple, peel_loop_simple, unroll_loop_stupid, unroll_loop_constant_iterations, unroll_loop_runtime_iterations): Use new simple loop analysis. * loop-unswitch.c (compare_and_jump_seq): New. (may_unswitch_on_p): Renamed to ... (may_unswitch_on): Use new iv analysis. (reversed_condition): Export. (unswitch_single_loop, unswitch_loop): Use new iv analysis. * predict.c (estimate_probability): Use new simple loop analysis. * rtl.h (get_mode_bounds, reversed_condition,compare_and_jump_seq, canon_condition, simplify_using_condition): Declare. * stor-layout.c (get_mode_bounds): New. * toplev.c (rest_of_handle_loop2): Some parts of initialization/finalization moved here from loop-init.c. From-SVN: r77951
2004-02-17 17:41:44 +01:00
/* In stor-layout.c. */
Multiple fixes: PRs 14692, 15274 and 15463 PR c++/15463 * loop-iv.c (iv_number_of_iterations): Use trunc_int_for_mode on result of inverse. PR rtl-optimization/15274 * loop-iv.c (determine_max_iter, shorten_into_mode, iv_number_of_iterations): Handle constants correctly. * rtl.h (get_mode_bounds): Declaration changed. * stor-layout.c (get_mode_bounds): Return a constant suitable for the target mode. PR rtl-optimization/14692 * loop-unswitch.c (may_unswitch_on): Try folding the result. (unswitch_single_loop): Work correctly when may_unswitch_on returns a folded constant. * loop-iv.c (implies_p): Handle A < B ==> A + 1 <= B. * simplify-rtx.c (simplify_const_relational_operation): Optimize comparisons with mode bounds. * function.c (struct temp_slot): Add new field prev. (free_after_compilation, init_temp_slots): Free new fields. (cut_slot_from_list, insert_slot_to_list, temp_slots_at_level, max_slot_level, move_slot_to_level, make_slot_available): New functions. (assign_stack_temp_for_type, combine_temp_slots, find_temp_slot_from_address, preserve_temp_slots, preserve_rtl_expr_result, free_temp_slots, free_temps_for_rtl_expr, pop_temp_slots): Work with the new structure of lists. (mark_all_temps_used): Removed. * function.h (struct function): Field x_temp_slots replaced by x_used_temp_slots and x_avail_temp_slots. (temp_slots): Replaced by ... (used_temp_slots, avail_temp_slots): New. * tree.h (mark_all_temps_used): Declaration removed. * loop-iv.c (mark_single_set, get_biv_step_1, iv_analyze, simplify_using_assignment): Take the expression out of the expr_list wrapper. * loop-iv.c (iv_number_of_iterations): Improve clasification of infinite loops. From-SVN: r82028
2004-05-19 19:53:45 +02:00
extern void get_mode_bounds (enum machine_mode, int, enum machine_mode,
rtx *, rtx *);
loop-iv.c: New file. * loop-iv.c: New file. * Makefile.in (loop-iv.o): New. * basic_block.h (FOR_BB_INSNS, FOR_BB_INSNS_REVERSE): New macros. * cfgloop.c (fill_sons_in_loop, get_loop_body_in_dom_order, num_loop_branches): New functions. * cfgloop.h (get_loop_body_in_dom_order, num_loop_branches, iv_analysis_loop_init, iv_get_reaching_def, iv_analyse, get_iv_value, find_simple_exit, iv_number_of_iterations, iv_analysis_done, get_simple_loop_desc, free_simple_loop_desc): Declare. (simple_loop_desc): New inline function. (struct rtx_iv, struct niter_desc): New. * cfgloopmanip.c (loopify): Specify semantics more precisely. * expr.c (force_operand): Handle subregs of expressions created by loop unroller. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize): Move parts of the initialization to toplev.c * loop-unroll.c (loop_exit_at_end_p): New. (unroll_and_peel_loops): Call iv_analysis_done. (decide_peel_once_rolling, decide_peel_completely, decide_unroll_stupid, decide_unroll_constant_iterations, decide_unroll_runtime_iterations, decide_peel_simple, peel_loop_simple, unroll_loop_stupid, unroll_loop_constant_iterations, unroll_loop_runtime_iterations): Use new simple loop analysis. * loop-unswitch.c (compare_and_jump_seq): New. (may_unswitch_on_p): Renamed to ... (may_unswitch_on): Use new iv analysis. (reversed_condition): Export. (unswitch_single_loop, unswitch_loop): Use new iv analysis. * predict.c (estimate_probability): Use new simple loop analysis. * rtl.h (get_mode_bounds, reversed_condition,compare_and_jump_seq, canon_condition, simplify_using_condition): Declare. * stor-layout.c (get_mode_bounds): New. * toplev.c (rest_of_handle_loop2): Some parts of initialization/finalization moved here from loop-init.c. From-SVN: r77951
2004-02-17 17:41:44 +01:00
/* In loop-unswitch.c */
extern rtx reversed_condition (rtx);
extern rtx compare_and_jump_seq (rtx, rtx, enum rtx_code, rtx, int, rtx);
/* In loop-iv.c */
extern rtx canon_condition (rtx);
extern void simplify_using_condition (rtx, rtx *, struct bitmap_head_def *);
struct rtl_hooks
{
rtx (*gen_lowpart) (enum machine_mode, rtx);
rtx (*gen_lowpart_no_emit) (enum machine_mode, rtx);
rtx (*reg_nonzero_bits) (rtx, enum machine_mode, rtx, enum machine_mode,
unsigned HOST_WIDE_INT, unsigned HOST_WIDE_INT *);
rtx (*reg_num_sign_bit_copies) (rtx, enum machine_mode, rtx, enum machine_mode,
unsigned int, unsigned int *);
bool (*reg_truncated_to_mode) (enum machine_mode, rtx);
/* Whenever you add entries here, make sure you adjust rtlhooks-def.h. */
};
/* Each pass can provide its own. */
extern struct rtl_hooks rtl_hooks;
/* ... but then it has to restore these. */
extern const struct rtl_hooks general_rtl_hooks;
/* Keep this for the nonce. */
#define gen_lowpart rtl_hooks.gen_lowpart
alpha.c (alpha_output_mi_thunk_osf): Use insn_locators_alloc instead of insn_locators_initialize... * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Use insn_locators_alloc instead of insn_locators_initialize; call reset_block_changes. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * config/sh/sh.c (sparc_output_mi_thunk): Likewise. * config/is64/ia64.c (ia64_output_mi_thunk): Likewise. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise. * config/score/score.c (th_output_mi_thunk): Likewise. * config/mips/mips.c (mips_output_mi_thunk): Likewise. * cfglyaout.c (set_curr_insn_source_location, set_curr_insn_block): tolerate uninitialized locator info. Re-apply: * function.c (init_function_start): Don't init line number info. (expand_function_end): Update. (reset_block_changes, record_block_change, finalize_block_changes, check_block_change, free_block_changes): Kill. * function.h (reset_block_changes, record_block_change, finalize_block_changes, check_block_change, free_block_changes): Remove prototypes. (struct function): Remove ib_boundaries_block. * emit-rtl.c (make_insn_raw, make_jump_insn_raw, make_call_insn_raw): Use curr_insn_locator to initialize locator. (emit_line_note): Remove. * cfgexpand.c (expand_gimple_cond_expr): Update. (construct_exit_block): Likewise. (tree_expand_cfg): Initialize/finalize locators. * expr.c (expand_expr_real): Update. * cfglayout.c (line_locators_locs, line_locators_lines, file_locators_locs, file_locators_files): Remove. (set_block_levels): Move to cfgexpand.c. (insn_locators_initialize): Remove. (pass_insn_locators_initialize): Remove. (locations_locators_locs, locations_locators_vals): New static vars. (curr_location, last_location, curr_block, last_block, curr_rtl_loc): Likewise. (insn_locators_alloc, insn_locators_finalize, set_curr_insn_source_location, set_curr_insn_block, curr_insn_locator): New functions. (locator_location): New. (locator_line, locator_file): Rewrite. * rtl.h (emit_line_note): Kill. (insn_locators_alloc, insn_locators_finalize, set_curr_insn_source_location, set_curr_insn_block, curr_insn_locator): Declare. * tree-inline.c (initialize_cfun): Do not initialize ib_boundaries_block. * passes.c (pass_insn_locators_initialize): Remove. From-SVN: r124258
2007-04-28 10:20:08 +02:00
extern void insn_locators_alloc (void);
extern void insn_locators_finalize (void);
extern void set_curr_insn_source_location (location_t);
extern void set_curr_insn_block (tree);
extern int curr_insn_locator (void);
#endif /* ! GCC_RTL_H */