summaryrefslogtreecommitdiff
path: root/gcc/cgraphbuild.c
diff options
context:
space:
mode:
authormarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>2014-07-24 12:25:27 +0000
committermarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>2014-07-24 12:25:27 +0000
commit97221fd7903276402e3ba1bbebf3f6e4f27f2068 (patch)
tree472ea9046d4a0e5c2441a25416c6e99fb4665350 /gcc/cgraphbuild.c
parent1093e55d8f9b571e264e123a5e30252fd1b5ccf7 (diff)
downloadgcc-97221fd7903276402e3ba1bbebf3f6e4f27f2068.tar.gz
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 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212984 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphbuild.c')
-rw-r--r--gcc/cgraphbuild.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/cgraphbuild.c b/gcc/cgraphbuild.c
index 9f1f244c2a2..91811d7c2fb 100644
--- a/gcc/cgraphbuild.c
+++ b/gcc/cgraphbuild.c
@@ -87,7 +87,7 @@ record_reference (tree *tp, int *walk_subtrees, void *data)
if (TREE_CODE (decl) == VAR_DECL)
{
- varpool_node *vnode = varpool_node_for_decl (decl);
+ varpool_node *vnode = varpool_node::get_create (decl);
ctx->varpool_node->add_reference (vnode, IPA_REF_ADDR);
}
*walk_subtrees = 0;
@@ -124,7 +124,7 @@ record_type_list (struct cgraph_node *node, tree list)
type = TREE_OPERAND (type, 0);
if (TREE_CODE (type) == VAR_DECL)
{
- varpool_node *vnode = varpool_node_for_decl (type);
+ varpool_node *vnode = varpool_node::get_create (type);
node->add_reference (vnode, IPA_REF_ADDR);
}
}
@@ -230,7 +230,7 @@ mark_address (gimple stmt, tree addr, tree, void *data)
else if (addr && TREE_CODE (addr) == VAR_DECL
&& (TREE_STATIC (addr) || DECL_EXTERNAL (addr)))
{
- varpool_node *vnode = varpool_node_for_decl (addr);
+ varpool_node *vnode = varpool_node::get_create (addr);
((symtab_node *)data)->add_reference (vnode, IPA_REF_ADDR, stmt);
}
@@ -255,7 +255,7 @@ mark_load (gimple stmt, tree t, tree, void *data)
else if (t && TREE_CODE (t) == VAR_DECL
&& (TREE_STATIC (t) || DECL_EXTERNAL (t)))
{
- varpool_node *vnode = varpool_node_for_decl (t);
+ varpool_node *vnode = varpool_node::get_create (t);
((symtab_node *)data)->add_reference (vnode, IPA_REF_LOAD, stmt);
}
@@ -271,7 +271,7 @@ mark_store (gimple stmt, tree t, tree, void *data)
if (t && TREE_CODE (t) == VAR_DECL
&& (TREE_STATIC (t) || DECL_EXTERNAL (t)))
{
- varpool_node *vnode = varpool_node_for_decl (t);
+ varpool_node *vnode = varpool_node::get_create (t);
((symtab_node *)data)->add_reference (vnode, IPA_REF_STORE, stmt);
}
@@ -383,7 +383,7 @@ pass_build_cgraph_edges::execute (function *fun)
if (TREE_CODE (decl) == VAR_DECL
&& (TREE_STATIC (decl) && !DECL_EXTERNAL (decl))
&& !DECL_HAS_VALUE_EXPR_P (decl))
- varpool_finalize_decl (decl);
+ varpool_node::finalize_decl (decl);
record_eh_tables (node, fun);
pointer_set_destroy (visited_nodes);
@@ -406,7 +406,7 @@ void
record_references_in_initializer (tree decl, bool only_vars)
{
struct pointer_set_t *visited_nodes = pointer_set_create ();
- varpool_node *node = varpool_node_for_decl (decl);
+ varpool_node *node = varpool_node::get_create (decl);
struct record_reference_ctx ctx = {false, NULL};
ctx.varpool_node = node;