LLVM Weekly - #101, Dec 7th 2015
Welcome to the one hundred and first 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 https://llvmweekly.org and pass it on to anyone else you think may be interested. Please send any tips or feedback to [email protected], or @llvmweekly or @asbradbury on Twitter.
News and articles from around the web
The implementation of the Swift programming language is now open source. Rather than being a simple code dump, development will now occur out in the open with external contributions encouraged. If you haven't already, now might be a good time to watch Joseph Groff and Chris Lattner's talk on the Swift Intermediate Language.
Rui Ueyama wrote about the new LLD ELF linker on the official LLVM blog.
The Visual C++ team have released Clang with Microsoft CodeGen. This uses the Clang parser along with the code generator and optimizer from Visual C++. The majority of the Clang and LLVM changes will be contributed back upstream.
Alex Denisov wrote about using the LLVM API with Swift.
If you haven't already submitted your talk proposal for the LLVM devroom at FOSDEM, you've now got a little more time. Get your submission in by this Friday.
On the mailing lists
-
Swift team members have started discussions about upstreaming their changes to LLVM, Clang, and LLDB. The Clang changes include the addition of an 'API notes' feature which has seen some interest from other developers. This can be used to associate certain attributes with functions from system headers through an external YAML file, which is of course much more pragmatic than expecting system headers on all supported platforms to be updated.
-
Vaivaswatha Nagaraj observes that malloc and realloc don't have the doesNotAccessMemory/onlyReadsMemory attributes set, and that this makes GlobalsAA much less effective. As was pointed out in the ensuing discussion, these attributes wouldn't be correct for malloc and realloc but it would perhaps make sense to add a new attribute. Vaivaswatha penned an RFC on an HasInaccessibleState attribute. This has generated a lot of discussion and alternate proposals but no conclusion yet.
-
Christof Douma has posted an RFC on adding execute only support to the ARM code generator. This means the compiler will not generate data accesses in to the code section.
-
Oliver Stannard has posted an RFC on supporting position-independent code on ARM for small embedded systems. In read-only position independence (ROPI), code and read-only data is accessed PC-relative with the offsets known at static link time. In read-write position independence (RWPI), read-write data is accessed relative to the static base register (R9).
-
This week's bikeshedding thread is on the naming convention for LLVM intrinsics. The proposal is to standardise on using
.
as a separator. There are some suggestions that_
be allowed in words. -
How can you recompile functions at different optimisation levels? Lang Hames provides a sample doing this using the Orc API.
LLVM commits
-
llc and opt gained an option to run all passes twice. This is intended to help show up bugs that occur when using the same pass manager to compile multiple modules. r254774.
-
An initial prototype for llvm-dwp has been committed. This will eventually be a tool for building a DWARF package file out of a number of .dwo split debug files. r254355.
-
All weight-based interfaces in MachineBasicBlock have now been replaced with probability-based interfaces. r254377.
-
LLVM's STLExtras gained a range-based version of
std::any_of
andstd::find
. r254391, r254390. -
llvm.get.dynamic.area.offset.{i32,264}
intrinsics have been added. These can be used to get the address of the most recent dynamic alloca. r254404. -
The X86 backend gained a new pass to reduce code size by removing redundant address recalculations for LEA. r254712.
-
The WebAssembly backend now has initial support for varargs. r254799.
Clang commits
-
Design docs have been added for forward-edge CFI for indirect calls. r254464.
-
The
pass_object_size
attribute was added to Clang. This intended to be used to work around cases where__builtin_object_size
doesn't function. r254554. -
Documentation was added for UndefinedBehaviorSanitizer. r254733.