[Mesa-dev] [PATCH RFC 3/6] i965: add FS_OPCODE_OVERWRITE_DST

Chia-I Wu olvaffe at gmail.com
Tue Oct 8 22:46:18 PDT 2013


On Wed, Oct 9, 2013 at 3:35 AM, Eric Anholt <eric at anholt.net> wrote:
> Chia-I Wu <olvaffe at gmail.com> writes:
>
>> From: Chia-I Wu <olv at lunarg.com>
>>
>> FS_OPCODE_OVERWRITE_DST is used to indicate that the destination register is
>> (completely) overwritten.  No code is emitted, but the liveness analysis can
>> use it as a hint to add the destination register to DEF bitset.  This is
>> needed because it is hard to figure out if some partial writes combined
>> constitute a complete write during liveness analysis, while it is easier for
>> the FS visitor to know if that is the case.
>
> I'm not a fan of this one (particularly the adding of scheduling
> barriers).  Any other ways you looked at to deal with this?
The goal is for liveness analysis to know that a register is not a
live-in.  It should be possible to make the liveness analysis smarter,
knowing that these partial writes or SENDs in the basic block make a
full write.  But that's quite some code to figure that out, while we
already know whether it is the case or not when visiting an
ir_texture.

An alternative would be to add a flag, force_def, to fs_inst.  The
liveness analysis can use that to help decide whether the dst should
be in the DEF or not.


>
> Patch 1, 2, 4 are:
>
> Reviewed-by: Eric Anholt <eric at anholt.net>
>
> and I wouldn't mind seeing them land early.
Thanks.  As this series could not be applied cleanly since texture
gather support, I will commit patch 1, 2, 4 first and send v2 for the
rest.


-- 
olv at LunarG.com


More information about the mesa-dev mailing list