diff options
author | Adrian Prantl <aprantl@apple.com> | 2015-01-20 19:42:22 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2015-01-20 19:42:22 +0000 |
commit | 565cc18d8fdf8d340752f5fd9a21797295d52b5d (patch) | |
tree | 6fab0b8da6c547abc68d87b9995451bb3d078e9a /llvm/lib/IR/UseListOrder.cpp | |
parent | e99fb65d87d69e805c061cbbc295708d3c62af5a (diff) | |
download | bcm5719-llvm-565cc18d8fdf8d340752f5fd9a21797295d52b5d.tar.gz bcm5719-llvm-565cc18d8fdf8d340752f5fd9a21797295d52b5d.zip |
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
Diffstat (limited to 'llvm/lib/IR/UseListOrder.cpp')
0 files changed, 0 insertions, 0 deletions