Skip to content

Commit cfc2b0d

Browse files
[llvm] Use llvm::SmallVector::pop_back_val (NFC) (#136533)
1 parent 08b0c25 commit cfc2b0d

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,8 +1151,7 @@ ComplexDeinterleavingGraph::identifyReassocNodes(Instruction *Real,
11511151
SmallVector<PointerIntPair<Value *, 1, bool>> Worklist = {{Insn, true}};
11521152
SmallPtrSet<Value *, 8> Visited;
11531153
while (!Worklist.empty()) {
1154-
auto [V, IsPositive] = Worklist.back();
1155-
Worklist.pop_back();
1154+
auto [V, IsPositive] = Worklist.pop_back_val();
11561155
if (!Visited.insert(V).second)
11571156
continue;
11581157

llvm/lib/CodeGen/SplitKit.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,8 +1519,7 @@ void SplitEditor::forceRecomputeVNI(const VNInfo &ParentVNI) {
15191519
const LiveInterval &ParentLI = Edit->getParent();
15201520
const SlotIndexes &Indexes = *LIS.getSlotIndexes();
15211521
do {
1522-
const VNInfo &VNI = *WorkList.back();
1523-
WorkList.pop_back();
1522+
const VNInfo &VNI = *WorkList.pop_back_val();
15241523
for (unsigned I = 0, E = Edit->size(); I != E; ++I)
15251524
forceRecompute(I, VNI);
15261525
if (!VNI.isPHIDef())

llvm/lib/Support/SuffixTree.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,7 @@ void SuffixTree::setSuffixIndices() {
9595
unsigned CurrNodeLen = 0;
9696
ToVisit.push_back({CurrNode, CurrNodeLen});
9797
while (!ToVisit.empty()) {
98-
std::tie(CurrNode, CurrNodeLen) = ToVisit.back();
99-
ToVisit.pop_back();
98+
std::tie(CurrNode, CurrNodeLen) = ToVisit.pop_back_val();
10099
// Length of the current node from the root down to here.
101100
CurrNode->setConcatLen(CurrNodeLen);
102101
if (auto *InternalNode = dyn_cast<SuffixTreeInternalNode>(CurrNode))

0 commit comments

Comments
 (0)