Skip to content

Commit 1d95fe1

Browse files
committed
Remove the deprecated and unused startAsyncLet builtin
1 parent b0df998 commit 1d95fe1

File tree

12 files changed

+3
-46
lines changed

12 files changed

+3
-46
lines changed

include/swift/AST/Builtins.def

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -885,17 +885,7 @@ BUILTIN_MISC_OPERATION_WITH_SILGEN(GetCurrentAsyncTask, "getCurrentAsyncTask", "
885885
/// Cancel the given asynchronous task.
886886
BUILTIN_MISC_OPERATION_WITH_SILGEN(CancelAsyncTask, "cancelAsyncTask", "", Special)
887887

888-
/// startAsyncLet()<T>: (
889-
/// __owned @escaping () async throws -> sending T
890-
/// ) -> Builtin.RawPointer
891-
///
892-
/// DEPRECATED. startAsyncLetWithLocalBuffer is used instead.
893-
///
894-
/// Create, initialize and start a new async-let and associated task.
895-
/// Returns an AsyncLet* that must be passed to endAsyncLet for destruction.
896-
BUILTIN_MISC_OPERATION(StartAsyncLet, "startAsyncLet", "", Special)
897-
898-
/// startAsyncLetWithLocalBuffer()<T>: (
888+
/// startAsyncLetWithLocalBuffer: <T> (
899889
/// __owned @escaping () async throws -> sending T,
900890
/// _ resultBuf: Builtin.RawPointer
901891
/// ) -> Builtin.RawPointer

lib/AST/Builtins.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3379,7 +3379,6 @@ ValueDecl *swift::getBuiltinValueDecl(ASTContext &Context, Identifier Id) {
33793379
case BuiltinValueKind::InitializeDistributedRemoteActor:
33803380
return getDistributedActorInitializeRemote(Context, Id);
33813381

3382-
case BuiltinValueKind::StartAsyncLet:
33833382
case BuiltinValueKind::StartAsyncLetWithLocalBuffer:
33843383
return getStartAsyncLet(Context, Id);
33853384

lib/IRGen/GenBuiltin.cpp

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -279,26 +279,6 @@ void irgen::emitBuiltinCall(IRGenFunction &IGF, const BuiltinInfo &Builtin,
279279
return;
280280
}
281281

282-
case BuiltinValueKind::StartAsyncLet: {
283-
auto taskOptions = args.claimNext();
284-
auto taskFunction = args.claimNext();
285-
auto taskContext = args.claimNext();
286-
taskOptions = IGF.Builder.CreateIntToPtr(taskOptions,
287-
IGF.IGM.SwiftTaskOptionRecordPtrTy);
288-
289-
auto asyncLet = emitBuiltinStartAsyncLet(
290-
IGF,
291-
taskOptions,
292-
taskFunction,
293-
taskContext,
294-
nullptr,
295-
substitutions
296-
);
297-
298-
out.add(asyncLet);
299-
return;
300-
}
301-
302282
case BuiltinValueKind::StartAsyncLetWithLocalBuffer: {
303283
auto taskOptions = args.claimNext();
304284
auto taskFunction = args.claimNext();

lib/IRGen/PackMetadataMarkerInserter.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ Inserter::shouldInsertMarkersForInstruction(SILInstruction *inst) {
8888
// SIL. As a result, stack nesting is unable to properly nest async lets
8989
// with on-stack pack metadata. rdar://109850951
9090
if (bi->getBuiltinKind() ==
91-
BuiltinValueKind::StartAsyncLetWithLocalBuffer ||
92-
bi->getBuiltinKind() == BuiltinValueKind::StartAsyncLet)
91+
BuiltinValueKind::StartAsyncLetWithLocalBuffer)
9392
return Inserter::FindResult::Unhandleable;
9493
LLVM_FALLTHROUGH;
9594
}

lib/SIL/IR/OperandOwnership.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,6 @@ BUILTIN_OPERAND_OWNERSHIP(InstantaneousUse, GetEnumTag)
941941
BUILTIN_OPERAND_OWNERSHIP(InstantaneousUse, InjectEnumTag)
942942
BUILTIN_OPERAND_OWNERSHIP(InstantaneousUse, DistributedActorAsAnyActor)
943943
BUILTIN_OPERAND_OWNERSHIP(InstantaneousUse, AddressOfRawLayout)
944-
BUILTIN_OPERAND_OWNERSHIP(DestroyingConsume, StartAsyncLet)
945944
BUILTIN_OPERAND_OWNERSHIP(InstantaneousUse, EndAsyncLet)
946945
BUILTIN_OPERAND_OWNERSHIP(InstantaneousUse, EndAsyncLetLifetime)
947946
BUILTIN_OPERAND_OWNERSHIP(InstantaneousUse, CreateTaskGroup)

lib/SIL/IR/ValueOwnership.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,6 @@ CONSTANT_OWNERSHIP_BUILTIN(None, BuildOrdinarySerialExecutorRef)
649649
CONSTANT_OWNERSHIP_BUILTIN(None, BuildComplexEqualitySerialExecutorRef)
650650
CONSTANT_OWNERSHIP_BUILTIN(None, BuildDefaultActorExecutorRef)
651651
CONSTANT_OWNERSHIP_BUILTIN(None, BuildMainActorExecutorRef)
652-
CONSTANT_OWNERSHIP_BUILTIN(None, StartAsyncLet)
653652
CONSTANT_OWNERSHIP_BUILTIN(None, EndAsyncLet)
654653
CONSTANT_OWNERSHIP_BUILTIN(None, StartAsyncLetWithLocalBuffer)
655654
CONSTANT_OWNERSHIP_BUILTIN(None, EndAsyncLetLifetime)

lib/SIL/Utils/InstructionUtils.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,6 @@ RuntimeEffect swift::getRuntimeEffect(SILInstruction *inst, SILType &impactType)
11241124
case BuiltinValueKind::BuildComplexEqualitySerialExecutorRef:
11251125
case BuiltinValueKind::BuildDefaultActorExecutorRef:
11261126
case BuiltinValueKind::BuildMainActorExecutorRef:
1127-
case BuiltinValueKind::StartAsyncLet:
11281127
case BuiltinValueKind::StartAsyncLetWithLocalBuffer:
11291128
return RuntimeEffect::MetaData;
11301129
default:

lib/SIL/Utils/MemAccessUtils.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2654,7 +2654,6 @@ static void visitBuiltinAddress(BuiltinInst *builtin,
26542654
case BuiltinValueKind::InitializeNonDefaultDistributedActor:
26552655
case BuiltinValueKind::DestroyDefaultActor:
26562656
case BuiltinValueKind::GetCurrentExecutor:
2657-
case BuiltinValueKind::StartAsyncLet:
26582657
case BuiltinValueKind::StartAsyncLetWithLocalBuffer:
26592658
case BuiltinValueKind::EndAsyncLet:
26602659
case BuiltinValueKind::EndAsyncLetLifetime:

lib/SILGen/SILGen.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -385,10 +385,6 @@ static FuncDecl *lookupConcurrencyIntrinsic(ASTContext &C, StringRef name) {
385385
/*default=*/nullptr);
386386
}
387387

388-
FuncDecl *SILGenModule::getAsyncLetStart() {
389-
return lookupConcurrencyIntrinsic(getASTContext(), "_asyncLetStart");
390-
}
391-
392388
FuncDecl *SILGenModule::getAsyncLetGet() {
393389
return lookupConcurrencyIntrinsic(getASTContext(), "_asyncLet_get");
394390
}

lib/SILGen/SILGen.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -523,8 +523,6 @@ class LLVM_LIBRARY_VISIBILITY SILGenModule : public ASTVisitor<SILGenModule> {
523523
/// Retrieve the conformance of NSError to the Error protocol.
524524
ProtocolConformance *getNSErrorConformanceToError();
525525

526-
/// Retrieve the _Concurrency._asyncLetStart intrinsic.
527-
FuncDecl *getAsyncLetStart();
528526
/// Retrieve the _Concurrency._asyncLetGet intrinsic.
529527
FuncDecl *getAsyncLetGet();
530528
/// Retrieve the _Concurrency._asyncLetGetThrowing intrinsic.

0 commit comments

Comments
 (0)