swift
693d6013 - [AddressLowering] Shorten stack lifetimes.

Commit
2 years ago
[AddressLowering] Shorten stack lifetimes. During storage allocation, create all alloc_stacks at the front of the function entry block, except those for opened existential types. Do not create any dealloc_stacks, even for opened existential types. Then, after function rewriting, position the alloc_stacks according to uses, except those for opened existential types. This means allocating in the block that's the least common ancestor of all uses. At this point, create dealloc_stacks on the dominance frontier of the alloc_stacks, even for allocations for opened existential types. The behavior for opened existential types diverges from all others in order to maintain SIL validity (as much as possible) while the pass runs. It would be invalid to create the alloc_stacks for opened existential types at the front of the entry block because the type which is opened is not yet available, but that type's opening must dominate the corresponding alloc_stack.
Author
Committer
Parents
Loading