mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Previously, whenever an alloc_box that was promoted to an alloc_stack, the new alloc_stack would be lexical. The result was that alloc_boxes which didn't need (or explicitly didn't want, in the case of eager move vars) received lexical alloc_stacks. Here, only add the lexical flag to the new alloc_stack instruction if any of the box's uses are `begin_borrow [lexical]`. That way, alloc_boxes end up having lexical alloc_stacks only if they were "lexical alloc_boxes".
43 KiB
43 KiB