[clang] [llvm] [mlir] [ADT] Give DenseMapPair its own members instead of a std::pair base. NFC (PR #221853)
Yanzuo Liu via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 7 22:44:35 PDT 2026
================
@@ -606,7 +606,10 @@ GVNSink::analyzeInstructionForSinking(LockstepReverseIterator<false> &LRI,
return std::nullopt;
VNums[N]++;
}
- unsigned VNumToSink = llvm::max_element(VNums, llvm::less_second())->first;
+ unsigned VNumToSink =
+ llvm::max_element(VNums, [](const auto &L, const auto &R) {
+ return L.second < R.second;
+ })->first;
----------------
zwuis wrote:
Perhaps we can change `less_second` to call `get` using ADL like `adl_begin`. But this is out of the scope of this PR.
https://github.com/llvm/llvm-project/pull/221853
More information about the cfe-commits
mailing list