@@ -529,9 +529,9 @@ struct UseState {
529
529
// / A map from destroy_addr to the part of the type that it destroys.
530
530
llvm::SmallMapVector<SILInstruction *, TypeTreeLeafTypeRange, 4 > destroys;
531
531
532
- // / A map from a liveness requiring use to the part of the type that it
533
- // / requires liveness for.
534
- InstToBitMap livenessUses ;
532
+ // / Maps a non-consuming use to the part of the type that it requires
533
+ // / liveness for.
534
+ InstToBitMap nonconsumingUses ;
535
535
536
536
// / A map from a load [copy] or load [take] that we determined must be
537
537
// / converted to a load_borrow to the part of the type tree that it needs to
@@ -635,11 +635,11 @@ struct UseState {
635
635
}
636
636
637
637
void recordLivenessUse (SILInstruction *inst, SmallBitVector const &bits) {
638
- setAffectedBits (inst, bits, livenessUses );
638
+ setAffectedBits (inst, bits, nonconsumingUses );
639
639
}
640
640
641
641
void recordLivenessUse (SILInstruction *inst, TypeTreeLeafTypeRange range) {
642
- setAffectedBits (inst, range, livenessUses );
642
+ setAffectedBits (inst, range, nonconsumingUses );
643
643
}
644
644
645
645
void recordReinitUse (SILInstruction *inst, SILValue value,
@@ -702,7 +702,7 @@ struct UseState {
702
702
cachedNumSubelements = std::nullopt;
703
703
consumingBlocks.clear ();
704
704
destroys.clear ();
705
- livenessUses .clear ();
705
+ nonconsumingUses .clear ();
706
706
borrows.clear ();
707
707
copyInsts.clear ();
708
708
takeInsts.clear ();
@@ -722,7 +722,7 @@ struct UseState {
722
722
llvm::dbgs () << *pair.first ;
723
723
}
724
724
llvm::dbgs () << " LivenessUses:\n " ;
725
- for (auto pair : livenessUses ) {
725
+ for (auto pair : nonconsumingUses ) {
726
726
llvm::dbgs () << *pair.first ;
727
727
}
728
728
llvm::dbgs () << " Borrows:\n " ;
@@ -826,8 +826,8 @@ struct UseState {
826
826
827
827
bool isLivenessUse (SILInstruction *inst, TypeTreeLeafTypeRange span) const {
828
828
{
829
- auto iter = livenessUses .find (inst);
830
- if (iter != livenessUses .end ()) {
829
+ auto iter = nonconsumingUses .find (inst);
830
+ if (iter != nonconsumingUses .end ()) {
831
831
if (span.intersects (iter->second ))
832
832
return true ;
833
833
}
@@ -1253,7 +1253,7 @@ void UseState::initializeLiveness(
1253
1253
liveness.print (llvm::dbgs ()));
1254
1254
}
1255
1255
1256
- for (auto livenessInstAndValue : livenessUses ) {
1256
+ for (auto livenessInstAndValue : nonconsumingUses ) {
1257
1257
if (auto *lbi = dyn_cast<LoadBorrowInst>(livenessInstAndValue.first )) {
1258
1258
auto accessPathWithBase =
1259
1259
AccessPathWithBase::computeInScope (lbi->getOperand ());
0 commit comments