Skip to content

Commit 2957924

Browse files
committed
[llvm][docs] Convert LLVM release notes to Markdown
* Markdown is the most common format on GitHub and most contributors are more familiar with it than RST. * This leads to mistakes in the RST syntax and/or folks just using Markdown syntax and assuming it works. * The release notes have a high number of edits and a high number of views, we should optimise for making the common path easy. That is, adding a bullet point and a link. * Though GitHub can render RST and Markdown, its support for Markdown is more complete (and neither handle the Sphinx directives well). * We already have some Markdown docs in the llvm docs. To keep the original formatting we do need some Sphinx directives still, and those are provided by MyST which is already enabled. https://myst-parser.readthedocs.io/en/latest/ I did have to enable an extension so we can substitute in the release version. https://myst-parser.readthedocs.io/en/latest/syntax/optional.html#substitutions-with-jinja2 Needing to use MyST means there is some special knowledge needed if you want to do advanced things, but at least the basics remain Markdown. Even in RST form, you still had to look up Sphinx syntax. I also make use of a nested directive https://myst-parser.readthedocs.io/en/latest/syntax/roles-and-directives.html#nesting-directives to implement the prerelease warning. The note about sections referred to another note that got removed in 4c72deb. I presume accidentally, so I have restored that. I also removed the "Update on required toolchains to build LLVM" header because the section is now empty. The other difference is that the table of contents now has a heading "Contents". This is the default and I could not find a way to remove that name. Otherwise it's the same table as you'd get from the RST document.
1 parent 439dcfa commit 2957924

File tree

2 files changed

+82
-74
lines changed

2 files changed

+82
-74
lines changed

llvm/docs/ReleaseNotes.rst renamed to llvm/docs/ReleaseNotes.md

Lines changed: 80 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,66 @@
1-
============================
2-
LLVM |release| Release Notes
3-
============================
1+
<!-- This document is written in Markdown and uses extra directives provided by
2+
MyST (https://myst-parser.readthedocs.io/en/latest/). -->
43

5-
.. contents::
6-
:local:
4+
LLVM {{env.config.release}} Release Notes
5+
=========================================
76

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>`_.
7+
```{contents}
8+
```
149

10+
````{only} PreRelease
11+
```{warning} These are in-progress notes for the upcoming LLVM {{env.config.release}}
12+
release. Release notes for previous releases can be found on
13+
[the Download Page](https://releases.llvm.org/download.html).
14+
```
15+
````
1516

1617
Introduction
1718
============
1819

1920
This document contains the release notes for the LLVM Compiler Infrastructure,
20-
release |release|. Here we describe the status of LLVM, including major improvements
21-
from the previous release, improvements in various subprojects of LLVM, and
22-
some of the current users of the code. All LLVM releases may be downloaded
23-
from the `LLVM releases web site <https://llvm.org/releases/>`_.
21+
release {{env.config.release}}. Here we describe the status of LLVM, including
22+
major improvements from the previous release, improvements in various subprojects
23+
of LLVM, and some of the current users of the code. All LLVM releases may be
24+
downloaded from the [LLVM releases web site](https://llvm.org/releases/).
2425

2526
For more information about LLVM, including information about the latest
26-
release, please check out the `main LLVM web site <https://llvm.org/>`_. If you
27-
have questions or comments, the `Discourse forums
28-
<https://discourse.llvm.org>`_ is a good place to ask
29-
them.
27+
release, please check out the [main LLVM web site](https://llvm.org/). If you
28+
have questions or comments, the [Discourse forums](https://discourse.llvm.org)
29+
is a good place to ask them.
3030

3131
Note that if you are reading this file from a Git checkout or the main
3232
LLVM web page, this document applies to the *next* release, not the current
33-
one. To see the release notes for a specific release, please see the `releases
34-
page <https://llvm.org/releases/>`_.
33+
one. To see the release notes for a specific release, please see the
34+
[releases page](https://llvm.org/releases/).
3535

3636
Non-comprehensive list of changes in this release
3737
=================================================
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.
38+
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 comment below
43+
for adding a new subsection. -->
4444

4545
* ...
4646

47-
Update on required toolchains to build LLVM
48-
-------------------------------------------
47+
<!-- If you would like to document a larger change, then you can add a
48+
subsection about it right here. You can copy the following boilerplate:
49+
50+
Special New Feature
51+
-------------------
52+
53+
Makes programs 10x faster by doing Special New Thing.
54+
-->
4955

5056
Changes to the LLVM IR
5157
----------------------
5258

53-
* The ``x86_mmx`` IR type has been removed. It will be translated to
54-
the standard vector type ``<1 x i64>`` in bitcode upgrade.
55-
* Renamed ``llvm.experimental.stepvector`` intrinsic to ``llvm.stepvector``.
59+
* The `x86_mmx` IR type has been removed. It will be translated to
60+
the standard vector type `<1 x i64>` in bitcode upgrade.
61+
* Renamed `llvm.experimental.stepvector` intrinsic to `llvm.stepvector`.
5662

57-
* Added ``usub_cond`` and ``usub_sat`` operations to ``atomicrmw``.
63+
* Added `usub_cond` and `usub_sat` operations to `atomicrmw`.
5864

5965
* Remove the following intrinsics which can be replaced with a ``bitcast``:
6066

@@ -85,9 +91,9 @@ Changes to the AArch64 Backend
8591
Changes to the AMDGPU Backend
8692
-----------------------------
8793

88-
* Removed ``llvm.amdgcn.flat.atomic.fadd`` and
89-
``llvm.amdgcn.global.atomic.fadd`` intrinsics. Users should use the
90-
:ref:`atomicrmw <i_atomicrmw>` instruction with `fadd` and
94+
* Removed `llvm.amdgcn.flat.atomic.fadd` and
95+
`llvm.amdgcn.global.atomic.fadd` intrinsics. Users should use the
96+
{ref}`atomicrmw <i_atomicrmw>` instruction with `fadd` and
9197
addrspace(0) or addrspace(1) instead.
9298

9399
Changes to the ARM Backend
@@ -121,17 +127,17 @@ Changes to the RISC-V Backend
121127
* `.balign N, 0`, `.p2align N, 0`, `.align N, 0` in code sections will now fill
122128
the required alignment space with a sequence of `0x0` bytes (the requested
123129
fill value) rather than NOPs.
124-
* Added Syntacore SCR4 and SCR5 CPUs: ``-mcpu=syntacore-scr4/5-rv32/64``
125-
* ``-mcpu=sifive-p470`` was added.
126-
* Added Hazard3 CPU as taped out for RP2350: ``-mcpu=rp2350-hazard3`` (32-bit
130+
* Added Syntacore SCR4 and SCR5 CPUs: `-mcpu=syntacore-scr4/5-rv32/64`
131+
* `-mcpu=sifive-p470` was added.
132+
* Added Hazard3 CPU as taped out for RP2350: `-mcpu=rp2350-hazard3` (32-bit
127133
only).
128134
* Fixed length vector support using RVV instructions now requires VLEN>=64. This
129135
means Zve32x and Zve32f will also require Zvl64b. The prior support was
130136
largely untested.
131-
* The ``Zvbc32e`` and ``Zvkgs`` extensions are now supported experimentally.
132-
* Added ``Smctr`` and ``Ssctr`` extensions.
133-
* ``-mcpu=syntacore-scr7`` was added.
134-
* The ``Zacas`` extension is no longer marked as experimental.
137+
* The `Zvbc32e` and `Zvkgs` extensions are now supported experimentally.
138+
* Added `Smctr` and `Ssctr` extensions.
139+
* `-mcpu=syntacore-scr7` was added.
140+
* The `Zacas` extension is no longer marked as experimental.
135141

136142
Changes to the WebAssembly Backend
137143
----------------------------------
@@ -149,13 +155,13 @@ Changes to the X86 Backend
149155
encoding. To use optimised NOP filling in a code section, leave off the
150156
"fillval" argument, i.e. `.balign N`, `.p2align N` or `.align N` respectively.
151157

152-
* Due to the removal of the ``x86_mmx`` IR type, functions with
153-
``x86_mmx`` arguments or return values will use a different,
158+
* Due to the removal of the `x86_mmx` IR type, functions with
159+
`x86_mmx` arguments or return values will use a different,
154160
incompatible, calling convention ABI. Such functions are not
155161
generally seen in the wild (Clang never generates them!), so this is
156162
not expected to result in real-world compatibility problems.
157163

158-
* Support ISA of ``AVX10.2-256`` and ``AVX10.2-512``.
164+
* Support ISA of `AVX10.2-256` and `AVX10.2-512`.
159165

160166
Changes to the OCaml bindings
161167
-----------------------------
@@ -166,40 +172,40 @@ Changes to the Python bindings
166172
Changes to the C API
167173
--------------------
168174

169-
* The following symbols are deleted due to the removal of the ``x86_mmx`` IR type:
175+
* The following symbols are deleted due to the removal of the `x86_mmx` IR type:
170176

171-
* ``LLVMX86_MMXTypeKind``
172-
* ``LLVMX86MMXTypeInContext``
173-
* ``LLVMX86MMXType``
177+
* `LLVMX86_MMXTypeKind`
178+
* `LLVMX86MMXTypeInContext`
179+
* `LLVMX86MMXType`
174180

175181
* The following functions are added to further support non-null-terminated strings:
176182

177-
* ``LLVMGetNamedFunctionWithLength``
178-
* ``LLVMGetNamedGlobalWithLength``
183+
* `LLVMGetNamedFunctionWithLength`
184+
* `LLVMGetNamedGlobalWithLength`
179185

180-
* The following functions are added to access the ``LLVMContextRef`` associated
181-
with ``LLVMValueRef`` and ``LLVMBuilderRef`` objects:
186+
* The following functions are added to access the `LLVMContextRef` associated
187+
with `LLVMValueRef` and `LLVMBuilderRef` objects:
182188

183-
* ``LLVMGetValueContext``
184-
* ``LLVMGetBuilderContext``
189+
* `LLVMGetValueContext`
190+
* `LLVMGetBuilderContext`
185191

186192
* The new pass manager can now be invoked with a custom alias analysis pipeline, using
187-
the ``LLVMPassBuilderOptionsSetAAPipeline`` function.
193+
the `LLVMPassBuilderOptionsSetAAPipeline` function.
188194

189195
* It is now also possible to run the new pass manager on a single function, by calling
190-
``LLVMRunPassesOnFunction`` instead of ``LLVMRunPasses``.
196+
`LLVMRunPassesOnFunction` instead of `LLVMRunPasses`.
191197

192198
* Support for creating instructions with custom synchronization scopes has been added:
193199

194-
* ``LLVMGetSyncScopeID`` to map a synchronization scope name to an ID.
195-
* ``LLVMBuildFenceSyncScope``, ``LLVMBuildAtomicRMWSyncScope`` and
196-
``LLVMBuildAtomicCmpXchgSyncScope`` versions of the existing builder functions
200+
* `LLVMGetSyncScopeID` to map a synchronization scope name to an ID.
201+
* `LLVMBuildFenceSyncScope`, `LLVMBuildAtomicRMWSyncScope` and
202+
`LLVMBuildAtomicCmpXchgSyncScope` versions of the existing builder functions
197203
with an additional synchronization scope ID parameter.
198-
* ``LLVMGetAtomicSyncScopeID`` and ``LLVMSetAtomicSyncScopeID`` to get and set the
204+
* `LLVMGetAtomicSyncScopeID` and `LLVMSetAtomicSyncScopeID` to get and set the
199205
synchronization scope of any atomic instruction.
200-
* ``LLVMIsAtomic`` to check if an instruction is atomic, for use with the above functions.
201-
Because of backwards compatibility, ``LLVMIsAtomicSingleThread`` and
202-
``LLVMSetAtomicSingleThread`` continue to work with any instruction type.
206+
* `LLVMIsAtomic` to check if an instruction is atomic, for use with the above functions.
207+
Because of backwards compatibility, `LLVMIsAtomicSingleThread` and
208+
`LLVMSetAtomicSingleThread` continue to work with any instruction type.
203209

204210
* The `LLVMSetPersonalityFn` and `LLVMSetInitializer` APIs now support clearing the
205211
personality function and initializer respectively by passing a null pointer.
@@ -238,20 +244,20 @@ Changes to Sanitizers
238244
Other Changes
239245
-------------
240246

241-
External Open Source Projects Using LLVM 19
242-
===========================================
247+
External Open Source Projects Using LLVM {{env.config.release}}
248+
===============================================================
243249

244250
* A project...
245251

246252
Additional Information
247253
======================
248254

249-
A wide variety of additional information is available on the `LLVM web page
250-
<https://llvm.org/>`_, in particular in the `documentation
251-
<https://llvm.org/docs/>`_ section. The web page also contains versions of the
252-
API documentation which is up-to-date with the Git version of the source
253-
code. You can access versions of these documents specific to this release by
254-
going into the ``llvm/docs/`` directory in the LLVM tree.
255+
A wide variety of additional information is available on the
256+
[LLVM web page](https://llvm.org/), in particular in the
257+
[documentation](https://llvm.org/docs/) section. The web page also contains
258+
versions of the API documentation which is up-to-date with the Git version of
259+
the source code. You can access versions of these documents specific to this
260+
release by going into the `llvm/docs/` directory in the LLVM tree.
255261

256262
If you have any questions or comments about LLVM, please feel free to contact
257-
us via the `Discourse forums <https://discourse.llvm.org>`_.
263+
us via the [Discourse forums](https://discourse.llvm.org).

llvm/docs/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
except ImportError:
3939
if not tags.has("builder-man"):
4040
raise
41+
else:
42+
myst_enable_extensions = ['substitution']
4143

4244
# Automatic anchors for markdown titles
4345
myst_heading_anchors = 6

0 commit comments

Comments
 (0)