[llvm-commits] CVS: llvm/utils/TableGen/CodeEmitterGen.cpp

Chris Lattner lattner at cs.uiuc.edu
Mon Aug 4 23:00:01 PDT 2003


Changes in directory llvm/utils/TableGen:

CodeEmitterGen.cpp updated: 1.22 -> 1.23

---
Log message:

No functional changes, comment the fix I just put in


---
Diffs of the changes:

Index: llvm/utils/TableGen/CodeEmitterGen.cpp
diff -u llvm/utils/TableGen/CodeEmitterGen.cpp:1.22 llvm/utils/TableGen/CodeEmitterGen.cpp:1.23
--- llvm/utils/TableGen/CodeEmitterGen.cpp:1.22	Mon Aug  4 22:53:04 2003
+++ llvm/utils/TableGen/CodeEmitterGen.cpp	Mon Aug  4 22:59:01 2003
@@ -54,9 +54,8 @@
     std::map<std::string, bool> OpContinuous;
     for (unsigned i = 0, e = Vals.size(); i != e; ++i) {
       if (!Vals[i].getPrefix() &&  !Vals[i].getValue()->isComplete() &&
-          /* ignore annul and predict bits since no one sets them yet */
-          Vals[i].getName() != "annul" && Vals[i].getName() != "predict")
-      {
+          // ignore annul and predict bits since no one sets them yet
+          Vals[i].getName() != "annul" && Vals[i].getName() != "predict") {
         // Is the operand continuous? If so, we can just mask and OR it in
         // instead of doing it bit-by-bit, saving a lot in runtime cost.        
         const BitsInit *InstInit = BI;
@@ -112,6 +111,8 @@
           }
         }
 
+        // If we have found no bit in "Inst" which comes from this field, then
+        // this is not an operand!!
         if (beginBitInInst != -1) {
           o << "      // op" << op << ": " << Vals[i].getName() << "\n"
             << "      int64_t op" << op 
@@ -164,7 +165,7 @@
         // Scan through the field looking for bit initializers of the current
         // variable...
         for (int i = FieldInitializer->getNumBits()-1; i >= 0; --i) {
-          if (BitInit *BI=dynamic_cast<BitInit*>(FieldInitializer->getBit(i)))
+          if (BitInit *BI = dynamic_cast<BitInit*>(FieldInitializer->getBit(i)))
           {
             DEBUG(o << "      // bit init: f: " << f << ", i: " << i << "\n");
           } else if (UnsetInit *UI =





More information about the llvm-commits mailing list