Profile to find places we can guard on KindOfStaticString, take 2
commit63653413749b99effcc48059d723b766080cf81c
authorbsimmers <bsimmers@fb.com>
Wed, 14 May 2014 23:53:14 +0000 (14 16:53 -0700)
committerJoelMarcey <joelm@fb.com>
Thu, 22 May 2014 18:15:41 +0000 (22 11:15 -0700)
tree01f8fd07cd4d3f802deb2edd922f0e3ede90909c
parent5f0be2910681e59b2a6ef4f8e31a6dda6604d74f
Profile to find places we can guard on KindOfStaticString, take 2

Summary: If 100% of the Str values flowing through a guard in profiling
translations are KindOfStaticString, we change that guard to KindOfStaticString
in the optimized translation. In practice, most values are KindOfString with a
static _count but guarding on that is much more expensive and must be justified
with concrete savings. This diff just covers the cases that should be made
strictly better: the guard is the same size/cost, shouldn't fail any more often
than it used to, and the generated code will only differ in that there may be
fewer refcounting operations.

Reviewed By: @ottoni

Differential Revision: D1342007
hphp/doc/ir.specification
hphp/runtime/vm/jit/code-gen-arm.cpp
hphp/runtime/vm/jit/code-gen-x64.cpp
hphp/runtime/vm/jit/extra-data.h
hphp/runtime/vm/jit/hhbc-translator.cpp
hphp/runtime/vm/jit/hhbc-translator.h
hphp/runtime/vm/jit/ir.h
hphp/runtime/vm/jit/target-profile.h