aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-split.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2017-04-07 12:36:21 +0200
committerMartin Liska <marxin@gcc.gnu.org>2017-04-07 10:36:21 +0000
commit70cd23c019a2766eea4a8c9c20b674bc83b181e3 (patch)
tree9fe83d36fdef020c4e4f42a362f36cbb4abd80fc /gcc/ipa-split.c
parentfe6bb25f9ee76e34bc0e1cf9e2b22b49e6e27911 (diff)
downloadgcc-70cd23c019a2766eea4a8c9c20b674bc83b181e3.zip
gcc-70cd23c019a2766eea4a8c9c20b674bc83b181e3.tar.gz
gcc-70cd23c019a2766eea4a8c9c20b674bc83b181e3.tar.bz2
Add function part to a same comdat group (PR ipa/80212).
2017-04-07 Martin Liska <mliska@suse.cz> PR ipa/80212 * g++.dg/ipa/pr80212.C: New test. 2017-04-07 Martin Liska <mliska@suse.cz> PR ipa/80212 * ipa-split.c (split_function): Add function part to a same comdat group. From-SVN: r246759
Diffstat (limited to 'gcc/ipa-split.c')
-rw-r--r--gcc/ipa-split.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c
index da3c2c6..ae1de6f 100644
--- a/gcc/ipa-split.c
+++ b/gcc/ipa-split.c
@@ -1363,6 +1363,9 @@ split_function (basic_block return_bb, struct split_point *split_point,
/* Let's take a time profile for splitted function. */
node->tp_first_run = cur_node->tp_first_run + 1;
+ if (cur_node->same_comdat_group)
+ node->add_to_same_comdat_group (cur_node);
+
/* For usual cloning it is enough to clear builtin only when signature
changes. For partial inlining we however can not expect the part
of builtin implementation to have same semantic as the whole. */