diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 630a082f7eb681fa66ddb24cbfc15bdbb1d91604..a6b572408329d0ad975e451905034435a7d311f9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,124 @@
+2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
+
+	* gimple-expr.h (create_tmp_var_name, create_tmp_var_raw,
+	create_tmp_var, create_tmp_reg, mark_addressable, is_gimple_reg_rhs):
+	Relocate prototypes from gimple.h.
+	* gimplify.h: New File.  Relocate some prototypes from gimple.h here.
+	(gimple_predicate, enum fallback, enum gimplify_status): Relocate
+	from gimple.h.
+	* gimple.h: Move some prototypes to gimplify.h.
+	(gimple_predicate, enum fallback, enum gimplify_status): Move to
+	gimplify.h.
+	(gimple_do_not_emit_location_p, gimple_set_do_not_emit_location):
+	Relocate from gimpify.c.
+	* gimple-expr.c (remove_suffix, tmp_var_id_num, create_tmp_var_name,
+	create_tmp_var_raw, create_tmp_var, create_tmp_reg, mark_addressable,
+	is_gimple_reg_rhs) Relocate from gimplify.c.
+	* gimplify.c (mark_addressable): Move to gimple-expr.c.
+	(gimple_seq_add_stmt_without_update): Move to gimple.c.
+	(remove_suffix, tmp_var_id_num, create_tmp_var_name, create_tmp_var_raw,
+	create_tmp_var, create_tmp_reg, is_gimple_reg_rhs): Move to 
+	gimple-expr.c.
+	(should_carry_location_p): Move to gimple.c.
+	(gimple_do_not_emit_location_p, gimple_set_do_not_emit_location): Move
+	to gimple.h.
+	(annotate_one_with_location, annotate_all_with_location_after,
+	annotate_all_with_location): Move to gimple.c.
+	(compare_case_labels, sort_case_labels,
+	preprocess_case_label_vec_for_gimple): Move to gimple.c.
+	(rhs_predicate_for): Make static.
+	(gimplify_assign): Relocate from gimple.c.
+	* gimple.c (gimplify_assign): Move to gimplify.c.
+	(gimple_seq_add_stmt_without_update, should_carry_location_p,
+	annotate_one_with_location, annotate_all_with_location_after,
+	annotate_all_with_location, compare_case_labels, sort_case_labels,
+	preprocess_case_label_vec_for_gimple): Relocate from gimplify.c.
+	* tree.h (unshare_expr, unshare_expr_without_location,
+	mark_addressable): Move prototypes to gimplify.h.
+	* Makefile.in (GTFILES): gimple-expr.c now has the GTY tag for
+	tmp_var_id_num
+	* asan.c: Include gimplify.h rather than gimple.h.
+	* cfgloopmanip.c: Likewise.
+	* cgraphunit.c: Likewise.
+	* cilk-common.c: Likewise.
+	* dwarf2out.c: Dont include gimple.h.
+	* fold-const.c: Include gimplify.h rather than gimple.h.
+	* function.c: Likewise.
+	* gimple-fold.c: Likewise.
+	* gimple-ssa-strength-reduction.c: Likewise.
+	* graphite-clast-to-gimple.c: Likewise.
+	* graphite-sese-to-poly.c: Likewise.
+	* ipa-prop.c: Likewise.
+	* ipa-split.c: Likewise.
+	* ipa.c: Likewise.
+	* langhooks.c: Dont include gimple.h.
+	* loop-init.c: Include gimplify.h rather than gimple.h.
+	* omp-low.c: Likewise.
+	* sese.c: Likewise.
+	* stor-layout.c: Likewise.
+	* targhooks.c: Likewise.
+	* trans-mem.c: Likewise.
+	* tree-affine.c: Likewise.
+	* tree-cfg.c: Likewise.
+	* tree-cfgcleanup.c: Likewise.
+	* tree-complex.c: Likewise.
+	* tree-if-conv.c: Likewise.
+	* tree-inline.c: Likewise.
+	* tree-iterator.c: Likewise.
+	* tree-loop-distribution.c: Likewise.
+	* tree-nested.c: Likewise.
+	* tree-parloops.c: Likewise.
+	* tree-predcom.c: Likewise.
+	* tree-profile.c: Likewise.
+	* tree-scalar-evolution.c: Likewise.
+	* tree-sra.c: Likewise.
+	* tree-ssa-address.c: Likewise.
+	* tree-ssa-ccp.c: Likewise.
+	* tree-ssa-dce.c: Likewise.
+	* tree-ssa-forwprop.c: Likewise.
+	* tree-ssa-ifcombine.c: Likewise.
+	* tree-ssa-loop-im.c: Likewise.
+	* tree-ssa-loop-ivopts.c: Likewise.
+	* tree-ssa-loop-manip.c: Likewise.
+	* tree-ssa-loop-niter.c: Likewise.
+	* tree-ssa-loop-prefetch.c: Likewise.
+	* tree-ssa-loop-unswitch.c: Likewise.
+	* tree-ssa-math-opts.c: Likewise.
+	* tree-ssa-phiopt.c: Likewise.
+	* tree-ssa-phiprop.c: Likewise.
+	* tree-ssa-pre.c: Likewise.
+	* tree-ssa-propagate.c: Likewise.
+	* tree-ssa-reassoc.c: Likewise.
+	* tree-ssa-sccvn.c: Likewise.
+	* tree-ssa-strlen.c: Likewise.
+	* tree-ssa.c: Likewise.
+	* tree-switch-conversio: Likewise.n.c
+	* tree-tailcall.c: Likewise.
+	* tree-vect-data-refs.c: Likewise.
+	* tree-vect-generic.c: Likewise.
+	* tree-vect-loop-manip.c: Likewise.
+	* tree-vect-loop.c: Likewise.
+	* tree-vect-patterns.c: Likewise.
+	* tree-vect-stmts.c: Likewise.
+	* tsan.c: Likewise.
+	* value-prof.c: Likewise.
+	* config/aarch64/aarch64.c: Include gimplify.h instead of gimple.h.
+	* config/alpha/alpha.c: Likewise.
+	* config/darwin.c: Likewise.
+	* config/i386/i386.c: Likewise.
+	* config/ia64/ia64.c: Likewise.
+	* config/mep/mep.c: Likewise.
+	* config/mips/mips.c: Likewise.
+	* config/rs6000/rs6000.c: Likewise.
+	* config/s390/s390.c: Likewise.
+	* config/sh/sh.c: Likewise.
+	* config/sparc/sparc.c: Likewise.
+	* config/spu/spu.c: Likewise.
+	* config/stormy16/stormy16.c: Likewise.
+	* config/tilegx/tilegx.c: Likewise.
+	* config/tilepro/tilepro.c: Likewise.
+	* config/xtensa/xtensa.c: Likewise.
+
 2013-11-12  Adam Butcher  <adam@jessamine.co.uk>
 
 	* tree.c (grow_tree_vec_stat): New function ...
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 49285e5f73207947a75ae3c55d98fc440a89afa6..031446be5ea625bd2df96bc268b3c0ee63aad735 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -2255,7 +2255,7 @@ GTFILES = $(CPP_ID_DATA_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
   $(srcdir)/tree-ssanames.c $(srcdir)/tree-eh.c $(srcdir)/tree-ssa-address.c \
   $(srcdir)/tree-cfg.c \
   $(srcdir)/tree-dfa.c \
-  $(srcdir)/tree-iterator.c $(srcdir)/gimplify.c \
+  $(srcdir)/tree-iterator.c $(srcdir)/gimple-expr.c \
   $(srcdir)/tree-chrec.h \
   $(srcdir)/tree-scalar-evolution.c \
   $(srcdir)/tree-ssa-operands.h \
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index a5c9456e4c575ac88d5511e07fcaa12c3394722b..39b0f97c2a4e1310c21556f607cbadfb31bbadaf 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,7 @@
+2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
+
+	* ada/gcc-interface/trans.c: Include gimplify.h.
+
 2013-11-11  Tristan Gingold  <gingold@adacore.com>
 	    Eric Botcazou  <ebotcazou@adacore.com>
 
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c
index 1d76e6aa468e9e5abfe49333dc9093af22346557..9336a69abce5aa0a5e18e4d70bc8242e3a4061af 100644
--- a/gcc/ada/gcc-interface/trans.c
+++ b/gcc/ada/gcc-interface/trans.c
@@ -33,7 +33,7 @@
 #include "output.h"
 #include "libfuncs.h"	/* For set_stack_check_libfunc.  */
 #include "tree-iterator.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "bitmap.h"
 #include "cgraph.h"
 #include "diagnostic.h"
diff --git a/gcc/asan.c b/gcc/asan.c
index 950d332c0d51e5369f5b98b40ffbaca50db5333c..59e26397cb1a434c3ccd29d724c8a6c8aa75ce0a 100644
--- a/gcc/asan.c
+++ b/gcc/asan.c
@@ -23,7 +23,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "tree-iterator.h"
 #include "cgraph.h"
 #include "tree-ssanames.h"
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 1a38bd4d301bd444c165efebb0820b2c129ed307..57063bc5f76123ae751ff4cc3e70a44e031357a3 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,11 @@
+2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
+
+	* c-family/c-common.c: Include gimplify.h.
+	* c-family/c-gimplify.c: Likewise.
+	* c-family/cilk.c: Likewise.
+	* c-family/c-omp.c: Include gimple-expr.h instead of gimple.h.
+	* c-family/c-ubsan.c: Don't include gimple.h.
+
 2013-11-12  Joseph Myers  <joseph@codesourcery.com>
 
 	* c-common.c (c_common_reswords): Add _Thread_local.
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index 1c317439b0b983edf881ae390944192cef4b5fb4..835d22c6cf90028b7dad2669c96254bdfe13d801 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -42,6 +42,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "opts.h"
 #include "cgraph.h"
 #include "target-def.h"
+#include "gimplify.h"
 
 cpp_reader *parse_in;		/* Declared in c-pragma.h.  */
 
diff --git a/gcc/c-family/c-gimplify.c b/gcc/c-family/c-gimplify.c
index 2a4f633ad4ff3f9ef8f9f98d5b96798df7404a7d..a7f29f8b4fc51b0adfc0e5b7d3e0d815b5c6764a 100644
--- a/gcc/c-family/c-gimplify.c
+++ b/gcc/c-family/c-gimplify.c
@@ -29,7 +29,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm.h"
 #include "tree.h"
 #include "c-common.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "tree-inline.h"
 #include "diagnostic-core.h"
 #include "langhooks.h"
diff --git a/gcc/c-family/c-omp.c b/gcc/c-family/c-omp.c
index f001a75cd228dd8a5b271ebc2402e51836e77ccc..b342bd216cbb71be1276f06f227181cf87ef5607 100644
--- a/gcc/c-family/c-omp.c
+++ b/gcc/c-family/c-omp.c
@@ -27,7 +27,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "c-common.h"
 #include "c-pragma.h"
-#include "gimple.h"		/* For create_tmp_var_raw.  */
+#include "gimple-expr.h"
 #include "langhooks.h"
 
 
diff --git a/gcc/c-family/c-ubsan.c b/gcc/c-family/c-ubsan.c
index c9896381db2671a8e02f5521763324cdfeed21b3..dbac348bc0ee43e1680dde8aa39670f59fb28b1c 100644
--- a/gcc/c-family/c-ubsan.c
+++ b/gcc/c-family/c-ubsan.c
@@ -24,7 +24,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "alloc-pool.h"
 #include "cgraph.h"
-#include "gimple.h"
 #include "output.h"
 #include "toplev.h"
 #include "ubsan.h"
diff --git a/gcc/c-family/cilk.c b/gcc/c-family/cilk.c
index f719d5518699a9f529278c5d38e9612905a03532..f6d7dce01ce35df1eeba31575319c57f0cdd2b6a 100644
--- a/gcc/c-family/cilk.c
+++ b/gcc/c-family/cilk.c
@@ -25,7 +25,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "coretypes.h"
 #include "tree.h"
 #include "langhooks.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "tree-iterator.h"
 #include "tree-inline.h"
 #include "c-family/c-common.h"
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index 1cf5883c84815a98e8b5df3d450a60f0d4c53651..e95c54dd2bee9331b48b6fcbe76f1236fd39066d 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,7 @@
+2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
+
+	* c/c-typeck.c: Include gimplify.h.
+
 2013-11-12  Joseph Myers  <joseph@codesourcery.com>
 
 	* c-tree.h (struct c_declspecs): Add thread_gnu_p field.
diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c
index 5ef1f9303f1dc9dae7b79e05216248c3b7996d6f..1cf9b4563bc2ab670f1bb9ca23540cdafc09d226 100644
--- a/gcc/c/c-typeck.c
+++ b/gcc/c/c-typeck.c
@@ -36,7 +36,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "target.h"
 #include "tree-iterator.h"
 #include "bitmap.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "tree-inline.h"
 #include "omp-low.h"
 #include "c-family/c-objc.h"
diff --git a/gcc/cfgloopmanip.c b/gcc/cfgloopmanip.c
index be876db354f524970fdcdce4afac182b219d45f7..131c2a043dc0716feaa4f92b630a78acfce7ffeb 100644
--- a/gcc/cfgloopmanip.c
+++ b/gcc/cfgloopmanip.c
@@ -25,7 +25,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "basic-block.h"
 #include "cfgloop.h"
 #include "tree.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "tree-ssa-loop-manip.h"
 #include "dumpfile.h"
 
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index c3a8967e843af60f9508e8431c1ecb6493cfe1f4..4765e6abb44bf4e65d3e4bfa236321df5b6c5117 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -164,7 +164,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "output.h"
 #include "rtl.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-cfg.h"
 #include "tree-into-ssa.h"
diff --git a/gcc/cilk-common.c b/gcc/cilk-common.c
index ca178c00cd365f3e2d39924baf944154a1b160ea..216c7d43607ffe1de904b4ae943b22e59cb2c395 100644
--- a/gcc/cilk-common.c
+++ b/gcc/cilk-common.c
@@ -29,7 +29,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "optabs.h"
 #include "recog.h"
 #include "tree-iterator.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "cilk.h"
 
 /* This structure holds all the important fields of the internal structures,
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 8458cac34f2f53e17a449cce2e2ced7943559460..a51bb210850cf9e355347e2b4737536653d60835 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -42,7 +42,7 @@
 #include "recog.h"
 #include "langhooks.h"
 #include "diagnostic-core.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "optabs.h"
 #include "dwarf2.h"
 #include "cfgloop.h"
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index e39fc7731e6027d6ab1efe681ee58cfdf7b4789b..9c8d907cd23b5e7e685a9ebe8bdf9ac7185b2929 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -48,7 +48,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "debug.h"
 #include "langhooks.h"
 #include "splay-tree.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-ssanames.h"
 #include "tree-stdarg.h"
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index fc7a9a8f99e9fc7e0cd2f3352c764cc64d2f95f1..009e851835c88931517b4e19c53170a2470ce39b 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -45,7 +45,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "df.h"
 #include "debug.h"
 #include "obstack.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "lto-streamer.h"
 
 /* Darwin supports a feature called fix-and-continue, which is used
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 924cb669e46d42758f893b83b4753d36b55cdb3e..5287b49bfc9a6e020988a7471d46379a9cbed6e6 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -47,7 +47,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "langhooks.h"
 #include "reload.h"
 #include "cgraph.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "dwarf2.h"
 #include "df.h"
 #include "tm-constrs.h"
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index 1bf3e2fe928c993dde2e756067aa2b18a55e8a23..2b331873e2444da72b5f34106710f08bb568f693 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -49,7 +49,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm_p.h"
 #include "hash-table.h"
 #include "langhooks.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "intl.h"
 #include "df.h"
 #include "debug.h"
diff --git a/gcc/config/mep/mep.c b/gcc/config/mep/mep.c
index e67540a56113eca54ee6a8c059a4778e474eac4f..f67bf855121daf6982945ec7dac41efbb7638cc3 100644
--- a/gcc/config/mep/mep.c
+++ b/gcc/config/mep/mep.c
@@ -47,7 +47,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "target-def.h"
 #include "langhooks.h"
 #include "df.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "opts.h"
 #include "dumpfile.h"
 
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index c1d8f3a0ade7aee6f98e16fa56ab996748860aaa..ece4fec5413f7caca32c9a91ce6d3811b8a5f4b0 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -50,7 +50,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "common/common-target.h"
 #include "langhooks.h"
 #include "sched-int.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "bitmap.h"
 #include "diagnostic.h"
 #include "target-globals.h"
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 8c8ee9fae0e753480a53512ede3c475e20ee61cd..33547c41dd60b4e293687a519ef55ac2cf70a4c3 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -51,7 +51,7 @@
 #include "reload.h"
 #include "cfgloop.h"
 #include "sched-int.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "intl.h"
 #include "params.h"
 #include "tm-constrs.h"
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index f0d6a59e97805557388954e71bd8feeaa86dbb5b..ca6503540b15df49318eeee55f016a1902feccda 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -47,7 +47,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "debug.h"
 #include "langhooks.h"
 #include "optabs.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "df.h"
 #include "params.h"
 #include "cfgloop.h"
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index 167b615e37b1f57ddf9a312e678c7cd02bd64505..6afeca9d93b9f6580d60cc02c83e77865a731bfd 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -48,7 +48,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "sched-int.h"
 #include "params.h"
 #include "ggc.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "cfgloop.h"
 #include "alloc-pool.h"
 #include "tm-constrs.h"
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 0eabd5b2b726f469ee084ea9e011dc556271b576..f2552bea63cfe378348a6c94acd6af9f6e3d0df4 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -46,7 +46,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "target.h"
 #include "target-def.h"
 #include "common/common-target.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "langhooks.h"
 #include "reload.h"
 #include "params.h"
diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c
index 38c441d9a030c1bfc5651292b2ec5bd695b2322c..7dedaed4e104bd45ead26dae4b862d874da904a3 100644
--- a/gcc/config/spu/spu.c
+++ b/gcc/config/spu/spu.c
@@ -45,7 +45,7 @@
 #include "sched-int.h"
 #include "params.h"
 #include "machmode.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "tm-constrs.h"
 #include "ddg.h"
 #include "sbitmap.h"
diff --git a/gcc/config/stormy16/stormy16.c b/gcc/config/stormy16/stormy16.c
index 30d6d781576c3a4c13b9f066fbe709d3070de4ec..7704fff073ac9c2733e20d2e4a6bbeaac736c79d 100644
--- a/gcc/config/stormy16/stormy16.c
+++ b/gcc/config/stormy16/stormy16.c
@@ -43,7 +43,7 @@
 #include "target-def.h"
 #include "tm_p.h"
 #include "langhooks.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "df.h"
 #include "reload.h"
 #include "ggc.h"
diff --git a/gcc/config/tilegx/tilegx.c b/gcc/config/tilegx/tilegx.c
index dafa44c0674226be4c020c2f5ae2648c6b04c7a0..d20476f16106a5cb9fcb50aa3e70e0abc36eb8d0 100644
--- a/gcc/config/tilegx/tilegx.c
+++ b/gcc/config/tilegx/tilegx.c
@@ -40,7 +40,7 @@
 #include "dwarf2.h"
 #include "timevar.h"
 #include "tree.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "cfgloop.h"
 #include "tilegx-builtins.h"
 #include "tilegx-multiply.h"
diff --git a/gcc/config/tilepro/tilepro.c b/gcc/config/tilepro/tilepro.c
index 5e3be831fb1b6e705afb35dbfea7288db5fa6ff7..84b3ef53bb8c3b6338ec61031d28daede33e2197 100644
--- a/gcc/config/tilepro/tilepro.c
+++ b/gcc/config/tilepro/tilepro.c
@@ -41,7 +41,7 @@
 #include "dwarf2.h"
 #include "timevar.h"
 #include "tree.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "cfgloop.h"
 #include "tilepro-builtins.h"
 #include "tilepro-multiply.h"
diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
index 7faf7de996820a5d791a08a7296051a993208728..757314d58df2dfe8e27b0aacf904e800683fd4a0 100644
--- a/gcc/config/xtensa/xtensa.c
+++ b/gcc/config/xtensa/xtensa.c
@@ -46,7 +46,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "target.h"
 #include "target-def.h"
 #include "langhooks.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "df.h"
 
 
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index c85345eb270c4d55dc358d518cb0988f58150e8a..7c6b2319e35c0b028b15dfd26e0f30dbf860c0b6 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,18 @@
+2013-11-12  Andrew MacLeod <amacleod@redhat.com>
+
+	* cp/class.c: Include gimplify.h.
+	* cp/cp-gimplify.c: Likewise.
+	* cp/error.c: Likewise.
+	* cp/init.c: Likewise.
+	* cp/optimize.c: Likewise.
+	* cp/pt.c: Likewise.
+	* cp/semantics.c: Likewise.
+	* cp/tree.c: Likewise.
+	* cp/vtable-class-hierarchy.c: Likewise.
+	* cp/decl2.c: Don't include gimple.h.
+	* cp/except.c: Likewise.
+	* cp/method.c: Include pointer-set.h instead of gimple.h.
+
 2013-11-12  Adam Butcher  <adam@jessamine.co.uk>
 
 	* pt.c (convert_generic_types_to_packs): New function to transform
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 64681ba44df824d442ba3411c36576bb4ad7d18b..b4cab542e2ed2565d3bd0f445b6339727e501b26 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -36,6 +36,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "splay-tree.h"
 #include "pointer-set.h"
 #include "hash-table.h"
+#include "gimplify.h"
 
 /* The number of nested classes being processed.  If we are not in the
    scope of any class, this is zero.  */
diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c
index 53b0ca8f928208f8414084616aea31554654355d..e8ccf1aa561ba1c18c5d1ea3cf22ccbba378126b 100644
--- a/gcc/cp/cp-gimplify.c
+++ b/gcc/cp/cp-gimplify.c
@@ -27,7 +27,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "cp-tree.h"
 #include "c-family/c-common.h"
 #include "tree-iterator.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "hashtab.h"
 #include "pointer-set.h"
 #include "flags.h"
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index a094ff3b5462630118106db771178b6566bbe14e..18456848492ce859bb353e64c81cca07fa1d5d55 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -45,7 +45,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "c-family/c-pragma.h"
 #include "dumpfile.h"
 #include "intl.h"
-#include "gimple.h"
 #include "pointer-set.h"
 #include "splay-tree.h"
 #include "langhooks.h"
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 5f997c3ed2924a04617a01af167ba068c4b226de..3d72c1340dcf2c62f05cd2ceb1983ac9aa61e8cc 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -33,6 +33,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "pointer-set.h"
 #include "c-family/c-objc.h"
 #include "ubsan.h"
+#include "gimplify.h"
 
 #include <new>                    // For placement-new.
 
diff --git a/gcc/cp/except.c b/gcc/cp/except.c
index daac0fde7e6b2e9bc51f8956a1282cc9cac89b2e..ac2128d13b0711752ff347ce1983d7d71832fcbf 100644
--- a/gcc/cp/except.c
+++ b/gcc/cp/except.c
@@ -31,7 +31,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-inline.h"
 #include "tree-iterator.h"
 #include "target.h"
-#include "gimple.h"
 
 static void push_eh_cleanup (tree);
 static tree prepare_eh_type (tree);
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index a4d8280dfd8a907cb2455aa697819703fb9d6ce9..1919603a7050058013ea565cdb44c433518dd1d1 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -28,6 +28,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "cp-tree.h"
 #include "flags.h"
 #include "target.h"
+#include "gimplify.h"
 
 static bool begin_init_stmts (tree *, tree *);
 static tree finish_init_stmts (bool, tree, tree);
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 353e99a6410ffc6408d2b916ebc61fac414ca382..272ef42217f2317a26b20a1f05ca0eed13e5816c 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -34,7 +34,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "common/common-target.h"
 #include "diagnostic.h"
 #include "cgraph.h"
-#include "gimple.h"
+#include "pointer-set.h"
 
 /* Various flags to control the mangling process.  */
 
diff --git a/gcc/cp/optimize.c b/gcc/cp/optimize.c
index c4ee8484bb95ab7197c0e6c69b59300e7e2e24c3..736dad9bec7289f02a19abf0aa0a62280d124010 100644
--- a/gcc/cp/optimize.c
+++ b/gcc/cp/optimize.c
@@ -34,7 +34,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "langhooks.h"
 #include "diagnostic-core.h"
 #include "dumpfile.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "tree-iterator.h"
 #include "cgraph.h"
 
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 57a9769aecc070b17a12f3e6b4b0d27935a33c66..96a7db58e2312e1f543cc1c7cb6f495b82be0869 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -42,6 +42,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "timevar.h"
 #include "tree-iterator.h"
 #include "type-utils.h"
+#include "gimplify.h"
 
 /* The type of functions taking a tree, and some additional data, and
    returning an int.  */
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 366756fd437593eae7e886b343e1456064dac8cb..202f1cf6854aedd0a36c7a633df4fcffa3b73f11 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -41,7 +41,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-iterator.h"
 #include "vec.h"
 #include "target.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "bitmap.h"
 #include "hash-table.h"
 #include "omp-low.h"
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 3ac034806200a06396759fb79b77a4a475a347b7..eb7bd876817549ce5d37f7250a1a7ebb75a13a2b 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -30,7 +30,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "convert.h"
 #include "cgraph.h"
 #include "splay-tree.h"
-#include "gimple.h" /* gimple_has_body_p */
+#include "gimplify.h"
 #include "hash-table.h"
 
 static tree bot_manip (tree *, int *, void *);
diff --git a/gcc/cp/vtable-class-hierarchy.c b/gcc/cp/vtable-class-hierarchy.c
index 78611a832641d8b508d36085ec427f1e99ffc591..39c75ce5c33ca929b26ba173350232a58f6f32fb 100644
--- a/gcc/cp/vtable-class-hierarchy.c
+++ b/gcc/cp/vtable-class-hierarchy.c
@@ -118,7 +118,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "cgraph.h"
 #include "tree-iterator.h"
 #include "vtable-verify.h"
-#include "gimple.h"
+#include "gimplify.h"
 
 static int num_calls_to_regset = 0;
 static int num_calls_to_regpair = 0;
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 5ef7bd2034dd553b597e7a7522c8fa41cfa14101..d661bd7076cd9bfae53bd9edd8060fe575b7afca 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -87,7 +87,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "hash-table.h"
 #include "cgraph.h"
 #include "input.h"
-#include "gimple.h"
 #include "ira.h"
 #include "lra.h"
 #include "dumpfile.h"
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 3e6f15887dbbce00aca9a7dc7776795f68e96110..77f9fb8e581e8f3680f0c1a1794d34aa13dcc77b 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -57,7 +57,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "hash-table.h"
 #include "langhooks.h"
 #include "md5.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "tree-dfa.h"
 
 /* Nonzero if we are folding constants inside an initializer; zero
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 8e2e10c8539bdd7fc88e9f9bc87664904b9c2698..4f75b03bfb058b42d44fdcf07499993e7b85fcb9 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,12 @@
+2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
+
+	* fortran/f95-lang.c: Don't include gimple.h.
+	* fortran/trans-array.c: Include gimple-expr.h instead of gimple.h.
+	* fortran/trans.c: Likewise.
+	* fortran/trans-decl.c: Likewise.
+	* fortran/trans-expr.c: Include gimplify.h.
+	* fortran/trans-openmp.c: Likewise.
+
 2013-11-07  Janus Weil  <janus@gcc.gnu.org>
 
 	PR fortran/58471
diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c
index a70d60d6882a6024886fdbc78fdd8f451c98a6c5..4da5e6913d27df4d7830e021aacb6f7eaab7e716 100644
--- a/gcc/fortran/f95-lang.c
+++ b/gcc/fortran/f95-lang.c
@@ -28,7 +28,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
-#include "gimple.h"
 #include "flags.h"
 #include "langhooks.h"
 #include "langhooks-def.h"
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index 5a3cf80f9f644da484d3b2783407f148e17c5fe4..c2bbd0e216dabc82df356f71cc136e5c9e37f64f 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -79,7 +79,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
-#include "gimple.h"		/* For create_tmp_var_name.  */
+#include "gimple-expr.h"
 #include "diagnostic-core.h"	/* For internal_error/fatal_error.  */
 #include "flags.h"
 #include "gfortran.h"
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index c2c736e1c66ed0e1a3212568c997b4f125e54f13..1df3bb44e7a28c393a61c250e42e94b466fa5f77 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -26,7 +26,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm.h"
 #include "tree.h"
 #include "tree-dump.h"
-#include "gimple.h"	/* For create_tmp_var_raw.  */
+#include "gimple-expr.h"	/* For create_tmp_var_raw.  */
 #include "ggc.h"
 #include "diagnostic-core.h"	/* For internal_error.  */
 #include "toplev.h"	/* For announce_function.  */
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index 9586ca388e20f21190edbf98cf0ca249aee54d26..8adada6beadc8ce5699dde1844352b7c5a35e6a5 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -38,6 +38,7 @@ along with GCC; see the file COPYING3.  If not see
 /* Only for gfc_trans_assign and gfc_trans_pointer_assign.  */
 #include "trans-stmt.h"
 #include "dependency.h"
+#include "gimplify.h"
 
 
 /* Convert a scalar to an array descriptor. To be used for assumed-rank
diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c
index bf282498eab6dae4ce552a6a6981dfedc995804f..9d6d4d4df456caa2de4b7271a30532554b785c90 100644
--- a/gcc/fortran/trans-openmp.c
+++ b/gcc/fortran/trans-openmp.c
@@ -23,7 +23,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
-#include "gimple.h"	/* For create_tmp_var_raw.  */
+#include "gimplify.h"	/* For create_tmp_var_raw.  */
 #include "diagnostic-core.h"	/* For internal_error.  */
 #include "gfortran.h"
 #include "trans.h"
diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c
index b7863b2d51119ee5bd4914444875a3d9daa7459c..ef20a20f0182cd227d233fdd1fa0dc49d2143d9b 100644
--- a/gcc/fortran/trans.c
+++ b/gcc/fortran/trans.c
@@ -22,7 +22,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
-#include "gimple.h"	/* For create_tmp_var_raw.  */
+#include "gimple-expr.h"	/* For create_tmp_var_raw.  */
 #include "tree-iterator.h"
 #include "diagnostic-core.h"  /* For internal_error.  */
 #include "flags.h"
diff --git a/gcc/function.c b/gcc/function.c
index a36f152b79a9ef944ecc5311a54d5c24b3d3cbba..620554d55f3306d8bc60649ac9cc2202104f38a2 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -55,7 +55,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "langhooks.h"
 #include "target.h"
 #include "common/common-target.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "tree-pass.h"
 #include "predict.h"
 #include "df.h"
diff --git a/gcc/gimple-expr.c b/gcc/gimple-expr.c
index c74d9295d1dcebafcffab89bf1879f7988674028..c82abb7adab818536394c264d8cc8889858a3dc8 100644
--- a/gcc/gimple-expr.c
+++ b/gcc/gimple-expr.c
@@ -24,8 +24,9 @@ along with GCC; see the file COPYING3.  If not see
 #include "coretypes.h"
 #include "tm.h"
 #include "tree.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "demangle.h"
+#include "gimple-ssa.h"
 
 /* ----- Type related -----  */
 
@@ -406,6 +407,116 @@ gimple_can_coalesce_p (tree name1, tree name2)
   return false;
 }
 
+/* Strip off a legitimate source ending from the input string NAME of
+   length LEN.  Rather than having to know the names used by all of
+   our front ends, we strip off an ending of a period followed by
+   up to five characters.  (Java uses ".class".)  */
+
+static inline void
+remove_suffix (char *name, int len)
+{
+  int i;
+
+  for (i = 2;  i < 8 && len > i;  i++)
+    {
+      if (name[len - i] == '.')
+	{
+	  name[len - i] = '\0';
+	  break;
+	}
+    }
+}
+
+/* Create a new temporary name with PREFIX.  Return an identifier.  */
+
+static GTY(()) unsigned int tmp_var_id_num;
+
+tree
+create_tmp_var_name (const char *prefix)
+{
+  char *tmp_name;
+
+  if (prefix)
+    {
+      char *preftmp = ASTRDUP (prefix);
+
+      remove_suffix (preftmp, strlen (preftmp));
+      clean_symbol_name (preftmp);
+
+      prefix = preftmp;
+    }
+
+  ASM_FORMAT_PRIVATE_NAME (tmp_name, prefix ? prefix : "T", tmp_var_id_num++);
+  return get_identifier (tmp_name);
+}
+
+/* Create a new temporary variable declaration of type TYPE.
+   Do NOT push it into the current binding.  */
+
+tree
+create_tmp_var_raw (tree type, const char *prefix)
+{
+  tree tmp_var;
+
+  tmp_var = build_decl (input_location,
+			VAR_DECL, prefix ? create_tmp_var_name (prefix) : NULL,
+			type);
+
+  /* The variable was declared by the compiler.  */
+  DECL_ARTIFICIAL (tmp_var) = 1;
+  /* And we don't want debug info for it.  */
+  DECL_IGNORED_P (tmp_var) = 1;
+
+  /* Make the variable writable.  */
+  TREE_READONLY (tmp_var) = 0;
+
+  DECL_EXTERNAL (tmp_var) = 0;
+  TREE_STATIC (tmp_var) = 0;
+  TREE_USED (tmp_var) = 1;
+
+  return tmp_var;
+}
+
+/* Create a new temporary variable declaration of type TYPE.  DO push the
+   variable into the current binding.  Further, assume that this is called
+   only from gimplification or optimization, at which point the creation of
+   certain types are bugs.  */
+
+tree
+create_tmp_var (tree type, const char *prefix)
+{
+  tree tmp_var;
+
+  /* We don't allow types that are addressable (meaning we can't make copies),
+     or incomplete.  We also used to reject every variable size objects here,
+     but now support those for which a constant upper bound can be obtained.
+     The processing for variable sizes is performed in gimple_add_tmp_var,
+     point at which it really matters and possibly reached via paths not going
+     through this function, e.g. after direct calls to create_tmp_var_raw.  */
+  gcc_assert (!TREE_ADDRESSABLE (type) && COMPLETE_TYPE_P (type));
+
+  tmp_var = create_tmp_var_raw (type, prefix);
+  gimple_add_tmp_var (tmp_var);
+  return tmp_var;
+}
+
+/* Create a new temporary variable declaration of type TYPE by calling
+   create_tmp_var and if TYPE is a vector or a complex number, mark the new
+   temporary as gimple register.  */
+
+tree
+create_tmp_reg (tree type, const char *prefix)
+{
+  tree tmp;
+
+  tmp = create_tmp_var (type, prefix);
+  if (TREE_CODE (type) == COMPLEX_TYPE
+      || TREE_CODE (type) == VECTOR_TYPE)
+    DECL_GIMPLE_REG_P (tmp) = 1;
+
+  return tmp;
+}
+
 
 /* ----- Expression related -----  */
 
@@ -719,3 +830,45 @@ is_gimple_mem_ref_addr (tree t)
 	      && (CONSTANT_CLASS_P (TREE_OPERAND (t, 0))
 		  || decl_address_invariant_p (TREE_OPERAND (t, 0)))));
 }
+
+/* Mark X addressable.  Unlike the langhook we expect X to be in gimple
+   form and we don't do any syntax checking.  */
+
+void
+mark_addressable (tree x)
+{
+  while (handled_component_p (x))
+    x = TREE_OPERAND (x, 0);
+  if (TREE_CODE (x) == MEM_REF
+      && TREE_CODE (TREE_OPERAND (x, 0)) == ADDR_EXPR)
+    x = TREE_OPERAND (TREE_OPERAND (x, 0), 0);
+  if (TREE_CODE (x) != VAR_DECL
+      && TREE_CODE (x) != PARM_DECL
+      && TREE_CODE (x) != RESULT_DECL)
+    return;
+  TREE_ADDRESSABLE (x) = 1;
+
+  /* Also mark the artificial SSA_NAME that points to the partition of X.  */
+  if (TREE_CODE (x) == VAR_DECL
+      && !DECL_EXTERNAL (x)
+      && !TREE_STATIC (x)
+      && cfun->gimple_df != NULL
+      && cfun->gimple_df->decls_to_pointers != NULL)
+    {
+      void *namep
+	= pointer_map_contains (cfun->gimple_df->decls_to_pointers, x); 
+      if (namep)
+	TREE_ADDRESSABLE (*(tree *)namep) = 1;
+    }
+}
+
+/* Returns true iff T is a valid RHS for an assignment to a renamed
+   user -- or front-end generated artificial -- variable.  */
+
+bool
+is_gimple_reg_rhs (tree t)
+{
+  return get_gimple_rhs_class (TREE_CODE (t)) != GIMPLE_INVALID_RHS;
+}
+
+#include "gt-gimple-expr.h"
diff --git a/gcc/gimple-expr.h b/gcc/gimple-expr.h
index aad558cebb73335776db5c87884900a0825f233e..e74be2249df578c3675919e7d99fd62fc4486360 100644
--- a/gcc/gimple-expr.h
+++ b/gcc/gimple-expr.h
@@ -22,12 +22,18 @@ along with GCC; see the file COPYING3.  If not see
 
 extern bool useless_type_conversion_p (tree, tree);
 
+
 extern void gimple_set_body (tree, gimple_seq);
 extern gimple_seq gimple_body (tree);
 extern bool gimple_has_body_p (tree);
 extern const char *gimple_decl_printable_name (tree, int);
 extern tree copy_var_decl (tree, tree, tree);
 extern bool gimple_can_coalesce_p (tree, tree);
+extern tree create_tmp_var_name (const char *);
+extern tree create_tmp_var_raw (tree, const char *);
+extern tree create_tmp_var (tree, const char *);
+extern tree create_tmp_reg (tree, const char *);
+
 
 extern void extract_ops_from_tree_1 (tree, enum tree_code *, tree *, tree *,
 				     tree *);
@@ -46,6 +52,8 @@ extern bool is_gimple_asm_val (tree);
 extern bool is_gimple_min_lval (tree);
 extern bool is_gimple_call_addr (tree);
 extern bool is_gimple_mem_ref_addr (tree);
+extern void mark_addressable (tree);
+extern bool is_gimple_reg_rhs (tree);
 
 /* Return true if a conversion from either type of TYPE1 and TYPE2
    to the other is not required.  Otherwise return false.  */
diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c
index 89d1ac993f6de78e07da3fa3675d0d592f7059cf..122d1932b94ba2b2a0811c80963bc233d0bc681c 100644
--- a/gcc/gimple-fold.c
+++ b/gcc/gimple-fold.c
@@ -27,7 +27,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "function.h"
 #include "dumpfile.h"
 #include "bitmap.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-ssanames.h"
 #include "tree-into-ssa.h"
diff --git a/gcc/gimple-ssa-strength-reduction.c b/gcc/gimple-ssa-strength-reduction.c
index 88afc91200fa93f9064f04039685bf55c6065e4f..41f24cc03e59901a52208d66453f90d0cc9ff1c9 100644
--- a/gcc/gimple-ssa-strength-reduction.c
+++ b/gcc/gimple-ssa-strength-reduction.c
@@ -37,7 +37,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "basic-block.h"
 #include "tree-pass.h"
 #include "cfgloop.h"
diff --git a/gcc/gimple.c b/gcc/gimple.c
index 55dd09106bba595155ca22f6caa03bbf442211e7..cba3bcedf54de8bbb923298d7c6afe1c7779d146 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -29,6 +29,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "hard-reg-set.h"
 #include "basic-block.h"
 #include "gimple.h"
+#include "gimplify.h"
 #include "diagnostic.h"
 #include "value-prof.h"
 #include "flags.h"
@@ -446,24 +447,6 @@ gimple_build_assign_with_ops (enum tree_code subcode, tree lhs, tree op1,
 }
 
 
-/* Build a new GIMPLE_ASSIGN tuple and append it to the end of *SEQ_P.
-
-   DST/SRC are the destination and source respectively.  You can pass
-   ungimplified trees in DST or SRC, in which case they will be
-   converted to a gimple operand if necessary.
-
-   This function returns the newly created GIMPLE_ASSIGN tuple.  */
-
-gimple
-gimplify_assign (tree dst, tree src, gimple_seq *seq_p)
-{
-  tree t = build2 (MODIFY_EXPR, TREE_TYPE (dst), dst, src);
-  gimplify_and_add (t, seq_p);
-  ggc_free (t);
-  return gimple_seq_last_stmt (*seq_p);
-}
-
-
 /* Build a GIMPLE_COND statement.
 
    PRED is the condition used to compare LHS and the RHS.
@@ -1172,6 +1155,23 @@ gimple_seq_add_stmt (gimple_seq *seq_p, gimple gs)
   gsi_insert_after (&si, gs, GSI_NEW_STMT);
 }
 
+/* Link gimple statement GS to the end of the sequence *SEQ_P.  If
+   *SEQ_P is NULL, a new sequence is allocated.  This function is
+   similar to gimple_seq_add_stmt, but does not scan the operands.
+   During gimplification, we need to manipulate statement sequences
+   before the def/use vectors have been constructed.  */
+
+void
+gimple_seq_add_stmt_without_update (gimple_seq *seq_p, gimple gs)
+{
+  gimple_stmt_iterator si;
+
+  if (gs == NULL)
+    return;
+
+  si = gsi_last (*seq_p);
+  gsi_insert_after_without_update (&si, gs, GSI_NEW_STMT);
+}
 
 /* Append sequence SRC to the end of sequence *DST_P.  If *DST_P is
    NULL, a new sequence is allocated.  */
@@ -1187,6 +1187,64 @@ gimple_seq_add_seq (gimple_seq *dst_p, gimple_seq src)
   gsi_insert_seq_after (&si, src, GSI_NEW_STMT);
 }
 
+/* Determine whether to assign a location to the statement GS.  */
+
+static bool
+should_carry_location_p (gimple gs)
+{
+  /* Don't emit a line note for a label.  We particularly don't want to
+     emit one for the break label, since it doesn't actually correspond
+     to the beginning of the loop/switch.  */
+  if (gimple_code (gs) == GIMPLE_LABEL)
+    return false;
+
+  return true;
+}
+
+/* Set the location for gimple statement GS to LOCATION.  */
+
+static void
+annotate_one_with_location (gimple gs, location_t location)
+{
+  if (!gimple_has_location (gs)
+      && !gimple_do_not_emit_location_p (gs)
+      && should_carry_location_p (gs))
+    gimple_set_location (gs, location);
+}
+
+/* Set LOCATION for all the statements after iterator GSI in sequence
+   SEQ.  If GSI is pointing to the end of the sequence, start with the
+   first statement in SEQ.  */
+
+void
+annotate_all_with_location_after (gimple_seq seq, gimple_stmt_iterator gsi,
+				  location_t location)
+{
+  if (gsi_end_p (gsi))
+    gsi = gsi_start (seq);
+  else
+    gsi_next (&gsi);
+
+  for (; !gsi_end_p (gsi); gsi_next (&gsi))
+    annotate_one_with_location (gsi_stmt (gsi), location);
+}
+
+/* Set the location for all the statements in a sequence STMT_P to LOCATION.  */
+
+void
+annotate_all_with_location (gimple_seq stmt_p, location_t location)
+{
+  gimple_stmt_iterator i;
+
+  if (gimple_seq_empty_p (stmt_p))
+    return;
+
+  for (i = gsi_start (stmt_p); !gsi_end_p (i); gsi_next (&i))
+    {
+      gimple gs = gsi_stmt (i);
+      annotate_one_with_location (gs, location);
+    }
+}
 
 /* Helper function of empty_body_p.  Return true if STMT is an empty
    statement.  */
@@ -3428,3 +3486,205 @@ infer_nonnull_range (gimple stmt, tree op)
 
   return false;
 }
+
+/* Compare two case labels.  Because the front end should already have
+   made sure that case ranges do not overlap, it is enough to only compare
+   the CASE_LOW values of each case label.  */
+
+static int
+compare_case_labels (const void *p1, const void *p2)
+{
+  const_tree const case1 = *(const_tree const*)p1;
+  const_tree const case2 = *(const_tree const*)p2;
+
+  /* The 'default' case label always goes first.  */
+  if (!CASE_LOW (case1))
+    return -1;
+  else if (!CASE_LOW (case2))
+    return 1;
+  else
+    return tree_int_cst_compare (CASE_LOW (case1), CASE_LOW (case2));
+}
+
+/* Sort the case labels in LABEL_VEC in place in ascending order.  */
+
+void
+sort_case_labels (vec<tree> label_vec)
+{
+  label_vec.qsort (compare_case_labels);
+}
+
+/* Prepare a vector of case labels to be used in a GIMPLE_SWITCH statement.
+
+   LABELS is a vector that contains all case labels to look at.
+
+   INDEX_TYPE is the type of the switch index expression.  Case labels
+   in LABELS are discarded if their values are not in the value range
+   covered by INDEX_TYPE.  The remaining case label values are folded
+   to INDEX_TYPE.
+
+   If a default case exists in LABELS, it is removed from LABELS and
+   returned in DEFAULT_CASEP.  If no default case exists, but the
+   case labels already cover the whole range of INDEX_TYPE, a default
+   case is returned pointing to one of the existing case labels.
+   Otherwise DEFAULT_CASEP is set to NULL_TREE.
+
+   DEFAULT_CASEP may be NULL, in which case the above comment doesn't
+   apply and no action is taken regardless of whether a default case is
+   found or not.  */
+
+void
+preprocess_case_label_vec_for_gimple (vec<tree> labels,
+				      tree index_type,
+				      tree *default_casep)
+{
+  tree min_value, max_value;
+  tree default_case = NULL_TREE;
+  size_t i, len;
+
+  i = 0;
+  min_value = TYPE_MIN_VALUE (index_type);
+  max_value = TYPE_MAX_VALUE (index_type);
+  while (i < labels.length ())
+    {
+      tree elt = labels[i];
+      tree low = CASE_LOW (elt);
+      tree high = CASE_HIGH (elt);
+      bool remove_element = FALSE;
+
+      if (low)
+	{
+	  gcc_checking_assert (TREE_CODE (low) == INTEGER_CST);
+	  gcc_checking_assert (!high || TREE_CODE (high) == INTEGER_CST);
+
+	  /* This is a non-default case label, i.e. it has a value.
+
+	     See if the case label is reachable within the range of
+	     the index type.  Remove out-of-range case values.  Turn
+	     case ranges into a canonical form (high > low strictly)
+	     and convert the case label values to the index type.
+
+	     NB: The type of gimple_switch_index() may be the promoted
+	     type, but the case labels retain the original type.  */
+
+	  if (high)
+	    {
+	      /* This is a case range.  Discard empty ranges.
+		 If the bounds or the range are equal, turn this
+		 into a simple (one-value) case.  */
+	      int cmp = tree_int_cst_compare (high, low);
+	      if (cmp < 0)
+		remove_element = TRUE;
+	      else if (cmp == 0)
+		high = NULL_TREE;
+	    }
+
+	  if (! high)
+	    {
+	      /* If the simple case value is unreachable, ignore it.  */
+	      if ((TREE_CODE (min_value) == INTEGER_CST
+		   && tree_int_cst_compare (low, min_value) < 0)
+		  || (TREE_CODE (max_value) == INTEGER_CST
+		      && tree_int_cst_compare (low, max_value) > 0))
+		remove_element = TRUE;
+	      else
+		low = fold_convert (index_type, low);
+	    }
+	  else
+	    {
+	      /* If the entire case range is unreachable, ignore it.  */
+	      if ((TREE_CODE (min_value) == INTEGER_CST
+		   && tree_int_cst_compare (high, min_value) < 0)
+		  || (TREE_CODE (max_value) == INTEGER_CST
+		      && tree_int_cst_compare (low, max_value) > 0))
+		remove_element = TRUE;
+	      else
+		{
+		  /* If the lower bound is less than the index type's
+		     minimum value, truncate the range bounds.  */
+		  if (TREE_CODE (min_value) == INTEGER_CST
+		      && tree_int_cst_compare (low, min_value) < 0)
+		    low = min_value;
+		  low = fold_convert (index_type, low);
+
+		  /* If the upper bound is greater than the index type's
+		     maximum value, truncate the range bounds.  */
+		  if (TREE_CODE (max_value) == INTEGER_CST
+		      && tree_int_cst_compare (high, max_value) > 0)
+		    high = max_value;
+		  high = fold_convert (index_type, high);
+
+		  /* We may have folded a case range to a one-value case.  */
+		  if (tree_int_cst_equal (low, high))
+		    high = NULL_TREE;
+		}
+	    }
+
+	  CASE_LOW (elt) = low;
+	  CASE_HIGH (elt) = high;
+	}
+      else
+	{
+	  gcc_assert (!default_case);
+	  default_case = elt;
+	  /* The default case must be passed separately to the
+	     gimple_build_switch routine.  But if DEFAULT_CASEP
+	     is NULL, we do not remove the default case (it would
+	     be completely lost).  */
+	  if (default_casep)
+	    remove_element = TRUE;
+	}
+
+      if (remove_element)
+	labels.ordered_remove (i);
+      else
+	i++;
+    }
+  len = i;
+
+  if (!labels.is_empty ())
+    sort_case_labels (labels);
+
+  if (default_casep && !default_case)
+    {
+      /* If the switch has no default label, add one, so that we jump
+	 around the switch body.  If the labels already cover the whole
+	 range of the switch index_type, add the default label pointing
+	 to one of the existing labels.  */
+      if (len
+	  && TYPE_MIN_VALUE (index_type)
+	  && TYPE_MAX_VALUE (index_type)
+	  && tree_int_cst_equal (CASE_LOW (labels[0]),
+				 TYPE_MIN_VALUE (index_type)))
+	{
+	  tree low, high = CASE_HIGH (labels[len - 1]);
+	  if (!high)
+	    high = CASE_LOW (labels[len - 1]);
+	  if (tree_int_cst_equal (high, TYPE_MAX_VALUE (index_type)))
+	    {
+	      for (i = 1; i < len; i++)
+		{
+		  high = CASE_LOW (labels[i]);
+		  low = CASE_HIGH (labels[i - 1]);
+		  if (!low)
+		    low = CASE_LOW (labels[i - 1]);
+		  if ((TREE_INT_CST_LOW (low) + 1
+		       != TREE_INT_CST_LOW (high))
+		      || (TREE_INT_CST_HIGH (low)
+			  + (TREE_INT_CST_LOW (high) == 0)
+			  != TREE_INT_CST_HIGH (high)))
+		    break;
+		}
+	      if (i == len)
+		{
+		  tree label = CASE_LABEL (labels[0]);
+		  default_case = build_case_label (NULL_TREE, NULL_TREE,
+						   label);
+		}
+	    }
+	}
+    }
+
+  if (default_casep)
+    *default_casep = default_case;
+}
diff --git a/gcc/gimple.h b/gcc/gimple.h
index 33e790c18da5881d3bf431117f934465d38ebd06..4f34a9eea92264cc32c733b62c13d7e9aedbbbd7 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -766,7 +766,6 @@ 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 gimplify_assign (tree, tree, gimple_seq *);
 gimple gimple_build_cond (enum tree_code, tree, tree, tree, tree);
 gimple gimple_build_label (tree label);
 gimple gimple_build_goto (tree dest);
@@ -806,8 +805,6 @@ gimple gimple_build_omp_atomic_store (tree);
 gimple 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);
-void sort_case_labels (vec<tree> );
-void preprocess_case_label_vec_for_gimple (vec<tree> , tree, tree *);
 gimple_seq gimple_seq_alloc (void);
 void gimple_seq_free (gimple_seq);
 void gimple_seq_add_seq (gimple_seq *, gimple_seq);
@@ -834,8 +831,10 @@ bool gimple_has_side_effects (const_gimple);
 bool gimple_could_trap_p (gimple);
 bool gimple_could_trap_p_1 (gimple, bool, bool);
 bool gimple_assign_rhs_could_trap_p (gimple);
-void gimple_regimplify_operands (gimple, gimple_stmt_iterator *);
 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);
 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);
@@ -859,48 +858,8 @@ 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);
-
-/* In gimplify.c  */
-extern tree create_tmp_var_raw (tree, const char *);
-extern tree create_tmp_var_name (const char *);
-extern tree create_tmp_var (tree, const char *);
-extern tree create_tmp_reg (tree, const char *);
-extern tree get_initialized_tmp_var (tree, gimple_seq *, gimple_seq *);
-extern tree get_formal_tmp_var (tree, gimple_seq *);
-extern void declare_vars (tree, gimple, bool);
-extern void annotate_all_with_location (gimple_seq, location_t);
 extern unsigned gimple_call_get_nobnd_arg_index (const_gimple, unsigned);
 
-/* Validation of GIMPLE expressions.  Note that these predicates only check
-   the basic form of the expression, they don't recurse to make sure that
-   underlying nodes are also of the right form.  */
-typedef bool (*gimple_predicate)(tree);
-
-
-/* FIXME we should deduce this from the predicate.  */
-enum fallback {
-  fb_none = 0,		/* Do not generate a temporary.  */
-
-  fb_rvalue = 1,	/* Generate an rvalue to hold the result of a
-			   gimplified expression.  */
-
-  fb_lvalue = 2,	/* Generate an lvalue to hold the result of a
-			   gimplified expression.  */
-
-  fb_mayfail = 4,	/* Gimplification may fail.  Error issued
-			   afterwards.  */
-  fb_either= fb_rvalue | fb_lvalue
-};
-
-typedef int fallback_t;
-
-enum gimplify_status {
-  GS_ERROR	= -2,	/* Something Bad Seen.  */
-  GS_UNHANDLED	= -1,	/* A langhook result for "I dunno".  */
-  GS_OK		= 0,	/* We did something, maybe more to do.  */
-  GS_ALL_DONE	= 1	/* The expression is fully gimplified.  */
-};
-
 /* Formal (expression) temporary table handling: multiple occurrences of
    the same scalar expression are evaluated into the same temporary.  */
 
@@ -1010,31 +969,8 @@ inc_gimple_stmt_max_uid (struct function *fn)
   return fn->last_stmt_uid++;
 }
 
-extern enum gimplify_status gimplify_expr (tree *, gimple_seq *, gimple_seq *,
-					   bool (*) (tree), fallback_t);
-extern void gimplify_type_sizes (tree, gimple_seq *);
-extern void gimplify_one_sizepos (tree *, gimple_seq *);
-enum gimplify_status gimplify_self_mod_expr (tree *, gimple_seq *, gimple_seq *,
-					     bool, tree);
-extern bool gimplify_stmt (tree *, gimple_seq *);
-extern gimple gimplify_body (tree, bool);
-extern void push_gimplify_context (struct gimplify_ctx *);
-extern void pop_gimplify_context (gimple);
-extern void gimplify_and_add (tree, gimple_seq *);
-
 /* Miscellaneous helpers.  */
-extern void gimple_add_tmp_var (tree);
-extern gimple gimple_current_bind_expr (void);
-extern vec<gimple> gimple_bind_expr_stack (void);
-extern tree voidify_wrapper_expr (tree, tree);
-extern tree build_and_jump (tree *);
-extern tree force_labels_r (tree *, int *, void *);
-extern enum gimplify_status gimplify_va_arg_expr (tree *, gimple_seq *,
-						  gimple_seq *);
 struct gimplify_omp_ctx;
-extern void omp_firstprivatize_variable (struct gimplify_omp_ctx *, tree);
-extern tree gimple_boolify (tree);
-extern gimple_predicate rhs_predicate_for (tree);
 extern tree canonicalize_cond_expr_cond (tree);
 extern void dump_decl_set (FILE *, bitmap);
 extern bool nonfreeing_call_p (gimple);
@@ -1048,9 +984,6 @@ extern void compute_transaction_bits (void);
 extern void lower_nested_functions (tree);
 extern void insert_field_into_struct (tree, tree);
 
-/* In gimplify.c.  */
-extern void gimplify_function_tree (tree);
-
 /* In cfgexpand.c.  */
 extern tree gimple_assign_rhs_to_tree (gimple);
 
@@ -1121,14 +1054,8 @@ gimple_seq_empty_p (gimple_seq s)
   return s == NULL;
 }
 
-void gimple_seq_add_stmt (gimple_seq *, gimple);
-
-/* Link gimple statement GS to the end of the sequence *SEQ_P.  If
-   *SEQ_P is NULL, a new sequence is allocated.  This function is
-   similar to gimple_seq_add_stmt, but does not scan the operands.
-   During gimplification, we need to manipulate statement sequences
-   before the def/use vectors have been constructed.  */
-void gimple_seq_add_stmt_without_update (gimple_seq *, gimple);
+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.  */
 
@@ -5563,15 +5490,6 @@ void gsi_commit_one_edge_insert (edge, basic_block *);
 void gsi_commit_edge_inserts (void);
 gimple gimple_call_copy_skip_args (gimple, bitmap);
 
-/* In gimplify.c.  */
-tree force_gimple_operand_1 (tree, gimple_seq *, gimple_predicate, tree);
-tree force_gimple_operand (tree, gimple_seq *, bool, tree);
-tree force_gimple_operand_gsi_1 (gimple_stmt_iterator *, tree,
-				 gimple_predicate, tree,
-				 bool, enum gsi_iterator_update);
-tree force_gimple_operand_gsi (gimple_stmt_iterator *, tree, bool, tree,
-			       bool, enum gsi_iterator_update);
-
 /* 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
@@ -5684,6 +5602,27 @@ gimple_seq_set_location (gimple_seq seq, location_t loc)
     gimple_set_location (gsi_stmt (i), loc);
 }
 
+/* Return true if a location should not be emitted for this statement
+   by annotate_all_with_location.  */
+
+static inline bool
+gimple_do_not_emit_location_p (gimple g)
+{
+  return gimple_plf (g, GF_PLF_1);
+}
+
+/* Mark statement G so a location will not be emitted by
+   annotate_one_with_location.  */
+
+static inline void
+gimple_set_do_not_emit_location (gimple g)
+{
+  /* The PLF flags are initialized to 0 when a new tuple is created,
+     so no need to initialize it anywhere.  */
+  gimple_set_plf (g, GF_PLF_1, true);
+}
+
+
 /* Macros for showing usage statistics.  */
 #define SCALE(x) ((unsigned long) ((x) < 1024*10	\
 		  ? (x)					\
@@ -5695,4 +5634,7 @@ gimple_seq_set_location (gimple_seq seq, location_t loc)
 
 #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 */
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 914766ad3b00f11bcd595cff31d49fd1a729fded..356fc2b91a8587e983d59f67788d0d6edb2c5bf3 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -25,7 +25,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "coretypes.h"
 #include "tm.h"
 #include "tree.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "tree-iterator.h"
 #include "tree-inline.h"
 #include "tree-pretty-print.h"
@@ -108,55 +108,6 @@ static struct gimplify_omp_ctx *gimplify_omp_ctxp;
 /* Forward declaration.  */
 static enum gimplify_status gimplify_compound_expr (tree *, gimple_seq *, bool);
 
-/* Mark X addressable.  Unlike the langhook we expect X to be in gimple
-   form and we don't do any syntax checking.  */
-
-void
-mark_addressable (tree x)
-{
-  while (handled_component_p (x))
-    x = TREE_OPERAND (x, 0);
-  if (TREE_CODE (x) == MEM_REF
-      && TREE_CODE (TREE_OPERAND (x, 0)) == ADDR_EXPR)
-    x = TREE_OPERAND (TREE_OPERAND (x, 0), 0);
-  if (TREE_CODE (x) != VAR_DECL
-      && TREE_CODE (x) != PARM_DECL
-      && TREE_CODE (x) != RESULT_DECL)
-    return;
-  TREE_ADDRESSABLE (x) = 1;
-
-  /* Also mark the artificial SSA_NAME that points to the partition of X.  */
-  if (TREE_CODE (x) == VAR_DECL
-      && !DECL_EXTERNAL (x)
-      && !TREE_STATIC (x)
-      && cfun->gimple_df != NULL
-      && cfun->gimple_df->decls_to_pointers != NULL)
-    {
-      void *namep
-	= pointer_map_contains (cfun->gimple_df->decls_to_pointers, x); 
-      if (namep)
-	TREE_ADDRESSABLE (*(tree *)namep) = 1;
-    }
-}
-
-/* Link gimple statement GS to the end of the sequence *SEQ_P.  If
-   *SEQ_P is NULL, a new sequence is allocated.  This function is
-   similar to gimple_seq_add_stmt, but does not scan the operands.
-   During gimplification, we need to manipulate statement sequences
-   before the def/use vectors have been constructed.  */
-
-void
-gimple_seq_add_stmt_without_update (gimple_seq *seq_p, gimple gs)
-{
-  gimple_stmt_iterator si;
-
-  if (gs == NULL)
-    return;
-
-  si = gsi_last (*seq_p);
-  gsi_insert_after_without_update (&si, gs, GSI_NEW_STMT);
-}
-
 /* Shorter alias name for the above function for use in gimplify.c
    only.  */
 
@@ -365,125 +316,6 @@ gimplify_and_return_first (tree t, gimple_seq *seq_p)
     return gimple_seq_first_stmt (*seq_p);
 }
 
-/* Strip off a legitimate source ending from the input string NAME of
-   length LEN.  Rather than having to know the names used by all of
-   our front ends, we strip off an ending of a period followed by
-   up to five characters.  (Java uses ".class".)  */
-
-static inline void
-remove_suffix (char *name, int len)
-{
-  int i;
-
-  for (i = 2;  i < 8 && len > i;  i++)
-    {
-      if (name[len - i] == '.')
-	{
-	  name[len - i] = '\0';
-	  break;
-	}
-    }
-}
-
-/* Create a new temporary name with PREFIX.  Return an identifier.  */
-
-static GTY(()) unsigned int tmp_var_id_num;
-
-tree
-create_tmp_var_name (const char *prefix)
-{
-  char *tmp_name;
-
-  if (prefix)
-    {
-      char *preftmp = ASTRDUP (prefix);
-
-      remove_suffix (preftmp, strlen (preftmp));
-      clean_symbol_name (preftmp);
-
-      prefix = preftmp;
-    }
-
-  ASM_FORMAT_PRIVATE_NAME (tmp_name, prefix ? prefix : "T", tmp_var_id_num++);
-  return get_identifier (tmp_name);
-}
-
-/* Create a new temporary variable declaration of type TYPE.
-   Do NOT push it into the current binding.  */
-
-tree
-create_tmp_var_raw (tree type, const char *prefix)
-{
-  tree tmp_var;
-
-  tmp_var = build_decl (input_location,
-			VAR_DECL, prefix ? create_tmp_var_name (prefix) : NULL,
-			type);
-
-  /* The variable was declared by the compiler.  */
-  DECL_ARTIFICIAL (tmp_var) = 1;
-  /* And we don't want debug info for it.  */
-  DECL_IGNORED_P (tmp_var) = 1;
-
-  /* Make the variable writable.  */
-  TREE_READONLY (tmp_var) = 0;
-
-  DECL_EXTERNAL (tmp_var) = 0;
-  TREE_STATIC (tmp_var) = 0;
-  TREE_USED (tmp_var) = 1;
-
-  return tmp_var;
-}
-
-/* Create a new temporary variable declaration of type TYPE.  DO push the
-   variable into the current binding.  Further, assume that this is called
-   only from gimplification or optimization, at which point the creation of
-   certain types are bugs.  */
-
-tree
-create_tmp_var (tree type, const char *prefix)
-{
-  tree tmp_var;
-
-  /* We don't allow types that are addressable (meaning we can't make copies),
-     or incomplete.  We also used to reject every variable size objects here,
-     but now support those for which a constant upper bound can be obtained.
-     The processing for variable sizes is performed in gimple_add_tmp_var,
-     point at which it really matters and possibly reached via paths not going
-     through this function, e.g. after direct calls to create_tmp_var_raw.  */
-  gcc_assert (!TREE_ADDRESSABLE (type) && COMPLETE_TYPE_P (type));
-
-  tmp_var = create_tmp_var_raw (type, prefix);
-  gimple_add_tmp_var (tmp_var);
-  return tmp_var;
-}
-
-/* Create a new temporary variable declaration of type TYPE by calling
-   create_tmp_var and if TYPE is a vector or a complex number, mark the new
-   temporary as gimple register.  */
-
-tree
-create_tmp_reg (tree type, const char *prefix)
-{
-  tree tmp;
-
-  tmp = create_tmp_var (type, prefix);
-  if (TREE_CODE (type) == COMPLEX_TYPE
-      || TREE_CODE (type) == VECTOR_TYPE)
-    DECL_GIMPLE_REG_P (tmp) = 1;
-
-  return tmp;
-}
-
-/* Returns true iff T is a valid RHS for an assignment to a renamed
-   user -- or front-end generated artificial -- variable.  */
-
-static bool
-is_gimple_reg_rhs (tree t)
-{
-  return get_gimple_rhs_class (TREE_CODE (t)) != GIMPLE_INVALID_RHS;
-}
-
 /* Returns true iff T is a valid RHS for an assignment to an un-renamed
    LHS, or for a call argument.  */
 
@@ -750,84 +582,7 @@ gimple_add_tmp_var (tree tmp)
     }
 }
 
-/* Determine whether to assign a location to the statement GS.  */
-
-static bool
-should_carry_location_p (gimple gs)
-{
-  /* Don't emit a line note for a label.  We particularly don't want to
-     emit one for the break label, since it doesn't actually correspond
-     to the beginning of the loop/switch.  */
-  if (gimple_code (gs) == GIMPLE_LABEL)
-    return false;
-
-  return true;
-}
-
-/* Return true if a location should not be emitted for this statement
-   by annotate_one_with_location.  */
-
-static inline bool
-gimple_do_not_emit_location_p (gimple g)
-{
-  return gimple_plf (g, GF_PLF_1);
-}
-
-/* Mark statement G so a location will not be emitted by
-   annotate_one_with_location.  */
-
-static inline void
-gimple_set_do_not_emit_location (gimple g)
-{
-  /* The PLF flags are initialized to 0 when a new tuple is created,
-     so no need to initialize it anywhere.  */
-  gimple_set_plf (g, GF_PLF_1, true);
-}
-
-/* Set the location for gimple statement GS to LOCATION.  */
-
-static void
-annotate_one_with_location (gimple gs, location_t location)
-{
-  if (!gimple_has_location (gs)
-      && !gimple_do_not_emit_location_p (gs)
-      && should_carry_location_p (gs))
-    gimple_set_location (gs, location);
-}
-
-/* Set LOCATION for all the statements after iterator GSI in sequence
-   SEQ.  If GSI is pointing to the end of the sequence, start with the
-   first statement in SEQ.  */
 
-static void
-annotate_all_with_location_after (gimple_seq seq, gimple_stmt_iterator gsi,
-				  location_t location)
-{
-  if (gsi_end_p (gsi))
-    gsi = gsi_start (seq);
-  else
-    gsi_next (&gsi);
-
-  for (; !gsi_end_p (gsi); gsi_next (&gsi))
-    annotate_one_with_location (gsi_stmt (gsi), location);
-}
-
-/* Set the location for all the statements in a sequence STMT_P to LOCATION.  */
-
-void
-annotate_all_with_location (gimple_seq stmt_p, location_t location)
-{
-  gimple_stmt_iterator i;
-
-  if (gimple_seq_empty_p (stmt_p))
-    return;
-
-  for (i = gsi_start (stmt_p); !gsi_end_p (i); gsi_next (&i))
-    {
-      gimple gs = gsi_stmt (i);
-      annotate_one_with_location (gs, location);
-    }
-}
 
 /* This page contains routines to unshare tree nodes, i.e. to duplicate tree
    nodes that are referenced more than once in GENERIC functions.  This is
@@ -1441,6 +1196,20 @@ gimplify_vla_decl (tree decl, gimple_seq *seq_p)
   gimplify_ctxp->save_stack = true;
 }
 
+/* A helper function to be called via walk_tree.  Mark all labels under *TP
+   as being forced.  To be called for DECL_INITIAL of static variables.  */
+
+static tree
+force_labels_r (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
+{
+  if (TYPE_P (*tp))
+    *walk_subtrees = 0;
+  if (TREE_CODE (*tp) == LABEL_DECL)
+    FORCED_LABEL (*tp) = 1;
+
+  return NULL_TREE;
+}
+
 /* Gimplify a DECL_EXPR node *STMT_P by making any necessary allocation
    and initialization explicit.  */
 
@@ -1557,208 +1326,7 @@ gimplify_statement_list (tree *expr_p, gimple_seq *pre_p)
 
   return GS_ALL_DONE;
 }
-
-/* Compare two case labels.  Because the front end should already have
-   made sure that case ranges do not overlap, it is enough to only compare
-   the CASE_LOW values of each case label.  */
-
-static int
-compare_case_labels (const void *p1, const void *p2)
-{
-  const_tree const case1 = *(const_tree const*)p1;
-  const_tree const case2 = *(const_tree const*)p2;
-
-  /* The 'default' case label always goes first.  */
-  if (!CASE_LOW (case1))
-    return -1;
-  else if (!CASE_LOW (case2))
-    return 1;
-  else
-    return tree_int_cst_compare (CASE_LOW (case1), CASE_LOW (case2));
-}
-
-/* Sort the case labels in LABEL_VEC in place in ascending order.  */
 
-void
-sort_case_labels (vec<tree> label_vec)
-{
-  label_vec.qsort (compare_case_labels);
-}
-
-/* Prepare a vector of case labels to be used in a GIMPLE_SWITCH statement.
-
-   LABELS is a vector that contains all case labels to look at.
-
-   INDEX_TYPE is the type of the switch index expression.  Case labels
-   in LABELS are discarded if their values are not in the value range
-   covered by INDEX_TYPE.  The remaining case label values are folded
-   to INDEX_TYPE.
-
-   If a default case exists in LABELS, it is removed from LABELS and
-   returned in DEFAULT_CASEP.  If no default case exists, but the
-   case labels already cover the whole range of INDEX_TYPE, a default
-   case is returned pointing to one of the existing case labels.
-   Otherwise DEFAULT_CASEP is set to NULL_TREE.
-
-   DEFAULT_CASEP may be NULL, in which case the above comment doesn't
-   apply and no action is taken regardless of whether a default case is
-   found or not.  */
-
-void
-preprocess_case_label_vec_for_gimple (vec<tree> labels,
-				      tree index_type,
-				      tree *default_casep)
-{
-  tree min_value, max_value;
-  tree default_case = NULL_TREE;
-  size_t i, len;
-
-  i = 0;
-  min_value = TYPE_MIN_VALUE (index_type);
-  max_value = TYPE_MAX_VALUE (index_type);
-  while (i < labels.length ())
-    {
-      tree elt = labels[i];
-      tree low = CASE_LOW (elt);
-      tree high = CASE_HIGH (elt);
-      bool remove_element = FALSE;
-
-      if (low)
-	{
-	  gcc_checking_assert (TREE_CODE (low) == INTEGER_CST);
-	  gcc_checking_assert (!high || TREE_CODE (high) == INTEGER_CST);
-
-	  /* This is a non-default case label, i.e. it has a value.
-
-	     See if the case label is reachable within the range of
-	     the index type.  Remove out-of-range case values.  Turn
-	     case ranges into a canonical form (high > low strictly)
-	     and convert the case label values to the index type.
-
-	     NB: The type of gimple_switch_index() may be the promoted
-	     type, but the case labels retain the original type.  */
-
-	  if (high)
-	    {
-	      /* This is a case range.  Discard empty ranges.
-		 If the bounds or the range are equal, turn this
-		 into a simple (one-value) case.  */
-	      int cmp = tree_int_cst_compare (high, low);
-	      if (cmp < 0)
-		remove_element = TRUE;
-	      else if (cmp == 0)
-		high = NULL_TREE;
-	    }
-
-	  if (! high)
-	    {
-	      /* If the simple case value is unreachable, ignore it.  */
-	      if ((TREE_CODE (min_value) == INTEGER_CST
-		   && tree_int_cst_compare (low, min_value) < 0)
-		  || (TREE_CODE (max_value) == INTEGER_CST
-		      && tree_int_cst_compare (low, max_value) > 0))
-		remove_element = TRUE;
-	      else
-		low = fold_convert (index_type, low);
-	    }
-	  else
-	    {
-	      /* If the entire case range is unreachable, ignore it.  */
-	      if ((TREE_CODE (min_value) == INTEGER_CST
-		   && tree_int_cst_compare (high, min_value) < 0)
-		  || (TREE_CODE (max_value) == INTEGER_CST
-		      && tree_int_cst_compare (low, max_value) > 0))
-		remove_element = TRUE;
-	      else
-		{
-		  /* If the lower bound is less than the index type's
-		     minimum value, truncate the range bounds.  */
-		  if (TREE_CODE (min_value) == INTEGER_CST
-		      && tree_int_cst_compare (low, min_value) < 0)
-		    low = min_value;
-		  low = fold_convert (index_type, low);
-
-		  /* If the upper bound is greater than the index type's
-		     maximum value, truncate the range bounds.  */
-		  if (TREE_CODE (max_value) == INTEGER_CST
-		      && tree_int_cst_compare (high, max_value) > 0)
-		    high = max_value;
-		  high = fold_convert (index_type, high);
-
-		  /* We may have folded a case range to a one-value case.  */
-		  if (tree_int_cst_equal (low, high))
-		    high = NULL_TREE;
-		}
-	    }
-
-	  CASE_LOW (elt) = low;
-	  CASE_HIGH (elt) = high;
-	}
-      else
-	{
-	  gcc_assert (!default_case);
-	  default_case = elt;
-	  /* The default case must be passed separately to the
-	     gimple_build_switch routine.  But if DEFAULT_CASEP
-	     is NULL, we do not remove the default case (it would
-	     be completely lost).  */
-	  if (default_casep)
-	    remove_element = TRUE;
-	}
-
-      if (remove_element)
-	labels.ordered_remove (i);
-      else
-	i++;
-    }
-  len = i;
-
-  if (!labels.is_empty ())
-    sort_case_labels (labels);
-
-  if (default_casep && !default_case)
-    {
-      /* If the switch has no default label, add one, so that we jump
-	 around the switch body.  If the labels already cover the whole
-	 range of the switch index_type, add the default label pointing
-	 to one of the existing labels.  */
-      if (len
-	  && TYPE_MIN_VALUE (index_type)
-	  && TYPE_MAX_VALUE (index_type)
-	  && tree_int_cst_equal (CASE_LOW (labels[0]),
-				 TYPE_MIN_VALUE (index_type)))
-	{
-	  tree low, high = CASE_HIGH (labels[len - 1]);
-	  if (!high)
-	    high = CASE_LOW (labels[len - 1]);
-	  if (tree_int_cst_equal (high, TYPE_MAX_VALUE (index_type)))
-	    {
-	      for (i = 1; i < len; i++)
-		{
-		  high = CASE_LOW (labels[i]);
-		  low = CASE_HIGH (labels[i - 1]);
-		  if (!low)
-		    low = CASE_LOW (labels[i - 1]);
-		  if ((TREE_INT_CST_LOW (low) + 1
-		       != TREE_INT_CST_LOW (high))
-		      || (TREE_INT_CST_HIGH (low)
-			  + (TREE_INT_CST_LOW (high) == 0)
-			  != TREE_INT_CST_HIGH (high)))
-		    break;
-		}
-	      if (i == len)
-		{
-		  tree label = CASE_LABEL (labels[0]);
-		  default_case = build_case_label (NULL_TREE, NULL_TREE,
-						   label);
-		}
-	    }
-	}
-    }
-
-  if (default_casep)
-    *default_casep = default_case;
-}
 
 /* Gimplify a SWITCH_EXPR, and collect the vector of labels it can
    branch to.  */
@@ -1882,20 +1450,6 @@ gimplify_exit_expr (tree *expr_p)
   return GS_OK;
 }
 
-/* A helper function to be called via walk_tree.  Mark all labels under *TP
-   as being forced.  To be called for DECL_INITIAL of static variables.  */
-
-tree
-force_labels_r (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
-{
-  if (TYPE_P (*tp))
-    *walk_subtrees = 0;
-  if (TREE_CODE (*tp) == LABEL_DECL)
-    FORCED_LABEL (*tp) = 1;
-
-  return NULL_TREE;
-}
-
 /* *EXPR_P is a COMPONENT_REF being used as an rvalue.  If its type is
    different from its canonical type, wrap the whole thing inside a
    NOP_EXPR and force the type of the COMPONENT_REF to be the canonical
@@ -3838,7 +3392,7 @@ gimplify_init_ctor_eval (tree object, vec<constructor_elt, va_gc> *elts,
 
 /* Return the appropriate RHS predicate for this LHS.  */
 
-gimple_predicate
+static gimple_predicate
 rhs_predicate_for (tree lhs)
 {
   if (is_gimple_reg (lhs))
@@ -9419,4 +8973,20 @@ gimplify_va_arg_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
     }
 }
 
-#include "gt-gimplify.h"
+/* Build a new GIMPLE_ASSIGN tuple and append it to the end of *SEQ_P.
+
+   DST/SRC are the destination and source respectively.  You can pass
+   ungimplified trees in DST or SRC, in which case they will be
+   converted to a gimple operand if necessary.
+
+   This function returns the newly created GIMPLE_ASSIGN tuple.  */
+
+gimple
+gimplify_assign (tree dst, tree src, gimple_seq *seq_p)
+{
+  tree t = build2 (MODIFY_EXPR, TREE_TYPE (dst), dst, src);
+  gimplify_and_add (t, seq_p);
+  ggc_free (t);
+  return gimple_seq_last_stmt (*seq_p);
+}
+
diff --git a/gcc/gimplify.h b/gcc/gimplify.h
new file mode 100644
index 0000000000000000000000000000000000000000..5f81cf2fe774d310e381ca9f81e799c6fcf87ab8
--- /dev/null
+++ b/gcc/gimplify.h
@@ -0,0 +1,92 @@
+/* Header file for gimplification.
+   Copyright (C) 2013 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
+
+#ifndef GCC_GIMPLIFY_H
+#define GCC_GIMPLIFY_H
+
+#include "gimple.h"
+
+/* Validation of GIMPLE expressions.  Note that these predicates only check
+   the basic form of the expression, they don't recurse to make sure that
+   underlying nodes are also of the right form.  */
+typedef bool (*gimple_predicate)(tree);
+
+/* FIXME we should deduce this from the predicate.  */
+enum fallback {
+  fb_none = 0,		/* Do not generate a temporary.  */
+
+  fb_rvalue = 1,	/* Generate an rvalue to hold the result of a
+			   gimplified expression.  */
+
+  fb_lvalue = 2,	/* Generate an lvalue to hold the result of a
+			   gimplified expression.  */
+
+  fb_mayfail = 4,	/* Gimplification may fail.  Error issued
+			   afterwards.  */
+  fb_either= fb_rvalue | fb_lvalue
+};
+
+typedef int fallback_t;
+
+enum gimplify_status {
+  GS_ERROR	= -2,	/* Something Bad Seen.  */
+  GS_UNHANDLED	= -1,	/* A langhook result for "I dunno".  */
+  GS_OK		= 0,	/* We did something, maybe more to do.  */
+  GS_ALL_DONE	= 1	/* The expression is fully gimplified.  */
+};
+
+extern void push_gimplify_context (struct gimplify_ctx *);
+extern void pop_gimplify_context (gimple);
+extern gimple gimple_current_bind_expr (void);
+extern vec<gimple> gimple_bind_expr_stack (void);
+extern void gimplify_and_add (tree, gimple_seq *);
+extern tree get_formal_tmp_var (tree, gimple_seq *);
+extern tree get_initialized_tmp_var (tree, gimple_seq *, gimple_seq *);
+extern void declare_vars (tree, gimple, bool);
+extern void gimple_add_tmp_var (tree);
+extern tree unshare_expr (tree);
+extern tree unshare_expr_without_location (tree);
+extern tree voidify_wrapper_expr (tree, tree);
+extern tree build_and_jump (tree *);
+extern enum gimplify_status gimplify_self_mod_expr (tree *, gimple_seq *,
+						    gimple_seq *, bool, tree);
+extern tree gimple_boolify (tree);
+extern bool gimplify_stmt (tree *, gimple_seq *);
+extern void omp_firstprivatize_variable (struct gimplify_omp_ctx *, tree);
+extern enum gimplify_status gimplify_expr (tree *, gimple_seq *, gimple_seq *,
+					   bool (*) (tree), fallback_t);
+
+extern void gimplify_type_sizes (tree, gimple_seq *);
+extern void gimplify_one_sizepos (tree *, gimple_seq *);
+extern gimple gimplify_body (tree, bool);
+extern void gimplify_function_tree (tree);
+extern void gimple_regimplify_operands (gimple, gimple_stmt_iterator *);
+extern tree force_gimple_operand_1 (tree, gimple_seq *, gimple_predicate, tree);
+extern tree force_gimple_operand (tree, gimple_seq *, bool, tree);
+extern tree force_gimple_operand_gsi_1 (gimple_stmt_iterator *, tree,
+					gimple_predicate, tree,
+					bool, enum gsi_iterator_update);
+extern tree force_gimple_operand_gsi (gimple_stmt_iterator *, tree, bool, tree,
+				      bool, enum gsi_iterator_update);
+
+extern enum gimplify_status gimplify_va_arg_expr (tree *, gimple_seq *,
+						  gimple_seq *);
+gimple gimplify_assign (tree, tree, gimple_seq *);
+
+#endif /* GCC_GIMPLIFY_H */
diff --git a/gcc/go/ChangeLog b/gcc/go/ChangeLog
index 33ccc1cdce898beecc1ad4957da5c39181cac8a2..49775b9778c55ce5448088b6dbece252402ff2e6 100644
--- a/gcc/go/ChangeLog
+++ b/gcc/go/ChangeLog
@@ -1,3 +1,7 @@
+2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
+
+	* go/go-lang.c: Include gimplify.h.
+
 2013-11-06  Ian Lance Taylor  <iant@google.com>
 
 	* go-lang.c (go_langhook_post_options): If
diff --git a/gcc/go/go-lang.c b/gcc/go/go-lang.c
index 14080f098c8b375d4eb9cf7e35d14a8d5afc4eeb..90cabb57181e9099cc622bee98f091508157745e 100644
--- a/gcc/go/go-lang.c
+++ b/gcc/go/go-lang.c
@@ -23,7 +23,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "coretypes.h"
 #include "opts.h"
 #include "tree.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "ggc.h"
 #include "toplev.h"
 #include "debug.h"
diff --git a/gcc/graphite-clast-to-gimple.c b/gcc/graphite-clast-to-gimple.c
index ec4c1d1f461fc1480ae545f0429174577943c8b1..207de4f1fe83788c83b71afa1936af64f691d8a9 100644
--- a/gcc/graphite-clast-to-gimple.c
+++ b/gcc/graphite-clast-to-gimple.c
@@ -36,7 +36,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "coretypes.h"
 #include "diagnostic-core.h"
 #include "tree.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-ssa-loop-manip.h"
 #include "tree-ssa-loop.h"
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index 514be1d3847204a1b360bc89eb3039d9eda516ed..9ee75b87d07d25c9364f1028865d9af90021daed 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -34,7 +34,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-cfg.h"
 #include "tree-phinodes.h"
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index 07af67724f5df71c5a04bf4a48aab4a3d723ce0c..9b38e4b38626c83a9c6dfc09253908e2689d1c9e 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -21,7 +21,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "langhooks.h"
 #include "ggc.h"
 #include "target.h"
diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c
index 849868ca68ce199829b4cbe9df7d09b3b3be3e36..df0a44e7d5f34ecdff7701cc3c87f761280f7510 100644
--- a/gcc/ipa-split.c
+++ b/gcc/ipa-split.c
@@ -78,7 +78,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "target.h"
 #include "ipa-prop.h"
 #include "gimple-ssa.h"
diff --git a/gcc/ipa.c b/gcc/ipa.c
index aef437a46f51b7ffd35a41eaf8941d77cfb078ca..5e81fccbe0a802de32463a25508ef1e75d14e064 100644
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -24,7 +24,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "cgraph.h"
 #include "tree-pass.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "ggc.h"
 #include "flags.h"
 #include "pointer-set.h"
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 4cb9e461a40032f3776706003f252439c79a9b8e..04b362973e6913c4c9b910825816f55fbc50e62a 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,7 @@
+2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
+
+	* java/java-gimplify.c: Include gimplify.h.
+
 2013-11-07  Jeff Law  <law@redhat.com>
 
 	* builtins.c (initialize_builtins): Provide __builtin_trap.
diff --git a/gcc/java/java-gimplify.c b/gcc/java/java-gimplify.c
index 6f159f8d829630c281788929e781908b3875e030..d604cf82e97b3c4ad14a67ea9715c67b7d65e663 100644
--- a/gcc/java/java-gimplify.c
+++ b/gcc/java/java-gimplify.c
@@ -27,7 +27,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc.  */
 #include "tree.h"
 #include "java-tree.h"
 #include "dumpfile.h"
-#include "gimple.h"
+#include "gimplify.h"
 
 static tree java_gimplify_block (tree);
 static enum gimplify_status java_gimplify_modify_expr (tree *);
diff --git a/gcc/langhooks.c b/gcc/langhooks.c
index 5d1457b1b22f92563eaed7b1989fce480c455d20..a5be398751d2aabdda08dc474d8ed541ca6fccc2 100644
--- a/gcc/langhooks.c
+++ b/gcc/langhooks.c
@@ -26,7 +26,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "toplev.h"
 #include "tree.h"
 #include "tree-inline.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "rtl.h"
 #include "insn-config.h"
 #include "flags.h"
diff --git a/gcc/loop-init.c b/gcc/loop-init.c
index 0318ba9e5f60b343cd843853c7ac293939a586b4..8cc96af10fd225dfb8dda5a8adf3f39a5870b0df 100644
--- a/gcc/loop-init.c
+++ b/gcc/loop-init.c
@@ -31,7 +31,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "flags.h"
 #include "df.h"
 #include "ggc.h"
-#include "gimple.h"
 #include "tree-ssa-loop-niter.h"
 
 
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog
index e3be5f8d212000ca4e4cc79a68e429b5191cf0be..7c44fd7e2843cb31cf164799b6cff8b12a33aede 100644
--- a/gcc/objc/ChangeLog
+++ b/gcc/objc/ChangeLog
@@ -1,3 +1,7 @@
+2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
+
+	* objc/objc-act.c: Include gimplify.h.
+
 2013-11-07  Andrew MacLeod  <amacleod@redhat.com>
 
 	* objc-act.c (objc_push_parm): Handle atomic qualifier.
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index 3125398c27678b3bcf4d172f6845ebb92e05f276..34c528287053f3a13c40abb95fd2538dc9a9d2cc 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -60,7 +60,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-pretty-print.h"
 
 /* For enum gimplify_status */
-#include "gimple.h"
+#include "gimplify.h"
 
 /* For encode_method_prototype().  */
 #include "objc-encoding.h"
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 7874ff13dd6126783f2e28a4b511eb1875946c3f..e383f9a97f90240cfc8c4791df1e413bbf114818 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -27,7 +27,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm.h"
 #include "tree.h"
 #include "rtl.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "tree-iterator.h"
 #include "tree-inline.h"
 #include "langhooks.h"
diff --git a/gcc/sese.c b/gcc/sese.c
index 1daf45762588a8849915b039d79b07c9ba3efbcc..cddd9510e36164bea6cfc0e4d50455bd76fa59d4 100644
--- a/gcc/sese.c
+++ b/gcc/sese.c
@@ -25,7 +25,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "hash-table.h"
 #include "tree.h"
 #include "tree-pretty-print.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-cfg.h"
 #include "tree-phinodes.h"
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index f390eea79105c714c85d0fb611247b96fd2ce74f..a4ee040e26cacb0932a8d188212072a488ee07c4 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -37,7 +37,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "cgraph.h"
 #include "tree-inline.h"
 #include "tree-dump.h"
-#include "gimple.h"
+#include "gimplify.h"
 
 /* Data type for the expressions representing sizes of data types.
    It is the first integer type laid out.  */
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index a671486453a4f80283ab946ad0b6fe0389f4dcfa..352b3c845d5914c56bfb476deade5325981eb3fd 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -68,7 +68,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "recog.h"
 #include "intl.h"
 #include "opts.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "tree-ssanames.h"
 #include "tree-ssa-alias.h"
 #include "insn-codes.h"
diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c
index 784ff247e9d752d126c39f9a1704c79c6170eb7b..e821c99c9754ca2d546985485fa3cdb358f96533 100644
--- a/gcc/trans-mem.c
+++ b/gcc/trans-mem.c
@@ -22,7 +22,7 @@
 #include "coretypes.h"
 #include "hash-table.h"
 #include "tree.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "cgraph.h"
 #include "tree-cfg.h"
diff --git a/gcc/tree-affine.c b/gcc/tree-affine.c
index b492ff0a2118456cb1a41b1ed44f384ab7a5396b..7004a460761e10c15d77c1df3b90d96e8d214db3 100644
--- a/gcc/tree-affine.c
+++ b/gcc/tree-affine.c
@@ -24,7 +24,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-pretty-print.h"
 #include "pointer-set.h"
 #include "tree-affine.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "flags.h"
 #include "dumpfile.h"
 
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index d646693903259340de65f4f5beb20a4f59df8e02..601efd65aa86d9464df645be31cff304c8114a3c 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -30,7 +30,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "function.h"
 #include "ggc.h"
 #include "gimple-pretty-print.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "cgraph.h"
 #include "tree-cfg.h"
diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c
index c627d2cac57bc5d5a4a8457d9e63ea9b77be25ca..3ca84c575bca96f7ea4372dbc7cd1a58fb6ab3bf 100644
--- a/gcc/tree-cfgcleanup.c
+++ b/gcc/tree-cfgcleanup.c
@@ -29,7 +29,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "function.h"
 #include "ggc.h"
 #include "langhooks.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-cfg.h"
 #include "tree-phinodes.h"
diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c
index 6439402ba758580bea20dcd9e385cecd3c2bc08f..b75c732e4f81c2b7d84aa28b11d6ab3102399583 100644
--- a/gcc/tree-complex.c
+++ b/gcc/tree-complex.c
@@ -23,7 +23,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm.h"
 #include "tree.h"
 #include "flags.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-cfg.h"
 #include "tree-phinodes.h"
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c
index bb8de6d6ad73ba2c8fc35f266159e93f8c6b8074..98cb6ab606fdbb4132c1ae8f7580d6a2ea8d3e75 100644
--- a/gcc/tree-if-conv.c
+++ b/gcc/tree-if-conv.c
@@ -88,7 +88,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "flags.h"
 #include "basic-block.h"
 #include "gimple-pretty-print.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-cfg.h"
 #include "tree-phinodes.h"
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 0d1f1c7621b61fcf555b0b064c9029cda3fc1bbe..5d30caa6f6bb333ddb524f96460adbab0546c67f 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -34,7 +34,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "basic-block.h"
 #include "tree-iterator.h"
 #include "intl.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-cfg.h"
 #include "tree-phinodes.h"
diff --git a/gcc/tree-iterator.c b/gcc/tree-iterator.c
index 53347b54dc653873b25b0bc89953ea9d36cd97d2..713290896570a45613cdec9d179700a1cda5feb0 100644
--- a/gcc/tree-iterator.c
+++ b/gcc/tree-iterator.c
@@ -22,7 +22,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
-#include "gimple.h"
 #include "tree-iterator.h"
 #include "ggc.h"
 
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c
index 45efad3f110c014675f5afdf45d487e173c390b5..6adea4d7b34df6a47a0c04e853514f54c372f6fe 100644
--- a/gcc/tree-loop-distribution.c
+++ b/gcc/tree-loop-distribution.c
@@ -45,7 +45,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-cfg.h"
 #include "tree-phinodes.h"
diff --git a/gcc/tree-nested.c b/gcc/tree-nested.c
index dc63ef6902ebbfc017bdf9679681a886081b8e8c..97e4787e3c7c67d4c8d6165e92cce45d182b86db 100644
--- a/gcc/tree-nested.c
+++ b/gcc/tree-nested.c
@@ -26,7 +26,7 @@
 #include "function.h"
 #include "tree-dump.h"
 #include "tree-inline.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "tree-iterator.h"
 #include "bitmap.h"
 #include "cgraph.h"
diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c
index c357f1fe14c5fc1e8bc98270fe5ea147b0e517e4..a17085c869244f8ab240b79ddeca0453498a6b30 100644
--- a/gcc/tree-parloops.c
+++ b/gcc/tree-parloops.c
@@ -23,7 +23,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-cfg.h"
 #include "tree-phinodes.h"
diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c
index 6084cf62ef642ef8fed5c06fe9b0021485c57419..15aadb03eca75672633ebfcfa8c2f4c1d24d0743 100644
--- a/gcc/tree-predcom.c
+++ b/gcc/tree-predcom.c
@@ -191,7 +191,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "tm_p.h"
 #include "cfgloop.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-phinodes.h"
 #include "ssa-iterators.h"
diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c
index 9f9dba854fdd027737b0aa8c00bd32a4a8c4a2d2..9253059010831d6f6a14c5038a50110b5d76cc6d 100644
--- a/gcc/tree-profile.c
+++ b/gcc/tree-profile.c
@@ -34,7 +34,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "diagnostic-core.h"
 #include "coverage.h"
 #include "tree.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "cgraph.h"
 #include "tree-cfg.h"
diff --git a/gcc/tree-scalar-evolution.c b/gcc/tree-scalar-evolution.c
index cafc70cb54b5bb75bfb799c4c00a1758ba586785..3702922d00161a5618481ff668524900cbc037fa 100644
--- a/gcc/tree-scalar-evolution.c
+++ b/gcc/tree-scalar-evolution.c
@@ -259,7 +259,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "hash-table.h"
 #include "gimple-pretty-print.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-cfg.h"
 #include "tree-phinodes.h"
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 38da57700e2de7e1ea23f45434dbc5a6b8ce2711..a4f627f23c1fda90ad9d84e0426726fb07f4f525 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -78,7 +78,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "alloc-pool.h"
 #include "tm.h"
 #include "tree.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "bitmap.h"
 #include "gimple-ssa.h"
 #include "tree-cfg.h"
diff --git a/gcc/tree-ssa-address.c b/gcc/tree-ssa-address.c
index 146f909c7b1fa4613ba6977345854e6cc44b0710..3984e79ce1230b446eaf385ea7d22d5c921f8afe 100644
--- a/gcc/tree-ssa-address.c
+++ b/gcc/tree-ssa-address.c
@@ -28,7 +28,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm_p.h"
 #include "basic-block.h"
 #include "tree-pretty-print.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "tree-ssanames.h"
 #include "tree-ssa-loop-ivopts.h"
 #include "tree-dfa.h"
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index b4dfd4928cdcdbb9de1659c76f90768e32b6fc15..70b22053be7cba419f4b1020c8ed7f03650b0705 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -119,7 +119,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "basic-block.h"
 #include "function.h"
 #include "gimple-pretty-print.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-cfg.h"
 #include "tree-phinodes.h"
diff --git a/gcc/tree-ssa-dce.c b/gcc/tree-ssa-dce.c
index 72e2fb8fa65f05728048f64e62313a6390edbf5a..7a016f6240d58d96da832feb098dc6beacb95c7e 100644
--- a/gcc/tree-ssa-dce.c
+++ b/gcc/tree-ssa-dce.c
@@ -50,7 +50,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "gimple-pretty-print.h"
 #include "basic-block.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-cfg.h"
 #include "tree-phinodes.h"
diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c
index 93b89704a2f5d864acc795fc183a04b724e52ed3..a6afb47a4dba0f935823b3917f7936678a7d214e 100644
--- a/gcc/tree-ssa-forwprop.c
+++ b/gcc/tree-ssa-forwprop.c
@@ -25,7 +25,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm_p.h"
 #include "basic-block.h"
 #include "gimple-pretty-print.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-cfg.h"
 #include "tree-phinodes.h"
diff --git a/gcc/tree-ssa-ifcombine.c b/gcc/tree-ssa-ifcombine.c
index 73ebfe8b24e000e3a803f53b04ba7bddcb56a01f..1786f9c29d38383f540fb9a8b2d3566773d9a139 100644
--- a/gcc/tree-ssa-ifcombine.c
+++ b/gcc/tree-ssa-ifcombine.c
@@ -29,7 +29,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "basic-block.h"
 #include "tree-pretty-print.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-cfg.h"
 #include "tree-phinodes.h"
diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c
index 2283b5b4dd7206ab8cd15580135f3dfbb29f17a4..34a37633a481a1f958ad2a1d445efa79ad4abb89 100644
--- a/gcc/tree-ssa-loop-im.c
+++ b/gcc/tree-ssa-loop-im.c
@@ -25,7 +25,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm_p.h"
 #include "basic-block.h"
 #include "gimple-pretty-print.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-cfg.h"
 #include "tree-phinodes.h"
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index d024bb4c3955afb74312554509ceda34a9669586..894ff2db521049e95ae00f2257437dc3f70d28e4 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -69,7 +69,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm_p.h"
 #include "basic-block.h"
 #include "gimple-pretty-print.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "cgraph.h"
 #include "tree-cfg.h"
diff --git a/gcc/tree-ssa-loop-manip.c b/gcc/tree-ssa-loop-manip.c
index 2bb225360dd60910d2be42f8ad3bcc07ca19da52..123a6e19c98584ba828cefae733aba98d440daf9 100644
--- a/gcc/tree-ssa-loop-manip.c
+++ b/gcc/tree-ssa-loop-manip.c
@@ -24,7 +24,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "tm_p.h"
 #include "basic-block.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-cfg.h"
 #include "tree-phinodes.h"
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c
index 3014faae7968d0bc6f3249e8dedc7b945c04c1b1..a6adfc2f1a49b33b82d1bc20cdf67cd0e75c7c6e 100644
--- a/gcc/tree-ssa-loop-niter.c
+++ b/gcc/tree-ssa-loop-niter.c
@@ -26,7 +26,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "basic-block.h"
 #include "gimple-pretty-print.h"
 #include "intl.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-cfg.h"
 #include "tree-phinodes.h"
diff --git a/gcc/tree-ssa-loop-prefetch.c b/gcc/tree-ssa-loop-prefetch.c
index 5b7c0c2260c33dfd6c7a6d333c2da806070b19d8..85a0b0a6f4418071bced669242211d5891ecedbb 100644
--- a/gcc/tree-ssa-loop-prefetch.c
+++ b/gcc/tree-ssa-loop-prefetch.c
@@ -25,7 +25,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm_p.h"
 #include "basic-block.h"
 #include "tree-pretty-print.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-ssa-loop-ivopts.h"
 #include "tree-ssa-loop-manip.h"
diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c
index e2b1c0735ad143608f4a83af922304b55cce06c0..a345a4c6fe3f01ace6dc8b5f4ea7bb03254f3a8f 100644
--- a/gcc/tree-ssa-loop-unswitch.c
+++ b/gcc/tree-ssa-loop-unswitch.c
@@ -24,7 +24,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "tm_p.h"
 #include "basic-block.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-cfg.h"
 #include "tree-phinodes.h"
diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c
index 9a2941119458621408aa1e6a7d40fbed14a7e97c..646f8cf1e64089ef7699e5c2b86f80e39f8e7e6e 100644
--- a/gcc/tree-ssa-math-opts.c
+++ b/gcc/tree-ssa-math-opts.c
@@ -90,7 +90,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm.h"
 #include "flags.h"
 #include "tree.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-cfg.h"
 #include "tree-phinodes.h"
diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c
index ef114a01a6dd8438b1b67d08d6c2e5e8177b84b4..d79e957551616f9b2fd64eaefca7a1f6f7583d79 100644
--- a/gcc/tree-ssa-phiopt.c
+++ b/gcc/tree-ssa-phiopt.c
@@ -27,7 +27,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "flags.h"
 #include "tm_p.h"
 #include "basic-block.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-cfg.h"
 #include "tree-phinodes.h"
diff --git a/gcc/tree-ssa-phiprop.c b/gcc/tree-ssa-phiprop.c
index e0e682e5dc2c6eade60f10d999824ceb0fd2ee3e..61e38d5e385c0508a21da96d57e49ab2529d0e55 100644
--- a/gcc/tree-ssa-phiprop.c
+++ b/gcc/tree-ssa-phiprop.c
@@ -26,7 +26,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm_p.h"
 #include "basic-block.h"
 #include "gimple-pretty-print.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-phinodes.h"
 #include "ssa-iterators.h"
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 1f5ff23cb3fc06c2c5fd46b45ea30473a81d372d..7e83967b0723fc2f123517e85e57c277306ed3b5 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -27,7 +27,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "basic-block.h"
 #include "gimple-pretty-print.h"
 #include "tree-inline.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-cfg.h"
 #include "tree-phinodes.h"
diff --git a/gcc/tree-ssa-propagate.c b/gcc/tree-ssa-propagate.c
index 3456edbf5a0037e7565b70a134399c0256d14822..00780b9a74513f0bf03b0c4b249ffe4a89ca18e9 100644
--- a/gcc/tree-ssa-propagate.c
+++ b/gcc/tree-ssa-propagate.c
@@ -30,7 +30,7 @@
 #include "gimple-pretty-print.h"
 #include "dumpfile.h"
 #include "sbitmap.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-cfg.h"
 #include "tree-phinodes.h"
diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c
index 538a8ef0e4a25e874b97ff9dc1f772544b2f3b53..6e9188457f90531abc2f57cfe27e3ab280ad3b9e 100644
--- a/gcc/tree-ssa-reassoc.c
+++ b/gcc/tree-ssa-reassoc.c
@@ -29,7 +29,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "basic-block.h"
 #include "gimple-pretty-print.h"
 #include "tree-inline.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-cfg.h"
 #include "tree-phinodes.h"
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
index ed4e1db718c6f6553a735f4e376a35c4ae694052..36ef0184e7712e4bf9ad1ff1bf913f6089b43f38 100644
--- a/gcc/tree-ssa-sccvn.c
+++ b/gcc/tree-ssa-sccvn.c
@@ -26,7 +26,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "basic-block.h"
 #include "gimple-pretty-print.h"
 #include "tree-inline.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-phinodes.h"
 #include "ssa-iterators.h"
diff --git a/gcc/tree-ssa-strlen.c b/gcc/tree-ssa-strlen.c
index ea73179eea88030aef25c6bb6fc3282f1a0c04bd..0a1c4d409194900c4bf4f6c2863df8189f02dcfe 100644
--- a/gcc/tree-ssa-strlen.c
+++ b/gcc/tree-ssa-strlen.c
@@ -24,7 +24,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "hash-table.h"
 #include "bitmap.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-phinodes.h"
 #include "ssa-iterators.h"
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index ba8045d470226c75f0dc080181f9f29b94225378..ae8939e2ba9179b583db3fda24a6fb8672c67edc 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -31,7 +31,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "function.h"
 #include "gimple-pretty-print.h"
 #include "pointer-set.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-phinodes.h"
 #include "ssa-iterators.h"
diff --git a/gcc/tree-switch-conversion.c b/gcc/tree-switch-conversion.c
index 46b9efe3aa7ef0443dbbb37f7f0d37306ce80823..7096b3da3de5898751845d4c7a4829647dbf1fa5 100644
--- a/gcc/tree-switch-conversion.c
+++ b/gcc/tree-switch-conversion.c
@@ -31,7 +31,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
 #include "flags.h"
 #include "tree.h"
 #include "basic-block.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "cgraph.h"
 #include "tree-cfg.h"
diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c
index 70d167a58e92aff9d3fc1525a884aaf6c123e1f3..38acf7bb3428c0476c6d6af17c358b4156d69d85 100644
--- a/gcc/tree-tailcall.c
+++ b/gcc/tree-tailcall.c
@@ -25,7 +25,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm_p.h"
 #include "basic-block.h"
 #include "function.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-cfg.h"
 #include "tree-phinodes.h"
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index b7eb926494d8ffac4e078e26ea291533944dc245..c4797755fde35a918db4325966a5e2fcddbfb57b 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -30,7 +30,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "target.h"
 #include "basic-block.h"
 #include "gimple-pretty-print.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-phinodes.h"
 #include "ssa-iterators.h"
diff --git a/gcc/tree-vect-generic.c b/gcc/tree-vect-generic.c
index 1521b2ba2c5833a9e2a245304c7073ea13f5c27b..8fca8c14addc8b545b1c60ec7e994acdaebfdf2e 100644
--- a/gcc/tree-vect-generic.c
+++ b/gcc/tree-vect-generic.c
@@ -23,7 +23,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "tm.h"
 #include "langhooks.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-cfg.h"
 #include "tree-ssanames.h"
diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c
index fb34664960e00f8e5d9f31a31cf83291a92021bc..15227856033e12b36e1760dd0b6bc01c807e681c 100644
--- a/gcc/tree-vect-loop-manip.c
+++ b/gcc/tree-vect-loop-manip.c
@@ -28,7 +28,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "basic-block.h"
 #include "gimple-pretty-print.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-cfg.h"
 #include "tree-phinodes.h"
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 6e71eea2436e3c159f57010191f1ed18de8920a5..292e771040276e642c3549bde492eb65d512b018 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -28,7 +28,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "basic-block.h"
 #include "gimple-pretty-print.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-phinodes.h"
 #include "ssa-iterators.h"
diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c
index 099880488bc41587c467f8aa1b354eb3b9d0f590..51b96e15408d8ada913c5231e7349a4861e0841e 100644
--- a/gcc/tree-vect-patterns.c
+++ b/gcc/tree-vect-patterns.c
@@ -27,7 +27,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "target.h"
 #include "basic-block.h"
 #include "gimple-pretty-print.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-phinodes.h"
 #include "ssa-iterators.h"
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 5a2bbb516083ef9c44bfda1f79d093bc5b083daf..b0e0fa99b20ec8f85848521444f2f0a9518a5ae7 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -29,7 +29,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "target.h"
 #include "basic-block.h"
 #include "gimple-pretty-print.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-cfg.h"
 #include "tree-phinodes.h"
diff --git a/gcc/tree.h b/gcc/tree.h
index 9c2f2d010f7bd59e604cf3b60ec45b1845df8192..e58b3a5c0c406eb33a8636b8cb7b2f8f757bc792 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -4294,10 +4294,6 @@ extern void cache_integer_cst (tree);
 /* In cgraph.c */
 extern void change_decl_assembler_name (tree, tree);
 
-/* In gimplify.c */
-extern tree unshare_expr (tree);
-extern tree unshare_expr_without_location (tree);
-
 /* In stmt.c */
 
 extern void expand_label (tree);
@@ -4775,7 +4771,6 @@ extern void set_decl_incoming_rtl (tree, rtx, bool);
 
 /* In gimple.c.  */
 extern tree get_base_address (tree t);
-extern void mark_addressable (tree);
 
 /* In tree.c.  */
 extern tree drop_tree_overflow (tree);
diff --git a/gcc/tsan.c b/gcc/tsan.c
index bceb5979de1578760c22a099849b2125bd264726..1d318ea85274ab1e998e5afcb618fdec792857be 100644
--- a/gcc/tsan.c
+++ b/gcc/tsan.c
@@ -26,7 +26,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "intl.h"
 #include "tm.h"
 #include "basic-block.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "function.h"
 #include "gimple-ssa.h"
 #include "cgraph.h"
diff --git a/gcc/value-prof.c b/gcc/value-prof.c
index 40e72ab8c8930b4c8175fa2663cfd25f03236361..dda302dde53438b35d927ecb226b873126bceaa3 100644
--- a/gcc/value-prof.c
+++ b/gcc/value-prof.c
@@ -33,7 +33,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "optabs.h"
 #include "regs.h"
 #include "ggc.h"
-#include "gimple.h"
+#include "gimplify.h"
 #include "gimple-ssa.h"
 #include "tree-cfg.h"
 #include "tree-phinodes.h"