1 ========================
2 LLVM 7.0.0 Release Notes
3 ========================
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>`_.
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/>`_.
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
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/>`_.
34 Non-comprehensive list of changes in this release
35 =================================================
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.
43 * The Windows installer no longer includes a Visual Studio integration.
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.
49 * Libraries have been renamed from 7.0 to 7. This change also impacts
50 downstream libraries like lldb.
52 * The LoopInstSimplify pass (-loop-instsimplify) has been removed.
54 * Symbols starting with ``?`` are no longer mangled by LLVM when using the
55 Windows ``x`` or ``w`` IR mangling schemes.
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
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.
67 * The optimization flag to merge constants (-fmerge-all-constants) is no longer
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":
81 float x = 4294967296.0f;
83 printf("junk in the ftrunc: %f\n", x);
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
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.
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:
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
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.
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,
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.
124 * Added support for the ``.rva`` assembler directive for COFF targets.
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.)
132 * CodeView debug info can now be emitted MinGW configurations, if requested.
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).
144 Makes programs 10x faster by doing Special New Thing.
146 Changes to the LLVM IR
147 ----------------------
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.
153 * invariant.group.barrier has been renamed to launder.invariant.group.
155 * invariant.group metadata can now refer only empty metadata nodes.
157 Changes to the AArch64 Target
158 -----------------------------
160 * The ``.inst`` assembler directive is now usable on both COFF and Mach-O
161 targets, in addition to ELF.
163 * Support for most remaining COFF relocations have been added.
165 * Support for TLS on Windows has been added.
167 Changes to the ARM Target
168 -------------------------
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.
175 Changes to the Hexagon Target
176 -----------------------------
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}``.
184 * The support for Hexagon ISA V4 is deprecated and will be removed in the
187 Changes to the MIPS Target
188 --------------------------
190 During this release ...
193 Changes to the PowerPC Target
194 -----------------------------
196 During this release ...
198 Changes to the SystemZ Target
199 -----------------------------
201 During this release the SystemZ target has:
203 * Added support for vector registers in inline asm statements.
205 * Added support for stackmaps, patchpoints, and the anyregcc
208 * Changed the default function alignment to 16 bytes.
210 * Improved codegen for condition code handling.
212 * Improved instruction scheduling and microarchitecture tuning for z13/z14.
214 * Fixed support for generating GCOV coverage data.
216 * Fixed some codegen bugs.
218 Changes to the X86 Target
219 -------------------------
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
229 Changes to the AMDGPU Target
230 -----------------------------
232 During this release ...
234 Changes to the AVR Target
235 -----------------------------
237 During this release ...
239 Changes to the OCaml bindings
240 -----------------------------
242 * Remove ``add_bb_vectorize``.
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.
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.
259 * The SETCCE opcode has now been removed in favor of SETCCCARRY.
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.
265 External Open Source Projects Using LLVM 7
266 ==========================================
271 Additional Information
272 ======================
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.
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>`_.