diff options
author | Chris Lattner <sabre@nondot.org> | 2007-12-30 21:56:09 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-12-30 21:56:09 +0000 |
commit | 6005589faffdc5dbc3ce194f0988512216364d6e (patch) | |
tree | da7085527f783281b0e82e46538e9df4fe7fe264 /llvm/lib/Target/TargetInstrInfo.cpp | |
parent | c98c0e57eb181932455fd1e6dba6771f9f94ab81 (diff) | |
download | bcm5719-llvm-6005589faffdc5dbc3ce194f0988512216364d6e.tar.gz bcm5719-llvm-6005589faffdc5dbc3ce194f0988512216364d6e.zip |
More cleanups for MachineOperand:
- Eliminate the static "print" method for operands, moving it
into MachineOperand::print.
- Change various set* methods for register flags to take a bool
for the value to set it to. Remove unset* methods.
- Group methods more logically by operand flavor in MachineOperand.h
llvm-svn: 45461
Diffstat (limited to 'llvm/lib/Target/TargetInstrInfo.cpp')
-rw-r--r-- | llvm/lib/Target/TargetInstrInfo.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/llvm/lib/Target/TargetInstrInfo.cpp b/llvm/lib/Target/TargetInstrInfo.cpp index 530f878cda2..0ee891698f3 100644 --- a/llvm/lib/Target/TargetInstrInfo.cpp +++ b/llvm/lib/Target/TargetInstrInfo.cpp @@ -49,14 +49,8 @@ MachineInstr *TargetInstrInfo::commuteInstruction(MachineInstr *MI) const { bool Reg2IsKill = MI->getOperand(2).isKill(); MI->getOperand(2).setReg(Reg1); MI->getOperand(1).setReg(Reg2); - if (Reg1IsKill) - MI->getOperand(2).setIsKill(); - else - MI->getOperand(2).unsetIsKill(); - if (Reg2IsKill) - MI->getOperand(1).setIsKill(); - else - MI->getOperand(1).unsetIsKill(); + MI->getOperand(2).setIsKill(Reg1IsKill); + MI->getOperand(1).setIsKill(Reg2IsKill); return MI; } |