@@ -58,21 +58,6 @@ extension ForwardingInstruction {
58
58
}
59
59
}
60
60
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
-
76
61
extension Value {
77
62
// If this value is produced by a ForwardingInstruction, return that instruction. This is convenient for following the forwarded value chain.
78
63
// Unlike definingInstruction, a value's forwardingInstruction is not necessarily a valid insertion point.
@@ -232,6 +217,18 @@ extension TuplePackExtractInst : ForwardingInstruction {
232
217
// -----------------------------------------------------------------------------
233
218
// conversion instructions
234
219
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
+
235
232
extension MarkUnresolvedNonCopyableValueInst : ConversionInstruction {
236
233
public var preservesRepresentation : Bool { true }
237
234
public var canForwardGuaranteedValues : Bool { true }
0 commit comments