LLVM backend for 6502
Go to file
David Blaikie 0d9056d766 DebugInfo: Assert that DbgVariables have associated DIEs
This was previously committed in r209680 and reverted in r209683 after
it caused sanitizer builds to crash.

The issue seems to be that the DebugLoc associated with dbg.value IR
intrinsics isn't necessarily accurate. Instead, we duplicate the
DIVariables and add an InlinedAt field to them to record their
location.

We were using this InlinedAt field to compute the LexicalScope for the
variable, but not using it in the abstract DbgVariable construction and
mapping. This resulted in a formal parameter to the current concrete
function, correctly having no InlinedAt information, but incorrectly
having a DebugLoc that described an inlined location within the
function... thus an abstract DbgVariable was created for the variable,
but its DIE was never constructed (since the LexicalScope had no such
variable). This DbgVariable was silently ignored (by testing for a
non-null DIE on the abstract DbgVariable).

So, fix this by using the right scoping information when constructing
abstract DbgVariables.

In the long run, I suspect we want to undo the work that added this
second kind of location tracking and fix the places where the DebugLoc
propagation on the dbg.value intrinsic fails. This will shrink debug
info (by not duplicating DIVariables), make it more efficient (by not
having to construct new DIVariable metadata nodes to try to map back to
a single variable), and benefit all instructions.

But perhaps there are insurmountable issues with DebugLoc quality that
I'm unaware of... I just don't know how we can't /just keep the DebugLoc
from the dbg.declare to the dbg.values and never get this wrong/.

Some history context:

http://llvm.org/viewvc/llvm-project?view=revision&revision=135629
http://llvm.org/viewvc/llvm-project?view=revision&revision=137253

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209984 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-01 03:38:13 +00:00
autoconf Don't hard-code ld when extracting host linker version, use ${LD} if 2014-05-28 15:12:55 +00:00
bindings
cmake AArch64/ARM64: move ARM64 into AArch64's place 2014-05-24 12:50:23 +00:00
docs fixed more typos 2014-05-30 21:18:13 +00:00
examples
include ExecutionEngine: avoid NDEBUG in headers 2014-05-31 21:26:17 +00:00
lib DebugInfo: Assert that DbgVariables have associated DIEs 2014-06-01 03:38:13 +00:00
projects
test DebugInfo: Assert that DbgVariables have associated DIEs 2014-06-01 03:38:13 +00:00
tools [yaml2obj] Add new command line option -docnum. 2014-05-31 04:51:07 +00:00
unittests Use error_code() instead of error_code::succes() 2014-05-31 01:37:45 +00:00
utils really fix the windows build. 2014-05-31 03:40:00 +00:00
.arcconfig
.clang-format
.gitignore
CMakeLists.txt AArch64/ARM64: move ARM64 into AArch64's place 2014-05-24 12:50:23 +00:00
CODE_OWNERS.TXT ARM Linux support 2014-04-02 23:03:28 +00:00
configure Don't hard-code ld when extracting host linker version, use ${LD} if 2014-05-28 15:12:55 +00:00
CREDITS.TXT Update Credits. 2014-05-29 19:59:58 +00:00
LICENSE.TXT
llvm.spec.in
LLVMBuild.txt Remove the very substantial, largely unmaintained legacy PGO 2013-10-02 15:42:23 +00:00
Makefile
Makefile.common
Makefile.config.in
Makefile.rules
README.txt Trivial test commit. 2014-04-26 19:05:45 +00:00

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

This directory and its subdirectories contain source code for the Low Level
Virtual Machine, 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.