aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-11-17 22:14:08 +0000
committerChris Lattner <sabre@nondot.org>2002-11-17 22:14:08 +0000
commit17ec8a8dd06d1a0d68b416352e7159f005da78dd (patch)
tree47ae9f13048be8ea26e27c0f40613ef9c9203635 /llvm/lib/CodeGen/MachineInstr.cpp
parentcb57e5ca1750cc94640e91dd08ea054abbdb86e8 (diff)
downloadllvm-17ec8a8dd06d1a0d68b416352e7159f005da78dd.zip
llvm-17ec8a8dd06d1a0d68b416352e7159f005da78dd.tar.gz
llvm-17ec8a8dd06d1a0d68b416352e7159f005da78dd.tar.bz2
Remove only uses of markDef/markDefAndUse methods
llvm-svn: 4719
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index 28fbd2d..91ee512 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -98,12 +98,13 @@ MachineInstr::SetMachineOperandVal(unsigned i,
operands[i].opType = opType;
operands[i].value = V;
operands[i].regNum = -1;
- operands[i].flags = 0;
- if (isdef || TargetInstrDescriptors[opCode].resultPos == (int) i)
- operands[i].markDef();
if (isDefAndUse)
- operands[i].markDefAndUse();
+ operands[i].flags = MachineOperand::DEFUSEFLAG;
+ else if (isdef || TargetInstrDescriptors[opCode].resultPos == (int) i)
+ operands[i].flags = MachineOperand::DEFFLAG;
+ else
+ operands[i].flags = 0;
}
void
@@ -131,10 +132,12 @@ MachineInstr::SetMachineOperandReg(unsigned i,
operands[i].opType = MachineOperand::MO_MachineRegister;
operands[i].value = NULL;
operands[i].regNum = regNum;
- operands[i].flags = 0;
if (isdef || TargetInstrDescriptors[opCode].resultPos == (int) i)
- operands[i].markDef();
+ operands[i].flags = MachineOperand::DEFFLAG;
+ else
+ operands[i].flags = 0;
+
insertUsedReg(regNum);
}