[Mlir-commits] [mlir] a1bb750 - [mlir] Use a range constructor of DenseSet (NFC) (#133355)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Mar 27 20:13:33 PDT 2025
Author: Kazu Hirata
Date: 2025-03-27T20:13:30-07:00
New Revision: a1bb7507455ce407ebbb659ddf0d5ae4bb5c3869
URL: https://github.com/llvm/llvm-project/commit/a1bb7507455ce407ebbb659ddf0d5ae4bb5c3869
DIFF: https://github.com/llvm/llvm-project/commit/a1bb7507455ce407ebbb659ddf0d5ae4bb5c3869.diff
LOG: [mlir] Use a range constructor of DenseSet (NFC) (#133355)
Added:
Modified:
mlir/lib/Dialect/Vector/IR/VectorOps.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
index 15e3ce2ff62a2..eccb3e578458e 100644
--- a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
+++ b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
@@ -882,9 +882,8 @@ static LogicalResult verifyOutputShape(
lhsContractingDimSet.insert(dimPair.first);
rhsContractingDimSet.insert(dimPair.second);
}
- DenseSet<int64_t> rhsBatchDimSet;
- for (auto &dimPair : batchDimMap)
- rhsBatchDimSet.insert(dimPair.second);
+ DenseSet<int64_t> rhsBatchDimSet(llvm::from_range,
+ llvm::make_second_range(batchDimMap));
// Add free and batch dimensions from 'lhsType' to 'expectedResultDims'.
SmallVector<int64_t, 4> expectedResultDims;
More information about the Mlir-commits
mailing list