aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2019-10-23 20:22:40 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2019-10-23 18:22:40 +0000
commitebad2eeed903f7c9cf6c55d37be8af8c84f1cf32 (patch)
tree4ce050da6801082f8214d6b6769954c0aa7d48a8 /gcc/lto
parentb5b6485f1cc54f21713b5b03c5d63d56839ca458 (diff)
downloadgcc-ebad2eeed903f7c9cf6c55d37be8af8c84f1cf32.zip
gcc-ebad2eeed903f7c9cf6c55d37be8af8c84f1cf32.tar.gz
gcc-ebad2eeed903f7c9cf6c55d37be8af8c84f1cf32.tar.bz2
lto-streamer-out.c (output_constructor): Push CTORS_OUT timevar.
* lto-streamer-out.c (output_constructor): Push CTORS_OUT timevar. (cmp_symbol_files): New. (lto_output): Copy sections in file order. * lto-streamer.h (lto_file_decl_data): Add field order. * lto-common.c (lto_file_finalize): Add order attribute. (lto_create_files_from_ids): Pass order. (lto_file_read): UPdate call of lto_create_files_from_ids. From-SVN: r277346
Diffstat (limited to 'gcc/lto')
-rw-r--r--gcc/lto/ChangeLog6
-rw-r--r--gcc/lto/lto-common.c11
2 files changed, 13 insertions, 4 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index bb4e57e..49c77e0 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,3 +1,9 @@
+2019-10-23 Jan Hubicka <hubicka@ucw.cz>
+
+ * lto-common.c (lto_file_finalize): Add order attribute.
+ (lto_create_files_from_ids): Pass order.
+ (lto_file_read): UPdate call of lto_create_files_from_ids.
+
2019-10-12 Jan Hubicka <hubicka@ucw.cz>
* lto-common.c (read_cgraph_and_symbols): Grow ggc memory use after
diff --git a/gcc/lto/lto-common.c b/gcc/lto/lto-common.c
index 967f228..cdfc7b0 100644
--- a/gcc/lto/lto-common.c
+++ b/gcc/lto/lto-common.c
@@ -2177,7 +2177,8 @@ create_subid_section_table (struct lto_section_slot *ls, splay_tree file_ids,
/* Read declarations and other initializations for a FILE_DATA. */
static void
-lto_file_finalize (struct lto_file_decl_data *file_data, lto_file *file)
+lto_file_finalize (struct lto_file_decl_data *file_data, lto_file *file,
+ int order)
{
const char *data;
size_t len;
@@ -2195,6 +2196,7 @@ lto_file_finalize (struct lto_file_decl_data *file_data, lto_file *file)
file_data->renaming_hash_table = lto_create_renaming_table ();
file_data->file_name = file->filename;
+ file_data->order = order;
#ifdef ACCEL_COMPILER
lto_input_mode_table (file_data);
#else
@@ -2231,9 +2233,9 @@ lto_file_finalize (struct lto_file_decl_data *file_data, lto_file *file)
static int
lto_create_files_from_ids (lto_file *file, struct lto_file_decl_data *file_data,
- int *count)
+ int *count, int order)
{
- lto_file_finalize (file_data, file);
+ lto_file_finalize (file_data, file, order);
if (symtab->dump_file)
fprintf (symtab->dump_file,
"Creating file %s with sub id " HOST_WIDE_INT_PRINT_HEX "\n",
@@ -2285,9 +2287,10 @@ lto_file_read (lto_file *file, FILE *resolution_file, int *count)
lto_resolution_read (file_ids, resolution_file, file);
/* Finalize each lto file for each submodule in the merged object. */
+ int order = 0;
for (file_data = file_list.first; file_data != NULL;
file_data = file_data->next)
- lto_create_files_from_ids (file, file_data, count);
+ lto_create_files_from_ids (file, file_data, count, order++);
splay_tree_delete (file_ids);
htab_delete (section_hash_table);