[Mesa-dev] [PATCH 2/3] i965/fs: Clear variable from live-set if it's completely overwritten.
Matt Turner
mattst88 at gmail.com
Mon Apr 14 19:47:34 PDT 2014
On Mon, Apr 14, 2014 at 5:50 PM, Eric Anholt <eric at anholt.net> wrote:
> Matt Turner <mattst88 at gmail.com> writes:
>
>> One program affected:
>>
>> instructions in affected programs: 246 -> 244 (-0.81%)
>> ---
>> src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp b/src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp
>> index 6addbb3..1ae7606 100644
>> --- a/src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp
>> +++ b/src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp
>> @@ -80,6 +80,13 @@ fs_visitor::dead_code_eliminate()
>> }
>> }
>>
>> + if (inst->dst.file == GRF) {
>> + if (!inst->is_partial_write()) {
>> + int var = live_intervals->var_from_reg(&inst->dst);
>> + BITSET_CLEAR(live, var);
>> + }
>> + }
>
> Any more effect if you:
>
> + int var = live_intervals->var_from_vgrf[inst->dst.reg];
> + for (int i = 0; i < inst->regs_written; i++)
> + BITSET_CLEAR(live, var + i);
>
> instead?
Needs to be BITSET_CLEAR(live, var + inst->dst.reg_offset + i), but
nope. No changes.
More information about the mesa-dev
mailing list