blob: 8209c08889edc7c2878cd7016b613afe7173b165 [file] [log] [blame]
Hans Wennborge0464592016-07-18 18:02:23 +00001========================
Hans Wennborge17bf012018-08-01 13:58:00 +00002LLVM 8.0.0 Release Notes
Hans Wennborge0464592016-07-18 18:02:23 +00003========================
Dmitri Gribenkoe17d8582012-12-09 23:14:26 +00004
5.. contents::
6 :local:
7
Dmitri Gribenkoe17d8582012-12-09 23:14:26 +00008Introduction
9============
10
11This document contains the release notes for the LLVM Compiler Infrastructure,
Hans Wennborge17bf012018-08-01 13:58:00 +000012release 8.0.0. Here we describe the status of LLVM, including major improvements
Dmitri Gribenkoe17d8582012-12-09 23:14:26 +000013from the previous release, improvements in various subprojects of LLVM, and
14some of the current users of the code. All LLVM releases may be downloaded
Hans Wennborg0e095c02019-02-27 13:54:21 +000015from the `LLVM releases web site <https://releases.llvm.org/>`_.
Dmitri Gribenkoe17d8582012-12-09 23:14:26 +000016
17For more information about LLVM, including information about the latest
Hans Wennborgaa81d562018-09-10 08:50:31 +000018release, please check out the `main LLVM web site <https://llvm.org/>`_. If you
Dmitri Gribenkoe17d8582012-12-09 23:14:26 +000019have questions or comments, the `LLVM Developer's Mailing List
Hans Wennborgaa81d562018-09-10 08:50:31 +000020<https://lists.llvm.org/mailman/listinfo/llvm-dev>`_ is a good place to send
Dmitri Gribenkoe17d8582012-12-09 23:14:26 +000021them.
22
Hans Wennborg5dd87292019-02-19 13:14:28 +000023Minimum Required Compiler Version
24=================================
25As `discussed on the mailing list
26<https://lists.llvm.org/pipermail/llvm-dev/2019-January/129452.html>`_,
27building LLVM will soon require more recent toolchains as follows:
28
29============= ====
30Clang 3.5
31Apple Clang 6.0
32GCC 5.1
33Visual Studio 2017
34============= ====
35
36A new CMake check when configuring LLVM provides a soft-error if your
37toolchain will become unsupported soon. You can opt out of the soft-error by
38setting the ``LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN`` CMake variable to
39``ON``.
40
41
Hans Wennborg0e095c02019-02-27 13:54:21 +000042Known Issues
43============
44
45These are issues that couldn't be fixed before the release. See the bug reports
46for the latest status.
47
48* `PR40547 <https://llvm.org/pr40547>`_ Clang gets miscompiled by trunk GCC.
49
50* `PR40761 <https://llvm.org/pr40761>`_ "asan-dynamic" doesn't work on FreeBSD.
51
52
Sean Silva4a535622013-01-20 03:29:50 +000053Non-comprehensive list of changes in this release
54=================================================
Dmitri Gribenkoe17d8582012-12-09 23:14:26 +000055
Max Morozfcdc2672018-11-09 16:10:44 +000056* The **llvm-cov** tool can now export lcov trace files using the
57 `-format=lcov` option of the `export` command.
Dmitri Gribenkoe17d8582012-12-09 23:14:26 +000058
Hans Wennborg5dd87292019-02-19 13:14:28 +000059* The ``add_llvm_loadable_module`` CMake macro has been removed. The
60 ``add_llvm_library`` macro with the ``MODULE`` argument now provides the same
Tom Stellard8584d262018-12-21 16:20:37 +000061 functionality. See `Writing an LLVM Pass
62 <WritingAnLLVMPass.html#setting-up-the-build-environment>`_.
63
Martin Storsjob30cd932019-01-22 20:36:23 +000064* For MinGW, references to data variables that might need to be imported
65 from a dll are accessed via a stub, to allow the linker to convert it to
66 a dllimport if needed.
67
Simon Atanasyana42506f2019-01-30 22:45:12 +000068* Added support for labels as offsets in ``.reloc`` directive.
69
Hans Wennborgc8f5c212019-02-21 08:53:01 +000070* Support for precise identification of X86 instructions with memory operands,
71 by using debug information. This supports profile-driven cache prefetching.
72 It is enabled with the ``-x86-discriminate-memops`` LLVM Flag.
73
74* Support for profile-driven software cache prefetching on X86. This is part of
75 a larger system, consisting of: an offline cache prefetches recommender,
76 AutoFDO tooling, and LLVM. In this system, a binary compiled with
77 ``-x86-discriminate-memops`` is run under the observation of the recommender.
78 The recommender identifies certain memory access instructions by their binary
79 file address, and recommends a prefetch of a specific type (NTA, T0, etc) be
80 performed at a specified fixed offset from such an instruction's memory
81 operand. Next, this information needs to be converted to the AutoFDO syntax
82 and the resulting profile may be passed back to the compiler with the LLVM
83 flag ``-prefetch-hints-file``, together with the exact same set of
84 compilation parameters used for the original binary. More information is
85 available in the `RFC
86 <https://lists.llvm.org/pipermail/llvm-dev/2018-November/127461.html>`_.
87
Hans Wennborg4da256c2019-02-26 16:19:38 +000088* Windows support for libFuzzer (x86_64).
89
Elena Demikhovsky5a15e952016-03-29 06:55:56 +000090Changes to the LLVM IR
91----------------------
92
Hans Wennborga54da932019-02-21 14:16:48 +000093* Function attribute ``speculative_load_hardening`` has been introduced to
94 allow indicating that `Speculative Load Hardening
95 <SpeculativeLoadHardening.html>`_ must be enabled for the function body.
96
Piotr Padlewski6ebd0542018-05-18 23:53:46 +000097
Hans Wennborg9c315782019-03-13 08:53:49 +000098Changes to the JIT APIs
99-----------------------
100
101The ORC (On Request Compilation) JIT APIs have been updated to support
102concurrent compilation. The existing (non-concurrent) ORC layer classes and
103related APIs are deprecated, have been renamed with a "Legacy" prefix (e.g.
104LegacyIRCompileLayer). The deprecated clasess will be removed in LLVM 9.
105
106An example JIT stack using the concurrent ORC APIs, called LLJIT, has been
107added (see include/llvm/ExecutionEngine/Orc/LLJIT.h). The lli tool has been
108updated to use LLJIT.
109
110MCJIT and ExecutionEngine continue to be supported, though ORC should be
111preferred for new projects.
112
113
Martin Storsjob30cd932019-01-22 20:36:23 +0000114Changes to the AArch64 Target
115-----------------------------
116
Hans Wennborga54da932019-02-21 14:16:48 +0000117* Support for Speculative Load Hardening has been added.
118
Hans Wennborgfd73ac72019-02-20 12:38:35 +0000119* Initial support for the Tiny code model, where code and its statically
120 defined symbols must live within 1MB of each other.
121
Martin Storsjob30cd932019-01-22 20:36:23 +0000122* Added support for the ``.arch_extension`` assembler directive, just like
123 on ARM.
124
125
Krzysztof Parzyszeke5cc6802019-02-01 20:55:52 +0000126Changes to the Hexagon Target
Hans Wennborg89e0e7b2019-02-07 12:32:55 +0000127-----------------------------
Krzysztof Parzyszeke5cc6802019-02-01 20:55:52 +0000128
129* Added support for Hexagon/HVX V66 ISA.
130
Hans Wennborg0e095c02019-02-27 13:54:21 +0000131
Daniel Sanderse35dcb62014-07-23 12:59:26 +0000132Changes to the MIPS Target
133--------------------------
134
Simon Atanasyana42506f2019-01-30 22:45:12 +0000135* Improved support of GlobalISel instruction selection framework.
Daniel Sanderse7f28b22015-01-11 10:34:52 +0000136
Simon Atanasyana42506f2019-01-30 22:45:12 +0000137* Implemented emission of ``R_MIPS_JALR`` and ``R_MICROMIPS_JALR``
138 relocations. These relocations provide hints to a linker for optimization
139 of jumps to protected symbols.
140
141* ORC JIT has been supported for MIPS and MIPS64 architectures.
142
143* Assembler now suggests alternative MIPS instruction mnemonics when
144 an invalid one is specified.
145
146* Improved support for MIPS N32 ABI.
147
148* Added new instructions (``pll.ps``, ``plu.ps``, ``cvt.s.pu``,
149 ``cvt.s.pl``, ``cvt.ps``, ``sigrie``).
150
151* Numerous bug fixes and code cleanups.
Daniel Sanderse35dcb62014-07-23 12:59:26 +0000152
Hans Wennborg0e095c02019-02-27 13:54:21 +0000153
Bill Schmidtb0574ad2014-07-31 14:38:17 +0000154Changes to the PowerPC Target
Bill Schmidtb74ca142014-07-31 15:20:30 +0000155-----------------------------
Bill Schmidtb0574ad2014-07-31 14:38:17 +0000156
Hans Wennborg6f9d9be2019-02-20 12:43:20 +0000157* Switched to non-PIC default
158
159* Deprecated Darwin support
160
161* Enabled Out-of-Order scheduling for P9
162
163* Better overload rules for compatible vector type parameter
164
Hans Wennborg0e095c02019-02-27 13:54:21 +0000165* Support constraint 'wi', modifier 'x' and VSX registers in inline asm
Hans Wennborg6f9d9be2019-02-20 12:43:20 +0000166
167* More ``__float128`` support
168
169* Added new builtins like vector int128 ``pack``/``unpack`` and
170 ``stxvw4x.be``/``stxvd2x.be``
171
172* Provided significant improvements to the automatic vectorizer
173
174* Code-gen improvements (especially for Power9)
175
176* Fixed some long-standing bugs in the back end
177
178* Added experimental prologue/epilogue improvements
179
180* Enabled builtins tests in compiler-rt
181
182* Add ``___fixunstfti``/``floattitf`` in compiler-rt to support conversion
183 between IBM double-double and unsigned int128
184
185* Disable randomized address space when running the sanitizers on Linux ppc64le
186
187* Completed support in LLD for ELFv2
188
189* Enabled llvm-exegesis latency mode for PPC
190
Bill Schmidtb0574ad2014-07-31 14:38:17 +0000191
Hans Wennborg42c2c202019-03-12 12:52:54 +0000192Changes to the SystemZ Target
193-----------------------------
194
195* A number of bugs related to C/C++ language vector extension support were
196 fixed: the ``-mzvector`` option now actually enables the ``__vector`` and
197 ``__bool`` keywords, the ``vec_step`` intrinsic now works, and the
198 ``vec_insert_and_zero`` and ``vec_orc`` intrinsics now generate correct code.
199
200* The ``__float128`` keyword, which had been accidentally enabled in some
201 earlier releases, is now no longer supported. On SystemZ, the ``long double``
202 data type itself already uses the IEEE 128-bit floating-point format.
203
204* When the compiler inlines ``strcmp`` or ``memcmp``, the generated code no
205 longer returns ``INT_MIN`` as the negative result value under any
206 circumstances.
207
208* Various code-gen improvements, in particular related to improved
209 auto-vectorization, inlining, and instruction scheduling.
210
211
NAKAMURA Takumid6448012015-12-21 02:37:23 +0000212Changes to the X86 Target
Elena Demikhovsky5a15e952016-03-29 06:55:56 +0000213-------------------------
NAKAMURA Takumid6448012015-12-21 02:37:23 +0000214
Roman Lebedevdb50b6f2018-12-24 12:12:26 +0000215* Machine model for AMD bdver2 (Piledriver) CPU was added. It is used to support
216 instruction scheduling and other instruction cost heuristics.
NAKAMURA Takumid6448012015-12-21 02:37:23 +0000217
Craig Toppereb084302019-02-18 17:59:47 +0000218* New AVX512F gather and scatter intrinsics were added that take a <X x i1> mask
219 instead of a scalar integer. This removes the need for a bitcast in IR. The
220 new intrinsics are named like the old intrinsics with ``llvm.avx512.``
221 replaced with ``llvm.avx512.mask.``. The old intrinsics will be removed in a
222 future release.
223
224* Added ``cascadelake`` as a CPU name for -march. This is ``skylake-avx512``
225 with the addition of the ``avx512vnni`` instruction set.
226
227* ADCX instruction will no longer be emitted. This instruction is rarely better
228 than the legacy ADC instruction and just increased code size.
229
Dylan McKayb28b8f22016-11-17 22:26:09 +0000230
Dan Gohmanb197c2d2019-01-14 18:20:30 +0000231Changes to the WebAssembly Target
232---------------------------------
233
234The WebAssembly target is no longer "experimental"! It's now built by default,
235rather than needing to be enabled with LLVM_EXPERIMENTAL_TARGETS_TO_BUILD.
236
237The object file format and core C ABI are now considered stable. That said,
238the object file format has an ABI versioning capability, and one anticipated
239use for it will be to add support for returning small structs as multiple
240return values, once the underlying WebAssembly platform itself supports it.
Derek Schuff2ff9c452019-01-15 17:54:42 +0000241Additionally, multithreading support is not yet included in the stable ABI.
242
Hans Wennborg0e095c02019-02-27 13:54:21 +0000243
Craig Toppereb084302019-02-18 17:59:47 +0000244Changes to the Nios2 Target
245---------------------------
246
247* The Nios2 target was removed from this release.
Dan Gohmanb197c2d2019-01-14 18:20:30 +0000248
Eric Christopher075dc442017-06-30 01:17:45 +0000249
Hans Wennborg795ca012019-02-22 08:09:08 +0000250Changes to LLDB
251===============
Hans Wennborg0e095c02019-02-27 13:54:21 +0000252
Hans Wennborg795ca012019-02-22 08:09:08 +0000253* Printed source code is now syntax highlighted in the terminal (only for C
254 languages).
255
256* The expression command now supports tab completing expressions.
257
258
Hans Wennborge17bf012018-08-01 13:58:00 +0000259External Open Source Projects Using LLVM 8
Hans Wennborg50082b12017-01-12 21:50:22 +0000260==========================================
Rafael Espindolad912be92015-12-16 23:16:33 +0000261
Kai Nacke90e9f522019-02-07 21:09:53 +0000262LDC - the LLVM-based D compiler
263-------------------------------
264
265`D <http://dlang.org>`_ is a language with C-like syntax and static typing. It
266pragmatically combines efficiency, control, and modeling power, with safety and
267programmer productivity. D supports powerful concepts like Compile-Time Function
268Execution (CTFE) and Template Meta-Programming, provides an innovative approach
269to concurrency and offers many classical paradigms.
270
271`LDC <http://wiki.dlang.org/LDC>`_ uses the frontend from the reference compiler
272combined with LLVM as backend to produce efficient native code. LDC targets
273x86/x86_64 systems like Linux, OS X, FreeBSD and Windows and also Linux on ARM
274and PowerPC (32/64 bit). Ports to other architectures like AArch64 and MIPS64
275are underway.
276
Hans Wennborg5337a442019-03-07 08:47:57 +0000277Open Dylan Compiler
278-------------------
279
280`Dylan <https://opendylan.org/>`_ is a multi-paradigm functional
281and object-oriented programming language. It is dynamic while
282providing a programming model designed to support efficient machine
283code generation, including fine-grained control over dynamic and
284static behavior. Dylan also features a powerful macro facility for
285expressive metaprogramming.
286
287The Open Dylan compiler can use LLVM as one of its code-generating
288back-ends, including full support for debug info generation. (Open
289Dylan generates LLVM bitcode directly using a native Dylan IR and
290bitcode library.) Development of a Dylan debugger and interactive REPL
291making use of the LLDB libraries is in progress.
292
Hans Wennborg9d960962019-02-04 08:51:28 +0000293Zig Programming Language
294------------------------
295
296`Zig <https://ziglang.org>`_ is a system programming language intended to be
297an alternative to C. It provides high level features such as generics, compile
298time function execution, and partial evaluation, while exposing low level LLVM
299IR features such as aliases and intrinsics. Zig uses Clang to provide automatic
300import of .h symbols, including inline functions and simple macros. Zig uses
301LLD combined with lazily building compiler-rt to provide out-of-the-box
302cross-compiling for all supported targets.
Kai Nackefd572842013-11-14 05:57:40 +0000303
304
Dmitri Gribenkoe17d8582012-12-09 23:14:26 +0000305Additional Information
306======================
307
308A wide variety of additional information is available on the `LLVM web page
Hans Wennborgaa81d562018-09-10 08:50:31 +0000309<https://llvm.org/>`_, in particular in the `documentation
310<https://llvm.org/docs/>`_ section. The web page also contains versions of the
Dmitri Gribenkoe17d8582012-12-09 23:14:26 +0000311API documentation which is up-to-date with the Subversion version of the source
312code. You can access versions of these documents specific to this release by
313going into the ``llvm/docs/`` directory in the LLVM tree.
314
315If you have any questions or comments about LLVM, please feel free to contact
Hans Wennborgaa81d562018-09-10 08:50:31 +0000316us via the `mailing lists <https://llvm.org/docs/#mailing-lists>`_.