summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2004-03-03 19:07:27 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2004-03-03 19:07:27 +0000
commit015972103dc192c14d2e18e54284abb6eef9610e (patch)
treec05e6794cd81b92da21e5b1acba13ea4b336ad23 /llvm/lib/CodeGen/MachineInstr.cpp
parent3001c6e26437020238370f2e6fdbae2298e87946 (diff)
downloadbcm5719-llvm-015972103dc192c14d2e18e54284abb6eef9610e.tar.gz
bcm5719-llvm-015972103dc192c14d2e18e54284abb6eef9610e.zip
Make MachineOperand's value named 'contents'. Make really, really sure
it is always completely initialized and copied. Also, fix up many comments and asserts. llvm-svn: 12100
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index b2b3caa0e6c..38cd62e83f5 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -100,7 +100,7 @@ void MachineInstr::SetMachineOperandVal(unsigned i,
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 @@ MachineInstr::SetMachineOperandConst(unsigned i,
"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 @@ void MachineInstr::SetMachineOperandReg(unsigned i, int regNum) {
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 @@ MachineInstr::substituteValue(const Value* oldVal, Value* newVal,
notDefsAndUses && (O.isDef() && !O.isUse()) ||
!notDefsAndUses && O.isDef())
{
- O.getMachineOperand().value = newVal;
+ O.getMachineOperand().contents.value = newVal;
++numSubst;
}
else
@@ -175,7 +175,7 @@ MachineInstr::substituteValue(const Value* oldVal, Value* newVal,
notDefsAndUses && (getImplicitOp(i).isDef() && !getImplicitOp(i).isUse()) ||
!notDefsAndUses && getImplicitOp(i).isDef())
{
- getImplicitOp(i).value = newVal;
+ getImplicitOp(i).contents.value = newVal;
++numSubst;
}
else
OpenPOWER on IntegriCloud