Eliminate some stores in pushVMState
commit54bfde5a218786e3fa612e89997c259de3cfc841
authorbsimmers <bsimmers@fb.com>
Tue, 2 Dec 2014 19:26:54 +0000 (2 11:26 -0800)
committerhhvm-bot <hhvm-bot@fb.com>
Thu, 4 Dec 2014 20:30:42 +0000 (4 12:30 -0800)
tree305fe8da14e31ec15733af865562a3372a8d6508
parent99e752fbd00a47e68d2479ec08c29c3bfa4128a0
Eliminate some stores in pushVMState

Summary: gcc wasn't able to do this optimization automatically, so it was
writing the VMState object to the stack then copying it to the TinyVector. I also
tried adding emplace_back() to TinyVector and using that, but the generated
code wasn't quite as compact as this solution.

This makes VM reentry cheaper and reduces (but doesn't eliminate) the effect of
D1665434.

Reviewed By: @jasone

Differential Revision: D1713106
hphp/runtime/vm/bytecode.cpp
hphp/runtime/vm/jit/irgen-minstr.cpp
hphp/util/tiny-vector.h