aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto/lto.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-11-20 10:06:42 +0000
committerJakub Jelinek <jakub@redhat.com>2019-11-20 10:06:42 +0000
commit9f3d9a570819cb522d2ff3e36c04f742c3870537 (patch)
tree8531ed8dcb46358788a528f026095e0bee664ef7 /gcc/lto/lto.c
parent522f3b741606e806f058efcdf6474f2cdcc56718 (diff)
parentc59fa98026086e9886257fce39d27dcfd16cc4f6 (diff)
svn merge -r274943:278492 svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-9-branchredhat/gcc-9-branch
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/redhat/gcc-9-branch@278493 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto/lto.c')
-rw-r--r--gcc/lto/lto.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c
index 4367928a515..4dde8c001e1 100644
--- a/gcc/lto/lto.c
+++ b/gcc/lto/lto.c
@@ -2446,6 +2446,15 @@ lto_wpa_write_files (void)
timevar_push (TV_WHOPR_WPA_IO);
+ ggc_trim ();
+
+ cgraph_node *node;
+ /* Do body modifications needed for streaming before we fork out
+ worker processes. */
+ FOR_EACH_FUNCTION_WITH_GIMPLE_BODY (node)
+ if (!node->clone_of && 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"));