[Mesa-dev] [PATCH 3/5] i965/fs: Track liveness of the flag register.

Kenneth Graunke kenneth at whitecape.org
Sat Nov 8 21:38:57 PST 2014


On Wednesday, October 29, 2014 03:58:13 PM Matt Turner wrote:
> On Wed, Oct 29, 2014 at 2:10 PM, Matt Turner <mattst88 at gmail.com> wrote:
> > ---
> >  .../drivers/dri/i965/brw_fs_live_variables.cpp     | 35 
++++++++++++++++++++++
> >  src/mesa/drivers/dri/i965/brw_fs_live_variables.h  |  5 ++++
> >  2 files changed, 40 insertions(+)
> >
> > diff --git a/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp 
b/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp
> > index ab81e94..dbe1d34 100644
> > --- a/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp
> > +++ b/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp
> > @@ -157,6 +157,18 @@ fs_live_variables::setup_def_use()
> >                 reg.reg_offset++;
> >              }
> >          }
> > +         if (inst->reads_flag()) {
> > +            /* The vertical combination predicates read f0.0 and f0.1. */
> > +            if (inst->predicate == BRW_PREDICATE_ALIGN1_ANYV ||
> > +                inst->predicate == BRW_PREDICATE_ALIGN1_ALLV) {
> > +               if (!BITSET_TEST(bd->flag_def, 1 - inst->flag_subreg)) {
> > +                  BITSET_SET(bd->flag_use, 1 - inst->flag_subreg);
> 
> Since don't expect (+f0.1.allv) to work (i.e., vertical predicates
> with a subregister of 1), maybe I should just assert(inst->flag_subreg
> == 0) and then do BITSET_*(..., 1) here.

I don't know if (+f0.1.allv) works or not, but it certainly seems easy enough 
to generate (+f0.0.allv) instead.

I like your assert and BITSET_*(..., 1) plan.

Either way, patches 1-3 are:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20141108/f2d63c4d/attachment.sig>


More information about the mesa-dev mailing list