OSDN Git Service

i965/vec4: check writemask when bailing out at register coalesce
authorAlejandro Piñeiro <apinheiro@igalia.com>
Fri, 11 Sep 2015 10:21:13 +0000 (12:21 +0200)
committerEduardo Lima Mitev <elima@igalia.com>
Fri, 11 Sep 2015 15:43:22 +0000 (17:43 +0200)
commitd4e29af2344c06490913efc35430f93a966061bb
tree138aea6b2927aebbf1a37b4d4e987aeb89d5ddbf
parent2c52c794d727e535c1baca671a7c1e5b38dffb00
i965/vec4: check writemask when bailing out at register coalesce

opt_register_coalesce stopped to check previous instructions to
coalesce with if somebody else was writing on the same
destination. This can be optimized to check if somebody else was
writing to the same channels of the same destination using the
writemask.

Shader DB results (taking into account only vec4):

total instructions in shared programs: 1781593 -> 1734957 (-2.62%)
instructions in affected programs:     1238390 -> 1191754 (-3.77%)
helped:                                12782
HURT:                                  0
GAINED:                                0
LOST:                                  0

v2: removed some parenthesis, fixed indentation, as suggested by
    Matt Turner
v3: added brackets, for consistency, as suggested by Eduardo Lima

Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_vec4.cpp