Hans Wennborg | e046459 | 2016-07-18 18:02:23 +0000 | [diff] [blame] | 1 | ======================== |
Hans Wennborg | e17bf01 | 2018-08-01 13:58:00 +0000 | [diff] [blame] | 2 | LLVM 8.0.0 Release Notes |
Hans Wennborg | e046459 | 2016-07-18 18:02:23 +0000 | [diff] [blame] | 3 | ======================== |
Dmitri Gribenko | e17d858 | 2012-12-09 23:14:26 +0000 | [diff] [blame] | 4 | |
| 5 | .. contents:: |
| 6 | :local: |
| 7 | |
Dmitri Gribenko | e17d858 | 2012-12-09 23:14:26 +0000 | [diff] [blame] | 8 | Introduction |
| 9 | ============ |
| 10 | |
| 11 | This document contains the release notes for the LLVM Compiler Infrastructure, |
Hans Wennborg | e17bf01 | 2018-08-01 13:58:00 +0000 | [diff] [blame] | 12 | release 8.0.0. Here we describe the status of LLVM, including major improvements |
Dmitri Gribenko | e17d858 | 2012-12-09 23:14:26 +0000 | [diff] [blame] | 13 | from the previous release, improvements in various subprojects of LLVM, and |
| 14 | some of the current users of the code. All LLVM releases may be downloaded |
Hans Wennborg | 0e095c0 | 2019-02-27 13:54:21 +0000 | [diff] [blame] | 15 | from the `LLVM releases web site <https://releases.llvm.org/>`_. |
Dmitri Gribenko | e17d858 | 2012-12-09 23:14:26 +0000 | [diff] [blame] | 16 | |
| 17 | For more information about LLVM, including information about the latest |
Hans Wennborg | aa81d56 | 2018-09-10 08:50:31 +0000 | [diff] [blame] | 18 | release, please check out the `main LLVM web site <https://llvm.org/>`_. If you |
Dmitri Gribenko | e17d858 | 2012-12-09 23:14:26 +0000 | [diff] [blame] | 19 | have questions or comments, the `LLVM Developer's Mailing List |
Hans Wennborg | aa81d56 | 2018-09-10 08:50:31 +0000 | [diff] [blame] | 20 | <https://lists.llvm.org/mailman/listinfo/llvm-dev>`_ is a good place to send |
Dmitri Gribenko | e17d858 | 2012-12-09 23:14:26 +0000 | [diff] [blame] | 21 | them. |
| 22 | |
Hans Wennborg | 5dd8729 | 2019-02-19 13:14:28 +0000 | [diff] [blame] | 23 | Minimum Required Compiler Version |
| 24 | ================================= |
| 25 | As `discussed on the mailing list |
| 26 | <https://lists.llvm.org/pipermail/llvm-dev/2019-January/129452.html>`_, |
| 27 | building LLVM will soon require more recent toolchains as follows: |
| 28 | |
| 29 | ============= ==== |
| 30 | Clang 3.5 |
| 31 | Apple Clang 6.0 |
| 32 | GCC 5.1 |
| 33 | Visual Studio 2017 |
| 34 | ============= ==== |
| 35 | |
| 36 | A new CMake check when configuring LLVM provides a soft-error if your |
| 37 | toolchain will become unsupported soon. You can opt out of the soft-error by |
| 38 | setting the ``LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN`` CMake variable to |
| 39 | ``ON``. |
| 40 | |
| 41 | |
Hans Wennborg | 0e095c0 | 2019-02-27 13:54:21 +0000 | [diff] [blame] | 42 | Known Issues |
| 43 | ============ |
| 44 | |
| 45 | These are issues that couldn't be fixed before the release. See the bug reports |
| 46 | for 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 Silva | 4a53562 | 2013-01-20 03:29:50 +0000 | [diff] [blame] | 53 | Non-comprehensive list of changes in this release |
| 54 | ================================================= |
Dmitri Gribenko | e17d858 | 2012-12-09 23:14:26 +0000 | [diff] [blame] | 55 | |
Max Moroz | fcdc267 | 2018-11-09 16:10:44 +0000 | [diff] [blame] | 56 | * The **llvm-cov** tool can now export lcov trace files using the |
| 57 | `-format=lcov` option of the `export` command. |
Dmitri Gribenko | e17d858 | 2012-12-09 23:14:26 +0000 | [diff] [blame] | 58 | |
Hans Wennborg | 5dd8729 | 2019-02-19 13:14:28 +0000 | [diff] [blame] | 59 | * 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 Stellard | 8584d26 | 2018-12-21 16:20:37 +0000 | [diff] [blame] | 61 | functionality. See `Writing an LLVM Pass |
| 62 | <WritingAnLLVMPass.html#setting-up-the-build-environment>`_. |
| 63 | |
Martin Storsjo | b30cd93 | 2019-01-22 20:36:23 +0000 | [diff] [blame] | 64 | * 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 Atanasyan | a42506f | 2019-01-30 22:45:12 +0000 | [diff] [blame] | 68 | * Added support for labels as offsets in ``.reloc`` directive. |
| 69 | |
Hans Wennborg | c8f5c21 | 2019-02-21 08:53:01 +0000 | [diff] [blame] | 70 | * 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 Wennborg | 4da256c | 2019-02-26 16:19:38 +0000 | [diff] [blame] | 88 | * Windows support for libFuzzer (x86_64). |
| 89 | |
Elena Demikhovsky | 5a15e95 | 2016-03-29 06:55:56 +0000 | [diff] [blame] | 90 | Changes to the LLVM IR |
| 91 | ---------------------- |
| 92 | |
Hans Wennborg | a54da93 | 2019-02-21 14:16:48 +0000 | [diff] [blame] | 93 | * 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 Padlewski | 6ebd054 | 2018-05-18 23:53:46 +0000 | [diff] [blame] | 97 | |
Hans Wennborg | 9c31578 | 2019-03-13 08:53:49 +0000 | [diff] [blame] | 98 | Changes to the JIT APIs |
| 99 | ----------------------- |
| 100 | |
| 101 | The ORC (On Request Compilation) JIT APIs have been updated to support |
| 102 | concurrent compilation. The existing (non-concurrent) ORC layer classes and |
| 103 | related APIs are deprecated, have been renamed with a "Legacy" prefix (e.g. |
| 104 | LegacyIRCompileLayer). The deprecated clasess will be removed in LLVM 9. |
| 105 | |
| 106 | An example JIT stack using the concurrent ORC APIs, called LLJIT, has been |
| 107 | added (see include/llvm/ExecutionEngine/Orc/LLJIT.h). The lli tool has been |
| 108 | updated to use LLJIT. |
| 109 | |
| 110 | MCJIT and ExecutionEngine continue to be supported, though ORC should be |
| 111 | preferred for new projects. |
| 112 | |
| 113 | |
Martin Storsjo | b30cd93 | 2019-01-22 20:36:23 +0000 | [diff] [blame] | 114 | Changes to the AArch64 Target |
| 115 | ----------------------------- |
| 116 | |
Hans Wennborg | a54da93 | 2019-02-21 14:16:48 +0000 | [diff] [blame] | 117 | * Support for Speculative Load Hardening has been added. |
| 118 | |
Hans Wennborg | fd73ac7 | 2019-02-20 12:38:35 +0000 | [diff] [blame] | 119 | * Initial support for the Tiny code model, where code and its statically |
| 120 | defined symbols must live within 1MB of each other. |
| 121 | |
Martin Storsjo | b30cd93 | 2019-01-22 20:36:23 +0000 | [diff] [blame] | 122 | * Added support for the ``.arch_extension`` assembler directive, just like |
| 123 | on ARM. |
| 124 | |
| 125 | |
Krzysztof Parzyszek | e5cc680 | 2019-02-01 20:55:52 +0000 | [diff] [blame] | 126 | Changes to the Hexagon Target |
Hans Wennborg | 89e0e7b | 2019-02-07 12:32:55 +0000 | [diff] [blame] | 127 | ----------------------------- |
Krzysztof Parzyszek | e5cc680 | 2019-02-01 20:55:52 +0000 | [diff] [blame] | 128 | |
| 129 | * Added support for Hexagon/HVX V66 ISA. |
| 130 | |
Hans Wennborg | 0e095c0 | 2019-02-27 13:54:21 +0000 | [diff] [blame] | 131 | |
Daniel Sanders | e35dcb6 | 2014-07-23 12:59:26 +0000 | [diff] [blame] | 132 | Changes to the MIPS Target |
| 133 | -------------------------- |
| 134 | |
Simon Atanasyan | a42506f | 2019-01-30 22:45:12 +0000 | [diff] [blame] | 135 | * Improved support of GlobalISel instruction selection framework. |
Daniel Sanders | e7f28b2 | 2015-01-11 10:34:52 +0000 | [diff] [blame] | 136 | |
Simon Atanasyan | a42506f | 2019-01-30 22:45:12 +0000 | [diff] [blame] | 137 | * 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 Sanders | e35dcb6 | 2014-07-23 12:59:26 +0000 | [diff] [blame] | 152 | |
Hans Wennborg | 0e095c0 | 2019-02-27 13:54:21 +0000 | [diff] [blame] | 153 | |
Bill Schmidt | b0574ad | 2014-07-31 14:38:17 +0000 | [diff] [blame] | 154 | Changes to the PowerPC Target |
Bill Schmidt | b74ca14 | 2014-07-31 15:20:30 +0000 | [diff] [blame] | 155 | ----------------------------- |
Bill Schmidt | b0574ad | 2014-07-31 14:38:17 +0000 | [diff] [blame] | 156 | |
Hans Wennborg | 6f9d9be | 2019-02-20 12:43:20 +0000 | [diff] [blame] | 157 | * 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 Wennborg | 0e095c0 | 2019-02-27 13:54:21 +0000 | [diff] [blame] | 165 | * Support constraint 'wi', modifier 'x' and VSX registers in inline asm |
Hans Wennborg | 6f9d9be | 2019-02-20 12:43:20 +0000 | [diff] [blame] | 166 | |
| 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 Schmidt | b0574ad | 2014-07-31 14:38:17 +0000 | [diff] [blame] | 191 | |
Hans Wennborg | 42c2c20 | 2019-03-12 12:52:54 +0000 | [diff] [blame] | 192 | Changes 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 Takumi | d644801 | 2015-12-21 02:37:23 +0000 | [diff] [blame] | 212 | Changes to the X86 Target |
Elena Demikhovsky | 5a15e95 | 2016-03-29 06:55:56 +0000 | [diff] [blame] | 213 | ------------------------- |
NAKAMURA Takumi | d644801 | 2015-12-21 02:37:23 +0000 | [diff] [blame] | 214 | |
Roman Lebedev | db50b6f | 2018-12-24 12:12:26 +0000 | [diff] [blame] | 215 | * Machine model for AMD bdver2 (Piledriver) CPU was added. It is used to support |
| 216 | instruction scheduling and other instruction cost heuristics. |
NAKAMURA Takumi | d644801 | 2015-12-21 02:37:23 +0000 | [diff] [blame] | 217 | |
Craig Topper | eb08430 | 2019-02-18 17:59:47 +0000 | [diff] [blame] | 218 | * 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 McKay | b28b8f2 | 2016-11-17 22:26:09 +0000 | [diff] [blame] | 230 | |
Dan Gohman | b197c2d | 2019-01-14 18:20:30 +0000 | [diff] [blame] | 231 | Changes to the WebAssembly Target |
| 232 | --------------------------------- |
| 233 | |
| 234 | The WebAssembly target is no longer "experimental"! It's now built by default, |
| 235 | rather than needing to be enabled with LLVM_EXPERIMENTAL_TARGETS_TO_BUILD. |
| 236 | |
| 237 | The object file format and core C ABI are now considered stable. That said, |
| 238 | the object file format has an ABI versioning capability, and one anticipated |
| 239 | use for it will be to add support for returning small structs as multiple |
| 240 | return values, once the underlying WebAssembly platform itself supports it. |
Derek Schuff | 2ff9c45 | 2019-01-15 17:54:42 +0000 | [diff] [blame] | 241 | Additionally, multithreading support is not yet included in the stable ABI. |
| 242 | |
Hans Wennborg | 0e095c0 | 2019-02-27 13:54:21 +0000 | [diff] [blame] | 243 | |
Craig Topper | eb08430 | 2019-02-18 17:59:47 +0000 | [diff] [blame] | 244 | Changes to the Nios2 Target |
| 245 | --------------------------- |
| 246 | |
| 247 | * The Nios2 target was removed from this release. |
Dan Gohman | b197c2d | 2019-01-14 18:20:30 +0000 | [diff] [blame] | 248 | |
Eric Christopher | 075dc44 | 2017-06-30 01:17:45 +0000 | [diff] [blame] | 249 | |
Hans Wennborg | 795ca01 | 2019-02-22 08:09:08 +0000 | [diff] [blame] | 250 | Changes to LLDB |
| 251 | =============== |
Hans Wennborg | 0e095c0 | 2019-02-27 13:54:21 +0000 | [diff] [blame] | 252 | |
Hans Wennborg | 795ca01 | 2019-02-22 08:09:08 +0000 | [diff] [blame] | 253 | * 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 Wennborg | e17bf01 | 2018-08-01 13:58:00 +0000 | [diff] [blame] | 259 | External Open Source Projects Using LLVM 8 |
Hans Wennborg | 50082b1 | 2017-01-12 21:50:22 +0000 | [diff] [blame] | 260 | ========================================== |
Rafael Espindola | d912be9 | 2015-12-16 23:16:33 +0000 | [diff] [blame] | 261 | |
Kai Nacke | 90e9f52 | 2019-02-07 21:09:53 +0000 | [diff] [blame] | 262 | LDC - the LLVM-based D compiler |
| 263 | ------------------------------- |
| 264 | |
| 265 | `D <http://dlang.org>`_ is a language with C-like syntax and static typing. It |
| 266 | pragmatically combines efficiency, control, and modeling power, with safety and |
| 267 | programmer productivity. D supports powerful concepts like Compile-Time Function |
| 268 | Execution (CTFE) and Template Meta-Programming, provides an innovative approach |
| 269 | to concurrency and offers many classical paradigms. |
| 270 | |
| 271 | `LDC <http://wiki.dlang.org/LDC>`_ uses the frontend from the reference compiler |
| 272 | combined with LLVM as backend to produce efficient native code. LDC targets |
| 273 | x86/x86_64 systems like Linux, OS X, FreeBSD and Windows and also Linux on ARM |
| 274 | and PowerPC (32/64 bit). Ports to other architectures like AArch64 and MIPS64 |
| 275 | are underway. |
| 276 | |
Hans Wennborg | 5337a44 | 2019-03-07 08:47:57 +0000 | [diff] [blame] | 277 | Open Dylan Compiler |
| 278 | ------------------- |
| 279 | |
| 280 | `Dylan <https://opendylan.org/>`_ is a multi-paradigm functional |
| 281 | and object-oriented programming language. It is dynamic while |
| 282 | providing a programming model designed to support efficient machine |
| 283 | code generation, including fine-grained control over dynamic and |
| 284 | static behavior. Dylan also features a powerful macro facility for |
| 285 | expressive metaprogramming. |
| 286 | |
| 287 | The Open Dylan compiler can use LLVM as one of its code-generating |
| 288 | back-ends, including full support for debug info generation. (Open |
| 289 | Dylan generates LLVM bitcode directly using a native Dylan IR and |
| 290 | bitcode library.) Development of a Dylan debugger and interactive REPL |
| 291 | making use of the LLDB libraries is in progress. |
| 292 | |
Hans Wennborg | 9d96096 | 2019-02-04 08:51:28 +0000 | [diff] [blame] | 293 | Zig Programming Language |
| 294 | ------------------------ |
| 295 | |
| 296 | `Zig <https://ziglang.org>`_ is a system programming language intended to be |
| 297 | an alternative to C. It provides high level features such as generics, compile |
| 298 | time function execution, and partial evaluation, while exposing low level LLVM |
| 299 | IR features such as aliases and intrinsics. Zig uses Clang to provide automatic |
| 300 | import of .h symbols, including inline functions and simple macros. Zig uses |
| 301 | LLD combined with lazily building compiler-rt to provide out-of-the-box |
| 302 | cross-compiling for all supported targets. |
Kai Nacke | fd57284 | 2013-11-14 05:57:40 +0000 | [diff] [blame] | 303 | |
| 304 | |
Dmitri Gribenko | e17d858 | 2012-12-09 23:14:26 +0000 | [diff] [blame] | 305 | Additional Information |
| 306 | ====================== |
| 307 | |
| 308 | A wide variety of additional information is available on the `LLVM web page |
Hans Wennborg | aa81d56 | 2018-09-10 08:50:31 +0000 | [diff] [blame] | 309 | <https://llvm.org/>`_, in particular in the `documentation |
| 310 | <https://llvm.org/docs/>`_ section. The web page also contains versions of the |
Dmitri Gribenko | e17d858 | 2012-12-09 23:14:26 +0000 | [diff] [blame] | 311 | API documentation which is up-to-date with the Subversion version of the source |
| 312 | code. You can access versions of these documents specific to this release by |
| 313 | going into the ``llvm/docs/`` directory in the LLVM tree. |
| 314 | |
| 315 | If you have any questions or comments about LLVM, please feel free to contact |
Hans Wennborg | aa81d56 | 2018-09-10 08:50:31 +0000 | [diff] [blame] | 316 | us via the `mailing lists <https://llvm.org/docs/#mailing-lists>`_. |