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] Avoid UNSPEC_VOLATILE or volatile ASM_OPERANDS in debug insns (PR debug/83084)


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


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