[Mesa-dev] [PATCH 2/2] i965: Invalidate live intervals when inserting Gen4 SEND workarounds.

Kenneth Graunke kenneth at whitecape.org
Mon Jun 9 17:49:53 PDT 2014


On Monday, June 09, 2014 10:02:38 AM Matt Turner wrote:
> On Mon, Jun 9, 2014 at 2:59 AM, Kenneth Graunke <kenneth at whitecape.org> 
wrote:
> > We need to invalidate the live intervals when inserting new
> > instructions.
> >
> > Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> > Cc: mesa-stable at lists.freedesktop.org
> > ---
> >  src/mesa/drivers/dri/i965/brw_fs.cpp | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp 
b/src/mesa/drivers/dri/i965/brw_fs.cpp
> > index b485e65..be461ac 100644
> > --- a/src/mesa/drivers/dri/i965/brw_fs.cpp
> > +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
> > @@ -2482,6 +2482,8 @@ 
fs_visitor::insert_gen4_send_dependency_workarounds()
> >     if (brw->gen != 4 || brw->is_g4x)
> >        return;
> >
> > +   bool progress = false;
> > +
> >     /* Note that we're done with register allocation, so GRF fs_regs 
always
> >      * have a .reg_offset of 0.
> >      */
> > @@ -2492,8 +2494,12 @@ 
fs_visitor::insert_gen4_send_dependency_workarounds()
> >        if (inst->mlen != 0 && inst->dst.file == GRF) {
> >           insert_gen4_pre_send_dependency_workarounds(inst);
> >           insert_gen4_post_send_dependency_workarounds(inst);
> > +         progress = true;
> >        }
> >     }
> > +
> > +   if (progress)
> > +      invalidate_live_intervals();
> >  }
> >
> >  /**
> > --
> > 1.9.2
> 
> What did this fix? Post-register allocation instruction scheduling?
> 
> Both are
> 
> Reviewed-by: Matt Turner <mattst88 at gmail.com>

I didn't actually observe this to fix anything.  I saw some segfaults in the 
area, and said "oh, we didn't invalidate the live intervals.  that must be 
it."  But it wasn't - it was the list walking snafu.

Still, since dump_instructions() depends on live intervals working (for the 
register pressure code), we ought to fix it.  It may also be used for post-RA 
scheduling.

--Ken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140609/642bfa8a/attachment.sig>


More information about the mesa-dev mailing list