swift
820bde8b - [NFC][SILOptimizer] Run MarkNeverWrittenMutableClosureBoxesAsImmutable per closure group

Commit
4 days ago
[NFC][SILOptimizer] Run MarkNeverWrittenMutableClosureBoxesAsImmutable per closure group From an alloc_box, the pass follows the box into the callees of the partial_applys that capture it, and marks the box and the callees' box arguments as inferred immutable. The pass now loops over its SIL closure group instead of the module: only a closure receives a box from some function, and the function_ref that forms the partial_apply links it to the function scope, so the callee must be in that function's closure group. The pass asserts that each callee it follows is in the group. Instead of invalidating every analysis of every function, the pass now invalidates only the functions whose flags it sets, with the Instructions invalidation kind. - mark_weak_var_as_sendable.sil now marks its callees [closure], as SILGen does, and checks the groups the pass runs on.
Author
Committer
Parents
Loading