OSDN Git Service

Use a C array for temporary load results
authorNicolas Capens <capn@google.com>
Thu, 21 Mar 2019 21:04:05 +0000 (17:04 -0400)
committerNicolas Capens <nicolascapens@google.com>
Fri, 22 Mar 2019 16:36:28 +0000 (16:36 +0000)
commitfabdec519281a283de3fdb0935d7d3edfb4a705d
tree69e721242afa51be9e85b67621ba887420d0bf41
parent5e8414e4e1043d4b09befa0411a38beedbd03243
Use a C array for temporary load results

Array<> emits GEP instructions on every access, which aren't necessary.
Note that these temporaries are required because the If/Else blocks
both write to them, while the destination intermediate object is an
rvalue which can only be initialized once to maintain SSA form.

Also EmitAccessChain was moved to match the declaration order.

Bug b/128539387

Change-Id: I726fb0fd28b0a19a61e8759679e30bc699f3279d
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/27788
Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
src/Pipeline/SpirvShader.cpp