Monday, June 9, 2014

Welcome to the twenty-third issue of LLVM Weekly, a weekly newsletter
(published every Monday) covering developments in LLVM, Clang, and related
projects.
LLVM Weekly is brought to you by Alex Bradbury.
Subscribe to future issues at http://llvmweekly.org and pass it on to anyone
else you think may be interested. Please send any tips or feedback to
asb@asbradbury.org, or
@llvmweekly or @asbradbury on Twitter.

News and articles from around the web

Philip Reames has announced that code for late safepoint placement is now
available.
This is a set of patches to LLVM from Azul Systems that aim to support precise
relocating garbage collection in LLVM. Phlip has a long list of questions
where he is seeking feedback from the community on how to move forwards with
these patches. There's not been much response so far, hopefully it will come
soon as I know there are many communities who are very interested in seeing
better GC support in LLVM (e.g. Rust, Ocaml).

LunarG have announced the Glassy Mesa
project. This project, funded by Valve, will
explore increasing game performance in Mesa through improvements in the shader
compiler. The current parser and optimisation layer are replaced with glslang
and the LLVM-based LunarGlass. More technical details are available in the
slide
deck.

Sébastien Métrot has released xspray, a
frontend for lldb on OS X. One of its interesting features is the inbuilt
support for plotting your data.

On the mailing lists

Zachary Tuner has started a discussion on multi-threading and mutexes in
LLVM,
following from his patches (currently in review) that tries to replace LLVM's
own mutex implementation with std::mutex and std::recursive_mutex. The key
questions are whether multi-threading should be a compile-time or tunetime
parameter, what should happen if you attempt to acquire a mutex in an app with
threading disabled, and whether debugging code for finding deadlocks should be
included.

LLVM commits

The jumptable attribute has been introduced. If you mark a function with
this attribute, references to it can be rewritten with a reference to the
appropriate jump-instruction-table function pointer.
r210280.

GlobalAlias can now point to an arbitrary ConstantExpression. See the commit
message for a discussion of the consequences of this.
r210062.

The subword level parallelism (SLP) vectorizer has been extended to support
vectorization of getelementptr expressions.
r210342.

The LLVM programmer's manual has been improved with an example of using
IRBuilder. r210354.

Clang commits

Semantic analysis to make sure a loop is in OpenMP canonical form has been
committed. r210095.

__builtin_operator_new and __builtin_operator_delete have been added.
Some optimisations are allowed on these which would not be on ::operator new
and are intended for the implementation of things like std::allocator.
r210137.

New pragmas have been introduced to give optimisation hints for
vectorization and interleaving. You can now use #pragma clang loop
vectorize(enable) as well as vectorize(disable), vectorize_width(n),
interleave(enable/disable), and interleave_count(n).
r210330.

Support for the MSVC++ ABI continues with the addition of dynamic_cast for
MS. r210377.

Support for global named registers has been expanded slightly to allow
pointer types to be held in these variables.
r210274.