Skip to content

Commit a4bbb82

Browse files
authored
Merge pull request #10654 from atrick/fix
2 parents 0e3662f + c7cb964 commit a4bbb82

File tree

1 file changed

+8
-18
lines changed

1 file changed

+8
-18
lines changed

lib/SILOptimizer/Analysis/AccessSummaryAnalysis.cpp

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -102,25 +102,14 @@ void AccessSummaryAnalysis::processArgument(FunctionInfo *info,
102102
processFullApply(info, argumentIndex, cast<TryApplyInst>(user), operand,
103103
order);
104104
break;
105-
case ValueKind::CopyAddrInst:
106-
case ValueKind::ExistentialMetatypeInst:
107-
case ValueKind::ValueMetatypeInst:
108-
case ValueKind::LoadInst:
109-
case ValueKind::LoadBorrowInst:
110-
case ValueKind::EndBorrowInst:
111-
case ValueKind::OpenExistentialAddrInst:
112-
case ValueKind::ProjectBlockStorageInst:
113-
// These likely represent scenarios in which we're not generating
105+
default:
106+
// FIXME: These likely represent scenarios in which we're not generating
114107
// begin access markers. Ignore these for now. But we really should
115108
// add SIL verification to ensure all loads and stores have associated
116-
// access markers.
117-
break;
118-
default:
119-
// TODO: These requirements should be checked for in the SIL verifier.
120-
// This is an assertion rather than llvm_unreachable() because
121-
// it is likely the whitelist above for scenarios in which we'ren
122-
// not generating access markers is not comprehensive.
123-
assert(false && "Unrecognized argument use");
109+
// access markers. Once SIL verification is implemented, enable the
110+
// following assert to verify that the whitelist above is comprehensive,
111+
// which guarnatees that exclusivity enforcement is complete.
112+
// assert(false && "Unrecognized argument use");
124113
break;
125114
}
126115
}
@@ -130,7 +119,8 @@ void AccessSummaryAnalysis::processArgument(FunctionInfo *info,
130119
/// Sanity check to make sure that a noescape partial apply is
131120
/// only ultimately used by an apply, a try_apply or as an argument (but not
132121
/// the called function) in a partial_apply.
133-
/// TODO: This really should be checked in the SILVerifier.
122+
///
123+
/// FIXME: This needs to be checked in the SILVerifier.
134124
static bool hasExpectedUsesOfNoEscapePartialApply(Operand *partialApplyUse) {
135125
SILInstruction *user = partialApplyUse->getUser();
136126

0 commit comments

Comments
 (0)