OSDN Git Service

Don't needlessly traverse the left hand side of assignments.
authorNicolas Capens <capn@google.com>
Thu, 9 Nov 2017 16:20:51 +0000 (11:20 -0500)
committerNicolas Capens <nicolascapens@google.com>
Thu, 16 Nov 2017 22:28:20 +0000 (22:28 +0000)
commit84249fde93e6c45e7e31ca2d641b3ac09d3e6c5c
tree8c8577b78a151a84bb546513fd6f3152a55c2ac4
parent91b425b2b13473605eeb1bff9f568c952ff863b3
Don't needlessly traverse the left hand side of assignments.

Previously we processed assignments in PostVisit, i.e. after both the
left and right side had been traversed. This produces temporaries for
the left hand side, which we don't use since we want to assign to the
lvalue. So instead we can explicitly traverse the right hand side, and
for the left hand side only traverse indirect indexing expressions.

Change-Id: I9ec0596a9c256921b65a9f70428d950959f66aa0
Reviewed-on: https://swiftshader-review.googlesource.com/13630
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
src/OpenGL/compiler/OutputASM.cpp