This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Do not run IPA transform phases multiple times
- From: Martin Jambor <mjambor at suse dot cz>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: "Zamyatin, Igor" <igor dot zamyatin at intel dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <hubicka at ucw dot cz>
- Date: Fri, 18 Apr 2014 15:08:09 +0200
- Subject: Re: [PATCH] Do not run IPA transform phases multiple times
- Authentication-results: sourceware.org; auth=none
- References: <20140414173646 dot GE8020 at virgil dot suse> <0EFAB2BDD0F67E4FB6CCC8B9F87D756942A01047 at IRSMSX103 dot ger dot corp dot intel dot com> <20140418101145 dot GY1817 at tucnak dot redhat dot com> <20140418113354 dot GA12215 at virgil dot suse> <20140418114936 dot GC1817 at tucnak dot redhat dot com>
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);