diff options
author | Hsiangkai Wang <hsiangkai@gmail.com> | 2018-09-02 16:35:42 +0000 |
---|---|---|
committer | Hsiangkai Wang <hsiangkai@gmail.com> | 2018-09-02 16:35:42 +0000 |
commit | e0dcc28a4d96427dcd28d4393298cbf217458ee7 (patch) | |
tree | 78e3e00ce7a52cf3d3ef67a5a1a76728de37c15b /llvm/lib/CodeGen/LiveDebugVariables.cpp | |
parent | 1368434b4973918b04b406633ce28d4e41481e8d (diff) | |
download | llvm-e0dcc28a4d96427dcd28d4393298cbf217458ee7.zip llvm-e0dcc28a4d96427dcd28d4393298cbf217458ee7.tar.gz llvm-e0dcc28a4d96427dcd28d4393298cbf217458ee7.tar.bz2 |
Revert "[DebugInfo] Fix bug in LiveDebugVariables."
This reverts commit 8f548ff2a1819e1bc051e8218584f1a3d2cf178a.
buildbot failure in LLVM on clang-ppc64be-linux
http://lab.llvm.org:8011/builders/clang-ppc64le-linux/builds/19765
llvm-svn: 341290
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugVariables.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveDebugVariables.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugVariables.cpp b/llvm/lib/CodeGen/LiveDebugVariables.cpp index 4c002d4..b258a0e 100644 --- a/llvm/lib/CodeGen/LiveDebugVariables.cpp +++ b/llvm/lib/CodeGen/LiveDebugVariables.cpp @@ -578,28 +578,23 @@ bool LDVImpl::collectDebugValues(MachineFunction &mf) { MachineBasicBlock *MBB = &*MFI; for (MachineBasicBlock::iterator MBBI = MBB->begin(), MBBE = MBB->end(); MBBI != MBBE;) { - // Use the first debug instruction in the sequence to get a SlotIndex - // for following consecutive debug instructions. - if (!MBBI->isDebugInstr()) { + if (!MBBI->isDebugValue()) { ++MBBI; continue; } - // Debug instructions has no slot index. Use the previous - // non-debug instruction's SlotIndex as its SlotIndex. + // DBG_VALUE has no slot index, use the previous instruction instead. SlotIndex Idx = MBBI == MBB->begin() ? LIS->getMBBStartIdx(MBB) : LIS->getInstructionIndex(*std::prev(MBBI)).getRegSlot(); - // Handle consecutive debug instructions with the same slot index. + // Handle consecutive DBG_VALUE instructions with the same slot index. do { - // Only handle DBG_VALUE in handleDebugValue(). Skip all other - // kinds of debug instructions. - if (MBBI->isDebugValue() && handleDebugValue(*MBBI, Idx)) { + if (handleDebugValue(*MBBI, Idx)) { MBBI = MBB->erase(MBBI); Changed = true; } else ++MBBI; - } while (MBBI != MBBE && MBBI->isDebugInstr()); + } while (MBBI != MBBE && MBBI->isDebugValue()); } } return Changed; |