Skip to content

Commit ba06693

Browse files
authored
Merge pull request #68228 from gottesmm/pr-088dba5d9c0854c0e00da0603eb99b770d99709c
[move-only] Rename mark_must_check -> mark_unresolved_non_copyable_value
2 parents d431e03 + 37d60a0 commit ba06693

File tree

85 files changed

+1106
-974
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+1106
-974
lines changed

SwiftCompilerSources/Sources/Optimizer/Utilities/WalkUtils.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ extension ValueDefUseWalker {
350350
}
351351
case is BeginBorrowInst, is CopyValueInst, is MoveValueInst,
352352
is UpcastInst, is UncheckedRefCastInst, is EndCOWMutationInst,
353-
is RefToBridgeObjectInst, is BridgeObjectToRefInst, is MarkMustCheckInst:
353+
is RefToBridgeObjectInst, is BridgeObjectToRefInst, is MarkUnresolvedNonCopyableValueInst:
354354
return walkDownUses(ofValue: (instruction as! SingleValueInstruction), path: path)
355355
case let mdi as MarkDependenceInst:
356356
if operand.index == 0 {
@@ -492,7 +492,7 @@ extension AddressDefUseWalker {
492492
return walkDownUses(ofAddress: ia, path: subPath.push(.anyIndexedElement, index: 0))
493493
}
494494
return walkDownUses(ofAddress: ia, path: path)
495-
case let mmc as MarkMustCheckInst:
495+
case let mmc as MarkUnresolvedNonCopyableValueInst:
496496
return walkDownUses(ofAddress: mmc, path: path)
497497
case let ba as BeginAccessInst:
498498
// Don't treat `end_access` as leaf-use. Just ignore it.
@@ -656,7 +656,7 @@ extension ValueUseDefWalker {
656656
return walkUp(value: oer.existential, path: path.push(.existential, index: 0))
657657
case is BeginBorrowInst, is CopyValueInst, is MoveValueInst,
658658
is UpcastInst, is UncheckedRefCastInst, is EndCOWMutationInst,
659-
is RefToBridgeObjectInst, is BridgeObjectToRefInst, is MarkMustCheckInst:
659+
is RefToBridgeObjectInst, is BridgeObjectToRefInst, is MarkUnresolvedNonCopyableValueInst:
660660
return walkUp(value: (def as! Instruction).operands[0].value, path: path)
661661
case let arg as BlockArgument:
662662
if arg.isPhiArgument {
@@ -743,7 +743,7 @@ extension AddressUseDefWalker {
743743
path: path.push(.enumCase, index: (def as! EnumInstruction).caseIndex))
744744
case is InitExistentialAddrInst, is OpenExistentialAddrInst:
745745
return walkUp(address: (def as! Instruction).operands[0].value, path: path.push(.existential, index: 0))
746-
case is BeginAccessInst, is MarkMustCheckInst:
746+
case is BeginAccessInst, is MarkUnresolvedNonCopyableValueInst:
747747
return walkUp(address: (def as! Instruction).operands[0].value, path: path)
748748
case let ia as IndexAddrInst:
749749
if let idx = ia.constantSmallIndex {

SwiftCompilerSources/Sources/SIL/Instruction.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ final public class IsUniqueInst : SingleValueInstruction, UnaryInstruction {}
816816
final public class IsEscapingClosureInst : SingleValueInstruction, UnaryInstruction {}
817817

818818
final public
819-
class MarkMustCheckInst : SingleValueInstruction, UnaryInstruction {}
819+
class MarkUnresolvedNonCopyableValueInst : SingleValueInstruction, UnaryInstruction {}
820820

821821
final public class ObjectInst : SingleValueInstruction {
822822
public var baseOperands: OperandArray {

SwiftCompilerSources/Sources/SIL/Registration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public func registerSILClasses() {
8080
register(UncheckedRefCastInst.self)
8181
register(UncheckedAddrCastInst.self)
8282
register(UncheckedTrivialBitCastInst.self)
83-
register(MarkMustCheckInst.self)
83+
register(MarkUnresolvedNonCopyableValueInst.self)
8484
register(ObjectInst.self)
8585
register(RawPointerToRefInst.self)
8686
register(AddressToPointerInst.self)

docs/SIL.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2817,7 +2817,7 @@ which codegens to the following SIL::
28172817
bb0(%0 : @noImplicitCopy $Klass):
28182818
%1 = copyable_to_moveonlywrapper [guaranteed] %0 : $@moveOnly Klass
28192819
%2 = copy_value %1 : $@moveOnly Klass
2820-
%3 = mark_must_check [no_consume_or_assign] %2 : $@moveOnly Klass
2820+
%3 = mark_unresolved_non_copyable_value [no_consume_or_assign] %2 : $@moveOnly Klass
28212821
debug_value %3 : $@moveOnly Klass, let, name "x", argno 1
28222822
%4 = begin_borrow %3 : $@moveOnly Klass
28232823
%5 = function_ref @$s4test5KlassC11doSomethingyyF : $@convention(method) (@guaranteed Klass) -> ()
@@ -2887,7 +2887,7 @@ Today this codegens to the following Swift::
28872887
bb0(%0 : @noImplicitCopy $Int):
28882888
%1 = copyable_to_moveonlywrapper [owned] %0 : $Int
28892889
%2 = move_value [lexical] %1 : $@moveOnly Int
2890-
%3 = mark_must_check [consumable_and_assignable] %2 : $@moveOnly Int
2890+
%3 = mark_unresolved_non_copyable_value [consumable_and_assignable] %2 : $@moveOnly Int
28912891
%5 = begin_borrow %3 : $@moveOnly Int
28922892
%6 = begin_borrow %3 : $@moveOnly Int
28932893
%7 = function_ref @addIntegers : $@convention(method) (Int, Int Int.Type) -> Int
@@ -2946,7 +2946,7 @@ A hypothetical SILGen for this code is as follows::
29462946
%3 = begin_borrow [lexical] %0 : $Klass
29472947
%4 = copy_value %3 : $Klass
29482948
%5 = copyable_to_moveonlywrapper [owned] %4 : $Klass
2949-
%6 = mark_must_check [consumable_and_assignable] %5 : $@moveOnly Klass
2949+
%6 = mark_unresolved_non_copyable_value [consumable_and_assignable] %5 : $@moveOnly Klass
29502950
debug_value %6 : $@moveOnly Klass, let, name "value"
29512951
%8 = begin_borrow %6 : $@moveOnly Klass
29522952
%9 = copy_value %8 : $@moveOnly Klass
@@ -8484,19 +8484,19 @@ The remaining components identify the SIL differentiability witness:
84848484
Optimizer Dataflow Marker Instructions
84858485
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
84868486

8487-
mark_must_check
8487+
mark_unresolved_non_copyable_value
84888488
```````````````
84898489
::
84908490

8491-
sil-instruction ::= 'mark_must_check'
8491+
sil-instruction ::= 'mark_unresolved_non_copyable_value'
84928492
'[' sil-optimizer-analysis-marker ']'
84938493

84948494
sil-optimizer-analysis-marker ::= 'consumable_and_assignable'
84958495
::= 'no_consume_or_assign'
84968496

84978497
A canary value inserted by a SIL generating frontend to signal to the move
84988498
checker to check a specific value. Valid only in Raw SIL. The relevant checkers
8499-
should remove the `mark_must_check`_ instruction after successfully running the
8499+
should remove the `mark_unresolved_non_copyable_value`_ instruction after successfully running the
85008500
relevant diagnostic. The idea here is that instead of needing to introduce
85018501
multiple "flagging" instructions for the optimizer, we can just reuse this one
85028502
instruction by varying the kind.

include/swift/AST/DiagnosticsParse.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ ERROR(sil_movevalue_invalid_optional_attribute,none,
680680
ERROR(sil_markmustcheck_invalid_attribute,none,
681681
"Attribute '[%0]' can not be applied to mark_value_as_moveonly", (StringRef))
682682
ERROR(sil_markmustcheck_requires_attribute,none,
683-
"mark_must_check requires an attribute like 'noImplicitCopy'", ())
683+
"mark_unresolved_non_copyable_value requires an attribute like 'noImplicitCopy'", ())
684684
ERROR(sil_moveonlytocopyable_invalid_attribute,none,
685685
"Attribute '[%0]' can not be applied to moveonlywrapper_to_copyable", (StringRef))
686686
ERROR(sil_moveonlytocopyable_requires_attribute,none,

include/swift/SIL/AddressWalker.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ TransitiveAddressWalker<Impl>::walk(SILValue projectedAddress) && {
217217
isa<InitExistentialAddrInst>(user) || isa<InitEnumDataAddrInst>(user) ||
218218
isa<BeginAccessInst>(user) || isa<TailAddrInst>(user) ||
219219
isa<IndexAddrInst>(user) || isa<StoreBorrowInst>(user) ||
220-
isa<UncheckedAddrCastInst>(user) || isa<MarkMustCheckInst>(user) ||
220+
isa<UncheckedAddrCastInst>(user) ||
221+
isa<MarkUnresolvedNonCopyableValueInst>(user) ||
221222
isa<MarkUninitializedInst>(user) || isa<DropDeinitInst>(user) ||
222223
isa<ProjectBlockStorageInst>(user) || isa<UpcastInst>(user) ||
223224
isa<TuplePackElementAddrInst>(user) ||

include/swift/SIL/MemAccessUtils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1634,7 +1634,7 @@ inline bool isAccessStorageIdentityCast(SingleValueInstruction *svi) {
16341634

16351635
// Simply pass-thru the incoming address.
16361636
case SILInstructionKind::MarkUninitializedInst:
1637-
case SILInstructionKind::MarkMustCheckInst:
1637+
case SILInstructionKind::MarkUnresolvedNonCopyableValueInst:
16381638
case SILInstructionKind::DropDeinitInst:
16391639
case SILInstructionKind::MarkUnresolvedReferenceBindingInst:
16401640
case SILInstructionKind::MarkDependenceInst:

include/swift/SIL/SILBuilder.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,11 +1439,11 @@ class SILBuilder {
14391439
getSILDebugLocation(loc), srcAddr, takeAddr));
14401440
}
14411441

1442-
MarkMustCheckInst *
1443-
createMarkMustCheckInst(SILLocation loc, SILValue src,
1444-
MarkMustCheckInst::CheckKind kind) {
1445-
return insert(new (getModule())
1446-
MarkMustCheckInst(getSILDebugLocation(loc), src, kind));
1442+
MarkUnresolvedNonCopyableValueInst *createMarkUnresolvedNonCopyableValueInst(
1443+
SILLocation loc, SILValue src,
1444+
MarkUnresolvedNonCopyableValueInst::CheckKind kind) {
1445+
return insert(new (getModule()) MarkUnresolvedNonCopyableValueInst(
1446+
getSILDebugLocation(loc), src, kind));
14471447
}
14481448

14491449
MarkUnresolvedReferenceBindingInst *createMarkUnresolvedReferenceBindingInst(

include/swift/SIL/SILCloner.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1949,9 +1949,10 @@ void SILCloner<ImplClass>::visitDropDeinitInst(DropDeinitInst *Inst) {
19491949
}
19501950

19511951
template <typename ImplClass>
1952-
void SILCloner<ImplClass>::visitMarkMustCheckInst(MarkMustCheckInst *Inst) {
1952+
void SILCloner<ImplClass>::visitMarkUnresolvedNonCopyableValueInst(
1953+
MarkUnresolvedNonCopyableValueInst *Inst) {
19531954
getBuilder().setCurrentDebugScope(getOpScope(Inst->getDebugScope()));
1954-
auto *MVI = getBuilder().createMarkMustCheckInst(
1955+
auto *MVI = getBuilder().createMarkUnresolvedNonCopyableValueInst(
19551956
getOpLocation(Inst->getLoc()), getOpValue(Inst->getOperand()),
19561957
Inst->getCheckKind());
19571958
recordClonedInstruction(Inst, MVI);

include/swift/SIL/SILInstruction.h

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8302,9 +8302,10 @@ class MarkUnresolvedMoveAddrInst
83028302
/// diagnostic based semantic checker. Example: no implicit copy. Only legal in
83038303
/// Raw SIL so that we can guarantee canonical SIL has had all SSA based
83048304
/// checking by the checkers that rely upon this instruction.
8305-
class MarkMustCheckInst
8306-
: public UnaryInstructionBase<SILInstructionKind::MarkMustCheckInst,
8307-
OwnershipForwardingSingleValueInstruction> {
8305+
class MarkUnresolvedNonCopyableValueInst
8306+
: public UnaryInstructionBase<
8307+
SILInstructionKind::MarkUnresolvedNonCopyableValueInst,
8308+
OwnershipForwardingSingleValueInstruction> {
83088309
friend class SILBuilder;
83098310

83108311
public:
@@ -8341,13 +8342,14 @@ class MarkMustCheckInst
83418342
private:
83428343
CheckKind kind;
83438344

8344-
MarkMustCheckInst(SILDebugLocation DebugLoc, SILValue operand,
8345-
CheckKind checkKind)
8345+
MarkUnresolvedNonCopyableValueInst(SILDebugLocation DebugLoc,
8346+
SILValue operand, CheckKind checkKind)
83468347
: UnaryInstructionBase(DebugLoc, operand, operand->getType(),
83478348
operand->getOwnershipKind()),
83488349
kind(checkKind) {
83498350
assert(operand->getType().isMoveOnly() &&
8350-
"mark_must_check can only take a move only typed value");
8351+
"mark_unresolved_non_copyable_value can only take a move only typed "
8352+
"value");
83518353
}
83528354

83538355
public:
@@ -10592,7 +10594,7 @@ OwnershipForwardingSingleValueInstruction::classof(SILInstructionKind kind) {
1059210594
case SILInstructionKind::TupleInst:
1059310595
case SILInstructionKind::LinearFunctionInst:
1059410596
case SILInstructionKind::DifferentiableFunctionInst:
10595-
case SILInstructionKind::MarkMustCheckInst:
10597+
case SILInstructionKind::MarkUnresolvedNonCopyableValueInst:
1059610598
case SILInstructionKind::MarkUnresolvedReferenceBindingInst:
1059710599
case SILInstructionKind::ConvertFunctionInst:
1059810600
case SILInstructionKind::UpcastInst:

include/swift/SIL/SILNodes.def

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,9 +479,9 @@ ABSTRACT_VALUE_AND_INST(SingleValueInstruction, ValueBase, SILInstruction)
479479
MayHaveSideEffects, DoesNotRelease)
480480
// A canary value inserted by a SIL generating frontend to signal to the move
481481
// checker to check a specific value. Valid only in Raw SIL. The relevant
482-
// checkers should remove the mark_must_check instruction after successfully
482+
// checkers should remove the mark_unresolved_non_copyable_value instruction after successfully
483483
// running the relevant diagnostic.
484-
SINGLE_VALUE_INST(MarkMustCheckInst, mark_must_check,
484+
SINGLE_VALUE_INST(MarkUnresolvedNonCopyableValueInst, mark_unresolved_non_copyable_value,
485485
SingleValueInstruction, None, DoesNotRelease)
486486
// A canary value inserted by a SIL generating frontend to signal to the
487487
// reference binding transform to check/transform a specific value. Valid

lib/IRGen/IRGenSIL.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1259,7 +1259,8 @@ class IRGenSILFunction :
12591259
void visitDropDeinitInst(DropDeinitInst *i) {
12601260
llvm_unreachable("only valid in ownership SIL");
12611261
}
1262-
void visitMarkMustCheckInst(MarkMustCheckInst *i) {
1262+
void visitMarkUnresolvedNonCopyableValueInst(
1263+
MarkUnresolvedNonCopyableValueInst *i) {
12631264
llvm_unreachable("Invalid in Lowered SIL");
12641265
}
12651266
void visitMarkUnresolvedReferenceBindingInst(

lib/SIL/IR/OperandOwnership.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ FORWARDING_OWNERSHIP(UnconditionalCheckedCast)
367367
FORWARDING_OWNERSHIP(InitExistentialRef)
368368
FORWARDING_OWNERSHIP(DifferentiableFunction)
369369
FORWARDING_OWNERSHIP(LinearFunction)
370-
FORWARDING_OWNERSHIP(MarkMustCheck)
370+
FORWARDING_OWNERSHIP(MarkUnresolvedNonCopyableValue)
371371
FORWARDING_OWNERSHIP(MarkUnresolvedReferenceBinding)
372372
FORWARDING_OWNERSHIP(MoveOnlyWrapperToCopyableValue)
373373
FORWARDING_OWNERSHIP(CopyableToMoveOnlyWrapperValue)

lib/SIL/IR/SILPrinter.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2078,8 +2078,9 @@ class SILPrinter : public SILInstructionVisitor<SILPrinter> {
20782078
*this << getIDAndType(I->getOperand());
20792079
}
20802080

2081-
void visitMarkMustCheckInst(MarkMustCheckInst *I) {
2082-
using CheckKind = MarkMustCheckInst::CheckKind;
2081+
void visitMarkUnresolvedNonCopyableValueInst(
2082+
MarkUnresolvedNonCopyableValueInst *I) {
2083+
using CheckKind = MarkUnresolvedNonCopyableValueInst::CheckKind;
20832084
switch (I->getCheckKind()) {
20842085
case CheckKind::Invalid:
20852086
llvm_unreachable("Invalid?!");

lib/SIL/IR/ValueOwnership.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ FORWARDING_OWNERSHIP_INST(MarkDependence)
287287
FORWARDING_OWNERSHIP_INST(InitExistentialRef)
288288
FORWARDING_OWNERSHIP_INST(DifferentiableFunction)
289289
FORWARDING_OWNERSHIP_INST(LinearFunction)
290-
FORWARDING_OWNERSHIP_INST(MarkMustCheck)
290+
FORWARDING_OWNERSHIP_INST(MarkUnresolvedNonCopyableValue)
291291
FORWARDING_OWNERSHIP_INST(MarkUnresolvedReferenceBinding)
292292
FORWARDING_OWNERSHIP_INST(MoveOnlyWrapperToCopyableValue)
293293
FORWARDING_OWNERSHIP_INST(CopyableToMoveOnlyWrapperValue)

lib/SIL/Parser/ParseSIL.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3838,15 +3838,15 @@ bool SILParser::parseSpecificSILInstruction(SILBuilder &B,
38383838
break;
38393839
}
38403840

3841-
case SILInstructionKind::MarkMustCheckInst: {
3841+
case SILInstructionKind::MarkUnresolvedNonCopyableValueInst: {
38423842
StringRef AttrName;
38433843
if (!parseSILOptional(AttrName, *this)) {
38443844
auto diag = diag::sil_markmustcheck_requires_attribute;
38453845
P.diagnose(InstLoc.getSourceLoc(), diag);
38463846
return true;
38473847
}
38483848

3849-
using CheckKind = MarkMustCheckInst::CheckKind;
3849+
using CheckKind = MarkUnresolvedNonCopyableValueInst::CheckKind;
38503850
CheckKind CKind =
38513851
llvm::StringSwitch<CheckKind>(AttrName)
38523852
.Case("consumable_and_assignable",
@@ -3869,7 +3869,7 @@ bool SILParser::parseSpecificSILInstruction(SILBuilder &B,
38693869
if (parseSILDebugLocation(InstLoc, B))
38703870
return true;
38713871

3872-
auto *MVI = B.createMarkMustCheckInst(InstLoc, Val, CKind);
3872+
auto *MVI = B.createMarkUnresolvedNonCopyableValueInst(InstLoc, Val, CKind);
38733873
ResultVal = MVI;
38743874
break;
38753875
}

lib/SIL/Utils/InstWrappers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ bool ForwardingOperation::hasSameRepresentation() const {
4949
case SILInstructionKind::OpenExistentialBoxValueInst:
5050
case SILInstructionKind::OpenExistentialRefInst:
5151
case SILInstructionKind::OpenExistentialValueInst:
52-
case SILInstructionKind::MarkMustCheckInst:
52+
case SILInstructionKind::MarkUnresolvedNonCopyableValueInst:
5353
case SILInstructionKind::MarkUninitializedInst:
5454
case SILInstructionKind::SelectEnumInst:
5555
case SILInstructionKind::StructExtractInst:

lib/SIL/Utils/InstructionUtils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ RuntimeEffect swift::getRuntimeEffect(SILInstruction *inst, SILType &impactType)
494494
case SILInstructionKind::MarkDependenceInst:
495495
case SILInstructionKind::MoveValueInst:
496496
case SILInstructionKind::DropDeinitInst:
497-
case SILInstructionKind::MarkMustCheckInst:
497+
case SILInstructionKind::MarkUnresolvedNonCopyableValueInst:
498498
case SILInstructionKind::MarkUnresolvedReferenceBindingInst:
499499
case SILInstructionKind::CopyableToMoveOnlyWrapperValueInst:
500500
case SILInstructionKind::MoveOnlyWrapperToCopyableValueInst:

lib/SIL/Utils/MemAccessUtils.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1348,8 +1348,9 @@ class AccessPathVisitor : public FindAccessVisitorImpl<AccessPathVisitor> {
13481348
// project_box is not normally an access projection but we treat it
13491349
// as such when it operates on unchecked_take_enum_data_addr.
13501350
|| isa<ProjectBoxInst>(projectedAddr)
1351-
// Ignore mark_must_check, we just look through it when we see it.
1352-
|| isa<MarkMustCheckInst>(projectedAddr)
1351+
// Ignore mark_unresolved_non_copyable_value, we just look through
1352+
// it when we see it.
1353+
|| isa<MarkUnresolvedNonCopyableValueInst>(projectedAddr)
13531354
// Ignore moveonlywrapper_to_copyable_addr and
13541355
// copyable_to_moveonlywrapper_addr, we just look through it when
13551356
// we see it
@@ -1872,7 +1873,7 @@ AccessPathDefUseTraversal::visitSingleValueUser(SingleValueInstruction *svi,
18721873
}
18731874

18741875
case SILInstructionKind::DropDeinitInst:
1875-
case SILInstructionKind::MarkMustCheckInst: {
1876+
case SILInstructionKind::MarkUnresolvedNonCopyableValueInst: {
18761877
// Mark must check goes on the project_box, so it isn't a ref.
18771878
assert(!dfs.isRef());
18781879
pushUsers(svi, dfs);

lib/SIL/Verifier/SILVerifier.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ struct ImmutableAddressUseVerifier {
681681
case SILInstructionKind::IndexAddrInst:
682682
case SILInstructionKind::TailAddrInst:
683683
case SILInstructionKind::IndexRawPointerInst:
684-
case SILInstructionKind::MarkMustCheckInst:
684+
case SILInstructionKind::MarkUnresolvedNonCopyableValueInst:
685685
case SILInstructionKind::CopyableToMoveOnlyWrapperValueInst:
686686
case SILInstructionKind::PackElementGetInst:
687687
// Add these to our worklist.
@@ -2610,7 +2610,7 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
26102610
"Must store to an address dest");
26112611
// Note: This is the current implementation and the design is not final.
26122612
auto isLegal = [](SILValue value) {
2613-
if (auto *mmci = dyn_cast<MarkMustCheckInst>(value))
2613+
if (auto *mmci = dyn_cast<MarkUnresolvedNonCopyableValueInst>(value))
26142614
value = mmci->getOperand();
26152615
return isa<AllocStackInst>(value);
26162616
};
@@ -6125,7 +6125,8 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
61256125
checkDropDeinitUses(ddi);
61266126
}
61276127

6128-
void checkMarkMustCheckInst(MarkMustCheckInst *i) {
6128+
void checkMarkUnresolvedNonCopyableValueInst(
6129+
MarkUnresolvedNonCopyableValueInst *i) {
61296130
require(i->getModule().getStage() == SILStage::Raw,
61306131
"Only valid in Raw SIL! Should have been eliminated by /some/ "
61316132
"diagnostic pass");

lib/SILGen/SILGenBuilder.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,14 +1082,14 @@ ManagedValue SILGenBuilder::createGuaranteedCopyableToMoveOnlyWrapperValue(
10821082
return ManagedValue::forBorrowedObjectRValue(mdi);
10831083
}
10841084

1085-
ManagedValue
1086-
SILGenBuilder::createMarkMustCheckInst(SILLocation loc, ManagedValue value,
1087-
MarkMustCheckInst::CheckKind kind) {
1085+
ManagedValue SILGenBuilder::createMarkUnresolvedNonCopyableValueInst(
1086+
SILLocation loc, ManagedValue value,
1087+
MarkUnresolvedNonCopyableValueInst::CheckKind kind) {
10881088
assert((value.isPlusOne(SGF) || value.isLValue() ||
10891089
value.getType().isAddress()) &&
10901090
"Argument must be at +1 or be an address!");
10911091
CleanupCloner cloner(*this, value);
1092-
auto *mdi = SILBuilder::createMarkMustCheckInst(
1092+
auto *mdi = SILBuilder::createMarkUnresolvedNonCopyableValueInst(
10931093
loc, value.forward(getSILGenFunction()), kind);
10941094
return cloner.clone(mdi);
10951095
}

lib/SILGen/SILGenBuilder.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -489,9 +489,10 @@ class SILGenBuilder : public SILBuilder {
489489
createGuaranteedCopyableToMoveOnlyWrapperValue(SILLocation loc,
490490
ManagedValue value);
491491

492-
using SILBuilder::createMarkMustCheckInst;
493-
ManagedValue createMarkMustCheckInst(SILLocation loc, ManagedValue value,
494-
MarkMustCheckInst::CheckKind kind);
492+
using SILBuilder::createMarkUnresolvedNonCopyableValueInst;
493+
ManagedValue createMarkUnresolvedNonCopyableValueInst(
494+
SILLocation loc, ManagedValue value,
495+
MarkUnresolvedNonCopyableValueInst::CheckKind kind);
495496

496497
using SILBuilder::emitCopyValueOperation;
497498
ManagedValue emitCopyValueOperation(SILLocation Loc, ManagedValue v);

0 commit comments

Comments
 (0)