OSDN Git Service

* lower-subreg.c (simple_move_operand): New static function,
[pf3gnuchains/gcc-fork.git] / gcc / rtl.h
index 9c088e9..80c3114 100644 (file)
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -1,6 +1,7 @@
 /* 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 Free Software Foundation, Inc.
+   Copyright (C) 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+   Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -178,7 +179,7 @@ typedef union rtunion_def rtunion;
 
 /* This structure remembers the position of a SYMBOL_REF within an
    object_block structure.  A SYMBOL_REF only provides this information
-   if SYMBOL_REF_IN_BLOCK_P is true.  */
+   if SYMBOL_REF_HAS_BLOCK_INFO_P is true.  */
 struct block_symbol GTY(()) {
   /* The usual SYMBOL_REF fields.  */
   rtunion GTY ((skip)) fld[3];
@@ -212,7 +213,7 @@ struct object_block GTY(())
      order of increasing offset and the following conditions will
      hold for each element X:
 
-        SYMBOL_REF_IN_BLOCK_P (X)
+        SYMBOL_REF_HAS_BLOCK_INFO_P (X)
         !SYMBOL_REF_ANCHOR_P (X)
         SYMBOL_REF_BLOCK (X) == [address of this structure]
         SYMBOL_REF_BLOCK_OFFSET (X) >= 0.  */
@@ -222,7 +223,7 @@ struct object_block GTY(())
      in order of increasing offset, and then increasing TLS model.
      The following conditions will hold for each element X in this vector:
 
-        SYMBOL_REF_IN_BLOCK_P (X)
+        SYMBOL_REF_HAS_BLOCK_INFO_P (X)
         SYMBOL_REF_ANCHOR_P (X)
         SYMBOL_REF_BLOCK (X) == [address of this structure]
         SYMBOL_REF_BLOCK_OFFSET (X) >= 0.  */
@@ -361,6 +362,9 @@ struct rtvec_def GTY(()) {
 /* 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)
+
 /* Predicate yielding nonzero iff X is a label insn.  */
 #define LABEL_P(X) (GET_CODE (X) == CODE_LABEL)
 
@@ -529,7 +533,7 @@ struct rtvec_def GTY(()) {
 #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_IN_BLOCK) == 0)                            \
+   if ((flags & SYMBOL_FLAG_HAS_BLOCK_INFO) == 0)                      \
      rtl_check_failed_block_symbol (__FILE__, __LINE__,                        \
                                    __FUNCTION__);                      \
    &_symbol->u.block_sym; })
@@ -847,7 +851,6 @@ extern const char * const reg_note_name[];
 #define NOTE_BLOCK(INSN)       XCTREE (INSN, 4, NOTE)
 #define NOTE_EH_HANDLER(INSN)  XCINT (INSN, 4, NOTE)
 #define NOTE_BASIC_BLOCK(INSN) XCBBDEF (INSN, 4, NOTE)
-#define NOTE_EXPECTED_VALUE(INSN) XCEXP (INSN, 4, NOTE)
 #define NOTE_VAR_LOCATION(INSN)        XCEXP (INSN, 4, NOTE)
 
 /* In a NOTE that is a line number, this is the line number.
@@ -961,13 +964,6 @@ enum label_kind
    The chain eventually winds up at the CODE_LABEL: it is circular.  */
 #define LABEL_REFS(LABEL) XCEXP (LABEL, 5, CODE_LABEL)
 \f
-/* This is the field in the LABEL_REF through which the circular chain
-   of references to a particular label is linked.
-   FIXME: This chain is used in loop.c and in the SH backend.
-         Since loop.c is about to go away, it could be a win to replace
-         the uses of this in the SH backend with something else.  */
-#define LABEL_NEXTREF(REF) XCEXP (REF, 1, LABEL_REF)
-
 /* For a REG rtx, REGNO extracts the register number.  ORIGINAL_REGNO holds
    the number the register originally had; for a pseudo register turned into
    a hard reg this will hold the old pseudo register number.  */
@@ -1000,6 +996,7 @@ enum label_kind
 
 /* 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))
 
 /* For a CONST_DOUBLE:
    For a VOIDmode, there are two integers CONST_DOUBLE_LOW is the
@@ -1044,6 +1041,7 @@ extern unsigned int subreg_regno_offset   (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);
@@ -1199,13 +1197,9 @@ do {                                             \
    MEM_NOTRAP_P (LHS) = MEM_NOTRAP_P (RHS),                    \
    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))
 
-/* 1 if RTX is a label_ref to a label outside the loop containing the
-   reference.  */
-#define LABEL_OUTSIDE_LOOP_P(RTX)                                      \
-  (RTL_FLAG_CHECK1("LABEL_OUTSIDE_LOOP_P", (RTX), LABEL_REF)->in_struct)
-
 /* 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)                                      \
@@ -1318,11 +1312,11 @@ do {                                            \
 #define SYMBOL_REF_EXTERNAL_P(RTX) \
   ((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_EXTERNAL) != 0)
 /* Set if this symbol has a block_symbol structure associated with it.  */
-#define SYMBOL_FLAG_IN_BLOCK   (1 << 7)
-#define SYMBOL_REF_IN_BLOCK_P(RTX) \
-  ((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_IN_BLOCK) != 0)
+#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)
 /* Set if this symbol is a section anchor.  SYMBOL_REF_ANCHOR_P implies
-   SYMBOL_REF_IN_BLOCK_P.  */
+   SYMBOL_REF_HAS_BLOCK_INFO_P.  */
 #define SYMBOL_FLAG_ANCHOR     (1 << 8)
 #define SYMBOL_REF_ANCHOR_P(RTX) \
   ((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_ANCHOR) != 0)
@@ -1331,13 +1325,15 @@ do {                                            \
 #define SYMBOL_FLAG_MACH_DEP_SHIFT     9
 #define SYMBOL_FLAG_MACH_DEP           (1 << SYMBOL_FLAG_MACH_DEP_SHIFT)
 
-/* The block to which the given SYMBOL_REF belongs.  Only valid if
-   SYMBOL_REF_IN_BLOCK_P (RTX).  */
+/* 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.  */
 #define SYMBOL_REF_BLOCK(RTX) (BLOCK_SYMBOL_CHECK (RTX)->block)
 
-/* The byte offset of the given SYMBOL_REF from the start of its block,
-   or a negative value if the symbol has not yet been assigned a position.
-   Only valid if SYMBOL_REF_IN_BLOCK_P (RTX).  */
+/* 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.  */
 #define SYMBOL_REF_BLOCK_OFFSET(RTX) (BLOCK_SYMBOL_CHECK (RTX)->offset)
 
 /* Define a macro to look for REG_INC notes,
@@ -1439,9 +1435,6 @@ extern int currently_expanding_to_rtl;
 /* In expmed.c */
 extern int ceil_log2 (unsigned HOST_WIDE_INT);
 
-/* In builtins.c */
-extern rtx expand_builtin_expect_jump (tree, rtx, rtx);
-
 /* In explow.c */
 extern void set_stack_check_libfunc (rtx);
 extern HOST_WIDE_INT trunc_int_for_mode        (HOST_WIDE_INT, enum machine_mode);
@@ -1479,6 +1472,7 @@ extern int rtx_equal_p (rtx, rtx);
 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);
 
@@ -1558,7 +1552,6 @@ extern rtx emit_call_insn_after_setloc (rtx, rtx, int);
 extern rtx emit_barrier_after (rtx);
 extern rtx emit_label_after (rtx, rtx);
 extern rtx emit_note_after (int, rtx);
-extern rtx emit_note_copy_after (rtx, rtx);
 extern rtx emit_insn (rtx);
 extern rtx emit_jump_insn (rtx);
 extern rtx emit_call_insn (rtx);
@@ -1600,7 +1593,7 @@ extern enum rtx_code swap_condition (enum rtx_code);
 extern enum rtx_code unsigned_condition (enum rtx_code);
 extern enum rtx_code signed_condition (enum rtx_code);
 extern void mark_jump_label (rtx, rtx, int);
-extern void cleanup_barriers (void);
+extern unsigned int cleanup_barriers (void);
 
 /* In jump.c */
 extern bool squeeze_notes (rtx *, rtx *);
@@ -1721,7 +1714,6 @@ 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 rtx replace_regs (rtx, rtx *, unsigned int, int);
 extern int replace_label (rtx *, void *);
 extern int rtx_referenced_p (rtx, rtx);
 extern bool tablejump_p (rtx, rtx *, rtx *);
@@ -1732,7 +1724,6 @@ extern rtx regno_use_in (unsigned int, rtx);
 extern int auto_inc_p (rtx);
 extern int in_expr_list_p (rtx, rtx);
 extern void remove_node_from_expr_list (rtx, rtx *);
-extern int insns_safe_to_move_p (rtx, rtx, rtx *);
 extern int loc_mentioned_in_p (rtx *, rtx);
 extern rtx find_first_parameter_load (rtx, rtx);
 extern bool keep_with_call_p (rtx);
@@ -1760,6 +1751,8 @@ 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);
+void remove_free_INSN_LIST_elem (rtx, rtx *);
+rtx remove_list_elem (rtx, rtx *);
 
 /* regclass.c */
 
@@ -1781,7 +1774,7 @@ extern enum reg_class reg_preferred_class (int);
 extern enum reg_class reg_alternate_class (int);
 
 extern void split_all_insns (int);
-extern void split_all_insns_noflow (void);
+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];
@@ -1976,6 +1969,12 @@ extern int epilogue_completed;
 
 extern int reload_in_progress;
 
+#ifdef STACK_REGS
+/* Nonzero after end of regstack pass.
+   Set to 1 or 0 by reg-stack.c.  */
+extern int regstack_completed;
+#endif
+
 /* 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
@@ -2027,7 +2026,6 @@ extern enum rtx_code reversed_comparison_code_parts (enum rtx_code,
                                                     rtx, rtx, rtx);
 extern void delete_for_peephole (rtx, rtx);
 extern int condjump_in_parallel_p (rtx);
-extern void purge_line_number_notes (void);
 
 /* In emit-rtl.c.  */
 extern int max_reg_num (void);
@@ -2049,7 +2047,7 @@ 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);
-extern void unshare_all_rtl (void);
+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);
@@ -2060,12 +2058,10 @@ extern void add_insn (rtx);
 extern void add_insn_before (rtx, rtx);
 extern void add_insn_after (rtx, rtx);
 extern void remove_insn (rtx);
-extern void emit_insn_after_with_line_notes (rtx, rtx, rtx);
 extern rtx emit (rtx);
-extern void renumber_insns (void);
-extern void remove_unnecessary_notes (void);
 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);
 extern rtx unlink_insn_chain (rtx, rtx);
 extern rtx delete_insn_and_edges (rtx);
@@ -2109,9 +2105,6 @@ extern void print_simple_rtl (FILE *, rtx);
 extern int print_rtl_single (FILE *, rtx);
 extern void print_inline_rtx (FILE *, rtx, int);
 
-/* In loop.c */
-extern void init_loop (void);
-
 /* In bt-load.c */
 extern void branch_target_load_optimize (bool);
 
@@ -2133,7 +2126,6 @@ extern rtx move_by_pieces (rtx, rtx, unsigned HOST_WIDE_INT,
                           unsigned int, int);
 
 /* In flow.c */
-extern void recompute_reg_usage (void);
 extern void delete_dead_jumptables (void);
 extern void print_rtl_with_bb (FILE *, rtx);
 extern void dump_flow_info (FILE *, int);
@@ -2252,11 +2244,13 @@ 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 */
 extern void tracer (unsigned int);
 
 /* In var-tracking.c */
-extern void variable_tracking_main (void);
+extern unsigned int variable_tracking_main (void);
 
 /* In stor-layout.c.  */
 extern void get_mode_bounds (enum machine_mode, int, enum machine_mode,