@@ -112,7 +112,7 @@ private func extendAccessScopes(dependence: LifetimeDependence,
112
112
/// caller scope, which is handled separately). A nested 'read' access can never interfere with another access in the
113
113
/// same outer 'read', because it is impossible to nest a 'modify' access within a 'read'. For 'modify' accesses,
114
114
/// however, the inner scope must be extended for correctness. A 'modify' access can interfere with other 'modify'
115
- /// accesss in the same scope. We rely on exclusivity diagnostics to report these interferences. For example:
115
+ /// access in the same scope. We rely on exclusivity diagnostics to report these interferences. For example:
116
116
///
117
117
/// sil @foo : $(@inout C) -> () {
118
118
/// bb0(%0 : $*C):
@@ -133,12 +133,12 @@ private func extendAccessScopes(dependence: LifetimeDependence,
133
133
/// violation, and that subsequent optimizations do not shrink the inner access `%a1`.
134
134
private func extendAccessScope( beginAccess: BeginAccessInst , range: inout InstructionRange ,
135
135
_ context: FunctionPassContext ) -> FunctionArgument ? {
136
- var endAcceses = [ Instruction] ( )
136
+ var endAccesses = [ Instruction] ( )
137
137
// Collect the original end_access instructions and extend the range to to cover them. The resulting access scope must
138
138
// cover the original scope because it may protect other memory operations.
139
139
var requiresExtension = false
140
140
for end in beginAccess. endInstructions {
141
- endAcceses . append ( end)
141
+ endAccesses . append ( end)
142
142
if range. contains ( end) {
143
143
// If any end_access is inside the new range, then all end_accesses must be rewritten.
144
144
requiresExtension = true
@@ -171,7 +171,7 @@ private func extendAccessScope(beginAccess: BeginAccessInst, range: inout Instru
171
171
range. insert ( endAccess)
172
172
}
173
173
// Delete original end_access instructions
174
- for endAccess in endAcceses {
174
+ for endAccess in endAccesses {
175
175
context. erase ( instruction: endAccess)
176
176
}
177
177
// TODO: Add SIL support for lifetime dependence and write unit test for nested access scopes
0 commit comments