Skip to content

Commit 1fe65b0

Browse files
committed
[NFC] Deleted two unused functions.
1 parent 4edddf2 commit 1fe65b0

File tree

2 files changed

+0
-30
lines changed

2 files changed

+0
-30
lines changed

include/swift/SILOptimizer/Utils/OwnershipOptUtils.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,6 @@ void extendLocalBorrow(BeginBorrowInst *beginBorrow,
7979
/// newly created phis do not yet have a borrow scope.
8080
bool createBorrowScopeForPhiOperands(SILPhiArgument *newPhi);
8181

82-
SILValue
83-
makeGuaranteedValueAvailable(SILValue value, SILInstruction *user,
84-
DeadEndBlocks &deBlocks,
85-
InstModCallbacks callbacks = InstModCallbacks());
86-
8782
/// Compute the liveness boundary for a guaranteed value. Returns true if no
8883
/// uses are pointer escapes. If pointer escapes are present, the liveness
8984
/// boundary is still valid for all known uses.

lib/SILOptimizer/Utils/OwnershipOptUtils.cpp

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -805,10 +805,6 @@ struct OwnershipLifetimeExtender {
805805
/// the BorrowedValue that begins the scope.
806806
SILValue borrowOverSingleUse(SILValue newValue,
807807
Operand *singleGuaranteedUse);
808-
809-
SILValue
810-
borrowOverSingleNonLifetimeEndingUser(SILValue newValue,
811-
SILInstruction *nonLifetimeEndingUser);
812808
};
813809

814810
} // end anonymous namespace
@@ -1092,27 +1088,6 @@ OwnershipLifetimeExtender::borrowOverSingleUse(SILValue newValue,
10921088
return newBeginBorrow;
10931089
}
10941090

1095-
SILValue OwnershipLifetimeExtender::borrowOverSingleNonLifetimeEndingUser(
1096-
SILValue newValue, SILInstruction *nonLifetimeEndingUser) {
1097-
// Avoid borrowing guaranteed function arguments.
1098-
if (isa<SILFunctionArgument>(newValue) &&
1099-
newValue->getOwnershipKind() == OwnershipKind::Guaranteed) {
1100-
return newValue;
1101-
}
1102-
auto borrowPt = newValue->getNextInstruction()->getIterator();
1103-
return borrowCopyOverGuaranteedUsers(
1104-
newValue, borrowPt, ArrayRef<SILInstruction *>(nonLifetimeEndingUser));
1105-
}
1106-
1107-
SILValue swift::makeGuaranteedValueAvailable(SILValue value,
1108-
SILInstruction *user,
1109-
DeadEndBlocks &deBlocks,
1110-
InstModCallbacks callbacks) {
1111-
OwnershipFixupContext ctx{callbacks, deBlocks};
1112-
OwnershipLifetimeExtender extender{ctx};
1113-
return extender.borrowOverSingleNonLifetimeEndingUser(value, user);
1114-
}
1115-
11161091
//===----------------------------------------------------------------------===//
11171092
// OwnershipRAUWUtility - RAUW + fix ownership
11181093
//===----------------------------------------------------------------------===//

0 commit comments

Comments
 (0)