diff options
author | Chris Lattner <sabre@nondot.org> | 2003-05-06 21:44:54 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-05-06 21:44:54 +0000 |
commit | 9eb2172176189271f6509f13c7b02a892b5e5292 (patch) | |
tree | fc806b7e9e8d77148d420f996745ca7aaa2fbd7d /llvm/lib/CodeGen/LiveVariables.cpp | |
parent | 824698b8917070b431f9774a69bab94a8463722c (diff) | |
download | bcm5719-llvm-9eb2172176189271f6509f13c7b02a892b5e5292.tar.gz bcm5719-llvm-9eb2172176189271f6509f13c7b02a892b5e5292.zip |
Re-add gross hack, it's still necessary. :(
llvm-svn: 6012
Diffstat (limited to 'llvm/lib/CodeGen/LiveVariables.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveVariables.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/LiveVariables.cpp b/llvm/lib/CodeGen/LiveVariables.cpp index 83aa385d016..ccaee19529f 100644 --- a/llvm/lib/CodeGen/LiveVariables.cpp +++ b/llvm/lib/CodeGen/LiveVariables.cpp @@ -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); } } |