diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-06-18 08:31:03 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-06-18 08:31:03 +0000 |
commit | e0eaac8049ca6b188697d265c857df02a34722ee (patch) | |
tree | d841d5d2b4ed36e1175fc28ca05d5529968c1c38 /gcc/tree-ssa-structalias.c | |
parent | 6e5d2d21c82843720cb1d3f02146da2fc71dc4cf (diff) | |
download | gcc-e0eaac8049ca6b188697d265c857df02a34722ee.tar.gz |
* lto-symtab.c (lto_varpool_replace_node): Remove code handling
extra name aliases.
(lto_symtab_resolve_can_prevail_p): Likewise.
(lto_symtab_merge_cgraph_nodes): Update alias_of pointers.
* cgraphbuild.c (record_reference): Remove extra body alias code.
(mark_load): Likewise.
(mark_store): Likewise.
* cgraph.h (varpool_node): Remove extra_name filed;
add alias_of and extraname_alias.
(varpool_create_variable_alias, varpool_for_node_and_aliases): Declare.
(varpool_alias_aliased_node): New inline function.
(varpool_variable_node): New function.
* cgraphunit.c (handle_alias_pairs): Handle also variable aliases.
* ipa-ref.c (ipa_record_reference): Allow aliases on variables.
* lto-cgraph.c (lto_output_varpool_node): Update streaming.
(input_varpool_node): Likewise.
* lto-streamer-out.c (produce_symtab): Remove extra name aliases.
(varpool_externally_visible_p): Remove extra body alias code.
(function_and_variable_visibility): Likewise.
* tree-ssa-structalias.c (associate_varinfo_to_alias_1): New function.
(ipa_pta_execute): Use it.
* varpool.c (varpool_remove_node): Remove extra name alias code.
(varpool_mark_needed_node): Likewise.
(varpool_analyze_pending_decls): Analyze aliases.
(assemble_aliases): New functoin.
(varpool_assemble_decl): Use it.
(varpool_create_variable_alias): New function.
(varpool_extra_name_alias): Rewrite.
(varpool_for_node_and_aliases): New function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175167 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r-- | gcc/tree-ssa-structalias.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index d5516e673fa..6f076dcd3e7 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -6685,6 +6685,16 @@ associate_varinfo_to_alias (struct cgraph_node *node, void *data) return false; } +/* Associate node with varinfo DATA. Worker for + varpool_for_node_and_aliases. */ +static bool +associate_varinfo_to_alias_1 (struct varpool_node *node, void *data) +{ + if (node->alias) + insert_vi_for_tree (node->decl, (varinfo_t)data); + return false; +} + /* Execute the driver for IPA PTA. */ static unsigned int ipa_pta_execute (void) @@ -6716,14 +6726,12 @@ ipa_pta_execute (void) /* Create constraints for global variables and their initializers. */ for (var = varpool_nodes; var; var = var->next) { - struct varpool_node *alias; varinfo_t vi; + if (var->alias) + continue; vi = get_vi_for_tree (var->decl); - - /* Associate the varinfo node with all aliases. */ - for (alias = var->extra_name; alias; alias = alias->next) - insert_vi_for_tree (alias->decl, vi); + varpool_for_node_and_aliases (var, associate_varinfo_to_alias_1, vi, true); } if (dump_file) |