Skip to content

Commit cd88ced

Browse files
committed
Slightly reword a comment in AccessEnforcementOpts.
1 parent 28bad2b commit cd88ced

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/SILOptimizer/Transforms/AccessEnforcementOpts.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -423,10 +423,12 @@ BeginAccessInst *AccessConflictAndMergeAnalysis::findMergeableOutOfScopeAccess(
423423
// Given a mergeableAccess, 'A', another out-of-scope access, 'B', and the
424424
// current access, 'C' which has identical storage as 'A', the only situation
425425
// in which it is illegal to merge 'A' with 'C' is when 'B' has non-distinct
426-
// storage from 'A'/'C' and 'B' begins after 'A' and ends before 'C'. This
427-
// would introduce a false conflict. Since it is impossible to determine here
428-
// whether 'A' and 'B' overlap, we assume they do not and avoid merging. The
429-
// case in which they actually do overlap is an unimportant to optimize.
426+
// storage from 'A'/'C', 'B' begins after 'A', and 'B' ends before
427+
// 'C'. Merging 'A' with 'C' would then introduce a false conflict. Since it
428+
// is impossible to determine here whether 'A' and 'B' overlap, we assume they
429+
// do not and simply avoid merging whenever 'B' and 'C' overlap. It is not
430+
// important to optimize the case in which 'A' and 'B' overlap because
431+
// potential conflicts like that are unlikely.
430432
if (llvm::any_of(state.outOfScopeConflictFreeAccesses,
431433
[&](BeginAccessInst *bai) {
432434
auto storageInfo = result.getAccessInfo(bai);

0 commit comments

Comments
 (0)