OSDN Git Service

contrib/
[pf3gnuchains/gcc-fork.git] / gcc / tree.h
index 6ac75e6..a8edda7 100644 (file)
@@ -29,21 +29,21 @@ along with GCC; see the file COPYING3.  If not see
 #include "vec.h"
 #include "double-int.h"
 #include "alias.h"
+#include "options.h"
 
 /* Codes of tree nodes */
 
 #define DEFTREECODE(SYM, STRING, TYPE, NARGS)   SYM,
+#define END_OF_BASE_TREE_CODES LAST_AND_UNUSED_TREE_CODE,
 
 enum tree_code {
-#include "tree.def"
-
-  LAST_AND_UNUSED_TREE_CODE    /* A convenient way to get a value for
-                                  NUM_TREE_CODES.  */
+#include "all-tree.def"
+MAX_TREE_CODES
 };
 
 #undef DEFTREECODE
+#undef END_OF_BASE_TREE_CODES
 
-#define MAX_TREE_CODES 512
 extern unsigned char tree_contains_struct[MAX_TREE_CODES][64];
 #define CODE_CONTAINS_STRUCT(CODE, STRUCT) (tree_contains_struct[(CODE)][(STRUCT)])
 
@@ -69,8 +69,7 @@ enum tree_code_class {
                      but usually no interesting value.  */
   tcc_vl_exp,      /* A function call or other expression with a
                      variable-length operand vector.  */
-  tcc_expression,  /* Any other expression.  */
-  tcc_gimple_stmt  /* A GIMPLE statement.  */
+  tcc_expression   /* Any other expression.  */
 };
 
 /* Each tree code class has an associated string representation.
@@ -174,31 +173,10 @@ extern const enum tree_code_class tree_code_type[];
 #define IS_EXPR_CODE_CLASS(CLASS)\
        ((CLASS) >= tcc_reference && (CLASS) <= tcc_expression)
 
-/* Returns nonzer iff CLASS is a GIMPLE statement.  */
-
-#define IS_GIMPLE_STMT_CODE_CLASS(CLASS) ((CLASS) == tcc_gimple_stmt)
-
 /* Returns nonzero iff NODE is an expression of some kind.  */
 
 #define EXPR_P(NODE) IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (TREE_CODE (NODE)))
 
-/* Returns nonzero iff NODE is an OpenMP directive.  */
-
-#define OMP_DIRECTIVE_P(NODE)                          \
-    (TREE_CODE (NODE) == OMP_PARALLEL                  \
-     || TREE_CODE (NODE) == OMP_FOR                    \
-     || TREE_CODE (NODE) == OMP_SECTIONS               \
-     || TREE_CODE (NODE) == OMP_SECTIONS_SWITCH                \
-     || TREE_CODE (NODE) == OMP_SINGLE                 \
-     || TREE_CODE (NODE) == OMP_SECTION                        \
-     || TREE_CODE (NODE) == OMP_MASTER                 \
-     || TREE_CODE (NODE) == OMP_ORDERED                        \
-     || TREE_CODE (NODE) == OMP_CRITICAL               \
-     || TREE_CODE (NODE) == OMP_RETURN                 \
-     || TREE_CODE (NODE) == OMP_ATOMIC_LOAD                            \
-     || TREE_CODE (NODE) == OMP_ATOMIC_STORE                           \
-     || TREE_CODE (NODE) == OMP_CONTINUE)
-
 /* Number of argument-words in each kind of tree-node.  */
 
 extern const unsigned char tree_code_length[];
@@ -315,7 +293,7 @@ enum omp_clause_code
      Operand 2: OMP_CLAUSE_REDUCTION_MERGE: Stmt-list to merge private var
                 into the shared one.
      Operand 3: OMP_CLAUSE_REDUCTION_PLACEHOLDER: A dummy VAR_DECL
-                placeholder used in OMP_CLAUSE_REDUCTION_MERGE.  */
+                placeholder used in OMP_CLAUSE_REDUCTION_{INIT,MERGE}.  */
   OMP_CLAUSE_REDUCTION,
 
   /* OpenMP clause: copyin (variable_list).  */
@@ -340,7 +318,13 @@ enum omp_clause_code
   OMP_CLAUSE_ORDERED,
 
   /* OpenMP clause: default.  */
-  OMP_CLAUSE_DEFAULT
+  OMP_CLAUSE_DEFAULT,
+
+  /* OpenMP clause: collapse (constant-integer-expression).  */
+  OMP_CLAUSE_COLLAPSE,
+
+  /* OpenMP clause: untied.  */
+  OMP_CLAUSE_UNTIED
 };
 \f
 /* The definition of tree nodes fills the next several pages.  */
@@ -400,8 +384,6 @@ struct tree_base GTY(())
 
   unsigned spare : 23;
 
-  /* FIXME tuples: Eventually, we need to move this somewhere external to
-     the trees.  */
   union tree_ann_d *ann;
 };
 
@@ -412,16 +394,6 @@ struct tree_common GTY(())
   tree type;
 };
 
-/* GIMPLE_MODIFY_STMT */
-struct gimple_stmt GTY(())
-{
-  struct tree_base base;
-  location_t locus;
-  tree block;
-  /* FIXME tuples: Eventually this should be of type ``struct gimple_expr''.  */
-  tree GTY ((length ("TREE_CODE_LENGTH (TREE_CODE (&%h))"))) operands[1];
-};
-
 /* The following table lists the uses of each of the above flags and
    for which types of nodes they are defined.
 
@@ -470,7 +442,7 @@ struct gimple_stmt GTY(())
            POINTER_TYPE, REFERENCE_TYPE
 
        MOVE_NONTEMPORAL in
-           GIMPLE_MODIFY_STMT
+           MODIFY_EXPR
 
        CASE_HIGH_SEEN in
            CASE_LABEL_EXPR
@@ -516,14 +488,13 @@ struct gimple_stmt GTY(())
        DECL_BY_REFERENCE in
            PARM_DECL, RESULT_DECL
 
-       OMP_RETURN_NOWAIT in
-           OMP_RETURN
-
        OMP_SECTION_LAST in
            OMP_SECTION
 
        OMP_PARALLEL_COMBINED in
            OMP_PARALLEL
+       OMP_CLAUSE_PRIVATE_OUTER_REF in
+          OMP_CLAUSE_PRIVATE
 
    protected_flag:
 
@@ -806,14 +777,6 @@ enum tree_node_structure_enum {
                               __FUNCTION__);                           \
     __t; })
 
-#define GIMPLE_STMT_CHECK(T) __extension__                             \
-({  __typeof (T) const __t = (T);                                      \
-    char const __c = TREE_CODE_CLASS (TREE_CODE (__t));                        \
-    if (!IS_GIMPLE_STMT_CODE_CLASS (__c))                              \
-      tree_class_check_failed (__t, tcc_gimple_stmt, __FILE__, __LINE__,\
-                              __FUNCTION__);                           \
-    __t; })
-
 /* These checks have to be special cased.  */
 #define NON_TYPE_CHECK(T) __extension__                                        \
 ({  __typeof (T) const __t = (T);                                      \
@@ -833,17 +796,6 @@ enum tree_node_structure_enum {
                                 __FILE__, __LINE__, __FUNCTION__);     \
     &__t->vec.a[__i]; }))
 
-#define PHI_NODE_ELT_CHECK(T, I) __extension__                         \
-(*({__typeof (T) const __t = (T);                                      \
-    const int __i = (I);                                               \
-    if (TREE_CODE (__t) != PHI_NODE)                                   \
-      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__);     \
-    &__t->phi.a[__i]; }))
-
 #define OMP_CLAUSE_ELT_CHECK(T, I) __extension__                       \
 (*({__typeof (T) const __t = (T);                                      \
     const int __i = (I);                                               \
@@ -859,8 +811,6 @@ enum tree_node_structure_enum {
 #define TREE_OPERAND_CHECK(T, I) __extension__                         \
 (*({__typeof (T) const __t = EXPR_CHECK (T);                           \
     const int __i = (I);                                               \
-    if (GIMPLE_TUPLE_P (__t))                                          \
-      gcc_unreachable ();                                              \
     if (__i < 0 || __i >= TREE_OPERAND_LENGTH (__t))                   \
       tree_operand_check_failed (__i, __t,                             \
                                 __FILE__, __LINE__, __FUNCTION__);     \
@@ -876,15 +826,6 @@ enum tree_node_structure_enum {
                                 __FILE__, __LINE__, __FUNCTION__);     \
     &__t->exp.operands[__i]; }))
 
-/* Special checks for GIMPLE_STMT_OPERANDs.  */
-#define GIMPLE_STMT_OPERAND_CHECK(T, I) __extension__                  \
-(*({__typeof (T) const __t = GIMPLE_STMT_CHECK (T);                    \
-    const int __i = (I);                                               \
-    if (__i < 0 || __i >= TREE_OPERAND_LENGTH (__t))                   \
-      tree_operand_check_failed (__i, __t,                             \
-                                __FILE__, __LINE__, __FUNCTION__);     \
-    &__t->gstmt.operands[__i]; }))
-
 #define TREE_RTL_OPERAND_CHECK(T, CODE, I) __extension__               \
 (*(rtx *)                                                              \
  ({__typeof (T) const __t = (T);                                       \
@@ -907,8 +848,6 @@ enum tree_node_structure_enum {
 
 #define TREE_CHAIN(NODE) __extension__ \
 (*({__typeof (NODE) const __t = (NODE);                                \
-    if (GIMPLE_TUPLE_P (__t))                                  \
-      gcc_unreachable ();                                      \
     &__t->common.chain; }))
 
 /* In all nodes that are expressions, this is the data type of the expression.
@@ -917,8 +856,6 @@ enum tree_node_structure_enum {
    In VECTOR_TYPE nodes, this is the type of the elements.  */
 #define TREE_TYPE(NODE) __extension__ \
 (*({__typeof (NODE) const __t = (NODE);                                        \
-    if (GIMPLE_TUPLE_P (__t))                                  \
-      gcc_unreachable ();                                      \
     &__t->common.type; }))
 
 extern void tree_contains_struct_check_failed (const_tree,
@@ -976,14 +913,11 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
 #define TREE_CLASS_CHECK(T, CODE)              (T)
 #define TREE_RANGE_CHECK(T, CODE1, CODE2)      (T)
 #define EXPR_CHECK(T)                          (T)
-#define GIMPLE_STMT_CHECK(T)                   (T)
 #define NON_TYPE_CHECK(T)                      (T)
 #define TREE_VEC_ELT_CHECK(T, I)               ((T)->vec.a[I])
 #define TREE_OPERAND_CHECK(T, I)               ((T)->exp.operands[I])
 #define TREE_OPERAND_CHECK_CODE(T, CODE, I)    ((T)->exp.operands[I])
-#define GIMPLE_STMT_OPERAND_CHECK(T, I)                ((T)->gstmt.operands[I])
 #define TREE_RTL_OPERAND_CHECK(T, CODE, I)  (*(rtx *) &((T)->exp.operands[I]))
-#define PHI_NODE_ELT_CHECK(T, i)       ((T)->phi.a[i])
 #define OMP_CLAUSE_ELT_CHECK(T, i)             ((T)->omp_clause.ops[i])
 #define OMP_CLAUSE_RANGE_CHECK(T, CODE1, CODE2)        (T)
 #define OMP_CLAUSE_SUBCODE_CHECK(T, CODE)      (T)
@@ -1019,27 +953,6 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
   TREE_CHECK5 (T, INTEGER_TYPE, ENUMERAL_TYPE, BOOLEAN_TYPE, REAL_TYPE,        \
               FIXED_POINT_TYPE)
 
-/* Nonzero if NODE is a GIMPLE statement.  */
-#define GIMPLE_STMT_P(NODE) \
-  (TREE_CODE_CLASS (TREE_CODE ((NODE))) == tcc_gimple_stmt)
-
-/* Nonzero if NODE is a GIMPLE tuple.  */
-#define GIMPLE_TUPLE_P(NODE) (GIMPLE_STMT_P (NODE) || TREE_CODE (NODE) == PHI_NODE)
-
-/* A GIMPLE tuple that has a ``locus'' field.  */
-#define GIMPLE_TUPLE_HAS_LOCUS_P(NODE) GIMPLE_STMT_P ((NODE))
-
-/* Like TREE_OPERAND but works with GIMPLE stmt tuples as well.
-
-   If you know the NODE is a GIMPLE statement, use GIMPLE_STMT_OPERAND.  If the
-   NODE code is unknown at compile time, use this macro.  */
-#define GENERIC_TREE_OPERAND(NODE, I) *(generic_tree_operand ((NODE), (I)))
-
-/* Like TREE_TYPE but returns void_type_node for gimple tuples that have
-   no type.  */
-
-#define GENERIC_TREE_TYPE(NODE) *(generic_tree_type ((NODE)))
-
 /* Here is how primitive or already-canonicalized types' hash codes
    are made.  */
 #define TYPE_HASH(TYPE) (TYPE_UID (TYPE))
@@ -1048,16 +961,12 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
    used in hash tables which are saved to a PCH.  */
 #define TREE_HASH(NODE) ((size_t) (NODE) & 0777777)
 
-/* The TREE_CHAIN but it is able to handle tuples.  */
-#define GENERIC_NEXT(NODE)                                     \
-  (TREE_CODE (NODE) == PHI_NODE ? PHI_CHAIN (NODE) :           \
-     GIMPLE_STMT_P (NODE) ? NULL_TREE : TREE_CHAIN (NODE))
-
-/* Tests if expression is conversion expr (NOP_EXPRs or CONVERT_EXPRs).  */
+/* Tests if CODE is a conversion expr (NOP_EXPR or CONVERT_EXPR).  */
+#define CONVERT_EXPR_CODE_P(CODE)                              \
+  ((CODE) == NOP_EXPR || (CODE) == CONVERT_EXPR)
 
-#define CONVERT_EXPR_P(EXP)                                    \
-  (TREE_CODE (EXP) == NOP_EXPR                                 \
-   || TREE_CODE (EXP) == CONVERT_EXPR)
+/* Similarly, but accept an expressions instead of a tree code.  */
+#define CONVERT_EXPR_P(EXP)    CONVERT_EXPR_CODE_P (TREE_CODE (EXP))
 
 /* Generate case for NOP_EXPR, CONVERT_EXPR.  */
 
@@ -1073,7 +982,7 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
          || TREE_CODE (EXP) == NON_LVALUE_EXPR)                \
         && TREE_OPERAND (EXP, 0) != error_mark_node            \
         && (TYPE_MODE (TREE_TYPE (EXP))                        \
-            == TYPE_MODE (GENERIC_TREE_TYPE (TREE_OPERAND (EXP, 0))))) \
+            == TYPE_MODE (TREE_TYPE (TREE_OPERAND (EXP, 0))))) \
     (EXP) = TREE_OPERAND (EXP, 0)
 
 /* Like STRIP_NOPS, but don't let the signedness change either.  */
@@ -1249,7 +1158,7 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
   (CASE_LABEL_EXPR_CHECK (NODE)->base.static_flag)
 
 /* Used to mark a CALL_EXPR as not suitable for inlining.  */
-#define CALL_CANNOT_INLINE_P(NODE) ((NODE)->base.static_flag)
+#define CALL_CANNOT_INLINE_P(NODE) (CALL_EXPR_CHECK (NODE)->base.static_flag)
 
 /* In an expr node (usually a conversion) this means the node was made
    implicitly and should not lead to any sort of warning.  In a decl node,
@@ -1270,7 +1179,7 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
 
 /* In a MODIFY_EXPR, means that the store in the expression is nontemporal.  */
 #define MOVE_NONTEMPORAL(NODE) \
-  (GIMPLE_MODIFY_STMT_CHECK (NODE)->base.static_flag)
+  (EXPR_CHECK (NODE)->base.static_flag)
 
 /* In an INTEGER_CST, REAL_CST, COMPLEX_CST, or VECTOR_CST, this means
    there was an overflow in folding.  */
@@ -1578,6 +1487,9 @@ struct tree_vec GTY(())
 
 /* In a CONSTRUCTOR node.  */
 #define CONSTRUCTOR_ELTS(NODE) (CONSTRUCTOR_CHECK (NODE)->constructor.elts)
+#define CONSTRUCTOR_ELT(NODE,IDX) \
+  (VEC_index (constructor_elt, CONSTRUCTOR_ELTS (NODE), IDX))
+#define CONSTRUCTOR_NELTS(NODE) (VEC_length (constructor_elt, CONSTRUCTOR_ELTS (NODE)))
 
 /* Iterate through the vector V of CONSTRUCTOR_ELT elements, yielding the
    value of each element (stored within VAL). IX must be a scratch variable
@@ -1646,28 +1558,27 @@ struct tree_constructor GTY(())
 #define VL_EXP_OPERAND_LENGTH(NODE) \
   ((int)TREE_INT_CST_LOW (VL_EXP_CHECK (NODE)->exp.operands[0]))
 
-/* In gimple statements.  */
-#define GIMPLE_STMT_OPERAND(NODE, I) GIMPLE_STMT_OPERAND_CHECK (NODE, I)
-#define GIMPLE_STMT_LOCUS(NODE) (GIMPLE_STMT_CHECK (NODE)->gstmt.locus)
-#define GIMPLE_STMT_BLOCK(NODE) (GIMPLE_STMT_CHECK (NODE)->gstmt.block)
-
 /* In a LOOP_EXPR node.  */
 #define LOOP_EXPR_BODY(NODE) TREE_OPERAND_CHECK_CODE (NODE, LOOP_EXPR, 0)
 
 /* The source location of this expression.  Non-tree_exp nodes such as
    decls and constants can be shared among multiple locations, so
    return nothing.  */
-#define EXPR_LOCATION(NODE) expr_location ((NODE))
-#define SET_EXPR_LOCATION(NODE, FROM) set_expr_location ((NODE), (FROM))
-#define EXPR_HAS_LOCATION(NODE) expr_has_location ((NODE))
-#define EXPR_LOCUS(NODE) expr_locus ((NODE))
+#define EXPR_LOCATION(NODE) (EXPR_P ((NODE)) ? (NODE)->exp.locus : UNKNOWN_LOCATION)
+#define SET_EXPR_LOCATION(NODE, LOCUS) EXPR_CHECK ((NODE))->exp.locus = (LOCUS)
+#define EXPR_HAS_LOCATION(NODE) (EXPR_LOCATION (NODE) != UNKNOWN_LOCATION)
+#define EXPR_LOCUS(NODE) (EXPR_P (NODE) \
+                         ? CONST_CAST (source_location *, &(NODE)->exp.locus) \
+                         : (source_location *) NULL)
 #define SET_EXPR_LOCUS(NODE, FROM) set_expr_locus ((NODE), (FROM))
-#define EXPR_FILENAME(NODE) (expr_filename ((NODE)))
-#define EXPR_LINENO(NODE) (expr_lineno ((NODE)))
+#define EXPR_FILENAME(NODE) LOCATION_FILE (EXPR_CHECK ((NODE))->exp.locus)
+#define EXPR_LINENO(NODE) LOCATION_LINE (EXPR_CHECK (NODE)->exp.locus)
 
 /* True if a tree is an expression or statement that can have a
    location.  */
-#define CAN_HAVE_LOCATION_P(NODE) (EXPR_P (NODE) || GIMPLE_STMT_P (NODE))
+#define CAN_HAVE_LOCATION_P(NODE) (EXPR_P (NODE))
+
+extern void protected_set_expr_location (tree, location_t);
 
 /* In a TARGET_EXPR node.  */
 #define TARGET_EXPR_SLOT(NODE) TREE_OPERAND_CHECK_CODE (NODE, TARGET_EXPR, 0)
@@ -1793,8 +1704,13 @@ struct tree_constructor GTY(())
 
 #define OMP_PARALLEL_BODY(NODE)    TREE_OPERAND (OMP_PARALLEL_CHECK (NODE), 0)
 #define OMP_PARALLEL_CLAUSES(NODE) TREE_OPERAND (OMP_PARALLEL_CHECK (NODE), 1)
-#define OMP_PARALLEL_FN(NODE) TREE_OPERAND (OMP_PARALLEL_CHECK (NODE), 2)
-#define OMP_PARALLEL_DATA_ARG(NODE) TREE_OPERAND (OMP_PARALLEL_CHECK (NODE), 3)
+
+#define OMP_TASK_BODY(NODE)       TREE_OPERAND (OMP_TASK_CHECK (NODE), 0)
+#define OMP_TASK_CLAUSES(NODE)    TREE_OPERAND (OMP_TASK_CHECK (NODE), 1)
+
+#define OMP_TASKREG_CHECK(NODE)          TREE_RANGE_CHECK (NODE, OMP_PARALLEL, OMP_TASK)
+#define OMP_TASKREG_BODY(NODE)    TREE_OPERAND (OMP_TASKREG_CHECK (NODE), 0)
+#define OMP_TASKREG_CLAUSES(NODE) TREE_OPERAND (OMP_TASKREG_CHECK (NODE), 1)
 
 #define OMP_FOR_BODY(NODE)        TREE_OPERAND (OMP_FOR_CHECK (NODE), 0)
 #define OMP_FOR_CLAUSES(NODE)     TREE_OPERAND (OMP_FOR_CHECK (NODE), 1)
@@ -1805,7 +1721,6 @@ struct tree_constructor GTY(())
 
 #define OMP_SECTIONS_BODY(NODE)    TREE_OPERAND (OMP_SECTIONS_CHECK (NODE), 0)
 #define OMP_SECTIONS_CLAUSES(NODE) TREE_OPERAND (OMP_SECTIONS_CHECK (NODE), 1)
-#define OMP_SECTIONS_CONTROL(NODE) TREE_OPERAND (OMP_SECTIONS_CHECK (NODE), 2)
 
 #define OMP_SECTION_BODY(NODE)    TREE_OPERAND (OMP_SECTION_CHECK (NODE), 0)
 
@@ -1830,13 +1745,6 @@ struct tree_constructor GTY(())
 #define OMP_SECTION_LAST(NODE) \
   (OMP_SECTION_CHECK (NODE)->base.private_flag)
 
-/* True on an OMP_RETURN statement if the return does not require a
-   thread synchronization via some sort of barrier.  The exact barrier
-   that would otherwise be emitted is dependent on the OMP statement
-   with which this return is associated.  */
-#define OMP_RETURN_NOWAIT(NODE) \
-  (OMP_RETURN_CHECK (NODE)->base.private_flag)
-
 /* True on an OMP_PARALLEL statement if it represents an explicit
    combined parallel work-sharing constructs.  */
 #define OMP_PARALLEL_COMBINED(NODE) \
@@ -1848,10 +1756,21 @@ struct tree_constructor GTY(())
 #define OMP_CLAUSE_PRIVATE_DEBUG(NODE) \
   (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_PRIVATE)->base.public_flag)
 
+/* True on a PRIVATE clause if ctor needs access to outer region's
+   variable.  */
+#define OMP_CLAUSE_PRIVATE_OUTER_REF(NODE) \
+  TREE_PRIVATE (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_PRIVATE))
+
 /* True on a LASTPRIVATE clause if a FIRSTPRIVATE clause for the same
    decl is present in the chain.  */
 #define OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE(NODE) \
   (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_LASTPRIVATE)->base.public_flag)
+#define OMP_CLAUSE_LASTPRIVATE_STMT(NODE) \
+  OMP_CLAUSE_OPERAND (OMP_CLAUSE_SUBCODE_CHECK (NODE,                  \
+                                               OMP_CLAUSE_LASTPRIVATE),\
+                     1)
+#define OMP_CLAUSE_LASTPRIVATE_GIMPLE_SEQ(NODE) \
+  (OMP_CLAUSE_CHECK (NODE))->omp_clause.gimple_reduction_init
 
 #define OMP_CLAUSE_IF_EXPR(NODE) \
   OMP_CLAUSE_OPERAND (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_IF), 0)
@@ -1860,12 +1779,23 @@ struct tree_constructor GTY(())
 #define OMP_CLAUSE_SCHEDULE_CHUNK_EXPR(NODE) \
   OMP_CLAUSE_OPERAND (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_SCHEDULE), 0)
 
+#define OMP_CLAUSE_COLLAPSE_EXPR(NODE) \
+  OMP_CLAUSE_OPERAND (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_COLLAPSE), 0)
+#define OMP_CLAUSE_COLLAPSE_ITERVAR(NODE) \
+  OMP_CLAUSE_OPERAND (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_COLLAPSE), 1)
+#define OMP_CLAUSE_COLLAPSE_COUNT(NODE) \
+  OMP_CLAUSE_OPERAND (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_COLLAPSE), 2)
+
 #define OMP_CLAUSE_REDUCTION_CODE(NODE)        \
   (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_REDUCTION)->omp_clause.subcode.reduction_code)
 #define OMP_CLAUSE_REDUCTION_INIT(NODE) \
   OMP_CLAUSE_OPERAND (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_REDUCTION), 1)
 #define OMP_CLAUSE_REDUCTION_MERGE(NODE) \
   OMP_CLAUSE_OPERAND (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_REDUCTION), 2)
+#define OMP_CLAUSE_REDUCTION_GIMPLE_INIT(NODE) \
+  (OMP_CLAUSE_CHECK (NODE))->omp_clause.gimple_reduction_init
+#define OMP_CLAUSE_REDUCTION_GIMPLE_MERGE(NODE) \
+  (OMP_CLAUSE_CHECK (NODE))->omp_clause.gimple_reduction_merge
 #define OMP_CLAUSE_REDUCTION_PLACEHOLDER(NODE) \
   OMP_CLAUSE_OPERAND (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_REDUCTION), 3)
 
@@ -1874,6 +1804,7 @@ enum omp_clause_schedule_kind
   OMP_CLAUSE_SCHEDULE_STATIC,
   OMP_CLAUSE_SCHEDULE_DYNAMIC,
   OMP_CLAUSE_SCHEDULE_GUIDED,
+  OMP_CLAUSE_SCHEDULE_AUTO,
   OMP_CLAUSE_SCHEDULE_RUNTIME
 };
 
@@ -1885,7 +1816,8 @@ enum omp_clause_default_kind
   OMP_CLAUSE_DEFAULT_UNSPECIFIED,
   OMP_CLAUSE_DEFAULT_SHARED,
   OMP_CLAUSE_DEFAULT_NONE,
-  OMP_CLAUSE_DEFAULT_PRIVATE
+  OMP_CLAUSE_DEFAULT_PRIVATE,
+  OMP_CLAUSE_DEFAULT_FIRSTPRIVATE
 };
 
 #define OMP_CLAUSE_DEFAULT_KIND(NODE) \
@@ -1907,10 +1839,8 @@ struct tree_exp GTY(())
    only field that can be relied upon.  */
 #define SSA_NAME_VAR(NODE)     SSA_NAME_CHECK (NODE)->ssa_name.var
 
-/* Returns the statement which defines this reference.   Note that
-   we use the same field when chaining SSA_NAME nodes together on
-   the SSA_NAME freelist.  */
-#define SSA_NAME_DEF_STMT(NODE)        SSA_NAME_CHECK (NODE)->common.chain
+/* Returns the statement which defines this SSA name.  */
+#define SSA_NAME_DEF_STMT(NODE)        SSA_NAME_CHECK (NODE)->ssa_name.def_stmt
 
 /* Returns the SSA version number of this SSA name.  Note that in
    tree SSA, version numbers are not per variable and may be recycled.  */
@@ -1956,7 +1886,12 @@ typedef struct ssa_use_operand_d GTY(())
 {
   struct ssa_use_operand_d* GTY((skip(""))) prev;
   struct ssa_use_operand_d* GTY((skip(""))) next;
-  tree GTY((skip(""))) stmt;
+  /* Immediate uses for a given SSA name are maintained as a cyclic
+     list.  To recognize the root of this list, the location field
+     needs to point to the original SSA name.  Since statements and
+     SSA names are of different data types, we need this union.  See
+     the explanation in struct immediate_use_iterator_d.  */
+  union { gimple stmt; tree ssa_name; } GTY((skip(""))) loc;
   tree *GTY((skip(""))) use;
 } ssa_use_operand_t;
 
@@ -1970,6 +1905,9 @@ struct tree_ssa_name GTY(())
   /* _DECL wrapped by this SSA name.  */
   tree var;
 
+  /* Statement that defines this SSA name.  */
+  gimple def_stmt;
+
   /* SSA version number.  */
   unsigned int version;
 
@@ -1987,29 +1925,6 @@ struct tree_ssa_name GTY(())
   struct ssa_use_operand_d imm_uses;
 };
 \f
-/* In a PHI_NODE node.  */
-
-/* These 2 macros should be considered off limits for use by developers.  If
-   you wish to access the use or def fields of a PHI_NODE in the SSA
-   optimizers, use the accessor macros found in tree-ssa-operands.h.
-   These two macros are to be used only by those accessor macros, and other
-   select places where we *absolutely* must take the address of the tree.  */
-
-#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)                        PHI_NODE_CHECK (NODE)->phi.chain
-
-#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)          (EDGE_PRED (PHI_BB ((NODE)), (I)))
-#define PHI_BB(NODE)                   PHI_NODE_CHECK (NODE)->phi.bb
-#define PHI_ARG_IMM_USE_NODE(NODE, I)  PHI_NODE_ELT_CHECK (NODE, I).imm_use
-
 struct phi_arg_d GTY(())
 {
   /* imm_use MUST be the first element in struct because we do some
@@ -2018,22 +1933,6 @@ struct phi_arg_d GTY(())
   tree def;
 };
 
-struct tree_phi_node GTY(())
-{
-  struct tree_base common;
-  tree chain;
-  tree result;
-  int num_args;
-  int capacity;
-
-  /* Basic block holding this PHI node.  */
-  struct basic_block_def *bb;
-
-  /* Arguments of the PHI node.  These are maintained in the same
-     order as predecessor edge vector BB->PREDS.  */
-  struct phi_arg_d GTY ((length ("((tree)&%h)->phi.num_args"))) a[1];
-};
-
 \f
 #define OMP_CLAUSE_CODE(NODE)                                  \
        (OMP_CLAUSE_CHECK (NODE))->omp_clause.code
@@ -2056,6 +1955,12 @@ struct tree_omp_clause GTY(())
     enum omp_clause_schedule_kind schedule_kind;
     enum tree_code                reduction_code;
   } GTY ((skip)) subcode;
+
+  /* The gimplification of OMP_CLAUSE_REDUCTION_{INIT,MERGE} for omp-low's
+     usage.  */
+  gimple_seq gimple_reduction_init;
+  gimple_seq gimple_reduction_merge;
+
   tree GTY ((length ("omp_clause_num_ops[OMP_CLAUSE_CODE ((tree)&%h)]"))) ops[1];
 };
 \f
@@ -2654,7 +2559,7 @@ struct tree_memory_partition_tag GTY(())
 /* For a FUNCTION_DECL, holds the tree of BINDINGs.
    For a TRANSLATION_UNIT_DECL, holds the namespace's BLOCK.
    For a VAR_DECL, holds the initial value.
-   For a PARM_DECL, not used--default
+   For a PARM_DECL, used for DECL_ARG_TYPE--default
    values for parameters are encoded in the type of the function,
    not in the PARM_DECL slot.
    For a FIELD_DECL, this is used for enumeration values and the C
@@ -3008,7 +2913,7 @@ struct tree_parm_decl GTY(())
 /* Nonzero for a given ..._DECL node means that no warnings should be
    generated just because this node is unused.  */
 #define DECL_IN_SYSTEM_HEADER(NODE) \
-  (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.in_system_header_flag)
+  (in_system_header_at (DECL_SOURCE_LOCATION (NODE)))
 
   /* Used to indicate that this DECL has weak linkage.  */
 #define DECL_WEAK(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.weak_flag)
@@ -3136,7 +3041,6 @@ struct tree_decl_with_vis GTY(())
  unsigned shadowed_for_var_p : 1;
 
  /* Don't belong to VAR_DECL exclusively.  */
- unsigned in_system_header_flag : 1;
  unsigned weak_flag:1;
  unsigned seen_in_bind_expr : 1;
  unsigned comdat_flag : 1;
@@ -3148,7 +3052,7 @@ struct tree_decl_with_vis GTY(())
 
  /* Belongs to VAR_DECL exclusively.  */
  ENUM_BITFIELD(tls_model) tls_model : 3;
- /* 11 unused bits. */
+ /* 12 unused bits. */
 };
 
 /* In a VAR_DECL that's static,
@@ -3175,7 +3079,7 @@ extern void decl_debug_expr_insert (tree, tree);
 #define SET_DECL_DEBUG_EXPR(NODE, VAL) \
   (decl_debug_expr_insert (VAR_DECL_CHECK (NODE), VAL))
 
-/* An initializationp priority.  */
+/* An initialization priority.  */
 typedef unsigned short priority_type;
 
 extern priority_type decl_init_priority_lookup (tree);
@@ -3331,17 +3235,17 @@ struct tree_decl_non_common GTY(())
 #define DECL_POSSIBLY_INLINED(DECL) \
   FUNCTION_DECL_CHECK (DECL)->function_decl.possibly_inlined
 
-/* Nonzero in a FUNCTION_DECL means this function can be substituted
-   where it is called.  */
-#define DECL_INLINE(NODE) (FUNCTION_DECL_CHECK (NODE)->function_decl.inline_flag)
-
 /* Nonzero in a FUNCTION_DECL means that this function was declared inline,
    such as via the `inline' keyword in C/C++.  This flag controls the linkage
-   semantics of 'inline'; whether or not the function is inlined is
-   controlled by DECL_INLINE.  */
+   semantics of 'inline'  */
 #define DECL_DECLARED_INLINE_P(NODE) \
   (FUNCTION_DECL_CHECK (NODE)->function_decl.declared_inline_flag)
 
+/* Nonzero in a FUNCTION_DECL means this function should not get
+   -Winline warnings.  */
+#define DECL_NO_INLINE_WARNING_P(NODE) \
+  (FUNCTION_DECL_CHECK (NODE)->function_decl.no_inline_warning_flag)
+
 /* Nonzero in a FUNCTION_DECL that should be always inlined by the inliner
    disregarding size and cost heuristics.  This is equivalent to using
    the always_inline attribute without the required diagnostics if the
@@ -3366,6 +3270,16 @@ struct tree_decl_non_common GTY(())
 #define DECL_ARGUMENTS(NODE) (FUNCTION_DECL_CHECK (NODE)->decl_non_common.arguments)
 #define DECL_ARGUMENT_FLD(NODE) (DECL_NON_COMMON_CHECK (NODE)->decl_non_common.arguments)
 
+/* In FUNCTION_DECL, the function specific target options to use when compiling
+   this function.  */
+#define DECL_FUNCTION_SPECIFIC_TARGET(NODE) \
+   (FUNCTION_DECL_CHECK (NODE)->function_decl.function_specific_target)
+
+/* In FUNCTION_DECL, the function specific optimization options to use when
+   compiling this function.  */
+#define DECL_FUNCTION_SPECIFIC_OPTIMIZATION(NODE) \
+   (FUNCTION_DECL_CHECK (NODE)->function_decl.function_specific_optimization)
+
 /* FUNCTION_DECL inherits from DECL_NON_COMMON because of the use of the
    arguments/result/saved_tree fields by front ends.   It was either inherit
    FUNCTION_DECL from non_common, or inherit non_common from FUNCTION_DECL,
@@ -3377,6 +3291,10 @@ struct tree_function_decl GTY(())
 
   struct function *f;
 
+  /* Function specific options that are used by this function.  */
+  tree function_specific_target;       /* target options */
+  tree function_specific_optimization; /* optimization options */
+
   /* In a FUNCTION_DECL for which DECL_BUILT_IN holds, this is
      DECL_FUNCTION_CODE.  Otherwise unused.
      ???  The bitfield needs to be able to hold all target function
@@ -3396,7 +3314,7 @@ struct tree_function_decl GTY(())
   unsigned declared_inline_flag : 1;
   unsigned regdecl_flag : 1;
 
-  unsigned inline_flag : 1;
+  unsigned no_inline_warning_flag : 1;
   unsigned no_instrument_function_entry_exit : 1;
   unsigned no_limit_stack : 1;
   unsigned disregard_inline_limits : 1;
@@ -3416,6 +3334,11 @@ struct tree_function_decl GTY(())
 #define TYPE_DECL_SUPPRESS_DEBUG(NODE) \
   (TYPE_DECL_CHECK (NODE)->decl_common.decl_flag_2)
 
+/* Getter of the imported declaration associated to the
+   IMPORTED_DECL node.  */
+#define IMPORTED_DECL_ASSOCIATED_DECL(NODE) \
+(DECL_INITIAL (IMPORTED_DECL_CHECK (NODE)))
+
 struct tree_type_decl GTY(())
 {
   struct tree_decl_non_common common;
@@ -3449,26 +3372,39 @@ struct tree_statement_list
   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)
+/* Optimization options used by a function.  */
 
-/* Defined and used in tree-ssa-pre.c.  */
-
-struct tree_value_handle GTY(())
+struct tree_optimization_option GTY(())
 {
   struct tree_common common;
 
-  /* The set of expressions represented by this handle.  */
-  struct bitmap_set * GTY ((skip)) expr_set;
+  /* The optimization options used by the user.  */
+  struct cl_optimization opts;
+};
+
+#define TREE_OPTIMIZATION(NODE) \
+  (&OPTIMIZATION_NODE_CHECK (NODE)->optimization.opts)
+
+/* Return a tree node that encapsulates the current optimization options.  */
+extern tree build_optimization_node (void);
+
+/* Target options used by a function.  */
+
+struct tree_target_option GTY(())
+{
+  struct tree_common common;
 
-  /* 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;
+  /* The optimization options used by the user.  */
+  struct cl_target_option opts;
 };
+
+#define TREE_TARGET_OPTION(NODE) \
+  (&TARGET_OPTION_NODE_CHECK (NODE)->target_option.opts)
+
+/* Return a tree node that encapsulates the current target options.  */
+extern tree build_target_option_node (void);
+
 \f
 /* Define the overall contents of a tree node.
    It may be any of the structures declared above
@@ -3504,16 +3440,15 @@ union tree_node GTY ((ptr_alias (union lang_tree_node),
   struct tree_vec GTY ((tag ("TS_VEC"))) vec;
   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_block GTY ((tag ("TS_BLOCK"))) block;
   struct tree_binfo GTY ((tag ("TS_BINFO"))) binfo;
   struct tree_statement_list GTY ((tag ("TS_STATEMENT_LIST"))) stmt_list;
-  struct gimple_stmt GTY ((tag ("TS_GIMPLE_STATEMENT"))) gstmt;
-  struct tree_value_handle GTY ((tag ("TS_VALUE_HANDLE"))) value_handle;
   struct tree_constructor GTY ((tag ("TS_CONSTRUCTOR"))) constructor;
   struct tree_memory_tag GTY ((tag ("TS_MEMORY_TAG"))) mtag;
   struct tree_omp_clause GTY ((tag ("TS_OMP_CLAUSE"))) omp_clause;
   struct tree_memory_partition_tag GTY ((tag ("TS_MEMORY_PARTITION_TAG"))) mpt;
+  struct tree_optimization_option GTY ((tag ("TS_OPTIMIZATION"))) optimization;
+  struct tree_target_option GTY ((tag ("TS_TARGET_OPTION"))) target_option;
 };
 \f
 /* Standard named or nameless data types of the C compiler.  */
@@ -3661,6 +3596,13 @@ enum tree_index
   TI_SAT_UDA_TYPE,
   TI_SAT_UTA_TYPE,
 
+  TI_OPTIMIZATION_DEFAULT,
+  TI_OPTIMIZATION_CURRENT,
+  TI_TARGET_OPTION_DEFAULT,
+  TI_TARGET_OPTION_CURRENT,
+  TI_CURRENT_TARGET_PRAGMA,
+  TI_CURRENT_OPTIMIZE_PRAGMA,
+
   TI_MAX
 };
 
@@ -3828,6 +3770,20 @@ extern GTY(()) tree global_trees[TI_MAX];
 #define main_identifier_node           global_trees[TI_MAIN_IDENTIFIER]
 #define MAIN_NAME_P(NODE) (IDENTIFIER_NODE_CHECK (NODE) == main_identifier_node)
 
+/* Optimization options (OPTIMIZATION_NODE) to use for default and current
+   functions.  */
+#define optimization_default_node      global_trees[TI_OPTIMIZATION_DEFAULT]
+#define optimization_current_node      global_trees[TI_OPTIMIZATION_CURRENT]
+
+/* Default/current target options (TARGET_OPTION_NODE).  */
+#define target_option_default_node     global_trees[TI_TARGET_OPTION_DEFAULT]
+#define target_option_current_node     global_trees[TI_TARGET_OPTION_CURRENT]
+
+/* Default tree list option(), optimize() pragmas to be linked into the
+   attribute list.  */
+#define current_target_pragma          global_trees[TI_CURRENT_TARGET_PRAGMA]
+#define current_optimize_pragma                global_trees[TI_CURRENT_OPTIMIZE_PRAGMA]
+
 /* An enumeration of the standard C integer types.  These must be
    ordered so that shorter types appear before longer ones, and so
    that signed types appear before unsigned ones, for the correct
@@ -3901,7 +3857,8 @@ enum ptrmemfunc_vbit_where_t
 #define NULL_TREE (tree) NULL
 
 extern tree decl_assembler_name (tree);
-extern bool decl_assembler_name_equal (tree decl, tree asmname);
+extern bool decl_assembler_name_equal (tree decl, const_tree asmname);
+extern hashval_t decl_assembler_name_hash (const_tree asmname);
 
 /* Compute the number of bytes occupied by 'node'.  This routine only
    looks at TREE_CODE and, if the code is TREE_VEC, TREE_VEC_LENGTH.  */
@@ -3909,8 +3866,8 @@ extern bool decl_assembler_name_equal (tree decl, tree asmname);
 extern size_t tree_size (const_tree);
 
 /* Compute the number of bytes occupied by a tree with code CODE.  This
-   function cannot be used for TREE_VEC or PHI_NODE codes, which are of
-   variable length.  */
+   function cannot be used for TREE_VEC codes, which are of variable
+   length.  */
 extern size_t tree_code_size (enum tree_code);
 
 /* Lowest level primitive for allocating a node.
@@ -3986,10 +3943,6 @@ extern tree build7_stat (enum tree_code, tree, tree, tree, tree, tree,
 #define build7(c,t1,t2,t3,t4,t5,t6,t7,t8) \
   build7_stat (c,t1,t2,t3,t4,t5,t6,t7,t8 MEM_STAT_INFO)
 
-extern tree build_gimple_modify_stmt_stat (tree, tree MEM_STAT_DECL);
-#define build_gimple_modify_stmt(t1,t2) \
-  build_gimple_modify_stmt_stat (t1,t2 MEM_STAT_INFO)
-
 extern tree build_int_cst (tree, HOST_WIDE_INT);
 extern tree build_int_cst_type (tree, HOST_WIDE_INT);
 extern tree build_int_cstu (tree, unsigned HOST_WIDE_INT);
@@ -4044,6 +3997,9 @@ extern tree build_index_2_type (tree, tree);
 extern tree build_array_type (tree, tree);
 extern tree build_function_type (tree, tree);
 extern tree build_function_type_list (tree, ...);
+extern tree build_function_type_skip_args (tree, bitmap);
+extern tree build_function_decl_skip_args (tree, bitmap);
+extern tree build_varargs_function_type_list (tree, ...);
 extern tree build_method_type_directly (tree, tree, tree);
 extern tree build_method_type (tree, tree);
 extern tree build_offset_type (tree, tree);
@@ -4434,6 +4390,10 @@ extern int fields_length (const_tree);
 
 extern bool initializer_zerop (const_tree);
 
+/* Given a CONSTRUCTOR CTOR, return the elements as a TREE_LIST.  */
+
+extern tree ctor_to_list (tree);
+
 /* Examine CTOR to discover:
    * how many scalar fields are set to nonzero values,
      and place it in *P_NZ_ELTS;
@@ -4592,24 +4552,24 @@ extern tree get_inner_reference (tree, HOST_WIDE_INT *, HOST_WIDE_INT *,
                                 tree *, enum machine_mode *, int *, int *,
                                 bool);
 
-/* Given an expression EXP that may be a COMPONENT_REF or an ARRAY_REF,
-   look for whether EXP or any nested component-refs within EXP is marked
-   as PACKED.  */
+/* Given an expression EXP that may be a COMPONENT_REF, an ARRAY_REF or an
+   ARRAY_RANGE_REF, look for whether EXP or any nested component-refs within
+   EXP is marked as PACKED.  */
 
 extern bool contains_packed_reference (const_tree exp);
 
 /* Return a tree of sizetype representing the size, in bytes, of the element
-   of EXP, an ARRAY_REF.  */
+   of EXP, an ARRAY_REF or an ARRAY_RANGE_REF.  */
 
 extern tree array_ref_element_size (tree);
 
 /* Return a tree representing the lower bound of the array mentioned in
-   EXP, an ARRAY_REF.  */
+   EXP, an ARRAY_REF or an ARRAY_RANGE_REF.  */
 
 extern tree array_ref_low_bound (tree);
 
 /* Return a tree representing the upper bound of the array mentioned in
-   EXP, an ARRAY_REF.  */
+   EXP, an ARRAY_REF or an ARRAY_RANGE_REF.  */
 
 extern tree array_ref_up_bound (tree);
 
@@ -4719,15 +4679,19 @@ extern bool commutative_tree_code (enum tree_code);
 extern tree upper_bound_in_type (tree, tree);
 extern tree lower_bound_in_type (tree, tree);
 extern int operand_equal_for_phi_arg_p (const_tree, const_tree);
-extern bool empty_body_p (tree);
 extern tree call_expr_arg (tree, int);
 extern tree *call_expr_argp (tree, int);
 extern tree call_expr_arglist (tree);
+extern tree create_artificial_label (void);
+extern const char *get_name (tree);
 extern bool stdarg_p (tree);
 extern bool prototype_p (tree);
 extern int function_args_count (tree);
 extern bool auto_var_in_fn_p (const_tree, const_tree);
 \f
+/* In gimplify.c */
+extern tree unshare_expr (tree);
+\f
 /* In stmt.c */
 
 extern void expand_expr_stmt (tree);
@@ -4781,10 +4745,12 @@ extern tree fold_ignored_result (tree);
 extern tree fold_abs_const (tree, tree);
 extern tree fold_indirect_ref_1 (tree, tree);
 extern void fold_defer_overflow_warnings (void);
-extern void fold_undefer_overflow_warnings (bool, const_tree, int);
+extern void fold_undefer_overflow_warnings (bool, const_gimple, int);
 extern void fold_undefer_and_ignore_overflow_warnings (void);
 extern bool fold_deferring_overflow_warnings_p (void);
 extern tree maybe_fold_offset_to_reference (tree, tree, tree);
+extern tree maybe_fold_offset_to_address (tree, tree, tree);
+extern tree maybe_fold_stmt_addition (tree, tree, tree);
 
 extern tree force_fit_type_double (tree, unsigned HOST_WIDE_INT, HOST_WIDE_INT,
                                   int, bool);
@@ -4850,7 +4816,6 @@ extern tree constant_boolean_node (int, tree);
 extern tree build_low_bits_mask (tree, unsigned);
 
 extern bool tree_swap_operands_p (const_tree, const_tree, bool);
-extern void swap_tree_operands (tree, tree *, tree *);
 extern enum tree_code swap_tree_comparison (enum tree_code);
 
 extern bool ptr_difference_const (tree, tree, HOST_WIDE_INT *);
@@ -4867,8 +4832,7 @@ extern bool tree_binary_nonnegative_warnv_p (enum tree_code, tree, tree, tree,
                                              bool *);
 extern bool tree_single_nonnegative_warnv_p (tree t, bool *strict_overflow_p);
 extern bool tree_invalid_nonnegative_warnv_p (tree t, bool *strict_overflow_p);
-extern bool tree_call_nonnegative_warnv_p (enum tree_code code, tree, tree,
-                                           tree, tree, bool *);
+extern bool tree_call_nonnegative_warnv_p (tree, tree, tree, tree, bool *);
 
 extern bool tree_expr_nonzero_warnv_p (tree, bool *);
 
@@ -4894,12 +4858,15 @@ extern tree build_call_expr (tree, int, ...);
 extern tree mathfn_built_in (tree, enum built_in_function fn);
 extern tree strip_float_extensions (tree);
 extern tree c_strlen (tree, int);
-extern tree std_gimplify_va_arg_expr (tree, tree, tree *, tree *);
+extern tree std_gimplify_va_arg_expr (tree, tree, gimple_seq *, gimple_seq *);
 extern tree build_va_arg_indirect_ref (tree);
 extern tree build_string_literal (int, const char *);
 extern bool validate_arglist (const_tree, ...);
 extern rtx builtin_memset_read_str (void *, HOST_WIDE_INT, enum machine_mode);
 extern int get_pointer_alignment (tree, unsigned int);
+extern int get_object_alignment (tree, unsigned int, unsigned int);
+extern tree fold_call_stmt (gimple, bool);
+extern tree gimple_fold_builtin_snprintf_chk (gimple, tree, enum built_in_function);
 
 /* In convert.c */
 extern tree strip_float_extensions (tree);
@@ -4907,6 +4874,7 @@ extern tree strip_float_extensions (tree);
 /* In tree.c */
 extern int really_constant_p (const_tree);
 extern bool decl_address_invariant_p (const_tree);
+extern bool decl_address_ip_invariant_p (const_tree);
 extern int int_fits_type_p (const_tree, const_tree);
 #ifndef GENERATOR_FILE
 extern void get_type_static_bounds (const_tree, mpz_t, mpz_t);
@@ -4916,6 +4884,9 @@ extern int tree_log2 (const_tree);
 extern int tree_floor_log2 (const_tree);
 extern int simple_cst_equal (const_tree, const_tree);
 extern hashval_t iterative_hash_expr (const_tree, hashval_t);
+extern hashval_t iterative_hash_exprs_commutative (const_tree,
+                                                   const_tree, hashval_t);
+extern hashval_t iterative_hash_hashval_t (hashval_t, hashval_t);
 extern int compare_tree_int (const_tree, unsigned HOST_WIDE_INT);
 extern int type_list_equal (const_tree, const_tree);
 extern int chain_member (const_tree, const_tree);
@@ -4946,18 +4917,9 @@ extern tree build_addr (tree, tree);
 extern bool fields_compatible_p (const_tree, const_tree);
 extern tree find_compatible_field (tree, tree);
 
-extern location_t expr_location (const_tree);
-extern void set_expr_location (tree, location_t);
-extern bool expr_has_location (const_tree);
-
-extern location_t *expr_locus (const_tree);
 extern void set_expr_locus (tree, source_location *);
-extern const char *expr_filename (const_tree);
-extern int expr_lineno (const_tree);
 
 extern tree *tree_block (tree);
-extern tree *generic_tree_operand (tree, int);
-extern tree *generic_tree_type (tree);
 extern location_t *block_nonartificial_location (tree);
 
 /* In function.c */
@@ -4978,7 +4940,7 @@ extern void preserve_temp_slots (rtx);
 extern int aggregate_value_p (const_tree, const_tree);
 extern void push_function_context (void);
 extern void pop_function_context (void);
-extern tree gimplify_parameters (void);
+extern gimple_seq gimplify_parameters (void);
 
 /* In print-rtl.c */
 #ifdef BUFSIZ
@@ -5036,6 +4998,7 @@ extern int flags_from_decl_or_type (const_tree);
 extern int call_expr_flags (const_tree);
 
 extern int setjmp_call_p (const_tree);
+extern bool gimple_alloca_call_p (const_gimple);
 extern bool alloca_call_p (const_tree);
 extern bool must_pass_in_stack_var_size (enum machine_mode, const_tree);
 extern bool must_pass_in_stack_var_size_or_pad (enum machine_mode, const_tree);
@@ -5088,18 +5051,11 @@ extern void expand_asm_expr (tree);
 extern tree resolve_asm_operand_names (tree, tree, tree);
 extern void expand_case (tree);
 extern void expand_decl (tree);
-extern void expand_anon_union_decl (tree, tree, tree);
 #ifdef HARD_CONST
 /* Silly ifdef to avoid having all includers depend on hard-reg-set.h.  */
 extern tree tree_overlaps_hard_reg_set (tree, HARD_REG_SET *);
 #endif
 
-/* In gimplify.c.  */
-extern tree create_artificial_label (void);
-extern void gimplify_function_tree (tree);
-extern const char *get_name (const_tree);
-extern tree unshare_expr (tree);
-extern void sort_case_labels (tree);
 \f
 /* Interface of the DWARF2 unwind info support.  */
 
@@ -5181,14 +5137,12 @@ typedef enum
   temp_list_kind,
   vec_kind,
   binfo_kind,
-  phi_kind,
   ssa_name_kind,
   constr_kind,
   x_kind,
   lang_decl,
   lang_type,
   omp_clause_kind,
-  gimple_stmt_kind,
   all_kinds
 } tree_node_kind;