Merger of git branch "gimple-classes-v2-option-3"
[gcc.git] / gcc / gimple.h
index 4f34a9eea92264cc32c733b62c13d7e9aedbbbd7..9380211bdd94479ba85601611cfa460bb0d1a522 100644 (file)
@@ -1,6 +1,6 @@
 /* Gimple IR definitions.
 
-   Copyright (C) 2007-2013 Free Software Foundation, Inc.
+   Copyright (C) 2007-2014 Free Software Foundation, Inc.
    Contributed by Aldy Hernandez <aldyh@redhat.com>
 
 This file is part of GCC.
@@ -22,23 +22,8 @@ along with GCC; see the file COPYING3.  If not see
 #ifndef GCC_GIMPLE_H
 #define GCC_GIMPLE_H
 
-#include "pointer-set.h"
-#include "hash-table.h"
-#include "vec.h"
-#include "ggc.h"
-#include "basic-block.h"
-#include "tree-ssa-alias.h"
-#include "internal-fn.h"
-#include "gimple-fold.h"
-#include "tree-eh.h"
-#include "gimple-expr.h"
-
 typedef gimple gimple_seq_node;
 
-/* For each block, the PHI nodes that need to be rewritten are stored into
-   these vectors.  */
-typedef vec<gimple> gimple_vec;
-
 enum gimple_code {
 #define DEFGSCODE(SYM, STRING, STRUCT) SYM,
 #include "gimple.def"
@@ -101,17 +86,23 @@ enum gf_mask {
     GF_CALL_NOTHROW            = 1 << 4,
     GF_CALL_ALLOCA_FOR_VAR     = 1 << 5,
     GF_CALL_INTERNAL           = 1 << 6,
+    GF_CALL_CTRL_ALTERING       = 1 << 7,
+    GF_CALL_WITH_BOUNDS        = 1 << 8,
     GF_OMP_PARALLEL_COMBINED   = 1 << 0,
-    GF_OMP_FOR_KIND_MASK       = 3 << 0,
-    GF_OMP_FOR_KIND_FOR                = 0 << 0,
-    GF_OMP_FOR_KIND_SIMD       = 1 << 0,
-    GF_OMP_FOR_KIND_DISTRIBUTE = 2 << 0,
-    GF_OMP_FOR_COMBINED                = 1 << 2,
-    GF_OMP_FOR_COMBINED_INTO   = 1 << 3,
-    GF_OMP_TARGET_KIND_MASK    = 3 << 0,
-    GF_OMP_TARGET_KIND_REGION  = 0 << 0,
-    GF_OMP_TARGET_KIND_DATA    = 1 << 0,
-    GF_OMP_TARGET_KIND_UPDATE  = 2 << 0,
+    GF_OMP_FOR_KIND_MASK       = 7 << 0,
+    GF_OMP_FOR_KIND_FOR                = 0,
+    GF_OMP_FOR_KIND_DISTRIBUTE = 1,
+    GF_OMP_FOR_KIND_CILKFOR     = 2,
+    /* Flag for SIMD variants of OMP_FOR kinds.  */
+    GF_OMP_FOR_SIMD            = 1 << 2,
+    GF_OMP_FOR_KIND_SIMD       = GF_OMP_FOR_SIMD | 0,
+    GF_OMP_FOR_KIND_CILKSIMD   = GF_OMP_FOR_SIMD | 1,
+    GF_OMP_FOR_COMBINED                = 1 << 3,
+    GF_OMP_FOR_COMBINED_INTO   = 1 << 4,
+    GF_OMP_TARGET_KIND_MASK    = (1 << 2) - 1,
+    GF_OMP_TARGET_KIND_REGION  = 0,
+    GF_OMP_TARGET_KIND_DATA    = 1,
+    GF_OMP_TARGET_KIND_UPDATE  = 2,
 
     /* True on an GIMPLE_OMP_RETURN statement if the return does not require
        a thread synchronization via some sort of barrier.  The exact barrier
@@ -141,25 +132,13 @@ enum plf_mask {
     GF_PLF_2   = 1 << 1
 };
 
-/* Iterator object for GIMPLE statement sequences.  */
-
-struct gimple_stmt_iterator_d
-{
-  /* Sequence node holding the current statement.  */
-  gimple_seq_node ptr;
-
-  /* Sequence and basic block holding the statement.  These fields
-     are necessary to handle edge cases such as when statement is
-     added to an empty basic block or when the last statement of a
-     block/sequence is removed.  */
-  gimple_seq *seq;
-  basic_block bb;
-};
-
 /* Data structure definitions for GIMPLE tuples.  NOTE: word markers
    are for 64 bit hosts.  */
 
-struct GTY((chain_next ("%h.next"))) gimple_statement_base {
+struct GTY((desc ("gimple_statement_structure (&%h)"), tag ("GSS_BASE"),
+           chain_next ("%h.next"), variable_size))
+  gimple_statement_base
+{
   /* [ WORD 1 ]
      Main identifying code for a tuple.  */
   ENUM_BITFIELD(gimple_code) code : 8;
@@ -188,6 +167,9 @@ struct GTY((chain_next ("%h.next"))) gimple_statement_base {
   /* Nonzero if this statement contains volatile operands.  */
   unsigned has_volatile_ops    : 1;
 
+  /* Padding to get subcode to 16 bit alignment.  */
+  unsigned pad                 : 1;
+
   /* The SUBCODE field can be used for tuple-specific flags for tuples
      that do not require subcodes.  Note that SUBCODE should be at
      least as wide as tree codes, as several tuples store tree codes
@@ -223,10 +205,11 @@ struct GTY((chain_next ("%h.next"))) gimple_statement_base {
 
 /* Base structure for tuples with operands.  */
 
-struct GTY(()) gimple_statement_with_ops_base
+/* This gimple subclass has no tag value.  */
+struct GTY(())
+  gimple_statement_with_ops_base : public gimple_statement_base
 {
-  /* [ WORD 1-6 ]  */
-  struct gimple_statement_base gsbase;
+  /* [ WORD 1-6 ] : base class */
 
   /* [ WORD 7 ]
      SSA operand vectors.  NOTE: It should be possible to
@@ -239,25 +222,25 @@ struct GTY(()) gimple_statement_with_ops_base
 
 /* Statements that take register operands.  */
 
-struct GTY(()) gimple_statement_with_ops
+struct GTY((tag("GSS_WITH_OPS")))
+  gimple_statement_with_ops : public gimple_statement_with_ops_base
 {
-  /* [ WORD 1-7 ]  */
-  struct gimple_statement_with_ops_base opbase;
+  /* [ WORD 1-7 ] : base class */
 
   /* [ WORD 8 ]
      Operand vector.  NOTE!  This must always be the last field
      of this structure.  In particular, this means that this
      structure cannot be embedded inside another one.  */
-  tree GTY((length ("%h.opbase.gsbase.num_ops"))) op[1];
+  tree GTY((length ("%h.num_ops"))) op[1];
 };
 
 
 /* Base for statements that take both memory and register operands.  */
 
-struct GTY(()) gimple_statement_with_memory_ops_base
+struct GTY((tag("GSS_WITH_MEM_OPS_BASE")))
+  gimple_statement_with_memory_ops_base : public gimple_statement_with_ops_base
 {
-  /* [ WORD 1-7 ]  */
-  struct gimple_statement_with_ops_base opbase;
+  /* [ WORD 1-7 ] : base class */
 
   /* [ WORD 8-9 ]
      Virtual operands for this statement.  The GC will pick them
@@ -269,32 +252,33 @@ struct GTY(()) gimple_statement_with_memory_ops_base
 
 /* Statements that take both memory and register operands.  */
 
-struct GTY(()) gimple_statement_with_memory_ops
+struct GTY((tag("GSS_WITH_MEM_OPS")))
+  gimple_statement_with_memory_ops :
+    public gimple_statement_with_memory_ops_base
 {
-  /* [ WORD 1-9 ]  */
-  struct gimple_statement_with_memory_ops_base membase;
+  /* [ WORD 1-9 ] : base class */
 
   /* [ WORD 10 ]
      Operand vector.  NOTE!  This must always be the last field
      of this structure.  In particular, this means that this
      structure cannot be embedded inside another one.  */
-  tree GTY((length ("%h.membase.opbase.gsbase.num_ops"))) op[1];
+  tree GTY((length ("%h.num_ops"))) op[1];
 };
 
 
 /* Call statements that take both memory and register operands.  */
 
-struct GTY(()) gimple_statement_call
+struct GTY((tag("GSS_CALL")))
+  gcall : public gimple_statement_with_memory_ops_base
 {
-  /* [ WORD 1-9 ]  */
-  struct gimple_statement_with_memory_ops_base membase;
+  /* [ WORD 1-9 ] : base class */
 
   /* [ WORD 10-13 ]  */
   struct pt_solution call_used;
   struct pt_solution call_clobbered;
 
   /* [ WORD 14 ]  */
-  union GTY ((desc ("%1.membase.opbase.gsbase.subcode & GF_CALL_INTERNAL"))) {
+  union GTY ((desc ("%1.subcode & GF_CALL_INTERNAL"))) {
     tree GTY ((tag ("0"))) fntype;
     enum internal_fn GTY ((tag ("GF_CALL_INTERNAL"))) internal_fn;
   } u;
@@ -303,15 +287,16 @@ struct GTY(()) gimple_statement_call
      Operand vector.  NOTE!  This must always be the last field
      of this structure.  In particular, this means that this
      structure cannot be embedded inside another one.  */
-  tree GTY((length ("%h.membase.opbase.gsbase.num_ops"))) op[1];
+  tree GTY((length ("%h.num_ops"))) op[1];
 };
 
 
 /* OpenMP statements (#pragma omp).  */
 
-struct GTY(()) gimple_statement_omp {
-  /* [ WORD 1-6 ]  */
-  struct gimple_statement_base gsbase;
+struct GTY((tag("GSS_OMP")))
+  gimple_statement_omp : public gimple_statement_base
+{
+  /* [ WORD 1-6 ] : base class */
 
   /* [ WORD 7 ]  */
   gimple_seq body;
@@ -320,9 +305,10 @@ struct GTY(()) gimple_statement_omp {
 
 /* GIMPLE_BIND */
 
-struct GTY(()) gimple_statement_bind {
-  /* [ WORD 1-6 ]  */
-  struct gimple_statement_base gsbase;
+struct GTY((tag("GSS_BIND")))
+  gbind : public gimple_statement_base
+{
+  /* [ WORD 1-6 ] : base class */
 
   /* [ WORD 7 ]
      Variables declared in this scope.  */
@@ -343,9 +329,10 @@ struct GTY(()) gimple_statement_bind {
 
 /* GIMPLE_CATCH */
 
-struct GTY(()) gimple_statement_catch {
-  /* [ WORD 1-6 ]  */
-  struct gimple_statement_base gsbase;
+struct GTY((tag("GSS_CATCH")))
+  gcatch : public gimple_statement_base
+{
+  /* [ WORD 1-6 ] : base class */
 
   /* [ WORD 7 ]  */
   tree types;
@@ -357,9 +344,10 @@ struct GTY(()) gimple_statement_catch {
 
 /* GIMPLE_EH_FILTER */
 
-struct GTY(()) gimple_statement_eh_filter {
-  /* [ WORD 1-6 ]  */
-  struct gimple_statement_base gsbase;
+struct GTY((tag("GSS_EH_FILTER")))
+  geh_filter : public gimple_statement_base
+{
+  /* [ WORD 1-6 ] : base class */
 
   /* [ WORD 7 ]
      Filter types.  */
@@ -372,9 +360,10 @@ struct GTY(()) gimple_statement_eh_filter {
 
 /* GIMPLE_EH_ELSE */
 
-struct GTY(()) gimple_statement_eh_else {
-  /* [ WORD 1-6 ]  */
-  struct gimple_statement_base gsbase;
+struct GTY((tag("GSS_EH_ELSE")))
+  geh_else : public gimple_statement_base
+{
+  /* [ WORD 1-6 ] : base class */
 
   /* [ WORD 7,8 ] */
   gimple_seq n_body, e_body;
@@ -382,9 +371,10 @@ struct GTY(()) gimple_statement_eh_else {
 
 /* GIMPLE_EH_MUST_NOT_THROW */
 
-struct GTY(()) gimple_statement_eh_mnt {
-  /* [ WORD 1-6 ]  */
-  struct gimple_statement_base gsbase;
+struct GTY((tag("GSS_EH_MNT")))
+  geh_mnt : public gimple_statement_base
+{
+  /* [ WORD 1-6 ] : base class */
 
   /* [ WORD 7 ] Abort function decl.  */
   tree fndecl;
@@ -392,9 +382,10 @@ struct GTY(()) gimple_statement_eh_mnt {
 
 /* GIMPLE_PHI */
 
-struct GTY(()) gimple_statement_phi {
-  /* [ WORD 1-6 ]  */
-  struct gimple_statement_base gsbase;
+struct GTY((tag("GSS_PHI")))
+  gphi : public gimple_statement_base
+{
+  /* [ WORD 1-6 ] : base class */
 
   /* [ WORD 7 ]  */
   unsigned capacity;
@@ -410,22 +401,37 @@ struct GTY(()) gimple_statement_phi {
 
 /* GIMPLE_RESX, GIMPLE_EH_DISPATCH */
 
-struct GTY(()) gimple_statement_eh_ctrl
+struct GTY((tag("GSS_EH_CTRL")))
+  gimple_statement_eh_ctrl : public gimple_statement_base
 {
-  /* [ WORD 1-6 ]  */
-  struct gimple_statement_base gsbase;
+  /* [ WORD 1-6 ] : base class */
 
   /* [ WORD 7 ]
      Exception region number.  */
   int region;
 };
 
+struct GTY((tag("GSS_EH_CTRL")))
+  gresx : public gimple_statement_eh_ctrl
+{
+  /* No extra fields; adds invariant:
+       stmt->code == GIMPLE_RESX.  */
+};
+
+struct GTY((tag("GSS_EH_CTRL")))
+  geh_dispatch : public gimple_statement_eh_ctrl
+{
+  /* No extra fields; adds invariant:
+       stmt->code == GIMPLE_EH_DISPATH.  */
+};
+
 
 /* GIMPLE_TRY */
 
-struct GTY(()) gimple_statement_try {
-  /* [ WORD 1-6 ]  */
-  struct gimple_statement_base gsbase;
+struct GTY((tag("GSS_TRY")))
+  gtry : public gimple_statement_base
+{
+  /* [ WORD 1-6 ] : base class */
 
   /* [ WORD 7 ]
      Expression to evaluate.  */
@@ -452,9 +458,10 @@ enum gimple_try_flags
 
 /* GIMPLE_WITH_CLEANUP_EXPR */
 
-struct GTY(()) gimple_statement_wce {
-  /* [ WORD 1-6 ]  */
-  struct gimple_statement_base gsbase;
+struct GTY((tag("GSS_WCE")))
+  gimple_statement_wce : public gimple_statement_base
+{
+  /* [ WORD 1-6 ] : base class */
 
   /* Subcode: CLEANUP_EH_ONLY.  True if the cleanup should only be
              executed if an exception is thrown, not on normal exit of its
@@ -469,10 +476,10 @@ struct GTY(()) gimple_statement_wce {
 
 /* GIMPLE_ASM  */
 
-struct GTY(()) gimple_statement_asm
+struct GTY((tag("GSS_ASM")))
+  gasm : public gimple_statement_with_memory_ops_base
 {
-  /* [ WORD 1-9 ]  */
-  struct gimple_statement_with_memory_ops_base membase;
+  /* [ WORD 1-9 ] : base class */
 
   /* [ WORD 10 ]
      __asm__ statement.  */
@@ -489,14 +496,15 @@ struct GTY(()) gimple_statement_asm
      Operand vector.  NOTE!  This must always be the last field
      of this structure.  In particular, this means that this
      structure cannot be embedded inside another one.  */
-  tree GTY((length ("%h.membase.opbase.gsbase.num_ops"))) op[1];
+  tree GTY((length ("%h.num_ops"))) op[1];
 };
 
 /* GIMPLE_OMP_CRITICAL */
 
-struct GTY(()) gimple_statement_omp_critical {
-  /* [ WORD 1-7 ]  */
-  struct gimple_statement_omp omp;
+struct GTY((tag("GSS_OMP_CRITICAL")))
+  gomp_critical : public gimple_statement_omp
+{
+  /* [ WORD 1-7 ] : base class */
 
   /* [ WORD 8 ]
      Critical section name.  */
@@ -523,9 +531,10 @@ struct GTY(()) gimple_omp_for_iter {
 
 /* GIMPLE_OMP_FOR */
 
-struct GTY(()) gimple_statement_omp_for {
-  /* [ WORD 1-7 ]  */
-  struct gimple_statement_omp omp;
+struct GTY((tag("GSS_OMP_FOR")))
+  gomp_for : public gimple_statement_omp
+{
+  /* [ WORD 1-7 ] : base class */
 
   /* [ WORD 8 ]  */
   tree clauses;
@@ -543,11 +552,11 @@ struct GTY(()) gimple_statement_omp_for {
 };
 
 
-/* GIMPLE_OMP_PARALLEL */
-
-struct GTY(()) gimple_statement_omp_parallel {
-  /* [ WORD 1-7 ]  */
-  struct gimple_statement_omp omp;
+/* GIMPLE_OMP_PARALLEL, GIMPLE_OMP_TARGET */
+struct GTY((tag("GSS_OMP_PARALLEL_LAYOUT")))
+  gimple_statement_omp_parallel_layout : public gimple_statement_omp
+{
+  /* [ WORD 1-7 ] : base class */
 
   /* [ WORD 8 ]
      Clauses.  */
@@ -562,12 +571,37 @@ struct GTY(()) gimple_statement_omp_parallel {
   tree data_arg;
 };
 
+/* GIMPLE_OMP_PARALLEL or GIMPLE_TASK */
+struct GTY((tag("GSS_OMP_PARALLEL_LAYOUT")))
+  gimple_statement_omp_taskreg : public gimple_statement_omp_parallel_layout
+{
+    /* No extra fields; adds invariant:
+         stmt->code == GIMPLE_OMP_PARALLEL
+        || stmt->code == GIMPLE_OMP_TASK.  */
+};
+
+
+/* GIMPLE_OMP_PARALLEL */
+struct GTY((tag("GSS_OMP_PARALLEL_LAYOUT")))
+  gomp_parallel : public gimple_statement_omp_taskreg
+{
+    /* No extra fields; adds invariant:
+         stmt->code == GIMPLE_OMP_PARALLEL.  */
+};
+
+struct GTY((tag("GSS_OMP_PARALLEL_LAYOUT")))
+  gomp_target : public gimple_statement_omp_parallel_layout
+{
+    /* No extra fields; adds invariant:
+         stmt->code == GIMPLE_OMP_TARGET.  */
+};
 
 /* GIMPLE_OMP_TASK */
 
-struct GTY(()) gimple_statement_omp_task {
-  /* [ WORD 1-10 ]  */
-  struct gimple_statement_omp_parallel par;
+struct GTY((tag("GSS_OMP_TASK")))
+  gomp_task : public gimple_statement_omp_taskreg
+{
+  /* [ WORD 1-10 ] : base class */
 
   /* [ WORD 11 ]
      Child function holding firstprivate initialization if needed.  */
@@ -586,9 +620,10 @@ struct GTY(()) gimple_statement_omp_task {
 
 /* GIMPLE_OMP_SECTIONS */
 
-struct GTY(()) gimple_statement_omp_sections {
-  /* [ WORD 1-7 ]  */
-  struct gimple_statement_omp omp;
+struct GTY((tag("GSS_OMP_SECTIONS")))
+  gomp_sections : public gimple_statement_omp
+{
+  /* [ WORD 1-7 ] : base class */
 
   /* [ WORD 8 ]  */
   tree clauses;
@@ -604,9 +639,10 @@ struct GTY(()) gimple_statement_omp_sections {
    Note: This does not inherit from gimple_statement_omp, because we
          do not need the body field.  */
 
-struct GTY(()) gimple_statement_omp_continue {
-  /* [ WORD 1-6 ]  */
-  struct gimple_statement_base gsbase;
+struct GTY((tag("GSS_OMP_CONTINUE")))
+  gomp_continue : public gimple_statement_base
+{
+  /* [ WORD 1-6 ] : base class */
 
   /* [ WORD 7 ]  */
   tree control_def;
@@ -615,24 +651,40 @@ struct GTY(()) gimple_statement_omp_continue {
   tree control_use;
 };
 
-/* GIMPLE_OMP_SINGLE, GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS */
+/* GIMPLE_OMP_SINGLE, GIMPLE_OMP_TEAMS */
 
-struct GTY(()) gimple_statement_omp_single {
-  /* [ WORD 1-7 ]  */
-  struct gimple_statement_omp omp;
+struct GTY((tag("GSS_OMP_SINGLE_LAYOUT")))
+  gimple_statement_omp_single_layout : public gimple_statement_omp
+{
+  /* [ WORD 1-7 ] : base class */
 
   /* [ WORD 7 ]  */
   tree clauses;
 };
 
+struct GTY((tag("GSS_OMP_SINGLE_LAYOUT")))
+  gomp_single : public gimple_statement_omp_single_layout
+{
+    /* No extra fields; adds invariant:
+         stmt->code == GIMPLE_OMP_SINGLE.  */
+};
+
+struct GTY((tag("GSS_OMP_SINGLE_LAYOUT")))
+  gomp_teams : public gimple_statement_omp_single_layout
+{
+    /* No extra fields; adds invariant:
+         stmt->code == GIMPLE_OMP_TEAMS.  */
+};
+
 
 /* GIMPLE_OMP_ATOMIC_LOAD.
    Note: This is based on gimple_statement_base, not g_s_omp, because g_s_omp
    contains a sequence, which we don't need here.  */
 
-struct GTY(()) gimple_statement_omp_atomic_load {
-  /* [ WORD 1-6 ]  */
-  struct gimple_statement_base gsbase;
+struct GTY((tag("GSS_OMP_ATOMIC_LOAD")))
+  gomp_atomic_load : public gimple_statement_base
+{
+  /* [ WORD 1-6 ] : base class */
 
   /* [ WORD 7-8 ]  */
   tree rhs, lhs;
@@ -641,14 +693,31 @@ struct GTY(()) gimple_statement_omp_atomic_load {
 /* GIMPLE_OMP_ATOMIC_STORE.
    See note on GIMPLE_OMP_ATOMIC_LOAD.  */
 
-struct GTY(()) gimple_statement_omp_atomic_store {
-  /* [ WORD 1-6 ]  */
-  struct gimple_statement_base gsbase;
+struct GTY((tag("GSS_OMP_ATOMIC_STORE_LAYOUT")))
+  gimple_statement_omp_atomic_store_layout : public gimple_statement_base
+{
+  /* [ WORD 1-6 ] : base class */
 
   /* [ WORD 7 ]  */
   tree val;
 };
 
+struct GTY((tag("GSS_OMP_ATOMIC_STORE_LAYOUT")))
+  gomp_atomic_store :
+    public gimple_statement_omp_atomic_store_layout
+{
+    /* No extra fields; adds invariant:
+         stmt->code == GIMPLE_OMP_ATOMIC_STORE.  */
+};
+
+struct GTY((tag("GSS_OMP_ATOMIC_STORE_LAYOUT")))
+  gimple_statement_omp_return :
+    public gimple_statement_omp_atomic_store_layout
+{
+    /* No extra fields; adds invariant:
+         stmt->code == GIMPLE_OMP_RETURN.  */
+};
+
 /* GIMPLE_TRANSACTION.  */
 
 /* Bits to be stored in the GIMPLE_TRANSACTION subcode.  */
@@ -677,10 +746,10 @@ struct GTY(()) gimple_statement_omp_atomic_store {
    likely because it is guaranteed to go irrevocable upon entry.  */
 #define GTMA_HAS_NO_INSTRUMENTATION    (1u << 7)
 
-struct GTY(()) gimple_statement_transaction
+struct GTY((tag("GSS_TRANSACTION")))
+  gtransaction : public gimple_statement_with_memory_ops_base
 {
-  /* [ WORD 1-9 ]  */
-  struct gimple_statement_with_memory_ops_base gsbase;
+  /* [ WORD 1-9 ] : base class */
 
   /* [ WORD 10 ] */
   gimple_seq body;
@@ -696,40 +765,516 @@ enum gimple_statement_structure_enum {
 };
 #undef DEFGSSTRUCT
 
+/* A statement with the invariant that
+      stmt->code == GIMPLE_COND
+   i.e. a conditional jump statement.  */
+
+struct GTY((tag("GSS_WITH_OPS")))
+  gcond : public gimple_statement_with_ops
+{
+  /* no additional fields; this uses the layout for GSS_WITH_OPS. */
+};
+
+/* A statement with the invariant that
+      stmt->code == GIMPLE_DEBUG
+   i.e. a debug statement.  */
+
+struct GTY((tag("GSS_WITH_OPS")))
+  gdebug : public gimple_statement_with_ops
+{
+  /* no additional fields; this uses the layout for GSS_WITH_OPS. */
+};
+
+/* A statement with the invariant that
+      stmt->code == GIMPLE_GOTO
+   i.e. a goto statement.  */
 
-/* Define the overall contents of a gimple tuple.  It may be any of the
-   structures declared above for various types of tuples.  */
-
-union GTY ((desc ("gimple_statement_structure (&%h)"),
-           chain_next ("%h.gsbase.next"), variable_size)) gimple_statement_d {
-  struct gimple_statement_base GTY ((tag ("GSS_BASE"))) gsbase;
-  struct gimple_statement_with_ops GTY ((tag ("GSS_WITH_OPS"))) gsops;
-  struct gimple_statement_with_memory_ops_base GTY ((tag ("GSS_WITH_MEM_OPS_BASE"))) gsmembase;
-  struct gimple_statement_with_memory_ops GTY ((tag ("GSS_WITH_MEM_OPS"))) gsmem;
-  struct gimple_statement_call GTY ((tag ("GSS_CALL"))) gimple_call;
-  struct gimple_statement_omp GTY ((tag ("GSS_OMP"))) omp;
-  struct gimple_statement_bind GTY ((tag ("GSS_BIND"))) gimple_bind;
-  struct gimple_statement_catch GTY ((tag ("GSS_CATCH"))) gimple_catch;
-  struct gimple_statement_eh_filter GTY ((tag ("GSS_EH_FILTER"))) gimple_eh_filter;
-  struct gimple_statement_eh_mnt GTY ((tag ("GSS_EH_MNT"))) gimple_eh_mnt;
-  struct gimple_statement_eh_else GTY ((tag ("GSS_EH_ELSE"))) gimple_eh_else;
-  struct gimple_statement_phi GTY ((tag ("GSS_PHI"))) gimple_phi;
-  struct gimple_statement_eh_ctrl GTY ((tag ("GSS_EH_CTRL"))) gimple_eh_ctrl;
-  struct gimple_statement_try GTY ((tag ("GSS_TRY"))) gimple_try;
-  struct gimple_statement_wce GTY ((tag ("GSS_WCE"))) gimple_wce;
-  struct gimple_statement_asm GTY ((tag ("GSS_ASM"))) gimple_asm;
-  struct gimple_statement_omp_critical GTY ((tag ("GSS_OMP_CRITICAL"))) gimple_omp_critical;
-  struct gimple_statement_omp_for GTY ((tag ("GSS_OMP_FOR"))) gimple_omp_for;
-  struct gimple_statement_omp_parallel GTY ((tag ("GSS_OMP_PARALLEL"))) gimple_omp_parallel;
-  struct gimple_statement_omp_task GTY ((tag ("GSS_OMP_TASK"))) gimple_omp_task;
-  struct gimple_statement_omp_sections GTY ((tag ("GSS_OMP_SECTIONS"))) gimple_omp_sections;
-  struct gimple_statement_omp_single GTY ((tag ("GSS_OMP_SINGLE"))) gimple_omp_single;
-  struct gimple_statement_omp_continue GTY ((tag ("GSS_OMP_CONTINUE"))) gimple_omp_continue;
-  struct gimple_statement_omp_atomic_load GTY ((tag ("GSS_OMP_ATOMIC_LOAD"))) gimple_omp_atomic_load;
-  struct gimple_statement_omp_atomic_store GTY ((tag ("GSS_OMP_ATOMIC_STORE"))) gimple_omp_atomic_store;
-  struct gimple_statement_transaction GTY((tag ("GSS_TRANSACTION"))) gimple_transaction;
+struct GTY((tag("GSS_WITH_OPS")))
+  ggoto : public gimple_statement_with_ops
+{
+  /* no additional fields; this uses the layout for GSS_WITH_OPS. */
+};
+
+/* A statement with the invariant that
+      stmt->code == GIMPLE_LABEL
+   i.e. a label statement.  */
+
+struct GTY((tag("GSS_WITH_OPS")))
+  glabel : public gimple_statement_with_ops
+{
+  /* no additional fields; this uses the layout for GSS_WITH_OPS. */
 };
 
+/* A statement with the invariant that
+      stmt->code == GIMPLE_SWITCH
+   i.e. a switch statement.  */
+
+struct GTY((tag("GSS_WITH_OPS")))
+  gswitch : public gimple_statement_with_ops
+{
+  /* no additional fields; this uses the layout for GSS_WITH_OPS. */
+};
+
+/* A statement with the invariant that
+      stmt->code == GIMPLE_ASSIGN
+   i.e. an assignment statement.  */
+
+struct GTY((tag("GSS_WITH_MEM_OPS")))
+  gassign : public gimple_statement_with_memory_ops
+{
+  /* no additional fields; this uses the layout for GSS_WITH_MEM_OPS. */
+};
+
+/* A statement with the invariant that
+      stmt->code == GIMPLE_RETURN
+   i.e. a return statement.  */
+
+struct GTY((tag("GSS_WITH_MEM_OPS")))
+  greturn : public gimple_statement_with_memory_ops
+{
+  /* no additional fields; this uses the layout for GSS_WITH_MEM_OPS. */
+};
+
+template <>
+template <>
+inline bool
+is_a_helper <gasm *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_ASM;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gassign *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_ASSIGN;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gbind *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_BIND;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gcall *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_CALL;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gcatch *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_CATCH;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gcond *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_COND;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gdebug *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_DEBUG;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <ggoto *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_GOTO;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <glabel *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_LABEL;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gresx *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_RESX;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <geh_dispatch *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_EH_DISPATCH;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <geh_else *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_EH_ELSE;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <geh_filter *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_EH_FILTER;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <geh_mnt *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_EH_MUST_NOT_THROW;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gomp_atomic_load *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_OMP_ATOMIC_LOAD;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gomp_atomic_store *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_OMP_ATOMIC_STORE;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_omp_return *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_OMP_RETURN;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gomp_continue *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_OMP_CONTINUE;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gomp_critical *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_OMP_CRITICAL;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gomp_for *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_OMP_FOR;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_omp_taskreg *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_OMP_PARALLEL || gs->code == GIMPLE_OMP_TASK;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gomp_parallel *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_OMP_PARALLEL;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gomp_target *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_OMP_TARGET;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gomp_sections *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_OMP_SECTIONS;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gomp_single *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_OMP_SINGLE;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gomp_teams *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_OMP_TEAMS;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gomp_task *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_OMP_TASK;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gphi *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_PHI;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <greturn *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_RETURN;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gswitch *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_SWITCH;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gtransaction *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_TRANSACTION;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gtry *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_TRY;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_wce *>::test (gimple gs)
+{
+  return gs->code == GIMPLE_WITH_CLEANUP_EXPR;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gasm *>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_ASM;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gbind *>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_BIND;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gcall *>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_CALL;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gcatch *>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_CATCH;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gresx *>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_RESX;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const geh_dispatch *>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_EH_DISPATCH;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const geh_filter *>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_EH_FILTER;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gomp_atomic_load *>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_OMP_ATOMIC_LOAD;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gomp_atomic_store *>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_OMP_ATOMIC_STORE;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_omp_return *>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_OMP_RETURN;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gomp_continue *>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_OMP_CONTINUE;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gomp_critical *>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_OMP_CRITICAL;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gomp_for *>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_OMP_FOR;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_omp_taskreg *>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_OMP_PARALLEL || gs->code == GIMPLE_OMP_TASK;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gomp_parallel *>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_OMP_PARALLEL;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gomp_target *>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_OMP_TARGET;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gomp_sections *>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_OMP_SECTIONS;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gomp_single *>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_OMP_SINGLE;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gomp_teams *>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_OMP_TEAMS;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gomp_task *>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_OMP_TASK;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gphi *>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_PHI;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gtransaction *>::test (const_gimple gs)
+{
+  return gs->code == GIMPLE_TRANSACTION;
+}
+
 /* Offset in bytes to the location of the operand vector.
    Zero if there is no operand vector for this tuple structure.  */
 extern size_t const gimple_ops_offset_[];
@@ -741,124 +1286,119 @@ extern enum gimple_statement_structure_enum const gss_for_code_[];
    of comminucating the profile info to the builtin expanders.  */
 extern gimple currently_expanding_gimple_stmt;
 
-gimple gimple_build_return (tree);
-
-gimple gimple_build_assign_stat (tree, tree MEM_STAT_DECL);
+#define gimple_alloc(c, n) gimple_alloc_stat (c, n MEM_STAT_INFO)
+gimple gimple_alloc_stat (enum gimple_code, unsigned MEM_STAT_DECL);
+greturn *gimple_build_return (tree);
+void gimple_call_reset_alias_info (gcall *);
+gcall *gimple_build_call_vec (tree, vec<tree> );
+gcall *gimple_build_call (tree, unsigned, ...);
+gcall *gimple_build_call_valist (tree, unsigned, va_list);
+gcall *gimple_build_call_internal (enum internal_fn, unsigned, ...);
+gcall *gimple_build_call_internal_vec (enum internal_fn, vec<tree> );
+gcall *gimple_build_call_from_tree (tree);
+gassign *gimple_build_assign_stat (tree, tree MEM_STAT_DECL);
 #define gimple_build_assign(l,r) gimple_build_assign_stat (l, r MEM_STAT_INFO)
-
-gimple
-gimple_build_assign_with_ops (enum tree_code, tree,
-                             tree, tree CXX_MEM_STAT_INFO);
-gimple
-gimple_build_assign_with_ops (enum tree_code, tree,
-                             tree, tree, tree CXX_MEM_STAT_INFO);
-
-gimple gimple_build_debug_bind_stat (tree, tree, gimple MEM_STAT_DECL);
+gassign *gimple_build_assign_with_ops (enum tree_code, tree,
+                                      tree, tree, tree CXX_MEM_STAT_INFO);
+gassign *gimple_build_assign_with_ops (enum tree_code, tree,
+                                      tree, tree CXX_MEM_STAT_INFO);
+gassign *gimple_build_assign_with_ops (enum tree_code, tree,
+                                      tree CXX_MEM_STAT_INFO);
+gcond *gimple_build_cond (enum tree_code, tree, tree, tree, tree);
+gcond *gimple_build_cond_from_tree (tree, tree, tree);
+void gimple_cond_set_condition_from_tree (gcond *, tree);
+glabel *gimple_build_label (tree label);
+ggoto *gimple_build_goto (tree dest);
+gimple gimple_build_nop (void);
+gbind *gimple_build_bind (tree, gimple_seq, tree);
+gasm *gimple_build_asm_vec (const char *, vec<tree, va_gc> *,
+                                vec<tree, va_gc> *, vec<tree, va_gc> *,
+                                vec<tree, va_gc> *);
+gcatch *gimple_build_catch (tree, gimple_seq);
+geh_filter *gimple_build_eh_filter (tree, gimple_seq);
+geh_mnt *gimple_build_eh_must_not_throw (tree);
+geh_else *gimple_build_eh_else (gimple_seq, gimple_seq);
+gtry *gimple_build_try (gimple_seq, gimple_seq,
+                                       enum gimple_try_flags);
+gimple gimple_build_wce (gimple_seq);
+gresx *gimple_build_resx (int);
+gswitch *gimple_build_switch_nlabels (unsigned, tree, tree);
+gswitch *gimple_build_switch (tree, tree, vec<tree> );
+geh_dispatch *gimple_build_eh_dispatch (int);
+gdebug *gimple_build_debug_bind_stat (tree, tree, gimple MEM_STAT_DECL);
 #define gimple_build_debug_bind(var,val,stmt)                  \
   gimple_build_debug_bind_stat ((var), (val), (stmt) MEM_STAT_INFO)
-gimple gimple_build_debug_source_bind_stat (tree, tree, gimple MEM_STAT_DECL);
+gdebug *gimple_build_debug_source_bind_stat (tree, tree, gimple MEM_STAT_DECL);
 #define gimple_build_debug_source_bind(var,val,stmt)                   \
   gimple_build_debug_source_bind_stat ((var), (val), (stmt) MEM_STAT_INFO)
-
-gimple gimple_build_call_vec (tree, vec<tree> );
-gimple gimple_build_call (tree, unsigned, ...);
-gimple gimple_build_call_valist (tree, unsigned, va_list);
-gimple gimple_build_call_internal (enum internal_fn, unsigned, ...);
-gimple gimple_build_call_internal_vec (enum internal_fn, vec<tree> );
-gimple gimple_build_call_from_tree (tree);
-gimple gimple_build_cond (enum tree_code, tree, tree, tree, tree);
-gimple gimple_build_label (tree label);
-gimple gimple_build_goto (tree dest);
-gimple gimple_build_nop (void);
-gimple gimple_build_bind (tree, gimple_seq, tree);
-gimple gimple_build_asm_vec (const char *, vec<tree, va_gc> *,
-                            vec<tree, va_gc> *, vec<tree, va_gc> *,
-                            vec<tree, va_gc> *);
-gimple gimple_build_catch (tree, gimple_seq);
-gimple gimple_build_eh_filter (tree, gimple_seq);
-gimple gimple_build_eh_must_not_throw (tree);
-gimple gimple_build_eh_else (gimple_seq, gimple_seq);
-gimple gimple_build_try (gimple_seq, gimple_seq, enum gimple_try_flags);
-gimple gimple_build_wce (gimple_seq);
-gimple gimple_build_resx (int);
-gimple gimple_build_eh_dispatch (int);
-gimple gimple_build_switch_nlabels (unsigned, tree, tree);
-gimple gimple_build_switch (tree, tree, vec<tree> );
-gimple gimple_build_omp_parallel (gimple_seq, tree, tree, tree);
-gimple gimple_build_omp_task (gimple_seq, tree, tree, tree, tree, tree, tree);
-gimple gimple_build_omp_for (gimple_seq, int, tree, size_t, gimple_seq);
-gimple gimple_build_omp_critical (gimple_seq, tree);
+gomp_critical *gimple_build_omp_critical (gimple_seq, tree);
+gomp_for *gimple_build_omp_for (gimple_seq, int, tree, size_t, gimple_seq);
+gomp_parallel *gimple_build_omp_parallel (gimple_seq, tree, tree, tree);
+gomp_task *gimple_build_omp_task (gimple_seq, tree, tree, tree, tree,
+                                      tree, tree);
 gimple gimple_build_omp_section (gimple_seq);
-gimple gimple_build_omp_continue (tree, tree);
 gimple gimple_build_omp_master (gimple_seq);
 gimple gimple_build_omp_taskgroup (gimple_seq);
-gimple gimple_build_omp_return (bool);
+gomp_continue *gimple_build_omp_continue (tree, tree);
 gimple gimple_build_omp_ordered (gimple_seq);
-gimple gimple_build_omp_sections (gimple_seq, tree);
+gimple gimple_build_omp_return (bool);
+gomp_sections *gimple_build_omp_sections (gimple_seq, tree);
 gimple gimple_build_omp_sections_switch (void);
-gimple gimple_build_omp_single (gimple_seq, tree);
-gimple gimple_build_omp_target (gimple_seq, int, tree);
-gimple gimple_build_omp_teams (gimple_seq, tree);
-gimple gimple_build_cdt (tree, tree);
-gimple gimple_build_omp_atomic_load (tree, tree);
-gimple gimple_build_omp_atomic_store (tree);
-gimple gimple_build_transaction (gimple_seq, tree);
+gomp_single *gimple_build_omp_single (gimple_seq, tree);
+gomp_target *gimple_build_omp_target (gimple_seq, int, tree);
+gomp_teams *gimple_build_omp_teams (gimple_seq, tree);
+gomp_atomic_load *gimple_build_omp_atomic_load (tree, tree);
+gomp_atomic_store *gimple_build_omp_atomic_store (tree);
+gtransaction *gimple_build_transaction (gimple_seq, tree);
 gimple gimple_build_predict (enum br_predictor, enum prediction);
-enum gimple_statement_structure_enum gss_for_assign (enum tree_code);
-gimple_seq gimple_seq_alloc (void);
-void gimple_seq_free (gimple_seq);
+extern void gimple_seq_add_stmt (gimple_seq *, gimple);
+extern void gimple_seq_add_stmt_without_update (gimple_seq *, gimple);
 void gimple_seq_add_seq (gimple_seq *, gimple_seq);
+void gimple_seq_add_seq_without_update (gimple_seq *, gimple_seq);
+extern void annotate_all_with_location_after (gimple_seq, gimple_stmt_iterator,
+                                             location_t);
+extern void annotate_all_with_location (gimple_seq, location_t);
+bool empty_body_p (gimple_seq);
 gimple_seq gimple_seq_copy (gimple_seq);
 bool gimple_call_same_target_p (const_gimple, const_gimple);
 int gimple_call_flags (const_gimple);
-int gimple_call_return_flags (const_gimple);
-int gimple_call_arg_flags (const_gimple, unsigned);
-void gimple_call_reset_alias_info (gimple);
+int gimple_call_arg_flags (const gcall *, unsigned);
+int gimple_call_return_flags (const gcall *);
 bool gimple_assign_copy_p (gimple);
 bool gimple_assign_ssa_name_copy_p (gimple);
 bool gimple_assign_unary_nop_p (gimple);
 void gimple_set_bb (gimple, basic_block);
 void gimple_assign_set_rhs_from_tree (gimple_stmt_iterator *, tree);
-void gimple_assign_set_rhs_with_ops_1 (gimple_stmt_iterator *, enum tree_code,
-                                      tree, tree, tree);
+void gimple_assign_set_rhs_with_ops (gimple_stmt_iterator *, enum tree_code,
+                                    tree, tree, tree);
 tree gimple_get_lhs (const_gimple);
 void gimple_set_lhs (gimple, tree);
-void gimple_replace_lhs (gimple, tree);
 gimple gimple_copy (gimple);
-gimple gimple_build_cond_from_tree (tree, tree, tree);
-void gimple_cond_set_condition_from_tree (gimple, tree);
 bool gimple_has_side_effects (const_gimple);
-bool gimple_could_trap_p (gimple);
 bool gimple_could_trap_p_1 (gimple, bool, bool);
+bool gimple_could_trap_p (gimple);
 bool gimple_assign_rhs_could_trap_p (gimple);
-bool empty_body_p (gimple_seq);
-extern void annotate_all_with_location_after (gimple_seq, gimple_stmt_iterator,
-                                             location_t);
-extern void annotate_all_with_location (gimple_seq, location_t);
+extern void dump_gimple_statistics (void);
 unsigned get_gimple_rhs_num_ops (enum tree_code);
-#define gimple_alloc(c, n) gimple_alloc_stat (c, n MEM_STAT_INFO)
-gimple gimple_alloc_stat (enum gimple_code, unsigned MEM_STAT_DECL);
-
-/* Return TRUE iff stmt is a call to a built-in function.  */
-extern bool is_gimple_builtin_call (gimple stmt);
-
-extern void recalculate_side_effects (tree);
+extern tree canonicalize_cond_expr_cond (tree);
+gcall *gimple_call_copy_skip_args (gcall *, bitmap);
 extern bool gimple_compare_field_offset (tree, tree);
 extern tree gimple_unsigned_type (tree);
 extern tree gimple_signed_type (tree);
 extern alias_set_type gimple_get_alias_set (tree);
-extern bool walk_stmt_load_store_addr_ops (gimple, void *,
-                                          bool (*)(gimple, tree, void *),
-                                          bool (*)(gimple, tree, void *),
-                                          bool (*)(gimple, tree, void *));
-extern bool walk_stmt_load_store_ops (gimple, void *,
-                                     bool (*)(gimple, tree, void *),
-                                     bool (*)(gimple, tree, void *));
 extern bool gimple_ior_addresses_taken (bitmap, gimple);
-extern bool gimple_call_builtin_p (gimple, enum built_in_class);
-extern bool gimple_call_builtin_p (gimple, enum built_in_function);
-extern bool gimple_asm_clobbers_memory_p (const_gimple);
-extern unsigned gimple_call_get_nobnd_arg_index (const_gimple, unsigned);
+extern bool gimple_builtin_call_types_compatible_p (const_gimple, tree);
+extern bool gimple_call_builtin_p (const_gimple);
+extern bool gimple_call_builtin_p (const_gimple, enum built_in_class);
+extern bool gimple_call_builtin_p (const_gimple, enum built_in_function);
+extern bool gimple_asm_clobbers_memory_p (const gasm *);
+extern void dump_decl_set (FILE *, bitmap);
+extern bool nonfreeing_call_p (gimple);
+extern bool infer_nonnull_range (gimple, tree, bool, bool);
+extern void sort_case_labels (vec<tree>);
+extern void preprocess_case_label_vec_for_gimple (vec<tree>, tree, tree *);
+extern void gimple_seq_set_location (gimple_seq, location_t);
+extern void gimple_seq_discard (gimple_seq);
 
 /* Formal (expression) temporary table handling: multiple occurrences of
    the same scalar expression are evaluated into the same temporary.  */
@@ -869,85 +1409,6 @@ typedef struct gimple_temp_hash_elt
   tree temp;  /* Value */
 } elt_t;
 
-/* Gimplify hashtable helper.  */
-
-struct gimplify_hasher : typed_free_remove <elt_t>
-{
-  typedef elt_t value_type;
-  typedef elt_t compare_type;
-  static inline hashval_t hash (const value_type *);
-  static inline bool equal (const value_type *, const compare_type *);
-};
-
-inline hashval_t
-gimplify_hasher::hash (const value_type *p)
-{
-  tree t = p->val;
-  return iterative_hash_expr (t, 0);
-}
-
-inline bool
-gimplify_hasher::equal (const value_type *p1, const compare_type *p2)
-{
-  tree t1 = p1->val;
-  tree t2 = p2->val;
-  enum tree_code code = TREE_CODE (t1);
-
-  if (TREE_CODE (t2) != code
-      || TREE_TYPE (t1) != TREE_TYPE (t2))
-    return false;
-
-  if (!operand_equal_p (t1, t2, 0))
-    return false;
-
-#ifdef ENABLE_CHECKING
-  /* Only allow them to compare equal if they also hash equal; otherwise
-     results are nondeterminate, and we fail bootstrap comparison.  */
-  gcc_assert (hash (p1) == hash (p2));
-#endif
-
-  return true;
-}
-
-struct gimplify_ctx
-{
-  struct gimplify_ctx *prev_context;
-
-  vec<gimple> bind_expr_stack;
-  tree temps;
-  gimple_seq conditional_cleanups;
-  tree exit_label;
-  tree return_temp;
-
-  vec<tree> case_labels;
-  /* The formal temporary table.  Should this be persistent?  */
-  hash_table <gimplify_hasher> temp_htab;
-
-  int conditions;
-  bool save_stack;
-  bool into_ssa;
-  bool allow_rhs_cond_expr;
-  bool in_cleanup_point_expr;
-};
-
-/* Return true if gimplify_one_sizepos doesn't need to gimplify
-   expr (when in TYPE_SIZE{,_UNIT} and similar type/decl size/bitsize
-   fields).  */
-static inline bool
-is_gimple_sizepos (tree expr)
-{
-  /* gimplify_one_sizepos doesn't need to do anything if the value isn't there,
-     is constant, or contains A PLACEHOLDER_EXPR.  We also don't want to do
-     anything if it's already a VAR_DECL.  If it's a VAR_DECL from another
-     function, the gimplifier will want to replace it with a new variable,
-     but that will cause problems if this type is from outside the function.
-     It's OK to have that here.  */
-  return (expr == NULL_TREE
-         || TREE_CONSTANT (expr)
-         || TREE_CODE (expr) == VAR_DECL
-         || CONTAINS_PLACEHOLDER_P (expr));
-}                                        
-
 /* Get the number of the next statement uid to be allocated.  */
 static inline unsigned int
 gimple_stmt_max_uid (struct function *fn)
@@ -969,27 +1430,6 @@ inc_gimple_stmt_max_uid (struct function *fn)
   return fn->last_stmt_uid++;
 }
 
-/* Miscellaneous helpers.  */
-struct gimplify_omp_ctx;
-extern tree canonicalize_cond_expr_cond (tree);
-extern void dump_decl_set (FILE *, bitmap);
-extern bool nonfreeing_call_p (gimple);
-extern bool infer_nonnull_range (gimple, tree);
-
-/* In trans-mem.c.  */
-extern void diagnose_tm_safe_errors (tree);
-extern void compute_transaction_bits (void);
-
-/* In tree-nested.c.  */
-extern void lower_nested_functions (tree);
-extern void insert_field_into_struct (tree, tree);
-
-/* In cfgexpand.c.  */
-extern tree gimple_assign_rhs_to_tree (gimple);
-
-/* In builtins.c  */
-extern bool validate_gimple_arglist (const_gimple, ...);
-
 /* Return the first node in GIMPLE sequence S.  */
 
 static inline gimple_seq_node
@@ -1008,13 +1448,23 @@ gimple_seq_first_stmt (gimple_seq s)
   return n;
 }
 
+/* Return the first statement in GIMPLE sequence S as a gbind *,
+   verifying that it has code GIMPLE_BIND in a checked build.  */
+
+static inline gbind *
+gimple_seq_first_stmt_as_a_bind (gimple_seq s)
+{
+  gimple_seq_node n = gimple_seq_first (s);
+  return as_a <gbind *> (n);
+}
+
 
 /* Return the last node in GIMPLE sequence S.  */
 
 static inline gimple_seq_node
 gimple_seq_last (gimple_seq s)
 {
-  return s ? s->gsbase.prev : NULL;
+  return s ? s->prev : NULL;
 }
 
 
@@ -1033,7 +1483,7 @@ gimple_seq_last_stmt (gimple_seq s)
 static inline void
 gimple_seq_set_last (gimple_seq *ps, gimple_seq_node last)
 {
-  (*ps)->gsbase.prev = last;
+  (*ps)->prev = last;
 }
 
 
@@ -1052,10 +1502,7 @@ static inline bool
 gimple_seq_empty_p (gimple_seq s)
 {
   return s == NULL;
-}
-
-extern void gimple_seq_add_stmt (gimple_seq *, gimple);
-extern void gimple_seq_add_stmt_without_update (gimple_seq *, gimple);
+}
 
 /* Allocate a new sequence and initialize its first element with STMT.  */
 
@@ -1097,7 +1544,7 @@ set_bb_seq (basic_block bb, gimple_seq seq)
 static inline enum gimple_code
 gimple_code (const_gimple g)
 {
-  return g->gsbase.code;
+  return g->code;
 }
 
 
@@ -1160,7 +1607,7 @@ gimple_has_substatements (gimple g)
 static inline basic_block
 gimple_bb (const_gimple g)
 {
-  return g->gsbase.bb;
+  return g->bb;
 }
 
 
@@ -1169,7 +1616,7 @@ gimple_bb (const_gimple g)
 static inline tree
 gimple_block (const_gimple g)
 {
-  return LOCATION_BLOCK (g->gsbase.location);
+  return LOCATION_BLOCK (g->location);
 }
 
 
@@ -1179,10 +1626,10 @@ static inline void
 gimple_set_block (gimple g, tree block)
 {
   if (block)
-    g->gsbase.location =
-       COMBINE_LOCATION_DATA (line_table, g->gsbase.location, block);
+    g->location =
+       COMBINE_LOCATION_DATA (line_table, g->location, block);
   else
-    g->gsbase.location = LOCATION_LOCUS (g->gsbase.location);
+    g->location = LOCATION_LOCUS (g->location);
 }
 
 
@@ -1191,7 +1638,16 @@ gimple_set_block (gimple g, tree block)
 static inline location_t
 gimple_location (const_gimple g)
 {
-  return g->gsbase.location;
+  return g->location;
+}
+
+/* Return location information for statement G if g is not NULL.
+   Otherwise, UNKNOWN_LOCATION is returned.  */
+
+static inline location_t
+gimple_location_safe (const_gimple g)
+{
+  return g ? gimple_location (g) : UNKNOWN_LOCATION;
 }
 
 /* Return pointer to location information for statement G.  */
@@ -1199,7 +1655,7 @@ gimple_location (const_gimple g)
 static inline const location_t *
 gimple_location_ptr (const_gimple g)
 {
-  return &g->gsbase.location;
+  return &g->location;
 }
 
 
@@ -1208,7 +1664,7 @@ gimple_location_ptr (const_gimple g)
 static inline void
 gimple_set_location (gimple g, location_t location)
 {
-  g->gsbase.location = location;
+  g->location = location;
 }
 
 
@@ -1253,7 +1709,7 @@ gimple_seq_singleton_p (gimple_seq seq)
 static inline bool
 gimple_no_warning_p (const_gimple stmt)
 {
-  return stmt->gsbase.no_warning;
+  return stmt->no_warning;
 }
 
 /* Set the no_warning flag of STMT to NO_WARNING.  */
@@ -1261,63 +1717,108 @@ gimple_no_warning_p (const_gimple stmt)
 static inline void
 gimple_set_no_warning (gimple stmt, bool no_warning)
 {
-  stmt->gsbase.no_warning = (unsigned) no_warning;
+  stmt->no_warning = (unsigned) no_warning;
 }
 
-/* Set the visited status on statement STMT to VISITED_P.  */
+/* Set the visited status on statement STMT to VISITED_P.
+
+   Please note that this 'visited' property of the gimple statement is
+   supposed to be undefined at pass boundaries.  This means that a
+   given pass should not assume it contains any useful value when the
+   pass starts and thus can set it to any value it sees fit.
+
+   You can learn more about the visited property of the gimple
+   statement by reading the comments of the 'visited' data member of
+   struct gimple statement_base.
+ */
 
 static inline void
 gimple_set_visited (gimple stmt, bool visited_p)
 {
-  stmt->gsbase.visited = (unsigned) visited_p;
+  stmt->visited = (unsigned) visited_p;
 }
 
 
-/* Return the visited status for statement STMT.  */
+/* Return the visited status for statement STMT.
+
+   Please note that this 'visited' property of the gimple statement is
+   supposed to be undefined at pass boundaries.  This means that a
+   given pass should not assume it contains any useful value when the
+   pass starts and thus can set it to any value it sees fit.
+
+   You can learn more about the visited property of the gimple
+   statement by reading the comments of the 'visited' data member of
+   struct gimple statement_base.  */
 
 static inline bool
 gimple_visited_p (gimple stmt)
 {
-  return stmt->gsbase.visited;
+  return stmt->visited;
 }
 
 
-/* Set pass local flag PLF on statement STMT to VAL_P.  */
+/* Set pass local flag PLF on statement STMT to VAL_P.
+
+   Please note that this PLF property of the gimple statement is
+   supposed to be undefined at pass boundaries.  This means that a
+   given pass should not assume it contains any useful value when the
+   pass starts and thus can set it to any value it sees fit.
+
+   You can learn more about the PLF property by reading the comment of
+   the 'plf' data member of struct gimple_statement_structure.  */
 
 static inline void
 gimple_set_plf (gimple stmt, enum plf_mask plf, bool val_p)
 {
   if (val_p)
-    stmt->gsbase.plf |= (unsigned int) plf;
+    stmt->plf |= (unsigned int) plf;
   else
-    stmt->gsbase.plf &= ~((unsigned int) plf);
+    stmt->plf &= ~((unsigned int) plf);
 }
 
 
-/* Return the value of pass local flag PLF on statement STMT.  */
+/* Return the value of pass local flag PLF on statement STMT.
+
+   Please note that this 'plf' property of the gimple statement is
+   supposed to be undefined at pass boundaries.  This means that a
+   given pass should not assume it contains any useful value when the
+   pass starts and thus can set it to any value it sees fit.
+
+   You can learn more about the plf property by reading the comment of
+   the 'plf' data member of struct gimple_statement_structure.  */
 
 static inline unsigned int
 gimple_plf (gimple stmt, enum plf_mask plf)
 {
-  return stmt->gsbase.plf & ((unsigned int) plf);
+  return stmt->plf & ((unsigned int) plf);
 }
 
 
-/* Set the UID of statement.  */
+/* Set the UID of statement.
+
+   Please note that this UID property is supposed to be undefined at
+   pass boundaries.  This means that a given pass should not assume it
+   contains any useful value when the pass starts and thus can set it
+   to any value it sees fit.  */
 
 static inline void
 gimple_set_uid (gimple g, unsigned uid)
 {
-  g->gsbase.uid = uid;
+  g->uid = uid;
 }
 
 
-/* Return the UID of statement.  */
+/* Return the UID of statement.
+
+   Please note that this UID property is supposed to be undefined at
+   pass boundaries.  This means that a given pass should not assume it
+   contains any useful value when the pass starts and thus can set it
+   to any value it sees fit.  */
 
 static inline unsigned
 gimple_uid (const_gimple g)
 {
-  return g->gsbase.uid;
+  return g->uid;
 }
 
 
@@ -1326,8 +1827,8 @@ gimple_uid (const_gimple g)
 static inline void
 gimple_init_singleton (gimple g)
 {
-  g->gsbase.next = NULL;
-  g->gsbase.prev = g;
+  g->next = NULL;
+  g->prev = g;
 }
 
 
@@ -1339,6 +1840,21 @@ gimple_has_ops (const_gimple g)
   return gimple_code (g) >= GIMPLE_COND && gimple_code (g) <= GIMPLE_RETURN;
 }
 
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_with_ops *>::test (const_gimple gs)
+{
+  return gimple_has_ops (gs);
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_with_ops *>::test (gimple gs)
+{
+  return gimple_has_ops (gs);
+}
 
 /* Return true if GIMPLE statement G has memory operands.  */
 
@@ -1348,15 +1864,32 @@ gimple_has_mem_ops (const_gimple g)
   return gimple_code (g) >= GIMPLE_ASSIGN && gimple_code (g) <= GIMPLE_RETURN;
 }
 
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_with_memory_ops *>::test (const_gimple gs)
+{
+  return gimple_has_mem_ops (gs);
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_with_memory_ops *>::test (gimple gs)
+{
+  return gimple_has_mem_ops (gs);
+}
 
 /* Return the set of USE operands for statement G.  */
 
 static inline struct use_optype_d *
 gimple_use_ops (const_gimple g)
 {
-  if (!gimple_has_ops (g))
+  const gimple_statement_with_ops *ops_stmt =
+    dyn_cast <const gimple_statement_with_ops *> (g);
+  if (!ops_stmt)
     return NULL;
-  return g->gsops.opbase.use_ops;
+  return ops_stmt->use_ops;
 }
 
 
@@ -1365,8 +1898,9 @@ gimple_use_ops (const_gimple g)
 static inline void
 gimple_set_use_ops (gimple g, struct use_optype_d *use)
 {
-  gcc_gimple_checking_assert (gimple_has_ops (g));
-  g->gsops.opbase.use_ops = use;
+  gimple_statement_with_ops *ops_stmt =
+    as_a <gimple_statement_with_ops *> (g);
+  ops_stmt->use_ops = use;
 }
 
 
@@ -1375,9 +1909,11 @@ gimple_set_use_ops (gimple g, struct use_optype_d *use)
 static inline tree
 gimple_vuse (const_gimple g)
 {
-  if (!gimple_has_mem_ops (g))
+  const gimple_statement_with_memory_ops *mem_ops_stmt =
+     dyn_cast <const gimple_statement_with_memory_ops *> (g);
+  if (!mem_ops_stmt)
     return NULL_TREE;
-  return g->gsmembase.vuse;
+  return mem_ops_stmt->vuse;
 }
 
 /* Return the single VDEF operand of the statement G.  */
@@ -1385,9 +1921,11 @@ gimple_vuse (const_gimple g)
 static inline tree
 gimple_vdef (const_gimple g)
 {
-  if (!gimple_has_mem_ops (g))
+  const gimple_statement_with_memory_ops *mem_ops_stmt =
+     dyn_cast <const gimple_statement_with_memory_ops *> (g);
+  if (!mem_ops_stmt)
     return NULL_TREE;
-  return g->gsmembase.vdef;
+  return mem_ops_stmt->vdef;
 }
 
 /* Return the single VUSE operand of the statement G.  */
@@ -1395,9 +1933,11 @@ gimple_vdef (const_gimple g)
 static inline tree *
 gimple_vuse_ptr (gimple g)
 {
-  if (!gimple_has_mem_ops (g))
+  gimple_statement_with_memory_ops *mem_ops_stmt =
+     dyn_cast <gimple_statement_with_memory_ops *> (g);
+  if (!mem_ops_stmt)
     return NULL;
-  return &g->gsmembase.vuse;
+  return &mem_ops_stmt->vuse;
 }
 
 /* Return the single VDEF operand of the statement G.  */
@@ -1405,9 +1945,11 @@ gimple_vuse_ptr (gimple g)
 static inline tree *
 gimple_vdef_ptr (gimple g)
 {
-  if (!gimple_has_mem_ops (g))
+  gimple_statement_with_memory_ops *mem_ops_stmt =
+     dyn_cast <gimple_statement_with_memory_ops *> (g);
+  if (!mem_ops_stmt)
     return NULL;
-  return &g->gsmembase.vdef;
+  return &mem_ops_stmt->vdef;
 }
 
 /* Set the single VUSE operand of the statement G.  */
@@ -1415,8 +1957,9 @@ gimple_vdef_ptr (gimple g)
 static inline void
 gimple_set_vuse (gimple g, tree vuse)
 {
-  gcc_gimple_checking_assert (gimple_has_mem_ops (g));
-  g->gsmembase.vuse = vuse;
+  gimple_statement_with_memory_ops *mem_ops_stmt =
+    as_a <gimple_statement_with_memory_ops *> (g);
+  mem_ops_stmt->vuse = vuse;
 }
 
 /* Set the single VDEF operand of the statement G.  */
@@ -1424,8 +1967,9 @@ gimple_set_vuse (gimple g, tree vuse)
 static inline void
 gimple_set_vdef (gimple g, tree vdef)
 {
-  gcc_gimple_checking_assert (gimple_has_mem_ops (g));
-  g->gsmembase.vdef = vdef;
+  gimple_statement_with_memory_ops *mem_ops_stmt =
+    as_a <gimple_statement_with_memory_ops *> (g);
+  mem_ops_stmt->vdef = vdef;
 }
 
 
@@ -1435,7 +1979,7 @@ gimple_set_vdef (gimple g, tree vdef)
 static inline bool
 gimple_modified_p (const_gimple g)
 {
-  return (gimple_has_ops (g)) ? (bool) g->gsbase.modified : false;
+  return (gimple_has_ops (g)) ? (bool) g->modified : false;
 }
 
 
@@ -1446,7 +1990,7 @@ static inline void
 gimple_set_modified (gimple s, bool modifiedp)
 {
   if (gimple_has_ops (s))
-    s->gsbase.modified = (unsigned) modifiedp;
+    s->modified = (unsigned) modifiedp;
 }
 
 
@@ -1461,7 +2005,7 @@ gimple_expr_code (const_gimple stmt)
 {
   enum gimple_code code = gimple_code (stmt);
   if (code == GIMPLE_ASSIGN || code == GIMPLE_COND)
-    return (enum tree_code) stmt->gsbase.subcode;
+    return (enum tree_code) stmt->subcode;
   else
     {
       gcc_gimple_checking_assert (code == GIMPLE_CALL);
@@ -1476,7 +2020,7 @@ static inline bool
 gimple_has_volatile_ops (const_gimple stmt)
 {
   if (gimple_has_mem_ops (stmt))
-    return stmt->gsbase.has_volatile_ops;
+    return stmt->has_volatile_ops;
   else
     return false;
 }
@@ -1488,7 +2032,7 @@ static inline void
 gimple_set_has_volatile_ops (gimple stmt, bool volatilep)
 {
   if (gimple_has_mem_ops (stmt))
-    stmt->gsbase.has_volatile_ops = (unsigned) volatilep;
+    stmt->has_volatile_ops = (unsigned) volatilep;
 }
 
 /* Return true if STMT is in a transaction.  */
@@ -1515,7 +2059,7 @@ gimple_omp_subcode (const_gimple s)
 {
   gcc_gimple_checking_assert (gimple_code (s) >= GIMPLE_OMP_ATOMIC_LOAD
              && gimple_code (s) <= GIMPLE_OMP_TEAMS);
-  return s->gsbase.subcode;
+  return s->subcode;
 }
 
 /* Set the subcode for OMP statement S to SUBCODE.  */
@@ -1526,7 +2070,7 @@ gimple_omp_set_subcode (gimple s, unsigned int subcode)
   /* We only have 16 bits for the subcode.  Assert that we are not
      overflowing it.  */
   gcc_gimple_checking_assert (subcode < (1 << 16));
-  s->gsbase.subcode = subcode;
+  s->subcode = subcode;
 }
 
 /* Set the nowait flag on OMP_RETURN statement S.  */
@@ -1535,7 +2079,7 @@ static inline void
 gimple_omp_return_set_nowait (gimple s)
 {
   GIMPLE_CHECK (s, GIMPLE_OMP_RETURN);
-  s->gsbase.subcode |= GF_OMP_RETURN_NOWAIT;
+  s->subcode |= GF_OMP_RETURN_NOWAIT;
 }
 
 
@@ -1555,8 +2099,9 @@ gimple_omp_return_nowait_p (const_gimple g)
 static inline void
 gimple_omp_return_set_lhs (gimple g, tree lhs)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_RETURN);
-  g->gimple_omp_atomic_store.val = lhs;
+  gimple_statement_omp_return *omp_return_stmt =
+    as_a <gimple_statement_omp_return *> (g);
+  omp_return_stmt->val = lhs;
 }
 
 
@@ -1565,8 +2110,9 @@ gimple_omp_return_set_lhs (gimple g, tree lhs)
 static inline tree
 gimple_omp_return_lhs (const_gimple g)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_RETURN);
-  return g->gimple_omp_atomic_store.val;
+  const gimple_statement_omp_return *omp_return_stmt =
+    as_a <const gimple_statement_omp_return *> (g);
+  return omp_return_stmt->val;
 }
 
 
@@ -1575,8 +2121,9 @@ gimple_omp_return_lhs (const_gimple g)
 static inline tree *
 gimple_omp_return_lhs_ptr (gimple g)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_RETURN);
-  return &g->gimple_omp_atomic_store.val;
+  gimple_statement_omp_return *omp_return_stmt =
+    as_a <gimple_statement_omp_return *> (g);
+  return &omp_return_stmt->val;
 }
 
 
@@ -1597,7 +2144,7 @@ static inline void
 gimple_omp_section_set_last (gimple g)
 {
   GIMPLE_CHECK (g, GIMPLE_OMP_SECTION);
-  g->gsbase.subcode |= GF_OMP_SECTION_LAST;
+  g->subcode |= GF_OMP_SECTION_LAST;
 }
 
 
@@ -1620,9 +2167,9 @@ gimple_omp_parallel_set_combined_p (gimple g, bool combined_p)
 {
   GIMPLE_CHECK (g, GIMPLE_OMP_PARALLEL);
   if (combined_p)
-    g->gsbase.subcode |= GF_OMP_PARALLEL_COMBINED;
+    g->subcode |= GF_OMP_PARALLEL_COMBINED;
   else
-    g->gsbase.subcode &= ~GF_OMP_PARALLEL_COMBINED;
+    g->subcode &= ~GF_OMP_PARALLEL_COMBINED;
 }
 
 
@@ -1645,7 +2192,7 @@ gimple_omp_atomic_set_need_value (gimple g)
 {
   if (gimple_code (g) != GIMPLE_OMP_ATOMIC_LOAD)
     GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_STORE);
-  g->gsbase.subcode |= GF_OMP_ATOMIC_NEED_VALUE;
+  g->subcode |= GF_OMP_ATOMIC_NEED_VALUE;
 }
 
 
@@ -1668,7 +2215,7 @@ gimple_omp_atomic_set_seq_cst (gimple g)
 {
   if (gimple_code (g) != GIMPLE_OMP_ATOMIC_LOAD)
     GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_STORE);
-  g->gsbase.subcode |= GF_OMP_ATOMIC_SEQ_CST;
+  g->subcode |= GF_OMP_ATOMIC_SEQ_CST;
 }
 
 
@@ -1677,7 +2224,7 @@ gimple_omp_atomic_set_seq_cst (gimple g)
 static inline unsigned
 gimple_num_ops (const_gimple gs)
 {
-  return gs->gsbase.num_ops;
+  return gs->num_ops;
 }
 
 
@@ -1686,7 +2233,7 @@ gimple_num_ops (const_gimple gs)
 static inline void
 gimple_set_num_ops (gimple gs, unsigned num_ops)
 {
-  gs->gsbase.num_ops = num_ops;
+  gs->num_ops = num_ops;
 }
 
 
@@ -1901,23 +2448,32 @@ gimple_assign_set_rhs3 (gimple gs, tree rhs)
   gimple_set_op (gs, 3, rhs);
 }
 
-/* A wrapper around gimple_assign_set_rhs_with_ops_1, for callers which expect
-   to see only a maximum of two operands.  */
+/* A wrapper around 3 operand gimple_assign_set_rhs_with_ops, for callers
+   which expect to see only two operands.  */
 
 static inline void
 gimple_assign_set_rhs_with_ops (gimple_stmt_iterator *gsi, enum tree_code code,
                                tree op1, tree op2)
 {
-  gimple_assign_set_rhs_with_ops_1 (gsi, code, op1, op2, NULL);
+  gimple_assign_set_rhs_with_ops (gsi, code, op1, op2, NULL);
+}
+
+/* A wrapper around 3 operand gimple_assign_set_rhs_with_ops, for callers
+   which expect to see only one operands.  */
+
+static inline void
+gimple_assign_set_rhs_with_ops (gimple_stmt_iterator *gsi, enum tree_code code,
+                               tree op1)
+{
+  gimple_assign_set_rhs_with_ops (gsi, code, op1, NULL, NULL);
 }
 
 /* Returns true if GS is a nontemporal move.  */
 
 static inline bool
-gimple_assign_nontemporal_move_p (const_gimple gs)
+gimple_assign_nontemporal_move_p (const gassign *gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASSIGN);
-  return gs->gsbase.nontemporal_move;
+  return gs->nontemporal_move;
 }
 
 /* Sets nontemporal move flag of GS to NONTEMPORAL.  */
@@ -1926,7 +2482,7 @@ static inline void
 gimple_assign_set_nontemporal_move (gimple gs, bool nontemporal)
 {
   GIMPLE_CHECK (gs, GIMPLE_ASSIGN);
-  gs->gsbase.nontemporal_move = nontemporal;
+  gs->nontemporal_move = nontemporal;
 }
 
 
@@ -1940,7 +2496,7 @@ gimple_assign_rhs_code (const_gimple gs)
   enum tree_code code;
   GIMPLE_CHECK (gs, GIMPLE_ASSIGN);
 
-  code = (enum tree_code) gs->gsbase.subcode;
+  code = (enum tree_code) gs->subcode;
   /* While we initially set subcode to the TREE_CODE of the rhs for
      GIMPLE_SINGLE_RHS assigns we do not update that subcode to stay
      in sync when we rewrite stmts into SSA form or do SSA propagations.  */
@@ -1958,7 +2514,7 @@ static inline void
 gimple_assign_set_rhs_code (gimple s, enum tree_code code)
 {
   GIMPLE_CHECK (s, GIMPLE_ASSIGN);
-  s->gsbase.subcode = code;
+  s->subcode = code;
 }
 
 
@@ -1979,7 +2535,7 @@ gimple_assign_rhs_class (const_gimple gs)
    and do not have the semantics of a copy, such as COND_EXPR.  */
 
 static inline bool
-gimple_assign_single_p (gimple gs)
+gimple_assign_single_p (const_gimple gs)
 {
   return (is_gimple_assign (gs)
           && gimple_assign_rhs_class (gs) == GIMPLE_SINGLE_RHS);
@@ -1988,7 +2544,7 @@ gimple_assign_single_p (gimple gs)
 /* Return true if GS performs a store to its lhs.  */
 
 static inline bool
-gimple_store_p (gimple gs)
+gimple_store_p (const_gimple gs)
 {
   tree lhs = gimple_get_lhs (gs);
   return lhs && !is_gimple_reg (lhs);
@@ -1997,7 +2553,7 @@ gimple_store_p (gimple gs)
 /* Return true if GS is an assignment that loads from its rhs1.  */
 
 static inline bool
-gimple_assign_load_p (gimple gs)
+gimple_assign_load_p (const_gimple gs)
 {
   tree rhs;
   if (!gimple_assign_single_p (gs))
@@ -2014,7 +2570,7 @@ gimple_assign_load_p (gimple gs)
 /* Return true if S is a type-cast assignment.  */
 
 static inline bool
-gimple_assign_cast_p (gimple s)
+gimple_assign_cast_p (const_gimple s)
 {
   if (is_gimple_assign (s))
     {
@@ -2030,7 +2586,7 @@ gimple_assign_cast_p (gimple s)
 /* Return true if S is a clobber statement.  */
 
 static inline bool
-gimple_clobber_p (gimple s)
+gimple_clobber_p (const_gimple s)
 {
   return gimple_assign_single_p (s)
          && TREE_CLOBBER_P (gimple_assign_rhs1 (s));
@@ -2083,7 +2639,32 @@ static inline bool
 gimple_call_internal_p (const_gimple gs)
 {
   GIMPLE_CHECK (gs, GIMPLE_CALL);
-  return (gs->gsbase.subcode & GF_CALL_INTERNAL) != 0;
+  return (gs->subcode & GF_CALL_INTERNAL) != 0;
+}
+
+
+/* Return true if call GS is marked as instrumented by
+   Pointer Bounds Checker.  */
+
+static inline bool
+gimple_call_with_bounds_p (const_gimple gs)
+{
+  GIMPLE_CHECK (gs, GIMPLE_CALL);
+  return (gs->subcode & GF_CALL_WITH_BOUNDS) != 0;
+}
+
+
+/* If INSTRUMENTED_P is true, marm statement GS as instrumented by
+   Pointer Bounds Checker.  */
+
+static inline void
+gimple_call_set_with_bounds (gimple gs, bool with_bounds)
+{
+  GIMPLE_CHECK (gs, GIMPLE_CALL);
+  if (with_bounds)
+    gs->subcode |= GF_CALL_WITH_BOUNDS;
+  else
+    gs->subcode &= ~GF_CALL_WITH_BOUNDS;
 }
 
 
@@ -2093,7 +2674,30 @@ static inline enum internal_fn
 gimple_call_internal_fn (const_gimple gs)
 {
   gcc_gimple_checking_assert (gimple_call_internal_p (gs));
-  return gs->gimple_call.u.internal_fn;
+  return static_cast <const gcall *> (gs)->u.internal_fn;
+}
+
+/* If CTRL_ALTERING_P is true, mark GIMPLE_CALL S to be a stmt
+   that could alter control flow.  */
+
+static inline void
+gimple_call_set_ctrl_altering (gimple s, bool ctrl_altering_p)
+{
+  GIMPLE_CHECK (s, GIMPLE_CALL);
+  if (ctrl_altering_p)
+    s->subcode |= GF_CALL_CTRL_ALTERING;
+  else
+    s->subcode &= ~GF_CALL_CTRL_ALTERING;
+}
+
+/* Return true if call GS calls an func whose GF_CALL_CTRL_ALTERING
+   flag is set. Such call could not be a stmt in the middle of a bb.  */
+
+static inline bool
+gimple_call_ctrl_altering_p (const_gimple gs)
+{
+  GIMPLE_CHECK (gs, GIMPLE_CALL);
+  return (gs->subcode & GF_CALL_CTRL_ALTERING) != 0;
 }
 
 
@@ -2102,20 +2706,19 @@ gimple_call_internal_fn (const_gimple gs)
 static inline tree
 gimple_call_fntype (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_CALL);
+  const gcall *call_stmt = as_a <const gcall *> (gs);
   if (gimple_call_internal_p (gs))
     return NULL_TREE;
-  return gs->gimple_call.u.fntype;
+  return call_stmt->u.fntype;
 }
 
-/* Set the type of the function called by GS to FNTYPE.  */
+/* Set the type of the function called by CALL_STMT to FNTYPE.  */
 
 static inline void
-gimple_call_set_fntype (gimple gs, tree fntype)
+gimple_call_set_fntype (gcall *call_stmt, tree fntype)
 {
-  GIMPLE_CHECK (gs, GIMPLE_CALL);
-  gcc_gimple_checking_assert (!gimple_call_internal_p (gs));
-  gs->gimple_call.u.fntype = fntype;
+  gcc_gimple_checking_assert (!gimple_call_internal_p (call_stmt));
+  call_stmt->u.fntype = fntype;
 }
 
 
@@ -2143,9 +2746,8 @@ gimple_call_fn_ptr (const_gimple gs)
 /* Set FN to be the function called by call statement GS.  */
 
 static inline void
-gimple_call_set_fn (gimple gs, tree fn)
+gimple_call_set_fn (gcall *gs, tree fn)
 {
-  GIMPLE_CHECK (gs, GIMPLE_CALL);
   gcc_gimple_checking_assert (!gimple_call_internal_p (gs));
   gimple_set_op (gs, 1, fn);
 }
@@ -2162,14 +2764,13 @@ gimple_call_set_fndecl (gimple gs, tree decl)
 }
 
 
-/* Set internal function FN to be the function called by call statement GS.  */
+/* Set internal function FN to be the function called by call statement CALL_STMT.  */
 
 static inline void
-gimple_call_set_internal_fn (gimple gs, enum internal_fn fn)
+gimple_call_set_internal_fn (gcall *call_stmt, enum internal_fn fn)
 {
-  GIMPLE_CHECK (gs, GIMPLE_CALL);
-  gcc_gimple_checking_assert (gimple_call_internal_p (gs));
-  gs->gimple_call.u.internal_fn = fn;
+  gcc_gimple_checking_assert (gimple_call_internal_p (call_stmt));
+  call_stmt->u.internal_fn = fn;
 }
 
 
@@ -2187,7 +2788,7 @@ gimple_call_fndecl (const_gimple gs)
 /* Return the type returned by call statement GS.  */
 
 static inline tree
-gimple_call_return_type (const_gimple gs)
+gimple_call_return_type (const gcall *gs)
 {
   tree type = gimple_call_fntype (gs);
 
@@ -2210,23 +2811,20 @@ gimple_call_chain (const_gimple gs)
 }
 
 
-/* Return a pointer to the static chain for call statement GS.  */
+/* Return a pointer to the static chain for call statement CALL_STMT.  */
 
 static inline tree *
-gimple_call_chain_ptr (const_gimple gs)
+gimple_call_chain_ptr (const gcall *call_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_CALL);
-  return gimple_op_ptr (gs, 2);
+  return gimple_op_ptr (call_stmt, 2);
 }
 
-/* Set CHAIN to be the static chain for call statement GS.  */
+/* Set CHAIN to be the static chain for call statement CALL_STMT.  */
 
 static inline void
-gimple_call_set_chain (gimple gs, tree chain)
+gimple_call_set_chain (gcall *call_stmt, tree chain)
 {
-  GIMPLE_CHECK (gs, GIMPLE_CALL);
-
-  gimple_set_op (gs, 2, chain);
+  gimple_set_op (call_stmt, 2, chain);
 }
 
 
@@ -2252,32 +2850,6 @@ gimple_call_arg (const_gimple gs, unsigned index)
 }
 
 
-/* Return the number of arguments used by call statement GS
-   ignoring bound ones.  */
-
-static inline unsigned
-gimple_call_num_nobnd_args (const_gimple gs)
-{
-  unsigned num_args = gimple_call_num_args (gs);
-  unsigned res = num_args;
-  for (unsigned n = 0; n < num_args; n++)
-    if (POINTER_BOUNDS_P (gimple_call_arg (gs, n)))
-      res--;
-  return res;
-}
-
-
-/* Return INDEX's call argument ignoring bound ones.  */
-static inline tree
-gimple_call_nobnd_arg (const_gimple gs, unsigned index)
-{
-  /* No bound args may exist if pointers checker is off.  */
-  if (!flag_check_pointer_bounds)
-    return gimple_call_arg (gs, index);
-  return gimple_call_arg (gs, gimple_call_get_nobnd_arg_index (gs, index));
-}
-
-
 /* Return a pointer to the argument at position INDEX for call
    statement GS.  */
 
@@ -2304,23 +2876,21 @@ gimple_call_set_arg (gimple gs, unsigned index, tree arg)
    candidate for tail call optimization.  */
 
 static inline void
-gimple_call_set_tail (gimple s, bool tail_p)
+gimple_call_set_tail (gcall *s, bool tail_p)
 {
-  GIMPLE_CHECK (s, GIMPLE_CALL);
   if (tail_p)
-    s->gsbase.subcode |= GF_CALL_TAILCALL;
+    s->subcode |= GF_CALL_TAILCALL;
   else
-    s->gsbase.subcode &= ~GF_CALL_TAILCALL;
+    s->subcode &= ~GF_CALL_TAILCALL;
 }
 
 
 /* Return true if GIMPLE_CALL S is marked as a tail call.  */
 
 static inline bool
-gimple_call_tail_p (gimple s)
+gimple_call_tail_p (gcall *s)
 {
-  GIMPLE_CHECK (s, GIMPLE_CALL);
-  return (s->gsbase.subcode & GF_CALL_TAILCALL) != 0;
+  return (s->subcode & GF_CALL_TAILCALL) != 0;
 }
 
 
@@ -2329,23 +2899,21 @@ gimple_call_tail_p (gimple s)
    expansion as the return slot for calls that return in memory.  */
 
 static inline void
-gimple_call_set_return_slot_opt (gimple s, bool return_slot_opt_p)
+gimple_call_set_return_slot_opt (gcall *s, bool return_slot_opt_p)
 {
-  GIMPLE_CHECK (s, GIMPLE_CALL);
   if (return_slot_opt_p)
-    s->gsbase.subcode |= GF_CALL_RETURN_SLOT_OPT;
+    s->subcode |= GF_CALL_RETURN_SLOT_OPT;
   else
-    s->gsbase.subcode &= ~GF_CALL_RETURN_SLOT_OPT;
+    s->subcode &= ~GF_CALL_RETURN_SLOT_OPT;
 }
 
 
 /* Return true if S is marked for return slot optimization.  */
 
 static inline bool
-gimple_call_return_slot_opt_p (gimple s)
+gimple_call_return_slot_opt_p (gcall *s)
 {
-  GIMPLE_CHECK (s, GIMPLE_CALL);
-  return (s->gsbase.subcode & GF_CALL_RETURN_SLOT_OPT) != 0;
+  return (s->subcode & GF_CALL_RETURN_SLOT_OPT) != 0;
 }
 
 
@@ -2353,23 +2921,21 @@ gimple_call_return_slot_opt_p (gimple s)
    thunk to the thunked-to function.  */
 
 static inline void
-gimple_call_set_from_thunk (gimple s, bool from_thunk_p)
+gimple_call_set_from_thunk (gcall *s, bool from_thunk_p)
 {
-  GIMPLE_CHECK (s, GIMPLE_CALL);
   if (from_thunk_p)
-    s->gsbase.subcode |= GF_CALL_FROM_THUNK;
+    s->subcode |= GF_CALL_FROM_THUNK;
   else
-    s->gsbase.subcode &= ~GF_CALL_FROM_THUNK;
+    s->subcode &= ~GF_CALL_FROM_THUNK;
 }
 
 
 /* Return true if GIMPLE_CALL S is a jump from a thunk.  */
 
 static inline bool
-gimple_call_from_thunk_p (gimple s)
+gimple_call_from_thunk_p (gcall *s)
 {
-  GIMPLE_CHECK (s, GIMPLE_CALL);
-  return (s->gsbase.subcode & GF_CALL_FROM_THUNK) != 0;
+  return (s->subcode & GF_CALL_FROM_THUNK) != 0;
 }
 
 
@@ -2377,13 +2943,12 @@ gimple_call_from_thunk_p (gimple s)
    argument pack in its argument list.  */
 
 static inline void
-gimple_call_set_va_arg_pack (gimple s, bool pass_arg_pack_p)
+gimple_call_set_va_arg_pack (gcall *s, bool pass_arg_pack_p)
 {
-  GIMPLE_CHECK (s, GIMPLE_CALL);
   if (pass_arg_pack_p)
-    s->gsbase.subcode |= GF_CALL_VA_ARG_PACK;
+    s->subcode |= GF_CALL_VA_ARG_PACK;
   else
-    s->gsbase.subcode &= ~GF_CALL_VA_ARG_PACK;
+    s->subcode &= ~GF_CALL_VA_ARG_PACK;
 }
 
 
@@ -2391,10 +2956,9 @@ gimple_call_set_va_arg_pack (gimple s, bool pass_arg_pack_p)
    argument pack in its argument list.  */
 
 static inline bool
-gimple_call_va_arg_pack_p (gimple s)
+gimple_call_va_arg_pack_p (gcall *s)
 {
-  GIMPLE_CHECK (s, GIMPLE_CALL);
-  return (s->gsbase.subcode & GF_CALL_VA_ARG_PACK) != 0;
+  return (s->subcode & GF_CALL_VA_ARG_PACK) != 0;
 }
 
 
@@ -2412,21 +2976,19 @@ gimple_call_noreturn_p (gimple s)
    even if the called function can throw in other cases.  */
 
 static inline void
-gimple_call_set_nothrow (gimple s, bool nothrow_p)
+gimple_call_set_nothrow (gcall *s, bool nothrow_p)
 {
-  GIMPLE_CHECK (s, GIMPLE_CALL);
   if (nothrow_p)
-    s->gsbase.subcode |= GF_CALL_NOTHROW;
+    s->subcode |= GF_CALL_NOTHROW;
   else
-    s->gsbase.subcode &= ~GF_CALL_NOTHROW;
+    s->subcode &= ~GF_CALL_NOTHROW;
 }
 
 /* Return true if S is a nothrow call.  */
 
 static inline bool
-gimple_call_nothrow_p (gimple s)
+gimple_call_nothrow_p (gcall *s)
 {
-  GIMPLE_CHECK (s, GIMPLE_CALL);
   return (gimple_call_flags (s) & ECF_NOTHROW) != 0;
 }
 
@@ -2436,54 +2998,48 @@ gimple_call_nothrow_p (gimple s)
    stack growth even when they occur in loops.  */
 
 static inline void
-gimple_call_set_alloca_for_var (gimple s, bool for_var)
+gimple_call_set_alloca_for_var (gcall *s, bool for_var)
 {
-  GIMPLE_CHECK (s, GIMPLE_CALL);
   if (for_var)
-    s->gsbase.subcode |= GF_CALL_ALLOCA_FOR_VAR;
+    s->subcode |= GF_CALL_ALLOCA_FOR_VAR;
   else
-    s->gsbase.subcode &= ~GF_CALL_ALLOCA_FOR_VAR;
+    s->subcode &= ~GF_CALL_ALLOCA_FOR_VAR;
 }
 
 /* Return true of S is a call to builtin_alloca emitted for VLA objects.  */
 
 static inline bool
-gimple_call_alloca_for_var_p (gimple s)
+gimple_call_alloca_for_var_p (gcall *s)
 {
-  GIMPLE_CHECK (s, GIMPLE_CALL);
-  return (s->gsbase.subcode & GF_CALL_ALLOCA_FOR_VAR) != 0;
+  return (s->subcode & GF_CALL_ALLOCA_FOR_VAR) != 0;
 }
 
 /* Copy all the GF_CALL_* flags from ORIG_CALL to DEST_CALL.  */
 
 static inline void
-gimple_call_copy_flags (gimple dest_call, gimple orig_call)
+gimple_call_copy_flags (gcall *dest_call, gcall *orig_call)
 {
-  GIMPLE_CHECK (dest_call, GIMPLE_CALL);
-  GIMPLE_CHECK (orig_call, GIMPLE_CALL);
-  dest_call->gsbase.subcode = orig_call->gsbase.subcode;
+  dest_call->subcode = orig_call->subcode;
 }
 
 
 /* Return a pointer to the points-to solution for the set of call-used
-   variables of the call CALL.  */
+   variables of the call CALL_STMT.  */
 
 static inline struct pt_solution *
-gimple_call_use_set (gimple call)
+gimple_call_use_set (gcall *call_stmt)
 {
-  GIMPLE_CHECK (call, GIMPLE_CALL);
-  return &call->gimple_call.call_used;
+  return &call_stmt->call_used;
 }
 
 
 /* Return a pointer to the points-to solution for the set of call-used
-   variables of the call CALL.  */
+   variables of the call CALL_STMT.  */
 
 static inline struct pt_solution *
-gimple_call_clobber_set (gimple call)
+gimple_call_clobber_set (gcall *call_stmt)
 {
-  GIMPLE_CHECK (call, GIMPLE_CALL);
-  return &call->gimple_call.call_clobbered;
+  return &call_stmt->call_clobbered;
 }
 
 
@@ -2505,17 +3061,16 @@ static inline enum tree_code
 gimple_cond_code (const_gimple gs)
 {
   GIMPLE_CHECK (gs, GIMPLE_COND);
-  return (enum tree_code) gs->gsbase.subcode;
+  return (enum tree_code) gs->subcode;
 }
 
 
 /* Set CODE to be the predicate code for the conditional statement GS.  */
 
 static inline void
-gimple_cond_set_code (gimple gs, enum tree_code code)
+gimple_cond_set_code (gcond *gs, enum tree_code code)
 {
-  GIMPLE_CHECK (gs, GIMPLE_COND);
-  gs->gsbase.subcode = code;
+  gs->subcode = code;
 }
 
 
@@ -2532,9 +3087,8 @@ gimple_cond_lhs (const_gimple gs)
    statement GS.  */
 
 static inline tree *
-gimple_cond_lhs_ptr (const_gimple gs)
+gimple_cond_lhs_ptr (const gcond *gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_COND);
   return gimple_op_ptr (gs, 0);
 }
 
@@ -2542,9 +3096,8 @@ gimple_cond_lhs_ptr (const_gimple gs)
    conditional statement GS.  */
 
 static inline void
-gimple_cond_set_lhs (gimple gs, tree lhs)
+gimple_cond_set_lhs (gcond *gs, tree lhs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_COND);
   gimple_set_op (gs, 0, lhs);
 }
 
@@ -2562,9 +3115,8 @@ gimple_cond_rhs (const_gimple gs)
    conditional GS.  */
 
 static inline tree *
-gimple_cond_rhs_ptr (const_gimple gs)
+gimple_cond_rhs_ptr (const gcond *gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_COND);
   return gimple_op_ptr (gs, 1);
 }
 
@@ -2573,9 +3125,8 @@ gimple_cond_rhs_ptr (const_gimple gs)
    conditional statement GS.  */
 
 static inline void
-gimple_cond_set_rhs (gimple gs, tree rhs)
+gimple_cond_set_rhs (gcond *gs, tree rhs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_COND);
   gimple_set_op (gs, 1, rhs);
 }
 
@@ -2584,9 +3135,8 @@ gimple_cond_set_rhs (gimple gs, tree rhs)
    predicate evaluates to true.  */
 
 static inline tree
-gimple_cond_true_label (const_gimple gs)
+gimple_cond_true_label (const gcond *gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_COND);
   return gimple_op (gs, 2);
 }
 
@@ -2595,9 +3145,8 @@ gimple_cond_true_label (const_gimple gs)
    predicate evaluates to true.  */
 
 static inline void
-gimple_cond_set_true_label (gimple gs, tree label)
+gimple_cond_set_true_label (gcond *gs, tree label)
 {
-  GIMPLE_CHECK (gs, GIMPLE_COND);
   gimple_set_op (gs, 2, label);
 }
 
@@ -2606,9 +3155,8 @@ gimple_cond_set_true_label (gimple gs, tree label)
    predicate evaluates to false.  */
 
 static inline void
-gimple_cond_set_false_label (gimple gs, tree label)
+gimple_cond_set_false_label (gcond *gs, tree label)
 {
-  GIMPLE_CHECK (gs, GIMPLE_COND);
   gimple_set_op (gs, 3, label);
 }
 
@@ -2617,9 +3165,9 @@ gimple_cond_set_false_label (gimple gs, tree label)
    predicate evaluates to false.  */
 
 static inline tree
-gimple_cond_false_label (const_gimple gs)
+gimple_cond_false_label (const gcond *gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_COND);
+
   return gimple_op (gs, 3);
 }
 
@@ -2627,29 +3175,29 @@ gimple_cond_false_label (const_gimple gs)
 /* Set the conditional COND_STMT to be of the form 'if (1 == 0)'.  */
 
 static inline void
-gimple_cond_make_false (gimple gs)
+gimple_cond_make_false (gcond *gs)
 {
   gimple_cond_set_lhs (gs, boolean_true_node);
   gimple_cond_set_rhs (gs, boolean_false_node);
-  gs->gsbase.subcode = EQ_EXPR;
+  gs->subcode = EQ_EXPR;
 }
 
 
 /* Set the conditional COND_STMT to be of the form 'if (1 == 1)'.  */
 
 static inline void
-gimple_cond_make_true (gimple gs)
+gimple_cond_make_true (gcond *gs)
 {
   gimple_cond_set_lhs (gs, boolean_true_node);
   gimple_cond_set_rhs (gs, boolean_true_node);
-  gs->gsbase.subcode = EQ_EXPR;
+  gs->subcode = EQ_EXPR;
 }
 
 /* Check if conditional statemente GS is of the form 'if (1 == 1)',
   'if (0 == 0)', 'if (1 != 0)' or 'if (0 != 1)' */
 
 static inline bool
-gimple_cond_true_p (const_gimple gs)
+gimple_cond_true_p (const gcond *gs)
 {
   tree lhs = gimple_cond_lhs (gs);
   tree rhs = gimple_cond_rhs (gs);
@@ -2674,7 +3222,7 @@ gimple_cond_true_p (const_gimple gs)
    'if (0 != 0)', 'if (1 == 0)' or 'if (0 == 1)' */
 
 static inline bool
-gimple_cond_false_p (const_gimple gs)
+gimple_cond_false_p (const gcond *gs)
 {
   tree lhs = gimple_cond_lhs (gs);
   tree rhs = gimple_cond_rhs (gs);
@@ -2698,7 +3246,8 @@ gimple_cond_false_p (const_gimple gs)
 /* Set the code, LHS and RHS of GIMPLE_COND STMT from CODE, LHS and RHS.  */
 
 static inline void
-gimple_cond_set_condition (gimple stmt, enum tree_code code, tree lhs, tree rhs)
+gimple_cond_set_condition (gcond *stmt, enum tree_code code, tree lhs,
+                          tree rhs)
 {
   gimple_cond_set_code (stmt, code);
   gimple_cond_set_lhs (stmt, lhs);
@@ -2708,9 +3257,8 @@ gimple_cond_set_condition (gimple stmt, enum tree_code code, tree lhs, tree rhs)
 /* Return the LABEL_DECL node used by GIMPLE_LABEL statement GS.  */
 
 static inline tree
-gimple_label_label (const_gimple gs)
+gimple_label_label (const glabel *gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_LABEL);
   return gimple_op (gs, 0);
 }
 
@@ -2719,9 +3267,8 @@ gimple_label_label (const_gimple gs)
    GS.  */
 
 static inline void
-gimple_label_set_label (gimple gs, tree label)
+gimple_label_set_label (glabel *gs, tree label)
 {
-  GIMPLE_CHECK (gs, GIMPLE_LABEL);
   gimple_set_op (gs, 0, label);
 }
 
@@ -2739,9 +3286,8 @@ gimple_goto_dest (const_gimple gs)
 /* Set DEST to be the destination of the unconditonal jump GS.  */
 
 static inline void
-gimple_goto_set_dest (gimple gs, tree dest)
+gimple_goto_set_dest (ggoto *gs, tree dest)
 {
-  GIMPLE_CHECK (gs, GIMPLE_GOTO);
   gimple_set_op (gs, 0, dest);
 }
 
@@ -2749,10 +3295,9 @@ gimple_goto_set_dest (gimple gs, tree dest)
 /* Return the variables declared in the GIMPLE_BIND statement GS.  */
 
 static inline tree
-gimple_bind_vars (const_gimple gs)
+gimple_bind_vars (const gbind *bind_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_BIND);
-  return gs->gimple_bind.vars;
+  return bind_stmt->vars;
 }
 
 
@@ -2760,10 +3305,9 @@ gimple_bind_vars (const_gimple gs)
    statement GS.  */
 
 static inline void
-gimple_bind_set_vars (gimple gs, tree vars)
+gimple_bind_set_vars (gbind *bind_stmt, tree vars)
 {
-  GIMPLE_CHECK (gs, GIMPLE_BIND);
-  gs->gimple_bind.vars = vars;
+  bind_stmt->vars = vars;
 }
 
 
@@ -2771,24 +3315,22 @@ gimple_bind_set_vars (gimple gs, tree vars)
    statement GS.  */
 
 static inline void
-gimple_bind_append_vars (gimple gs, tree vars)
+gimple_bind_append_vars (gbind *bind_stmt, tree vars)
 {
-  GIMPLE_CHECK (gs, GIMPLE_BIND);
-  gs->gimple_bind.vars = chainon (gs->gimple_bind.vars, vars);
+  bind_stmt->vars = chainon (bind_stmt->vars, vars);
 }
 
 
 static inline gimple_seq *
-gimple_bind_body_ptr (gimple gs)
+gimple_bind_body_ptr (gbind *bind_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_BIND);
-  return &gs->gimple_bind.body;
+  return &bind_stmt->body;
 }
 
 /* Return the GIMPLE sequence contained in the GIMPLE_BIND statement GS.  */
 
 static inline gimple_seq
-gimple_bind_body (gimple gs)
+gimple_bind_body (gbind *gs)
 {
   return *gimple_bind_body_ptr (gs);
 }
@@ -2798,30 +3340,27 @@ gimple_bind_body (gimple gs)
    statement GS.  */
 
 static inline void
-gimple_bind_set_body (gimple gs, gimple_seq seq)
+gimple_bind_set_body (gbind *bind_stmt, gimple_seq seq)
 {
-  GIMPLE_CHECK (gs, GIMPLE_BIND);
-  gs->gimple_bind.body = seq;
+  bind_stmt->body = seq;
 }
 
 
 /* Append a statement to the end of a GIMPLE_BIND's body.  */
 
 static inline void
-gimple_bind_add_stmt (gimple gs, gimple stmt)
+gimple_bind_add_stmt (gbind *bind_stmt, gimple stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_BIND);
-  gimple_seq_add_stmt (&gs->gimple_bind.body, stmt);
+  gimple_seq_add_stmt (&bind_stmt->body, stmt);
 }
 
 
 /* Append a sequence of statements to the end of a GIMPLE_BIND's body.  */
 
 static inline void
-gimple_bind_add_seq (gimple gs, gimple_seq seq)
+gimple_bind_add_seq (gbind *bind_stmt, gimple_seq seq)
 {
-  GIMPLE_CHECK (gs, GIMPLE_BIND);
-  gimple_seq_add_seq (&gs->gimple_bind.body, seq);
+  gimple_seq_add_seq (&bind_stmt->body, seq);
 }
 
 
@@ -2829,10 +3368,9 @@ gimple_bind_add_seq (gimple gs, gimple_seq seq)
    GS.  This is analogous to the BIND_EXPR_BLOCK field in trees.  */
 
 static inline tree
-gimple_bind_block (const_gimple gs)
+gimple_bind_block (const gbind *bind_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_BIND);
-  return gs->gimple_bind.block;
+  return bind_stmt->block;
 }
 
 
@@ -2840,277 +3378,252 @@ gimple_bind_block (const_gimple gs)
    statement GS.  */
 
 static inline void
-gimple_bind_set_block (gimple gs, tree block)
+gimple_bind_set_block (gbind *bind_stmt, tree block)
 {
-  GIMPLE_CHECK (gs, GIMPLE_BIND);
   gcc_gimple_checking_assert (block == NULL_TREE
                              || TREE_CODE (block) == BLOCK);
-  gs->gimple_bind.block = block;
+  bind_stmt->block = block;
 }
 
 
-/* Return the number of input operands for GIMPLE_ASM GS.  */
+/* Return the number of input operands for GIMPLE_ASM ASM_STMT.  */
 
 static inline unsigned
-gimple_asm_ninputs (const_gimple gs)
+gimple_asm_ninputs (const gasm *asm_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
-  return gs->gimple_asm.ni;
+  return asm_stmt->ni;
 }
 
 
-/* Return the number of output operands for GIMPLE_ASM GS.  */
+/* Return the number of output operands for GIMPLE_ASM ASM_STMT.  */
 
 static inline unsigned
-gimple_asm_noutputs (const_gimple gs)
+gimple_asm_noutputs (const gasm *asm_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
-  return gs->gimple_asm.no;
+  return asm_stmt->no;
 }
 
 
-/* Return the number of clobber operands for GIMPLE_ASM GS.  */
+/* Return the number of clobber operands for GIMPLE_ASM ASM_STMT.  */
 
 static inline unsigned
-gimple_asm_nclobbers (const_gimple gs)
+gimple_asm_nclobbers (const gasm *asm_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
-  return gs->gimple_asm.nc;
+  return asm_stmt->nc;
 }
 
-/* Return the number of label operands for GIMPLE_ASM GS.  */
+/* Return the number of label operands for GIMPLE_ASM ASM_STMT.  */
 
 static inline unsigned
-gimple_asm_nlabels (const_gimple gs)
+gimple_asm_nlabels (const gasm *asm_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
-  return gs->gimple_asm.nl;
+  return asm_stmt->nl;
 }
 
-/* Return input operand INDEX of GIMPLE_ASM GS.  */
+/* Return input operand INDEX of GIMPLE_ASM ASM_STMT.  */
 
 static inline tree
-gimple_asm_input_op (const_gimple gs, unsigned index)
+gimple_asm_input_op (const gasm *asm_stmt, unsigned index)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
-  gcc_gimple_checking_assert (index < gs->gimple_asm.ni);
-  return gimple_op (gs, index + gs->gimple_asm.no);
+  gcc_gimple_checking_assert (index < asm_stmt->ni);
+  return gimple_op (asm_stmt, index + asm_stmt->no);
 }
 
-/* Return a pointer to input operand INDEX of GIMPLE_ASM GS.  */
+/* Return a pointer to input operand INDEX of GIMPLE_ASM ASM_STMT.  */
 
 static inline tree *
-gimple_asm_input_op_ptr (const_gimple gs, unsigned index)
+gimple_asm_input_op_ptr (const gasm *asm_stmt, unsigned index)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
-  gcc_gimple_checking_assert (index < gs->gimple_asm.ni);
-  return gimple_op_ptr (gs, index + gs->gimple_asm.no);
+  gcc_gimple_checking_assert (index < asm_stmt->ni);
+  return gimple_op_ptr (asm_stmt, index + asm_stmt->no);
 }
 
 
-/* Set IN_OP to be input operand INDEX in GIMPLE_ASM GS.  */
+/* Set IN_OP to be input operand INDEX in GIMPLE_ASM ASM_STMT.  */
 
 static inline void
-gimple_asm_set_input_op (gimple gs, unsigned index, tree in_op)
+gimple_asm_set_input_op (gasm *asm_stmt, unsigned index, tree in_op)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
-  gcc_gimple_checking_assert (index < gs->gimple_asm.ni
+  gcc_gimple_checking_assert (index < asm_stmt->ni
                              && TREE_CODE (in_op) == TREE_LIST);
-  gimple_set_op (gs, index + gs->gimple_asm.no, in_op);
+  gimple_set_op (asm_stmt, index + asm_stmt->no, in_op);
 }
 
 
-/* Return output operand INDEX of GIMPLE_ASM GS.  */
+/* Return output operand INDEX of GIMPLE_ASM ASM_STMT.  */
 
 static inline tree
-gimple_asm_output_op (const_gimple gs, unsigned index)
+gimple_asm_output_op (const gasm *asm_stmt, unsigned index)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
-  gcc_gimple_checking_assert (index < gs->gimple_asm.no);
-  return gimple_op (gs, index);
+  gcc_gimple_checking_assert (index < asm_stmt->no);
+  return gimple_op (asm_stmt, index);
 }
 
-/* Return a pointer to output operand INDEX of GIMPLE_ASM GS.  */
+/* Return a pointer to output operand INDEX of GIMPLE_ASM ASM_STMT.  */
 
 static inline tree *
-gimple_asm_output_op_ptr (const_gimple gs, unsigned index)
+gimple_asm_output_op_ptr (const gasm *asm_stmt, unsigned index)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
-  gcc_gimple_checking_assert (index < gs->gimple_asm.no);
-  return gimple_op_ptr (gs, index);
+  gcc_gimple_checking_assert (index < asm_stmt->no);
+  return gimple_op_ptr (asm_stmt, index);
 }
 
 
-/* Set OUT_OP to be output operand INDEX in GIMPLE_ASM GS.  */
+/* Set OUT_OP to be output operand INDEX in GIMPLE_ASM ASM_STMT.  */
 
 static inline void
-gimple_asm_set_output_op (gimple gs, unsigned index, tree out_op)
+gimple_asm_set_output_op (gasm *asm_stmt, unsigned index, tree out_op)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
-  gcc_gimple_checking_assert (index < gs->gimple_asm.no
+  gcc_gimple_checking_assert (index < asm_stmt->no
                              && TREE_CODE (out_op) == TREE_LIST);
-  gimple_set_op (gs, index, out_op);
+  gimple_set_op (asm_stmt, index, out_op);
 }
 
 
-/* Return clobber operand INDEX of GIMPLE_ASM GS.  */
+/* Return clobber operand INDEX of GIMPLE_ASM ASM_STMT.  */
 
 static inline tree
-gimple_asm_clobber_op (const_gimple gs, unsigned index)
+gimple_asm_clobber_op (const gasm *asm_stmt, unsigned index)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
-  gcc_gimple_checking_assert (index < gs->gimple_asm.nc);
-  return gimple_op (gs, index + gs->gimple_asm.ni + gs->gimple_asm.no);
+  gcc_gimple_checking_assert (index < asm_stmt->nc);
+  return gimple_op (asm_stmt, index + asm_stmt->ni + asm_stmt->no);
 }
 
 
-/* Set CLOBBER_OP to be clobber operand INDEX in GIMPLE_ASM GS.  */
+/* Set CLOBBER_OP to be clobber operand INDEX in GIMPLE_ASM ASM_STMT.  */
 
 static inline void
-gimple_asm_set_clobber_op (gimple gs, unsigned index, tree clobber_op)
+gimple_asm_set_clobber_op (gasm *asm_stmt, unsigned index, tree clobber_op)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
-  gcc_gimple_checking_assert (index < gs->gimple_asm.nc
+  gcc_gimple_checking_assert (index < asm_stmt->nc
                              && TREE_CODE (clobber_op) == TREE_LIST);
-  gimple_set_op (gs, index + gs->gimple_asm.ni + gs->gimple_asm.no, clobber_op);
+  gimple_set_op (asm_stmt, index + asm_stmt->ni + asm_stmt->no, clobber_op);
 }
 
-/* Return label operand INDEX of GIMPLE_ASM GS.  */
+/* Return label operand INDEX of GIMPLE_ASM ASM_STMT.  */
 
 static inline tree
-gimple_asm_label_op (const_gimple gs, unsigned index)
+gimple_asm_label_op (const gasm *asm_stmt, unsigned index)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
-  gcc_gimple_checking_assert (index < gs->gimple_asm.nl);
-  return gimple_op (gs, index + gs->gimple_asm.ni + gs->gimple_asm.nc);
+  gcc_gimple_checking_assert (index < asm_stmt->nl);
+  return gimple_op (asm_stmt, index + asm_stmt->ni + asm_stmt->nc);
 }
 
-/* Set LABEL_OP to be label operand INDEX in GIMPLE_ASM GS.  */
+/* Set LABEL_OP to be label operand INDEX in GIMPLE_ASM ASM_STMT.  */
 
 static inline void
-gimple_asm_set_label_op (gimple gs, unsigned index, tree label_op)
+gimple_asm_set_label_op (gasm *asm_stmt, unsigned index, tree label_op)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
-  gcc_gimple_checking_assert (index < gs->gimple_asm.nl
+  gcc_gimple_checking_assert (index < asm_stmt->nl
                              && TREE_CODE (label_op) == TREE_LIST);
-  gimple_set_op (gs, index + gs->gimple_asm.ni + gs->gimple_asm.nc, label_op);
+  gimple_set_op (asm_stmt, index + asm_stmt->ni + asm_stmt->nc, label_op);
 }
 
 /* Return the string representing the assembly instruction in
-   GIMPLE_ASM GS.  */
+   GIMPLE_ASM ASM_STMT.  */
 
 static inline const char *
-gimple_asm_string (const_gimple gs)
+gimple_asm_string (const gasm *asm_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
-  return gs->gimple_asm.string;
+  return asm_stmt->string;
 }
 
 
-/* Return true if GS is an asm statement marked volatile.  */
+/* Return true ASM_STMT ASM_STMT is an asm statement marked volatile.  */
 
 static inline bool
-gimple_asm_volatile_p (const_gimple gs)
+gimple_asm_volatile_p (const gasm *asm_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
-  return (gs->gsbase.subcode & GF_ASM_VOLATILE) != 0;
+  return (asm_stmt->subcode & GF_ASM_VOLATILE) != 0;
 }
 
 
-/* If VOLATLE_P is true, mark asm statement GS as volatile.  */
+/* If VOLATLE_P is true, mark asm statement ASM_STMT as volatile.  */
 
 static inline void
-gimple_asm_set_volatile (gimple gs, bool volatile_p)
+gimple_asm_set_volatile (gasm *asm_stmt, bool volatile_p)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
   if (volatile_p)
-    gs->gsbase.subcode |= GF_ASM_VOLATILE;
+    asm_stmt->subcode |= GF_ASM_VOLATILE;
   else
-    gs->gsbase.subcode &= ~GF_ASM_VOLATILE;
+    asm_stmt->subcode &= ~GF_ASM_VOLATILE;
 }
 
 
-/* If INPUT_P is true, mark asm GS as an ASM_INPUT.  */
+/* If INPUT_P is true, mark asm ASM_STMT as an ASM_INPUT.  */
 
 static inline void
-gimple_asm_set_input (gimple gs, bool input_p)
+gimple_asm_set_input (gasm *asm_stmt, bool input_p)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
   if (input_p)
-    gs->gsbase.subcode |= GF_ASM_INPUT;
+    asm_stmt->subcode |= GF_ASM_INPUT;
   else
-    gs->gsbase.subcode &= ~GF_ASM_INPUT;
+    asm_stmt->subcode &= ~GF_ASM_INPUT;
 }
 
 
-/* Return true if asm GS is an ASM_INPUT.  */
+/* Return true if asm ASM_STMT is an ASM_INPUT.  */
 
 static inline bool
-gimple_asm_input_p (const_gimple gs)
+gimple_asm_input_p (const gasm *asm_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_ASM);
-  return (gs->gsbase.subcode & GF_ASM_INPUT) != 0;
+  return (asm_stmt->subcode & GF_ASM_INPUT) != 0;
 }
 
 
-/* Return the types handled by GIMPLE_CATCH statement GS.  */
+/* Return the types handled by GIMPLE_CATCH statement CATCH_STMT.  */
 
 static inline tree
-gimple_catch_types (const_gimple gs)
+gimple_catch_types (const gcatch *catch_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_CATCH);
-  return gs->gimple_catch.types;
+  return catch_stmt->types;
 }
 
 
-/* Return a pointer to the types handled by GIMPLE_CATCH statement GS.  */
+/* Return a pointer to the types handled by GIMPLE_CATCH statement CATCH_STMT.  */
 
 static inline tree *
-gimple_catch_types_ptr (gimple gs)
+gimple_catch_types_ptr (gcatch *catch_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_CATCH);
-  return &gs->gimple_catch.types;
+  return &catch_stmt->types;
 }
 
 
 /* Return a pointer to the GIMPLE sequence representing the body of
-   the handler of GIMPLE_CATCH statement GS.  */
+   the handler of GIMPLE_CATCH statement CATCH_STMT.  */
 
 static inline gimple_seq *
-gimple_catch_handler_ptr (gimple gs)
+gimple_catch_handler_ptr (gcatch *catch_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_CATCH);
-  return &gs->gimple_catch.handler;
+  return &catch_stmt->handler;
 }
 
 
 /* Return the GIMPLE sequence representing the body of the handler of
-   GIMPLE_CATCH statement GS.  */
+   GIMPLE_CATCH statement CATCH_STMT.  */
 
 static inline gimple_seq
-gimple_catch_handler (gimple gs)
+gimple_catch_handler (gcatch *catch_stmt)
 {
-  return *gimple_catch_handler_ptr (gs);
+  return *gimple_catch_handler_ptr (catch_stmt);
 }
 
 
-/* Set T to be the set of types handled by GIMPLE_CATCH GS.  */
+/* Set T to be the set of types handled by GIMPLE_CATCH CATCH_STMT.  */
 
 static inline void
-gimple_catch_set_types (gimple gs, tree t)
+gimple_catch_set_types (gcatch *catch_stmt, tree t)
 {
-  GIMPLE_CHECK (gs, GIMPLE_CATCH);
-  gs->gimple_catch.types = t;
+  catch_stmt->types = t;
 }
 
 
-/* Set HANDLER to be the body of GIMPLE_CATCH GS.  */
+/* Set HANDLER to be the body of GIMPLE_CATCH CATCH_STMT.  */
 
 static inline void
-gimple_catch_set_handler (gimple gs, gimple_seq handler)
+gimple_catch_set_handler (gcatch *catch_stmt, gimple_seq handler)
 {
-  GIMPLE_CHECK (gs, GIMPLE_CATCH);
-  gs->gimple_catch.handler = handler;
+  catch_stmt->handler = handler;
 }
 
 
@@ -3119,8 +3632,8 @@ gimple_catch_set_handler (gimple gs, gimple_seq handler)
 static inline tree
 gimple_eh_filter_types (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_EH_FILTER);
-  return gs->gimple_eh_filter.types;
+  const geh_filter *eh_filter_stmt = as_a <const geh_filter *> (gs);
+  return eh_filter_stmt->types;
 }
 
 
@@ -3130,8 +3643,8 @@ gimple_eh_filter_types (const_gimple gs)
 static inline tree *
 gimple_eh_filter_types_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_EH_FILTER);
-  return &gs->gimple_eh_filter.types;
+  geh_filter *eh_filter_stmt = as_a <geh_filter *> (gs);
+  return &eh_filter_stmt->types;
 }
 
 
@@ -3141,8 +3654,8 @@ gimple_eh_filter_types_ptr (gimple gs)
 static inline gimple_seq *
 gimple_eh_filter_failure_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_EH_FILTER);
-  return &gs->gimple_eh_filter.failure;
+  geh_filter *eh_filter_stmt = as_a <geh_filter *> (gs);
+  return &eh_filter_stmt->failure;
 }
 
 
@@ -3156,84 +3669,79 @@ gimple_eh_filter_failure (gimple gs)
 }
 
 
-/* Set TYPES to be the set of types handled by GIMPLE_EH_FILTER GS.  */
+/* Set TYPES to be the set of types handled by GIMPLE_EH_FILTER
+   EH_FILTER_STMT.  */
 
 static inline void
-gimple_eh_filter_set_types (gimple gs, tree types)
+gimple_eh_filter_set_types (geh_filter *eh_filter_stmt, tree types)
 {
-  GIMPLE_CHECK (gs, GIMPLE_EH_FILTER);
-  gs->gimple_eh_filter.types = types;
+  eh_filter_stmt->types = types;
 }
 
 
 /* Set FAILURE to be the sequence of statements to execute on failure
-   for GIMPLE_EH_FILTER GS.  */
+   for GIMPLE_EH_FILTER EH_FILTER_STMT.  */
 
 static inline void
-gimple_eh_filter_set_failure (gimple gs, gimple_seq failure)
+gimple_eh_filter_set_failure (geh_filter *eh_filter_stmt,
+                             gimple_seq failure)
 {
-  GIMPLE_CHECK (gs, GIMPLE_EH_FILTER);
-  gs->gimple_eh_filter.failure = failure;
+  eh_filter_stmt->failure = failure;
 }
 
 /* Get the function decl to be called by the MUST_NOT_THROW region.  */
 
 static inline tree
-gimple_eh_must_not_throw_fndecl (gimple gs)
+gimple_eh_must_not_throw_fndecl (geh_mnt *eh_mnt_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_EH_MUST_NOT_THROW);
-  return gs->gimple_eh_mnt.fndecl;
+  return eh_mnt_stmt->fndecl;
 }
 
 /* Set the function decl to be called by GS to DECL.  */
 
 static inline void
-gimple_eh_must_not_throw_set_fndecl (gimple gs, tree decl)
+gimple_eh_must_not_throw_set_fndecl (geh_mnt *eh_mnt_stmt,
+                                    tree decl)
 {
-  GIMPLE_CHECK (gs, GIMPLE_EH_MUST_NOT_THROW);
-  gs->gimple_eh_mnt.fndecl = decl;
+  eh_mnt_stmt->fndecl = decl;
 }
 
 /* GIMPLE_EH_ELSE accessors.  */
 
 static inline gimple_seq *
-gimple_eh_else_n_body_ptr (gimple gs)
+gimple_eh_else_n_body_ptr (geh_else *eh_else_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_EH_ELSE);
-  return &gs->gimple_eh_else.n_body;
+  return &eh_else_stmt->n_body;
 }
 
 static inline gimple_seq
-gimple_eh_else_n_body (gimple gs)
+gimple_eh_else_n_body (geh_else *eh_else_stmt)
 {
-  return *gimple_eh_else_n_body_ptr (gs);
+  return *gimple_eh_else_n_body_ptr (eh_else_stmt);
 }
 
 static inline gimple_seq *
-gimple_eh_else_e_body_ptr (gimple gs)
+gimple_eh_else_e_body_ptr (geh_else *eh_else_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_EH_ELSE);
-  return &gs->gimple_eh_else.e_body;
+  return &eh_else_stmt->e_body;
 }
 
 static inline gimple_seq
-gimple_eh_else_e_body (gimple gs)
+gimple_eh_else_e_body (geh_else *eh_else_stmt)
 {
-  return *gimple_eh_else_e_body_ptr (gs);
+  return *gimple_eh_else_e_body_ptr (eh_else_stmt);
 }
 
 static inline void
-gimple_eh_else_set_n_body (gimple gs, gimple_seq seq)
+gimple_eh_else_set_n_body (geh_else *eh_else_stmt, gimple_seq seq)
 {
-  GIMPLE_CHECK (gs, GIMPLE_EH_ELSE);
-  gs->gimple_eh_else.n_body = seq;
+  eh_else_stmt->n_body = seq;
 }
 
 static inline void
-gimple_eh_else_set_e_body (gimple gs, gimple_seq seq)
+gimple_eh_else_set_e_body (geh_else *eh_else_stmt, gimple_seq seq)
 {
-  GIMPLE_CHECK (gs, GIMPLE_EH_ELSE);
-  gs->gimple_eh_else.e_body = seq;
+  eh_else_stmt->e_body = seq;
 }
 
 /* GIMPLE_TRY accessors. */
@@ -3245,20 +3753,19 @@ static inline enum gimple_try_flags
 gimple_try_kind (const_gimple gs)
 {
   GIMPLE_CHECK (gs, GIMPLE_TRY);
-  return (enum gimple_try_flags) (gs->gsbase.subcode & GIMPLE_TRY_KIND);
+  return (enum gimple_try_flags) (gs->subcode & GIMPLE_TRY_KIND);
 }
 
 
 /* Set the kind of try block represented by GIMPLE_TRY GS.  */
 
 static inline void
-gimple_try_set_kind (gimple gs, enum gimple_try_flags kind)
+gimple_try_set_kind (gtry *gs, enum gimple_try_flags kind)
 {
-  GIMPLE_CHECK (gs, GIMPLE_TRY);
   gcc_gimple_checking_assert (kind == GIMPLE_TRY_CATCH
                              || kind == GIMPLE_TRY_FINALLY);
   if (gimple_try_kind (gs) != kind)
-    gs->gsbase.subcode = (unsigned int) kind;
+    gs->subcode = (unsigned int) kind;
 }
 
 
@@ -3268,7 +3775,7 @@ static inline bool
 gimple_try_catch_is_cleanup (const_gimple gs)
 {
   gcc_gimple_checking_assert (gimple_try_kind (gs) == GIMPLE_TRY_CATCH);
-  return (gs->gsbase.subcode & GIMPLE_TRY_CATCH_IS_CLEANUP) != 0;
+  return (gs->subcode & GIMPLE_TRY_CATCH_IS_CLEANUP) != 0;
 }
 
 
@@ -3278,8 +3785,8 @@ gimple_try_catch_is_cleanup (const_gimple gs)
 static inline gimple_seq *
 gimple_try_eval_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_TRY);
-  return &gs->gimple_try.eval;
+  gtry *try_stmt = as_a <gtry *> (gs);
+  return &try_stmt->eval;
 }
 
 
@@ -3298,8 +3805,8 @@ gimple_try_eval (gimple gs)
 static inline gimple_seq *
 gimple_try_cleanup_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_TRY);
-  return &gs->gimple_try.cleanup;
+  gtry *try_stmt = as_a <gtry *> (gs);
+  return &try_stmt->cleanup;
 }
 
 
@@ -3316,35 +3823,33 @@ gimple_try_cleanup (gimple gs)
 /* Set the GIMPLE_TRY_CATCH_IS_CLEANUP flag.  */
 
 static inline void
-gimple_try_set_catch_is_cleanup (gimple g, bool catch_is_cleanup)
+gimple_try_set_catch_is_cleanup (gtry *g, bool catch_is_cleanup)
 {
   gcc_gimple_checking_assert (gimple_try_kind (g) == GIMPLE_TRY_CATCH);
   if (catch_is_cleanup)
-    g->gsbase.subcode |= GIMPLE_TRY_CATCH_IS_CLEANUP;
+    g->subcode |= GIMPLE_TRY_CATCH_IS_CLEANUP;
   else
-    g->gsbase.subcode &= ~GIMPLE_TRY_CATCH_IS_CLEANUP;
+    g->subcode &= ~GIMPLE_TRY_CATCH_IS_CLEANUP;
 }
 
 
 /* Set EVAL to be the sequence of statements to use as the body for
-   GIMPLE_TRY GS.  */
+   GIMPLE_TRY TRY_STMT.  */
 
 static inline void
-gimple_try_set_eval (gimple gs, gimple_seq eval)
+gimple_try_set_eval (gtry *try_stmt, gimple_seq eval)
 {
-  GIMPLE_CHECK (gs, GIMPLE_TRY);
-  gs->gimple_try.eval = eval;
+  try_stmt->eval = eval;
 }
 
 
 /* Set CLEANUP to be the sequence of statements to use as the cleanup
-   body for GIMPLE_TRY GS.  */
+   body for GIMPLE_TRY TRY_STMT.  */
 
 static inline void
-gimple_try_set_cleanup (gimple gs, gimple_seq cleanup)
+gimple_try_set_cleanup (gtry *try_stmt, gimple_seq cleanup)
 {
-  GIMPLE_CHECK (gs, GIMPLE_TRY);
-  gs->gimple_try.cleanup = cleanup;
+  try_stmt->cleanup = cleanup;
 }
 
 
@@ -3353,8 +3858,8 @@ gimple_try_set_cleanup (gimple gs, gimple_seq cleanup)
 static inline gimple_seq *
 gimple_wce_cleanup_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_WITH_CLEANUP_EXPR);
-  return &gs->gimple_wce.cleanup;
+  gimple_statement_wce *wce_stmt = as_a <gimple_statement_wce *> (gs);
+  return &wce_stmt->cleanup;
 }
 
 
@@ -3372,8 +3877,8 @@ gimple_wce_cleanup (gimple gs)
 static inline void
 gimple_wce_set_cleanup (gimple gs, gimple_seq cleanup)
 {
-  GIMPLE_CHECK (gs, GIMPLE_WITH_CLEANUP_EXPR);
-  gs->gimple_wce.cleanup = cleanup;
+  gimple_statement_wce *wce_stmt = as_a <gimple_statement_wce *> (gs);
+  wce_stmt->cleanup = cleanup;
 }
 
 
@@ -3383,7 +3888,7 @@ static inline bool
 gimple_wce_cleanup_eh_only (const_gimple gs)
 {
   GIMPLE_CHECK (gs, GIMPLE_WITH_CLEANUP_EXPR);
-  return gs->gsbase.subcode != 0;
+  return gs->subcode != 0;
 }
 
 
@@ -3393,7 +3898,7 @@ static inline void
 gimple_wce_set_cleanup_eh_only (gimple gs, bool eh_only_p)
 {
   GIMPLE_CHECK (gs, GIMPLE_WITH_CLEANUP_EXPR);
-  gs->gsbase.subcode = (unsigned int) eh_only_p;
+  gs->subcode = (unsigned int) eh_only_p;
 }
 
 
@@ -3402,8 +3907,8 @@ gimple_wce_set_cleanup_eh_only (gimple gs, bool eh_only_p)
 static inline unsigned
 gimple_phi_capacity (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_PHI);
-  return gs->gimple_phi.capacity;
+  const gphi *phi_stmt = as_a <const gphi *> (gs);
+  return phi_stmt->capacity;
 }
 
 
@@ -3414,8 +3919,8 @@ gimple_phi_capacity (const_gimple gs)
 static inline unsigned
 gimple_phi_num_args (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_PHI);
-  return gs->gimple_phi.nargs;
+  const gphi *phi_stmt = as_a <const gphi *> (gs);
+  return phi_stmt->nargs;
 }
 
 
@@ -3424,8 +3929,8 @@ gimple_phi_num_args (const_gimple gs)
 static inline tree
 gimple_phi_result (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_PHI);
-  return gs->gimple_phi.result;
+  const gphi *phi_stmt = as_a <const gphi *> (gs);
+  return phi_stmt->result;
 }
 
 /* Return a pointer to the SSA name created by GIMPLE_PHI GS.  */
@@ -3433,19 +3938,18 @@ gimple_phi_result (const_gimple gs)
 static inline tree *
 gimple_phi_result_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_PHI);
-  return &gs->gimple_phi.result;
+  gphi *phi_stmt = as_a <gphi *> (gs);
+  return &phi_stmt->result;
 }
 
-/* Set RESULT to be the SSA name created by GIMPLE_PHI GS.  */
+/* Set RESULT to be the SSA name created by GIMPLE_PHI PHI.  */
 
 static inline void
-gimple_phi_set_result (gimple gs, tree result)
+gimple_phi_set_result (gphi *phi, tree result)
 {
-  GIMPLE_CHECK (gs, GIMPLE_PHI);
-  gs->gimple_phi.result = result;
+  phi->result = result;
   if (result && TREE_CODE (result) == SSA_NAME)
-    SSA_NAME_DEF_STMT (result) = gs;
+    SSA_NAME_DEF_STMT (result) = phi;
 }
 
 
@@ -3455,20 +3959,19 @@ gimple_phi_set_result (gimple gs, tree result)
 static inline struct phi_arg_d *
 gimple_phi_arg (gimple gs, unsigned index)
 {
-  GIMPLE_CHECK (gs, GIMPLE_PHI);
-  gcc_gimple_checking_assert (index <= gs->gimple_phi.capacity);
-  return &(gs->gimple_phi.args[index]);
+  gphi *phi_stmt = as_a <gphi *> (gs);
+  gcc_gimple_checking_assert (index <= phi_stmt->capacity);
+  return &(phi_stmt->args[index]);
 }
 
 /* Set PHIARG to be the argument corresponding to incoming edge INDEX
-   for GIMPLE_PHI GS.  */
+   for GIMPLE_PHI PHI.  */
 
 static inline void
-gimple_phi_set_arg (gimple gs, unsigned index, struct phi_arg_d * phiarg)
+gimple_phi_set_arg (gphi *phi, unsigned index, struct phi_arg_d * phiarg)
 {
-  GIMPLE_CHECK (gs, GIMPLE_PHI);
-  gcc_gimple_checking_assert (index <= gs->gimple_phi.nargs);
-  gs->gimple_phi.args[index] = *phiarg;
+  gcc_gimple_checking_assert (index <= phi->nargs);
+  phi->args[index] = *phiarg;
 }
 
 /* Return the PHI nodes for basic block BB, or NULL if there are no
@@ -3499,95 +4002,92 @@ gimple_phi_arg_def (gimple gs, size_t index)
 }
 
 
-/* Return a pointer to the tree operand for argument I of PHI node GS.  */
+/* Return a pointer to the tree operand for argument I of phi node PHI.  */
 
 static inline tree *
-gimple_phi_arg_def_ptr (gimple gs, size_t index)
+gimple_phi_arg_def_ptr (gphi *phi, size_t index)
 {
-  return &gimple_phi_arg (gs, index)->def;
+  return &gimple_phi_arg (phi, index)->def;
 }
 
-/* Return the edge associated with argument I of phi node GS.  */
+/* Return the edge associated with argument I of phi node PHI.  */
 
 static inline edge
-gimple_phi_arg_edge (gimple gs, size_t i)
+gimple_phi_arg_edge (gphi *phi, size_t i)
 {
-  return EDGE_PRED (gimple_bb (gs), i);
+  return EDGE_PRED (gimple_bb (phi), i);
 }
 
-/* Return the source location of gimple argument I of phi node GS.  */
+/* Return the source location of gimple argument I of phi node PHI.  */
 
 static inline source_location
-gimple_phi_arg_location (gimple gs, size_t i)
+gimple_phi_arg_location (gphi *phi, size_t i)
 {
-  return gimple_phi_arg (gs, i)->locus;
+  return gimple_phi_arg (phi, i)->locus;
 }
 
-/* Return the source location of the argument on edge E of phi node GS.  */
+/* Return the source location of the argument on edge E of phi node PHI.  */
 
 static inline source_location
-gimple_phi_arg_location_from_edge (gimple gs, edge e)
+gimple_phi_arg_location_from_edge (gphi *phi, edge e)
 {
-  return gimple_phi_arg (gs, e->dest_idx)->locus;
+  return gimple_phi_arg (phi, e->dest_idx)->locus;
 }
 
-/* Set the source location of gimple argument I of phi node GS to LOC.  */
+/* Set the source location of gimple argument I of phi node PHI to LOC.  */
 
 static inline void
-gimple_phi_arg_set_location (gimple gs, size_t i, source_location loc)
+gimple_phi_arg_set_location (gphi *phi, size_t i, source_location loc)
 {
-  gimple_phi_arg (gs, i)->locus = loc;
+  gimple_phi_arg (phi, i)->locus = loc;
 }
 
-/* Return TRUE if argument I of phi node GS has a location record.  */
+/* Return TRUE if argument I of phi node PHI has a location record.  */
 
 static inline bool
-gimple_phi_arg_has_location (gimple gs, size_t i)
+gimple_phi_arg_has_location (gphi *phi, size_t i)
 {
-  return gimple_phi_arg_location (gs, i) != UNKNOWN_LOCATION;
+  return gimple_phi_arg_location (phi, i) != UNKNOWN_LOCATION;
 }
 
 
-/* Return the region number for GIMPLE_RESX GS.  */
+/* Return the region number for GIMPLE_RESX RESX_STMT.  */
 
 static inline int
-gimple_resx_region (const_gimple gs)
+gimple_resx_region (const gresx *resx_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_RESX);
-  return gs->gimple_eh_ctrl.region;
+  return resx_stmt->region;
 }
 
-/* Set REGION to be the region number for GIMPLE_RESX GS.  */
+/* Set REGION to be the region number for GIMPLE_RESX RESX_STMT.  */
 
 static inline void
-gimple_resx_set_region (gimple gs, int region)
+gimple_resx_set_region (gresx *resx_stmt, int region)
 {
-  GIMPLE_CHECK (gs, GIMPLE_RESX);
-  gs->gimple_eh_ctrl.region = region;
+  resx_stmt->region = region;
 }
 
-/* Return the region number for GIMPLE_EH_DISPATCH GS.  */
+/* Return the region number for GIMPLE_EH_DISPATCH EH_DISPATCH_STMT.  */
 
 static inline int
-gimple_eh_dispatch_region (const_gimple gs)
+gimple_eh_dispatch_region (const geh_dispatch *eh_dispatch_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_EH_DISPATCH);
-  return gs->gimple_eh_ctrl.region;
+  return eh_dispatch_stmt->region;
 }
 
-/* Set REGION to be the region number for GIMPLE_EH_DISPATCH GS.  */
+/* Set REGION to be the region number for GIMPLE_EH_DISPATCH
+   EH_DISPATCH_STMT.  */
 
 static inline void
-gimple_eh_dispatch_set_region (gimple gs, int region)
+gimple_eh_dispatch_set_region (geh_dispatch *eh_dispatch_stmt, int region)
 {
-  GIMPLE_CHECK (gs, GIMPLE_EH_DISPATCH);
-  gs->gimple_eh_ctrl.region = region;
+  eh_dispatch_stmt->region = region;
 }
 
 /* Return the number of labels associated with the switch statement GS.  */
 
 static inline unsigned
-gimple_switch_num_labels (const_gimple gs)
+gimple_switch_num_labels (const gswitch *gs)
 {
   unsigned num_ops;
   GIMPLE_CHECK (gs, GIMPLE_SWITCH);
@@ -3600,7 +4100,7 @@ gimple_switch_num_labels (const_gimple gs)
 /* Set NLABELS to be the number of labels for the switch statement GS.  */
 
 static inline void
-gimple_switch_set_num_labels (gimple g, unsigned nlabels)
+gimple_switch_set_num_labels (gswitch *g, unsigned nlabels)
 {
   GIMPLE_CHECK (g, GIMPLE_SWITCH);
   gimple_set_num_ops (g, nlabels + 1);
@@ -3610,9 +4110,8 @@ gimple_switch_set_num_labels (gimple g, unsigned nlabels)
 /* Return the index variable used by the switch statement GS.  */
 
 static inline tree
-gimple_switch_index (const_gimple gs)
+gimple_switch_index (const gswitch *gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_SWITCH);
   return gimple_op (gs, 0);
 }
 
@@ -3620,9 +4119,8 @@ gimple_switch_index (const_gimple gs)
 /* Return a pointer to the index variable for the switch statement GS.  */
 
 static inline tree *
-gimple_switch_index_ptr (const_gimple gs)
+gimple_switch_index_ptr (const gswitch *gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_SWITCH);
   return gimple_op_ptr (gs, 0);
 }
 
@@ -3630,7 +4128,7 @@ gimple_switch_index_ptr (const_gimple gs)
 /* Set INDEX to be the index variable for switch statement GS.  */
 
 static inline void
-gimple_switch_set_index (gimple gs, tree index)
+gimple_switch_set_index (gswitch *gs, tree index)
 {
   GIMPLE_CHECK (gs, GIMPLE_SWITCH);
   gcc_gimple_checking_assert (SSA_VAR_P (index) || CONSTANT_CLASS_P (index));
@@ -3642,7 +4140,7 @@ gimple_switch_set_index (gimple gs, tree index)
    labels in a switch statement.  */
 
 static inline tree
-gimple_switch_label (const_gimple gs, unsigned index)
+gimple_switch_label (const gswitch *gs, unsigned index)
 {
   GIMPLE_CHECK (gs, GIMPLE_SWITCH);
   gcc_gimple_checking_assert (gimple_num_ops (gs) > index + 1);
@@ -3652,7 +4150,7 @@ gimple_switch_label (const_gimple gs, unsigned index)
 /* Set the label number INDEX to LABEL.  0 is always the default label.  */
 
 static inline void
-gimple_switch_set_label (gimple gs, unsigned index, tree label)
+gimple_switch_set_label (gswitch *gs, unsigned index, tree label)
 {
   GIMPLE_CHECK (gs, GIMPLE_SWITCH);
   gcc_gimple_checking_assert (gimple_num_ops (gs) > index + 1
@@ -3664,7 +4162,7 @@ gimple_switch_set_label (gimple gs, unsigned index, tree label)
 /* Return the default label for a switch statement.  */
 
 static inline tree
-gimple_switch_default_label (const_gimple gs)
+gimple_switch_default_label (const gswitch *gs)
 {
   tree label = gimple_switch_label (gs, 0);
   gcc_checking_assert (!CASE_LOW (label) && !CASE_HIGH (label));
@@ -3674,7 +4172,7 @@ gimple_switch_default_label (const_gimple gs)
 /* Set the default label for a switch statement.  */
 
 static inline void
-gimple_switch_set_default_label (gimple gs, tree label)
+gimple_switch_set_default_label (gswitch *gs, tree label)
 {
   gcc_checking_assert (!CASE_LOW (label) && !CASE_HIGH (label));
   gimple_switch_set_label (gs, 0, label);
@@ -3694,7 +4192,7 @@ static inline bool
 gimple_debug_bind_p (const_gimple s)
 {
   if (is_gimple_debug (s))
-    return s->gsbase.subcode == GIMPLE_DEBUG_BIND;
+    return s->subcode == GIMPLE_DEBUG_BIND;
 
   return false;
 }
@@ -3786,7 +4284,7 @@ static inline bool
 gimple_debug_source_bind_p (const_gimple s)
 {
   if (is_gimple_debug (s))
-    return s->gsbase.subcode == GIMPLE_DEBUG_SOURCE_BIND;
+    return s->subcode == GIMPLE_DEBUG_SOURCE_BIND;
 
   return false;
 }
@@ -3866,7 +4364,7 @@ get_lineno (const_gimple stmt)
 static inline gimple_seq *
 gimple_omp_body_ptr (gimple gs)
 {
-  return &gs->omp.body;
+  return &static_cast <gimple_statement_omp *> (gs)->body;
 }
 
 /* Return the body for the OMP statement GS.  */
@@ -3882,37 +4380,34 @@ gimple_omp_body (gimple gs)
 static inline void
 gimple_omp_set_body (gimple gs, gimple_seq body)
 {
-  gs->omp.body = body;
+  static_cast <gimple_statement_omp *> (gs)->body = body;
 }
 
 
-/* Return the name associated with OMP_CRITICAL statement GS.  */
+/* Return the name associated with OMP_CRITICAL statement CRIT_STMT.  */
 
 static inline tree
-gimple_omp_critical_name (const_gimple gs)
+gimple_omp_critical_name (const gomp_critical *crit_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_CRITICAL);
-  return gs->gimple_omp_critical.name;
+  return crit_stmt->name;
 }
 
 
 /* Return a pointer to the name associated with OMP critical statement GS.  */
 
 static inline tree *
-gimple_omp_critical_name_ptr (gimple gs)
+gimple_omp_critical_name_ptr (gomp_critical *crit_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_CRITICAL);
-  return &gs->gimple_omp_critical.name;
+  return &crit_stmt->name;
 }
 
 
 /* Set NAME to be the name associated with OMP critical statement GS.  */
 
 static inline void
-gimple_omp_critical_set_name (gimple gs, tree name)
+gimple_omp_critical_set_name (gomp_critical *crit_stmt, tree name)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_CRITICAL);
-  gs->gimple_omp_critical.name = name;
+  crit_stmt->name = name;
 }
 
 
@@ -3929,10 +4424,9 @@ gimple_omp_for_kind (const_gimple g)
 /* Set the OMP for kind.  */
 
 static inline void
-gimple_omp_for_set_kind (gimple g, int kind)
+gimple_omp_for_set_kind (gomp_for *g, int kind)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_FOR);
-  g->gsbase.subcode = (g->gsbase.subcode & ~GF_OMP_FOR_KIND_MASK)
+  g->subcode = (g->subcode & ~GF_OMP_FOR_KIND_MASK)
                      | (kind & GF_OMP_FOR_KIND_MASK);
 }
 
@@ -3952,13 +4446,12 @@ gimple_omp_for_combined_p (const_gimple g)
    value of COMBINED_P.  */
 
 static inline void
-gimple_omp_for_set_combined_p (gimple g, bool combined_p)
+gimple_omp_for_set_combined_p (gomp_for *g, bool combined_p)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_FOR);
   if (combined_p)
-    g->gsbase.subcode |= GF_OMP_FOR_COMBINED;
+    g->subcode |= GF_OMP_FOR_COMBINED;
   else
-    g->gsbase.subcode &= ~GF_OMP_FOR_COMBINED;
+    g->subcode &= ~GF_OMP_FOR_COMBINED;
 }
 
 
@@ -3977,13 +4470,12 @@ gimple_omp_for_combined_into_p (const_gimple g)
    value of COMBINED_P.  */
 
 static inline void
-gimple_omp_for_set_combined_into_p (gimple g, bool combined_p)
+gimple_omp_for_set_combined_into_p (gomp_for *g, bool combined_p)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_FOR);
   if (combined_p)
-    g->gsbase.subcode |= GF_OMP_FOR_COMBINED_INTO;
+    g->subcode |= GF_OMP_FOR_COMBINED_INTO;
   else
-    g->gsbase.subcode &= ~GF_OMP_FOR_COMBINED_INTO;
+    g->subcode &= ~GF_OMP_FOR_COMBINED_INTO;
 }
 
 
@@ -3992,8 +4484,8 @@ gimple_omp_for_set_combined_into_p (gimple g, bool combined_p)
 static inline tree
 gimple_omp_for_clauses (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  return gs->gimple_omp_for.clauses;
+  const gomp_for *omp_for_stmt = as_a <const gomp_for *> (gs);
+  return omp_for_stmt->clauses;
 }
 
 
@@ -4002,8 +4494,8 @@ gimple_omp_for_clauses (const_gimple gs)
 static inline tree *
 gimple_omp_for_clauses_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  return &gs->gimple_omp_for.clauses;
+  gomp_for *omp_for_stmt = as_a <gomp_for *> (gs);
+  return &omp_for_stmt->clauses;
 }
 
 
@@ -4012,8 +4504,8 @@ gimple_omp_for_clauses_ptr (gimple gs)
 static inline void
 gimple_omp_for_set_clauses (gimple gs, tree clauses)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  gs->gimple_omp_for.clauses = clauses;
+  gomp_for *omp_for_stmt = as_a <gomp_for *> (gs);
+  omp_for_stmt->clauses = clauses;
 }
 
 
@@ -4022,8 +4514,8 @@ gimple_omp_for_set_clauses (gimple gs, tree clauses)
 static inline size_t
 gimple_omp_for_collapse (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  return gs->gimple_omp_for.collapse;
+  gomp_for *omp_for_stmt = as_a <gomp_for *> (gs);
+  return omp_for_stmt->collapse;
 }
 
 
@@ -4032,9 +4524,9 @@ gimple_omp_for_collapse (gimple gs)
 static inline tree
 gimple_omp_for_index (const_gimple gs, size_t i)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
-  return gs->gimple_omp_for.iter[i].index;
+  const gomp_for *omp_for_stmt = as_a <const gomp_for *> (gs);
+  gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+  return omp_for_stmt->iter[i].index;
 }
 
 
@@ -4043,9 +4535,9 @@ gimple_omp_for_index (const_gimple gs, size_t i)
 static inline tree *
 gimple_omp_for_index_ptr (gimple gs, size_t i)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
-  return &gs->gimple_omp_for.iter[i].index;
+  gomp_for *omp_for_stmt = as_a <gomp_for *> (gs);
+  gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+  return &omp_for_stmt->iter[i].index;
 }
 
 
@@ -4054,9 +4546,9 @@ gimple_omp_for_index_ptr (gimple gs, size_t i)
 static inline void
 gimple_omp_for_set_index (gimple gs, size_t i, tree index)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
-  gs->gimple_omp_for.iter[i].index = index;
+  gomp_for *omp_for_stmt = as_a <gomp_for *> (gs);
+  gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+  omp_for_stmt->iter[i].index = index;
 }
 
 
@@ -4065,9 +4557,9 @@ gimple_omp_for_set_index (gimple gs, size_t i, tree index)
 static inline tree
 gimple_omp_for_initial (const_gimple gs, size_t i)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
-  return gs->gimple_omp_for.iter[i].initial;
+  const gomp_for *omp_for_stmt = as_a <const gomp_for *> (gs);
+  gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+  return omp_for_stmt->iter[i].initial;
 }
 
 
@@ -4076,9 +4568,9 @@ gimple_omp_for_initial (const_gimple gs, size_t i)
 static inline tree *
 gimple_omp_for_initial_ptr (gimple gs, size_t i)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
-  return &gs->gimple_omp_for.iter[i].initial;
+  gomp_for *omp_for_stmt = as_a <gomp_for *> (gs);
+  gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+  return &omp_for_stmt->iter[i].initial;
 }
 
 
@@ -4087,9 +4579,9 @@ gimple_omp_for_initial_ptr (gimple gs, size_t i)
 static inline void
 gimple_omp_for_set_initial (gimple gs, size_t i, tree initial)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
-  gs->gimple_omp_for.iter[i].initial = initial;
+  gomp_for *omp_for_stmt = as_a <gomp_for *> (gs);
+  gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+  omp_for_stmt->iter[i].initial = initial;
 }
 
 
@@ -4098,9 +4590,9 @@ gimple_omp_for_set_initial (gimple gs, size_t i, tree initial)
 static inline tree
 gimple_omp_for_final (const_gimple gs, size_t i)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
-  return gs->gimple_omp_for.iter[i].final;
+  const gomp_for *omp_for_stmt = as_a <const gomp_for *> (gs);
+  gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+  return omp_for_stmt->iter[i].final;
 }
 
 
@@ -4109,9 +4601,9 @@ gimple_omp_for_final (const_gimple gs, size_t i)
 static inline tree *
 gimple_omp_for_final_ptr (gimple gs, size_t i)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
-  return &gs->gimple_omp_for.iter[i].final;
+  gomp_for *omp_for_stmt = as_a <gomp_for *> (gs);
+  gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+  return &omp_for_stmt->iter[i].final;
 }
 
 
@@ -4120,9 +4612,9 @@ gimple_omp_for_final_ptr (gimple gs, size_t i)
 static inline void
 gimple_omp_for_set_final (gimple gs, size_t i, tree final)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
-  gs->gimple_omp_for.iter[i].final = final;
+  gomp_for *omp_for_stmt = as_a <gomp_for *> (gs);
+  gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+  omp_for_stmt->iter[i].final = final;
 }
 
 
@@ -4131,9 +4623,9 @@ gimple_omp_for_set_final (gimple gs, size_t i, tree final)
 static inline tree
 gimple_omp_for_incr (const_gimple gs, size_t i)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
-  return gs->gimple_omp_for.iter[i].incr;
+  const gomp_for *omp_for_stmt = as_a <const gomp_for *> (gs);
+  gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+  return omp_for_stmt->iter[i].incr;
 }
 
 
@@ -4142,9 +4634,9 @@ gimple_omp_for_incr (const_gimple gs, size_t i)
 static inline tree *
 gimple_omp_for_incr_ptr (gimple gs, size_t i)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
-  return &gs->gimple_omp_for.iter[i].incr;
+  gomp_for *omp_for_stmt = as_a <gomp_for *> (gs);
+  gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+  return &omp_for_stmt->iter[i].incr;
 }
 
 
@@ -4153,9 +4645,9 @@ gimple_omp_for_incr_ptr (gimple gs, size_t i)
 static inline void
 gimple_omp_for_set_incr (gimple gs, size_t i, tree incr)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
-  gs->gimple_omp_for.iter[i].incr = incr;
+  gomp_for *omp_for_stmt = as_a <gomp_for *> (gs);
+  gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+  omp_for_stmt->iter[i].incr = incr;
 }
 
 
@@ -4165,8 +4657,8 @@ gimple_omp_for_set_incr (gimple gs, size_t i, tree incr)
 static inline gimple_seq *
 gimple_omp_for_pre_body_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  return &gs->gimple_omp_for.pre_body;
+  gomp_for *omp_for_stmt = as_a <gomp_for *> (gs);
+  return &omp_for_stmt->pre_body;
 }
 
 
@@ -4186,8 +4678,8 @@ gimple_omp_for_pre_body (gimple gs)
 static inline void
 gimple_omp_for_set_pre_body (gimple gs, gimple_seq pre_body)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  gs->gimple_omp_for.pre_body = pre_body;
+  gomp_for *omp_for_stmt = as_a <gomp_for *> (gs);
+  omp_for_stmt->pre_body = pre_body;
 }
 
 
@@ -4196,90 +4688,84 @@ gimple_omp_for_set_pre_body (gimple gs, gimple_seq pre_body)
 static inline tree
 gimple_omp_parallel_clauses (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
-  return gs->gimple_omp_parallel.clauses;
+  const gomp_parallel *omp_parallel_stmt = as_a <const gomp_parallel *> (gs);
+  return omp_parallel_stmt->clauses;
 }
 
 
-/* Return a pointer to the clauses associated with OMP_PARALLEL GS.  */
+/* Return a pointer to the clauses associated with OMP_PARALLEL_STMT.  */
 
 static inline tree *
-gimple_omp_parallel_clauses_ptr (gimple gs)
+gimple_omp_parallel_clauses_ptr (gomp_parallel *omp_parallel_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
-  return &gs->gimple_omp_parallel.clauses;
+  return &omp_parallel_stmt->clauses;
 }
 
 
-/* Set CLAUSES to be the list of clauses associated with OMP_PARALLEL
-   GS.  */
+/* Set CLAUSES to be the list of clauses associated with OMP_PARALLEL_STMT.  */
 
 static inline void
-gimple_omp_parallel_set_clauses (gimple gs, tree clauses)
+gimple_omp_parallel_set_clauses (gomp_parallel *omp_parallel_stmt,
+                                tree clauses)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
-  gs->gimple_omp_parallel.clauses = clauses;
+  omp_parallel_stmt->clauses = clauses;
 }
 
 
-/* Return the child function used to hold the body of OMP_PARALLEL GS.  */
+/* Return the child function used to hold the body of OMP_PARALLEL_STMT.  */
 
 static inline tree
-gimple_omp_parallel_child_fn (const_gimple gs)
+gimple_omp_parallel_child_fn (const gomp_parallel *omp_parallel_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
-  return gs->gimple_omp_parallel.child_fn;
+  return omp_parallel_stmt->child_fn;
 }
 
 /* Return a pointer to the child function used to hold the body of
-   OMP_PARALLEL GS.  */
+   OMP_PARALLEL_STMT.  */
 
 static inline tree *
-gimple_omp_parallel_child_fn_ptr (gimple gs)
+gimple_omp_parallel_child_fn_ptr (gomp_parallel *omp_parallel_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
-  return &gs->gimple_omp_parallel.child_fn;
+  return &omp_parallel_stmt->child_fn;
 }
 
 
-/* Set CHILD_FN to be the child function for OMP_PARALLEL GS.  */
+/* Set CHILD_FN to be the child function for OMP_PARALLEL_STMT.  */
 
 static inline void
-gimple_omp_parallel_set_child_fn (gimple gs, tree child_fn)
+gimple_omp_parallel_set_child_fn (gomp_parallel *omp_parallel_stmt,
+                                 tree child_fn)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
-  gs->gimple_omp_parallel.child_fn = child_fn;
+  omp_parallel_stmt->child_fn = child_fn;
 }
 
 
 /* Return the artificial argument used to send variables and values
-   from the parent to the children threads in OMP_PARALLEL GS.  */
+   from the parent to the children threads in OMP_PARALLEL_STMT.  */
 
 static inline tree
-gimple_omp_parallel_data_arg (const_gimple gs)
+gimple_omp_parallel_data_arg (const gomp_parallel *omp_parallel_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
-  return gs->gimple_omp_parallel.data_arg;
+  return omp_parallel_stmt->data_arg;
 }
 
 
-/* Return a pointer to the data argument for OMP_PARALLEL GS.  */
+/* Return a pointer to the data argument for OMP_PARALLEL_STMT.  */
 
 static inline tree *
-gimple_omp_parallel_data_arg_ptr (gimple gs)
+gimple_omp_parallel_data_arg_ptr (gomp_parallel *omp_parallel_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
-  return &gs->gimple_omp_parallel.data_arg;
+  return &omp_parallel_stmt->data_arg;
 }
 
 
-/* Set DATA_ARG to be the data argument for OMP_PARALLEL GS.  */
+/* Set DATA_ARG to be the data argument for OMP_PARALLEL_STMT.  */
 
 static inline void
-gimple_omp_parallel_set_data_arg (gimple gs, tree data_arg)
+gimple_omp_parallel_set_data_arg (gomp_parallel *omp_parallel_stmt,
+                                 tree data_arg)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
-  gs->gimple_omp_parallel.data_arg = data_arg;
+  omp_parallel_stmt->data_arg = data_arg;
 }
 
 
@@ -4288,8 +4774,8 @@ gimple_omp_parallel_set_data_arg (gimple gs, tree data_arg)
 static inline tree
 gimple_omp_task_clauses (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return gs->gimple_omp_parallel.clauses;
+  const gomp_task *omp_task_stmt = as_a <const gomp_task *> (gs);
+  return omp_task_stmt->clauses;
 }
 
 
@@ -4298,8 +4784,8 @@ gimple_omp_task_clauses (const_gimple gs)
 static inline tree *
 gimple_omp_task_clauses_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return &gs->gimple_omp_parallel.clauses;
+  gomp_task *omp_task_stmt = as_a <gomp_task *> (gs);
+  return &omp_task_stmt->clauses;
 }
 
 
@@ -4309,8 +4795,8 @@ gimple_omp_task_clauses_ptr (gimple gs)
 static inline void
 gimple_omp_task_set_clauses (gimple gs, tree clauses)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  gs->gimple_omp_parallel.clauses = clauses;
+  gomp_task *omp_task_stmt = as_a <gomp_task *> (gs);
+  omp_task_stmt->clauses = clauses;
 }
 
 
@@ -4319,8 +4805,8 @@ gimple_omp_task_set_clauses (gimple gs, tree clauses)
 static inline tree
 gimple_omp_task_child_fn (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return gs->gimple_omp_parallel.child_fn;
+  const gomp_task *omp_task_stmt = as_a <const gomp_task *> (gs);
+  return omp_task_stmt->child_fn;
 }
 
 /* Return a pointer to the child function used to hold the body of
@@ -4329,8 +4815,8 @@ gimple_omp_task_child_fn (const_gimple gs)
 static inline tree *
 gimple_omp_task_child_fn_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return &gs->gimple_omp_parallel.child_fn;
+  gomp_task *omp_task_stmt = as_a <gomp_task *> (gs);
+  return &omp_task_stmt->child_fn;
 }
 
 
@@ -4339,8 +4825,8 @@ gimple_omp_task_child_fn_ptr (gimple gs)
 static inline void
 gimple_omp_task_set_child_fn (gimple gs, tree child_fn)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  gs->gimple_omp_parallel.child_fn = child_fn;
+  gomp_task *omp_task_stmt = as_a <gomp_task *> (gs);
+  omp_task_stmt->child_fn = child_fn;
 }
 
 
@@ -4350,8 +4836,8 @@ gimple_omp_task_set_child_fn (gimple gs, tree child_fn)
 static inline tree
 gimple_omp_task_data_arg (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return gs->gimple_omp_parallel.data_arg;
+  const gomp_task *omp_task_stmt = as_a <const gomp_task *> (gs);
+  return omp_task_stmt->data_arg;
 }
 
 
@@ -4360,8 +4846,8 @@ gimple_omp_task_data_arg (const_gimple gs)
 static inline tree *
 gimple_omp_task_data_arg_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return &gs->gimple_omp_parallel.data_arg;
+  gomp_task *omp_task_stmt = as_a <gomp_task *> (gs);
+  return &omp_task_stmt->data_arg;
 }
 
 
@@ -4370,8 +4856,8 @@ gimple_omp_task_data_arg_ptr (gimple gs)
 static inline void
 gimple_omp_task_set_data_arg (gimple gs, tree data_arg)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  gs->gimple_omp_parallel.data_arg = data_arg;
+  gomp_task *omp_task_stmt = as_a <gomp_task *> (gs);
+  omp_task_stmt->data_arg = data_arg;
 }
 
 
@@ -4380,9 +4866,9 @@ gimple_omp_task_set_data_arg (gimple gs, tree data_arg)
 static inline tree
 gimple_omp_taskreg_clauses (const_gimple gs)
 {
-  if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
-    GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return gs->gimple_omp_parallel.clauses;
+  const gimple_statement_omp_taskreg *omp_taskreg_stmt
+    = as_a <const gimple_statement_omp_taskreg *> (gs);
+  return omp_taskreg_stmt->clauses;
 }
 
 
@@ -4391,9 +4877,9 @@ gimple_omp_taskreg_clauses (const_gimple gs)
 static inline tree *
 gimple_omp_taskreg_clauses_ptr (gimple gs)
 {
-  if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
-    GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return &gs->gimple_omp_parallel.clauses;
+  gimple_statement_omp_taskreg *omp_taskreg_stmt
+    = as_a <gimple_statement_omp_taskreg *> (gs);
+  return &omp_taskreg_stmt->clauses;
 }
 
 
@@ -4403,9 +4889,9 @@ gimple_omp_taskreg_clauses_ptr (gimple gs)
 static inline void
 gimple_omp_taskreg_set_clauses (gimple gs, tree clauses)
 {
-  if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
-    GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  gs->gimple_omp_parallel.clauses = clauses;
+  gimple_statement_omp_taskreg *omp_taskreg_stmt
+    = as_a <gimple_statement_omp_taskreg *> (gs);
+  omp_taskreg_stmt->clauses = clauses;
 }
 
 
@@ -4414,9 +4900,9 @@ gimple_omp_taskreg_set_clauses (gimple gs, tree clauses)
 static inline tree
 gimple_omp_taskreg_child_fn (const_gimple gs)
 {
-  if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
-    GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return gs->gimple_omp_parallel.child_fn;
+  const gimple_statement_omp_taskreg *omp_taskreg_stmt
+    = as_a <const gimple_statement_omp_taskreg *> (gs);
+  return omp_taskreg_stmt->child_fn;
 }
 
 /* Return a pointer to the child function used to hold the body of
@@ -4425,9 +4911,9 @@ gimple_omp_taskreg_child_fn (const_gimple gs)
 static inline tree *
 gimple_omp_taskreg_child_fn_ptr (gimple gs)
 {
-  if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
-    GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return &gs->gimple_omp_parallel.child_fn;
+  gimple_statement_omp_taskreg *omp_taskreg_stmt
+    = as_a <gimple_statement_omp_taskreg *> (gs);
+  return &omp_taskreg_stmt->child_fn;
 }
 
 
@@ -4436,9 +4922,9 @@ gimple_omp_taskreg_child_fn_ptr (gimple gs)
 static inline void
 gimple_omp_taskreg_set_child_fn (gimple gs, tree child_fn)
 {
-  if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
-    GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  gs->gimple_omp_parallel.child_fn = child_fn;
+  gimple_statement_omp_taskreg *omp_taskreg_stmt
+    = as_a <gimple_statement_omp_taskreg *> (gs);
+  omp_taskreg_stmt->child_fn = child_fn;
 }
 
 
@@ -4448,9 +4934,9 @@ gimple_omp_taskreg_set_child_fn (gimple gs, tree child_fn)
 static inline tree
 gimple_omp_taskreg_data_arg (const_gimple gs)
 {
-  if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
-    GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return gs->gimple_omp_parallel.data_arg;
+  const gimple_statement_omp_taskreg *omp_taskreg_stmt
+    = as_a <const gimple_statement_omp_taskreg *> (gs);
+  return omp_taskreg_stmt->data_arg;
 }
 
 
@@ -4459,9 +4945,9 @@ gimple_omp_taskreg_data_arg (const_gimple gs)
 static inline tree *
 gimple_omp_taskreg_data_arg_ptr (gimple gs)
 {
-  if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
-    GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return &gs->gimple_omp_parallel.data_arg;
+  gimple_statement_omp_taskreg *omp_taskreg_stmt
+    = as_a <gimple_statement_omp_taskreg *> (gs);
+  return &omp_taskreg_stmt->data_arg;
 }
 
 
@@ -4470,9 +4956,9 @@ gimple_omp_taskreg_data_arg_ptr (gimple gs)
 static inline void
 gimple_omp_taskreg_set_data_arg (gimple gs, tree data_arg)
 {
-  if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
-    GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  gs->gimple_omp_parallel.data_arg = data_arg;
+  gimple_statement_omp_taskreg *omp_taskreg_stmt
+    = as_a <gimple_statement_omp_taskreg *> (gs);
+  omp_taskreg_stmt->data_arg = data_arg;
 }
 
 
@@ -4481,8 +4967,8 @@ gimple_omp_taskreg_set_data_arg (gimple gs, tree data_arg)
 static inline tree
 gimple_omp_task_copy_fn (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return gs->gimple_omp_task.copy_fn;
+  const gomp_task *omp_task_stmt = as_a <const gomp_task *> (gs);
+  return omp_task_stmt->copy_fn;
 }
 
 /* Return a pointer to the copy function used to hold the body of
@@ -4491,8 +4977,8 @@ gimple_omp_task_copy_fn (const_gimple gs)
 static inline tree *
 gimple_omp_task_copy_fn_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return &gs->gimple_omp_task.copy_fn;
+  gomp_task *omp_task_stmt = as_a <gomp_task *> (gs);
+  return &omp_task_stmt->copy_fn;
 }
 
 
@@ -4501,8 +4987,8 @@ gimple_omp_task_copy_fn_ptr (gimple gs)
 static inline void
 gimple_omp_task_set_copy_fn (gimple gs, tree copy_fn)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  gs->gimple_omp_task.copy_fn = copy_fn;
+  gomp_task *omp_task_stmt = as_a <gomp_task *> (gs);
+  omp_task_stmt->copy_fn = copy_fn;
 }
 
 
@@ -4511,8 +4997,8 @@ gimple_omp_task_set_copy_fn (gimple gs, tree copy_fn)
 static inline tree
 gimple_omp_task_arg_size (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return gs->gimple_omp_task.arg_size;
+  const gomp_task *omp_task_stmt = as_a <const gomp_task *> (gs);
+  return omp_task_stmt->arg_size;
 }
 
 
@@ -4521,8 +5007,8 @@ gimple_omp_task_arg_size (const_gimple gs)
 static inline tree *
 gimple_omp_task_arg_size_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return &gs->gimple_omp_task.arg_size;
+  gomp_task *omp_task_stmt = as_a <gomp_task *> (gs);
+  return &omp_task_stmt->arg_size;
 }
 
 
@@ -4531,8 +5017,8 @@ gimple_omp_task_arg_size_ptr (gimple gs)
 static inline void
 gimple_omp_task_set_arg_size (gimple gs, tree arg_size)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  gs->gimple_omp_task.arg_size = arg_size;
+  gomp_task *omp_task_stmt = as_a <gomp_task *> (gs);
+  omp_task_stmt->arg_size = arg_size;
 }
 
 
@@ -4541,8 +5027,8 @@ gimple_omp_task_set_arg_size (gimple gs, tree arg_size)
 static inline tree
 gimple_omp_task_arg_align (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return gs->gimple_omp_task.arg_align;
+  const gomp_task *omp_task_stmt = as_a <const gomp_task *> (gs);
+  return omp_task_stmt->arg_align;
 }
 
 
@@ -4551,8 +5037,8 @@ gimple_omp_task_arg_align (const_gimple gs)
 static inline tree *
 gimple_omp_task_arg_align_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  return &gs->gimple_omp_task.arg_align;
+  gomp_task *omp_task_stmt = as_a <gomp_task *> (gs);
+  return &omp_task_stmt->arg_align;
 }
 
 
@@ -4561,8 +5047,8 @@ gimple_omp_task_arg_align_ptr (gimple gs)
 static inline void
 gimple_omp_task_set_arg_align (gimple gs, tree arg_align)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
-  gs->gimple_omp_task.arg_align = arg_align;
+  gomp_task *omp_task_stmt = as_a <gomp_task *> (gs);
+  omp_task_stmt->arg_align = arg_align;
 }
 
 
@@ -4571,8 +5057,8 @@ gimple_omp_task_set_arg_align (gimple gs, tree arg_align)
 static inline tree
 gimple_omp_single_clauses (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_SINGLE);
-  return gs->gimple_omp_single.clauses;
+  const gomp_single *omp_single_stmt = as_a <const gomp_single *> (gs);
+  return omp_single_stmt->clauses;
 }
 
 
@@ -4581,18 +5067,17 @@ gimple_omp_single_clauses (const_gimple gs)
 static inline tree *
 gimple_omp_single_clauses_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_SINGLE);
-  return &gs->gimple_omp_single.clauses;
+  gomp_single *omp_single_stmt = as_a <gomp_single *> (gs);
+  return &omp_single_stmt->clauses;
 }
 
 
-/* Set CLAUSES to be the clauses associated with OMP_SINGLE GS.  */
+/* Set CLAUSES to be the clauses associated with OMP_SINGLE_STMT.  */
 
 static inline void
-gimple_omp_single_set_clauses (gimple gs, tree clauses)
+gimple_omp_single_set_clauses (gomp_single *omp_single_stmt, tree clauses)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_SINGLE);
-  gs->gimple_omp_single.clauses = clauses;
+  omp_single_stmt->clauses = clauses;
 }
 
 
@@ -4601,8 +5086,8 @@ gimple_omp_single_set_clauses (gimple gs, tree clauses)
 static inline tree
 gimple_omp_target_clauses (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
-  return gs->gimple_omp_parallel.clauses;
+  const gomp_target *omp_target_stmt = as_a <const gomp_target *> (gs);
+  return omp_target_stmt->clauses;
 }
 
 
@@ -4611,18 +5096,18 @@ gimple_omp_target_clauses (const_gimple gs)
 static inline tree *
 gimple_omp_target_clauses_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
-  return &gs->gimple_omp_parallel.clauses;
+  gomp_target *omp_target_stmt = as_a <gomp_target *> (gs);
+  return &omp_target_stmt->clauses;
 }
 
 
-/* Set CLAUSES to be the clauses associated with OMP_TARGET GS.  */
+/* Set CLAUSES to be the clauses associated with OMP_TARGET_STMT.  */
 
 static inline void
-gimple_omp_target_set_clauses (gimple gs, tree clauses)
+gimple_omp_target_set_clauses (gomp_target *omp_target_stmt,
+                              tree clauses)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
-  gs->gimple_omp_parallel.clauses = clauses;
+  omp_target_stmt->clauses = clauses;
 }
 
 
@@ -4639,72 +5124,67 @@ gimple_omp_target_kind (const_gimple g)
 /* Set the OMP target kind.  */
 
 static inline void
-gimple_omp_target_set_kind (gimple g, int kind)
+gimple_omp_target_set_kind (gomp_target *g, int kind)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_TARGET);
-  g->gsbase.subcode = (g->gsbase.subcode & ~GF_OMP_TARGET_KIND_MASK)
+  g->subcode = (g->subcode & ~GF_OMP_TARGET_KIND_MASK)
                      | (kind & GF_OMP_TARGET_KIND_MASK);
 }
 
 
-/* Return the child function used to hold the body of OMP_TARGET GS.  */
+/* Return the child function used to hold the body of OMP_TARGET_STMT.  */
 
 static inline tree
-gimple_omp_target_child_fn (const_gimple gs)
+gimple_omp_target_child_fn (const gomp_target *omp_target_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
-  return gs->gimple_omp_parallel.child_fn;
+  return omp_target_stmt->child_fn;
 }
 
 /* Return a pointer to the child function used to hold the body of
-   OMP_TARGET GS.  */
+   OMP_TARGET_STMT.  */
 
 static inline tree *
-gimple_omp_target_child_fn_ptr (gimple gs)
+gimple_omp_target_child_fn_ptr (gomp_target *omp_target_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
-  return &gs->gimple_omp_parallel.child_fn;
+  return &omp_target_stmt->child_fn;
 }
 
 
-/* Set CHILD_FN to be the child function for OMP_TARGET GS.  */
+/* Set CHILD_FN to be the child function for OMP_TARGET_STMT.  */
 
 static inline void
-gimple_omp_target_set_child_fn (gimple gs, tree child_fn)
+gimple_omp_target_set_child_fn (gomp_target *omp_target_stmt,
+                               tree child_fn)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
-  gs->gimple_omp_parallel.child_fn = child_fn;
+  omp_target_stmt->child_fn = child_fn;
 }
 
 
 /* Return the artificial argument used to send variables and values
-   from the parent to the children threads in OMP_TARGET GS.  */
+   from the parent to the children threads in OMP_TARGET_STMT.  */
 
 static inline tree
-gimple_omp_target_data_arg (const_gimple gs)
+gimple_omp_target_data_arg (const gomp_target *omp_target_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
-  return gs->gimple_omp_parallel.data_arg;
+  return omp_target_stmt->data_arg;
 }
 
 
 /* Return a pointer to the data argument for OMP_TARGET GS.  */
 
 static inline tree *
-gimple_omp_target_data_arg_ptr (gimple gs)
+gimple_omp_target_data_arg_ptr (gomp_target *omp_target_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
-  return &gs->gimple_omp_parallel.data_arg;
+  return &omp_target_stmt->data_arg;
 }
 
 
-/* Set DATA_ARG to be the data argument for OMP_TARGET GS.  */
+/* Set DATA_ARG to be the data argument for OMP_TARGET_STMT.  */
 
 static inline void
-gimple_omp_target_set_data_arg (gimple gs, tree data_arg)
+gimple_omp_target_set_data_arg (gomp_target *omp_target_stmt,
+                               tree data_arg)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
-  gs->gimple_omp_parallel.data_arg = data_arg;
+  omp_target_stmt->data_arg = data_arg;
 }
 
 
@@ -4713,8 +5193,8 @@ gimple_omp_target_set_data_arg (gimple gs, tree data_arg)
 static inline tree
 gimple_omp_teams_clauses (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TEAMS);
-  return gs->gimple_omp_single.clauses;
+  const gomp_teams *omp_teams_stmt = as_a <const gomp_teams *> (gs);
+  return omp_teams_stmt->clauses;
 }
 
 
@@ -4723,18 +5203,17 @@ gimple_omp_teams_clauses (const_gimple gs)
 static inline tree *
 gimple_omp_teams_clauses_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TEAMS);
-  return &gs->gimple_omp_single.clauses;
+  gomp_teams *omp_teams_stmt = as_a <gomp_teams *> (gs);
+  return &omp_teams_stmt->clauses;
 }
 
 
-/* Set CLAUSES to be the clauses associated with OMP_TEAMS GS.  */
+/* Set CLAUSES to be the clauses associated with OMP_TEAMS_STMT.  */
 
 static inline void
-gimple_omp_teams_set_clauses (gimple gs, tree clauses)
+gimple_omp_teams_set_clauses (gomp_teams *omp_teams_stmt, tree clauses)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_TEAMS);
-  gs->gimple_omp_single.clauses = clauses;
+  omp_teams_stmt->clauses = clauses;
 }
 
 
@@ -4743,8 +5222,8 @@ gimple_omp_teams_set_clauses (gimple gs, tree clauses)
 static inline tree
 gimple_omp_sections_clauses (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
-  return gs->gimple_omp_sections.clauses;
+  const gomp_sections *omp_sections_stmt = as_a <const gomp_sections *> (gs);
+  return omp_sections_stmt->clauses;
 }
 
 
@@ -4753,8 +5232,8 @@ gimple_omp_sections_clauses (const_gimple gs)
 static inline tree *
 gimple_omp_sections_clauses_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
-  return &gs->gimple_omp_sections.clauses;
+  gomp_sections *omp_sections_stmt = as_a <gomp_sections *> (gs);
+  return &omp_sections_stmt->clauses;
 }
 
 
@@ -4764,8 +5243,8 @@ gimple_omp_sections_clauses_ptr (gimple gs)
 static inline void
 gimple_omp_sections_set_clauses (gimple gs, tree clauses)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
-  gs->gimple_omp_sections.clauses = clauses;
+  gomp_sections *omp_sections_stmt = as_a <gomp_sections *> (gs);
+  omp_sections_stmt->clauses = clauses;
 }
 
 
@@ -4775,8 +5254,8 @@ gimple_omp_sections_set_clauses (gimple gs, tree clauses)
 static inline tree
 gimple_omp_sections_control (const_gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
-  return gs->gimple_omp_sections.control;
+  const gomp_sections *omp_sections_stmt = as_a <const gomp_sections *> (gs);
+  return omp_sections_stmt->control;
 }
 
 
@@ -4786,8 +5265,8 @@ gimple_omp_sections_control (const_gimple gs)
 static inline tree *
 gimple_omp_sections_control_ptr (gimple gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
-  return &gs->gimple_omp_sections.control;
+  gomp_sections *omp_sections_stmt = as_a <gomp_sections *> (gs);
+  return &omp_sections_stmt->control;
 }
 
 
@@ -4797,8 +5276,8 @@ gimple_omp_sections_control_ptr (gimple gs)
 static inline void
 gimple_omp_sections_set_control (gimple gs, tree control)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
-  gs->gimple_omp_sections.control = control;
+  gomp_sections *omp_sections_stmt = as_a <gomp_sections *> (gs);
+  omp_sections_stmt->control = control;
 }
 
 
@@ -4807,10 +5286,10 @@ gimple_omp_sections_set_control (gimple gs, tree control)
 static inline void
 gimple_omp_for_set_cond (gimple gs, size_t i, enum tree_code cond)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
+  gomp_for *omp_for_stmt = as_a <gomp_for *> (gs);
   gcc_gimple_checking_assert (TREE_CODE_CLASS (cond) == tcc_comparison
-                             && i < gs->gimple_omp_for.collapse);
-  gs->gimple_omp_for.iter[i].cond = cond;
+                             && i < omp_for_stmt->collapse);
+  omp_for_stmt->iter[i].cond = cond;
 }
 
 
@@ -4819,244 +5298,224 @@ gimple_omp_for_set_cond (gimple gs, size_t i, enum tree_code cond)
 static inline enum tree_code
 gimple_omp_for_cond (const_gimple gs, size_t i)
 {
-  GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
-  gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
-  return gs->gimple_omp_for.iter[i].cond;
+  const gomp_for *omp_for_stmt = as_a <const gomp_for *> (gs);
+  gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+  return omp_for_stmt->iter[i].cond;
 }
 
 
 /* Set the value being stored in an atomic store.  */
 
 static inline void
-gimple_omp_atomic_store_set_val (gimple g, tree val)
+gimple_omp_atomic_store_set_val (gomp_atomic_store *store_stmt, tree val)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_STORE);
-  g->gimple_omp_atomic_store.val = val;
+  store_stmt->val = val;
 }
 
 
 /* Return the value being stored in an atomic store.  */
 
 static inline tree
-gimple_omp_atomic_store_val (const_gimple g)
+gimple_omp_atomic_store_val (const gomp_atomic_store *store_stmt)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_STORE);
-  return g->gimple_omp_atomic_store.val;
+  return store_stmt->val;
 }
 
 
 /* Return a pointer to the value being stored in an atomic store.  */
 
 static inline tree *
-gimple_omp_atomic_store_val_ptr (gimple g)
+gimple_omp_atomic_store_val_ptr (gomp_atomic_store *store_stmt)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_STORE);
-  return &g->gimple_omp_atomic_store.val;
+  return &store_stmt->val;
 }
 
 
 /* Set the LHS of an atomic load.  */
 
 static inline void
-gimple_omp_atomic_load_set_lhs (gimple g, tree lhs)
+gimple_omp_atomic_load_set_lhs (gomp_atomic_load *load_stmt, tree lhs)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_LOAD);
-  g->gimple_omp_atomic_load.lhs = lhs;
+  load_stmt->lhs = lhs;
 }
 
 
 /* Get the LHS of an atomic load.  */
 
 static inline tree
-gimple_omp_atomic_load_lhs (const_gimple g)
+gimple_omp_atomic_load_lhs (const gomp_atomic_load *load_stmt)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_LOAD);
-  return g->gimple_omp_atomic_load.lhs;
+  return load_stmt->lhs;
 }
 
 
 /* Return a pointer to the LHS of an atomic load.  */
 
 static inline tree *
-gimple_omp_atomic_load_lhs_ptr (gimple g)
+gimple_omp_atomic_load_lhs_ptr (gomp_atomic_load *load_stmt)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_LOAD);
-  return &g->gimple_omp_atomic_load.lhs;
+  return &load_stmt->lhs;
 }
 
 
 /* Set the RHS of an atomic load.  */
 
 static inline void
-gimple_omp_atomic_load_set_rhs (gimple g, tree rhs)
+gimple_omp_atomic_load_set_rhs (gomp_atomic_load *load_stmt, tree rhs)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_LOAD);
-  g->gimple_omp_atomic_load.rhs = rhs;
+  load_stmt->rhs = rhs;
 }
 
 
 /* Get the RHS of an atomic load.  */
 
 static inline tree
-gimple_omp_atomic_load_rhs (const_gimple g)
+gimple_omp_atomic_load_rhs (const gomp_atomic_load *load_stmt)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_LOAD);
-  return g->gimple_omp_atomic_load.rhs;
+  return load_stmt->rhs;
 }
 
 
 /* Return a pointer to the RHS of an atomic load.  */
 
 static inline tree *
-gimple_omp_atomic_load_rhs_ptr (gimple g)
+gimple_omp_atomic_load_rhs_ptr (gomp_atomic_load *load_stmt)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_LOAD);
-  return &g->gimple_omp_atomic_load.rhs;
+  return &load_stmt->rhs;
 }
 
 
 /* Get the definition of the control variable in a GIMPLE_OMP_CONTINUE.  */
 
 static inline tree
-gimple_omp_continue_control_def (const_gimple g)
+gimple_omp_continue_control_def (const gomp_continue *cont_stmt)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_CONTINUE);
-  return g->gimple_omp_continue.control_def;
+  return cont_stmt->control_def;
 }
 
 /* The same as above, but return the address.  */
 
 static inline tree *
-gimple_omp_continue_control_def_ptr (gimple g)
+gimple_omp_continue_control_def_ptr (gomp_continue *cont_stmt)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_CONTINUE);
-  return &g->gimple_omp_continue.control_def;
+  return &cont_stmt->control_def;
 }
 
 /* Set the definition of the control variable in a GIMPLE_OMP_CONTINUE.  */
 
 static inline void
-gimple_omp_continue_set_control_def (gimple g, tree def)
+gimple_omp_continue_set_control_def (gomp_continue *cont_stmt, tree def)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_CONTINUE);
-  g->gimple_omp_continue.control_def = def;
+  cont_stmt->control_def = def;
 }
 
 
 /* Get the use of the control variable in a GIMPLE_OMP_CONTINUE.  */
 
 static inline tree
-gimple_omp_continue_control_use (const_gimple g)
+gimple_omp_continue_control_use (const gomp_continue *cont_stmt)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_CONTINUE);
-  return g->gimple_omp_continue.control_use;
+  return cont_stmt->control_use;
 }
 
 
 /* The same as above, but return the address.  */
 
 static inline tree *
-gimple_omp_continue_control_use_ptr (gimple g)
+gimple_omp_continue_control_use_ptr (gomp_continue *cont_stmt)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_CONTINUE);
-  return &g->gimple_omp_continue.control_use;
+  return &cont_stmt->control_use;
 }
 
 
 /* Set the use of the control variable in a GIMPLE_OMP_CONTINUE.  */
 
 static inline void
-gimple_omp_continue_set_control_use (gimple g, tree use)
+gimple_omp_continue_set_control_use (gomp_continue *cont_stmt, tree use)
 {
-  GIMPLE_CHECK (g, GIMPLE_OMP_CONTINUE);
-  g->gimple_omp_continue.control_use = use;
+  cont_stmt->control_use = use;
 }
 
-/* Return a pointer to the body for the GIMPLE_TRANSACTION statement GS.  */
+/* Return a pointer to the body for the GIMPLE_TRANSACTION statement
+   TRANSACTION_STMT.  */
 
 static inline gimple_seq *
-gimple_transaction_body_ptr (gimple gs)
+gimple_transaction_body_ptr (gtransaction *transaction_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_TRANSACTION);
-  return &gs->gimple_transaction.body;
+  return &transaction_stmt->body;
 }
 
-/* Return the body for the GIMPLE_TRANSACTION statement GS.  */
+/* Return the body for the GIMPLE_TRANSACTION statement TRANSACTION_STMT.  */
 
 static inline gimple_seq
-gimple_transaction_body (gimple gs)
+gimple_transaction_body (gtransaction *transaction_stmt)
 {
-  return *gimple_transaction_body_ptr (gs);
+  return *gimple_transaction_body_ptr (transaction_stmt);
 }
 
 /* Return the label associated with a GIMPLE_TRANSACTION.  */
 
 static inline tree
-gimple_transaction_label (const_gimple gs)
+gimple_transaction_label (const gtransaction *transaction_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_TRANSACTION);
-  return gs->gimple_transaction.label;
+  return transaction_stmt->label;
 }
 
 static inline tree *
-gimple_transaction_label_ptr (gimple gs)
+gimple_transaction_label_ptr (gtransaction *transaction_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_TRANSACTION);
-  return &gs->gimple_transaction.label;
+  return &transaction_stmt->label;
 }
 
 /* Return the subcode associated with a GIMPLE_TRANSACTION.  */
 
 static inline unsigned int
-gimple_transaction_subcode (const_gimple gs)
+gimple_transaction_subcode (const gtransaction *transaction_stmt)
 {
-  GIMPLE_CHECK (gs, GIMPLE_TRANSACTION);
-  return gs->gsbase.subcode;
+  return transaction_stmt->subcode;
 }
 
-/* Set BODY to be the body for the GIMPLE_TRANSACTION statement GS.  */
+/* Set BODY to be the body for the GIMPLE_TRANSACTION statement
+   TRANSACTION_STMT.  */
 
 static inline void
-gimple_transaction_set_body (gimple gs, gimple_seq body)
+gimple_transaction_set_body (gtransaction *transaction_stmt,
+                            gimple_seq body)
 {
-  GIMPLE_CHECK (gs, GIMPLE_TRANSACTION);
-  gs->gimple_transaction.body = body;
+  transaction_stmt->body = body;
 }
 
 /* Set the label associated with a GIMPLE_TRANSACTION.  */
 
 static inline void
-gimple_transaction_set_label (gimple gs, tree label)
+gimple_transaction_set_label (gtransaction *transaction_stmt, tree label)
 {
-  GIMPLE_CHECK (gs, GIMPLE_TRANSACTION);
-  gs->gimple_transaction.label = label;
+  transaction_stmt->label = label;
 }
 
 /* Set the subcode associated with a GIMPLE_TRANSACTION.  */
 
 static inline void
-gimple_transaction_set_subcode (gimple gs, unsigned int subcode)
+gimple_transaction_set_subcode (gtransaction *transaction_stmt,
+                               unsigned int subcode)
 {
-  GIMPLE_CHECK (gs, GIMPLE_TRANSACTION);
-  gs->gsbase.subcode = subcode;
+  transaction_stmt->subcode = subcode;
 }
 
 
 /* Return a pointer to the return value for GIMPLE_RETURN GS.  */
 
 static inline tree *
-gimple_return_retval_ptr (const_gimple gs)
+gimple_return_retval_ptr (const greturn *gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_RETURN);
   return gimple_op_ptr (gs, 0);
 }
 
 /* Return the return value for GIMPLE_RETURN GS.  */
 
 static inline tree
-gimple_return_retval (const_gimple gs)
+gimple_return_retval (const greturn *gs)
 {
-  GIMPLE_CHECK (gs, GIMPLE_RETURN);
   return gimple_op (gs, 0);
 }
 
@@ -5064,9 +5523,8 @@ gimple_return_retval (const_gimple gs)
 /* Set RETVAL to be the return value for GIMPLE_RETURN GS.  */
 
 static inline void
-gimple_return_set_retval (gimple gs, tree retval)
+gimple_return_set_retval (greturn *gs, tree retval)
 {
-  GIMPLE_CHECK (gs, GIMPLE_RETURN);
   gimple_set_op (gs, 0, retval);
 }
 
@@ -5148,7 +5606,7 @@ static inline enum br_predictor
 gimple_predict_predictor (gimple gs)
 {
   GIMPLE_CHECK (gs, GIMPLE_PREDICT);
-  return (enum br_predictor) (gs->gsbase.subcode & ~GF_PREDICT_TAKEN);
+  return (enum br_predictor) (gs->subcode & ~GF_PREDICT_TAKEN);
 }
 
 
@@ -5158,7 +5616,7 @@ static inline void
 gimple_predict_set_predictor (gimple gs, enum br_predictor predictor)
 {
   GIMPLE_CHECK (gs, GIMPLE_PREDICT);
-  gs->gsbase.subcode = (gs->gsbase.subcode & GF_PREDICT_TAKEN)
+  gs->subcode = (gs->subcode & GF_PREDICT_TAKEN)
                       | (unsigned) predictor;
 }
 
@@ -5169,7 +5627,7 @@ static inline enum prediction
 gimple_predict_outcome (gimple gs)
 {
   GIMPLE_CHECK (gs, GIMPLE_PREDICT);
-  return (gs->gsbase.subcode & GF_PREDICT_TAKEN) ? TAKEN : NOT_TAKEN;
+  return (gs->subcode & GF_PREDICT_TAKEN) ? TAKEN : NOT_TAKEN;
 }
 
 
@@ -5180,9 +5638,9 @@ gimple_predict_set_outcome (gimple gs, enum prediction outcome)
 {
   GIMPLE_CHECK (gs, GIMPLE_PREDICT);
   if (outcome == TAKEN)
-    gs->gsbase.subcode |= GF_PREDICT_TAKEN;
+    gs->subcode |= GF_PREDICT_TAKEN;
   else
-    gs->gsbase.subcode &= ~GF_PREDICT_TAKEN;
+    gs->subcode &= ~GF_PREDICT_TAKEN;
 }
 
 
@@ -5202,7 +5660,14 @@ gimple_expr_type (const_gimple stmt)
         useless conversion involved.  That means returning the
         original RHS type as far as we can reconstruct it.  */
       if (code == GIMPLE_CALL)
-       type = gimple_call_return_type (stmt);
+       {
+         const gcall *call_stmt = as_a <const gcall *> (stmt);
+         if (gimple_call_internal_p (call_stmt)
+             && gimple_call_internal_fn (call_stmt) == IFN_MASK_STORE)
+           type = TREE_TYPE (gimple_call_arg (call_stmt, 3));
+         else
+           type = gimple_call_return_type (call_stmt);
+       }
       else
        switch (gimple_assign_rhs_code (stmt))
          {
@@ -5223,343 +5688,6 @@ gimple_expr_type (const_gimple stmt)
     return void_type_node;
 }
 
-/* Return a new iterator pointing to GIMPLE_SEQ's first statement.  */
-
-static inline gimple_stmt_iterator
-gsi_start_1 (gimple_seq *seq)
-{
-  gimple_stmt_iterator i;
-
-  i.ptr = gimple_seq_first (*seq);
-  i.seq = seq;
-  i.bb = i.ptr ? gimple_bb (i.ptr) : NULL;
-
-  return i;
-}
-
-#define gsi_start(x) gsi_start_1 (&(x))
-
-static inline gimple_stmt_iterator
-gsi_none (void)
-{
-  gimple_stmt_iterator i;
-  i.ptr = NULL;
-  i.seq = NULL;
-  i.bb = NULL;
-  return i;
-}
-
-/* Return a new iterator pointing to the first statement in basic block BB.  */
-
-static inline gimple_stmt_iterator
-gsi_start_bb (basic_block bb)
-{
-  gimple_stmt_iterator i;
-  gimple_seq *seq;
-
-  seq = bb_seq_addr (bb);
-  i.ptr = gimple_seq_first (*seq);
-  i.seq = seq;
-  i.bb = bb;
-
-  return i;
-}
-
-
-/* Return a new iterator initially pointing to GIMPLE_SEQ's last statement.  */
-
-static inline gimple_stmt_iterator
-gsi_last_1 (gimple_seq *seq)
-{
-  gimple_stmt_iterator i;
-
-  i.ptr = gimple_seq_last (*seq);
-  i.seq = seq;
-  i.bb = i.ptr ? gimple_bb (i.ptr) : NULL;
-
-  return i;
-}
-
-#define gsi_last(x) gsi_last_1 (&(x))
-
-/* Return a new iterator pointing to the last statement in basic block BB.  */
-
-static inline gimple_stmt_iterator
-gsi_last_bb (basic_block bb)
-{
-  gimple_stmt_iterator i;
-  gimple_seq *seq;
-
-  seq = bb_seq_addr (bb);
-  i.ptr = gimple_seq_last (*seq);
-  i.seq = seq;
-  i.bb = bb;
-
-  return i;
-}
-
-
-/* Return true if I is at the end of its sequence.  */
-
-static inline bool
-gsi_end_p (gimple_stmt_iterator i)
-{
-  return i.ptr == NULL;
-}
-
-
-/* Return true if I is one statement before the end of its sequence.  */
-
-static inline bool
-gsi_one_before_end_p (gimple_stmt_iterator i)
-{
-  return i.ptr != NULL && i.ptr->gsbase.next == NULL;
-}
-
-
-/* Advance the iterator to the next gimple statement.  */
-
-static inline void
-gsi_next (gimple_stmt_iterator *i)
-{
-  i->ptr = i->ptr->gsbase.next;
-}
-
-/* Advance the iterator to the previous gimple statement.  */
-
-static inline void
-gsi_prev (gimple_stmt_iterator *i)
-{
-  gimple prev = i->ptr->gsbase.prev;
-  if (prev->gsbase.next)
-    i->ptr = prev;
-  else
-    i->ptr = NULL;
-}
-
-/* Return the current stmt.  */
-
-static inline gimple
-gsi_stmt (gimple_stmt_iterator i)
-{
-  return i.ptr;
-}
-
-/* Return a block statement iterator that points to the first non-label
-   statement in block BB.  */
-
-static inline gimple_stmt_iterator
-gsi_after_labels (basic_block bb)
-{
-  gimple_stmt_iterator gsi = gsi_start_bb (bb);
-
-  while (!gsi_end_p (gsi) && gimple_code (gsi_stmt (gsi)) == GIMPLE_LABEL)
-    gsi_next (&gsi);
-
-  return gsi;
-}
-
-/* Advance the iterator to the next non-debug gimple statement.  */
-
-static inline void
-gsi_next_nondebug (gimple_stmt_iterator *i)
-{
-  do
-    {
-      gsi_next (i);
-    }
-  while (!gsi_end_p (*i) && is_gimple_debug (gsi_stmt (*i)));
-}
-
-/* Advance the iterator to the next non-debug gimple statement.  */
-
-static inline void
-gsi_prev_nondebug (gimple_stmt_iterator *i)
-{
-  do
-    {
-      gsi_prev (i);
-    }
-  while (!gsi_end_p (*i) && is_gimple_debug (gsi_stmt (*i)));
-}
-
-/* Return a new iterator pointing to the first non-debug statement in
-   basic block BB.  */
-
-static inline gimple_stmt_iterator
-gsi_start_nondebug_bb (basic_block bb)
-{
-  gimple_stmt_iterator i = gsi_start_bb (bb);
-
-  if (!gsi_end_p (i) && is_gimple_debug (gsi_stmt (i)))
-    gsi_next_nondebug (&i);
-
-  return i;
-}
-
-/* Return a new iterator pointing to the first non-debug non-label statement in
-   basic block BB.  */
-
-static inline gimple_stmt_iterator
-gsi_start_nondebug_after_labels_bb (basic_block bb)
-{
-  gimple_stmt_iterator i = gsi_after_labels (bb);
-
-  if (!gsi_end_p (i) && is_gimple_debug (gsi_stmt (i)))
-    gsi_next_nondebug (&i);
-
-  return i;
-}
-
-/* Return a new iterator pointing to the last non-debug statement in
-   basic block BB.  */
-
-static inline gimple_stmt_iterator
-gsi_last_nondebug_bb (basic_block bb)
-{
-  gimple_stmt_iterator i = gsi_last_bb (bb);
-
-  if (!gsi_end_p (i) && is_gimple_debug (gsi_stmt (i)))
-    gsi_prev_nondebug (&i);
-
-  return i;
-}
-
-
-/* Return the basic block associated with this iterator.  */
-
-static inline basic_block
-gsi_bb (gimple_stmt_iterator i)
-{
-  return i.bb;
-}
-
-
-/* Return the sequence associated with this iterator.  */
-
-static inline gimple_seq
-gsi_seq (gimple_stmt_iterator i)
-{
-  return *i.seq;
-}
-
-
-enum gsi_iterator_update
-{
-  GSI_NEW_STMT,                /* Only valid when single statement is added, move
-                          iterator to it.  */
-  GSI_SAME_STMT,       /* Leave the iterator at the same statement.  */
-  GSI_CONTINUE_LINKING /* Move iterator to whatever position is suitable
-                          for linking other statements in the same
-                          direction.  */
-};
-
-/* In gimple-iterator.c  */
-gimple_stmt_iterator gsi_start_phis (basic_block);
-gimple_seq gsi_split_seq_after (gimple_stmt_iterator);
-void gsi_split_seq_before (gimple_stmt_iterator *, gimple_seq *);
-void gsi_set_stmt (gimple_stmt_iterator *, gimple);
-void gsi_replace (gimple_stmt_iterator *, gimple, bool);
-void gsi_replace_with_seq (gimple_stmt_iterator *, gimple_seq, bool);
-void gsi_insert_before (gimple_stmt_iterator *, gimple,
-                       enum gsi_iterator_update);
-void gsi_insert_before_without_update (gimple_stmt_iterator *, gimple,
-                                       enum gsi_iterator_update);
-void gsi_insert_seq_before (gimple_stmt_iterator *, gimple_seq,
-                            enum gsi_iterator_update);
-void gsi_insert_seq_before_without_update (gimple_stmt_iterator *, gimple_seq,
-                                           enum gsi_iterator_update);
-void gsi_insert_after (gimple_stmt_iterator *, gimple,
-                      enum gsi_iterator_update);
-void gsi_insert_after_without_update (gimple_stmt_iterator *, gimple,
-                                      enum gsi_iterator_update);
-void gsi_insert_seq_after (gimple_stmt_iterator *, gimple_seq,
-                          enum gsi_iterator_update);
-void gsi_insert_seq_after_without_update (gimple_stmt_iterator *, gimple_seq,
-                                          enum gsi_iterator_update);
-bool gsi_remove (gimple_stmt_iterator *, bool);
-gimple_stmt_iterator gsi_for_stmt (gimple);
-void gsi_move_after (gimple_stmt_iterator *, gimple_stmt_iterator *);
-void gsi_move_before (gimple_stmt_iterator *, gimple_stmt_iterator *);
-void gsi_move_to_bb_end (gimple_stmt_iterator *, basic_block);
-void gsi_insert_on_edge (edge, gimple);
-void gsi_insert_seq_on_edge (edge, gimple_seq);
-basic_block gsi_insert_on_edge_immediate (edge, gimple);
-basic_block gsi_insert_seq_on_edge_immediate (edge, gimple_seq);
-void gsi_commit_one_edge_insert (edge, basic_block *);
-void gsi_commit_edge_inserts (void);
-gimple gimple_call_copy_skip_args (gimple, bitmap);
-
-/* Convenience routines to walk all statements of a gimple function.
-   Note that this is useful exclusively before the code is converted
-   into SSA form.  Once the program is in SSA form, the standard
-   operand interface should be used to analyze/modify statements.  */
-struct walk_stmt_info
-{
-  /* Points to the current statement being walked.  */
-  gimple_stmt_iterator gsi;
-
-  /* Additional data that the callback functions may want to carry
-     through the recursion.  */
-  void *info;
-
-  /* Pointer map used to mark visited tree nodes when calling
-     walk_tree on each operand.  If set to NULL, duplicate tree nodes
-     will be visited more than once.  */
-  struct pointer_set_t *pset;
-
-  /* Operand returned by the callbacks.  This is set when calling
-     walk_gimple_seq.  If the walk_stmt_fn or walk_tree_fn callback
-     returns non-NULL, this field will contain the tree returned by
-     the last callback.  */
-  tree callback_result;
-
-  /* Indicates whether the operand being examined may be replaced
-     with something that matches is_gimple_val (if true) or something
-     slightly more complicated (if false).  "Something" technically
-     means the common subset of is_gimple_lvalue and is_gimple_rhs,
-     but we never try to form anything more complicated than that, so
-     we don't bother checking.
-
-     Also note that CALLBACK should update this flag while walking the
-     sub-expressions of a statement.  For instance, when walking the
-     statement 'foo (&var)', the flag VAL_ONLY will initially be set
-     to true, however, when walking &var, the operand of that
-     ADDR_EXPR does not need to be a GIMPLE value.  */
-  BOOL_BITFIELD val_only : 1;
-
-  /* True if we are currently walking the LHS of an assignment.  */
-  BOOL_BITFIELD is_lhs : 1;
-
-  /* Optional.  Set to true by the callback functions if they made any
-     changes.  */
-  BOOL_BITFIELD changed : 1;
-
-  /* True if we're interested in location information.  */
-  BOOL_BITFIELD want_locations : 1;
-
-  /* True if we've removed the statement that was processed.  */
-  BOOL_BITFIELD removed_stmt : 1;
-};
-
-/* Callback for walk_gimple_stmt.  Called for every statement found
-   during traversal.  The first argument points to the statement to
-   walk.  The second argument is a flag that the callback sets to
-   'true' if it the callback handled all the operands and
-   sub-statements of the statement (the default value of this flag is
-   'false').  The third argument is an anonymous pointer to data
-   to be used by the callback.  */
-typedef tree (*walk_stmt_fn) (gimple_stmt_iterator *, bool *,
-                             struct walk_stmt_info *);
-
-gimple walk_gimple_seq (gimple_seq, walk_stmt_fn, walk_tree_fn,
-                       struct walk_stmt_info *);
-gimple walk_gimple_seq_mod (gimple_seq *, walk_stmt_fn, walk_tree_fn,
-                           struct walk_stmt_info *);
-tree walk_gimple_stmt (gimple_stmt_iterator *, walk_stmt_fn, walk_tree_fn,
-                      struct walk_stmt_info *);
-tree walk_gimple_op (gimple, walk_tree_fn, struct walk_stmt_info *);
-
 /* Enum and arrays used for allocation stats.  Keep in sync with
    gimple.c:gimple_alloc_kind_names.  */
 enum gimple_alloc_kind
@@ -5591,17 +5719,6 @@ gimple_alloc_kind (enum gimple_code code)
     }
 }
 
-extern void dump_gimple_statistics (void);
-
-/* Set the location of all statements in SEQ to LOC.  */
-
-static inline void
-gimple_seq_set_location (gimple_seq seq, location_t loc)
-{
-  for (gimple_stmt_iterator i = gsi_start (seq); !gsi_end_p (i); gsi_next (&i))
-    gimple_set_location (gsi_stmt (i), loc);
-}
-
 /* Return true if a location should not be emitted for this statement
    by annotate_all_with_location.  */
 
@@ -5632,9 +5749,4 @@ gimple_set_do_not_emit_location (gimple g)
 
 #define LABEL(x) ((x) < 1024*10 ? 'b' : ((x) < 1024*1024*10 ? 'k' : 'M'))
 
-#define PERCENT(x,y) ((float)(x) * 100.0 / (float)(y))
-
-extern void sort_case_labels (vec<tree> );
-extern void preprocess_case_label_vec_for_gimple (vec<tree> , tree, tree *);
-
 #endif  /* GCC_GIMPLE_H */