julia
46adde9d - Fix incorrect inlining location for early finalization (#49370)

Commit
3 years ago
Fix incorrect inlining location for early finalization (#49370) The early inlining of finalizer inside sroa_pass! had incorrect logic that would sometimes cause it to accidentally inline the finalizer at the beginning of the basic block of the last use, rather than after the final use. This generally happened when the final use is not in basic block that is the postdominator of all previous uses. Because this optimization is relatively conservative with respect to what may happen between the various uses, all our test cases had this property, so we didn't see it. This changed in b33a7635915f838c7e038a815a0de7a7749da616, which introduced an extra basic block in `setproperty!` causing downstream breakage. Fix the logic and add a regression test with this pattern.
Author
Parents
Loading