llvm-project/llvm/test/DebugInfo/COFF
David Stenberg 9dbeca3d77 [DebugInfo] Stop changing labels for register-described parameter DBG_VALUEs
Summary:
This is a follow-up to D57510. This patch stops DebugHandlerBase from
changing the starting label for the first non-overlapping,
register-described parameter DBG_VALUEs to the beginning of the
function. That code did not consider what defined the registers, which
could result in the ranges for the debug values starting before their
defining instructions. We currently do not emit debug values for
constant values directly at the start of the function, so this code is
still useful for such values, but my intention is to remove the code
from DebugHandlerBase completely when we get there. One reason for
removing it is that the code violates the history map's ranges, which I
think can make it quite confusing when troubleshooting.

In D57510, PrologEpilogInserter was amended so that parameter DBG_VALUEs
now are kept at the start of the entry block, even after emission of
prologue code. That was done to reduce the degradation of debug
completeness from this patch. PR40638 is another example, where the
lexical-scope trimming that LDV does, in combination with scheduling,
results in instructions after the prologue being left without locations.
There might be other cases where the DBG_VALUEs are pushed further down,
for which the DebugHandlerBase code may be helpful, but as it now quite
often result in incorrect locations, even after the prologue, it seems
better to remove that code, and try to work our way up with accurate
locations.

In the long run we should maybe not aim to provide accurate locations
inside the prologue. Some single location descriptions, at least those
referring to stack values, generate inaccurate values inside the
epilogue, so we maybe should not aim to achieve accuracy for location
lists. However, it seems that we now emit line number programs that can
result in GDB and LLDB stopping inside the prologue when doing line
number stepping into functions. See PR40188 for more information.

A summary of some of the changed test cases is available in PR40188#c2.

Reviewers: aprantl, dblaikie, rnk, jmorse

Reviewed By: aprantl

Subscribers: jdoerfert, jholewinski, jvesely, javed.absar, llvm-commits

Tags: #debug-info, #llvm

Differential Revision: https://reviews.llvm.org/D57511

llvm-svn: 353928
2019-02-13 09:34:07 +00:00
..
anonymous-struct.ll
array-odr-violation.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
asan-module-ctor.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
asan-module-without-functions.ll Rename __asan_gen_* symbols to ___asan_gen_*. 2018-07-18 22:23:14 +00:00
asm.ll [codeview] Emit S_FRAMEPROC and use S_DEFRANGE_FRAMEPOINTER_REL 2018-10-01 21:59:45 +00:00
big-type.ll
bitfields.ll [CodeView] Omit forward references for unnamed structs and unions 2018-06-11 01:39:34 +00:00
build-info.ll [codeview] Emit S_BUILDINFO and LF_BUILDINFO with cwd and source file 2018-10-12 18:19:06 +00:00
comdat.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
const-unnamed-member.ll [AsmPrinter] Handle qualified unnamed types in CodeView printer 2018-02-27 21:48:41 +00:00
cpp-mangling.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
defer-complete-type.ll [CodeView] Don't print PointerAttributes when dumping. 2018-11-20 00:10:27 +00:00
dlang.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
enum-co.ll Remove irrelevant references to legacy git repositories from 2019-01-15 16:18:52 +00:00
enum.ll CodeGen: Don't try to canonicalize Unix-style paths in CodeView debug info. 2018-04-11 18:24:03 +00:00
fp-stack.ll [DebugInfo] Stop changing labels for register-described parameter DBG_VALUEs 2019-02-13 09:34:07 +00:00
fpo-argsize.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
fpo-csrs.ll [codeview] Improve readobj FPO dumper and pdbutil register names 2018-09-07 18:48:27 +00:00
fpo-funclet.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
fpo-realign-alloca.ll [codeview] Fix 32-bit x86 variable locations in realigned stack frames 2018-10-02 16:43:52 +00:00
fpo-realign-vframe.ll [codeview] Let the X86 backend tell us the VFRAME offset adjustment 2018-11-03 00:41:52 +00:00
fpo-shrink-wrap.ll [codeview] Improve readobj FPO dumper and pdbutil register names 2018-09-07 18:48:27 +00:00
fpo-stack-protect.ll [DebugInfo] Stop changing labels for register-described parameter DBG_VALUEs 2019-02-13 09:34:07 +00:00
frameproc-flags.ll [EH] Rename llvm.x86.seh.recoverfp intrinsic to llvm.eh.recoverfp 2019-01-16 00:37:13 +00:00
function-options.ll Remove irrelevant references to legacy git repositories from 2019-01-15 16:18:52 +00:00
global-dllimport.ll
global-type-hashes.ll [CodeView] Mark this pointers as const. 2018-11-20 22:13:23 +00:00
global_visibility.ll [CodeView] Emit global variables within lexical scopes to limit visibility 2018-12-20 17:33:45 +00:00
globals-discarded.ll
globals.ll [CodeView] Don't print PointerAttributes when dumping. 2018-11-20 00:10:27 +00:00
inheritance.ll [CodeView] Improve debugging of virtual base class member variables 2018-05-14 21:21:22 +00:00
inlining-files.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
inlining-header.ll [codeview] Clean up machinery for deferring .cv_loc emission 2018-08-28 23:25:59 +00:00
inlining-levels.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
inlining-padding.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
inlining-same-name.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
inlining.ll [codeview] Clean up machinery for deferring .cv_loc emission 2018-08-28 23:25:59 +00:00
int8-char-type.ll
lambda.ll [CodeView] Omit forward references for unnamed structs and unions 2018-06-11 01:39:34 +00:00
lexicalblock.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
lines-bb-start.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
lines-difile.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
lit.local.cfg
local-constant.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
local-variable-gap.ll [codeview] Use push_macro to avoid conflicts instead of a prefix 2018-08-16 17:34:31 +00:00
local-variables.ll [codeview] Emit S_FRAMEPROC and use S_DEFRANGE_FRAMEPOINTER_REL 2018-10-01 21:59:45 +00:00
long-name.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
long-type-name.ll
multifile.ll [codeview] Emit S_FRAMEPROC and use S_DEFRANGE_FRAMEPOINTER_REL 2018-10-01 21:59:45 +00:00
multifunction.ll [codeview] Align symbol records to save 441MB during linking clang.pdb 2018-12-18 01:14:05 +00:00
nested-types.ll [CodeView] Emit UdtSourceLine information for enums 2018-03-06 18:20:22 +00:00
no-cus.ll
parameter-order.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
pieces.ll [DebugInfo] Stop changing labels for register-described parameter DBG_VALUEs 2019-02-13 09:34:07 +00:00
pr28747.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
pr37492.ll [codeview] Include record prefix in global type hashing 2018-05-17 20:47:22 +00:00
purge-typedef-udts.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
register-variables.ll [DebugInfo] Keep parameter DBG_VALUEs before prologue code 2019-02-12 10:51:27 +00:00
retained-types.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
scopes.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
simple.ll [codeview] Align symbol records to save 441MB during linking clang.pdb 2018-12-18 01:14:05 +00:00
static-methods.ll [CodeView] Mark this pointers as const. 2018-11-20 22:13:23 +00:00
synthetic.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
tail-call-without-lexical-scopes.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
thunk.ll [codeview] Align symbol records to save 441MB during linking clang.pdb 2018-12-18 01:14:05 +00:00
type-quals.ll [CodeView] Emit global variables within lexical scopes to limit visibility 2018-12-20 17:33:45 +00:00
typedef.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
types-array-advanced.ll [CodeView] Don't print PointerAttributes when dumping. 2018-11-20 00:10:27 +00:00
types-array-unsized.ll
types-array.ll [codeview] Emit S_FRAMEPROC and use S_DEFRANGE_FRAMEPOINTER_REL 2018-10-01 21:59:45 +00:00
types-basic.ll [CodeView] Mark this pointers as const. 2018-11-20 22:13:23 +00:00
types-calling-conv.ll [CodeView] Mark this pointers as const. 2018-11-20 22:13:23 +00:00
types-cvarargs.ll [codeview] Align symbol records to save 441MB during linking clang.pdb 2018-12-18 01:14:05 +00:00
types-data-members.ll [CodeView] Mark this pointers as const. 2018-11-20 22:13:23 +00:00
types-empty-member-fn.ll [CodeView] Allow empty types in member functions 2019-01-23 00:53:22 +00:00
types-method-ref-qualifiers.ll [CodeView] Add support for ref-qualified member functions. 2018-11-20 22:13:43 +00:00
types-nested-class.ll
types-non-virtual-methods.ll [CodeView] Mark this pointers as const. 2018-11-20 22:13:23 +00:00
types-ptr-to-member.ll [CodeView] Don't print PointerAttributes when dumping. 2018-11-20 00:10:27 +00:00
types-recursive-struct.ll [CodeView] Don't print PointerAttributes when dumping. 2018-11-20 00:10:27 +00:00
types-recursive-unnamed.ll [CodeView] Omit forward references for unnamed structs and unions 2018-06-11 01:39:34 +00:00
types-std-nullptr-t.ll [CodeView] Emit the correct TypeIndex for std::nullptr_t. 2018-11-01 04:02:41 +00:00
types-this-not-ptr.ll [codeview] Check if this 'this' type of a method is a pointer 2018-12-26 21:52:17 +00:00
udts-complete.ll [codeview] Align symbol records to save 441MB during linking clang.pdb 2018-12-18 01:14:05 +00:00
udts.ll [codeview] Align symbol records to save 441MB during linking clang.pdb 2018-12-18 01:14:05 +00:00
unnamed.ll [CodeView] Omit forward references for unnamed structs and unions 2018-06-11 01:39:34 +00:00
vframe-csr.ll [codeview] Let the X86 backend tell us the VFRAME offset adjustment 2018-11-03 00:41:52 +00:00
vframe-fpo.ll [codeview] Align symbol records to save 441MB during linking clang.pdb 2018-12-18 01:14:05 +00:00
vftables.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
virtual-method-kinds.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
virtual-methods.ll [CodeView] Mark this pointers as const. 2018-11-20 22:13:23 +00:00
vtable-optzn-array.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00