Skip to content

[DebugInfo] Temporarily change LDV implementation for X86 #8665

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions llvm/lib/CodeGen/LiveDebugValues/LiveDebugValues.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,10 @@ bool LiveDebugValues::runOnMachineFunction(MachineFunction &MF) {

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

// Enable if explicitly requested on command line.
return ValueTrackingVariableLocations == cl::boolOrDefault::BOU_TRUE;
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/X86/selection-dag-salvagetrunc.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: llc --stop-after=finalize-isel < %s | FileCheck %s
; RUN: llc --stop-after=finalize-isel -experimental-debug-variable-locations=true < %s | FileCheck %s
;
; Verify that we can correctly salvage truncate expressions during SelectionDAG.
; Fixes LLVM issue #63076.
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/DebugInfo/MIR/X86/live-debug-values-reg-copy.mir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RUN: llc -run-pass=livedebugvalues %s -o - | FileCheck %s
# RUN: llc -experimental-debug-variable-locations=true -run-pass=livedebugvalues %s -o - | FileCheck %s
#
# This test tests tracking variables value transferring from one register to another.
# This example is altered additionally in order to test transferring from one float register
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RUN: llc -mtriple=x86_64-unknown-unknown %s -o - -run-pass=livedebugvalues | FileCheck %s
# RUN: llc -experimental-debug-variable-locations=true -mtriple=x86_64-unknown-unknown %s -o - -run-pass=livedebugvalues | FileCheck %s
#
# Fix some of PR42772. Consider the code below: the arguments are forced onto
# the stack by the FORCE_SPILL macro, and go out of liveness if the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
; return 0;
; }
;
; RUN: llc -filetype=obj -dwarf-version=4 %s -o - | llvm-dwarfdump - --debug-info | FileCheck %s --check-prefixes=DWARF-DUMP,DWARFv4
; RUN: llc -filetype=obj -dwarf-version=4 -strict-dwarf=true %s -o - | llvm-dwarfdump - --debug-info | FileCheck %s --check-prefixes=DWARF-DUMP,STRICT
; 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
; 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

; DWARF-DUMP: DW_TAG_class_type
; DWARF-DUMP-LABEL: DW_AT_name ("foo<char, 3, true, 1>")
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/DebugInfo/X86/instr-ref-flag.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: llc %s -o - -stop-before=finalize-isel -march=x86-64 \
; RUN: llc -experimental-debug-variable-locations=true %s -o - -stop-before=finalize-isel -march=x86-64 \
; RUN: | FileCheck %s --check-prefixes=INSTRREFON
; RUN: llc %s -o - -stop-before=finalize-isel -march=x86-64 \
; RUN: -experimental-debug-variable-locations=true \
Expand Down
20 changes: 10 additions & 10 deletions llvm/test/DebugInfo/X86/instr-ref-opt-bisect.ll
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
; RUN: llc %s -o - -stop-after=livedebugvalues -opt-bisect-limit=0 \
; RUN: llc -experimental-debug-variable-locations=true %s -o - -stop-after=livedebugvalues -opt-bisect-limit=0 \
; RUN: | FileCheck %s
; RUN: llc %s -o - -stop-after=livedebugvalues -opt-bisect-limit=10 \
; RUN: llc -experimental-debug-variable-locations=true %s -o - -stop-after=livedebugvalues -opt-bisect-limit=10 \
; RUN: | FileCheck %s
; RUN: llc %s -o - -stop-after=livedebugvalues -opt-bisect-limit=20 \
; RUN: llc -experimental-debug-variable-locations=true %s -o - -stop-after=livedebugvalues -opt-bisect-limit=20 \
; RUN: | FileCheck %s
; RUN: llc %s -o - -stop-after=livedebugvalues -opt-bisect-limit=30 \
; RUN: llc -experimental-debug-variable-locations=true %s -o - -stop-after=livedebugvalues -opt-bisect-limit=30 \
; RUN: | FileCheck %s
; RUN: llc %s -o - -stop-after=livedebugvalues -opt-bisect-limit=40 \
; RUN: llc -experimental-debug-variable-locations=true %s -o - -stop-after=livedebugvalues -opt-bisect-limit=40 \
; RUN: | FileCheck %s
; RUN: llc %s -o - -stop-after=livedebugvalues -opt-bisect-limit=100 \
; RUN: llc -experimental-debug-variable-locations=true %s -o - -stop-after=livedebugvalues -opt-bisect-limit=100 \
; RUN: | FileCheck %s
;; Test fast-isel for good measure too,
; RUN: llc %s -o - -stop-after=livedebugvalues -fast-isel=true \
; RUN: llc -experimental-debug-variable-locations=true %s -o - -stop-after=livedebugvalues -fast-isel=true \
; RUN: | FileCheck %s
; RUN: llc %s -o - -stop-after=livedebugvalues -fast-isel=true \
; RUN: llc -experimental-debug-variable-locations=true %s -o - -stop-after=livedebugvalues -fast-isel=true \
; RUN: -opt-bisect-limit=0 | FileCheck %s
; RUN: llc %s -o - -stop-after=livedebugvalues -fast-isel=true \
; RUN: llc -experimental-debug-variable-locations=true %s -o - -stop-after=livedebugvalues -fast-isel=true \
; RUN: -opt-bisect-limit=10 | FileCheck %s
; RUN: llc %s -o - -stop-after=livedebugvalues -fast-isel=true \
; RUN: llc -experimental-debug-variable-locations=true %s -o - -stop-after=livedebugvalues -fast-isel=true \
; RUN: -opt-bisect-limit=100 | FileCheck %s

; The function below should be optimised with the "default" optimisation level.
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/DebugInfo/X86/live-debug-values-expr-conflict.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: llc %s -mtriple=x86_64-unknown-unknown -o - -stop-after=livedebugvalues | FileCheck %s
; RUN: llc %s -mtriple=x86_64-unknown-unknown -o - -stop-after=livedebugvalues -experimental-debug-variable-locations=true | FileCheck %s
;
; In the C below, 'baz' is re-assigned with a value that gets salvaged, making
; it's dbg.value base itself on 'bar', but with a complex expression.
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/DebugInfo/X86/salvage-add-node-indirect.ll
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 3
; RUN: llc -mtriple=x86_64 %s -start-before=x86-isel -o - -stop-after=x86-isel | FileCheck %s
; RUN: llc --try-experimental-debuginfo-iterators -mtriple=x86_64 %s -start-before=x86-isel -o - -stop-after=x86-isel | FileCheck %s
; RUN: llc -mtriple=x86_64 %s -start-before=x86-isel -o - -stop-after=x86-isel -experimental-debug-variable-locations=true | FileCheck %s
; 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

; Verify that we don't crash due to attempting to turn the indirect debug value
; in @test_non_constant variadic when salvaging the ADD node with non-constant
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: llc %s -stop-after=finalize-isel -o - -experimental-debug-variable-locations=true \
; RUN: | FileCheck %s --implicit-check-not=DBG_


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

;; Check that SelectionDAG downgrades dbg.assigns to dbg.values if assignment
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/DebugInfo/assignment-tracking/X86/coalesce-cfg.ll
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
; RUN: llc %s -o - -stop-after=finalize-isel \
; RUN: llc %s -o - -stop-after=finalize-isel -experimental-debug-variable-locations=true \
; RUN: | FileCheck %s --implicit-check-not=DBG_


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

;; Test coalescing of contiguous fragments in adjacent location definitions.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; RUN: llc %s -o - -stop-after=finalize-isel \
; RUN: llc %s -o - -stop-after=finalize-isel -experimental-debug-variable-locations=true \
; RUN: | FileCheck %s --implicit-check-not=DBG_
; RUN: llc --try-experimental-debuginfo-iterators %s -o - -stop-after=finalize-isel \
; RUN: llc --try-experimental-debuginfo-iterators %s -o - -stop-after=finalize-isel -experimental-debug-variable-locations=true \
; RUN: | FileCheck %s --implicit-check-not=DBG_

;; Test coalescing of contiguous fragments in adjacent location definitions.
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/DebugInfo/assignment-tracking/X86/loop-sink.ll
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: llc %s -stop-after=finalize-isel -o - -experimental-debug-variable-locations=true \
; RUN: | FileCheck %s --implicit-check-not=DBG


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

;; Tiny loop with a store sunk out of it:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: llc %s -stop-after=finalize-isel -o - -experimental-debug-variable-locations=true \
; RUN: | FileCheck %s --implicit-check-not=DBG


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

;; Test a variety of block inputs and lattice configurations for the assignment
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/DebugInfo/assignment-tracking/X86/order-of-defs.ll
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: llc %s -stop-after=finalize-isel -o - -experimental-debug-variable-locations=true \
; RUN: | FileCheck %s --implicit-check-not=DBG_


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

;; Ensure that the order of several debug intrinsics between non-debug
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: llc %s -stop-after=finalize-isel -o - -experimental-debug-variable-locations=true \
; RUN: | FileCheck %s --implicit-check-not=DBG_VALUE


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

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