On Wed, 22 Nov 2017, Jakub Jelinek wrote:

> 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.

Yes.  Too bad we don't have such thing.

Richard.

Reply via email to