Postpone mayalias effects of unbalanced decrefs
Summary:
After an unbalanced DecRef, we have to reduce the lower bounds of all
may_alias sets. This means that in a sequence like
IncRef a
DecRef b; // unbalanced
DecRef a;
we typically can't eliminate the IncRef/DecRef of a.
However, if the DecRef of b actually affects a (eg b is an array
containing a, or b actually *is* a), then removing the IncRef/DecRef
pair at worst changes the exact timing of the destructor calls.
When destructors are disabled, the difference should not be observable.
This delays the lower bound reduction (and the observations of the
lower bounds) until the next non-trivial instruction.
Reviewed By: swtaarrs
Differential Revision:
D8450371
fbshipit-source-id:
2c1600bdfc4372fc9167d6df7e21d6b69155b5bd