Parallelize update phase
commitc36b958e18f051c2eefcf3d6f91d69fed8120962
authorMark Williams <mwilliams@fb.com>
Mon, 8 Apr 2019 13:59:53 +0000 (8 06:59 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Mon, 8 Apr 2019 14:03:07 +0000 (8 07:03 -0700)
tree3e928cb0e3c1f5b31a1363ccaf8ae349ffdef77d
parent1b23d0cb3f60021825e02eeffe8810ba881e8c97
Parallelize update phase

Summary:
Currently, the analysis phase runs multithreaded, but then the update
phase runs single threaded. Most of the work in the update phase is
parallelizable (its just updating information about the current
function, or class, and nobody else will be updating that data).

In some cases the data was kept in a hash table of some kind, so we
need some kind of locking when looking up entries, or inserting
entries; but the entries themselves are only ever updated by a single
thread. In some cases I used tbb, and in others I just used a lock.

Reviewed By: ricklavoie, jano

Differential Revision: D14815273

fbshipit-source-id: ae51ec6ff3f2805b72cc0447752b65b1ac7f0622
hphp/hhbbc/index.cpp
hphp/hhbbc/parallel.h
hphp/hhbbc/whole-program.cpp