aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2019-11-03 13:48:43 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2019-11-03 12:48:43 +0000
commitc9ef0409cd8f40ebca439ed446142fe3a2e727d3 (patch)
tree02b234403a8ac14394b85f5c47afa2fc22b9dc17 /gcc/lto
parentda5c1bbe973db144cc1d297ad49b519a870ab0ba (diff)
downloadgcc-c9ef0409cd8f40ebca439ed446142fe3a2e727d3.zip
gcc-c9ef0409cd8f40ebca439ed446142fe3a2e727d3.tar.gz
gcc-c9ef0409cd8f40ebca439ed446142fe3a2e727d3.tar.bz2
config.in: Regenerate.
* config.in: Regenerate. * configure: Regenerate. * configure.ac: Check for mallinfo. * ggc-common.c: Include malloc.h if available; include options.h (report_heap_memory_use): New functoin. * ggc-page.c (ggc_grow): Do not print "start". * ggc.h (report_heap_memory_use): Declare. * pases.c (execute_one_pass): Report memory after IPA passes. (ipa_read_summaries_1): Likewise. (ipa_read_optimization_summaries_1): Likewise. * lto/lto-common.c (read_cgraph_and_symbols): Improve -Q reporting. * lto.c (lto_wpa_write_files): Likewise. From-SVN: r277753
Diffstat (limited to 'gcc/lto')
-rw-r--r--gcc/lto/ChangeLog5
-rw-r--r--gcc/lto/lto-common.c12
-rw-r--r--gcc/lto/lto.c2
3 files changed, 16 insertions, 3 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index d5c1373..98554b8 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,3 +1,8 @@
+2019-11-02 Jan Hubicka <hubicka@ucw.cz>
+
+ * lto-common.c (read_cgraph_and_symbols): Improve -Q reporting.
+ * lto.c (lto_wpa_write_files): Likewise.
+
2019-10-31 Jakub Jelinek <jakub@redhat.com>
PR middle-end/92231
diff --git a/gcc/lto/lto-common.c b/gcc/lto/lto-common.c
index fc189ff..eb4ceea 100644
--- a/gcc/lto/lto-common.c
+++ b/gcc/lto/lto-common.c
@@ -2784,6 +2784,7 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames)
/* At this stage we know that majority of GGC memory is reachable.
Growing the limits prevents unnecesary invocation of GGC. */
ggc_grow ();
+ report_heap_memory_use ();
/* 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);
@@ -2791,7 +2792,7 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames)
timevar_pop (TV_IPA_LTO_DECL_IN);
if (!quiet_flag)
- fprintf (stderr, "\nReading the callgraph\n");
+ fprintf (stderr, "\nReading the symbol table:");
timevar_push (TV_IPA_LTO_CGRAPH_IO);
/* Read the symtab. */
@@ -2831,7 +2832,7 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames)
timevar_pop (TV_IPA_LTO_CGRAPH_IO);
if (!quiet_flag)
- fprintf (stderr, "Merging declarations\n");
+ fprintf (stderr, "\nMerging declarations:");
timevar_push (TV_IPA_LTO_DECL_MERGE);
/* Merge global decls. In ltrans mode we read merged cgraph, we do not
@@ -2859,12 +2860,13 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames)
is explcitly managed by ggc_free and ggc collect is not useful.
Exception are the merged declarations. */
ggc_grow ();
+ report_heap_memory_use ();
timevar_pop (TV_IPA_LTO_DECL_MERGE);
/* Each pass will set the appropriate timer. */
if (!quiet_flag)
- fprintf (stderr, "Reading summaries\n");
+ fprintf (stderr, "\nReading summaries:");
/* Read the IPA summary data. */
if (flag_ltrans)
@@ -2891,6 +2893,9 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames)
/* Finally merge the cgraph according to the decl merging decisions. */
timevar_push (TV_IPA_LTO_CGRAPH_MERGE);
+ if (!quiet_flag)
+ fprintf (stderr, "\nMerging symbols:");
+
gcc_assert (!dump_file);
dump_file = dump_begin (lto_link_dump_id, NULL);
@@ -2905,6 +2910,7 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames)
We could also just remove them while merging. */
symtab->remove_unreachable_nodes (dump_file);
ggc_collect ();
+ report_heap_memory_use ();
if (dump_file)
dump_end (lto_link_dump_id, dump_file);
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c
index 27ea341..86d5801 100644
--- a/gcc/lto/lto.c
+++ b/gcc/lto/lto.c
@@ -312,6 +312,8 @@ lto_wpa_write_files (void)
lto_prepare_function_for_streaming (node);
ggc_trim ();
+ report_heap_memory_use ();
+
/* Generate a prefix for the LTRANS unit files. */
blen = strlen (ltrans_output_list);
temp_filename = (char *) xmalloc (blen + sizeof ("2147483648.o"));