This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Do not run IPA transform phases multiple times


On Fri, Apr 18, 2014 at 01:49:36PM +0200, Jakub Jelinek wrote:
> It reproduces on x86_64 too, I guess the reason why you aren't seeing this
> is that you might have too old assembler that doesn't support
> avx2 instructions (you actually don't need avx2 hw to reproduce, any
> x86_64 or i686 just with gas that supports avx2 should be enough).
> 

I see, with that information I have managed to reproduce the failures
and now am convinced the patch (re-posted below) is indeed the correct
thing to do.  I am going to bootstrap it over the weekend (can't do it
earlier to test these testcases).  Honza, is it OK for trunk if it
passes?

Thanks,

Martin


2014-04-18  Martin Jambor  <mjambor@suse.cz>

	* cgraphclones.c (cgraph_function_versioning): Copy
	ipa_transforms_to_apply instead of asserting it is empty.

Index: src/gcc/cgraphclones.c
===================================================================
--- src.orig/gcc/cgraphclones.c
+++ src/gcc/cgraphclones.c
@@ -974,7 +974,9 @@ cgraph_function_versioning (struct cgrap
     cgraph_copy_node_for_versioning (old_version_node, new_decl,
 				     redirect_callers, bbs_to_copy);
 
-  gcc_assert (!old_version_node->ipa_transforms_to_apply.exists ());
+  if (old_version_node->ipa_transforms_to_apply.exists ())
+    new_version_node->ipa_transforms_to_apply
+      = old_version_node->ipa_transforms_to_apply.copy ();
   /* Copy the OLD_VERSION_NODE function tree to the new version.  */
   tree_function_versioning (old_decl, new_decl, tree_map, false, args_to_skip,
 			    skip_return, bbs_to_copy, new_entry_block);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]