[llvm] Use llvm::SmallVector::pop_back_val (NFC) (#136533)

This commit is contained in:
Kazu Hirata 2025-04-21 08:13:16 -07:00 committed by GitHub
parent 08b0c2517e
commit cfc2b0d094
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 6 deletions

View File

@ -1151,8 +1151,7 @@ ComplexDeinterleavingGraph::identifyReassocNodes(Instruction *Real,
SmallVector<PointerIntPair<Value *, 1, bool>> Worklist = {{Insn, true}};
SmallPtrSet<Value *, 8> Visited;
while (!Worklist.empty()) {
auto [V, IsPositive] = Worklist.back();
Worklist.pop_back();
auto [V, IsPositive] = Worklist.pop_back_val();
if (!Visited.insert(V).second)
continue;

View File

@ -1519,8 +1519,7 @@ void SplitEditor::forceRecomputeVNI(const VNInfo &ParentVNI) {
const LiveInterval &ParentLI = Edit->getParent();
const SlotIndexes &Indexes = *LIS.getSlotIndexes();
do {
const VNInfo &VNI = *WorkList.back();
WorkList.pop_back();
const VNInfo &VNI = *WorkList.pop_back_val();
for (unsigned I = 0, E = Edit->size(); I != E; ++I)
forceRecompute(I, VNI);
if (!VNI.isPHIDef())

View File

@ -95,8 +95,7 @@ void SuffixTree::setSuffixIndices() {
unsigned CurrNodeLen = 0;
ToVisit.push_back({CurrNode, CurrNodeLen});
while (!ToVisit.empty()) {
std::tie(CurrNode, CurrNodeLen) = ToVisit.back();
ToVisit.pop_back();
std::tie(CurrNode, CurrNodeLen) = ToVisit.pop_back_val();
// Length of the current node from the root down to here.
CurrNode->setConcatLen(CurrNodeLen);
if (auto *InternalNode = dyn_cast<SuffixTreeInternalNode>(CurrNode))