[llvm-commits] CVS: llvm/lib/CodeGen/LiveVariables.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue May 6 16:46:01 PDT 2003
Changes in directory llvm/lib/CodeGen:
LiveVariables.cpp updated: 1.4 -> 1.5
---
Log message:
Re-add gross hack, it's still necessary. :(
---
Diffs of the changes:
Index: llvm/lib/CodeGen/LiveVariables.cpp
diff -u llvm/lib/CodeGen/LiveVariables.cpp:1.4 llvm/lib/CodeGen/LiveVariables.cpp:1.5
--- llvm/lib/CodeGen/LiveVariables.cpp:1.4 Tue May 6 16:32:39 2003
+++ llvm/lib/CodeGen/LiveVariables.cpp Tue May 6 16:44:54 2003
@@ -165,7 +165,12 @@
if (MO.isVirtualRegister() && !MO.getVRegValueOrNull()) {
unsigned RegIdx = MO.getReg()-MRegisterInfo::FirstVirtualRegister;
HandleVirtRegUse(getVarInfo(RegIdx), MBB, MI);
- } else if (MO.isPhysicalRegister() && MO.getReg() != 0) {
+ } else if (MO.isPhysicalRegister() && MO.getReg() != 0
+ /// FIXME: This is a gross hack, due to us not being able to
+ /// say that some registers are defined on entry to the
+ /// function. 5 = ESP
+&& MO.getReg() != 5
+) {
HandlePhysRegUse(MO.getReg(), MI);
}
}
@@ -188,7 +193,12 @@
VRInfo.DefBlock = MBB; // Created here...
VRInfo.DefInst = MI;
VRInfo.Kills.push_back(std::make_pair(MBB, MI)); // Defaults to dead
- } else if (MO.isPhysicalRegister() && MO.getReg() != 0) {
+ } else if (MO.isPhysicalRegister() && MO.getReg() != 0
+ /// FIXME: This is a gross hack, due to us not being able to
+ /// say that some registers are defined on entry to the
+ /// function. 5 = ESP
+&& MO.getReg() != 5
+) {
HandlePhysRegDef(MO.getReg(), MI);
}
}
More information about the llvm-commits
mailing list