llvm-6502/test/DebugInfo
Adrian Prantl a65da70a54 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!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226598 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-20 19:42:22 +00:00
..
AArch64 Remove support for DIVariable's FlagIndirectVariable and expect 2015-01-19 17:57:29 +00:00
ARM Remove support for DIVariable's FlagIndirectVariable and expect 2015-01-19 17:57:29 +00:00
COFF IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
Inputs IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
Mips IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
PowerPC
Sparc IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
SystemZ IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
X86 Reapply: Teach SROA how to update debug info for fragmented variables. 2015-01-20 19:42:22 +00:00
2009-10-16-Phi.ll
2009-11-03-InsertExtractValue.ll
2009-11-05-DeadGlobalVariable.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
2009-11-06-NamelessGlobalVariable.ll
2009-11-10-CurrentFn.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
2010-01-05-DbgScope.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
2010-03-12-llc-crash.ll
2010-03-19-DbgDeclare.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
2010-03-24-MemberFn.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
2010-03-30-InvalidDbgInfoCrash.ll
2010-04-06-NestedFnDbgInfo.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
2010-04-19-FramePtr.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
2010-05-03-DisableFramePtr.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
2010-05-03-OriginDIE.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
2010-05-10-MultipleCU.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
2010-06-29-InlinedFnLocalVar.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
2010-07-19-Crash.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
2010-10-01-crash.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
arm-relocs.test
array.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
block-asan.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
bug_null_debuginfo.ll
constant-pointers.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
cross-cu-inlining.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
cross-cu-linkonce-distinct.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
cross-cu-linkonce.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
cu-range-hole.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
dead-argument-order.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
debug-info-always-inline.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
debug-info-qualifiers.ll Remove support for DIVariable's FlagIndirectVariable and expect 2015-01-19 17:57:29 +00:00
debuginfofinder-multiple-cu.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
debuglineinfo.test
duplicate_inline.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
dwarfdump-accel.test
dwarfdump-debug-frame-simple.test
dwarfdump-debug-loc-simple.test
dwarfdump-dump-flags.test
dwarfdump-line-dwo.test
dwarfdump-objc.test
dwarfdump-pubnames.test
dwarfdump-ranges.test
dwarfdump-type-units.test
dwarfdump-zlib.test
empty.ll
enum-types.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
enum.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
global.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
gmlt.test
incorrect-variable-debugloc1.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
incorrect-variable-debugloc.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
inheritance.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
inline-debug-info-multiret.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
inline-debug-info.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
inline-no-debug-info.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
inline-scopes.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
inlined-arguments.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
inlined-vars.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
llvm-symbolizer-zlib.test
llvm-symbolizer.test
lto-comp-dir.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
member-order.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
member-pointers.ll
member-pointers.o
missing-abstract-variable.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
missing-abstract-variable.o
multiline.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
namespace_function_definition.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
namespace_inline_function_definition.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
namespace.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
nodebug.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
PR20038.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
restrict.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
sugared-constants.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
template-recursive-void.ll
tu-composite.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
tu-member-pointer.ll
two-cus-from-same-file.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
typedef.ll
unconditional-branch.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
varargs.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
version.ll IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00