Subzero: fix invalid register allocation
Subzero would generate invalid code during register allocation in
certain instances related to incorrect liveness analysis. With the help
of Jim Stichnoth, we identified that "computeInOutEdges" was never being
called, so, as Jim put it: "Because control-flow information is not
available in InEdges and OutEdges, liveness analysis essentially does
block-local liveness instead of global liveness." As a result, values
would get incorrectly assigned to registers.
The ExtractFromRValue unit test demonstrates this bug. Without the call
to computeInOutEdges, the Extract(v, 1) would return the wrong result.
Bug: b/144688789
Change-Id: Iad7f7bf9dec74f628120003d316480d83b9fa4f1
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38474Tested-by:
Antonio Maiorano <amaiorano@google.com>
Reviewed-by:
Ben Clayton <bclayton@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Showing
Please
register
or
sign in
to comment