Skip to content

[Remarks] Remove yaml-strtab format #144527

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tobias-stadler
Copy link
Contributor

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.

Background: The yaml-strtab format looks just like the yaml format,
except that the values of the key/value pairs in 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 missing options to parse/convert yaml-strtab, so the
chance that anyone is actually using this format is low.
tobias-stadler added a commit to tobias-stadler/llvm-project that referenced this pull request Jun 17, 2025
Add remark format 'Auto', which performs automatic detection of the
remark format using the magic numbers at the beginning of the remarks
files.

The RemarkLinker already did something similar, so we streamlined this
and exposed this to llvm-remarkutil.

Depends on llvm#144527
Copy link
Contributor

@fhahn fhahn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants