[Mlir-commits] [mlir] 195f623 - [mlir] Use llvm::erase_value (NFC)

Kazu Hirata llvmlistbot at llvm.org
Thu Oct 19 23:35:17 PDT 2023


Author: Kazu Hirata
Date: 2023-10-19T23:35:11-07:00
New Revision: 195f6236c7e67ba814cb1614917ff111ee1fdd29

URL: https://github.com/llvm/llvm-project/commit/195f6236c7e67ba814cb1614917ff111ee1fdd29
DIFF: https://github.com/llvm/llvm-project/commit/195f6236c7e67ba814cb1614917ff111ee1fdd29.diff

LOG: [mlir] Use llvm::erase_value (NFC)

Added: 
    

Modified: 
    mlir/lib/Dialect/Bufferization/IR/BufferDeallocationOpInterface.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Bufferization/IR/BufferDeallocationOpInterface.cpp b/mlir/lib/Dialect/Bufferization/IR/BufferDeallocationOpInterface.cpp
index 8d21446f1eb777e..36b3c125028f3a5 100644
--- a/mlir/lib/Dialect/Bufferization/IR/BufferDeallocationOpInterface.cpp
+++ b/mlir/lib/Dialect/Bufferization/IR/BufferDeallocationOpInterface.cpp
@@ -120,8 +120,7 @@ void DeallocationState::addMemrefToDeallocate(Value memref, Block *block) {
 }
 
 void DeallocationState::dropMemrefToDeallocate(Value memref, Block *block) {
-  llvm::erase_if(memrefsToDeallocatePerBlock[block],
-                 [&](const auto &mr) { return mr == memref; });
+  llvm::erase_value(memrefsToDeallocatePerBlock[block], memref);
 }
 
 void DeallocationState::getLiveMemrefsIn(Block *block,


        


More information about the Mlir-commits mailing list