public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] pass filtering for -fopt-info
@ 2012-10-30  9:06 Sharad Singhai
  2012-10-30 15:37 ` Richard Biener
  2012-10-30 16:02 ` Xinliang David Li
  0 siblings, 2 replies; 7+ messages in thread
From: Sharad Singhai @ 2012-10-30  9:06 UTC (permalink / raw)
  To: gcc-patches; +Cc: Richard Biener, David Li

[-- Attachment #1: Type: text/plain, Size: 1728 bytes --]

As per discussion in http://gcc.gnu.org/ml/gcc/2012-10/msg00225.html,
I have added the -fopt-info pass filtering in the attached patch.

The basic idea is that there are optimization pass groups and a user
can selectively enable dumps for these group(s) via command-line
syntax. Currently, I define the following optimization groups: 'loop',
'lto', 'inline', 'vec', and 'omp'. A pass can be in multiple groups.

If a pass doesn't explicitly specify an optimization group, (denoted
by OPTGROUP_NONE) then a group is assigned based on the pass type.
These three are the obvious implicit groups: 'tree', 'ipa', and 'rtl'.

Also there is a catch-all group, called 'optall'.

The options for -fopt-info dumps verbosity remain 'optimized',
'missed', 'note', and 'all'. Since these two types of options,
verbosity and optimization groups are non-overlapping, I have decided
to freely mix them. Something like this works as expected, i.e., dump
missed vectorizer info into vec.missed.

gcc ... -fopt-info-vec-missed=vec.missed

which is equivalent to

gcc ... -fopt-info-missed-vec=vec.missed

However, the order still matters, and it can be somewhat confusing. For example,

gcc -fopt-info-vec-missed=vec.miss -fopt-info-vec-optimized=vec.opt

will dump missed and optimized vectorizer info into vec.opt, while no
vec.miss is produced. This is due to the fact that the latter group
specifier, 'vec' overrides the first one. However, the 'missed' and
'optimized' are both honored as there is no conflict there. This is
somewhat confusing. Hopefully, this type of usage would not be common.

I have updated the documentation to include -fopt-info examples, and
added some details about -fopt-info command line conflicts.

Thanks,
Sharad

[-- Attachment #2: opt_dump_group.4.patch --]
[-- Type: application/octet-stream, Size: 105405 bytes --]

2012-10-30  Sharad Singhai  <singhai@google.com>

	* doc/invoke.texi: Update -fopt-info documentation.
	* dumpfile.c: Move dump_flags here from passes.c.
	(dump_files): Add field for optinfo_flags for the static initializer.
	(dump_register): Handle additional parameter for optgroup_flags.
	(opt_info_enable_passes): Renamed opt_info_enable_all. Handle
	optgroup_flags. Fix documentation.
	(opt_info_switch_p_1): Handle optgroup options.
	* dumpfile.h (dump_register): Additional argument for optgroup_flags.
	All callers updated.
	(struct dump_file_info): Add field for optgroup_flags.
	Define OPTGROUP_* flags.
	* tree-pass.h (struct opt_pass): Add addtional field for optinfo_flags.
	All static initializers updated.
	* opts-global.c (dump_remap_tree_vectorizer_verbose): Use 'all'
	instead of 'optall'.
	* passes.c (register_one_dump_file): Add argument for optgroup_flags.
	Move dump_flags from here to dumpfile.c.
	* statistics.c (statistics_early_init): Use OPTGROUP_NONE in call to
	dump_register.

Index: tree-vrp.c
===================================================================
--- tree-vrp.c	(revision 192975)
+++ tree-vrp.c	(working copy)
@@ -9234,6 +9234,7 @@ struct gimple_opt_pass pass_vrp =
  {
   GIMPLE_PASS,
   "vrp",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_vrp,				/* gate */
   execute_vrp,				/* execute */
   NULL,					/* sub */
Index: regrename.c
===================================================================
--- regrename.c	(revision 192975)
+++ regrename.c	(working copy)
@@ -1842,6 +1842,7 @@ struct rtl_opt_pass pass_regrename =
  {
   RTL_PASS,
   "rnreg",                              /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_regrename,                /* gate */
   regrename_optimize,                   /* execute */
   NULL,                                 /* sub */
Index: fwprop.c
===================================================================
--- fwprop.c	(revision 192975)
+++ fwprop.c	(working copy)
@@ -1486,6 +1486,7 @@ struct rtl_opt_pass pass_rtl_fwprop =
  {
   RTL_PASS,
   "fwprop1",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_fwprop,				/* gate */
   fwprop,				/* execute */
   NULL,                                 /* sub */
@@ -1535,6 +1536,7 @@ struct rtl_opt_pass pass_rtl_fwprop_addr =
  {
   RTL_PASS,
   "fwprop2",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_fwprop,				/* gate */
   fwprop_addr,				/* execute */
   NULL,                                 /* sub */
Index: doc/invoke.texi
===================================================================
--- doc/invoke.texi	(revision 192975)
+++ doc/invoke.texi	(working copy)
@@ -6021,59 +6021,114 @@ Enable all the available tree dumps with the flags
 @itemx -fopt-info-@var{options}
 @itemx -fopt-info-@var{options}=@var{filename}
 @opindex fopt-info
-Controls optimization dumps from all the passes. If the
+Controls optimization dumps from various optimization passes. If the
 @samp{-@var{options}} form is used, @var{options} is a list of
-@samp{-} separated options to control the dump details.  If
-@var{options} is not specified, it defaults to @option{optall}. If the
-@var{filename} is not specified, it defaults to @file{stderr}. Note
-that the output @var{filename} will be overwritten in case of multiple
-translation units. If a combined output from multiple translation
-units is desired, @file{stderr} should be used instead.
+@samp{-} separated options to select the dump details and
+optimizations.  If @var{options} is not specified, it defaults to
+@option{all} for details and @option{optall} for optimization
+groups. If the @var{filename} is not specified, it defaults to
+@file{stderr}. Note that the output @var{filename} will be overwritten
+in case of multiple translation units. If a combined output from
+multiple translation units is desired, @file{stderr} should be used
+instead.
 
-The following options are available
+The options can be divided into two groups, 1) options describing the
+verbosity of the dump, and 2) options describing which optimizations
+should be included. The options from both the groups can be freely
+mixed as they are non-overlapping. However, in case of any conflicts,
+the latter options override the earlier options on the command line.
 
+The first group has the following options.
+
 @table @samp
 @item optimized
 Print information when an optimization is successfully applied. It is
 up to a pass to decide which information is relevant. For example, the
-vectorizer pass prints the location of loop which got vectorized.
+vectorizer passes print the source location of loops which got
+successfully vectorized.
 @item missed
 Print information about missed optimizations. Individual passes
-control which information to include in the output. For example,
+control which informations to include in the output. For example,
 
 @smallexample
-gcc -O2 -ftree-vectorize -fopt-info-missed
+gcc -O2 -ftree-vectorize -fopt-info-vec-missed
 @end smallexample
 
-will print information about missed optimization opportunities on
-stderr.
+will print information about missed optimization opportunities from
+vectorization passes on stderr.
 @item note
 Print verbose information about optimizations, such as certain
 transformations, more detailed messages about decisions etc.
-@item optall
+@item all
 Print detailed optimization information. This includes
-@var{optimized}, @var{missed}, and @var{note}. For example,
+@var{optimized}, @var{missed}, and @var{note}.
+@end table
 
+The second set of options describes a group of optimizations and can
+be one or more of the following.
+
+@table @samp
+@item tree
+Enable dumps from all the tree optimizaitons.
+@item ipa
+Enable dumps from all interprocedural optimizations.
+@item rtl
+Enable dumps from all interprocedural optimizations.
+@item loop
+Enable dumps from all loop optimizations.
+@item lto
+Enable dumps from all link-time optimizer (LTO).
+@item inline
+Enable dumps from all inlining optimizations.
+@item vec
+Enable dumps from all vectorization optimizations.
+@item omp
+Enable dumps from all OpenMP optimizations.
+@item optall
+Enabled dumps from all optimizations. (default).
+@end table
+
+For example,
 @smallexample
-gcc -O2 -ftree-vectorize -fopt-info-optall=opt.all
+gcc -O3 -fopt-info-missed-optall=missed.all
 @end smallexample
 
-outputs detailed optimization report from all the passes into
-@file{opt.all}.
-@end table
+outputs missed optimization report from all the passes into
+@file{missed.all}.
 
-It applies the dump options to all the passes. If the @var{filename}
-is provided, the dump from all the passes is concatenated, otherwise
-the dump is output onto @file{stderr}. If @var{options} is omitted, it
-defaults to @option{optall}.
+As another example,
+@smallexample
+gcc -O3 -fopt-info-tree-optimized-missed=treeopt.txt
+@end smallexample
 
+will output information about missed optimizations as well as
+optimized locations from all the tree passes into @file{treeopt.txt}.
+
+If the @var{filename} is provided, the dumps from all the applicable
+optimizations are concatenated into the @file{filename}, otherwise the
+dump is output onto @file{stderr}. If @var{options} is omitted, it
+defaults to @option{all-optall}, which means dump all available
+optimization info from all the passes. In the following example, all
+optimization info is output on to @file{stderr}.
+
 @smallexample
-gcc -O3 -fopt-info-optimized-missed=optdump.txt
+gcc -O3 -fopt-info
 @end smallexample
 
-This will output information about missed optimizations as well as
-optimized locations from all the passes into @file{optdump.txt}.
+Note that @option{-fopt-info-lto-missed} behaves same as
+@option{-fopt-info-missed-lto}. However, the order is important in
+case of conflicts. For example consider
 
+@smallexample
+gcc -fopt-info-vec-missed=vec.miss -fopt-info-vec-optimized=vec.opt
+@end smallexample
+
+Here the dump detail options are not in conflict, and both
+@option{missed} and @option{optimized} dumps are generated. However,
+the optimization group @option{vec} is in conflict, and the latter
+option overrides. Thus the missed and optimized vectorization dumps
+are produced in @file{vec.opt} file.
+
 @item -ftree-vectorizer-verbose=@var{n}
 @opindex ftree-vectorizer-verbose
 This option is deprecated and is implemented in terms of
Index: tree-into-ssa.c
===================================================================
--- tree-into-ssa.c	(revision 192975)
+++ tree-into-ssa.c	(working copy)
@@ -2404,6 +2404,7 @@ struct gimple_opt_pass pass_build_ssa =
  {
   GIMPLE_PASS,
   "ssa",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   rewrite_into_ssa,			/* execute */
   NULL,					/* sub */
Index: tree-complex.c
===================================================================
--- tree-complex.c	(revision 192975)
+++ tree-complex.c	(working copy)
@@ -1608,6 +1608,7 @@ struct gimple_opt_pass pass_lower_complex =
  {
   GIMPLE_PASS,
   "cplxlower",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   0,					/* gate */
   tree_lower_complex,			/* execute */
   NULL,					/* sub */
@@ -1638,6 +1639,7 @@ struct gimple_opt_pass pass_lower_complex_O0 =
  {
   GIMPLE_PASS,
   "cplxlower0",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_no_optimization,			/* gate */
   tree_lower_complex,			/* execute */
   NULL,					/* sub */
Index: cgraphbuild.c
===================================================================
--- cgraphbuild.c	(revision 192975)
+++ cgraphbuild.c	(working copy)
@@ -370,6 +370,7 @@ struct gimple_opt_pass pass_build_cgraph_edges =
  {
   GIMPLE_PASS,
   "*build_cgraph_edges",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   build_cgraph_edges,			/* execute */
   NULL,					/* sub */
@@ -487,6 +488,7 @@ struct gimple_opt_pass pass_rebuild_cgraph_edges =
  {
   GIMPLE_PASS,
   "*rebuild_cgraph_edges",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   rebuild_cgraph_edges,			/* execute */
   NULL,					/* sub */
@@ -514,6 +516,7 @@ struct gimple_opt_pass pass_remove_cgraph_callee_e
  {
   GIMPLE_PASS,
   "*remove_cgraph_callee_edges",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   remove_cgraph_callee_edges,		/* execute */
   NULL,					/* sub */
Index: tree-ssa-uninit.c
===================================================================
--- tree-ssa-uninit.c	(revision 192975)
+++ tree-ssa-uninit.c	(working copy)
@@ -2037,6 +2037,7 @@ struct gimple_opt_pass pass_late_warn_uninitialize
  {
   GIMPLE_PASS,
   "uninit",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_warn_uninitialized,		/* gate */
   execute_late_warn_uninitialized,	/* execute */
   NULL,					/* sub */
Index: tracer.c
===================================================================
--- tracer.c	(revision 192975)
+++ tracer.c	(working copy)
@@ -403,6 +403,7 @@ struct gimple_opt_pass pass_tracer =
  {
   GIMPLE_PASS,
   "tracer",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_tracer,                          /* gate */
   tracer,                               /* execute */
   NULL,                                 /* sub */
Index: tree-loop-distribution.c
===================================================================
--- tree-loop-distribution.c	(revision 192975)
+++ tree-loop-distribution.c	(working copy)
@@ -1578,6 +1578,7 @@ struct gimple_opt_pass pass_loop_distribution =
  {
   GIMPLE_PASS,
   "ldist",			/* name */
+  OPTGROUP_LOOP,                /* optinfo_flags */
   gate_tree_loop_distribution,  /* gate */
   tree_loop_distribution,       /* execute */
   NULL,				/* sub */
Index: postreload-gcse.c
===================================================================
--- postreload-gcse.c	(revision 192975)
+++ postreload-gcse.c	(working copy)
@@ -1328,6 +1328,7 @@ struct rtl_opt_pass pass_gcse2 =
  {
   RTL_PASS,
   "gcse2",                              /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_gcse2,                    /* gate */
   rest_of_handle_gcse2,                 /* execute */
   NULL,                                 /* sub */
Index: dumpfile.c
===================================================================
--- dumpfile.c	(revision 192975)
+++ dumpfile.c	(working copy)
@@ -43,34 +43,35 @@ static FILE *dump_open_alternate_stream (struct du
 FILE *dump_file = NULL;
 FILE *alt_dump_file = NULL;
 const char *dump_file_name;
+int dump_flags;
 
 /* Table of tree dump switches. This must be consistent with the
    TREE_DUMP_INDEX enumeration in dumpfile.h.  */
 static struct dump_file_info dump_files[TDI_end] =
 {
-  {NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0},
+  {NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0},
   {".cgraph", "ipa-cgraph", NULL, NULL, NULL, NULL, NULL, TDF_IPA,
-   0, 0, 0, 0},
+   0, 0, 0, 0, 0},
   {".tu", "translation-unit", NULL, NULL, NULL, NULL, NULL, TDF_TREE,
-   0, 0, 0, 1},
+   0, 0, 0, 0, 1},
   {".class", "class-hierarchy", NULL, NULL, NULL, NULL, NULL, TDF_TREE,
-   0, 0, 0, 2},
+   0, 0, 0, 0, 2},
   {".original", "tree-original", NULL, NULL, NULL, NULL, NULL, TDF_TREE,
-   0, 0, 0, 3},
+   0, 0, 0, 0, 3},
   {".gimple", "tree-gimple", NULL, NULL, NULL, NULL, NULL, TDF_TREE,
-   0, 0, 0, 4},
+   0, 0, 0, 0, 4},
   {".nested", "tree-nested", NULL, NULL, NULL, NULL, NULL, TDF_TREE,
-   0, 0, 0, 5},
+   0, 0, 0, 0, 5},
   {".vcg", "tree-vcg", NULL, NULL, NULL, NULL, NULL, TDF_TREE,
-   0, 0, 0, 6},
+   0, 0, 0, 0, 6},
 #define FIRST_AUTO_NUMBERED_DUMP 7
 
   {NULL, "tree-all", NULL, NULL, NULL, NULL, NULL, TDF_TREE,
-   0, 0, 0, 0},
+   0, 0, 0, 0, 0},
   {NULL, "rtl-all", NULL, NULL, NULL, NULL, NULL, TDF_RTL,
-   0, 0, 0, 0},
+   0, 0, 0, 0, 0},
   {NULL, "ipa-all", NULL, NULL, NULL, NULL, NULL, TDF_IPA,
-   0, 0, 0, 0},
+   0, 0, 0, 0, 0},
 };
 
 /* Dynamically registered tree dump files and switches.  */
@@ -117,24 +118,45 @@ static const struct dump_option_value_info dump_op
   {NULL, 0}
 };
 
-/* A subset of the dump_options table which is used for opt-info
-   options. This must be consistent with the MSG_* flags in
-   dump_options.
+/* A subset of the dump_options table which is used for -fopt-info
+   types. This must be consistent with the MSG_* flags in dumpfile.h.
  */
 static const struct dump_option_value_info opt_info_options[] =
 {
   {"optimized", MSG_OPTIMIZED_LOCATIONS},
   {"missed", MSG_MISSED_OPTIMIZATION},
   {"note", MSG_NOTE},
-  {"optall", (MSG_OPTIMIZED_LOCATIONS
+  {"all", (MSG_OPTIMIZED_LOCATIONS
            | MSG_MISSED_OPTIMIZATION
            | MSG_NOTE)},
   {NULL, 0}
 };
 
+/* Flags used for -fopt-info groups.  */
+static const struct dump_option_value_info optgroup_options[] =
+{
+  {"tree", OPTGROUP_TREE},
+  {"ipa", OPTGROUP_IPA},
+  {"rtl", OPTGROUP_RTL},
+  {"loop", OPTGROUP_LOOP},
+  {"lto", OPTGROUP_LTO},
+  {"inline", OPTGROUP_INLINE},
+  {"vec", OPTGROUP_VEC},
+  {"omp", OPTGROUP_OMP},
+  {"optall", (OPTGROUP_TREE
+              | OPTGROUP_IPA
+              | OPTGROUP_RTL
+              | OPTGROUP_LOOP
+              | OPTGROUP_LTO
+              | OPTGROUP_INLINE
+              | OPTGROUP_VEC
+              | OPTGROUP_OMP)},
+  {NULL, 0}
+};
+
 unsigned int
 dump_register (const char *suffix, const char *swtch, const char *glob,
-	       int flags)
+	       int flags, int optgroup_flags)
 {
   static int next_dump = FIRST_AUTO_NUMBERED_DUMP;
   int num = next_dump++;
@@ -157,6 +179,7 @@ dump_register (const char *suffix, const char *swt
   extra_dump_files[count].swtch = swtch;
   extra_dump_files[count].glob = glob;
   extra_dump_files[count].pflags = flags;
+  extra_dump_files[count].optgroup_flags = optgroup_flags;
   extra_dump_files[count].num = num;
 
   return count + TDI_end;
@@ -376,8 +399,8 @@ dump_printf_loc (int dump_kind, source_location lo
 /* Start a dump for PHASE. Store user-supplied dump flags in
    *FLAG_PTR.  Return the number of streams opened.  Set globals
    DUMP_FILE, and ALT_DUMP_FILE to point to the opened streams, and
-   set dump_flags appropriately for both pass dump stream and opt-info
-   stream. */
+   set dump_flags appropriately for both pass dump stream and
+   -fopt-info stream. */
 
 int
 dump_start (int phase, int *flag_ptr)
@@ -418,7 +441,7 @@ dump_start (int phase, int *flag_ptr)
       dfi->alt_stream = stream;
       count++;
       alt_dump_file = dfi->alt_stream;
-      /* Initialize current opt-info flags. */
+      /* Initialize current -fopt-info flags. */
       alt_flags = dfi->alt_flags;
     }
 
@@ -603,18 +626,19 @@ dump_enable_all (int flags, const char *filename)
   return n;
 }
 
-/* Enable opt-info dumps on all IR_DUMP_TYPE passes with FLAGS on
-   FILENAME.  Return the number of enabled dumps.  */
+/* Enable -fopt-info dumps on all dump files matching OPTGROUP_FLAGS.
+   Enable dumps with FLAGS on FILENAME.  Return the number of enabled
+   dumps.  */
 
 static int
-opt_info_enable_all (int ir_dump_type, int flags, const char *filename)
+opt_info_enable_passes (int optgroup_flags, int flags, const char *filename)
 {
   int n = 0;
   size_t i;
 
   for (i = TDI_none + 1; i < (size_t) TDI_end; i++)
     {
-      if ((dump_files[i].pflags & ir_dump_type))
+      if ((dump_files[i].optgroup_flags & optgroup_flags))
         {
           const char *old_filename = dump_files[i].alt_filename;
           /* Since this file is shared among different passes, it
@@ -632,7 +656,7 @@ static int
 
   for (i = 0; i < extra_dump_files_in_use; i++)
     {
-      if ((extra_dump_files[i].pflags & ir_dump_type))
+      if ((extra_dump_files[i].optgroup_flags & optgroup_flags))
         {
           const char *old_filename = extra_dump_files[i].alt_filename;
           /* Since this file is shared among different passes, it
@@ -753,11 +777,12 @@ dump_switch_p (const char *arg)
   return any;
 }
 
-/* Parse ARG as a -fopt-info switch and store flags and filename.
-   Return non-zero if it is a recognized switch.  */
+/* Parse ARG as a -fopt-info switch and store flags, optgroup_flags
+   and filename.  Return non-zero if it is a recognized switch.  */
 
 static int
-opt_info_switch_p_1 (const char *arg, int *flags, char **filename)
+opt_info_switch_p_1 (const char *arg, int *flags, int *optgroup_flags,
+                     char **filename)
 {
   const char *option_value;
   const char *ptr;
@@ -767,9 +792,10 @@ static int
 
   *filename = NULL;
   *flags = 0;
+  *optgroup_flags = 0;
 
   if (!ptr)
-    return 1;
+    return 1;       /* Handle '-fopt-info' without any additional options.  */
 
   while (*ptr)
     {
@@ -798,6 +824,14 @@ static int
 	    goto found;
           }
 
+      for (option_ptr = optgroup_options; option_ptr->name; option_ptr++)
+	if (strlen (option_ptr->name) == length
+	    && !memcmp (option_ptr->name, ptr, length))
+          {
+            *optgroup_flags |= option_ptr->value;
+	    goto found;
+          }
+
       if (*ptr == '=')
         {
           /* Interpret rest of the argument as a dump filename.  This
@@ -806,8 +840,11 @@ static int
           break;
         }
       else
-        warning (0, "ignoring unknown option %q.*s in %<-fopt-info=%s%>",
-                 length, ptr, arg);
+        {
+          warning (0, "unknown option %q.*s in %<-fopt-info-%s%>",
+                   length, ptr, arg);
+          return 0;
+        }
     found:;
       ptr = end_ptr;
     }
@@ -822,16 +859,20 @@ int
 opt_info_switch_p (const char *arg)
 {
   int flags;
+  int optgroup_flags;
   char *filename;
 
-  opt_info_switch_p_1 (arg, &flags, &filename);
+  if (!opt_info_switch_p_1 (arg, &flags, &optgroup_flags, &filename))
+    return 0;
 
   if (!filename)
     filename = xstrdup ("stderr");
   if (!flags)
     flags = MSG_ALL;
+  if (!optgroup_flags)
+    optgroup_flags = OPTGROUP_ALL;
 
-  return opt_info_enable_all ((TDF_TREE | TDF_RTL | TDF_IPA), flags, filename);
+  return opt_info_enable_passes (optgroup_flags, flags, filename);
 }
 
 /* Print basic block on the dump streams.  */
Index: dumpfile.h
===================================================================
--- dumpfile.h	(revision 192975)
+++ dumpfile.h	(working copy)
@@ -25,7 +25,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "line-map.h"
 
 /* Different tree dump places.  When you add new tree dump places,
-   extend the DUMP_FILES array in tree-dump.c.  */
+   extend the DUMP_FILES array in dumpfile.c.  */
 enum tree_dump_index
 {
   TDI_none,			/* No dump */
@@ -46,9 +46,9 @@ enum tree_dump_index
 
 /* Bit masks to control dumping. Not all values are applicable to all
    dumps. Add new ones at the end. When you define new values, extend
-   the DUMP_OPTIONS array in tree-dump.c. The TDF_* flags coexist with
-   MSG_* flags (for -fopt-info) and the bit values must be chosen
-   to allow that.  */
+   the DUMP_OPTIONS array in dumpfile.c. The TDF_* flags coexist with
+   MSG_* flags (for -fopt-info) and the bit values must be chosen to
+   allow that.  */
 #define TDF_ADDRESS	(1 << 0)	/* dump node addresses */
 #define TDF_SLIM	(1 << 1)	/* don't go wild following links */
 #define TDF_RAW  	(1 << 2)	/* don't unparse the function */
@@ -91,6 +91,25 @@ enum tree_dump_index
 #define MSG_ALL         (MSG_OPTIMIZED_LOCATIONS | MSG_MISSED_OPTIMIZATION \
                          | MSG_NOTE)
 
+
+/* Flags to control high-level -fopt-info dumps.  Usually these flags
+   define a group of passes.  An optimization pass can be part of
+   multiple groups.  If this flag is OPTGROUP_NONE then this pass
+   inherits optinfo group from the pass type, such as OPTGROUP_IPA,
+   OPTGROUP_TREE, or OPTGROUP_RTL.  */
+#define OPTGROUP_NONE        (0)
+#define OPTGROUP_TREE        (1 << 1)   /* tree optimization passes */
+#define OPTGROUP_IPA         (1 << 2)   /* IPA optimization passes */
+#define OPTGROUP_RTL         (1 << 3)   /* RTL optimization passes */
+#define OPTGROUP_LOOP        (1 << 4)   /* Loop optimization passes */
+#define OPTGROUP_LTO         (1 << 5)   /* LTO passes */
+#define OPTGROUP_INLINE      (1 << 6)   /* Inlining passes */
+#define OPTGROUP_VEC         (1 << 7)   /* Vectorization passes */
+#define OPTGROUP_OMP         (1 << 8)   /* OpenMP passes */
+#define OPTGROUP_ALL	     (OPTGROUP_TREE | OPTGROUP_IPA | OPTGROUP_RTL \
+                              | OPTGROUP_LOOP | OPTGROUP_LTO | OPTGROUP_INLINE \
+                              | OPTGROUP_VEC | OPTGROUP_OMP)
+
 /* Define a tree dump switch.  */
 struct dump_file_info
 {
@@ -98,13 +117,14 @@ struct dump_file_info
   const char *swtch;            /* command line dump switch */
   const char *glob;             /* command line glob  */
   const char *pfilename;        /* filename for the pass-specific stream  */
-  const char *alt_filename;     /* filename for the opt-info stream  */
+  const char *alt_filename;     /* filename for the -fopt-info stream  */
   FILE *pstream;                /* pass-specific dump stream  */
-  FILE *alt_stream;             /* opt-info stream */
+  FILE *alt_stream;             /* -fopt-info stream */
+  int optgroup_flags;           /* optgroup flags for -fopt-info */
   int pflags;                   /* dump flags */
   int alt_flags;                /* flags for opt-info */
   int pstate;                   /* state of pass-specific stream */
-  int alt_state;                /* state of the opt-info stream */
+  int alt_state;                /* state of the -fopt-info stream */
   int num;                      /* dump file number */
 };
 
@@ -129,7 +149,7 @@ extern void dump_gimple_stmt_loc (int, source_loca
 extern void dump_gimple_stmt (int, int, gimple, int);
 extern void print_combine_total_stats (void);
 extern unsigned int dump_register (const char *, const char *, const char *,
-                                   int);
+                                   int, int);
 extern bool enable_rtl_dump_file (void);
 
 /* In combine.c  */
@@ -146,8 +166,7 @@ extern const char *dump_file_name;
 /* Return the dump_file_info for the given phase.  */
 extern struct dump_file_info *get_dump_file_info (int);
 
-/* Return true if any of the dumps are enabled, false otherwise. */
-
+/* Return true if any of the dumps is enabled, false otherwise. */
 static inline bool
 dump_enabled_p (void)
 {
Index: postreload.c
===================================================================
--- postreload.c	(revision 192975)
+++ postreload.c	(working copy)
@@ -2289,6 +2289,7 @@ struct rtl_opt_pass pass_postreload_cse =
  {
   RTL_PASS,
   "postreload",                         /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_postreload,               /* gate */
   rest_of_handle_postreload,            /* execute */
   NULL,                                 /* sub */
Index: tree-ssa-loop-ch.c
===================================================================
--- tree-ssa-loop-ch.c	(revision 192975)
+++ tree-ssa-loop-ch.c	(working copy)
@@ -260,6 +260,7 @@ struct gimple_opt_pass pass_ch =
  {
   GIMPLE_PASS,
   "ch",					/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_ch,				/* gate */
   copy_loop_headers,			/* execute */
   NULL,					/* sub */
Index: tree-tailcall.c
===================================================================
--- tree-tailcall.c	(revision 192975)
+++ tree-tailcall.c	(working copy)
@@ -1048,6 +1048,7 @@ struct gimple_opt_pass pass_tail_recursion =
  {
   GIMPLE_PASS,
   "tailr",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_tail_calls,			/* gate */
   execute_tail_recursion,		/* execute */
   NULL,					/* sub */
@@ -1067,6 +1068,7 @@ struct gimple_opt_pass pass_tail_calls =
  {
   GIMPLE_PASS,
   "tailc",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_tail_calls,			/* gate */
   execute_tail_calls,			/* execute */
   NULL,					/* sub */
Index: tree-ssa-strlen.c
===================================================================
--- tree-ssa-strlen.c	(revision 192975)
+++ tree-ssa-strlen.c	(working copy)
@@ -2016,6 +2016,7 @@ struct gimple_opt_pass pass_strlen =
  {
   GIMPLE_PASS,
   "strlen",			/* name */
+  OPTGROUP_NONE,                /* optinfo_flags */
   gate_strlen,			/* gate */
   tree_ssa_strlen,		/* execute */
   NULL,				/* sub */
Index: tree.c
===================================================================
--- tree.c	(revision 192975)
+++ tree.c	(working copy)
@@ -5292,6 +5292,7 @@ struct simple_ipa_opt_pass pass_ipa_free_lang_data
  {
   SIMPLE_IPA_PASS,
   "*free_lang_data",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   free_lang_data,			/* execute */
   NULL,					/* sub */
Index: tree-pass.h
===================================================================
--- tree-pass.h	(revision 192975)
+++ tree-pass.h	(working copy)
@@ -46,6 +46,12 @@ struct opt_pass
      name.  If the name starts with a star, no dump happens. */
   const char *name;
 
+  /* The -fopt-info optimization group flags as defined in dumpfile.h.
+     If this flag is OPTGROUP_NONE then this pass inherits optinfo
+     group from the pass type, such as OPTGROUP_IPA, OPTGROUP_TREE, or
+     OPTGROUP_RTL.  */
+  unsigned int optinfo_flags;
+
   /* If non-null, this pass and all sub-passes are executed only if
      the function returns true.  */
   bool (*gate) (void);
Index: ipa-cp.c
===================================================================
--- ipa-cp.c	(revision 192975)
+++ ipa-cp.c	(working copy)
@@ -2543,6 +2543,7 @@ struct ipa_opt_pass_d pass_ipa_cp =
  {
   IPA_PASS,
   "cp",				/* name */
+  OPTGROUP_NONE,                /* optinfo_flags */
   cgraph_gate_cp,		/* gate */
   ipcp_driver,			/* execute */
   NULL,				/* sub */
Index: final.c
===================================================================
--- final.c	(revision 192975)
+++ final.c	(working copy)
@@ -822,6 +822,7 @@ struct rtl_opt_pass pass_compute_alignments =
  {
   RTL_PASS,
   "alignments",                         /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   compute_alignments,                   /* execute */
   NULL,                                 /* sub */
@@ -4373,6 +4374,7 @@ struct rtl_opt_pass pass_final =
  {
   RTL_PASS,
   "final",                              /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_handle_final,                 /* execute */
   NULL,                                 /* sub */
@@ -4401,6 +4403,7 @@ struct rtl_opt_pass pass_shorten_branches =
  {
   RTL_PASS,
   "shorten",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_handle_shorten_branches,      /* execute */
   NULL,                                 /* sub */
@@ -4547,6 +4550,7 @@ struct rtl_opt_pass pass_clean_state =
  {
   RTL_PASS,
   "*clean_state",                       /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_clean_state,                  /* execute */
   NULL,                                 /* sub */
Index: tree-emutls.c
===================================================================
--- tree-emutls.c	(revision 192975)
+++ tree-emutls.c	(working copy)
@@ -815,6 +815,7 @@ struct simple_ipa_opt_pass pass_ipa_lower_emutls =
  {
   SIMPLE_IPA_PASS,
   "emutls",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_emutls,				/* gate */
   ipa_lower_emutls,			/* execute */
   NULL,                                 /* sub */
Index: omp-low.c
===================================================================
--- omp-low.c	(revision 192975)
+++ omp-low.c	(working copy)
@@ -5753,6 +5753,7 @@ struct gimple_opt_pass pass_expand_omp =
  {
   GIMPLE_PASS,
   "ompexp",				/* name */
+  OPTGROUP_OMP,                         /* optinfo_flags */
   gate_expand_omp,			/* gate */
   execute_expand_omp,			/* execute */
   NULL,					/* sub */
@@ -6927,6 +6928,7 @@ struct gimple_opt_pass pass_lower_omp =
  {
   GIMPLE_PASS,
   "omplower",				/* name */
+  OPTGROUP_OMP,                         /* optinfo_flags */
   NULL,					/* gate */
   execute_lower_omp,			/* execute */
   NULL,					/* sub */
@@ -7190,6 +7192,7 @@ struct gimple_opt_pass pass_diagnose_omp_blocks =
   {
     GIMPLE_PASS,
     "*diagnose_omp_blocks",		/* name */
+    OPTGROUP_OMP,                       /* optinfo_flags */
     gate_diagnose_omp_blocks,		/* gate */
     diagnose_omp_structured_block_errors,	/* execute */
     NULL,				/* sub */
Index: tree-ssa-dse.c
===================================================================
--- tree-ssa-dse.c	(revision 192975)
+++ tree-ssa-dse.c	(working copy)
@@ -356,6 +356,7 @@ struct gimple_opt_pass pass_dse =
  {
   GIMPLE_PASS,
   "dse",			/* name */
+  OPTGROUP_NONE,                /* optinfo_flags */
   gate_dse,			/* gate */
   tree_ssa_dse,			/* execute */
   NULL,				/* sub */
Index: ipa-reference.c
===================================================================
--- ipa-reference.c	(revision 192975)
+++ ipa-reference.c	(working copy)
@@ -1185,6 +1185,7 @@ struct ipa_opt_pass_d pass_ipa_reference =
  {
   IPA_PASS,
   "static-var",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_reference,			/* gate */
   propagate,			        /* execute */
   NULL,					/* sub */
Index: tree-ssa-uncprop.c
===================================================================
--- tree-ssa-uncprop.c	(revision 192975)
+++ tree-ssa-uncprop.c	(working copy)
@@ -585,6 +585,7 @@ struct gimple_opt_pass pass_uncprop =
  {
   GIMPLE_PASS,
   "uncprop",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_uncprop,				/* gate */
   tree_ssa_uncprop,			/* execute */
   NULL,					/* sub */
Index: auto-inc-dec.c
===================================================================
--- auto-inc-dec.c	(revision 192975)
+++ auto-inc-dec.c	(working copy)
@@ -1511,6 +1511,7 @@ struct rtl_opt_pass pass_inc_dec =
  {
   RTL_PASS,
   "auto_inc_dec",                       /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_auto_inc_dec,                    /* gate */
   rest_of_handle_auto_inc_dec,          /* execute */
   NULL,                                 /* sub */
Index: reorg.c
===================================================================
--- reorg.c	(revision 192975)
+++ reorg.c	(working copy)
@@ -4122,6 +4122,7 @@ struct rtl_opt_pass pass_delay_slots =
  {
   RTL_PASS,
   "dbr",                                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_delay_slots,              /* gate */
   rest_of_handle_delay_slots,           /* execute */
   NULL,                                 /* sub */
@@ -4156,6 +4157,7 @@ struct rtl_opt_pass pass_machine_reorg =
  {
   RTL_PASS,
   "mach",                               /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_machine_reorg,            /* gate */
   rest_of_handle_machine_reorg,         /* execute */
   NULL,                                 /* sub */
Index: tree-ssa-copyrename.c
===================================================================
--- tree-ssa-copyrename.c	(revision 192975)
+++ tree-ssa-copyrename.c	(working copy)
@@ -443,6 +443,7 @@ struct gimple_opt_pass pass_rename_ssa_copies =
  {
   GIMPLE_PASS,
   "copyrename",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_copyrename,			/* gate */
   rename_ssa_copies,			/* execute */
   NULL,					/* sub */
Index: tree-ssa-ccp.c
===================================================================
--- tree-ssa-ccp.c	(revision 192975)
+++ tree-ssa-ccp.c	(working copy)
@@ -2123,6 +2123,7 @@ struct gimple_opt_pass pass_ccp =
  {
   GIMPLE_PASS,
   "ccp",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_ccp,				/* gate */
   do_ssa_ccp,				/* execute */
   NULL,					/* sub */
@@ -2507,6 +2508,7 @@ struct gimple_opt_pass pass_fold_builtins =
  {
   GIMPLE_PASS,
   "fab",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_fold_all_builtins,		/* execute */
   NULL,					/* sub */
Index: compare-elim.c
===================================================================
--- compare-elim.c	(revision 192975)
+++ compare-elim.c	(working copy)
@@ -660,6 +660,7 @@ struct rtl_opt_pass pass_compare_elim_after_reload
  {
   RTL_PASS,
   "cmpelim",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_compare_elim_after_reload,	/* gate */
   execute_compare_elim_after_reload,	/* execute */
   NULL,					/* sub */
Index: df-core.c
===================================================================
--- df-core.c	(revision 192975)
+++ df-core.c	(working copy)
@@ -754,6 +754,7 @@ struct rtl_opt_pass pass_df_initialize_opt =
  {
   RTL_PASS,
   "dfinit",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_opt,                             /* gate */
   rest_of_handle_df_initialize,         /* execute */
   NULL,                                 /* sub */
@@ -781,6 +782,7 @@ struct rtl_opt_pass pass_df_initialize_no_opt =
  {
   RTL_PASS,
   "no-opt dfinit",                      /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_no_opt,                          /* gate */
   rest_of_handle_df_initialize,         /* execute */
   NULL,                                 /* sub */
@@ -828,6 +830,7 @@ struct rtl_opt_pass pass_df_finish =
  {
   RTL_PASS,
   "dfinish",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   rest_of_handle_df_finish,             /* execute */
   NULL,                                 /* sub */
Index: mode-switching.c
===================================================================
--- mode-switching.c	(revision 192975)
+++ mode-switching.c	(working copy)
@@ -763,6 +763,7 @@ struct rtl_opt_pass pass_mode_switching =
  {
   RTL_PASS,
   "mode_sw",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_mode_switching,                  /* gate */
   rest_of_handle_mode_switching,        /* execute */
   NULL,                                 /* sub */
Index: tree-nomudflap.c
===================================================================
--- tree-nomudflap.c	(revision 192975)
+++ tree-nomudflap.c	(working copy)
@@ -91,6 +91,7 @@ struct gimple_opt_pass pass_mudflap_1 =
  {
   GIMPLE_PASS,
   "mudflap1",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_mudflap,                         /* gate */
   NULL,					/* execute */
   NULL,					/* sub */
@@ -110,6 +111,7 @@ struct gimple_opt_pass pass_mudflap_2 =
  {
   GIMPLE_PASS,
   "mudflap2",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_mudflap,                         /* gate */
   NULL,					/* execute */
   NULL,					/* sub */
Index: modulo-sched.c
===================================================================
--- modulo-sched.c	(revision 192975)
+++ modulo-sched.c	(working copy)
@@ -3364,6 +3364,7 @@ struct rtl_opt_pass pass_sms =
  {
   RTL_PASS,
   "sms",                                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_sms,                      /* gate */
   rest_of_handle_sms,                   /* execute */
   NULL,                                 /* sub */
Index: tree-call-cdce.c
===================================================================
--- tree-call-cdce.c	(revision 192975)
+++ tree-call-cdce.c	(working copy)
@@ -920,6 +920,7 @@ struct gimple_opt_pass pass_call_cdce =
  {
   GIMPLE_PASS,
   "cdce",                               /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_call_cdce,                       /* gate */
   tree_call_cdce,                       /* execute */
   NULL,                                 /* sub */
Index: ipa-pure-const.c
===================================================================
--- ipa-pure-const.c	(revision 192975)
+++ ipa-pure-const.c	(working copy)
@@ -1497,6 +1497,7 @@ struct ipa_opt_pass_d pass_ipa_pure_const =
  {
   IPA_PASS,
   "pure-const",		                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_pure_const,			/* gate */
   propagate,			        /* execute */
   NULL,					/* sub */
@@ -1662,6 +1663,7 @@ struct gimple_opt_pass pass_local_pure_const =
  {
   GIMPLE_PASS,
   "local-pure-const",	                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_pure_const,			/* gate */
   local_pure_const,		        /* execute */
   NULL,					/* sub */
Index: cse.c
===================================================================
--- cse.c	(revision 192975)
+++ cse.c	(working copy)
@@ -7456,6 +7456,7 @@ struct rtl_opt_pass pass_cse =
  {
   RTL_PASS,
   "cse1",                               /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_cse,                      /* gate */
   rest_of_handle_cse,			/* execute */
   NULL,                                 /* sub */
@@ -7518,6 +7519,7 @@ struct rtl_opt_pass pass_cse2 =
  {
   RTL_PASS,
   "cse2",                               /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_cse2,                     /* gate */
   rest_of_handle_cse2,			/* execute */
   NULL,                                 /* sub */
@@ -7578,6 +7580,7 @@ struct rtl_opt_pass pass_cse_after_global_opts =
  {
   RTL_PASS,
   "cse_local",                          /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_cse_after_global_opts,    /* gate */
   rest_of_handle_cse_after_global_opts, /* execute */
   NULL,                                 /* sub */
Index: web.c
===================================================================
--- web.c	(revision 192975)
+++ web.c	(working copy)
@@ -445,6 +445,7 @@ struct rtl_opt_pass pass_web =
  {
   RTL_PASS,
   "web",                                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_web,                      /* gate */
   web_main,		                /* execute */
   NULL,                                 /* sub */
Index: tree-stdarg.c
===================================================================
--- tree-stdarg.c	(revision 192975)
+++ tree-stdarg.c	(working copy)
@@ -960,6 +960,7 @@ struct gimple_opt_pass pass_stdarg =
  {
   GIMPLE_PASS,
   "stdarg",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_optimize_stdarg,			/* gate */
   execute_optimize_stdarg,		/* execute */
   NULL,					/* sub */
Index: lto-streamer-out.c
===================================================================
--- lto-streamer-out.c	(revision 192975)
+++ lto-streamer-out.c	(working copy)
@@ -1011,6 +1011,7 @@ struct ipa_opt_pass_d pass_ipa_lto_gimple_out =
  {
   IPA_PASS,
   "lto_gimple_out",	                /* name */
+  OPTGROUP_LTO,                         /* optinfo_flags */
   gate_lto_out,			        /* gate */
   NULL,		                	/* execute */
   NULL,					/* sub */
@@ -1426,6 +1427,7 @@ struct ipa_opt_pass_d pass_ipa_lto_finish_out =
  {
   IPA_PASS,
   "lto_decls_out",	                /* name */
+  OPTGROUP_LTO,                         /* optinfo_flags */
   gate_lto_out,			        /* gate */
   NULL,        	                        /* execute */
   NULL,					/* sub */
Index: tree-ssa-math-opts.c
===================================================================
--- tree-ssa-math-opts.c	(revision 192975)
+++ tree-ssa-math-opts.c	(working copy)
@@ -642,6 +642,7 @@ struct gimple_opt_pass pass_cse_reciprocals =
  {
   GIMPLE_PASS,
   "recip",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_cse_reciprocals,			/* gate */
   execute_cse_reciprocals,		/* execute */
   NULL,					/* sub */
@@ -1505,6 +1506,7 @@ struct gimple_opt_pass pass_cse_sincos =
  {
   GIMPLE_PASS,
   "sincos",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_cse_sincos,			/* gate */
   execute_cse_sincos,			/* execute */
   NULL,					/* sub */
@@ -1977,6 +1979,7 @@ struct gimple_opt_pass pass_optimize_bswap =
  {
   GIMPLE_PASS,
   "bswap",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_optimize_bswap,                  /* gate */
   execute_optimize_bswap,		/* execute */
   NULL,					/* sub */
@@ -2741,6 +2744,7 @@ struct gimple_opt_pass pass_optimize_widening_mul
  {
   GIMPLE_PASS,
   "widening_mul",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_optimize_widening_mul,		/* gate */
   execute_optimize_widening_mul,	/* execute */
   NULL,					/* sub */
Index: tree-ssa-dom.c
===================================================================
--- tree-ssa-dom.c	(revision 192975)
+++ tree-ssa-dom.c	(working copy)
@@ -861,6 +861,7 @@ struct gimple_opt_pass pass_dominator =
  {
   GIMPLE_PASS,
   "dom",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_dominator,			/* gate */
   tree_ssa_dominator_optimize,		/* execute */
   NULL,					/* sub */
@@ -3033,6 +3034,7 @@ struct gimple_opt_pass pass_phi_only_cprop =
  {
   GIMPLE_PASS,
   "phicprop",                           /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_dominator,                       /* gate */
   eliminate_degenerate_phis,            /* execute */
   NULL,                                 /* sub */
Index: tree-nrv.c
===================================================================
--- tree-nrv.c	(revision 192975)
+++ tree-nrv.c	(working copy)
@@ -275,6 +275,7 @@ struct gimple_opt_pass pass_nrv =
  {
   GIMPLE_PASS,
   "nrv",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_pass_return_slot,		/* gate */
   tree_nrv,				/* execute */
   NULL,					/* sub */
@@ -360,6 +361,7 @@ struct gimple_opt_pass pass_return_slot =
  {
   GIMPLE_PASS,
   "retslot",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_return_slot_opt,		/* execute */
   NULL,					/* sub */
Index: loop-init.c
===================================================================
--- loop-init.c	(revision 192975)
+++ loop-init.c	(working copy)
@@ -189,6 +189,7 @@ struct rtl_opt_pass pass_loop2 =
  {
   RTL_PASS,
   "loop2",                              /* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_handle_loop2, 		        /* gate */
   NULL,                                 /* execute */
   NULL,                                 /* sub */
@@ -225,6 +226,7 @@ struct rtl_opt_pass pass_rtl_loop_init =
  {
   RTL_PASS,
   "loop2_init",                           /* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rtl_loop_init,                        /* execute */
   NULL,                                 /* sub */
@@ -265,6 +267,7 @@ struct rtl_opt_pass pass_rtl_loop_done =
  {
   RTL_PASS,
   "loop2_done",                          /* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rtl_loop_done,                        /* execute */
   NULL,                                 /* sub */
@@ -301,6 +304,7 @@ struct rtl_opt_pass pass_rtl_move_loop_invariants
  {
   RTL_PASS,
   "loop2_invariant",                    /* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_rtl_move_loop_invariants,        /* gate */
   rtl_move_loop_invariants,             /* execute */
   NULL,                                 /* sub */
@@ -337,6 +341,7 @@ struct rtl_opt_pass pass_rtl_unswitch =
  {
   RTL_PASS,
   "loop2_unswitch",                      /* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_rtl_unswitch,                    /* gate */
   rtl_unswitch,                         /* execute */
   NULL,                                 /* sub */
@@ -385,6 +390,7 @@ struct rtl_opt_pass pass_rtl_unroll_and_peel_loops
  {
   RTL_PASS,
   "loop2_unroll",                        /* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_rtl_unroll_and_peel_loops,       /* gate */
   rtl_unroll_and_peel_loops,            /* execute */
   NULL,                                 /* sub */
@@ -426,6 +432,7 @@ struct rtl_opt_pass pass_rtl_doloop =
  {
   RTL_PASS,
   "loop2_doloop",                        /* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_rtl_doloop,                      /* gate */
   rtl_doloop,                           /* execute */
   NULL,                                 /* sub */
Index: gimple-low.c
===================================================================
--- gimple-low.c	(revision 192975)
+++ gimple-low.c	(working copy)
@@ -194,6 +194,7 @@ struct gimple_opt_pass pass_lower_cf =
  {
   GIMPLE_PASS,
   "lower",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   lower_function_body,			/* execute */
   NULL,					/* sub */
Index: ipa-inline.c
===================================================================
--- ipa-inline.c	(revision 192975)
+++ ipa-inline.c	(working copy)
@@ -2007,6 +2007,7 @@ struct gimple_opt_pass pass_early_inline =
  {
   GIMPLE_PASS,
   "einline",	 			/* name */
+  OPTGROUP_INLINE,                      /* optinfo_flags */
   NULL,					/* gate */
   early_inliner,			/* execute */
   NULL,					/* sub */
@@ -2039,6 +2040,7 @@ struct ipa_opt_pass_d pass_ipa_inline =
  {
   IPA_PASS,
   "inline",				/* name */
+  OPTGROUP_INLINE,                      /* optinfo_flags */
   gate_ipa_inline,			/* gate */
   ipa_inline,				/* execute */
   NULL,					/* sub */
Index: tree-ssa-sink.c
===================================================================
--- tree-ssa-sink.c	(revision 192975)
+++ tree-ssa-sink.c	(working copy)
@@ -584,6 +584,7 @@ struct gimple_opt_pass pass_sink_code =
  {
   GIMPLE_PASS,
   "sink",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_sink,				/* gate */
   do_sink,				/* execute */
   NULL,					/* sub */
Index: jump.c
===================================================================
--- jump.c	(revision 192975)
+++ jump.c	(working copy)
@@ -146,6 +146,7 @@ struct rtl_opt_pass pass_cleanup_barriers =
  {
   RTL_PASS,
   "barriers",                           /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   cleanup_barriers,                     /* execute */
   NULL,                                 /* sub */
Index: ifcvt.c
===================================================================
--- ifcvt.c	(revision 192975)
+++ ifcvt.c	(working copy)
@@ -4462,6 +4462,7 @@ struct rtl_opt_pass pass_rtl_ifcvt =
  {
   RTL_PASS,
   "ce1",                                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_if_conversion,            /* gate */
   rest_of_handle_if_conversion,         /* execute */
   NULL,                                 /* sub */
@@ -4499,6 +4500,7 @@ struct rtl_opt_pass pass_if_after_combine =
  {
   RTL_PASS,
   "ce2",                                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_if_after_combine,         /* gate */
   rest_of_handle_if_after_combine,      /* execute */
   NULL,                                 /* sub */
@@ -4535,6 +4537,7 @@ struct rtl_opt_pass pass_if_after_reload =
  {
   RTL_PASS,
   "ce3",                                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_if_after_reload,          /* gate */
   rest_of_handle_if_after_reload,       /* execute */
   NULL,                                 /* sub */
Index: predict.c
===================================================================
--- predict.c	(revision 192975)
+++ predict.c	(working copy)
@@ -2823,6 +2823,7 @@ struct gimple_opt_pass pass_profile =
  {
   GIMPLE_PASS,
   "profile_estimate",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_estimate_probability,		/* gate */
   tree_estimate_probability_driver,	/* execute */
   NULL,					/* sub */
@@ -2842,6 +2843,7 @@ struct gimple_opt_pass pass_strip_predict_hints =
  {
   GIMPLE_PASS,
   "*strip_predict_hints",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   strip_predict_hints,			/* execute */
   NULL,					/* sub */
Index: tree-ssa-loop.c
===================================================================
--- tree-ssa-loop.c	(revision 192975)
+++ tree-ssa-loop.c	(working copy)
@@ -47,6 +47,7 @@ struct gimple_opt_pass pass_tree_loop =
  {
   GIMPLE_PASS,
   "loop",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_tree_loop,			/* gate */
   NULL,					/* execute */
   NULL,					/* sub */
@@ -82,6 +83,7 @@ struct gimple_opt_pass pass_tree_loop_init =
  {
   GIMPLE_PASS,
   "loopinit",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   NULL,					/* gate */
   tree_ssa_loop_init,			/* execute */
   NULL,					/* sub */
@@ -118,6 +120,7 @@ struct gimple_opt_pass pass_lim =
  {
   GIMPLE_PASS,
   "lim",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_tree_ssa_loop_im,		/* gate */
   tree_ssa_loop_im,			/* execute */
   NULL,					/* sub */
@@ -154,6 +157,7 @@ struct gimple_opt_pass pass_tree_unswitch =
  {
   GIMPLE_PASS,
   "unswitch",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_tree_ssa_loop_unswitch,		/* gate */
   tree_ssa_loop_unswitch,		/* execute */
   NULL,					/* sub */
@@ -190,6 +194,7 @@ struct gimple_opt_pass pass_predcom =
  {
   GIMPLE_PASS,
   "pcom",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_tree_predictive_commoning,	/* gate */
   run_tree_predictive_commoning,	/* execute */
   NULL,					/* sub */
@@ -226,6 +231,8 @@ struct gimple_opt_pass pass_vectorize =
  {
   GIMPLE_PASS,
   "vect",                               /* name */
+  OPTGROUP_LOOP
+  | OPTGROUP_VEC,                       /* optinfo_flags */
   gate_tree_vectorize,                  /* gate */
   tree_vectorize,                       /* execute */
   NULL,                                 /* sub */
@@ -275,6 +282,7 @@ struct gimple_opt_pass pass_graphite =
  {
   GIMPLE_PASS,
   "graphite0",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_graphite_transforms,		/* gate */
   NULL,					/* execute */
   NULL,					/* sub */
@@ -294,6 +302,7 @@ struct gimple_opt_pass pass_graphite_transforms =
  {
   GIMPLE_PASS,
   "graphite",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_graphite_transforms,		/* gate */
   graphite_transforms,       		/* execute */
   NULL,					/* sub */
@@ -331,6 +340,7 @@ struct gimple_opt_pass pass_check_data_deps =
  {
   GIMPLE_PASS,
   "ckdd",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_check_data_deps,	        	/* gate */
   check_data_deps,       		/* execute */
   NULL,					/* sub */
@@ -367,6 +377,7 @@ struct gimple_opt_pass pass_iv_canon =
  {
   GIMPLE_PASS,
   "ivcanon",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_tree_ssa_loop_ivcanon,		/* gate */
   tree_ssa_loop_ivcanon,	       	/* execute */
   NULL,					/* sub */
@@ -394,6 +405,7 @@ struct gimple_opt_pass pass_scev_cprop =
  {
   GIMPLE_PASS,
   "sccp",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_scev_const_prop,			/* gate */
   scev_const_prop,	       		/* execute */
   NULL,					/* sub */
@@ -428,6 +440,7 @@ struct gimple_opt_pass pass_record_bounds =
  {
   GIMPLE_PASS,
   "*record_bounds",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   tree_ssa_loop_bounds,		       	/* execute */
   NULL,					/* sub */
@@ -466,6 +479,7 @@ struct gimple_opt_pass pass_complete_unroll =
  {
   GIMPLE_PASS,
   "cunroll",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_tree_complete_unroll,		/* gate */
   tree_complete_unroll,		       	/* execute */
   NULL,					/* sub */
@@ -512,6 +526,7 @@ struct gimple_opt_pass pass_complete_unrolli =
  {
   GIMPLE_PASS,
   "cunrolli",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_tree_complete_unroll_inner,	/* gate */
   tree_complete_unroll_inner,	       	/* execute */
   NULL,					/* sub */
@@ -551,6 +566,7 @@ struct gimple_opt_pass pass_parallelize_loops =
  {
   GIMPLE_PASS,
   "parloops",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_tree_parallelize_loops,		/* gate */
   tree_parallelize_loops,      		/* execute */
   NULL,					/* sub */
@@ -587,6 +603,7 @@ struct gimple_opt_pass pass_loop_prefetch =
  {
   GIMPLE_PASS,
   "aprefetch",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_tree_ssa_loop_prefetch,		/* gate */
   tree_ssa_loop_prefetch,	       	/* execute */
   NULL,					/* sub */
@@ -624,6 +641,7 @@ struct gimple_opt_pass pass_iv_optimize =
  {
   GIMPLE_PASS,
   "ivopts",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_tree_ssa_loop_ivopts,		/* gate */
   tree_ssa_loop_ivopts,		       	/* execute */
   NULL,					/* sub */
@@ -654,6 +672,7 @@ struct gimple_opt_pass pass_tree_loop_done =
  {
   GIMPLE_PASS,
   "loopdone",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   NULL,					/* gate */
   tree_ssa_loop_done,			/* execute */
   NULL,					/* sub */
Index: recog.c
===================================================================
--- recog.c	(revision 192975)
+++ recog.c	(working copy)
@@ -3742,6 +3742,7 @@ struct rtl_opt_pass pass_peephole2 =
  {
   RTL_PASS,
   "peephole2",                          /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_peephole2,                /* gate */
   rest_of_handle_peephole2,             /* execute */
   NULL,                                 /* sub */
@@ -3769,6 +3770,7 @@ struct rtl_opt_pass pass_split_all_insns =
  {
   RTL_PASS,
   "split1",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_handle_split_all_insns,       /* execute */
   NULL,                                 /* sub */
@@ -3799,6 +3801,7 @@ struct rtl_opt_pass pass_split_after_reload =
  {
   RTL_PASS,
   "split2",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_handle_split_after_reload,    /* execute */
   NULL,                                 /* sub */
@@ -3843,6 +3846,7 @@ struct rtl_opt_pass pass_split_before_regstack =
  {
   RTL_PASS,
   "split3",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_split_before_regstack,    /* gate */
   rest_of_handle_split_before_regstack, /* execute */
   NULL,                                 /* sub */
@@ -3881,6 +3885,7 @@ struct rtl_opt_pass pass_split_before_sched2 =
  {
   RTL_PASS,
   "split4",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_split_before_sched2,      /* gate */
   rest_of_handle_split_before_sched2,   /* execute */
   NULL,                                 /* sub */
@@ -3912,6 +3917,7 @@ struct rtl_opt_pass pass_split_for_shorten_branche
  {
   RTL_PASS,
   "split5",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_do_final_split,                  /* gate */
   split_all_insns_noflow,               /* execute */
   NULL,                                 /* sub */
Index: dse.c
===================================================================
--- dse.c	(revision 192975)
+++ dse.c	(working copy)
@@ -3934,6 +3934,7 @@ struct rtl_opt_pass pass_rtl_dse1 =
  {
   RTL_PASS,
   "dse1",                               /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_dse1,                            /* gate */
   rest_of_handle_dse,                   /* execute */
   NULL,                                 /* sub */
@@ -3954,6 +3955,7 @@ struct rtl_opt_pass pass_rtl_dse2 =
  {
   RTL_PASS,
   "dse2",                               /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_dse2,                            /* gate */
   rest_of_handle_dse,                   /* execute */
   NULL,                                 /* sub */
Index: tree-ssa-ifcombine.c
===================================================================
--- tree-ssa-ifcombine.c	(revision 192975)
+++ tree-ssa-ifcombine.c	(working copy)
@@ -653,6 +653,7 @@ struct gimple_opt_pass pass_tree_ifcombine =
  {
   GIMPLE_PASS,
   "ifcombine",			/* name */
+  OPTGROUP_NONE,                /* optinfo_flags */
   gate_ifcombine,		/* gate */
   tree_ssa_ifcombine,		/* execute */
   NULL,				/* sub */
Index: gimple-ssa-strength-reduction.c
===================================================================
--- gimple-ssa-strength-reduction.c	(revision 192975)
+++ gimple-ssa-strength-reduction.c	(working copy)
@@ -2682,6 +2682,7 @@ struct gimple_opt_pass pass_strength_reduction =
  {
   GIMPLE_PASS,
   "slsr",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_strength_reduction,		/* gate */
   execute_strength_reduction,		/* execute */
   NULL,					/* sub */
Index: tree-eh.c
===================================================================
--- tree-eh.c	(revision 192975)
+++ tree-eh.c	(working copy)
@@ -2133,6 +2133,7 @@ struct gimple_opt_pass pass_lower_eh =
  {
   GIMPLE_PASS,
   "eh",					/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   lower_eh_constructs,			/* execute */
   NULL,					/* sub */
@@ -2992,6 +2993,7 @@ struct gimple_opt_pass pass_refactor_eh =
  {
   GIMPLE_PASS,
   "ehopt",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_refactor_eh,			/* gate */
   refactor_eh,				/* execute */
   NULL,					/* sub */
@@ -3200,6 +3202,7 @@ struct gimple_opt_pass pass_lower_resx =
  {
   GIMPLE_PASS,
   "resx",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_lower_resx,			/* gate */
   execute_lower_resx,			/* execute */
   NULL,					/* sub */
@@ -3496,6 +3499,7 @@ struct gimple_opt_pass pass_lower_eh_dispatch =
  {
   GIMPLE_PASS,
   "ehdisp",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_lower_eh_dispatch,		/* gate */
   execute_lower_eh_dispatch,		/* execute */
   NULL,					/* sub */
@@ -4319,6 +4323,7 @@ struct gimple_opt_pass pass_cleanup_eh = {
   {
    GIMPLE_PASS,
    "ehcleanup",			/* name */
+   OPTGROUP_NONE,               /* optinfo_flags */
    gate_cleanup_eh,		/* gate */
    execute_cleanup_eh,		/* execute */
    NULL,			/* sub */
Index: regmove.c
===================================================================
--- regmove.c	(revision 192975)
+++ regmove.c	(working copy)
@@ -1369,6 +1369,7 @@ struct rtl_opt_pass pass_regmove =
  {
   RTL_PASS,
   "regmove",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_regmove,                  /* gate */
   regmove_optimize,			/* execute */
   NULL,                                 /* sub */
Index: function.c
===================================================================
--- function.c	(revision 192975)
+++ function.c	(working copy)
@@ -1949,6 +1949,7 @@ struct rtl_opt_pass pass_instantiate_virtual_regs
  {
   RTL_PASS,
   "vregs",                              /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   instantiate_virtual_regs,             /* execute */
   NULL,                                 /* sub */
@@ -6925,6 +6926,7 @@ struct rtl_opt_pass pass_leaf_regs =
  {
   RTL_PASS,
   "*leaf_regs",                         /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_handle_check_leaf_regs,       /* execute */
   NULL,                                 /* sub */
@@ -6963,6 +6965,7 @@ struct rtl_opt_pass pass_thread_prologue_and_epilo
  {
   RTL_PASS,
   "pro_and_epilogue",                   /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_handle_thread_prologue_and_epilogue, /* execute */
   NULL,                                 /* sub */
@@ -7164,6 +7167,7 @@ struct rtl_opt_pass pass_match_asm_constraints =
  {
   RTL_PASS,
   "asmcons",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   rest_of_match_asm_constraints,	/* execute */
   NULL,                                 /* sub */
Index: tree-vectorizer.c
===================================================================
--- tree-vectorizer.c	(revision 192975)
+++ tree-vectorizer.c	(working copy)
@@ -194,6 +194,8 @@ struct gimple_opt_pass pass_slp_vectorize =
  {
   GIMPLE_PASS,
   "slp",                                /* name */
+  OPTGROUP_LOOP
+  | OPTGROUP_VEC,                       /* optinfo_flags */
   gate_vect_slp,                        /* gate */
   execute_vect_slp,                     /* execute */
   NULL,                                 /* sub */
@@ -266,6 +268,8 @@ struct simple_ipa_opt_pass pass_ipa_increase_align
  {
   SIMPLE_IPA_PASS,
   "increase_alignment",                 /* name */
+  OPTGROUP_LOOP
+  | OPTGROUP_VEC,                       /* optinfo_flags */
   gate_increase_alignment,              /* gate */
   increase_alignment,                   /* execute */
   NULL,                                 /* sub */
Index: ipa-split.c
===================================================================
--- ipa-split.c	(revision 192975)
+++ ipa-split.c	(working copy)
@@ -1601,6 +1601,7 @@ struct gimple_opt_pass pass_split_functions =
  {
   GIMPLE_PASS,
   "fnsplit",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_split_functions,			/* gate */
   execute_split_functions,		/* execute */
   NULL,					/* sub */
@@ -1642,6 +1643,7 @@ struct gimple_opt_pass pass_feedback_split_functio
  {
   GIMPLE_PASS,
   "feedback_fnsplit",			/* name */
+  OPTGROUP_NONE,                      /* optinfo_flags */
   gate_feedback_split_functions,	/* gate */
   execute_feedback_split_functions,	/* execute */
   NULL,					/* sub */
Index: gcse.c
===================================================================
--- gcse.c	(revision 192975)
+++ gcse.c	(working copy)
@@ -4027,6 +4027,7 @@ struct rtl_opt_pass pass_rtl_pre =
  {
   RTL_PASS,
   "rtl pre",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_rtl_pre,                         /* gate */
   execute_rtl_pre,    			/* execute */
   NULL,                                 /* sub */
@@ -4047,6 +4048,7 @@ struct rtl_opt_pass pass_rtl_hoist =
  {
   RTL_PASS,
   "hoist",                              /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_rtl_hoist,                       /* gate */
   execute_rtl_hoist,  			/* execute */
   NULL,                                 /* sub */
Index: tree-if-conv.c
===================================================================
--- tree-if-conv.c	(revision 192975)
+++ tree-if-conv.c	(working copy)
@@ -1859,6 +1859,7 @@ struct gimple_opt_pass pass_if_conversion =
  {
   GIMPLE_PASS,
   "ifcvt",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_tree_if_conversion,		/* gate */
   main_tree_if_conversion,		/* execute */
   NULL,					/* sub */
Index: init-regs.c
===================================================================
--- init-regs.c	(revision 192975)
+++ init-regs.c	(working copy)
@@ -143,6 +143,7 @@ struct rtl_opt_pass pass_initialize_regs =
  {
   RTL_PASS,
   "init-regs",                          /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_initialize_regs,                 /* gate */
   rest_of_handle_initialize_regs,       /* execute */
   NULL,                                 /* sub */
Index: ipa.c
===================================================================
--- ipa.c	(revision 192975)
+++ ipa.c	(working copy)
@@ -950,6 +950,7 @@ struct simple_ipa_opt_pass pass_ipa_function_and_v
  {
   SIMPLE_IPA_PASS,
   "visibility",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   local_function_and_variable_visibility,/* execute */
   NULL,					/* sub */
@@ -979,6 +980,7 @@ struct simple_ipa_opt_pass pass_ipa_free_inline_su
  {
   SIMPLE_IPA_PASS,
   "*free_inline_summary",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   free_inline_summary,			/* execute */
   NULL,					/* sub */
@@ -1017,6 +1019,7 @@ struct ipa_opt_pass_d pass_ipa_whole_program_visib
  {
   IPA_PASS,
   "whole-program",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_whole_program_function_and_variable_visibility,/* gate */
   whole_program_function_and_variable_visibility,/* execute */
   NULL,					/* sub */
@@ -1100,6 +1103,7 @@ struct ipa_opt_pass_d pass_ipa_profile =
  {
   IPA_PASS,
   "profile_estimate",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_ipa_profile,			/* gate */
   ipa_profile,			        /* execute */
   NULL,					/* sub */
@@ -1410,6 +1414,7 @@ struct ipa_opt_pass_d pass_ipa_cdtor_merge =
  {
   IPA_PASS,
   "cdtor",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_ipa_cdtor_merge,			/* gate */
   ipa_cdtor_merge,		        /* execute */
   NULL,					/* sub */
Index: trans-mem.c
===================================================================
--- trans-mem.c	(revision 192975)
+++ trans-mem.c	(working copy)
@@ -798,6 +798,7 @@ struct gimple_opt_pass pass_diagnose_tm_blocks =
   {
     GIMPLE_PASS,
     "*diagnose_tm_blocks",		/* name */
+    OPTGROUP_NONE,                      /* optinfo_flags */
     gate_tm,				/* gate */
     diagnose_tm_blocks,			/* execute */
     NULL,				/* sub */
@@ -1738,6 +1739,7 @@ struct gimple_opt_pass pass_lower_tm =
  {
   GIMPLE_PASS,
   "tmlower",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_tm,				/* gate */
   execute_lower_tm,			/* execute */
   NULL,					/* sub */
@@ -1985,6 +1987,7 @@ struct gimple_opt_pass pass_tm_init =
  {
   GIMPLE_PASS,
   "*tminit",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_tm_init,				/* gate */
   NULL,					/* execute */
   NULL,					/* sub */
@@ -2571,6 +2574,7 @@ struct gimple_opt_pass pass_tm_mark =
  {
   GIMPLE_PASS,
   "tmmark",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_tm_mark,			/* execute */
   NULL,					/* sub */
@@ -2848,6 +2852,7 @@ struct gimple_opt_pass pass_tm_edges =
  {
   GIMPLE_PASS,
   "tmedge",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_tm_edges,			/* execute */
   NULL,					/* sub */
@@ -3513,6 +3518,7 @@ struct gimple_opt_pass pass_tm_memopt =
  {
   GIMPLE_PASS,
   "tmmemopt",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_tm_memopt,			/* gate */
   execute_tm_memopt,			/* execute */
   NULL,					/* sub */
@@ -5067,6 +5073,7 @@ struct simple_ipa_opt_pass pass_ipa_tm =
  {
   SIMPLE_IPA_PASS,
   "tmipa",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_tm,				/* gate */
   ipa_tm_execute,			/* execute */
   NULL,					/* sub */
Index: ipa-inline-analysis.c
===================================================================
--- ipa-inline-analysis.c	(revision 192975)
+++ ipa-inline-analysis.c	(working copy)
@@ -2655,6 +2655,7 @@ struct gimple_opt_pass pass_inline_parameters =
  {
   GIMPLE_PASS,
   "inline_param",			/* name */
+  OPTGROUP_INLINE,                      /* optinfo_flags */
   NULL,					/* gate */
   compute_inline_parameters_for_current,/* execute */
   NULL,					/* sub */
Index: tree-ssa-phiopt.c
===================================================================
--- tree-ssa-phiopt.c	(revision 192975)
+++ tree-ssa-phiopt.c	(working copy)
@@ -1951,6 +1951,7 @@ struct gimple_opt_pass pass_phiopt =
  {
   GIMPLE_PASS,
   "phiopt",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_phiopt,				/* gate */
   tree_ssa_phiopt,			/* execute */
   NULL,					/* sub */
@@ -1979,6 +1980,7 @@ struct gimple_opt_pass pass_cselim =
  {
   GIMPLE_PASS,
   "cselim",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_cselim,				/* gate */
   tree_ssa_cs_elim,			/* execute */
   NULL,					/* sub */
Index: lower-subreg.c
===================================================================
--- lower-subreg.c	(revision 192975)
+++ lower-subreg.c	(working copy)
@@ -1665,6 +1665,7 @@ struct rtl_opt_pass pass_lower_subreg =
  {
   RTL_PASS,
   "subreg1",	                        /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_lower_subreg,             /* gate */
   rest_of_handle_lower_subreg,          /* execute */
   NULL,                                 /* sub */
@@ -1685,6 +1686,7 @@ struct rtl_opt_pass pass_lower_subreg2 =
  {
   RTL_PASS,
   "subreg2",	                        /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_lower_subreg,             /* gate */
   rest_of_handle_lower_subreg2,          /* execute */
   NULL,                                 /* sub */
Index: bt-load.c
===================================================================
--- bt-load.c	(revision 192975)
+++ bt-load.c	(working copy)
@@ -1,3 +1,4 @@
+
 /* Perform branch target register load optimizations.
    Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
@@ -1509,6 +1510,7 @@ struct rtl_opt_pass pass_branch_target_load_optimi
  {
   RTL_PASS,
   "btl1",                               /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_branch_target_load_optimize1,      /* gate */
   rest_of_handle_branch_target_load_optimize1,   /* execute */
   NULL,                                 /* sub */
@@ -1558,6 +1560,7 @@ struct rtl_opt_pass pass_branch_target_load_optimi
  {
   RTL_PASS,
   "btl2",                               /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_branch_target_load_optimize2,      /* gate */
   rest_of_handle_branch_target_load_optimize2,   /* execute */
   NULL,                                 /* sub */
Index: except.c
===================================================================
--- except.c	(revision 192975)
+++ except.c	(working copy)
@@ -1920,6 +1920,7 @@ struct rtl_opt_pass pass_set_nothrow_function_flag
  {
   RTL_PASS,
   "nothrow",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   set_nothrow_function_flags,           /* execute */
   NULL,                                 /* sub */
@@ -2569,6 +2570,7 @@ struct rtl_opt_pass pass_convert_to_eh_region_rang
  {
   RTL_PASS,
   "eh_ranges",                          /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_convert_to_eh_region_ranges,	/* gate */
   convert_to_eh_region_ranges,          /* execute */
   NULL,                                 /* sub */
Index: store-motion.c
===================================================================
--- store-motion.c	(revision 192975)
+++ store-motion.c	(working copy)
@@ -1238,6 +1238,7 @@ struct rtl_opt_pass pass_rtl_store_motion =
  {
   RTL_PASS,
   "store_motion",                       /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_rtl_store_motion,                /* gate */
   execute_rtl_store_motion,		/* execute */
   NULL,                                 /* sub */
Index: cfgexpand.c
===================================================================
--- cfgexpand.c	(revision 192975)
+++ cfgexpand.c	(working copy)
@@ -4677,6 +4677,7 @@ struct rtl_opt_pass pass_expand =
  {
   RTL_PASS,
   "expand",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   gimple_expand_cfg,			/* execute */
   NULL,                                 /* sub */
Index: tree-cfgcleanup.c
===================================================================
--- tree-cfgcleanup.c	(revision 192975)
+++ tree-cfgcleanup.c	(working copy)
@@ -977,6 +977,7 @@ struct gimple_opt_pass pass_merge_phi =
  {
   GIMPLE_PASS,
   "mergephi",			/* name */
+  OPTGROUP_NONE,                /* optinfo_flags */
   gate_merge_phi,		/* gate */
   merge_phi_nodes,		/* execute */
   NULL,				/* sub */
Index: cfgcleanup.c
===================================================================
--- cfgcleanup.c	(revision 192975)
+++ cfgcleanup.c	(working copy)
@@ -3008,6 +3008,7 @@ struct rtl_opt_pass pass_jump =
  {
   RTL_PASS,
   "jump",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_jump,				/* execute */
   NULL,					/* sub */
@@ -3034,6 +3035,7 @@ struct rtl_opt_pass pass_jump2 =
  {
   RTL_PASS,
   "jump2",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_jump2,			/* execute */
   NULL,					/* sub */
Index: tree-ssa-pre.c
===================================================================
--- tree-ssa-pre.c	(revision 192975)
+++ tree-ssa-pre.c	(working copy)
@@ -4766,6 +4766,7 @@ struct gimple_opt_pass pass_pre =
  {
   GIMPLE_PASS,
   "pre",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_pre,				/* gate */
   do_pre,				/* execute */
   NULL,					/* sub */
@@ -4819,6 +4820,7 @@ struct gimple_opt_pass pass_fre =
  {
   GIMPLE_PASS,
   "fre",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_fre,				/* gate */
   execute_fre,				/* execute */
   NULL,					/* sub */
Index: tree-sra.c
===================================================================
--- tree-sra.c	(revision 192975)
+++ tree-sra.c	(working copy)
@@ -3443,6 +3443,7 @@ struct gimple_opt_pass pass_sra_early =
  {
   GIMPLE_PASS,
   "esra",	 			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_intra_sra,			/* gate */
   early_intra_sra,			/* execute */
   NULL,					/* sub */
@@ -3464,6 +3465,7 @@ struct gimple_opt_pass pass_sra =
  {
   GIMPLE_PASS,
   "sra",	 			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_intra_sra,			/* gate */
   late_intra_sra,			/* execute */
   NULL,					/* sub */
@@ -5006,6 +5008,7 @@ struct gimple_opt_pass pass_early_ipa_sra =
  {
   GIMPLE_PASS,
   "eipa_sra",	 			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   ipa_early_sra_gate,			/* gate */
   ipa_early_sra,			/* execute */
   NULL,					/* sub */
Index: tree-mudflap.c
===================================================================
--- tree-mudflap.c	(revision 192975)
+++ tree-mudflap.c	(working copy)
@@ -1368,6 +1368,7 @@ struct gimple_opt_pass pass_mudflap_1 =
  {
   GIMPLE_PASS,
   "mudflap1",                           /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_mudflap,                         /* gate */
   execute_mudflap_function_decls,       /* execute */
   NULL,                                 /* sub */
@@ -1387,6 +1388,7 @@ struct gimple_opt_pass pass_mudflap_2 =
  {
   GIMPLE_PASS,
   "mudflap2",                           /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_mudflap,                         /* gate */
   execute_mudflap_function_ops,         /* execute */
   NULL,                                 /* sub */
Index: tree-ssa-copy.c
===================================================================
--- tree-ssa-copy.c	(revision 192975)
+++ tree-ssa-copy.c	(working copy)
@@ -828,6 +828,7 @@ struct gimple_opt_pass pass_copy_prop =
  {
   GIMPLE_PASS,
   "copyprop",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_copy_prop,			/* gate */
   execute_copy_prop,			/* execute */
   NULL,					/* sub */
Index: tree-ssa-forwprop.c
===================================================================
--- tree-ssa-forwprop.c	(revision 192975)
+++ tree-ssa-forwprop.c	(working copy)
@@ -3122,6 +3122,7 @@ struct gimple_opt_pass pass_forwprop =
  {
   GIMPLE_PASS,
   "forwprop",			/* name */
+  OPTGROUP_NONE,                /* optinfo_flags */
   gate_forwprop,		/* gate */
   ssa_forward_propagate_and_combine,	/* execute */
   NULL,				/* sub */
Index: tree-ssa-dce.c
===================================================================
--- tree-ssa-dce.c	(revision 192975)
+++ tree-ssa-dce.c	(working copy)
@@ -1651,6 +1651,7 @@ struct gimple_opt_pass pass_dce =
  {
   GIMPLE_PASS,
   "dce",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_dce,				/* gate */
   tree_ssa_dce,				/* execute */
   NULL,					/* sub */
@@ -1670,6 +1671,7 @@ struct gimple_opt_pass pass_dce_loop =
  {
   GIMPLE_PASS,
   "dceloop",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_dce,				/* gate */
   tree_ssa_dce_loop,			/* execute */
   NULL,					/* sub */
@@ -1689,6 +1691,7 @@ struct gimple_opt_pass pass_cd_dce =
  {
   GIMPLE_PASS,
   "cddce",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_dce,				/* gate */
   tree_ssa_cd_dce,			/* execute */
   NULL,					/* sub */
Index: ira.c
===================================================================
--- ira.c	(revision 192975)
+++ ira.c	(working copy)
@@ -4716,6 +4716,7 @@ struct rtl_opt_pass pass_ira =
  {
   RTL_PASS,
   "ira",                                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_handle_ira,		        /* execute */
   NULL,                                 /* sub */
@@ -4742,6 +4743,7 @@ struct rtl_opt_pass pass_reload =
  {
   RTL_PASS,
   "reload",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_handle_reload,	        /* execute */
   NULL,                                 /* sub */
Index: tree-ssa.c
===================================================================
--- tree-ssa.c	(revision 192975)
+++ tree-ssa.c	(working copy)
@@ -1135,6 +1135,7 @@ struct gimple_opt_pass pass_init_datastructures =
  {
   GIMPLE_PASS,
   "*init_datastructures",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_init_datastructures,		/* execute */
   NULL,					/* sub */
@@ -1744,6 +1745,7 @@ struct gimple_opt_pass pass_early_warn_uninitializ
  {
   GIMPLE_PASS,
   "*early_warn_uninitialized",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_warn_uninitialized,		/* gate */
   execute_early_warn_uninitialized,	/* execute */
   NULL,					/* sub */
@@ -2174,6 +2176,7 @@ struct gimple_opt_pass pass_update_address_taken =
  {
   GIMPLE_PASS,
   "addressables",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   NULL,					/* execute */
   NULL,					/* sub */
Index: dwarf2cfi.c
===================================================================
--- dwarf2cfi.c	(revision 192975)
+++ dwarf2cfi.c	(working copy)
@@ -3388,6 +3388,7 @@ struct rtl_opt_pass pass_dwarf2_frame =
  {
   RTL_PASS,
   "dwarf2",			/* name */
+  OPTGROUP_NONE,                /* optinfo_flags */
   gate_dwarf2_frame,		/* gate */
   execute_dwarf2_frame,		/* execute */
   NULL,				/* sub */
Index: tree-optimize.c
===================================================================
--- tree-optimize.c	(revision 192975)
+++ tree-optimize.c	(working copy)
@@ -95,6 +95,7 @@ struct gimple_opt_pass pass_cleanup_cfg_post_optim
  {
   GIMPLE_PASS,
   "optimized",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_cleanup_cfg_post_optimizing,	/* execute */
   NULL,					/* sub */
@@ -222,6 +223,7 @@ struct gimple_opt_pass pass_fixup_cfg =
  {
   GIMPLE_PASS,
   "*free_cfg_annotations",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_fixup_cfg,			/* execute */
   NULL,					/* sub */
Index: tree-ssa-phiprop.c
===================================================================
--- tree-ssa-phiprop.c	(revision 192975)
+++ tree-ssa-phiprop.c	(working copy)
@@ -409,6 +409,7 @@ struct gimple_opt_pass pass_phiprop =
  {
   GIMPLE_PASS,
   "phiprop",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_phiprop,			/* gate */
   tree_ssa_phiprop,		/* execute */
   NULL,				/* sub */
Index: tree-object-size.c
===================================================================
--- tree-object-size.c	(revision 192975)
+++ tree-object-size.c	(working copy)
@@ -1268,6 +1268,7 @@ struct gimple_opt_pass pass_object_sizes =
  {
   GIMPLE_PASS,
   "objsz",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   compute_object_sizes,			/* execute */
   NULL,					/* sub */
Index: combine.c
===================================================================
--- combine.c	(revision 192975)
+++ combine.c	(working copy)
@@ -13842,6 +13842,7 @@ struct rtl_opt_pass pass_combine =
  {
   RTL_PASS,
   "combine",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_combine,                  /* gate */
   rest_of_handle_combine,               /* execute */
   NULL,                                 /* sub */
Index: cprop.c
===================================================================
--- cprop.c	(revision 192975)
+++ cprop.c	(working copy)
@@ -1923,6 +1923,7 @@ struct rtl_opt_pass pass_rtl_cprop =
  {
   RTL_PASS,
   "cprop",                              /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_rtl_cprop,                       /* gate */
   execute_rtl_cprop,  			/* execute */
   NULL,                                 /* sub */
Index: bb-reorder.c
===================================================================
--- bb-reorder.c	(revision 192975)
+++ bb-reorder.c	(working copy)
@@ -2234,6 +2234,7 @@ struct rtl_opt_pass pass_reorder_blocks =
  {
   RTL_PASS,
   "bbro",                               /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_reorder_blocks,           /* gate */
   rest_of_handle_reorder_blocks,        /* execute */
   NULL,                                 /* sub */
@@ -2376,6 +2377,7 @@ struct rtl_opt_pass pass_duplicate_computed_gotos
  {
   RTL_PASS,
   "compgotos",                          /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_duplicate_computed_gotos,        /* gate */
   duplicate_computed_gotos,             /* execute */
   NULL,                                 /* sub */
@@ -2579,6 +2581,7 @@ struct rtl_opt_pass pass_partition_blocks =
  {
   RTL_PASS,
   "bbpart",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_partition_blocks,         /* gate */
   partition_hot_cold_basic_blocks,      /* execute */
   NULL,                                 /* sub */
Index: stack-ptr-mod.c
===================================================================
--- stack-ptr-mod.c	(revision 192975)
+++ stack-ptr-mod.c	(working copy)
@@ -96,6 +96,7 @@ struct rtl_opt_pass pass_stack_ptr_mod =
  {
   RTL_PASS,
   "*stack_ptr_mod",                     /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_handle_stack_ptr_mod,         /* execute */
   NULL,                                 /* sub */
Index: var-tracking.c
===================================================================
--- var-tracking.c	(revision 192975)
+++ var-tracking.c	(working copy)
@@ -10099,6 +10099,7 @@ struct rtl_opt_pass pass_variable_tracking =
  {
   RTL_PASS,
   "vartrack",                           /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_var_tracking,             /* gate */
   variable_tracking_main,               /* execute */
   NULL,                                 /* sub */
Index: tree-profile.c
===================================================================
--- tree-profile.c	(revision 192975)
+++ tree-profile.c	(working copy)
@@ -568,6 +568,7 @@ struct simple_ipa_opt_pass pass_ipa_tree_profile =
  {
   SIMPLE_IPA_PASS,
   "profile",  		               /* name */
+  OPTGROUP_NONE,                       /* optinfo_flags */
   gate_tree_profile_ipa,               /* gate */
   tree_profiling,                      /* execute */
   NULL,                                /* sub */
Index: tree-vect-generic.c
===================================================================
--- tree-vect-generic.c	(revision 192975)
+++ tree-vect-generic.c	(working copy)
@@ -1435,6 +1435,7 @@ struct gimple_opt_pass pass_lower_vector =
  {
   GIMPLE_PASS,
   "veclower",				/* name */
+  OPTGROUP_VEC,                         /* optinfo_flags */
   gate_expand_vector_operations_ssa,    /* gate */
   expand_vector_operations,		/* execute */
   NULL,					/* sub */
@@ -1457,6 +1458,7 @@ struct gimple_opt_pass pass_lower_vector_ssa =
  {
   GIMPLE_PASS,
   "veclower2",				/* name */
+  OPTGROUP_VEC,                         /* optinfo_flags */
   0,	                                /* gate */
   expand_vector_operations,		/* execute */
   NULL,					/* sub */
Index: reg-stack.c
===================================================================
--- reg-stack.c	(revision 192975)
+++ reg-stack.c	(working copy)
@@ -3305,6 +3305,7 @@ struct rtl_opt_pass pass_stack_regs =
  {
   RTL_PASS,
   "*stack_regs",                        /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_stack_regs,               /* gate */
   NULL,					/* execute */
   NULL,                                 /* sub */
@@ -3336,6 +3337,7 @@ struct rtl_opt_pass pass_stack_regs_run =
  {
   RTL_PASS,
   "stack",                              /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_handle_stack_regs,            /* execute */
   NULL,                                 /* sub */
Index: opts-global.c
===================================================================
--- opts-global.c	(revision 192975)
+++ opts-global.c	(working copy)
@@ -240,7 +240,7 @@ read_cmdline_options (struct gcc_options *opts, st
    REPORT_VECTORIZED_LOCATIONS ==> "-optimized"
    REPORT_UNVECTORIZED_LOCATIONS ==> "-missed"
 
-   Any higher verbosity levels get mapped to "-optall" flags.  */
+   Any higher verbosity levels get mapped to "-all" flags.  */
 
 static void
 dump_remap_tree_vectorizer_verbose (const char *arg)
@@ -259,7 +259,7 @@ dump_remap_tree_vectorizer_verbose (const char *ar
       remapped_opt_info = "missed";
       break;
     default:
-      remapped_opt_info = "optall";
+      remapped_opt_info = "all";
       break;
     }
 
Index: reginfo.c
===================================================================
--- reginfo.c	(revision 192975)
+++ reginfo.c	(working copy)
@@ -972,6 +972,7 @@ struct rtl_opt_pass pass_reginfo_init =
  {
   RTL_PASS,
   "reginfo",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   reginfo_init,                         /* execute */
   NULL,                                 /* sub */
Index: sched-rgn.c
===================================================================
--- sched-rgn.c	(revision 192975)
+++ sched-rgn.c	(working copy)
@@ -3575,6 +3575,7 @@ struct rtl_opt_pass pass_sched =
  {
   RTL_PASS,
   "sched1",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_sched,                    /* gate */
   rest_of_handle_sched,                 /* execute */
   NULL,                                 /* sub */
@@ -3596,6 +3597,7 @@ struct rtl_opt_pass pass_sched2 =
  {
   RTL_PASS,
   "sched2",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_sched2,                   /* gate */
   rest_of_handle_sched2,                /* execute */
   NULL,                                 /* sub */
Index: tree-ssa-structalias.c
===================================================================
--- tree-ssa-structalias.c	(revision 192975)
+++ tree-ssa-structalias.c	(working copy)
@@ -6807,6 +6807,7 @@ struct gimple_opt_pass pass_build_alias =
  {
   GIMPLE_PASS,
   "alias",		    /* name */
+  OPTGROUP_NONE,            /* optinfo_flags */
   gate_tree_pta,	    /* gate */
   NULL,                     /* execute */
   NULL,                     /* sub */
@@ -6829,6 +6830,7 @@ struct gimple_opt_pass pass_build_ealias =
  {
   GIMPLE_PASS,
   "ealias",		    /* name */
+  OPTGROUP_NONE,            /* optinfo_flags */
   gate_tree_pta,	    /* gate */
   NULL,                     /* execute */
   NULL,                     /* sub */
@@ -7203,6 +7205,7 @@ struct simple_ipa_opt_pass pass_ipa_pta =
  {
   SIMPLE_IPA_PASS,
   "pta",		                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_ipa_pta,			/* gate */
   ipa_pta_execute,			/* execute */
   NULL,					/* sub */
Index: tree-switch-conversion.c
===================================================================
--- tree-switch-conversion.c	(revision 192975)
+++ tree-switch-conversion.c	(working copy)
@@ -1463,6 +1463,7 @@ struct gimple_opt_pass pass_convert_switch =
  {
   GIMPLE_PASS,
   "switchconv",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   switchconv_gate,			/* gate */
   do_switchconv,			/* execute */
   NULL,					/* sub */
Index: tree-cfg.c
===================================================================
--- tree-cfg.c	(revision 192975)
+++ tree-cfg.c	(working copy)
@@ -247,6 +247,7 @@ struct gimple_opt_pass pass_build_cfg =
  {
   GIMPLE_PASS,
   "cfg",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_build_cfg,			/* execute */
   NULL,					/* sub */
@@ -7705,6 +7706,7 @@ struct gimple_opt_pass pass_split_crit_edges =
  {
   GIMPLE_PASS,
   "crited",                          /* name */
+  OPTGROUP_NONE,                 /* optinfo_flags */
   NULL,                          /* gate */
   split_critical_edges,          /* execute */
   NULL,                          /* sub */
@@ -7858,6 +7860,7 @@ struct gimple_opt_pass pass_warn_function_return =
  {
   GIMPLE_PASS,
   "*warn_function_return",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_warn_function_return,		/* execute */
   NULL,					/* sub */
@@ -7894,6 +7897,7 @@ struct gimple_opt_pass pass_warn_function_noreturn
  {
   GIMPLE_PASS,
   "*warn_function_noreturn",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_warn_function_noreturn,		/* gate */
   execute_warn_function_noreturn,	/* execute */
   NULL,					/* sub */
@@ -7992,6 +7996,7 @@ struct gimple_opt_pass pass_warn_unused_result =
   {
     GIMPLE_PASS,
     "*warn_unused_result",		/* name */
+    OPTGROUP_NONE,                        /* optinfo_flags */
     gate_warn_unused_result,		/* gate */
     run_warn_unused_result,		/* execute */
     NULL,				/* sub */
Index: passes.c
===================================================================
--- passes.c	(revision 192975)
+++ passes.c	(working copy)
@@ -103,7 +103,6 @@ debug_pass (void)
 
 
 /* Global variables used to communicate with passes.  */
-int dump_flags;
 bool in_gimple_form;
 bool first_pass_instance;
 
@@ -285,6 +284,7 @@ struct simple_ipa_opt_pass pass_early_local_passes
  {
   SIMPLE_IPA_PASS,
   "early_local_cleanups",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_all_early_local_passes,		/* gate */
   execute_all_early_local_passes,	/* execute */
   NULL,					/* sub */
@@ -314,6 +314,7 @@ static struct gimple_opt_pass pass_all_early_optim
  {
   GIMPLE_PASS,
   "early_optimizations",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_all_early_optimizations,		/* gate */
   NULL,					/* execute */
   NULL,					/* sub */
@@ -341,6 +342,7 @@ static struct gimple_opt_pass pass_all_optimizatio
  {
   GIMPLE_PASS,
   "*all_optimizations",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_all_optimizations,		/* gate */
   NULL,					/* execute */
   NULL,					/* sub */
@@ -368,6 +370,7 @@ static struct gimple_opt_pass pass_all_optimizatio
  {
   GIMPLE_PASS,
   "*all_optimizations_g",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_all_optimizations_g,		/* gate */
   NULL,					/* execute */
   NULL,					/* sub */
@@ -395,6 +398,7 @@ static struct rtl_opt_pass pass_rest_of_compilatio
  {
   RTL_PASS,
   "*rest_of_compilation",               /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_rest_of_compilation,             /* gate */
   NULL,                                 /* execute */
   NULL,                                 /* sub */
@@ -420,6 +424,7 @@ static struct rtl_opt_pass pass_postreload =
  {
   RTL_PASS,
   "*all-postreload",                        /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_postreload,                      /* gate */
   NULL,                                 /* execute */
   NULL,                                 /* sub */
@@ -487,6 +492,7 @@ register_one_dump_file (struct opt_pass *pass)
   const char *name, *full_name, *prefix;
   char num[10];
   int flags, id;
+  int optgroup_flags = OPTGROUP_NONE;
 
   /* See below in next_pass_1.  */
   num[0] = '\0';
@@ -503,15 +509,16 @@ register_one_dump_file (struct opt_pass *pass)
   name = name ? name + 1 : pass->name;
   dot_name = concat (".", name, num, NULL);
   if (pass->type == SIMPLE_IPA_PASS || pass->type == IPA_PASS)
-    prefix = "ipa-", flags = TDF_IPA;
+    prefix = "ipa-", flags = TDF_IPA, optgroup_flags |= OPTGROUP_IPA;
   else if (pass->type == GIMPLE_PASS)
-    prefix = "tree-", flags = TDF_TREE;
+    prefix = "tree-", flags = TDF_TREE, optgroup_flags |= OPTGROUP_TREE;
   else
-    prefix = "rtl-", flags = TDF_RTL;
+    prefix = "rtl-", flags = TDF_RTL, optgroup_flags |= OPTGROUP_RTL;
 
   flag_name = concat (prefix, name, num, NULL);
   glob_name = concat (prefix, name, NULL);
-  id = dump_register (dot_name, flag_name, glob_name, flags);
+  optgroup_flags |= pass->optinfo_flags;
+  id = dump_register (dot_name, flag_name, glob_name, flags, optgroup_flags);
   set_pass_for_id (id, pass);
   full_name = concat (prefix, pass->name, num, NULL);
   register_pass_name (pass, full_name);
Index: ree.c
===================================================================
--- ree.c	(revision 192975)
+++ ree.c	(working copy)
@@ -949,6 +949,7 @@ struct rtl_opt_pass pass_ree =
  {
   RTL_PASS,
   "ree",                                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_ree,                      /* gate */
   rest_of_handle_ree,                   /* execute */
   NULL,                                 /* sub */
Index: tree-ssa-reassoc.c
===================================================================
--- tree-ssa-reassoc.c	(revision 192975)
+++ tree-ssa-reassoc.c	(working copy)
@@ -3703,6 +3703,7 @@ struct gimple_opt_pass pass_reassoc =
  {
   GIMPLE_PASS,
   "reassoc",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_tree_ssa_reassoc,		/* gate */
   execute_reassoc,			/* execute */
   NULL,					/* sub */
Index: config/epiphany/resolve-sw-modes.c
===================================================================
--- config/epiphany/resolve-sw-modes.c	(revision 192975)
+++ config/epiphany/resolve-sw-modes.c	(working copy)
@@ -166,6 +166,7 @@ struct rtl_opt_pass pass_resolve_sw_modes =
  {
   RTL_PASS,
   "resolve_sw_modes",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_resolve_sw_modes,		/* gate */
   resolve_sw_modes,			/* execute */
   NULL,					/* sub */
Index: config/epiphany/mode-switch-use.c
===================================================================
--- config/epiphany/mode-switch-use.c	(revision 192975)
+++ config/epiphany/mode-switch-use.c	(working copy)
@@ -76,6 +76,7 @@ struct rtl_opt_pass pass_mode_switch_use =
  {
   RTL_PASS,
   "mode_switch_use",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   insert_uses,				/* execute */
   NULL,					/* sub */
Index: config/rl78/rl78.c
===================================================================
--- config/rl78/rl78.c	(revision 192975)
+++ config/rl78/rl78.c	(working copy)
@@ -133,6 +133,7 @@ static struct opt_pass rl78_devirt_pass =
 {
   RTL_PASS,
   "devirt",
+  OPTGROUP_NONE,                        /* optinfo_flags */
   devirt_gate,
   devirt_pass,
   NULL,
Index: combine-stack-adj.c
===================================================================
--- combine-stack-adj.c	(revision 192975)
+++ combine-stack-adj.c	(working copy)
@@ -650,6 +650,7 @@ struct rtl_opt_pass pass_stack_adjustments =
  {
   RTL_PASS,
   "csa",                                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_stack_adjustments,        /* gate */
   rest_of_handle_stack_adjustments,     /* execute */
   NULL,                                 /* sub */
Index: cfgrtl.c
===================================================================
--- cfgrtl.c	(revision 192975)
+++ cfgrtl.c	(working copy)
@@ -456,6 +456,7 @@ struct rtl_opt_pass pass_free_cfg =
  {
   RTL_PASS,
   "*free_cfg",                          /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_pass_free_cfg,                /* execute */
   NULL,                                 /* sub */
@@ -2998,6 +2999,7 @@ struct rtl_opt_pass pass_into_cfg_layout_mode =
  {
   RTL_PASS,
   "into_cfglayout",                     /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   into_cfg_layout_mode,                 /* execute */
   NULL,                                 /* sub */
@@ -3017,6 +3019,7 @@ struct rtl_opt_pass pass_outof_cfg_layout_mode =
  {
   RTL_PASS,
   "outof_cfglayout",                    /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   outof_cfg_layout_mode,                /* execute */
   NULL,                                 /* sub */
Index: statistics.c
===================================================================
--- statistics.c	(revision 192975)
+++ statistics.c	(working copy)
@@ -246,7 +246,7 @@ void
 statistics_early_init (void)
 {
   statistics_dump_nr = dump_register (".statistics", "statistics",
-				      "statistics", TDF_TREE);
+				      "statistics", TDF_TREE, OPTGROUP_NONE);
 }
 
 /* Init the statistics.  */
Index: dce.c
===================================================================
--- dce.c	(revision 192975)
+++ dce.c	(working copy)
@@ -786,6 +786,7 @@ struct rtl_opt_pass pass_ud_rtl_dce =
  {
   RTL_PASS,
   "ud_dce",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_ud_dce,                          /* gate */
   rest_of_handle_ud_dce,                /* execute */
   NULL,                                 /* sub */
@@ -1196,6 +1197,7 @@ struct rtl_opt_pass pass_fast_rtl_dce =
  {
   RTL_PASS,
   "rtl_dce",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_fast_dce,                        /* gate */
   rest_of_handle_fast_dce,              /* execute */
   NULL,                                 /* sub */
Index: tree-ssanames.c
===================================================================
--- tree-ssanames.c	(revision 192975)
+++ tree-ssanames.c	(working copy)
@@ -451,6 +451,7 @@ struct gimple_opt_pass pass_release_ssa_names =
  {
   GIMPLE_PASS,
   "release_ssa",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   release_dead_ssa_names,		/* execute */
   NULL,					/* sub */
Index: regcprop.c
===================================================================
--- regcprop.c	(revision 192975)
+++ regcprop.c	(working copy)
@@ -1235,6 +1235,7 @@ struct rtl_opt_pass pass_cprop_hardreg =
  {
   RTL_PASS,
   "cprop_hardreg",                      /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_cprop,                    /* gate */
   copyprop_hardreg_forward,             /* execute */
   NULL,                                 /* sub */

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] pass filtering for -fopt-info
  2012-10-30  9:06 [PATCH] pass filtering for -fopt-info Sharad Singhai
@ 2012-10-30 15:37 ` Richard Biener
  2012-10-30 16:18   ` Xinliang David Li
  2012-10-30 16:02 ` Xinliang David Li
  1 sibling, 1 reply; 7+ messages in thread
From: Richard Biener @ 2012-10-30 15:37 UTC (permalink / raw)
  To: Sharad Singhai; +Cc: gcc-patches, David Li

On Tue, Oct 30, 2012 at 9:21 AM, Sharad Singhai <singhai@google.com> wrote:
> As per discussion in http://gcc.gnu.org/ml/gcc/2012-10/msg00225.html,
> I have added the -fopt-info pass filtering in the attached patch.
>
> The basic idea is that there are optimization pass groups and a user
> can selectively enable dumps for these group(s) via command-line
> syntax. Currently, I define the following optimization groups: 'loop',
> 'lto', 'inline', 'vec', and 'omp'. A pass can be in multiple groups.
>
> If a pass doesn't explicitly specify an optimization group, (denoted
> by OPTGROUP_NONE) then a group is assigned based on the pass type.
> These three are the obvious implicit groups: 'tree', 'ipa', and 'rtl'.
>
> Also there is a catch-all group, called 'optall'.
>
> The options for -fopt-info dumps verbosity remain 'optimized',
> 'missed', 'note', and 'all'. Since these two types of options,
> verbosity and optimization groups are non-overlapping, I have decided
> to freely mix them. Something like this works as expected, i.e., dump
> missed vectorizer info into vec.missed.
>
> gcc ... -fopt-info-vec-missed=vec.missed
>
> which is equivalent to
>
> gcc ... -fopt-info-missed-vec=vec.missed
>
> However, the order still matters, and it can be somewhat confusing. For example,
>
> gcc -fopt-info-vec-missed=vec.miss -fopt-info-vec-optimized=vec.opt
>
> will dump missed and optimized vectorizer info into vec.opt, while no
> vec.miss is produced. This is due to the fact that the latter group
> specifier, 'vec' overrides the first one. However, the 'missed' and
> 'optimized' are both honored as there is no conflict there. This is
> somewhat confusing. Hopefully, this type of usage would not be common.

What I'd expect from that would be both vec.miss and vec.opt being
populated ... (thus go away from the duality of dump files to
primary dump file plus a set of alternate dump files).

> I have updated the documentation to include -fopt-info examples, and
> added some details about -fopt-info command line conflicts.

I like it overall, not sure if we want to pre-populate the OPTGROUP
set too much at this point.  Like what is 'tree' or 'rtl' to users?
nothing I think.
'ipa' yes.  'lto'?  sounds redundant with 'ipa' to me.  'omp'?  we don't have
any optimizations here.

Thus please drop TREE, RTL, LTO and OMP for now.

Otherwise I'm leaving it for comments from other folks.

Thanks,
Richard.

> Thanks,
> Sharad

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] pass filtering for -fopt-info
  2012-10-30  9:06 [PATCH] pass filtering for -fopt-info Sharad Singhai
  2012-10-30 15:37 ` Richard Biener
@ 2012-10-30 16:02 ` Xinliang David Li
  1 sibling, 0 replies; 7+ messages in thread
From: Xinliang David Li @ 2012-10-30 16:02 UTC (permalink / raw)
  To: Sharad Singhai; +Cc: gcc-patches, Richard Biener

On Tue, Oct 30, 2012 at 1:21 AM, Sharad Singhai <singhai@google.com> wrote:
> As per discussion in http://gcc.gnu.org/ml/gcc/2012-10/msg00225.html,
> I have added the -fopt-info pass filtering in the attached patch.
>
> The basic idea is that there are optimization pass groups and a user
> can selectively enable dumps for these group(s) via command-line
> syntax. Currently, I define the following optimization groups: 'loop',
> 'lto', 'inline', 'vec', and 'omp'. A pass can be in multiple groups.
>
> If a pass doesn't explicitly specify an optimization group, (denoted
> by OPTGROUP_NONE) then a group is assigned based on the pass type.
> These three are the obvious implicit groups: 'tree', 'ipa', and 'rtl'.


I agree with Richard -- we don't need these implicit groups.

>
> Also there is a catch-all group, called 'optall'.


Why is this needed? Isn't that the default?


>
> The options for -fopt-info dumps verbosity remain 'optimized',
> 'missed', 'note', and 'all'. Since these two types of options,
> verbosity and optimization groups are non-overlapping, I have decided
> to freely mix them. Something like this works as expected, i.e., dump
> missed vectorizer info into vec.missed.
>
> gcc ... -fopt-info-vec-missed=vec.missed
>
> which is equivalent to
>
> gcc ... -fopt-info-missed-vec=vec.missed
>
> However, the order still matters, and it can be somewhat confusing. For example,
>
> gcc -fopt-info-vec-missed=vec.miss -fopt-info-vec-optimized=vec.opt
>
> will dump missed and optimized vectorizer info into vec.opt, while no
> vec.miss is produced. This is due to the fact that the latter group
> specifier, 'vec' overrides the first one. However, the 'missed' and
> 'optimized' are both honored as there is no conflict there. This is
> somewhat confusing. Hopefully, this type of usage would not be common.

Please document that only one alt dump file per optimization-group is supported.

>
> I have updated the documentation to include -fopt-info examples, and
> added some details about -fopt-info command line conflicts.

thanks,

David

>
> Thanks,
> Sharad

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] pass filtering for -fopt-info
  2012-10-30 15:37 ` Richard Biener
@ 2012-10-30 16:18   ` Xinliang David Li
  2012-10-31  8:18     ` Sharad Singhai
  0 siblings, 1 reply; 7+ messages in thread
From: Xinliang David Li @ 2012-10-30 16:18 UTC (permalink / raw)
  To: Richard Biener; +Cc: Sharad Singhai, gcc-patches

On Tue, Oct 30, 2012 at 8:28 AM, Richard Biener
<richard.guenther@gmail.com> wrote:
> On Tue, Oct 30, 2012 at 9:21 AM, Sharad Singhai <singhai@google.com> wrote:
>> As per discussion in http://gcc.gnu.org/ml/gcc/2012-10/msg00225.html,
>> I have added the -fopt-info pass filtering in the attached patch.
>>
>> The basic idea is that there are optimization pass groups and a user
>> can selectively enable dumps for these group(s) via command-line
>> syntax. Currently, I define the following optimization groups: 'loop',
>> 'lto', 'inline', 'vec', and 'omp'. A pass can be in multiple groups.
>>
>> If a pass doesn't explicitly specify an optimization group, (denoted
>> by OPTGROUP_NONE) then a group is assigned based on the pass type.
>> These three are the obvious implicit groups: 'tree', 'ipa', and 'rtl'.
>>
>> Also there is a catch-all group, called 'optall'.
>>
>> The options for -fopt-info dumps verbosity remain 'optimized',
>> 'missed', 'note', and 'all'. Since these two types of options,
>> verbosity and optimization groups are non-overlapping, I have decided
>> to freely mix them. Something like this works as expected, i.e., dump
>> missed vectorizer info into vec.missed.
>>
>> gcc ... -fopt-info-vec-missed=vec.missed
>>
>> which is equivalent to
>>
>> gcc ... -fopt-info-missed-vec=vec.missed
>>
>> However, the order still matters, and it can be somewhat confusing. For example,
>>
>> gcc -fopt-info-vec-missed=vec.miss -fopt-info-vec-optimized=vec.opt
>>
>> will dump missed and optimized vectorizer info into vec.opt, while no
>> vec.miss is produced. This is due to the fact that the latter group
>> specifier, 'vec' overrides the first one. However, the 'missed' and
>> 'optimized' are both honored as there is no conflict there. This is
>> somewhat confusing. Hopefully, this type of usage would not be common.
>
> What I'd expect from that would be both vec.miss and vec.opt being
> populated ... (thus go away from the duality of dump files to
> primary dump file plus a set of alternate dump files).
>
>> I have updated the documentation to include -fopt-info examples, and
>> added some details about -fopt-info command line conflicts.
>
> I like it overall, not sure if we want to pre-populate the OPTGROUP
> set too much at this point.  Like what is 'tree' or 'rtl' to users?
> nothing I think.
> 'ipa' yes.  'lto'?  sounds redundant with 'ipa' to me.  'omp'?  we don't have
> any optimizations here.


OMP is a high level transformation, and it seems to be a good
candidate group, but this part does not need to be designed now. For
instance, there are a bunch of FDO related transformation (indirect
call promotion, memcpy transformation etc), and coverage mismatch
notes etc a good candidate to be filtered.

thanks,

David


>
> Thus please drop TREE, RTL, LTO and OMP for now.
>
> Otherwise I'm leaving it for comments from other folks.
>
> Thanks,
> Richard.
>
>> Thanks,
>> Sharad

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] pass filtering for -fopt-info
  2012-10-30 16:18   ` Xinliang David Li
@ 2012-10-31  8:18     ` Sharad Singhai
  2012-10-31 11:56       ` Richard Biener
  0 siblings, 1 reply; 7+ messages in thread
From: Sharad Singhai @ 2012-10-31  8:18 UTC (permalink / raw)
  To: Xinliang David Li; +Cc: Richard Biener, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 2865 bytes --]

I am attaching an updated patch with comments inline.

On Tue, Oct 30, 2012 at 9:04 AM, Xinliang David Li <davidxl@google.com> wrote:
> On Tue, Oct 30, 2012 at 8:28 AM, Richard Biener
> <richard.guenther@gmail.com> wrote:

>> What I'd expect from that would be both vec.miss and vec.opt being
>> populated ... (thus go away from the duality of dump files to
>> primary dump file plus a set of alternate dump files).

Yes, that would be an ideal behavior. Each pass currently has access
to only two dump files, its primary file and alternate file. If we
extend that to include a set, it would be cleaner and avoid some of
the issues like the following:

During testing, I found that even having any two different files for
-fopt-info is problematic. For example, consider

gcc ... -fopt-info-vec-optimized=vec.opt -fopt-info-loop-missed=loop.missed

Now 'loop' and 'vec' include overlapping passes and since we have only
one alternate file per pass, it can either be vec.opt or loop.missed,
and some information would be lost. If we have a set of files, we can
avoid this problem.

However, considering the stage 1 deadline, I don't think it is
feasible for this version. Instead, a set of alternate files can be
considered as a future extension. For now, having a default of
'stderr' works for the common use case. To further prevent confusion,
the current patch allows only one (non-stderr) file for -fopt-info and
a warning is printed as in  the example below

gcc ... -fopt-info-vec-optimized=vec.opt -fopt-info-loop-missed=loop.missed
cc1: warning: ignoring possibly conflicting option
'-fopt-info-loop-missed=loop.missed' [enabled by default]

Multiple dumps can be achieved using 'stderr' (default) instead.

gcc ... -fopt-info-vec-optimized -fopt-info-loop-missed

>>> I have updated the documentation to include -fopt-info examples, and
>>> added some details about -fopt-info command line conflicts.
>>
>> I like it overall, not sure if we want to pre-populate the OPTGROUP
>> set too much at this point.  Like what is 'tree' or 'rtl' to users?
>> nothing I think.
>> 'ipa' yes.  'lto'?  sounds redundant with 'ipa' to me.  'omp'?  we don't have
>> any optimizations here.

>
> OMP is a high level transformation, and it seems to be a good
> candidate group, but this part does not need to be designed now. For
> instance, there are a bunch of FDO related transformation (indirect
> call promotion, memcpy transformation etc), and coverage mismatch
> notes etc a good candidate to be filtered.

Yes, perhaps later, we can consider something like an 'fdo' group for
this purpose.

>> Thus please drop TREE, RTL, LTO and OMP for now.

Okay, I have removed 'tree', 'rtl', 'omp', 'lto' groups.

>>
>> Otherwise I'm leaving it for comments from other folks.
>>
>> Thanks,
>> Richard.
>>

I have updated the documentation and testing is ongoing.

Thanks,
Sharad

[-- Attachment #2: opt_dump_group.5.patch --]
[-- Type: application/octet-stream, Size: 105149 bytes --]

2012-10-31  Sharad Singhai  <singhai@google.com>

	* doc/invoke.texi: Update the documentation about -fopt-info.
	* dumpfile.c: Move dump_flags here from passes.c.
	(dump_files): Add field for optinfo_flags for the static initializer.
	(dump_register): Handle additional parameter for optgroup_flags.
	(opt_info_enable_passes): Renamed opt_info_enable_all. Handle
	optgroup_flags. Fix documentation.
	(opt_info_switch_p_1): Handle optgroup options.
	* dumpfile.h (dump_register): Additional argument for optgroup_flags.
	All callers updated.
	(struct dump_file_info): Add field for optgroup_flags.
	Define OPTGROUP_* flags.
	* tree-pass.h (struct opt_pass): Add addtional field for optinfo_flags.
	All static initializers updated.
	* opts-global.c (dump_remap_tree_vectorizer_verbose): Use 'all'
	instead of 'optall'.
	* passes.c (register_one_dump_file): Add argument for optgroup_flags.
	Move dump_flags from here to dumpfile.c.
	* statistics.c (statistics_early_init): Use OPTGROUP_NONE in call to
	dump_register.

Index: tree-vrp.c
===================================================================
--- tree-vrp.c	(revision 192991)
+++ tree-vrp.c	(working copy)
@@ -9234,6 +9234,7 @@ struct gimple_opt_pass pass_vrp =
  {
   GIMPLE_PASS,
   "vrp",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_vrp,				/* gate */
   execute_vrp,				/* execute */
   NULL,					/* sub */
Index: regrename.c
===================================================================
--- regrename.c	(revision 192991)
+++ regrename.c	(working copy)
@@ -1842,6 +1842,7 @@ struct rtl_opt_pass pass_regrename =
  {
   RTL_PASS,
   "rnreg",                              /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_regrename,                /* gate */
   regrename_optimize,                   /* execute */
   NULL,                                 /* sub */
Index: fwprop.c
===================================================================
--- fwprop.c	(revision 192991)
+++ fwprop.c	(working copy)
@@ -1486,6 +1486,7 @@ struct rtl_opt_pass pass_rtl_fwprop =
  {
   RTL_PASS,
   "fwprop1",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_fwprop,				/* gate */
   fwprop,				/* execute */
   NULL,                                 /* sub */
@@ -1535,6 +1536,7 @@ struct rtl_opt_pass pass_rtl_fwprop_addr =
  {
   RTL_PASS,
   "fwprop2",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_fwprop,				/* gate */
   fwprop_addr,				/* execute */
   NULL,                                 /* sub */
Index: doc/invoke.texi
===================================================================
--- doc/invoke.texi	(revision 192991)
+++ doc/invoke.texi	(working copy)
@@ -6021,59 +6021,108 @@ Enable all the available tree dumps with the flags
 @itemx -fopt-info-@var{options}
 @itemx -fopt-info-@var{options}=@var{filename}
 @opindex fopt-info
-Controls optimization dumps from all the passes. If the
+Controls optimization dumps from various optimization passes. If the
 @samp{-@var{options}} form is used, @var{options} is a list of
-@samp{-} separated options to control the dump details.  If
-@var{options} is not specified, it defaults to @option{optall}. If the
-@var{filename} is not specified, it defaults to @file{stderr}. Note
-that the output @var{filename} will be overwritten in case of multiple
-translation units. If a combined output from multiple translation
-units is desired, @file{stderr} should be used instead.
+@samp{-} separated options to select the dump details and
+optimizations.  If @var{options} is not specified, it defaults to
+@option{all} for details and @option{optall} for optimization
+groups. If the @var{filename} is not specified, it defaults to
+@file{stderr}. Note that the output @var{filename} will be overwritten
+in case of multiple translation units. If a combined output from
+multiple translation units is desired, @file{stderr} should be used
+instead.
 
-The following options are available
+The options can be divided into two groups, 1) options describing the
+verbosity of the dump, and 2) options describing which optimizations
+should be included. The options from both the groups can be freely
+mixed as they are non-overlapping. However, in case of any conflicts,
+the latter options override the earlier options on the command
+line. In addition, only one @file{filename} can be provided. If
+multiple filenames are provided then all but the first one are
+ignored.
 
+The first group has the following options.
+
 @table @samp
 @item optimized
 Print information when an optimization is successfully applied. It is
 up to a pass to decide which information is relevant. For example, the
-vectorizer pass prints the location of loop which got vectorized.
+vectorizer passes print the source location of loops which got
+successfully vectorized.
 @item missed
 Print information about missed optimizations. Individual passes
-control which information to include in the output. For example,
+control which informations to include in the output. For example,
 
 @smallexample
-gcc -O2 -ftree-vectorize -fopt-info-missed
+gcc -O2 -ftree-vectorize -fopt-info-vec-missed
 @end smallexample
 
-will print information about missed optimization opportunities on
-stderr.
+will print information about missed optimization opportunities from
+vectorization passes on stderr.
 @item note
 Print verbose information about optimizations, such as certain
 transformations, more detailed messages about decisions etc.
-@item optall
+@item all
 Print detailed optimization information. This includes
-@var{optimized}, @var{missed}, and @var{note}. For example,
+@var{optimized}, @var{missed}, and @var{note}.
+@end table
 
+The second set of options describes a group of optimizations and can
+be one or more of the following.
+
+@table @samp
+@item ipa
+Enable dumps from all interprocedural optimizations.
+@item loop
+Enable dumps from all loop optimizations.
+@item inline
+Enable dumps from all inlining optimizations.
+@item vec
+Enable dumps from all vectorization optimizations.
+@end table
+
+For example,
 @smallexample
-gcc -O2 -ftree-vectorize -fopt-info-optall=opt.all
+gcc -O3 -fopt-info-missed=missed.all
 @end smallexample
 
-outputs detailed optimization report from all the passes into
-@file{opt.all}.
-@end table
+outputs missed optimization report from all the passes into
+@file{missed.all}.
 
-It applies the dump options to all the passes. If the @var{filename}
-is provided, the dump from all the passes is concatenated, otherwise
-the dump is output onto @file{stderr}. If @var{options} is omitted, it
-defaults to @option{optall}.
+As another example,
+@smallexample
+gcc -O3 -fopt-info-inline-optimized-missed=inline.txt
+@end smallexample
 
+will output information about missed optimizations as well as
+optimized locations from all the inlining passes into
+@file{inline.txt}.
+
+If the @var{filename} is provided, then the dumps from all the
+applicable optimizations are concatenated into the @file{filename},
+otherwise the dump is output onto @file{stderr}. If @var{options} is
+omitted, it defaults to @option{all-optall}, which means dump all
+available optimization info from all the passes. In the following
+example, all optimization info is output on to @file{stderr}.
+
 @smallexample
-gcc -O3 -fopt-info-optimized-missed=optdump.txt
+gcc -O3 -fopt-info
 @end smallexample
 
-This will output information about missed optimizations as well as
-optimized locations from all the passes into @file{optdump.txt}.
+Note that @option{-fopt-info-vec-missed} behaves the same as
+@option{-fopt-info-missed-vec}. The order is important in case of
+conflicts. For example consider
 
+@smallexample
+gcc -fopt-info-vec-missed=vec.miss -fopt-info-loop-optimized=loop.opt
+@end smallexample
+
+Here the two output filenames @file{vec.miss} and @file{loop.opt} are
+in conflict since they might contain overlapping information. In this
+case, only the first option takes effect and the subsequent options
+are ignored. Thus only the @file{vec.miss} is produced which cotaints
+dumps from the vectorizer about missed opportunities.
+
 @item -ftree-vectorizer-verbose=@var{n}
 @opindex ftree-vectorizer-verbose
 This option is deprecated and is implemented in terms of
Index: tree-into-ssa.c
===================================================================
--- tree-into-ssa.c	(revision 192991)
+++ tree-into-ssa.c	(working copy)
@@ -2404,6 +2404,7 @@ struct gimple_opt_pass pass_build_ssa =
  {
   GIMPLE_PASS,
   "ssa",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   rewrite_into_ssa,			/* execute */
   NULL,					/* sub */
Index: tree-complex.c
===================================================================
--- tree-complex.c	(revision 192991)
+++ tree-complex.c	(working copy)
@@ -1608,6 +1608,7 @@ struct gimple_opt_pass pass_lower_complex =
  {
   GIMPLE_PASS,
   "cplxlower",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   0,					/* gate */
   tree_lower_complex,			/* execute */
   NULL,					/* sub */
@@ -1638,6 +1639,7 @@ struct gimple_opt_pass pass_lower_complex_O0 =
  {
   GIMPLE_PASS,
   "cplxlower0",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_no_optimization,			/* gate */
   tree_lower_complex,			/* execute */
   NULL,					/* sub */
Index: cgraphbuild.c
===================================================================
--- cgraphbuild.c	(revision 192991)
+++ cgraphbuild.c	(working copy)
@@ -370,6 +370,7 @@ struct gimple_opt_pass pass_build_cgraph_edges =
  {
   GIMPLE_PASS,
   "*build_cgraph_edges",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   build_cgraph_edges,			/* execute */
   NULL,					/* sub */
@@ -487,6 +488,7 @@ struct gimple_opt_pass pass_rebuild_cgraph_edges =
  {
   GIMPLE_PASS,
   "*rebuild_cgraph_edges",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   rebuild_cgraph_edges,			/* execute */
   NULL,					/* sub */
@@ -514,6 +516,7 @@ struct gimple_opt_pass pass_remove_cgraph_callee_e
  {
   GIMPLE_PASS,
   "*remove_cgraph_callee_edges",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   remove_cgraph_callee_edges,		/* execute */
   NULL,					/* sub */
Index: tree-ssa-uninit.c
===================================================================
--- tree-ssa-uninit.c	(revision 192991)
+++ tree-ssa-uninit.c	(working copy)
@@ -2037,6 +2037,7 @@ struct gimple_opt_pass pass_late_warn_uninitialize
  {
   GIMPLE_PASS,
   "uninit",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_warn_uninitialized,		/* gate */
   execute_late_warn_uninitialized,	/* execute */
   NULL,					/* sub */
Index: tracer.c
===================================================================
--- tracer.c	(revision 192991)
+++ tracer.c	(working copy)
@@ -403,6 +403,7 @@ struct gimple_opt_pass pass_tracer =
  {
   GIMPLE_PASS,
   "tracer",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_tracer,                          /* gate */
   tracer,                               /* execute */
   NULL,                                 /* sub */
Index: tree-loop-distribution.c
===================================================================
--- tree-loop-distribution.c	(revision 192991)
+++ tree-loop-distribution.c	(working copy)
@@ -1578,6 +1578,7 @@ struct gimple_opt_pass pass_loop_distribution =
  {
   GIMPLE_PASS,
   "ldist",			/* name */
+  OPTGROUP_LOOP,                /* optinfo_flags */
   gate_tree_loop_distribution,  /* gate */
   tree_loop_distribution,       /* execute */
   NULL,				/* sub */
Index: postreload-gcse.c
===================================================================
--- postreload-gcse.c	(revision 192991)
+++ postreload-gcse.c	(working copy)
@@ -1328,6 +1328,7 @@ struct rtl_opt_pass pass_gcse2 =
  {
   RTL_PASS,
   "gcse2",                              /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_gcse2,                    /* gate */
   rest_of_handle_gcse2,                 /* execute */
   NULL,                                 /* sub */
Index: dumpfile.c
===================================================================
--- dumpfile.c	(revision 192991)
+++ dumpfile.c	(working copy)
@@ -43,34 +43,35 @@ static FILE *dump_open_alternate_stream (struct du
 FILE *dump_file = NULL;
 FILE *alt_dump_file = NULL;
 const char *dump_file_name;
+int dump_flags;
 
 /* Table of tree dump switches. This must be consistent with the
    TREE_DUMP_INDEX enumeration in dumpfile.h.  */
 static struct dump_file_info dump_files[TDI_end] =
 {
-  {NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0},
+  {NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0},
   {".cgraph", "ipa-cgraph", NULL, NULL, NULL, NULL, NULL, TDF_IPA,
-   0, 0, 0, 0},
+   0, 0, 0, 0, 0},
   {".tu", "translation-unit", NULL, NULL, NULL, NULL, NULL, TDF_TREE,
-   0, 0, 0, 1},
+   0, 0, 0, 0, 1},
   {".class", "class-hierarchy", NULL, NULL, NULL, NULL, NULL, TDF_TREE,
-   0, 0, 0, 2},
+   0, 0, 0, 0, 2},
   {".original", "tree-original", NULL, NULL, NULL, NULL, NULL, TDF_TREE,
-   0, 0, 0, 3},
+   0, 0, 0, 0, 3},
   {".gimple", "tree-gimple", NULL, NULL, NULL, NULL, NULL, TDF_TREE,
-   0, 0, 0, 4},
+   0, 0, 0, 0, 4},
   {".nested", "tree-nested", NULL, NULL, NULL, NULL, NULL, TDF_TREE,
-   0, 0, 0, 5},
+   0, 0, 0, 0, 5},
   {".vcg", "tree-vcg", NULL, NULL, NULL, NULL, NULL, TDF_TREE,
-   0, 0, 0, 6},
+   0, 0, 0, 0, 6},
 #define FIRST_AUTO_NUMBERED_DUMP 7
 
   {NULL, "tree-all", NULL, NULL, NULL, NULL, NULL, TDF_TREE,
-   0, 0, 0, 0},
+   0, 0, 0, 0, 0},
   {NULL, "rtl-all", NULL, NULL, NULL, NULL, NULL, TDF_RTL,
-   0, 0, 0, 0},
+   0, 0, 0, 0, 0},
   {NULL, "ipa-all", NULL, NULL, NULL, NULL, NULL, TDF_IPA,
-   0, 0, 0, 0},
+   0, 0, 0, 0, 0},
 };
 
 /* Dynamically registered tree dump files and switches.  */
@@ -117,24 +118,32 @@ static const struct dump_option_value_info dump_op
   {NULL, 0}
 };
 
-/* A subset of the dump_options table which is used for opt-info
-   options. This must be consistent with the MSG_* flags in
-   dump_options.
+/* A subset of the dump_options table which is used for -fopt-info
+   types. This must be consistent with the MSG_* flags in dumpfile.h.
  */
-static const struct dump_option_value_info opt_info_options[] =
+static const struct dump_option_value_info optinfo_verbosity_options[] =
 {
   {"optimized", MSG_OPTIMIZED_LOCATIONS},
   {"missed", MSG_MISSED_OPTIMIZATION},
   {"note", MSG_NOTE},
-  {"optall", (MSG_OPTIMIZED_LOCATIONS
-           | MSG_MISSED_OPTIMIZATION
-           | MSG_NOTE)},
+  {"all", MSG_ALL},
   {NULL, 0}
 };
 
+/* Flags used for -fopt-info groups.  */
+static const struct dump_option_value_info optgroup_options[] =
+{
+  {"ipa", OPTGROUP_IPA},
+  {"loop", OPTGROUP_LOOP},
+  {"inline", OPTGROUP_INLINE},
+  {"vec", OPTGROUP_VEC},
+  {"optall", OPTGROUP_ALL},
+  {NULL, 0}
+};
+
 unsigned int
 dump_register (const char *suffix, const char *swtch, const char *glob,
-	       int flags)
+	       int flags, int optgroup_flags)
 {
   static int next_dump = FIRST_AUTO_NUMBERED_DUMP;
   int num = next_dump++;
@@ -157,6 +166,7 @@ dump_register (const char *suffix, const char *swt
   extra_dump_files[count].swtch = swtch;
   extra_dump_files[count].glob = glob;
   extra_dump_files[count].pflags = flags;
+  extra_dump_files[count].optgroup_flags = optgroup_flags;
   extra_dump_files[count].num = num;
 
   return count + TDI_end;
@@ -376,8 +386,8 @@ dump_printf_loc (int dump_kind, source_location lo
 /* Start a dump for PHASE. Store user-supplied dump flags in
    *FLAG_PTR.  Return the number of streams opened.  Set globals
    DUMP_FILE, and ALT_DUMP_FILE to point to the opened streams, and
-   set dump_flags appropriately for both pass dump stream and opt-info
-   stream. */
+   set dump_flags appropriately for both pass dump stream and
+   -fopt-info stream. */
 
 int
 dump_start (int phase, int *flag_ptr)
@@ -418,7 +428,7 @@ dump_start (int phase, int *flag_ptr)
       dfi->alt_stream = stream;
       count++;
       alt_dump_file = dfi->alt_stream;
-      /* Initialize current opt-info flags. */
+      /* Initialize current -fopt-info flags. */
       alt_flags = dfi->alt_flags;
     }
 
@@ -603,18 +613,19 @@ dump_enable_all (int flags, const char *filename)
   return n;
 }
 
-/* Enable opt-info dumps on all IR_DUMP_TYPE passes with FLAGS on
-   FILENAME.  Return the number of enabled dumps.  */
+/* Enable -fopt-info dumps on all dump files matching OPTGROUP_FLAGS.
+   Enable dumps with FLAGS on FILENAME.  Return the number of enabled
+   dumps.  */
 
 static int
-opt_info_enable_all (int ir_dump_type, int flags, const char *filename)
+opt_info_enable_passes (int optgroup_flags, int flags, const char *filename)
 {
   int n = 0;
   size_t i;
 
   for (i = TDI_none + 1; i < (size_t) TDI_end; i++)
     {
-      if ((dump_files[i].pflags & ir_dump_type))
+      if ((dump_files[i].optgroup_flags & optgroup_flags))
         {
           const char *old_filename = dump_files[i].alt_filename;
           /* Since this file is shared among different passes, it
@@ -632,7 +643,7 @@ static int
 
   for (i = 0; i < extra_dump_files_in_use; i++)
     {
-      if ((extra_dump_files[i].pflags & ir_dump_type))
+      if ((extra_dump_files[i].optgroup_flags & optgroup_flags))
         {
           const char *old_filename = extra_dump_files[i].alt_filename;
           /* Since this file is shared among different passes, it
@@ -753,11 +764,12 @@ dump_switch_p (const char *arg)
   return any;
 }
 
-/* Parse ARG as a -fopt-info switch and store flags and filename.
-   Return non-zero if it is a recognized switch.  */
+/* Parse ARG as a -fopt-info switch and store flags, optgroup_flags
+   and filename.  Return non-zero if it is a recognized switch.  */
 
 static int
-opt_info_switch_p_1 (const char *arg, int *flags, char **filename)
+opt_info_switch_p_1 (const char *arg, int *flags, int *optgroup_flags,
+                     char **filename)
 {
   const char *option_value;
   const char *ptr;
@@ -767,9 +779,10 @@ static int
 
   *filename = NULL;
   *flags = 0;
+  *optgroup_flags = 0;
 
   if (!ptr)
-    return 1;
+    return 1;       /* Handle '-fopt-info' without any additional options.  */
 
   while (*ptr)
     {
@@ -790,7 +803,8 @@ static int
 	end_ptr = ptr + strlen (ptr);
       length = end_ptr - ptr;
 
-      for (option_ptr = opt_info_options; option_ptr->name; option_ptr++)
+      for (option_ptr = optinfo_verbosity_options; option_ptr->name;
+           option_ptr++)
 	if (strlen (option_ptr->name) == length
 	    && !memcmp (option_ptr->name, ptr, length))
           {
@@ -798,6 +812,14 @@ static int
 	    goto found;
           }
 
+      for (option_ptr = optgroup_options; option_ptr->name; option_ptr++)
+	if (strlen (option_ptr->name) == length
+	    && !memcmp (option_ptr->name, ptr, length))
+          {
+            *optgroup_flags |= option_ptr->value;
+	    goto found;
+          }
+
       if (*ptr == '=')
         {
           /* Interpret rest of the argument as a dump filename.  This
@@ -806,8 +828,11 @@ static int
           break;
         }
       else
-        warning (0, "ignoring unknown option %q.*s in %<-fopt-info=%s%>",
-                 length, ptr, arg);
+        {
+          warning (0, "unknown option %q.*s in %<-fopt-info-%s%>",
+                   length, ptr, arg);
+          return 0;
+        }
     found:;
       ptr = end_ptr;
     }
@@ -822,16 +847,29 @@ int
 opt_info_switch_p (const char *arg)
 {
   int flags;
+  int optgroup_flags;
   char *filename;
+  static int file_seen = 0;
 
-  opt_info_switch_p_1 (arg, &flags, &filename);
+  if (!opt_info_switch_p_1 (arg, &flags, &optgroup_flags, &filename))
+    return 0;
 
+  if (file_seen && filename && strcmp("stderr", filename))
+    {
+      warning (0, "ignoring possibly conflicting option %<-fopt-info-%s%>",
+               arg);
+      return 1;
+    }
+  
+  file_seen = 1;
   if (!filename)
     filename = xstrdup ("stderr");
   if (!flags)
     flags = MSG_ALL;
+  if (!optgroup_flags)
+    optgroup_flags = OPTGROUP_ALL;
 
-  return opt_info_enable_all ((TDF_TREE | TDF_RTL | TDF_IPA), flags, filename);
+  return opt_info_enable_passes (optgroup_flags, flags, filename);
 }
 
 /* Print basic block on the dump streams.  */
Index: dumpfile.h
===================================================================
--- dumpfile.h	(revision 192991)
+++ dumpfile.h	(working copy)
@@ -25,7 +25,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "line-map.h"
 
 /* Different tree dump places.  When you add new tree dump places,
-   extend the DUMP_FILES array in tree-dump.c.  */
+   extend the DUMP_FILES array in dumpfile.c.  */
 enum tree_dump_index
 {
   TDI_none,			/* No dump */
@@ -46,9 +46,9 @@ enum tree_dump_index
 
 /* Bit masks to control dumping. Not all values are applicable to all
    dumps. Add new ones at the end. When you define new values, extend
-   the DUMP_OPTIONS array in tree-dump.c. The TDF_* flags coexist with
-   MSG_* flags (for -fopt-info) and the bit values must be chosen
-   to allow that.  */
+   the DUMP_OPTIONS array in dumpfile.c. The TDF_* flags coexist with
+   MSG_* flags (for -fopt-info) and the bit values must be chosen to
+   allow that.  */
 #define TDF_ADDRESS	(1 << 0)	/* dump node addresses */
 #define TDF_SLIM	(1 << 1)	/* don't go wild following links */
 #define TDF_RAW  	(1 << 2)	/* don't unparse the function */
@@ -91,6 +91,18 @@ enum tree_dump_index
 #define MSG_ALL         (MSG_OPTIMIZED_LOCATIONS | MSG_MISSED_OPTIMIZATION \
                          | MSG_NOTE)
 
+
+/* Flags to control high-level -fopt-info dumps.  Usually these flags
+   define a group of passes.  An optimization pass can be part of
+   multiple groups.  */
+#define OPTGROUP_NONE        (0)
+#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_ALL	     (OPTGROUP_IPA | OPTGROUP_LOOP | OPTGROUP_INLINE \
+                              | OPTGROUP_VEC)
+
 /* Define a tree dump switch.  */
 struct dump_file_info
 {
@@ -98,13 +110,14 @@ struct dump_file_info
   const char *swtch;            /* command line dump switch */
   const char *glob;             /* command line glob  */
   const char *pfilename;        /* filename for the pass-specific stream  */
-  const char *alt_filename;     /* filename for the opt-info stream  */
+  const char *alt_filename;     /* filename for the -fopt-info stream  */
   FILE *pstream;                /* pass-specific dump stream  */
-  FILE *alt_stream;             /* opt-info stream */
+  FILE *alt_stream;             /* -fopt-info stream */
+  int optgroup_flags;           /* optgroup flags for -fopt-info */
   int pflags;                   /* dump flags */
   int alt_flags;                /* flags for opt-info */
   int pstate;                   /* state of pass-specific stream */
-  int alt_state;                /* state of the opt-info stream */
+  int alt_state;                /* state of the -fopt-info stream */
   int num;                      /* dump file number */
 };
 
@@ -129,7 +142,7 @@ extern void dump_gimple_stmt_loc (int, source_loca
 extern void dump_gimple_stmt (int, int, gimple, int);
 extern void print_combine_total_stats (void);
 extern unsigned int dump_register (const char *, const char *, const char *,
-                                   int);
+                                   int, int);
 extern bool enable_rtl_dump_file (void);
 
 /* In combine.c  */
@@ -146,8 +159,7 @@ extern const char *dump_file_name;
 /* Return the dump_file_info for the given phase.  */
 extern struct dump_file_info *get_dump_file_info (int);
 
-/* Return true if any of the dumps are enabled, false otherwise. */
-
+/* Return true if any of the dumps is enabled, false otherwise. */
 static inline bool
 dump_enabled_p (void)
 {
Index: postreload.c
===================================================================
--- postreload.c	(revision 192991)
+++ postreload.c	(working copy)
@@ -2289,6 +2289,7 @@ struct rtl_opt_pass pass_postreload_cse =
  {
   RTL_PASS,
   "postreload",                         /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_postreload,               /* gate */
   rest_of_handle_postreload,            /* execute */
   NULL,                                 /* sub */
Index: tree-ssa-loop-ch.c
===================================================================
--- tree-ssa-loop-ch.c	(revision 192991)
+++ tree-ssa-loop-ch.c	(working copy)
@@ -260,6 +260,7 @@ struct gimple_opt_pass pass_ch =
  {
   GIMPLE_PASS,
   "ch",					/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_ch,				/* gate */
   copy_loop_headers,			/* execute */
   NULL,					/* sub */
Index: tree-tailcall.c
===================================================================
--- tree-tailcall.c	(revision 192991)
+++ tree-tailcall.c	(working copy)
@@ -1048,6 +1048,7 @@ struct gimple_opt_pass pass_tail_recursion =
  {
   GIMPLE_PASS,
   "tailr",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_tail_calls,			/* gate */
   execute_tail_recursion,		/* execute */
   NULL,					/* sub */
@@ -1067,6 +1068,7 @@ struct gimple_opt_pass pass_tail_calls =
  {
   GIMPLE_PASS,
   "tailc",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_tail_calls,			/* gate */
   execute_tail_calls,			/* execute */
   NULL,					/* sub */
Index: tree-ssa-strlen.c
===================================================================
--- tree-ssa-strlen.c	(revision 192991)
+++ tree-ssa-strlen.c	(working copy)
@@ -2016,6 +2016,7 @@ struct gimple_opt_pass pass_strlen =
  {
   GIMPLE_PASS,
   "strlen",			/* name */
+  OPTGROUP_NONE,                /* optinfo_flags */
   gate_strlen,			/* gate */
   tree_ssa_strlen,		/* execute */
   NULL,				/* sub */
Index: tree.c
===================================================================
--- tree.c	(revision 192991)
+++ tree.c	(working copy)
@@ -5292,6 +5292,7 @@ struct simple_ipa_opt_pass pass_ipa_free_lang_data
  {
   SIMPLE_IPA_PASS,
   "*free_lang_data",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   free_lang_data,			/* execute */
   NULL,					/* sub */
Index: tree-pass.h
===================================================================
--- tree-pass.h	(revision 192991)
+++ tree-pass.h	(working copy)
@@ -46,6 +46,9 @@ struct opt_pass
      name.  If the name starts with a star, no dump happens. */
   const char *name;
 
+  /* The -fopt-info optimization group flags as defined in dumpfile.h. */
+  unsigned int optinfo_flags;
+
   /* If non-null, this pass and all sub-passes are executed only if
      the function returns true.  */
   bool (*gate) (void);
Index: ipa-cp.c
===================================================================
--- ipa-cp.c	(revision 192991)
+++ ipa-cp.c	(working copy)
@@ -2543,6 +2543,7 @@ struct ipa_opt_pass_d pass_ipa_cp =
  {
   IPA_PASS,
   "cp",				/* name */
+  OPTGROUP_NONE,                /* optinfo_flags */
   cgraph_gate_cp,		/* gate */
   ipcp_driver,			/* execute */
   NULL,				/* sub */
Index: final.c
===================================================================
--- final.c	(revision 192991)
+++ final.c	(working copy)
@@ -822,6 +822,7 @@ struct rtl_opt_pass pass_compute_alignments =
  {
   RTL_PASS,
   "alignments",                         /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   compute_alignments,                   /* execute */
   NULL,                                 /* sub */
@@ -4373,6 +4374,7 @@ struct rtl_opt_pass pass_final =
  {
   RTL_PASS,
   "final",                              /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_handle_final,                 /* execute */
   NULL,                                 /* sub */
@@ -4401,6 +4403,7 @@ struct rtl_opt_pass pass_shorten_branches =
  {
   RTL_PASS,
   "shorten",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_handle_shorten_branches,      /* execute */
   NULL,                                 /* sub */
@@ -4547,6 +4550,7 @@ struct rtl_opt_pass pass_clean_state =
  {
   RTL_PASS,
   "*clean_state",                       /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_clean_state,                  /* execute */
   NULL,                                 /* sub */
Index: tree-emutls.c
===================================================================
--- tree-emutls.c	(revision 192991)
+++ tree-emutls.c	(working copy)
@@ -815,6 +815,7 @@ struct simple_ipa_opt_pass pass_ipa_lower_emutls =
  {
   SIMPLE_IPA_PASS,
   "emutls",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_emutls,				/* gate */
   ipa_lower_emutls,			/* execute */
   NULL,                                 /* sub */
Index: omp-low.c
===================================================================
--- omp-low.c	(revision 192991)
+++ omp-low.c	(working copy)
@@ -5753,6 +5753,7 @@ struct gimple_opt_pass pass_expand_omp =
  {
   GIMPLE_PASS,
   "ompexp",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_expand_omp,			/* gate */
   execute_expand_omp,			/* execute */
   NULL,					/* sub */
@@ -6927,6 +6928,7 @@ struct gimple_opt_pass pass_lower_omp =
  {
   GIMPLE_PASS,
   "omplower",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_lower_omp,			/* execute */
   NULL,					/* sub */
@@ -7190,6 +7192,7 @@ struct gimple_opt_pass pass_diagnose_omp_blocks =
   {
     GIMPLE_PASS,
     "*diagnose_omp_blocks",		/* name */
+    OPTGROUP_NONE,                      /* optinfo_flags */
     gate_diagnose_omp_blocks,		/* gate */
     diagnose_omp_structured_block_errors,	/* execute */
     NULL,				/* sub */
Index: tree-ssa-dse.c
===================================================================
--- tree-ssa-dse.c	(revision 192991)
+++ tree-ssa-dse.c	(working copy)
@@ -356,6 +356,7 @@ struct gimple_opt_pass pass_dse =
  {
   GIMPLE_PASS,
   "dse",			/* name */
+  OPTGROUP_NONE,                /* optinfo_flags */
   gate_dse,			/* gate */
   tree_ssa_dse,			/* execute */
   NULL,				/* sub */
Index: ipa-reference.c
===================================================================
--- ipa-reference.c	(revision 192991)
+++ ipa-reference.c	(working copy)
@@ -1185,6 +1185,7 @@ struct ipa_opt_pass_d pass_ipa_reference =
  {
   IPA_PASS,
   "static-var",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_reference,			/* gate */
   propagate,			        /* execute */
   NULL,					/* sub */
Index: tree-ssa-uncprop.c
===================================================================
--- tree-ssa-uncprop.c	(revision 192991)
+++ tree-ssa-uncprop.c	(working copy)
@@ -585,6 +585,7 @@ struct gimple_opt_pass pass_uncprop =
  {
   GIMPLE_PASS,
   "uncprop",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_uncprop,				/* gate */
   tree_ssa_uncprop,			/* execute */
   NULL,					/* sub */
Index: auto-inc-dec.c
===================================================================
--- auto-inc-dec.c	(revision 192991)
+++ auto-inc-dec.c	(working copy)
@@ -1511,6 +1511,7 @@ struct rtl_opt_pass pass_inc_dec =
  {
   RTL_PASS,
   "auto_inc_dec",                       /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_auto_inc_dec,                    /* gate */
   rest_of_handle_auto_inc_dec,          /* execute */
   NULL,                                 /* sub */
Index: reorg.c
===================================================================
--- reorg.c	(revision 192991)
+++ reorg.c	(working copy)
@@ -4122,6 +4122,7 @@ struct rtl_opt_pass pass_delay_slots =
  {
   RTL_PASS,
   "dbr",                                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_delay_slots,              /* gate */
   rest_of_handle_delay_slots,           /* execute */
   NULL,                                 /* sub */
@@ -4156,6 +4157,7 @@ struct rtl_opt_pass pass_machine_reorg =
  {
   RTL_PASS,
   "mach",                               /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_machine_reorg,            /* gate */
   rest_of_handle_machine_reorg,         /* execute */
   NULL,                                 /* sub */
Index: tree-ssa-copyrename.c
===================================================================
--- tree-ssa-copyrename.c	(revision 192991)
+++ tree-ssa-copyrename.c	(working copy)
@@ -443,6 +443,7 @@ struct gimple_opt_pass pass_rename_ssa_copies =
  {
   GIMPLE_PASS,
   "copyrename",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_copyrename,			/* gate */
   rename_ssa_copies,			/* execute */
   NULL,					/* sub */
Index: tree-ssa-ccp.c
===================================================================
--- tree-ssa-ccp.c	(revision 192991)
+++ tree-ssa-ccp.c	(working copy)
@@ -2123,6 +2123,7 @@ struct gimple_opt_pass pass_ccp =
  {
   GIMPLE_PASS,
   "ccp",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_ccp,				/* gate */
   do_ssa_ccp,				/* execute */
   NULL,					/* sub */
@@ -2507,6 +2508,7 @@ struct gimple_opt_pass pass_fold_builtins =
  {
   GIMPLE_PASS,
   "fab",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_fold_all_builtins,		/* execute */
   NULL,					/* sub */
Index: compare-elim.c
===================================================================
--- compare-elim.c	(revision 192991)
+++ compare-elim.c	(working copy)
@@ -660,6 +660,7 @@ struct rtl_opt_pass pass_compare_elim_after_reload
  {
   RTL_PASS,
   "cmpelim",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_compare_elim_after_reload,	/* gate */
   execute_compare_elim_after_reload,	/* execute */
   NULL,					/* sub */
Index: df-core.c
===================================================================
--- df-core.c	(revision 192991)
+++ df-core.c	(working copy)
@@ -754,6 +754,7 @@ struct rtl_opt_pass pass_df_initialize_opt =
  {
   RTL_PASS,
   "dfinit",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_opt,                             /* gate */
   rest_of_handle_df_initialize,         /* execute */
   NULL,                                 /* sub */
@@ -781,6 +782,7 @@ struct rtl_opt_pass pass_df_initialize_no_opt =
  {
   RTL_PASS,
   "no-opt dfinit",                      /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_no_opt,                          /* gate */
   rest_of_handle_df_initialize,         /* execute */
   NULL,                                 /* sub */
@@ -828,6 +830,7 @@ struct rtl_opt_pass pass_df_finish =
  {
   RTL_PASS,
   "dfinish",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   rest_of_handle_df_finish,             /* execute */
   NULL,                                 /* sub */
Index: mode-switching.c
===================================================================
--- mode-switching.c	(revision 192991)
+++ mode-switching.c	(working copy)
@@ -763,6 +763,7 @@ struct rtl_opt_pass pass_mode_switching =
  {
   RTL_PASS,
   "mode_sw",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_mode_switching,                  /* gate */
   rest_of_handle_mode_switching,        /* execute */
   NULL,                                 /* sub */
Index: tree-nomudflap.c
===================================================================
--- tree-nomudflap.c	(revision 192991)
+++ tree-nomudflap.c	(working copy)
@@ -91,6 +91,7 @@ struct gimple_opt_pass pass_mudflap_1 =
  {
   GIMPLE_PASS,
   "mudflap1",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_mudflap,                         /* gate */
   NULL,					/* execute */
   NULL,					/* sub */
@@ -110,6 +111,7 @@ struct gimple_opt_pass pass_mudflap_2 =
  {
   GIMPLE_PASS,
   "mudflap2",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_mudflap,                         /* gate */
   NULL,					/* execute */
   NULL,					/* sub */
Index: modulo-sched.c
===================================================================
--- modulo-sched.c	(revision 192991)
+++ modulo-sched.c	(working copy)
@@ -3364,6 +3364,7 @@ struct rtl_opt_pass pass_sms =
  {
   RTL_PASS,
   "sms",                                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_sms,                      /* gate */
   rest_of_handle_sms,                   /* execute */
   NULL,                                 /* sub */
Index: tree-call-cdce.c
===================================================================
--- tree-call-cdce.c	(revision 192991)
+++ tree-call-cdce.c	(working copy)
@@ -920,6 +920,7 @@ struct gimple_opt_pass pass_call_cdce =
  {
   GIMPLE_PASS,
   "cdce",                               /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_call_cdce,                       /* gate */
   tree_call_cdce,                       /* execute */
   NULL,                                 /* sub */
Index: ipa-pure-const.c
===================================================================
--- ipa-pure-const.c	(revision 192991)
+++ ipa-pure-const.c	(working copy)
@@ -1497,6 +1497,7 @@ struct ipa_opt_pass_d pass_ipa_pure_const =
  {
   IPA_PASS,
   "pure-const",		                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_pure_const,			/* gate */
   propagate,			        /* execute */
   NULL,					/* sub */
@@ -1662,6 +1663,7 @@ struct gimple_opt_pass pass_local_pure_const =
  {
   GIMPLE_PASS,
   "local-pure-const",	                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_pure_const,			/* gate */
   local_pure_const,		        /* execute */
   NULL,					/* sub */
Index: cse.c
===================================================================
--- cse.c	(revision 192991)
+++ cse.c	(working copy)
@@ -7456,6 +7456,7 @@ struct rtl_opt_pass pass_cse =
  {
   RTL_PASS,
   "cse1",                               /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_cse,                      /* gate */
   rest_of_handle_cse,			/* execute */
   NULL,                                 /* sub */
@@ -7518,6 +7519,7 @@ struct rtl_opt_pass pass_cse2 =
  {
   RTL_PASS,
   "cse2",                               /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_cse2,                     /* gate */
   rest_of_handle_cse2,			/* execute */
   NULL,                                 /* sub */
@@ -7578,6 +7580,7 @@ struct rtl_opt_pass pass_cse_after_global_opts =
  {
   RTL_PASS,
   "cse_local",                          /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_cse_after_global_opts,    /* gate */
   rest_of_handle_cse_after_global_opts, /* execute */
   NULL,                                 /* sub */
Index: web.c
===================================================================
--- web.c	(revision 192991)
+++ web.c	(working copy)
@@ -445,6 +445,7 @@ struct rtl_opt_pass pass_web =
  {
   RTL_PASS,
   "web",                                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_web,                      /* gate */
   web_main,		                /* execute */
   NULL,                                 /* sub */
Index: tree-stdarg.c
===================================================================
--- tree-stdarg.c	(revision 192991)
+++ tree-stdarg.c	(working copy)
@@ -960,6 +960,7 @@ struct gimple_opt_pass pass_stdarg =
  {
   GIMPLE_PASS,
   "stdarg",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_optimize_stdarg,			/* gate */
   execute_optimize_stdarg,		/* execute */
   NULL,					/* sub */
Index: lto-streamer-out.c
===================================================================
--- lto-streamer-out.c	(revision 192991)
+++ lto-streamer-out.c	(working copy)
@@ -1011,6 +1011,7 @@ struct ipa_opt_pass_d pass_ipa_lto_gimple_out =
  {
   IPA_PASS,
   "lto_gimple_out",	                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_lto_out,			        /* gate */
   NULL,		                	/* execute */
   NULL,					/* sub */
@@ -1426,6 +1427,7 @@ struct ipa_opt_pass_d pass_ipa_lto_finish_out =
  {
   IPA_PASS,
   "lto_decls_out",	                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_lto_out,			        /* gate */
   NULL,        	                        /* execute */
   NULL,					/* sub */
Index: tree-ssa-math-opts.c
===================================================================
--- tree-ssa-math-opts.c	(revision 192991)
+++ tree-ssa-math-opts.c	(working copy)
@@ -642,6 +642,7 @@ struct gimple_opt_pass pass_cse_reciprocals =
  {
   GIMPLE_PASS,
   "recip",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_cse_reciprocals,			/* gate */
   execute_cse_reciprocals,		/* execute */
   NULL,					/* sub */
@@ -1505,6 +1506,7 @@ struct gimple_opt_pass pass_cse_sincos =
  {
   GIMPLE_PASS,
   "sincos",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_cse_sincos,			/* gate */
   execute_cse_sincos,			/* execute */
   NULL,					/* sub */
@@ -1977,6 +1979,7 @@ struct gimple_opt_pass pass_optimize_bswap =
  {
   GIMPLE_PASS,
   "bswap",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_optimize_bswap,                  /* gate */
   execute_optimize_bswap,		/* execute */
   NULL,					/* sub */
@@ -2741,6 +2744,7 @@ struct gimple_opt_pass pass_optimize_widening_mul
  {
   GIMPLE_PASS,
   "widening_mul",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_optimize_widening_mul,		/* gate */
   execute_optimize_widening_mul,	/* execute */
   NULL,					/* sub */
Index: tree-ssa-dom.c
===================================================================
--- tree-ssa-dom.c	(revision 192991)
+++ tree-ssa-dom.c	(working copy)
@@ -861,6 +861,7 @@ struct gimple_opt_pass pass_dominator =
  {
   GIMPLE_PASS,
   "dom",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_dominator,			/* gate */
   tree_ssa_dominator_optimize,		/* execute */
   NULL,					/* sub */
@@ -3033,6 +3034,7 @@ struct gimple_opt_pass pass_phi_only_cprop =
  {
   GIMPLE_PASS,
   "phicprop",                           /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_dominator,                       /* gate */
   eliminate_degenerate_phis,            /* execute */
   NULL,                                 /* sub */
Index: tree-nrv.c
===================================================================
--- tree-nrv.c	(revision 192991)
+++ tree-nrv.c	(working copy)
@@ -275,6 +275,7 @@ struct gimple_opt_pass pass_nrv =
  {
   GIMPLE_PASS,
   "nrv",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_pass_return_slot,		/* gate */
   tree_nrv,				/* execute */
   NULL,					/* sub */
@@ -360,6 +361,7 @@ struct gimple_opt_pass pass_return_slot =
  {
   GIMPLE_PASS,
   "retslot",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_return_slot_opt,		/* execute */
   NULL,					/* sub */
Index: loop-init.c
===================================================================
--- loop-init.c	(revision 192991)
+++ loop-init.c	(working copy)
@@ -189,6 +189,7 @@ struct rtl_opt_pass pass_loop2 =
  {
   RTL_PASS,
   "loop2",                              /* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_handle_loop2, 		        /* gate */
   NULL,                                 /* execute */
   NULL,                                 /* sub */
@@ -225,6 +226,7 @@ struct rtl_opt_pass pass_rtl_loop_init =
  {
   RTL_PASS,
   "loop2_init",                           /* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rtl_loop_init,                        /* execute */
   NULL,                                 /* sub */
@@ -265,6 +267,7 @@ struct rtl_opt_pass pass_rtl_loop_done =
  {
   RTL_PASS,
   "loop2_done",                          /* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rtl_loop_done,                        /* execute */
   NULL,                                 /* sub */
@@ -301,6 +304,7 @@ struct rtl_opt_pass pass_rtl_move_loop_invariants
  {
   RTL_PASS,
   "loop2_invariant",                    /* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_rtl_move_loop_invariants,        /* gate */
   rtl_move_loop_invariants,             /* execute */
   NULL,                                 /* sub */
@@ -337,6 +341,7 @@ struct rtl_opt_pass pass_rtl_unswitch =
  {
   RTL_PASS,
   "loop2_unswitch",                      /* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_rtl_unswitch,                    /* gate */
   rtl_unswitch,                         /* execute */
   NULL,                                 /* sub */
@@ -385,6 +390,7 @@ struct rtl_opt_pass pass_rtl_unroll_and_peel_loops
  {
   RTL_PASS,
   "loop2_unroll",                        /* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_rtl_unroll_and_peel_loops,       /* gate */
   rtl_unroll_and_peel_loops,            /* execute */
   NULL,                                 /* sub */
@@ -426,6 +432,7 @@ struct rtl_opt_pass pass_rtl_doloop =
  {
   RTL_PASS,
   "loop2_doloop",                        /* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_rtl_doloop,                      /* gate */
   rtl_doloop,                           /* execute */
   NULL,                                 /* sub */
Index: gimple-low.c
===================================================================
--- gimple-low.c	(revision 192991)
+++ gimple-low.c	(working copy)
@@ -194,6 +194,7 @@ struct gimple_opt_pass pass_lower_cf =
  {
   GIMPLE_PASS,
   "lower",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   lower_function_body,			/* execute */
   NULL,					/* sub */
Index: ipa-inline.c
===================================================================
--- ipa-inline.c	(revision 192991)
+++ ipa-inline.c	(working copy)
@@ -2007,6 +2007,7 @@ struct gimple_opt_pass pass_early_inline =
  {
   GIMPLE_PASS,
   "einline",	 			/* name */
+  OPTGROUP_INLINE,                      /* optinfo_flags */
   NULL,					/* gate */
   early_inliner,			/* execute */
   NULL,					/* sub */
@@ -2039,6 +2040,7 @@ struct ipa_opt_pass_d pass_ipa_inline =
  {
   IPA_PASS,
   "inline",				/* name */
+  OPTGROUP_INLINE,                      /* optinfo_flags */
   gate_ipa_inline,			/* gate */
   ipa_inline,				/* execute */
   NULL,					/* sub */
Index: tree-ssa-sink.c
===================================================================
--- tree-ssa-sink.c	(revision 192991)
+++ tree-ssa-sink.c	(working copy)
@@ -584,6 +584,7 @@ struct gimple_opt_pass pass_sink_code =
  {
   GIMPLE_PASS,
   "sink",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_sink,				/* gate */
   do_sink,				/* execute */
   NULL,					/* sub */
Index: jump.c
===================================================================
--- jump.c	(revision 192991)
+++ jump.c	(working copy)
@@ -146,6 +146,7 @@ struct rtl_opt_pass pass_cleanup_barriers =
  {
   RTL_PASS,
   "barriers",                           /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   cleanup_barriers,                     /* execute */
   NULL,                                 /* sub */
Index: ifcvt.c
===================================================================
--- ifcvt.c	(revision 192991)
+++ ifcvt.c	(working copy)
@@ -4462,6 +4462,7 @@ struct rtl_opt_pass pass_rtl_ifcvt =
  {
   RTL_PASS,
   "ce1",                                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_if_conversion,            /* gate */
   rest_of_handle_if_conversion,         /* execute */
   NULL,                                 /* sub */
@@ -4499,6 +4500,7 @@ struct rtl_opt_pass pass_if_after_combine =
  {
   RTL_PASS,
   "ce2",                                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_if_after_combine,         /* gate */
   rest_of_handle_if_after_combine,      /* execute */
   NULL,                                 /* sub */
@@ -4535,6 +4537,7 @@ struct rtl_opt_pass pass_if_after_reload =
  {
   RTL_PASS,
   "ce3",                                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_if_after_reload,          /* gate */
   rest_of_handle_if_after_reload,       /* execute */
   NULL,                                 /* sub */
Index: predict.c
===================================================================
--- predict.c	(revision 192991)
+++ predict.c	(working copy)
@@ -2823,6 +2823,7 @@ struct gimple_opt_pass pass_profile =
  {
   GIMPLE_PASS,
   "profile_estimate",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_estimate_probability,		/* gate */
   tree_estimate_probability_driver,	/* execute */
   NULL,					/* sub */
@@ -2842,6 +2843,7 @@ struct gimple_opt_pass pass_strip_predict_hints =
  {
   GIMPLE_PASS,
   "*strip_predict_hints",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   strip_predict_hints,			/* execute */
   NULL,					/* sub */
Index: tree-ssa-loop.c
===================================================================
--- tree-ssa-loop.c	(revision 192991)
+++ tree-ssa-loop.c	(working copy)
@@ -47,6 +47,7 @@ struct gimple_opt_pass pass_tree_loop =
  {
   GIMPLE_PASS,
   "loop",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_tree_loop,			/* gate */
   NULL,					/* execute */
   NULL,					/* sub */
@@ -82,6 +83,7 @@ struct gimple_opt_pass pass_tree_loop_init =
  {
   GIMPLE_PASS,
   "loopinit",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   NULL,					/* gate */
   tree_ssa_loop_init,			/* execute */
   NULL,					/* sub */
@@ -118,6 +120,7 @@ struct gimple_opt_pass pass_lim =
  {
   GIMPLE_PASS,
   "lim",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_tree_ssa_loop_im,		/* gate */
   tree_ssa_loop_im,			/* execute */
   NULL,					/* sub */
@@ -154,6 +157,7 @@ struct gimple_opt_pass pass_tree_unswitch =
  {
   GIMPLE_PASS,
   "unswitch",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_tree_ssa_loop_unswitch,		/* gate */
   tree_ssa_loop_unswitch,		/* execute */
   NULL,					/* sub */
@@ -190,6 +194,7 @@ struct gimple_opt_pass pass_predcom =
  {
   GIMPLE_PASS,
   "pcom",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_tree_predictive_commoning,	/* gate */
   run_tree_predictive_commoning,	/* execute */
   NULL,					/* sub */
@@ -226,6 +231,8 @@ struct gimple_opt_pass pass_vectorize =
  {
   GIMPLE_PASS,
   "vect",                               /* name */
+  OPTGROUP_LOOP
+  | OPTGROUP_VEC,                       /* optinfo_flags */
   gate_tree_vectorize,                  /* gate */
   tree_vectorize,                       /* execute */
   NULL,                                 /* sub */
@@ -275,6 +282,7 @@ struct gimple_opt_pass pass_graphite =
  {
   GIMPLE_PASS,
   "graphite0",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_graphite_transforms,		/* gate */
   NULL,					/* execute */
   NULL,					/* sub */
@@ -294,6 +302,7 @@ struct gimple_opt_pass pass_graphite_transforms =
  {
   GIMPLE_PASS,
   "graphite",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_graphite_transforms,		/* gate */
   graphite_transforms,       		/* execute */
   NULL,					/* sub */
@@ -331,6 +340,7 @@ struct gimple_opt_pass pass_check_data_deps =
  {
   GIMPLE_PASS,
   "ckdd",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_check_data_deps,	        	/* gate */
   check_data_deps,       		/* execute */
   NULL,					/* sub */
@@ -367,6 +377,7 @@ struct gimple_opt_pass pass_iv_canon =
  {
   GIMPLE_PASS,
   "ivcanon",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_tree_ssa_loop_ivcanon,		/* gate */
   tree_ssa_loop_ivcanon,	       	/* execute */
   NULL,					/* sub */
@@ -394,6 +405,7 @@ struct gimple_opt_pass pass_scev_cprop =
  {
   GIMPLE_PASS,
   "sccp",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_scev_const_prop,			/* gate */
   scev_const_prop,	       		/* execute */
   NULL,					/* sub */
@@ -428,6 +440,7 @@ struct gimple_opt_pass pass_record_bounds =
  {
   GIMPLE_PASS,
   "*record_bounds",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   tree_ssa_loop_bounds,		       	/* execute */
   NULL,					/* sub */
@@ -466,6 +479,7 @@ struct gimple_opt_pass pass_complete_unroll =
  {
   GIMPLE_PASS,
   "cunroll",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_tree_complete_unroll,		/* gate */
   tree_complete_unroll,		       	/* execute */
   NULL,					/* sub */
@@ -512,6 +526,7 @@ struct gimple_opt_pass pass_complete_unrolli =
  {
   GIMPLE_PASS,
   "cunrolli",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_tree_complete_unroll_inner,	/* gate */
   tree_complete_unroll_inner,	       	/* execute */
   NULL,					/* sub */
@@ -551,6 +566,7 @@ struct gimple_opt_pass pass_parallelize_loops =
  {
   GIMPLE_PASS,
   "parloops",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_tree_parallelize_loops,		/* gate */
   tree_parallelize_loops,      		/* execute */
   NULL,					/* sub */
@@ -587,6 +603,7 @@ struct gimple_opt_pass pass_loop_prefetch =
  {
   GIMPLE_PASS,
   "aprefetch",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_tree_ssa_loop_prefetch,		/* gate */
   tree_ssa_loop_prefetch,	       	/* execute */
   NULL,					/* sub */
@@ -624,6 +641,7 @@ struct gimple_opt_pass pass_iv_optimize =
  {
   GIMPLE_PASS,
   "ivopts",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_tree_ssa_loop_ivopts,		/* gate */
   tree_ssa_loop_ivopts,		       	/* execute */
   NULL,					/* sub */
@@ -654,6 +672,7 @@ struct gimple_opt_pass pass_tree_loop_done =
  {
   GIMPLE_PASS,
   "loopdone",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   NULL,					/* gate */
   tree_ssa_loop_done,			/* execute */
   NULL,					/* sub */
Index: recog.c
===================================================================
--- recog.c	(revision 192991)
+++ recog.c	(working copy)
@@ -3742,6 +3742,7 @@ struct rtl_opt_pass pass_peephole2 =
  {
   RTL_PASS,
   "peephole2",                          /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_peephole2,                /* gate */
   rest_of_handle_peephole2,             /* execute */
   NULL,                                 /* sub */
@@ -3769,6 +3770,7 @@ struct rtl_opt_pass pass_split_all_insns =
  {
   RTL_PASS,
   "split1",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_handle_split_all_insns,       /* execute */
   NULL,                                 /* sub */
@@ -3799,6 +3801,7 @@ struct rtl_opt_pass pass_split_after_reload =
  {
   RTL_PASS,
   "split2",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_handle_split_after_reload,    /* execute */
   NULL,                                 /* sub */
@@ -3843,6 +3846,7 @@ struct rtl_opt_pass pass_split_before_regstack =
  {
   RTL_PASS,
   "split3",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_split_before_regstack,    /* gate */
   rest_of_handle_split_before_regstack, /* execute */
   NULL,                                 /* sub */
@@ -3881,6 +3885,7 @@ struct rtl_opt_pass pass_split_before_sched2 =
  {
   RTL_PASS,
   "split4",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_split_before_sched2,      /* gate */
   rest_of_handle_split_before_sched2,   /* execute */
   NULL,                                 /* sub */
@@ -3912,6 +3917,7 @@ struct rtl_opt_pass pass_split_for_shorten_branche
  {
   RTL_PASS,
   "split5",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_do_final_split,                  /* gate */
   split_all_insns_noflow,               /* execute */
   NULL,                                 /* sub */
Index: dse.c
===================================================================
--- dse.c	(revision 192991)
+++ dse.c	(working copy)
@@ -3934,6 +3934,7 @@ struct rtl_opt_pass pass_rtl_dse1 =
  {
   RTL_PASS,
   "dse1",                               /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_dse1,                            /* gate */
   rest_of_handle_dse,                   /* execute */
   NULL,                                 /* sub */
@@ -3954,6 +3955,7 @@ struct rtl_opt_pass pass_rtl_dse2 =
  {
   RTL_PASS,
   "dse2",                               /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_dse2,                            /* gate */
   rest_of_handle_dse,                   /* execute */
   NULL,                                 /* sub */
Index: tree-ssa-ifcombine.c
===================================================================
--- tree-ssa-ifcombine.c	(revision 192991)
+++ tree-ssa-ifcombine.c	(working copy)
@@ -653,6 +653,7 @@ struct gimple_opt_pass pass_tree_ifcombine =
  {
   GIMPLE_PASS,
   "ifcombine",			/* name */
+  OPTGROUP_NONE,                /* optinfo_flags */
   gate_ifcombine,		/* gate */
   tree_ssa_ifcombine,		/* execute */
   NULL,				/* sub */
Index: gimple-ssa-strength-reduction.c
===================================================================
--- gimple-ssa-strength-reduction.c	(revision 192991)
+++ gimple-ssa-strength-reduction.c	(working copy)
@@ -2682,6 +2682,7 @@ struct gimple_opt_pass pass_strength_reduction =
  {
   GIMPLE_PASS,
   "slsr",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_strength_reduction,		/* gate */
   execute_strength_reduction,		/* execute */
   NULL,					/* sub */
Index: tree-eh.c
===================================================================
--- tree-eh.c	(revision 192991)
+++ tree-eh.c	(working copy)
@@ -2133,6 +2133,7 @@ struct gimple_opt_pass pass_lower_eh =
  {
   GIMPLE_PASS,
   "eh",					/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   lower_eh_constructs,			/* execute */
   NULL,					/* sub */
@@ -2992,6 +2993,7 @@ struct gimple_opt_pass pass_refactor_eh =
  {
   GIMPLE_PASS,
   "ehopt",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_refactor_eh,			/* gate */
   refactor_eh,				/* execute */
   NULL,					/* sub */
@@ -3200,6 +3202,7 @@ struct gimple_opt_pass pass_lower_resx =
  {
   GIMPLE_PASS,
   "resx",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_lower_resx,			/* gate */
   execute_lower_resx,			/* execute */
   NULL,					/* sub */
@@ -3496,6 +3499,7 @@ struct gimple_opt_pass pass_lower_eh_dispatch =
  {
   GIMPLE_PASS,
   "ehdisp",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_lower_eh_dispatch,		/* gate */
   execute_lower_eh_dispatch,		/* execute */
   NULL,					/* sub */
@@ -4319,6 +4323,7 @@ struct gimple_opt_pass pass_cleanup_eh = {
   {
    GIMPLE_PASS,
    "ehcleanup",			/* name */
+   OPTGROUP_NONE,               /* optinfo_flags */
    gate_cleanup_eh,		/* gate */
    execute_cleanup_eh,		/* execute */
    NULL,			/* sub */
Index: regmove.c
===================================================================
--- regmove.c	(revision 192991)
+++ regmove.c	(working copy)
@@ -1369,6 +1369,7 @@ struct rtl_opt_pass pass_regmove =
  {
   RTL_PASS,
   "regmove",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_regmove,                  /* gate */
   regmove_optimize,			/* execute */
   NULL,                                 /* sub */
Index: function.c
===================================================================
--- function.c	(revision 192991)
+++ function.c	(working copy)
@@ -1949,6 +1949,7 @@ struct rtl_opt_pass pass_instantiate_virtual_regs
  {
   RTL_PASS,
   "vregs",                              /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   instantiate_virtual_regs,             /* execute */
   NULL,                                 /* sub */
@@ -6925,6 +6926,7 @@ struct rtl_opt_pass pass_leaf_regs =
  {
   RTL_PASS,
   "*leaf_regs",                         /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_handle_check_leaf_regs,       /* execute */
   NULL,                                 /* sub */
@@ -6963,6 +6965,7 @@ struct rtl_opt_pass pass_thread_prologue_and_epilo
  {
   RTL_PASS,
   "pro_and_epilogue",                   /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_handle_thread_prologue_and_epilogue, /* execute */
   NULL,                                 /* sub */
@@ -7164,6 +7167,7 @@ struct rtl_opt_pass pass_match_asm_constraints =
  {
   RTL_PASS,
   "asmcons",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   rest_of_match_asm_constraints,	/* execute */
   NULL,                                 /* sub */
Index: tree-vectorizer.c
===================================================================
--- tree-vectorizer.c	(revision 192991)
+++ tree-vectorizer.c	(working copy)
@@ -194,6 +194,8 @@ struct gimple_opt_pass pass_slp_vectorize =
  {
   GIMPLE_PASS,
   "slp",                                /* name */
+  OPTGROUP_LOOP
+  | OPTGROUP_VEC,                       /* optinfo_flags */
   gate_vect_slp,                        /* gate */
   execute_vect_slp,                     /* execute */
   NULL,                                 /* sub */
@@ -266,6 +268,8 @@ struct simple_ipa_opt_pass pass_ipa_increase_align
  {
   SIMPLE_IPA_PASS,
   "increase_alignment",                 /* name */
+  OPTGROUP_LOOP
+  | OPTGROUP_VEC,                       /* optinfo_flags */
   gate_increase_alignment,              /* gate */
   increase_alignment,                   /* execute */
   NULL,                                 /* sub */
Index: ipa-split.c
===================================================================
--- ipa-split.c	(revision 192991)
+++ ipa-split.c	(working copy)
@@ -1601,6 +1601,7 @@ struct gimple_opt_pass pass_split_functions =
  {
   GIMPLE_PASS,
   "fnsplit",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_split_functions,			/* gate */
   execute_split_functions,		/* execute */
   NULL,					/* sub */
@@ -1642,6 +1643,7 @@ struct gimple_opt_pass pass_feedback_split_functio
  {
   GIMPLE_PASS,
   "feedback_fnsplit",			/* name */
+  OPTGROUP_NONE,                      /* optinfo_flags */
   gate_feedback_split_functions,	/* gate */
   execute_feedback_split_functions,	/* execute */
   NULL,					/* sub */
Index: gcse.c
===================================================================
--- gcse.c	(revision 192991)
+++ gcse.c	(working copy)
@@ -4027,6 +4027,7 @@ struct rtl_opt_pass pass_rtl_pre =
  {
   RTL_PASS,
   "rtl pre",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_rtl_pre,                         /* gate */
   execute_rtl_pre,    			/* execute */
   NULL,                                 /* sub */
@@ -4047,6 +4048,7 @@ struct rtl_opt_pass pass_rtl_hoist =
  {
   RTL_PASS,
   "hoist",                              /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_rtl_hoist,                       /* gate */
   execute_rtl_hoist,  			/* execute */
   NULL,                                 /* sub */
Index: tree-if-conv.c
===================================================================
--- tree-if-conv.c	(revision 192991)
+++ tree-if-conv.c	(working copy)
@@ -1859,6 +1859,7 @@ struct gimple_opt_pass pass_if_conversion =
  {
   GIMPLE_PASS,
   "ifcvt",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_tree_if_conversion,		/* gate */
   main_tree_if_conversion,		/* execute */
   NULL,					/* sub */
Index: init-regs.c
===================================================================
--- init-regs.c	(revision 192991)
+++ init-regs.c	(working copy)
@@ -143,6 +143,7 @@ struct rtl_opt_pass pass_initialize_regs =
  {
   RTL_PASS,
   "init-regs",                          /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_initialize_regs,                 /* gate */
   rest_of_handle_initialize_regs,       /* execute */
   NULL,                                 /* sub */
Index: ipa.c
===================================================================
--- ipa.c	(revision 192991)
+++ ipa.c	(working copy)
@@ -950,6 +950,7 @@ struct simple_ipa_opt_pass pass_ipa_function_and_v
  {
   SIMPLE_IPA_PASS,
   "visibility",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   local_function_and_variable_visibility,/* execute */
   NULL,					/* sub */
@@ -979,6 +980,7 @@ struct simple_ipa_opt_pass pass_ipa_free_inline_su
  {
   SIMPLE_IPA_PASS,
   "*free_inline_summary",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   free_inline_summary,			/* execute */
   NULL,					/* sub */
@@ -1017,6 +1019,7 @@ struct ipa_opt_pass_d pass_ipa_whole_program_visib
  {
   IPA_PASS,
   "whole-program",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_whole_program_function_and_variable_visibility,/* gate */
   whole_program_function_and_variable_visibility,/* execute */
   NULL,					/* sub */
@@ -1100,6 +1103,7 @@ struct ipa_opt_pass_d pass_ipa_profile =
  {
   IPA_PASS,
   "profile_estimate",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_ipa_profile,			/* gate */
   ipa_profile,			        /* execute */
   NULL,					/* sub */
@@ -1410,6 +1414,7 @@ struct ipa_opt_pass_d pass_ipa_cdtor_merge =
  {
   IPA_PASS,
   "cdtor",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_ipa_cdtor_merge,			/* gate */
   ipa_cdtor_merge,		        /* execute */
   NULL,					/* sub */
Index: trans-mem.c
===================================================================
--- trans-mem.c	(revision 192991)
+++ trans-mem.c	(working copy)
@@ -798,6 +798,7 @@ struct gimple_opt_pass pass_diagnose_tm_blocks =
   {
     GIMPLE_PASS,
     "*diagnose_tm_blocks",		/* name */
+    OPTGROUP_NONE,                      /* optinfo_flags */
     gate_tm,				/* gate */
     diagnose_tm_blocks,			/* execute */
     NULL,				/* sub */
@@ -1738,6 +1739,7 @@ struct gimple_opt_pass pass_lower_tm =
  {
   GIMPLE_PASS,
   "tmlower",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_tm,				/* gate */
   execute_lower_tm,			/* execute */
   NULL,					/* sub */
@@ -1985,6 +1987,7 @@ struct gimple_opt_pass pass_tm_init =
  {
   GIMPLE_PASS,
   "*tminit",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_tm_init,				/* gate */
   NULL,					/* execute */
   NULL,					/* sub */
@@ -2571,6 +2574,7 @@ struct gimple_opt_pass pass_tm_mark =
  {
   GIMPLE_PASS,
   "tmmark",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_tm_mark,			/* execute */
   NULL,					/* sub */
@@ -2848,6 +2852,7 @@ struct gimple_opt_pass pass_tm_edges =
  {
   GIMPLE_PASS,
   "tmedge",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_tm_edges,			/* execute */
   NULL,					/* sub */
@@ -3513,6 +3518,7 @@ struct gimple_opt_pass pass_tm_memopt =
  {
   GIMPLE_PASS,
   "tmmemopt",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_tm_memopt,			/* gate */
   execute_tm_memopt,			/* execute */
   NULL,					/* sub */
@@ -5067,6 +5073,7 @@ struct simple_ipa_opt_pass pass_ipa_tm =
  {
   SIMPLE_IPA_PASS,
   "tmipa",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_tm,				/* gate */
   ipa_tm_execute,			/* execute */
   NULL,					/* sub */
Index: ipa-inline-analysis.c
===================================================================
--- ipa-inline-analysis.c	(revision 192991)
+++ ipa-inline-analysis.c	(working copy)
@@ -2655,6 +2655,7 @@ struct gimple_opt_pass pass_inline_parameters =
  {
   GIMPLE_PASS,
   "inline_param",			/* name */
+  OPTGROUP_INLINE,                      /* optinfo_flags */
   NULL,					/* gate */
   compute_inline_parameters_for_current,/* execute */
   NULL,					/* sub */
Index: tree-ssa-phiopt.c
===================================================================
--- tree-ssa-phiopt.c	(revision 192991)
+++ tree-ssa-phiopt.c	(working copy)
@@ -1951,6 +1951,7 @@ struct gimple_opt_pass pass_phiopt =
  {
   GIMPLE_PASS,
   "phiopt",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_phiopt,				/* gate */
   tree_ssa_phiopt,			/* execute */
   NULL,					/* sub */
@@ -1979,6 +1980,7 @@ struct gimple_opt_pass pass_cselim =
  {
   GIMPLE_PASS,
   "cselim",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_cselim,				/* gate */
   tree_ssa_cs_elim,			/* execute */
   NULL,					/* sub */
Index: lower-subreg.c
===================================================================
--- lower-subreg.c	(revision 192991)
+++ lower-subreg.c	(working copy)
@@ -1665,6 +1665,7 @@ struct rtl_opt_pass pass_lower_subreg =
  {
   RTL_PASS,
   "subreg1",	                        /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_lower_subreg,             /* gate */
   rest_of_handle_lower_subreg,          /* execute */
   NULL,                                 /* sub */
@@ -1685,6 +1686,7 @@ struct rtl_opt_pass pass_lower_subreg2 =
  {
   RTL_PASS,
   "subreg2",	                        /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_lower_subreg,             /* gate */
   rest_of_handle_lower_subreg2,          /* execute */
   NULL,                                 /* sub */
Index: bt-load.c
===================================================================
--- bt-load.c	(revision 192991)
+++ bt-load.c	(working copy)
@@ -1,3 +1,4 @@
+
 /* Perform branch target register load optimizations.
    Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
@@ -1509,6 +1510,7 @@ struct rtl_opt_pass pass_branch_target_load_optimi
  {
   RTL_PASS,
   "btl1",                               /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_branch_target_load_optimize1,      /* gate */
   rest_of_handle_branch_target_load_optimize1,   /* execute */
   NULL,                                 /* sub */
@@ -1558,6 +1560,7 @@ struct rtl_opt_pass pass_branch_target_load_optimi
  {
   RTL_PASS,
   "btl2",                               /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_branch_target_load_optimize2,      /* gate */
   rest_of_handle_branch_target_load_optimize2,   /* execute */
   NULL,                                 /* sub */
Index: except.c
===================================================================
--- except.c	(revision 192991)
+++ except.c	(working copy)
@@ -1920,6 +1920,7 @@ struct rtl_opt_pass pass_set_nothrow_function_flag
  {
   RTL_PASS,
   "nothrow",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   set_nothrow_function_flags,           /* execute */
   NULL,                                 /* sub */
@@ -2569,6 +2570,7 @@ struct rtl_opt_pass pass_convert_to_eh_region_rang
  {
   RTL_PASS,
   "eh_ranges",                          /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_convert_to_eh_region_ranges,	/* gate */
   convert_to_eh_region_ranges,          /* execute */
   NULL,                                 /* sub */
Index: store-motion.c
===================================================================
--- store-motion.c	(revision 192991)
+++ store-motion.c	(working copy)
@@ -1238,6 +1238,7 @@ struct rtl_opt_pass pass_rtl_store_motion =
  {
   RTL_PASS,
   "store_motion",                       /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_rtl_store_motion,                /* gate */
   execute_rtl_store_motion,		/* execute */
   NULL,                                 /* sub */
Index: cfgexpand.c
===================================================================
--- cfgexpand.c	(revision 192991)
+++ cfgexpand.c	(working copy)
@@ -4677,6 +4677,7 @@ struct rtl_opt_pass pass_expand =
  {
   RTL_PASS,
   "expand",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   gimple_expand_cfg,			/* execute */
   NULL,                                 /* sub */
Index: tree-cfgcleanup.c
===================================================================
--- tree-cfgcleanup.c	(revision 192991)
+++ tree-cfgcleanup.c	(working copy)
@@ -977,6 +977,7 @@ struct gimple_opt_pass pass_merge_phi =
  {
   GIMPLE_PASS,
   "mergephi",			/* name */
+  OPTGROUP_NONE,                /* optinfo_flags */
   gate_merge_phi,		/* gate */
   merge_phi_nodes,		/* execute */
   NULL,				/* sub */
Index: cfgcleanup.c
===================================================================
--- cfgcleanup.c	(revision 192991)
+++ cfgcleanup.c	(working copy)
@@ -3008,6 +3008,7 @@ struct rtl_opt_pass pass_jump =
  {
   RTL_PASS,
   "jump",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_jump,				/* execute */
   NULL,					/* sub */
@@ -3034,6 +3035,7 @@ struct rtl_opt_pass pass_jump2 =
  {
   RTL_PASS,
   "jump2",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_jump2,			/* execute */
   NULL,					/* sub */
Index: tree-ssa-pre.c
===================================================================
--- tree-ssa-pre.c	(revision 192991)
+++ tree-ssa-pre.c	(working copy)
@@ -4766,6 +4766,7 @@ struct gimple_opt_pass pass_pre =
  {
   GIMPLE_PASS,
   "pre",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_pre,				/* gate */
   do_pre,				/* execute */
   NULL,					/* sub */
@@ -4819,6 +4820,7 @@ struct gimple_opt_pass pass_fre =
  {
   GIMPLE_PASS,
   "fre",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_fre,				/* gate */
   execute_fre,				/* execute */
   NULL,					/* sub */
Index: tree-sra.c
===================================================================
--- tree-sra.c	(revision 192991)
+++ tree-sra.c	(working copy)
@@ -3443,6 +3443,7 @@ struct gimple_opt_pass pass_sra_early =
  {
   GIMPLE_PASS,
   "esra",	 			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_intra_sra,			/* gate */
   early_intra_sra,			/* execute */
   NULL,					/* sub */
@@ -3464,6 +3465,7 @@ struct gimple_opt_pass pass_sra =
  {
   GIMPLE_PASS,
   "sra",	 			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_intra_sra,			/* gate */
   late_intra_sra,			/* execute */
   NULL,					/* sub */
@@ -5006,6 +5008,7 @@ struct gimple_opt_pass pass_early_ipa_sra =
  {
   GIMPLE_PASS,
   "eipa_sra",	 			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   ipa_early_sra_gate,			/* gate */
   ipa_early_sra,			/* execute */
   NULL,					/* sub */
Index: tree-mudflap.c
===================================================================
--- tree-mudflap.c	(revision 192991)
+++ tree-mudflap.c	(working copy)
@@ -1368,6 +1368,7 @@ struct gimple_opt_pass pass_mudflap_1 =
  {
   GIMPLE_PASS,
   "mudflap1",                           /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_mudflap,                         /* gate */
   execute_mudflap_function_decls,       /* execute */
   NULL,                                 /* sub */
@@ -1387,6 +1388,7 @@ struct gimple_opt_pass pass_mudflap_2 =
  {
   GIMPLE_PASS,
   "mudflap2",                           /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_mudflap,                         /* gate */
   execute_mudflap_function_ops,         /* execute */
   NULL,                                 /* sub */
Index: tree-ssa-copy.c
===================================================================
--- tree-ssa-copy.c	(revision 192991)
+++ tree-ssa-copy.c	(working copy)
@@ -828,6 +828,7 @@ struct gimple_opt_pass pass_copy_prop =
  {
   GIMPLE_PASS,
   "copyprop",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_copy_prop,			/* gate */
   execute_copy_prop,			/* execute */
   NULL,					/* sub */
Index: tree-ssa-forwprop.c
===================================================================
--- tree-ssa-forwprop.c	(revision 192991)
+++ tree-ssa-forwprop.c	(working copy)
@@ -3122,6 +3122,7 @@ struct gimple_opt_pass pass_forwprop =
  {
   GIMPLE_PASS,
   "forwprop",			/* name */
+  OPTGROUP_NONE,                /* optinfo_flags */
   gate_forwprop,		/* gate */
   ssa_forward_propagate_and_combine,	/* execute */
   NULL,				/* sub */
Index: tree-ssa-dce.c
===================================================================
--- tree-ssa-dce.c	(revision 192991)
+++ tree-ssa-dce.c	(working copy)
@@ -1651,6 +1651,7 @@ struct gimple_opt_pass pass_dce =
  {
   GIMPLE_PASS,
   "dce",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_dce,				/* gate */
   tree_ssa_dce,				/* execute */
   NULL,					/* sub */
@@ -1670,6 +1671,7 @@ struct gimple_opt_pass pass_dce_loop =
  {
   GIMPLE_PASS,
   "dceloop",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_dce,				/* gate */
   tree_ssa_dce_loop,			/* execute */
   NULL,					/* sub */
@@ -1689,6 +1691,7 @@ struct gimple_opt_pass pass_cd_dce =
  {
   GIMPLE_PASS,
   "cddce",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_dce,				/* gate */
   tree_ssa_cd_dce,			/* execute */
   NULL,					/* sub */
Index: ira.c
===================================================================
--- ira.c	(revision 192991)
+++ ira.c	(working copy)
@@ -4716,6 +4716,7 @@ struct rtl_opt_pass pass_ira =
  {
   RTL_PASS,
   "ira",                                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_handle_ira,		        /* execute */
   NULL,                                 /* sub */
@@ -4742,6 +4743,7 @@ struct rtl_opt_pass pass_reload =
  {
   RTL_PASS,
   "reload",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_handle_reload,	        /* execute */
   NULL,                                 /* sub */
Index: tree-ssa.c
===================================================================
--- tree-ssa.c	(revision 192991)
+++ tree-ssa.c	(working copy)
@@ -1135,6 +1135,7 @@ struct gimple_opt_pass pass_init_datastructures =
  {
   GIMPLE_PASS,
   "*init_datastructures",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_init_datastructures,		/* execute */
   NULL,					/* sub */
@@ -1744,6 +1745,7 @@ struct gimple_opt_pass pass_early_warn_uninitializ
  {
   GIMPLE_PASS,
   "*early_warn_uninitialized",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_warn_uninitialized,		/* gate */
   execute_early_warn_uninitialized,	/* execute */
   NULL,					/* sub */
@@ -2174,6 +2176,7 @@ struct gimple_opt_pass pass_update_address_taken =
  {
   GIMPLE_PASS,
   "addressables",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   NULL,					/* execute */
   NULL,					/* sub */
Index: dwarf2cfi.c
===================================================================
--- dwarf2cfi.c	(revision 192991)
+++ dwarf2cfi.c	(working copy)
@@ -3388,6 +3388,7 @@ struct rtl_opt_pass pass_dwarf2_frame =
  {
   RTL_PASS,
   "dwarf2",			/* name */
+  OPTGROUP_NONE,                /* optinfo_flags */
   gate_dwarf2_frame,		/* gate */
   execute_dwarf2_frame,		/* execute */
   NULL,				/* sub */
Index: tree-optimize.c
===================================================================
--- tree-optimize.c	(revision 192991)
+++ tree-optimize.c	(working copy)
@@ -95,6 +95,7 @@ struct gimple_opt_pass pass_cleanup_cfg_post_optim
  {
   GIMPLE_PASS,
   "optimized",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_cleanup_cfg_post_optimizing,	/* execute */
   NULL,					/* sub */
@@ -222,6 +223,7 @@ struct gimple_opt_pass pass_fixup_cfg =
  {
   GIMPLE_PASS,
   "*free_cfg_annotations",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_fixup_cfg,			/* execute */
   NULL,					/* sub */
Index: tree-ssa-phiprop.c
===================================================================
--- tree-ssa-phiprop.c	(revision 192991)
+++ tree-ssa-phiprop.c	(working copy)
@@ -409,6 +409,7 @@ struct gimple_opt_pass pass_phiprop =
  {
   GIMPLE_PASS,
   "phiprop",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_phiprop,			/* gate */
   tree_ssa_phiprop,		/* execute */
   NULL,				/* sub */
Index: tree-object-size.c
===================================================================
--- tree-object-size.c	(revision 192991)
+++ tree-object-size.c	(working copy)
@@ -1268,6 +1268,7 @@ struct gimple_opt_pass pass_object_sizes =
  {
   GIMPLE_PASS,
   "objsz",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   compute_object_sizes,			/* execute */
   NULL,					/* sub */
Index: combine.c
===================================================================
--- combine.c	(revision 192991)
+++ combine.c	(working copy)
@@ -13842,6 +13842,7 @@ struct rtl_opt_pass pass_combine =
  {
   RTL_PASS,
   "combine",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_combine,                  /* gate */
   rest_of_handle_combine,               /* execute */
   NULL,                                 /* sub */
Index: cprop.c
===================================================================
--- cprop.c	(revision 192991)
+++ cprop.c	(working copy)
@@ -1923,6 +1923,7 @@ struct rtl_opt_pass pass_rtl_cprop =
  {
   RTL_PASS,
   "cprop",                              /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_rtl_cprop,                       /* gate */
   execute_rtl_cprop,  			/* execute */
   NULL,                                 /* sub */
Index: bb-reorder.c
===================================================================
--- bb-reorder.c	(revision 192991)
+++ bb-reorder.c	(working copy)
@@ -2234,6 +2234,7 @@ struct rtl_opt_pass pass_reorder_blocks =
  {
   RTL_PASS,
   "bbro",                               /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_reorder_blocks,           /* gate */
   rest_of_handle_reorder_blocks,        /* execute */
   NULL,                                 /* sub */
@@ -2376,6 +2377,7 @@ struct rtl_opt_pass pass_duplicate_computed_gotos
  {
   RTL_PASS,
   "compgotos",                          /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_duplicate_computed_gotos,        /* gate */
   duplicate_computed_gotos,             /* execute */
   NULL,                                 /* sub */
@@ -2579,6 +2581,7 @@ struct rtl_opt_pass pass_partition_blocks =
  {
   RTL_PASS,
   "bbpart",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_partition_blocks,         /* gate */
   partition_hot_cold_basic_blocks,      /* execute */
   NULL,                                 /* sub */
Index: stack-ptr-mod.c
===================================================================
--- stack-ptr-mod.c	(revision 192991)
+++ stack-ptr-mod.c	(working copy)
@@ -96,6 +96,7 @@ struct rtl_opt_pass pass_stack_ptr_mod =
  {
   RTL_PASS,
   "*stack_ptr_mod",                     /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_handle_stack_ptr_mod,         /* execute */
   NULL,                                 /* sub */
Index: var-tracking.c
===================================================================
--- var-tracking.c	(revision 192991)
+++ var-tracking.c	(working copy)
@@ -10099,6 +10099,7 @@ struct rtl_opt_pass pass_variable_tracking =
  {
   RTL_PASS,
   "vartrack",                           /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_var_tracking,             /* gate */
   variable_tracking_main,               /* execute */
   NULL,                                 /* sub */
Index: tree-profile.c
===================================================================
--- tree-profile.c	(revision 192991)
+++ tree-profile.c	(working copy)
@@ -568,6 +568,7 @@ struct simple_ipa_opt_pass pass_ipa_tree_profile =
  {
   SIMPLE_IPA_PASS,
   "profile",  		               /* name */
+  OPTGROUP_NONE,                       /* optinfo_flags */
   gate_tree_profile_ipa,               /* gate */
   tree_profiling,                      /* execute */
   NULL,                                /* sub */
Index: tree-vect-generic.c
===================================================================
--- tree-vect-generic.c	(revision 192991)
+++ tree-vect-generic.c	(working copy)
@@ -1435,6 +1435,7 @@ struct gimple_opt_pass pass_lower_vector =
  {
   GIMPLE_PASS,
   "veclower",				/* name */
+  OPTGROUP_VEC,                         /* optinfo_flags */
   gate_expand_vector_operations_ssa,    /* gate */
   expand_vector_operations,		/* execute */
   NULL,					/* sub */
@@ -1457,6 +1458,7 @@ struct gimple_opt_pass pass_lower_vector_ssa =
  {
   GIMPLE_PASS,
   "veclower2",				/* name */
+  OPTGROUP_VEC,                         /* optinfo_flags */
   0,	                                /* gate */
   expand_vector_operations,		/* execute */
   NULL,					/* sub */
Index: reg-stack.c
===================================================================
--- reg-stack.c	(revision 192991)
+++ reg-stack.c	(working copy)
@@ -3305,6 +3305,7 @@ struct rtl_opt_pass pass_stack_regs =
  {
   RTL_PASS,
   "*stack_regs",                        /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_stack_regs,               /* gate */
   NULL,					/* execute */
   NULL,                                 /* sub */
@@ -3336,6 +3337,7 @@ struct rtl_opt_pass pass_stack_regs_run =
  {
   RTL_PASS,
   "stack",                              /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_handle_stack_regs,            /* execute */
   NULL,                                 /* sub */
Index: opts-global.c
===================================================================
--- opts-global.c	(revision 192991)
+++ opts-global.c	(working copy)
@@ -240,7 +240,7 @@ read_cmdline_options (struct gcc_options *opts, st
    REPORT_VECTORIZED_LOCATIONS ==> "-optimized"
    REPORT_UNVECTORIZED_LOCATIONS ==> "-missed"
 
-   Any higher verbosity levels get mapped to "-optall" flags.  */
+   Any higher verbosity levels get mapped to "-all" flags.  */
 
 static void
 dump_remap_tree_vectorizer_verbose (const char *arg)
@@ -259,7 +259,7 @@ dump_remap_tree_vectorizer_verbose (const char *ar
       remapped_opt_info = "missed";
       break;
     default:
-      remapped_opt_info = "optall";
+      remapped_opt_info = "all";
       break;
     }
 
@@ -390,7 +390,7 @@ handle_common_deferred_options (void)
 
         case OPT_fopt_info_:
 	  if (!opt_info_switch_p (opt->arg))
-	    error ("unrecognized command line option %<-fopt-info%s%>",
+	    error ("unrecognized command line option %<-fopt-info-%s%>",
                    opt->arg);
           break;
 
Index: reginfo.c
===================================================================
--- reginfo.c	(revision 192991)
+++ reginfo.c	(working copy)
@@ -972,6 +972,7 @@ struct rtl_opt_pass pass_reginfo_init =
  {
   RTL_PASS,
   "reginfo",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   reginfo_init,                         /* execute */
   NULL,                                 /* sub */
Index: sched-rgn.c
===================================================================
--- sched-rgn.c	(revision 192991)
+++ sched-rgn.c	(working copy)
@@ -3575,6 +3575,7 @@ struct rtl_opt_pass pass_sched =
  {
   RTL_PASS,
   "sched1",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_sched,                    /* gate */
   rest_of_handle_sched,                 /* execute */
   NULL,                                 /* sub */
@@ -3596,6 +3597,7 @@ struct rtl_opt_pass pass_sched2 =
  {
   RTL_PASS,
   "sched2",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_sched2,                   /* gate */
   rest_of_handle_sched2,                /* execute */
   NULL,                                 /* sub */
Index: tree-ssa-structalias.c
===================================================================
--- tree-ssa-structalias.c	(revision 192991)
+++ tree-ssa-structalias.c	(working copy)
@@ -6807,6 +6807,7 @@ struct gimple_opt_pass pass_build_alias =
  {
   GIMPLE_PASS,
   "alias",		    /* name */
+  OPTGROUP_NONE,            /* optinfo_flags */
   gate_tree_pta,	    /* gate */
   NULL,                     /* execute */
   NULL,                     /* sub */
@@ -6829,6 +6830,7 @@ struct gimple_opt_pass pass_build_ealias =
  {
   GIMPLE_PASS,
   "ealias",		    /* name */
+  OPTGROUP_NONE,            /* optinfo_flags */
   gate_tree_pta,	    /* gate */
   NULL,                     /* execute */
   NULL,                     /* sub */
@@ -7203,6 +7205,7 @@ struct simple_ipa_opt_pass pass_ipa_pta =
  {
   SIMPLE_IPA_PASS,
   "pta",		                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_ipa_pta,			/* gate */
   ipa_pta_execute,			/* execute */
   NULL,					/* sub */
Index: tree-switch-conversion.c
===================================================================
--- tree-switch-conversion.c	(revision 192991)
+++ tree-switch-conversion.c	(working copy)
@@ -1463,6 +1463,7 @@ struct gimple_opt_pass pass_convert_switch =
  {
   GIMPLE_PASS,
   "switchconv",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   switchconv_gate,			/* gate */
   do_switchconv,			/* execute */
   NULL,					/* sub */
Index: tree-cfg.c
===================================================================
--- tree-cfg.c	(revision 192991)
+++ tree-cfg.c	(working copy)
@@ -247,6 +247,7 @@ struct gimple_opt_pass pass_build_cfg =
  {
   GIMPLE_PASS,
   "cfg",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_build_cfg,			/* execute */
   NULL,					/* sub */
@@ -7705,6 +7706,7 @@ struct gimple_opt_pass pass_split_crit_edges =
  {
   GIMPLE_PASS,
   "crited",                          /* name */
+  OPTGROUP_NONE,                 /* optinfo_flags */
   NULL,                          /* gate */
   split_critical_edges,          /* execute */
   NULL,                          /* sub */
@@ -7858,6 +7860,7 @@ struct gimple_opt_pass pass_warn_function_return =
  {
   GIMPLE_PASS,
   "*warn_function_return",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_warn_function_return,		/* execute */
   NULL,					/* sub */
@@ -7894,6 +7897,7 @@ struct gimple_opt_pass pass_warn_function_noreturn
  {
   GIMPLE_PASS,
   "*warn_function_noreturn",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_warn_function_noreturn,		/* gate */
   execute_warn_function_noreturn,	/* execute */
   NULL,					/* sub */
@@ -7992,6 +7996,7 @@ struct gimple_opt_pass pass_warn_unused_result =
   {
     GIMPLE_PASS,
     "*warn_unused_result",		/* name */
+    OPTGROUP_NONE,                        /* optinfo_flags */
     gate_warn_unused_result,		/* gate */
     run_warn_unused_result,		/* execute */
     NULL,				/* sub */
Index: passes.c
===================================================================
--- passes.c	(revision 192991)
+++ passes.c	(working copy)
@@ -103,7 +103,6 @@ debug_pass (void)
 
 
 /* Global variables used to communicate with passes.  */
-int dump_flags;
 bool in_gimple_form;
 bool first_pass_instance;
 
@@ -285,6 +284,7 @@ struct simple_ipa_opt_pass pass_early_local_passes
  {
   SIMPLE_IPA_PASS,
   "early_local_cleanups",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_all_early_local_passes,		/* gate */
   execute_all_early_local_passes,	/* execute */
   NULL,					/* sub */
@@ -314,6 +314,7 @@ static struct gimple_opt_pass pass_all_early_optim
  {
   GIMPLE_PASS,
   "early_optimizations",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_all_early_optimizations,		/* gate */
   NULL,					/* execute */
   NULL,					/* sub */
@@ -341,6 +342,7 @@ static struct gimple_opt_pass pass_all_optimizatio
  {
   GIMPLE_PASS,
   "*all_optimizations",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_all_optimizations,		/* gate */
   NULL,					/* execute */
   NULL,					/* sub */
@@ -368,6 +370,7 @@ static struct gimple_opt_pass pass_all_optimizatio
  {
   GIMPLE_PASS,
   "*all_optimizations_g",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_all_optimizations_g,		/* gate */
   NULL,					/* execute */
   NULL,					/* sub */
@@ -395,6 +398,7 @@ static struct rtl_opt_pass pass_rest_of_compilatio
  {
   RTL_PASS,
   "*rest_of_compilation",               /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_rest_of_compilation,             /* gate */
   NULL,                                 /* execute */
   NULL,                                 /* sub */
@@ -420,6 +424,7 @@ static struct rtl_opt_pass pass_postreload =
  {
   RTL_PASS,
   "*all-postreload",                        /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_postreload,                      /* gate */
   NULL,                                 /* execute */
   NULL,                                 /* sub */
@@ -487,6 +492,7 @@ register_one_dump_file (struct opt_pass *pass)
   const char *name, *full_name, *prefix;
   char num[10];
   int flags, id;
+  int optgroup_flags = OPTGROUP_NONE;
 
   /* See below in next_pass_1.  */
   num[0] = '\0';
@@ -503,7 +509,7 @@ register_one_dump_file (struct opt_pass *pass)
   name = name ? name + 1 : pass->name;
   dot_name = concat (".", name, num, NULL);
   if (pass->type == SIMPLE_IPA_PASS || pass->type == IPA_PASS)
-    prefix = "ipa-", flags = TDF_IPA;
+    prefix = "ipa-", flags = TDF_IPA, optgroup_flags |= OPTGROUP_IPA;
   else if (pass->type == GIMPLE_PASS)
     prefix = "tree-", flags = TDF_TREE;
   else
@@ -511,7 +517,8 @@ register_one_dump_file (struct opt_pass *pass)
 
   flag_name = concat (prefix, name, num, NULL);
   glob_name = concat (prefix, name, NULL);
-  id = dump_register (dot_name, flag_name, glob_name, flags);
+  optgroup_flags |= pass->optinfo_flags;
+  id = dump_register (dot_name, flag_name, glob_name, flags, optgroup_flags);
   set_pass_for_id (id, pass);
   full_name = concat (prefix, pass->name, num, NULL);
   register_pass_name (pass, full_name);
Index: ree.c
===================================================================
--- ree.c	(revision 192991)
+++ ree.c	(working copy)
@@ -949,6 +949,7 @@ struct rtl_opt_pass pass_ree =
  {
   RTL_PASS,
   "ree",                                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_ree,                      /* gate */
   rest_of_handle_ree,                   /* execute */
   NULL,                                 /* sub */
Index: tree-ssa-reassoc.c
===================================================================
--- tree-ssa-reassoc.c	(revision 192991)
+++ tree-ssa-reassoc.c	(working copy)
@@ -3703,6 +3703,7 @@ struct gimple_opt_pass pass_reassoc =
  {
   GIMPLE_PASS,
   "reassoc",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_tree_ssa_reassoc,		/* gate */
   execute_reassoc,			/* execute */
   NULL,					/* sub */
Index: config/epiphany/resolve-sw-modes.c
===================================================================
--- config/epiphany/resolve-sw-modes.c	(revision 192991)
+++ config/epiphany/resolve-sw-modes.c	(working copy)
@@ -166,6 +166,7 @@ struct rtl_opt_pass pass_resolve_sw_modes =
  {
   RTL_PASS,
   "resolve_sw_modes",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_resolve_sw_modes,		/* gate */
   resolve_sw_modes,			/* execute */
   NULL,					/* sub */
Index: config/epiphany/mode-switch-use.c
===================================================================
--- config/epiphany/mode-switch-use.c	(revision 192991)
+++ config/epiphany/mode-switch-use.c	(working copy)
@@ -76,6 +76,7 @@ struct rtl_opt_pass pass_mode_switch_use =
  {
   RTL_PASS,
   "mode_switch_use",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   insert_uses,				/* execute */
   NULL,					/* sub */
Index: config/rl78/rl78.c
===================================================================
--- config/rl78/rl78.c	(revision 192991)
+++ config/rl78/rl78.c	(working copy)
@@ -133,6 +133,7 @@ static struct opt_pass rl78_devirt_pass =
 {
   RTL_PASS,
   "devirt",
+  OPTGROUP_NONE,                        /* optinfo_flags */
   devirt_gate,
   devirt_pass,
   NULL,
Index: combine-stack-adj.c
===================================================================
--- combine-stack-adj.c	(revision 192991)
+++ combine-stack-adj.c	(working copy)
@@ -650,6 +650,7 @@ struct rtl_opt_pass pass_stack_adjustments =
  {
   RTL_PASS,
   "csa",                                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_stack_adjustments,        /* gate */
   rest_of_handle_stack_adjustments,     /* execute */
   NULL,                                 /* sub */
Index: cfgrtl.c
===================================================================
--- cfgrtl.c	(revision 192991)
+++ cfgrtl.c	(working copy)
@@ -456,6 +456,7 @@ struct rtl_opt_pass pass_free_cfg =
  {
   RTL_PASS,
   "*free_cfg",                          /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_pass_free_cfg,                /* execute */
   NULL,                                 /* sub */
@@ -2998,6 +2999,7 @@ struct rtl_opt_pass pass_into_cfg_layout_mode =
  {
   RTL_PASS,
   "into_cfglayout",                     /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   into_cfg_layout_mode,                 /* execute */
   NULL,                                 /* sub */
@@ -3017,6 +3019,7 @@ struct rtl_opt_pass pass_outof_cfg_layout_mode =
  {
   RTL_PASS,
   "outof_cfglayout",                    /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   outof_cfg_layout_mode,                /* execute */
   NULL,                                 /* sub */
Index: statistics.c
===================================================================
--- statistics.c	(revision 192991)
+++ statistics.c	(working copy)
@@ -246,7 +246,7 @@ void
 statistics_early_init (void)
 {
   statistics_dump_nr = dump_register (".statistics", "statistics",
-				      "statistics", TDF_TREE);
+				      "statistics", TDF_TREE, OPTGROUP_NONE);
 }
 
 /* Init the statistics.  */
Index: dce.c
===================================================================
--- dce.c	(revision 192991)
+++ dce.c	(working copy)
@@ -786,6 +786,7 @@ struct rtl_opt_pass pass_ud_rtl_dce =
  {
   RTL_PASS,
   "ud_dce",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_ud_dce,                          /* gate */
   rest_of_handle_ud_dce,                /* execute */
   NULL,                                 /* sub */
@@ -1201,6 +1202,7 @@ struct rtl_opt_pass pass_fast_rtl_dce =
  {
   RTL_PASS,
   "rtl_dce",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_fast_dce,                        /* gate */
   rest_of_handle_fast_dce,              /* execute */
   NULL,                                 /* sub */
Index: tree-ssanames.c
===================================================================
--- tree-ssanames.c	(revision 192991)
+++ tree-ssanames.c	(working copy)
@@ -451,6 +451,7 @@ struct gimple_opt_pass pass_release_ssa_names =
  {
   GIMPLE_PASS,
   "release_ssa",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   release_dead_ssa_names,		/* execute */
   NULL,					/* sub */
Index: regcprop.c
===================================================================
--- regcprop.c	(revision 192991)
+++ regcprop.c	(working copy)
@@ -1235,6 +1235,7 @@ struct rtl_opt_pass pass_cprop_hardreg =
  {
   RTL_PASS,
   "cprop_hardreg",                      /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_cprop,                    /* gate */
   copyprop_hardreg_forward,             /* execute */
   NULL,                                 /* sub */

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] pass filtering for -fopt-info
  2012-10-31  8:18     ` Sharad Singhai
@ 2012-10-31 11:56       ` Richard Biener
  2012-11-01  7:51         ` Sharad Singhai
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Biener @ 2012-10-31 11:56 UTC (permalink / raw)
  To: Sharad Singhai; +Cc: Xinliang David Li, gcc-patches

On Wed, Oct 31, 2012 at 8:20 AM, Sharad Singhai <singhai@google.com> wrote:
> I am attaching an updated patch with comments inline.
>
> On Tue, Oct 30, 2012 at 9:04 AM, Xinliang David Li <davidxl@google.com> wrote:
>> On Tue, Oct 30, 2012 at 8:28 AM, Richard Biener
>> <richard.guenther@gmail.com> wrote:
>
>>> What I'd expect from that would be both vec.miss and vec.opt being
>>> populated ... (thus go away from the duality of dump files to
>>> primary dump file plus a set of alternate dump files).
>
> Yes, that would be an ideal behavior. Each pass currently has access
> to only two dump files, its primary file and alternate file. If we
> extend that to include a set, it would be cleaner and avoid some of
> the issues like the following:
>
> During testing, I found that even having any two different files for
> -fopt-info is problematic. For example, consider
>
> gcc ... -fopt-info-vec-optimized=vec.opt -fopt-info-loop-missed=loop.missed
>
> Now 'loop' and 'vec' include overlapping passes and since we have only
> one alternate file per pass, it can either be vec.opt or loop.missed,
> and some information would be lost. If we have a set of files, we can
> avoid this problem.
>
> However, considering the stage 1 deadline, I don't think it is
> feasible for this version. Instead, a set of alternate files can be
> considered as a future extension. For now, having a default of
> 'stderr' works for the common use case. To further prevent confusion,
> the current patch allows only one (non-stderr) file for -fopt-info and
> a warning is printed as in  the example below
>
> gcc ... -fopt-info-vec-optimized=vec.opt -fopt-info-loop-missed=loop.missed
> cc1: warning: ignoring possibly conflicting option
> '-fopt-info-loop-missed=loop.missed' [enabled by default]
>
> Multiple dumps can be achieved using 'stderr' (default) instead.
>
> gcc ... -fopt-info-vec-optimized -fopt-info-loop-missed
>
>>>> I have updated the documentation to include -fopt-info examples, and
>>>> added some details about -fopt-info command line conflicts.
>>>
>>> I like it overall, not sure if we want to pre-populate the OPTGROUP
>>> set too much at this point.  Like what is 'tree' or 'rtl' to users?
>>> nothing I think.
>>> 'ipa' yes.  'lto'?  sounds redundant with 'ipa' to me.  'omp'?  we don't have
>>> any optimizations here.
>
>>
>> OMP is a high level transformation, and it seems to be a good
>> candidate group, but this part does not need to be designed now. For
>> instance, there are a bunch of FDO related transformation (indirect
>> call promotion, memcpy transformation etc), and coverage mismatch
>> notes etc a good candidate to be filtered.
>
> Yes, perhaps later, we can consider something like an 'fdo' group for
> this purpose.
>
>>> Thus please drop TREE, RTL, LTO and OMP for now.
>
> Okay, I have removed 'tree', 'rtl', 'omp', 'lto' groups.
>
>>>
>>> Otherwise I'm leaving it for comments from other folks.
>>>
>>> Thanks,
>>> Richard.
>>>
>
> I have updated the documentation and testing is ongoing.

@@ -503,7 +509,7 @@ register_one_dump_file (struct opt_pass *pass)
   name = name ? name + 1 : pass->name;
   dot_name = concat (".", name, num, NULL);
   if (pass->type == SIMPLE_IPA_PASS || pass->type == IPA_PASS)
-    prefix = "ipa-", flags = TDF_IPA;
+    prefix = "ipa-", flags = TDF_IPA, optgroup_flags |= OPTGROUP_IPA;

please do not use compound statements.

Otherwise ok if testing is ok.

Thanks,
Richard.

> Thanks,
> Sharad

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] pass filtering for -fopt-info
  2012-10-31 11:56       ` Richard Biener
@ 2012-11-01  7:51         ` Sharad Singhai
  0 siblings, 0 replies; 7+ messages in thread
From: Sharad Singhai @ 2012-11-01  7:51 UTC (permalink / raw)
  To: Richard Biener; +Cc: Xinliang David Li, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 843 bytes --]

On Wed, Oct 31, 2012 at 4:42 AM, Richard Biener
<richard.guenther@gmail.com> wrote:
>
> @@ -503,7 +509,7 @@ register_one_dump_file (struct opt_pass *pass)
>    name = name ? name + 1 : pass->name;
>    dot_name = concat (".", name, num, NULL);
>    if (pass->type == SIMPLE_IPA_PASS || pass->type == IPA_PASS)
> -    prefix = "ipa-", flags = TDF_IPA;
> +    prefix = "ipa-", flags = TDF_IPA, optgroup_flags |= OPTGROUP_IPA;
>
> please do not use compound statements.

Okay fixed this as well as surrounding (pre-existing) instances.

> Otherwise ok if testing is ok.

I discovered build failure in four plugin tests where opt_pass struct
was being used. After adding the missing  initializer, OPTGROUP_NONE,
there were no test regressions.

Since there were no further test failures, I committed the attached
patch as r193061.

Thanks,
Sharad

[-- Attachment #2: opt_dump_group.6.patch --]
[-- Type: application/octet-stream, Size: 108224 bytes --]

2012-11-01  Sharad Singhai  <singhai@google.com>

	* doc/invoke.texi: Update -fopt-info documentation.
	* dumpfile.c: Move dump_flags here from passes.c.
	Rename opt_info_options to optinfo_verbosity_options.
	Add optgroup_options.
	(dump_files): Add field for optinfo_flags in the static initializer.
	(dump_register): Handle additional parameter for optgroup_flags.
	(opt_info_enable_passes): Renamed opt_info_enable_all. Handle
	optgroup_flags. Fix documentation.
	(opt_info_switch_p_1): Handle optgroup options.
	(opt_info_switch_p): Handle optgroup_flags. Warn on multiple files.
	* dumpfile.h (dump_register): Additional argument for optgroup_flags.
	All callers updated.
	(struct dump_file_info): Add field for optgroup_flags.
	Define OPTGROUP_* flags.
	* tree-pass.h (struct opt_pass): Add addtional field for optinfo_flags.
	All opt_pass static initializers updated.
	* opts-global.c (dump_remap_tree_vectorizer_verbose): Use 'all'
	instead of 'optall'.
	(handle_common_deferred_options): Fix typo in error message.
	* passes.c (register_one_dump_file): Add argument for optgroup_flags.
	Turn on OPTGROUP_IPA for IPA passes.
	Move dump_flags from here to dumpfile.c.
	* statistics.c (statistics_early_init): Use OPTGROUP_NONE in call to
	dump_register.

testsuite/ChangeLog

	* testsuite/gcc.dg/plugin/selfassign.c: Add opgtroup_flags initializer.
	* testsuite/gcc.dg/plugin/one_time_plugin.c: Likewise.
	* testsuite/g++.dg/plugin/selfassign.c: Likewise.
	* testsuite/g++.dg/plugin/dumb_plugin.c: Likewise.

Index: tree-vrp.c
===================================================================
--- tree-vrp.c	(revision 192991)
+++ tree-vrp.c	(working copy)
@@ -9234,6 +9234,7 @@ struct gimple_opt_pass pass_vrp =
  {
   GIMPLE_PASS,
   "vrp",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_vrp,				/* gate */
   execute_vrp,				/* execute */
   NULL,					/* sub */
Index: regrename.c
===================================================================
--- regrename.c	(revision 192991)
+++ regrename.c	(working copy)
@@ -1842,6 +1842,7 @@ struct rtl_opt_pass pass_regrename =
  {
   RTL_PASS,
   "rnreg",                              /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_regrename,                /* gate */
   regrename_optimize,                   /* execute */
   NULL,                                 /* sub */
Index: fwprop.c
===================================================================
--- fwprop.c	(revision 192991)
+++ fwprop.c	(working copy)
@@ -1486,6 +1486,7 @@ struct rtl_opt_pass pass_rtl_fwprop =
  {
   RTL_PASS,
   "fwprop1",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_fwprop,				/* gate */
   fwprop,				/* execute */
   NULL,                                 /* sub */
@@ -1535,6 +1536,7 @@ struct rtl_opt_pass pass_rtl_fwprop_addr =
  {
   RTL_PASS,
   "fwprop2",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_fwprop,				/* gate */
   fwprop_addr,				/* execute */
   NULL,                                 /* sub */
Index: doc/invoke.texi
===================================================================
--- doc/invoke.texi	(revision 192991)
+++ doc/invoke.texi	(working copy)
@@ -6021,59 +6021,109 @@ Enable all the available tree dumps with the flags
 @itemx -fopt-info-@var{options}
 @itemx -fopt-info-@var{options}=@var{filename}
 @opindex fopt-info
-Controls optimization dumps from all the passes. If the
+Controls optimization dumps from various optimization passes. If the
 @samp{-@var{options}} form is used, @var{options} is a list of
-@samp{-} separated options to control the dump details.  If
-@var{options} is not specified, it defaults to @option{optall}. If the
-@var{filename} is not specified, it defaults to @file{stderr}. Note
-that the output @var{filename} will be overwritten in case of multiple
-translation units. If a combined output from multiple translation
-units is desired, @file{stderr} should be used instead.
+@samp{-} separated options to select the dump details and
+optimizations.  If @var{options} is not specified, it defaults to
+@option{all} for details and @option{optall} for optimization
+groups. If the @var{filename} is not specified, it defaults to
+@file{stderr}. Note that the output @var{filename} will be overwritten
+in case of multiple translation units. If a combined output from
+multiple translation units is desired, @file{stderr} should be used
+instead.
 
-The following options are available
+The options can be divided into two groups, 1) options describing the
+verbosity of the dump, and 2) options describing which optimizations
+should be included. The options from both the groups can be freely
+mixed as they are non-overlapping. However, in case of any conflicts,
+the latter options override the earlier options on the command
+line. Though multiple -fopt-info options are accepted, only one of
+them can have @option{=filename}. If other filenames are provided then
+all but the first one are ignored.
 
+The dump verbosity has the following options
+
 @table @samp
 @item optimized
 Print information when an optimization is successfully applied. It is
 up to a pass to decide which information is relevant. For example, the
-vectorizer pass prints the location of loop which got vectorized.
+vectorizer passes print the source location of loops which got
+successfully vectorized.
 @item missed
 Print information about missed optimizations. Individual passes
-control which information to include in the output. For example,
+control which informations to include in the output. For example,
 
 @smallexample
-gcc -O2 -ftree-vectorize -fopt-info-missed
+gcc -O2 -ftree-vectorize -fopt-info-vec-missed
 @end smallexample
 
-will print information about missed optimization opportunities on
-stderr.
+will print information about missed optimization opportunities from
+vectorization passes on stderr.
 @item note
 Print verbose information about optimizations, such as certain
 transformations, more detailed messages about decisions etc.
-@item optall
+@item all
 Print detailed optimization information. This includes
-@var{optimized}, @var{missed}, and @var{note}. For example,
+@var{optimized}, @var{missed}, and @var{note}.
+@end table
 
+The second set of options describes a group of optimizations and may
+include one or more of the following.
+
+@table @samp
+@item ipa
+Enable dumps from all interprocedural optimizations.
+@item loop
+Enable dumps from all loop optimizations.
+@item inline
+Enable dumps from all inlining optimizations.
+@item vec
+Enable dumps from all vectorization optimizations.
+@end table
+
+For example,
 @smallexample
-gcc -O2 -ftree-vectorize -fopt-info-optall=opt.all
+gcc -O3 -fopt-info-missed=missed.all
 @end smallexample
 
-outputs detailed optimization report from all the passes into
-@file{opt.all}.
-@end table
+outputs missed optimization report from all the passes into
+@file{missed.all}.
 
-It applies the dump options to all the passes. If the @var{filename}
-is provided, the dump from all the passes is concatenated, otherwise
-the dump is output onto @file{stderr}. If @var{options} is omitted, it
-defaults to @option{optall}.
+As another example,
+@smallexample
+gcc -O3 -fopt-info-inline-optimized-missed=inline.txt
+@end smallexample
 
+will output information about missed optimizations as well as
+optimized locations from all the inlining passes into
+@file{inline.txt}.
+
+If the @var{filename} is provided, then the dumps from all the
+applicable optimizations are concatenated into the @file{filename}.
+Otherwise the dump is output onto @file{stderr}. If @var{options} is
+omitted, it defaults to @option{all-optall}, which means dump all
+available optimization info from all the passes. In the following
+example, all optimization info is output on to @file{stderr}.
+
 @smallexample
-gcc -O3 -fopt-info-optimized-missed=optdump.txt
+gcc -O3 -fopt-info
 @end smallexample
 
-This will output information about missed optimizations as well as
-optimized locations from all the passes into @file{optdump.txt}.
+Note that @option{-fopt-info-vec-missed} behaves the same as
+@option{-fopt-info-missed-vec}.
 
+As another example, consider
+
+@smallexample
+gcc -fopt-info-vec-missed=vec.miss -fopt-info-loop-optimized=loop.opt
+@end smallexample
+
+Here the two output filenames @file{vec.miss} and @file{loop.opt} are
+in conflict since only one output file is allowed. In this case, only
+the first option takes effect and the subsequent options are
+ignored. Thus only the @file{vec.miss} is produced which cotaints
+dumps from the vectorizer about missed opportunities.
+
 @item -ftree-vectorizer-verbose=@var{n}
 @opindex ftree-vectorizer-verbose
 This option is deprecated and is implemented in terms of
Index: tree-into-ssa.c
===================================================================
--- tree-into-ssa.c	(revision 192991)
+++ tree-into-ssa.c	(working copy)
@@ -2404,6 +2404,7 @@ struct gimple_opt_pass pass_build_ssa =
  {
   GIMPLE_PASS,
   "ssa",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   rewrite_into_ssa,			/* execute */
   NULL,					/* sub */
Index: tree-complex.c
===================================================================
--- tree-complex.c	(revision 192991)
+++ tree-complex.c	(working copy)
@@ -1608,6 +1608,7 @@ struct gimple_opt_pass pass_lower_complex =
  {
   GIMPLE_PASS,
   "cplxlower",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   0,					/* gate */
   tree_lower_complex,			/* execute */
   NULL,					/* sub */
@@ -1638,6 +1639,7 @@ struct gimple_opt_pass pass_lower_complex_O0 =
  {
   GIMPLE_PASS,
   "cplxlower0",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_no_optimization,			/* gate */
   tree_lower_complex,			/* execute */
   NULL,					/* sub */
Index: cgraphbuild.c
===================================================================
--- cgraphbuild.c	(revision 192991)
+++ cgraphbuild.c	(working copy)
@@ -370,6 +370,7 @@ struct gimple_opt_pass pass_build_cgraph_edges =
  {
   GIMPLE_PASS,
   "*build_cgraph_edges",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   build_cgraph_edges,			/* execute */
   NULL,					/* sub */
@@ -487,6 +488,7 @@ struct gimple_opt_pass pass_rebuild_cgraph_edges =
  {
   GIMPLE_PASS,
   "*rebuild_cgraph_edges",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   rebuild_cgraph_edges,			/* execute */
   NULL,					/* sub */
@@ -514,6 +516,7 @@ struct gimple_opt_pass pass_remove_cgraph_callee_e
  {
   GIMPLE_PASS,
   "*remove_cgraph_callee_edges",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   remove_cgraph_callee_edges,		/* execute */
   NULL,					/* sub */
Index: tree-ssa-uninit.c
===================================================================
--- tree-ssa-uninit.c	(revision 192991)
+++ tree-ssa-uninit.c	(working copy)
@@ -2037,6 +2037,7 @@ struct gimple_opt_pass pass_late_warn_uninitialize
  {
   GIMPLE_PASS,
   "uninit",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_warn_uninitialized,		/* gate */
   execute_late_warn_uninitialized,	/* execute */
   NULL,					/* sub */
Index: tracer.c
===================================================================
--- tracer.c	(revision 192991)
+++ tracer.c	(working copy)
@@ -403,6 +403,7 @@ struct gimple_opt_pass pass_tracer =
  {
   GIMPLE_PASS,
   "tracer",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_tracer,                          /* gate */
   tracer,                               /* execute */
   NULL,                                 /* sub */
Index: tree-loop-distribution.c
===================================================================
--- tree-loop-distribution.c	(revision 192991)
+++ tree-loop-distribution.c	(working copy)
@@ -1578,6 +1578,7 @@ struct gimple_opt_pass pass_loop_distribution =
  {
   GIMPLE_PASS,
   "ldist",			/* name */
+  OPTGROUP_LOOP,                /* optinfo_flags */
   gate_tree_loop_distribution,  /* gate */
   tree_loop_distribution,       /* execute */
   NULL,				/* sub */
Index: postreload-gcse.c
===================================================================
--- postreload-gcse.c	(revision 192991)
+++ postreload-gcse.c	(working copy)
@@ -1328,6 +1328,7 @@ struct rtl_opt_pass pass_gcse2 =
  {
   RTL_PASS,
   "gcse2",                              /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_gcse2,                    /* gate */
   rest_of_handle_gcse2,                 /* execute */
   NULL,                                 /* sub */
Index: dumpfile.c
===================================================================
--- dumpfile.c	(revision 192991)
+++ dumpfile.c	(working copy)
@@ -43,34 +43,35 @@ static FILE *dump_open_alternate_stream (struct du
 FILE *dump_file = NULL;
 FILE *alt_dump_file = NULL;
 const char *dump_file_name;
+int dump_flags;
 
 /* Table of tree dump switches. This must be consistent with the
    TREE_DUMP_INDEX enumeration in dumpfile.h.  */
 static struct dump_file_info dump_files[TDI_end] =
 {
-  {NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0},
+  {NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0},
   {".cgraph", "ipa-cgraph", NULL, NULL, NULL, NULL, NULL, TDF_IPA,
-   0, 0, 0, 0},
+   0, 0, 0, 0, 0},
   {".tu", "translation-unit", NULL, NULL, NULL, NULL, NULL, TDF_TREE,
-   0, 0, 0, 1},
+   0, 0, 0, 0, 1},
   {".class", "class-hierarchy", NULL, NULL, NULL, NULL, NULL, TDF_TREE,
-   0, 0, 0, 2},
+   0, 0, 0, 0, 2},
   {".original", "tree-original", NULL, NULL, NULL, NULL, NULL, TDF_TREE,
-   0, 0, 0, 3},
+   0, 0, 0, 0, 3},
   {".gimple", "tree-gimple", NULL, NULL, NULL, NULL, NULL, TDF_TREE,
-   0, 0, 0, 4},
+   0, 0, 0, 0, 4},
   {".nested", "tree-nested", NULL, NULL, NULL, NULL, NULL, TDF_TREE,
-   0, 0, 0, 5},
+   0, 0, 0, 0, 5},
   {".vcg", "tree-vcg", NULL, NULL, NULL, NULL, NULL, TDF_TREE,
-   0, 0, 0, 6},
+   0, 0, 0, 0, 6},
 #define FIRST_AUTO_NUMBERED_DUMP 7
 
   {NULL, "tree-all", NULL, NULL, NULL, NULL, NULL, TDF_TREE,
-   0, 0, 0, 0},
+   0, 0, 0, 0, 0},
   {NULL, "rtl-all", NULL, NULL, NULL, NULL, NULL, TDF_RTL,
-   0, 0, 0, 0},
+   0, 0, 0, 0, 0},
   {NULL, "ipa-all", NULL, NULL, NULL, NULL, NULL, TDF_IPA,
-   0, 0, 0, 0},
+   0, 0, 0, 0, 0},
 };
 
 /* Dynamically registered tree dump files and switches.  */
@@ -117,24 +118,32 @@ static const struct dump_option_value_info dump_op
   {NULL, 0}
 };
 
-/* A subset of the dump_options table which is used for opt-info
-   options. This must be consistent with the MSG_* flags in
-   dump_options.
+/* A subset of the dump_options table which is used for -fopt-info
+   types. This must be consistent with the MSG_* flags in dumpfile.h.
  */
-static const struct dump_option_value_info opt_info_options[] =
+static const struct dump_option_value_info optinfo_verbosity_options[] =
 {
   {"optimized", MSG_OPTIMIZED_LOCATIONS},
   {"missed", MSG_MISSED_OPTIMIZATION},
   {"note", MSG_NOTE},
-  {"optall", (MSG_OPTIMIZED_LOCATIONS
-           | MSG_MISSED_OPTIMIZATION
-           | MSG_NOTE)},
+  {"all", MSG_ALL},
   {NULL, 0}
 };
 
+/* Flags used for -fopt-info groups.  */
+static const struct dump_option_value_info optgroup_options[] =
+{
+  {"ipa", OPTGROUP_IPA},
+  {"loop", OPTGROUP_LOOP},
+  {"inline", OPTGROUP_INLINE},
+  {"vec", OPTGROUP_VEC},
+  {"optall", OPTGROUP_ALL},
+  {NULL, 0}
+};
+
 unsigned int
 dump_register (const char *suffix, const char *swtch, const char *glob,
-	       int flags)
+	       int flags, int optgroup_flags)
 {
   static int next_dump = FIRST_AUTO_NUMBERED_DUMP;
   int num = next_dump++;
@@ -157,6 +166,7 @@ dump_register (const char *suffix, const char *swt
   extra_dump_files[count].swtch = swtch;
   extra_dump_files[count].glob = glob;
   extra_dump_files[count].pflags = flags;
+  extra_dump_files[count].optgroup_flags = optgroup_flags;
   extra_dump_files[count].num = num;
 
   return count + TDI_end;
@@ -376,8 +386,8 @@ dump_printf_loc (int dump_kind, source_location lo
 /* Start a dump for PHASE. Store user-supplied dump flags in
    *FLAG_PTR.  Return the number of streams opened.  Set globals
    DUMP_FILE, and ALT_DUMP_FILE to point to the opened streams, and
-   set dump_flags appropriately for both pass dump stream and opt-info
-   stream. */
+   set dump_flags appropriately for both pass dump stream and
+   -fopt-info stream. */
 
 int
 dump_start (int phase, int *flag_ptr)
@@ -418,7 +428,7 @@ dump_start (int phase, int *flag_ptr)
       dfi->alt_stream = stream;
       count++;
       alt_dump_file = dfi->alt_stream;
-      /* Initialize current opt-info flags. */
+      /* Initialize current -fopt-info flags. */
       alt_flags = dfi->alt_flags;
     }
 
@@ -603,18 +613,19 @@ dump_enable_all (int flags, const char *filename)
   return n;
 }
 
-/* Enable opt-info dumps on all IR_DUMP_TYPE passes with FLAGS on
-   FILENAME.  Return the number of enabled dumps.  */
+/* Enable -fopt-info dumps on all dump files matching OPTGROUP_FLAGS.
+   Enable dumps with FLAGS on FILENAME.  Return the number of enabled
+   dumps.  */
 
 static int
-opt_info_enable_all (int ir_dump_type, int flags, const char *filename)
+opt_info_enable_passes (int optgroup_flags, int flags, const char *filename)
 {
   int n = 0;
   size_t i;
 
   for (i = TDI_none + 1; i < (size_t) TDI_end; i++)
     {
-      if ((dump_files[i].pflags & ir_dump_type))
+      if ((dump_files[i].optgroup_flags & optgroup_flags))
         {
           const char *old_filename = dump_files[i].alt_filename;
           /* Since this file is shared among different passes, it
@@ -632,7 +643,7 @@ static int
 
   for (i = 0; i < extra_dump_files_in_use; i++)
     {
-      if ((extra_dump_files[i].pflags & ir_dump_type))
+      if ((extra_dump_files[i].optgroup_flags & optgroup_flags))
         {
           const char *old_filename = extra_dump_files[i].alt_filename;
           /* Since this file is shared among different passes, it
@@ -753,11 +764,12 @@ dump_switch_p (const char *arg)
   return any;
 }
 
-/* Parse ARG as a -fopt-info switch and store flags and filename.
-   Return non-zero if it is a recognized switch.  */
+/* Parse ARG as a -fopt-info switch and store flags, optgroup_flags
+   and filename.  Return non-zero if it is a recognized switch.  */
 
 static int
-opt_info_switch_p_1 (const char *arg, int *flags, char **filename)
+opt_info_switch_p_1 (const char *arg, int *flags, int *optgroup_flags,
+                     char **filename)
 {
   const char *option_value;
   const char *ptr;
@@ -767,9 +779,10 @@ static int
 
   *filename = NULL;
   *flags = 0;
+  *optgroup_flags = 0;
 
   if (!ptr)
-    return 1;
+    return 1;       /* Handle '-fopt-info' without any additional options.  */
 
   while (*ptr)
     {
@@ -790,7 +803,8 @@ static int
 	end_ptr = ptr + strlen (ptr);
       length = end_ptr - ptr;
 
-      for (option_ptr = opt_info_options; option_ptr->name; option_ptr++)
+      for (option_ptr = optinfo_verbosity_options; option_ptr->name;
+           option_ptr++)
 	if (strlen (option_ptr->name) == length
 	    && !memcmp (option_ptr->name, ptr, length))
           {
@@ -798,6 +812,14 @@ static int
 	    goto found;
           }
 
+      for (option_ptr = optgroup_options; option_ptr->name; option_ptr++)
+	if (strlen (option_ptr->name) == length
+	    && !memcmp (option_ptr->name, ptr, length))
+          {
+            *optgroup_flags |= option_ptr->value;
+	    goto found;
+          }
+
       if (*ptr == '=')
         {
           /* Interpret rest of the argument as a dump filename.  This
@@ -806,8 +828,11 @@ static int
           break;
         }
       else
-        warning (0, "ignoring unknown option %q.*s in %<-fopt-info=%s%>",
-                 length, ptr, arg);
+        {
+          warning (0, "unknown option %q.*s in %<-fopt-info-%s%>",
+                   length, ptr, arg);
+          return 0;
+        }
     found:;
       ptr = end_ptr;
     }
@@ -822,16 +847,31 @@ int
 opt_info_switch_p (const char *arg)
 {
   int flags;
+  int optgroup_flags;
   char *filename;
+  static char *file_seen = NULL;
 
-  opt_info_switch_p_1 (arg, &flags, &filename);
+  if (!opt_info_switch_p_1 (arg, &flags, &optgroup_flags, &filename))
+    return 0;
 
   if (!filename)
     filename = xstrdup ("stderr");
+
+  /* Bail out if a different filename has been specified.  */
+  if (file_seen && strcmp (file_seen, filename))
+    {
+      warning (0, "ignoring possibly conflicting option %<-fopt-info-%s%>",
+               arg);
+      return 1;
+    }
+
+  file_seen = xstrdup (filename);
   if (!flags)
     flags = MSG_ALL;
+  if (!optgroup_flags)
+    optgroup_flags = OPTGROUP_ALL;
 
-  return opt_info_enable_all ((TDF_TREE | TDF_RTL | TDF_IPA), flags, filename);
+  return opt_info_enable_passes (optgroup_flags, flags, filename);
 }
 
 /* Print basic block on the dump streams.  */
Index: dumpfile.h
===================================================================
--- dumpfile.h	(revision 192991)
+++ dumpfile.h	(working copy)
@@ -25,7 +25,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "line-map.h"
 
 /* Different tree dump places.  When you add new tree dump places,
-   extend the DUMP_FILES array in tree-dump.c.  */
+   extend the DUMP_FILES array in dumpfile.c.  */
 enum tree_dump_index
 {
   TDI_none,			/* No dump */
@@ -46,9 +46,9 @@ enum tree_dump_index
 
 /* Bit masks to control dumping. Not all values are applicable to all
    dumps. Add new ones at the end. When you define new values, extend
-   the DUMP_OPTIONS array in tree-dump.c. The TDF_* flags coexist with
-   MSG_* flags (for -fopt-info) and the bit values must be chosen
-   to allow that.  */
+   the DUMP_OPTIONS array in dumpfile.c. The TDF_* flags coexist with
+   MSG_* flags (for -fopt-info) and the bit values must be chosen to
+   allow that.  */
 #define TDF_ADDRESS	(1 << 0)	/* dump node addresses */
 #define TDF_SLIM	(1 << 1)	/* don't go wild following links */
 #define TDF_RAW  	(1 << 2)	/* don't unparse the function */
@@ -91,6 +91,18 @@ enum tree_dump_index
 #define MSG_ALL         (MSG_OPTIMIZED_LOCATIONS | MSG_MISSED_OPTIMIZATION \
                          | MSG_NOTE)
 
+
+/* Flags to control high-level -fopt-info dumps.  Usually these flags
+   define a group of passes.  An optimization pass can be part of
+   multiple groups.  */
+#define OPTGROUP_NONE        (0)
+#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_ALL	     (OPTGROUP_IPA | OPTGROUP_LOOP | OPTGROUP_INLINE \
+                              | OPTGROUP_VEC)
+
 /* Define a tree dump switch.  */
 struct dump_file_info
 {
@@ -98,13 +110,14 @@ struct dump_file_info
   const char *swtch;            /* command line dump switch */
   const char *glob;             /* command line glob  */
   const char *pfilename;        /* filename for the pass-specific stream  */
-  const char *alt_filename;     /* filename for the opt-info stream  */
+  const char *alt_filename;     /* filename for the -fopt-info stream  */
   FILE *pstream;                /* pass-specific dump stream  */
-  FILE *alt_stream;             /* opt-info stream */
+  FILE *alt_stream;             /* -fopt-info stream */
+  int optgroup_flags;           /* optgroup flags for -fopt-info */
   int pflags;                   /* dump flags */
   int alt_flags;                /* flags for opt-info */
   int pstate;                   /* state of pass-specific stream */
-  int alt_state;                /* state of the opt-info stream */
+  int alt_state;                /* state of the -fopt-info stream */
   int num;                      /* dump file number */
 };
 
@@ -129,7 +142,7 @@ extern void dump_gimple_stmt_loc (int, source_loca
 extern void dump_gimple_stmt (int, int, gimple, int);
 extern void print_combine_total_stats (void);
 extern unsigned int dump_register (const char *, const char *, const char *,
-                                   int);
+                                   int, int);
 extern bool enable_rtl_dump_file (void);
 
 /* In combine.c  */
@@ -146,8 +159,7 @@ extern const char *dump_file_name;
 /* Return the dump_file_info for the given phase.  */
 extern struct dump_file_info *get_dump_file_info (int);
 
-/* Return true if any of the dumps are enabled, false otherwise. */
-
+/* Return true if any of the dumps is enabled, false otherwise. */
 static inline bool
 dump_enabled_p (void)
 {
Index: postreload.c
===================================================================
--- postreload.c	(revision 192991)
+++ postreload.c	(working copy)
@@ -2289,6 +2289,7 @@ struct rtl_opt_pass pass_postreload_cse =
  {
   RTL_PASS,
   "postreload",                         /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_postreload,               /* gate */
   rest_of_handle_postreload,            /* execute */
   NULL,                                 /* sub */
Index: tree-ssa-loop-ch.c
===================================================================
--- tree-ssa-loop-ch.c	(revision 192991)
+++ tree-ssa-loop-ch.c	(working copy)
@@ -260,6 +260,7 @@ struct gimple_opt_pass pass_ch =
  {
   GIMPLE_PASS,
   "ch",					/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_ch,				/* gate */
   copy_loop_headers,			/* execute */
   NULL,					/* sub */
Index: tree-tailcall.c
===================================================================
--- tree-tailcall.c	(revision 192991)
+++ tree-tailcall.c	(working copy)
@@ -1048,6 +1048,7 @@ struct gimple_opt_pass pass_tail_recursion =
  {
   GIMPLE_PASS,
   "tailr",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_tail_calls,			/* gate */
   execute_tail_recursion,		/* execute */
   NULL,					/* sub */
@@ -1067,6 +1068,7 @@ struct gimple_opt_pass pass_tail_calls =
  {
   GIMPLE_PASS,
   "tailc",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_tail_calls,			/* gate */
   execute_tail_calls,			/* execute */
   NULL,					/* sub */
Index: tree-ssa-strlen.c
===================================================================
--- tree-ssa-strlen.c	(revision 192991)
+++ tree-ssa-strlen.c	(working copy)
@@ -2016,6 +2016,7 @@ struct gimple_opt_pass pass_strlen =
  {
   GIMPLE_PASS,
   "strlen",			/* name */
+  OPTGROUP_NONE,                /* optinfo_flags */
   gate_strlen,			/* gate */
   tree_ssa_strlen,		/* execute */
   NULL,				/* sub */
Index: tree.c
===================================================================
--- tree.c	(revision 192991)
+++ tree.c	(working copy)
@@ -5292,6 +5292,7 @@ struct simple_ipa_opt_pass pass_ipa_free_lang_data
  {
   SIMPLE_IPA_PASS,
   "*free_lang_data",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   free_lang_data,			/* execute */
   NULL,					/* sub */
Index: tree-pass.h
===================================================================
--- tree-pass.h	(revision 192991)
+++ tree-pass.h	(working copy)
@@ -46,6 +46,9 @@ struct opt_pass
      name.  If the name starts with a star, no dump happens. */
   const char *name;
 
+  /* The -fopt-info optimization group flags as defined in dumpfile.h. */
+  unsigned int optinfo_flags;
+
   /* If non-null, this pass and all sub-passes are executed only if
      the function returns true.  */
   bool (*gate) (void);
Index: ipa-cp.c
===================================================================
--- ipa-cp.c	(revision 192991)
+++ ipa-cp.c	(working copy)
@@ -2543,6 +2543,7 @@ struct ipa_opt_pass_d pass_ipa_cp =
  {
   IPA_PASS,
   "cp",				/* name */
+  OPTGROUP_NONE,                /* optinfo_flags */
   cgraph_gate_cp,		/* gate */
   ipcp_driver,			/* execute */
   NULL,				/* sub */
Index: final.c
===================================================================
--- final.c	(revision 192991)
+++ final.c	(working copy)
@@ -822,6 +822,7 @@ struct rtl_opt_pass pass_compute_alignments =
  {
   RTL_PASS,
   "alignments",                         /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   compute_alignments,                   /* execute */
   NULL,                                 /* sub */
@@ -4373,6 +4374,7 @@ struct rtl_opt_pass pass_final =
  {
   RTL_PASS,
   "final",                              /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_handle_final,                 /* execute */
   NULL,                                 /* sub */
@@ -4401,6 +4403,7 @@ struct rtl_opt_pass pass_shorten_branches =
  {
   RTL_PASS,
   "shorten",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_handle_shorten_branches,      /* execute */
   NULL,                                 /* sub */
@@ -4547,6 +4550,7 @@ struct rtl_opt_pass pass_clean_state =
  {
   RTL_PASS,
   "*clean_state",                       /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_clean_state,                  /* execute */
   NULL,                                 /* sub */
Index: tree-emutls.c
===================================================================
--- tree-emutls.c	(revision 192991)
+++ tree-emutls.c	(working copy)
@@ -815,6 +815,7 @@ struct simple_ipa_opt_pass pass_ipa_lower_emutls =
  {
   SIMPLE_IPA_PASS,
   "emutls",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_emutls,				/* gate */
   ipa_lower_emutls,			/* execute */
   NULL,                                 /* sub */
Index: omp-low.c
===================================================================
--- omp-low.c	(revision 192991)
+++ omp-low.c	(working copy)
@@ -5753,6 +5753,7 @@ struct gimple_opt_pass pass_expand_omp =
  {
   GIMPLE_PASS,
   "ompexp",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_expand_omp,			/* gate */
   execute_expand_omp,			/* execute */
   NULL,					/* sub */
@@ -6927,6 +6928,7 @@ struct gimple_opt_pass pass_lower_omp =
  {
   GIMPLE_PASS,
   "omplower",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_lower_omp,			/* execute */
   NULL,					/* sub */
@@ -7190,6 +7192,7 @@ struct gimple_opt_pass pass_diagnose_omp_blocks =
   {
     GIMPLE_PASS,
     "*diagnose_omp_blocks",		/* name */
+    OPTGROUP_NONE,                      /* optinfo_flags */
     gate_diagnose_omp_blocks,		/* gate */
     diagnose_omp_structured_block_errors,	/* execute */
     NULL,				/* sub */
Index: tree-ssa-dse.c
===================================================================
--- tree-ssa-dse.c	(revision 192991)
+++ tree-ssa-dse.c	(working copy)
@@ -356,6 +356,7 @@ struct gimple_opt_pass pass_dse =
  {
   GIMPLE_PASS,
   "dse",			/* name */
+  OPTGROUP_NONE,                /* optinfo_flags */
   gate_dse,			/* gate */
   tree_ssa_dse,			/* execute */
   NULL,				/* sub */
Index: ipa-reference.c
===================================================================
--- ipa-reference.c	(revision 192991)
+++ ipa-reference.c	(working copy)
@@ -1185,6 +1185,7 @@ struct ipa_opt_pass_d pass_ipa_reference =
  {
   IPA_PASS,
   "static-var",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_reference,			/* gate */
   propagate,			        /* execute */
   NULL,					/* sub */
Index: tree-ssa-uncprop.c
===================================================================
--- tree-ssa-uncprop.c	(revision 192991)
+++ tree-ssa-uncprop.c	(working copy)
@@ -585,6 +585,7 @@ struct gimple_opt_pass pass_uncprop =
  {
   GIMPLE_PASS,
   "uncprop",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_uncprop,				/* gate */
   tree_ssa_uncprop,			/* execute */
   NULL,					/* sub */
Index: auto-inc-dec.c
===================================================================
--- auto-inc-dec.c	(revision 192991)
+++ auto-inc-dec.c	(working copy)
@@ -1511,6 +1511,7 @@ struct rtl_opt_pass pass_inc_dec =
  {
   RTL_PASS,
   "auto_inc_dec",                       /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_auto_inc_dec,                    /* gate */
   rest_of_handle_auto_inc_dec,          /* execute */
   NULL,                                 /* sub */
Index: reorg.c
===================================================================
--- reorg.c	(revision 192991)
+++ reorg.c	(working copy)
@@ -4122,6 +4122,7 @@ struct rtl_opt_pass pass_delay_slots =
  {
   RTL_PASS,
   "dbr",                                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_delay_slots,              /* gate */
   rest_of_handle_delay_slots,           /* execute */
   NULL,                                 /* sub */
@@ -4156,6 +4157,7 @@ struct rtl_opt_pass pass_machine_reorg =
  {
   RTL_PASS,
   "mach",                               /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_machine_reorg,            /* gate */
   rest_of_handle_machine_reorg,         /* execute */
   NULL,                                 /* sub */
Index: testsuite/gcc.dg/plugin/selfassign.c
===================================================================
--- testsuite/gcc.dg/plugin/selfassign.c	(revision 192991)
+++ testsuite/gcc.dg/plugin/selfassign.c	(working copy)
@@ -268,6 +268,7 @@ static struct gimple_opt_pass pass_warn_self_assig
   {
     GIMPLE_PASS,
     "warn_self_assign",                   /* name */
+    OPTGROUP_NONE,                        /* optinfo_flags */
     gate_warn_self_assign,                /* gate */
     execute_warn_self_assign,             /* execute */
     NULL,                                 /* sub */
Index: testsuite/gcc.dg/plugin/one_time_plugin.c
===================================================================
--- testsuite/gcc.dg/plugin/one_time_plugin.c	(revision 192991)
+++ testsuite/gcc.dg/plugin/one_time_plugin.c	(working copy)
@@ -32,6 +32,7 @@ struct gimple_opt_pass one_pass =
   {
   GIMPLE_PASS,
   "cfg",                           /* name */
+  OPTGROUP_NONE,                         /* optinfo_flags */
   one_pass_gate,                         /* gate */
   one_pass_exec,       /* execute */
   NULL,                                 /* sub */
Index: testsuite/g++.dg/plugin/selfassign.c
===================================================================
--- testsuite/g++.dg/plugin/selfassign.c	(revision 192991)
+++ testsuite/g++.dg/plugin/selfassign.c	(working copy)
@@ -268,6 +268,7 @@ static struct gimple_opt_pass pass_warn_self_assig
   {
     GIMPLE_PASS,
     "warn_self_assign",                   /* name */
+    OPTGROUP_NONE,                        /* optinfo_flags */
     gate_warn_self_assign,                /* gate */
     execute_warn_self_assign,             /* execute */
     NULL,                                 /* sub */
Index: testsuite/g++.dg/plugin/dumb_plugin.c
===================================================================
--- testsuite/g++.dg/plugin/dumb_plugin.c	(revision 192991)
+++ testsuite/g++.dg/plugin/dumb_plugin.c	(working copy)
@@ -62,6 +62,7 @@ static struct gimple_opt_pass pass_dumb_plugin_exa
   {
     GIMPLE_PASS,
     "dumb_plugin_example",                /* name */
+    OPTGROUP_NONE,                        /* optinfo_flags */
     gate_dumb_plugin_example,             /* gate */
     execute_dumb_plugin_example,          /* execute */
     NULL,                                 /* sub */
Index: tree-ssa-copyrename.c
===================================================================
--- tree-ssa-copyrename.c	(revision 192991)
+++ tree-ssa-copyrename.c	(working copy)
@@ -443,6 +443,7 @@ struct gimple_opt_pass pass_rename_ssa_copies =
  {
   GIMPLE_PASS,
   "copyrename",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_copyrename,			/* gate */
   rename_ssa_copies,			/* execute */
   NULL,					/* sub */
Index: tree-ssa-ccp.c
===================================================================
--- tree-ssa-ccp.c	(revision 192991)
+++ tree-ssa-ccp.c	(working copy)
@@ -2123,6 +2123,7 @@ struct gimple_opt_pass pass_ccp =
  {
   GIMPLE_PASS,
   "ccp",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_ccp,				/* gate */
   do_ssa_ccp,				/* execute */
   NULL,					/* sub */
@@ -2507,6 +2508,7 @@ struct gimple_opt_pass pass_fold_builtins =
  {
   GIMPLE_PASS,
   "fab",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_fold_all_builtins,		/* execute */
   NULL,					/* sub */
Index: compare-elim.c
===================================================================
--- compare-elim.c	(revision 192991)
+++ compare-elim.c	(working copy)
@@ -660,6 +660,7 @@ struct rtl_opt_pass pass_compare_elim_after_reload
  {
   RTL_PASS,
   "cmpelim",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_compare_elim_after_reload,	/* gate */
   execute_compare_elim_after_reload,	/* execute */
   NULL,					/* sub */
Index: df-core.c
===================================================================
--- df-core.c	(revision 192991)
+++ df-core.c	(working copy)
@@ -754,6 +754,7 @@ struct rtl_opt_pass pass_df_initialize_opt =
  {
   RTL_PASS,
   "dfinit",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_opt,                             /* gate */
   rest_of_handle_df_initialize,         /* execute */
   NULL,                                 /* sub */
@@ -781,6 +782,7 @@ struct rtl_opt_pass pass_df_initialize_no_opt =
  {
   RTL_PASS,
   "no-opt dfinit",                      /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_no_opt,                          /* gate */
   rest_of_handle_df_initialize,         /* execute */
   NULL,                                 /* sub */
@@ -828,6 +830,7 @@ struct rtl_opt_pass pass_df_finish =
  {
   RTL_PASS,
   "dfinish",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   rest_of_handle_df_finish,             /* execute */
   NULL,                                 /* sub */
Index: mode-switching.c
===================================================================
--- mode-switching.c	(revision 192991)
+++ mode-switching.c	(working copy)
@@ -763,6 +763,7 @@ struct rtl_opt_pass pass_mode_switching =
  {
   RTL_PASS,
   "mode_sw",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_mode_switching,                  /* gate */
   rest_of_handle_mode_switching,        /* execute */
   NULL,                                 /* sub */
Index: tree-nomudflap.c
===================================================================
--- tree-nomudflap.c	(revision 192991)
+++ tree-nomudflap.c	(working copy)
@@ -91,6 +91,7 @@ struct gimple_opt_pass pass_mudflap_1 =
  {
   GIMPLE_PASS,
   "mudflap1",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_mudflap,                         /* gate */
   NULL,					/* execute */
   NULL,					/* sub */
@@ -110,6 +111,7 @@ struct gimple_opt_pass pass_mudflap_2 =
  {
   GIMPLE_PASS,
   "mudflap2",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_mudflap,                         /* gate */
   NULL,					/* execute */
   NULL,					/* sub */
Index: modulo-sched.c
===================================================================
--- modulo-sched.c	(revision 192991)
+++ modulo-sched.c	(working copy)
@@ -3364,6 +3364,7 @@ struct rtl_opt_pass pass_sms =
  {
   RTL_PASS,
   "sms",                                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_sms,                      /* gate */
   rest_of_handle_sms,                   /* execute */
   NULL,                                 /* sub */
Index: tree-call-cdce.c
===================================================================
--- tree-call-cdce.c	(revision 192991)
+++ tree-call-cdce.c	(working copy)
@@ -920,6 +920,7 @@ struct gimple_opt_pass pass_call_cdce =
  {
   GIMPLE_PASS,
   "cdce",                               /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_call_cdce,                       /* gate */
   tree_call_cdce,                       /* execute */
   NULL,                                 /* sub */
Index: ipa-pure-const.c
===================================================================
--- ipa-pure-const.c	(revision 192991)
+++ ipa-pure-const.c	(working copy)
@@ -1497,6 +1497,7 @@ struct ipa_opt_pass_d pass_ipa_pure_const =
  {
   IPA_PASS,
   "pure-const",		                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_pure_const,			/* gate */
   propagate,			        /* execute */
   NULL,					/* sub */
@@ -1662,6 +1663,7 @@ struct gimple_opt_pass pass_local_pure_const =
  {
   GIMPLE_PASS,
   "local-pure-const",	                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_pure_const,			/* gate */
   local_pure_const,		        /* execute */
   NULL,					/* sub */
Index: cse.c
===================================================================
--- cse.c	(revision 192991)
+++ cse.c	(working copy)
@@ -7456,6 +7456,7 @@ struct rtl_opt_pass pass_cse =
  {
   RTL_PASS,
   "cse1",                               /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_cse,                      /* gate */
   rest_of_handle_cse,			/* execute */
   NULL,                                 /* sub */
@@ -7518,6 +7519,7 @@ struct rtl_opt_pass pass_cse2 =
  {
   RTL_PASS,
   "cse2",                               /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_cse2,                     /* gate */
   rest_of_handle_cse2,			/* execute */
   NULL,                                 /* sub */
@@ -7578,6 +7580,7 @@ struct rtl_opt_pass pass_cse_after_global_opts =
  {
   RTL_PASS,
   "cse_local",                          /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_cse_after_global_opts,    /* gate */
   rest_of_handle_cse_after_global_opts, /* execute */
   NULL,                                 /* sub */
Index: web.c
===================================================================
--- web.c	(revision 192991)
+++ web.c	(working copy)
@@ -445,6 +445,7 @@ struct rtl_opt_pass pass_web =
  {
   RTL_PASS,
   "web",                                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_web,                      /* gate */
   web_main,		                /* execute */
   NULL,                                 /* sub */
Index: tree-stdarg.c
===================================================================
--- tree-stdarg.c	(revision 192991)
+++ tree-stdarg.c	(working copy)
@@ -960,6 +960,7 @@ struct gimple_opt_pass pass_stdarg =
  {
   GIMPLE_PASS,
   "stdarg",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_optimize_stdarg,			/* gate */
   execute_optimize_stdarg,		/* execute */
   NULL,					/* sub */
Index: lto-streamer-out.c
===================================================================
--- lto-streamer-out.c	(revision 192991)
+++ lto-streamer-out.c	(working copy)
@@ -1011,6 +1011,7 @@ struct ipa_opt_pass_d pass_ipa_lto_gimple_out =
  {
   IPA_PASS,
   "lto_gimple_out",	                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_lto_out,			        /* gate */
   NULL,		                	/* execute */
   NULL,					/* sub */
@@ -1426,6 +1427,7 @@ struct ipa_opt_pass_d pass_ipa_lto_finish_out =
  {
   IPA_PASS,
   "lto_decls_out",	                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_lto_out,			        /* gate */
   NULL,        	                        /* execute */
   NULL,					/* sub */
Index: tree-ssa-math-opts.c
===================================================================
--- tree-ssa-math-opts.c	(revision 192991)
+++ tree-ssa-math-opts.c	(working copy)
@@ -642,6 +642,7 @@ struct gimple_opt_pass pass_cse_reciprocals =
  {
   GIMPLE_PASS,
   "recip",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_cse_reciprocals,			/* gate */
   execute_cse_reciprocals,		/* execute */
   NULL,					/* sub */
@@ -1505,6 +1506,7 @@ struct gimple_opt_pass pass_cse_sincos =
  {
   GIMPLE_PASS,
   "sincos",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_cse_sincos,			/* gate */
   execute_cse_sincos,			/* execute */
   NULL,					/* sub */
@@ -1977,6 +1979,7 @@ struct gimple_opt_pass pass_optimize_bswap =
  {
   GIMPLE_PASS,
   "bswap",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_optimize_bswap,                  /* gate */
   execute_optimize_bswap,		/* execute */
   NULL,					/* sub */
@@ -2741,6 +2744,7 @@ struct gimple_opt_pass pass_optimize_widening_mul
  {
   GIMPLE_PASS,
   "widening_mul",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_optimize_widening_mul,		/* gate */
   execute_optimize_widening_mul,	/* execute */
   NULL,					/* sub */
Index: tree-ssa-dom.c
===================================================================
--- tree-ssa-dom.c	(revision 192991)
+++ tree-ssa-dom.c	(working copy)
@@ -861,6 +861,7 @@ struct gimple_opt_pass pass_dominator =
  {
   GIMPLE_PASS,
   "dom",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_dominator,			/* gate */
   tree_ssa_dominator_optimize,		/* execute */
   NULL,					/* sub */
@@ -3033,6 +3034,7 @@ struct gimple_opt_pass pass_phi_only_cprop =
  {
   GIMPLE_PASS,
   "phicprop",                           /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_dominator,                       /* gate */
   eliminate_degenerate_phis,            /* execute */
   NULL,                                 /* sub */
Index: tree-nrv.c
===================================================================
--- tree-nrv.c	(revision 192991)
+++ tree-nrv.c	(working copy)
@@ -275,6 +275,7 @@ struct gimple_opt_pass pass_nrv =
  {
   GIMPLE_PASS,
   "nrv",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_pass_return_slot,		/* gate */
   tree_nrv,				/* execute */
   NULL,					/* sub */
@@ -360,6 +361,7 @@ struct gimple_opt_pass pass_return_slot =
  {
   GIMPLE_PASS,
   "retslot",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_return_slot_opt,		/* execute */
   NULL,					/* sub */
Index: loop-init.c
===================================================================
--- loop-init.c	(revision 192991)
+++ loop-init.c	(working copy)
@@ -189,6 +189,7 @@ struct rtl_opt_pass pass_loop2 =
  {
   RTL_PASS,
   "loop2",                              /* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_handle_loop2, 		        /* gate */
   NULL,                                 /* execute */
   NULL,                                 /* sub */
@@ -225,6 +226,7 @@ struct rtl_opt_pass pass_rtl_loop_init =
  {
   RTL_PASS,
   "loop2_init",                           /* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rtl_loop_init,                        /* execute */
   NULL,                                 /* sub */
@@ -265,6 +267,7 @@ struct rtl_opt_pass pass_rtl_loop_done =
  {
   RTL_PASS,
   "loop2_done",                          /* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rtl_loop_done,                        /* execute */
   NULL,                                 /* sub */
@@ -301,6 +304,7 @@ struct rtl_opt_pass pass_rtl_move_loop_invariants
  {
   RTL_PASS,
   "loop2_invariant",                    /* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_rtl_move_loop_invariants,        /* gate */
   rtl_move_loop_invariants,             /* execute */
   NULL,                                 /* sub */
@@ -337,6 +341,7 @@ struct rtl_opt_pass pass_rtl_unswitch =
  {
   RTL_PASS,
   "loop2_unswitch",                      /* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_rtl_unswitch,                    /* gate */
   rtl_unswitch,                         /* execute */
   NULL,                                 /* sub */
@@ -385,6 +390,7 @@ struct rtl_opt_pass pass_rtl_unroll_and_peel_loops
  {
   RTL_PASS,
   "loop2_unroll",                        /* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_rtl_unroll_and_peel_loops,       /* gate */
   rtl_unroll_and_peel_loops,            /* execute */
   NULL,                                 /* sub */
@@ -426,6 +432,7 @@ struct rtl_opt_pass pass_rtl_doloop =
  {
   RTL_PASS,
   "loop2_doloop",                        /* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_rtl_doloop,                      /* gate */
   rtl_doloop,                           /* execute */
   NULL,                                 /* sub */
Index: gimple-low.c
===================================================================
--- gimple-low.c	(revision 192991)
+++ gimple-low.c	(working copy)
@@ -194,6 +194,7 @@ struct gimple_opt_pass pass_lower_cf =
  {
   GIMPLE_PASS,
   "lower",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   lower_function_body,			/* execute */
   NULL,					/* sub */
Index: ipa-inline.c
===================================================================
--- ipa-inline.c	(revision 192991)
+++ ipa-inline.c	(working copy)
@@ -2007,6 +2007,7 @@ struct gimple_opt_pass pass_early_inline =
  {
   GIMPLE_PASS,
   "einline",	 			/* name */
+  OPTGROUP_INLINE,                      /* optinfo_flags */
   NULL,					/* gate */
   early_inliner,			/* execute */
   NULL,					/* sub */
@@ -2039,6 +2040,7 @@ struct ipa_opt_pass_d pass_ipa_inline =
  {
   IPA_PASS,
   "inline",				/* name */
+  OPTGROUP_INLINE,                      /* optinfo_flags */
   gate_ipa_inline,			/* gate */
   ipa_inline,				/* execute */
   NULL,					/* sub */
Index: tree-ssa-sink.c
===================================================================
--- tree-ssa-sink.c	(revision 192991)
+++ tree-ssa-sink.c	(working copy)
@@ -584,6 +584,7 @@ struct gimple_opt_pass pass_sink_code =
  {
   GIMPLE_PASS,
   "sink",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_sink,				/* gate */
   do_sink,				/* execute */
   NULL,					/* sub */
Index: jump.c
===================================================================
--- jump.c	(revision 192991)
+++ jump.c	(working copy)
@@ -146,6 +146,7 @@ struct rtl_opt_pass pass_cleanup_barriers =
  {
   RTL_PASS,
   "barriers",                           /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   cleanup_barriers,                     /* execute */
   NULL,                                 /* sub */
Index: ifcvt.c
===================================================================
--- ifcvt.c	(revision 192991)
+++ ifcvt.c	(working copy)
@@ -4462,6 +4462,7 @@ struct rtl_opt_pass pass_rtl_ifcvt =
  {
   RTL_PASS,
   "ce1",                                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_if_conversion,            /* gate */
   rest_of_handle_if_conversion,         /* execute */
   NULL,                                 /* sub */
@@ -4499,6 +4500,7 @@ struct rtl_opt_pass pass_if_after_combine =
  {
   RTL_PASS,
   "ce2",                                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_if_after_combine,         /* gate */
   rest_of_handle_if_after_combine,      /* execute */
   NULL,                                 /* sub */
@@ -4535,6 +4537,7 @@ struct rtl_opt_pass pass_if_after_reload =
  {
   RTL_PASS,
   "ce3",                                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_if_after_reload,          /* gate */
   rest_of_handle_if_after_reload,       /* execute */
   NULL,                                 /* sub */
Index: predict.c
===================================================================
--- predict.c	(revision 192991)
+++ predict.c	(working copy)
@@ -2823,6 +2823,7 @@ struct gimple_opt_pass pass_profile =
  {
   GIMPLE_PASS,
   "profile_estimate",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_estimate_probability,		/* gate */
   tree_estimate_probability_driver,	/* execute */
   NULL,					/* sub */
@@ -2842,6 +2843,7 @@ struct gimple_opt_pass pass_strip_predict_hints =
  {
   GIMPLE_PASS,
   "*strip_predict_hints",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   strip_predict_hints,			/* execute */
   NULL,					/* sub */
Index: tree-ssa-loop.c
===================================================================
--- tree-ssa-loop.c	(revision 192991)
+++ tree-ssa-loop.c	(working copy)
@@ -47,6 +47,7 @@ struct gimple_opt_pass pass_tree_loop =
  {
   GIMPLE_PASS,
   "loop",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_tree_loop,			/* gate */
   NULL,					/* execute */
   NULL,					/* sub */
@@ -82,6 +83,7 @@ struct gimple_opt_pass pass_tree_loop_init =
  {
   GIMPLE_PASS,
   "loopinit",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   NULL,					/* gate */
   tree_ssa_loop_init,			/* execute */
   NULL,					/* sub */
@@ -118,6 +120,7 @@ struct gimple_opt_pass pass_lim =
  {
   GIMPLE_PASS,
   "lim",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_tree_ssa_loop_im,		/* gate */
   tree_ssa_loop_im,			/* execute */
   NULL,					/* sub */
@@ -154,6 +157,7 @@ struct gimple_opt_pass pass_tree_unswitch =
  {
   GIMPLE_PASS,
   "unswitch",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_tree_ssa_loop_unswitch,		/* gate */
   tree_ssa_loop_unswitch,		/* execute */
   NULL,					/* sub */
@@ -190,6 +194,7 @@ struct gimple_opt_pass pass_predcom =
  {
   GIMPLE_PASS,
   "pcom",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_tree_predictive_commoning,	/* gate */
   run_tree_predictive_commoning,	/* execute */
   NULL,					/* sub */
@@ -226,6 +231,8 @@ struct gimple_opt_pass pass_vectorize =
  {
   GIMPLE_PASS,
   "vect",                               /* name */
+  OPTGROUP_LOOP
+  | OPTGROUP_VEC,                       /* optinfo_flags */
   gate_tree_vectorize,                  /* gate */
   tree_vectorize,                       /* execute */
   NULL,                                 /* sub */
@@ -275,6 +282,7 @@ struct gimple_opt_pass pass_graphite =
  {
   GIMPLE_PASS,
   "graphite0",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_graphite_transforms,		/* gate */
   NULL,					/* execute */
   NULL,					/* sub */
@@ -294,6 +302,7 @@ struct gimple_opt_pass pass_graphite_transforms =
  {
   GIMPLE_PASS,
   "graphite",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_graphite_transforms,		/* gate */
   graphite_transforms,       		/* execute */
   NULL,					/* sub */
@@ -331,6 +340,7 @@ struct gimple_opt_pass pass_check_data_deps =
  {
   GIMPLE_PASS,
   "ckdd",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_check_data_deps,	        	/* gate */
   check_data_deps,       		/* execute */
   NULL,					/* sub */
@@ -367,6 +377,7 @@ struct gimple_opt_pass pass_iv_canon =
  {
   GIMPLE_PASS,
   "ivcanon",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_tree_ssa_loop_ivcanon,		/* gate */
   tree_ssa_loop_ivcanon,	       	/* execute */
   NULL,					/* sub */
@@ -394,6 +405,7 @@ struct gimple_opt_pass pass_scev_cprop =
  {
   GIMPLE_PASS,
   "sccp",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_scev_const_prop,			/* gate */
   scev_const_prop,	       		/* execute */
   NULL,					/* sub */
@@ -428,6 +440,7 @@ struct gimple_opt_pass pass_record_bounds =
  {
   GIMPLE_PASS,
   "*record_bounds",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   tree_ssa_loop_bounds,		       	/* execute */
   NULL,					/* sub */
@@ -466,6 +479,7 @@ struct gimple_opt_pass pass_complete_unroll =
  {
   GIMPLE_PASS,
   "cunroll",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_tree_complete_unroll,		/* gate */
   tree_complete_unroll,		       	/* execute */
   NULL,					/* sub */
@@ -512,6 +526,7 @@ struct gimple_opt_pass pass_complete_unrolli =
  {
   GIMPLE_PASS,
   "cunrolli",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_tree_complete_unroll_inner,	/* gate */
   tree_complete_unroll_inner,	       	/* execute */
   NULL,					/* sub */
@@ -551,6 +566,7 @@ struct gimple_opt_pass pass_parallelize_loops =
  {
   GIMPLE_PASS,
   "parloops",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_tree_parallelize_loops,		/* gate */
   tree_parallelize_loops,      		/* execute */
   NULL,					/* sub */
@@ -587,6 +603,7 @@ struct gimple_opt_pass pass_loop_prefetch =
  {
   GIMPLE_PASS,
   "aprefetch",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_tree_ssa_loop_prefetch,		/* gate */
   tree_ssa_loop_prefetch,	       	/* execute */
   NULL,					/* sub */
@@ -624,6 +641,7 @@ struct gimple_opt_pass pass_iv_optimize =
  {
   GIMPLE_PASS,
   "ivopts",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   gate_tree_ssa_loop_ivopts,		/* gate */
   tree_ssa_loop_ivopts,		       	/* execute */
   NULL,					/* sub */
@@ -654,6 +672,7 @@ struct gimple_opt_pass pass_tree_loop_done =
  {
   GIMPLE_PASS,
   "loopdone",				/* name */
+  OPTGROUP_LOOP,                        /* optinfo_flags */
   NULL,					/* gate */
   tree_ssa_loop_done,			/* execute */
   NULL,					/* sub */
Index: recog.c
===================================================================
--- recog.c	(revision 192991)
+++ recog.c	(working copy)
@@ -3742,6 +3742,7 @@ struct rtl_opt_pass pass_peephole2 =
  {
   RTL_PASS,
   "peephole2",                          /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_peephole2,                /* gate */
   rest_of_handle_peephole2,             /* execute */
   NULL,                                 /* sub */
@@ -3769,6 +3770,7 @@ struct rtl_opt_pass pass_split_all_insns =
  {
   RTL_PASS,
   "split1",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_handle_split_all_insns,       /* execute */
   NULL,                                 /* sub */
@@ -3799,6 +3801,7 @@ struct rtl_opt_pass pass_split_after_reload =
  {
   RTL_PASS,
   "split2",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_handle_split_after_reload,    /* execute */
   NULL,                                 /* sub */
@@ -3843,6 +3846,7 @@ struct rtl_opt_pass pass_split_before_regstack =
  {
   RTL_PASS,
   "split3",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_split_before_regstack,    /* gate */
   rest_of_handle_split_before_regstack, /* execute */
   NULL,                                 /* sub */
@@ -3881,6 +3885,7 @@ struct rtl_opt_pass pass_split_before_sched2 =
  {
   RTL_PASS,
   "split4",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_split_before_sched2,      /* gate */
   rest_of_handle_split_before_sched2,   /* execute */
   NULL,                                 /* sub */
@@ -3912,6 +3917,7 @@ struct rtl_opt_pass pass_split_for_shorten_branche
  {
   RTL_PASS,
   "split5",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_do_final_split,                  /* gate */
   split_all_insns_noflow,               /* execute */
   NULL,                                 /* sub */
Index: dse.c
===================================================================
--- dse.c	(revision 192991)
+++ dse.c	(working copy)
@@ -3934,6 +3934,7 @@ struct rtl_opt_pass pass_rtl_dse1 =
  {
   RTL_PASS,
   "dse1",                               /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_dse1,                            /* gate */
   rest_of_handle_dse,                   /* execute */
   NULL,                                 /* sub */
@@ -3954,6 +3955,7 @@ struct rtl_opt_pass pass_rtl_dse2 =
  {
   RTL_PASS,
   "dse2",                               /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_dse2,                            /* gate */
   rest_of_handle_dse,                   /* execute */
   NULL,                                 /* sub */
Index: tree-ssa-ifcombine.c
===================================================================
--- tree-ssa-ifcombine.c	(revision 192991)
+++ tree-ssa-ifcombine.c	(working copy)
@@ -653,6 +653,7 @@ struct gimple_opt_pass pass_tree_ifcombine =
  {
   GIMPLE_PASS,
   "ifcombine",			/* name */
+  OPTGROUP_NONE,                /* optinfo_flags */
   gate_ifcombine,		/* gate */
   tree_ssa_ifcombine,		/* execute */
   NULL,				/* sub */
Index: gimple-ssa-strength-reduction.c
===================================================================
--- gimple-ssa-strength-reduction.c	(revision 192991)
+++ gimple-ssa-strength-reduction.c	(working copy)
@@ -2682,6 +2682,7 @@ struct gimple_opt_pass pass_strength_reduction =
  {
   GIMPLE_PASS,
   "slsr",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_strength_reduction,		/* gate */
   execute_strength_reduction,		/* execute */
   NULL,					/* sub */
Index: tree-eh.c
===================================================================
--- tree-eh.c	(revision 192991)
+++ tree-eh.c	(working copy)
@@ -2133,6 +2133,7 @@ struct gimple_opt_pass pass_lower_eh =
  {
   GIMPLE_PASS,
   "eh",					/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   lower_eh_constructs,			/* execute */
   NULL,					/* sub */
@@ -2992,6 +2993,7 @@ struct gimple_opt_pass pass_refactor_eh =
  {
   GIMPLE_PASS,
   "ehopt",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_refactor_eh,			/* gate */
   refactor_eh,				/* execute */
   NULL,					/* sub */
@@ -3200,6 +3202,7 @@ struct gimple_opt_pass pass_lower_resx =
  {
   GIMPLE_PASS,
   "resx",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_lower_resx,			/* gate */
   execute_lower_resx,			/* execute */
   NULL,					/* sub */
@@ -3496,6 +3499,7 @@ struct gimple_opt_pass pass_lower_eh_dispatch =
  {
   GIMPLE_PASS,
   "ehdisp",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_lower_eh_dispatch,		/* gate */
   execute_lower_eh_dispatch,		/* execute */
   NULL,					/* sub */
@@ -4319,6 +4323,7 @@ struct gimple_opt_pass pass_cleanup_eh = {
   {
    GIMPLE_PASS,
    "ehcleanup",			/* name */
+   OPTGROUP_NONE,               /* optinfo_flags */
    gate_cleanup_eh,		/* gate */
    execute_cleanup_eh,		/* execute */
    NULL,			/* sub */
Index: regmove.c
===================================================================
--- regmove.c	(revision 192991)
+++ regmove.c	(working copy)
@@ -1369,6 +1369,7 @@ struct rtl_opt_pass pass_regmove =
  {
   RTL_PASS,
   "regmove",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_regmove,                  /* gate */
   regmove_optimize,			/* execute */
   NULL,                                 /* sub */
Index: function.c
===================================================================
--- function.c	(revision 192991)
+++ function.c	(working copy)
@@ -1949,6 +1949,7 @@ struct rtl_opt_pass pass_instantiate_virtual_regs
  {
   RTL_PASS,
   "vregs",                              /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   instantiate_virtual_regs,             /* execute */
   NULL,                                 /* sub */
@@ -6925,6 +6926,7 @@ struct rtl_opt_pass pass_leaf_regs =
  {
   RTL_PASS,
   "*leaf_regs",                         /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_handle_check_leaf_regs,       /* execute */
   NULL,                                 /* sub */
@@ -6963,6 +6965,7 @@ struct rtl_opt_pass pass_thread_prologue_and_epilo
  {
   RTL_PASS,
   "pro_and_epilogue",                   /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_handle_thread_prologue_and_epilogue, /* execute */
   NULL,                                 /* sub */
@@ -7164,6 +7167,7 @@ struct rtl_opt_pass pass_match_asm_constraints =
  {
   RTL_PASS,
   "asmcons",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   rest_of_match_asm_constraints,	/* execute */
   NULL,                                 /* sub */
Index: tree-vectorizer.c
===================================================================
--- tree-vectorizer.c	(revision 192991)
+++ tree-vectorizer.c	(working copy)
@@ -194,6 +194,8 @@ struct gimple_opt_pass pass_slp_vectorize =
  {
   GIMPLE_PASS,
   "slp",                                /* name */
+  OPTGROUP_LOOP
+  | OPTGROUP_VEC,                       /* optinfo_flags */
   gate_vect_slp,                        /* gate */
   execute_vect_slp,                     /* execute */
   NULL,                                 /* sub */
@@ -266,6 +268,8 @@ struct simple_ipa_opt_pass pass_ipa_increase_align
  {
   SIMPLE_IPA_PASS,
   "increase_alignment",                 /* name */
+  OPTGROUP_LOOP
+  | OPTGROUP_VEC,                       /* optinfo_flags */
   gate_increase_alignment,              /* gate */
   increase_alignment,                   /* execute */
   NULL,                                 /* sub */
Index: ipa-split.c
===================================================================
--- ipa-split.c	(revision 192991)
+++ ipa-split.c	(working copy)
@@ -1601,6 +1601,7 @@ struct gimple_opt_pass pass_split_functions =
  {
   GIMPLE_PASS,
   "fnsplit",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_split_functions,			/* gate */
   execute_split_functions,		/* execute */
   NULL,					/* sub */
@@ -1642,6 +1643,7 @@ struct gimple_opt_pass pass_feedback_split_functio
  {
   GIMPLE_PASS,
   "feedback_fnsplit",			/* name */
+  OPTGROUP_NONE,                      /* optinfo_flags */
   gate_feedback_split_functions,	/* gate */
   execute_feedback_split_functions,	/* execute */
   NULL,					/* sub */
Index: gcse.c
===================================================================
--- gcse.c	(revision 192991)
+++ gcse.c	(working copy)
@@ -4027,6 +4027,7 @@ struct rtl_opt_pass pass_rtl_pre =
  {
   RTL_PASS,
   "rtl pre",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_rtl_pre,                         /* gate */
   execute_rtl_pre,    			/* execute */
   NULL,                                 /* sub */
@@ -4047,6 +4048,7 @@ struct rtl_opt_pass pass_rtl_hoist =
  {
   RTL_PASS,
   "hoist",                              /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_rtl_hoist,                       /* gate */
   execute_rtl_hoist,  			/* execute */
   NULL,                                 /* sub */
Index: tree-if-conv.c
===================================================================
--- tree-if-conv.c	(revision 192991)
+++ tree-if-conv.c	(working copy)
@@ -1859,6 +1859,7 @@ struct gimple_opt_pass pass_if_conversion =
  {
   GIMPLE_PASS,
   "ifcvt",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_tree_if_conversion,		/* gate */
   main_tree_if_conversion,		/* execute */
   NULL,					/* sub */
Index: init-regs.c
===================================================================
--- init-regs.c	(revision 192991)
+++ init-regs.c	(working copy)
@@ -143,6 +143,7 @@ struct rtl_opt_pass pass_initialize_regs =
  {
   RTL_PASS,
   "init-regs",                          /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_initialize_regs,                 /* gate */
   rest_of_handle_initialize_regs,       /* execute */
   NULL,                                 /* sub */
Index: ipa.c
===================================================================
--- ipa.c	(revision 192991)
+++ ipa.c	(working copy)
@@ -950,6 +950,7 @@ struct simple_ipa_opt_pass pass_ipa_function_and_v
  {
   SIMPLE_IPA_PASS,
   "visibility",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   local_function_and_variable_visibility,/* execute */
   NULL,					/* sub */
@@ -979,6 +980,7 @@ struct simple_ipa_opt_pass pass_ipa_free_inline_su
  {
   SIMPLE_IPA_PASS,
   "*free_inline_summary",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   free_inline_summary,			/* execute */
   NULL,					/* sub */
@@ -1017,6 +1019,7 @@ struct ipa_opt_pass_d pass_ipa_whole_program_visib
  {
   IPA_PASS,
   "whole-program",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_whole_program_function_and_variable_visibility,/* gate */
   whole_program_function_and_variable_visibility,/* execute */
   NULL,					/* sub */
@@ -1100,6 +1103,7 @@ struct ipa_opt_pass_d pass_ipa_profile =
  {
   IPA_PASS,
   "profile_estimate",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_ipa_profile,			/* gate */
   ipa_profile,			        /* execute */
   NULL,					/* sub */
@@ -1410,6 +1414,7 @@ struct ipa_opt_pass_d pass_ipa_cdtor_merge =
  {
   IPA_PASS,
   "cdtor",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_ipa_cdtor_merge,			/* gate */
   ipa_cdtor_merge,		        /* execute */
   NULL,					/* sub */
Index: trans-mem.c
===================================================================
--- trans-mem.c	(revision 192991)
+++ trans-mem.c	(working copy)
@@ -798,6 +798,7 @@ struct gimple_opt_pass pass_diagnose_tm_blocks =
   {
     GIMPLE_PASS,
     "*diagnose_tm_blocks",		/* name */
+    OPTGROUP_NONE,                      /* optinfo_flags */
     gate_tm,				/* gate */
     diagnose_tm_blocks,			/* execute */
     NULL,				/* sub */
@@ -1738,6 +1739,7 @@ struct gimple_opt_pass pass_lower_tm =
  {
   GIMPLE_PASS,
   "tmlower",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_tm,				/* gate */
   execute_lower_tm,			/* execute */
   NULL,					/* sub */
@@ -1985,6 +1987,7 @@ struct gimple_opt_pass pass_tm_init =
  {
   GIMPLE_PASS,
   "*tminit",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_tm_init,				/* gate */
   NULL,					/* execute */
   NULL,					/* sub */
@@ -2571,6 +2574,7 @@ struct gimple_opt_pass pass_tm_mark =
  {
   GIMPLE_PASS,
   "tmmark",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_tm_mark,			/* execute */
   NULL,					/* sub */
@@ -2848,6 +2852,7 @@ struct gimple_opt_pass pass_tm_edges =
  {
   GIMPLE_PASS,
   "tmedge",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_tm_edges,			/* execute */
   NULL,					/* sub */
@@ -3513,6 +3518,7 @@ struct gimple_opt_pass pass_tm_memopt =
  {
   GIMPLE_PASS,
   "tmmemopt",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_tm_memopt,			/* gate */
   execute_tm_memopt,			/* execute */
   NULL,					/* sub */
@@ -5067,6 +5073,7 @@ struct simple_ipa_opt_pass pass_ipa_tm =
  {
   SIMPLE_IPA_PASS,
   "tmipa",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_tm,				/* gate */
   ipa_tm_execute,			/* execute */
   NULL,					/* sub */
Index: ipa-inline-analysis.c
===================================================================
--- ipa-inline-analysis.c	(revision 192991)
+++ ipa-inline-analysis.c	(working copy)
@@ -2655,6 +2655,7 @@ struct gimple_opt_pass pass_inline_parameters =
  {
   GIMPLE_PASS,
   "inline_param",			/* name */
+  OPTGROUP_INLINE,                      /* optinfo_flags */
   NULL,					/* gate */
   compute_inline_parameters_for_current,/* execute */
   NULL,					/* sub */
Index: tree-ssa-phiopt.c
===================================================================
--- tree-ssa-phiopt.c	(revision 192991)
+++ tree-ssa-phiopt.c	(working copy)
@@ -1951,6 +1951,7 @@ struct gimple_opt_pass pass_phiopt =
  {
   GIMPLE_PASS,
   "phiopt",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_phiopt,				/* gate */
   tree_ssa_phiopt,			/* execute */
   NULL,					/* sub */
@@ -1979,6 +1980,7 @@ struct gimple_opt_pass pass_cselim =
  {
   GIMPLE_PASS,
   "cselim",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_cselim,				/* gate */
   tree_ssa_cs_elim,			/* execute */
   NULL,					/* sub */
Index: lower-subreg.c
===================================================================
--- lower-subreg.c	(revision 192991)
+++ lower-subreg.c	(working copy)
@@ -1665,6 +1665,7 @@ struct rtl_opt_pass pass_lower_subreg =
  {
   RTL_PASS,
   "subreg1",	                        /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_lower_subreg,             /* gate */
   rest_of_handle_lower_subreg,          /* execute */
   NULL,                                 /* sub */
@@ -1685,6 +1686,7 @@ struct rtl_opt_pass pass_lower_subreg2 =
  {
   RTL_PASS,
   "subreg2",	                        /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_lower_subreg,             /* gate */
   rest_of_handle_lower_subreg2,          /* execute */
   NULL,                                 /* sub */
Index: bt-load.c
===================================================================
--- bt-load.c	(revision 192991)
+++ bt-load.c	(working copy)
@@ -1,3 +1,4 @@
+
 /* Perform branch target register load optimizations.
    Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
@@ -1509,6 +1510,7 @@ struct rtl_opt_pass pass_branch_target_load_optimi
  {
   RTL_PASS,
   "btl1",                               /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_branch_target_load_optimize1,      /* gate */
   rest_of_handle_branch_target_load_optimize1,   /* execute */
   NULL,                                 /* sub */
@@ -1558,6 +1560,7 @@ struct rtl_opt_pass pass_branch_target_load_optimi
  {
   RTL_PASS,
   "btl2",                               /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_branch_target_load_optimize2,      /* gate */
   rest_of_handle_branch_target_load_optimize2,   /* execute */
   NULL,                                 /* sub */
Index: except.c
===================================================================
--- except.c	(revision 192991)
+++ except.c	(working copy)
@@ -1920,6 +1920,7 @@ struct rtl_opt_pass pass_set_nothrow_function_flag
  {
   RTL_PASS,
   "nothrow",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   set_nothrow_function_flags,           /* execute */
   NULL,                                 /* sub */
@@ -2569,6 +2570,7 @@ struct rtl_opt_pass pass_convert_to_eh_region_rang
  {
   RTL_PASS,
   "eh_ranges",                          /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_convert_to_eh_region_ranges,	/* gate */
   convert_to_eh_region_ranges,          /* execute */
   NULL,                                 /* sub */
Index: store-motion.c
===================================================================
--- store-motion.c	(revision 192991)
+++ store-motion.c	(working copy)
@@ -1238,6 +1238,7 @@ struct rtl_opt_pass pass_rtl_store_motion =
  {
   RTL_PASS,
   "store_motion",                       /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_rtl_store_motion,                /* gate */
   execute_rtl_store_motion,		/* execute */
   NULL,                                 /* sub */
Index: cfgexpand.c
===================================================================
--- cfgexpand.c	(revision 192991)
+++ cfgexpand.c	(working copy)
@@ -4677,6 +4677,7 @@ struct rtl_opt_pass pass_expand =
  {
   RTL_PASS,
   "expand",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   gimple_expand_cfg,			/* execute */
   NULL,                                 /* sub */
Index: tree-cfgcleanup.c
===================================================================
--- tree-cfgcleanup.c	(revision 192991)
+++ tree-cfgcleanup.c	(working copy)
@@ -977,6 +977,7 @@ struct gimple_opt_pass pass_merge_phi =
  {
   GIMPLE_PASS,
   "mergephi",			/* name */
+  OPTGROUP_NONE,                /* optinfo_flags */
   gate_merge_phi,		/* gate */
   merge_phi_nodes,		/* execute */
   NULL,				/* sub */
Index: cfgcleanup.c
===================================================================
--- cfgcleanup.c	(revision 192991)
+++ cfgcleanup.c	(working copy)
@@ -3008,6 +3008,7 @@ struct rtl_opt_pass pass_jump =
  {
   RTL_PASS,
   "jump",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_jump,				/* execute */
   NULL,					/* sub */
@@ -3034,6 +3035,7 @@ struct rtl_opt_pass pass_jump2 =
  {
   RTL_PASS,
   "jump2",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_jump2,			/* execute */
   NULL,					/* sub */
Index: tree-ssa-pre.c
===================================================================
--- tree-ssa-pre.c	(revision 192991)
+++ tree-ssa-pre.c	(working copy)
@@ -4766,6 +4766,7 @@ struct gimple_opt_pass pass_pre =
  {
   GIMPLE_PASS,
   "pre",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_pre,				/* gate */
   do_pre,				/* execute */
   NULL,					/* sub */
@@ -4819,6 +4820,7 @@ struct gimple_opt_pass pass_fre =
  {
   GIMPLE_PASS,
   "fre",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_fre,				/* gate */
   execute_fre,				/* execute */
   NULL,					/* sub */
Index: tree-sra.c
===================================================================
--- tree-sra.c	(revision 192991)
+++ tree-sra.c	(working copy)
@@ -3443,6 +3443,7 @@ struct gimple_opt_pass pass_sra_early =
  {
   GIMPLE_PASS,
   "esra",	 			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_intra_sra,			/* gate */
   early_intra_sra,			/* execute */
   NULL,					/* sub */
@@ -3464,6 +3465,7 @@ struct gimple_opt_pass pass_sra =
  {
   GIMPLE_PASS,
   "sra",	 			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_intra_sra,			/* gate */
   late_intra_sra,			/* execute */
   NULL,					/* sub */
@@ -5006,6 +5008,7 @@ struct gimple_opt_pass pass_early_ipa_sra =
  {
   GIMPLE_PASS,
   "eipa_sra",	 			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   ipa_early_sra_gate,			/* gate */
   ipa_early_sra,			/* execute */
   NULL,					/* sub */
Index: tree-mudflap.c
===================================================================
--- tree-mudflap.c	(revision 192991)
+++ tree-mudflap.c	(working copy)
@@ -1368,6 +1368,7 @@ struct gimple_opt_pass pass_mudflap_1 =
  {
   GIMPLE_PASS,
   "mudflap1",                           /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_mudflap,                         /* gate */
   execute_mudflap_function_decls,       /* execute */
   NULL,                                 /* sub */
@@ -1387,6 +1388,7 @@ struct gimple_opt_pass pass_mudflap_2 =
  {
   GIMPLE_PASS,
   "mudflap2",                           /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_mudflap,                         /* gate */
   execute_mudflap_function_ops,         /* execute */
   NULL,                                 /* sub */
Index: tree-ssa-copy.c
===================================================================
--- tree-ssa-copy.c	(revision 192991)
+++ tree-ssa-copy.c	(working copy)
@@ -828,6 +828,7 @@ struct gimple_opt_pass pass_copy_prop =
  {
   GIMPLE_PASS,
   "copyprop",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_copy_prop,			/* gate */
   execute_copy_prop,			/* execute */
   NULL,					/* sub */
Index: tree-ssa-forwprop.c
===================================================================
--- tree-ssa-forwprop.c	(revision 192991)
+++ tree-ssa-forwprop.c	(working copy)
@@ -3122,6 +3122,7 @@ struct gimple_opt_pass pass_forwprop =
  {
   GIMPLE_PASS,
   "forwprop",			/* name */
+  OPTGROUP_NONE,                /* optinfo_flags */
   gate_forwprop,		/* gate */
   ssa_forward_propagate_and_combine,	/* execute */
   NULL,				/* sub */
Index: tree-ssa-dce.c
===================================================================
--- tree-ssa-dce.c	(revision 192991)
+++ tree-ssa-dce.c	(working copy)
@@ -1651,6 +1651,7 @@ struct gimple_opt_pass pass_dce =
  {
   GIMPLE_PASS,
   "dce",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_dce,				/* gate */
   tree_ssa_dce,				/* execute */
   NULL,					/* sub */
@@ -1670,6 +1671,7 @@ struct gimple_opt_pass pass_dce_loop =
  {
   GIMPLE_PASS,
   "dceloop",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_dce,				/* gate */
   tree_ssa_dce_loop,			/* execute */
   NULL,					/* sub */
@@ -1689,6 +1691,7 @@ struct gimple_opt_pass pass_cd_dce =
  {
   GIMPLE_PASS,
   "cddce",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_dce,				/* gate */
   tree_ssa_cd_dce,			/* execute */
   NULL,					/* sub */
Index: ira.c
===================================================================
--- ira.c	(revision 192991)
+++ ira.c	(working copy)
@@ -4716,6 +4716,7 @@ struct rtl_opt_pass pass_ira =
  {
   RTL_PASS,
   "ira",                                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_handle_ira,		        /* execute */
   NULL,                                 /* sub */
@@ -4742,6 +4743,7 @@ struct rtl_opt_pass pass_reload =
  {
   RTL_PASS,
   "reload",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_handle_reload,	        /* execute */
   NULL,                                 /* sub */
Index: tree-ssa.c
===================================================================
--- tree-ssa.c	(revision 192991)
+++ tree-ssa.c	(working copy)
@@ -1135,6 +1135,7 @@ struct gimple_opt_pass pass_init_datastructures =
  {
   GIMPLE_PASS,
   "*init_datastructures",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_init_datastructures,		/* execute */
   NULL,					/* sub */
@@ -1744,6 +1745,7 @@ struct gimple_opt_pass pass_early_warn_uninitializ
  {
   GIMPLE_PASS,
   "*early_warn_uninitialized",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_warn_uninitialized,		/* gate */
   execute_early_warn_uninitialized,	/* execute */
   NULL,					/* sub */
@@ -2174,6 +2176,7 @@ struct gimple_opt_pass pass_update_address_taken =
  {
   GIMPLE_PASS,
   "addressables",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   NULL,					/* execute */
   NULL,					/* sub */
Index: dwarf2cfi.c
===================================================================
--- dwarf2cfi.c	(revision 192991)
+++ dwarf2cfi.c	(working copy)
@@ -3388,6 +3388,7 @@ struct rtl_opt_pass pass_dwarf2_frame =
  {
   RTL_PASS,
   "dwarf2",			/* name */
+  OPTGROUP_NONE,                /* optinfo_flags */
   gate_dwarf2_frame,		/* gate */
   execute_dwarf2_frame,		/* execute */
   NULL,				/* sub */
Index: tree-optimize.c
===================================================================
--- tree-optimize.c	(revision 192991)
+++ tree-optimize.c	(working copy)
@@ -95,6 +95,7 @@ struct gimple_opt_pass pass_cleanup_cfg_post_optim
  {
   GIMPLE_PASS,
   "optimized",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_cleanup_cfg_post_optimizing,	/* execute */
   NULL,					/* sub */
@@ -222,6 +223,7 @@ struct gimple_opt_pass pass_fixup_cfg =
  {
   GIMPLE_PASS,
   "*free_cfg_annotations",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_fixup_cfg,			/* execute */
   NULL,					/* sub */
Index: tree-ssa-phiprop.c
===================================================================
--- tree-ssa-phiprop.c	(revision 192991)
+++ tree-ssa-phiprop.c	(working copy)
@@ -409,6 +409,7 @@ struct gimple_opt_pass pass_phiprop =
  {
   GIMPLE_PASS,
   "phiprop",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_phiprop,			/* gate */
   tree_ssa_phiprop,		/* execute */
   NULL,				/* sub */
Index: tree-object-size.c
===================================================================
--- tree-object-size.c	(revision 192991)
+++ tree-object-size.c	(working copy)
@@ -1268,6 +1268,7 @@ struct gimple_opt_pass pass_object_sizes =
  {
   GIMPLE_PASS,
   "objsz",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   compute_object_sizes,			/* execute */
   NULL,					/* sub */
Index: combine.c
===================================================================
--- combine.c	(revision 192991)
+++ combine.c	(working copy)
@@ -13842,6 +13842,7 @@ struct rtl_opt_pass pass_combine =
  {
   RTL_PASS,
   "combine",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_combine,                  /* gate */
   rest_of_handle_combine,               /* execute */
   NULL,                                 /* sub */
Index: cprop.c
===================================================================
--- cprop.c	(revision 192991)
+++ cprop.c	(working copy)
@@ -1923,6 +1923,7 @@ struct rtl_opt_pass pass_rtl_cprop =
  {
   RTL_PASS,
   "cprop",                              /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_rtl_cprop,                       /* gate */
   execute_rtl_cprop,  			/* execute */
   NULL,                                 /* sub */
Index: bb-reorder.c
===================================================================
--- bb-reorder.c	(revision 192991)
+++ bb-reorder.c	(working copy)
@@ -2234,6 +2234,7 @@ struct rtl_opt_pass pass_reorder_blocks =
  {
   RTL_PASS,
   "bbro",                               /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_reorder_blocks,           /* gate */
   rest_of_handle_reorder_blocks,        /* execute */
   NULL,                                 /* sub */
@@ -2376,6 +2377,7 @@ struct rtl_opt_pass pass_duplicate_computed_gotos
  {
   RTL_PASS,
   "compgotos",                          /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_duplicate_computed_gotos,        /* gate */
   duplicate_computed_gotos,             /* execute */
   NULL,                                 /* sub */
@@ -2579,6 +2581,7 @@ struct rtl_opt_pass pass_partition_blocks =
  {
   RTL_PASS,
   "bbpart",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_partition_blocks,         /* gate */
   partition_hot_cold_basic_blocks,      /* execute */
   NULL,                                 /* sub */
Index: stack-ptr-mod.c
===================================================================
--- stack-ptr-mod.c	(revision 192991)
+++ stack-ptr-mod.c	(working copy)
@@ -96,6 +96,7 @@ struct rtl_opt_pass pass_stack_ptr_mod =
  {
   RTL_PASS,
   "*stack_ptr_mod",                     /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_handle_stack_ptr_mod,         /* execute */
   NULL,                                 /* sub */
Index: var-tracking.c
===================================================================
--- var-tracking.c	(revision 192991)
+++ var-tracking.c	(working copy)
@@ -10099,6 +10099,7 @@ struct rtl_opt_pass pass_variable_tracking =
  {
   RTL_PASS,
   "vartrack",                           /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_var_tracking,             /* gate */
   variable_tracking_main,               /* execute */
   NULL,                                 /* sub */
Index: tree-profile.c
===================================================================
--- tree-profile.c	(revision 192991)
+++ tree-profile.c	(working copy)
@@ -568,6 +568,7 @@ struct simple_ipa_opt_pass pass_ipa_tree_profile =
  {
   SIMPLE_IPA_PASS,
   "profile",  		               /* name */
+  OPTGROUP_NONE,                       /* optinfo_flags */
   gate_tree_profile_ipa,               /* gate */
   tree_profiling,                      /* execute */
   NULL,                                /* sub */
Index: tree-vect-generic.c
===================================================================
--- tree-vect-generic.c	(revision 192991)
+++ tree-vect-generic.c	(working copy)
@@ -1435,6 +1435,7 @@ struct gimple_opt_pass pass_lower_vector =
  {
   GIMPLE_PASS,
   "veclower",				/* name */
+  OPTGROUP_VEC,                         /* optinfo_flags */
   gate_expand_vector_operations_ssa,    /* gate */
   expand_vector_operations,		/* execute */
   NULL,					/* sub */
@@ -1457,6 +1458,7 @@ struct gimple_opt_pass pass_lower_vector_ssa =
  {
   GIMPLE_PASS,
   "veclower2",				/* name */
+  OPTGROUP_VEC,                         /* optinfo_flags */
   0,	                                /* gate */
   expand_vector_operations,		/* execute */
   NULL,					/* sub */
Index: reg-stack.c
===================================================================
--- reg-stack.c	(revision 192991)
+++ reg-stack.c	(working copy)
@@ -3305,6 +3305,7 @@ struct rtl_opt_pass pass_stack_regs =
  {
   RTL_PASS,
   "*stack_regs",                        /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_stack_regs,               /* gate */
   NULL,					/* execute */
   NULL,                                 /* sub */
@@ -3336,6 +3337,7 @@ struct rtl_opt_pass pass_stack_regs_run =
  {
   RTL_PASS,
   "stack",                              /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_handle_stack_regs,            /* execute */
   NULL,                                 /* sub */
Index: opts-global.c
===================================================================
--- opts-global.c	(revision 192991)
+++ opts-global.c	(working copy)
@@ -240,7 +240,7 @@ read_cmdline_options (struct gcc_options *opts, st
    REPORT_VECTORIZED_LOCATIONS ==> "-optimized"
    REPORT_UNVECTORIZED_LOCATIONS ==> "-missed"
 
-   Any higher verbosity levels get mapped to "-optall" flags.  */
+   Any higher verbosity levels get mapped to "-all" flags.  */
 
 static void
 dump_remap_tree_vectorizer_verbose (const char *arg)
@@ -259,7 +259,7 @@ dump_remap_tree_vectorizer_verbose (const char *ar
       remapped_opt_info = "missed";
       break;
     default:
-      remapped_opt_info = "optall";
+      remapped_opt_info = "all";
       break;
     }
 
@@ -390,7 +390,7 @@ handle_common_deferred_options (void)
 
         case OPT_fopt_info_:
 	  if (!opt_info_switch_p (opt->arg))
-	    error ("unrecognized command line option %<-fopt-info%s%>",
+	    error ("unrecognized command line option %<-fopt-info-%s%>",
                    opt->arg);
           break;
 
Index: reginfo.c
===================================================================
--- reginfo.c	(revision 192991)
+++ reginfo.c	(working copy)
@@ -972,6 +972,7 @@ struct rtl_opt_pass pass_reginfo_init =
  {
   RTL_PASS,
   "reginfo",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   reginfo_init,                         /* execute */
   NULL,                                 /* sub */
Index: sched-rgn.c
===================================================================
--- sched-rgn.c	(revision 192991)
+++ sched-rgn.c	(working copy)
@@ -3575,6 +3575,7 @@ struct rtl_opt_pass pass_sched =
  {
   RTL_PASS,
   "sched1",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_sched,                    /* gate */
   rest_of_handle_sched,                 /* execute */
   NULL,                                 /* sub */
@@ -3596,6 +3597,7 @@ struct rtl_opt_pass pass_sched2 =
  {
   RTL_PASS,
   "sched2",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_sched2,                   /* gate */
   rest_of_handle_sched2,                /* execute */
   NULL,                                 /* sub */
Index: tree-ssa-structalias.c
===================================================================
--- tree-ssa-structalias.c	(revision 192991)
+++ tree-ssa-structalias.c	(working copy)
@@ -6807,6 +6807,7 @@ struct gimple_opt_pass pass_build_alias =
  {
   GIMPLE_PASS,
   "alias",		    /* name */
+  OPTGROUP_NONE,            /* optinfo_flags */
   gate_tree_pta,	    /* gate */
   NULL,                     /* execute */
   NULL,                     /* sub */
@@ -6829,6 +6830,7 @@ struct gimple_opt_pass pass_build_ealias =
  {
   GIMPLE_PASS,
   "ealias",		    /* name */
+  OPTGROUP_NONE,            /* optinfo_flags */
   gate_tree_pta,	    /* gate */
   NULL,                     /* execute */
   NULL,                     /* sub */
@@ -7203,6 +7205,7 @@ struct simple_ipa_opt_pass pass_ipa_pta =
  {
   SIMPLE_IPA_PASS,
   "pta",		                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_ipa_pta,			/* gate */
   ipa_pta_execute,			/* execute */
   NULL,					/* sub */
Index: tree-switch-conversion.c
===================================================================
--- tree-switch-conversion.c	(revision 192991)
+++ tree-switch-conversion.c	(working copy)
@@ -1463,6 +1463,7 @@ struct gimple_opt_pass pass_convert_switch =
  {
   GIMPLE_PASS,
   "switchconv",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   switchconv_gate,			/* gate */
   do_switchconv,			/* execute */
   NULL,					/* sub */
Index: tree-cfg.c
===================================================================
--- tree-cfg.c	(revision 192991)
+++ tree-cfg.c	(working copy)
@@ -247,6 +247,7 @@ struct gimple_opt_pass pass_build_cfg =
  {
   GIMPLE_PASS,
   "cfg",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_build_cfg,			/* execute */
   NULL,					/* sub */
@@ -7705,6 +7706,7 @@ struct gimple_opt_pass pass_split_crit_edges =
  {
   GIMPLE_PASS,
   "crited",                          /* name */
+  OPTGROUP_NONE,                 /* optinfo_flags */
   NULL,                          /* gate */
   split_critical_edges,          /* execute */
   NULL,                          /* sub */
@@ -7858,6 +7860,7 @@ struct gimple_opt_pass pass_warn_function_return =
  {
   GIMPLE_PASS,
   "*warn_function_return",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   execute_warn_function_return,		/* execute */
   NULL,					/* sub */
@@ -7894,6 +7897,7 @@ struct gimple_opt_pass pass_warn_function_noreturn
  {
   GIMPLE_PASS,
   "*warn_function_noreturn",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_warn_function_noreturn,		/* gate */
   execute_warn_function_noreturn,	/* execute */
   NULL,					/* sub */
@@ -7992,6 +7996,7 @@ struct gimple_opt_pass pass_warn_unused_result =
   {
     GIMPLE_PASS,
     "*warn_unused_result",		/* name */
+    OPTGROUP_NONE,                        /* optinfo_flags */
     gate_warn_unused_result,		/* gate */
     run_warn_unused_result,		/* execute */
     NULL,				/* sub */
Index: passes.c
===================================================================
--- passes.c	(revision 192991)
+++ passes.c	(working copy)
@@ -103,7 +103,6 @@ debug_pass (void)
 
 
 /* Global variables used to communicate with passes.  */
-int dump_flags;
 bool in_gimple_form;
 bool first_pass_instance;
 
@@ -285,6 +284,7 @@ struct simple_ipa_opt_pass pass_early_local_passes
  {
   SIMPLE_IPA_PASS,
   "early_local_cleanups",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_all_early_local_passes,		/* gate */
   execute_all_early_local_passes,	/* execute */
   NULL,					/* sub */
@@ -314,6 +314,7 @@ static struct gimple_opt_pass pass_all_early_optim
  {
   GIMPLE_PASS,
   "early_optimizations",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_all_early_optimizations,		/* gate */
   NULL,					/* execute */
   NULL,					/* sub */
@@ -341,6 +342,7 @@ static struct gimple_opt_pass pass_all_optimizatio
  {
   GIMPLE_PASS,
   "*all_optimizations",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_all_optimizations,		/* gate */
   NULL,					/* execute */
   NULL,					/* sub */
@@ -368,6 +370,7 @@ static struct gimple_opt_pass pass_all_optimizatio
  {
   GIMPLE_PASS,
   "*all_optimizations_g",		/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_all_optimizations_g,		/* gate */
   NULL,					/* execute */
   NULL,					/* sub */
@@ -395,6 +398,7 @@ static struct rtl_opt_pass pass_rest_of_compilatio
  {
   RTL_PASS,
   "*rest_of_compilation",               /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_rest_of_compilation,             /* gate */
   NULL,                                 /* execute */
   NULL,                                 /* sub */
@@ -420,6 +424,7 @@ static struct rtl_opt_pass pass_postreload =
  {
   RTL_PASS,
   "*all-postreload",                        /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_postreload,                      /* gate */
   NULL,                                 /* execute */
   NULL,                                 /* sub */
@@ -487,6 +492,7 @@ register_one_dump_file (struct opt_pass *pass)
   const char *name, *full_name, *prefix;
   char num[10];
   int flags, id;
+  int optgroup_flags = OPTGROUP_NONE;
 
   /* See below in next_pass_1.  */
   num[0] = '\0';
@@ -503,15 +509,26 @@ register_one_dump_file (struct opt_pass *pass)
   name = name ? name + 1 : pass->name;
   dot_name = concat (".", name, num, NULL);
   if (pass->type == SIMPLE_IPA_PASS || pass->type == IPA_PASS)
-    prefix = "ipa-", flags = TDF_IPA;
+    {
+      prefix = "ipa-";
+      flags = TDF_IPA;
+      optgroup_flags |= OPTGROUP_IPA;
+    }
   else if (pass->type == GIMPLE_PASS)
-    prefix = "tree-", flags = TDF_TREE;
+    {
+      prefix = "tree-";
+      flags = TDF_TREE;
+    }
   else
-    prefix = "rtl-", flags = TDF_RTL;
+    {
+      prefix = "rtl-";
+      flags = TDF_RTL;
+    }
 
   flag_name = concat (prefix, name, num, NULL);
   glob_name = concat (prefix, name, NULL);
-  id = dump_register (dot_name, flag_name, glob_name, flags);
+  optgroup_flags |= pass->optinfo_flags;
+  id = dump_register (dot_name, flag_name, glob_name, flags, optgroup_flags);
   set_pass_for_id (id, pass);
   full_name = concat (prefix, pass->name, num, NULL);
   register_pass_name (pass, full_name);
Index: ree.c
===================================================================
--- ree.c	(revision 192991)
+++ ree.c	(working copy)
@@ -949,6 +949,7 @@ struct rtl_opt_pass pass_ree =
  {
   RTL_PASS,
   "ree",                                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_ree,                      /* gate */
   rest_of_handle_ree,                   /* execute */
   NULL,                                 /* sub */
Index: tree-ssa-reassoc.c
===================================================================
--- tree-ssa-reassoc.c	(revision 192991)
+++ tree-ssa-reassoc.c	(working copy)
@@ -3703,6 +3703,7 @@ struct gimple_opt_pass pass_reassoc =
  {
   GIMPLE_PASS,
   "reassoc",				/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_tree_ssa_reassoc,		/* gate */
   execute_reassoc,			/* execute */
   NULL,					/* sub */
Index: config/epiphany/resolve-sw-modes.c
===================================================================
--- config/epiphany/resolve-sw-modes.c	(revision 192991)
+++ config/epiphany/resolve-sw-modes.c	(working copy)
@@ -166,6 +166,7 @@ struct rtl_opt_pass pass_resolve_sw_modes =
  {
   RTL_PASS,
   "resolve_sw_modes",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_resolve_sw_modes,		/* gate */
   resolve_sw_modes,			/* execute */
   NULL,					/* sub */
Index: config/epiphany/mode-switch-use.c
===================================================================
--- config/epiphany/mode-switch-use.c	(revision 192991)
+++ config/epiphany/mode-switch-use.c	(working copy)
@@ -76,6 +76,7 @@ struct rtl_opt_pass pass_mode_switch_use =
  {
   RTL_PASS,
   "mode_switch_use",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   insert_uses,				/* execute */
   NULL,					/* sub */
Index: config/rl78/rl78.c
===================================================================
--- config/rl78/rl78.c	(revision 192991)
+++ config/rl78/rl78.c	(working copy)
@@ -133,6 +133,7 @@ static struct opt_pass rl78_devirt_pass =
 {
   RTL_PASS,
   "devirt",
+  OPTGROUP_NONE,                        /* optinfo_flags */
   devirt_gate,
   devirt_pass,
   NULL,
Index: combine-stack-adj.c
===================================================================
--- combine-stack-adj.c	(revision 192991)
+++ combine-stack-adj.c	(working copy)
@@ -650,6 +650,7 @@ struct rtl_opt_pass pass_stack_adjustments =
  {
   RTL_PASS,
   "csa",                                /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_stack_adjustments,        /* gate */
   rest_of_handle_stack_adjustments,     /* execute */
   NULL,                                 /* sub */
Index: cfgrtl.c
===================================================================
--- cfgrtl.c	(revision 192991)
+++ cfgrtl.c	(working copy)
@@ -456,6 +456,7 @@ struct rtl_opt_pass pass_free_cfg =
  {
   RTL_PASS,
   "*free_cfg",                          /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   rest_of_pass_free_cfg,                /* execute */
   NULL,                                 /* sub */
@@ -2998,6 +2999,7 @@ struct rtl_opt_pass pass_into_cfg_layout_mode =
  {
   RTL_PASS,
   "into_cfglayout",                     /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   into_cfg_layout_mode,                 /* execute */
   NULL,                                 /* sub */
@@ -3017,6 +3019,7 @@ struct rtl_opt_pass pass_outof_cfg_layout_mode =
  {
   RTL_PASS,
   "outof_cfglayout",                    /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,                                 /* gate */
   outof_cfg_layout_mode,                /* execute */
   NULL,                                 /* sub */
Index: statistics.c
===================================================================
--- statistics.c	(revision 192991)
+++ statistics.c	(working copy)
@@ -246,7 +246,7 @@ void
 statistics_early_init (void)
 {
   statistics_dump_nr = dump_register (".statistics", "statistics",
-				      "statistics", TDF_TREE);
+				      "statistics", TDF_TREE, OPTGROUP_NONE);
 }
 
 /* Init the statistics.  */
Index: dce.c
===================================================================
--- dce.c	(revision 192991)
+++ dce.c	(working copy)
@@ -786,6 +786,7 @@ struct rtl_opt_pass pass_ud_rtl_dce =
  {
   RTL_PASS,
   "ud_dce",                             /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_ud_dce,                          /* gate */
   rest_of_handle_ud_dce,                /* execute */
   NULL,                                 /* sub */
@@ -1201,6 +1202,7 @@ struct rtl_opt_pass pass_fast_rtl_dce =
  {
   RTL_PASS,
   "rtl_dce",                            /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_fast_dce,                        /* gate */
   rest_of_handle_fast_dce,              /* execute */
   NULL,                                 /* sub */
Index: tree-ssanames.c
===================================================================
--- tree-ssanames.c	(revision 192991)
+++ tree-ssanames.c	(working copy)
@@ -451,6 +451,7 @@ struct gimple_opt_pass pass_release_ssa_names =
  {
   GIMPLE_PASS,
   "release_ssa",			/* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   NULL,					/* gate */
   release_dead_ssa_names,		/* execute */
   NULL,					/* sub */
Index: regcprop.c
===================================================================
--- regcprop.c	(revision 192991)
+++ regcprop.c	(working copy)
@@ -1235,6 +1235,7 @@ struct rtl_opt_pass pass_cprop_hardreg =
  {
   RTL_PASS,
   "cprop_hardreg",                      /* name */
+  OPTGROUP_NONE,                        /* optinfo_flags */
   gate_handle_cprop,                    /* gate */
   copyprop_hardreg_forward,             /* execute */
   NULL,                                 /* sub */

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-11-01  7:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-30  9:06 [PATCH] pass filtering for -fopt-info Sharad Singhai
2012-10-30 15:37 ` Richard Biener
2012-10-30 16:18   ` Xinliang David Li
2012-10-31  8:18     ` Sharad Singhai
2012-10-31 11:56       ` Richard Biener
2012-11-01  7:51         ` Sharad Singhai
2012-10-30 16:02 ` Xinliang David Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).