Relax copy uses
commit66e10ea94385b1a20cac3ceda3b4a782dacf4d3b
authorEdwin Smith <smith@fb.com>
Tue, 2 Jun 2015 19:30:12 +0000 (2 12:30 -0700)
committerhhvm-bot <hhvm-bot@fb.com>
Fri, 12 Jun 2015 19:02:26 +0000 (12 12:02 -0700)
treed0f8d7ffdff4678f346fbfda2707a18f99acaf9a
parentcab463ba41a9881786acac9b49abb09f25f286e4
Relax copy uses

Summary: Lower copy to a copyplan (parallel copy) similar to how we handle
copyargs. Then, srcs of copy, copyargs, phidef, and phijcc are all
handled by insertCopiesAt(), which knows how to handle immediates
and loads from spill locations.

Because of this, add another use constraint "CopySrc" which means
that src doesn't have to be in a register. Ignore such uses when
looking for split positions. This should reduces the cases of
loading something into a register, just to move it into another
register. It also generally reduces the # of places that constants
must be in a register, which should increase the chances that non-
constants are assigned callee-saved registers.

Reviewed By: @swtaarrs

Differential Revision: D2128563
hphp/runtime/vm/jit/relocation-x64.cpp
hphp/runtime/vm/jit/vasm-xls.cpp