summaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-09 01:20:24 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-09 01:20:24 +0000
commitf79b65070c2310a787f5eaf3f96438679085216d (patch)
tree1d6807c9ee6d30e8fa21f56d4c445809b3cdea27 /gcc/toplev.c
parent20f5f6d0a53d958f5029276862a136d271ceaadf (diff)
downloadgcc-f79b65070c2310a787f5eaf3f96438679085216d.tar.gz
* cgraph.c (cgraph_node_name): New function.
(dump_cgraph): Use it. * cgraph.h (cgraph_dump_file): Declare. (cgraph_node_name): Declare. * cgraphunit.c: Include timevar.h (cgraph_finalize_compilation_unit): Use timevar; reorganize dumps. (cgraph_optimize_function): Use TV_INTEGRATION. (cgraph_mark_local_functions): reorganize dumps. (cgraph_mark_functions_to_inline_once): Likewise. (cgraph_optimize): Likewise; use timevar. * timevar.def (TV_CGRAPH, TV_CGRAPHOPT): New. * toplev.c (dump_file_index): Add DFI_cgraph. (dump_file_info): Likewise. (cgraph_dump_file): New global variable. (do_compile): Open and close cgraph dump. * invoke.texi (-d): Document new flag; renumber. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69120 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index b7bbe8aecbc..84f61b77636 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -247,6 +247,7 @@ struct dump_file_info
enum dump_file_index
{
+ DFI_cgraph,
DFI_rtl,
DFI_sibling,
DFI_eh,
@@ -294,11 +295,12 @@ enum dump_file_index
Remaining -d letters:
" m q "
- " JK O Q UV YZ"
+ " JK O Q V YZ"
*/
static struct dump_file_info dump_file[DFI_MAX] =
{
+ { "cgraph", 'U', 0, 0, 0 },
{ "rtl", 'r', 0, 0, 0 },
{ "sibling", 'i', 0, 0, 0 },
{ "eh", 'h', 0, 0, 0 },
@@ -1567,6 +1569,7 @@ static const lang_independent_options W_options[] =
FILE *asm_out_file;
FILE *aux_info_file;
FILE *rtl_dump_file = NULL;
+FILE *cgraph_dump_file = NULL;
/* Set up a default flag_random_seed and local_tick, unless the user
already specified one. */
@@ -4944,10 +4947,23 @@ do_compile (void)
if (!no_backend)
backend_init ();
+ if (flag_unit_at_a_time)
+ {
+ open_dump_file (DFI_cgraph, NULL);
+ cgraph_dump_file = rtl_dump_file;
+ rtl_dump_file = NULL;
+ }
/* Language-dependent initialization. Returns true on success. */
if (lang_dependent_init (main_input_filename))
compile_file ();
+ if (flag_unit_at_a_time)
+ {
+ rtl_dump_file = cgraph_dump_file;
+ cgraph_dump_file = NULL;
+ close_dump_file (DFI_cgraph, NULL, NULL_RTX);
+ }
+
finalize ();
}