Re-add gross hack, it's still necessary. :(
authorChris Lattner <sabre@nondot.org>
Tue, 6 May 2003 21:44:54 +0000 (21:44 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 6 May 2003 21:44:54 +0000 (21:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6012 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/LiveVariables.cpp

index 83aa385d0169bd5b40329750481e9b4bb2c36c71..ccaee19529ff12b56d13f926d6f02b128fc2f387 100644 (file)
@@ -165,7 +165,12 @@ bool LiveVariables::runOnMachineFunction(MachineFunction &MF) {
          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 @@ bool LiveVariables::runOnMachineFunction(MachineFunction &MF) {
            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);
          }
        }