[SIL] Added on-stack pack metadata marker insts.

The new alloc_pack_metadata and dealloc_pack_metadata are inserted as
part of IRGen lowering.  The former indicates that the next instruction
might result in on-stack pack metadata being emitted.  The latter
indicates that this is the position at which metadata emitted on behalf
of its operand should be cleaned up.
This commit is contained in:
Nate Chandler
2023-05-25 11:57:47 -07:00
parent 050931dbac
commit efca4e57c8
21 changed files with 238 additions and 3 deletions

View File

@@ -230,6 +230,9 @@ static SILInstruction *createDealloc(SILInstruction *Alloc,
SILType::getEmptyTupleType(context),
SubstitutionMap(), {bi});
}
case SILInstructionKind::AllocPackMetadataInst:
return B.createDeallocPackMetadata(Location,
cast<AllocPackMetadataInst>(Alloc));
default:
llvm_unreachable("unknown stack allocation");
}