[PATCH] D109758: [StackColoring] Fix a debug invariance problem
Bjorn Pettersson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 14 10:25:12 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGcd2bff1ef105: [StackColoring] Fix a debug invariance problem (authored by bjope).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109758/new/
https://reviews.llvm.org/D109758
Files:
llvm/lib/CodeGen/StackColoring.cpp
llvm/test/CodeGen/X86/StackColoring-dbg-invariance.mir
Index: llvm/test/CodeGen/X86/StackColoring-dbg-invariance.mir
===================================================================
--- llvm/test/CodeGen/X86/StackColoring-dbg-invariance.mir
+++ llvm/test/CodeGen/X86/StackColoring-dbg-invariance.mir
@@ -74,9 +74,9 @@
; CHECK-LABEL: name: test_1
; CHECK: liveins: $edi
- ; CHECK: DBG_VALUE %stack.1.a4, $noreg, !9, !DIExpression(), debug-location !11
+ ; CHECK: DBG_VALUE %stack.0.a1, $noreg, !9, !DIExpression(), debug-location !11
; CHECK: [[LEA64r:%[0-9]+]]:gr64 = LEA64r %stack.0.a1, 1, $noreg, 0, $noreg
- ; CHECK: [[LEA64r1:%[0-9]+]]:gr64 = LEA64r %stack.1.a4, 1, $noreg, 0, $noreg
+ ; CHECK: [[LEA64r1:%[0-9]+]]:gr64 = LEA64r %stack.0.a1, 1, $noreg, 0, $noreg
; CHECK: RET 0
DBG_VALUE %stack.3.a4, $noreg, !9, !DIExpression(), debug-location !11
LIFETIME_START %stack.3.a4
Index: llvm/lib/CodeGen/StackColoring.cpp
===================================================================
--- llvm/lib/CodeGen/StackColoring.cpp
+++ llvm/lib/CodeGen/StackColoring.cpp
@@ -687,6 +687,8 @@
// Walk the instructions in the block to look for start/end ops.
for (MachineInstr &MI : *MBB) {
+ if (MI.isDebugInstr())
+ continue;
if (MI.getOpcode() == TargetOpcode::LIFETIME_START ||
MI.getOpcode() == TargetOpcode::LIFETIME_END) {
int Slot = getStartOrEndSlot(MI);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109758.372509.patch
Type: text/x-patch
Size: 1401 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210914/7f5b82d4/attachment.bin>
More information about the llvm-commits
mailing list