[llvm] [TableGen] Remove unnecessary sortAndUniqueRegisters (PR #149125)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 16 08:56:16 PDT 2025
https://github.com/jayfoad created https://github.com/llvm/llvm-project/pull/149125
Each of the SRSets is already sorted and unique because it is a filtered
version of RC->getMembers() which is already sorted and unique.
>From 5d6c2c78a73dc26a766ca8269d60324bb2016701 Mon Sep 17 00:00:00 2001
From: Jay Foad <jay.foad at amd.com>
Date: Wed, 16 Jul 2025 16:52:37 +0100
Subject: [PATCH] [TableGen] Remove unnecessary sortAndUniqueRegisters
Each of the SRSets is already sorted and unique because it is a filtered
version of RC->getMembers() which is already sorted and unique.
---
llvm/utils/TableGen/Common/CodeGenRegisters.cpp | 3 ---
1 file changed, 3 deletions(-)
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) {
More information about the llvm-commits
mailing list