Skip to content

Fix a comment typo in AccessEnforcementOpts. #23472

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/SILOptimizer/Transforms/AccessEnforcementOpts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,10 @@ class AccessConflictAndMergeAnalysis {
void AccessConflictAndMergeAnalysis::recordInScopeConflicts(
RegionState &state, const AccessedStorage &currStorage,
SILAccessKind currKind) {
// It is tempting to combine loop with the loop in removeConflicts, which also
// checks isDistinctFrom for each element. However, since SetVector does not
// support 'llvm::erase_if', it is actually more efficient to do the removal
// in a separate 'remove_if' loop.
// It is tempting to combine this loop with the loop in removeConflicts, which
// also checks isDistinctFrom for each element. However, since SetVector does
// not support 'llvm::erase_if', it is actually more efficient to do the
// removal in a separate 'remove_if' loop.
llvm::for_each(state.inScopeConflictFreeAccesses, [&](BeginAccessInst *bai) {
auto &accessInfo = result.getAccessInfo(bai);
if (accessKindMayConflict(currKind, bai->getAccessKind())
Expand Down
2 changes: 1 addition & 1 deletion test/SILOptimizer/access_enforcement_opts.sil
Original file line number Diff line number Diff line change
Expand Up @@ -1681,7 +1681,7 @@ bb0:

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