[LLVMdev] LLVM Weekly - #10, Mar 10th 2014

Alex Bradbury asb at asbradbury.org
Mon Mar 10 07:39:59 PDT 2014


LLVM Weekly - #10, Mar 10th 2014
================================

If you prefer, you can read a HTML version of this email at
<http://llvmweekly.org/issue/10>

Welcome to the tenth 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.

This week the book I authored in collaboration with
[Ben Everard](https://twitter.com/ben_everard), [Learning Python with
Raspberry
Pi](http://www.amazon.co.uk/Learning-Python-Raspberry-Alex-Bradbury/dp/1118717058)
([Amazon
US](http://www.amazon.com/Learning-Python-Raspberry-Alex-Bradbury/dp/1118717058/))
is officially released.

## News and articles from around the web

John Regehr has written a blog post detailing [some ideas for implementing a
superoptimizer for LLVM](http://blog.regehr.org/archives/1109). There's some
good stuff in the comments too.

Version 2.1 of the Capstone disassembly framework has [been
released](http://www.capstone-engine.org/Version-2.1.html). Library size is
about 40% smaller, memory usage is down 40% and there are performance
improvements as well.

Facebook have released [Chisel](https://github.com/facebook/chisel), a
collection of LLDB commands to assist debugging iOS apps.

A [fork of vim-lldb](https://github.com/gilligan/vim-lldb), the LLDB plugin
for Vim included in the lldb repo has appeared. Changes so far have been
relatively minor.


## On the mailing lists

* Probably one of the most interesting discussions on the mailing list this
week came from Mark Seaborn's [questions about upstreaming PNaCl's IR
simplification
passes](http://article.gmane.org/gmane.comp.compilers.llvm.devel/70908). Both
PNaCl and the new Emscripten fastcomp backend make use of a series of
out-of-tree IR-to-IR passes that simplify the IR by lowering complex to
simpler features. The suggestion is to upstream these so that everyone can
benefit. Chandler Carruth [raises
concerns](http://article.gmane.org/gmane.comp.compilers.llvm.devel/70918) that
these passes might bitrot without any in-tree users, suggesting that the PNaCl
and Emscripten communities could do more to contribute to upstream LLVM and
that such a track record would help ease that concern. There are a number of
people chiming in to say they would find the functionality useful.

* Diego Novillo asks [whether people would be interested in an optimization
report
facility](http://article.gmane.org/gmane.comp.compilers.llvm.devel/70998).
This would give useful information about the decisions taken by various
optimisers, which might be useful when investigating why code doesn't perform
as expected and in finding missed optimisations. Unsurprisingly, everyone
thinks this would be a good feature. Diego promises to write some more
detailed, concrete proposals in the coming days now it's clear people like the
general idea.

* Kev Kitchens [asks about cross-compiling
compiler-rt](http://article.gmane.org/gmane.comp.compilers.llvm.devel/70896).
Vadim Chugunov helpfully points to [his work on Rust's fork of
compiler-rt](http://article.gmane.org/gmane.comp.compilers.llvm.devel/70902)
to support this. It's also pointed out in the thread that support for
unwinding actually lives in libc++abi rather than in a separate libunwind
where you might expect to find it.

* There's a pretty [long discussion on naming for reverse iterators and other
issues](http://article.gmane.org/gmane.comp.compilers.clang.devel/35446) which
should make entertaining reading for anyone who enjoys bikeshedding (not that
there's anything wrong with it, there's some good discussion of API naming
principles there).

* Tim Northover has shared an RFC (with initial patch) on [adding a second
ordering operand to
cmpxchg](http://article.gmane.org/gmane.comp.compilers.llvm.devel/71039) which
which indicates the failure ordering.


## LLVM commits

* A new implementation of PBQP (partitioned boolean quadratic
programming)-based register allocator landed.
[r202735](http://llvm-reviews.chandlerc.com/rL202735). The original commit
([r202551](http://llvm-reviews.chandlerc.com/rL202551)) message details the
changes, including massively reduced memory consumption. Average memory
reduction is claimed to be 400x. The tagline is "PBQP: No longer feasting upon
every last byte of your RAM".

* AArch64 gained a machine description for Cortex-A53, which involved giving
all non-NEON instructions scheduling annotations.
[r203125](http://llvm-reviews.chandlerc.com/rL203125). REVERTED

* The SPARC backend gained support for the VIS SIMD instruction set
extensions. [r202660](http://llvm-reviews.chandlerc.com/rL202660)

* A whole bunch of classes moved around, with the intention that LLVM's
support library will work when building with C++ modules.
[r202814](http://llvm-reviews.chandlerc.com/rL202814) and many others.
InstIterator, GetElementPtrTypeIterator, CallSite, PatternMatch, ValueHandle,
ValueMap, CFG, ConstantFolder, NoFolder, PredIteratorCache, ConstantRange,
PassNameParser, and LeakDetector
moved from Support to IR.

* The `PROLOG_LABEL` TargetOpcode was replaced with `CFI_INSTRUCTION` which is
intended to have simpler semantics and be less convoluted to use. See the
commit message for more details.
[r203204](http://llvm-reviews.chandlerc.com/rL203024).

* Uses of `OwningPtr<T>` were replaced with `std::unique_ptr<T>`.
[r203083](http://llvm-reviews.chandlerc.com/rL203083).

* The `inalloca` grammar was cleaned up.
[r203376](http://llvm-reviews.chandlerc.com/rL203376).

## Clang commits

* The PGO (profile-guided optimisation) code got some minor refactoring in
preparation for handling non-C/C++ code, and initial suport for Objective-C
blocks.
[r203073](http://llvm-reviews.chandlerc.com/rL203073),
[r203157](http://llvm-reviews.chandlerc.com/rL203157).

* Module dependences are now included in the dependency files created by
`-MD/-MMD` etc. [r203208](http://llvm-reviews.chandlerc.com/rL203208).

* The `-Wunreachable-code` option no longer warns about dead code guarded by a
configuration value. [r202912](http://llvm-reviews.chandlerc.com/rL202912).

* The MSVC mangling scheme is not used for statics or types which aren't
visible. [r202951](http://llvm-reviews.chandlerc.com/rL202951).

## Other project commits

* LLDB now supported JIT debugging on Linux using the GDB JIT interface.
[r202956](http://llvm-reviews.chandlerc.com/rL202956).

* Polly started emitting llvm.loop metadata for parallel loops.
[r202854](http://llvm-reviews.chandlerc.com/rL202854).

* In compiler-rt, assembler implementations of `__sync_fetch_and_*` for ARM
were committed. [r202812](http://llvm-reviews.chandlerc.com/rL202551).

* The level of windows support in LLD has been documented.
[r203017](http://llvm-reviews.chandlerc.com/rL203017).



More information about the llvm-dev mailing list