llvm-project/llvm
Pavel Labath f65cfff605 dwarfdump --statistics: Use new location list api
Summary:
This patch removes manual location list handling in the statistics code
and replaces it with the new DWARFDie api, which provides access to a
"cooked" location list. This has the following effects:
- the code now properly handles split-dwarf location lists
- it will automatically support dwarf5 location lists once support for
  those is added
- it properly handles location lists with base address selection entries
- it fixes a bug where the location list code was using the first
  DW_AT_ranges range as a "base address" of the compile unit (it should
  have used DW_AT_low_pc instead. The effect of this was that the
  computation of the start address of a variable in its scope was broken
  for these kinds of compile units. This only manifested itself on
  linked files, since in object files the first DW_AT_ranges range
  normally starts at 0.

Since pretty much every kind of location list was broken in some way,
it's hard to verify that the new implementation is correct -- the output
will be different in all non-trivial cases, and mostly with good reason.

Most of the existing statistics tests continue to pass though, and a
visual inspection of the statistics for non-trivial inputs shows that
the data is more "reasonable" now. I have updated the "dwo statistics"
test to include the new numbers, as the previous ones were completely
bogus, and I have added a targeted test for the "base address" bug.

Reviewers: dblaikie, cmtice, vsk

Subscribers: aprantl, SouraVX, JDevlieghere, djtodoro, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70444
2019-11-21 11:55:21 +01:00
..
benchmarks
bindings [DebugInfo] Remove the DIFlagArgumentNotModified debug info flag 2019-11-20 13:18:40 +01:00
cmake Extends the tblgen macro to allow mlir-tblgen to be installed 2019-11-19 19:28:58 -08:00
docs [docs] Tiny rewording in the portability FAQ entry 2019-11-20 16:40:30 -08:00
examples [ORC] Add a utility to support dumping JIT'd objects to disk for debugging. 2019-11-14 21:27:19 -08:00
include Revert "[Driver] Use VFS to check if sanitizer blacklists exist" 2019-11-21 11:31:14 +01:00
lib [mips] Remove unused `IsPCRelativeLoad` MIPS instructions attribute. NFC 2019-11-21 13:50:14 +03:00
projects
resources
runtimes
test dwarfdump --statistics: Use new location list api 2019-11-21 11:55:21 +01:00
tools dwarfdump --statistics: Use new location list api 2019-11-21 11:55:21 +01:00
unittests Recommit "[DWARF] Add an api to get "interpreted" location lists" 2019-11-20 16:24:11 +01:00
utils gn build: check-clang depends on llvm-cxxfilt. 2019-11-20 16:25:54 -08:00
.arcconfig
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt [cmake] Emit an error for -DBUILD_SHARED_LIBS=ON on Windows 2019-11-14 10:19:02 -08:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

The LLVM Compiler Infrastructure
================================

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 are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.