Skip to content

Commit b6f0b35

Browse files
committed
[MoveOnly] Track inst-consumed bits in same SBV.
Previously, whenever an instruction was recorded as a final consume, a new entry was added to finalBlockConsumes. Here, this is changed to add the new bits being consumed by the instruction to the preexisting SmallBitVector, if there is one.
1 parent 4da26c6 commit b6f0b35

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/SILOptimizer/Mandatory/MoveOnlyAddressCheckerUtils.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1382,6 +1382,12 @@ struct ConsumeInfo {
13821382
iter = finalBlockConsumes.insert({block, {}}).first;
13831383
}
13841384
LLVM_DEBUG(llvm::dbgs() << "Recorded Final Consume: " << *inst);
1385+
for (auto &pair : iter->second) {
1386+
if (pair.first == inst) {
1387+
pair.second |= bits;
1388+
return;
1389+
}
1390+
}
13851391
iter->second.emplace_back(inst, bits);
13861392
}
13871393

0 commit comments

Comments
 (0)