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