LLVM Weekly - #15, Apr 14th 2014 =============================== If you prefer, you can read a HTML version of this email at <http://llvmweekly.org/issue/15>. Welcome to the 15th 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](http://asbradbury.org). 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 at asbradbury.org>, or @llvmweekly or @asbradbury on Twitter. ## News and articles from around the web Videos are not yet ready, but [most slides from last week's EuroLLVM meeting are now up](http://llvm.org/devmtg/2014-04/). ARM have [announced](http://www.arm.com/about/newsroom/arm-compiler-builds-on-open-source-llvm-technology.php) the release of version 6 of the ARM compiler, which is now built on LLVM and Clang. Philip Reames has [written an update on his work on late safepoint placement](http://www.philipreames.com/Blog/2014/04/10/late-safepoint-placement-an-update/), which is useful for implementing efficient precise garbage collection on LLVM. The bad news is their initial plan did not survive contact with the enemy, though they're hard at work on fixing it and a new update can be expected in good time. As [reported by Phoronix](http://www.phoronix.com/scan.php?page=news_item&px=MTY2MjY), a number of patches towards the goal of compiling the Linux kernel with clang have been [merged](http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09c9b61d5da24174b867a6ffda29b7435e1fda74) by Linus. The first release candidate of GCC 4.9 has been [released](http://article.gmane.org/gmane.comp.gcc.devel/135468). New features in the 4.9 branch are [documented here](http://gcc.gnu.org/gcc-4.9/changes.html). Polly had a meeting via phone call, and [notes of that meeting are available](https://docs.google.com/document/d/12W-qZjiZGEQ_lVrob4OzvKJI3EooonC-ap1b9f9KCUE/edit). The part of most general interest is probably discussion around the potential of merging Polly into the LLVM mainline. ## On the mailing lists * LLVM 3.4.1 has now [entered the testing phase](http://article.gmane.org/gmane.comp.compilers.llvm.devel/72127) and help testing the release would be greatly appreciated. * Tim Northover has [summarised the discussion about merging AArch64 and ARM64 from EuroLLVM]. The view is still in favour of merging from AArch64 to ARM64. Interestingly, [apparently](http://article.gmane.org/gmane.comp.compilers.llvm.devel/71996) Google are working on a framework to build and run benchmarks (something different to [LNT](http://llvm.org/docs/lnt/) I guess). Also of interest are [benchmarks of ARM64 LLVM vs AArch64 LLVM vs GCC 4.9] on Cortex-A53. There's now a [somewhat detailed plan for the merge](http://article.gmane.org/gmane.comp.compilers.llvm.devel/72133) and remaining tasks. * Alon Zakai has shared [some details on his work on a C backend for Emscripten](http://article.gmane.org/gmane.comp.compilers.llvm.devel/71989). Right now he describes it as a 'quick hack', though current performance seems quite good with only a 19% slowdown on zlib. The current version of the code is in emscripten's [`c_backend` branch](https://github.com/kripken/emscripten/tree/c_backend) (in `tools/c_backend.py`). * David Blaikie started a discussion about [debug info for captured variables in a C++11 lambda](http://article.gmane.org/gmane.comp.compilers.clang.devel/36014). There's too much here for me to comfortably summarise, but do dig in if you're interested. * Jim Grosbach suggests [low-level tools like llc should not do CPU auto-detection](http://article.gmane.org/gmane.comp.compilers.llvm.devel/71992). There's general agreement that this is a good idea and will help to avoid the problem of tests failing on one machine but not another due to this auto-detection. The change has now been merged. * Jonas Wagner [shared his workflow using a gold linker plugin to link LLVM bitcode](http://article.gmane.org/gmane.comp.compilers.llvm.devel/72036). * Will Dietz [responded](http://article.gmane.org/gmane.comp.compilers.llvm.devel/72019) to a query about unexpected code generation with a great analysis of what may be going on. * Robert Matusewicz is [looking for interest in keeping the poolalloc project alive](http://article.gmane.org/gmane.comp.compilers.llvm.devel/72083). ## LLVM commits * The NVPTX backend gained preliminary intrinsics and codegen support for textures and surfaces. [r205907](http://reviews.llvm.org/rL205907). * Support for optimisation report diagnostics was added. This starts to implement the idea [documented and discussed previously](https://docs.google.com/document/d/1FYUatSjZZO-zmFBxjOiuOzAy9mhHA8hqdvklZv68WuQ/edit#heading=h.qk42du84eyjg). In the future it will be possible to get a report of the major optimization decisions taken by compiler transformations. [r205774](http://reviews.llvm.org/rL205774), [r205775](http://reviews.llvm.org/rL205775). * The merge of AArch64 and ARM4 continues. Named immediate operand mapping logic and enums have been copied from AArch64 to ARM64. [r205866](http://reviews.llvm.org/rL205866). The ARM64 backend has seen a large series of smaller commits as well. * Constant hoisting is now enabled for the ARM64 backend. [r205791](http://reviews.llvm.org/rL205791). * Previously, optimisation logic in CodeGenPrepare that tried to merge address computation in to the memory operation itself (when supported by the platform's addressing modes) would do so by adding integer operations and using ptrtoint and inttoptr. This caused issues when trying to use alias analysis during CodeGen. There is now opt-in support for doing this using GetElementPtr. [r206092](http://reviews.llvm.org/rL206092). * The debug info compression support introduced two weeks ago was reverted, and replaced with a new implementation that compresses the whole section rather than a fragment. [r205989](http://reviews.llvm.org/rL205989), [r205990](http://reviews.llvm.org/rL205990). * The segmented stack switch has been moved to a function attribute and the old `-segmented-stacks` command line flag removed. [r205997](http://reviews.llvm.org/rL205997). ## Clang commits * A major refactoring of the thread safety analysis has been started. [r205728](http://reviews.llvm.org/rL205728), [r205745](http://reviews.llvm.org/rL205745), and more. * libclang gained a `clang_CXXMethod_isConst` method. [r205714](http://reviews.llvm.org/rL205714). * As part of the ongoing project to support the MSVC++ ABI, support for `#pragma section` and related programs was added. [r205810](http://reviews.llvm.org/rL205810). * New command line options were added to support big or little endian for ARM and AArch64. [r205966](http://reviews.llvm.org/rL205966), [r205967](http://reviews.llvm.org/rL205907). ## Other project commits * The openmp project gained the offload directory, which contains code needed to support OpenMP 4.0 target directives. [r205909](http://reviews.llvm.org/rL205909).