@@ -1392,7 +1392,6 @@ FirstArgOwnershipForwardingSingleValueInst::classof(SILInstructionKind kind) {
13921392 case SILInstructionKind::ObjectInst:
13931393 case SILInstructionKind::EnumInst:
13941394 case SILInstructionKind::UncheckedEnumDataInst:
1395- case SILInstructionKind::SelectValueInst:
13961395 case SILInstructionKind::OpenExistentialRefInst:
13971396 case SILInstructionKind::InitExistentialRefInst:
13981397 case SILInstructionKind::MarkDependenceInst:
@@ -6659,8 +6658,8 @@ class UncheckedTakeEnumDataAddrInst
66596658 }
66606659};
66616660
6662- // Abstract base class of all select instructions like select_enum,
6663- // select_value, etc. The template parameter represents a type of case values
6661+ // Abstract base class of all select instructions like select_enum.
6662+ // The template parameter represents a type of case values
66646663// to be compared with the operand of a select instruction.
66656664//
66666665// Subclasses must provide tail allocated storage.
@@ -6878,50 +6877,6 @@ class SelectEnumAddrInst final
68786877 ProfileCounter DefaultCount);
68796878};
68806879
6881- // / Select on a value of a builtin integer type.
6882- // /
6883- // / There is 'the' operand, followed by pairs of operands for each case,
6884- // / followed by an optional default operand.
6885- class SelectValueInst final
6886- : public InstructionBaseWithTrailingOperands<
6887- SILInstructionKind::SelectValueInst, SelectValueInst,
6888- SelectInstBase<SelectValueInst, SILValue, SingleValueInstruction>> {
6889- friend SILBuilder;
6890-
6891- SelectValueInst (SILDebugLocation DebugLoc, SILValue Operand, SILType Type,
6892- SILValue DefaultResult,
6893- ArrayRef<SILValue> CaseValuesAndResults);
6894-
6895- static SelectValueInst *
6896- create (SILDebugLocation DebugLoc, SILValue Operand, SILType Type,
6897- SILValue DefaultValue,
6898- ArrayRef<std::pair<SILValue, SILValue>> CaseValues, SILModule &M);
6899-
6900- public:
6901- std::pair<SILValue, SILValue>
6902- getCase (unsigned i) const {
6903- auto cases = getAllOperands ().slice (1 );
6904- return {cases[i*2 ].get (), cases[i*2 +1 ].get ()};
6905- }
6906-
6907- unsigned getNumCases () const {
6908- // Ignore the first non-case operand.
6909- auto count = getAllOperands ().size () - 1 ;
6910- // This implicitly ignore the optional default operand.
6911- return count / 2 ;
6912- }
6913-
6914- bool hasDefault () const {
6915- // If the operand count is even, then we have a default value.
6916- return (getAllOperands ().size () & 1 ) == 0 ;
6917- }
6918-
6919- SILValue getDefaultResult () const {
6920- assert (hasDefault () && " doesn't have a default" );
6921- return getAllOperands ().back ().get ();
6922- }
6923- };
6924-
69256880// / MetatypeInst - Represents the production of an instance of a given metatype
69266881// / named statically.
69276882class MetatypeInst final
0 commit comments