aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-12-30 00:41:17 +0000
committerChris Lattner <sabre@nondot.org>2007-12-30 00:41:17 +0000
commit8019f41c0b7fda031d494e3900eada7d4e494772 (patch)
tree377636e4ef504b1ade5c0644d64f650ed75a991f /lib/CodeGen/MachineInstr.cpp
parentc8313f1d7957843d6032170573716cf8e6aeb93c (diff)
Start using the simplified methods for adding operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45432 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineInstr.cpp')
-rw-r--r--lib/CodeGen/MachineInstr.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp
index 1655cbabf2..5950c7c09a 100644
--- a/lib/CodeGen/MachineInstr.cpp
+++ b/lib/CodeGen/MachineInstr.cpp
@@ -32,10 +32,10 @@ MachineInstr::MachineInstr()
void MachineInstr::addImplicitDefUseOperands() {
if (TID->ImplicitDefs)
for (const unsigned *ImpDefs = TID->ImplicitDefs; *ImpDefs; ++ImpDefs)
- addRegOperand(*ImpDefs, true, true);
+ addOperand(MachineOperand::CreateReg(*ImpDefs, true, true));
if (TID->ImplicitUses)
for (const unsigned *ImpUses = TID->ImplicitUses; *ImpUses; ++ImpUses)
- addRegOperand(*ImpUses, false, true);
+ addOperand(MachineOperand::CreateReg(*ImpUses, false, true));
}
/// MachineInstr ctor - This constructor create a MachineInstr and add the
@@ -249,13 +249,8 @@ void MachineInstr::copyPredicates(const MachineInstr *MI) {
if (TID->Flags & M_PREDICABLE) {
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
if ((TID->OpInfo[i].Flags & M_PREDICATE_OPERAND)) {
- const MachineOperand &MO = MI->getOperand(i);
// Predicated operands must be last operands.
- if (MO.isRegister())
- addRegOperand(MO.getReg(), false);
- else {
- addImmOperand(MO.getImm());
- }
+ addOperand(MI->getOperand(i));
}
}
}