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 12:11:45PM +0200, Jakub Jelinek wrote:
> On Wed, Apr 16, 2014 at 03:28:59PM +0000, Zamyatin, Igor wrote:
> > Likely after this was checked in appeared following on x86
> > 
> > FAIL: gcc.dg/vect/vect-simd-clone-11.c -flto -ffat-lto-objects (internal compiler error)
> > FAIL: gcc.dg/vect/vect-simd-clone-11.c -flto -ffat-lto-objects (test for excess errors)
> > FAIL: gcc.dg/vect/vect-simd-clone-12.c -flto -ffat-lto-objects (internal compiler error)
> > FAIL: gcc.dg/vect/vect-simd-clone-12.c -flto -ffat-lto-objects (test for excess errors)
> > FAIL: gcc.dg/vect/vect-simd-clone-1.c -flto -ffat-lto-objects (internal compiler error)
> > FAIL: gcc.dg/vect/vect-simd-clone-1.c -flto -ffat-lto-objects (test for excess errors)
> > FAIL: gcc.dg/vect/vect-simd-clone-2.c -flto -ffat-lto-objects (internal compiler error)
> > FAIL: gcc.dg/vect/vect-simd-clone-2.c -flto -ffat-lto-objects (test for excess errors)
> > FAIL: gcc.dg/vect/vect-simd-clone-3.c -flto -ffat-lto-objects (internal compiler error)
> > FAIL: gcc.dg/vect/vect-simd-clone-3.c -flto -ffat-lto-objects (test for excess errors)
> > FAIL: gcc.dg/vect/vect-simd-clone-4.c -flto -ffat-lto-objects (internal compiler error)
> > FAIL: gcc.dg/vect/vect-simd-clone-4.c -flto -ffat-lto-objects (test for excess errors)
> > FAIL: gcc.dg/vect/vect-simd-clone-5.c -flto -ffat-lto-objects (internal compiler error)
> > FAIL: gcc.dg/vect/vect-simd-clone-5.c -flto -ffat-lto-objects (test for excess errors)
> > FAIL: gcc.dg/vect/vect-simd-clone-6.c -flto -ffat-lto-objects (internal compiler error)
> > FAIL: gcc.dg/vect/vect-simd-clone-6.c -flto -ffat-lto-objects (test for excess errors)
> > FAIL: gcc.dg/vect/vect-simd-clone-7.c -flto -ffat-lto-objects (internal compiler error)
> > FAIL: gcc.dg/vect/vect-simd-clone-7.c -flto -ffat-lto-objects (test for excess errors)
> > FAIL: gcc.dg/vect/vect-simd-clone-8.c -flto -ffat-lto-objects (internal compiler error)
> > FAIL: gcc.dg/vect/vect-simd-clone-8.c -flto -ffat-lto-objects (test for excess errors)
> > FAIL: gcc.dg/vect/vect-simd-clone-9.c -flto -ffat-lto-objects (internal compiler error)
> > FAIL: gcc.dg/vect/vect-simd-clone-9.c -flto -ffat-lto-objects (test for excess errors)
> 
> Yeah, it is in the assert added in this patch:
> 977	  gcc_assert (!old_version_node->ipa_transforms_to_apply.exists ());
> in cgraph_function_versioning.
> pass_omp_simd_clone is a late IPA pass which needs to perform
> cgraph_function_versioning, and the ICE is in lto1 when the old_version_node
> has been read from the LTO IL from the object file, and
> ipa_transforms_to_apply contains tons of various transforms, but I suppose
> that during late IPA passes they are no longer performed.
> 
> Martin, can you please fix this up?
> 
> 	Jakub

I am aware this problem has been reported but my problem is that I
cannot reproduce it anywhere.  The tests pass on x86_64 host and the
only i686 host I use is gcc45 on gcc farm where these tests are
skipped.  It is very likely that the patch below is the proper fix but
it's cumbersome to propose patches without having the testcase.  And
of course I cannot test it because the vecotr is empty for me in all
cases.

I'll try to look for some new i686 machine somewhere, although they
are very scarce recently.

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]