summaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r--gcc/cgraphunit.c302
1 files changed, 151 insertions, 151 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 820e618c895..060ee70d7d4 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -227,25 +227,25 @@ static GTY (()) tree vtable_entry_type;
bool
decide_is_symbol_needed (symtab_node node)
{
- tree decl = node->symbol.decl;
+ tree decl = node->decl;
/* Double check that no one output the function into assembly file
early. */
gcc_checking_assert (!DECL_ASSEMBLER_NAME_SET_P (decl)
|| !TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)));
- if (!node->symbol.definition)
+ if (!node->definition)
return false;
if (DECL_EXTERNAL (decl))
return false;
/* If the user told us it is used, then it must be so. */
- if (node->symbol.force_output)
+ if (node->force_output)
return true;
/* ABI forced symbols are needed when they are external. */
- if (node->symbol.forced_by_abi && TREE_PUBLIC (decl))
+ if (node->forced_by_abi && TREE_PUBLIC (decl))
return true;
/* Keep constructors, destructors and virtual functions. */
@@ -271,10 +271,10 @@ static symtab_node first = (symtab_node)(void *)1;
static void
enqueue_node (symtab_node node)
{
- if (node->symbol.aux)
+ if (node->aux)
return;
gcc_checking_assert (first);
- node->symbol.aux = first;
+ node->aux = first;
first = node;
}
@@ -298,7 +298,7 @@ cgraph_process_new_functions (void)
for (csi = csi_start (cgraph_new_nodes); !csi_end_p (csi); csi_next (&csi))
{
node = csi_node (csi);
- fndecl = node->symbol.decl;
+ fndecl = node->decl;
switch (cgraph_state)
{
case CGRAPH_STATE_CONSTRUCTION:
@@ -308,7 +308,7 @@ cgraph_process_new_functions (void)
cgraph_finalize_function (fndecl, false);
output = true;
cgraph_call_function_insertion_hooks (node);
- enqueue_node ((symtab_node) node);
+ enqueue_node (node);
break;
case CGRAPH_STATE_IPA:
@@ -318,7 +318,7 @@ cgraph_process_new_functions (void)
cgraph but not on this function. */
gimple_register_cfg_hooks ();
- if (!node->symbol.analyzed)
+ if (!node->analyzed)
analyze_function (node);
push_cfun (DECL_STRUCT_FUNCTION (fndecl));
if (cgraph_state == CGRAPH_STATE_IPA_SSA
@@ -374,14 +374,14 @@ cgraph_reset_node (struct cgraph_node *node)
memset (&node->local, 0, sizeof (node->local));
memset (&node->global, 0, sizeof (node->global));
memset (&node->rtl, 0, sizeof (node->rtl));
- node->symbol.analyzed = false;
- node->symbol.definition = false;
- node->symbol.alias = false;
- node->symbol.weakref = false;
- node->symbol.cpp_implicit_alias = false;
+ node->analyzed = false;
+ node->definition = false;
+ node->alias = false;
+ node->weakref = false;
+ node->cpp_implicit_alias = false;
cgraph_node_remove_callees (node);
- ipa_remove_all_references (&node->symbol.ref_list);
+ ipa_remove_all_references (&node->ref_list);
}
/* Return true when there are references to NODE. */
@@ -392,7 +392,7 @@ referred_to_p (symtab_node node)
struct ipa_ref *ref;
/* See if there are any references at all. */
- if (ipa_ref_list_referring_iterate (&node->symbol.ref_list, 0, ref))
+ if (ipa_ref_list_referring_iterate (&node->ref_list, 0, ref))
return true;
/* For functions check also calls. */
cgraph_node *cn = dyn_cast <cgraph_node> (node);
@@ -411,7 +411,7 @@ cgraph_finalize_function (tree decl, bool no_collect)
{
struct cgraph_node *node = cgraph_get_create_node (decl);
- if (node->symbol.definition)
+ if (node->definition)
{
/* Nested functions should only be defined once. */
gcc_assert (!DECL_CONTEXT (decl)
@@ -421,7 +421,7 @@ cgraph_finalize_function (tree decl, bool no_collect)
}
notice_global_symbol (decl);
- node->symbol.definition = true;
+ node->definition = true;
node->lowered = DECL_STRUCT_FUNCTION (decl)->cfg != NULL;
/* With -fkeep-inline-functions we are keeping all inline functions except
@@ -430,7 +430,7 @@ cgraph_finalize_function (tree decl, bool no_collect)
&& DECL_DECLARED_INLINE_P (decl)
&& !DECL_EXTERNAL (decl)
&& !DECL_DISREGARD_INLINE_LIMITS (decl))
- node->symbol.force_output = 1;
+ node->force_output = 1;
/* When not optimizing, also output the static functions. (see
PR24561), but don't do so for always_inline functions, functions
@@ -438,13 +438,13 @@ cgraph_finalize_function (tree decl, bool no_collect)
in the original implementation and it is unclear whether we want
to change the behavior here. */
if ((!optimize
- && !node->symbol.cpp_implicit_alias
+ && !node->cpp_implicit_alias
&& !DECL_DISREGARD_INLINE_LIMITS (decl)
&& !DECL_DECLARED_INLINE_P (decl)
&& !(DECL_CONTEXT (decl)
&& TREE_CODE (DECL_CONTEXT (decl)) == FUNCTION_DECL))
&& !DECL_COMDAT (decl) && !DECL_EXTERNAL (decl))
- node->symbol.force_output = 1;
+ node->force_output = 1;
/* If we've not yet emitted decl, tell the debug info about it. */
if (!TREE_ASM_WRITTEN (decl))
@@ -458,9 +458,9 @@ cgraph_finalize_function (tree decl, bool no_collect)
ggc_collect ();
if (cgraph_state == CGRAPH_STATE_CONSTRUCTION
- && (decide_is_symbol_needed ((symtab_node) node)
- || referred_to_p ((symtab_node)node)))
- enqueue_node ((symtab_node)node);
+ && (decide_is_symbol_needed (node)
+ || referred_to_p (node)))
+ enqueue_node (node);
}
/* Add the function FNDECL to the call graph.
@@ -502,8 +502,8 @@ cgraph_add_new_function (tree fndecl, bool lowered)
analyzing and compilation. */
node = cgraph_get_create_node (fndecl);
node->local.local = false;
- node->symbol.definition = true;
- node->symbol.force_output = true;
+ node->definition = true;
+ node->force_output = true;
if (!lowered && cgraph_state == CGRAPH_STATE_EXPANSION)
{
push_cfun (DECL_STRUCT_FUNCTION (fndecl));
@@ -529,7 +529,7 @@ cgraph_add_new_function (tree fndecl, bool lowered)
node = cgraph_create_node (fndecl);
if (lowered)
node->lowered = true;
- node->symbol.definition = true;
+ node->definition = true;
analyze_function (node);
push_cfun (DECL_STRUCT_FUNCTION (fndecl));
gimple_register_cfg_hooks ();
@@ -590,7 +590,7 @@ output_asm_statements (void)
static void
analyze_function (struct cgraph_node *node)
{
- tree decl = node->symbol.decl;
+ tree decl = node->decl;
location_t saved_loc = input_location;
input_location = DECL_SOURCE_LOCATION (decl);
@@ -601,14 +601,14 @@ analyze_function (struct cgraph_node *node)
if (!expand_thunk (node, false))
{
node->thunk.alias = NULL;
- node->symbol.analyzed = true;
+ node->analyzed = true;
return;
}
node->thunk.alias = NULL;
}
- if (node->symbol.alias)
+ if (node->alias)
symtab_resolve_alias
- ((symtab_node) node, (symtab_node) cgraph_get_node (node->symbol.alias_target));
+ (node, cgraph_get_node (node->alias_target));
else if (node->dispatcher_function)
{
/* Generate the dispatcher body of multi-versioned functions. */
@@ -628,7 +628,7 @@ analyze_function (struct cgraph_node *node)
{
push_cfun (DECL_STRUCT_FUNCTION (decl));
- assign_assembler_name_if_neeeded (node->symbol.decl);
+ assign_assembler_name_if_neeeded (node->decl);
/* Make sure to gimplify bodies only once. During analyzing a
function we lower it, which will require gimplified nested
@@ -642,7 +642,7 @@ analyze_function (struct cgraph_node *node)
if (!node->lowered)
{
if (node->nested)
- lower_nested_functions (node->symbol.decl);
+ lower_nested_functions (node->decl);
gcc_assert (!node->nested);
gimple_register_cfg_hooks ();
@@ -657,7 +657,7 @@ analyze_function (struct cgraph_node *node)
pop_cfun ();
}
- node->symbol.analyzed = true;
+ node->analyzed = true;
input_location = saved_loc;
}
@@ -673,12 +673,12 @@ cgraph_process_same_body_aliases (void)
{
symtab_node node;
FOR_EACH_SYMBOL (node)
- if (node->symbol.cpp_implicit_alias && !node->symbol.analyzed)
+ if (node->cpp_implicit_alias && !node->analyzed)
symtab_resolve_alias
(node,
- TREE_CODE (node->symbol.alias_target) == VAR_DECL
- ? (symtab_node)varpool_node_for_decl (node->symbol.alias_target)
- : (symtab_node)cgraph_get_create_node (node->symbol.alias_target));
+ TREE_CODE (node->alias_target) == VAR_DECL
+ ? (symtab_node)varpool_node_for_decl (node->alias_target)
+ : (symtab_node)cgraph_get_create_node (node->alias_target));
cpp_implicit_aliases_done = true;
}
@@ -734,20 +734,20 @@ process_function_and_variable_attributes (struct cgraph_node *first,
for (node = cgraph_first_function (); node != first;
node = cgraph_next_function (node))
{
- tree decl = node->symbol.decl;
+ tree decl = node->decl;
if (DECL_PRESERVE_P (decl))
cgraph_mark_force_output_node (node);
else if (lookup_attribute ("externally_visible", DECL_ATTRIBUTES (decl)))
{
- if (! TREE_PUBLIC (node->symbol.decl))
- warning_at (DECL_SOURCE_LOCATION (node->symbol.decl), OPT_Wattributes,
+ if (! TREE_PUBLIC (node->decl))
+ warning_at (DECL_SOURCE_LOCATION (node->decl), OPT_Wattributes,
"%<externally_visible%>"
" attribute have effect only on public objects");
}
if (lookup_attribute ("weakref", DECL_ATTRIBUTES (decl))
- && (node->symbol.definition && !node->symbol.alias))
+ && (node->definition && !node->alias))
{
- warning_at (DECL_SOURCE_LOCATION (node->symbol.decl), OPT_Wattributes,
+ warning_at (DECL_SOURCE_LOCATION (node->decl), OPT_Wattributes,
"%<weakref%> attribute ignored"
" because function is defined");
DECL_WEAK (decl) = 0;
@@ -767,24 +767,24 @@ process_function_and_variable_attributes (struct cgraph_node *first,
for (vnode = varpool_first_variable (); vnode != first_var;
vnode = varpool_next_variable (vnode))
{
- tree decl = vnode->symbol.decl;
+ tree decl = vnode->decl;
if (DECL_EXTERNAL (decl)
&& DECL_INITIAL (decl))
varpool_finalize_decl (decl);
if (DECL_PRESERVE_P (decl))
- vnode->symbol.force_output = true;
+ vnode->force_output = true;
else if (lookup_attribute ("externally_visible", DECL_ATTRIBUTES (decl)))
{
- if (! TREE_PUBLIC (vnode->symbol.decl))
- warning_at (DECL_SOURCE_LOCATION (vnode->symbol.decl), OPT_Wattributes,
+ if (! TREE_PUBLIC (vnode->decl))
+ warning_at (DECL_SOURCE_LOCATION (vnode->decl), OPT_Wattributes,
"%<externally_visible%>"
" attribute have effect only on public objects");
}
if (lookup_attribute ("weakref", DECL_ATTRIBUTES (decl))
- && vnode->symbol.definition
+ && vnode->definition
&& DECL_INITIAL (decl))
{
- warning_at (DECL_SOURCE_LOCATION (vnode->symbol.decl), OPT_Wattributes,
+ warning_at (DECL_SOURCE_LOCATION (vnode->decl), OPT_Wattributes,
"%<weakref%> attribute ignored"
" because variable is initialized");
DECL_WEAK (decl) = 0;
@@ -806,21 +806,21 @@ varpool_finalize_decl (tree decl)
gcc_assert (TREE_STATIC (decl) || DECL_EXTERNAL (decl));
- if (node->symbol.definition)
+ if (node->definition)
return;
notice_global_symbol (decl);
- node->symbol.definition = true;
+ node->definition = true;
if (TREE_THIS_VOLATILE (decl) || DECL_PRESERVE_P (decl)
/* Traditionally we do not eliminate static variables when not
optimizing and when not doing toplevel reoder. */
- || (!flag_toplevel_reorder && !DECL_COMDAT (node->symbol.decl)
- && !DECL_ARTIFICIAL (node->symbol.decl)))
- node->symbol.force_output = true;
+ || (!flag_toplevel_reorder && !DECL_COMDAT (node->decl)
+ && !DECL_ARTIFICIAL (node->decl)))
+ node->force_output = true;
if (cgraph_state == CGRAPH_STATE_CONSTRUCTION
- && (decide_is_symbol_needed ((symtab_node) node)
- || referred_to_p ((symtab_node)node)))
- enqueue_node ((symtab_node)node);
+ && (decide_is_symbol_needed (node)
+ || referred_to_p (node)))
+ enqueue_node (node);
if (cgraph_state >= CGRAPH_STATE_IPA_SSA)
varpool_analyze_node (node);
/* Some frontends produce various interface variables after compilation
@@ -857,14 +857,14 @@ walk_polymorphic_call_targets (pointer_set_t *reachable_call_targets,
/* Do not bother to mark virtual methods in anonymous namespace;
either we will find use of virtual table defining it, or it is
unused. */
- if (targets[i]->symbol.definition
+ if (targets[i]->definition
&& TREE_CODE
- (TREE_TYPE (targets[i]->symbol.decl))
+ (TREE_TYPE (targets[i]->decl))
== METHOD_TYPE
&& !type_in_anonymous_namespace_p
(method_class_type
- (TREE_TYPE (targets[i]->symbol.decl))))
- enqueue_node ((symtab_node) targets[i]);
+ (TREE_TYPE (targets[i]->decl))))
+ enqueue_node (targets[i]);
}
}
@@ -934,7 +934,7 @@ analyze_functions (void)
C++ FE is confused about the COMDAT groups being right. */
if (cpp_implicit_aliases_done)
FOR_EACH_SYMBOL (node)
- if (node->symbol.cpp_implicit_alias)
+ if (node->cpp_implicit_alias)
fixup_same_cpp_alias_visibility (node, symtab_alias_target (node));
if (optimize && flag_devirtualize)
build_type_inheritance_graph ();
@@ -949,8 +949,8 @@ analyze_functions (void)
/* First identify the trivially needed symbols. */
for (node = symtab_nodes;
- node != (symtab_node)first_analyzed
- && node != (symtab_node)first_analyzed_var; node = node->symbol.next)
+ node != first_analyzed
+ && node != first_analyzed_var; node = node->next)
{
if (decide_is_symbol_needed (node))
{
@@ -963,8 +963,8 @@ analyze_functions (void)
if (!changed && cgraph_dump_file)
fprintf (cgraph_dump_file, "\n");
}
- if (node == (symtab_node)first_analyzed
- || node == (symtab_node)first_analyzed_var)
+ if (node == first_analyzed
+ || node == first_analyzed_var)
break;
}
cgraph_process_new_functions ();
@@ -980,18 +980,18 @@ analyze_functions (void)
{
changed = true;
node = first;
- first = (symtab_node)first->symbol.aux;
+ first = (symtab_node)first->aux;
cgraph_node *cnode = dyn_cast <cgraph_node> (node);
- if (cnode && cnode->symbol.definition)
+ if (cnode && cnode->definition)
{
struct cgraph_edge *edge;
- tree decl = cnode->symbol.decl;
+ tree decl = cnode->decl;
/* ??? It is possible to create extern inline function
and later using weak alias attribute to kill its body.
See gcc.c-torture/compile/20011119-1.c */
if (!DECL_STRUCT_FUNCTION (decl)
- && !cnode->symbol.alias
+ && !cnode->alias
&& !cnode->thunk.thunk_p
&& !cnode->dispatcher_function)
{
@@ -1000,12 +1000,12 @@ analyze_functions (void)
continue;
}
- if (!cnode->symbol.analyzed)
+ if (!cnode->analyzed)
analyze_function (cnode);
for (edge = cnode->callees; edge; edge = edge->next_callee)
- if (edge->callee->symbol.definition)
- enqueue_node ((symtab_node)edge->callee);
+ if (edge->callee->definition)
+ enqueue_node (edge->callee);
if (optimize && flag_devirtualize)
{
struct cgraph_edge *next;
@@ -1033,20 +1033,20 @@ analyze_functions (void)
else
{
varpool_node *vnode = dyn_cast <varpool_node> (node);
- if (vnode && vnode->symbol.definition && !vnode->symbol.analyzed)
+ if (vnode && vnode->definition && !vnode->analyzed)
varpool_analyze_node (vnode);
}
- if (node->symbol.same_comdat_group)
+ if (node->same_comdat_group)
{
symtab_node next;
- for (next = node->symbol.same_comdat_group;
+ for (next = node->same_comdat_group;
next != node;
- next = next->symbol.same_comdat_group)
+ next = next->same_comdat_group)
enqueue_node (next);
}
- for (i = 0; ipa_ref_list_reference_iterate (&node->symbol.ref_list, i, ref); i++)
- if (ref->referred->symbol.definition)
+ for (i = 0; ipa_ref_list_reference_iterate (&node->ref_list, i, ref); i++)
+ if (ref->referred->definition)
enqueue_node (ref->referred);
cgraph_process_new_functions ();
}
@@ -1065,11 +1065,11 @@ analyze_functions (void)
fprintf (cgraph_dump_file, "\nRemoving unused symbols:");
for (node = symtab_nodes;
- node != (symtab_node)first_handled
- && node != (symtab_node)first_handled_var; node = next)
+ node != first_handled
+ && node != first_handled_var; node = next)
{
- next = node->symbol.next;
- if (!node->symbol.aux && !referred_to_p (node))
+ next = node->next;
+ if (!node->aux && !referred_to_p (node))
{
if (cgraph_dump_file)
fprintf (cgraph_dump_file, " %s", symtab_node_name (node));
@@ -1078,22 +1078,22 @@ analyze_functions (void)
}
if (cgraph_node *cnode = dyn_cast <cgraph_node> (node))
{
- tree decl = node->symbol.decl;
+ tree decl = node->decl;
- if (cnode->symbol.definition && !gimple_has_body_p (decl)
- && !cnode->symbol.alias
+ if (cnode->definition && !gimple_has_body_p (decl)
+ && !cnode->alias
&& !cnode->thunk.thunk_p)
cgraph_reset_node (cnode);
- gcc_assert (!cnode->symbol.definition || cnode->thunk.thunk_p
- || cnode->symbol.alias
+ gcc_assert (!cnode->definition || cnode->thunk.thunk_p
+ || cnode->alias
|| gimple_has_body_p (decl));
- gcc_assert (cnode->symbol.analyzed == cnode->symbol.definition);
+ gcc_assert (cnode->analyzed == cnode->definition);
}
- node->symbol.aux = NULL;
+ node->aux = NULL;
}
- for (;node; node = node->symbol.next)
- node->symbol.aux = NULL;
+ for (;node; node = node->next)
+ node->aux = NULL;
first_analyzed = cgraph_first_function ();
first_analyzed_var = varpool_first_variable ();
if (cgraph_dump_file)
@@ -1136,9 +1136,9 @@ handle_alias_pairs (void)
symtab_node node = symtab_get_node (p->decl);
if (node)
{
- node->symbol.alias_target = p->target;
- node->symbol.weakref = true;
- node->symbol.alias = true;
+ node->alias_target = p->target;
+ node->weakref = true;
+ node->alias = true;
}
alias_pairs->unordered_remove (i);
continue;
@@ -1148,17 +1148,17 @@ handle_alias_pairs (void)
error ("%q+D aliased to undefined symbol %qE", p->decl, p->target);
symtab_node node = symtab_get_node (p->decl);
if (node)
- node->symbol.alias = false;
+ node->alias = false;
alias_pairs->unordered_remove (i);
continue;
}
- if (DECL_EXTERNAL (target_node->symbol.decl)
+ if (DECL_EXTERNAL (target_node->decl)
/* We use local aliases for C++ thunks to force the tailcall
to bind locally. This is a hack - to keep it working do
the following (which is not strictly correct). */
- && (! TREE_CODE (target_node->symbol.decl) == FUNCTION_DECL
- || ! DECL_VIRTUAL_P (target_node->symbol.decl))
+ && (! TREE_CODE (target_node->decl) == FUNCTION_DECL
+ || ! DECL_VIRTUAL_P (target_node->decl))
&& ! lookup_attribute ("weakref", DECL_ATTRIBUTES (p->decl)))
{
error ("%q+D aliased to external symbol %qE",
@@ -1169,15 +1169,15 @@ handle_alias_pairs (void)
&& target_node && is_a <cgraph_node> (target_node))
{
struct cgraph_node *src_node = cgraph_get_node (p->decl);
- if (src_node && src_node->symbol.definition)
+ if (src_node && src_node->definition)
cgraph_reset_node (src_node);
- cgraph_create_function_alias (p->decl, target_node->symbol.decl);
+ cgraph_create_function_alias (p->decl, target_node->decl);
alias_pairs->unordered_remove (i);
}
else if (TREE_CODE (p->decl) == VAR_DECL
&& target_node && is_a <varpool_node> (target_node))
{
- varpool_create_variable_alias (p->decl, target_node->symbol.decl);
+ varpool_create_variable_alias (p->decl, target_node->decl);
alias_pairs->unordered_remove (i);
}
else
@@ -1185,7 +1185,7 @@ handle_alias_pairs (void)
error ("%q+D alias in between function and variable is not supported",
p->decl);
warning (0, "%q+D aliased declaration",
- target_node->symbol.decl);
+ target_node->decl);
alias_pairs->unordered_remove (i);
}
}
@@ -1208,34 +1208,34 @@ mark_functions_to_output (void)
FOR_EACH_FUNCTION (node)
{
- tree decl = node->symbol.decl;
+ tree decl = node->decl;
- gcc_assert (!node->process || node->symbol.same_comdat_group);
+ gcc_assert (!node->process || node->same_comdat_group);
if (node->process)
continue;
/* We need to output all local functions that are used and not
always inlined, as well as those that are reachable from
outside the current compilation unit. */
- if (node->symbol.analyzed
+ if (node->analyzed
&& !node->thunk.thunk_p
- && !node->symbol.alias
+ && !node->alias
&& !node->global.inlined_to
&& !TREE_ASM_WRITTEN (decl)
&& !DECL_EXTERNAL (decl))
{
node->process = 1;
- if (node->symbol.same_comdat_group)
+ if (node->same_comdat_group)
{
struct cgraph_node *next;
- for (next = cgraph (node->symbol.same_comdat_group);
+ for (next = cgraph (node->same_comdat_group);
next != node;
- next = cgraph (next->symbol.same_comdat_group))
- if (!next->thunk.thunk_p && !next->symbol.alias)
+ next = cgraph (next->same_comdat_group))
+ if (!next->thunk.thunk_p && !next->alias)
next->process = 1;
}
}
- else if (node->symbol.same_comdat_group)
+ else if (node->same_comdat_group)
{
#ifdef ENABLE_CHECKING
check_same_comdat_groups = true;
@@ -1250,8 +1250,8 @@ mark_functions_to_output (void)
/* FIXME: in ltrans unit when offline copy is outside partition but inline copies
are inside partition, we can end up not removing the body since we no longer
have analyzed node pointing to it. */
- && !node->symbol.in_other_partition
- && !node->symbol.alias
+ && !node->in_other_partition
+ && !node->alias
&& !node->clones
&& !DECL_EXTERNAL (decl))
{
@@ -1261,7 +1261,7 @@ mark_functions_to_output (void)
#endif
gcc_assert (node->global.inlined_to
|| !gimple_has_body_p (decl)
- || node->symbol.in_other_partition
+ || node->in_other_partition
|| node->clones
|| DECL_ARTIFICIAL (decl)
|| DECL_EXTERNAL (decl));
@@ -1272,16 +1272,16 @@ mark_functions_to_output (void)
#ifdef ENABLE_CHECKING
if (check_same_comdat_groups)
FOR_EACH_FUNCTION (node)
- if (node->symbol.same_comdat_group && !node->process)
+ if (node->same_comdat_group && !node->process)
{
- tree decl = node->symbol.decl;
+ tree decl = node->decl;
if (!node->global.inlined_to
&& gimple_has_body_p (decl)
/* FIXME: in an ltrans unit when the offline copy is outside a
partition but inline copies are inside a partition, we can
end up not removing the body since we no longer have an
analyzed node pointing to it. */
- && !node->symbol.in_other_partition
+ && !node->in_other_partition
&& !node->clones
&& !DECL_EXTERNAL (decl))
{
@@ -1451,8 +1451,8 @@ expand_thunk (struct cgraph_node *node, bool output_asm_thunks)
HOST_WIDE_INT fixed_offset = node->thunk.fixed_offset;
HOST_WIDE_INT virtual_value = node->thunk.virtual_value;
tree virtual_offset = NULL;
- tree alias = node->callees->callee->symbol.decl;
- tree thunk_fndecl = node->symbol.decl;
+ tree alias = node->callees->callee->decl;
+ tree thunk_fndecl = node->decl;
tree a;
@@ -1504,7 +1504,7 @@ expand_thunk (struct cgraph_node *node, bool output_asm_thunks)
set_cfun (NULL);
TREE_ASM_WRITTEN (thunk_fndecl) = 1;
node->thunk.thunk_p = false;
- node->symbol.analyzed = false;
+ node->analyzed = false;
}
else
{
@@ -1690,20 +1690,20 @@ assemble_thunks_and_aliases (struct cgraph_node *node)
}
else
e = e->next_caller;
- for (i = 0; ipa_ref_list_referring_iterate (&node->symbol.ref_list,
+ for (i = 0; ipa_ref_list_referring_iterate (&node->ref_list,
i, ref); i++)
if (ref->use == IPA_REF_ALIAS)
{
struct cgraph_node *alias = ipa_ref_referring_node (ref);
- bool saved_written = TREE_ASM_WRITTEN (node->symbol.decl);
+ bool saved_written = TREE_ASM_WRITTEN (node->decl);
/* Force assemble_alias to really output the alias this time instead
of buffering it in same alias pairs. */
- TREE_ASM_WRITTEN (node->symbol.decl) = 1;
- do_assemble_alias (alias->symbol.decl,
- DECL_ASSEMBLER_NAME (node->symbol.decl));
+ TREE_ASM_WRITTEN (node->decl) = 1;
+ do_assemble_alias (alias->decl,
+ DECL_ASSEMBLER_NAME (node->decl));
assemble_thunks_and_aliases (alias);
- TREE_ASM_WRITTEN (node->symbol.decl) = saved_written;
+ TREE_ASM_WRITTEN (node->decl) = saved_written;
}
}
@@ -1712,7 +1712,7 @@ assemble_thunks_and_aliases (struct cgraph_node *node)
static void
expand_function (struct cgraph_node *node)
{
- tree decl = node->symbol.decl;
+ tree decl = node->decl;
location_t saved_loc;
/* We ought to not compile any inline clones. */
@@ -1817,7 +1817,7 @@ expand_function (struct cgraph_node *node)
/* Eliminate all call edges. This is important so the GIMPLE_CALL no longer
points to the dead function body. */
cgraph_node_remove_callees (node);
- ipa_remove_all_references (&node->symbol.ref_list);
+ ipa_remove_all_references (&node->ref_list);
}
@@ -1905,9 +1905,9 @@ output_in_order (void)
FOR_EACH_DEFINED_FUNCTION (pf)
{
- if (pf->process && !pf->thunk.thunk_p && !pf->symbol.alias)
+ if (pf->process && !pf->thunk.thunk_p && !pf->alias)
{
- i = pf->symbol.order;
+ i = pf->order;
gcc_assert (nodes[i].kind == ORDER_UNDEFINED);
nodes[i].kind = ORDER_FUNCTION;
nodes[i].u.f = pf;
@@ -1915,9 +1915,9 @@ output_in_order (void)
}
FOR_EACH_DEFINED_VARIABLE (pv)
- if (!DECL_EXTERNAL (pv->symbol.decl))
+ if (!DECL_EXTERNAL (pv->decl))
{
- i = pv->symbol.order;
+ i = pv->order;
gcc_assert (nodes[i].kind == ORDER_UNDEFINED);
nodes[i].kind = ORDER_VAR;
nodes[i].u.v = pv;
@@ -2050,9 +2050,9 @@ output_weakrefs (void)
{
symtab_node node;
FOR_EACH_SYMBOL (node)
- if (node->symbol.alias
- && !TREE_ASM_WRITTEN (node->symbol.decl)
- && node->symbol.weakref)
+ if (node->alias
+ && !TREE_ASM_WRITTEN (node->decl)
+ && node->weakref)
{
tree target;
@@ -2061,18 +2061,18 @@ output_weakrefs (void)
alias.
When alias target is defined, we need to fetch it from symtab reference,
otherwise it is pointed to by alias_target. */
- if (node->symbol.alias_target)
- target = (DECL_P (node->symbol.alias_target)
- ? DECL_ASSEMBLER_NAME (node->symbol.alias_target)
- : node->symbol.alias_target);
- else if (node->symbol.analyzed)
- target = DECL_ASSEMBLER_NAME (symtab_alias_target (node)->symbol.decl);
+ if (node->alias_target)
+ target = (DECL_P (node->alias_target)
+ ? DECL_ASSEMBLER_NAME (node->alias_target)
+ : node->alias_target);
+ else if (node->analyzed)
+ target = DECL_ASSEMBLER_NAME (symtab_alias_target (node)->decl);
else
{
gcc_unreachable ();
- target = get_alias_symbol (node->symbol.decl);
+ target = get_alias_symbol (node->decl);
}
- do_assemble_alias (node->symbol.decl, target);
+ do_assemble_alias (node->decl, target);
}
}
@@ -2173,14 +2173,14 @@ compile (void)
symtab_node node;
FOR_EACH_SYMBOL (node)
- if (node->symbol.alias
- && lookup_attribute ("weakref", DECL_ATTRIBUTES (node->symbol.decl)))
+ if (node->alias
+ && lookup_attribute ("weakref", DECL_ATTRIBUTES (node->decl)))
{
IDENTIFIER_TRANSPARENT_ALIAS
- (DECL_ASSEMBLER_NAME (node->symbol.decl)) = 1;
- TREE_CHAIN (DECL_ASSEMBLER_NAME (node->symbol.decl))
- = (node->symbol.alias_target ? node->symbol.alias_target
- : DECL_ASSEMBLER_NAME (symtab_alias_target (node)->symbol.decl));
+ (DECL_ASSEMBLER_NAME (node->decl)) = 1;
+ TREE_CHAIN (DECL_ASSEMBLER_NAME (node->decl))
+ = (node->alias_target ? node->alias_target
+ : DECL_ASSEMBLER_NAME (symtab_alias_target (node)->decl));
}
#endif
@@ -2215,7 +2215,7 @@ compile (void)
FOR_EACH_DEFINED_FUNCTION (node)
if (node->global.inlined_to
- || gimple_has_body_p (node->symbol.decl))
+ || gimple_has_body_p (node->decl))
{
error_found = true;
dump_cgraph_node (stderr, node);