File tree 2 files changed +10
-24
lines changed
2 files changed +10
-24
lines changed Original file line number Diff line number Diff line change @@ -213,19 +213,10 @@ class FixedTypeInfo : public TypeInfo {
213
213
// / SpareBitVector spareBits;
214
214
// / for (EnumElementDecl *elt : u->getAllElements())
215
215
// / getFragileTypeInfo(elt->getArgumentType())
216
- // / .applyFixedSpareBitsMask(spareBits, 0 );
216
+ // / .applyFixedSpareBitsMask(spareBits);
217
217
// /
218
218
// / and end up with a spare bits mask for the entire enum.
219
219
void applyFixedSpareBitsMask (SpareBitVector &mask) const ;
220
-
221
- // / Applies a fixed spare bits mask to the given BitVector,
222
- // / clearing any bits used by valid representations of the type.
223
- // /
224
- // / If the bitvector is empty or smaller than this type, it is grown and
225
- // / filled with bits direct from the spare bits mask. If the bitvector is
226
- // / larger than this type, the trailing bits are untouched.
227
- static void applyFixedSpareBitsMask (SpareBitVector &mask,
228
- const SpareBitVector &spareBits);
229
220
230
221
void collectMetadataForOutlining (OutliningMetadataCollector &collector,
231
222
SILType T) const override {
Original file line number Diff line number Diff line change @@ -254,26 +254,21 @@ unsigned FixedTypeInfo::getSpareBitExtraInhabitantCount() const {
254
254
unsigned (ValueWitnessFlags::MaxNumExtraInhabitants));
255
255
}
256
256
257
- void FixedTypeInfo::applyFixedSpareBitsMask (SpareBitVector &mask,
258
- const SpareBitVector &spareBits) {
257
+ void FixedTypeInfo::applyFixedSpareBitsMask (SpareBitVector &mask) const {
259
258
// If the mask is no longer than the stored spare bits, we can just
260
259
// apply the stored spare bits.
261
- if (mask.size () <= spareBits .size ()) {
260
+ if (mask.size () <= SpareBits .size ()) {
262
261
// Grow the mask out if necessary; the tail padding is all spare bits.
263
- mask.extendWithSetBits (spareBits.size ());
264
- mask &= spareBits;
262
+ mask.extendWithSetBits (SpareBits.size ());
263
+ mask &= SpareBits;
264
+ return ;
265
+ }
265
266
266
267
// Otherwise, we have to grow out the stored spare bits before we
267
268
// can intersect.
268
- } else {
269
- auto paddedSpareBits = spareBits;
270
- paddedSpareBits.extendWithSetBits (mask.size ());
271
- mask &= paddedSpareBits;
272
- }
273
- }
274
-
275
- void FixedTypeInfo::applyFixedSpareBitsMask (SpareBitVector &mask) const {
276
- return applyFixedSpareBitsMask (mask, SpareBits);
269
+ auto paddedSpareBits = SpareBits;
270
+ paddedSpareBits.extendWithSetBits (mask.size ());
271
+ mask &= paddedSpareBits;
277
272
}
278
273
279
274
APInt
You can’t perform that action at this time.
0 commit comments