[Mlir-commits] [mlir] [mlir] Use llvm::less_first (NFC) (PR #136398)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Fri Apr 18 19:39:41 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir-sparse
@llvm/pr-subscribers-mlir
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/136398.diff
1 Files Affected:
- (modified) mlir/lib/Dialect/SparseTensor/Transforms/Utils/LoopEmitter.cpp (+1-2)
``````````diff
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/Utils/LoopEmitter.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/LoopEmitter.cpp
index ea5533dfc6bac..6e816dc0661a1 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/Utils/LoopEmitter.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/LoopEmitter.cpp
@@ -352,8 +352,7 @@ void LoopEmitter::initSubSectIterator(OpBuilder &builder, Location loc) {
if (depRedOrder.empty())
continue;
- std::sort(depRedOrder.begin(), depRedOrder.end(),
- [](auto &l, auto &r) { return std::get<0>(l) < std::get<0>(r); });
+ llvm::sort(depRedOrder, llvm::less_first());
SmallVector<SparseIterator *> lastIter(tensors.size(), nullptr);
for (auto [loop, t, lvl] : depRedOrder) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/136398
More information about the Mlir-commits
mailing list