[llvm] 362594a - [TableGen] Remove unnecessary sortAndUniqueRegisters (#149125)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 16 12:27:53 PDT 2025


Author: Jay Foad
Date: 2025-07-16T20:27:50+01:00
New Revision: 362594a10fa5fd8e5f8d31eb5391370c928b639e

URL: https://github.com/llvm/llvm-project/commit/362594a10fa5fd8e5f8d31eb5391370c928b639e
DIFF: https://github.com/llvm/llvm-project/commit/362594a10fa5fd8e5f8d31eb5391370c928b639e.diff

LOG: [TableGen] Remove unnecessary sortAndUniqueRegisters (#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.

Added: 
    

Modified: 
    llvm/utils/TableGen/Common/CodeGenRegisters.cpp

Removed: 
    


################################################################################
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