The QuIC compiler teams are pleased to announce the 3.4 release of the Snapdragon LLVM Compiler for Android NDK – available here:
This release includes major new features and optimizations. As several of our internal clients are reporting significant performance improvements in their applications, we strongly encourage you to build the native code for your Android application with this compiler. Please let us know your results and share your experiences using the Snapdragon LLVM compiler 3.4; and definitely let us know if you join the growing ranks of developers who use LLVM to build their software for deployment!
Leading Compiler for Snapdragon CPUs
The QuIC compiler teams have made great progress in tuning and optimizing Snapdragon LLVM for Snapdragon CPUs such as Krait. When you use Snapdragon LLVM with the Android NDK, not only do you get these optimizations, but you get the benefits of the latest LLVM community release (3.4) from llvm.org as the current Android NDK (r9c) release has yet not incorporated the latest LLVM release.
Now with ARMv8 Support
Snapdragon LLVM provides support for the new ARMv8, 64bit architecture. Support is full, including the following:
NEON and VFP (now standard features with ARMv8) along with NEON intrinsics
While 64-bit targets are not yet generally available, this is a major inflection point in the industry and will happen quickly. Targets are starting to become available, first with simulation environments. In the meantime, get a head start by building your code for ARMv8, gauge the impact on generated code, and start addressing some of the porting issues. Our engineering teams will follow up with a series of blog posts about porting software to 64-bit, but this topic is a nice segue into the next major feature of this release.
LLVM has long tradition of providing understandable and actionable error and warning messages. If you are starting to port your code to 64bit the compiler can help identify common porting issues. For example the size of a long is not the same as an int, nor is the size of an int the same as a pointer. Setting –Wall, or –Wconversion can help you quickly identify and fix porting issues such as this.
With this release, Address Sanitizer is now included. AddressSanitizer is a runtime tool which through compile-time instrumentation assists in identifying common memory programming errors such as out-of-bounds accesses and use-after-free. Although AddressSantizer introduces a runtime performance and memory cost of 2X through shadow memory, the benefits of detecting one of the most common security attacks is frequently worth the expense.
This release of Snapdragon LLVM, as with previous versions, includes the oft overlooked Static Analyzer. This feature includes over 100 “checkers” that detect common programming errors. While there is a compile time cost, and as is common with static analysis, false positives, the Static Analyzer is often very productive to use. The adage – “catch bugs often and early!”- is particularly relevant here.
Through these new features, this release brings into focus the importance of security and code hygiene. We can’t stress enough the importance of exploiting this to their full value.
If you have been waiting to jump onto the LLVM bandwagon, now is time. Not only will it provide you the best performance today on 32-bit architectures, it is the most productive path to the 64-bit mobile architectures on the horizon.