Skip to content

Commit e0b4f71

Browse files
committed
SIL: remove the alloc_vector instruction
It's not needed anymore, because the "FixedArray" experimental feature is replaced by inline-arrays.
1 parent 6407f9a commit e0b4f71

31 files changed

+5
-264
lines changed

SwiftCompilerSources/Sources/Optimizer/Utilities/OptUtils.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,6 @@ extension Instruction {
424424
is FloatLiteralInst,
425425
is ObjectInst,
426426
is VectorInst,
427-
is AllocVectorInst,
428427
is UncheckedRefCastInst,
429428
is UpcastInst,
430429
is ValueToBridgeObjectInst,

SwiftCompilerSources/Sources/SIL/Builder.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,6 @@ public struct Builder {
130130
return notifyNew(dr.getAs(AllocStackInst.self))
131131
}
132132

133-
public func createAllocVector(capacity: Value, elementType: Type) -> AllocVectorInst {
134-
let dr = bridged.createAllocVector(capacity.bridged, elementType.bridged)
135-
return notifyNew(dr.getAs(AllocVectorInst.self))
136-
}
137-
138133
@discardableResult
139134
public func createDeallocStack(_ operand: Value) -> DeallocStackInst {
140135
let dr = bridged.createDeallocStack(operand.bridged)

SwiftCompilerSources/Sources/SIL/Instruction.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,10 +1275,6 @@ final public class AllocStackInst : SingleValueInstruction, Allocation, DebugVar
12751275
}
12761276
}
12771277

1278-
final public class AllocVectorInst : SingleValueInstruction, Allocation, UnaryInstruction {
1279-
public var capacity: Value { operand.value }
1280-
}
1281-
12821278
public class AllocRefInstBase : SingleValueInstruction, Allocation {
12831279
final public var isObjC: Bool { bridged.AllocRefInstBase_isObjc() }
12841280

SwiftCompilerSources/Sources/SIL/Registration.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ public func registerSILClasses() {
226226
register(IsUniqueInst.self)
227227
register(DestroyNotEscapedClosureInst.self)
228228
register(AllocStackInst.self)
229-
register(AllocVectorInst.self)
230229
register(AllocPackInst.self)
231230
register(AllocPackMetadataInst.self)
232231
register(AllocRefInst.self)

docs/SIL/Instructions.md

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -55,27 +55,6 @@ type, use `alloc_box`.
5555

5656
`T` must not be a pack type. To allocate a pack, use `alloc_pack`.
5757

58-
### alloc_vector
59-
60-
```
61-
sil-instruction ::= 'alloc_vector' sil-type, sil-operand
62-
63-
%1 = alloc_vector $T, %0 : $Builtin.Word
64-
// %1 has type $*T
65-
```
66-
67-
Allocates uninitialized memory that is sufficiently aligned on the stack
68-
to contain a vector of values of type `T`. The result of the instruction
69-
is the address of the allocated memory. The number of vector elements is
70-
specified by the operand, which must be a builtin integer value.
71-
72-
`alloc_vector` either allocates memory on the stack or - if contained in
73-
a global variable static initializer list - in the data section.
74-
75-
`alloc_vector` is a stack allocation instruction, unless it's contained
76-
in a global initializer list. See the section above on stack discipline.
77-
The corresponding stack deallocation instruction is `dealloc_stack`.
78-
7958
### alloc_pack
8059

8160
```

include/swift/SIL/SILBridgingImpl.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2003,10 +2003,6 @@ BridgedInstruction BridgedBuilder::createAllocStack(BridgedType type,
20032003
swift::UsesMoveableValueDebugInfo_t(wasMoved), /*skipVarDeclAssert=*/ true)};
20042004
}
20052005

2006-
BridgedInstruction BridgedBuilder::createAllocVector(BridgedValue capacity, BridgedType type) const {
2007-
return {unbridged().createAllocVector(regularLoc(), capacity.getSILValue(), type.unbridged())};
2008-
}
2009-
20102006
BridgedInstruction BridgedBuilder::createDeallocStack(BridgedValue operand) const {
20112007
return {unbridged().createDeallocStack(regularLoc(), operand.getSILValue())};
20122008
}

include/swift/SIL/SILBuilder.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -437,16 +437,6 @@ class SILBuilder {
437437
isFromVarDecl, wasMoved));
438438
}
439439

440-
AllocVectorInst *
441-
createAllocVector(SILLocation loc, SILValue capacity, SILType elementType) {
442-
if (isInsertingIntoGlobal()) {
443-
return insert(AllocVectorInst::createInInitializer(
444-
getSILDebugLocation(loc, true), capacity, elementType, getModule()));
445-
}
446-
return insert(AllocVectorInst::create(
447-
getSILDebugLocation(loc, true), capacity, elementType, getFunction()));
448-
}
449-
450440
AllocPackInst *createAllocPack(SILLocation loc, SILType packType) {
451441
return insert(AllocPackInst::create(getSILDebugLocation(loc), packType,
452442
getFunction()));

include/swift/SIL/SILCloner.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,17 +1052,6 @@ SILCloner<ImplClass>::visitAllocStackInst(AllocStackInst *Inst) {
10521052
recordClonedInstruction(Inst, NewInst);
10531053
}
10541054

1055-
template <typename ImplClass>
1056-
void SILCloner<ImplClass>::visitAllocVectorInst(
1057-
AllocVectorInst *Inst) {
1058-
getBuilder().setCurrentDebugScope(getOpScope(Inst->getDebugScope()));
1059-
recordClonedInstruction(Inst, getBuilder().createAllocVector(
1060-
getOpLocation(Inst->getLoc()),
1061-
getOpValue(Inst->getCapacity()),
1062-
getOpType(Inst->getElementType())));
1063-
}
1064-
1065-
10661055
template <typename ImplClass>
10671056
void SILCloner<ImplClass>::visitAllocPackMetadataInst(
10681057
AllocPackMetadataInst *Inst) {

include/swift/SIL/SILInstruction.h

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2213,35 +2213,6 @@ class AllocStackInst final
22132213
DeallocStackInst *getSingleDeallocStack() const;
22142214
};
22152215

2216-
/// AllocVectorInst - Like AllocStackInst, but allocates a vector of elements.
2217-
class AllocVectorInst final
2218-
: public UnaryInstructionWithTypeDependentOperandsBase<
2219-
SILInstructionKind::AllocVectorInst, AllocVectorInst, AllocationInst> {
2220-
friend SILBuilder;
2221-
2222-
AllocVectorInst(SILDebugLocation loc, SILValue capacity, SILType resultType,
2223-
ArrayRef<SILValue> typeDependentOperands)
2224-
: UnaryInstructionWithTypeDependentOperandsBase(loc, capacity,
2225-
typeDependentOperands,
2226-
resultType) {
2227-
}
2228-
2229-
static AllocVectorInst *create(SILDebugLocation Loc, SILValue capacity,
2230-
SILType elementType, SILFunction &F);
2231-
2232-
static AllocVectorInst *createInInitializer(SILDebugLocation Loc,
2233-
SILValue capacity, SILType elementType, SILModule &M);
2234-
2235-
public:
2236-
/// getElementType - Get the type of the allocated memory (as opposed to the
2237-
/// type of the instruction itself, which will be an address type).
2238-
SILType getElementType() const {
2239-
return getType().getObjectType();
2240-
}
2241-
2242-
SILValue getCapacity() const { return getOperand(); }
2243-
};
2244-
22452216
/// AllocPackInst - This represents the allocation of a value pack
22462217
/// in stack memory. The memory is provided uninitialized.
22472218
class AllocPackInst final

include/swift/SIL/SILNodes.def

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,6 @@ ABSTRACT_VALUE_AND_INST(SingleValueInstruction, ValueBase, SILInstruction)
313313
ABSTRACT_SINGLE_VALUE_INST(AllocationInst, SingleValueInstruction)
314314
SINGLE_VALUE_INST(AllocStackInst, alloc_stack,
315315
AllocationInst, None, DoesNotRelease)
316-
SINGLE_VALUE_INST(AllocVectorInst, alloc_vector,
317-
AllocationInst, None, DoesNotRelease)
318316
SINGLE_VALUE_INST(AllocPackInst, alloc_pack,
319317
AllocationInst, None, DoesNotRelease)
320318
SINGLE_VALUE_INST(AllocPackMetadataInst, alloc_pack_metadata,

lib/IRGen/GenDecl.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2833,20 +2833,6 @@ llvm::Constant *IRGenModule::getGlobalInitValue(SILGlobalVariable *var,
28332833
}
28342834
if (SILInstruction *initInst = var->getStaticInitializerValue()) {
28352835

2836-
if (auto *vector = dyn_cast<AllocVectorInst>(initInst)) {
2837-
auto *capacityConst = emitConstantValue(*this, vector->getCapacity()).claimNextConstant();
2838-
uint64_t capacity = cast<llvm::ConstantInt>(capacityConst)->getZExtValue();
2839-
auto &ti = cast<FixedTypeInfo>(getTypeInfo(vector->getType()));
2840-
auto *elementTy = cast<llvm::StructType>(ti.getStorageType());
2841-
Size::int_type paddingBytes = (ti.getFixedStride() - ti.getFixedSize()).getValue();
2842-
if (paddingBytes != 0) {
2843-
llvm::ArrayType *padding = llvm::ArrayType::get(Int8Ty, paddingBytes);
2844-
elementTy = llvm::StructType::get(getLLVMContext(), {elementTy, padding});
2845-
}
2846-
auto *arrayTy = llvm::ArrayType::get(elementTy, capacity);
2847-
return llvm::ConstantAggregateZero::get(arrayTy);
2848-
}
2849-
28502836
if (auto *vector = dyn_cast<VectorInst>(initInst)) {
28512837
llvm::SmallVector<llvm::Constant *, 8> elementValues;
28522838
for (SILValue element : vector->getElements()) {

lib/IRGen/IRGenSIL.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,6 @@ class IRGenSILFunction :
11881188
void emitDebugInfoForAllocStack(AllocStackInst *i, const TypeInfo &type,
11891189
llvm::Value *addr);
11901190
void visitAllocStackInst(AllocStackInst *i);
1191-
void visitAllocVectorInst(AllocVectorInst *i);
11921191
void visitAllocPackInst(AllocPackInst *i);
11931192
void visitAllocPackMetadataInst(AllocPackMetadataInst *i);
11941193
void visitAllocRefInst(AllocRefInst *i);
@@ -6480,15 +6479,6 @@ void IRGenSILFunction::visitAllocStackInst(swift::AllocStackInst *i) {
64806479
emitDebugInfoForAllocStack(i, type, addr.getAddress());
64816480
}
64826481

6483-
void IRGenSILFunction::visitAllocVectorInst(AllocVectorInst *i) {
6484-
const TypeInfo &type = getTypeInfo(i->getElementType());
6485-
Explosion capacity = getLoweredExplosion(i->getCapacity());
6486-
auto stackAddr = type.allocateVector(*this, i->getElementType(),
6487-
capacity.claimNext(), StringRef());
6488-
setLoweredStackAddress(i, stackAddr);
6489-
}
6490-
6491-
64926482
void IRGenSILFunction::visitAllocPackInst(swift::AllocPackInst *i) {
64936483
auto addr = allocatePack(*this, i->getPackType());
64946484
setLoweredStackAddress(i, addr);

lib/SIL/IR/OperandOwnership.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ OPERAND_OWNERSHIP(TrivialUse, AwaitAsyncContinuation)
151151
OPERAND_OWNERSHIP(TrivialUse, AddressToPointer)
152152
OPERAND_OWNERSHIP(TrivialUse, AllocRef) // with tail operand
153153
OPERAND_OWNERSHIP(TrivialUse, AllocRefDynamic) // with tail operand
154-
OPERAND_OWNERSHIP(TrivialUse, AllocVector)
155154
OPERAND_OWNERSHIP(TrivialUse, BeginAccess)
156155
OPERAND_OWNERSHIP(TrivialUse, MoveOnlyWrapperToCopyableAddr)
157156
OPERAND_OWNERSHIP(TrivialUse, CopyableToMoveOnlyWrapperAddr)

lib/SIL/IR/SILInstruction.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1277,7 +1277,6 @@ namespace {
12771277

12781278
bool SILInstruction::isAllocatingStack() const {
12791279
if (isa<AllocStackInst>(this) ||
1280-
isa<AllocVectorInst>(this) ||
12811280
isa<AllocPackInst>(this) ||
12821281
isa<AllocPackMetadataInst>(this))
12831282
return true;

lib/SIL/IR/SILInstructions.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -297,25 +297,6 @@ DeallocStackInst *AllocStackInst::getSingleDeallocStack() const {
297297
return Dealloc;
298298
}
299299

300-
AllocVectorInst *AllocVectorInst::create(SILDebugLocation Loc, SILValue capacity,
301-
SILType elementType, SILFunction &F) {
302-
SmallVector<SILValue, 8> typeDependentOperands;
303-
collectTypeDependentOperands(typeDependentOperands, F, elementType.getASTType());
304-
auto size = totalSizeToAlloc<swift::Operand>(1 + typeDependentOperands.size());
305-
auto buffer = F.getModule().allocateInst(size, alignof(AllocVectorInst));
306-
return ::new (buffer) AllocVectorInst(Loc, capacity, elementType.getAddressType(),
307-
typeDependentOperands);
308-
}
309-
310-
AllocVectorInst *AllocVectorInst::createInInitializer(SILDebugLocation Loc,
311-
SILValue capacity,
312-
SILType elementType,
313-
SILModule &M) {
314-
auto size = totalSizeToAlloc<swift::Operand>(1);
315-
auto buffer = M.allocateInst(size, alignof(AllocVectorInst));
316-
return ::new (buffer) AllocVectorInst(Loc, capacity, elementType, {});
317-
}
318-
319300
AllocPackInst *AllocPackInst::create(SILDebugLocation loc,
320301
SILType packType,
321302
SILFunction &F) {

lib/SIL/IR/SILPrinter.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1515,9 +1515,6 @@ class SILPrinter : public SILInstructionVisitor<SILPrinter> {
15151515
printDebugVar(AVI->getVarInfo(false),
15161516
&AVI->getModule().getASTContext().SourceMgr);
15171517
}
1518-
void visitAllocVectorInst(AllocVectorInst *AVI) {
1519-
*this << AVI->getElementType() << ", " << getIDAndType(AVI->getCapacity());
1520-
}
15211518
void visitAllocPackInst(AllocPackInst *API) {
15221519
*this << API->getType().getObjectType();
15231520
}

lib/SIL/IR/ValueOwnership.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ CONSTANT_OWNERSHIP_INST(Owned, ObjCMetatypeToObject)
105105
// not though.
106106
CONSTANT_OWNERSHIP_INST(None, AddressToPointer)
107107
CONSTANT_OWNERSHIP_INST(None, AllocStack)
108-
CONSTANT_OWNERSHIP_INST(None, AllocVector)
109108
CONSTANT_OWNERSHIP_INST(None, AllocPack)
110109
CONSTANT_OWNERSHIP_INST(None, AllocPackMetadata)
111110
CONSTANT_OWNERSHIP_INST(None, PackLength)

lib/SIL/Parser/ParseSIL.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4988,21 +4988,6 @@ bool SILParser::parseSpecificSILInstruction(SILBuilder &B,
49884988
isFromVarDecl, usesMoveableValueDebugInfo);
49894989
break;
49904990
}
4991-
case SILInstructionKind::AllocVectorInst: {
4992-
SILType Ty;
4993-
if (parseSILType(Ty))
4994-
return true;
4995-
4996-
if (P.parseToken(tok::comma, diag::expected_tok_in_sil_instr, ","))
4997-
return true;
4998-
4999-
SILValue capacity;
5000-
if (parseTypedValueRef(capacity, B))
5001-
return true;
5002-
5003-
ResultVal = B.createAllocVector(InstLoc, capacity, Ty);
5004-
break;
5005-
}
50064991
case SILInstructionKind::MetatypeInst: {
50074992
SILType Ty;
50084993
if (parseSILType(Ty))

lib/SIL/Utils/InstructionUtils.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,6 @@ RuntimeEffect swift::getRuntimeEffect(SILInstruction *inst, SILType &impactType)
782782
return RuntimeEffect::MetaData;
783783

784784
case SILInstructionKind::AllocStackInst:
785-
case SILInstructionKind::AllocVectorInst:
786785
case SILInstructionKind::ProjectBoxInst: {
787786
SILType allocType = cast<SingleValueInstruction>(inst)->getType();
788787
if (allocType.hasArchetype() && !allocType.isLoadable(*inst->getFunction())) {

lib/SIL/Verifier/SILVerifier.cpp

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1801,13 +1801,6 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
18011801
// It's illegal code but the compiler should not crash on it.
18021802
}
18031803

1804-
void checkAllocVectorInst(AllocVectorInst *AI) {
1805-
require(AI->getType().isAddress(),
1806-
"result of alloc_vector must be an address type");
1807-
require(AI->getOperand()->getType().is<BuiltinIntegerType>(),
1808-
"capacity needs integer type");
1809-
}
1810-
18111804
void checkAllocPackInst(AllocPackInst *AI) {
18121805
requireAddressType(SILPackType, AI->getType(),
18131806
"result of alloc_pack must be an address of "
@@ -3804,13 +3797,10 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
38043797
};
38053798
require(isa<SILUndef>(DI->getOperand()) ||
38063799
isa<AllocStackInst>(DI->getOperand()) ||
3807-
isa<AllocVectorInst>(DI->getOperand()) ||
38083800
(isa<PartialApplyInst>(DI->getOperand()) &&
38093801
cast<PartialApplyInst>(DI->getOperand())->isOnStack()) ||
38103802
(isTokenFromCalleeAllocatedBeginApply(DI->getOperand())),
3811-
"Operand of dealloc_stack must be an alloc_stack, alloc_vector or "
3812-
"partial_apply "
3813-
"[stack]");
3803+
"Operand of dealloc_stack must be an alloc_stack or partial_apply [stack]");
38143804
}
38153805
void checkDeallocPackInst(DeallocPackInst *DI) {
38163806
require(isa<SILUndef>(DI->getOperand()) ||

lib/SILOptimizer/Analysis/RegionAnalysis.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2939,7 +2939,6 @@ CONSTANT_TRANSLATION(AllocBoxInst, AssignFresh)
29392939
CONSTANT_TRANSLATION(AllocPackInst, AssignFresh)
29402940
CONSTANT_TRANSLATION(AllocRefDynamicInst, AssignFresh)
29412941
CONSTANT_TRANSLATION(AllocRefInst, AssignFresh)
2942-
CONSTANT_TRANSLATION(AllocVectorInst, AssignFresh)
29432942
CONSTANT_TRANSLATION(KeyPathInst, AssignFresh)
29442943
CONSTANT_TRANSLATION(FunctionRefInst, AssignFresh)
29452944
CONSTANT_TRANSLATION(DynamicFunctionRefInst, AssignFresh)

lib/SILOptimizer/UtilityPasses/SerializeSILPass.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ static bool hasOpaqueArchetype(TypeExpansionContext context,
114114
// Check substitution maps.
115115
switch (inst.getKind()) {
116116
case SILInstructionKind::AllocStackInst:
117-
case SILInstructionKind::AllocVectorInst:
118117
case SILInstructionKind::AllocPackInst:
119118
case SILInstructionKind::AllocPackMetadataInst:
120119
case SILInstructionKind::AllocRefInst:

lib/SILOptimizer/Utils/SILInliner.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,6 @@ InlineCost swift::instructionInlineCost(SILInstruction &I) {
10431043
case SILInstructionKind::AllocRefInst:
10441044
case SILInstructionKind::AllocRefDynamicInst:
10451045
case SILInstructionKind::AllocStackInst:
1046-
case SILInstructionKind::AllocVectorInst:
10471046
case SILInstructionKind::AllocPackInst:
10481047
case SILInstructionKind::AllocPackMetadataInst:
10491048
case SILInstructionKind::BeginApplyInst:

lib/SILOptimizer/Utils/StackNesting.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,10 @@ static SILInstruction *createDealloc(SILInstruction *Alloc,
209209
SILBuilderWithScope B(InsertionPoint);
210210
switch (Alloc->getKind()) {
211211
case SILInstructionKind::PartialApplyInst:
212-
assert(cast<PartialApplyInst>(Alloc)->isOnStack() && "wrong instruction");
213-
LLVM_FALLTHROUGH;
214212
case SILInstructionKind::AllocStackInst:
215-
case SILInstructionKind::AllocVectorInst:
213+
assert((isa<AllocStackInst>(Alloc) ||
214+
cast<PartialApplyInst>(Alloc)->isOnStack()) &&
215+
"wrong instruction");
216216
return B.createDeallocStack(Location,
217217
cast<SingleValueInstruction>(Alloc));
218218
case SILInstructionKind::BeginApplyInst: {

lib/Serialization/DeserializeSIL.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1707,16 +1707,6 @@ bool SILDeserializer::readSILInstruction(SILFunction *Fn,
17071707
Attr == 0 ? OpenedExistentialAccess::Immutable
17081708
: OpenedExistentialAccess::Mutable);
17091709
break;
1710-
case SILInstructionKind::AllocVectorInst:
1711-
assert(RecordKind == SIL_ONE_TYPE_ONE_OPERAND &&
1712-
"Layout should be OneTypeOneOperand.");
1713-
ResultInst = Builder.createAllocVector(
1714-
Loc,
1715-
getLocalValue(
1716-
Builder.maybeGetFunction(), ValID,
1717-
getSILType(MF->getType(TyID2), (SILValueCategory)TyCategory2, Fn)),
1718-
getSILType(MF->getType(TyID), (SILValueCategory)TyCategory, Fn));
1719-
break;
17201710
case SILInstructionKind::DynamicPackIndexInst: {
17211711
assert(RecordKind == SIL_ONE_TYPE_ONE_OPERAND &&
17221712
"Layout should be OneTypeOneOperand.");

lib/Serialization/ModuleFormat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const uint16_t SWIFTMODULE_VERSION_MAJOR = 0;
5858
/// describe what change you made. The content of this comment isn't important;
5959
/// it just ensures a conflict if two people change the module format.
6060
/// Don't worry about adhering to the 80-column limit for this line.
61-
const uint16_t SWIFTMODULE_VERSION_MINOR = 920; // concurrent revert
61+
const uint16_t SWIFTMODULE_VERSION_MINOR = 921; // remove alloc_vector
6262

6363
/// A standard hash seed used for all string hashes in a serialized module.
6464
///

lib/Serialization/SerializeSIL.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1963,13 +1963,6 @@ void SILSerializer::writeSILInstruction(const SILInstruction &SI) {
19631963
open.getOperand());
19641964
break;
19651965
}
1966-
case SILInstructionKind::AllocVectorInst: {
1967-
auto &avi = cast<AllocVectorInst>(SI);
1968-
assert(avi.getNumOperands() - avi.getTypeDependentOperands().size() == 1);
1969-
writeOneTypeOneOperandLayout(avi.getKind(), /*attrs*/ 0, avi.getType(),
1970-
avi.getOperand());
1971-
break;
1972-
}
19731966
case SILInstructionKind::DynamicPackIndexInst: {
19741967
auto &dpii = cast<DynamicPackIndexInst>(SI);
19751968
writeOneTypeOneOperandLayout(dpii.getKind(), 0,

0 commit comments

Comments
 (0)