@@ -1221,17 +1221,24 @@ class FieldSensitiveSSAPrunedLiveRange
1221
1221
return inst == defInst.first && defInst.second ->contains (bit);
1222
1222
}
1223
1223
1224
- bool isDef (SILInstruction *inst, SmallBitVector const &bits) const {
1224
+ void isDef (SILInstruction *inst, SmallBitVector const &bits,
1225
+ SmallBitVector &bitsOut) const {
1226
+ assert (bitsOut.none ());
1225
1227
if (inst != defInst.first )
1226
- return false ;
1227
- SmallBitVector defBits (bits.size ());
1228
- defInst.second ->setBits (defBits);
1229
- return (defBits & bits) == bits;
1228
+ return ;
1229
+ defInst.second ->setBits (bitsOut);
1230
+ bitsOut &= bits;
1230
1231
}
1231
1232
1232
- bool isDef (SILInstruction *inst, TypeTreeLeafTypeRange span) const {
1233
- return inst == defInst.first &&
1234
- defInst.second ->setIntersection (span).has_value ();
1233
+ void isDef (SILInstruction *inst, TypeTreeLeafTypeRange span,
1234
+ SmallBitVector &bitsOut) const {
1235
+ assert (bitsOut.none ());
1236
+ if (inst != defInst.first )
1237
+ return ;
1238
+ auto intersection = defInst.second ->setIntersection (span);
1239
+ if (!intersection.has_value ())
1240
+ return ;
1241
+ intersection.value ().setBits (bitsOut);
1235
1242
}
1236
1243
1237
1244
bool isDefBlock (SILBasicBlock *block, unsigned bit) const {
0 commit comments