Re: Miscellaneous optimization group fixes (was: Rename the "openmp" group of optimizations to "omp")

2017-02-22 Thread Martin Jambor
Hi,

On Wed, Feb 22, 2017 at 08:58:06AM +0100, Thomas Schwinge wrote:
> > 
> > Rename the "openmp" group of optimizations to "omp"
> > 
> > gcc/
> > * dumpfile.h (OPTGROUP_OPENMP): Rename to OPTGROUP_OMP.  Adjust
> > all users.
> > * dumpfile.c (optgroup_options): Instead of "openmp", associate
> > OPTGROUP_OMP with "omp".


I am of course fine with OPTGROUP_OMP.

> 
> On top of that, OK to commit the following (not yet tested) -- these all
> look like oversights to me, but please verify?

The missing documentation is an oversight.  Thanks for spotting it.

Martin


> 
> commit 9865976a121c1bd0fc59ea75e819924733f7ea98
> Author: Thomas Schwinge 
> Date:   Wed Feb 22 08:32:54 2017 +0100
> 
> Miscellaneous optimization group fixes
> 
> gcc/doc/
> * invoke.texi (-fopt-info): Document "omp".
> * optinfo.texi (Optimization groups): Fix option used for
> OPTGROUP_ALL.
> gcc/
> * dumpfile.h: Sort OPTGROUP_OMP before OPTGROUP_VEC.
> * 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.



Miscellaneous optimization group fixes (was: Rename the "openmp" group of optimizations to "omp")

2017-02-21 Thread Thomas Schwinge
Hi!

On Wed, 22 Feb 2017 08:48:40 +0100, I wrote:
> On Tue, 22 Nov 2016 14:43:02 +0100, Martin Jambor  wrote:
> > On Fri, Nov 18, 2016 at 11:38:56AM +0100, Jakub Jelinek wrote:
> > > On Sun, Nov 13, 2016 at 10:42:01PM +0100, Martin Jambor wrote:
> > > > @@ -14133,7 +14183,7 @@ const pass_data pass_data_expand_omp =
> > > >  {
> > > >GIMPLE_PASS, /* type */
> > > >"ompexp", /* name */
> > > > -  OPTGROUP_NONE, /* optinfo_flags */
> > > > +  OPTGROUP_OPENMP, /* optinfo_flags */
> > > >TV_NONE, /* tv_id */
> > > >PROP_gimple_any, /* properties_required */
> > > >PROP_gimple_eomp, /* properties_provided */
> 
> Thanks for that!  (I noticed there is no testsuite coverage, though.)

> > > What about the simdclone, omptargetlink, diagnose_omp_blocks passes?  
> > > What about
> > > openacc specific passes (oaccdevlow)?  And Alex is hopefully going to add
> > > ompdevlow pass soon.
> > 
> > I was not sure about those at first, but I suppose all of them should
> > also be in the same group (though I hope the name is still fine)
> 
> According to similar "rebrandings" regarding "omp", OK to commit the
> following (not yet tested)?
> 
> commit e878bc10881810adf64891f76c503fd1d83fb536
> Author: Thomas Schwinge 
> Date:   Wed Feb 22 08:25:32 2017 +0100
> 
> Rename the "openmp" group of optimizations to "omp"
> 
> gcc/
> * dumpfile.h (OPTGROUP_OPENMP): Rename to OPTGROUP_OMP.  Adjust
> all users.
> * dumpfile.c (optgroup_options): Instead of "openmp", associate
> OPTGROUP_OMP with "omp".

On top of that, OK to commit the following (not yet tested) -- these all
look like oversights to me, but please verify?

commit 9865976a121c1bd0fc59ea75e819924733f7ea98
Author: Thomas Schwinge 
Date:   Wed Feb 22 08:32:54 2017 +0100

Miscellaneous optimization group fixes

gcc/doc/
* invoke.texi (-fopt-info): Document "omp".
* optinfo.texi (Optimization groups): Fix option used for
OPTGROUP_ALL.
gcc/
* dumpfile.h: Sort OPTGROUP_OMP before OPTGROUP_VEC.
* 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.
---
 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 +-
 6 files changed, 9 insertions(+), 7 deletions(-)

diff --git gcc/doc/invoke.texi gcc/doc/invoke.texi
index 26bc146..356727b 100644
--- gcc/doc/invoke.texi
+++ gcc/doc/invoke.texi
@@ -13165,6 +13165,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,