diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2019-10-11 10:59:16 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2019-10-11 08:59:16 +0000 |
commit | 1fcf52a6a2208a57e4542e1b830a7ac5cfa216a2 (patch) | |
tree | ef9cac22b1e7b08c43bf2ff06a8714ed61dbcc77 /gcc/lto | |
parent | 05626b02e8d02720771d361677b1d6cc38df9ddc (diff) | |
download | gcc-1fcf52a6a2208a57e4542e1b830a7ac5cfa216a2.zip gcc-1fcf52a6a2208a57e4542e1b830a7ac5cfa216a2.tar.gz gcc-1fcf52a6a2208a57e4542e1b830a7ac5cfa216a2.tar.bz2 |
Do not allocate ggc during streaming.
* gimple-streamer-out.c (output_gimple_stmt): Add explicit function
parameter.
* lto-streamer-out.c: Include tree-dfa.h.
(output_cfg): Do not use cfun.
(lto_prepare_function_for_streaming): New.
(output_function): Do not push cfun; do not initialize loop optimizer.
* lto-streamer.h (lto_prepare_function_for_streaming): Declare.
* passes.c (ipa_write_summaries): Use it.
(ipa_write_optimization_summaries): Do not modify bodies.
* tree-dfa.c (renumber_gimple_stmt_uids): Add function parameter.
* tree.dfa.h (renumber_gimple_stmt_uids): Update prototype.
* tree-ssa-dse.c (pass_dse::execute): Update use of
renumber_gimple_stmt_uids.
* tree-ssa-math-opts.c (pass_optimize_widening_mul::execute): Likewise.
* lto.c (lto_wpa_write_files): Prepare all bodies for streaming.
From-SVN: r276870
Diffstat (limited to 'gcc/lto')
-rw-r--r-- | gcc/lto/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/lto/lto.c | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 393e1c1..5fd02df 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,7 @@ +2019-10-11 Jan Hubicka <hubicka@ucw.cz> + + * lto.c (lto_wpa_write_files): Prepare all bodies for streaming. + 2019-10-10 Richard Biener <rguenther@suse.de> * lto-common.c (unify_scc): Do not merge anonymous NAMESPACE_DECLs. diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index af3590c..f7452c2 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -304,6 +304,13 @@ lto_wpa_write_files (void) timevar_push (TV_WHOPR_WPA_IO); + cgraph_node *node; + /* Do body modifications needed for streaming before we fork out + worker processes. */ + FOR_EACH_FUNCTION_WITH_GIMPLE_BODY (node) + if (gimple_has_body_p (node->decl)) + lto_prepare_function_for_streaming (node); + /* Generate a prefix for the LTRANS unit files. */ blen = strlen (ltrans_output_list); temp_filename = (char *) xmalloc (blen + sizeof ("2147483648.o")); |