[llvm-commits] [llvm] r56275 - /llvm/trunk/utils/TableGen/CodeEmitterGen.cpp

Evan Cheng evan.cheng at apple.com
Tue Sep 16 23:29:53 PDT 2008


Author: evancheng
Date: Wed Sep 17 01:29:52 2008
New Revision: 56275

URL: http://llvm.org/viewvc/llvm-project?rev=56275&view=rev
Log:
Add instruction names as comments to InstBits entries.

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

Modified: llvm/trunk/utils/TableGen/CodeEmitterGen.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeEmitterGen.cpp?rev=56275&r1=56274&r2=56275&view=diff

==============================================================================
--- llvm/trunk/utils/TableGen/CodeEmitterGen.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeEmitterGen.cpp Wed Sep 17 01:29:52 2008
@@ -100,8 +100,6 @@
     const CodeGenInstruction *CGI = *IN;
     Record *R = CGI->TheDef;
     
-    if (IN != NumberedInstructions.begin()) o << ",\n";
-    
     if (R->getName() == "PHI" ||
         R->getName() == "INLINEASM" ||
         R->getName() == "DBG_LABEL" ||
@@ -112,7 +110,7 @@
         R->getName() == "INSERT_SUBREG" ||
         R->getName() == "IMPLICIT_DEF" ||
         R->getName() == "SUBREG_TO_REG") {
-      o << "    0U";
+      o << "    0U,\n";
       continue;
     }
     
@@ -125,9 +123,9 @@
         Value |= B->getValue() << (e-i-1);
       }
     }
-    o << "    " << Value << "U";
+    o << "    " << Value << "U," << '\t' << "// " << R->getName() << "\n";
   }
-  o << "\n  };\n";
+  o << "    0U\n  };\n";
   
   // Map to accumulate all the cases.
   std::map<std::string, std::vector<std::string> > CaseMap;





More information about the llvm-commits mailing list