diff options
Diffstat (limited to 'gcc/lto')
-rw-r--r-- | gcc/lto/ChangeLog | 44 | ||||
-rw-r--r-- | gcc/lto/lto-partition.c | 200 | ||||
-rw-r--r-- | gcc/lto/lto-symtab.c | 206 | ||||
-rw-r--r-- | gcc/lto/lto.c | 26 |
4 files changed, 260 insertions, 216 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 65ea3a39afe..d1f5d496755 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,47 @@ +2013-10-29 David Malcolm <dmalcolm@redhat.com> + + Patch autogenerated by refactor_symtab.py from + https://github.com/davidmalcolm/gcc-refactoring-scripts + revision 58bb219cc090b2f4516a9297d868c245495ee622 + + * lto-partition.c (lto_promote_cross_file_statics): Update for + conversion of symtab types to a true class hierarchy. + (rename_statics): Likewise. + (promote_symbol): Likewise. + (privatize_symbol_name): Likewise. + (lto_balanced_map): Likewise. + (varpool_node_cmp): Likewise. + (node_cmp): Likewise. + (lto_1_to_1_map): Likewise. + (undo_partition): Likewise. + (add_symbol_to_partition): Likewise. + (contained_in_symbol): Likewise. + (add_symbol_to_partition_1): Likewise. + (add_references_to_partition): Likewise. + (symbol_partitioned_p): Likewise. + (get_symbol_class): Likewise. + (lto_max_map): Likewise. + * lto-symtab.c (lto_symtab_prevailing_decl): Likewise. + (lto_symtab_merge_symbols): Likewise. + (lto_symtab_merge_symbols_1): Likewise. + (lto_symtab_merge_decls): Likewise. + (lto_symtab_merge_decls_1): Likewise. + (lto_symtab_merge_decls_2): Likewise. + (lto_symtab_resolve_symbols): Likewise. + (lto_symtab_resolve_can_prevail_p): Likewise. + (lto_symtab_symbol_p): Likewise. + (lto_symtab_resolve_replaceable_p): Likewise. + (lto_symtab_merge): Likewise. + (lto_varpool_replace_node): Likewise. + (lto_cgraph_replace_node): Likewise. + * lto.c (lto_main): Likewise. + (do_whole_program_analysis): Likewise. + (materialize_cgraph): Likewise. + (read_cgraph_and_symbols): Likewise. + (cmp_partitions_order): Likewise. + (lto_materialize_function): Likewise. + (has_analyzed_clone_p): Likewise. + 2013-10-29 Andrew MacLeod <amacleod@redhat.com> * lto/lto-object.c: Add gimple.h to include list. diff --git a/gcc/lto/lto-partition.c b/gcc/lto/lto-partition.c index e131d069b76..4abeb117fa0 100644 --- a/gcc/lto/lto-partition.c +++ b/gcc/lto/lto-partition.c @@ -58,18 +58,18 @@ get_symbol_class (symtab_node node) This include external delcarations. */ cgraph_node *cnode = dyn_cast <cgraph_node> (node); - if (DECL_ABSTRACT (node->symbol.decl)) + if (DECL_ABSTRACT (node->decl)) return SYMBOL_EXTERNAL; if (cnode && cnode->global.inlined_to) return SYMBOL_DUPLICATE; /* Weakref aliases are always duplicated. */ - if (node->symbol.weakref) + if (node->weakref) return SYMBOL_DUPLICATE; /* External declarations are external. */ - if (DECL_EXTERNAL (node->symbol.decl)) + if (DECL_EXTERNAL (node->decl)) return SYMBOL_EXTERNAL; if (varpool_node *vnode = dyn_cast <varpool_node> (node)) @@ -77,22 +77,22 @@ get_symbol_class (symtab_node node) /* Constant pool references use local symbol names that can not be promoted global. We should never put into a constant pool objects that can not be duplicated across partitions. */ - if (DECL_IN_CONSTANT_POOL (node->symbol.decl)) + if (DECL_IN_CONSTANT_POOL (node->decl)) return SYMBOL_DUPLICATE; - gcc_checking_assert (vnode->symbol.definition); + gcc_checking_assert (vnode->definition); } /* Functions that are cloned may stay in callgraph even if they are unused. Handle them as external; compute_ltrans_boundary take care to make proper things to happen (i.e. to make them appear in the boundary but with body streamed, so clone can me materialized). */ - else if (!cgraph (node)->symbol.definition) + else if (!cgraph (node)->definition) return SYMBOL_EXTERNAL; /* Comdats are duplicated to every use unless they are keyed. Those do not need duplication. */ - if (DECL_COMDAT (node->symbol.decl) - && !node->symbol.force_output - && !symtab_used_from_object_file_p ((symtab_node) node)) + if (DECL_COMDAT (node->decl) + && !node->force_output + && !symtab_used_from_object_file_p (node)) return SYMBOL_DUPLICATE; return SYMBOL_PARTITION; @@ -133,7 +133,7 @@ free_ltrans_partitions (void) static inline bool symbol_partitioned_p (symtab_node node) { - return node->symbol.aux; + return node->aux; } /* Add references into the partition. */ @@ -144,14 +144,14 @@ add_references_to_partition (ltrans_partition part, symtab_node node) struct ipa_ref *ref; /* Add all duplicated references to the partition. */ - for (i = 0; ipa_ref_list_reference_iterate (&node->symbol.ref_list, i, ref); i++) + for (i = 0; ipa_ref_list_reference_iterate (&node->ref_list, i, ref); i++) if (get_symbol_class (ref->referred) == SYMBOL_DUPLICATE) add_symbol_to_partition (part, ref->referred); /* References to a readonly variable may be constant foled into its value. 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->symbol.decl) != error_mark_node + && ctor_for_folding (ref->referred->decl) != error_mark_node && !lto_symtab_encoder_in_partition_p (part->encoder, ref->referred)) { if (!part->initializers_visited) @@ -173,7 +173,7 @@ add_symbol_to_partition_1 (ltrans_partition part, symtab_node node) symtab_node node1; /* If NODE is already there, we have nothing to do. */ - if (lto_symtab_encoder_in_partition_p (part->encoder, (symtab_node) node)) + if (lto_symtab_encoder_in_partition_p (part->encoder, node)) return true; /* non-duplicated aliases or tunks of a duplicated symbol needs to be output @@ -181,7 +181,7 @@ add_symbol_to_partition_1 (ltrans_partition part, symtab_node node) Be lax about comdats; they may or may not be duplicated and we may end up in need to duplicate keyed comdat because it has unkeyed alias. */ - if (c == SYMBOL_PARTITION && !DECL_COMDAT (node->symbol.decl) + if (c == SYMBOL_PARTITION && !DECL_COMDAT (node->decl) && symbol_partitioned_p (node)) return false; @@ -190,16 +190,16 @@ add_symbol_to_partition_1 (ltrans_partition part, symtab_node node) gcc_assert (c != SYMBOL_EXTERNAL && (c == SYMBOL_DUPLICATE || !symbol_partitioned_p (node))); - lto_set_symtab_encoder_in_partition (part->encoder, (symtab_node) node); + lto_set_symtab_encoder_in_partition (part->encoder, node); if (symbol_partitioned_p (node)) { - node->symbol.in_other_partition = 1; + node->in_other_partition = 1; if (cgraph_dump_file) fprintf (cgraph_dump_file, "Symbol node %s now used in multiple partitions\n", symtab_node_name (node)); } - node->symbol.aux = (void *)((size_t)node->symbol.aux + 1); + node->aux = (void *)((size_t)node->aux + 1); if (cgraph_node *cnode = dyn_cast <cgraph_node> (node)) { @@ -209,27 +209,27 @@ add_symbol_to_partition_1 (ltrans_partition part, symtab_node node) /* Add all inline clones and callees that are duplicated. */ for (e = cnode->callees; e; e = e->next_callee) if (!e->inline_failed) - add_symbol_to_partition_1 (part, (symtab_node) e->callee); - else if (get_symbol_class ((symtab_node) e->callee) == SYMBOL_DUPLICATE) - add_symbol_to_partition (part, (symtab_node) e->callee); + add_symbol_to_partition_1 (part, e->callee); + else if (get_symbol_class (e->callee) == SYMBOL_DUPLICATE) + add_symbol_to_partition (part, e->callee); /* Add all thunks associated with the function. */ for (e = cnode->callers; e; e = e->next_caller) if (e->caller->thunk.thunk_p) - add_symbol_to_partition_1 (part, (symtab_node) e->caller); + add_symbol_to_partition_1 (part, e->caller); } add_references_to_partition (part, node); /* Add all aliases associated with the symbol. */ - for (i = 0; ipa_ref_list_referring_iterate (&node->symbol.ref_list, i, ref); i++) - if (ref->use == IPA_REF_ALIAS && !node->symbol.weakref) + for (i = 0; ipa_ref_list_referring_iterate (&node->ref_list, i, ref); i++) + if (ref->use == IPA_REF_ALIAS && !node->weakref) add_symbol_to_partition_1 (part, ref->referring); /* Ensure that SAME_COMDAT_GROUP lists all allways added in a group. */ - if (node->symbol.same_comdat_group) - for (node1 = node->symbol.same_comdat_group; - node1 != node; node1 = node1->symbol.same_comdat_group) + if (node->same_comdat_group) + for (node1 = node->same_comdat_group; + node1 != node; node1 = node1->same_comdat_group) { bool added = add_symbol_to_partition_1 (part, node1); gcc_assert (added); @@ -245,17 +245,17 @@ static symtab_node contained_in_symbol (symtab_node node) { /* Weakrefs are never contained in anything. */ - if (node->symbol.weakref) + if (node->weakref) return node; if (cgraph_node *cnode = dyn_cast <cgraph_node> (node)) { cnode = cgraph_function_node (cnode, NULL); if (cnode->global.inlined_to) cnode = cnode->global.inlined_to; - return (symtab_node) cnode; + return cnode; } else if (varpool_node *vnode = dyn_cast <varpool_node> (node)) - return (symtab_node) varpool_variable_node (vnode, NULL); + return varpool_variable_node (vnode, NULL); return node; } @@ -281,7 +281,7 @@ add_symbol_to_partition (ltrans_partition part, symtab_node node) Be lax about comdats; they may or may not be duplicated and we may end up in need to duplicate keyed comdat because it has unkeyed alias. */ gcc_assert (get_symbol_class (node) == SYMBOL_DUPLICATE - || DECL_COMDAT (node->symbol.decl) + || DECL_COMDAT (node->decl) || !symbol_partitioned_p (node)); add_symbol_to_partition_1 (part, node); } @@ -305,7 +305,7 @@ undo_partition (ltrans_partition partition, unsigned int n_nodes) if (cgraph_node *cnode = dyn_cast <cgraph_node> (node)) partition->insns -= inline_summary (cnode)->self_size; lto_symtab_encoder_delete_node (partition->encoder, node); - node->symbol.aux = (void *)((size_t)node->symbol.aux - 1); + node->aux = (void *)((size_t)node->aux - 1); } } @@ -330,7 +330,7 @@ lto_1_to_1_map (void) || symbol_partitioned_p (node)) continue; - file_data = node->symbol.lto_file_data; + file_data = node->lto_file_data; if (file_data) { @@ -355,7 +355,7 @@ lto_1_to_1_map (void) npartitions++; } - add_symbol_to_partition (partition, (symtab_node) node); + add_symbol_to_partition (partition, node); } /* If the cgraph is empty, create one cgraph node set so that there is still @@ -382,7 +382,7 @@ lto_max_map (void) || symbol_partitioned_p (node)) continue; partition = new_partition (symtab_node_asm_name (node)); - add_symbol_to_partition (partition, (symtab_node) node); + add_symbol_to_partition (partition, node); npartitions++; } if (!npartitions) @@ -395,7 +395,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->symbol.order - a->symbol.order; + return b->order - a->order; } /* Helper function for qsort; sort nodes by order. */ @@ -404,7 +404,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->symbol.order - a->symbol.order; + return b->order - a->order; } /* Group cgraph nodes into equally-sized partitions. @@ -466,10 +466,10 @@ lto_balanced_map (void) int current_order = -1; FOR_EACH_VARIABLE (vnode) - gcc_assert (!vnode->symbol.aux); + gcc_assert (!vnode->aux); FOR_EACH_DEFINED_FUNCTION (node) - if (get_symbol_class ((symtab_node) node) == SYMBOL_PARTITION) + if (get_symbol_class (node) == SYMBOL_PARTITION) { order[n_nodes++] = node; total_size += inline_summary (node)->size; @@ -486,13 +486,13 @@ lto_balanced_map (void) qsort (order, n_nodes, sizeof (struct cgraph_node *), node_cmp); FOR_EACH_VARIABLE (vnode) - if (get_symbol_class ((symtab_node) vnode) == SYMBOL_PARTITION) + if (get_symbol_class (vnode) == SYMBOL_PARTITION) n_varpool_nodes++; varpool_order = XNEWVEC (struct varpool_node *, n_varpool_nodes); n_varpool_nodes = 0; FOR_EACH_VARIABLE (vnode) - if (get_symbol_class ((symtab_node) vnode) == SYMBOL_PARTITION) + if (get_symbol_class (vnode) == SYMBOL_PARTITION) varpool_order[n_varpool_nodes++] = vnode; qsort (varpool_order, n_varpool_nodes, sizeof (struct varpool_node *), varpool_node_cmp); @@ -510,21 +510,21 @@ lto_balanced_map (void) for (i = 0; i < n_nodes; i++) { - if (symbol_partitioned_p ((symtab_node) order[i])) + if (symbol_partitioned_p (order[i])) continue; - current_order = order[i]->symbol.order; + current_order = order[i]->order; if (!flag_toplevel_reorder) while (varpool_pos < n_varpool_nodes - && varpool_order[varpool_pos]->symbol.order < current_order) + && varpool_order[varpool_pos]->order < current_order) { - if (!symbol_partitioned_p ((symtab_node) varpool_order[varpool_pos])) - add_symbol_to_partition (partition, (symtab_node) varpool_order[varpool_pos]); + if (!symbol_partitioned_p (varpool_order[varpool_pos])) + add_symbol_to_partition (partition, varpool_order[varpool_pos]); varpool_pos++; } - add_symbol_to_partition (partition, (symtab_node) order[i]); + add_symbol_to_partition (partition, order[i]); total_size -= inline_summary (order[i])->size; @@ -552,15 +552,15 @@ lto_balanced_map (void) { struct cgraph_edge *edge; - refs = &node->symbol.ref_list; + refs = &node->ref_list; last_visited_node++; - gcc_assert (node->symbol.definition || node->symbol.weakref); + gcc_assert (node->definition || node->weakref); /* Compute boundary cost of callgraph edges. */ for (edge = node->callees; edge; edge = edge->next_callee) - if (edge->callee->symbol.definition) + if (edge->callee->definition) { int edge_cost = edge->frequency; int index; @@ -569,7 +569,7 @@ lto_balanced_map (void) edge_cost = 1; gcc_assert (edge_cost > 0); index = lto_symtab_encoder_lookup (partition->encoder, - (symtab_node)edge->callee); + edge->callee); if (index != LCC_NOT_FOUND && index < last_visited_node - 1) cost -= edge_cost, internal += edge_cost; @@ -581,12 +581,12 @@ lto_balanced_map (void) int edge_cost = edge->frequency; int index; - gcc_assert (edge->caller->symbol.definition); + gcc_assert (edge->caller->definition); if (!edge_cost) edge_cost = 1; gcc_assert (edge_cost > 0); index = lto_symtab_encoder_lookup (partition->encoder, - (symtab_node)edge->caller); + edge->caller); if (index != LCC_NOT_FOUND && index < last_visited_node - 1) cost -= edge_cost; @@ -596,7 +596,7 @@ lto_balanced_map (void) } else { - refs = &snode->symbol.ref_list; + refs = &snode->ref_list; last_visited_node++; } @@ -608,13 +608,13 @@ lto_balanced_map (void) int index; vnode = ipa_ref_varpool_node (ref); - if (!vnode->symbol.definition) + if (!vnode->definition) continue; - if (!symbol_partitioned_p ((symtab_node) vnode) && flag_toplevel_reorder - && get_symbol_class ((symtab_node) vnode) == SYMBOL_PARTITION) - add_symbol_to_partition (partition, (symtab_node) vnode); + if (!symbol_partitioned_p (vnode) && flag_toplevel_reorder + && get_symbol_class (vnode) == SYMBOL_PARTITION) + add_symbol_to_partition (partition, vnode); index = lto_symtab_encoder_lookup (partition->encoder, - (symtab_node)vnode); + vnode); if (index != LCC_NOT_FOUND && index < last_visited_node - 1) cost--, internal++; @@ -626,10 +626,10 @@ lto_balanced_map (void) int index; node = ipa_ref_node (ref); - if (!node->symbol.definition) + if (!node->definition) continue; index = lto_symtab_encoder_lookup (partition->encoder, - (symtab_node)node); + node); if (index != LCC_NOT_FOUND && index < last_visited_node - 1) cost--, internal++; @@ -642,12 +642,12 @@ lto_balanced_map (void) int index; vnode = ipa_ref_referring_varpool_node (ref); - gcc_assert (vnode->symbol.definition); - if (!symbol_partitioned_p ((symtab_node) vnode) && flag_toplevel_reorder - && get_symbol_class ((symtab_node) vnode) == SYMBOL_PARTITION) - add_symbol_to_partition (partition, (symtab_node) vnode); + gcc_assert (vnode->definition); + if (!symbol_partitioned_p (vnode) && flag_toplevel_reorder + && get_symbol_class (vnode) == SYMBOL_PARTITION) + add_symbol_to_partition (partition, vnode); index = lto_symtab_encoder_lookup (partition->encoder, - (symtab_node)vnode); + vnode); if (index != LCC_NOT_FOUND && index < last_visited_node - 1) cost--; @@ -659,9 +659,9 @@ lto_balanced_map (void) int index; node = ipa_ref_referring_node (ref); - gcc_assert (node->symbol.definition); + gcc_assert (node->definition); index = lto_symtab_encoder_lookup (partition->encoder, - (symtab_node)node); + node); if (index != LCC_NOT_FOUND && index < last_visited_node - 1) cost--; @@ -688,7 +688,7 @@ lto_balanced_map (void) if (cgraph_dump_file) fprintf (cgraph_dump_file, "Step %i: added %s/%i, size %i, cost %i/%i " "best %i/%i, step %i\n", i, - cgraph_node_name (order[i]), order[i]->symbol.order, + cgraph_node_name (order[i]), order[i]->order, partition->insns, cost, internal, best_cost, best_internal, best_i); /* Partition is too large, unwind into step when best cost was reached and @@ -705,7 +705,7 @@ lto_balanced_map (void) } i = best_i; /* When we are finished, avoid creating empty partition. */ - while (i < n_nodes - 1 && symbol_partitioned_p ((symtab_node) order[i + 1])) + while (i < n_nodes - 1 && symbol_partitioned_p (order[i + 1])) i++; if (i == n_nodes - 1) break; @@ -737,16 +737,16 @@ lto_balanced_map (void) if (flag_toplevel_reorder) { FOR_EACH_VARIABLE (vnode) - if (get_symbol_class ((symtab_node) vnode) == SYMBOL_PARTITION - && !symbol_partitioned_p ((symtab_node) vnode)) - add_symbol_to_partition (partition, (symtab_node) vnode); + if (get_symbol_class (vnode) == SYMBOL_PARTITION + && !symbol_partitioned_p (vnode)) + add_symbol_to_partition (partition, vnode); } else { while (varpool_pos < n_varpool_nodes) { - if (!symbol_partitioned_p ((symtab_node) varpool_order[varpool_pos])) - add_symbol_to_partition (partition, (symtab_node) varpool_order[varpool_pos]); + if (!symbol_partitioned_p (varpool_order[varpool_pos])) + add_symbol_to_partition (partition, varpool_order[varpool_pos]); varpool_pos++; } free (varpool_order); @@ -765,13 +765,13 @@ lto_balanced_map (void) static bool privatize_symbol_name (symtab_node node) { - tree decl = node->symbol.decl; + tree decl = node->decl; const char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); /* Our renaming machinery do not handle more than one change of assembler name. We should not need more than one anyway. */ - if (node->symbol.lto_file_data - && lto_get_decl_name_mapping (node->symbol.lto_file_data, name) != name) + if (node->lto_file_data + && lto_get_decl_name_mapping (node->lto_file_data, name) != name) { if (cgraph_dump_file) fprintf (cgraph_dump_file, @@ -783,7 +783,7 @@ privatize_symbol_name (symtab_node node) ??? should have a flag whether a symbol has a 'private' name already, since we produce some symbols like that i.e. for global constructors that are not really clones. */ - if (node->symbol.unique_name) + if (node->unique_name) { if (cgraph_dump_file) fprintf (cgraph_dump_file, @@ -792,8 +792,8 @@ privatize_symbol_name (symtab_node node) return false; } change_decl_assembler_name (decl, clone_function_name (decl, "lto_priv")); - if (node->symbol.lto_file_data) - lto_record_renamed_decl (node->symbol.lto_file_data, name, + if (node->lto_file_data) + lto_record_renamed_decl (node->lto_file_data, name, IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl))); if (cgraph_dump_file) @@ -809,19 +809,19 @@ static void promote_symbol (symtab_node node) { /* We already promoted ... */ - if (DECL_VISIBILITY (node->symbol.decl) == VISIBILITY_HIDDEN - && DECL_VISIBILITY_SPECIFIED (node->symbol.decl) - && TREE_PUBLIC (node->symbol.decl)) + if (DECL_VISIBILITY (node->decl) == VISIBILITY_HIDDEN + && DECL_VISIBILITY_SPECIFIED (node->decl) + && TREE_PUBLIC (node->decl)) return; - gcc_checking_assert (!TREE_PUBLIC (node->symbol.decl) - && !DECL_EXTERNAL (node->symbol.decl)); + gcc_checking_assert (!TREE_PUBLIC (node->decl) + && !DECL_EXTERNAL (node->decl)); /* Be sure that newly public symbol does not conflict with anything already defined by the non-LTO part. */ privatize_symbol_name (node); - TREE_PUBLIC (node->symbol.decl) = 1; - DECL_VISIBILITY (node->symbol.decl) = VISIBILITY_HIDDEN; - DECL_VISIBILITY_SPECIFIED (node->symbol.decl) = true; + TREE_PUBLIC (node->decl) = 1; + DECL_VISIBILITY (node->decl) = VISIBILITY_HIDDEN; + DECL_VISIBILITY_SPECIFIED (node->decl) = true; if (cgraph_dump_file) fprintf (cgraph_dump_file, "Promoting as hidden: %s\n", symtab_node_name (node)); @@ -854,16 +854,16 @@ may_need_named_section_p (lto_symtab_encoder_t encoder, symtab_node node) static void rename_statics (lto_symtab_encoder_t encoder, symtab_node node) { - tree decl = node->symbol.decl; + tree decl = node->decl; symtab_node s; tree name = DECL_ASSEMBLER_NAME (decl); /* See if this is static symbol. */ - if ((node->symbol.externally_visible + if ((node->externally_visible /* FIXME: externally_visible is somewhat illogically not set for external symbols (i.e. those not defined). Remove this test once this is fixed. */ - || DECL_EXTERNAL (node->symbol.decl) + || DECL_EXTERNAL (node->decl) || !symtab_real_symbol_p (node)) && !may_need_named_section_p (encoder, node)) return; @@ -872,9 +872,9 @@ rename_statics (lto_symtab_encoder_t encoder, symtab_node node) (all types of symbols counts here, since we can not have static of the same name as external or public symbol.) */ for (s = symtab_node_for_asm (name); - s; s = s->symbol.next_sharing_asm_name) + s; s = s->next_sharing_asm_name) if ((symtab_real_symbol_p (s) || may_need_named_section_p (encoder, s)) - && s->symbol.decl != node->symbol.decl + && s->decl != node->decl && (!encoder || lto_symtab_encoder_lookup (encoder, s) != LCC_NOT_FOUND)) break; @@ -890,10 +890,10 @@ rename_statics (lto_symtab_encoder_t encoder, symtab_node node) /* Assign every symbol in the set that shares the same ASM name an unique mangled name. */ for (s = symtab_node_for_asm (name); s;) - if (!s->symbol.externally_visible + if (!s->externally_visible && ((symtab_real_symbol_p (s) - && !DECL_EXTERNAL (node->symbol.decl) - && !TREE_PUBLIC (node->symbol.decl)) + && !DECL_EXTERNAL (node->decl) + && !TREE_PUBLIC (node->decl)) || may_need_named_section_p (encoder, s)) && (!encoder || lto_symtab_encoder_lookup (encoder, s) != LCC_NOT_FOUND)) @@ -901,9 +901,9 @@ rename_statics (lto_symtab_encoder_t encoder, symtab_node node) if (privatize_symbol_name (s)) /* Re-start from beginning since we do not know how many symbols changed a name. */ s = symtab_node_for_asm (name); - else s = s->symbol.next_sharing_asm_name; + else s = s->next_sharing_asm_name; } - else s = s->symbol.next_sharing_asm_name; + else s = s->next_sharing_asm_name; } /* Find out all static decls that need to be promoted to global because @@ -942,12 +942,12 @@ lto_promote_cross_file_statics (void) rename_statics (encoder, node); /* No need to promote if symbol already is externally visible ... */ - if (node->symbol.externally_visible + if (node->externally_visible /* ... or if it is part of current partition ... */ || lto_symtab_encoder_in_partition_p (encoder, node) /* ... or if we do not partition it. This mean that it will appear in every partition refernecing it. */ - || get_symbol_class ((symtab_node) node) != SYMBOL_PARTITION) + || get_symbol_class (node) != SYMBOL_PARTITION) continue; promote_symbol (node); diff --git a/gcc/lto/lto-symtab.c b/gcc/lto/lto-symtab.c index b1b7731c830..13646bb6b72 100644 --- a/gcc/lto/lto-symtab.c +++ b/gcc/lto/lto-symtab.c @@ -44,17 +44,17 @@ lto_cgraph_replace_node (struct cgraph_node *node, { fprintf (cgraph_dump_file, "Replacing cgraph node %s/%i by %s/%i" " for symbol %s\n", - cgraph_node_name (node), node->symbol.order, + cgraph_node_name (node), node->order, cgraph_node_name (prevailing_node), - prevailing_node->symbol.order, + prevailing_node->order, IDENTIFIER_POINTER ((*targetm.asm_out.mangle_assembler_name) - (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (node->symbol.decl))))); + (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (node->decl))))); } /* Merge node flags. */ - if (node->symbol.force_output) + if (node->force_output) cgraph_mark_force_output_node (prevailing_node); - if (node->symbol.address_taken) + if (node->address_taken) { gcc_assert (!prevailing_node->global.inlined_to); cgraph_mark_address_taken_node (prevailing_node); @@ -62,8 +62,8 @@ lto_cgraph_replace_node (struct cgraph_node *node, /* Redirect all incoming edges. */ compatible_p - = types_compatible_p (TREE_TYPE (TREE_TYPE (prevailing_node->symbol.decl)), - TREE_TYPE (TREE_TYPE (node->symbol.decl))); + = types_compatible_p (TREE_TYPE (TREE_TYPE (prevailing_node->decl)), + TREE_TYPE (TREE_TYPE (node->decl))); for (e = node->callers; e; e = next) { next = e->next_caller; @@ -76,12 +76,12 @@ lto_cgraph_replace_node (struct cgraph_node *node, e->call_stmt_cannot_inline_p = 1; } /* Redirect incomming references. */ - ipa_clone_referring ((symtab_node)prevailing_node, &node->symbol.ref_list); + ipa_clone_referring (prevailing_node, &node->ref_list); ipa_merge_profiles (prevailing_node, node); - lto_free_function_in_decl_state_for_node ((symtab_node)node); + lto_free_function_in_decl_state_for_node (node); - if (node->symbol.decl != prevailing_node->symbol.decl) + if (node->decl != prevailing_node->decl) cgraph_release_function_body (node); /* Finally remove the replaced node. */ @@ -95,15 +95,15 @@ static void lto_varpool_replace_node (struct varpool_node *vnode, struct varpool_node *prevailing_node) { - gcc_assert (!vnode->symbol.definition || prevailing_node->symbol.definition); - gcc_assert (!vnode->symbol.analyzed || prevailing_node->symbol.analyzed); + gcc_assert (!vnode->definition || prevailing_node->definition); + gcc_assert (!vnode->analyzed || prevailing_node->analyzed); - ipa_clone_referring ((symtab_node)prevailing_node, &vnode->symbol.ref_list); + ipa_clone_referring (prevailing_node, &vnode->ref_list); /* Be sure we can garbage collect the initializer. */ - if (DECL_INITIAL (vnode->symbol.decl) - && vnode->symbol.decl != prevailing_node->symbol.decl) - DECL_INITIAL (vnode->symbol.decl) = error_mark_node; + if (DECL_INITIAL (vnode->decl) + && vnode->decl != prevailing_node->decl) + DECL_INITIAL (vnode->decl) = error_mark_node; /* Finally remove the replaced node. */ varpool_remove_node (vnode); } @@ -115,8 +115,8 @@ lto_varpool_replace_node (struct varpool_node *vnode, static bool lto_symtab_merge (symtab_node prevailing, symtab_node entry) { - tree prevailing_decl = prevailing->symbol.decl; - tree decl = entry->symbol.decl; + tree prevailing_decl = prevailing->decl; + tree decl = entry->decl; tree prevailing_type, type; if (prevailing_decl == decl) @@ -218,15 +218,15 @@ lto_symtab_merge (symtab_node prevailing, symtab_node entry) static bool lto_symtab_resolve_replaceable_p (symtab_node e) { - if (DECL_EXTERNAL (e->symbol.decl) - || DECL_COMDAT (e->symbol.decl) - || DECL_ONE_ONLY (e->symbol.decl) - || DECL_WEAK (e->symbol.decl)) + if (DECL_EXTERNAL (e->decl) + || DECL_COMDAT (e->decl) + || DECL_ONE_ONLY (e->decl) + || DECL_WEAK (e->decl)) return true; - if (TREE_CODE (e->symbol.decl) == VAR_DECL) - return (DECL_COMMON (e->symbol.decl) - || (!flag_no_common && !DECL_INITIAL (e->symbol.decl))); + if (TREE_CODE (e->decl) == VAR_DECL) + return (DECL_COMMON (e->decl) + || (!flag_no_common && !DECL_INITIAL (e->decl))); return false; } @@ -238,7 +238,7 @@ lto_symtab_resolve_replaceable_p (symtab_node e) static bool lto_symtab_symbol_p (symtab_node e) { - if (!TREE_PUBLIC (e->symbol.decl) && !DECL_EXTERNAL (e->symbol.decl)) + if (!TREE_PUBLIC (e->decl) && !DECL_EXTERNAL (e->decl)) return false; return symtab_real_symbol_p (e); } @@ -254,10 +254,10 @@ lto_symtab_resolve_can_prevail_p (symtab_node e) /* The C++ frontend ends up neither setting TREE_STATIC nor DECL_EXTERNAL on virtual methods but only TREE_PUBLIC. So do not reject !TREE_STATIC here but only DECL_EXTERNAL. */ - if (DECL_EXTERNAL (e->symbol.decl)) + if (DECL_EXTERNAL (e->decl)) return false; - return e->symbol.definition; + return e->definition; } /* Resolve the symbol with the candidates in the chain *SLOT and store @@ -270,11 +270,11 @@ lto_symtab_resolve_symbols (symtab_node first) symtab_node prevailing = NULL; /* Always set e->node so that edges are updated to reflect decl merging. */ - for (e = first; e; e = e->symbol.next_sharing_asm_name) + for (e = first; e; e = e->next_sharing_asm_name) if (lto_symtab_symbol_p (e) - && (e->symbol.resolution == LDPR_PREVAILING_DEF_IRONLY - || e->symbol.resolution == LDPR_PREVAILING_DEF_IRONLY_EXP - || e->symbol.resolution == LDPR_PREVAILING_DEF)) + && (e->resolution == LDPR_PREVAILING_DEF_IRONLY + || e->resolution == LDPR_PREVAILING_DEF_IRONLY_EXP + || e->resolution == LDPR_PREVAILING_DEF)) { prevailing = e; break; @@ -284,19 +284,19 @@ lto_symtab_resolve_symbols (symtab_node first) if (prevailing) { /* Assert it's the only one. */ - for (e = prevailing->symbol.next_sharing_asm_name; e; e = e->symbol.next_sharing_asm_name) + for (e = prevailing->next_sharing_asm_name; e; e = e->next_sharing_asm_name) if (lto_symtab_symbol_p (e) - && (e->symbol.resolution == LDPR_PREVAILING_DEF_IRONLY - || e->symbol.resolution == LDPR_PREVAILING_DEF_IRONLY_EXP - || e->symbol.resolution == LDPR_PREVAILING_DEF)) + && (e->resolution == LDPR_PREVAILING_DEF_IRONLY + || e->resolution == LDPR_PREVAILING_DEF_IRONLY_EXP + || e->resolution == LDPR_PREVAILING_DEF)) fatal_error ("multiple prevailing defs for %qE", - DECL_NAME (prevailing->symbol.decl)); + DECL_NAME (prevailing->decl)); return prevailing; } /* Find the single non-replaceable prevailing symbol and diagnose ODR violations. */ - for (e = first; e; e = e->symbol.next_sharing_asm_name) + for (e = first; e; e = e->next_sharing_asm_name) { if (!lto_symtab_resolve_can_prevail_p (e)) continue; @@ -306,9 +306,9 @@ lto_symtab_resolve_symbols (symtab_node first) { if (prevailing) { - error_at (DECL_SOURCE_LOCATION (e->symbol.decl), - "%qD has already been defined", e->symbol.decl); - inform (DECL_SOURCE_LOCATION (prevailing->symbol.decl), + error_at (DECL_SOURCE_LOCATION (e->decl), + "%qD has already been defined", e->decl); + inform (DECL_SOURCE_LOCATION (prevailing->decl), "previously defined here"); } prevailing = e; @@ -318,13 +318,13 @@ lto_symtab_resolve_symbols (symtab_node first) return prevailing; /* Do a second round choosing one from the replaceable prevailing decls. */ - for (e = first; e; e = e->symbol.next_sharing_asm_name) + for (e = first; e; e = e->next_sharing_asm_name) { if (!lto_symtab_resolve_can_prevail_p (e)) continue; /* Choose the first function that can prevail as prevailing. */ - if (TREE_CODE (e->symbol.decl) == FUNCTION_DECL) + if (TREE_CODE (e->decl) == FUNCTION_DECL) { prevailing = e; break; @@ -332,8 +332,8 @@ lto_symtab_resolve_symbols (symtab_node first) /* From variables that can prevail choose the largest one. */ if (!prevailing - || tree_int_cst_lt (DECL_SIZE (prevailing->symbol.decl), - DECL_SIZE (e->symbol.decl)) + || tree_int_cst_lt (DECL_SIZE (prevailing->decl), + DECL_SIZE (e->decl)) /* When variables are equivalent try to chose one that has useful DECL_INITIAL. This makes sense for keyed vtables that are DECL_EXTERNAL but initialized. In units that do not need them @@ -343,11 +343,11 @@ lto_symtab_resolve_symbols (symtab_node first) We know that the vtable is keyed outside the LTO unit - otherwise the keyed instance would prevail. We still can preserve useful info in the initializer. */ - || (DECL_SIZE (prevailing->symbol.decl) == DECL_SIZE (e->symbol.decl) - && (DECL_INITIAL (e->symbol.decl) - && DECL_INITIAL (e->symbol.decl) != error_mark_node) - && (!DECL_INITIAL (prevailing->symbol.decl) - || DECL_INITIAL (prevailing->symbol.decl) == error_mark_node))) + || (DECL_SIZE (prevailing->decl) == DECL_SIZE (e->decl) + && (DECL_INITIAL (e->decl) + && DECL_INITIAL (e->decl) != error_mark_node) + && (!DECL_INITIAL (prevailing->decl) + || DECL_INITIAL (prevailing->decl) == error_mark_node))) prevailing = e; } @@ -368,17 +368,17 @@ lto_symtab_merge_decls_2 (symtab_node first, bool diagnosed_p) /* Nothing to do for a single entry. */ prevailing = first; - if (!prevailing->symbol.next_sharing_asm_name) + if (!prevailing->next_sharing_asm_name) return; /* Try to merge each entry with the prevailing one. */ - for (e = prevailing->symbol.next_sharing_asm_name; - e; e = e->symbol.next_sharing_asm_name) - if (TREE_PUBLIC (e->symbol.decl)) + for (e = prevailing->next_sharing_asm_name; + e; e = e->next_sharing_asm_name) + if (TREE_PUBLIC (e->decl)) { if (!lto_symtab_merge (prevailing, e) && !diagnosed_p) - mismatches.safe_push (e->symbol.decl); + mismatches.safe_push (e->decl); } if (mismatches.is_empty ()) return; @@ -386,15 +386,15 @@ lto_symtab_merge_decls_2 (symtab_node first, bool diagnosed_p) /* Diagnose all mismatched re-declarations. */ FOR_EACH_VEC_ELT (mismatches, i, decl) { - if (!types_compatible_p (TREE_TYPE (prevailing->symbol.decl), + if (!types_compatible_p (TREE_TYPE (prevailing->decl), TREE_TYPE (decl))) diagnosed_p |= warning_at (DECL_SOURCE_LOCATION (decl), 0, "type of %qD does not match original " "declaration", decl); - else if ((DECL_USER_ALIGN (prevailing->symbol.decl) + else if ((DECL_USER_ALIGN (prevailing->decl) && DECL_USER_ALIGN (decl)) - && DECL_ALIGN (prevailing->symbol.decl) < DECL_ALIGN (decl)) + && DECL_ALIGN (prevailing->decl) < DECL_ALIGN (decl)) { diagnosed_p |= warning_at (DECL_SOURCE_LOCATION (decl), 0, "alignment of %qD is bigger than " @@ -402,7 +402,7 @@ lto_symtab_merge_decls_2 (symtab_node first, bool diagnosed_p) } } if (diagnosed_p) - inform (DECL_SOURCE_LOCATION (prevailing->symbol.decl), + inform (DECL_SOURCE_LOCATION (prevailing->decl), "previously declared here"); mismatches.release (); @@ -420,8 +420,8 @@ lto_symtab_merge_decls_1 (symtab_node first) { fprintf (cgraph_dump_file, "Merging nodes for %s. Candidates:\n", symtab_node_asm_name (first)); - for (e = first; e; e = e->symbol.next_sharing_asm_name) - if (TREE_PUBLIC (e->symbol.decl)) + for (e = first; e; e = e->next_sharing_asm_name) + if (TREE_PUBLIC (e->decl)) dump_symtab_node (cgraph_dump_file, e); } @@ -442,21 +442,21 @@ lto_symtab_merge_decls_1 (symtab_node first) This is needed for C++ typeinfos, for example in lto/20081204-1 there are typeifos in both units, just one of them do have size. */ - if (TREE_CODE (prevailing->symbol.decl) == VAR_DECL) + if (TREE_CODE (prevailing->decl) == VAR_DECL) { - for (e = prevailing->symbol.next_sharing_asm_name; - e; e = e->symbol.next_sharing_asm_name) - if (!COMPLETE_TYPE_P (TREE_TYPE (prevailing->symbol.decl)) - && COMPLETE_TYPE_P (TREE_TYPE (e->symbol.decl)) + for (e = prevailing->next_sharing_asm_name; + e; e = e->next_sharing_asm_name) + if (!COMPLETE_TYPE_P (TREE_TYPE (prevailing->decl)) + && COMPLETE_TYPE_P (TREE_TYPE (e->decl)) && lto_symtab_symbol_p (e)) prevailing = e; } /* For variables prefer the non-builtin if one is available. */ - else if (TREE_CODE (prevailing->symbol.decl) == FUNCTION_DECL) + else if (TREE_CODE (prevailing->decl) == FUNCTION_DECL) { - for (e = first; e; e = e->symbol.next_sharing_asm_name) - if (TREE_CODE (e->symbol.decl) == FUNCTION_DECL - && !DECL_BUILT_IN (e->symbol.decl) + for (e = first; e; e = e->next_sharing_asm_name) + if (TREE_CODE (e->decl) == FUNCTION_DECL + && !DECL_BUILT_IN (e->decl) && lto_symtab_symbol_p (e)) { prevailing = e; @@ -468,29 +468,29 @@ lto_symtab_merge_decls_1 (symtab_node first) symtab_prevail_in_asm_name_hash (prevailing); /* Diagnose mismatched objects. */ - for (e = prevailing->symbol.next_sharing_asm_name; - e; e = e->symbol.next_sharing_asm_name) + for (e = prevailing->next_sharing_asm_name; + e; e = e->next_sharing_asm_name) { - if (TREE_CODE (prevailing->symbol.decl) - == TREE_CODE (e->symbol.decl)) + if (TREE_CODE (prevailing->decl) + == TREE_CODE (e->decl)) continue; if (!lto_symtab_symbol_p (e)) continue; - switch (TREE_CODE (prevailing->symbol.decl)) + switch (TREE_CODE (prevailing->decl)) { case VAR_DECL: - gcc_assert (TREE_CODE (e->symbol.decl) == FUNCTION_DECL); - error_at (DECL_SOURCE_LOCATION (e->symbol.decl), + gcc_assert (TREE_CODE (e->decl) == FUNCTION_DECL); + error_at (DECL_SOURCE_LOCATION (e->decl), "variable %qD redeclared as function", - prevailing->symbol.decl); + prevailing->decl); break; case FUNCTION_DECL: - gcc_assert (TREE_CODE (e->symbol.decl) == VAR_DECL); - error_at (DECL_SOURCE_LOCATION (e->symbol.decl), + gcc_assert (TREE_CODE (e->decl) == VAR_DECL); + error_at (DECL_SOURCE_LOCATION (e->decl), "function %qD redeclared as variable", - prevailing->symbol.decl); + prevailing->decl); break; default: @@ -500,7 +500,7 @@ lto_symtab_merge_decls_1 (symtab_node first) diagnosed_p = true; } if (diagnosed_p) - inform (DECL_SOURCE_LOCATION (prevailing->symbol.decl), + inform (DECL_SOURCE_LOCATION (prevailing->decl), "previously declared here"); /* Merge the chain to the single prevailing decl and diagnose @@ -510,7 +510,7 @@ lto_symtab_merge_decls_1 (symtab_node first) if (cgraph_dump_file) { fprintf (cgraph_dump_file, "After resolution:\n"); - for (e = prevailing; e; e = e->symbol.next_sharing_asm_name) + for (e = prevailing; e; e = e->next_sharing_asm_name) dump_symtab_node (cgraph_dump_file, e); } } @@ -526,8 +526,8 @@ lto_symtab_merge_decls (void) symtab_initialize_asm_name_hash (); FOR_EACH_SYMBOL (node) - if (!node->symbol.previous_sharing_asm_name - && node->symbol.next_sharing_asm_name) + if (!node->previous_sharing_asm_name + && node->next_sharing_asm_name) lto_symtab_merge_decls_1 (node); } @@ -539,15 +539,15 @@ lto_symtab_merge_symbols_1 (symtab_node prevailing) symtab_node e, next; /* Replace the cgraph node of each entry with the prevailing one. */ - for (e = prevailing->symbol.next_sharing_asm_name; e; + for (e = prevailing->next_sharing_asm_name; e; e = next) { - next = e->symbol.next_sharing_asm_name; + next = e->next_sharing_asm_name; if (!lto_symtab_symbol_p (e)) continue; cgraph_node *ce = dyn_cast <cgraph_node> (e); - if (ce && !DECL_BUILT_IN (e->symbol.decl)) + if (ce && !DECL_BUILT_IN (e->decl)) lto_cgraph_replace_node (ce, cgraph (prevailing)); if (varpool_node *ve = dyn_cast <varpool_node> (e)) lto_varpool_replace_node (ve, varpool (prevailing)); @@ -574,8 +574,8 @@ lto_symtab_merge_symbols (void) updated to the ohter dupliate. */ FOR_EACH_SYMBOL (node) if (lto_symtab_symbol_p (node) - && node->symbol.next_sharing_asm_name - && !node->symbol.previous_sharing_asm_name) + && node->next_sharing_asm_name + && !node->previous_sharing_asm_name) lto_symtab_merge_symbols_1 (node); /* Resolve weakref aliases whose target are now in the compilation unit. @@ -586,24 +586,24 @@ lto_symtab_merge_symbols (void) varpool_node *vnode; symtab_node node2; - if (!node->symbol.analyzed && node->symbol.alias_target) + if (!node->analyzed && node->alias_target) { - symtab_node tgt = symtab_node_for_asm (node->symbol.alias_target); - gcc_assert (node->symbol.weakref); + symtab_node tgt = symtab_node_for_asm (node->alias_target); + gcc_assert (node->weakref); if (tgt) symtab_resolve_alias (node, tgt); } - node->symbol.aux = NULL; + node->aux = NULL; if (!(cnode = dyn_cast <cgraph_node> (node)) || !cnode->clone_of - || cnode->clone_of->symbol.decl != cnode->symbol.decl) + || cnode->clone_of->decl != cnode->decl) { /* Builtins are not merged via decl merging. It is however possible that tree merging unified the declaration. We do not want duplicate entries in symbol table. */ - if (cnode && DECL_BUILT_IN (node->symbol.decl) - && (cnode2 = cgraph_get_node (node->symbol.decl)) + if (cnode && DECL_BUILT_IN (node->decl) + && (cnode2 = cgraph_get_node (node->decl)) && cnode2 != cnode) lto_cgraph_replace_node (cnode2, cnode); @@ -611,8 +611,8 @@ lto_symtab_merge_symbols (void) symbol name (since it is irrelevant), but we need to unify symbol nodes if tree merging occured. */ if ((vnode = dyn_cast <varpool_node> (node)) - && DECL_HARD_REGISTER (vnode->symbol.decl) - && (node2 = symtab_get_node (vnode->symbol.decl)) + && DECL_HARD_REGISTER (vnode->decl) + && (node2 = symtab_get_node (vnode->decl)) && node2 != node) lto_varpool_replace_node (dyn_cast <varpool_node> (node2), vnode); @@ -620,12 +620,12 @@ lto_symtab_merge_symbols (void) /* Abstract functions may have duplicated cgraph nodes attached; remove them. */ - else if (cnode && DECL_ABSTRACT (cnode->symbol.decl) - && (cnode2 = cgraph_get_node (node->symbol.decl)) + else if (cnode && DECL_ABSTRACT (cnode->decl) + && (cnode2 = cgraph_get_node (node->decl)) && cnode2 != cnode) cgraph_remove_node (cnode2); - symtab_insert_node_to_hashtable ((symtab_node)node); + symtab_insert_node_to_hashtable (node); } } } @@ -659,5 +659,5 @@ lto_symtab_prevailing_decl (tree decl) if (!ret) return decl; - return ret->symbol.decl; + return ret->decl; } diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index bca1dd12032..89de69dea6f 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -171,7 +171,7 @@ has_analyzed_clone_p (struct cgraph_node *node) if (node) while (node != orig) { - if (node->symbol.analyzed) + if (node->analyzed) return true; if (node->clones) node = node->clones; @@ -195,10 +195,10 @@ lto_materialize_function (struct cgraph_node *node) { tree decl; - decl = node->symbol.decl; + decl = node->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) && node->symbol.analyzed) + if ((cgraph_function_with_gimple_body_p (node) && node->analyzed) || node->used_as_abstract_origin || has_analyzed_clone_p (node)) { @@ -2398,9 +2398,9 @@ cmp_partitions_order (const void *a, const void *b) int ordera = -1, orderb = -1; if (lto_symtab_encoder_size (pa->encoder)) - ordera = lto_symtab_encoder_deref (pa->encoder, 0)->symbol.order; + ordera = lto_symtab_encoder_deref (pa->encoder, 0)->order; if (lto_symtab_encoder_size (pb->encoder)) - orderb = lto_symtab_encoder_deref (pb->encoder, 0)->symbol.order; + orderb = lto_symtab_encoder_deref (pb->encoder, 0)->order; return orderb - ordera; } @@ -2873,11 +2873,11 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames) FOR_EACH_SYMBOL (snode) if (symtab_real_symbol_p (snode) - && snode->symbol.lto_file_data - && snode->symbol.lto_file_data->resolution_map - && (res = pointer_map_contains (snode->symbol.lto_file_data->resolution_map, - snode->symbol.decl))) - snode->symbol.resolution + && snode->lto_file_data + && snode->lto_file_data->resolution_map + && (res = pointer_map_contains (snode->lto_file_data->resolution_map, + snode->decl))) + snode->resolution = (enum ld_plugin_symbol_resolution)(size_t)*res; for (i = 0; all_file_decl_data[i]; i++) if (all_file_decl_data[i]->resolution_map) @@ -2979,7 +2979,7 @@ materialize_cgraph (void) FOR_EACH_FUNCTION (node) { - if (node->symbol.lto_file_data) + if (node->lto_file_data) { lto_materialize_function (node); lto_stats.num_input_cgraph_nodes++; @@ -3126,7 +3126,7 @@ do_whole_program_analysis (void) /* AUX pointers are used by partitioning code to bookkeep number of partitions symbol is in. This is no longer needed. */ FOR_EACH_SYMBOL (node) - node->symbol.aux = NULL; + node->aux = NULL; lto_stats.num_cgraph_partitions += ltrans_partitions.length (); timevar_pop (TV_WHOPR_PARTITIONING); @@ -3288,7 +3288,7 @@ lto_main (void) /* Record the global variables. */ FOR_EACH_DEFINED_VARIABLE (vnode) - vec_safe_push (lto_global_var_decls, vnode->symbol.decl); + vec_safe_push (lto_global_var_decls, vnode->decl); } } |