[all-commits] [llvm/llvm-project] 4098e2: [ADT] Modernize SparseSet to use llvm::identity_cx...
Kazu Hirata via All-commits
all-commits at lists.llvm.org
Tue Oct 21 07:22:47 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4098e263ff77122f321562c7e66b2da96f03f604
https://github.com/llvm/llvm-project/commit/4098e263ff77122f321562c7e66b2da96f03f604
Author: Kazu Hirata <kazu at google.com>
Date: 2025-10-21 (Tue, 21 Oct 2025)
Changed paths:
M llvm/include/llvm/ADT/SparseSet.h
M llvm/include/llvm/CodeGen/LivePhysRegs.h
M llvm/include/llvm/CodeGen/RegisterPressure.h
M llvm/lib/CodeGen/IfConversion.cpp
M llvm/lib/CodeGen/RegAllocFast.cpp
Log Message:
-----------
[ADT] Modernize SparseSet to use llvm::identity_cxx20 (NFC) (#164362)
The legacy llvm::identity is not quite the same as std::identity from
C++20. llvm::identity is a template struct with an ::argument_type
member. In contrast, llvm::identity_cxx20 (and std::identity) is a
non-template struct with a templated call operator and no
::argument_type.
This patch modernizes llvm::SparseSet by updating its default
key-extraction functor to llvm::identity_cxx20. A new template
parameter KeyT takes over the role of ::argument_type.
Existing uses of SparseSet are updated for the new template signature.
Most use sites are of the form SparseSet<T>, requiring no update.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list