| The following are the changes to 3.5.2.5 compared to 3.5.2.1 | |
| 1. The 64-bit C library support for ARMv8 without neon or fp is | |
| available as libc_nofp.a and libc_nofp.so libraries. | |
| 2. New QC Linker for ARM that is capable of replacing GNU linker. | |
| 3. Fix for issues in elftools (elfcopy, archiver). | |
| 4. Fix incorrect dwarf info for a stack variable that compiler knows to be a | |
| constant. | |
| 5. The builtins library for ARMv7 is now built with AEABI div0 functions that | |
| are part of the base platform ABI specification. | |
| The following are the changes to 3.5.2.1 since 3.5 version release | |
| 1. Fix PIC option passing with Android NDK LTO plugin | |
| 2. Add workaround for Cortex-A53 erratum (835769) | |
| Please see below for more details on the Snapdragon LLVM ARM 3.5 release | |
| ---------------------------------------------------------------------------- | |
| This is the release of Snapdragon LLVM ARM C/C++ Compiler version 3.5. This is | |
| a cross compiler built to run on x86 64-bit Ubuntu Linux (version 10.04 and | |
| later) and Windows platform (Windows 7 32-bit and 64-bit). This Snapdragon LLVM | |
| ARM Compiler will generate code only for ARM targets and will not generate code | |
| for any of the other targets supported by llvm.org LLVM. | |
| The version 3.5 of Snapdragon LLVM ARM Compiler is based off the llvm.org tip | |
| as of June 20, 2014. Certain patches after this date from the llvm.org tip have | |
| been cherry-picked into Snapdragon LLVM to improve stability. In other words | |
| the Snapdragon LLVM 3.5 release is not based off llvm.org 3.5 release branch | |
| and hence there are some differences between Snapdragon LLVM 3.5 and llvm.org | |
| 3.5 release; one such example is the "#pragma clang loop" feature that is | |
| available in llvm.org 3.5 release, but not in the Snapdragon LLVM 3.5 release. | |
| An additional difference from the llvm.org 3.5 release is that the Snapdragon | |
| LLVM ARM Compiler includes proprietary features and optimizations that | |
| are not available in the llvm.org release. | |
| The Snapdragon LLVM ARM Compiler uses the integrated assembler for assembling | |
| and relies on GNU tools for linking. | |
| NOTE: GLIBCXX_3.4.18 or higher is required to run Snapdragon LLVM 3.5 on Ubuntu | |
| x86 64-bit hosts; this library is typically available as part of Ubuntu | |
| distribution or GCC-4.8 x86 distributions. | |
| The complete user guide for this release of the Snapdragon LLVM ARM Compiler | |
| can be downloaded from Agile by following the link below: | |
| http://agiledocument.qualcomm.com/AgileDocument/spring/authorize?itemno=80-VB419-96 | |
| Please send all questions about this release to llvm-arm-support@qualcomm.com. | |
| The following are some of the key features in the 3.5 version compared to the | |
| 3.4 version | |
| 1. Optimizations for ARMv8 64-bit mode: Snapdragon LLVM ARM 3.5 Compiler now | |
| supports optimized code generation for both AArch32 and AArch64 (64-bit) | |
| modes. This includes | |
| - Exploiting newer capabilities of AArch64 ISA such as double-precision | |
| vectorization | |
| - Exploiting more GPRs available in AArch64 ISA to speed up performance | |
| - Auto-vectorizer tuned to exploit AArch64 ISA capabilities | |
| - Code generation tuning for Cortex-a53 cores (we expect tuned code | |
| generation for Cortex-a57 in our next release) | |
| 2. Sanitizers: This release introduces support for Undefined Behavior | |
| sanitizer, a new security checker that checks usage of semantics that | |
| result in undefined behavior such as unsigned integer overflow. | |
| 3. Significantly improved Link time optimizer (LTO): This release includes new | |
| LTO flags that allow users to optimize performance or size. The LTO compiler | |
| flow has also been updated to use the Gold linker plugin. At the time of | |
| release, Gold does not support ARMv8, so LTO is only available for ARMv7 targets. | |
| 4. A mature Auto-parallelizer runtime is available for 32-bit ARMv7 | |
| targets and an initial version of the Auto-parallelizer and runtime for | |
| the 64-bit Linux environment (Android support for 64-bit | |
| Auto-parallelizer will be available in the next release). | |
| Basic Usage & Examples: | |
| clang and clang++ are the C and C++ drivers respectively of Snapdragon | |
| LLVM ARM Compiler. They require users to specify the assembler and linker | |
| explicitly. | |
| For Windows: | |
| In order to use the drivers you need to specify a Windows version of the GCC | |
| cross toolchain as the sysroot. | |
| To invoke the compiler from a Windows command prompt: | |
| set PATH=<path-to-compiler-bin>;<path-to-sysroot-bin>;%PATH% | |
| clang.exe -mfloat-abi=softfp --sysroot=<path/to/sysroot> -ccc-gcc-name | |
| arm-none-linux-gnueabi-g++ foo.c | |
| where arm-none-linux-gnueabi-g++ is the name of the compiler in <sysroot>/bin | |
| NOTE: | |
| Microsoft Visual C++ 2013 x86 Redistributable is required in order to use the | |
| Windows version of Snapdragon LLVM ARM 3.5. If the invocation of clang.exe | |
| results in a "Missing DLL" message popup on your windows system, you are likely | |
| missing the Redistributable dlls. Please install the 32-bit version of MSVC++ | |
| redistributables if they are reported missing. If your system does not already | |
| have the required dll, you can download and install it from the following | |
| link: | |
| https://www.microsoft.com/en-us/download/details.aspx?id=40784 | |
| Click "Download" and select "vcredist_x86.exe" to install the 32-bit version of | |
| MSVC++ redistributable required for Snapdragon LLVM ARM 3.5 | |
| NOTE: | |
| The Gold linker plugin is not available for Windows platform. Hence the LTO feature | |
| cannot be used with the Windows version of Snapdragon LLVM ARM 3.5 compiler. | |
| For Linux: | |
| Note that the Linux version of clang is built with support for using GCC | |
| sysroot at /pkg/qct/software/llvm/build_tools/gcc-4.6.1-cs/arm-2011.09 by | |
| default. Users can use a different sysroot (such as GCC-4.9 sysroot) by using | |
| the --sysroot option as described in section 3.7 of the Snapdragon ARM LLVM | |
| Compiler guide. | |
| Examples of Linux driver usage: | |
| clang -march=armv7-a -mfloat-abi=softfp -mfpu=neon -O3 -o foo foo.c | |
| clang++ -mcpu=krait2 -mfloat-abi=softfp -mfpu=neon -Os -mthumb -o bar bar.cpp | |
| clang++ -mcpu=krait2 -mfpu=neon -mfloat-abi=softfp -mfpu=neon | |
| --sysroot=</path/to/another-gcc-sysroot> -Ofast -c test.cpp | |
| For Android: | |
| If you would like to use Snapdragon LLVM ARM Compiler to target an Android platform | |
| for building Android components, please contact llvm-arm-support@qualcomm.com | |
| For generating executables that can be executed on ARM Linux and Android | |
| environment, we recommend using -static linker flag to enable generation of | |
| static executables which do not have dependence on runtime OS libraries. | |
| Options: | |
| To find out the most common options, please pass -help flag to the clang | |
| driver. This will report the Snapdragon LLVM ARM specific options and | |
| general ARM options first, before listing target independent options | |
| available in Snapdragon LLVM ARM Compiler. | |
| Compiler options for best performance: | |
| For 64-bit applications, we recommend using "-Ofast -mcpu=cortex-a53" options | |
| for best performance on all 64-bit cores, including Cortex-a57, since our | |
| evaluation on Cortex-a57 has shown that -mcpu=cortex-a53 option performs | |
| better than the -mcpu=cortex-a57. | |
| For 32-bit, we recommend using the "-Ofast -mcpu=krait2" options for best | |
| performance of your application on Krait cores. For non-Krait 32-bit cores, we | |
| recommend using the "-Ofast" option. If you would like to avoid the generation | |
| of Krait specific instructions (hardware divide, fused-mac) to enable running | |
| on a variety of ARMv7 cores, but still optimize for best performance on Krait | |
| cores, we recommend the "-Ofast -mtune=krait2 -march=armv7-a" option list. | |
| The -Ofast option enables several high performance optimizations such as | |
| Auto-vectorizer. Please refer to section 3.4.18 of the Snapdragon LLVM ARM | |
| Compiler guide for more details. | |
| Compiler options for smallest code-size: | |
| We recommending using the "-Osize -mthumb" options to generate the most compact | |
| code with the Snapdragon LLVM 3.5 compiler. Please refer to section 3.4.18 for | |
| more details on the -Osize optimization level | |
| Compiling for AArch64: | |
| To compile for AArch64 (ARMv8 64-bit mode), please pass | |
| -target aarch64-linux-gnu | |
| option to clang. | |
| Compiling for AArch32: | |
| To compile for AArch32 please pass | |
| -target armv8-linux-gnueabi | |
| option to clang. Note that even though AArch32 ISA is fully backward compatible | |
| with ARMv7 ISA, there are new instructions in AArch32 ISA compared to ARMv7 | |
| ISA. This means that AArch32 executables cannot be executed on ARMv7 cores such | |
| as Krait. | |
| Please refer to section 3.6 of the Snapdragon LLVM ARM Compiler user guide to | |
| learn about various optimizations flags. | |
| LLVM's Support for GCC command line options: | |
| Most of the commonly used GCC options are supported by LLVM as well. A detailed | |
| list of options supported is listed in chapter 3 of the Snapdragon LLVM ARM | |
| Compiler user guide. | |
| Use and Distribution: | |
| This release is strictly for internal distribution and should not be | |
| distributed outside of Qualcomm. An external release is available on | |
| QDevNet for customer access. | |
| Contacts & Bug Reporting | |
| llvm-arm-support@qualcomm.com |