This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Avoid UNSPEC_VOLATILE or volatile ASM_OPERANDS in debug insns (PR debug/83084)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: Alexandre Oliva <aoliva at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 22 Nov 2017 11:00:54 +0100
- Subject: Re: [PATCH] Avoid UNSPEC_VOLATILE or volatile ASM_OPERANDS in debug insns (PR debug/83084)
- Authentication-results: sourceware.org; auth=none
- References: <20171122092222.GI14653@tucnak> <alpine.LSU.2.20.1711221041490.12252@zhemvz.fhfr.qr>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Nov 22, 2017 at 10:42:13AM +0100, Richard Biener wrote:
> On Wed, 22 Nov 2017, Jakub Jelinek wrote:
>
> > Hi!
> >
> > Seems at least the scheduler treats UNSPEC_VOLATILE and perhaps volatile asm
> > in DEBUG_INSNs as having side-effects and schedules differently depending on
> > that. While we could tweak the scheduler not to do that, these will be
> > actually never useful in DEBUG_INSNs anyway, we don't know what it means so
> > we can't represent it in debug info.
> >
> > So, the following patch just makes sure we don't add them into debug_insns,
> > instead reset those.
> >
> > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>
> Ok.
>
> Do we have some RTL IL verifier where we could verify those don't appear?
> Maybe ICE in dwarf2out.c?
dwarf2out.c would ICE on UNSPEC_VOLATILE (but not ASM_OPERANDS), no idea why
it didn't make all the way up to there.
In any case, a more useful verifier would be something like we have for
GIMPLE verification, something that walks the whole IL after every pass and
ICEs if something fails verification. We don't have that for RTL and I
think we should, it would e.g. catch the various cases where backends just
use invalid RTL in their patterns on which e.g. simplify-rtx.c could just
ICE if it made it there.
Jakub