LLVM backend for 6502
Go to file
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
autoconf Trunk is now 3.7.0svn 2015-01-14 17:38:03 +00:00
bindings IR: Return unique_ptr from MDNode::getTemporary() 2015-01-19 21:30:18 +00:00
cmake
docs [PM] Split the LoopInfo object apart from the legacy pass, creating 2015-01-17 14:16:18 +00:00
examples Reorder. 2015-01-19 00:35:33 +00:00
include [llvm link] Destroy ConstantArrays in LLVMContext if they are not used. 2015-01-20 19:24:59 +00:00
lib Reapply: Teach SROA how to update debug info for fragmented variables. 2015-01-20 19:42:22 +00:00
projects
test Reapply: Teach SROA how to update debug info for fragmented variables. 2015-01-20 19:42:22 +00:00
tools [PM] Port LoopInfo to the new pass manager, adding both a LoopAnalysis 2015-01-20 10:58:50 +00:00
unittests IR: Canonicalize GenericDwarfNode empty headers to null 2015-01-20 00:58:46 +00:00
utils Replace size method call of containers to empty method where appropriate 2015-01-15 11:41:30 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt Trunk is now 3.7.0svn 2015-01-14 17:38:03 +00:00
CODE_OWNERS.TXT
configure Trunk is now 3.7.0svn 2015-01-14 17:38:03 +00:00
CREDITS.TXT
LICENSE.TXT
llvm.spec.in
LLVMBuild.txt
Makefile
Makefile.common
Makefile.config.in
Makefile.rules
README.txt Check commit access 2015-01-16 19:23:34 +00:00

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you're writing a package for LLVM, see docs/Packaging.rst for our
suggestions.