1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 13:33:37 +02:00
llvm-mirror/test/DebugInfo/X86
Adrian Prantl 5def96f7e9 Reapply: Teach SROA how to update debug info for fragmented variables.
This reapplies r225379.

ChangeLog:
- The assertion that this commit previously ran into about the inability
  to handle indirect variables has since been removed and the backend
  can handle this now.
- Testcases were upgrade to the new MDLocation format.
- Instead of keeping a DebugDeclares map, we now use
  llvm::FindAllocaDbgDeclare().

Original commit message follows.

Debug info: Teach SROA how to update debug info for fragmented variables.
This allows us to generate debug info for extremely advanced code such as

 typedef struct { long int a; int b;} S;

 int foo(S s) {
   return s.b;
 }

which at -O1 on x86_64 is codegen'd into

 define i32 @foo(i64 %s.coerce0, i32 %s.coerce1) #0 {
   ret i32 %s.coerce1, !dbg !24
 }

with this patch we emit the following debug info for this

 TAG_formal_parameter [3]
   AT_location( 0x00000000
                0x0000000000000000 - 0x0000000000000006: rdi, piece 0x00000008, rsi, piece 0x00000004
                0x0000000000000006 - 0x0000000000000008: rdi, piece 0x00000008, rax, piece 0x00000004 )
                AT_name( "s" )
                AT_decl_file( "/Volumes/Data/llvm/_build.ninja.release/test.c" )

Thanks to chandlerc, dblaikie, and echristo for their feedback on all
previous iterations of this patch!

llvm-svn: 226598
2015-01-20 19:42:22 +00:00
..
2010-04-13-PubType.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
2010-08-10-DbgConstant.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
2011-09-26-GlobalVarContext.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
2011-12-16-BadStructRef.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
aligned_stack_var.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
arange.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
arguments.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
array2.ll Reapply: Teach SROA how to update debug info for fragmented variables. 2015-01-20 19:42:22 +00:00
array.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
asm-macro-line-number.s IAS: correct debug line info for asm macros 2014-12-24 06:32:43 +00:00
block-capture.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
byvalstruct.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
c-type-units.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
coff_debug_info_type.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
coff_relative_names.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
concrete_out_of_line.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
constant-aggregate.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
cu-ranges-odr.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
cu-ranges.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
data_member_location.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
dbg_value_direct.ll Remove support for DIVariable's FlagIndirectVariable and expect 2015-01-19 17:57:29 +00:00
dbg-asm.s
dbg-at-specficiation.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
dbg-byval-parameter.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
dbg-const-int.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
dbg-const.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
dbg-declare-arg.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
dbg-declare.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
dbg-file-name.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
dbg-i128-const.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
dbg-merge-loc-entry.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
dbg-prolog-end.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
dbg-subrange.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
dbg-value-const-byref.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
dbg-value-dag-combine.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
dbg-value-inlined-parameter.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
dbg-value-isel.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
dbg-value-location.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
dbg-value-range.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
dbg-value-terminator.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
debug_frame.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
debug-dead-local-var.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
debug-info-access.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
debug-info-block-captured-self.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
debug-info-blocks.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
debug-info-static-member.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
debug-loc-asan.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
debug-loc-offset.ll Remove support for DIVariable's FlagIndirectVariable and expect 2015-01-19 17:57:29 +00:00
debug-ranges-offset.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
decl-derived-member.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
discriminator.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
DW_AT_byte_size.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
DW_AT_linkage_name.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
DW_AT_location-reference.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
DW_AT_object_pointer.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
DW_AT_specification.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
DW_AT_stmt_list_sec_offset.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
DW_TAG_friend.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
dwarf-aranges-no-dwarf-labels.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
dwarf-aranges.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
dwarf-public-names.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
dwarf-pubnames-split.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
earlydup-crash.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
elf-names.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
empty-and-one-elem-array.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
empty-array.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
ending-run.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
enum-class.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
enum-fwd-decl.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
fission-cu.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
fission-hash.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
fission-inline.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
fission-ranges.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
formal_parameter.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
generate-odr-hash.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
ghost-sdnode-dbgvalues.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
gmlt.test llvm/test/DebugInfo/X86/gmlt.test: Get rid of %llc_dwarf. It should not be used with -mtriple. 2014-10-01 00:29:16 +00:00
gnu-public-names-empty.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
gnu-public-names.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
inline-member-function.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
inline-seldag-test.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
instcombine-instrinsics.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
lexical_block.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
line-info.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
linkage-name.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
lit.local.cfg
low-pc-cu.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
main-file-name.s
memberfnptr.ll Debug Info: In symmetry to DW_TAG_pointer_type, do not emit the byte size 2014-12-24 01:17:51 +00:00
misched-dbg-value.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
multiple-aranges.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
multiple-at-const-val.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
nodebug_with_debug_loc.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
nondefault-subrange-array.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
objc-fwd-decl.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
objc-property-void.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
op_deref.ll Remove support for DIVariable's FlagIndirectVariable and expect 2015-01-19 17:57:29 +00:00
parameters.ll Remove support for DIVariable's FlagIndirectVariable and expect 2015-01-19 17:57:29 +00:00
pieces-1.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
pieces-2.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
pieces-3.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
pointer-type-size.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
pr11300.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
pr12831.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
pr13303.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
pr19307.ll Remove support for DIVariable's FlagIndirectVariable and expect 2015-01-19 17:57:29 +00:00
processes-relocations.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
prologue-stack.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
recursive_inlining.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
ref_addr_relocation.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
reference-argument.ll Remove support for DIVariable's FlagIndirectVariable and expect 2015-01-19 17:57:29 +00:00
rvalue-ref.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
sret.ll Remove support for DIVariable's FlagIndirectVariable and expect 2015-01-19 17:57:29 +00:00
sroasplit-1.ll Reapply: Teach SROA how to update debug info for fragmented variables. 2015-01-20 19:42:22 +00:00
sroasplit-2.ll Reapply: Teach SROA how to update debug info for fragmented variables. 2015-01-20 19:42:22 +00:00
sroasplit-3.ll Reapply: Teach SROA how to update debug info for fragmented variables. 2015-01-20 19:42:22 +00:00
stmt-list-multiple-compile-units.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
stmt-list.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
stringpool.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
struct-loc.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
subrange-type.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
subreg.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
subregisters.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
template.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
tls.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
type_units_with_addresses.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
union-template.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
vector.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
vla.ll Remove support for DIVariable's FlagIndirectVariable and expect 2015-01-19 17:57:29 +00:00