Reorganize final_pass
commit2c45917cb10ce67fe352b54e841e7f1881ab4535
authorMark Williams <mwilliams@fb.com>
Fri, 14 Jun 2019 12:44:22 +0000 (14 05:44 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Fri, 14 Jun 2019 12:48:07 +0000 (14 05:48 -0700)
tree5cb0e25fa7b9195ee89355135d50ea0b0d9b6e0d
parent99e0a2038280095d637a937b49a17f4b5d1f5a28
Reorganize final_pass

Summary:
This restructures final_pass to work unit-at-a-time, and to include
various other passes that were previously done single threaded on the
whole program after final_pass completed.

This might save a bit of time, but the ultimate goal is to merge unit
emission into final pass, so that we never have to keep all of the
final, optimized byte code in memory at one time.

This should be almost a no-op, except that the state_after("optimize")
pass now happens in parallel, on a per-unit basis, so its output (when
enabled) will be interleaved with the TRACE output of the optimize
pass.

Reviewed By: mofarrell

Differential Revision: D15784166

fbshipit-source-id: 4f4ab6acac370600fc6881c77a490ed02feb788e
hphp/hhbbc/debug.h
hphp/hhbbc/index.cpp
hphp/hhbbc/optimize.cpp
hphp/hhbbc/representation.h
hphp/hhbbc/whole-program.cpp