[llvm] [TableGen] Remove unnecessary sortAndUniqueRegisters (PR #149125)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 16 08:56:53 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-tablegen
Author: Jay Foad (jayfoad)
<details>
<summary>Changes</summary>
Each of the SRSets is already sorted and unique because it is a filtered
version of RC->getMembers() which is already sorted and unique.
---
Full diff: https://github.com/llvm/llvm-project/pull/149125.diff
1 Files Affected:
- (modified) llvm/utils/TableGen/Common/CodeGenRegisters.cpp (-3)
``````````diff
diff --git a/llvm/utils/TableGen/Common/CodeGenRegisters.cpp b/llvm/utils/TableGen/Common/CodeGenRegisters.cpp
index c43cc9afe1e3c..1fb2918a72636 100644
--- a/llvm/utils/TableGen/Common/CodeGenRegisters.cpp
+++ b/llvm/utils/TableGen/Common/CodeGenRegisters.cpp
@@ -2295,9 +2295,6 @@ void CodeGenRegBank::inferSubClassWithSubReg(CodeGenRegisterClass *RC) {
SRSets[I].push_back(R);
}
- for (auto I : SRSets)
- sortAndUniqueRegisters(I.second);
-
// Find matching classes for all SRSets entries. Iterate in SubRegIndex
// numerical order to visit synthetic indices last.
for (const CodeGenSubRegIndex &SubIdx : SubRegIndices) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/149125
More information about the llvm-commits
mailing list