Skip to content

Commit 1f9b074

Browse files
authored
Merge pull request #70481 from gottesmm/more-translation-stuff
[region-isolation] Begin filling out unhandled instructions.
2 parents 33e09f9 + 09151bd commit 1f9b074

File tree

4 files changed

+914
-321
lines changed

4 files changed

+914
-321
lines changed

include/swift/SIL/MemAccessUtils.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1639,6 +1639,8 @@ inline bool isAccessStorageIdentityCast(SingleValueInstruction *svi) {
16391639
case SILInstructionKind::MarkUnresolvedReferenceBindingInst:
16401640
case SILInstructionKind::MarkDependenceInst:
16411641
case SILInstructionKind::CopyValueInst:
1642+
case SILInstructionKind::BeginBorrowInst:
1643+
case SILInstructionKind::MoveOnlyWrapperToCopyableBoxInst:
16421644
return true;
16431645
}
16441646
}

lib/SIL/Utils/MemAccessUtils.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -775,11 +775,11 @@ LLVM_ATTRIBUTE_USED void AccessBase::dump() const { print(llvm::dbgs()); }
775775

776776
bool swift::isIdentityPreservingRefCast(SingleValueInstruction *svi) {
777777
// Ignore both copies and other identity and ownership preserving casts
778-
return isa<CopyValueInst>(svi) || isa<BeginBorrowInst>(svi)
779-
|| isa<EndInitLetRefInst>(svi)
780-
|| isa<BeginDeallocRefInst>(svi)
781-
|| isa<EndCOWMutationInst>(svi)
782-
|| isIdentityAndOwnershipPreservingRefCast(svi);
778+
return isa<CopyValueInst>(svi) || isa<BeginBorrowInst>(svi) ||
779+
isa<EndInitLetRefInst>(svi) || isa<BeginDeallocRefInst>(svi) ||
780+
isa<EndCOWMutationInst>(svi) ||
781+
isa<MarkUnresolvedReferenceBindingInst>(svi) ||
782+
isIdentityAndOwnershipPreservingRefCast(svi);
783783
}
784784

785785
// On some platforms, casting from a metatype to a reference type dynamically

0 commit comments

Comments
 (0)