[Mesa-dev] [PATCH v2 5/8] i965/fs: Avoid scalar destinations in emit_uniformize()

Francisco Jerez currojerez at riseup.net
Fri Oct 23 04:37:50 PDT 2015


Kristian Høgsberg <krh at bitplanet.net> writes:

> On Thu, Oct 22, 2015 at 12:24 PM, Matt Turner <mattst88 at gmail.com> wrote:
>> On Thu, Oct 22, 2015 at 11:37 AM, Kristian Høgsberg Kristensen
>> <krh at bitplanet.net> wrote:
>>> The scalar destination registers break copy propagation. Instead compute
>>> the results to a regular register and then reference a component when we
>>> later use the result as a source.
>>
>> It might be hairy to get it working, but making copy propagation
>> handle scalar destinations is the "right" way forward.
>>

I'm pretty sure use-def chains will help with that :).

>> If we commit this patch, and later implement support for copy
>> propagating with scalar destinations, how will we remember to change
>> this back?
>
> What's the harm in leaving it in?
>
Scalar instructions take less cycles to execute and consume less
registers than vector ones -- The latter isn't a huge deal right now
because the register allocator will expand it to a 32B register anyway,
so the most you save currently is one register in SIMD16 mode.  Let's
put an XXX comment so we remember to change this back to a scalar when
the remaining compiler infrastructure is fixed to handle them properly.
With that change this patch is:

Reviewed-by: Francisco Jerez <currojerez at riseup.net>

> Kristian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20151023/ca2ed396/attachment.sig>


More information about the mesa-dev mailing list