summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-08-05 16:58:46 +0000
committerChris Lattner <sabre@nondot.org>2003-08-05 16:58:46 +0000
commitcd4f4320b0130311cf2a09d936b0e8b8d3cbd989 (patch)
treee86908c70aee6899846c81e268bf094c8bf83a8a /llvm/lib
parente815b78deb82e82446f661043ef454b97444a53c (diff)
downloadbcm5719-llvm-cd4f4320b0130311cf2a09d936b0e8b8d3cbd989.tar.gz
bcm5719-llvm-cd4f4320b0130311cf2a09d936b0e8b8d3cbd989.zip
All callers of these methods actually wanted them to preserve the flags,
so get rid of the def/use parameters that were getting passed in. **** This now changes the semantics of these methods to preserve the flags, not clobber them! llvm-svn: 7602
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp31
1 files changed, 5 insertions, 26 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index d51c8071f76..904a412add7 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -80,24 +80,13 @@ void MachineInstr::replace(MachineOpCode Opcode, unsigned numOperands)
operands.resize(numOperands, MachineOperand());
}
-void
-MachineInstr::SetMachineOperandVal(unsigned i,
- MachineOperand::MachineOperandType opType,
- Value* V,
- bool isdef,
- bool isDefAndUse)
-{
+void MachineInstr::SetMachineOperandVal(unsigned i,
+ MachineOperand::MachineOperandType opTy,
+ Value* V) {
assert(i < operands.size()); // may be explicit or implicit op
- operands[i].opType = opType;
+ operands[i].opType = opTy;
operands[i].value = V;
operands[i].regNum = -1;
-
- if (isDefAndUse)
- operands[i].flags = MachineOperand::DEFUSEFLAG;
- else if (isdef || TargetInstrDescriptors[opCode].resultPos == (int) i)
- operands[i].flags = MachineOperand::DEFONLYFLAG;
- else
- operands[i].flags = 0;
}
void
@@ -116,22 +105,12 @@ MachineInstr::SetMachineOperandConst(unsigned i,
operands[i].flags = 0;
}
-void
-MachineInstr::SetMachineOperandReg(unsigned i,
- int regNum,
- bool isdef) {
+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].regNum = regNum;
-
- if (isdef || TargetInstrDescriptors[opCode].resultPos == (int)i) {
- assert(operands[i].flags == MachineOperand::DEFONLYFLAG &&
- "Shouldn't be changing a register type once set!");
- operands[i].flags = MachineOperand::DEFONLYFLAG;
- }
-
insertUsedReg(regNum);
}
OpenPOWER on IntegriCloud