aboutsummaryrefslogtreecommitdiff
path: root/gcc/passes.c
diff options
context:
space:
mode:
authorSharad Singhai <singhai@google.com>2012-10-01 05:43:06 +0000
committerSharad Singhai <singhai@gcc.gnu.org>2012-10-01 05:43:06 +0000
commit78c60e3da2d1a25ac13b725980e5f4dd53b9df60 (patch)
tree525ba5cb84f1f7d04874c56225d38fe09fea8455 /gcc/passes.c
parentd0cfc26205e59848a644a42790fcb3a76d82a287 (diff)
downloadgcc-78c60e3da2d1a25ac13b725980e5f4dd53b9df60.zip
gcc-78c60e3da2d1a25ac13b725980e5f4dd53b9df60.tar.gz
gcc-78c60e3da2d1a25ac13b725980e5f4dd53b9df60.tar.bz2
invoke.texi: Add documentation for the new option.
2012-09-30 Sharad Singhai <singhai@google.com> * doc/invoke.texi: Add documentation for the new option. * tree-dump.c: Move general dump file related functionality into dumpfile.c. Remove unneeded headers. * tree-dump.h: Move function declarations into dumpfile.h. * dumpfile.h: Include "line-map.h". Add defines for MSG flags. (struct dump_file_info): Move here from tree-dump.c. Rename flags to pflags, state to pstate, stream to pstream, filename to pfilename. All callers updated. Add alt_flags, alt_state, alt_filenmae, alt_stream. * tree-vectorizer.c: Include "dumpfile.h". Remove vect_dump. (vect_set_dump_settings): Remove. (vect_print_dump_info): Ditto. * tree-vectorizer.h: Remove declaration of vect_dump and vect_print_dump_info. * tree-vect-loop.c: Include "dumpfile.h". Use new dump style. * tree-vect-data-refs.c: Ditto. * tree-vect-stmts.c: Ditto. * tree-vect-slp.c: Ditto. * tree-vect-patterns.c: Ditto. * tree-vect-loop-manip.c: Ditto. * testsuite/gcc.target/i386/vect-double-1.c: Fix test. * opts.c (vect_set_verbosity_level): Remove. (common_handle_option): Handle -fopt-info flag. Deprecate -ftree-vectorizer-verbose. * tree-parloops.c (gather_scalar_reductions): Remove reference to vect_dump. * flag-types.h: Remove vect_verbosity_levels. * common.opt: Add -fopt-info. Deprecate -ftree-vectorizer-verbose. * opts-global.c (dump_remap_tree_vectorizer_verbose): New function. (handle_common_deferred_options): Handle -fopt-info and -ftree-vectorizer-verbose. * Makefile.in: Add dumpfile.o. (tree-dump.o): Update dependencies. (tree-vect-loop.o): Ditto. (tree-vect-loop-manip.o): Ditto. (tree-vect-slp.o): Ditto. (tree-vect-stmts.o): Ditto. (tree-vectorizer.o): Ditto. (opts.o): Ditto. * passes.c (finish_optimization_passes): Instead of using dump_begin/dump_end, use dump_start/dump_finish. Do not use dump_file. (pass_init_dump_file): Ditto. * c-decl.c (c_write_global_declarations): Use a different method to determine if the dump has ben initialized. * decl2.c (cp_write_global_declarations): Use a different method to determine if the dump has ben initialized. From-SVN: r191883
Diffstat (limited to 'gcc/passes.c')
-rw-r--r--gcc/passes.c30
1 files changed, 11 insertions, 19 deletions
diff --git a/gcc/passes.c b/gcc/passes.c
index ba4e98e..86c8255 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -231,27 +231,23 @@ finish_optimization_passes (void)
timevar_push (TV_DUMP);
if (profile_arc_flag || flag_test_coverage || flag_branch_probabilities)
{
- dump_file = dump_begin (pass_profile.pass.static_pass_number, NULL);
+ dump_start (pass_profile.pass.static_pass_number, NULL);
end_branch_prob ();
- if (dump_file)
- dump_end (pass_profile.pass.static_pass_number, dump_file);
+ dump_finish (pass_profile.pass.static_pass_number);
}
if (optimize > 0)
{
- dump_file = dump_begin (pass_combine.pass.static_pass_number, NULL);
- if (dump_file)
- {
- dump_combine_total_stats (dump_file);
- dump_end (pass_combine.pass.static_pass_number, dump_file);
- }
+ dump_start (pass_profile.pass.static_pass_number, NULL);
+ print_combine_total_stats ();
+ dump_finish (pass_combine.pass.static_pass_number);
}
/* Do whatever is necessary to finish printing the graphs. */
if (graph_dump_format != no_graph)
for (i = TDI_end; (dfi = get_dump_file_info (i)) != NULL; ++i)
if (dump_initialized_p (i)
- && (dfi->flags & TDF_GRAPH) != 0
+ && (dfi->pflags & TDF_GRAPH) != 0
&& (name = get_dump_file_name (i)) != NULL)
{
finish_graph_dump_file (name);
@@ -1238,9 +1234,9 @@ register_pass (struct register_pass_info *pass_info)
else
tdi = TDI_rtl_all;
/* Check if dump-all flag is specified. */
- if (get_dump_file_info (tdi)->state)
+ if (get_dump_file_info (tdi)->pstate)
get_dump_file_info (added_pass_nodes->pass->static_pass_number)
- ->state = get_dump_file_info (tdi)->state;
+ ->pstate = get_dump_file_info (tdi)->pstate;
XDELETE (added_pass_nodes);
added_pass_nodes = next_node;
}
@@ -1945,7 +1941,7 @@ pass_init_dump_file (struct opt_pass *pass)
{
bool initializing_dump = !dump_initialized_p (pass->static_pass_number);
dump_file_name = get_dump_file_name (pass->static_pass_number);
- dump_file = dump_begin (pass->static_pass_number, &dump_flags);
+ dump_start (pass->static_pass_number, &dump_flags);
if (dump_file && current_function_decl)
dump_function_header (dump_file, current_function_decl, dump_flags);
return initializing_dump;
@@ -1967,11 +1963,7 @@ pass_fini_dump_file (struct opt_pass *pass)
dump_file_name = NULL;
}
- if (dump_file)
- {
- dump_end (pass->static_pass_number, dump_file);
- dump_file = NULL;
- }
+ dump_finish (pass->static_pass_number);
}
/* After executing the pass, apply expected changes to the function
@@ -2213,7 +2205,7 @@ execute_one_pass (struct opt_pass *pass)
&& (cfun->curr_properties & (PROP_cfg | PROP_rtl))
== (PROP_cfg | PROP_rtl))
{
- get_dump_file_info (pass->static_pass_number)->flags |= TDF_GRAPH;
+ get_dump_file_info (pass->static_pass_number)->pflags |= TDF_GRAPH;
dump_flags |= TDF_GRAPH;
clean_graph_dump_file (dump_file_name);
}