Take advantage of equivLocals and static locals
commit0c4f345fe9ab0a54de5076661bba086250c41662
authorMark Williams <mwilliams@fb.com>
Fri, 17 Mar 2017 13:24:45 +0000 (17 06:24 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Fri, 17 Mar 2017 13:48:05 +0000 (17 06:48 -0700)
treed53cde018e8241366ae4825a32f5d5f6320dfb14
parentaeaa6041f9d682f0cc6c576492609a9eb80215b2
Take advantage of equivLocals and static locals

Summary:
Dce often cares whether dropping a reference might run a
destructor. If we know that a stack slot has the same contents as a
local, that can't happen. Similarly if two locals have the same
contents, it can't happen. In addition, unsetting a static local won't
have side effects, because the static itself still refers to the ref.

Similarly, assigning a non-ref local to itself is always a no-op.

In addition, I modified the local equivalence tracking to maintain
equivalence sets to get more complete results.

Reviewed By: ricklavoie

Differential Revision: D4716282

fbshipit-source-id: 8cd977c4f5823dd33b9a6fba3e9581a279a40b57
hphp/hhbbc/dce.cpp
hphp/hhbbc/interp-internal.h
hphp/hhbbc/interp-minstr.cpp
hphp/hhbbc/interp-state.cpp
hphp/hhbbc/interp.cpp