Skip to content

Commit 82c941e

Browse files
committed
Delete dead code
1 parent 66189dc commit 82c941e

File tree

3 files changed

+0
-23
lines changed

3 files changed

+0
-23
lines changed

include/swift/SIL/InstructionUtils.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,6 @@ bool mayCheckRefCount(SILInstruction *User);
126126
/// run-time sanitizers.
127127
bool isSanitizerInstrumentation(SILInstruction *Instruction);
128128

129-
/// If V is a convert_function or convert_escape_to_noescape return its operand
130-
/// recursively.
131-
SILValue stripConvertFunctions(SILValue V);
132-
133129
/// Check that this is a partial apply of a reabstraction thunk and return the
134130
/// argument of the partial apply if it is.
135131
SILValue isPartialApplyOfReabstractionThunk(PartialApplyInst *PAI);

lib/SIL/InstructionUtils.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -312,22 +312,6 @@ bool swift::isSanitizerInstrumentation(SILInstruction *Instruction) {
312312
return false;
313313
}
314314

315-
SILValue swift::stripConvertFunctions(SILValue V) {
316-
while (true) {
317-
if (auto CFI = dyn_cast<ConvertFunctionInst>(V)) {
318-
V = CFI->getOperand();
319-
continue;
320-
}
321-
else if (auto *Cvt = dyn_cast<ConvertEscapeToNoEscapeInst>(V)) {
322-
V = Cvt->getOperand();
323-
continue;
324-
}
325-
break;
326-
}
327-
return V;
328-
}
329-
330-
331315
SILValue swift::isPartialApplyOfReabstractionThunk(PartialApplyInst *PAI) {
332316
if (PAI->getNumArguments() != 1)
333317
return SILValue();

lib/SILOptimizer/Mandatory/DiagnoseStaticExclusivity.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -969,9 +969,6 @@ static void checkNoEscapePartialApplyUse(Operand *oper, FollowUse followUses) {
969969
}
970970

971971
// Look through copies, borrows, and conversions.
972-
//
973-
// Note: This handles ConversionInst, which already includes everything in
974-
// swift::stripConvertFunctions.
975972
if (SingleValueInstruction *copy = getSingleValueCopyOrCast(user)) {
976973
// Only follow the copied operand. Other operands are incidental,
977974
// as in the second operand of mark_dependence.

0 commit comments

Comments
 (0)