Do not create a constprop clone for calls_comdat_local nodes (PR ipa/80212).

2017-04-11  Martin Liska  <mliska@suse.cz>

	PR ipa/80212
	* ipa-cp.c (determine_versionability): Handle calls_comdat_local
	flags.

From-SVN: r246847
This commit is contained in:
Martin Liska 2017-04-11 18:37:31 +02:00 committed by Martin Liska
parent 3812f46046
commit 58928b3589
2 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2017-04-11 Martin Liska <mliska@suse.cz>
PR ipa/80212
* ipa-cp.c (determine_versionability): Handle calls_comdat_local
flags.
2017-04-11 Martin Sebor <msebor@redhat.com>
PR middle-end/80364

View File

@ -614,6 +614,12 @@ determine_versionability (struct cgraph_node *node,
decloned constructors, inlining is always better anyway. */
else if (node->comdat_local_p ())
reason = "comdat-local function";
else if (node->calls_comdat_local)
{
/* TODO: call is versionable if we make sure that all
callers are inside of a comdat group. */
reason = "calls comdat-local function";
}
if (reason && dump_file && !node->alias && !node->thunk.thunk_p)
fprintf (dump_file, "Function %s/%i is not versionable, reason: %s.\n",