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* Renamed ``llvm.experimental.vector.extract`` intrinsic to ``llvm.vector.extract``.
70* Renamed ``llvm.experimental.vector.insert`` intrinsic to ``llvm.vector.insert``.
71* The constant expression variants of the following instructions have been
72  removed:
73  * ``extractvalue``
74  * ``insertvalue``
75  * ``udiv``
76  * ``sdiv``
77  * ``urem``
78  * ``srem``
79  * ``fadd``
80  * ``fsub``
81  * ``fmul``
82  * ``fdiv``
83  * ``frem``
84* Added the support for ``fmax`` and ``fmin`` in ``atomicrmw`` instruction. The
85  comparison is expected to match the behavior of ``llvm.maxnum.*`` and
86  ``llvm.minnum.*`` respectively.
87* ``callbr`` instructions no longer use ``blockaddress`` arguments for labels.
88  Instead, label constraints starting with ``!`` refer directly to entries in
89  the ``callbr`` indirect destination list.
90
91.. code-block:: llvm
92
93    ; Old representation
94    %res = callbr i32 asm "", "=r,r,i"(i32 %x, i8 *blockaddress(@foo, %indirect))
95          to label %fallthrough [label %indirect]
96    ; New representation
97    %res = callbr i32 asm "", "=r,r,!i"(i32 %x)
98          to label %fallthrough [label %indirect]
99
100Changes to building LLVM
101------------------------
102
103* Omitting ``CMAKE_BUILD_TYPE`` when using a single configuration generator is now
104  an error. You now have to pass ``-DCMAKE_BUILD_TYPE=<type>`` in order to configure
105  LLVM. This is done to help new users of LLVM select the correct type: since building
106  LLVM in Debug mode is very resource intensive, we want to make sure that new users
107  make the choice that lines up with their usage. We have also improved documentation
108  around this setting that should help new users. You can find this documentation
109  `here <https://llvm.org/docs/CMake.html#cmake-build-type>`_.
110
111Changes to TableGen
112-------------------
113
114Changes to the AArch64 Backend
115------------------------------
116
117Changes to the AMDGPU Backend
118-----------------------------
119
120* 8 and 16-bit atomic loads and stores are now supported
121
122
123Changes to the ARM Backend
124--------------------------
125
126* Added support for the Armv9-A, Armv9.1-A and Armv9.2-A architectures.
127* Added support for the Armv8.1-M PACBTI-M extension.
128* Added support for the Armv9-A, Armv9.1-A and Armv9.2-A architectures.
129* Added support for the Armv8.1-M PACBTI-M extension.
130* Removed the deprecation of ARMv8-A T32 Complex IT blocks. No deprecation
131  warnings will be generated and -mrestrict-it is now always off by default.
132  Previously it was on by default for Armv8 and off for all other architecture
133  versions.
134* Added a pass to workaround Cortex-A57 Erratum 1742098 and Cortex-A72
135  Erratum 1655431. This is enabled by default when targeting either CPU.
136* Implemented generation of Windows SEH unwind information.
137* Switched the MinGW target to use SEH instead of DWARF for unwind information.
138* Added support for the Cortex-M85 CPU.
139* Added support for a new -mframe-chain=(none|aapcs|aapcs+leaf) command-line
140  option, which controls the generation of AAPCS-compliant Frame Records.
141
142Changes to the AVR Backend
143--------------------------
144
145* ...
146
147Changes to the DirectX Backend
148------------------------------
149
150* DirectX has been added as an experimental target. Specify
151  ``-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=DirectX`` in your CMake configuration
152  to enable it. The target is not packaged in pre-built binaries.
153* The DirectX backend supports the ``dxil`` architecture which is based on LLVM
154  3.6 IR encoded as bitcode and is the format used for DirectX GPU Shader
155  programs.
156
157Changes to the Hexagon Backend
158------------------------------
159
160* ...
161
162Changes to the MIPS Backend
163---------------------------
164
165* ...
166
167Changes to the PowerPC Backend
168------------------------------
169
170* ...
171
172Changes to the RISC-V Backend
173-----------------------------
174
175* The Zvfh extension was added.
176
177Changes to the WebAssembly Backend
178----------------------------------
179
180* ...
181
182Changes to the X86 Backend
183--------------------------
184
185* Support ``half`` type on SSE2 and above targets.
186* Support ``rdpru`` instruction on Zen2 and above targets.
187
188Changes to the OCaml bindings
189-----------------------------
190
191
192Changes to the C API
193--------------------
194
195* Add ``LLVMGetCastOpcode`` function to aid users of ``LLVMBuildCast`` in
196  resolving the best cast operation given a source value and destination type.
197  This function is a direct wrapper of ``CastInst::getCastOpcode``.
198
199* Add ``LLVMGetAggregateElement`` function as a wrapper for
200  ``Constant::getAggregateElement``, which can be used to fetch an element of a
201  constant struct, array or vector, independently of the underlying
202  representation. The ``LLVMGetElementAsConstant`` function is deprecated in
203  favor of the new function, which works on all constant aggregates, rather than
204  only instances of ``ConstantDataSequential``.
205
206* The following functions for creating constant expressions have been removed,
207  because the underlying constant expressions are no longer supported. Instead,
208  an instruction should be created using the ``LLVMBuildXYZ`` APIs, which will
209  constant fold the operands if possible and create an instruction otherwise:
210  * ``LLVMConstExtractValue``
211  * ``LLVMConstInsertValue``
212  * ``LLVMConstUDiv``
213  * ``LLVMConstExactUDiv``
214  * ``LLVMConstSDiv``
215  * ``LLVMConstExactSDiv``
216  * ``LLVMConstURem``
217  * ``LLVMConstSRem``
218  * ``LLVMConstFAdd``
219  * ``LLVMConstFSub``
220  * ``LLVMConstFMul``
221  * ``LLVMConstFDiv``
222  * ``LLVMConstFRem``
223
224* Add ``LLVMDeleteInstruction`` function which allows deleting instructions that
225  are not inserted into a basic block.
226
227* Refactor compression namespaces across the project, making way for a possible
228  introduction of alternatives to zlib compression in the llvm toolchain.
229  Changes are as follows:
230  * Relocate the ``llvm::zlib`` namespace to ``llvm::compression::zlib``.
231  * Remove crc32 from zlib compression namespace, people should use the ``llvm::crc32`` instead.
232
233Changes to the Go bindings
234--------------------------
235
236
237Changes to the FastISel infrastructure
238--------------------------------------
239
240* ...
241
242Changes to the DAG infrastructure
243---------------------------------
244
245
246Changes to the Metadata Info
247---------------------------------
248
249* Add Module Flags Metadata ``stack-protector-guard-symbol`` which specify a
250  symbol for addressing the stack-protector guard.
251
252Changes to the Debug Info
253---------------------------------
254
255During this release ...
256
257Changes to the LLVM tools
258---------------------------------
259
260* (Experimental) :manpage:`llvm-symbolizer(1)` now has ``--filter-markup`` to
261  filter :doc:`Symbolizer Markup </SymbolizerMarkupFormat>` into human-readable
262  form.
263* :doc:`llvm-objcopy <CommandGuide/llvm-objcopy>` has removed support for the legacy ``zlib-gnu`` format.
264* :doc:`llvm-objcopy <CommandGuide/llvm-objcopy>` now allows ``--set-section-flags src=... --rename-section src=tst``.
265  ``--add-section=.foo1=... --rename-section=.foo1=.foo2`` now adds ``.foo1`` instead of ``.foo2``.
266* The LLVM gold plugin now ignores bitcode from the ``.llvmbc`` section of ELF
267  files when doing LTO.  https://github.com/llvm/llvm-project/issues/47216
268
269Changes to LLDB
270---------------------------------
271
272* The "memory region" command now has a "--all" option to list all
273  memory regions (including unmapped ranges). This is the equivalent
274  of using address 0 then repeating the command until all regions
275  have been listed.
276* Added "--show-tags" option to the "memory find" command. This is off by default.
277  When enabled, if the target value is found in tagged memory, the tags for that
278  memory will be shown inline with the memory contents.
279* Various memory related parts of LLDB have been updated to handle
280  non-address bits (such as AArch64 pointer signatures):
281
282  * "memory read", "memory write" and "memory find" can now be used with
283    addresses with non-address bits.
284  * All the read and write memory methods on SBProccess and SBTarget can
285    be used with addreses with non-address bits.
286  * When printing a pointer expression, LLDB can now dereference the result
287    even if it has non-address bits.
288  * The memory cache now ignores non-address bits when looking up memory
289    locations. This prevents us reading locations multiple times, or not
290    writing out new values if the addresses have different non-address bits.
291
292Changes to Sanitizers
293---------------------
294
295
296Other Changes
297-------------
298* The code for the `LLVM Visual Studio integration
299  <https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.llvm-toolchain>`_
300  has been removed. This had been obsolete and abandoned since Visual Studio
301  started including an integration by default in 2019.
302
303External Open Source Projects Using LLVM 15
304===========================================
305
306* A project...
307
308Additional Information
309======================
310
311A wide variety of additional information is available on the `LLVM web page
312<https://llvm.org/>`_, in particular in the `documentation
313<https://llvm.org/docs/>`_ section.  The web page also contains versions of the
314API documentation which is up-to-date with the Git version of the source
315code.  You can access versions of these documents specific to this release by
316going into the ``llvm/docs/`` directory in the LLVM tree.
317
318If you have any questions or comments about LLVM, please feel free to contact
319us via the `mailing lists <https://llvm.org/docs/#mailing-lists>`_.
320