mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[move-only] Add support for explicit_copy_addr in a few places in MemAccessUtils that I missed when introducing the instruction.
I discovered these were missing when using explicit_copy_addr with the move only address checker.
This commit is contained in:
@@ -2108,6 +2108,7 @@ bool GatherUniqueStorageUses::visitUse(Operand *use, AccessUseType useTy) {
|
||||
case SILInstructionKind::InjectEnumAddrInst:
|
||||
return visitor.visitStore(use);
|
||||
|
||||
case SILInstructionKind::ExplicitCopyAddrInst:
|
||||
case SILInstructionKind::CopyAddrInst:
|
||||
if (operIdx == CopyLikeInstruction::Dest) {
|
||||
return visitor.visitStore(use);
|
||||
@@ -2146,6 +2147,10 @@ bool swift::memInstMustInitialize(Operand *memOper) {
|
||||
auto *CAI = cast<CopyAddrInst>(memInst);
|
||||
return CAI->getDest() == address && CAI->isInitializationOfDest();
|
||||
}
|
||||
case SILInstructionKind::ExplicitCopyAddrInst: {
|
||||
auto *CAI = cast<ExplicitCopyAddrInst>(memInst);
|
||||
return CAI->getDest() == address && CAI->isInitializationOfDest();
|
||||
}
|
||||
case SILInstructionKind::MarkUnresolvedMoveAddrInst: {
|
||||
return cast<MarkUnresolvedMoveAddrInst>(memInst)->getDest() == address;
|
||||
}
|
||||
@@ -2594,6 +2599,11 @@ void swift::visitAccessedAddress(SILInstruction *I,
|
||||
visitor(&I->getAllOperands()[CopyAddrInst::Dest]);
|
||||
return;
|
||||
|
||||
case SILInstructionKind::ExplicitCopyAddrInst:
|
||||
visitor(&I->getAllOperands()[ExplicitCopyAddrInst::Src]);
|
||||
visitor(&I->getAllOperands()[ExplicitCopyAddrInst::Dest]);
|
||||
return;
|
||||
|
||||
case SILInstructionKind::MarkUnresolvedMoveAddrInst:
|
||||
visitor(&I->getAllOperands()[MarkUnresolvedMoveAddrInst::Src]);
|
||||
visitor(&I->getAllOperands()[MarkUnresolvedMoveAddrInst::Dest]);
|
||||
|
||||
Reference in New Issue
Block a user