aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/BranchFolding.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2010-03-05 00:02:59 +0000
committerDale Johannesen <dalej@apple.com>2010-03-05 00:02:59 +0000
commit2061c84109fb36f34745a700bc5283e13b51d736 (patch)
tree5cd3a45ba9cdfd4247c0484185f7fd0146cbf7ba /llvm/lib/CodeGen/BranchFolding.cpp
parent9984bd6092e75b32e3f30bc486d5b0ee8af9e942 (diff)
downloadllvm-2061c84109fb36f34745a700bc5283e13b51d736.zip
llvm-2061c84109fb36f34745a700bc5283e13b51d736.tar.gz
llvm-2061c84109fb36f34745a700bc5283e13b51d736.tar.bz2
Fix some more places where dbg_value affected codegen.
llvm-svn: 97765
Diffstat (limited to 'llvm/lib/CodeGen/BranchFolding.cpp')
-rw-r--r--llvm/lib/CodeGen/BranchFolding.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/BranchFolding.cpp b/llvm/lib/CodeGen/BranchFolding.cpp
index faf4d95..d94729a 100644
--- a/llvm/lib/CodeGen/BranchFolding.cpp
+++ b/llvm/lib/CodeGen/BranchFolding.cpp
@@ -334,7 +334,9 @@ static unsigned ComputeCommonTailLength(MachineBasicBlock *MBB1,
unsigned TailLen = 0;
while (I1 != MBB1->begin() && I2 != MBB2->begin()) {
--I1; --I2;
- if (!I1->isIdenticalTo(I2) ||
+ // Don't merge debugging pseudos.
+ if (I1->isDebugValue() || I2->isDebugValue() ||
+ !I1->isIdenticalTo(I2) ||
// FIXME: This check is dubious. It's used to get around a problem where
// people incorrectly expect inline asm directives to remain in the same
// relative order. This is untenable because normal compiler
@@ -412,6 +414,8 @@ static unsigned EstimateRuntime(MachineBasicBlock::iterator I,
MachineBasicBlock::iterator E) {
unsigned Time = 0;
for (; I != E; ++I) {
+ if (I->isDebugValue())
+ continue;
const TargetInstrDesc &TID = I->getDesc();
if (TID.isCall())
Time += 10;