diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-21 11:04:20 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-21 11:04:20 +0000 |
commit | badeded8d84fbf68c106091010573c149714b60e (patch) | |
tree | 29bdffd75d1c506f358ffd6cda8765372ce7fae1 /gcc/lto-cgraph.c | |
parent | fab4327cca4fcb559918f537dd185c2891efc612 (diff) | |
download | gcc-badeded8d84fbf68c106091010573c149714b60e.tar.gz |
* cgraph.c (dump_cgraph_node): Dump alias flag.
* cgraphunit.c (handle_alias_pairs): Handle weakrefs with no destination.
(get_alias_symbol): New function.
(output_weakrefs): Output also weakrefs with no destinatoin.
(lto_output_node): Output weakref alias flag when at function boundary.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180292 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-cgraph.c')
-rw-r--r-- | gcc/lto-cgraph.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c index 833bf84743b..98ae19b4aab 100644 --- a/gcc/lto-cgraph.c +++ b/gcc/lto-cgraph.c @@ -512,7 +512,13 @@ lto_output_node (struct lto_simple_output_block *ob, struct cgraph_node *node, || referenced_from_other_partition_p (&node->ref_list, set, vset)), 1); bp_pack_value (&bp, node->lowered, 1); bp_pack_value (&bp, in_other_partition, 1); - bp_pack_value (&bp, node->alias && !boundary_p, 1); + /* Real aliases in a boundary become non-aliases. However we still stream + alias info on weakrefs. + TODO: We lose a bit of information here - when we know that variable is + defined in other unit, we may use the info on aliases to resolve + symbol1 != symbol2 type tests that we can do only for locally defined objects + otherwise. */ + bp_pack_value (&bp, node->alias && (!boundary_p || DECL_EXTERNAL (node->decl)), 1); bp_pack_value (&bp, node->frequency, 2); bp_pack_value (&bp, node->only_called_at_startup, 1); bp_pack_value (&bp, node->only_called_at_exit, 1); @@ -530,7 +536,8 @@ lto_output_node (struct lto_simple_output_block *ob, struct cgraph_node *node, streamer_write_uhwi_stream (ob->main_stream, node->thunk.fixed_offset); streamer_write_uhwi_stream (ob->main_stream, node->thunk.virtual_value); } - if ((node->alias || node->thunk.thunk_p) && !boundary_p) + if ((node->alias || node->thunk.thunk_p) + && (!boundary_p || (node->alias && DECL_EXTERNAL (node->decl)))) { streamer_write_hwi_in_range (ob->main_stream, 0, 1, node->thunk.alias != NULL); |