summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetInstrInfo.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-12-30 21:56:09 +0000
committerChris Lattner <sabre@nondot.org>2007-12-30 21:56:09 +0000
commit6005589faffdc5dbc3ce194f0988512216364d6e (patch)
treeda7085527f783281b0e82e46538e9df4fe7fe264 /llvm/lib/Target/TargetInstrInfo.cpp
parentc98c0e57eb181932455fd1e6dba6771f9f94ab81 (diff)
downloadbcm5719-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.cpp10
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;
}
OpenPOWER on IntegriCloud