[llvm-commits] [llvm] r98224 - /llvm/trunk/lib/CodeGen/MachineCSE.cpp
Dale Johannesen
dalej at apple.com
Wed Mar 10 18:10:24 PST 2010
Author: johannes
Date: Wed Mar 10 20:10:24 2010
New Revision: 98224
URL: http://llvm.org/viewvc/llvm-project?rev=98224&view=rev
Log:
Fix debug_value handling.
Modified:
llvm/trunk/lib/CodeGen/MachineCSE.cpp
Modified: llvm/trunk/lib/CodeGen/MachineCSE.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineCSE.cpp?rev=98224&r1=98223&r2=98224&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineCSE.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineCSE.cpp Wed Mar 10 20:10:24 2010
@@ -122,8 +122,12 @@
// Reached end of block, register is obviously dead.
return true;
- if (I->isDebugValue())
+ if (I->isDebugValue()) {
+ // These must not count against the limit.
+ ++LookAheadLeft;
+ ++I;
continue;
+ }
bool SeenDef = false;
for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i) {
const MachineOperand &MO = I->getOperand(i);
@@ -188,7 +192,7 @@
bool MachineCSE::isCSECandidate(MachineInstr *MI) {
if (MI->isLabel() || MI->isPHI() || MI->isImplicitDef() ||
- MI->isKill() || MI->isInlineAsm())
+ MI->isKill() || MI->isInlineAsm() || MI->isDebugValue())
return false;
// Ignore copies.
More information about the llvm-commits
mailing list