diff options
author | Chris Lattner <sabre@nondot.org> | 2007-12-30 00:41:17 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-12-30 00:41:17 +0000 |
commit | e35dfb827fba6de9bfcc58b7422d712f08a63ecd (patch) | |
tree | 96dcdd2f40131d575f582296013491c87348b3ef /llvm/lib/CodeGen/MachineInstr.cpp | |
parent | c002be7fdd126fc5831c92f061e9c01dee8b7a96 (diff) | |
download | bcm5719-llvm-e35dfb827fba6de9bfcc58b7422d712f08a63ecd.tar.gz bcm5719-llvm-e35dfb827fba6de9bfcc58b7422d712f08a63ecd.zip |
Start using the simplified methods for adding operands.
llvm-svn: 45432
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineInstr.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index 1655cbabf28..5950c7c09a4 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/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)); } } } |