swift
8e21bfcc - MoveOnlyAddressChecker: Confine analysis to current formal access.

Commit
2 years ago
MoveOnlyAddressChecker: Confine analysis to current formal access. Code can only locally interact with a mutable memory location within a formal access, and is only responsible for maintaining its invariants during that access, so the move-only address checker does not need to, and should not, observe operations that occur outside of the access marked with the `mark_must_check` instruction. And for immutable memory locations, although there are no explicit formal accesses, that's because every access must be read-only, so although individual accesses are not delimited, they are all compatible as far as move-only checking is concerned. So we can back out the changes to SILGen to re-project a memory location from its origin on every access, a change which breaks invariants assumed by other SIL passes.
Author
Committer
Parents
Loading