Commit c6cf6ef7 by Martin Liska Committed by Martin Liska

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
parent 58928b35
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
* ipa-cp.c (determine_versionability): Handle calls_comdat_local
flags.
......
......@@ -2123,6 +2123,8 @@ cgraph_node::dump (FILE *f)
fprintf (f, " only_called_at_exit");
if (tm_clone)
fprintf (f, " tm_clone");
if (calls_comdat_local)
fprintf (f, " calls_comdat_local");
if (icf_merged)
fprintf (f, " icf_merged");
if (merged_comdat)
......
......@@ -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;
......
2017-04-11 Martin Liska <mliska@suse.cz>
PR ipa/80212
* g++.dg/ipa/pr80212.C: New test.
2017-04-11 Martin Sebor <msebor@redhat.com>
PR middle-end/80364
......
// PR ipa/80212
// { dg-options "-O2 --param partial-inlining-entry-probability=403796683 -fno-early-inlining" }
struct b
{
virtual b *c () const;
};
struct d : virtual b
{
};
struct e : d
{
e *
c () const
{
}
};
main () { e a; }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment