@@ -32,8 +32,6 @@ class generic_gep_type_iterator {
32
32
33
33
ItTy OpIt;
34
34
PointerUnion<StructType *, Type *> CurTy;
35
- enum : uint64_t { Unbounded = -1ull };
36
- uint64_t NumElements = Unbounded;
37
35
38
36
generic_gep_type_iterator () = default ;
39
37
@@ -79,16 +77,11 @@ class generic_gep_type_iterator {
79
77
80
78
generic_gep_type_iterator &operator ++() { // Preincrement
81
79
Type *Ty = getIndexedType ();
82
- if (auto *ATy = dyn_cast<ArrayType>(Ty)) {
80
+ if (auto *ATy = dyn_cast<ArrayType>(Ty))
83
81
CurTy = ATy->getElementType ();
84
- NumElements = ATy->getNumElements ();
85
- } else if (auto *VTy = dyn_cast<VectorType>(Ty)) {
82
+ else if (auto *VTy = dyn_cast<VectorType>(Ty))
86
83
CurTy = VTy->getElementType ();
87
- if (isa<ScalableVectorType>(VTy))
88
- NumElements = Unbounded;
89
- else
90
- NumElements = cast<FixedVectorType>(VTy)->getNumElements ();
91
- } else
84
+ else
92
85
CurTy = dyn_cast<StructType>(Ty);
93
86
++OpIt;
94
87
return *this ;
@@ -123,15 +116,6 @@ class generic_gep_type_iterator {
123
116
StructType *getStructTypeOrNull () const {
124
117
return CurTy.dyn_cast <StructType *>();
125
118
}
126
-
127
- bool isBoundedSequential () const {
128
- return isSequential () && NumElements != Unbounded;
129
- }
130
-
131
- uint64_t getSequentialNumElements () const {
132
- assert (isBoundedSequential ());
133
- return NumElements;
134
- }
135
119
};
136
120
137
121
using gep_type_iterator = generic_gep_type_iterator<>;
0 commit comments