[llvm-commits] CVS: llvm/lib/CodeGen/MachineInstr.cpp

Brian Gaeke gaeke at cs.uiuc.edu
Wed Mar 3 13:09:08 PST 2004


Changes in directory llvm/lib/CodeGen:

MachineInstr.cpp updated: 1.95 -> 1.96

---
Log message:

Make MachineOperand's value named 'contents'.  Make really, really sure
it is always completely initialized and copied.
Also, fix up many comments and asserts.


---
Diffs of the changes:  (+6 -6)

Index: llvm/lib/CodeGen/MachineInstr.cpp
diff -u llvm/lib/CodeGen/MachineInstr.cpp:1.95 llvm/lib/CodeGen/MachineInstr.cpp:1.96
--- llvm/lib/CodeGen/MachineInstr.cpp:1.95	Sat Feb 28 23:07:02 2004
+++ llvm/lib/CodeGen/MachineInstr.cpp	Wed Mar  3 13:07:27 2004
@@ -100,7 +100,7 @@
                                         Value* V) {
   assert(i < operands.size());          // may be explicit or implicit op
   operands[i].opType = opTy;
-  operands[i].value = V;
+  operands[i].contents.value = V;
   operands[i].regNum = -1;
 }
 
@@ -113,8 +113,8 @@
          "immed. constant cannot be defined");
 
   operands[i].opType = opTy;
-  operands[i].value = NULL;
-  operands[i].immedVal = intValue;
+  operands[i].contents.value = NULL;
+  operands[i].contents.immedVal = intValue;
   operands[i].regNum = -1;
   operands[i].flags = 0;
 }
@@ -123,7 +123,7 @@
   assert(i < getNumOperands());          // must be explicit op
 
   operands[i].opType = MachineOperand::MO_MachineRegister;
-  operands[i].value = NULL;
+  operands[i].contents.value = NULL;
   operands[i].regNum = regNum;
 }
 
@@ -162,7 +162,7 @@
           notDefsAndUses && (O.isDef() && !O.isUse()) ||
           !notDefsAndUses && O.isDef())
         {
-          O.getMachineOperand().value = newVal;
+          O.getMachineOperand().contents.value = newVal;
           ++numSubst;
         }
       else
@@ -175,7 +175,7 @@
           notDefsAndUses && (getImplicitOp(i).isDef() && !getImplicitOp(i).isUse()) ||
           !notDefsAndUses && getImplicitOp(i).isDef())
         {
-          getImplicitOp(i).value = newVal;
+          getImplicitOp(i).contents.value = newVal;
           ++numSubst;
         }
       else





More information about the llvm-commits mailing list