mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Revert "Merge pull request #69807 from apple/revert-69450-uninarrayfix"
This reverts commitcabb5e109f, reversing changes made to09688abb02.
This commit is contained in:
@@ -616,6 +616,13 @@ recursivelyCollectInteriorUses(ValueBase *DefInst,
|
||||
AllUsers.insert(User);
|
||||
continue;
|
||||
}
|
||||
if (auto *MDI = dyn_cast<MarkDependenceInst>(User)) {
|
||||
if (!recursivelyCollectInteriorUses(MDI, AddressNode,
|
||||
IsInteriorAddress)) {
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (auto PTAI = dyn_cast<PointerToAddressInst>(User)) {
|
||||
// Only one pointer-to-address is allowed for safety.
|
||||
if (SeenPtrToAddr)
|
||||
@@ -1163,11 +1170,17 @@ bool DeadObjectElimination::processAllocApply(ApplyInst *AI,
|
||||
|
||||
LLVM_DEBUG(llvm::dbgs() << " Success! Eliminating apply allocate(...).\n");
|
||||
|
||||
auto *ARI = dyn_cast<AllocRefInst>(AI->getArgument(0));
|
||||
|
||||
deleter.forceDeleteWithUsers(AI);
|
||||
for (auto *toDelete : instsDeadAfterInitializerRemoved) {
|
||||
deleter.trackIfDead(toDelete);
|
||||
}
|
||||
|
||||
if (ARI) {
|
||||
deleter.forceDeleteWithUsers(ARI);
|
||||
}
|
||||
|
||||
++DeadAllocApplyEliminated;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user