swift
ba424ccf - [AddressLowering] Omit dealloc_stack in dead ends.

Commit
2 years ago
[AddressLowering] Omit dealloc_stack in dead ends. It is valid for owned values not to be destroyed on paths terminating in unreachable. Similarly, it is valid for storage not to be deallocated on paths terminating in unreachable. However, it is _not_ valid for storage to be deallocated before being deinitialized, even in paths terminating in unreachable. Consequently, when AddressLowering, dealloc_stacks must not be created in dead-end blocks: because the input OSSA may not destroy an owned value, the output may not deinitialize owned storage; so a dealloc_stack in an unreachable block could dealloc storage which was not deinitialized.
Author
Committer
Parents
  • lib/SILOptimizer/Mandatory
    • File
      AddressLowering.cpp
  • test/SILOptimizer
    • address_lowering.sil