@@ -914,14 +914,33 @@ BUILTIN_OPERAND_OWNERSHIP(InstantaneousUse, EndAsyncLetLifetime)
914
914
BUILTIN_OPERAND_OWNERSHIP(InstantaneousUse, CreateTaskGroup)
915
915
BUILTIN_OPERAND_OWNERSHIP(InstantaneousUse, CreateTaskGroupWithFlags)
916
916
BUILTIN_OPERAND_OWNERSHIP(InstantaneousUse, DestroyTaskGroup)
917
- BUILTIN_OPERAND_OWNERSHIP(InstantaneousUse, FlowSensitiveSelfIsolation)
918
- BUILTIN_OPERAND_OWNERSHIP(InstantaneousUse, FlowSensitiveDistributedSelfIsolation)
919
917
920
918
BUILTIN_OPERAND_OWNERSHIP(ForwardingConsume, COWBufferForReading)
921
919
922
920
// This should actually never be seen in SIL
923
921
BUILTIN_OPERAND_OWNERSHIP(GuaranteedForwarding, ExtractFunctionIsolation)
924
922
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
+
925
944
OperandOwnership
926
945
OperandOwnershipBuiltinClassifier
927
946
::visitStartAsyncLetWithLocalBuffer (BuiltinInst *bi, StringRef attr) {
0 commit comments