@@ -58,21 +58,6 @@ extension ForwardingInstruction {
5858 }
5959}
6060
61- // An instruction that forwards a single value to a single result.
62- //
63- // For legacy reasons, some ForwardingInstructions that fit the
64- // SingleValueInstruction and UnaryInstruction requirements are not
65- // considered ConversionInstructions because certain routines do not
66- // want to see through them (InitExistentialValueInst,
67- // DeinitExistentialValueInst, OpenExistentialValueInst,
68- // OpenExistentialValueInst). This most likely has to do with
69- // type-dependent operands, although any ConversionInstruction should
70- // support type-dependent operands.
71- public protocol ConversionInstruction : SingleValueInstruction ,
72- UnaryInstruction ,
73- ForwardingInstruction
74- { }
75-
7661extension Value {
7762 // If this value is produced by a ForwardingInstruction, return that instruction. This is convenient for following the forwarded value chain.
7863 // Unlike definingInstruction, a value's forwardingInstruction is not necessarily a valid insertion point.
@@ -232,6 +217,18 @@ extension TuplePackExtractInst : ForwardingInstruction {
232217// -----------------------------------------------------------------------------
233218// conversion instructions
234219
220+ /// An instruction that forwards a single value to a single result.
221+ ///
222+ /// For legacy reasons, some ForwardingInstructions that fit the
223+ /// SingleValueInstruction and UnaryInstruction requirements are not
224+ /// considered ConversionInstructions because certain routines do not
225+ /// want to see through them (InitExistentialValueInst,
226+ /// DeinitExistentialValueInst, OpenExistentialValueInst,
227+ /// OpenExistentialValueInst). This most likely has to do with
228+ /// type-dependent operands, although any ConversionInstruction should
229+ /// support type-dependent operands.
230+ public protocol ConversionInstruction : SingleValueInstruction , UnaryInstruction , ForwardingInstruction { }
231+
235232extension MarkUnresolvedNonCopyableValueInst : ConversionInstruction {
236233 public var preservesRepresentation : Bool { true }
237234 public var canForwardGuaranteedValues : Bool { true }
0 commit comments