[Remarks] Remove yaml-strtab format (#144527)

Background: The yaml-strtab format looks just like the yaml format,
except that the values in the key/value pairs of the remarks are
deduplicated and replaced by indices into a string table (see removed
test cases for examples). The motivation behind this format was to
reduce size of the remarks files. However, it was quickly superseded by
the bitstream format.

Therefore, remove the yaml-strtab format, as it doesn't have a good
usecase anymore:
  - It isn't particularly efficient
  - It isn't human-readable
  - It isn't straightforward to parse in external tools that can't use the
remarks library. We don't even support it in opt-viewer.

llvm-remarkutil is also missing options to parse/convert yaml-strtab, so
the chance that anyone is actually using this format is low.
This commit is contained in:
Tobias Stadler
2025-06-18 14:25:41 +01:00
committed by GitHub
parent c4d99704e2
commit 1f34d68c4f
19 changed files with 64 additions and 618 deletions

View File

@@ -94,7 +94,6 @@ be sent to standard output.
The Argument is one of the following:
- yaml
- yaml-strtab
- bitstream
.. option:: --no-demangle

View File

@@ -112,7 +112,6 @@ following options:
Supported formats:
* :ref:`yaml <yamlremarks>` (default)
* :ref:`yaml-strtab <yamlstrtabremarks>`
* :ref:`bitstream <bitstreamremarks>`
``Content configuration``
@@ -213,30 +212,6 @@ fields are required:
* ``<arg-line>``
* ``<arg-column>``
.. _yamlstrtabremarks:
YAML with a string table
------------------------
The YAML serialization supports the usage of a string table by using the
``yaml-strtab`` format.
This format replaces strings in the YAML output with integers representing the
index in the string table that can be provided separately through metadata.
The following entries can take advantage of the string table while respecting
YAML rules:
* ``<pass>``
* ``<name>``
* ``<function>``
* ``<file>``
* ``<value>``
* ``<arg-file>``
Currently, none of the tools in :ref:`the opt-viewer directory <optviewer>`
support this format.
.. _optviewer:
YAML metadata
@@ -246,9 +221,9 @@ The metadata used together with the YAML format is:
* a magic number: "REMARKS\\0"
* the version number: a little-endian uint64_t
* the total size of the string table (the size itself excluded):
little-endian uint64_t
* a list of null-terminated strings
* 8 zero bytes. This space was previously used to encode the size of a string
table. String table support for YAML remarks has been removed, use the
bitstream format instead.
Optional:
@@ -584,7 +559,6 @@ Emitting remark diagnostics in the object file
A section containing metadata on remark diagnostics will be emitted for the
following formats:
* ``yaml-strtab``
* ``bitstream``
This can be overridden by using the flag ``-remarks-section=<bool>``.