Commit Graph

12 Commits

Author SHA1 Message Date
Andrew Trick
f713587aa5 Fix OSSA support for mark_dependence [nonescaping]
Handle escapes to function results.
2024-02-12 09:57:14 -08:00
Andrew Trick
17319fa843 Improve the AddressUtils and OwnershipLiveness APIs 2024-01-30 08:38:57 -08:00
Andrew Trick
37171e698a Handle mark_dependence [nonescaping] like a borrowing instruction. 2024-01-22 23:57:03 -08:00
Andrew Trick
d663924eb0 Rewrite OwnershipUtils
For AddressUtils and LifetimeDepenendenceUtils.
2024-01-22 23:55:50 -08:00
Andrew Trick
3bf7e715e7 Add AddressUtils.swift 2024-01-22 23:42:54 -08:00
Andrew Trick
8341b73b8c Update OwnershipLiveness comments for code review. 2024-01-17 09:07:02 -08:00
Andrew Trick
b6b45f0701 Rename AddressUseVisitor to AddressLifetimeDefUseWalker. 2024-01-17 08:37:14 -08:00
Andrew Trick
fa27b4ba02 Reorder code in OwnershipUtils.swift.
To occur in the order that people will likely want to read.
2024-01-17 08:37:14 -08:00
Andrew Trick
c10c545cbe OwnershipUtils review feedback: code formatting. 2024-01-17 08:37:14 -08:00
Andrew Trick
d445754e6f OwnershipUtils review feedback: Comments and examples. 2024-01-17 08:37:14 -08:00
Andrew Trick
9a822b75a1 AddressUseVisitor 2024-01-17 08:37:14 -08:00
Andrew Trick
a9126d4fd0 Add OwnershipLiveness.swift. Core OSSA APIs.
This is what you need to correctly analyze OSSA.

- computeLinearLiveness

- computeInteriorLiveness

- InteriorUseVisitor

- OwnershipUseVisitor

- LivenessBoundary

Along with BorrowUtils.swift, all of our OSSA transformations are
built on top of these fundamentals. With these APIs, we can build
anything OSSA-related in SwiftCompilerSources. These utilities are
immediately needed for borrowed arguments and lifetime dependence. In
the near future, we can also use them to complete OSSA lifetimes and
*correctly* fixup OSSA after transformation without introducing lots
of copies and creating lots of incorrect corner cases.
2024-01-17 08:37:14 -08:00