From patchwork Sat Jul 3 14:11:16 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Split LTO timevars Date: Sat, 03 Jul 2010 04:11:16 -0000 From: Jan Hubicka X-Patchwork-Id: 57809 Message-Id: <20100703141116.GH6378@kam.mff.cuni.cz> To: gcc-patches@gcc.gnu.org Hi, this patch splits LTO read and write timevars. This is relelavant for benchmarking WHOPR. Bootstrapped/regtested x86_64-linux, OK? Honza * lto-stramer-out.c (pass_ipa_lto_gimple_out, pass_ipa_lto_finish_out): Update timevars. * timevar.def (TV_IPA_LTO_GIMPLE_IO, TV_IPA_LTO_DECL_IO): Remove. (TV_IPA_LTO_GIMPLE_IN, TV_IPA_LTO_GIMPLE_OUT, TV_IPA_LTO_DECL_IN, TV_IPA_LTO_DECL_OUT): New. * lto.c (read_cgraph_and_symbols, materialize_cgraph): Update timevars. Index: lto-streamer-out.c =================================================================== --- lto-streamer-out.c (revision 161672) +++ lto-streamer-out.c (working copy) @@ -2132,7 +2132,7 @@ NULL, /* sub */ NULL, /* next */ 0, /* static_pass_number */ - TV_IPA_LTO_GIMPLE_IO, /* tv_id */ + TV_IPA_LTO_GIMPLE_OUT, /* tv_id */ 0, /* properties_required */ 0, /* properties_provided */ 0, /* properties_destroyed */ @@ -2544,7 +2544,7 @@ NULL, /* sub */ NULL, /* next */ 0, /* static_pass_number */ - TV_IPA_LTO_DECL_IO, /* tv_id */ + TV_IPA_LTO_DECL_OUT, /* tv_id */ 0, /* properties_required */ 0, /* properties_provided */ 0, /* properties_destroyed */ Index: timevar.def =================================================================== --- timevar.def (revision 161672) +++ timevar.def (working copy) @@ -53,8 +53,10 @@ DEFTIMEVAR (TV_VARPOOL , "varpool construction") DEFTIMEVAR (TV_IPA_CONSTANT_PROP , "ipa cp") DEFTIMEVAR (TV_IPA_FNSPLIT , "ipa function splitting") -DEFTIMEVAR (TV_IPA_LTO_GIMPLE_IO , "ipa lto gimple I/O") -DEFTIMEVAR (TV_IPA_LTO_DECL_IO , "ipa lto decl I/O") +DEFTIMEVAR (TV_IPA_LTO_GIMPLE_IN , "ipa lto gimple in") +DEFTIMEVAR (TV_IPA_LTO_GIMPLE_OUT , "ipa lto gimple out") +DEFTIMEVAR (TV_IPA_LTO_DECL_IN , "ipa lto decl in") +DEFTIMEVAR (TV_IPA_LTO_DECL_OUT , "ipa lto decl out") DEFTIMEVAR (TV_IPA_LTO_DECL_INIT_IO , "ipa lto decl init I/O") DEFTIMEVAR (TV_IPA_LTO_CGRAPH_IO , "ipa lto cgraph I/O") DEFTIMEVAR (TV_IPA_LTO_DECL_MERGE , "ipa lto decl merge") Index: lto/lto.c =================================================================== --- lto/lto.c (revision 161672) +++ lto/lto.c (working copy) @@ -1436,7 +1436,7 @@ lto_stats.num_input_files = nfiles; - timevar_push (TV_IPA_LTO_DECL_IO); + timevar_push (TV_IPA_LTO_DECL_IN); /* Set the hooks so that all of the ipa passes can read in their data. */ all_file_decl_data @@ -1498,7 +1498,7 @@ /* Set the hooks so that all of the ipa passes can read in their data. */ lto_set_in_hooks (all_file_decl_data, get_section_data, free_section_data); - timevar_pop (TV_IPA_LTO_DECL_IO); + timevar_pop (TV_IPA_LTO_DECL_IN); if (!quiet_flag) fprintf (stderr, "\nReading the callgraph\n"); @@ -1590,7 +1590,7 @@ /* Now that we have input the cgraph, we need to clear all of the aux nodes and read the functions if we are not running in WPA mode. */ - timevar_push (TV_IPA_LTO_GIMPLE_IO); + timevar_push (TV_IPA_LTO_GIMPLE_IN); for (node = cgraph_nodes; node; node = node->next) { @@ -1611,7 +1611,7 @@ } } - timevar_pop (TV_IPA_LTO_GIMPLE_IO); + timevar_pop (TV_IPA_LTO_GIMPLE_IN); /* Start the appropriate timer depending on the mode that we are operating in. */