Move some JIT data members to more appropriate places
commit625331680e813f53b6a30a48533b1b0e1fc8c8f0
authorBrett Simmers <bsimmers@fb.com>
Tue, 7 Jun 2016 17:39:20 +0000 (7 10:39 -0700)
committerHhvm Bot <hhvm-bot-bot@fb.com>
Tue, 7 Jun 2016 17:48:19 +0000 (7 10:48 -0700)
treea6d916285b239f6d21c35b41ee84363c7fcc74e4
parentea7c923d61d3359850c3c28aeb93783d93aba8f9
Move some JIT data members to more appropriate places

Summary:
The TCA -> TransID map has been moved from MCGenerator to ProfData,
since it's used for PGO. Also turn it into a folly::AHM so it can be
concurrently accessed without having to grab a lock. This increases the amount
of memory that's freed when we delete ProfData.

Move the SrcDB from Translator to MCGenerator. All the other translation
metadata is owned by mcg so this makes more sense. While I was doing this, I
cleaned up a couple related things:
- Remove getSrcRec() and inline its contents into the one legit caller. It was
  being called by a bunch of other places that have no business creating
  SrcRecs. Those calls have been replaced with calls to find(). If the SrcRec
  doesn't already exist at those points, it's a bug.
- Move registerFallBackJump() from SrcRec to vasm-internal.cpp, the only place
  it's used.

Reviewed By: ottoni

Differential Revision: D3388774

fbshipit-source-id: 5a6e7c38a90c3bccdc640c920c6924aa437dd56d
17 files changed:
hphp/runtime/vm/jit/cg-meta.cpp
hphp/runtime/vm/jit/inlining-decider.cpp
hphp/runtime/vm/jit/mc-generator.cpp
hphp/runtime/vm/jit/mc-generator.h
hphp/runtime/vm/jit/prof-data.cpp
hphp/runtime/vm/jit/prof-data.h
hphp/runtime/vm/jit/recycle-tc.cpp
hphp/runtime/vm/jit/region-selection.cpp
hphp/runtime/vm/jit/regionize-func.cpp
hphp/runtime/vm/jit/relocation.cpp
hphp/runtime/vm/jit/srcdb.cpp
hphp/runtime/vm/jit/srcdb.h
hphp/runtime/vm/jit/trans-cfg.cpp
hphp/runtime/vm/jit/trans-cfg.h
hphp/runtime/vm/jit/translator-inl.h
hphp/runtime/vm/jit/translator.h
hphp/runtime/vm/jit/vasm-internal.cpp