OSDN Git Service

* config/i386/i386.c (override_options): Define c3-2 as a 686 with SSE.
[pf3gnuchains/gcc-fork.git] / gcc / rtl.h
index c873d9f..7758a92 100644 (file)
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -1,6 +1,6 @@
 /* Register Transfer Language (RTL) definitions for GNU C-Compiler
    Copyright (C) 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+   1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -103,6 +103,15 @@ typedef struct mem_attrs GTY(())
   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;
+
 /* Common union for an element of an rtx.  */
 
 union rtunion_def
@@ -120,6 +129,7 @@ union rtunion_def
   tree rttree;
   struct basic_block_def *bb;
   mem_attrs *rtmem;
+  reg_attrs *rtreg;
 };
 typedef union rtunion_def rtunion;
 
@@ -174,8 +184,9 @@ struct rtx_def GTY((chain_next ("RTX_NEXT (&%h)"),
      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;
      cleared before used.
-     1 in an INSN or related rtx if this insn is dead code.  Valid only during
-     dead-code elimination phase; cleared before use.  */
+     1 in an INSN, JUMP_INSN or CALL_INSN or related rtx if this insn is
+     dead code.  Valid only during dead-code elimination phase; cleared
+     before use.  */
   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'.
@@ -262,13 +273,6 @@ struct rtvec_def GTY(()) {
 /* Predicate yielding nonzero iff X is a barrier insn.  */
 #define BARRIER_P(X) (GET_CODE (X) == BARRIER)
 
-/* Predicate yielding nonzero iff X is cc0.  */
-#ifdef HAVE_cc0
-#define CC0_P(X) ((X) == cc0_rtx)
-#else
-#define CC0_P(X) 0
-#endif
-
 /* 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 || \
@@ -498,7 +502,8 @@ do {                                \
 #define X0BBDEF(RTX, N)           (RTL_CHECK1 (RTX, N, '0').bb)
 #define X0ADVFLAGS(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_addr_diff_vec_flags)
 #define X0CSELIB(RTX, N)   (RTL_CHECK1 (RTX, N, '0').rt_cselib)
-#define X0MEMATTR(RTX, N)  (RTL_CHECK1 (RTX, N, '0').rtmem)
+#define X0MEMATTR(RTX, N)  (RTL_CHECKC1 (RTX, N, MEM).rtmem)
+#define X0REGATTR(RTX, N)  (RTL_CHECKC1 (RTX, N, REG).rtreg)
 
 #define XCWINT(RTX, N, C)     (RTL_CHECKC1 (RTX, N, C).rtwint)
 #define XCINT(RTX, N, C)      (RTL_CHECKC1 (RTX, N, C).rtint)
@@ -578,7 +583,7 @@ do {                                \
 /* 1 if RTX is an insn that is dead code.  Valid only for dead-code
    elimination phase.  */
 #define INSN_DEAD_CODE_P(RTX)                                          \
-  (RTL_FLAG_CHECK1("INSN_DEAD_CODE_P", (RTX), INSN)->in_struct)
+  (RTL_FLAG_CHECK3("INSN_DEAD_CODE_P", (RTX), INSN, CALL_INSN, JUMP_INSN)->in_struct)
 
 /* 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
@@ -1127,6 +1132,10 @@ do {                                             \
    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)
+
 /* 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 the same alias set.  This value is set in a
@@ -1160,6 +1169,14 @@ do {                                             \
  : (STRICT_ALIGNMENT && GET_MODE (RTX) != BLKmode                      \
     ? GET_MODE_ALIGNMENT (GET_MODE (RTX)) : BITS_PER_UNIT))
 
+/* 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)
+
 /* 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),                        \
@@ -1345,6 +1362,7 @@ extern int ceil_log2                      PARAMS ((unsigned HOST_WIDE_INT));
 
 /* In builtins.c */
 extern rtx expand_builtin_expect_jump  PARAMS ((tree, rtx, rtx));
+extern void purge_builtin_constant_p   PARAMS ((void));
 
 /* In explow.c */
 extern void set_stack_check_libfunc PARAMS ((rtx));
@@ -1363,6 +1381,8 @@ extern rtx copy_insn                      PARAMS ((rtx));
 extern rtx gen_int_mode                        PARAMS ((HOST_WIDE_INT,
                                                 enum machine_mode));
 extern rtx emit_copy_of_insn_after     PARAMS ((rtx, rtx));
+extern void set_reg_attrs_from_mem     PARAMS ((rtx, rtx));
+extern void set_mem_attrs_from_reg     PARAMS ((rtx, rtx));
 
 /* In rtl.c */
 extern rtx rtx_alloc                   PARAMS ((RTX_CODE));
@@ -1380,6 +1400,8 @@ extern int rtx_equal_p                  PARAMS ((rtx, rtx));
 /* In emit-rtl.c */
 extern rtvec gen_rtvec_v               PARAMS ((int, rtx *));
 extern rtx gen_reg_rtx                 PARAMS ((enum machine_mode));
+extern rtx gen_rtx_REG_offset          PARAMS ((rtx, enum machine_mode,
+                                                unsigned int, int));
 extern rtx gen_label_rtx               PARAMS ((void));
 extern int subreg_hard_regno           PARAMS ((rtx, int));
 extern rtx gen_lowpart_common          PARAMS ((enum machine_mode, rtx));
@@ -2085,6 +2107,7 @@ extern rtx expand_mult_highpart           PARAMS ((enum machine_mode, rtx,
 /* In gcse.c */
 #ifdef BUFSIZ
 extern int gcse_main                   PARAMS ((rtx, FILE *));
+extern int bypass_jumps                        PARAMS ((FILE *));
 #endif
 
 /* In global.c */
@@ -2250,6 +2273,7 @@ extern void init_alias_once               PARAMS ((void));
 extern void init_alias_analysis                PARAMS ((void));
 extern void end_alias_analysis         PARAMS ((void));
 extern rtx addr_side_effect_eval       PARAMS ((rtx, int, int));
+extern bool memory_modified_in_insn_p  PARAMS ((rtx, rtx));
 
 /* In sibcall.c */
 typedef enum {