Support mark_dependence_addr in SIL passes.

This commit is contained in:
Andrew Trick
2025-03-24 09:09:20 -07:00
parent e7000e4668
commit d9dd93560d
24 changed files with 361 additions and 158 deletions

View File

@@ -471,7 +471,7 @@ bool COWArrayOpt::checkSafeArrayAddressUses(UserList &AddressUsers) {
continue;
}
if (isa<MarkDependenceInst>(UseInst)) {
if (MarkDependenceInstruction(UseInst)) {
continue;
}
@@ -569,8 +569,9 @@ bool COWArrayOpt::checkSafeArrayValueUses(UserList &ArrayValueUsers) {
continue;
}
if (isa<MarkDependenceInst>(UseInst))
if (MarkDependenceInstruction(UseInst)) {
continue;
}
if (isa<EndBorrowInst>(UseInst))
continue;
@@ -638,8 +639,9 @@ bool COWArrayOpt::checkSafeArrayElementUse(SILInstruction *UseInst,
//
// The struct_extract, unchecked_ref_cast is handled below in the
// "Transitive SafeArrayElementUse" code.
if (isa<MarkDependenceInst>(UseInst))
if (MarkDependenceInstruction(UseInst)) {
return true;
}
if (isa<EndBorrowInst>(UseInst))
return true;