aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2012-04-14 12:24:59 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2012-04-14 10:24:59 +0000
commit960bfb6929fa5c463267b962b9ff9dabdb6df3f3 (patch)
tree7b0127a94d4c70c75f4d133c7806c59bc61566c2 /gcc/lto
parent30d1ab7583da1d36deae5885fe9c92608cb6e929 (diff)
downloadgcc-960bfb6929fa5c463267b962b9ff9dabdb6df3f3.zip
gcc-960bfb6929fa5c463267b962b9ff9dabdb6df3f3.tar.gz
gcc-960bfb6929fa5c463267b962b9ff9dabdb6df3f3.tar.bz2
cgraph.h: Update copyrights;
* cgraph.h: Update copyrights; (symtab_node): Turn to union typedef. (symtab_node_base): New structure. (symtab_type): Add SYMTAB_SYMBOL tag. * cgraph.c: Update references to fields (cgraph_hash, assembler_name_hash): Turn into symtab_node. (cgraph_local_info): Remove lto_file_data and externally_visible. (cgraph_node): Remove decl; same_comdat_group list; aux; ref_list; order; address_taken; reachable_from_other_parittion, in_other_partition; resolution. (varpool_node): Remove decl; same_comdat_group; ref_list; lto_file_data; aux; order; resolution; externally_visible; used_from_other_partition; in_other_partition. (symtab_node_def); New union. (cgraph, varpool): Update. (varpool_first_static_initializer, varpool_next_static_initializer, cgraph_only_called_directly_or_aliased_p, varpool_can_remove_if_no_refs, varpool_can_remove_if_no_refs, varpool_all_refs_explicit_p, cgraph_alias_aliased_node, varpool_alias_aliased_node, cgraph_edge_recursive_p): Update field references. * cgraph.c: Likewise. * cgraphbuild.c: Likewise. * lto-symtab.c: Likewise. * c-gimplify.c: Likewise. * value-prof.c: Likewise. * tree.c: Likewise. * ipa-cp.c: Likewise. * tree-emutls.c: Likewise. * ipa-inline-transform.c: Likwise. * ipa-reference.c: Likewise. * cgraphunit.c: Likewise. * ipa-ref.c: Likewise. * lto-cgraph.c: Likewise. * ipa-ref-inline.h: Likewise. * ipa-pure-const.c: Likewise. * lto-streamer-out.c: Likewise. * ipa-utils.c: Likewise. * ipa-inline.c: Likewise. * matrix-reorg.c: Likewise. * tree-eh.c: Likewise. * tree-vectorizer.c: Likewise. * ipa-split.c: Likewise. * ipa.c: Likewise. * trans-mem.c: Likewise. * ipa-inline-analysis.c: Likewise. * gimplify.c: Likewise. * cfgexpand.c: Likewise. * tree-sra.c: Likewise. * ipa-prop.c: Likewise. * varasm.c: Likewise. * tree-nested.c: Likewise. * tree-inline.c: Likewise. * tree-profile.c: Likewise. * tree-ssa-structalias.c: Likewise. * passes.c: Likewise. * varpool.c: Likewise. * tree.c: Update field referenced for new cgraph/varpool layout. * decl2.c: Likewise. * gcc-interface/trans.c (finalize_nrv): Update field referenced for new cgraph/varpool layout. * lto.c: Update field referenced for new cgraph/varpool layout. * lto-partition.c: Likewise. From-SVN: r186450
Diffstat (limited to 'gcc/lto')
-rw-r--r--gcc/lto/ChangeLog5
-rw-r--r--gcc/lto/lto-partition.c155
-rw-r--r--gcc/lto/lto.c14
3 files changed, 92 insertions, 82 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index fe4a9c4..4ff0882 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,3 +1,8 @@
+2012-04-14 Jan Hubicka <jh@suse.cz>
+
+ * lto.c: Update field referenced for new cgraph/varpool layout.
+ * lto-partition.c: Likewise.
+
2012-04-11 Jan Hubicka <jh@suse.cz>
* lto.c: Update copyright; remove params.h, ipa-inline.h
diff --git a/gcc/lto/lto-partition.c b/gcc/lto/lto-partition.c
index 126c469..af36b14 100644
--- a/gcc/lto/lto-partition.c
+++ b/gcc/lto/lto-partition.c
@@ -74,19 +74,19 @@ add_references_to_partition (ltrans_partition part, struct ipa_ref_list *refs)
{
if (ref->refered_type == IPA_REF_CGRAPH
&& (DECL_COMDAT (cgraph_function_node (ipa_ref_node (ref),
- NULL)->decl)
+ NULL)->symbol.decl)
|| (ref->use == IPA_REF_ALIAS
&& lookup_attribute
- ("weakref", DECL_ATTRIBUTES (ipa_ref_node (ref)->decl))))
+ ("weakref", DECL_ATTRIBUTES (ipa_ref_node (ref)->symbol.decl))))
&& !cgraph_node_in_set_p (ipa_ref_node (ref), part->cgraph_set))
add_cgraph_node_to_partition (part, ipa_ref_node (ref));
else
if (ref->refered_type == IPA_REF_VARPOOL
- && (DECL_COMDAT (ipa_ref_varpool_node (ref)->decl)
+ && (DECL_COMDAT (ipa_ref_varpool_node (ref)->symbol.decl)
|| (ref->use == IPA_REF_ALIAS
&& lookup_attribute
("weakref",
- DECL_ATTRIBUTES (ipa_ref_varpool_node (ref)->decl))))
+ DECL_ATTRIBUTES (ipa_ref_varpool_node (ref)->symbol.decl))))
&& !varpool_node_in_set_p (ipa_ref_varpool_node (ref),
part->varpool_set))
add_varpool_node_to_partition (part, ipa_ref_varpool_node (ref));
@@ -99,7 +99,7 @@ add_references_to_partition (ltrans_partition part, struct ipa_ref_list *refs)
part->cgraph_set)
&& !lookup_attribute ("weakref",
DECL_ATTRIBUTES
- (ipa_ref_refering_node (ref)->decl)))
+ (ipa_ref_refering_node (ref)->symbol.decl)))
add_cgraph_node_to_partition (part, ipa_ref_refering_node (ref));
else
if (ref->refering_type == IPA_REF_VARPOOL
@@ -108,7 +108,7 @@ add_references_to_partition (ltrans_partition part, struct ipa_ref_list *refs)
part->varpool_set)
&& !lookup_attribute ("weakref",
DECL_ATTRIBUTES
- (ipa_ref_refering_varpool_node (ref)->decl)))
+ (ipa_ref_refering_varpool_node (ref)->symbol.decl)))
add_varpool_node_to_partition (part,
ipa_ref_refering_varpool_node (ref));
}
@@ -122,22 +122,22 @@ add_cgraph_node_to_partition_1 (struct cgraph_node *node, void *data)
ltrans_partition part = (ltrans_partition) data;
/* non-COMDAT aliases of COMDAT functions needs to be output just once. */
- if (!DECL_COMDAT (node->decl)
+ if (!DECL_COMDAT (node->symbol.decl)
&& !node->global.inlined_to
- && node->aux)
+ && node->symbol.aux)
{
gcc_assert (node->thunk.thunk_p || node->alias);
return false;
}
- if (node->aux)
+ if (node->symbol.aux)
{
- node->in_other_partition = 1;
+ node->symbol.in_other_partition = 1;
if (cgraph_dump_file)
fprintf (cgraph_dump_file, "Node %s/%i now used in multiple partitions\n",
cgraph_node_name (node), node->uid);
}
- node->aux = (void *)((size_t)node->aux + 1);
+ node->symbol.aux = (void *)((size_t)node->symbol.aux + 1);
cgraph_node_set_add (part->cgraph_set, node);
return false;
}
@@ -165,21 +165,22 @@ add_cgraph_node_to_partition (ltrans_partition part, struct cgraph_node *node)
for (e = node->callees; e; e = e->next_callee)
if ((!e->inline_failed
- || DECL_COMDAT (cgraph_function_node (e->callee, NULL)->decl))
+ || DECL_COMDAT (cgraph_function_node (e->callee, NULL)->symbol.decl))
&& !cgraph_node_in_set_p (e->callee, part->cgraph_set))
add_cgraph_node_to_partition (part, e->callee);
/* The only way to assemble non-weakref alias is to add the aliased object into
the unit. */
- add_references_to_partition (part, &node->ref_list);
+ add_references_to_partition (part, &node->symbol.ref_list);
n = cgraph_function_node (node, NULL);
if (n != node
&& !lookup_attribute ("weakref",
- DECL_ATTRIBUTES (node->decl)))
+ DECL_ATTRIBUTES (node->symbol.decl)))
add_cgraph_node_to_partition (part, n);
- if (node->same_comdat_group)
- for (n = node->same_comdat_group; n != node; n = n->same_comdat_group)
+ if (node->symbol.same_comdat_group)
+ for (n = cgraph (node->symbol.same_comdat_group);
+ n != node; n = cgraph (n->symbol.same_comdat_group))
add_cgraph_node_to_partition (part, n);
}
@@ -198,28 +199,29 @@ add_varpool_node_to_partition (ltrans_partition part, struct varpool_node *vnode
varpool_node_set_add (part->varpool_set, vnode);
- if (vnode->aux)
+ if (vnode->symbol.aux)
{
- vnode->in_other_partition = 1;
+ vnode->symbol.in_other_partition = 1;
if (cgraph_dump_file)
fprintf (cgraph_dump_file, "Varpool node %s now used in multiple partitions\n",
varpool_node_name (vnode));
}
- vnode->aux = (void *)((size_t)vnode->aux + 1);
+ vnode->symbol.aux = (void *)((size_t)vnode->symbol.aux + 1);
/* The only way to assemble non-weakref alias is to add the aliased object into
the unit. */
v = varpool_variable_node (vnode, NULL);
if (v != vnode
&& !lookup_attribute ("weakref",
- DECL_ATTRIBUTES (vnode->decl)))
+ DECL_ATTRIBUTES (vnode->symbol.decl)))
add_varpool_node_to_partition (part, v);
- add_references_to_partition (part, &vnode->ref_list);
+ add_references_to_partition (part, &vnode->symbol.ref_list);
- if (vnode->same_comdat_group
- && !varpool_node_in_set_p (vnode->same_comdat_group, part->varpool_set))
- add_varpool_node_to_partition (part, vnode->same_comdat_group);
+ if (vnode->symbol.same_comdat_group
+ && !varpool_node_in_set_p (varpool (vnode->symbol.same_comdat_group),
+ part->varpool_set))
+ add_varpool_node_to_partition (part, varpool (vnode->symbol.same_comdat_group));
}
/* Undo all additions until number of cgraph nodes in PARITION is N_CGRAPH_NODES
@@ -237,7 +239,7 @@ undo_partition (ltrans_partition partition, unsigned int n_cgraph_nodes,
n_cgraph_nodes);
partition->insns -= inline_summary (node)->self_size;
cgraph_node_set_remove (partition->cgraph_set, node);
- node->aux = (void *)((size_t)node->aux - 1);
+ node->symbol.aux = (void *)((size_t)node->symbol.aux - 1);
}
while (VEC_length (varpool_node_ptr, partition->varpool_set->nodes) >
n_varpool_nodes)
@@ -246,7 +248,7 @@ undo_partition (ltrans_partition partition, unsigned int n_cgraph_nodes,
partition->varpool_set->nodes,
n_varpool_nodes);
varpool_node_set_remove (partition->varpool_set, node);
- node->aux = (void *)((size_t)node->aux - 1);
+ node->symbol.aux = (void *)((size_t)node->symbol.aux - 1);
}
}
@@ -265,11 +267,11 @@ partition_cgraph_node_p (struct cgraph_node *node)
if (!node->analyzed)
return false;
/* Extern inlines and comdat are always only in partitions they are needed. */
- if (DECL_EXTERNAL (node->decl)
- || (DECL_COMDAT (node->decl)
+ if (DECL_EXTERNAL (node->symbol.decl)
+ || (DECL_COMDAT (node->symbol.decl)
&& !cgraph_used_from_object_file_p (node)))
return false;
- if (lookup_attribute ("weakref", DECL_ATTRIBUTES (node->decl)))
+ if (lookup_attribute ("weakref", DECL_ATTRIBUTES (node->symbol.decl)))
return false;
return true;
}
@@ -283,12 +285,12 @@ partition_varpool_node_p (struct varpool_node *vnode)
if (vnode->alias || !vnode->needed)
return false;
/* Constant pool and comdat are always only in partitions they are needed. */
- if (DECL_IN_CONSTANT_POOL (vnode->decl)
- || (DECL_COMDAT (vnode->decl)
+ if (DECL_IN_CONSTANT_POOL (vnode->symbol.decl)
+ || (DECL_COMDAT (vnode->symbol.decl)
&& !vnode->force_output
&& !varpool_used_from_object_file_p (vnode)))
return false;
- if (lookup_attribute ("weakref", DECL_ATTRIBUTES (vnode->decl)))
+ if (lookup_attribute ("weakref", DECL_ATTRIBUTES (vnode->symbol.decl)))
return false;
return true;
}
@@ -314,10 +316,10 @@ lto_1_to_1_map (void)
for (node = cgraph_nodes; node; node = node->next)
{
if (!partition_cgraph_node_p (node)
- || node->aux)
+ || node->symbol.aux)
continue;
- file_data = node->local.lto_file_data;
+ file_data = node->symbol.lto_file_data;
if (file_data)
{
@@ -349,9 +351,9 @@ lto_1_to_1_map (void)
for (vnode = varpool_nodes; vnode; vnode = vnode->next)
{
if (!partition_varpool_node_p (vnode)
- || vnode->aux)
+ || vnode->symbol.aux)
continue;
- file_data = vnode->lto_file_data;
+ file_data = vnode->symbol.lto_file_data;
slot = pointer_map_contains (pmap, file_data);
if (slot)
partition = (ltrans_partition) *slot;
@@ -366,9 +368,9 @@ lto_1_to_1_map (void)
add_varpool_node_to_partition (partition, vnode);
}
for (node = cgraph_nodes; node; node = node->next)
- node->aux = NULL;
+ node->symbol.aux = NULL;
for (vnode = varpool_nodes; vnode; vnode = vnode->next)
- vnode->aux = NULL;
+ vnode->symbol.aux = NULL;
/* If the cgraph is empty, create one cgraph node set so that there is still
an output file for any variables that need to be exported in a DSO. */
@@ -389,7 +391,7 @@ node_cmp (const void *pa, const void *pb)
{
const struct cgraph_node *a = *(const struct cgraph_node * const *) pa;
const struct cgraph_node *b = *(const struct cgraph_node * const *) pb;
- return b->order - a->order;
+ return b->symbol.order - a->symbol.order;
}
/* Helper function for qsort; sort nodes by order. */
@@ -398,7 +400,7 @@ varpool_node_cmp (const void *pa, const void *pb)
{
const struct varpool_node *a = *(const struct varpool_node * const *) pa;
const struct varpool_node *b = *(const struct varpool_node * const *) pb;
- return b->order - a->order;
+ return b->symbol.order - a->symbol.order;
}
/* Group cgraph nodes into equally-sized partitions.
@@ -462,7 +464,7 @@ lto_balanced_map (void)
int current_order = -1;
for (vnode = varpool_nodes; vnode; vnode = vnode->next)
- gcc_assert (!vnode->aux);
+ gcc_assert (!vnode->symbol.aux);
/* Until we have better ordering facility, use toplogical order.
Include only nodes we will partition and compute estimate of program
size. Note that since nodes that are not partitioned might be put into
@@ -510,15 +512,16 @@ lto_balanced_map (void)
for (i = 0; i < n_nodes; i++)
{
- if (order[i]->aux)
+ if (order[i]->symbol.aux)
continue;
- current_order = order[i]->order;
+ current_order = order[i]->symbol.order;
if (!flag_toplevel_reorder)
- while (varpool_pos < n_varpool_nodes && varpool_order[varpool_pos]->order < current_order)
+ while (varpool_pos < n_varpool_nodes
+ && varpool_order[varpool_pos]->symbol.order < current_order)
{
- if (!varpool_order[varpool_pos]->aux)
+ if (!varpool_order[varpool_pos]->symbol.aux)
add_varpool_node_to_partition (partition, varpool_order[varpool_pos]);
varpool_pos++;
}
@@ -558,7 +561,7 @@ lto_balanced_map (void)
cgraph_p = true;
node = VEC_index (cgraph_node_ptr, partition->cgraph_set->nodes,
last_visited_cgraph_node);
- refs = &node->ref_list;
+ refs = &node->symbol.ref_list;
last_visited_cgraph_node++;
@@ -602,7 +605,7 @@ lto_balanced_map (void)
{
refs =
&VEC_index (varpool_node_ptr, partition->varpool_set->nodes,
- last_visited_varpool_node)->ref_list;
+ last_visited_varpool_node)->symbol.ref_list;
last_visited_varpool_node++;
}
@@ -616,7 +619,7 @@ lto_balanced_map (void)
vnode = ipa_ref_varpool_node (ref);
if (!vnode->finalized)
continue;
- if (!vnode->aux && flag_toplevel_reorder
+ if (!vnode->symbol.aux && flag_toplevel_reorder
&& partition_varpool_node_p (vnode))
add_varpool_node_to_partition (partition, vnode);
vsi = varpool_node_set_find (partition->varpool_set, vnode);
@@ -647,7 +650,7 @@ lto_balanced_map (void)
vnode = ipa_ref_refering_varpool_node (ref);
gcc_assert (vnode->finalized);
- if (!vnode->aux && flag_toplevel_reorder
+ if (!vnode->symbol.aux && flag_toplevel_reorder
&& partition_varpool_node_p (vnode))
add_varpool_node_to_partition (partition, vnode);
vsi = varpool_node_set_find (partition->varpool_set, vnode);
@@ -706,7 +709,7 @@ lto_balanced_map (void)
}
i = best_i;
/* When we are finished, avoid creating empty partition. */
- while (i < n_nodes - 1 && order[i + 1]->aux)
+ while (i < n_nodes - 1 && order[i + 1]->symbol.aux)
i++;
if (i == n_nodes - 1)
break;
@@ -740,14 +743,14 @@ lto_balanced_map (void)
if (flag_toplevel_reorder)
{
for (vnode = varpool_nodes; vnode; vnode = vnode->next)
- if (partition_varpool_node_p (vnode) && !vnode->aux)
+ if (partition_varpool_node_p (vnode) && !vnode->symbol.aux)
add_varpool_node_to_partition (partition, vnode);
}
else
{
while (varpool_pos < n_varpool_nodes)
{
- if (!varpool_order[varpool_pos]->aux)
+ if (!varpool_order[varpool_pos]->symbol.aux)
add_varpool_node_to_partition (partition, varpool_order[varpool_pos]);
varpool_pos++;
}
@@ -761,12 +764,12 @@ lto_balanced_map (void)
static bool
promote_var (struct varpool_node *vnode)
{
- if (TREE_PUBLIC (vnode->decl) || DECL_EXTERNAL (vnode->decl))
+ if (TREE_PUBLIC (vnode->symbol.decl) || DECL_EXTERNAL (vnode->symbol.decl))
return false;
gcc_assert (flag_wpa);
- TREE_PUBLIC (vnode->decl) = 1;
- DECL_VISIBILITY (vnode->decl) = VISIBILITY_HIDDEN;
- DECL_VISIBILITY_SPECIFIED (vnode->decl) = true;
+ TREE_PUBLIC (vnode->symbol.decl) = 1;
+ DECL_VISIBILITY (vnode->symbol.decl) = VISIBILITY_HIDDEN;
+ DECL_VISIBILITY_SPECIFIED (vnode->symbol.decl) = true;
if (cgraph_dump_file)
fprintf (cgraph_dump_file,
"Promoting var as hidden: %s\n", varpool_node_name (vnode));
@@ -779,11 +782,11 @@ static bool
promote_fn (struct cgraph_node *node)
{
gcc_assert (flag_wpa);
- if (TREE_PUBLIC (node->decl) || DECL_EXTERNAL (node->decl))
+ if (TREE_PUBLIC (node->symbol.decl) || DECL_EXTERNAL (node->symbol.decl))
return false;
- TREE_PUBLIC (node->decl) = 1;
- DECL_VISIBILITY (node->decl) = VISIBILITY_HIDDEN;
- DECL_VISIBILITY_SPECIFIED (node->decl) = true;
+ TREE_PUBLIC (node->symbol.decl) = 1;
+ DECL_VISIBILITY (node->symbol.decl) = VISIBILITY_HIDDEN;
+ DECL_VISIBILITY_SPECIFIED (node->symbol.decl) = true;
if (cgraph_dump_file)
fprintf (cgraph_dump_file,
"Promoting function as hidden: %s/%i\n",
@@ -822,12 +825,13 @@ lto_promote_cross_file_statics (void)
for (csi = csi_start (set); !csi_end_p (csi); csi_next (&csi))
{
struct cgraph_node *node = csi_node (csi);
- if (node->local.externally_visible)
+ if (node->symbol.externally_visible)
continue;
if (node->global.inlined_to)
continue;
- if ((!DECL_EXTERNAL (node->decl) && !DECL_COMDAT (node->decl))
- && (referenced_from_other_partition_p (&node->ref_list, set, vset)
+ if ((!DECL_EXTERNAL (node->symbol.decl)
+ && !DECL_COMDAT (node->symbol.decl))
+ && (referenced_from_other_partition_p (&node->symbol.ref_list, set, vset)
|| reachable_from_other_partition_p (node, set)))
promote_fn (node);
}
@@ -837,9 +841,10 @@ lto_promote_cross_file_statics (void)
/* Constant pool references use internal labels and thus can not
be made global. It is sensible to keep those ltrans local to
allow better optimization. */
- if (!DECL_IN_CONSTANT_POOL (vnode->decl) && !DECL_COMDAT (vnode->decl)
- && !vnode->externally_visible && vnode->analyzed
- && referenced_from_other_partition_p (&vnode->ref_list,
+ if (!DECL_IN_CONSTANT_POOL (vnode->symbol.decl)
+ && !DECL_COMDAT (vnode->symbol.decl)
+ && !vnode->symbol.externally_visible && vnode->analyzed
+ && referenced_from_other_partition_p (&vnode->symbol.ref_list,
set, vset))
promote_var (vnode);
}
@@ -854,10 +859,10 @@ lto_promote_cross_file_statics (void)
from this partition that are not in this partition. This needs
to be done recursively. */
for (vnode = varpool_nodes; vnode; vnode = vnode->next)
- if (const_value_known_p (vnode->decl)
- && DECL_INITIAL (vnode->decl)
+ if (const_value_known_p (vnode->symbol.decl)
+ && DECL_INITIAL (vnode->symbol.decl)
&& !varpool_node_in_set_p (vnode, vset)
- && referenced_from_this_partition_p (&vnode->ref_list, set, vset)
+ && referenced_from_this_partition_p (&vnode->symbol.ref_list, set, vset)
&& !pointer_set_insert (inserted, vnode))
VEC_safe_push (varpool_node_ptr, heap, promoted_initializers, vnode);
@@ -868,14 +873,14 @@ lto_promote_cross_file_statics (void)
vnode = VEC_pop (varpool_node_ptr, promoted_initializers);
for (i = 0;
- ipa_ref_list_reference_iterate (&vnode->ref_list, i, ref);
+ ipa_ref_list_reference_iterate (&vnode->symbol.ref_list, i, ref);
i++)
{
if (ref->refered_type == IPA_REF_CGRAPH)
{
struct cgraph_node *n = ipa_ref_node (ref);
gcc_assert (!n->global.inlined_to);
- if (!n->local.externally_visible
+ if (!n->symbol.externally_visible
&& !cgraph_node_in_set_p (n, set))
promote_fn (n);
}
@@ -888,17 +893,17 @@ lto_promote_cross_file_statics (void)
/* Constant pool references use internal labels and thus
cannot be made global. It is sensible to keep those
ltrans local to allow better optimization. */
- if (DECL_IN_CONSTANT_POOL (v->decl))
+ if (DECL_IN_CONSTANT_POOL (v->symbol.decl))
{
if (!pointer_set_insert (inserted, vnode))
VEC_safe_push (varpool_node_ptr, heap,
promoted_initializers, v);
}
- else if (!v->externally_visible && v->analyzed)
+ else if (!v->symbol.externally_visible && v->analyzed)
{
if (promote_var (v)
- && DECL_INITIAL (v->decl)
- && const_value_known_p (v->decl)
+ && DECL_INITIAL (v->symbol.decl)
+ && const_value_known_p (v->symbol.decl)
&& !pointer_set_insert (inserted, vnode))
VEC_safe_push (varpool_node_ptr, heap,
promoted_initializers, v);
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c
index 921533f..0b48ce1 100644
--- a/gcc/lto/lto.c
+++ b/gcc/lto/lto.c
@@ -208,7 +208,7 @@ lto_materialize_function (struct cgraph_node *node)
const char *data, *name;
size_t len;
- decl = node->decl;
+ decl = node->symbol.decl;
/* Read in functions with body (analyzed nodes)
and also functions that are needed to produce virtual clones. */
if (cgraph_function_with_gimple_body_p (node) || has_analyzed_clone_p (node))
@@ -221,7 +221,7 @@ lto_materialize_function (struct cgraph_node *node)
WPA mode, the body of the function is not needed. */
if (!flag_wpa)
{
- file_data = node->local.lto_file_data;
+ file_data = node->symbol.lto_file_data;
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
/* We may have renamed the declaration, e.g., a static function. */
@@ -1424,13 +1424,13 @@ cmp_partitions_order (const void *a, const void *b)
int ordera = -1, orderb = -1;
if (VEC_length (cgraph_node_ptr, pa->cgraph_set->nodes))
- ordera = VEC_index (cgraph_node_ptr, pa->cgraph_set->nodes, 0)->order;
+ ordera = VEC_index (cgraph_node_ptr, pa->cgraph_set->nodes, 0)->symbol.order;
else if (VEC_length (varpool_node_ptr, pa->varpool_set->nodes))
- ordera = VEC_index (varpool_node_ptr, pa->varpool_set->nodes, 0)->order;
+ ordera = VEC_index (varpool_node_ptr, pa->varpool_set->nodes, 0)->symbol.order;
if (VEC_length (cgraph_node_ptr, pb->cgraph_set->nodes))
- orderb = VEC_index (cgraph_node_ptr, pb->cgraph_set->nodes, 0)->order;
+ orderb = VEC_index (cgraph_node_ptr, pb->cgraph_set->nodes, 0)->symbol.order;
else if (VEC_length (varpool_node_ptr, pb->varpool_set->nodes))
- orderb = VEC_index (varpool_node_ptr, pb->varpool_set->nodes, 0)->order;
+ orderb = VEC_index (varpool_node_ptr, pb->varpool_set->nodes, 0)->symbol.order;
return orderb - ordera;
}
@@ -1925,7 +1925,7 @@ materialize_cgraph (void)
for (node = cgraph_nodes; node; node = node->next)
{
- if (node->local.lto_file_data)
+ if (node->symbol.lto_file_data)
{
lto_materialize_function (node);
lto_stats.num_input_cgraph_nodes++;