diff mbox

[PR,81477] Set versionable regardless of optimization level

Message ID 20170728122611.2gv6g3urxqbjab2j@virgil.suse.cz
State New
Headers show

Commit Message

Martin Jambor July 28, 2017, 12:26 p.m. UTC
Hi,

in revision 250048 the setting of cgraph's node versionable flag was
made conditional on optimization level, which is undesirable as there
may be other reasons to make a copy of a function, not just
optimization for example expansion to HSA which is what the PR 81477
is about.

Fixed thusly, the patch has passed bootstrap and testsuite on
x86_64-linux with HSA enabled and testing on an actual HSA-capable
machine.  I'm still waiting for results of LTO-bootstrap and since the
change was pre-approved by Honza in person, I will commit it if passes
that as well.

Thanks,

Martin


2017-07-27  Martin Jambor  <mjambor@suse.cz>

	PR hsa/81477
	* ipa-fnsummary.c (ipa_fn_summary_generate): Set versionable
	regardless of optimization level.
---
 gcc/ipa-fnsummary.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox

Patch

diff --git a/gcc/ipa-fnsummary.c b/gcc/ipa-fnsummary.c
index 7324aac32c2..27e8d73f9df 100644
--- a/gcc/ipa-fnsummary.c
+++ b/gcc/ipa-fnsummary.c
@@ -3174,9 +3174,7 @@  ipa_fn_summary_generate (void)
 
   FOR_EACH_DEFINED_FUNCTION (node)
     if (DECL_STRUCT_FUNCTION (node->decl))
-      node->local.versionable = 
-	(opt_for_fn (node->decl, optimize)
-	&& tree_versionable_function_p (node->decl));
+      node->local.versionable = tree_versionable_function_p (node->decl);
 
   ipa_fn_summary_alloc ();