Skip to content

Commit b3d9e0a

Browse files
committed
[NFC] MoveOnly: Delete some dead code.
Before adding a new parameter to the function being called.
1 parent ce9d5f5 commit b3d9e0a

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

lib/SILOptimizer/Mandatory/MoveOnlyBorrowToDestructureUtils.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,6 @@ AvailableValues &Implementation::computeAvailableValues(SILBasicBlock *block) {
877877
llvm::dbgs()
878878
<< " Destructuring available values in preds to smallest size for bb"
879879
<< block->getDebugID() << '\n');
880-
auto *fn = block->getFunction();
881880
IntervalMapAllocator::Map typeSpanToValue(getAllocator());
882881
for (auto *predBlock : predsSkippingBackEdges) {
883882
SWIFT_DEFER { typeSpanToValue.clear(); };
@@ -930,20 +929,10 @@ AvailableValues &Implementation::computeAvailableValues(SILBasicBlock *block) {
930929
// smallest offset size could result in further destructuring that an
931930
// earlier value required. Instead, we do a final loop afterwards using
932931
// the interval map to update each available value.
933-
auto iterType = iterValue->getType();
934932
auto loc = getSafeLoc(predBlock->getTerminator());
935933
SILBuilderWithScope builder(predBlock->getTerminator());
936934

937935
while (smallestOffsetSize->first.size < iterOffsetSize.size) {
938-
TypeOffsetSizePair childOffsetSize;
939-
SILType childType;
940-
941-
// We are returned an optional here and should never fail... so use a
942-
// force unwrap.
943-
std::tie(childOffsetSize, childType) =
944-
*iterOffsetSize.walkOneLevelTowardsChild(iterOffsetSize, iterType,
945-
fn);
946-
947936
// Before we destructure ourselves, erase our entire value from the
948937
// map. We do not need to consider the possibility of there being holes
949938
// in our range since we always store values whole to their entire

0 commit comments

Comments
 (0)