[llvm-commits] CVS: llvm/lib/CodeGen/LiveVariables.cpp
Alkis Evlogimenos
alkis at cs.uiuc.edu
Tue Mar 30 16:45:01 PST 2004
Changes in directory llvm/lib/CodeGen:
LiveVariables.cpp updated: 1.28 -> 1.29
---
Log message:
Correctly update LiveVariables when an instruction changes
---
Diffs of the changes: (+3 -3)
Index: llvm/lib/CodeGen/LiveVariables.cpp
diff -u llvm/lib/CodeGen/LiveVariables.cpp:1.28 llvm/lib/CodeGen/LiveVariables.cpp:1.29
--- llvm/lib/CodeGen/LiveVariables.cpp:1.28 Sun Feb 29 16:01:51 2004
+++ llvm/lib/CodeGen/LiveVariables.cpp Tue Mar 30 16:44:39 2004
@@ -326,14 +326,14 @@
MachineInstr *NewMI) {
// If the instruction defines any virtual registers, update the VarInfo for
// the instruction.
- for (unsigned i = 0, e = NewMI->getNumOperands(); i != e; ++i) {
- MachineOperand &MO = NewMI->getOperand(i);
+ for (unsigned i = 0, e = OldMI->getNumOperands(); i != e; ++i) {
+ MachineOperand &MO = OldMI->getOperand(i);
if (MO.isRegister() && MO.isDef() && MO.getReg() &&
MRegisterInfo::isVirtualRegister(MO.getReg())) {
unsigned Reg = MO.getReg();
VarInfo &VI = getVarInfo(Reg);
if (VI.DefInst == OldMI)
- VI.DefInst = NewMI;
+ VI.DefInst = NewMI;
}
}
More information about the llvm-commits
mailing list