diff options
author | Martin Liska <mliska@suse.cz> | 2014-07-24 14:25:27 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2014-07-24 12:25:27 +0000 |
commit | 9041d2e6d2a783f2fbd0760f9ce6002194d63d00 (patch) | |
tree | 472ea9046d4a0e5c2441a25416c6e99fb4665350 /gcc/cgraphunit.c | |
parent | 4a53d6a66043944d9534ceae8182b943f739b8a7 (diff) | |
download | gcc-9041d2e6d2a783f2fbd0760f9ce6002194d63d00.zip gcc-9041d2e6d2a783f2fbd0760f9ce6002194d63d00.tar.gz gcc-9041d2e6d2a783f2fbd0760f9ce6002194d63d00.tar.bz2 |
IPA C++ refactoring 2/N
* cgraph.h (varpool_node):
(availability get_availability (void)):
created from cgraph_variable_initializer_availability
(inline varpool_node *ultimate_alias_target (availability *availability = NULL)
creted from: cgraph_variable_initializer_availability
(inline varpool_node *get_alias_target (void)): created from varpool_alias_target
(void finalize_named_section_flags (void)):
created from varpool_finalize_named_section_flags
(bool assemble_decl (void)): created from varpool_assemble_decl
(void analyze (void)): created from varpool_analyze_node
(bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *),
void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases
(void remove_initializer (void)): created from varpool_remove_initializer
(tree get_constructor (void)): created from varpool_get_constructor
(bool externally_visible_p (void)): created from varpool_externally_visible_p
(bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p
(inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p
(inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs
(static inline varpool_node *get (const_tree decl)): created from varpool_get_node
(static void finalize_decl (tree decl)): created from varpool_finalize_decl
(static bool output_variables (void)): created from varpool_output_variables
(static varpool_node * create_extra_name_alias (tree alias, tree decl)):
created from varpool_extra_name_alias
(static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias
(static void dump_varpool (FILE *f)): created from dump_varpool
(static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool
(static varpool_node *create_empty (void)): created from varpool_create_empty_node
(static varpool_node *get_create (tree decl)): created from varpool_node_for_decl
(static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm
(void assemble_aliases (void)): created from assemble_aliases
From-SVN: r212984
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r-- | gcc/cgraphunit.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 47828d7..34f4c81 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -686,7 +686,7 @@ cgraph_process_same_body_aliases (void) if (node->cpp_implicit_alias && !node->analyzed) node->resolve_alias (TREE_CODE (node->alias_target) == VAR_DECL - ? (symtab_node *)varpool_node_for_decl (node->alias_target) + ? (symtab_node *)varpool_node::get_create (node->alias_target) : (symtab_node *)cgraph_node::get_create (node->alias_target)); cpp_implicit_aliases_done = true; } @@ -779,7 +779,7 @@ process_function_and_variable_attributes (struct cgraph_node *first, tree decl = vnode->decl; if (DECL_EXTERNAL (decl) && DECL_INITIAL (decl)) - varpool_finalize_decl (decl); + varpool_node::finalize_decl (decl); if (DECL_PRESERVE_P (decl)) vnode->force_output = true; else if (lookup_attribute ("externally_visible", DECL_ATTRIBUTES (decl))) @@ -809,9 +809,9 @@ process_function_and_variable_attributes (struct cgraph_node *first, visible. */ void -varpool_finalize_decl (tree decl) +varpool_node::finalize_decl (tree decl) { - varpool_node *node = varpool_node_for_decl (decl); + varpool_node *node = varpool_node::get_create (decl); gcc_assert (TREE_STATIC (decl) || DECL_EXTERNAL (decl)); @@ -831,12 +831,12 @@ varpool_finalize_decl (tree decl) || referred_to_p (node))) enqueue_node (node); if (cgraph_state >= CGRAPH_STATE_IPA_SSA) - varpool_analyze_node (node); + node->analyze (); /* Some frontends produce various interface variables after compilation finished. */ if (cgraph_state == CGRAPH_STATE_FINISHED || (!flag_toplevel_reorder && cgraph_state == CGRAPH_STATE_EXPANSION)) - varpool_assemble_decl (node); + node->assemble_decl (); } /* EDGE is an polymorphic call. Mark all possible targets as reachable @@ -1055,7 +1055,7 @@ analyze_functions (void) { varpool_node *vnode = dyn_cast <varpool_node *> (node); if (vnode && vnode->definition && !vnode->analyzed) - varpool_analyze_node (vnode); + vnode->analyze (); } if (node->same_comdat_group) @@ -1198,7 +1198,7 @@ handle_alias_pairs (void) else if (TREE_CODE (p->decl) == VAR_DECL && target_node && is_a <varpool_node *> (target_node)) { - varpool_create_variable_alias (p->decl, target_node->decl); + varpool_node::create_alias (p->decl, target_node->decl); alias_pairs->unordered_remove (i); } else @@ -2004,7 +2004,7 @@ output_in_order (void) for (i = 0; i < max; ++i) if (nodes[i].kind == ORDER_VAR) - varpool_finalize_named_section_flags (nodes[i].u.v); + nodes[i].u.v->finalize_named_section_flags (); for (i = 0; i < max; ++i) { @@ -2016,7 +2016,7 @@ output_in_order (void) break; case ORDER_VAR: - varpool_assemble_decl (nodes[i].u.v); + nodes[i].u.v->assemble_decl (); break; case ORDER_ASM: @@ -2259,7 +2259,7 @@ compile (void) output_asm_statements (); expand_all_functions (); - varpool_output_variables (); + varpool_node::output_variables (); } cgraph_process_new_functions (); |