[llvm-commits] [llvm] r132149 - /llvm/trunk/lib/CodeGen/BranchFolding.cpp

Devang Patel dpatel at apple.com
Thu May 26 14:49:28 PDT 2011


Author: dpatel
Date: Thu May 26 16:49:28 2011
New Revision: 132149

URL: http://llvm.org/viewvc/llvm-project?rev=132149&view=rev
Log:
Add comment.

Modified:
    llvm/trunk/lib/CodeGen/BranchFolding.cpp

Modified: llvm/trunk/lib/CodeGen/BranchFolding.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/BranchFolding.cpp?rev=132149&r1=132148&r2=132149&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/BranchFolding.cpp (original)
+++ llvm/trunk/lib/CodeGen/BranchFolding.cpp Thu May 26 16:49:28 2011
@@ -1056,10 +1056,13 @@
         !MBB->hasAddressTaken() && !MBB->isLandingPad()) {
       DEBUG(dbgs() << "\nMerging into block: " << PrevBB
                    << "From MBB: " << *MBB);
+      // Remove redundant DBG_VALUEs first.
       if (PrevBB.begin() != PrevBB.end()) {
         MachineBasicBlock::iterator PrevBBIter = PrevBB.end();
         --PrevBBIter;
         MachineBasicBlock::iterator MBBIter = MBB->begin();
+        // Check if DBG_VALUE at the end of PrevBB is identical to the 
+        // DBG_VALUE at the beginning of MBB.
         while (PrevBBIter != PrevBB.begin() && MBBIter != MBB->end()
                && PrevBBIter->isDebugValue() && MBBIter->isDebugValue()) {
           if (!MBBIter->isIdenticalTo(PrevBBIter))





More information about the llvm-commits mailing list