diff options
| author | Sharad Singhai <singhai@google.com> | 2012-11-01 07:34:44 +0000 |
|---|---|---|
| committer | Sharad Singhai <singhai@gcc.gnu.org> | 2012-11-01 07:34:44 +0000 |
| commit | 2b4e6bf1d556f89711726eaa02b125ed6f39a82f (patch) | |
| tree | 47725ebeed1bb76102194e7ca04ca401b8d512ff /gcc/passes.c | |
| parent | c3a76b2f482f048a577cc4251184748d8ef27157 (diff) | |
| download | gcc-2b4e6bf1d556f89711726eaa02b125ed6f39a82f.zip gcc-2b4e6bf1d556f89711726eaa02b125ed6f39a82f.tar.gz gcc-2b4e6bf1d556f89711726eaa02b125ed6f39a82f.tar.bz2 | |
invoke.texi: Update -fopt-info documentation.
2012-11-01 Sharad Singhai <singhai@google.com>
* doc/invoke.texi: Update -fopt-info documentation.
* dumpfile.c: Move dump_flags here from passes.c.
Rename opt_info_options to optinfo_verbosity_options.
Add optgroup_options.
(dump_files): Add field for optinfo_flags in the static initializer.
(dump_register): Handle additional parameter for optgroup_flags.
(opt_info_enable_passes): Renamed opt_info_enable_all. Handle
optgroup_flags. Fix documentation.
(opt_info_switch_p_1): Handle optgroup options.
(opt_info_switch_p): Handle optgroup_flags. Warn on multiple files.
* dumpfile.h (dump_register): Additional argument for optgroup_flags.
All callers updated.
(struct dump_file_info): Add field for optgroup_flags.
Define OPTGROUP_* flags.
* tree-pass.h (struct opt_pass): Add addtional field for optinfo_flags.
All opt_pass static initializers updated.
* opts-global.c (dump_remap_tree_vectorizer_verbose): Use 'all'
instead of 'optall'.
(handle_common_deferred_options): Fix typo in error message.
* passes.c (register_one_dump_file): Add argument for optgroup_flags.
Turn on OPTGROUP_IPA for IPA passes.
Move dump_flags from here to dumpfile.c.
* statistics.c (statistics_early_init): Use OPTGROUP_NONE in call to
dump_register.
testsuite/ChangeLog
* testsuite/gcc.dg/plugin/selfassign.c: Add opgtroup_flags initializer.
* testsuite/gcc.dg/plugin/one_time_plugin.c: Likewise.
* testsuite/g++.dg/plugin/selfassign.c: Likewise.
* testsuite/g++.dg/plugin/dumb_plugin.c: Likewise.
From-SVN: r193061
Diffstat (limited to 'gcc/passes.c')
| -rw-r--r-- | gcc/passes.c | 27 |
1 files changed, 22 insertions, 5 deletions
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); |
