SpirvShader: Add Intermediate::replace()
This lets us use Intermediate for building intermediates in loops without the need of an alloca.
Bug: b/
128527271
Change-Id: Id36db83d0b1cedd7700bbf2431eed9b4a03a7997
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/27769
Presubmit-Ready: Ben Clayton <bclayton@google.com>
Tested-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>