OSDN Git Service

7dce9e2d60ddba37bd4e6dfdc4dcad07994f7826
[android-x86/external-llvm.git] / docs / ReleaseNotes.rst
1 ========================
2 LLVM 7.0.0 Release Notes
3 ========================
4
5 .. contents::
6     :local:
7
8 .. warning::
9    These are in-progress notes for the upcoming LLVM 7 release.
10    Release notes for previous releases can be found on
11    `the Download Page <http://releases.llvm.org/download.html>`_.
12
13
14 Introduction
15 ============
16
17 This document contains the release notes for the LLVM Compiler Infrastructure,
18 release 7.0.0.  Here we describe the status of LLVM, including major improvements
19 from the previous release, improvements in various subprojects of LLVM, and
20 some of the current users of the code.  All LLVM releases may be downloaded
21 from the `LLVM releases web site <http://llvm.org/releases/>`_.
22
23 For more information about LLVM, including information about the latest
24 release, please check out the `main LLVM web site <http://llvm.org/>`_.  If you
25 have questions or comments, the `LLVM Developer's Mailing List
26 <http://lists.llvm.org/mailman/listinfo/llvm-dev>`_ is a good place to send
27 them.
28
29 Note that if you are reading this file from a Subversion checkout or the main
30 LLVM web page, this document applies to the *next* release, not the current
31 one.  To see the release notes for a specific release, please see the `releases
32 page <http://llvm.org/releases/>`_.
33
34 Non-comprehensive list of changes in this release
35 =================================================
36 .. NOTE
37    For small 1-3 sentence descriptions, just add an entry at the end of
38    this list. If your description won't fit comfortably in one bullet
39    point (e.g. maybe you would like to give an example of the
40    functionality, or simply have a lot to talk about), see the `NOTE` below
41    for adding a new subsection.
42
43 * The Windows installer no longer includes a Visual Studio integration.
44   Instead, a new
45   `LLVM Compiler Toolchain Visual Studio extension <https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.llvm-toolchain>`
46   is available on the Visual Studio Marketplace. The new integration includes
47   support for Visual Studio 2017.
48
49 * Libraries have been renamed from 7.0 to 7. This change also impacts
50   downstream libraries like lldb.
51
52 * The LoopInstSimplify pass (-loop-instsimplify) has been removed.
53
54 * Symbols starting with ``?`` are no longer mangled by LLVM when using the
55   Windows ``x`` or ``w`` IR mangling schemes.
56
57 * A new tool named :doc:`llvm-exegesis <CommandGuide/llvm-exegesis>` has been
58   added. :program:`llvm-exegesis` automatically measures instruction scheduling
59   properties (latency/uops) and provides a principled way to edit scheduling
60   models.
61
62 * A new tool named :doc:`llvm-mca <CommandGuide/llvm-mca>` has been added.
63   :program:`llvm-mca` is a  static performance analysis tool that uses
64   information available in LLVM to statically predict the performance of
65   machine code for a specific CPU.
66
67 * The optimization flag to merge constants (-fmerge-all-constants) is no longer
68   applied by default.
69
70 * Optimization of floating-point casts is improved. This may cause surprising
71   results for code that is relying on the undefined behavior of overflowing 
72   casts. The optimization can be disabled by specifying a function attribute:
73   "strict-float-cast-overflow"="false". This attribute may be created by the
74   clang option ``-fno-strict-float-cast-overflow``.
75   Code sanitizers can be used to detect affected patterns. The option for
76   detecting this problem alone is "-fsanitize=float-cast-overflow":
77
78 .. code-block:: c
79
80     int main() {
81       float x = 4294967296.0f;
82       x = (float)((int)x);
83       printf("junk in the ftrunc: %f\n", x);
84       return 0;
85     }
86
87 .. code-block:: bash
88
89     clang -O1 ftrunc.c -fsanitize=float-cast-overflow ; ./a.out 
90     ftrunc.c:5:15: runtime error: 4.29497e+09 is outside the range of representable values of type 'int'
91     junk in the ftrunc: 0.000000
92
93 * ``LLVM_ON_WIN32`` is no longer set by ``llvm/Config/config.h`` and
94   ``llvm/Config/llvm-config.h``.  If you used this macro, use the compiler-set
95   ``_WIN32`` instead which is set exactly when ``LLVM_ON_WIN32`` used to be set.
96
97 * The ``DEBUG`` macro has been renamed to ``LLVM_DEBUG``, the interface remains
98   the same.  If you used this macro you need to migrate to the new one.
99   You should also clang-format your code to make it easier to integrate future
100   changes locally.  This can be done with the following bash commands:
101
102 .. code-block:: bash
103
104     git grep -l 'DEBUG' | xargs perl -pi -e 's/\bDEBUG\s?\(/LLVM_DEBUG(/g'
105     git diff -U0 master | ../clang/tools/clang-format/clang-format-diff.py -i -p1 -style LLVM
106
107 * Early support for UBsan, X-Ray instrumentation and libFuzzer (x86 and x86_64) for OpenBSD. Support for MSan
108   (x86_64), X-Ray instrumentation and libFuzzer (x86 and x86_64) for FreeBSD.
109
110 * ``SmallVector<T, 0>`` shrank from ``sizeof(void*) * 4 + sizeof(T)`` to
111   ``sizeof(void*) + sizeof(unsigned) * 2``, smaller than ``std::vector<T>`` on
112   64-bit platforms.  The maximum capacity is now restricted to ``UINT32_MAX``.
113   Since SmallVector doesn't have the exception-safety pessimizations some
114   implementations saddle std::vector with and is better at using ``realloc``,
115   it's now a better choice even on the heap (although when TinyPtrVector works,
116   it's even smaller).
117
118 * Preliminary/experimental support for DWARF v5 debugging information,
119   including the new .debug_names accelerator table. DWARF emitted at ``-O0``
120   should be fully DWARF v5 compliant. Type units and split DWARF are known
121   not to be compliant, and higher optimization levels will still emit some
122   information in v4 format.
123
124 * Added support for the ``.rva`` assembler directive for COFF targets.
125
126 * The :program:`llvm-rc` tool (Windows Resource Compiler) has been improved
127   a bit. There are still known missing features, but it is generally usable
128   in many cases. (The tool still doesn't preprocess input files automatically,
129   but it can now handle leftover C declarations in preprocessor output, if
130   given output from a preprocessor run externally.)
131
132 * CodeView debug info can now be emitted MinGW configurations, if requested.
133
134 * Note..
135
136 .. NOTE
137    If you would like to document a larger change, then you can add a
138    subsection about it right here. You can copy the following boilerplate
139    and un-indent it (the indentation causes it to be inside this comment).
140
141    Special New Feature
142    -------------------
143
144    Makes programs 10x faster by doing Special New Thing.
145
146 Changes to the LLVM IR
147 ----------------------
148
149 * The signatures for the builtins @llvm.memcpy, @llvm.memmove, and @llvm.memset
150   have changed. Alignment is no longer an argument, and are instead conveyed as
151   parameter attributes.
152
153 * invariant.group.barrier has been renamed to launder.invariant.group.
154
155 * invariant.group metadata can now refer only empty metadata nodes.
156
157 Changes to the AArch64 Target
158 -----------------------------
159
160 * The ``.inst`` assembler directive is now usable on both COFF and Mach-O
161   targets, in addition to ELF.
162
163 * Support for most remaining COFF relocations have been added.
164
165 * Support for TLS on Windows has been added.
166
167 Changes to the ARM Target
168 -------------------------
169
170 * The ``.inst`` assembler directive is now usable on both COFF and Mach-O
171   targets, in addition to ELF. For Thumb, it can now also automatically
172   deduce the instruction size, without having to specify it with
173   e.g. ``.inst.w`` as before.
174
175 Changes to the Hexagon Target
176 -----------------------------
177
178 * Hexagon now supports auto-vectorization for HVX. It is disabled by default
179   and can be turned on with ``-fvectorize``. For auto-vectorization to take
180   effect, code generation for HVX needs to be enabled with ``-mhvx``.
181   The complete set of options should include ``-fvectorize``, ``-mhvx``,
182   and ``-mhvx-length={64b|128b}``.
183
184 * The support for Hexagon ISA V4 is deprecated and will be removed in the
185   next release.
186
187 Changes to the MIPS Target
188 --------------------------
189
190  During this release ...
191
192
193 Changes to the PowerPC Target
194 -----------------------------
195
196  During this release ...
197
198 Changes to the SystemZ Target
199 -----------------------------
200
201 During this release the SystemZ target has:
202
203 * Added support for vector registers in inline asm statements.
204
205 * Added support for stackmaps, patchpoints, and the anyregcc
206   calling convention.
207
208 * Changed the default function alignment to 16 bytes.
209
210 * Improved codegen for condition code handling.
211
212 * Improved instruction scheduling and microarchitecture tuning for z13/z14.
213
214 * Fixed support for generating GCOV coverage data.
215
216 * Fixed some codegen bugs.
217
218 Changes to the X86 Target
219 -------------------------
220
221 * The calling convention for the ``f80`` data type on MinGW targets has been
222   fixed. Normally, the calling convention for this type is handled within clang,
223   but if an intrinsic is used, which LLVM expands into a libcall, the
224   proper calling convention needs to be supported in LLVM as well. (Note,
225   on Windows, this data type is only used for long doubles in MinGW
226   environments - in MSVC environments, long doubles are the same size as
227   normal doubles.)
228
229 Changes to the AMDGPU Target
230 -----------------------------
231
232  During this release ...
233
234 Changes to the AVR Target
235 -----------------------------
236
237  During this release ...
238
239 Changes to the OCaml bindings
240 -----------------------------
241
242 * Remove ``add_bb_vectorize``.
243
244
245 Changes to the C API
246 --------------------
247
248 * Remove ``LLVMAddBBVectorizePass``. The implementation was removed and the C
249   interface was made a deprecated no-op in LLVM 5. Use
250   ``LLVMAddSLPVectorizePass`` instead to get the supported SLP vectorizer.
251
252 Changes to the DAG infrastructure
253 ---------------------------------
254 * ADDC/ADDE/SUBC/SUBE are now deprecated and will default to expand. Backends
255   that wish to continue to use these opcodes should explicitely request so
256   using ``setOperationAction`` in their ``TargetLowering``. New backends
257   should use UADDO/ADDCARRY/USUBO/SUBCARRY instead of the deprecated opcodes.
258
259 * The SETCCE opcode has now been removed in favor of SETCCCARRY.
260
261 * TableGen now supports multi-alternative pattern fragments via the PatFrags
262   class.  PatFrag is now derived from PatFrags, which may require minor
263   changes to backends that directly access PatFrag members.
264
265 External Open Source Projects Using LLVM 7
266 ==========================================
267
268 * A project...
269
270
271 Additional Information
272 ======================
273
274 A wide variety of additional information is available on the `LLVM web page
275 <http://llvm.org/>`_, in particular in the `documentation
276 <http://llvm.org/docs/>`_ section.  The web page also contains versions of the
277 API documentation which is up-to-date with the Subversion version of the source
278 code.  You can access versions of these documents specific to this release by
279 going into the ``llvm/docs/`` directory in the LLVM tree.
280
281 If you have any questions or comments about LLVM, please feel free to contact
282 us via the `mailing lists <http://llvm.org/docs/#maillist>`_.