diff options
author | Martin Liska <mliska@suse.cz> | 2017-04-11 18:38:19 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2017-04-11 16:38:19 +0000 |
commit | c6cf6ef7c090883c950ed6bec89bbee887130130 (patch) | |
tree | 88739d6627affe2cdcd6339aac2c0a20b8452b43 /gcc/ipa-split.c | |
parent | 58928b3589e98d5db034d9700b12d15015c36346 (diff) | |
download | gcc-c6cf6ef7c090883c950ed6bec89bbee887130130.zip gcc-c6cf6ef7c090883c950ed6bec89bbee887130130.tar.gz gcc-c6cf6ef7c090883c950ed6bec89bbee887130130.tar.bz2 |
Add function part to a same comdat group (PR ipa/80212).
2017-04-11 Martin Liska <mliska@suse.cz>
PR ipa/80212
* cgraph.c (cgraph_node::dump): Dump calls_comdat_local.
* ipa-split.c (split_function): Create a local comdat symbol
if caller is in a comdat group.
2017-04-11 Martin Liska <mliska@suse.cz>
PR ipa/80212
* g++.dg/ipa/pr80212.C: New test.
From-SVN: r246848
Diffstat (limited to 'gcc/ipa-split.c')
-rw-r--r-- | gcc/ipa-split.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c index da3c2c6..80fc31b 100644 --- a/gcc/ipa-split.c +++ b/gcc/ipa-split.c @@ -1360,6 +1360,15 @@ split_function (basic_block return_bb, struct split_point *split_point, node->split_part = true; + if (cur_node->same_comdat_group) + { + /* TODO: call is versionable if we make sure that all + callers are inside of a comdat group. */ + cur_node->calls_comdat_local = 1; + node->add_to_same_comdat_group (cur_node); + } + + /* Let's take a time profile for splitted function. */ node->tp_first_run = cur_node->tp_first_run + 1; |