[llvm] r304387 - [TableGen] Remove code for renaming anonymous register classes as it can never execute.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Wed May 31 23:56:13 PDT 2017


Author: ctopper
Date: Thu Jun  1 01:56:13 2017
New Revision: 304387

URL: http://llvm.org/viewvc/llvm-project?rev=304387&view=rev
Log:
[TableGen] Remove code for renaming anonymous register classes as it can never execute.

It tried to detect 9 letters (the length of anonymous) followed by a period. But anonymous classes start with "anonymous_" rather than "anonymous." these days.

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

Modified: llvm/trunk/utils/TableGen/CodeGenRegisters.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenRegisters.cpp?rev=304387&r1=304386&r2=304387&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenRegisters.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenRegisters.cpp Thu Jun  1 01:56:13 2017
@@ -679,11 +679,6 @@ CodeGenRegisterClass::CodeGenRegisterCla
     Name(R->getName()),
     TopoSigs(RegBank.getNumTopoSigs()),
     EnumValue(-1) {
-  // Rename anonymous register classes.
-  if (R->getName().size() > 9 && R->getName()[9] == '.') {
-    static unsigned AnonCounter = 0;
-    R->setName("AnonRegClass_" + utostr(AnonCounter++));
-  }
 
   std::vector<Record*> TypeList = R->getValueAsListOfDefs("RegTypes");
   for (unsigned i = 0, e = TypeList.size(); i != e; ++i) {
@@ -867,7 +862,7 @@ std::string CodeGenRegisterClass::getQua
   if (Namespace.empty())
     return getName();
   else
-    return Namespace + "::" + getName();
+    return (Namespace + "::" + getName()).str();
 }
 
 // Compute sub-classes of all register classes.




More information about the llvm-commits mailing list