[llvm-commits] [llvm] r95647 - in /llvm/trunk/lib/CodeGen: CalcSpillWeights.cpp LiveVariables.cpp TwoAddressInstructionPass.cpp

Dale Johannesen dalej at apple.com
Mon Feb 8 18:01:46 PST 2010


Author: johannes
Date: Mon Feb  8 20:01:46 2010
New Revision: 95647

URL: http://llvm.org/viewvc/llvm-project?rev=95647&view=rev
Log:
Skip DEBUG_VALUE in some places where it was affecting codegen.


Modified:
    llvm/trunk/lib/CodeGen/CalcSpillWeights.cpp
    llvm/trunk/lib/CodeGen/LiveVariables.cpp
    llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp

Modified: llvm/trunk/lib/CodeGen/CalcSpillWeights.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CalcSpillWeights.cpp?rev=95647&r1=95646&r2=95647&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/CalcSpillWeights.cpp (original)
+++ llvm/trunk/lib/CodeGen/CalcSpillWeights.cpp Mon Feb  8 20:01:46 2010
@@ -64,6 +64,9 @@
       if (mi->getOpcode() == TargetInstrInfo::IMPLICIT_DEF)
         continue;
 
+      if (mi->getOpcode() == TargetInstrInfo::DEBUG_VALUE)
+        continue;
+
       for (unsigned i = 0, e = mi->getNumOperands(); i != e; ++i) {
         const MachineOperand &mopi = mi->getOperand(i);
         if (!mopi.isReg() || mopi.getReg() == 0)

Modified: llvm/trunk/lib/CodeGen/LiveVariables.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveVariables.cpp?rev=95647&r1=95646&r2=95647&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/LiveVariables.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveVariables.cpp Mon Feb  8 20:01:46 2010
@@ -543,6 +543,8 @@
     for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end();
          I != E; ++I) {
       MachineInstr *MI = I;
+      if (MI->getOpcode()==TargetInstrInfo::DEBUG_VALUE)
+        continue;
       DistanceMap.insert(std::make_pair(MI, Dist++));
 
       // Process all of the operands of the instruction...

Modified: llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp?rev=95647&r1=95646&r2=95647&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp (original)
+++ llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp Mon Feb  8 20:01:46 2010
@@ -318,6 +318,8 @@
     MachineInstr *MI = MO.getParent();
     if (MI->getParent() != MBB)
       continue;
+    if (MI->getOpcode() == TargetInstrInfo::DEBUG_VALUE)
+      continue;
     DenseMap<MachineInstr*, unsigned>::iterator DI = DistanceMap.find(MI);
     if (DI == DistanceMap.end())
       continue;
@@ -341,6 +343,8 @@
     MachineInstr *MI = MO.getParent();
     if (MI->getParent() != MBB)
       continue;
+    if (MI->getOpcode() == TargetInstrInfo::DEBUG_VALUE)
+      continue;
     DenseMap<MachineInstr*, unsigned>::iterator DI = DistanceMap.find(MI);
     if (DI == DistanceMap.end())
       continue;





More information about the llvm-commits mailing list