@@ -136,7 +136,7 @@ class GCStatepointInst : public CallBase {
136
136
// / Return an end iterator of the arguments to the underlying call
137
137
const_op_iterator actual_arg_end () const {
138
138
auto I = actual_arg_begin () + actual_arg_size ();
139
- assert ((arg_end () - I) >= 0 );
139
+ assert ((arg_end () - I) == 2 );
140
140
return I;
141
141
}
142
142
// / range adapter for actual call arguments
@@ -147,16 +147,12 @@ class GCStatepointInst : public CallBase {
147
147
const_op_iterator gc_transition_args_begin () const {
148
148
if (auto Opt = getOperandBundle (LLVMContext::OB_gc_transition))
149
149
return Opt->Inputs .begin ();
150
- auto I = actual_arg_end () + 1 ;
151
- assert ((arg_end () - I) >= 0 );
152
- return I;
150
+ return arg_end ();
153
151
}
154
152
const_op_iterator gc_transition_args_end () const {
155
153
if (auto Opt = getOperandBundle (LLVMContext::OB_gc_transition))
156
154
return Opt->Inputs .end ();
157
- auto I = gc_transition_args_begin () + getNumDeoptArgs ();
158
- assert ((arg_end () - I) >= 0 );
159
- return I;
155
+ return arg_end ();
160
156
}
161
157
162
158
// / range adapter for GC transition arguments
@@ -167,19 +163,12 @@ class GCStatepointInst : public CallBase {
167
163
const_op_iterator deopt_begin () const {
168
164
if (auto Opt = getOperandBundle (LLVMContext::OB_deopt))
169
165
return Opt->Inputs .begin ();
170
- // The current format has two length prefix bundles between call args and
171
- // start of gc args. This will be removed in the near future.
172
- uint64_t NumTrans = getNumGCTransitionArgs ();
173
- const_op_iterator I = actual_arg_end () + 2 + NumTrans;
174
- assert ((arg_end () - I) >= 0 );
175
- return I;
166
+ return arg_end ();
176
167
}
177
168
const_op_iterator deopt_end () const {
178
169
if (auto Opt = getOperandBundle (LLVMContext::OB_deopt))
179
170
return Opt->Inputs .end ();
180
- auto I = deopt_begin () + getNumDeoptArgs ();
181
- assert ((arg_end () - I) >= 0 );
182
- return I;
171
+ return arg_end ();
183
172
}
184
173
185
174
// / range adapter for vm state arguments
@@ -192,30 +181,16 @@ class GCStatepointInst : public CallBase {
192
181
const_op_iterator gc_args_begin () const {
193
182
if (auto Opt = getOperandBundle (LLVMContext::OB_gc_live))
194
183
return Opt->Inputs .begin ();
195
-
196
- // The current format has two length prefix bundles between call args and
197
- // start of gc args. This will be removed in the near future.
198
- uint64_t NumTrans = getNumGCTransitionArgs ();
199
- uint64_t NumDeopt = getNumDeoptArgs ();
200
- auto I = actual_arg_end () + 2 + NumTrans + NumDeopt;
201
- assert ((arg_end () - I) >= 0 );
202
- return I;
184
+ return arg_end ();
203
185
}
204
186
205
187
// / Return an end iterator for the gc argument range
206
188
const_op_iterator gc_args_end () const {
207
189
if (auto Opt = getOperandBundle (LLVMContext::OB_gc_live))
208
190
return Opt->Inputs .end ();
209
-
210
191
return arg_end ();
211
192
}
212
193
213
- // / Return the operand index at which the gc args begin
214
- unsigned gcArgsStartIdx () const {
215
- assert (!getOperandBundle (LLVMContext::OB_gc_live));
216
- return gc_args_begin () - op_begin ();
217
- }
218
-
219
194
// / range adapter for gc arguments
220
195
iterator_range<const_op_iterator> gc_args () const {
221
196
return make_range (gc_args_begin (), gc_args_end ());
@@ -236,19 +211,6 @@ class GCStatepointInst : public CallBase {
236
211
return GRI;
237
212
return nullptr ;
238
213
}
239
-
240
- private:
241
- int getNumGCTransitionArgs () const {
242
- const Value *NumGCTransitionArgs = *actual_arg_end ();
243
- return cast<ConstantInt>(NumGCTransitionArgs)->getZExtValue ();
244
- }
245
-
246
- int getNumDeoptArgs () const {
247
- uint64_t NumTrans = getNumGCTransitionArgs ();
248
- const_op_iterator trans_end = actual_arg_end () + 1 + NumTrans;
249
- const Value *NumDeoptArgs = *trans_end;
250
- return cast<ConstantInt>(NumDeoptArgs)->getZExtValue ();
251
- }
252
214
};
253
215
254
216
// / Common base class for representing values projected from a statepoint.
0 commit comments