<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Remarks/BitstreamRemarkParser.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[Remarks] Restructure bitstream remarks to be fully standalone (#156715)</title>
<updated>2025-09-22T15:41:39+00:00</updated>
<author>
<name>Tobias Stadler</name>
<email>mail@stadler-tobias.de</email>
</author>
<published>2025-09-22T15:41:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=dfbd76bda01e804a66c3750193f5e766e4e4cf62'/>
<id>dfbd76bda01e804a66c3750193f5e766e4e4cf62</id>
<content type='text'>
Currently there are two serialization modes for bitstream Remarks:
standalone and separate. The separate mode splits remark metadata (e.g.
the string table) from actual remark data. The metadata is written into
the object file by the AsmPrinter, while the remark data is stored in a
separate remarks file. This means we can't use bitstream remarks with
tools like opt that don't generate an object file. Also, it is confusing
to post-process bitstream remarks files, because only the standalone
files can be read by llvm-remarkutil. We always need to use dsymutil
to convert the separate files to standalone files, which only works for
MachO. It is not possible for clang/opt to directly emit bitstream
remark files in standalone mode, because the string table can only be
serialized after all remarks were emitted.

Therefore, this change completely removes the separate serialization
mode. Instead, the remark string table is now always written to the end
of the remarks file. This requires us to tell the serializer when to
finalize remark serialization. This automatically happens when the
serializer goes out of scope. However, often the remark file goes out of
scope before the serializer is destroyed. To diagnose this, I have added
an assert to alert users that they need to explicitly call
finalizeLLVMOptimizationRemarks.

This change paves the way for further improvements to the remark
infrastructure, including more tooling (e.g. #159784), size optimizations
for bitstream remarks, and more.

Pull Request: https://github.com/llvm/llvm-project/pull/156715
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently there are two serialization modes for bitstream Remarks:
standalone and separate. The separate mode splits remark metadata (e.g.
the string table) from actual remark data. The metadata is written into
the object file by the AsmPrinter, while the remark data is stored in a
separate remarks file. This means we can't use bitstream remarks with
tools like opt that don't generate an object file. Also, it is confusing
to post-process bitstream remarks files, because only the standalone
files can be read by llvm-remarkutil. We always need to use dsymutil
to convert the separate files to standalone files, which only works for
MachO. It is not possible for clang/opt to directly emit bitstream
remark files in standalone mode, because the string table can only be
serialized after all remarks were emitted.

Therefore, this change completely removes the separate serialization
mode. Instead, the remark string table is now always written to the end
of the remarks file. This requires us to tell the serializer when to
finalize remark serialization. This automatically happens when the
serializer goes out of scope. However, often the remark file goes out of
scope before the serializer is destroyed. To diagnose this, I have added
an assert to alert users that they need to explicitly call
finalizeLLVMOptimizationRemarks.

This change paves the way for further improvements to the remark
infrastructure, including more tooling (e.g. #159784), size optimizations
for bitstream remarks, and more.

Pull Request: https://github.com/llvm/llvm-project/pull/156715
</pre>
</div>
</content>
</entry>
<entry>
<title>Reland "[Remarks] BitstreamRemarkParser: Refactor error handling" (#158667)</title>
<updated>2025-09-16T12:17:35+00:00</updated>
<author>
<name>Tobias Stadler</name>
<email>mail@stadler-tobias.de</email>
</author>
<published>2025-09-16T12:17:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=45f1440d9a3a2f6108242a1fce16faf52a3f4645'/>
<id>45f1440d9a3a2f6108242a1fce16faf52a3f4645</id>
<content type='text'>
Reland #156511 after fixing a build failure not caught by clang. The
default implementation of `parseRecord` is currently unused. Apparently,
clang doesn't type check uninstantiated methods in class templates. To
avoid this footgun, we `= delete` the impl for now.

Original message:

In preparation of larger changes to the bitstream remark format,
refactor the error handling code in the BitstreamRemarkParser.

Main change: move the various static helper methods into the parser
helper classes, so we don't need to pass around as many args. Calling
`error(...)` inside the helper classes now automatically prepends the
current block being parsed to the error message.

NFCI (except for error messages on invalid bitstream files).

Pull Request: https://github.com/llvm/llvm-project/pull/158667
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reland #156511 after fixing a build failure not caught by clang. The
default implementation of `parseRecord` is currently unused. Apparently,
clang doesn't type check uninstantiated methods in class templates. To
avoid this footgun, we `= delete` the impl for now.

Original message:

In preparation of larger changes to the bitstream remark format,
refactor the error handling code in the BitstreamRemarkParser.

Main change: move the various static helper methods into the parser
helper classes, so we don't need to pass around as many args. Calling
`error(...)` inside the helper classes now automatically prepends the
current block being parsed to the error message.

NFCI (except for error messages on invalid bitstream files).

Pull Request: https://github.com/llvm/llvm-project/pull/158667
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[Remarks] BitstreamRemarkParser: Refactor error handling" (#158647)</title>
<updated>2025-09-15T14:31:48+00:00</updated>
<author>
<name>Tobias Stadler</name>
<email>mail@stadler-tobias.de</email>
</author>
<published>2025-09-15T14:31:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3c75065765c96ebf4f7f2f66eb21e45fb4d74704'/>
<id>3c75065765c96ebf4f7f2f66eb21e45fb4d74704</id>
<content type='text'>
Reverts llvm/llvm-project#156511. Build failure not caught by pre-commit
CI.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reverts llvm/llvm-project#156511. Build failure not caught by pre-commit
CI.</pre>
</div>
</content>
</entry>
<entry>
<title>[Remarks] BitstreamRemarkParser: Refactor error handling (#156511)</title>
<updated>2025-09-15T14:22:00+00:00</updated>
<author>
<name>Tobias Stadler</name>
<email>mail@stadler-tobias.de</email>
</author>
<published>2025-09-15T14:22:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c723cc2a041d6e7e741b0ce6abc1f18d4ada9b4a'/>
<id>c723cc2a041d6e7e741b0ce6abc1f18d4ada9b4a</id>
<content type='text'>
In preparation of larger changes to the bitstream remark format,
refactor the error handling code in the BitstreamRemarkParser.

Main change: move the various static helper methods into the parser
helper classes, so we don't need to pass around as many args. Calling
`error(...)` inside the helper classes now automatically prepends the
current block being parsed to the error message.

NFCI (except for error messages on invalid bitstream files).

Pull Request: https://github.com/llvm/llvm-project/pull/156511
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In preparation of larger changes to the bitstream remark format,
refactor the error handling code in the BitstreamRemarkParser.

Main change: move the various static helper methods into the parser
helper classes, so we don't need to pass around as many args. Calling
`error(...)` inside the helper classes now automatically prepends the
current block being parsed to the error message.

NFCI (except for error messages on invalid bitstream files).

Pull Request: https://github.com/llvm/llvm-project/pull/156511
</pre>
</div>
</content>
</entry>
<entry>
<title>[Remarks] Move BitstreamRemarkParser helpers to private header (NFC) (#156302)</title>
<updated>2025-09-10T11:51:26+00:00</updated>
<author>
<name>Tobias Stadler</name>
<email>mail@stadler-tobias.de</email>
</author>
<published>2025-09-10T11:51:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3327a4c8f63b37301eaed2b9af8c0c696dff13fb'/>
<id>3327a4c8f63b37301eaed2b9af8c0c696dff13fb</id>
<content type='text'>
These helpers are only used in the implementation, and we also don't
expose similar details for the YAMLRemarkParser.

Pull Request: https://github.com/llvm/llvm-project/pull/156302
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These helpers are only used in the implementation, and we also don't
expose similar details for the YAMLRemarkParser.

Pull Request: https://github.com/llvm/llvm-project/pull/156302
</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] Support building with c++23 (#154372)</title>
<updated>2025-08-29T12:52:07+00:00</updated>
<author>
<name>Kyle Krüger</name>
<email>7158199+kykrueger@users.noreply.github.com</email>
</author>
<published>2025-08-29T12:52:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5d0294fcb61560a228e230e8a477fc44746ec62b'/>
<id>5d0294fcb61560a228e230e8a477fc44746ec62b</id>
<content type='text'>
closes #154331 

This PR addresses all minimum changes needed to compile LLVM and MLIR
with the c++23 standard.
It is a work in progress and to be reviewed for better methods of
handling the parts of the build broken by c++23.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
closes #154331 

This PR addresses all minimum changes needed to compile LLVM and MLIR
with the c++23 standard.
It is a work in progress and to be reviewed for better methods of
handling the parts of the build broken by c++23.</pre>
</div>
</content>
</entry>
<entry>
<title>[Remarks] Remove yaml-strtab format (#144527)</title>
<updated>2025-06-18T13:25:41+00:00</updated>
<author>
<name>Tobias Stadler</name>
<email>mail@stadler-tobias.de</email>
</author>
<published>2025-06-18T13:25:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1f34d68c4f086e7ea6ef9a529f9606476b38bbbb'/>
<id>1f34d68c4f086e7ea6ef9a529f9606476b38bbbb</id>
<content type='text'>
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.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.</pre>
</div>
</content>
</entry>
<entry>
<title>[Bitcode(Reader|Writer)] Convert Optional to std::optional</title>
<updated>2022-12-07T23:27:38+00:00</updated>
<author>
<name>Krzysztof Parzyszek</name>
<email>kparzysz@quicinc.com</email>
</author>
<published>2022-12-07T18:04:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=49e75ebd854dee1fcf5729c264f4cfadf76e952d'/>
<id>49e75ebd854dee1fcf5729c264f4cfadf76e952d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[Remarks] Convert Optional to std::optional</title>
<updated>2022-12-07T14:11:11+00:00</updated>
<author>
<name>Krzysztof Parzyszek</name>
<email>kparzysz@quicinc.com</email>
</author>
<published>2022-12-07T01:51:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a81a0c97f1a0016686fdc5c5d10644fa2628b376'/>
<id>a81a0c97f1a0016686fdc5c5d10644fa2628b376</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] Use std::nullopt instead of None (NFC)</title>
<updated>2022-12-03T05:11:44+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2022-12-03T05:11:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=aadaaface2ec96ee30d92bf46faa41dd9e68b64d'/>
<id>aadaaface2ec96ee30d92bf46faa41dd9e68b64d</id>
<content type='text'>
This patch mechanically replaces None with std::nullopt where the
compiler would warn if None were deprecated.  The intent is to reduce
the amount of manual work required in migrating from Optional to
std::optional.

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch mechanically replaces None with std::nullopt where the
compiler would warn if None were deprecated.  The intent is to reduce
the amount of manual work required in migrating from Optional to
std::optional.

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
</pre>
</div>
</content>
</entry>
</feed>
