On Tue, 27 Mar 2018, Richard Biener wrote:
> > > so this is kind-of global regs being live across all BBs?  This sounds
> > > a bit stupid to me, but well ... IMHO those refs should be at
> > > specific insns like calls.
> > > 
> > > So maybe, with a big fat comment, it is OK to ignore artificial
> > > refs in this loop...
> > 
> > Yeah, I'd like someone else's opinion too, as I know even less about
> > real artificial uses (as opposed to my incorrect mention in my first
> > post). :-)
> 
> If they only appear in the exit/entry block ignoring them should be safe.
> 
> But who knows...

Roman and I discussed a related problem a few weeks ago, so here's my 2c.
As I don't have any special DF knowledge, this is merely my understanding.

(apropos i: SMS uses sched-deps for intra-loop deps, and then separately uses
DF for cross-iteration deps, which means that it should be ready for surprises
when the two scanners are not 100% in sync)

(apropos ii: given the flexibility of RTL, it would have been really nice
if there were no implicit cc0-like uses that need to be special-cased in DF,
sched-deps and other scanners)

In this case I believe it's fine to skip processing of r_use when the associated
BB is not the loop BB (i.e. 'if (DF_REF_BB (r_use->ref) != g->bb)' as Richard
suggested), but I'm concerned that skipping it when the artificial's use BB
corresponds to loop BB goes from ICE to wrong-code. It should be detected
earlier, in sms_schedule (see the comment starting with "Don't handle BBs with
calls or barriers").

Alexander

Reply via email to