Skip to content

Commit 5ad332f

Browse files
committed
SILOptimizer: remove the unused findApplyFromDevirtualizedResult utility function
1 parent bbe3d4f commit 5ad332f

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

include/swift/SILOptimizer/Utils/InstOptUtils.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,6 @@ getConcreteValueOfExistentialBox(AllocExistentialBoxInst *existentialBox,
260260
SILValue getConcreteValueOfExistentialBoxAddr(SILValue addr,
261261
SILInstruction *ignoreUser);
262262

263-
FullApplySite findApplyFromDevirtualizedResult(SILValue value);
264-
265263
/// Cast a value into the expected, ABI compatible type if necessary.
266264
/// This may happen e.g. when:
267265
/// - a type of the return value is a subclass of the expected return type.

lib/SILOptimizer/Utils/InstOptUtils.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -810,20 +810,6 @@ getConcreteValueOfExistentialBoxAddr(SILValue addr, SILInstruction *ignoreUser)
810810
return getConcreteValueOfExistentialBox(box, singleStackStore);
811811
}
812812

813-
// Devirtualization of functions with covariant return types produces
814-
// a result that is not an apply, but takes an apply as an
815-
// argument. Attempt to dig the apply out from this result.
816-
FullApplySite swift::findApplyFromDevirtualizedResult(SILValue v) {
817-
if (auto Apply = FullApplySite::isa(v))
818-
return Apply;
819-
820-
if (isa<UpcastInst>(v) || isa<EnumInst>(v) || isa<UncheckedRefCastInst>(v))
821-
return findApplyFromDevirtualizedResult(
822-
cast<SingleValueInstruction>(v)->getOperand(0));
823-
824-
return FullApplySite();
825-
}
826-
827813
bool swift::mayBindDynamicSelf(SILFunction *F) {
828814
if (!F->hasDynamicSelfMetadata())
829815
return false;

0 commit comments

Comments
 (0)