Allow vxls to allocate vmsp during traces
Summary: The rest of the summary is a bit of a lie: everything works just fine if we let
vmsp float freely but that's still disabled for performance reasons. See the
comment in reg-alloc.cpp for details.
%rbx is no longer a reserved register, freeing it up for general
use. vmsp still lives in %rbx between tracelets, so it's copied from %rbx to a
Vreg at the beginning of a tracelet and synced back to %rbx when
appropriate. Most of the Vregs will end up assigned to %rbx anyway due to
vxls's copy hinting. All instructions that leave the current trace for another
one (as opposed to leaving by throwing) now have a RegSet of uses, ensuring
that the value in %rbx is never clobbered between when it's written and the end
of the trace.
We now need to create phis for vmsp when it differs between predecessors rather
than just creating a new one with DefSP. I briefly considered just using an lea
off of %rbp in those situations but that wouldn't work for resumables and would
always generate some code, as opposed to only sometimes generating code for the
jmp/phis. I'm expecting this to have little to no effect on the generated code
due to copy hinting in vxls.
Reviewed By: @edwinsmith
Differential Revision:
D1622952