@@ -2221,6 +2221,32 @@ class AllocStackInst final
22212221 DeallocStackInst *getSingleDeallocStack () const ;
22222222};
22232223
2224+ // / AllocPackInst - This represents the allocation of a value pack
2225+ // / in stack memory. The memory is provided uninitialized.
2226+ class AllocPackInst final
2227+ : public NullaryInstructionWithTypeDependentOperandsBase<
2228+ SILInstructionKind::AllocPackInst,
2229+ AllocPackInst,
2230+ AllocationInst> {
2231+ friend TrailingObjects;
2232+ friend SILBuilder;
2233+
2234+ AllocPackInst (SILDebugLocation loc, SILType resultType,
2235+ ArrayRef<SILValue> typeDependentOperands)
2236+ : NullaryInstructionWithTypeDependentOperandsBase(loc,
2237+ typeDependentOperands,
2238+ resultType) {}
2239+
2240+ static AllocPackInst *create (SILDebugLocation loc, SILType packType,
2241+ SILFunction &F);
2242+ public:
2243+ // / Return the allocated pack type. The result type of the instruction
2244+ // / is an address of this type.
2245+ CanSILPackType getPackType () const {
2246+ return getType ().castTo <SILPackType>();
2247+ }
2248+ };
2249+
22242250// / The base class for AllocRefInst and AllocRefDynamicInst.
22252251// /
22262252// / The first NumTailTypes operands are counts for the tail allocated
@@ -8298,6 +8324,16 @@ class DeallocStackInst :
82988324 : UnaryInstructionBase(DebugLoc, operand) {}
82998325};
83008326
8327+ // / DeallocPackInst - Deallocate stack memory allocated by alloc_pack.
8328+ class DeallocPackInst :
8329+ public UnaryInstructionBase<SILInstructionKind::DeallocPackInst,
8330+ DeallocationInst> {
8331+ friend SILBuilder;
8332+
8333+ DeallocPackInst (SILDebugLocation debugLoc, SILValue operand)
8334+ : UnaryInstructionBase(debugLoc, operand) {}
8335+ };
8336+
83018337// / Like DeallocStackInst, but for `alloc_ref [stack]`.
83028338class DeallocStackRefInst
83038339 : public UnaryInstructionBase<SILInstructionKind::DeallocStackRefInst,
0 commit comments