llvm-6502/lib
Adrian Prantl e5ca21a2df 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@224739 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-22 22:26:00 +00:00
..
Analysis InstSimplify: Don't bother if getScalarSizeInBits returns zero 2014-12-20 04:45:33 +00:00
AsmParser IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
Bitcode Fix Visual C++ error "'llvm::make_unique' : ambiguous call to overloaded function". 2014-12-18 10:03:35 +00:00
CodeGen [CodeGenPrepare] Handle properly the promotion of operands when this does not 2014-12-22 18:11:52 +00:00
DebugInfo [DebugInfo] Move all DWARF headers to the public include directory. 2014-12-19 18:26:33 +00:00
ExecutionEngine [C API] Expose LLVMGetGlobalValueAddress and LLVMGetFunctionAddress. 2014-12-22 18:53:11 +00:00
IR The leak detector is dead, long live asan and valgrind. 2014-12-22 13:00:36 +00:00
IRReader Remove unused variable. NFC. 2014-11-06 23:16:57 +00:00
LineEditor
Linker Rename MapValue(Metadata*) to MapMetadata() 2014-12-19 06:06:18 +00:00
LTO LTO: Lazy-load LTOModule in local contexts 2014-12-17 22:05:42 +00:00
MC Fix Windows unwind info for functions in sections other than .text 2014-12-22 22:10:08 +00:00
Object Add printing the LC_ROUTINES load commands with llvm-objdump’s -private-headers. 2014-12-19 22:25:22 +00:00
Option
ProfileData llvm-cov: Sink some reporting logic into CoverageMapping 2014-11-14 01:50:32 +00:00
Support Add missing implementation of 'sys::path::is_other' to the support library. 2014-12-18 18:19:47 +00:00
TableGen Clean up static analyzer warnings. 2014-12-12 21:48:03 +00:00
Target [Hexagon] Adding memb instruction. Fixing whitespace in test from 224730. 2014-12-22 21:40:43 +00:00
Transforms Debug info: Teach SROA how to update debug info for fragmented variables. 2014-12-22 22:26:00 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile