aboutsummaryrefslogtreecommitdiff
path: root/lldb/packages/Python/lldbsuite/test/bench.py
diff options
context:
space:
mode:
authorJon Chesterfield <jonathanchesterfield@gmail.com>2020-03-17 21:22:04 +0000
committerJon Chesterfield <jonathanchesterfield@gmail.com>2020-03-17 21:22:23 +0000
commitc45eaeabb77a926f4f1cf3c1e9311e9d66e0ee2a (patch)
tree60deb3a34af4d6eca92113199c11cf4d09c6f4a5 /lldb/packages/Python/lldbsuite/test/bench.py
parent1458bb92dffa87f8a2faa546c36f935ddffaa34f (diff)
downloadllvm-c45eaeabb77a926f4f1cf3c1e9311e9d66e0ee2a.zip
llvm-c45eaeabb77a926f4f1cf3c1e9311e9d66e0ee2a.tar.gz
llvm-c45eaeabb77a926f4f1cf3c1e9311e9d66e0ee2a.tar.bz2
[Clang] Undef attribute for global variables
Summary: [Clang] Attribute to allow defining undef global variables Initializing global variables is very cheap on hosted implementations. The C semantics of zero initializing globals work very well there. It is not necessarily cheap on freestanding implementations. Where there is no loader available, code must be emitted near the start point to write the appropriate values into memory. At present, external variables can be declared in C++ and definitions provided in assembly (or IR) to achive this effect. This patch provides an attribute in order to remove this reason for writing assembly for performance sensitive freestanding implementations. A close analogue in tree is LDS memory for amdgcn, where the kernel is responsible for initializing the memory after it starts executing on the gpu. Uninitalized variables in LDS are observably cheaper than zero initialized. Patch is loosely based on the cuda __shared__ and opencl __local variable implementation which also produces undef global variables. Reviewers: kcc, rjmccall, rsmith, glider, vitalybuka, pcc, eugenis, vlad.tsyrklevich, jdoerfert, gregrodgers, jfb, aaron.ballman Reviewed By: rjmccall, aaron.ballman Subscribers: Anastasia, aaron.ballman, davidb, Quuxplusone, dexonsmith, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D74361
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/bench.py')
0 files changed, 0 insertions, 0 deletions