Skip to content

Commit e1df09b

Browse files
authored
Merge pull request #23472 from atrick/comment-accessopts
2 parents 3be7b4e + 219fbe9 commit e1df09b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/SILOptimizer/Transforms/AccessEnforcementOpts.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -327,10 +327,10 @@ class AccessConflictAndMergeAnalysis {
327327
void AccessConflictAndMergeAnalysis::recordInScopeConflicts(
328328
RegionState &state, const AccessedStorage &currStorage,
329329
SILAccessKind currKind) {
330-
// It is tempting to combine loop with the loop in removeConflicts, which also
331-
// checks isDistinctFrom for each element. However, since SetVector does not
332-
// support 'llvm::erase_if', it is actually more efficient to do the removal
333-
// in a separate 'remove_if' loop.
330+
// It is tempting to combine this loop with the loop in removeConflicts, which
331+
// also checks isDistinctFrom for each element. However, since SetVector does
332+
// not support 'llvm::erase_if', it is actually more efficient to do the
333+
// removal in a separate 'remove_if' loop.
334334
llvm::for_each(state.inScopeConflictFreeAccesses, [&](BeginAccessInst *bai) {
335335
auto &accessInfo = result.getAccessInfo(bai);
336336
if (accessKindMayConflict(currKind, bai->getAccessKind())

test/SILOptimizer/access_enforcement_opts.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1681,7 +1681,7 @@ bb0:
16811681

16821682
// public func testNestedWriteBailout() {
16831683
// Same as testNestedReadBailout but with modify
1684-
// We will create two scopes - nested conflict
1684+
// We will create two scopes - the nested conflict must be preserved.
16851685
//
16861686
// CHECK-LABEL: sil @testNestedWriteBailout : $@convention(thin) () -> () {
16871687
// CHECK: [[GLOBAL:%.*]] = global_addr @globalX : $*X

0 commit comments

Comments
 (0)