[llvm-commits] [llvm] r136467 - /llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp

Owen Anderson resistor at mac.com
Fri Jul 29 10:32:03 PDT 2011


Author: resistor
Date: Fri Jul 29 12:32:03 2011
New Revision: 136467

URL: http://llvm.org/viewvc/llvm-project?rev=136467&view=rev
Log:
Fix a case where, when trying to track tied operands, we'd accidentally overwrite our mapping.

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

Modified: llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp?rev=136467&r1=136466&r2=136467&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp Fri Jul 29 12:32:03 2011
@@ -1228,10 +1228,8 @@
   std::map<Init*, std::string> TiedNames;
   for (unsigned i = 0; i < CGI.Operands.size(); ++i) {
     int tiedTo = CGI.Operands[i].getTiedRegister();
-    if (tiedTo != -1) {
+    if (tiedTo != -1)
       TiedNames[InOutOperands[i].first] = InOutOperands[tiedTo].second;
-      TiedNames[InOutOperands[tiedTo].first] = InOutOperands[i].second;
-    }
   }
 
   // For each operand, see if we can figure out where it is encoded.
@@ -1267,6 +1265,8 @@
     unsigned Offset = 0;
 
     for (unsigned bi = 0; bi < Bits.getNumBits(); ++bi) {
+      std::string name = NI->second;
+      std::string altname = TiedNames[NI->first];
       VarBitInit *BI = dynamic_cast<VarBitInit*>(Bits.getBit(bi));
       if (!BI) {
         if (Base != ~0U) {





More information about the llvm-commits mailing list