[PATCH] D45031: [DebugInfo] Use (isDebugValue() || isDebugLable()) instead of isDebugValue()
Hsiangkai Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 29 07:07:44 PDT 2018
HsiangKai created this revision.
HsiangKai added reviewers: rnk, chenwj.
Herald added a subscriber: JDevlieghere.
Repository:
rL LLVM
https://reviews.llvm.org/D45031
Files:
include/llvm/CodeGen/MachineBasicBlock.h
lib/CodeGen/PatchableFunction.cpp
lib/CodeGen/TwoAddressInstructionPass.cpp
Index: lib/CodeGen/TwoAddressInstructionPass.cpp
===================================================================
--- lib/CodeGen/TwoAddressInstructionPass.cpp
+++ lib/CodeGen/TwoAddressInstructionPass.cpp
@@ -291,7 +291,7 @@
unsigned NumVisited = 0;
for (MachineInstr &OtherMI : make_range(std::next(OldPos), KillPos)) {
// DBG_VALUE cannot be counted against the limit.
- if (OtherMI.isDebugValue())
+ if (OtherMI.isDebugValue() || OtherMI.isDebugLabel())
continue;
if (NumVisited > 30) // FIXME: Arbitrary limit to reduce compile time cost.
return false;
@@ -941,7 +941,7 @@
++KillPos;
for (MachineInstr &OtherMI : make_range(End, KillPos)) {
// DBG_VALUE cannot be counted against the limit.
- if (OtherMI.isDebugValue())
+ if (OtherMI.isDebugValue() || OtherMI.isDebugLabel())
continue;
if (NumVisited > 10) // FIXME: Arbitrary limit to reduce compile time cost.
return false;
@@ -1115,7 +1115,7 @@
for (MachineInstr &OtherMI :
make_range(mi, MachineBasicBlock::iterator(KillMI))) {
// DBG_VALUE cannot be counted against the limit.
- if (OtherMI.isDebugValue())
+ if (OtherMI.isDebugValue() || OtherMI.isDebugLabel())
continue;
if (NumVisited > 10) // FIXME: Arbitrary limit to reduce compile time cost.
return false;
Index: lib/CodeGen/PatchableFunction.cpp
===================================================================
--- lib/CodeGen/PatchableFunction.cpp
+++ lib/CodeGen/PatchableFunction.cpp
@@ -49,6 +49,7 @@
case TargetOpcode::EH_LABEL:
case TargetOpcode::GC_LABEL:
case TargetOpcode::DBG_VALUE:
+ case TargetOpcode::DBG_LABEL:
return true;
}
}
Index: include/llvm/CodeGen/MachineBasicBlock.h
===================================================================
--- include/llvm/CodeGen/MachineBasicBlock.h
+++ include/llvm/CodeGen/MachineBasicBlock.h
@@ -693,7 +693,7 @@
bool IsCond);
/// Find the next valid DebugLoc starting at MBBI, skipping any DBG_VALUE
- /// instructions. Return UnknownLoc if there is none.
+ /// and DBG_LABEL instructions. Return UnknownLoc if there is none.
DebugLoc findDebugLoc(instr_iterator MBBI);
DebugLoc findDebugLoc(iterator MBBI) {
return findDebugLoc(MBBI.getInstrIterator());
@@ -890,7 +890,7 @@
/// const_instr_iterator} and the respective reverse iterators.
template<typename IterT>
inline IterT skipDebugInstructionsForward(IterT It, IterT End) {
- while (It != End && It->isDebugValue())
+ while (It != End && (It->isDebugValue() || It->isDebugLabel()))
It++;
return It;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45031.140230.patch
Type: text/x-patch
Size: 2635 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180329/bc61ef9d/attachment.bin>
More information about the llvm-commits
mailing list