llvm-project/llvm
David Blaikie 4a60d370e8 bugpoint: disabling symbolication of bugpoint-executed programs
Initial implementation - needs similar work/testing for other tools
bugpoint invokes (llc, lli I think, maybe more).

Alternatively (as suggested by chandlerc@) an environment variable could
be used. This would allow the option to pass transparently through user
scripts, pass to compilers if they happened to be LLVM-ish, etc.

I worry a bit about using cl::opt in the crash handling code - LLVM
might crash early, perhaps before the cl::opt is properly initialized?
Or at least before arguments have been parsed?

 - should be OK since it defaults to "pretty", so if the crash is very
 early in opt parsing, etc, then crash reports will still be symbolized.

I shyed away from doing this with an environment variable when I
realized that would require copying the existing environment and
appending the env variable of interest. But it seems there's no existing
LLVM API for accessing the environment (even the Support tests for
process launching have their own ifdefs for getting the environment). It
could be added, but seemed like a higher bar/untested codepath to
actually add environment variables.

Most importantly, this reduces the runtime of test/BugPoint/metadata.ll
in a split-dwarf Debug build from 1m34s to 6.5s by avoiding a lot of
symbolication. (this wasn't a problem for non-split-dwarf builds only
because the executable was too large to map into memory (due to bugpoint
setting a 400MB memory (including address space - not sure why? Going to
remove that) limit on the child process) so symbolication would fail
fast & wouldn't spend all that time parsing DWARF, etc)

Reviewers: chandlerc, dannyb

Differential Revision: https://reviews.llvm.org/D33804

llvm-svn: 305056
2017-06-09 07:29:03 +00:00
..
bindings [Go] Subtypes function 2017-06-08 07:32:29 +00:00
cmake [cmake] Enable reverse iteration by default through build macro 2017-06-06 00:36:09 +00:00
docs Update release notes for BinaryFormat library. 2017-06-08 17:47:22 +00:00
examples Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
include [LoopVectorize] Don't preserve nsw/nuw flags on shrunken ops. 2017-06-09 03:56:15 +00:00
lib bugpoint: disabling symbolication of bugpoint-executed programs 2017-06-09 07:29:03 +00:00
projects Add temporary workaround to allow in-tree libc++ builds on Windows 2017-05-11 01:44:30 +00:00
resources
runtimes [CMake][runtimes] Add install target for runtimes builtins 2017-06-02 19:38:11 +00:00
test bugpoint: disabling symbolication of bugpoint-executed programs 2017-06-09 07:29:03 +00:00
tools bugpoint: disabling symbolication of bugpoint-executed programs 2017-06-09 07:29:03 +00:00
unittests GlobalsModRef: Ensure optnone+readonly/readnone attributes are respected 2017-06-07 21:37:39 +00:00
utils test-release.sh: Remove workaround for test-suite build 2017-06-08 21:31:59 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt Update the documentation and CMake file for Visual Studio generators. 2017-05-25 21:01:30 +00:00
CODE_OWNERS.TXT
CREDITS.TXT update of the url 2017-05-14 07:55:01 +00:00
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

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