OSDN Git Service

* cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
[pf3gnuchains/gcc-fork.git] / gcc / tree.h
index 1bf3cd2..a9a450d 100644 (file)
@@ -23,7 +23,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #define GCC_TREE_H
 
 #include "machmode.h"
-#include "version.h"
 #include "input.h"
 #include "statistics.h"
 
@@ -35,7 +34,7 @@ enum tree_code {
 #include "tree.def"
 
   LAST_AND_UNUSED_TREE_CODE    /* A convenient way to get a value for
-                                  NUM_TREE_CODE.  */
+                                  NUM_TREE_CODES.  */
 };
 
 #undef DEFTREECODE
@@ -54,7 +53,7 @@ enum tree_code {
 extern const char tree_code_type[];
 #define TREE_CODE_CLASS(CODE)  tree_code_type[(int) (CODE)]
 
-/* Returns nonzero iff CLASS is not the tree code of a type. */
+/* Returns nonzero iff CLASS is not the tree code of a type.  */
 
 #define IS_NON_TYPE_CODE_CLASS(CLASS) (strchr ("xbcdr<12se", (CLASS)) != 0)
 
@@ -210,8 +209,7 @@ struct tree_common GTY(())
        TREE_SYMBOL_REFERENCED in
            IDENTIFIER_NODE
        CLEANUP_EH_ONLY in
-           TARGET_EXPR, WITH_CLEANUP_EXPR, CLEANUP_STMT,
-          TREE_LIST elements of a block's cleanup list.
+           TARGET_EXPR, WITH_CLEANUP_EXPR
        ASM_INPUT_P in
            ASM_EXPR
        EH_FILTER_MUST_NOT_THROW in EH_FILTER_EXPR
@@ -306,6 +304,9 @@ struct tree_common GTY(())
        TYPE_ALIGN_OK in
           ..._TYPE
 
+       TREE_THIS_NOTRAP in
+          INDIRECT_REF
+
    deprecated_flag:
 
        TREE_DEPRECATED in
@@ -341,15 +342,31 @@ struct tree_common GTY(())
 #define TREE_CHECK(T, CODE) __extension__                              \
 ({  const tree __t = (T);                                              \
     if (TREE_CODE (__t) != (CODE))                                     \
-      tree_check_failed (__t, (CODE), __FILE__, __LINE__, __FUNCTION__); \
+      tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__,        \
+                        (CODE), 0);                                    \
+    __t; })
+
+#define TREE_NOT_CHECK(T, CODE) __extension__                          \
+({  const tree __t = (T);                                              \
+    if (TREE_CODE (__t) == (CODE))                                     \
+      tree_not_check_failed (__t, __FILE__, __LINE__, __FUNCTION__,    \
+                            (CODE), 0);                                \
     __t; })
 
 #define TREE_CHECK2(T, CODE1, CODE2) __extension__                     \
 ({  const tree __t = (T);                                              \
     if (TREE_CODE (__t) != (CODE1)                                     \
        && TREE_CODE (__t) != (CODE2))                                  \
-      tree_check2_failed (__t, (CODE1), (CODE2), __FILE__, __LINE__,   \
-                         __FUNCTION__);                                \
+      tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__,                \
+                        (CODE1), (CODE2), 0);                          \
+    __t; })
+
+#define TREE_NOT_CHECK2(T, CODE1, CODE2) __extension__                 \
+({  const tree __t = (T);                                              \
+    if (TREE_CODE (__t) == (CODE1)                                     \
+       || TREE_CODE (__t) == (CODE2))                                  \
+      tree_not_check_failed (__t, __FILE__, __LINE__, __FUNCTION__,    \
+                            (CODE1), (CODE2), 0);                      \
     __t; })
 
 #define TREE_CHECK3(T, CODE1, CODE2, CODE3) __extension__              \
@@ -357,8 +374,17 @@ struct tree_common GTY(())
     if (TREE_CODE (__t) != (CODE1)                                     \
        && TREE_CODE (__t) != (CODE2)                                   \
        && TREE_CODE (__t) != (CODE3))                                  \
-      tree_check3_failed (__t, (CODE1), (CODE2), (CODE3), __FILE__,    \
-                         __LINE__, __FUNCTION__);                      \
+      tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__,                \
+                            (CODE1), (CODE2), (CODE3), 0);             \
+    __t; })
+
+#define TREE_NOT_CHECK3(T, CODE1, CODE2, CODE3) __extension__          \
+({  const tree __t = (T);                                              \
+    if (TREE_CODE (__t) == (CODE1)                                     \
+       || TREE_CODE (__t) == (CODE2)                                   \
+       || TREE_CODE (__t) == (CODE3))                                  \
+      tree_not_check_failed (__t, __FILE__, __LINE__, __FUNCTION__,    \
+                            (CODE1), (CODE2), (CODE3), 0);             \
     __t; })
 
 #define TREE_CHECK4(T, CODE1, CODE2, CODE3, CODE4) __extension__       \
@@ -367,8 +393,18 @@ struct tree_common GTY(())
        && TREE_CODE (__t) != (CODE2)                                   \
        && TREE_CODE (__t) != (CODE3)                                   \
        && TREE_CODE (__t) != (CODE4))                                  \
-      tree_check4_failed (__t, (CODE1), (CODE2), (CODE3), (CODE4),     \
-                          __FILE__, __LINE__, __FUNCTION__);           \
+      tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__,                \
+                            (CODE1), (CODE2), (CODE3), (CODE4), 0);    \
+    __t; })
+
+#define NON_TREE_CHECK4(T, CODE1, CODE2, CODE3, CODE4) __extension__   \
+({  const tree __t = (T);                                              \
+    if (TREE_CODE (__t) == (CODE1)                                     \
+       || TREE_CODE (__t) == (CODE2)                                   \
+       || TREE_CODE (__t) == (CODE3)                                   \
+       || TREE_CODE (__t) == (CODE4))                                  \
+      tree_not_check_failed (__t, __FILE__, __LINE__, __FUNCTION__,    \
+                            (CODE1), (CODE2), (CODE3), (CODE4), 0);    \
     __t; })
 
 #define TREE_CHECK5(T, CODE1, CODE2, CODE3, CODE4, CODE5) __extension__        \
@@ -378,8 +414,19 @@ struct tree_common GTY(())
        && TREE_CODE (__t) != (CODE3)                                   \
        && TREE_CODE (__t) != (CODE4)                                   \
        && TREE_CODE (__t) != (CODE5))                                  \
-      tree_check5_failed (__t, (CODE1), (CODE2), (CODE3), (CODE4),     \
-                         (CODE5), __FILE__, __LINE__, __FUNCTION__);   \
+      tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__,                \
+                            (CODE1), (CODE2), (CODE3), (CODE4), (CODE5), 0);\
+    __t; })
+
+#define TREE_NOT_CHECK5(T, CODE1, CODE2, CODE3, CODE4, CODE5) __extension__ \
+({  const tree __t = (T);                                              \
+    if (TREE_CODE (__t) == (CODE1)                                     \
+       || TREE_CODE (__t) == (CODE2)                                   \
+       || TREE_CODE (__t) == (CODE3)                                   \
+       || TREE_CODE (__t) == (CODE4)                                   \
+       || TREE_CODE (__t) == (CODE5))                                  \
+      tree_not_check_failed (__t, __FILE__, __LINE__, __FUNCTION__,    \
+                            (CODE1), (CODE2), (CODE3), (CODE4), (CODE5), 0);\
     __t; })
 
 #define TREE_CLASS_CHECK(T, CLASS) __extension__                       \
@@ -407,44 +454,23 @@ struct tree_common GTY(())
                               __FUNCTION__);                           \
     __t; })
 
-#define EREF_NODE_CHECK(t) __extension__                               \
-({  const tree __t = t;                                                        \
-    if (TREE_CODE (__t) != EPHI_NODE                                    \
-        && TREE_CODE (__t) != EKILL_NODE                               \
-        && TREE_CODE (__t) != EUSE_NODE                                        \
-       && TREE_CODE (__t) != EEXIT_NODE)                               \
-      tree_check_failed (__t, TREE_CODE (t),                           \
-                        __FILE__, __LINE__, __FUNCTION__);             \
-    __t; })
-
 #define TREE_VEC_ELT_CHECK(T, I) __extension__                         \
 (*({const tree __t = (T);                                              \
     const int __i = (I);                                               \
     if (TREE_CODE (__t) != TREE_VEC)                                   \
-      tree_check_failed (__t, TREE_VEC,                                        \
-                        __FILE__, __LINE__, __FUNCTION__);             \
+      tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__,                \
+                        TREE_VEC, 0);                                  \
     if (__i < 0 || __i >= __t->vec.length)                             \
       tree_vec_elt_check_failed (__i, __t->vec.length,                 \
                                 __FILE__, __LINE__, __FUNCTION__);     \
     &__t->vec.a[__i]; }))
 
-#define EPHI_NODE_ELT_CHECK(t, i) __extension__                                \
-(*({const tree __t = t;                                                        \
-    const int __i = (i);                                               \
-    if (TREE_CODE (__t) != EPHI_NODE)                                  \
-      tree_check_failed (__t, EPHI_NODE,                                       \
-                        __FILE__, __LINE__, __FUNCTION__);             \
-    if (__i < 0 || __i >= __t->ephi.capacity)                          \
-      ephi_node_elt_check_failed (__i, __t->ephi.num_args,             \
-                                __FILE__, __LINE__, __FUNCTION__);     \
-    &__t->ephi.a[__i]; }))
-
 #define PHI_NODE_ELT_CHECK(t, i) __extension__                         \
 (*({const tree __t = t;                                                        \
     const int __i = (i);                                               \
     if (TREE_CODE (__t) != PHI_NODE)                                   \
-      tree_check_failed (__t, PHI_NODE,                                        \
-                        __FILE__, __LINE__, __FUNCTION__);             \
+      tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__,        \
+                        PHI_NODE, 0);                                  \
     if (__i < 0 || __i >= __t->phi.capacity)                           \
       phi_node_elt_check_failed (__i, __t->phi.num_args,               \
                                 __FILE__, __LINE__, __FUNCTION__);     \
@@ -463,7 +489,7 @@ struct tree_common GTY(())
 (*({const tree __t = (T);                                              \
     const int __i = (I);                                               \
     if (TREE_CODE (__t) != CODE)                                       \
-      tree_check_failed (__t, CODE, __FILE__, __LINE__, __FUNCTION__); \
+      tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, (CODE), 0);\
     if (__i < 0 || __i >= TREE_CODE_LENGTH (CODE))                     \
       tree_operand_check_failed (__i, (CODE),                          \
                                 __FILE__, __LINE__, __FUNCTION__);     \
@@ -474,30 +500,16 @@ struct tree_common GTY(())
  ({const tree __t = (T);                                               \
     const int __i = (I);                                               \
     if (TREE_CODE (__t) != (CODE))                                     \
-      tree_check_failed (__t, (CODE), __FILE__, __LINE__, __FUNCTION__); \
+      tree_check_failed (__t, __FILE__, __LINE__, __FUNCTION__, (CODE), 0); \
     if (__i < 0 || __i >= TREE_CODE_LENGTH ((CODE)))                   \
       tree_operand_check_failed (__i, (CODE),                          \
                                 __FILE__, __LINE__, __FUNCTION__);     \
     &__t->exp.operands[__i]; }))
 
-extern void tree_check_failed (const tree, enum tree_code,
-                              const char *, int, const char *)
-    ATTRIBUTE_NORETURN;
-extern void tree_check2_failed (const tree, enum tree_code, enum tree_code,
-                              const char *, int, const char *)
-    ATTRIBUTE_NORETURN;
-extern void tree_check3_failed (const tree, enum tree_code, enum tree_code,
-                               enum tree_code, const char *, int,
-                               const char *)
-    ATTRIBUTE_NORETURN;
-extern void tree_check4_failed (const tree, enum tree_code, enum tree_code,
-                               enum tree_code, enum tree_code,
-                               const char *, int, const char *)
-    ATTRIBUTE_NORETURN;
-extern void tree_check5_failed (const tree, enum tree_code, enum tree_code,
-                               enum tree_code, enum tree_code, enum tree_code,
-                               const char *, int, const char *)
-    ATTRIBUTE_NORETURN;
+extern void tree_check_failed (const tree, const char *, int, const char *,
+                              ...) ATTRIBUTE_NORETURN;
+extern void tree_not_check_failed (const tree, const char *, int, const char *,
+                                  ...) ATTRIBUTE_NORETURN;
 extern void tree_class_check_failed (const tree, int,
                                     const char *, int, const char *)
     ATTRIBUTE_NORETURN;
@@ -507,10 +519,6 @@ extern void tree_vec_elt_check_failed (int, int, const char *,
 extern void phi_node_elt_check_failed (int, int, const char *,
                                       int, const char *)
     ATTRIBUTE_NORETURN;
-extern void ephi_node_elt_check_failed (int, int, const char *,
-                                       int, const char *)
-    ATTRIBUTE_NORETURN;
-
 extern void tree_operand_check_failed (int, enum tree_code,
                                       const char *, int, const char *)
     ATTRIBUTE_NORETURN;
@@ -518,10 +526,15 @@ extern void tree_operand_check_failed (int, enum tree_code,
 #else /* not ENABLE_TREE_CHECKING, or not gcc */
 
 #define TREE_CHECK(T, CODE)                    (T)
+#define TREE_NOT_CHECK(T, CODE)                        (T)
 #define TREE_CHECK2(T, CODE1, CODE2)           (T)
+#define TREE_NOT_CHECK2(T, CODE1, CODE2)       (T)
 #define TREE_CHECK3(T, CODE1, CODE2, CODE3)    (T)
+#define TREE_NOT_CHECK3(T, CODE1, CODE2, CODE3)        (T)
 #define TREE_CHECK4(T, CODE1, CODE2, CODE3, CODE4) (T)
+#define TREE_NOT_CHECK4(T, CODE1, CODE2, CODE3, CODE4) (T)
 #define TREE_CHECK5(T, CODE1, CODE2, CODE3, CODE4, CODE5) (T)
+#define TREE_NOT_CHECK5(T, CODE1, CODE2, CODE3, CODE4, CODE5) (T)
 #define TREE_CLASS_CHECK(T, CODE)              (T)
 #define EXPR_CHECK(T)                          (T)
 #define NON_TYPE_CHECK(T)                      (T)
@@ -529,9 +542,7 @@ extern void tree_operand_check_failed (int, enum tree_code,
 #define TREE_OPERAND_CHECK(T, I)               ((T)->exp.operands[I])
 #define TREE_OPERAND_CHECK_CODE(T, CODE, I)    ((T)->exp.operands[I])
 #define TREE_RTL_OPERAND_CHECK(T, CODE, I)  (*(rtx *) &((T)->exp.operands[I]))
-#define EREF_NODE_CHECK(T)             (T)
 #define PHI_NODE_ELT_CHECK(T, i)       ((T)->phi.a[i])
-#define EPHI_NODE_ELT_CHECK(T, i)      ((T)->ephi.a[i])
 
 #endif
 
@@ -718,9 +729,9 @@ extern void tree_operand_check_failed (int, enum tree_code,
    should be cleaned up some day.  */
 #define TREE_STATIC(NODE) ((NODE)->common.static_flag)
 
-/* In a TARGET_EXPR, WITH_CLEANUP_EXPR, CLEANUP_STMT, or element of a
-   block's cleanup list, means that the pertinent cleanup should only be
-   executed if an exception is thrown, not on normal exit of its scope.  */
+/* In a TARGET_EXPR, WITH_CLEANUP_EXPR, means that the pertinent cleanup
+   should only be executed if an exception is thrown, not on normal exit
+   of its scope.  */
 #define CLEANUP_EH_ONLY(NODE) ((NODE)->common.static_flag)
 
 /* In an expr node (usually a conversion) this means the node was made
@@ -789,6 +800,12 @@ extern void tree_operand_check_failed (int, enum tree_code,
    If this bit is set in an expression, so is TREE_SIDE_EFFECTS.  */
 #define TREE_THIS_VOLATILE(NODE) ((NODE)->common.volatile_flag)
 
+/* Nonzero means this node will not trap.  In an INDIRECT_REF, means
+   accessing the memory pointed to won't generate a trap.  However,
+   this only applies to an object when used appropriately: it doesn't
+   mean that writing a READONLY mem won't trap.  */
+#define TREE_THIS_NOTRAP(NODE) ((NODE)->common.nothrow_flag)
+
 /* In a VAR_DECL, PARM_DECL or FIELD_DECL, or any kind of ..._REF node,
    nonzero means it may not be the lhs of an assignment.  */
 #define TREE_READONLY(NODE) (NON_TYPE_CHECK (NODE)->common.readonly_flag)
@@ -1008,7 +1025,7 @@ struct tree_vec GTY(())
 
 /* Define fields and accessors for some nodes that represent expressions.  */
 
-/* Non-zero if NODE is an emtpy statement (NOP_EXPR <0>).  */
+/* Nonzero if NODE is an empty statement (NOP_EXPR <0>).  */
 #define IS_EMPTY_STMT(NODE)    (TREE_CODE (NODE) == NOP_EXPR \
                                 && VOID_TYPE_P (TREE_TYPE (NODE)) \
                                 && integer_zerop (TREE_OPERAND (NODE, 0)))
@@ -1085,6 +1102,10 @@ struct tree_vec GTY(())
 #define TARGET_EXPR_INITIAL(NODE) TREE_OPERAND_CHECK_CODE (NODE, TARGET_EXPR, 1)
 #define TARGET_EXPR_CLEANUP(NODE) TREE_OPERAND_CHECK_CODE (NODE, TARGET_EXPR, 2)
 
+/* DECL_EXPR accessor. This gives access to the DECL associated with
+   the given declaration statement.  */
+#define DECL_EXPR_DECL(NODE)    TREE_OPERAND (DECL_EXPR_CHECK (NODE), 0)
+
 #define EXIT_EXPR_COND(NODE)        TREE_OPERAND (EXIT_EXPR_CHECK (NODE), 0)
 
 /* SWITCH_EXPR accessors. These give access to the condition, body and
@@ -1094,7 +1115,7 @@ struct tree_vec GTY(())
 #define SWITCH_BODY(NODE)       TREE_OPERAND ((NODE), 1)
 #define SWITCH_LABELS(NODE)     TREE_OPERAND ((NODE), 2)
 
-/* CASE_LABEL accessors. These give access to the high and low values
+/* CASE_LABEL_EXPR accessors. These give access to the high and low values
    of a case label, respectively.  */
 #define CASE_LOW(NODE)          TREE_OPERAND ((NODE), 0)
 #define CASE_HIGH(NODE)         TREE_OPERAND ((NODE), 1)
@@ -1109,7 +1130,7 @@ struct tree_vec GTY(())
    a goto statement.  */
 #define GOTO_DESTINATION(NODE)  TREE_OPERAND ((NODE), 0)
 
-/* ASM_STMT accessors. ASM_STRING returns a STRING_CST for the
+/* ASM_EXPR accessors. ASM_STRING returns a STRING_CST for the
    instruction (e.g., "mov x, y"). ASM_OUTPUTS, ASM_INPUTS, and
    ASM_CLOBBERS represent the outputs, inputs, and clobbers for the
    statement.  */
@@ -1143,6 +1164,11 @@ struct tree_vec GTY(())
 #define EH_FILTER_FAILURE(NODE)        TREE_OPERAND (EH_FILTER_EXPR_CHECK (NODE), 1)
 #define EH_FILTER_MUST_NOT_THROW(NODE) TREE_STATIC (EH_FILTER_EXPR_CHECK (NODE))
 
+/* OBJ_TYPE_REF accessors.  */
+#define OBJ_TYPE_REF_EXPR(NODE)          TREE_OPERAND (OBJ_TYPE_REF_CHECK (NODE), 0)
+#define OBJ_TYPE_REF_OBJECT(NODE) TREE_OPERAND (OBJ_TYPE_REF_CHECK (NODE), 1)
+#define OBJ_TYPE_REF_TOKEN(NODE)  TREE_OPERAND (OBJ_TYPE_REF_CHECK (NODE), 2)
+
 struct tree_exp GTY(())
 {
   struct tree_common common;
@@ -1175,12 +1201,47 @@ struct tree_exp GTY(())
 #define SSA_NAME_OCCURS_IN_ABNORMAL_PHI(NODE) \
     SSA_NAME_CHECK (NODE)->common.asm_written_flag
 
-/* Nonzero if this SSA_NAME expression is currently on the freelist of
+/* Nonzero if this SSA_NAME expression is currently on the free list of
    SSA_NAMES.  Using NOTHROW_FLAG seems reasonably safe since throwing
    has no meaning for an SSA_NAME.  */
 #define SSA_NAME_IN_FREE_LIST(NODE) \
     SSA_NAME_CHECK (NODE)->common.nothrow_flag
 
+/* Attributes for SSA_NAMEs for pointer-type variables.  */
+#define SSA_NAME_PTR_INFO(N) \
+    SSA_NAME_CHECK (N)->ssa_name.ptr_info
+
+/* Get the value of this SSA_NAME, if available.  */
+#define SSA_NAME_VALUE(N) \
+   SSA_NAME_CHECK (N)->ssa_name.value_handle
+
+#ifndef GCC_BITMAP_H
+struct bitmap_head_def;
+#endif
+
+/* Aliasing information for SSA_NAMEs representing pointer variables.  */
+struct ptr_info_def GTY(())
+{
+  /* Nonzero if points-to analysis couldn't determine where this pointer
+     is pointing to.  */
+  unsigned int pt_anything : 1;
+
+  /* Nonzero if this pointer is the result of a call to malloc.  */
+  unsigned int pt_malloc : 1;
+
+  /* Nonzero if the value of this pointer escapes the current function.  */
+  unsigned int value_escapes_p : 1;
+
+  /* Set of variables that this pointer may point to.  */
+  struct bitmap_head_def *pt_vars;
+
+  /* If this pointer has been dereferenced, and points-to information is
+     more precise than type-based aliasing, indirect references to this
+     pointer will be represented by this memory tag, instead of the type
+     tag computed by TBAA.  */
+  tree name_mem_tag;
+};
+
 struct tree_ssa_name GTY(())
 {
   struct tree_common common;
@@ -1190,20 +1251,31 @@ struct tree_ssa_name GTY(())
 
   /* SSA version number.  */
   unsigned int version;
+
+  /* Pointer attributes used for alias analysis.  */
+  struct ptr_info_def *ptr_info;
+
+  /* Value for SSA name used by GVN.  */ 
+  tree GTY((skip)) value_handle;
 };
 \f
 /* In a PHI_NODE node.  */
-#define PHI_RESULT(NODE)       PHI_NODE_CHECK (NODE)->phi.result
+#define PHI_RESULT_TREE(NODE)          PHI_NODE_CHECK (NODE)->phi.result
+#define PHI_ARG_DEF_TREE(NODE, I)      PHI_NODE_ELT_CHECK (NODE, I).def
+
+/* PHI_NODEs for each basic block are chained together in a single linked
+   list.  The head of the list is linked from the block annotation, and
+   the link to the next PHI is in PHI_CHAIN.  */
+#define PHI_CHAIN(NODE)                TREE_CHAIN (PHI_NODE_CHECK (NODE))
 
 /* Nonzero if the PHI node was rewritten by a previous pass through the
    SSA renamer.  */
-#define PHI_REWRITTEN(NODE)    PHI_NODE_CHECK (NODE)->phi.rewritten
-#define PHI_NUM_ARGS(NODE)     PHI_NODE_CHECK (NODE)->phi.num_args
-#define PHI_ARG_CAPACITY(NODE) PHI_NODE_CHECK (NODE)->phi.capacity
-#define PHI_ARG_ELT(NODE, I)   PHI_NODE_ELT_CHECK (NODE, I)
-#define PHI_ARG_EDGE(NODE, I)  PHI_NODE_ELT_CHECK (NODE, I).e
-#define PHI_ARG_DEF(NODE, I)   PHI_NODE_ELT_CHECK (NODE, I).def
-#define PHI_ARG_NONZERO(NODE, I) PHI_NODE_ELT_CHECK (NODE, I).nonzero
+#define PHI_REWRITTEN(NODE)            PHI_NODE_CHECK (NODE)->phi.rewritten
+#define PHI_NUM_ARGS(NODE)             PHI_NODE_CHECK (NODE)->phi.num_args
+#define PHI_ARG_CAPACITY(NODE)         PHI_NODE_CHECK (NODE)->phi.capacity
+#define PHI_ARG_ELT(NODE, I)           PHI_NODE_ELT_CHECK (NODE, I)
+#define PHI_ARG_EDGE(NODE, I)          PHI_NODE_ELT_CHECK (NODE, I).e
+#define PHI_ARG_NONZERO(NODE, I)       PHI_NODE_ELT_CHECK (NODE, I).nonzero
 
 struct edge_def;
 
@@ -1231,158 +1303,6 @@ struct tree_phi_node GTY(())
 
 struct varray_head_tag;
 
-struct tree_eref_common GTY(())
-{
-  struct tree_common common;
-  
-  /* SSAPRE: ID for the EREF. Used only for sorting erefs inside a
-     block.  */
-  int id;
-
-  /* SSAPRE: Name for the EREF.  Used only for printing.*/
-  tree name;
-  
-  /* SSAPRE: The statement associated with this expression reference.  */
-  tree stmt;
-  
-  /* SSAPRE: True if expression needs to be saved to a temporary. */
-  unsigned int save:1;
-  
-  /* SSAPRE: True if expression needs to be reloaded from a temporary.  */
-  unsigned int reload:1;
-
-  /* SSAPRE: Redundancy class of expression.  */
-  unsigned int class;
-  
-  /* SSAPRE: Processed flag 1. */
-  unsigned int processed:1;
-
-  /* SSAPRE: True if expression is injured.  */
-  unsigned int injured:1;
-
-  /* SSAPRE: Temporary assigned to this reference.  */
-  tree temp;
-
-};
-
-struct tree_euse_node GTY(())
-{
-  struct tree_eref_common common;
-  
-  /* SSAPRE: Definition for this use. */
-  tree def;
-  
-  /* SSAPRE: True if this is an EPHI operand occurrence. */
-  unsigned int op_occurrence:1;
-  
-  /* SSAPRE: True if expression was inserted as a PHI operand occurrence.  */
-  unsigned int inserted:1;
-
-  /* SSAPRE: True if expression occurs as a lvalue.  */
-  unsigned int lval:1;
-};
-struct ephi_arg_d GTY(())
-{
-
-  /* SSAPRE: True if this phi argument is injured.  */
-  unsigned int injured:1;
-
-  /* SSAPRE: True if there is a real occurrence for this phi argument. */
-  unsigned int has_real_use:1;
-
-  /* SSAPRE: True if delayed renaming is required on this phi argument.  */
-  unsigned int delayed_rename:1;
-  
-  /* SSAPRE: Processed 2 flag for this phi argument.  */
-  unsigned int processed2:1;
-
-  /* SSAPRE: True if this operand stops forward movement.  */
-  unsigned int stops:1;
-  /* SSAPRE: Definition of this phi operand. */
-  tree def;
-  
-  /* SSAPRE: Phi predecessor for this phi operand.  */
-  tree pred;
-
-  struct edge_def * GTY((skip (""))) e;
-};
-struct tree_ephi_node GTY(())
-{
-  struct tree_eref_common common;
-
-  /* SSAPRE: True if PHI is downsafe.  */
-  unsigned int downsafe:1;
-  
-  /* SSAPRE: True if PHI is cant_be_avail.  */
-  unsigned int cant_be_avail:1;
-
-  /* SSAPRE: True if PHI is dead. */
-  unsigned int dead:1;
-  
-  /* SSAPRE: True if PHI is pointless or identical to some value. */
-  unsigned int identity:1;
-
-  /* SSAPRE: True if replacing occurrence known for ESSA minimization.  */
-  unsigned int rep_occur_known:1;
-  
-  /* SSAPRE: True if PHI is pointless, but is also injured.  */
-  unsigned int ident_injured:1;
-  
-  /* SSAPRE: True if this PHI stops forward movement.  */
-  unsigned int stops:1;
-
-  /* SSAPRE: If PHI's replacing occurrence is known, this is it.  */
-  tree identical_to;
-
-  /* SSAPRE: Uses of this ephi.  */
-  struct varray_head_tag *uses;
-
-  int num_args;
-  int capacity;
-  struct ephi_arg_d GTY ((length ("((tree)&%h)->ephi.capacity"))) a[1];
-
-};
-/* In both EPHI's and EUSES */
-#define EREF_PROCESSED(NODE)    EREF_NODE_CHECK (NODE)->eref.processed
-#define EREF_ID(NODE)           EREF_NODE_CHECK (NODE)->eref.id
-#define EREF_NAME(NODE)         EREF_NODE_CHECK (NODE)->eref.name
-#define EREF_STMT(NODE)         EREF_NODE_CHECK (NODE)->eref.stmt
-#define EREF_RELOAD(NODE)       EREF_NODE_CHECK (NODE)->eref.reload
-#define EREF_SAVE(NODE)         EREF_NODE_CHECK (NODE)->eref.save
-#define EREF_CLASS(NODE)        EREF_NODE_CHECK (NODE)->eref.class
-#define EREF_INJURED(NODE)      EREF_NODE_CHECK (NODE)->eref.injured
-#define EREF_TEMP(NODE)         EREF_NODE_CHECK (NODE)->eref.temp
-
-/* In a EUSE_NODE node.  */
-#define EUSE_DEF(NODE)          EUSE_NODE_CHECK (NODE)->euse.def
-#define EUSE_PHIOP(NODE)        EUSE_NODE_CHECK (NODE)->euse.op_occurrence
-#define EUSE_INSERTED(NODE)     EUSE_NODE_CHECK (NODE)->euse.inserted
-#define EUSE_LVAL(NODE)         EUSE_NODE_CHECK (NODE)->euse.lval
-
-/* In a EPHI_NODE node.  */
-#define EPHI_NUM_ARGS(NODE)    EPHI_NODE_CHECK (NODE)->ephi.num_args
-#define EPHI_ARG_CAPACITY(NODE)        EPHI_NODE_CHECK (NODE)->ephi.capacity
-#define EPHI_ARG_ELT(NODE, I)  EPHI_NODE_ELT_CHECK (NODE, I)
-#define EPHI_ARG_EDGE(NODE, I) EPHI_NODE_ELT_CHECK (NODE, I).e
-#define EPHI_ARG_PRED(NODE, I)  EPHI_NODE_ELT_CHECK (NODE, I).pred
-#define EPHI_ARG_DEF(NODE, I)  EPHI_NODE_ELT_CHECK (NODE, I).def
-#define EPHI_ARG_INJURED(NODE, I) EPHI_NODE_ELT_CHECK (NODE, I).injured
-#define EPHI_ARG_DELAYED_RENAME(NODE, I) EPHI_NODE_ELT_CHECK (NODE, I).delayed_rename
-#define EPHI_ARG_HAS_REAL_USE(NODE, I) EPHI_NODE_ELT_CHECK (NODE, I).has_real_use
-#define EPHI_ARG_STOPS(NODE, I) EPHI_NODE_ELT_CHECK (NODE, I).stops
-#define EPHI_ARG_PROCESSED2(NODE, I) EPHI_NODE_ELT_CHECK (NODE, I).processed2
-#define EPHI_IDENTITY(NODE)     EPHI_NODE_CHECK (NODE)->ephi.identity
-#define EPHI_IDENT_INJURED(NODE) EPHI_NODE_CHECK (NODE)->ephi.ident_injured
-
-#define EPHI_REP_OCCUR_KNOWN(NODE) EPHI_NODE_CHECK (NODE)->ephi.rep_occur_known
-#define EPHI_IDENTICAL_TO(NODE) EPHI_NODE_CHECK (NODE)->ephi.identical_to
-#define EPHI_DOWNSAFE(NODE)     EPHI_NODE_CHECK (NODE)->ephi.downsafe
-#define EPHI_CANT_BE_AVAIL(NODE) EPHI_NODE_CHECK (NODE)->ephi.cant_be_avail
-#define EPHI_DEAD(NODE)         EPHI_NODE_CHECK (NODE)->ephi.dead
-#define EPHI_USES(NODE)         EPHI_NODE_CHECK (NODE)->ephi.uses
-#define EPHI_STOPS(NODE)         EPHI_NODE_CHECK (NODE)->ephi.stops
-
 /* In a BLOCK node.  */
 #define BLOCK_VARS(NODE) (BLOCK_CHECK (NODE)->block.vars)
 #define BLOCK_SUBBLOCKS(NODE) (BLOCK_CHECK (NODE)->block.subblocks)
@@ -1603,7 +1523,7 @@ struct tree_block GTY(())
 #define TYPE_VECTOR_SUBPARTS(VECTOR_TYPE) \
   GET_MODE_NUNITS (VECTOR_TYPE_CHECK (VECTOR_TYPE)->type.mode)
 
-  /* Indicates that objects of this type must be initialized by calling a
+/* Indicates that objects of this type must be initialized by calling a
    function when they are created.  */
 #define TYPE_NEEDS_CONSTRUCTING(NODE) \
   (TYPE_CHECK (NODE)->type.needs_constructing_flag)
@@ -2068,8 +1988,7 @@ struct tree_type GTY(())
 #define DECL_THREAD_LOCAL(NODE) (VAR_DECL_CHECK (NODE)->decl.thread_local_flag)
 
 /* In a FUNCTION_DECL, the saved representation of the body of the
-   entire function.  Usually a COMPOUND_STMT, but in C++ this may also
-   be a RETURN_INIT, CTOR_INITIALIZER, or TRY_BLOCK.  */
+   entire function.  */
 #define DECL_SAVED_TREE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.saved_tree)
 
 /* List of FUNCTION_DECLs inlined into this function's body.  */
@@ -2184,7 +2103,7 @@ struct tree_type GTY(())
 #define DECL_POINTER_ALIAS_SET(NODE) \
   (DECL_CHECK (NODE)->decl.pointer_alias_set)
 
-/* Used to store the alias_var for a DECL node. */
+/* Used to store the alias_var for a DECL node.  */
 #define DECL_PTA_ALIASVAR(NODE) \
   (DECL_CHECK (NODE)->decl.alias_var)
 
@@ -2365,6 +2284,28 @@ struct tree_statement_list
   struct tree_statement_list_node *head;
   struct tree_statement_list_node *tail;
 };
+
+#define VALUE_HANDLE_ID(NODE)          \
+  (VALUE_HANDLE_CHECK (NODE)->value_handle.id)
+
+#define VALUE_HANDLE_EXPR_SET(NODE)    \
+  (VALUE_HANDLE_CHECK (NODE)->value_handle.expr_set)
+
+/* Defined and used in tree-ssa-pre.c.  */
+struct value_set;
+
+struct tree_value_handle GTY(())
+{
+  struct tree_common common;
+
+  /* The set of expressions represented by this handle.  */
+  struct value_set * GTY ((skip)) expr_set;
+
+  /* Unique ID for this value handle.  IDs are handed out in a
+     conveniently dense form starting at 0, so that we can make
+     bitmaps of value handles. */
+  unsigned int id;
+};
 \f
 enum tree_node_structure_enum {
   TS_COMMON,
@@ -2381,11 +2322,9 @@ enum tree_node_structure_enum {
   TS_EXP,
   TS_SSA_NAME,
   TS_PHI_NODE,
-  TS_EPHI_NODE,
-  TS_EUSE_NODE,
-  TS_EREF_NODE,
   TS_BLOCK,
   TS_STATEMENT_LIST,
+  TS_VALUE_HANDLE,
   LAST_TS_ENUM
 };
 
@@ -2410,11 +2349,9 @@ union tree_node GTY ((ptr_alias (union lang_tree_node),
   struct tree_exp GTY ((tag ("TS_EXP"))) exp;
   struct tree_ssa_name GTY ((tag ("TS_SSA_NAME"))) ssa_name;
   struct tree_phi_node GTY ((tag ("TS_PHI_NODE"))) phi;
-  struct tree_eref_common GTY ((tag ("TS_EREF_NODE"))) eref;
-  struct tree_ephi_node GTY ((tag ("TS_EPHI_NODE"))) ephi;
-  struct tree_euse_node GTY ((tag ("TS_EUSE_NODE"))) euse;
   struct tree_block GTY ((tag ("TS_BLOCK"))) block;
   struct tree_statement_list GTY ((tag ("TS_STATEMENT_LIST"))) stmt_list;
+  struct tree_value_handle GTY ((tag ("TS_VALUE_HANDLE"))) value_handle;
 };
 \f
 /* Standard named or nameless data types of the C compiler.  */
@@ -2475,6 +2412,7 @@ enum tree_index
   TI_PTRDIFF_TYPE,
   TI_VA_LIST_TYPE,
   TI_BOOLEAN_TYPE,
+  TI_FILEPTR_TYPE,
 
   TI_VOID_LIST_NODE,
 
@@ -2539,6 +2477,8 @@ extern GTY(()) tree global_trees[TI_MAX];
 #define pid_type_node                   global_trees[TI_PID_TYPE]
 #define ptrdiff_type_node              global_trees[TI_PTRDIFF_TYPE]
 #define va_list_type_node              global_trees[TI_VA_LIST_TYPE]
+/* The C type `FILE *'.  */
+#define fileptr_type_node              global_trees[TI_FILEPTR_TYPE]
 
 #define boolean_type_node              global_trees[TI_BOOLEAN_TYPE]
 #define boolean_false_node             global_trees[TI_BOOLEAN_FALSE]
@@ -2675,6 +2615,7 @@ extern void phinodes_print_statistics (void);
 extern void init_ssanames (void);
 extern void fini_ssanames (void);
 extern tree make_ssa_name (tree, tree);
+extern tree duplicate_ssa_name (tree, tree);
 extern void release_ssa_name (tree);
 #ifdef GATHER_STATISTICS
 extern void ssanames_print_statistics (void);
@@ -3168,11 +3109,6 @@ extern int integer_nonzerop (tree);
 
 extern int staticp (tree);
 
-/* Gets an error if argument X is not an lvalue.
-   Also returns 1 if X is an lvalue, 0 if not.  */
-
-extern int lvalue_or_else (tree, const char *);
-
 /* save_expr (EXP) returns an expression equivalent to EXP
    but it can be used multiple times within context CTX
    and only evaluate EXP once.  */
@@ -3309,6 +3245,21 @@ extern tree get_inner_reference (tree, HOST_WIDE_INT *, HOST_WIDE_INT *,
 
 extern int handled_component_p (tree);
 
+/* Return a tree of sizetype representing the size, in bytes, of the element
+   of EXP, an ARRAY_REF.  */
+
+extern tree array_ref_element_size (tree);
+
+/* Return a tree representing the lower bound of the array mentioned in
+   EXP, an ARRAY_REF.  */
+
+extern tree array_ref_low_bound (tree);
+
+/* Return a tree representing the offset, in bytes, of the field referenced
+   by EXP.  This does not include any offset in DECL_FIELD_BIT_OFFSET.  */
+
+extern tree component_ref_field_offset (tree);
+
 /* Given a DECL or TYPE, return the scope in which it was declared, or
    NUL_TREE if there is no containing scope.  */
 
@@ -3372,7 +3323,6 @@ extern tree get_callee_fndecl (tree);
 extern void change_decl_assembler_name (tree, tree);
 extern int type_num_arguments (tree);
 extern tree lhd_unsave_expr_now (tree);
-extern bool is_essa_node (tree);
 extern bool associative_tree_code (enum tree_code);
 extern bool commutative_tree_code (enum tree_code);
 
@@ -3384,7 +3334,7 @@ extern tree expand_start_stmt_expr (int);
 extern tree expand_end_stmt_expr (tree);
 extern void expand_expr_stmt (tree);
 extern void expand_expr_stmt_value (tree, int, int);
-extern int warn_if_unused_value (tree);
+extern int warn_if_unused_value (tree, location_t);
 extern void expand_decl_init (tree);
 extern void clear_last_expr (void);
 extern void expand_label (tree);
@@ -3399,7 +3349,6 @@ extern void expand_stack_alloc (tree, tree);
 extern rtx expand_stack_save (void);
 extern void expand_stack_restore (tree);
 extern void expand_return (tree);
-extern int optimize_tail_recursion (tree, rtx);
 extern void expand_start_bindings_and_block (int, tree);
 #define expand_start_bindings(flags) \
   expand_start_bindings_and_block(flags, NULL_TREE)
@@ -3432,6 +3381,7 @@ extern tree fold (tree);
 extern tree fold_initializer (tree);
 extern tree fold_convert (tree, tree);
 extern tree fold_single_bit_test (enum tree_code, tree, tree, tree);
+extern tree fold_abs_const (tree, tree);
 
 extern int force_fit_type (tree, int);
 extern int add_double (unsigned HOST_WIDE_INT, HOST_WIDE_INT,
@@ -3470,11 +3420,18 @@ enum operand_equal_flag
 extern int operand_equal_p (tree, tree, unsigned int);
 
 extern tree omit_one_operand (tree, tree, tree);
+extern tree omit_two_operands (tree, tree, tree, tree);
 extern tree invert_truthvalue (tree);
 extern tree nondestructive_fold_unary_to_constant (enum tree_code, tree, tree);
 extern tree nondestructive_fold_binary_to_constant (enum tree_code, tree, tree, tree);
 extern tree fold_read_from_constant_string (tree);
 extern tree int_const_binop (enum tree_code, tree, tree, int);
+extern tree build_fold_addr_expr (tree);
+extern tree build_fold_addr_expr_with_type (tree, tree);
+extern tree build_fold_indirect_ref (tree);
+
+extern bool tree_swap_operands_p (tree, tree, bool);
+extern enum tree_code swap_tree_comparison (enum tree_code);
 
 /* In builtins.c */
 extern tree fold_builtin (tree);
@@ -3484,6 +3441,7 @@ extern tree mathfn_built_in (tree, enum built_in_function fn);
 extern tree strip_float_extensions (tree);
 extern tree simplify_builtin (tree, int);
 extern tree c_strlen (tree, int);
+extern tree std_gimplify_va_arg_expr (tree, tree, tree *, tree *);
 
 /* In convert.c */
 extern tree strip_float_extensions (tree);
@@ -3550,8 +3508,6 @@ extern void preserve_temp_slots (rtx);
 extern void preserve_rtl_expr_temps (tree);
 extern int aggregate_value_p (tree, tree);
 extern void free_temps_for_rtl_expr (tree);
-extern void instantiate_virtual_regs (tree, rtx);
-extern void unshare_all_rtl (tree, rtx);
 extern void push_function_context (void);
 extern void pop_function_context (void);
 extern void push_function_context_to (tree);
@@ -3570,6 +3526,9 @@ extern void print_node_brief (FILE *, const char *, tree, int);
 extern void indent_to (FILE *, int);
 #endif
 
+/* In tree-inline.c:  */
+extern bool debug_find_tree (tree, tree);
+
 /* In expr.c */
 extern rtx expand_builtin_return_addr (enum built_in_function, int, rtx);
 extern void check_max_integer_computation_mode (tree);
@@ -3675,6 +3634,7 @@ extern tree create_artificial_label (void);
 extern void gimplify_function_tree (tree);
 extern const char *get_name (tree);
 extern tree unshare_expr (tree);
+extern void sort_case_labels (tree);
 
 /* If KIND=='I', return a suitable global initializer (constructor) name.
    If KIND=='D', return a suitable global clean-up (destructor) name.  */
@@ -3733,7 +3693,7 @@ enum tree_dump_index
                                   within it.  */
   TDI_vcg,                     /* create a VCG graph file for each 
                                   function's flowgraph.  */
-  TDI_xml,                      /* dump function call graph.   */
+  TDI_xml,                      /* dump function call graph.  */
   TDI_all,                     /* enable all the dumps.  */
   TDI_end
 };