aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/PowerPC/PPCInstrInfo.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
commit7f2d3b8e464f669fa5a3cce3445ec5441eb7b02c (patch)
tree89f1433874f356861a996b65199fb5c66aed403f /lib/Target/PowerPC/PPCInstrInfo.cpp
parent9607bb8439f237eb08432bda92e501c821a7c11b (diff)
downloadexternal_llvm-7f2d3b8e464f669fa5a3cce3445ec5441eb7b02c.tar.gz
external_llvm-7f2d3b8e464f669fa5a3cce3445ec5441eb7b02c.tar.bz2
external_llvm-7f2d3b8e464f669fa5a3cce3445ec5441eb7b02c.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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45461 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCInstrInfo.cpp')
-rw-r--r--lib/Target/PowerPC/PPCInstrInfo.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/Target/PowerPC/PPCInstrInfo.cpp b/lib/Target/PowerPC/PPCInstrInfo.cpp
index b20943ecf1..4bac10de88 100644
--- a/lib/Target/PowerPC/PPCInstrInfo.cpp
+++ b/lib/Target/PowerPC/PPCInstrInfo.cpp
@@ -152,14 +152,8 @@ MachineInstr *PPCInstrInfo::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);
// Swap the mask around.
unsigned MB = MI->getOperand(4).getImm();