[llvm] [llvm][docs] Convert LLVM release notes to Markdown (PR #109107)
David Spickett via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 23 04:28:38 PDT 2024
https://github.com/DavidSpickett updated https://github.com/llvm/llvm-project/pull/109107
>From 9f150fd4d8638da08603e892e2e2660f3525de84 Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at linaro.org>
Date: Tue, 17 Sep 2024 16:14:09 +0100
Subject: [PATCH 1/3] [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 4c72deb613d9d8838785b431facb3eb480fb2f51. 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.
---
.../{ReleaseNotes.rst => ReleaseNotes.md} | 152 +++++++++---------
llvm/docs/conf.py | 2 +
2 files changed, 81 insertions(+), 73 deletions(-)
rename llvm/docs/{ReleaseNotes.rst => ReleaseNotes.md} (53%)
diff --git a/llvm/docs/ReleaseNotes.rst b/llvm/docs/ReleaseNotes.md
similarity index 53%
rename from llvm/docs/ReleaseNotes.rst
rename to llvm/docs/ReleaseNotes.md
index e2a6480c153aeb..dd2c8510bf4edf 100644
--- a/llvm/docs/ReleaseNotes.rst
+++ b/llvm/docs/ReleaseNotes.md
@@ -1,60 +1,66 @@
-============================
-LLVM |release| Release Notes
-============================
+<!-- This document is written in Markdown and uses extra directives provided by
+MyST (https://myst-parser.readthedocs.io/en/latest/). -->
-.. contents::
- :local:
+LLVM {{env.config.release}} Release Notes
+=========================================
-.. only:: PreRelease
-
- .. warning::
- These are in-progress notes for the upcoming LLVM |version| release.
- Release notes for previous releases can be found on
- `the Download Page <https://releases.llvm.org/download.html>`_.
+```{contents}
+```
+````{only} PreRelease
+```{warning} These are in-progress notes for the upcoming LLVM {{env.config.release}}
+ release. Release notes for previous releases can be found on
+ [the Download Page](https://releases.llvm.org/download.html).
+```
+````
Introduction
============
This document contains the release notes for the LLVM Compiler Infrastructure,
-release |release|. Here we describe the status of LLVM, including major improvements
-from the previous release, improvements in various subprojects of LLVM, and
-some of the current users of the code. All LLVM releases may be downloaded
-from the `LLVM releases web site <https://llvm.org/releases/>`_.
+release {{env.config.release}}. Here we describe the status of LLVM, including
+major improvements from the previous release, improvements in various subprojects
+of LLVM, and some of the current users of the code. All LLVM releases may be
+downloaded from the [LLVM releases web site](https://llvm.org/releases/).
For more information about LLVM, including information about the latest
-release, please check out the `main LLVM web site <https://llvm.org/>`_. If you
-have questions or comments, the `Discourse forums
-<https://discourse.llvm.org>`_ is a good place to ask
-them.
+release, please check out the [main LLVM web site](https://llvm.org/). If you
+have questions or comments, the [Discourse forums](https://discourse.llvm.org)
+is a good place to ask them.
Note that if you are reading this file from a Git checkout or the main
LLVM web page, this document applies to the *next* release, not the current
-one. To see the release notes for a specific release, please see the `releases
-page <https://llvm.org/releases/>`_.
+one. To see the release notes for a specific release, please see the
+[releases page](https://llvm.org/releases/).
Non-comprehensive list of changes in this release
=================================================
-.. NOTE
- For small 1-3 sentence descriptions, just add an entry at the end of
- this list. If your description won't fit comfortably in one bullet
- point (e.g. maybe you would like to give an example of the
- functionality, or simply have a lot to talk about), see the `NOTE` below
- for adding a new subsection.
+
+<!-- For small 1-3 sentence descriptions, just add an entry at the end of
+this list. If your description won't fit comfortably in one bullet
+point (e.g. maybe you would like to give an example of the
+functionality, or simply have a lot to talk about), see the comment below
+for adding a new subsection. -->
* ...
-Update on required toolchains to build LLVM
--------------------------------------------
+<!-- If you would like to document a larger change, then you can add a
+subsection about it right here. You can copy the following boilerplate:
+
+Special New Feature
+-------------------
+
+Makes programs 10x faster by doing Special New Thing.
+-->
Changes to the LLVM IR
----------------------
-* The ``x86_mmx`` IR type has been removed. It will be translated to
- the standard vector type ``<1 x i64>`` in bitcode upgrade.
-* Renamed ``llvm.experimental.stepvector`` intrinsic to ``llvm.stepvector``.
+* The `x86_mmx` IR type has been removed. It will be translated to
+ the standard vector type `<1 x i64>` in bitcode upgrade.
+* Renamed `llvm.experimental.stepvector` intrinsic to `llvm.stepvector`.
-* Added ``usub_cond`` and ``usub_sat`` operations to ``atomicrmw``.
+* Added `usub_cond` and `usub_sat` operations to `atomicrmw`.
Changes to LLVM infrastructure
------------------------------
@@ -78,9 +84,9 @@ Changes to the AArch64 Backend
Changes to the AMDGPU Backend
-----------------------------
-* Removed ``llvm.amdgcn.flat.atomic.fadd`` and
- ``llvm.amdgcn.global.atomic.fadd`` intrinsics. Users should use the
- :ref:`atomicrmw <i_atomicrmw>` instruction with `fadd` and
+* Removed `llvm.amdgcn.flat.atomic.fadd` and
+ `llvm.amdgcn.global.atomic.fadd` intrinsics. Users should use the
+ {ref}`atomicrmw <i_atomicrmw>` instruction with `fadd` and
addrspace(0) or addrspace(1) instead.
Changes to the ARM Backend
@@ -114,16 +120,16 @@ Changes to the RISC-V Backend
* `.balign N, 0`, `.p2align N, 0`, `.align N, 0` in code sections will now fill
the required alignment space with a sequence of `0x0` bytes (the requested
fill value) rather than NOPs.
-* Added Syntacore SCR4 and SCR5 CPUs: ``-mcpu=syntacore-scr4/5-rv32/64``
-* ``-mcpu=sifive-p470`` was added.
-* Added Hazard3 CPU as taped out for RP2350: ``-mcpu=rp2350-hazard3`` (32-bit
+* Added Syntacore SCR4 and SCR5 CPUs: `-mcpu=syntacore-scr4/5-rv32/64`
+* `-mcpu=sifive-p470` was added.
+* Added Hazard3 CPU as taped out for RP2350: `-mcpu=rp2350-hazard3` (32-bit
only).
* Fixed length vector support using RVV instructions now requires VLEN>=64. This
means Zve32x and Zve32f will also require Zvl64b. The prior support was
largely untested.
-* The ``Zvbc32e`` and ``Zvkgs`` extensions are now supported experimentally.
-* Added ``Smctr`` and ``Ssctr`` extensions.
-* ``-mcpu=syntacore-scr7`` was added.
+* The `Zvbc32e` and `Zvkgs` extensions are now supported experimentally.
+* Added `Smctr` and `Ssctr` extensions.
+* `-mcpu=syntacore-scr7` was added.
Changes to the WebAssembly Backend
----------------------------------
@@ -141,13 +147,13 @@ Changes to the X86 Backend
encoding. To use optimised NOP filling in a code section, leave off the
"fillval" argument, i.e. `.balign N`, `.p2align N` or `.align N` respectively.
-* Due to the removal of the ``x86_mmx`` IR type, functions with
- ``x86_mmx`` arguments or return values will use a different,
+* Due to the removal of the `x86_mmx` IR type, functions with
+ `x86_mmx` arguments or return values will use a different,
incompatible, calling convention ABI. Such functions are not
generally seen in the wild (Clang never generates them!), so this is
not expected to result in real-world compatibility problems.
-* Support ISA of ``AVX10.2-256`` and ``AVX10.2-512``.
+* Support ISA of `AVX10.2-256` and `AVX10.2-512`.
Changes to the OCaml bindings
-----------------------------
@@ -158,40 +164,40 @@ Changes to the Python bindings
Changes to the C API
--------------------
-* The following symbols are deleted due to the removal of the ``x86_mmx`` IR type:
+* The following symbols are deleted due to the removal of the `x86_mmx` IR type:
- * ``LLVMX86_MMXTypeKind``
- * ``LLVMX86MMXTypeInContext``
- * ``LLVMX86MMXType``
+ * `LLVMX86_MMXTypeKind`
+ * `LLVMX86MMXTypeInContext`
+ * `LLVMX86MMXType`
* The following functions are added to further support non-null-terminated strings:
- * ``LLVMGetNamedFunctionWithLength``
- * ``LLVMGetNamedGlobalWithLength``
+ * `LLVMGetNamedFunctionWithLength`
+ * `LLVMGetNamedGlobalWithLength`
-* The following functions are added to access the ``LLVMContextRef`` associated
- with ``LLVMValueRef`` and ``LLVMBuilderRef`` objects:
+* The following functions are added to access the `LLVMContextRef` associated
+ with `LLVMValueRef` and `LLVMBuilderRef` objects:
- * ``LLVMGetValueContext``
- * ``LLVMGetBuilderContext``
+ * `LLVMGetValueContext`
+ * `LLVMGetBuilderContext`
* The new pass manager can now be invoked with a custom alias analysis pipeline, using
- the ``LLVMPassBuilderOptionsSetAAPipeline`` function.
+ the `LLVMPassBuilderOptionsSetAAPipeline` function.
* It is now also possible to run the new pass manager on a single function, by calling
- ``LLVMRunPassesOnFunction`` instead of ``LLVMRunPasses``.
+ `LLVMRunPassesOnFunction` instead of `LLVMRunPasses`.
* Support for creating instructions with custom synchronization scopes has been added:
- * ``LLVMGetSyncScopeID`` to map a synchronization scope name to an ID.
- * ``LLVMBuildFenceSyncScope``, ``LLVMBuildAtomicRMWSyncScope`` and
- ``LLVMBuildAtomicCmpXchgSyncScope`` versions of the existing builder functions
+ * `LLVMGetSyncScopeID` to map a synchronization scope name to an ID.
+ * `LLVMBuildFenceSyncScope`, `LLVMBuildAtomicRMWSyncScope` and
+ `LLVMBuildAtomicCmpXchgSyncScope` versions of the existing builder functions
with an additional synchronization scope ID parameter.
- * ``LLVMGetAtomicSyncScopeID`` and ``LLVMSetAtomicSyncScopeID`` to get and set the
+ * `LLVMGetAtomicSyncScopeID` and `LLVMSetAtomicSyncScopeID` to get and set the
synchronization scope of any atomic instruction.
- * ``LLVMIsAtomic`` to check if an instruction is atomic, for use with the above functions.
- Because of backwards compatibility, ``LLVMIsAtomicSingleThread`` and
- ``LLVMSetAtomicSingleThread`` continue to work with any instruction type.
+ * `LLVMIsAtomic` to check if an instruction is atomic, for use with the above functions.
+ Because of backwards compatibility, `LLVMIsAtomicSingleThread` and
+ `LLVMSetAtomicSingleThread` continue to work with any instruction type.
* The `LLVMSetPersonalityFn` and `LLVMSetInitializer` APIs now support clearing the
personality function and initializer respectively by passing a null pointer.
@@ -230,20 +236,20 @@ Changes to Sanitizers
Other Changes
-------------
-External Open Source Projects Using LLVM 19
-===========================================
+External Open Source Projects Using LLVM {{env.config.release}}
+===============================================================
* A project...
Additional Information
======================
-A wide variety of additional information is available on the `LLVM web page
-<https://llvm.org/>`_, in particular in the `documentation
-<https://llvm.org/docs/>`_ section. The web page also contains versions of the
-API documentation which is up-to-date with the Git version of the source
-code. You can access versions of these documents specific to this release by
-going into the ``llvm/docs/`` directory in the LLVM tree.
+A wide variety of additional information is available on the
+[LLVM web page](https://llvm.org/), in particular in the
+[documentation](https://llvm.org/docs/) section. The web page also contains
+versions of the API documentation which is up-to-date with the Git version of
+the source code. You can access versions of these documents specific to this
+release by going into the `llvm/docs/` directory in the LLVM tree.
If you have any questions or comments about LLVM, please feel free to contact
-us via the `Discourse forums <https://discourse.llvm.org>`_.
+us via the [Discourse forums](https://discourse.llvm.org).
diff --git a/llvm/docs/conf.py b/llvm/docs/conf.py
index a40da828ae2a25..52bb923cd513de 100644
--- a/llvm/docs/conf.py
+++ b/llvm/docs/conf.py
@@ -38,6 +38,8 @@
except ImportError:
if not tags.has("builder-man"):
raise
+else:
+ myst_enable_extensions = ['substitution']
# Automatic anchors for markdown titles
myst_heading_anchors = 6
>From 81b62cac54662ced821e7a808d7a589d45c1f32d Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at linaro.org>
Date: Wed, 18 Sep 2024 10:26:05 +0100
Subject: [PATCH 2/3] python formatting
---
llvm/docs/conf.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/docs/conf.py b/llvm/docs/conf.py
index 52bb923cd513de..d9fa6961032b4f 100644
--- a/llvm/docs/conf.py
+++ b/llvm/docs/conf.py
@@ -39,7 +39,7 @@
if not tags.has("builder-man"):
raise
else:
- myst_enable_extensions = ['substitution']
+ myst_enable_extensions = ["substitution"]
# Automatic anchors for markdown titles
myst_heading_anchors = 6
>From fdfb1790dea0b22469f1a38eae76a71ec7b4c686 Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at linaro.org>
Date: Mon, 23 Sep 2024 12:27:50 +0100
Subject: [PATCH 3/3] rebase and RST -> markdown plaintext syntax
---
llvm/docs/ReleaseNotes.md | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/llvm/docs/ReleaseNotes.md b/llvm/docs/ReleaseNotes.md
index dd2c8510bf4edf..0284f00206533a 100644
--- a/llvm/docs/ReleaseNotes.md
+++ b/llvm/docs/ReleaseNotes.md
@@ -205,12 +205,12 @@ Changes to the C API
* The following functions are added to allow iterating over debug records attached to
instructions:
- * ``LLVMGetFirstDbgRecord``
- * ``LLVMGetLastDbgRecord``
- * ``LLVMGetNextDbgRecord``
- * ``LLVMGetPreviousDbgRecord``
+ * `LLVMGetFirstDbgRecord`
+ * `LLVMGetLastDbgRecord`
+ * `LLVMGetNextDbgRecord`
+ * `LLVMGetPreviousDbgRecord`
-* Added ``LLVMAtomicRMWBinOpUSubCond`` and ``LLVMAtomicRMWBinOpUSubSat`` to ``LLVMAtomicRMWBinOp`` enum for AtomicRMW instructions.
+* Added `LLVMAtomicRMWBinOpUSubCond` and `LLVMAtomicRMWBinOpUSubSat` to `LLVMAtomicRMWBinOp` enum for AtomicRMW instructions.
Changes to the CodeGen infrastructure
-------------------------------------
More information about the llvm-commits
mailing list