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 | 63ab1f2d37f620bb9dde5c7b2a02571604e1055c (patch) | |
tree | 377636e4ef504b1ade5c0644d64f650ed75a991f /lib/CodeGen/MachineInstr.cpp | |
parent | 1f311b40465f05348a9a1070549e3e8016ef3751 (diff) | |
download | external_llvm-63ab1f2d37f620bb9dde5c7b2a02571604e1055c.zip external_llvm-63ab1f2d37f620bb9dde5c7b2a02571604e1055c.tar.gz external_llvm-63ab1f2d37f620bb9dde5c7b2a02571604e1055c.tar.bz2 |
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.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index 1655cba..5950c7c 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)); } } } |