Skip to content

Commit 418839c

Browse files
Merge pull request #8665 from felipepiovezan/felipe/cherry-pick-x86instrref
[DebugInfo] Temporarily change LDV implementation for X86
2 parents fa31170 + 3599da3 commit 418839c

16 files changed

+37
-36
lines changed

llvm/lib/CodeGen/LiveDebugValues/LiveDebugValues.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,10 @@ bool LiveDebugValues::runOnMachineFunction(MachineFunction &MF) {
130130

131131
bool llvm::debuginfoShouldUseDebugInstrRef(const Triple &T) {
132132
// Enable by default on x86_64, disable if explicitly turned off on cmdline.
133-
if (T.getArch() == llvm::Triple::x86_64 &&
134-
ValueTrackingVariableLocations != cl::boolOrDefault::BOU_FALSE)
135-
return true;
133+
// Work around a crash in Swift async function debug info handling.
134+
//if (T.getArch() == llvm::Triple::x86_64 &&
135+
// ValueTrackingVariableLocations != cl::boolOrDefault::BOU_FALSE)
136+
// return true;
136137

137138
// Enable if explicitly requested on command line.
138139
return ValueTrackingVariableLocations == cl::boolOrDefault::BOU_TRUE;

llvm/test/CodeGen/X86/selection-dag-salvagetrunc.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: llc --stop-after=finalize-isel < %s | FileCheck %s
1+
; RUN: llc --stop-after=finalize-isel -experimental-debug-variable-locations=true < %s | FileCheck %s
22
;
33
; Verify that we can correctly salvage truncate expressions during SelectionDAG.
44
; Fixes LLVM issue #63076.

llvm/test/DebugInfo/MIR/X86/live-debug-values-reg-copy.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RUN: llc -run-pass=livedebugvalues %s -o - | FileCheck %s
1+
# RUN: llc -experimental-debug-variable-locations=true -run-pass=livedebugvalues %s -o - | FileCheck %s
22
#
33
# This test tests tracking variables value transferring from one register to another.
44
# This example is altered additionally in order to test transferring from one float register

llvm/test/DebugInfo/MIR/X86/live-debug-values-stack-clobber.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RUN: llc -mtriple=x86_64-unknown-unknown %s -o - -run-pass=livedebugvalues | FileCheck %s
1+
# RUN: llc -experimental-debug-variable-locations=true -mtriple=x86_64-unknown-unknown %s -o - -run-pass=livedebugvalues | FileCheck %s
22
#
33
# Fix some of PR42772. Consider the code below: the arguments are forced onto
44
# the stack by the FORCE_SPILL macro, and go out of liveness if the

llvm/test/DebugInfo/X86/debug-info-default-template-parameter.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
; return 0;
1414
; }
1515
;
16-
; RUN: llc -filetype=obj -dwarf-version=4 %s -o - | llvm-dwarfdump - --debug-info | FileCheck %s --check-prefixes=DWARF-DUMP,DWARFv4
17-
; RUN: llc -filetype=obj -dwarf-version=4 -strict-dwarf=true %s -o - | llvm-dwarfdump - --debug-info | FileCheck %s --check-prefixes=DWARF-DUMP,STRICT
16+
; RUN: llc -experimental-debug-variable-locations=true -experimental-debug-variable-locations=true -filetype=obj -dwarf-version=4 %s -o - | llvm-dwarfdump - --debug-info | FileCheck %s --check-prefixes=DWARF-DUMP,DWARFv4
17+
; RUN: llc -experimental-debug-variable-locations=true -filetype=obj -dwarf-version=4 -strict-dwarf=true %s -o - | llvm-dwarfdump - --debug-info | FileCheck %s --check-prefixes=DWARF-DUMP,STRICT
1818

1919
; DWARF-DUMP: DW_TAG_class_type
2020
; DWARF-DUMP-LABEL: DW_AT_name ("foo<char, 3, true, 1>")

llvm/test/DebugInfo/X86/instr-ref-flag.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: llc %s -o - -stop-before=finalize-isel -march=x86-64 \
1+
; RUN: llc -experimental-debug-variable-locations=true %s -o - -stop-before=finalize-isel -march=x86-64 \
22
; RUN: | FileCheck %s --check-prefixes=INSTRREFON
33
; RUN: llc %s -o - -stop-before=finalize-isel -march=x86-64 \
44
; RUN: -experimental-debug-variable-locations=true \

llvm/test/DebugInfo/X86/instr-ref-opt-bisect.ll

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
; RUN: llc %s -o - -stop-after=livedebugvalues -opt-bisect-limit=0 \
1+
; RUN: llc -experimental-debug-variable-locations=true %s -o - -stop-after=livedebugvalues -opt-bisect-limit=0 \
22
; RUN: | FileCheck %s
3-
; RUN: llc %s -o - -stop-after=livedebugvalues -opt-bisect-limit=10 \
3+
; RUN: llc -experimental-debug-variable-locations=true %s -o - -stop-after=livedebugvalues -opt-bisect-limit=10 \
44
; RUN: | FileCheck %s
5-
; RUN: llc %s -o - -stop-after=livedebugvalues -opt-bisect-limit=20 \
5+
; RUN: llc -experimental-debug-variable-locations=true %s -o - -stop-after=livedebugvalues -opt-bisect-limit=20 \
66
; RUN: | FileCheck %s
7-
; RUN: llc %s -o - -stop-after=livedebugvalues -opt-bisect-limit=30 \
7+
; RUN: llc -experimental-debug-variable-locations=true %s -o - -stop-after=livedebugvalues -opt-bisect-limit=30 \
88
; RUN: | FileCheck %s
9-
; RUN: llc %s -o - -stop-after=livedebugvalues -opt-bisect-limit=40 \
9+
; RUN: llc -experimental-debug-variable-locations=true %s -o - -stop-after=livedebugvalues -opt-bisect-limit=40 \
1010
; RUN: | FileCheck %s
11-
; RUN: llc %s -o - -stop-after=livedebugvalues -opt-bisect-limit=100 \
11+
; RUN: llc -experimental-debug-variable-locations=true %s -o - -stop-after=livedebugvalues -opt-bisect-limit=100 \
1212
; RUN: | FileCheck %s
1313
;; Test fast-isel for good measure too,
14-
; RUN: llc %s -o - -stop-after=livedebugvalues -fast-isel=true \
14+
; RUN: llc -experimental-debug-variable-locations=true %s -o - -stop-after=livedebugvalues -fast-isel=true \
1515
; RUN: | FileCheck %s
16-
; RUN: llc %s -o - -stop-after=livedebugvalues -fast-isel=true \
16+
; RUN: llc -experimental-debug-variable-locations=true %s -o - -stop-after=livedebugvalues -fast-isel=true \
1717
; RUN: -opt-bisect-limit=0 | FileCheck %s
18-
; RUN: llc %s -o - -stop-after=livedebugvalues -fast-isel=true \
18+
; RUN: llc -experimental-debug-variable-locations=true %s -o - -stop-after=livedebugvalues -fast-isel=true \
1919
; RUN: -opt-bisect-limit=10 | FileCheck %s
20-
; RUN: llc %s -o - -stop-after=livedebugvalues -fast-isel=true \
20+
; RUN: llc -experimental-debug-variable-locations=true %s -o - -stop-after=livedebugvalues -fast-isel=true \
2121
; RUN: -opt-bisect-limit=100 | FileCheck %s
2222

2323
; The function below should be optimised with the "default" optimisation level.

llvm/test/DebugInfo/X86/live-debug-values-expr-conflict.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: llc %s -mtriple=x86_64-unknown-unknown -o - -stop-after=livedebugvalues | FileCheck %s
1+
; RUN: llc %s -mtriple=x86_64-unknown-unknown -o - -stop-after=livedebugvalues -experimental-debug-variable-locations=true | FileCheck %s
22
;
33
; In the C below, 'baz' is re-assigned with a value that gets salvaged, making
44
; it's dbg.value base itself on 'bar', but with a complex expression.

llvm/test/DebugInfo/X86/salvage-add-node-indirect.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 3
2-
; RUN: llc -mtriple=x86_64 %s -start-before=x86-isel -o - -stop-after=x86-isel | FileCheck %s
3-
; RUN: llc --try-experimental-debuginfo-iterators -mtriple=x86_64 %s -start-before=x86-isel -o - -stop-after=x86-isel | FileCheck %s
2+
; RUN: llc -mtriple=x86_64 %s -start-before=x86-isel -o - -stop-after=x86-isel -experimental-debug-variable-locations=true | FileCheck %s
3+
; RUN: llc --try-experimental-debuginfo-iterators -mtriple=x86_64 %s -start-before=x86-isel -o - -stop-after=x86-isel -experimental-debug-variable-locations=true | FileCheck %s
44

55
; Verify that we don't crash due to attempting to turn the indirect debug value
66
; in @test_non_constant variadic when salvaging the ADD node with non-constant

llvm/test/DebugInfo/assignment-tracking/X86/assignment-tracking-not-enabled.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
; RUN: llc %s -stop-after=finalize-isel -o - \
1+
; RUN: llc %s -stop-after=finalize-isel -o - -experimental-debug-variable-locations=true \
22
; RUN: | FileCheck %s --implicit-check-not=DBG_
33

44

5-
; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
5+
; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - -experimental-debug-variable-locations=true \
66
; RUN: | FileCheck %s --implicit-check-not=DBG_
77

88
;; Check that SelectionDAG downgrades dbg.assigns to dbg.values if assignment

llvm/test/DebugInfo/assignment-tracking/X86/coalesce-cfg.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
; RUN: llc %s -o - -stop-after=finalize-isel \
1+
; RUN: llc %s -o - -stop-after=finalize-isel -experimental-debug-variable-locations=true \
22
; RUN: | FileCheck %s --implicit-check-not=DBG_
33

44

5-
; RUN: llc --try-experimental-debuginfo-iterators %s -o - -stop-after=finalize-isel \
5+
; RUN: llc --try-experimental-debuginfo-iterators %s -o - -stop-after=finalize-isel -experimental-debug-variable-locations=true \
66
; RUN: | FileCheck %s --implicit-check-not=DBG_
77

88
;; Test coalescing of contiguous fragments in adjacent location definitions.

llvm/test/DebugInfo/assignment-tracking/X86/coalesce-simple.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
; RUN: llc %s -o - -stop-after=finalize-isel \
1+
; RUN: llc %s -o - -stop-after=finalize-isel -experimental-debug-variable-locations=true \
22
; RUN: | FileCheck %s --implicit-check-not=DBG_
3-
; RUN: llc --try-experimental-debuginfo-iterators %s -o - -stop-after=finalize-isel \
3+
; RUN: llc --try-experimental-debuginfo-iterators %s -o - -stop-after=finalize-isel -experimental-debug-variable-locations=true \
44
; RUN: | FileCheck %s --implicit-check-not=DBG_
55

66
;; Test coalescing of contiguous fragments in adjacent location definitions.

llvm/test/DebugInfo/assignment-tracking/X86/loop-sink.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
; RUN: llc %s -stop-after=finalize-isel -o - \
1+
; RUN: llc %s -stop-after=finalize-isel -o - -experimental-debug-variable-locations=true \
22
; RUN: | FileCheck %s --implicit-check-not=DBG
33

44

5-
; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
5+
; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - -experimental-debug-variable-locations=true \
66
; RUN: | FileCheck %s --implicit-check-not=DBG
77

88
;; Tiny loop with a store sunk out of it:

llvm/test/DebugInfo/assignment-tracking/X86/nested-loop-frags.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
; RUN: llc %s -stop-after=finalize-isel -o - \
1+
; RUN: llc %s -stop-after=finalize-isel -o - -experimental-debug-variable-locations=true \
22
; RUN: | FileCheck %s --implicit-check-not=DBG
33

44

5-
; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
5+
; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - -experimental-debug-variable-locations=true \
66
; RUN: | FileCheck %s --implicit-check-not=DBG
77

88
;; Test a variety of block inputs and lattice configurations for the assignment

llvm/test/DebugInfo/assignment-tracking/X86/order-of-defs.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
; RUN: llc %s -stop-after=finalize-isel -o - \
1+
; RUN: llc %s -stop-after=finalize-isel -o - -experimental-debug-variable-locations=true \
22
; RUN: | FileCheck %s --implicit-check-not=DBG_
33

44

5-
; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
5+
; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - -experimental-debug-variable-locations=true \
66
; RUN: | FileCheck %s --implicit-check-not=DBG_
77

88
;; Ensure that the order of several debug intrinsics between non-debug

llvm/test/DebugInfo/assignment-tracking/X86/use-known-value-at-early-mem-def-2.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
; RUN: llc %s -stop-after=finalize-isel -o - \
1+
; RUN: llc %s -stop-after=finalize-isel -o - -experimental-debug-variable-locations=true \
22
; RUN: | FileCheck %s --implicit-check-not=DBG_VALUE
33

44

5-
; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
5+
; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - -experimental-debug-variable-locations=true \
66
; RUN: | FileCheck %s --implicit-check-not=DBG_VALUE
77

88
;; Check that sandwiching instructions between a linked store and dbg.assign

0 commit comments

Comments
 (0)