diff options
author | Bill Wendling <isanbard@gmail.com> | 2009-05-13 21:33:08 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2009-05-13 21:33:08 +0000 |
commit | f7b83c7ae74ca918d0fc92210661508233c6a2e9 (patch) | |
tree | 1f9a1dce3779953f3a71133762d29d5befce1125 /llvm/lib/CodeGen/TargetInstrInfoImpl.cpp | |
parent | e39935527edb313f22a9c6b98b0aa89c3fa22d3e (diff) | |
download | bcm5719-llvm-f7b83c7ae74ca918d0fc92210661508233c6a2e9.tar.gz bcm5719-llvm-f7b83c7ae74ca918d0fc92210661508233c6a2e9.zip |
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()).
llvm-svn: 71722
Diffstat (limited to 'llvm/lib/CodeGen/TargetInstrInfoImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetInstrInfoImpl.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp b/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp index a213400dcbd..a5e1ee43552 100644 --- a/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp +++ b/llvm/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) |