Forums - Snapdragon LLVM 3.4 for Android now available

1 post / 0 new
Snapdragon LLVM 3.4 for Android now available
Dakip Moderator
Join Date: 17 Apr 13
Posts: 14
Posted: Wed, 2014-03-05 12:08

The QuIC compiler teams are pleased to announce the 3.4 release of the Snapdragon LLVM Compiler for Android NDK – available here:

     developer.qualcomm.com/mobile-development/increase-app-performance/snapdragon-llvm-compiler-android

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!

    developer.qualcomm.com/llvm-forum

 

Highlights:   


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:

            AAarch64 (64bit)
            AAarch32 (32bit)
            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.


Code Hygiene

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.

 

Next Steps:

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. 

  • Up0
  • Down0

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.