mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[sil] Add tuple_addr_constructor an instruction that can be used to initial a tuple in memory from individual address and object components.
This commit just introduces the instruction. In a subsequent commit, I am going to add support to SILGen to emit this. This ensures that when we assign into a tuple var we initialize it with one instruction instead of doing it in pieces. The problem with doing it in pieces is that when one is emitting diagnostics it looks semantically like SILGen actually is emitting code for initializing in pieces which could be an error.
This commit is contained in:
@@ -1043,6 +1043,7 @@ InlineCost swift::instructionInlineCost(SILInstruction &I) {
|
||||
case SILInstructionKind::CopyBlockWithoutEscapingInst:
|
||||
case SILInstructionKind::CopyAddrInst:
|
||||
case SILInstructionKind::ExplicitCopyAddrInst:
|
||||
case SILInstructionKind::TupleAddrConstructorInst:
|
||||
case SILInstructionKind::MarkUnresolvedMoveAddrInst:
|
||||
case SILInstructionKind::RetainValueInst:
|
||||
case SILInstructionKind::RetainValueAddrInst:
|
||||
|
||||
Reference in New Issue
Block a user