aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-structalias.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2014-07-24 14:25:27 +0200
committerMartin Liska <marxin@gcc.gnu.org>2014-07-24 12:25:27 +0000
commit9041d2e6d2a783f2fbd0760f9ce6002194d63d00 (patch)
tree472ea9046d4a0e5c2441a25416c6e99fb4665350 /gcc/tree-ssa-structalias.c
parent4a53d6a66043944d9534ceae8182b943f739b8a7 (diff)
downloadgcc-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/tree-ssa-structalias.c')
-rw-r--r--gcc/tree-ssa-structalias.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 470a324..1879fc0 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -2931,10 +2931,10 @@ get_constraint_for_ssa_var (tree t, vec<ce_s> *results, bool address_p)
if (TREE_CODE (t) == VAR_DECL
&& (TREE_STATIC (t) || DECL_EXTERNAL (t)))
{
- varpool_node *node = varpool_get_node (t);
+ varpool_node *node = varpool_node::get (t);
if (node && node->alias && node->analyzed)
{
- node = varpool_variable_node (node, NULL);
+ node = node->ultimate_alias_target ();
t = node->decl;
}
}
@@ -5671,7 +5671,7 @@ create_variable_info_for_1 (tree decl, const char *name)
in IPA mode. Else we'd have to parse arbitrary initializers. */
&& !(in_ipa_mode
&& is_global_var (decl)
- && varpool_get_constructor (varpool_get_node (decl))))
+ && varpool_node::get (decl)->get_constructor ()))
{
fieldoff_s *fo = NULL;
bool notokay = false;
@@ -5789,21 +5789,21 @@ create_variable_info_for (tree decl, const char *name)
for it. */
else
{
- varpool_node *vnode = varpool_get_node (decl);
+ varpool_node *vnode = varpool_node::get (decl);
/* For escaped variables initialize them from nonlocal. */
- if (!varpool_all_refs_explicit_p (vnode))
+ if (!vnode->all_refs_explicit_p ())
make_copy_constraint (vi, nonlocal_id);
/* If this is a global variable with an initializer and we are in
IPA mode generate constraints for it. */
- if (varpool_get_constructor (vnode)
+ if (vnode->get_constructor ()
&& vnode->definition)
{
auto_vec<ce_s> rhsc;
struct constraint_expr lhs, *rhsp;
unsigned i;
- get_constraint_for_rhs (varpool_get_constructor (vnode), &rhsc);
+ get_constraint_for_rhs (vnode->get_constructor (), &rhsc);
lhs.var = vi->id;
lhs.offset = 0;
lhs.type = SCALAR;
@@ -5811,7 +5811,7 @@ create_variable_info_for (tree decl, const char *name)
process_constraint (new_constraint (lhs, *rhsp));
/* If this is a variable that escapes from the unit
the initializer escapes as well. */
- if (!varpool_all_refs_explicit_p (vnode))
+ if (!vnode->all_refs_explicit_p ())
{
lhs.var = escaped_id;
lhs.offset = 0;