aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveVariables.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
commitf73823000e2d5d6e1cf65bdf5a107297e18d35fb (patch)
tree89f1433874f356861a996b65199fb5c66aed403f /lib/CodeGen/LiveVariables.cpp
parente3087890ac7f2fcf4697f8e09091e9a384311b9c (diff)
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/CodeGen/LiveVariables.cpp')
-rw-r--r--lib/CodeGen/LiveVariables.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/CodeGen/LiveVariables.cpp b/lib/CodeGen/LiveVariables.cpp
index ca3a0512ce..772843adaa 100644
--- a/lib/CodeGen/LiveVariables.cpp
+++ b/lib/CodeGen/LiveVariables.cpp
@@ -608,7 +608,7 @@ void LiveVariables::instructionChanged(MachineInstr *OldMI,
VarInfo &VI = getVarInfo(Reg);
if (MO.isDef()) {
if (MO.isDead()) {
- MO.unsetIsDead();
+ MO.setIsDead(false);
addVirtualRegisterDead(Reg, NewMI);
}
// Update the defining instruction.
@@ -616,7 +616,7 @@ void LiveVariables::instructionChanged(MachineInstr *OldMI,
VI.DefInst = NewMI;
}
if (MO.isKill()) {
- MO.unsetIsKill();
+ MO.setIsKill(false);
addVirtualRegisterKilled(Reg, NewMI);
}
// If this is a kill of the value, update the VI kills list.
@@ -640,12 +640,12 @@ void LiveVariables::transferKillDeadInfo(MachineInstr *OldMI,
unsigned Reg = MO.getReg();
if (MO.isDef()) {
if (MO.isDead()) {
- MO.unsetIsDead();
+ MO.setIsDead(false);
addRegisterDead(Reg, NewMI, RegInfo);
}
}
if (MO.isKill()) {
- MO.unsetIsKill();
+ MO.setIsKill(false);
addRegisterKilled(Reg, NewMI, RegInfo);
}
}
@@ -659,7 +659,7 @@ void LiveVariables::removeVirtualRegistersKilled(MachineInstr *MI) {
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
MachineOperand &MO = MI->getOperand(i);
if (MO.isRegister() && MO.isKill()) {
- MO.unsetIsKill();
+ MO.setIsKill(false);
unsigned Reg = MO.getReg();
if (MRegisterInfo::isVirtualRegister(Reg)) {
bool removed = getVarInfo(Reg).removeKill(MI);
@@ -675,7 +675,7 @@ void LiveVariables::removeVirtualRegistersDead(MachineInstr *MI) {
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
MachineOperand &MO = MI->getOperand(i);
if (MO.isRegister() && MO.isDead()) {
- MO.unsetIsDead();
+ MO.setIsDead(false);
unsigned Reg = MO.getReg();
if (MRegisterInfo::isVirtualRegister(Reg)) {
bool removed = getVarInfo(Reg).removeKill(MI);