aboutsummaryrefslogtreecommitdiff
path: root/gcc/passes.c
diff options
context:
space:
mode:
authorSteven Bosscher <steven@gcc.gnu.org>2012-11-26 16:47:58 +0000
committerSteven Bosscher <steven@gcc.gnu.org>2012-11-26 16:47:58 +0000
commita27a5de96932f5568e8a4561dc82a1bd11814858 (patch)
tree5059e53a87ca0ad87ef8f5e4d61bdce408a23bc3 /gcc/passes.c
parentf460c170f063cacc7109395a8794de6cc362c87b (diff)
downloadgcc-a27a5de96932f5568e8a4561dc82a1bd11814858.zip
gcc-a27a5de96932f5568e8a4561dc82a1bd11814858.tar.gz
gcc-a27a5de96932f5568e8a4561dc82a1bd11814858.tar.bz2
invoke.texi: Remove -dv documentation.
gcc/ * doc/invoke.texi: Remove -dv documentation. Fix up graph dump related documentation. Document the '-graph' dump option. Complete the '-slim' dump option documentation. * common.opt (Variable graph_dump_format): Remove. * flag-types.h (enum graph_dump_types): Remove. * flags.h (dump_for_graph): Remove. * opts.c (decode_d_option): Remove -dv handling. * sched-int.h (print_insn, print_pattern, print_value): Move prototypes from here ... * rtl.h: ...to here. Add note that these functions ought to be in another file. * sched-vis.c (print_insn): Add detailed dump for insn notes. * print-rtl.c (dump_for_graph): Remove. (print_rtx): Remove dump_for_graph related code. * graph.c: Almost complete re-write to dump DOT (GraphViz) dumps instead of VCG dumps. * graph.h (print_rtl_graph_with_bb): Update prototype. * passes.c (finish_optimization_passes): Fix profile dump finishing. Unconditionally loop over graph dumps to finalize. (execute_function_dump): Split code to dump graphs to separate block. (execute_one_pass): Don't set TDF_GRAPH here, let the dump option decoders do their job. * ddg.c (vcg_print_ddg): Make it a DEBUG_FUNCTION. * toplev.c: Don't include graph.h. * tree-optimize.c: Don't include graph.h. testsuite/ * testsuite/gcc.dg/20050811-1.c: Change -dv option to -graph option to -fdump-rtl-all. * testsuite/gcc.dg/pr37858.c: Remove -dv option. From-SVN: r193821
Diffstat (limited to 'gcc/passes.c')
-rw-r--r--gcc/passes.c37
1 files changed, 16 insertions, 21 deletions
diff --git a/gcc/passes.c b/gcc/passes.c
index ee21a9a..62f8e1c 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -239,19 +239,18 @@ finish_optimization_passes (void)
{
dump_start (pass_profile.pass.static_pass_number, NULL);
print_combine_total_stats ();
- dump_finish (pass_combine.pass.static_pass_number);
+ dump_finish (pass_profile.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->pflags & TDF_GRAPH) != 0
- && (name = get_dump_file_name (i)) != NULL)
- {
- finish_graph_dump_file (name);
- free (name);
- }
+ for (i = TDI_end; (dfi = get_dump_file_info (i)) != NULL; ++i)
+ if (dump_initialized_p (i)
+ && (dfi->pflags & TDF_GRAPH) != 0
+ && (name = get_dump_file_name (i)) != NULL)
+ {
+ finish_graph_dump_file (name);
+ free (name);
+ }
timevar_pop (TV_DUMP);
}
@@ -1777,18 +1776,16 @@ execute_function_dump (void *data ATTRIBUTE_UNUSED)
if (cfun->curr_properties & PROP_trees)
dump_function_to_file (current_function_decl, dump_file, dump_flags);
else
- {
- print_rtl_with_bb (dump_file, get_insns (), dump_flags);
-
- if ((cfun->curr_properties & PROP_cfg)
- && graph_dump_format != no_graph
- && (dump_flags & TDF_GRAPH))
- print_rtl_graph_with_bb (dump_file_name, get_insns ());
- }
+ print_rtl_with_bb (dump_file, get_insns (), dump_flags);
/* Flush the file. If verification fails, we won't be able to
close the file before aborting. */
fflush (dump_file);
+
+ if ((cfun->curr_properties & PROP_cfg)
+ && (cfun->curr_properties & PROP_rtl)
+ && (dump_flags & TDF_GRAPH))
+ print_rtl_graph_with_bb (dump_file_name, cfun->decl);
}
}
@@ -2338,13 +2335,11 @@ execute_one_pass (struct opt_pass *pass)
if (initializing_dump
&& dump_file
- && graph_dump_format != no_graph
+ && (dump_flags & TDF_GRAPH)
&& cfun
&& (cfun->curr_properties & (PROP_cfg | PROP_rtl))
== (PROP_cfg | PROP_rtl))
{
- get_dump_file_info (pass->static_pass_number)->pflags |= TDF_GRAPH;
- dump_flags |= TDF_GRAPH;
clean_graph_dump_file (dump_file_name);
}