swift
f79def4c - [BarrierAccessScopes] Handle found gen locality.

Commit
340 days ago
[BarrierAccessScopes] Handle found gen locality. As the utility runs, new gens may become local: as access scopes are determined to contain deinit barriers, their `end_access` instructions become kills; if such an `end_access` occurs in the same block above an initially-non-local gen, that gen is now local. Previously, it was asserted that initially-non-local gens would not encounter when visiting the block backwards from that gen. Iteration would also _stop_ at the discovered kill, if any. As described above, the assertion was incorrect. Stopping at the discovered kill was also incorrect. It's necessary to continue walking the block after finding such a new kill because the book-keeping the utility does for which access scopes contain barriers. Concretely, there are two cases: (1) It may contain another `end_access` and above it a deinit barrier which must result in that second scope becoming a deinit barrier. (2) Some of its predecessors may be in the region, all the access scopes which are open at the begin of this block must be unioned into the set of scopes open at each predecessors' end, and more such access scopes may be discovered above the just-visited `end_access`. Here, both the assertion failure and the early bailout are fixed by walking from the indicated initially-non-local gen backwards over the entire block, regardless of whether a kill was encountered. If a kill is encountered, it is asserted that the kill is an `end_access` to account for the case described above. rdar://139840307
Author
Committer
Parents
Loading