mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[move-only] Update the non-address move checker part of the optimizer to handle mark_must_check on addresses.
This commit is contained in:
@@ -169,6 +169,17 @@ bool GatherWritesVisitor::visitUse(Operand *op, AccessUseType useTy) {
|
||||
}
|
||||
return true;
|
||||
|
||||
case SILInstructionKind::ExplicitCopyAddrInst:
|
||||
if (cast<ExplicitCopyAddrInst>(user)->getDest() == op->get()) {
|
||||
writeAccumulator.push_back(op);
|
||||
return true;
|
||||
}
|
||||
// This operand is the copy source. Check if it is taken.
|
||||
if (cast<ExplicitCopyAddrInst>(user)->isTakeOfSrc()) {
|
||||
writeAccumulator.push_back(op);
|
||||
}
|
||||
return true;
|
||||
|
||||
case SILInstructionKind::MarkUnresolvedMoveAddrInst:
|
||||
if (cast<MarkUnresolvedMoveAddrInst>(user)->getDest() == op->get()) {
|
||||
writeAccumulator.push_back(op);
|
||||
|
||||
Reference in New Issue
Block a user