diff options
author | Jan Hubicka <jh@suse.cz> | 2003-07-09 03:20:24 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2003-07-09 01:20:24 +0000 |
commit | a194aa56e656273fde94d2935e43d0640d90e42f (patch) | |
tree | 1d6807c9ee6d30e8fa21f56d4c445809b3cdea27 /gcc/toplev.c | |
parent | 8af61113c7c4ec81ef7d4947a9e59d980333e397 (diff) | |
download | gcc-a194aa56e656273fde94d2935e43d0640d90e42f.zip gcc-a194aa56e656273fde94d2935e43d0640d90e42f.tar.gz gcc-a194aa56e656273fde94d2935e43d0640d90e42f.tar.bz2 |
cgraph.c (cgraph_node_name): New function.
* 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.
From-SVN: r69120
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r-- | gcc/toplev.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index b7bbe8a..84f61b7 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 (); } |