@@ -914,14 +914,33 @@ BUILTIN_OPERAND_OWNERSHIP(InstantaneousUse, EndAsyncLetLifetime)
914914BUILTIN_OPERAND_OWNERSHIP(InstantaneousUse, CreateTaskGroup)
915915BUILTIN_OPERAND_OWNERSHIP(InstantaneousUse, CreateTaskGroupWithFlags)
916916BUILTIN_OPERAND_OWNERSHIP(InstantaneousUse, DestroyTaskGroup)
917- BUILTIN_OPERAND_OWNERSHIP(InstantaneousUse, FlowSensitiveSelfIsolation)
918- BUILTIN_OPERAND_OWNERSHIP(InstantaneousUse, FlowSensitiveDistributedSelfIsolation)
919917
920918BUILTIN_OPERAND_OWNERSHIP(ForwardingConsume, COWBufferForReading)
921919
922920// This should actually never be seen in SIL
923921BUILTIN_OPERAND_OWNERSHIP(GuaranteedForwarding, ExtractFunctionIsolation)
924922
923+ static OperandOwnership
924+ visitAnyFlowSensitiveSelfIsolation(BuiltinInst *bi) {
925+ // In potentially-delegating initializers, the operand will be the
926+ // address of the box instead of the actor instance.
927+ auto operand = bi->getOperand (0 );
928+ if (operand->getType ().isAddress ())
929+ return OperandOwnership::TrivialUse;
930+ return OperandOwnership::InstantaneousUse;
931+ }
932+
933+ OperandOwnership
934+ OperandOwnershipBuiltinClassifier
935+ ::visitFlowSensitiveSelfIsolation (BuiltinInst *bi, StringRef attr) {
936+ return visitAnyFlowSensitiveSelfIsolation (bi);
937+ }
938+ OperandOwnership
939+ OperandOwnershipBuiltinClassifier
940+ ::visitFlowSensitiveDistributedSelfIsolation (BuiltinInst *bi, StringRef attr) {
941+ return visitAnyFlowSensitiveSelfIsolation (bi);
942+ }
943+
925944OperandOwnership
926945OperandOwnershipBuiltinClassifier
927946::visitStartAsyncLetWithLocalBuffer (BuiltinInst *bi, StringRef attr) {
0 commit comments