diff options
author | Devang Patel <dpatel@apple.com> | 2011-05-26 21:49:28 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-05-26 21:49:28 +0000 |
commit | cdec11413be6febc5cbe370349b97a751201ba15 (patch) | |
tree | 2b2b97d35454157e34246fbcfe411a4510cd25fd /llvm/lib/CodeGen/BranchFolding.cpp | |
parent | 42ddaa10d3f42101fc6a055fd2d4a423bbba3b8c (diff) | |
download | bcm5719-llvm-cdec11413be6febc5cbe370349b97a751201ba15.tar.gz bcm5719-llvm-cdec11413be6febc5cbe370349b97a751201ba15.zip |
Add comment.
llvm-svn: 132149
Diffstat (limited to 'llvm/lib/CodeGen/BranchFolding.cpp')
-rw-r--r-- | llvm/lib/CodeGen/BranchFolding.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/BranchFolding.cpp b/llvm/lib/CodeGen/BranchFolding.cpp index 2bcd59f1bd8..719cd264f68 100644 --- a/llvm/lib/CodeGen/BranchFolding.cpp +++ b/llvm/lib/CodeGen/BranchFolding.cpp @@ -1056,10 +1056,13 @@ ReoptimizeBlock: !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)) |