Remove the deprecated and unused endAsyncLet builtin.

This commit is contained in:
John McCall
2025-09-12 16:25:53 -04:00
parent 1d95fe14de
commit cd67912a50
10 changed files with 0 additions and 43 deletions

View File

@@ -926,17 +926,6 @@ BUILTIN_MISC_OPERATION(FlowSensitiveSelfIsolation, "flowSensitiveSelfIsolation",
BUILTIN_MISC_OPERATION(FlowSensitiveDistributedSelfIsolation,
"flowSensitiveDistributedSelfIsolation", "", Special)
/// endAsyncLet(): (Builtin.RawPointer) -> Void
///
/// DEPRECATED. The swift_asyncLet_finish intrinsic and endAsyncLetLifetime
/// builtin are used instead.
///
/// Ends and destroys an async-let.
/// The ClosureLifetimeFixup pass adds a second operand to the builtin to
/// ensure that optimizations keep the stack-allocated closure arguments alive
/// until the endAsyncLet.
BUILTIN_MISC_OPERATION_WITH_SILGEN(EndAsyncLet, "endAsyncLet", "", Special)
/// endAsyncLetLifetime(): (Builtin.RawPointer) -> Void
///
/// Marks the end of an async-let's lifetime.

View File

@@ -3382,7 +3382,6 @@ ValueDecl *swift::getBuiltinValueDecl(ASTContext &Context, Identifier Id) {
case BuiltinValueKind::StartAsyncLetWithLocalBuffer:
return getStartAsyncLet(Context, Id);
case BuiltinValueKind::EndAsyncLet:
case BuiltinValueKind::EndAsyncLetLifetime:
return getEndAsyncLet(Context, Id);

View File

@@ -300,14 +300,6 @@ void irgen::emitBuiltinCall(IRGenFunction &IGF, const BuiltinInfo &Builtin,
return;
}
case BuiltinValueKind::EndAsyncLet: {
emitEndAsyncLet(IGF, args.claimNext());
// Ignore a second operand which is inserted by ClosureLifetimeFixup and
// only used for dependency tracking.
(void)args.claimAll();
return;
}
case BuiltinValueKind::EndAsyncLetLifetime: {
IGF.Builder.CreateLifetimeEnd(args.claimNext());
// Ignore a second operand which is inserted by ClosureLifetimeFixup and

View File

@@ -317,15 +317,6 @@ llvm::Value *irgen::emitBuiltinStartAsyncLet(IRGenFunction &IGF,
return alet;
}
void irgen::emitEndAsyncLet(IRGenFunction &IGF, llvm::Value *alet) {
auto *call =
IGF.Builder.CreateCall(IGF.IGM.getEndAsyncLetFunctionPointer(), {alet});
call->setDoesNotThrow();
call->setCallingConv(IGF.IGM.SwiftCC);
IGF.Builder.CreateLifetimeEnd(alet);
}
llvm::Value *irgen::emitCreateTaskGroup(IRGenFunction &IGF,
SubstitutionMap subs,
llvm::Value *groupFlags) {

View File

@@ -78,9 +78,6 @@ llvm::Value *emitBuiltinStartAsyncLet(IRGenFunction &IGF,
llvm::Value *resultBuffer,
SubstitutionMap subs);
/// Emit the endAsyncLet builtin.
void emitEndAsyncLet(IRGenFunction &IGF, llvm::Value *alet);
/// Emit the createTaskGroup builtin.
llvm::Value *emitCreateTaskGroup(IRGenFunction &IGF, SubstitutionMap subs,
llvm::Value *groupFlags);

View File

@@ -941,7 +941,6 @@ BUILTIN_OPERAND_OWNERSHIP(InstantaneousUse, GetEnumTag)
BUILTIN_OPERAND_OWNERSHIP(InstantaneousUse, InjectEnumTag)
BUILTIN_OPERAND_OWNERSHIP(InstantaneousUse, DistributedActorAsAnyActor)
BUILTIN_OPERAND_OWNERSHIP(InstantaneousUse, AddressOfRawLayout)
BUILTIN_OPERAND_OWNERSHIP(InstantaneousUse, EndAsyncLet)
BUILTIN_OPERAND_OWNERSHIP(InstantaneousUse, EndAsyncLetLifetime)
BUILTIN_OPERAND_OWNERSHIP(InstantaneousUse, CreateTaskGroup)
BUILTIN_OPERAND_OWNERSHIP(InstantaneousUse, CreateTaskGroupWithFlags)

View File

@@ -649,7 +649,6 @@ CONSTANT_OWNERSHIP_BUILTIN(None, BuildOrdinarySerialExecutorRef)
CONSTANT_OWNERSHIP_BUILTIN(None, BuildComplexEqualitySerialExecutorRef)
CONSTANT_OWNERSHIP_BUILTIN(None, BuildDefaultActorExecutorRef)
CONSTANT_OWNERSHIP_BUILTIN(None, BuildMainActorExecutorRef)
CONSTANT_OWNERSHIP_BUILTIN(None, EndAsyncLet)
CONSTANT_OWNERSHIP_BUILTIN(None, StartAsyncLetWithLocalBuffer)
CONSTANT_OWNERSHIP_BUILTIN(None, EndAsyncLetLifetime)
CONSTANT_OWNERSHIP_BUILTIN(None, CreateTaskGroup)

View File

@@ -2655,7 +2655,6 @@ static void visitBuiltinAddress(BuiltinInst *builtin,
case BuiltinValueKind::DestroyDefaultActor:
case BuiltinValueKind::GetCurrentExecutor:
case BuiltinValueKind::StartAsyncLetWithLocalBuffer:
case BuiltinValueKind::EndAsyncLet:
case BuiltinValueKind::EndAsyncLetLifetime:
case BuiltinValueKind::CreateTaskGroup:
case BuiltinValueKind::CreateTaskGroupWithFlags:

View File

@@ -1493,13 +1493,6 @@ static ManagedValue emitBuiltinCancelAsyncTask(
return SGF.emitCancelAsyncTask(loc, args[0].borrow(SGF, loc).forward(SGF));
}
// Emit SIL for the named builtin: endAsyncLet.
static ManagedValue emitBuiltinEndAsyncLet(
SILGenFunction &SGF, SILLocation loc, SubstitutionMap subs,
ArrayRef<ManagedValue> args, SGFContext C) {
return SGF.emitCancelAsyncTask(loc, args[0].borrow(SGF, loc).forward(SGF));
}
// Emit SIL for the named builtin: getCurrentExecutor.
static ManagedValue emitBuiltinGetCurrentExecutor(
SILGenFunction &SGF, SILLocation loc, SubstitutionMap subs,

View File

@@ -153,7 +153,6 @@ static bool isBarrier(SILInstruction *inst) {
case BuiltinValueKind::GetCurrentAsyncTask:
case BuiltinValueKind::GetCurrentExecutor:
case BuiltinValueKind::AutoDiffCreateLinearMapContextWithType:
case BuiltinValueKind::EndAsyncLet:
case BuiltinValueKind::EndAsyncLetLifetime:
case BuiltinValueKind::CreateTaskGroup:
case BuiltinValueKind::CreateTaskGroupWithFlags: