[llvm-commits] CVS: llvm/lib/CodeGen/VirtRegMap.cpp
Alkis Evlogimenos
alkis at niobe.cs.uiuc.edu
Wed Feb 25 17:23:00 PST 2004
Changes in directory llvm/lib/CodeGen:
VirtRegMap.cpp updated: 1.3 -> 1.4
---
Log message:
Fix bugs found with recent addition of assertions in
MRegisterInfo::is{Physical,Virtual}Register.
---
Diffs of the changes: (+2 -2)
Index: llvm/lib/CodeGen/VirtRegMap.cpp
diff -u llvm/lib/CodeGen/VirtRegMap.cpp:1.3 llvm/lib/CodeGen/VirtRegMap.cpp:1.4
--- llvm/lib/CodeGen/VirtRegMap.cpp:1.3 Wed Feb 25 15:55:44 2004
+++ llvm/lib/CodeGen/VirtRegMap.cpp Wed Feb 25 17:21:52 2004
@@ -168,7 +168,7 @@
// rewrite all used operands
for (unsigned i = 0, e = mii->getNumOperands(); i != e; ++i) {
MachineOperand& op = mii->getOperand(i);
- if (op.isRegister() && op.isUse() &&
+ if (op.isRegister() && op.getReg() && op.isUse() &&
MRegisterInfo::isVirtualRegister(op.getReg())) {
unsigned physReg = vrm_.getPhys(op.getReg());
handleUse(mbb, mii, op.getReg(), physReg);
@@ -187,7 +187,7 @@
// uses so don't check for those here)
for (unsigned i = 0, e = mii->getNumOperands(); i != e; ++i) {
MachineOperand& op = mii->getOperand(i);
- if (op.isRegister() && !op.isUse())
+ if (op.isRegister() && op.getReg() && !op.isUse())
if (MRegisterInfo::isPhysicalRegister(op.getReg()))
vacatePhysReg(mbb, mii, op.getReg());
else {
More information about the llvm-commits
mailing list