aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/TwoAddressInstructionPass.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2010-02-10 21:47:48 +0000
committerDale Johannesen <dalej@apple.com>2010-02-10 21:47:48 +0000
commitb8ff934e94637462901ebd1c849aeaf71350dacc (patch)
treede56a85e6b05ecbd90b3b613726490fd4254611e /lib/CodeGen/TwoAddressInstructionPass.cpp
parent0a9abcbffed2ccef44138f997c070ba9159b1443 (diff)
Skip debug info in a couple of places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95814 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TwoAddressInstructionPass.cpp')
-rw-r--r--lib/CodeGen/TwoAddressInstructionPass.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/CodeGen/TwoAddressInstructionPass.cpp b/lib/CodeGen/TwoAddressInstructionPass.cpp
index 6c7c1a1305..31552f8978 100644
--- a/lib/CodeGen/TwoAddressInstructionPass.cpp
+++ b/lib/CodeGen/TwoAddressInstructionPass.cpp
@@ -451,11 +451,11 @@ MachineInstr *findOnlyInterestingUse(unsigned Reg, MachineBasicBlock *MBB,
const TargetInstrInfo *TII,
bool &IsCopy,
unsigned &DstReg, bool &IsDstPhys) {
- MachineRegisterInfo::use_iterator UI = MRI->use_begin(Reg);
- if (UI == MRI->use_end())
+ MachineRegisterInfo::use_nodbg_iterator UI = MRI->use_nodbg_begin(Reg);
+ if (UI == MRI->use_nodbg_end())
return 0;
MachineInstr &UseMI = *UI;
- if (++UI != MRI->use_end())
+ if (++UI != MRI->use_nodbg_end())
// More than one use.
return 0;
if (UseMI.getParent() != MBB)
@@ -923,6 +923,10 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &MF) {
for (MachineBasicBlock::iterator mi = mbbi->begin(), me = mbbi->end();
mi != me; ) {
MachineBasicBlock::iterator nmi = llvm::next(mi);
+ if (mi->isDebugValue()) {
+ mi = nmi;
+ continue;
+ }
const TargetInstrDesc &TID = mi->getDesc();
bool FirstTied = true;