diff --git gcc/ChangeLog gcc/ChangeLog
index b699944..cd95521 100644
--- gcc/ChangeLog
+++ gcc/ChangeLog
@@ -1,5 +1,14 @@
 2017-02-28  Thomas Schwinge  <thomas@codesourcery.com>
 
+	* doc/optinfo.texi (Optimization groups): Fix option used for
+	OPTGROUP_ALL.
+	* doc/invoke.texi (-fopt-info): Document "omp".
+	* dumpfile.h: Sort OPTGROUP_OMP before OPTGROUP_VEC.
+	(OPTGROUP_ALL): Add OPTGROUP_OMP.
+	* hsa-gen.c (pass_data_gen_hsail): Use OPTGROUP_OMP.
+	* ipa-hsa.c (pass_data_ipa_hsa): Likewise.
+	* omp-simd-clone.c (pass_data_omp_simd_clone): Likewise.
+
 	* dumpfile.h (OPTGROUP_OPENMP): Rename to OPTGROUP_OMP.  Adjust
 	all users.
 	* dumpfile.c (optgroup_options): Instead of "openmp", associate
diff --git gcc/doc/invoke.texi gcc/doc/invoke.texi
index 1b9fdfe..d90c95c 100644
--- gcc/doc/invoke.texi
+++ gcc/doc/invoke.texi
@@ -13155,6 +13155,8 @@ Enable dumps from all interprocedural optimizations.
 Enable dumps from all loop optimizations.
 @item inline
 Enable dumps from all inlining optimizations.
+@item omp
+Enable dumps from all OMP (Offloading and Multi Processing) optimizations.
 @item vec
 Enable dumps from all vectorization optimizations.
 @item optall
diff --git gcc/doc/optinfo.texi gcc/doc/optinfo.texi
index cf6ce00..e17cb37 100644
--- gcc/doc/optinfo.texi
+++ gcc/doc/optinfo.texi
@@ -70,7 +70,7 @@ Vectorization passes. Enabled by @option{-vec}.
 All other optimization passes which do not fall into one of the above.
 
 @item OPTGROUP_ALL
-All optimization passes. Enabled by @option{-all}.
+All optimization passes. Enabled by @option{-optall}.
 
 @end ftable
 
diff --git gcc/dumpfile.h gcc/dumpfile.h
index 3886f98..fef58f5 100644
--- gcc/dumpfile.h
+++ gcc/dumpfile.h
@@ -98,12 +98,12 @@ enum tree_dump_index
 #define OPTGROUP_IPA         (1 << 1)   /* IPA optimization passes */
 #define OPTGROUP_LOOP        (1 << 2)   /* Loop optimization passes */
 #define OPTGROUP_INLINE      (1 << 3)   /* Inlining passes */
-#define OPTGROUP_VEC         (1 << 4)   /* Vectorization passes */
-#define OPTGROUP_OMP         (1 << 5)   /* OMP (Offloading and Multi
+#define OPTGROUP_OMP         (1 << 4)   /* OMP (Offloading and Multi
 					   Processing) transformations */
+#define OPTGROUP_VEC         (1 << 5)   /* Vectorization passes */
 #define OPTGROUP_OTHER       (1 << 6)   /* All other passes */
 #define OPTGROUP_ALL	     (OPTGROUP_IPA | OPTGROUP_LOOP | OPTGROUP_INLINE \
-                              | OPTGROUP_VEC | OPTGROUP_OTHER)
+                              | OPTGROUP_OMP | OPTGROUP_VEC | OPTGROUP_OTHER)
 
 /* Define a tree dump switch.  */
 struct dump_file_info
diff --git gcc/hsa-gen.c gcc/hsa-gen.c
index 7721fcc..7b69d64 100644
--- gcc/hsa-gen.c
+++ gcc/hsa-gen.c
@@ -6474,7 +6474,7 @@ const pass_data pass_data_gen_hsail =
 {
   GIMPLE_PASS,
   "hsagen",	 			/* name */
-  OPTGROUP_NONE,			/* optinfo_flags */
+  OPTGROUP_OMP,				/* optinfo_flags */
   TV_NONE,				/* tv_id */
   PROP_cfg | PROP_ssa,			/* properties_required */
   0,					/* properties_provided */
diff --git gcc/ipa-hsa.c gcc/ipa-hsa.c
index af70b0a..c02dada 100644
--- gcc/ipa-hsa.c
+++ gcc/ipa-hsa.c
@@ -289,7 +289,7 @@ const pass_data pass_data_ipa_hsa =
 {
   IPA_PASS, /* type */
   "hsa", /* name */
-  OPTGROUP_NONE, /* optinfo_flags */
+  OPTGROUP_OMP, /* optinfo_flags */
   TV_IPA_HSA, /* tv_id */
   0, /* properties_required */
   0, /* properties_provided */
diff --git gcc/omp-simd-clone.c gcc/omp-simd-clone.c
index 09ad40b..99589d4 100644
--- gcc/omp-simd-clone.c
+++ gcc/omp-simd-clone.c
@@ -1690,7 +1690,7 @@ const pass_data pass_data_omp_simd_clone =
 {
   SIMPLE_IPA_PASS,		/* type */
   "simdclone",			/* name */
-  OPTGROUP_NONE,		/* optinfo_flags */
+  OPTGROUP_OMP,			/* optinfo_flags */
   TV_NONE,			/* tv_id */
   ( PROP_ssa | PROP_cfg ),	/* properties_required */
   0,				/* properties_provided */


Backported to gomp-4_0-branch in r245771:

commit c19f2d3949a534fab6e8e6385b56067dff48d5a9
Author: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Tue Feb 28 08:46:04 2017 +0000

    Miscellaneous optimization group fixes
    
    Backport from trunk r245769:
    
            gcc/
            * doc/optinfo.texi (Optimization groups): Fix option used for
            OPTGROUP_ALL.
            * doc/invoke.texi (-fopt-info): Document "omp".
            * dumpfile.h: Sort OPTGROUP_OMP before OPTGROUP_VEC.
            (OPTGROUP_ALL): Add OPTGROUP_OMP.
            * hsa-gen.c (pass_data_gen_hsail): Use OPTGROUP_OMP.
            * ipa-hsa.c (pass_data_ipa_hsa): Likewise.
            * omp-simd-clone.c (pass_data_omp_simd_clone): Likewise.
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gomp-4_0-branch@245771 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog.gomp   | 12 ++++++++++++
 gcc/doc/invoke.texi  |  2 ++
 gcc/doc/optinfo.texi |  2 +-
 gcc/dumpfile.h       |  6 +++---
 gcc/hsa-gen.c        |  2 +-
 gcc/ipa-hsa.c        |  2 +-
 gcc/omp-simd-clone.c |  2 +-
 7 files changed, 21 insertions(+), 7 deletions(-)

diff --git gcc/ChangeLog.gomp gcc/ChangeLog.gomp
index 00a5b49..5b76668 100644
--- gcc/ChangeLog.gomp
+++ gcc/ChangeLog.gomp
@@ -1,5 +1,17 @@
 2017-02-28  Thomas Schwinge  <thomas@codesourcery.com>
 
+	Backport from trunk r245769:
+	2017-02-28  Thomas Schwinge  <thomas@codesourcery.com>
+
+	* doc/optinfo.texi (Optimization groups): Fix option used for
+	OPTGROUP_ALL.
+	* doc/invoke.texi (-fopt-info): Document "omp".
+	* dumpfile.h: Sort OPTGROUP_OMP before OPTGROUP_VEC.
+	(OPTGROUP_ALL): Add OPTGROUP_OMP.
+	* hsa-gen.c (pass_data_gen_hsail): Use OPTGROUP_OMP.
+	* ipa-hsa.c (pass_data_ipa_hsa): Likewise.
+	* omp-simd-clone.c (pass_data_omp_simd_clone): Likewise.
+
 	Backport from trunk r245768:
 	2017-02-28  Thomas Schwinge  <thomas@codesourcery.com>
 
diff --git gcc/doc/invoke.texi gcc/doc/invoke.texi
index fd8ba42..299dab1 100644
--- gcc/doc/invoke.texi
+++ gcc/doc/invoke.texi
@@ -12240,6 +12240,8 @@ Enable dumps from all interprocedural optimizations.
 Enable dumps from all loop optimizations.
 @item inline
 Enable dumps from all inlining optimizations.
+@item omp
+Enable dumps from all OMP (Offloading and Multi Processing) optimizations.
 @item vec
 Enable dumps from all vectorization optimizations.
 @item optall
diff --git gcc/doc/optinfo.texi gcc/doc/optinfo.texi
index 1cf3f41..ff4573d 100644
--- gcc/doc/optinfo.texi
+++ gcc/doc/optinfo.texi
@@ -70,7 +70,7 @@ Vectorization passes. Enabled by @option{-vec}.
 All other optimization passes which do not fall into one of the above.
 
 @item OPTGROUP_ALL
-All optimization passes. Enabled by @option{-all}.
+All optimization passes. Enabled by @option{-optall}.
 
 @end ftable
 
diff --git gcc/dumpfile.h gcc/dumpfile.h
index eb10db3..5d87239 100644
--- gcc/dumpfile.h
+++ gcc/dumpfile.h
@@ -96,12 +96,12 @@ enum tree_dump_index
 #define OPTGROUP_IPA         (1 << 1)   /* IPA optimization passes */
 #define OPTGROUP_LOOP        (1 << 2)   /* Loop optimization passes */
 #define OPTGROUP_INLINE      (1 << 3)   /* Inlining passes */
-#define OPTGROUP_VEC         (1 << 4)   /* Vectorization passes */
-#define OPTGROUP_OMP         (1 << 5)   /* OMP (Offloading and Multi
+#define OPTGROUP_OMP         (1 << 4)   /* OMP (Offloading and Multi
 					   Processing) transformations */
+#define OPTGROUP_VEC         (1 << 5)   /* Vectorization passes */
 #define OPTGROUP_OTHER       (1 << 6)   /* All other passes */
 #define OPTGROUP_ALL	     (OPTGROUP_IPA | OPTGROUP_LOOP | OPTGROUP_INLINE \
-                              | OPTGROUP_VEC | OPTGROUP_OTHER)
+                              | OPTGROUP_OMP | OPTGROUP_VEC | OPTGROUP_OTHER)
 
 /* Define a tree dump switch.  */
 struct dump_file_info
diff --git gcc/hsa-gen.c gcc/hsa-gen.c
index cf7d434..0c54557 100644
--- gcc/hsa-gen.c
+++ gcc/hsa-gen.c
@@ -6373,7 +6373,7 @@ const pass_data pass_data_gen_hsail =
 {
   GIMPLE_PASS,
   "hsagen",	 			/* name */
-  OPTGROUP_NONE,			/* optinfo_flags */
+  OPTGROUP_OMP,				/* optinfo_flags */
   TV_NONE,				/* tv_id */
   PROP_cfg | PROP_ssa,			/* properties_required */
   0,					/* properties_provided */
diff --git gcc/ipa-hsa.c gcc/ipa-hsa.c
index 769657f..058ede8 100644
--- gcc/ipa-hsa.c
+++ gcc/ipa-hsa.c
@@ -284,7 +284,7 @@ const pass_data pass_data_ipa_hsa =
 {
   IPA_PASS, /* type */
   "hsa", /* name */
-  OPTGROUP_NONE, /* optinfo_flags */
+  OPTGROUP_OMP, /* optinfo_flags */
   TV_IPA_HSA, /* tv_id */
   0, /* properties_required */
   0, /* properties_provided */
diff --git gcc/omp-simd-clone.c gcc/omp-simd-clone.c
index 58ce6cb..3991ede 100644
--- gcc/omp-simd-clone.c
+++ gcc/omp-simd-clone.c
@@ -1659,7 +1659,7 @@ const pass_data pass_data_omp_simd_clone =
 {
   SIMPLE_IPA_PASS,		/* type */
   "simdclone",			/* name */
-  OPTGROUP_NONE,		/* optinfo_flags */
+  OPTGROUP_OMP,			/* optinfo_flags */
   TV_NONE,			/* tv_id */
   ( PROP_ssa | PROP_cfg ),	/* properties_required */
   0,				/* properties_provided */
