Skip to content

Delete dead code #21765

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions include/swift/SIL/InstructionUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,6 @@ bool mayCheckRefCount(SILInstruction *User);
/// run-time sanitizers.
bool isSanitizerInstrumentation(SILInstruction *Instruction);

/// If V is a convert_function or convert_escape_to_noescape return its operand
/// recursively.
SILValue stripConvertFunctions(SILValue V);

/// Check that this is a partial apply of a reabstraction thunk and return the
/// argument of the partial apply if it is.
SILValue isPartialApplyOfReabstractionThunk(PartialApplyInst *PAI);
Expand Down
16 changes: 0 additions & 16 deletions lib/SIL/InstructionUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,22 +312,6 @@ bool swift::isSanitizerInstrumentation(SILInstruction *Instruction) {
return false;
}

SILValue swift::stripConvertFunctions(SILValue V) {
while (true) {
if (auto CFI = dyn_cast<ConvertFunctionInst>(V)) {
V = CFI->getOperand();
continue;
}
else if (auto *Cvt = dyn_cast<ConvertEscapeToNoEscapeInst>(V)) {
V = Cvt->getOperand();
continue;
}
break;
}
return V;
}


SILValue swift::isPartialApplyOfReabstractionThunk(PartialApplyInst *PAI) {
if (PAI->getNumArguments() != 1)
return SILValue();
Expand Down
3 changes: 0 additions & 3 deletions lib/SILOptimizer/Mandatory/DiagnoseStaticExclusivity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -969,9 +969,6 @@ static void checkNoEscapePartialApplyUse(Operand *oper, FollowUse followUses) {
}

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