Summary: In the previous live analysis, it handled class constructor targets as dead before its calling. For example, ``` // BEFORE live variables {src} A::A(&tgt, &src) // AFTER live variables {tgt, src} ``` It *may* be correct if we says the field values written in `tgt` is dead. However, we cannot says the location of `tgt` is dead. Because of this bug, ``` A x = y; ``` was translated to ``` VARIABLE_DECLARED(x) EXIT_SCOPE(x) // x was dead here A::A(&x, &y) ``` See that `EXIT_SCOPE(x)` is added right after its declaration, since the liveness analysis said `x` was dead there. Reviewed By: ezgicicek Differential Revision: D26048344 fbshipit-source-id: a172994e2master
parent
f185b35292
commit
63545b1e64
Loading…
Reference in new issue