Rename ArrayOffset -> ArrayAccessnightly-2019.06.15
commit1b4d3feb2de50009d4f11ec2063af8046ee56485
authorShaunak Kishore <kshaunak@fb.com>
Sat, 15 Jun 2019 00:42:27 +0000 (14 17:42 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Sat, 15 Jun 2019 00:53:38 +0000 (14 17:53 -0700)
tree39131e16086a2e8f619e3354b1df05fdd6de52dd
parentb5635f98b70d5eb7da691db4397eaf2e973db523
Rename ArrayOffset -> ArrayAccess

Summary:
The single hottest code path in HHVM is hash table lookups. We add profiling code around hash table lookups (MixedArray and SetArray), and use the result to emit optimized lookup paths during retranslateAll.

Currently, we only profile array offsets. That is, if all arrays passing through a certain code path have the same shape, and we're accessing with a constant string, we look up the known offset of that string in the array. This optimization is quite good for cases where a) the array has this "struct" shape and b) the key is present in the array. I've found that in other cases, we can save on dcache misses by scanning the array instead.

To use the same struct to track both types of optimizations, we should rename it from ArrayOffsetProfile to ArrayAccessProfile, along with the associated IR ops.

Reviewed By: jjgriego

Differential Revision: D15830468

fbshipit-source-id: 7cc3919665bd6c6309162418221a712d62042e3f
14 files changed:
hphp/doc/ir.specification
hphp/runtime/base/rds.h
hphp/runtime/base/set-array.h
hphp/runtime/vm/jit/array-access-profile.cpp [moved from hphp/runtime/vm/jit/array-offset-profile.cpp with 91% similarity]
hphp/runtime/vm/jit/array-access-profile.h [moved from hphp/runtime/vm/jit/array-offset-profile.h with 95% similarity]
hphp/runtime/vm/jit/dce.cpp
hphp/runtime/vm/jit/extra-data.h
hphp/runtime/vm/jit/ir-opcode.cpp
hphp/runtime/vm/jit/irgen-minstr.cpp
hphp/runtime/vm/jit/irgen-minstr.h
hphp/runtime/vm/jit/irlower-minstr.cpp
hphp/runtime/vm/jit/memory-effects.cpp
hphp/runtime/vm/jit/minstr-helpers.h
hphp/runtime/vm/jit/prof-data-serialize.cpp