Skip to content

Commit 0e26cdd

Browse files
committed
Remove BorrowingOperand.getImplicitUses.
It is buggy/misleading because of dead-def handling. The current operand may be re-pushed if it is a dead borrow scope.
1 parent c873d84 commit 0e26cdd

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

include/swift/SIL/OwnershipUtils.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -460,12 +460,6 @@ struct BorrowingOperand {
460460
/// Return the borrowing operand's value.
461461
SILValue getScopeIntroducingUserResult();
462462

463-
/// Compute the implicit uses that this borrowing operand "injects" into the
464-
/// set of its operands uses.
465-
///
466-
/// E.x.: end_apply uses.
467-
void getImplicitUses(SmallVectorImpl<Operand *> &foundUses) const;
468-
469463
void print(llvm::raw_ostream &os) const;
470464
SWIFT_DEBUG_DUMP { print(llvm::dbgs()); }
471465

lib/SIL/Utils/OwnershipUtils.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -828,20 +828,6 @@ SILValue BorrowingOperand::getScopeIntroducingUserResult() {
828828
llvm_unreachable("covered switch");
829829
}
830830

831-
void BorrowingOperand::getImplicitUses(
832-
SmallVectorImpl<Operand *> &foundUses) const {
833-
// FIXME: this visitScopeEndingUses should never return false once dead
834-
// borrows are disallowed.
835-
auto handleUse = [&](Operand *endOp) {
836-
foundUses.push_back(endOp);
837-
return true;
838-
};
839-
if (!visitScopeEndingUses(handleUse, handleUse)) {
840-
// Special-case for dead borrows.
841-
foundUses.push_back(op);
842-
}
843-
}
844-
845831
//===----------------------------------------------------------------------===//
846832
// Borrow Introducers
847833
//===----------------------------------------------------------------------===//

0 commit comments

Comments
 (0)