+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
{
RTL_PASS,
"auto_inc_dec", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_auto_inc_dec, /* gate */
rest_of_handle_auto_inc_dec, /* execute */
NULL, /* sub */
{
RTL_PASS,
"bbro", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_handle_reorder_blocks, /* gate */
rest_of_handle_reorder_blocks, /* execute */
NULL, /* sub */
{
RTL_PASS,
"compgotos", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_duplicate_computed_gotos, /* gate */
duplicate_computed_gotos, /* execute */
NULL, /* sub */
{
RTL_PASS,
"bbpart", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_handle_partition_blocks, /* gate */
partition_hot_cold_basic_blocks, /* execute */
NULL, /* sub */
+
/* Perform branch target register load optimizations.
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
{
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 */
{
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 */
{
RTL_PASS,
"jump", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
execute_jump, /* execute */
NULL, /* sub */
{
RTL_PASS,
"jump2", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
execute_jump2, /* execute */
NULL, /* sub */
{
RTL_PASS,
"expand", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
gimple_expand_cfg, /* execute */
NULL, /* sub */
{
RTL_PASS,
"*free_cfg", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
rest_of_pass_free_cfg, /* execute */
NULL, /* sub */
{
RTL_PASS,
"into_cfglayout", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
into_cfg_layout_mode, /* execute */
NULL, /* sub */
{
RTL_PASS,
"outof_cfglayout", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
outof_cfg_layout_mode, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"*build_cgraph_edges", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
build_cgraph_edges, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"*rebuild_cgraph_edges", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
rebuild_cgraph_edges, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"*remove_cgraph_callee_edges", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
remove_cgraph_callee_edges, /* execute */
NULL, /* sub */
{
RTL_PASS,
"csa", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_handle_stack_adjustments, /* gate */
rest_of_handle_stack_adjustments, /* execute */
NULL, /* sub */
{
RTL_PASS,
"combine", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_handle_combine, /* gate */
rest_of_handle_combine, /* execute */
NULL, /* sub */
{
RTL_PASS,
"cmpelim", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_compare_elim_after_reload, /* gate */
execute_compare_elim_after_reload, /* execute */
NULL, /* sub */
{
RTL_PASS,
"mode_switch_use", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
insert_uses, /* execute */
NULL, /* sub */
{
RTL_PASS,
"resolve_sw_modes", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_resolve_sw_modes, /* gate */
resolve_sw_modes, /* execute */
NULL, /* sub */
{
RTL_PASS,
"devirt",
+ OPTGROUP_NONE, /* optinfo_flags */
devirt_gate,
devirt_pass,
NULL,
{
RTL_PASS,
"cprop", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_rtl_cprop, /* gate */
execute_rtl_cprop, /* execute */
NULL, /* sub */
{
RTL_PASS,
"cse1", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_handle_cse, /* gate */
rest_of_handle_cse, /* execute */
NULL, /* sub */
{
RTL_PASS,
"cse2", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_handle_cse2, /* gate */
rest_of_handle_cse2, /* execute */
NULL, /* sub */
{
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 */
{
RTL_PASS,
"ud_dce", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_ud_dce, /* gate */
rest_of_handle_ud_dce, /* execute */
NULL, /* sub */
{
RTL_PASS,
"rtl_dce", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_fast_dce, /* gate */
rest_of_handle_fast_dce, /* execute */
NULL, /* sub */
{
RTL_PASS,
"dfinit", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_opt, /* gate */
rest_of_handle_df_initialize, /* execute */
NULL, /* sub */
{
RTL_PASS,
"no-opt dfinit", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_no_opt, /* gate */
rest_of_handle_df_initialize, /* execute */
NULL, /* sub */
{
RTL_PASS,
"dfinish", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
rest_of_handle_df_finish, /* execute */
NULL, /* sub */
@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
{
RTL_PASS,
"dse1", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_dse1, /* gate */
rest_of_handle_dse, /* execute */
NULL, /* sub */
{
RTL_PASS,
"dse2", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_dse2, /* gate */
rest_of_handle_dse, /* execute */
NULL, /* sub */
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. */
{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++;
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;
/* 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)
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;
}
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
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
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;
*filename = NULL;
*flags = 0;
+ *optgroup_flags = 0;
if (!ptr)
- return 1;
+ return 1; /* Handle '-fopt-info' without any additional options. */
while (*ptr)
{
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))
{
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
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;
}
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. */
#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 */
/* 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 */
#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
{
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 */
};
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 */
/* 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)
{
{
RTL_PASS,
"dwarf2", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_dwarf2_frame, /* gate */
execute_dwarf2_frame, /* execute */
NULL, /* sub */
{
RTL_PASS,
"nothrow", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
set_nothrow_function_flags, /* execute */
NULL, /* sub */
{
RTL_PASS,
"eh_ranges", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_convert_to_eh_region_ranges, /* gate */
convert_to_eh_region_ranges, /* execute */
NULL, /* sub */
{
RTL_PASS,
"alignments", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
compute_alignments, /* execute */
NULL, /* sub */
{
RTL_PASS,
"final", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
rest_of_handle_final, /* execute */
NULL, /* sub */
{
RTL_PASS,
"shorten", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
rest_of_handle_shorten_branches, /* execute */
NULL, /* sub */
{
RTL_PASS,
"*clean_state", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
rest_of_clean_state, /* execute */
NULL, /* sub */
{
RTL_PASS,
"vregs", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
instantiate_virtual_regs, /* execute */
NULL, /* sub */
{
RTL_PASS,
"*leaf_regs", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
rest_of_handle_check_leaf_regs, /* execute */
NULL, /* sub */
{
RTL_PASS,
"pro_and_epilogue", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
rest_of_handle_thread_prologue_and_epilogue, /* execute */
NULL, /* sub */
{
RTL_PASS,
"asmcons", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
rest_of_match_asm_constraints, /* execute */
NULL, /* sub */
{
RTL_PASS,
"fwprop1", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_fwprop, /* gate */
fwprop, /* execute */
NULL, /* sub */
{
RTL_PASS,
"fwprop2", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_fwprop, /* gate */
fwprop_addr, /* execute */
NULL, /* sub */
{
RTL_PASS,
"rtl pre", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_rtl_pre, /* gate */
execute_rtl_pre, /* execute */
NULL, /* sub */
{
RTL_PASS,
"hoist", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_rtl_hoist, /* gate */
execute_rtl_hoist, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"lower", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
lower_function_body, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"slsr", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_strength_reduction, /* gate */
execute_strength_reduction, /* execute */
NULL, /* sub */
{
RTL_PASS,
"ce1", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_handle_if_conversion, /* gate */
rest_of_handle_if_conversion, /* execute */
NULL, /* sub */
{
RTL_PASS,
"ce2", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_handle_if_after_combine, /* gate */
rest_of_handle_if_after_combine, /* execute */
NULL, /* sub */
{
RTL_PASS,
"ce3", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_handle_if_after_reload, /* gate */
rest_of_handle_if_after_reload, /* execute */
NULL, /* sub */
{
RTL_PASS,
"init-regs", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_initialize_regs, /* gate */
rest_of_handle_initialize_regs, /* execute */
NULL, /* sub */
{
IPA_PASS,
"cp", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
cgraph_gate_cp, /* gate */
ipcp_driver, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"inline_param", /* name */
+ OPTGROUP_INLINE, /* optinfo_flags */
NULL, /* gate */
compute_inline_parameters_for_current,/* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"einline", /* name */
+ OPTGROUP_INLINE, /* optinfo_flags */
NULL, /* gate */
early_inliner, /* execute */
NULL, /* sub */
{
IPA_PASS,
"inline", /* name */
+ OPTGROUP_INLINE, /* optinfo_flags */
gate_ipa_inline, /* gate */
ipa_inline, /* execute */
NULL, /* sub */
{
IPA_PASS,
"pure-const", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_pure_const, /* gate */
propagate, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"local-pure-const", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_pure_const, /* gate */
local_pure_const, /* execute */
NULL, /* sub */
{
IPA_PASS,
"static-var", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_reference, /* gate */
propagate, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"fnsplit", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_split_functions, /* gate */
execute_split_functions, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"feedback_fnsplit", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_feedback_split_functions, /* gate */
execute_feedback_split_functions, /* execute */
NULL, /* sub */
{
SIMPLE_IPA_PASS,
"visibility", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
local_function_and_variable_visibility,/* execute */
NULL, /* sub */
{
SIMPLE_IPA_PASS,
"*free_inline_summary", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
free_inline_summary, /* execute */
NULL, /* sub */
{
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 */
{
IPA_PASS,
"profile_estimate", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_ipa_profile, /* gate */
ipa_profile, /* execute */
NULL, /* sub */
{
IPA_PASS,
"cdtor", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_ipa_cdtor_merge, /* gate */
ipa_cdtor_merge, /* execute */
NULL, /* sub */
{
RTL_PASS,
"ira", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
rest_of_handle_ira, /* execute */
NULL, /* sub */
{
RTL_PASS,
"reload", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
rest_of_handle_reload, /* execute */
NULL, /* sub */
{
RTL_PASS,
"barriers", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
cleanup_barriers, /* execute */
NULL, /* sub */
{
RTL_PASS,
"loop2", /* name */
+ OPTGROUP_LOOP, /* optinfo_flags */
gate_handle_loop2, /* gate */
NULL, /* execute */
NULL, /* sub */
{
RTL_PASS,
"loop2_init", /* name */
+ OPTGROUP_LOOP, /* optinfo_flags */
NULL, /* gate */
rtl_loop_init, /* execute */
NULL, /* sub */
{
RTL_PASS,
"loop2_done", /* name */
+ OPTGROUP_LOOP, /* optinfo_flags */
NULL, /* gate */
rtl_loop_done, /* execute */
NULL, /* sub */
{
RTL_PASS,
"loop2_invariant", /* name */
+ OPTGROUP_LOOP, /* optinfo_flags */
gate_rtl_move_loop_invariants, /* gate */
rtl_move_loop_invariants, /* execute */
NULL, /* sub */
{
RTL_PASS,
"loop2_unswitch", /* name */
+ OPTGROUP_LOOP, /* optinfo_flags */
gate_rtl_unswitch, /* gate */
rtl_unswitch, /* execute */
NULL, /* sub */
{
RTL_PASS,
"loop2_unroll", /* name */
+ OPTGROUP_LOOP, /* optinfo_flags */
gate_rtl_unroll_and_peel_loops, /* gate */
rtl_unroll_and_peel_loops, /* execute */
NULL, /* sub */
{
RTL_PASS,
"loop2_doloop", /* name */
+ OPTGROUP_LOOP, /* optinfo_flags */
gate_rtl_doloop, /* gate */
rtl_doloop, /* execute */
NULL, /* sub */
{
RTL_PASS,
"subreg1", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_handle_lower_subreg, /* gate */
rest_of_handle_lower_subreg, /* execute */
NULL, /* sub */
{
RTL_PASS,
"subreg2", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_handle_lower_subreg, /* gate */
rest_of_handle_lower_subreg2, /* execute */
NULL, /* sub */
{
IPA_PASS,
"lto_gimple_out", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_lto_out, /* gate */
NULL, /* execute */
NULL, /* sub */
{
IPA_PASS,
"lto_decls_out", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_lto_out, /* gate */
NULL, /* execute */
NULL, /* sub */
{
RTL_PASS,
"mode_sw", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_mode_switching, /* gate */
rest_of_handle_mode_switching, /* execute */
NULL, /* sub */
{
RTL_PASS,
"sms", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_handle_sms, /* gate */
rest_of_handle_sms, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"ompexp", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_expand_omp, /* gate */
execute_expand_omp, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"omplower", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
execute_lower_omp, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"*diagnose_omp_blocks", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_diagnose_omp_blocks, /* gate */
diagnose_omp_structured_block_errors, /* execute */
NULL, /* sub */
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)
remapped_opt_info = "missed";
break;
default:
- remapped_opt_info = "optall";
+ remapped_opt_info = "all";
break;
}
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;
/* Global variables used to communicate with passes. */
-int dump_flags;
bool in_gimple_form;
bool first_pass_instance;
{
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 */
{
GIMPLE_PASS,
"early_optimizations", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_all_early_optimizations, /* gate */
NULL, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"*all_optimizations", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_all_optimizations, /* gate */
NULL, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"*all_optimizations_g", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_all_optimizations_g, /* gate */
NULL, /* execute */
NULL, /* sub */
{
RTL_PASS,
"*rest_of_compilation", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_rest_of_compilation, /* gate */
NULL, /* execute */
NULL, /* sub */
{
RTL_PASS,
"*all-postreload", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_postreload, /* gate */
NULL, /* execute */
NULL, /* sub */
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';
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);
{
RTL_PASS,
"gcse2", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_handle_gcse2, /* gate */
rest_of_handle_gcse2, /* execute */
NULL, /* sub */
{
RTL_PASS,
"postreload", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_handle_postreload, /* gate */
rest_of_handle_postreload, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"profile_estimate", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_estimate_probability, /* gate */
tree_estimate_probability_driver, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"*strip_predict_hints", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
strip_predict_hints, /* execute */
NULL, /* sub */
{
RTL_PASS,
"peephole2", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_handle_peephole2, /* gate */
rest_of_handle_peephole2, /* execute */
NULL, /* sub */
{
RTL_PASS,
"split1", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
rest_of_handle_split_all_insns, /* execute */
NULL, /* sub */
{
RTL_PASS,
"split2", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
rest_of_handle_split_after_reload, /* execute */
NULL, /* sub */
{
RTL_PASS,
"split3", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_handle_split_before_regstack, /* gate */
rest_of_handle_split_before_regstack, /* execute */
NULL, /* sub */
{
RTL_PASS,
"split4", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_handle_split_before_sched2, /* gate */
rest_of_handle_split_before_sched2, /* execute */
NULL, /* sub */
{
RTL_PASS,
"split5", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_do_final_split, /* gate */
split_all_insns_noflow, /* execute */
NULL, /* sub */
{
RTL_PASS,
"ree", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_handle_ree, /* gate */
rest_of_handle_ree, /* execute */
NULL, /* sub */
{
RTL_PASS,
"*stack_regs", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_handle_stack_regs, /* gate */
NULL, /* execute */
NULL, /* sub */
{
RTL_PASS,
"stack", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
rest_of_handle_stack_regs, /* execute */
NULL, /* sub */
{
RTL_PASS,
"cprop_hardreg", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_handle_cprop, /* gate */
copyprop_hardreg_forward, /* execute */
NULL, /* sub */
{
RTL_PASS,
"reginfo", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
reginfo_init, /* execute */
NULL, /* sub */
{
RTL_PASS,
"regmove", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_handle_regmove, /* gate */
regmove_optimize, /* execute */
NULL, /* sub */
{
RTL_PASS,
"rnreg", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_handle_regrename, /* gate */
regrename_optimize, /* execute */
NULL, /* sub */
{
RTL_PASS,
"dbr", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_handle_delay_slots, /* gate */
rest_of_handle_delay_slots, /* execute */
NULL, /* sub */
{
RTL_PASS,
"mach", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_handle_machine_reorg, /* gate */
rest_of_handle_machine_reorg, /* execute */
NULL, /* sub */
{
RTL_PASS,
"sched1", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_handle_sched, /* gate */
rest_of_handle_sched, /* execute */
NULL, /* sub */
{
RTL_PASS,
"sched2", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_handle_sched2, /* gate */
rest_of_handle_sched2, /* execute */
NULL, /* sub */
{
RTL_PASS,
"*stack_ptr_mod", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
rest_of_handle_stack_ptr_mod, /* execute */
NULL, /* sub */
statistics_early_init (void)
{
statistics_dump_nr = dump_register (".statistics", "statistics",
- "statistics", TDF_TREE);
+ "statistics", TDF_TREE, OPTGROUP_NONE);
}
/* Init the statistics. */
{
RTL_PASS,
"store_motion", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_rtl_store_motion, /* gate */
execute_rtl_store_motion, /* execute */
NULL, /* sub */
+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.
{
GIMPLE_PASS,
"dumb_plugin_example", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_dumb_plugin_example, /* gate */
execute_dumb_plugin_example, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"warn_self_assign", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_warn_self_assign, /* gate */
execute_warn_self_assign, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"cfg", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
one_pass_gate, /* gate */
one_pass_exec, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"warn_self_assign", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_warn_self_assign, /* gate */
execute_warn_self_assign, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"tracer", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_tracer, /* gate */
tracer, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"*diagnose_tm_blocks", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_tm, /* gate */
diagnose_tm_blocks, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"tmlower", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_tm, /* gate */
execute_lower_tm, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"*tminit", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_tm_init, /* gate */
NULL, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"tmmark", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
execute_tm_mark, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"tmedge", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
execute_tm_edges, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"tmmemopt", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_tm_memopt, /* gate */
execute_tm_memopt, /* execute */
NULL, /* sub */
{
SIMPLE_IPA_PASS,
"tmipa", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_tm, /* gate */
ipa_tm_execute, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"cdce", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_call_cdce, /* gate */
tree_call_cdce, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"cfg", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
execute_build_cfg, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"crited", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
split_critical_edges, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"*warn_function_return", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
execute_warn_function_return, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"*warn_function_noreturn", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_warn_function_noreturn, /* gate */
execute_warn_function_noreturn, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"*warn_unused_result", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_warn_unused_result, /* gate */
run_warn_unused_result, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"mergephi", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_merge_phi, /* gate */
merge_phi_nodes, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"cplxlower", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
0, /* gate */
tree_lower_complex, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"cplxlower0", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_no_optimization, /* gate */
tree_lower_complex, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"eh", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
lower_eh_constructs, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"ehopt", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_refactor_eh, /* gate */
refactor_eh, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"resx", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_lower_resx, /* gate */
execute_lower_resx, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"ehdisp", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_lower_eh_dispatch, /* gate */
execute_lower_eh_dispatch, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"ehcleanup", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_cleanup_eh, /* gate */
execute_cleanup_eh, /* execute */
NULL, /* sub */
{
SIMPLE_IPA_PASS,
"emutls", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_emutls, /* gate */
ipa_lower_emutls, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"ifcvt", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_tree_if_conversion, /* gate */
main_tree_if_conversion, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"ssa", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
rewrite_into_ssa, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"ldist", /* name */
+ OPTGROUP_LOOP, /* optinfo_flags */
gate_tree_loop_distribution, /* gate */
tree_loop_distribution, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"mudflap1", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_mudflap, /* gate */
execute_mudflap_function_decls, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"mudflap2", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_mudflap, /* gate */
execute_mudflap_function_ops, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"mudflap1", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_mudflap, /* gate */
NULL, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"mudflap2", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_mudflap, /* gate */
NULL, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"nrv", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_pass_return_slot, /* gate */
tree_nrv, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"retslot", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
execute_return_slot_opt, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"objsz", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
compute_object_sizes, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"optimized", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
execute_cleanup_cfg_post_optimizing, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"*free_cfg_annotations", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
execute_fixup_cfg, /* execute */
NULL, /* sub */
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);
{
SIMPLE_IPA_PASS,
"profile", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_tree_profile_ipa, /* gate */
tree_profiling, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"esra", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_intra_sra, /* gate */
early_intra_sra, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"sra", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_intra_sra, /* gate */
late_intra_sra, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"eipa_sra", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
ipa_early_sra_gate, /* gate */
ipa_early_sra, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"ccp", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_ccp, /* gate */
do_ssa_ccp, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"fab", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
execute_fold_all_builtins, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"copyprop", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_copy_prop, /* gate */
execute_copy_prop, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"copyrename", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_copyrename, /* gate */
rename_ssa_copies, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"dce", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_dce, /* gate */
tree_ssa_dce, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"dceloop", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_dce, /* gate */
tree_ssa_dce_loop, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"cddce", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_dce, /* gate */
tree_ssa_cd_dce, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"dom", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_dominator, /* gate */
tree_ssa_dominator_optimize, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"phicprop", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_dominator, /* gate */
eliminate_degenerate_phis, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"dse", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_dse, /* gate */
tree_ssa_dse, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"forwprop", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_forwprop, /* gate */
ssa_forward_propagate_and_combine, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"ifcombine", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_ifcombine, /* gate */
tree_ssa_ifcombine, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"ch", /* name */
+ OPTGROUP_LOOP, /* optinfo_flags */
gate_ch, /* gate */
copy_loop_headers, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"loop", /* name */
+ OPTGROUP_LOOP, /* optinfo_flags */
gate_tree_loop, /* gate */
NULL, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"loopinit", /* name */
+ OPTGROUP_LOOP, /* optinfo_flags */
NULL, /* gate */
tree_ssa_loop_init, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"lim", /* name */
+ OPTGROUP_LOOP, /* optinfo_flags */
gate_tree_ssa_loop_im, /* gate */
tree_ssa_loop_im, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"unswitch", /* name */
+ OPTGROUP_LOOP, /* optinfo_flags */
gate_tree_ssa_loop_unswitch, /* gate */
tree_ssa_loop_unswitch, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"pcom", /* name */
+ OPTGROUP_LOOP, /* optinfo_flags */
gate_tree_predictive_commoning, /* gate */
run_tree_predictive_commoning, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"vect", /* name */
+ OPTGROUP_LOOP
+ | OPTGROUP_VEC, /* optinfo_flags */
gate_tree_vectorize, /* gate */
tree_vectorize, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"graphite0", /* name */
+ OPTGROUP_LOOP, /* optinfo_flags */
gate_graphite_transforms, /* gate */
NULL, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"graphite", /* name */
+ OPTGROUP_LOOP, /* optinfo_flags */
gate_graphite_transforms, /* gate */
graphite_transforms, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"ckdd", /* name */
+ OPTGROUP_LOOP, /* optinfo_flags */
gate_check_data_deps, /* gate */
check_data_deps, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"ivcanon", /* name */
+ OPTGROUP_LOOP, /* optinfo_flags */
gate_tree_ssa_loop_ivcanon, /* gate */
tree_ssa_loop_ivcanon, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"sccp", /* name */
+ OPTGROUP_LOOP, /* optinfo_flags */
gate_scev_const_prop, /* gate */
scev_const_prop, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"*record_bounds", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
tree_ssa_loop_bounds, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"cunroll", /* name */
+ OPTGROUP_LOOP, /* optinfo_flags */
gate_tree_complete_unroll, /* gate */
tree_complete_unroll, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"cunrolli", /* name */
+ OPTGROUP_LOOP, /* optinfo_flags */
gate_tree_complete_unroll_inner, /* gate */
tree_complete_unroll_inner, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"parloops", /* name */
+ OPTGROUP_LOOP, /* optinfo_flags */
gate_tree_parallelize_loops, /* gate */
tree_parallelize_loops, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"aprefetch", /* name */
+ OPTGROUP_LOOP, /* optinfo_flags */
gate_tree_ssa_loop_prefetch, /* gate */
tree_ssa_loop_prefetch, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"ivopts", /* name */
+ OPTGROUP_LOOP, /* optinfo_flags */
gate_tree_ssa_loop_ivopts, /* gate */
tree_ssa_loop_ivopts, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"loopdone", /* name */
+ OPTGROUP_LOOP, /* optinfo_flags */
NULL, /* gate */
tree_ssa_loop_done, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"recip", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_cse_reciprocals, /* gate */
execute_cse_reciprocals, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"sincos", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_cse_sincos, /* gate */
execute_cse_sincos, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"bswap", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_optimize_bswap, /* gate */
execute_optimize_bswap, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"widening_mul", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_optimize_widening_mul, /* gate */
execute_optimize_widening_mul, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"phiopt", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_phiopt, /* gate */
tree_ssa_phiopt, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"cselim", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_cselim, /* gate */
tree_ssa_cs_elim, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"phiprop", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_phiprop, /* gate */
tree_ssa_phiprop, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"pre", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_pre, /* gate */
do_pre, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"fre", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_fre, /* gate */
execute_fre, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"reassoc", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_tree_ssa_reassoc, /* gate */
execute_reassoc, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"sink", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_sink, /* gate */
do_sink, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"strlen", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_strlen, /* gate */
tree_ssa_strlen, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"alias", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_tree_pta, /* gate */
NULL, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"ealias", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_tree_pta, /* gate */
NULL, /* execute */
NULL, /* sub */
{
SIMPLE_IPA_PASS,
"pta", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_ipa_pta, /* gate */
ipa_pta_execute, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"uncprop", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_uncprop, /* gate */
tree_ssa_uncprop, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"uninit", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_warn_uninitialized, /* gate */
execute_late_warn_uninitialized, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"*init_datastructures", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
execute_init_datastructures, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"*early_warn_uninitialized", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_warn_uninitialized, /* gate */
execute_early_warn_uninitialized, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"addressables", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
NULL, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"release_ssa", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
release_dead_ssa_names, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"stdarg", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_optimize_stdarg, /* gate */
execute_optimize_stdarg, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"switchconv", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
switchconv_gate, /* gate */
do_switchconv, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"tailr", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_tail_calls, /* gate */
execute_tail_recursion, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"tailc", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_tail_calls, /* gate */
execute_tail_calls, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"veclower", /* name */
+ OPTGROUP_VEC, /* optinfo_flags */
gate_expand_vector_operations_ssa, /* gate */
expand_vector_operations, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"veclower2", /* name */
+ OPTGROUP_VEC, /* optinfo_flags */
0, /* gate */
expand_vector_operations, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"slp", /* name */
+ OPTGROUP_LOOP
+ | OPTGROUP_VEC, /* optinfo_flags */
gate_vect_slp, /* gate */
execute_vect_slp, /* execute */
NULL, /* sub */
{
SIMPLE_IPA_PASS,
"increase_alignment", /* name */
+ OPTGROUP_LOOP
+ | OPTGROUP_VEC, /* optinfo_flags */
gate_increase_alignment, /* gate */
increase_alignment, /* execute */
NULL, /* sub */
{
GIMPLE_PASS,
"vrp", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_vrp, /* gate */
execute_vrp, /* execute */
NULL, /* sub */
{
SIMPLE_IPA_PASS,
"*free_lang_data", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
NULL, /* gate */
free_lang_data, /* execute */
NULL, /* sub */
{
RTL_PASS,
"vartrack", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_handle_var_tracking, /* gate */
variable_tracking_main, /* execute */
NULL, /* sub */
{
RTL_PASS,
"web", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
gate_handle_web, /* gate */
web_main, /* execute */
NULL, /* sub */