-
Notifications
You must be signed in to change notification settings - Fork 2
/
RELEASE_NOTES
204 lines (160 loc) · 8.84 KB
/
RELEASE_NOTES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
The following are the changes in the 6.0.9 release of the Snapdragon LLVM ARM
C/C++ Toolchain over the 6.0.2 release.
1. Fix a corner case in register allocation exposed by address sanitizer
2. Fix incorrect loop count calculation in sum-of-sum optimization in
auto-vectorization
3. Fix division overflow error in auto-vectorization
4. Mark fma class of functions in Android as constants
5. Fix mis-compile issue when deleted function space is incorrectly reused
6. Fix an aggressive path in Memory SSA optimization
7. Disable auto-vectorization during first phase of ThinLTO
8. Fix QC linker to exclude symbols specified as extern, from the dynamic
symbol table
9. Do not optimize or remove stores to address zero
10. Fix QC linker to exclude libraries specified by filename only
11. Fix include and library paths for embedded linux OE triples (LE only)
12. Set debug location for calls to __safestack_pointer_address
13. Fix issue with unreachable code in safe stack coloring
14. During stack realignment, in certain cases, fix a bug with access to
local variables
15. Auto vectorize outer loop if more profitable than inner loop
The following are the changes in the 6.0.2 release of the Snapdragon LLVM ARM
C/C++ Toolchain over the 6.0.1 release.
1. Allow LTO to link together objects built with a different "-mcpu"
specification
2. Fix incorrect "Could not set section name for symbol" warnings with LTO
3. Fix incorrect warning using -fqc-embed-bitcode
4. Fix crashes in certain loop optimization corner cases
5. Don't generate .eh_frame section with "-fno-exceptions -fsanitize=cfi"
6. Fix for corner case issue in loop reroll
The following are the changes in the 6.0.1 release of the Snapdragon LLVM ARM
C/C++ Toolchain over the 6.0 release.
1. Fix crash when building with Thin LTO
2. Add missing post-process SA scripts for Windows host
3. Fix corner case compiler crash when resolving __stack_chk_guard
4. Fix codegen issue for VLD3/VLD4/VST3/VST4 instructions with register
writeback
This is the release of Snapdragon LLVM ARM C/C++ Compiler toolchain version
6.0. This is a cross toolchain built to run on x86 64-bit Ubuntu Linux
(versions 12.04 and later) and Windows platform (Windows 7 64-bit and later).
The Snapdragon LLVM ARM Compiler will only generate code for ARM targets and
will not generate code for any of the other targets supported by the AOSP LLVM
compiler.
Version 6.0 of the Snapdragon LLVM ARM toolchain includes all changes in the
llvm.org 6.0 release, and additionally includes patches that are post-6.0
llvm.org release. The Snapdragon LLVM ARM toolchain 6.0 release includes
proprietary features and optimizations that are not available in the llvm.org
release or in the AOSP LLVM compiler.
The Snapdragon LLVM ARM Compiler uses the integrated assembler for assembling
and includes a full featured proprietary linker (QC Linker) for linking. For
Android, the QC Linker is primarily used for Link Time Optimization (LTO).
The following link contains all the new features in the llvm.org 6.0 release.
http://releases.llvm.org/6.0.0/docs/ReleaseNotes.html
The Snapdragon LLVM ARM 6.0 toolchain contains all the above features, and
additionally contains the following key features compared to the Snapdragon
LLVM ARM 4.0 toolchain:
1. Compiler Features
- Improved debugging with LTO
- Ability to put breakpoints on inlined functions
- ThinLTO framework for ARM
- Code size optimizations targeting baremetal images
- Code coverage capabilities for baremetal images
- Fat object files that contain bit-code and object
- Simplify LTO workflow and enable LTO at a finer level
- Auto-vectorization of loops that contain arrays as structure members
- Choice of profile generation schemes for Android (for use with PGO)
- PGO optimization for hot-cold block separation and placement
2. Linker and binutils Features
- Features needed for LTO with Android kernel and other baremetal images
- Support FILEHDR keyword in linker script
- Support NOCROSSREFS keyword
- Support for converting stripped ELF to binary
- Support for re-linking final ELF executable
- YAML parser improvements for linker generated YAML output
3. Library Features for Baremetal
- Performance optimization of key library routines targeting Cortex-M0
- Standalone standard libc subset for use in secure images
- Runtime libraries built with debug info
4. Security/Code Hygiene Features
- Static Analyzer: Cross translation unit analysis
- Static Analyzer-Klockwork overlap: Improvements on Null pointer
dereference
- Static Analyzer: File based blacklisting
This version of the Snapdragon LLVM ARM toolchain may generate additional
front-end warnings compared to the SDLLVM 4.0 version. However, we expect
it to perform better than the 4.0 release. We recommend using this
version for performance critical components (where possible).
The complete Compiler User Guide for this release of the Snapdragon LLVM ARM
Compiler is available as part of your download package under
llvm-Snapdragon_LLVM_for_Android_6.0/prebuilt/<platform>/Snapdragon
_LLVM_ARM_60_Compiler_User_Guide.pdf.
Please post all questions about this release to
http://developer.qualcomm.com/llvm-forum.
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> foo.c
NOTE:
On Windows, the LTO feature can only be used with the QC linker (ld.qcld).
It cannot be used with the gold linker plugin since the plugin is not
available for Windows platform.
For Linux:
Note that the Linux version of clang is built with support for using GCC 4.9.0
sysroot by default. Users can use a different sysroot (such as GCC-4.8
sysroot) by using the --sysroot option as described in section 4.5 of the
Snapdragon LLVM ARM Compiler User Guide.
Examples of clang driver usage on Linux:
clang -march=armv7-a -mfloat-abi=softfp -mfpu=neon -O3 -o foo foo.c
clang++ -mcpu=krait -mfloat-abi=softfp -mfpu=neon -Os -mthumb -o bar bar.cpp
clang++ -mcpu=krait -mfloat-abi=softfp -mfpu=neon \
--sysroot=</path/to/another-gcc-sysroot> -Ofast -c test.cpp
For Android:
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 the -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 the Snapdragon LLVM ARM Compiler.
Compiler options for best performance:
For 64-bit applications, we recommend using "-Ofast -mcpu=cortex-a57" options
for best performance on Kryo and Cortex-a57 cores, and "-Ofast
-mcpu=cortex-a53" for best performance on Cortex-a53 cores.
For 32-bit, we recommend using the "-Ofast -mcpu=krait" 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 -march=armv7-a -mfpu=neon" options.
The -Ofast option enables several high performance optimizations such as
Auto-vectorizer. Please refer to section 4.3.19 of the Snapdragon LLVM ARM
Compiler User 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 ARM 6.0 compiler. Please refer to
section 4.3.19 of the Snapdragon LLVM ARM Compiler User Guide for more details
on the -Osize optimization level.
Compiling for AArch64:
To compile for AArch64 (ARMv8 64-bit mode), please pass the following option
to clang:
-target aarch64-linux-gnu
Compiling for AArch32:
To compile for AArch32, please pass the following option to clang:
-target armv8-linux-gnueabi
Note that even though AArch32 ISA is fully backward compatible with ARMv7 ISA,
there are newer 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 4.3.19 of the Snapdragon LLVM ARM Compiler User Guide
to learn about various optimization 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 section 4 of the Snapdragon
LLVM ARM Compiler User Guide.