From 406fad0bad28ff95925810b78c5f73dd29fac708 Mon Sep 17 00:00:00 2001 From: Dale Johannesen Date: Thu, 11 Feb 2010 18:22:31 +0000 Subject: [PATCH] Don't allow DBG_VALUE to affect codegen. llvm-svn: 95889 --- lib/CodeGen/TwoAddressInstructionPass.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/CodeGen/TwoAddressInstructionPass.cpp b/lib/CodeGen/TwoAddressInstructionPass.cpp index 31552f89780..6f4ca82525b 100644 --- a/lib/CodeGen/TwoAddressInstructionPass.cpp +++ b/lib/CodeGen/TwoAddressInstructionPass.cpp @@ -213,6 +213,9 @@ bool TwoAddressInstructionPass::Sink3AddrInstruction(MachineBasicBlock *MBB, unsigned NumVisited = 0; for (MachineBasicBlock::iterator I = llvm::next(OldPos); I != KillPos; ++I) { MachineInstr *OtherMI = I; + // DBG_VALUE cannot be counted against the limit. + if (OtherMI->isDebugValue()) + continue; if (NumVisited > 30) // FIXME: Arbitrary limit to reduce compile time cost. return false; ++NumVisited;