swift
79bc4cba - [Mem2Reg] Lexical allocs create lexical borrows.

Commit
4 years ago
[Mem2Reg] Lexical allocs create lexical borrows. SILGen turns vars into alloc_boxes. When possible, AllocBoxToStack turns those into alloc_stacks. In order to preserve the lexical lifetime of those vars, the alloc_stacks are annotated with the [lexical] attribute. When Mem2Reg runs, it promotes the loads from and stores into those alloc_stacks to uses of registers. In order to preserve the lexical lifetime during that transformation, lexical borrow scopes must be introduces that encode the same lifetime as the alloc_stacks did. Here, that is done.
Author
Committer
Parents
Loading