1============================
2LLVM |release| Release Notes
3============================
4
5.. contents::
6    :local:
7
8.. only:: PreRelease
9
10  .. warning::
11     These are in-progress notes for the upcoming LLVM |version| release.
12     Release notes for previous releases can be found on
13     `the Download Page <https://releases.llvm.org/download.html>`_.
14
15
16Introduction
17============
18
19This document contains the release notes for the LLVM Compiler Infrastructure,
20release |release|.  Here we describe the status of LLVM, including major improvements
21from the previous release, improvements in various subprojects of LLVM, and
22some of the current users of the code.  All LLVM releases may be downloaded
23from the `LLVM releases web site <https://llvm.org/releases/>`_.
24
25For more information about LLVM, including information about the latest
26release, please check out the `main LLVM web site <https://llvm.org/>`_.  If you
27have questions or comments, the `LLVM Developer's Mailing List
28<https://lists.llvm.org/mailman/listinfo/llvm-dev>`_ is a good place to send
29them.
30
31Note that if you are reading this file from a Git checkout or the main
32LLVM web page, this document applies to the *next* release, not the current
33one.  To see the release notes for a specific release, please see the `releases
34page <https://llvm.org/releases/>`_.
35
36Non-comprehensive list of changes in this release
37=================================================
38.. NOTE
39   For small 1-3 sentence descriptions, just add an entry at the end of
40   this list. If your description won't fit comfortably in one bullet
41   point (e.g. maybe you would like to give an example of the
42   functionality, or simply have a lot to talk about), see the `NOTE` below
43   for adding a new subsection.
44
45* ...
46
47Update on required toolchains to build LLVM
48-------------------------------------------
49
50With LLVM 15.x we will raise the version requirements of the toolchain used
51to build LLVM. The new requirements are as follows:
52
53* GCC >= 7.1
54* Clang >= 5.0
55* Apple Clang >= 9.3
56* Visual Studio 2019 >= 16.7
57
58In LLVM 15.x these requirements will be "soft" requirements and the version
59check can be skipped by passing -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON
60to CMake.
61
62With the release of LLVM 16.x these requirements will be hard and LLVM developers
63can start using C++17 features, making it impossible to build with older
64versions of these toolchains.
65
66Changes to the LLVM IR
67----------------------
68
69* LLVM now uses `opaque pointers <OpaquePointers.html>`__. This means that
70  different pointer types like ``i8*``, ``i32*`` or ``void()**`` are now
71  represented as a single ``ptr`` type. See the linked document for migration
72  instructions.
73* Renamed ``llvm.experimental.vector.extract`` intrinsic to ``llvm.vector.extract``.
74* Renamed ``llvm.experimental.vector.insert`` intrinsic to ``llvm.vector.insert``.
75* The constant expression variants of the following instructions have been
76  removed:
77  * ``extractvalue``
78  * ``insertvalue``
79  * ``udiv``
80  * ``sdiv``
81  * ``urem``
82  * ``srem``
83  * ``fadd``
84  * ``fsub``
85  * ``fmul``
86  * ``fdiv``
87  * ``frem``
88* Added the support for ``fmax`` and ``fmin`` in ``atomicrmw`` instruction. The
89  comparison is expected to match the behavior of ``llvm.maxnum.*`` and
90  ``llvm.minnum.*`` respectively.
91* ``callbr`` instructions no longer use ``blockaddress`` arguments for labels.
92  Instead, label constraints starting with ``!`` refer directly to entries in
93  the ``callbr`` indirect destination list.
94
95.. code-block:: llvm
96
97    ; Old representation
98    %res = callbr i32 asm "", "=r,r,i"(i32 %x, i8 *blockaddress(@foo, %indirect))
99          to label %fallthrough [label %indirect]
100    ; New representation
101    %res = callbr i32 asm "", "=r,r,!i"(i32 %x)
102          to label %fallthrough [label %indirect]
103
104Changes to building LLVM
105------------------------
106
107* Omitting ``CMAKE_BUILD_TYPE`` when using a single configuration generator is now
108  an error. You now have to pass ``-DCMAKE_BUILD_TYPE=<type>`` in order to configure
109  LLVM. This is done to help new users of LLVM select the correct type: since building
110  LLVM in Debug mode is very resource intensive, we want to make sure that new users
111  make the choice that lines up with their usage. We have also improved documentation
112  around this setting that should help new users. You can find this documentation
113  `here <https://llvm.org/docs/CMake.html#cmake-build-type>`_.
114
115Changes to TableGen
116-------------------
117
118Changes to the AArch64 Backend
119------------------------------
120
121Changes to the AMDGPU Backend
122-----------------------------
123
124* 8 and 16-bit atomic loads and stores are now supported
125
126
127Changes to the ARM Backend
128--------------------------
129
130* Added support for the Armv9-A, Armv9.1-A and Armv9.2-A architectures.
131* Added support for the Armv8.1-M PACBTI-M extension.
132* Added support for the Armv9-A, Armv9.1-A and Armv9.2-A architectures.
133* Added support for the Armv8.1-M PACBTI-M extension.
134* Removed the deprecation of ARMv8-A T32 Complex IT blocks. No deprecation
135  warnings will be generated and -mrestrict-it is now always off by default.
136  Previously it was on by default for Armv8 and off for all other architecture
137  versions.
138* Added a pass to workaround Cortex-A57 Erratum 1742098 and Cortex-A72
139  Erratum 1655431. This is enabled by default when targeting either CPU.
140* Implemented generation of Windows SEH unwind information.
141* Switched the MinGW target to use SEH instead of DWARF for unwind information.
142* Added support for the Cortex-M85 CPU.
143* Added support for a new -mframe-chain=(none|aapcs|aapcs+leaf) command-line
144  option, which controls the generation of AAPCS-compliant Frame Records.
145
146Changes to the AVR Backend
147--------------------------
148
149* ...
150
151Changes to the DirectX Backend
152------------------------------
153
154* DirectX has been added as an experimental target. Specify
155  ``-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=DirectX`` in your CMake configuration
156  to enable it. The target is not packaged in pre-built binaries.
157* The DirectX backend supports the ``dxil`` architecture which is based on LLVM
158  3.6 IR encoded as bitcode and is the format used for DirectX GPU Shader
159  programs.
160
161Changes to the Hexagon Backend
162------------------------------
163
164* ...
165
166Changes to the MIPS Backend
167---------------------------
168
169* ...
170
171Changes to the PowerPC Backend
172------------------------------
173
174* ...
175
176Changes to the RISC-V Backend
177-----------------------------
178
179* The Zvfh extension was added.
180
181Changes to the WebAssembly Backend
182----------------------------------
183
184* ...
185
186Changes to the X86 Backend
187--------------------------
188
189* Support ``half`` type on SSE2 and above targets.
190* Support ``rdpru`` instruction on Zen2 and above targets.
191
192Changes to the OCaml bindings
193-----------------------------
194
195
196Changes to the C API
197--------------------
198
199* Add ``LLVMGetCastOpcode`` function to aid users of ``LLVMBuildCast`` in
200  resolving the best cast operation given a source value and destination type.
201  This function is a direct wrapper of ``CastInst::getCastOpcode``.
202
203* Add ``LLVMGetAggregateElement`` function as a wrapper for
204  ``Constant::getAggregateElement``, which can be used to fetch an element of a
205  constant struct, array or vector, independently of the underlying
206  representation. The ``LLVMGetElementAsConstant`` function is deprecated in
207  favor of the new function, which works on all constant aggregates, rather than
208  only instances of ``ConstantDataSequential``.
209
210* The following functions for creating constant expressions have been removed,
211  because the underlying constant expressions are no longer supported. Instead,
212  an instruction should be created using the ``LLVMBuildXYZ`` APIs, which will
213  constant fold the operands if possible and create an instruction otherwise:
214  * ``LLVMConstExtractValue``
215  * ``LLVMConstInsertValue``
216  * ``LLVMConstUDiv``
217  * ``LLVMConstExactUDiv``
218  * ``LLVMConstSDiv``
219  * ``LLVMConstExactSDiv``
220  * ``LLVMConstURem``
221  * ``LLVMConstSRem``
222  * ``LLVMConstFAdd``
223  * ``LLVMConstFSub``
224  * ``LLVMConstFMul``
225  * ``LLVMConstFDiv``
226  * ``LLVMConstFRem``
227
228* Add ``LLVMDeleteInstruction`` function which allows deleting instructions that
229  are not inserted into a basic block.
230
231* As part of the opaque pointer migration, the following APIs are deprecated and
232  will be removed in the next release:
233  * ``LLVMBuildLoad`` -> ``LLVMBuildLoad2``
234  * ``LLVMBuildCall`` -> ``LLVMBuildCall2``
235  * ``LLVMBuildInvoke`` -> ``LLVMBuildInvoke2``
236  * ``LLVMBuildGEP`` -> ``LLVMBuildGEP2``
237  * ``LLVMBuildInBoundsGEP`` -> ``LLVMBuildInBoundsGEP2``
238  * ``LLVMBuildStructGEP`` -> ``LLVMBuildStructGEP2``
239  * ``LLVMBuildPtrDiff`` -> ``LLVMBuildPtrDiff2``
240  * ``LLVMConstGEP`` -> ``LLVMConstGEP2``
241  * ``LLVMConstInBoundsGEP`` -> ``LLVMConstInBoundsGEP2``
242  * ``LLVMAddAlias`` -> ``LLVMAddAlias2``
243
244* Refactor compression namespaces across the project, making way for a possible
245  introduction of alternatives to zlib compression in the llvm toolchain.
246  Changes are as follows:
247  * Relocate the ``llvm::zlib`` namespace to ``llvm::compression::zlib``.
248  * Remove crc32 from zlib compression namespace, people should use the ``llvm::crc32`` instead.
249
250Changes to the Go bindings
251--------------------------
252
253
254Changes to the FastISel infrastructure
255--------------------------------------
256
257* ...
258
259Changes to the DAG infrastructure
260---------------------------------
261
262
263Changes to the Metadata Info
264---------------------------------
265
266* Add Module Flags Metadata ``stack-protector-guard-symbol`` which specify a
267  symbol for addressing the stack-protector guard.
268
269Changes to the Debug Info
270---------------------------------
271
272During this release ...
273
274Changes to the LLVM tools
275---------------------------------
276
277* (Experimental) :manpage:`llvm-symbolizer(1)` now has ``--filter-markup`` to
278  filter :doc:`Symbolizer Markup </SymbolizerMarkupFormat>` into human-readable
279  form.
280* :doc:`llvm-objcopy <CommandGuide/llvm-objcopy>` has removed support for the legacy ``zlib-gnu`` format.
281* :doc:`llvm-objcopy <CommandGuide/llvm-objcopy>` now allows ``--set-section-flags src=... --rename-section src=tst``.
282  ``--add-section=.foo1=... --rename-section=.foo1=.foo2`` now adds ``.foo1`` instead of ``.foo2``.
283* The LLVM gold plugin now ignores bitcode from the ``.llvmbc`` section of ELF
284  files when doing LTO.  https://github.com/llvm/llvm-project/issues/47216
285
286Changes to LLDB
287---------------------------------
288
289* The "memory region" command now has a "--all" option to list all
290  memory regions (including unmapped ranges). This is the equivalent
291  of using address 0 then repeating the command until all regions
292  have been listed.
293* Added "--show-tags" option to the "memory find" command. This is off by default.
294  When enabled, if the target value is found in tagged memory, the tags for that
295  memory will be shown inline with the memory contents.
296* Various memory related parts of LLDB have been updated to handle
297  non-address bits (such as AArch64 pointer signatures):
298
299  * "memory read", "memory write" and "memory find" can now be used with
300    addresses with non-address bits.
301  * All the read and write memory methods on SBProccess and SBTarget can
302    be used with addreses with non-address bits.
303  * When printing a pointer expression, LLDB can now dereference the result
304    even if it has non-address bits.
305  * The memory cache now ignores non-address bits when looking up memory
306    locations. This prevents us reading locations multiple times, or not
307    writing out new values if the addresses have different non-address bits.
308
309Changes to Sanitizers
310---------------------
311
312
313Other Changes
314-------------
315* The code for the `LLVM Visual Studio integration
316  <https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.llvm-toolchain>`_
317  has been removed. This had been obsolete and abandoned since Visual Studio
318  started including an integration by default in 2019.
319
320External Open Source Projects Using LLVM 15
321===========================================
322
323* A project...
324
325Additional Information
326======================
327
328A wide variety of additional information is available on the `LLVM web page
329<https://llvm.org/>`_, in particular in the `documentation
330<https://llvm.org/docs/>`_ section.  The web page also contains versions of the
331API documentation which is up-to-date with the Git version of the source
332code.  You can access versions of these documents specific to this release by
333going into the ``llvm/docs/`` directory in the LLVM tree.
334
335If you have any questions or comments about LLVM, please feel free to contact
336us via the `mailing lists <https://llvm.org/docs/#mailing-lists>`_.
337