Track redundant IR sequences by stable hash
commitaf4770db5e1efcac4d35f6548d434c1a3d6fc6da
authorMichael O'Farrell <michaelofarrell@fb.com>
Tue, 23 Feb 2021 22:01:19 +0000 (23 14:01 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 26 Feb 2021 00:30:51 +0000 (25 16:30 -0800)
tree4469fd9d6c8b8270de6fb2f06f993e6437aa1e87
parentfa09a328929d61be93fb1c90444e5ce60796f21e
Track redundant IR sequences by stable hash

Summary: The first step towards automated code outlining is identifying the sequences to outline.  This adds logic to build up a map tracking how often sequences of code occur.  We then prune down this data in `buildOptimizeHashes` to a set of sequences (hashes of them) that we would like to optimize.  The hashes are using the stable hash introduced earlier in this stack, and remain valid across HHVM restarts.

Reviewed By: ottoni

Differential Revision: D25887443

fbshipit-source-id: bd0ed64ec70c212f1265d8a40e421a935903ec5d
hphp/hhvm/thread_locals.txt
hphp/runtime/base/runtime-option.h
hphp/runtime/vm/jit/ir-instruction-inl.h
hphp/runtime/vm/jit/ir-instruction.h
hphp/runtime/vm/jit/mcgen-translate.cpp
hphp/runtime/vm/jit/outlined-sequence-selector.cpp [new file with mode: 0644]
hphp/runtime/vm/jit/outlined-sequence-selector.h [new file with mode: 0644]
hphp/runtime/vm/jit/vasm-emit.cpp
hphp/util/trace.h