Skip to content

Commit 2c4f0e7

Browse files
[mlir] Replace SmallSet with SmallPtrSet (NFC) (#154265)
This patch replaces SmallSet<T *, N> with SmallPtrSet<T *, N>. Note that SmallSet.h "redirects" SmallSet to SmallPtrSet for pointer element types: template <typename PointeeType, unsigned N> class SmallSet<PointeeType*, N> : public SmallPtrSet<PointeeType*, N> {}; We only have 30 instances that rely on this "redirection". Since the redirection doesn't improve readability, this patch replaces SmallSet with SmallPtrSet for pointer element types. I'm planning to remove the redirection eventually.
1 parent 136b541 commit 2c4f0e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/lib/Dialect/Async/Transforms/AsyncRuntimeRefCounting.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ LogicalResult AsyncRuntimeRefCountingPass::addDropRefAfterLastUse(Value value) {
248248
Region *definingRegion = value.getParentRegion();
249249

250250
// Last users of the `value` inside all blocks where the value dies.
251-
llvm::SmallSet<Operation *, 4> lastUsers;
251+
llvm::SmallPtrSet<Operation *, 4> lastUsers;
252252

253253
// Find blocks in the `definingRegion` that have users of the `value` (if
254254
// there are multiple users in the block, which one will be selected is

0 commit comments

Comments
 (0)