LLVM Weekly - #11, Mar 17th 2014 =============================== If you prefer, you can read a HTML version of this email at <http://llvmweekly.org/issue/11> Welcome to the eleventh 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. It seems an extra comma slipped in to my bio in [Learning Python with Raspberry Pi](http://www.amazon.co.uk/Learning-Python-Raspberry-Alex-Bradbury/dp/1118717058/) ([US](http://www.amazon.com/Learning-Python-Raspberry-Alex-Bradbury/dp/1118717058/)) meaning rather than being described as a "compiler hacker, ...", I am a "compiler, hacker, Linux geek, and Free Software enthusiast". It's therefore official, I am a compiler. Presumably this makes me uniquely suited to writing LLVM Weekly. Previously I've only linked to internship opportunities rather than job ads. I'd be interested in how readers feel about linking to job ads looking for someone with LLVM experience? Do let me know via email or Twitter. ## News and articles from around the web * LLVM's popular ['Kaleidoscope' tutorial](http://llvm.org/docs/tutorial/) on implementing a language with LLVM has been [ported to Rust](https://github.com/hobinjk/rusty-kaleidoscope). * The [programme for EuroLLVM 2014](http://llvm.org/devmtg/2014-04/#callfor) has been announced. EuroLLVM will be taking place in Edinburgh, Scotland on the 7th and 8th of April. At the time of writing, there are still some spaces available. * The PNaCl 'canary' toolchain is [now based on LLVM 3.4](https://groups.google.com/forum/#!topic/native-client-discuss/qkahSDf5lrM). * The [Intel intrinsics guide](http://software.intel.com/sites/landingpage/IntrinsicsGuide/) is a useful reference for the massive variety of specialised functionality available on modern Intel CPUs. * Broadcom Cambridge are [looking for an LLVM compiler engineer](http://jobs.broadcom.com/job/Cambridge-Engineer%2C-Principal-LLVM-Compiler-Engineer/30894500/). See the job ad for more details. ## On the mailing lists * The optimization report functionality that was [discussed last week](http://article.gmane.org/gmane.comp.compilers.llvm.devel/70998) now has a [more complete proposal](https://docs.google.com/document/d/1FYUatSjZZO-zmFBxjOiuOzAy9mhHA8hqdvklZv68WuQ/edit#) about exactly how it would work. * There's some useful information in [this thread about evaluating LLVM's register allocators](http://article.gmane.org/gmane.comp.compilers.llvm.devel/71070), in particular how to ensure all register allocators are linked in to the clang binary. * David Majinemer has posted on [RFC on providing section declarations in LLVM IR](http://article.gmane.org/gmane.comp.compilers.llvm.devel/71123). Currently the section attribute can be used on GlobalVariables and Functions, but as pointed out in the RFC this has issues. Another key motivator is to support the representation of the Microsoft ABI's RTTI (runtime type information) data. * Justin Bogner has posted two profiling-related RFCs. The first is related to [creating a LLVM library for reading and writing profile data](http://article.gmane.org/gmane.comp.compilers.llvm.devel/71179). He also proposes a [binary format for instrumentation-based profiling data](http://article.gmane.org/gmane.comp.compilers.llvm.devel/71190) as opposed to the naive textual format currently used. A library to work with a proposed binary profile data format was actually [commited this week](http://llvm-reviews.chandlerc.com/rL203703), but the commit was reverted in order for more discussion to take place. * Mike McFadden's [detailed write-up of his implementation of an in-place merge sort](https://github.com/BonzaiThePenguin/WikiSort) has been making the rounds on Reddit and Hacker News this week. He [posted to the clang mailing list](http://article.gmane.org/gmane.comp.compilers.clang.devel/35668) to ask whether there's someone in particular to speak to about using his implementation to replace libcxx's current `inplace_stable_sort` (which his implementation beats by 3-15x). No responses to his [post to cfe-commits](http://article.gmane.org/gmane.comp.compilers.clang.scm/94723) yet. * Mikael Persson has announced to the mailing list that [he has been continuing work on the Templight debugger](http://article.gmane.org/gmane.comp.compilers.clang.devel/35656), and attaches a revised version of the Templight patch. [Templight](http://plc.inf.elte.hu/templight/) is a debugger and profiler for C++ template meta-programming. The main addition to the previous official release is that Mikael has added a gdb-style debugger. * Rudolphe Suescun's question about [whether lld is ready for his project](http://article.gmane.org/gmane.comp.compilers.llvm.devel/71138) prompted some interesting replies detailing current status and gaps in the LLVM linker, lld. In particular, the current lack of support for linker scripts and lack of support for merge debug info when linking. ## LLVM commits * I don't believe I made mention of this last week, but it's been decided that virtual methods that override their base class should be marked with the `override` keyword (and that the `virtual` keyword would then be considered redundant). [r203433](http://llvm-reviews.chandlerc.com/rL203433), [r203442](http://llvm-reviews.chandlerc.com/rL203442), and others. * Support for NaCl support on MIPS developed, with the addition of sandboxing for loads, stores, stack pointer changes, and function calls. [r203484](http://llvm-reviews.chandlerc.com/rL203484), [r203606](http://llvm-reviews.chandlerc.com/rL203606). * As discussed in an [RFC last week](http://article.gmane.org/gmane.comp.compilers.llvm.devel/71039), cmpxchg now has a second ordering operand which describes the required semantics in case no exchange takes place. [r203559](http://llvm-reviews.chandlerc.com/rL203559). * An optimisation was added so that switch-to-lookup-table conversion can be done by adding a bitmask check. An example is given in the commit message. [r203694](http://llvm-reviews.chandlerc.com/rL203694). * The sample LLVM project has been removed. It has bitrotted over time and doesn't include CMake support at a time that LLVM is moving away from autoconf/automake. [r203729](http://llvm-reviews.chandlerc.com/rL203728). * The PowerPC backend learned basic support for the VSX instruction set extensions. [r203768](http://llvm-reviews.chandlerc.com/rL203768). * The merging of a patchset to improve MergeFunctions time complexity from `O(N*N)` to `O(N*log(N))`. [r203788](http://llvm-reviews.chandlerc.com/rL203788). * MachineRegisterInfo has been undergoing some major refactoring in order to allow the use of C++11 range-based for loops. [r203865](http://llvm-reviews.chandlerc.com/rL203865). * The `linker_private` and `linker_private_weak` linkage types were removed. [r203866](http://llvm-reviews.chandlerc.com/rL203866). ## Clang commits * Clang will now produce a warning when an invalid ordering is passed to one of the atomic builtins. [r203561](http://llvm-reviews.chandlerc.com/rL203561), [r203564](http://llvm-reviews.chandlerc.com/rL203564).. * In the world of profile guided optimisation (PGO), PGO counters are now scaled down to 32 bits when necessary instead of just truncated. [r203592](http://llvm-reviews.chandlerc.com/rL203592). * The static analyzer gained support for detecting when passing pointers to const but uninitialized memory. [r203822](http://llvm-reviews.chandlerc.com/rL203822). * The `-Wunreachable-code` diagnostic has been broken up into different diagnostic groups to provide access to unreachable code checks for cases where the default heuristics of `-Wunreachable-code` aren't enough. [r203994](http://llvm-reviews.chandlerc.com/rL203994). ## Other project commits * lld now has a todo list containing a listing of missing GNU ld command line options. [r203491](http://llvm-reviews.chandlerc.com/rL203491). * lldb saw some reworking on how the ShouldStopHere mechanism works. This allows a mode where stepping out of a frame into a frame with no debug information will continue stepping until it arrives at a frame that does have deug information. [r203747](http://llvm-reviews.chandlerc.com/rL203747). * The Polly build system has been updated so the Makefile builds a single monolithic LLVMPolly.so. [r203952](http://llvm-reviews.chandlerc.com/rL203952).