This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix devirtualization ICE (PR tree-optimization/59622, take 3)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 8 Jan 2014 11:54:38 +0100
- Subject: Re: [PATCH] Fix devirtualization ICE (PR tree-optimization/59622, take 3)
- Authentication-results: sourceware.org; auth=none
- References: <20140103094203 dot GY892 at tucnak dot redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1401031100040 dot 16201 at zhemvz dot fhfr dot qr> <20140103100809 dot GA892 at tucnak dot redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1401031110480 dot 16201 at zhemvz dot fhfr dot qr> <20140103101824 dot GC892 at tucnak dot redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1401031118360 dot 16201 at zhemvz dot fhfr dot qr> <alpine dot LSU dot 2 dot 11 dot 1401031123090 dot 16201 at zhemvz dot fhfr dot qr> <20140103103350 dot GE892 at tucnak dot redhat dot com> <20140107172336 dot GX892 at tucnak dot redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1401081141510 dot 4623 at zhemvz dot fhfr dot qr>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Jan 08, 2014 at 11:45:28AM +0100, Richard Biener wrote:
> I prefer to always do this, not do the fancy insertion-before. That
> would do repeated folding for
>
> fold_stmt (gsi);
> fold_stmt (gsi);
> fold_stmt (gsi);
>
> where the last two should be a no-op.
I don't see how is that possible, at least for the __builtin_unreachable
case, because by just setting the fndecl to __builtin_unreachable and
keeping the incompatible fntype and bogus arguments for it all the
predicates whether it is a valid/suitable builtin call will fail and we
don't have a __builtin_unreachable function you could call.
So at least for builtin we want to make sure it has the right parameters.
If the lhs is something we can just initialize to zero, we can replace the
call with zeroing the lhs, but that is no the case always.
For __cxa_pure_virtual we could just keep the code as is (just with the
!inplace addition and spelling fix?), but would need to fix up whatever ICEs
during checking on it to honor fntype rather than decl's type.
Jakub
- References:
- Re: [PATCH] Fix devirtualization ICE (PR tree-optimization/59622, take 2)
- Re: [PATCH] Fix devirtualization ICE (PR tree-optimization/59622, take 2)
- Re: [PATCH] Fix devirtualization ICE (PR tree-optimization/59622, take 2)
- Re: [PATCH] Fix devirtualization ICE (PR tree-optimization/59622, take 2)
- Re: [PATCH] Fix devirtualization ICE (PR tree-optimization/59622, take 2)
- Re: [PATCH] Fix devirtualization ICE (PR tree-optimization/59622, take 2)
- Re: [PATCH] Fix devirtualization ICE (PR tree-optimization/59622, take 2)
- Re: [PATCH] Fix devirtualization ICE (PR tree-optimization/59622, take 2)
- [PATCH] Fix devirtualization ICE (PR tree-optimization/59622, take 3)
- Re: [PATCH] Fix devirtualization ICE (PR tree-optimization/59622, take 3)