Subzero: fix CoroutineBegin generation
Subzero: fix CoroutineBegin generation

Rework how instructions are injected at the top of the CoroutineBegin
function by getting rid of replaceEntryNode, which attempted to replace
the entry node with a non-entry one. This seemed to work on all targets,
except for Windows x86-32 (Win32) when passing enough arguments to
Coroutines. In this case, it would crash in the code generated right
after this injected code. It looks like the code in replaceEntryNode is
not quite right, resulting in Subzero creating needless stack allocs per
argument, and ultimately generating invalid offsets from the stack
pointer.

Instead of fixing replaceEntryNode, I now simply remember the entryNode
for CoroutineBegin to use, adding the rest to a separate node for
basicBlock, and when finalizing the function, I connect entryNode to the
initial basicBlock node via a branch. This way, there is not messing
around with function's node list.

This not only fixes the crash, but gets rid of the needless stack
allocs per arg.

Bug: angleproject:4482
Change-Id: I13f9c8c43ee07f35302208d9876e6fbdf0b1ad26
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/42608
Kokoro-Presubmit: kokoro <2ac7b1f3fa578934c95181d4272be0d3bca00121@google.com>
Tested-by: Antonio Maiorano <86d87a6550afb6b07035c9743fa181900589f7e0@google.com>
Reviewed-by: Nicolas Capens <51edc787c30f24c4904e8ffbb5523c3a9f7a451d@google.com>

google/swiftshader,google/swiftshader,google/swiftshader,bkaradzic/SwiftShader,bkaradzic/SwiftShader,bkaradzic/SwiftShader,bkaradzic/SwiftShader,bkaradzic/SwiftShader