LLVM backend for 6502
Go to file
Chandler Carruth d5bce3cab0 [LPM] Rip all of ManagedStatic and ThreadLocal out of the pretty stack
tracing code.

Managed static was just insane overhead for this. We took memory fences
and external function calls in every path that pushed a pretty stack
frame. This includes a multitude of layers setting up and tearing down
passes, the parser in Clang, everywhere. For the regression test suite
or low-overhead JITs, this was contributing to really significant
overhead.

Even the LLVM ThreadLocal is really overkill here because it uses
pthread_{set,get}_specific logic, and has careful code to both allocate
and delete the thread local data. We don't actually want any of that,
and this code in particular has problems coping with deallocation. What
we want is a single TLS pointer that is valid to use during global
construction and during global destruction, any time we want. That is
exactly what every host compiler and OS we use has implemented for
a long time, and what was standardized in C++11. Even though not all of
our host compilers support the thread_local keyword, we can directly use
the platform-specific keywords to get the minimal functionality needed.
Provided this limited trial survives the build bots, I will move this to
Compiler.h so it is more widely available as a light weight if limited
alternative to the ThreadLocal class. Many thanks to David Majnemer for
helping me think through the implications across platforms and craft the
MSVC-compatible syntax.

The end result is *substantially* faster. When running llc in a tight
loop over a small IR file targeting the aarch64 backend, this improves
its performance by over 10% for me. It also seems likely to fix the
remaining regressions seen by JIT users with threading enabled.

This may actually have more impact on real-world compile times due to
the use of the pretty stack tracing utility throughout the rest of Clang
or LLVM, but I've not collected any detailed measurements.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227300 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-28 09:52:14 +00:00
autoconf Teach the autoconf machinery about the PS4 triple. 2015-01-26 15:25:05 +00:00
bindings IR: Return unique_ptr from MDNode::getTemporary() 2015-01-19 21:30:18 +00:00
cmake Add cmake flag LLVM_USE_SANITIZE_COVERAGE 2015-01-27 17:59:28 +00:00
docs Introduce a section to the programmers manual about type hierarchies, 2015-01-28 03:04:54 +00:00
examples Reorder. 2015-01-19 00:35:33 +00:00
include [LPM] A targeted but somewhat horrible fix to the legacy pass manager's 2015-01-28 09:47:21 +00:00
lib [LPM] Rip all of ManagedStatic and ThreadLocal out of the pretty stack 2015-01-28 09:52:14 +00:00
projects
test Fold fcmp in cases where value is provably non-negative. By Arch Robison. 2015-01-28 08:03:58 +00:00
tools llvm-ar: Remove unimplemented -N option from -help 2015-01-28 06:00:01 +00:00
unittests Revert r227247 and r227228: "Add weak symbol support to RuntimeDyld". 2015-01-28 01:30:37 +00:00
utils Move DataLayout back to the TargetMachine from TargetSubtargetInfo 2015-01-26 19:03:15 +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 BPF backend 2015-01-24 17:51:26 +00:00
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.