diff --git a/mlir/lib/Analysis/Liveness.cpp b/mlir/lib/Analysis/Liveness.cpp index 3e39d974c0e21..3fcc0b5a6ffef 100644 --- a/mlir/lib/Analysis/Liveness.cpp +++ b/mlir/lib/Analysis/Liveness.cpp @@ -198,8 +198,7 @@ Liveness::OperationListT Liveness::resolveLiveness(Value value) const { while (!toProcess.empty()) { // Get block and block liveness information. - Block *block = toProcess.back(); - toProcess.pop_back(); + Block *block = toProcess.pop_back_val(); const LivenessBlockInfo *blockInfo = getLiveness(block); // Note that start and end will be in the same block. diff --git a/mlir/lib/Rewrite/ByteCode.cpp b/mlir/lib/Rewrite/ByteCode.cpp index 26510f976efc9..17cb3a74184f1 100644 --- a/mlir/lib/Rewrite/ByteCode.cpp +++ b/mlir/lib/Rewrite/ByteCode.cpp @@ -1198,8 +1198,7 @@ class ByteCodeExecutor { /// Pops a code iterator from the stack, returning true on success. void popCodeIt() { assert(!resumeCodeIt.empty() && "attempt to pop code off empty stack"); - curCodeIt = resumeCodeIt.back(); - resumeCodeIt.pop_back(); + curCodeIt = resumeCodeIt.pop_back_val(); } /// Return the bytecode iterator at the start of the current op code.