Track all phys registers
commitf499b198323f7ab1d7168e8f160a65638318ad71
authorJan Oravec <jan@fb.com>
Mon, 28 Mar 2022 05:13:36 +0000 (27 22:13 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Mon, 28 Mar 2022 05:13:36 +0000 (27 22:13 -0700)
treed473282006c4b512e13a8cebe2a4184bbd59d77b
parent80e023b7732b4a92f0eeeb5c0dfd99c51871d393
Track all phys registers

Summary:
The main goal of the vasm-copy optimization is to optimize away the virtual
register used by vmsp(), which is most often defined relative to vmfp(), backed
by rvmfp() physical register. This optimization currently tracks only the
"reserved" physical registers, which includes rvmfp(), and the tracking
requires the register value to be relative to a value of a tracked register
at the beginning of a translation.

However, the upcoming func entry logic will redefine rvmfp() and initialize it
using the initial value of non-"reserved" rvmsp() register.

Make this optimization work with the new func entry logic by tracking all
physical registers, including rvmsp(). There doesn't seem to be any downside
doing that.

In the future it would make sense to track register values relative to all
uniquely introduced values in the translation instead of just the initial
register values. Then it could be useful for more purposes than vmsp().

Reviewed By: ricklavoie

Differential Revision: D35175278

fbshipit-source-id: a2f570fe196aa3bd610f2336d8489fe2b242a2db
hphp/runtime/vm/jit/vasm-copy.cpp