aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/TargetInstrInfoImpl.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2009-05-13 21:33:08 +0000
committerBill Wendling <isanbard@gmail.com>2009-05-13 21:33:08 +0000
commit2b739762c5444433753e4d3a141ff20f40636611 (patch)
treef01732c9f02fd1154ac34176b7a5bbf1f5f0fc44 /lib/CodeGen/TargetInstrInfoImpl.cpp
parent77d32df6e003b474ab5a97095e58a81389b10271 (diff)
downloadexternal_llvm-2b739762c5444433753e4d3a141ff20f40636611.zip
external_llvm-2b739762c5444433753e4d3a141ff20f40636611.tar.gz
external_llvm-2b739762c5444433753e4d3a141ff20f40636611.tar.bz2
Change MachineInstrBuilder::addReg() to take a flag instead of a list of
booleans. This gives a better indication of what the "addReg()" is doing. Remembering what all of those booleans mean isn't easy, especially if you aren't spending all of your time in that code. I took Jakob's suggestion and made it illegal to pass in "true" for the flag. This should hopefully prevent any unintended misuse of this (by reverting to the old way of using addReg()). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71722 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TargetInstrInfoImpl.cpp')
-rw-r--r--lib/CodeGen/TargetInstrInfoImpl.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/TargetInstrInfoImpl.cpp b/lib/CodeGen/TargetInstrInfoImpl.cpp
index a213400..a5e1ee4 100644
--- a/lib/CodeGen/TargetInstrInfoImpl.cpp
+++ b/lib/CodeGen/TargetInstrInfoImpl.cpp
@@ -45,9 +45,9 @@ MachineInstr *TargetInstrInfoImpl::commuteInstruction(MachineInstr *MI,
bool Reg0IsDead = MI->getOperand(0).isDead();
MachineFunction &MF = *MI->getParent()->getParent();
return BuildMI(MF, MI->getDebugLoc(), MI->getDesc())
- .addReg(Reg0, true, false, false, Reg0IsDead)
- .addReg(Reg2, false, false, Reg2IsKill)
- .addReg(Reg1, false, false, Reg1IsKill);
+ .addReg(Reg0, RegState::Define | getDeadRegState(Reg0IsDead))
+ .addReg(Reg2, getKillRegState(Reg2IsKill))
+ .addReg(Reg1, getKillRegState(Reg2IsKill));
}
if (ChangeReg0)