Introduce CallFlags to eventually replace ActRec::m_numArgsAndFlags
commit04354f6ff50af3a6e473c8c66e9305f418577578
authorJan Oravec <jan@fb.com>
Tue, 24 Sep 2019 04:37:56 +0000 (23 21:37 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Tue, 24 Sep 2019 04:41:06 +0000 (23 21:41 -0700)
tree5387503dc1c34741485ea8f40def4751f32bdc74
parentaa313841ad684279eea247f5957b8efd840e8a22
Introduce CallFlags to eventually replace ActRec::m_numArgsAndFlags

Summary:
Introduce a CallFlags integer that is currently always equal to zero that is
passed to the prologue via a register.

This integer will eventually have the following structure:
- bits 0..(N-1): various flags (e.g. HasReifiedGenerics)
- bits N..31: number of passed arguments
- bits 32..47: bitmap of passed generics (moved ActRec::m_reifiedGenerics)
- bits 48..63: unused

This diff introduces an extra instruction per function call that zeroes out
a register holding these flags. This will cause a ~0.2-0.3% regression that
will be compensated for by a follow up diffs that eliminate or defer storing
ActRec's m_numArgsAndFlags to the prologue.

Reviewed By: ricklavoie

Differential Revision: D17537835

fbshipit-source-id: 0eb5d6dc404c402e2db3270b77cf936f0c286ba2
14 files changed:
hphp/doc/ir.specification
hphp/runtime/vm/bytecode.cpp
hphp/runtime/vm/call-flags.h [copied from hphp/runtime/vm/jit/enter-tc.h with 67% similarity]
hphp/runtime/vm/jit/abi.h
hphp/runtime/vm/jit/dce.cpp
hphp/runtime/vm/jit/enter-tc.cpp
hphp/runtime/vm/jit/enter-tc.h
hphp/runtime/vm/jit/ir-opcode.cpp
hphp/runtime/vm/jit/irgen-func-prologue.cpp
hphp/runtime/vm/jit/irlower-call.cpp
hphp/runtime/vm/jit/irlower-intrinsic.cpp
hphp/runtime/vm/jit/memory-effects.cpp
hphp/runtime/vm/jit/unique-stubs.cpp
hphp/runtime/vm/jit/unique-stubs.h