Skip to content

Commit 1cf188a

Browse files
[mlir] Use llvm::SmallVector::pop_back_val() (NFC) (llvm#136452)
1 parent c2d6c7c commit 1cf188a

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

mlir/lib/Analysis/Liveness.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,7 @@ Liveness::OperationListT Liveness::resolveLiveness(Value value) const {
198198

199199
while (!toProcess.empty()) {
200200
// Get block and block liveness information.
201-
Block *block = toProcess.back();
202-
toProcess.pop_back();
201+
Block *block = toProcess.pop_back_val();
203202
const LivenessBlockInfo *blockInfo = getLiveness(block);
204203

205204
// Note that start and end will be in the same block.

mlir/lib/Rewrite/ByteCode.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,8 +1198,7 @@ class ByteCodeExecutor {
11981198
/// Pops a code iterator from the stack, returning true on success.
11991199
void popCodeIt() {
12001200
assert(!resumeCodeIt.empty() && "attempt to pop code off empty stack");
1201-
curCodeIt = resumeCodeIt.back();
1202-
resumeCodeIt.pop_back();
1201+
curCodeIt = resumeCodeIt.pop_back_val();
12031202
}
12041203

12051204
/// Return the bytecode iterator at the start of the current op code.

0 commit comments

Comments
 (0)