diff options
119 files changed, 458 insertions, 82 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e9b86cc..64b2cbe36 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,30 @@ +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. + 2012-11-01 Joern Rennecke <joern.rennecke@embecosm.com> PR target/55160 diff --git a/gcc/auto-inc-dec.c b/gcc/auto-inc-dec.c index b1074f9..810e9f2 100644 --- a/gcc/auto-inc-dec.c +++ b/gcc/auto-inc-dec.c @@ -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 */ diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c index 6c6b456..fd353f6 100644 --- a/gcc/bb-reorder.c +++ b/gcc/bb-reorder.c @@ -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 */ diff --git a/gcc/bt-load.c b/gcc/bt-load.c index 2aeb1c0..35236fd 100644 --- a/gcc/bt-load.c +++ b/gcc/bt-load.c @@ -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_optimize1 = { 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_optimize2 = { 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 */ diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index 74ea302..ab882d2 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -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 */ diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 5c06c1f..e501b4b 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -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 */ diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index 5eec5e0..9c8eea7 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -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 */ diff --git a/gcc/cgraphbuild.c b/gcc/cgraphbuild.c index 57167fd..024424d 100644 --- a/gcc/cgraphbuild.c +++ b/gcc/cgraphbuild.c @@ -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_edges = { GIMPLE_PASS, "*remove_cgraph_callee_edges", /* name */ + OPTGROUP_NONE, /* optinfo_flags */ NULL, /* gate */ remove_cgraph_callee_edges, /* execute */ NULL, /* sub */ diff --git a/gcc/combine-stack-adj.c b/gcc/combine-stack-adj.c index ff66096..ca94515 100644 --- a/gcc/combine-stack-adj.c +++ b/gcc/combine-stack-adj.c @@ -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 */ diff --git a/gcc/combine.c b/gcc/combine.c index 5bbf0bd..214a466 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -13817,6 +13817,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 */ diff --git a/gcc/compare-elim.c b/gcc/compare-elim.c index b021e8d..1761d0d 100644 --- a/gcc/compare-elim.c +++ b/gcc/compare-elim.c @@ -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 */ diff --git a/gcc/config/epiphany/mode-switch-use.c b/gcc/config/epiphany/mode-switch-use.c index a7020f4..ef89004 100644 --- a/gcc/config/epiphany/mode-switch-use.c +++ b/gcc/config/epiphany/mode-switch-use.c @@ -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 */ diff --git a/gcc/config/epiphany/resolve-sw-modes.c b/gcc/config/epiphany/resolve-sw-modes.c index 14c64d4..86cc5b1 100644 --- a/gcc/config/epiphany/resolve-sw-modes.c +++ b/gcc/config/epiphany/resolve-sw-modes.c @@ -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 */ diff --git a/gcc/config/rl78/rl78.c b/gcc/config/rl78/rl78.c index 5e5050b..42a2839 100644 --- a/gcc/config/rl78/rl78.c +++ b/gcc/config/rl78/rl78.c @@ -133,6 +133,7 @@ static struct opt_pass rl78_devirt_pass = { RTL_PASS, "devirt", + OPTGROUP_NONE, /* optinfo_flags */ devirt_gate, devirt_pass, NULL, diff --git a/gcc/cprop.c b/gcc/cprop.c index e90a13c..7945342 100644 --- a/gcc/cprop.c +++ b/gcc/cprop.c @@ -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 */ @@ -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 */ @@ -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 */ diff --git a/gcc/df-core.c b/gcc/df-core.c index 2ac11e4..dd1060e 100644 --- a/gcc/df-core.c +++ b/gcc/df-core.c @@ -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 */ diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 720d42d..ff0c87d 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -6021,58 +6021,108 @@ Enable all the available tree dumps with the flags provided in this option. @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. - -The following options are available +@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 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 -O3 -fopt-info-missed=missed.all +@end smallexample +outputs missed optimization report from all the passes into +@file{missed.all}. + +As another example, @smallexample -gcc -O2 -ftree-vectorize -fopt-info-optall=opt.all +gcc -O3 -fopt-info-inline-optimized-missed=inline.txt @end smallexample -outputs detailed optimization report from all the passes into -@file{opt.all}. -@end table +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 +@end smallexample + +Note that @option{-fopt-info-vec-missed} behaves the same as +@option{-fopt-info-missed-vec}. -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, consider @smallexample -gcc -O3 -fopt-info-optimized-missed=optdump.txt +gcc -fopt-info-vec-missed=vec.miss -fopt-info-loop-optimized=loop.opt @end smallexample -This will output information about missed optimizations as well as -optimized locations from all the passes into @file{optdump.txt}. +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 @@ -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 */ diff --git a/gcc/dumpfile.c b/gcc/dumpfile.c index 0f36afa..55543cc 100644 --- a/gcc/dumpfile.c +++ b/gcc/dumpfile.c @@ -43,34 +43,35 @@ static FILE *dump_open_alternate_stream (struct dump_file_info *); 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_options[] = {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 *swtch, const char *glob, 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 loc, const char *format, ...) /* 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 @@ opt_info_enable_all (int ir_dump_type, int flags, const char *filename) 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 @@ opt_info_switch_p_1 (const char *arg, int *flags, char **filename) *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 @@ opt_info_switch_p_1 (const char *arg, int *flags, char **filename) 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 @@ opt_info_switch_p_1 (const char *arg, int *flags, char **filename) 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 @@ opt_info_switch_p_1 (const char *arg, int *flags, char **filename) 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. */ diff --git a/gcc/dumpfile.h b/gcc/dumpfile.h index b2efc80..bcef9c6 100644 --- a/gcc/dumpfile.h +++ b/gcc/dumpfile.h @@ -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_location, int, gimple, int); 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) { diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c index 355c746..7c53160 100644 --- a/gcc/dwarf2cfi.c +++ b/gcc/dwarf2cfi.c @@ -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 */ diff --git a/gcc/except.c b/gcc/except.c index 7e18c19..9cd3391 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -1920,6 +1920,7 @@ struct rtl_opt_pass pass_set_nothrow_function_flags = { 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_ranges = { RTL_PASS, "eh_ranges", /* name */ + OPTGROUP_NONE, /* optinfo_flags */ gate_convert_to_eh_region_ranges, /* gate */ convert_to_eh_region_ranges, /* execute */ NULL, /* sub */ diff --git a/gcc/final.c b/gcc/final.c index ceb688e..f414dd0 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -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 */ diff --git a/gcc/function.c b/gcc/function.c index 8a3904b..127e428 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -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_epilogue = { 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 */ diff --git a/gcc/fwprop.c b/gcc/fwprop.c index cb571cd..545bd15 100644 --- a/gcc/fwprop.c +++ b/gcc/fwprop.c @@ -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 */ @@ -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 */ diff --git a/gcc/gimple-low.c b/gcc/gimple-low.c index 677e41f..8557c83 100644 --- a/gcc/gimple-low.c +++ b/gcc/gimple-low.c @@ -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 */ diff --git a/gcc/gimple-ssa-strength-reduction.c b/gcc/gimple-ssa-strength-reduction.c index 0523854..ad02589 100644 --- a/gcc/gimple-ssa-strength-reduction.c +++ b/gcc/gimple-ssa-strength-reduction.c @@ -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 */ diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index 5654c66..2365e74 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -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 */ diff --git a/gcc/init-regs.c b/gcc/init-regs.c index 594b6e6..003f8e0 100644 --- a/gcc/init-regs.c +++ b/gcc/init-regs.c @@ -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 */ diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index 8f8053f..456a007 100644 --- a/gcc/ipa-cp.c +++ b/gcc/ipa-cp.c @@ -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 */ diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c index 3de1439..9db7f1c 100644 --- a/gcc/ipa-inline-analysis.c +++ b/gcc/ipa-inline-analysis.c @@ -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 */ diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index cd58d33..5154273 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -2019,6 +2019,7 @@ struct gimple_opt_pass pass_early_inline = { GIMPLE_PASS, "einline", /* name */ + OPTGROUP_INLINE, /* optinfo_flags */ NULL, /* gate */ early_inliner, /* execute */ NULL, /* sub */ @@ -2051,6 +2052,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 */ diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c index c4f23d9..58f9e5a 100644 --- a/gcc/ipa-pure-const.c +++ b/gcc/ipa-pure-const.c @@ -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 */ diff --git a/gcc/ipa-reference.c b/gcc/ipa-reference.c index a17d75b..06dc18b2 100644 --- a/gcc/ipa-reference.c +++ b/gcc/ipa-reference.c @@ -1181,6 +1181,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 */ diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c index 6750c11..440b3f9 100644 --- a/gcc/ipa-split.c +++ b/gcc/ipa-split.c @@ -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_functions = { GIMPLE_PASS, "feedback_fnsplit", /* name */ + OPTGROUP_NONE, /* optinfo_flags */ gate_feedback_split_functions, /* gate */ execute_feedback_split_functions, /* execute */ NULL, /* sub */ @@ -948,6 +948,7 @@ struct simple_ipa_opt_pass pass_ipa_function_and_variable_visibility = { SIMPLE_IPA_PASS, "visibility", /* name */ + OPTGROUP_NONE, /* optinfo_flags */ NULL, /* gate */ local_function_and_variable_visibility,/* execute */ NULL, /* sub */ @@ -977,6 +978,7 @@ struct simple_ipa_opt_pass pass_ipa_free_inline_summary = { SIMPLE_IPA_PASS, "*free_inline_summary", /* name */ + OPTGROUP_NONE, /* optinfo_flags */ NULL, /* gate */ free_inline_summary, /* execute */ NULL, /* sub */ @@ -1015,6 +1017,7 @@ struct ipa_opt_pass_d pass_ipa_whole_program_visibility = { 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 */ @@ -1098,6 +1101,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 */ @@ -1408,6 +1412,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 */ @@ -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 */ @@ -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 */ diff --git a/gcc/loop-init.c b/gcc/loop-init.c index 438c66e..f140686 100644 --- a/gcc/loop-init.c +++ b/gcc/loop-init.c @@ -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 */ diff --git a/gcc/lower-subreg.c b/gcc/lower-subreg.c index 06c0b57..4d1830c 100644 --- a/gcc/lower-subreg.c +++ b/gcc/lower-subreg.c @@ -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 */ diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index 4467eb4..6b689ee 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -1009,6 +1009,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 */ @@ -1424,6 +1425,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 */ diff --git a/gcc/mode-switching.c b/gcc/mode-switching.c index 61afdc8..d8f8ba5 100644 --- a/gcc/mode-switching.c +++ b/gcc/mode-switching.c @@ -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 */ diff --git a/gcc/modulo-sched.c b/gcc/modulo-sched.c index 88ac28d..1979f44 100644 --- a/gcc/modulo-sched.c +++ b/gcc/modulo-sched.c @@ -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 */ diff --git a/gcc/omp-low.c b/gcc/omp-low.c index 4d32fb6..a598413 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -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 */ diff --git a/gcc/opts-global.c b/gcc/opts-global.c index ccbfeef..5ebc630 100644 --- a/gcc/opts-global.c +++ b/gcc/opts-global.c @@ -240,7 +240,7 @@ read_cmdline_options (struct gcc_options *opts, struct gcc_options *opts_set, 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 *arg) 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; diff --git a/gcc/passes.c b/gcc/passes.c index 7ab58aa..67aae52 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -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_optimizations = { 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_optimizations = { 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_optimizations_g = { 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_compilation = { 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); diff --git a/gcc/postreload-gcse.c b/gcc/postreload-gcse.c index ab4f851..6a5ea7d 100644 --- a/gcc/postreload-gcse.c +++ b/gcc/postreload-gcse.c @@ -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 */ diff --git a/gcc/postreload.c b/gcc/postreload.c index 38be0ab..d268218 100644 --- a/gcc/postreload.c +++ b/gcc/postreload.c @@ -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 */ diff --git a/gcc/predict.c b/gcc/predict.c index 4917399..9fc3e71 100644 --- a/gcc/predict.c +++ b/gcc/predict.c @@ -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 */ diff --git a/gcc/recog.c b/gcc/recog.c index 4186183..2cc45c9 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -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_branches = { RTL_PASS, "split5", /* name */ + OPTGROUP_NONE, /* optinfo_flags */ gate_do_final_split, /* gate */ split_all_insns_noflow, /* execute */ NULL, /* sub */ @@ -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 */ diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c index 7975865..c23c770 100644 --- a/gcc/reg-stack.c +++ b/gcc/reg-stack.c @@ -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 */ diff --git a/gcc/regcprop.c b/gcc/regcprop.c index c2fc79d..b91f546 100644 --- a/gcc/regcprop.c +++ b/gcc/regcprop.c @@ -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 */ diff --git a/gcc/reginfo.c b/gcc/reginfo.c index 076036c..9fba9c3 100644 --- a/gcc/reginfo.c +++ b/gcc/reginfo.c @@ -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 */ diff --git a/gcc/regmove.c b/gcc/regmove.c index 408366d..29f6e65 100644 --- a/gcc/regmove.c +++ b/gcc/regmove.c @@ -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 */ diff --git a/gcc/regrename.c b/gcc/regrename.c index 9a6545a..10787a2 100644 --- a/gcc/regrename.c +++ b/gcc/regrename.c @@ -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 */ diff --git a/gcc/reorg.c b/gcc/reorg.c index e07b834..aa6ad78 100644 --- a/gcc/reorg.c +++ b/gcc/reorg.c @@ -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 */ diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c index a0e62b6..3fb370c 100644 --- a/gcc/sched-rgn.c +++ b/gcc/sched-rgn.c @@ -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 */ diff --git a/gcc/stack-ptr-mod.c b/gcc/stack-ptr-mod.c index 1b339cd..3f126c3 100644 --- a/gcc/stack-ptr-mod.c +++ b/gcc/stack-ptr-mod.c @@ -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 */ diff --git a/gcc/statistics.c b/gcc/statistics.c index 1b3eefb..f0687c7 100644 --- a/gcc/statistics.c +++ b/gcc/statistics.c @@ -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. */ diff --git a/gcc/store-motion.c b/gcc/store-motion.c index f6712f4..20bc24e 100644 --- a/gcc/store-motion.c +++ b/gcc/store-motion.c @@ -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 */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 926b179..04a768c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2012-11-01 Sharad Singhai <singhai@google.com> + + * 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. + 2012-10-31 Dehao Chen <dehao@google.com> * g++.dg/debug/dwarf2/block.C: New testcase. diff --git a/gcc/testsuite/g++.dg/plugin/dumb_plugin.c b/gcc/testsuite/g++.dg/plugin/dumb_plugin.c index 8913e86..0f15140 100644 --- a/gcc/testsuite/g++.dg/plugin/dumb_plugin.c +++ b/gcc/testsuite/g++.dg/plugin/dumb_plugin.c @@ -62,6 +62,7 @@ static struct gimple_opt_pass pass_dumb_plugin_example = { GIMPLE_PASS, "dumb_plugin_example", /* name */ + OPTGROUP_NONE, /* optinfo_flags */ gate_dumb_plugin_example, /* gate */ execute_dumb_plugin_example, /* execute */ NULL, /* sub */ diff --git a/gcc/testsuite/g++.dg/plugin/selfassign.c b/gcc/testsuite/g++.dg/plugin/selfassign.c index 2c41774..37a0a97 100644 --- a/gcc/testsuite/g++.dg/plugin/selfassign.c +++ b/gcc/testsuite/g++.dg/plugin/selfassign.c @@ -268,6 +268,7 @@ static struct gimple_opt_pass pass_warn_self_assign = { GIMPLE_PASS, "warn_self_assign", /* name */ + OPTGROUP_NONE, /* optinfo_flags */ gate_warn_self_assign, /* gate */ execute_warn_self_assign, /* execute */ NULL, /* sub */ diff --git a/gcc/testsuite/gcc.dg/plugin/one_time_plugin.c b/gcc/testsuite/gcc.dg/plugin/one_time_plugin.c index 4bd99f1..45e6257 100644 --- a/gcc/testsuite/gcc.dg/plugin/one_time_plugin.c +++ b/gcc/testsuite/gcc.dg/plugin/one_time_plugin.c @@ -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 */ diff --git a/gcc/testsuite/gcc.dg/plugin/selfassign.c b/gcc/testsuite/gcc.dg/plugin/selfassign.c index 2c41774..37a0a97 100644 --- a/gcc/testsuite/gcc.dg/plugin/selfassign.c +++ b/gcc/testsuite/gcc.dg/plugin/selfassign.c @@ -268,6 +268,7 @@ static struct gimple_opt_pass pass_warn_self_assign = { GIMPLE_PASS, "warn_self_assign", /* name */ + OPTGROUP_NONE, /* optinfo_flags */ gate_warn_self_assign, /* gate */ execute_warn_self_assign, /* execute */ NULL, /* sub */ diff --git a/gcc/tracer.c b/gcc/tracer.c index cbd5aac..55cff11 100644 --- a/gcc/tracer.c +++ b/gcc/tracer.c @@ -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 */ diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c index 211c45e..b9774d4 100644 --- a/gcc/trans-mem.c +++ b/gcc/trans-mem.c @@ -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 */ diff --git a/gcc/tree-call-cdce.c b/gcc/tree-call-cdce.c index 2a3fd87..12357eb 100644 --- a/gcc/tree-call-cdce.c +++ b/gcc/tree-call-cdce.c @@ -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 */ diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 7fc5a53..28cdca3 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -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 */ diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c index 9c52286..412033d 100644 --- a/gcc/tree-cfgcleanup.c +++ b/gcc/tree-cfgcleanup.c @@ -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 */ diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c index c6c5227..26bb25a 100644 --- a/gcc/tree-complex.c +++ b/gcc/tree-complex.c @@ -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 */ diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c index 960a966..a778be5 100644 --- a/gcc/tree-eh.c +++ b/gcc/tree-eh.c @@ -2140,6 +2140,7 @@ struct gimple_opt_pass pass_lower_eh = { GIMPLE_PASS, "eh", /* name */ + OPTGROUP_NONE, /* optinfo_flags */ NULL, /* gate */ lower_eh_constructs, /* execute */ NULL, /* sub */ @@ -2999,6 +3000,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 */ @@ -3207,6 +3209,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 */ @@ -3503,6 +3506,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 */ @@ -4326,6 +4330,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 */ diff --git a/gcc/tree-emutls.c b/gcc/tree-emutls.c index d2cd4ea..7b058b1 100644 --- a/gcc/tree-emutls.c +++ b/gcc/tree-emutls.c @@ -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 */ diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c index e9f65ad..0afbcde 100644 --- a/gcc/tree-if-conv.c +++ b/gcc/tree-if-conv.c @@ -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 */ diff --git a/gcc/tree-into-ssa.c b/gcc/tree-into-ssa.c index b3e887b..16c0214 100644 --- a/gcc/tree-into-ssa.c +++ b/gcc/tree-into-ssa.c @@ -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 */ diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c index 1ffc434..10bd29e 100644 --- a/gcc/tree-loop-distribution.c +++ b/gcc/tree-loop-distribution.c @@ -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 */ diff --git a/gcc/tree-mudflap.c b/gcc/tree-mudflap.c index 775f8b9..53fba71 100644 --- a/gcc/tree-mudflap.c +++ b/gcc/tree-mudflap.c @@ -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 */ diff --git a/gcc/tree-nomudflap.c b/gcc/tree-nomudflap.c index b7a41e1..07cf00f 100644 --- a/gcc/tree-nomudflap.c +++ b/gcc/tree-nomudflap.c @@ -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 */ diff --git a/gcc/tree-nrv.c b/gcc/tree-nrv.c index f1c52d1..c471a72 100644 --- a/gcc/tree-nrv.c +++ b/gcc/tree-nrv.c @@ -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 */ diff --git a/gcc/tree-object-size.c b/gcc/tree-object-size.c index 9a537f1..ffc3fdd 100644 --- a/gcc/tree-object-size.c +++ b/gcc/tree-object-size.c @@ -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 */ diff --git a/gcc/tree-optimize.c b/gcc/tree-optimize.c index 3e7ca89..a918101 100644 --- a/gcc/tree-optimize.c +++ b/gcc/tree-optimize.c @@ -95,6 +95,7 @@ struct gimple_opt_pass pass_cleanup_cfg_post_optimizing = { 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 */ diff --git a/gcc/tree-pass.h b/gcc/tree-pass.h index 1627a84..8ed2d98 100644 --- a/gcc/tree-pass.h +++ b/gcc/tree-pass.h @@ -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); diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c index fa8173e..d004fac 100644 --- a/gcc/tree-profile.c +++ b/gcc/tree-profile.c @@ -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 */ diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index bf1a0f2..8dd5cb4 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -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 */ diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index 49a4c6f..cb6b62b 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -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 */ diff --git a/gcc/tree-ssa-copy.c b/gcc/tree-ssa-copy.c index 04a376e..3dcbf79 100644 --- a/gcc/tree-ssa-copy.c +++ b/gcc/tree-ssa-copy.c @@ -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 */ diff --git a/gcc/tree-ssa-copyrename.c b/gcc/tree-ssa-copyrename.c index 387e67b..47bb9b8 100644 --- a/gcc/tree-ssa-copyrename.c +++ b/gcc/tree-ssa-copyrename.c @@ -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 */ diff --git a/gcc/tree-ssa-dce.c b/gcc/tree-ssa-dce.c index 0a98d52..35d6703 100644 --- a/gcc/tree-ssa-dce.c +++ b/gcc/tree-ssa-dce.c @@ -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 */ diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c index 19eca42..7322b58 100644 --- a/gcc/tree-ssa-dom.c +++ b/gcc/tree-ssa-dom.c @@ -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 */ diff --git a/gcc/tree-ssa-dse.c b/gcc/tree-ssa-dse.c index f9a0b85..55c37a0 100644 --- a/gcc/tree-ssa-dse.c +++ b/gcc/tree-ssa-dse.c @@ -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 */ diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c index f193fa9..246fc84 100644 --- a/gcc/tree-ssa-forwprop.c +++ b/gcc/tree-ssa-forwprop.c @@ -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 */ diff --git a/gcc/tree-ssa-ifcombine.c b/gcc/tree-ssa-ifcombine.c index 5c61f7f..19143b1 100644 --- a/gcc/tree-ssa-ifcombine.c +++ b/gcc/tree-ssa-ifcombine.c @@ -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 */ diff --git a/gcc/tree-ssa-loop-ch.c b/gcc/tree-ssa-loop-ch.c index c43819ab..7afcc91 100644 --- a/gcc/tree-ssa-loop-ch.c +++ b/gcc/tree-ssa-loop-ch.c @@ -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 */ diff --git a/gcc/tree-ssa-loop.c b/gcc/tree-ssa-loop.c index 6dc64b0..99219b6 100644 --- a/gcc/tree-ssa-loop.c +++ b/gcc/tree-ssa-loop.c @@ -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 */ diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c index d9f4e9e..01b1d17 100644 --- a/gcc/tree-ssa-math-opts.c +++ b/gcc/tree-ssa-math-opts.c @@ -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 */ diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c index 5864d68..e084a22 100644 --- a/gcc/tree-ssa-phiopt.c +++ b/gcc/tree-ssa-phiopt.c @@ -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 */ diff --git a/gcc/tree-ssa-phiprop.c b/gcc/tree-ssa-phiprop.c index 2f0b3bb..38fcf5d 100644 --- a/gcc/tree-ssa-phiprop.c +++ b/gcc/tree-ssa-phiprop.c @@ -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 */ diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c index 13b3433..c8f39c7 100644 --- a/gcc/tree-ssa-pre.c +++ b/gcc/tree-ssa-pre.c @@ -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 */ diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c index 67c5c12..1ff23ca 100644 --- a/gcc/tree-ssa-reassoc.c +++ b/gcc/tree-ssa-reassoc.c @@ -4300,6 +4300,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 */ diff --git a/gcc/tree-ssa-sink.c b/gcc/tree-ssa-sink.c index 2d2c370..1d965d8 100644 --- a/gcc/tree-ssa-sink.c +++ b/gcc/tree-ssa-sink.c @@ -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 */ diff --git a/gcc/tree-ssa-strlen.c b/gcc/tree-ssa-strlen.c index d2b6e25..9d288b3 100644 --- a/gcc/tree-ssa-strlen.c +++ b/gcc/tree-ssa-strlen.c @@ -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 */ diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 8bfceb6..01a4045 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -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 */ diff --git a/gcc/tree-ssa-uncprop.c b/gcc/tree-ssa-uncprop.c index b5e1edf..aeeaa04 100644 --- a/gcc/tree-ssa-uncprop.c +++ b/gcc/tree-ssa-uncprop.c @@ -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 */ diff --git a/gcc/tree-ssa-uninit.c b/gcc/tree-ssa-uninit.c index cc58870..407520b 100644 --- a/gcc/tree-ssa-uninit.c +++ b/gcc/tree-ssa-uninit.c @@ -2037,6 +2037,7 @@ struct gimple_opt_pass pass_late_warn_uninitialized = { GIMPLE_PASS, "uninit", /* name */ + OPTGROUP_NONE, /* optinfo_flags */ gate_warn_uninitialized, /* gate */ execute_late_warn_uninitialized, /* execute */ NULL, /* sub */ diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c index 7ba11e1..fab0a3b 100644 --- a/gcc/tree-ssa.c +++ b/gcc/tree-ssa.c @@ -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_uninitialized = { 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 */ diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c index 57a1b48..6eb6451 100644 --- a/gcc/tree-ssanames.c +++ b/gcc/tree-ssanames.c @@ -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 */ diff --git a/gcc/tree-stdarg.c b/gcc/tree-stdarg.c index fca2e8e..1b0e6d3 100644 --- a/gcc/tree-stdarg.c +++ b/gcc/tree-stdarg.c @@ -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 */ diff --git a/gcc/tree-switch-conversion.c b/gcc/tree-switch-conversion.c index bbbd3ca..a35df7c 100644 --- a/gcc/tree-switch-conversion.c +++ b/gcc/tree-switch-conversion.c @@ -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 */ diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c index 7ee00a2..5b1fd2b 100644 --- a/gcc/tree-tailcall.c +++ b/gcc/tree-tailcall.c @@ -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 */ diff --git a/gcc/tree-vect-generic.c b/gcc/tree-vect-generic.c index d950d81..9d54bdd 100644 --- a/gcc/tree-vect-generic.c +++ b/gcc/tree-vect-generic.c @@ -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 */ diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c index a74ad9d..b9bc001 100644 --- a/gcc/tree-vectorizer.c +++ b/gcc/tree-vectorizer.c @@ -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_alignment = { SIMPLE_IPA_PASS, "increase_alignment", /* name */ + OPTGROUP_LOOP + | OPTGROUP_VEC, /* optinfo_flags */ gate_increase_alignment, /* gate */ increase_alignment, /* execute */ NULL, /* sub */ diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index 6547ed6..852dd50 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -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 */ @@ -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 */ diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c index d5ab1d1..b64604b 100644 --- a/gcc/var-tracking.c +++ b/gcc/var-tracking.c @@ -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 */ @@ -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 */ |