Commit Graph

6 Commits

Author SHA1 Message Date
Meghana Gupta
7cb3733e29 Rename OwnershipForwardingMixin -> ForwardingInstruction 2023-06-14 10:40:32 -07:00
Meghana Gupta
1dc713e2f7 Add new flags "reborrow" and "escaping" to SILArgument.
"reborrow" flag on the SILArgument avoids transitive walk over the phi operandsi
to determine if it is a reborrow in multiple utilities.
SIL transforms must keep the flag up-to-date by calling SILArgument::setReborrow.
SILVerifier checks to ensure the flag is not invalidated.

Currently "escaping" is not used anywhere.
2023-05-11 12:31:37 -07:00
Meghana Gupta
fa4f3a5642 Update assertion for partial_apply [on_stack] lifetime ends in lifetime completion
Since partial_apply [on_stack] is considered as a BorrowingOperand now,
and BorrowingOperand::visitScopeEndingUses can be called on the its forwarded values
lifetime ends, update the assertion to reflect this.
2023-04-14 16:00:24 -07:00
Meghana Gupta
6cefbb303a Handle partial_apply [on_stack] lifetime ends in the visitor 2023-04-11 13:56:42 -07:00
Meghana Gupta
85a580a96e Fix ossa borrow completion
end_borrow was not considered as a lifetime ending use,
leading to insertion of redundant end_borrows at boundaries.
2023-04-06 11:15:37 -07:00
Andrew Trick
13e1aa4467 Add OwnershipLiveness utilities
Encapsulate all the complexity of reborrows and guaranteed phi in 3
ownership liveness interfaces:

LinerLiveness, InteriorLiveness, and ExtendedLiveness.
2023-02-10 09:39:18 -08:00