1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
llvm-mirror/test/DebugInfo/ARM
Adrian Prantl f625c157a1 PR32382: Fix emitting complex DWARF expressions.
The DWARF specification knows 3 kinds of non-empty simple location
descriptions:
1. Register location descriptions
  - describe a variable in a register
  - consist of only a DW_OP_reg
2. Memory location descriptions
  - describe the address of a variable
3. Implicit location descriptions
  - describe the value of a variable
  - end with DW_OP_stack_value & friends

The existing DwarfExpression code is pretty much ignorant of these
restrictions. This used to not matter because we only emitted very
short expressions that we happened to get right by accident.  This
patch makes DwarfExpression aware of the rules defined by the DWARF
standard and now chooses the right kind of location description for
each expression being emitted.

This would have been an NFC commit (for the existing testsuite) if not
for the way that clang describes captured block variables. Based on
how the previous code in LLVM emitted locations, DW_OP_deref
operations that should have come at the end of the expression are put
at its beginning. Fixing this means changing the semantics of
DIExpression, so this patch bumps the version number of DIExpression
and implements a bitcode upgrade.

There are two major changes in this patch:

I had to fix the semantics of dbg.declare for describing function
arguments. After this patch a dbg.declare always takes the *address*
of a variable as the first argument, even if the argument is not an
alloca.

When lowering a DBG_VALUE, the decision of whether to emit a register
location description or a memory location description depends on the
MachineLocation — register machine locations may get promoted to
memory locations based on their DIExpression. (Future) optimization
passes that want to salvage implicit debug location for variables may
do so by appending a DW_OP_stack_value. For example:
  DBG_VALUE, [RBP-8]                        --> DW_OP_fbreg -8
  DBG_VALUE, RAX                            --> DW_OP_reg0 +0
  DBG_VALUE, RAX, DIExpression(DW_OP_deref) --> DW_OP_reg0 +0

All testcases that were modified were regenerated from clang. I also
added source-based testcases for each of these to the debuginfo-tests
repository over the last week to make sure that no synchronized bugs
slip in. The debuginfo-tests compile from source and run the debugger.

https://bugs.llvm.org/show_bug.cgi?id=32382
<rdar://problem/31205000>

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

llvm-svn: 300522
2017-04-18 01:21:53 +00:00
..
big-endian-bitfield.ll Renumber testcase metadata nodes after r290153. 2016-12-22 00:45:21 +00:00
big-endian-dump.ll
bitfield.ll Renumber testcase metadata nodes after r290153. 2016-12-22 00:45:21 +00:00
cfi-eof-prologue.ll DebugInfo: Remove MDString-based type references 2016-04-23 21:08:00 +00:00
constant-dbgloc.ll [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
float-args.ll [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
header.ll [ARM] Add ".code 32" to functions in the ARM instruction set 2016-09-13 12:18:15 +00:00
line.test
lit.local.cfg
little-endian-dump.ll
lowerbdgdeclare_vla.ll [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
multiple-constant-uses-drops-dbgloc.ll Renumber testcase metadata nodes after r290153. 2016-12-22 00:45:21 +00:00
partial-subreg.ll Fix an assertion in DwarfExpression when emitting fragments in vector registers 2016-12-22 06:10:41 +00:00
PR16736.ll [ARM] Generate consistent frame records for Thumb2 2016-08-23 09:19:22 +00:00
PR26163.ll [DIExpression] Introduce a dedicated DW_OP_LLVM_fragment operation 2016-12-05 18:04:47 +00:00
processes-relocations.ll
prologue_end.ll CodeGen: avoid emitting unnecessary CFI 2016-07-15 21:10:29 +00:00
s-super-register.ll PR32288: More efficient encoding for DWARF expr subregister access. 2017-03-16 17:14:56 +00:00
selectiondag-deadcode.ll PR32382: Fix emitting complex DWARF expressions. 2017-04-18 01:21:53 +00:00
single-constant-use-preserves-dbgloc.ll Fixup failing debuginfo test for change in SimplifyCFG. 2016-09-11 09:13:32 +00:00
split-complex.ll [DIExpression] Introduce a dedicated DW_OP_LLVM_fragment operation 2016-12-05 18:04:47 +00:00
sroa-complex.ll [DIExpression] Introduce a dedicated DW_OP_LLVM_fragment operation 2016-12-05 18:04:47 +00:00
tls.ll Renumber testcase metadata nodes after r290153. 2016-12-22 00:45:21 +00:00