diff options
author | Jan Hubicka <jh@suse.cz> | 2013-06-01 15:08:53 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2013-06-01 13:08:53 +0000 |
commit | 40a7fe1e382e97dda78b7cff9e05bc8e17bc9216 (patch) | |
tree | 227ede588b4d6d5d96381098725519f26a853909 /gcc/tree-emutls.c | |
parent | 2175988161659537ed19aed873d148ed2d04ed7f (diff) | |
download | gcc-40a7fe1e382e97dda78b7cff9e05bc8e17bc9216.zip gcc-40a7fe1e382e97dda78b7cff9e05bc8e17bc9216.tar.gz gcc-40a7fe1e382e97dda78b7cff9e05bc8e17bc9216.tar.bz2 |
lto-symtab.c (lto_symtab_merge_cgraph_nodes_1): Rename to ...
* lto-symtab.c (lto_symtab_merge_cgraph_nodes_1): Rename to ...
(lto_symtab_merge_symbols_1): ... this one.
(lto_symtab_merge_cgraph_nodes): Rename to ...
(lto_symtab_merge_symbols): ... this one; simplify.
* cgraph.c (same_body_aliases_done): Rename to ...
(cpp_implicit_aliases_done): ... this one.
(cgraph_create_function_alias): Update.
(cgraph_same_body_alias): Update.
(dump_cgraph_node): Remove alias dumping; simplify
thunk dumping.
(verify_edge_corresponds_to_fndecl): Simplify.
* cgraph.h (symtab_node_base): Add cpp_implicit_alias,
alias_target.
(cgraph_node): Remove same_body_alias.
(varpool_node): Remove alias_of and extra_name_alias.
(same_body_aliases_done): Rename to ..
(cpp_implicit_aliases_done): ... this one.
(symtab_alias_ultimate_target): Add default parameter.
(symtab_resolve_alias): New function.
(fixup_same_cpp_alias_visibility): Declare.
(cgraph_function_node): Add default parameter.
(cgraph_node_asm_name): Likewise.
(cgraph_function_or_thunk_node): Add default parameter; do
not ICE when it is NULL.
(varpool_variable_node): Likewise.
* tree-emutls.c (create_emultls_var): Update.
(ipa_lower_emutls): Update.
* cgraphunit.c (cgraph_decide_is_function_needed): Update.
(cgraph_reset_node): Reset alias info.
(cgraph_finalize_function): Update.
(fixup_same_cpp_alias_visibility): Move to symtab.c.
(analyze_function): Simplify.
(cgraph_process_same_body_aliases): Simplify.
(analyze_functions): Fixup same body aliases.
(handle_alias_pairs): Simplify.
(assemble_thunk): Update.
(assemble_thunks_and_aliases): Update.
(output_weakrefs): Rewrite.
* lto-cgraph.c (lto_output_node): Rewrite alias handling.
(lto_output_varpool_node): Likewise.
(compute_ltrans_boundary): Remve assert.
(get_alias_symbol): New functoin.
(input_node): Rewrite alias handling.
(input_varpool_node): Likewise.
* ipa-pure-const.c (propagate_pure_const): Fix formating.
* ipa.c (process_references): Handle weakrefs correctly.
(symtab_remove_unreachable_nodes): Likewise.
* trans-mem.c (get_cg_data): Update.
(ipa_tm_create_version_alias): Update.
(ipa_tm_execute): Update.
* symtab.c (dump_symtab_base): Dump aliases.
(verify_symtab_base): Verify aliases.
(symtab_node_availability): New function.
(symtab_alias_ultimate_target): Simplify.
(fixup_same_cpp_alias_visibility): Move here from cgraphunit.c;
handle all the fixup cases.
(symtab_resolve_alias): New function.
* passes.c (ipa_write_summaries): Handle weakrefs.
* varpool.c (varpool_analyze_node): Simplify.
(assemble_aliases): Update.
(varpool_create_variable_alias): Simplify.
(varpool_extra_name_alias): Simplify.
* lto-streamer.h (lto_symtab_merge_cgraph_nodes): Rename to...
(lto_symtab_merge_symbols): ... this one.
* decl2.c (cp_write_global_declarations): Replace same_body_alias
by symbol.cpp_implicit_alias.
* lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
(do_whole_program_analysis): Update dumping.
From-SVN: r199577
Diffstat (limited to 'gcc/tree-emutls.c')
-rw-r--r-- | gcc/tree-emutls.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/tree-emutls.c b/gcc/tree-emutls.c index 9fecb6c..6329fdd 100644 --- a/gcc/tree-emutls.c +++ b/gcc/tree-emutls.c @@ -699,7 +699,9 @@ create_emultls_var (struct varpool_node *var, void *data) tree cdecl; struct varpool_node *cvar; - cdecl = new_emutls_decl (var->symbol.decl, var->alias_of); + cdecl = new_emutls_decl (var->symbol.decl, + var->symbol.alias && var->symbol.analyzed + ? varpool_alias_target (var)->symbol.decl : NULL); cvar = varpool_get_node (cdecl); control_vars.quick_push (cvar); @@ -711,7 +713,7 @@ create_emultls_var (struct varpool_node *var, void *data) need to do this once for the main variable. */ emutls_common_1 (var->symbol.decl, cdecl, (tree *)data); } - if (var->symbol.alias && !var->alias_of) + if (var->symbol.alias && !var->symbol.analyzed) cvar->symbol.alias = true; /* Indicate that the value of the TLS variable may be found elsewhere, @@ -767,7 +769,7 @@ ipa_lower_emutls (void) { var = tls_vars->nodes[i]; - if (var->symbol.alias && !var->alias_of) + if (var->symbol.alias && !var->symbol.analyzed) any_aliases = true; else if (!var->symbol.alias) varpool_for_node_and_aliases (var, create_emultls_var, &ctor_body, true); |