summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/lto-cgraph.c8
-rw-r--r--gcc/lto-streamer.h2
-rw-r--r--gcc/lto/ChangeLog6
-rw-r--r--gcc/lto/lto.c2
5 files changed, 20 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 565b50598c4..59be0fdd685 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2016-02-15 Tom de Vries <tom@codesourcery.com>
+
+ PR lto/69655
+ * lto-cgraph.c (input_offload_tables): Add and handle bool parameter
+ do_force_output.
+ * lto-streamer.h (input_offload_tables): Add and handle bool parameter.
+
2016-02-15 Richard Biener <rguenther@suse.de>
PR tree-optimization/69776
diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c
index 063477920a0..95c446d0696 100644
--- a/gcc/lto-cgraph.c
+++ b/gcc/lto-cgraph.c
@@ -1885,7 +1885,7 @@ input_symtab (void)
target code, and store them into OFFLOAD_FUNCS and OFFLOAD_VARS. */
void
-input_offload_tables (void)
+input_offload_tables (bool do_force_output)
{
struct lto_file_decl_data **file_data_vec = lto_get_file_decl_data ();
struct lto_file_decl_data *file_data;
@@ -1915,7 +1915,8 @@ input_offload_tables (void)
/* Prevent IPA from removing fn_decl as unreachable, since there
may be no refs from the parent function to child_fn in offload
LTO mode. */
- cgraph_node::get (fn_decl)->mark_force_output ();
+ if (do_force_output)
+ cgraph_node::get (fn_decl)->mark_force_output ();
}
else if (tag == LTO_symtab_variable)
{
@@ -1926,7 +1927,8 @@ input_offload_tables (void)
/* Prevent IPA from removing var_decl as unused, since there
may be no refs to var_decl in offload LTO mode. */
- varpool_node::get (var_decl)->force_output = 1;
+ if (do_force_output)
+ varpool_node::get (var_decl)->force_output = 1;
}
else
fatal_error (input_location,
diff --git a/gcc/lto-streamer.h b/gcc/lto-streamer.h
index 0cb200e2d3f..f3911613b07 100644
--- a/gcc/lto-streamer.h
+++ b/gcc/lto-streamer.h
@@ -915,7 +915,7 @@ bool lto_symtab_encoder_encode_initializer_p (lto_symtab_encoder_t,
void output_symtab (void);
void input_symtab (void);
void output_offload_tables (void);
-void input_offload_tables (void);
+void input_offload_tables (bool);
bool referenced_from_other_partition_p (struct ipa_ref_list *,
lto_symtab_encoder_t);
bool reachable_from_other_partition_p (struct cgraph_node *,
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index 43faaf4cb30..6496fd900a7 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,3 +1,9 @@
+2016-02-15 Tom de Vries <tom@codesourcery.com>
+
+ PR lto/69655
+ * lto.c (read_cgraph_and_symbols): Call input_offload_tables with
+ argument.
+
2016-01-27 Martin Liska <mliska@suse.cz>
* lto-partition.c (add_symbol_to_partition_1): Remove usage
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c
index 6718fbbe984..9dd513fef86 100644
--- a/gcc/lto/lto.c
+++ b/gcc/lto/lto.c
@@ -2855,7 +2855,7 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames)
/* Read the symtab. */
input_symtab ();
- input_offload_tables ();
+ input_offload_tables (!flag_ltrans);
/* Store resolutions into the symbol table. */