summaryrefslogtreecommitdiff
path: root/gcc/lto
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2014-07-11 17:43:44 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2014-07-11 17:43:44 +0000
commitafb0d51359158a213e4919a8d46da6497724d26c (patch)
tree559538902f5da455d349414895289f88f3911435 /gcc/lto
parent2f994b2ff09c051d31f0a417808a88d04636fdf9 (diff)
downloadgcc-afb0d51359158a213e4919a8d46da6497724d26c.tar.gz
* vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h
(varpool_get_constructor): New function. (varpool_ctor_useable_for_folding_p): Break out from ... (ctor_for_folding): ... here; use varpool_get_constructor. (varpool_assemble_decl): Likewise. * lto-streamer.h (struct output_block): Turn cgraph_node to symbol filed. (lto_input_variable_constructor): Declare. * ipa-visibility.c (function_and_variable_visibility): Use varpool_get_constructor. * cgraph.h (varpool_get_constructor): Declare. (varpool_ctor_useable_for_folding_p): New function. * lto-streamer-out.c (get_symbol_initial_value): Take encoder parameter; return error_mark_node for non-trivial constructors. (lto_write_tree_1, DFS_write_tree): UPdate use of get_symbol_initial_value. (output_function): Update initialization of symbol. (output_constructor): New function. (copy_function): Rename to .. (copy_function_or_variable): ... this one; handle vars too. (lto_output): Output variable sections. * lto-streamer-in.c (input_constructor): New function. (lto_read_body): Rename from ... (lto_read_body_or_constructor): ... this one; handle vars too. (lto_input_variable_constructor): New function. * ipa-prop.c (ipa_prop_write_jump_functions, ipa_prop_write_all_agg_replacement): Update. * lto-cgraph.c (compute_ltrans_boundary): Use it. (output_cgraph_opt_summary): Set symbol to NULL. * lto-partition.c (add_references_to_partition): Use varpool_ctor_useable_for_folding_p. * lto.c (lto_read_in_decl_state): Update sanity check. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212467 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto')
-rw-r--r--gcc/lto/ChangeLog6
-rw-r--r--gcc/lto/lto-partition.c2
-rw-r--r--gcc/lto/lto.c2
3 files changed, 8 insertions, 2 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index 78e32edaf95..ec78b2aa4e9 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,3 +1,9 @@
+2014-07-11 Jan Hubicka <hubicka@ucw.cz>
+
+ * lto-partition.c (add_references_to_partition): Use
+ varpool_ctor_useable_for_folding_p.
+ * lto.c (lto_read_in_decl_state): Update sanity check.
+
2014-07-01 Martin Liska <mliska@suse.cz>
IPA REF alias refactoring
diff --git a/gcc/lto/lto-partition.c b/gcc/lto/lto-partition.c
index 944943cf1cc..5f290353500 100644
--- a/gcc/lto/lto-partition.c
+++ b/gcc/lto/lto-partition.c
@@ -96,7 +96,7 @@ add_references_to_partition (ltrans_partition part, symtab_node *node)
Recursively look into the initializers of the constant variable and add
references, too. */
else if (is_a <varpool_node *> (ref->referred)
- && ctor_for_folding (ref->referred->decl) != error_mark_node
+ && varpool_ctor_useable_for_folding_p (varpool (ref->referred))
&& !lto_symtab_encoder_in_partition_p (part->encoder, ref->referred))
{
if (!part->initializers_visited)
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c
index 20b78a8c499..cdf8a7218d6 100644
--- a/gcc/lto/lto.c
+++ b/gcc/lto/lto.c
@@ -236,7 +236,7 @@ lto_read_in_decl_state (struct data_in *data_in, const uint32_t *data,
ix = *data++;
decl = streamer_tree_cache_get_tree (data_in->reader_cache, ix);
- if (TREE_CODE (decl) != FUNCTION_DECL)
+ if (!VAR_OR_FUNCTION_DECL_P (decl))
{
gcc_assert (decl == void_type_node);
decl = NULL_TREE;