[llvm] r332427 - [DebugInfo] Only handle DBG_VALUE in InlineSpiller.
Shiva Chen via llvm-commits
llvm-commits at lists.llvm.org
Tue May 15 19:57:26 PDT 2018
Author: shiva
Date: Tue May 15 19:57:26 2018
New Revision: 332427
URL: http://llvm.org/viewvc/llvm-project?rev=332427&view=rev
Log:
[DebugInfo] Only handle DBG_VALUE in InlineSpiller.
The instructions using registers should be DBG_VALUE and normal
instructions. Use isDebugValue() to filter out DBG_VALUE and add
an assert to ensure there is no other kind of debug instructions
using the registers.
Differential Revision: https://reviews.llvm.org/D46739
Patch by Hsiangkai Wang.
Modified:
llvm/trunk/lib/CodeGen/InlineSpiller.cpp
Modified: llvm/trunk/lib/CodeGen/InlineSpiller.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/InlineSpiller.cpp?rev=332427&r1=332426&r2=332427&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/InlineSpiller.cpp (original)
+++ llvm/trunk/lib/CodeGen/InlineSpiller.cpp Tue May 15 19:57:26 2018
@@ -617,9 +617,12 @@ void InlineSpiller::reMaterializeAll() {
MachineInstr &MI = *RegI++;
// Debug values are not allowed to affect codegen.
- if (MI.isDebugInstr())
+ if (MI.isDebugValue())
continue;
+ assert(!MI.isDebugInstr() && "Did not expect to find a use in debug "
+ "instruction that isn't a DBG_VALUE");
+
anyRemat |= reMaterializeFor(LI, MI);
}
}
@@ -933,7 +936,7 @@ void InlineSpiller::spillAroundUses(unsi
MachineInstr *MI = &*(RegI++);
// Debug values are not allowed to affect codegen.
- if (MI->isDebugInstr()) {
+ if (MI->isDebugValue()) {
// Modify DBG_VALUE now that the value is in a spill slot.
MachineBasicBlock *MBB = MI->getParent();
LLVM_DEBUG(dbgs() << "Modifying debug info due to spill:\t" << *MI);
@@ -942,6 +945,9 @@ void InlineSpiller::spillAroundUses(unsi
continue;
}
+ assert(!MI->isDebugInstr() && "Did not expect to find a use in debug "
+ "instruction that isn't a DBG_VALUE");
+
// Ignore copies to/from snippets. We'll delete them.
if (SnippetCopies.count(MI))
continue;
More information about the llvm-commits
mailing list