The compiler team at QuIC is pleased to announce the 3.6 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 significant new features and optimizations that should benefit the native code of your Android applications.
Highlights of this release:
Performance
This release is optimized for the new 64-bit Snapdragon CPUs and shows significant performance over other compilers as measured by popular benchmarks. Please note, to realize this performance gain in your application, it is important that you use the compiler flags recommended in the RELEASE NOTES and User Guide included in the download; if you use the default flags in the Android NDK you will not realize the best results, and may even see performance regressions.
Profile Guided Optimization
This release supports Profile Guided Optimization (PGO), a time tested technique that further improves the code generated by the compiler through utilizing real runtime profile information. Profile data can be collected through instrumented or sampling profilers. If you are interested in sampled profiles, the Snapdragon MDP (described at bottom of this page) makes this easy – just install your application, exercise it, and collect the profile. The User Guide has a practical section on using PGO.
Auto-vectorization
This release includes a mature auto-vectorizer that can automatically generate code that utilizes the NEON SIMD engine for a wide range of loops. This can provide a significant acceleration depending on your application workload, such as image processing.
This feature can also minimize the porting effort from 32-bit to 64-bit by significantly reducing the need for hand-coded assembly and instead use the auto-vectorization capabilities of Snapdragon LLVM
Code Hygiene
This release continues to bring more focus to application security and code hygiene through the inclusion of the MemorySanitizer (MSan) which detects uninitialized reads (MSan is only available for a 64-bit application). In addition, the AddressSanitizer (ASan) has been updated to support 64-bit Android applications in this release.
If you are porting your code to 64-bit, LLVM has a long tradition of providing understandable and actionable error and warning messages that can help identify common porting issues. For example on 64-bit platforms 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.
User Guide
The User Guide has been expanded with sections on optimization recommendations, using PGO, and taking advantage of compiler reporting. Be sure to take a look at what the User Guide offers.
Next Steps
- Read the readme on the download page
- Download snapdragon LLVM
- Follow the optimization suggestions in the User Guide
- Build your application using the recommended compiler flags
- Let us know your results and any suggestion for the next release at:
developer.qualcomm.com/llvm-forum
As you are visiting this page, you clearly are interested in optimizing your application! We recommend that you use Snapdragon LLVM in conjunction with Snapdragon Mobile Development Platform hardware (MDP). Snapdragon MDPs come preloaded with tools such as Snapdragon Performance Visualizer and a special version of Trepn Profiler™ that provide for viewing your application execution and power profile. For more information visit:
developer.qualcomm.com/mobile-development/development-devices/mobile-development-platform-mdp