[Mlir-commits] [mlir] ae4f249 - [IR] Verifier: Use a SmallPtrSet for a small set of pointers. NFC

Benjamin Kramer llvmlistbot at llvm.org
Sat Jul 27 04:55:41 PDT 2024


Author: Benjamin Kramer
Date: 2024-07-27T13:55:04+02:00
New Revision: ae4f2495a460d973e471626fb6fdaeec6d5c494e

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

LOG: [IR] Verifier: Use a SmallPtrSet for a small set of pointers. NFC

Added: 
    

Modified: 
    mlir/lib/IR/Verifier.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/IR/Verifier.cpp b/mlir/lib/IR/Verifier.cpp
index a09b47ee981c9..5d81e9b99814e 100644
--- a/mlir/lib/IR/Verifier.cpp
+++ b/mlir/lib/IR/Verifier.cpp
@@ -268,7 +268,7 @@ LogicalResult OperationVerifier::verifyOnExit(Operation &op) {
 /// verifyBlockPostChildren.
 LogicalResult OperationVerifier::verifyOperation(Operation &op) {
   SmallVector<WorkItem> worklist{{&op}};
-  DenseSet<WorkItem> seen;
+  SmallPtrSet<WorkItem, 8> seen;
   while (!worklist.empty()) {
     WorkItem top = worklist.back();
 


        


More information about the Mlir-commits mailing list