[Mesa-dev] [PATCH v2 15/20] i965/vec4: consider subregister offset in live variables
Juan A. Suarez Romero
jasuarez at igalia.com
Fri Feb 10 16:55:15 UTC 2017
On Thu, 2017-02-09 at 15:56 -0800, Francisco Jerez wrote:
> Samuel Iglesias Gonsálvez <siglesias at igalia.com> writes:
>
> > From: "Juan A. Suarez Romero" <jasuarez at igalia.com>
> >
> > Take in account the offset value when getting the var from register.
> >
> > This is required when dealing with an operation that writes half of the
> > register (like one d2x in IVB/BYT, which uses exec_size == 4).
> >
> > Note that for live analysis variables we need to stick to per-GRF
> > analysis. In this case, we use var_from_reg() with GRF precision.
>
> This looks bogus to me. If the specified register had a non-zero
> sub-GRF offset and we weren't taking it into account we have a bug. The
> vec4 liveness analysis pass keeps track of dataflow with 32-bit
> granularity these days so we want the variable index computation to be
> done with the same precision.
I would like to clarify that actually we are using the offset value
when calculating var_from_reg().
The thing is about offsets that are less than a GRF; for instance,
offsets that points to half of a register (offset == 16). In this case
the offset does not affect the result, and it should. But I only did
this fix for DCE and other optimizations, but not for liveness
analysis.
So I'll change it to also do in liveness analysis.
J.A.
More information about the mesa-dev
mailing list