<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/mlir/lib/Bytecode, 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>[MLIR][Bytecode] Followup 8106c81 (#157136)</title>
<updated>2025-09-11T13:08:56+00:00</updated>
<author>
<name>Nikhil Kalra</name>
<email>nkalra@apple.com</email>
</author>
<published>2025-09-11T13:08:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3168a62a3b25e3df87ea4374814ff2853037d524'/>
<id>3168a62a3b25e3df87ea4374814ff2853037d524</id>
<content type='text'>
Addressed code review feedback:
- Fixed some issues in the unit test
- Adjusted line wrapping in the docs
- Clarified comments in the bytecode reader</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Addressed code review feedback:
- Fixed some issues in the unit test
- Adjusted line wrapping in the docs
- Clarified comments in the bytecode reader</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][Bytecode] Enforce alignment requirements (#157004)</title>
<updated>2025-09-05T05:31:40+00:00</updated>
<author>
<name>Nikhil Kalra</name>
<email>nkalra@apple.com</email>
</author>
<published>2025-09-05T05:31:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8106c816eb8b279ee4220936c43a0e495d1bb1a0'/>
<id>8106c816eb8b279ee4220936c43a0e495d1bb1a0</id>
<content type='text'>
Adds a check that the bytecode buffer is aligned to any section
alignment requirements. Without this check, if the source buffer is not
sufficiently aligned, we may return early when aligning the data
pointer. In that case, we may end up trying to read successive sections
from an incorrect offset, giving the appearance of invalid bytecode.

This requirement is documented in the bytecode unit tests, but is not
otherwise documented in the code or bytecode reference.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds a check that the bytecode buffer is aligned to any section
alignment requirements. Without this check, if the source buffer is not
sufficiently aligned, we may return early when aligning the data
pointer. In that case, we may end up trying to read successive sections
from an incorrect offset, giving the appearance of invalid bytecode.

This requirement is documented in the bytecode unit tests, but is not
otherwise documented in the code or bytecode reference.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[MLIR] Fix duplicated attribute nodes in MLIR bytecode deserialization (#151267) (#155214)</title>
<updated>2025-08-25T11:46:13+00:00</updated>
<author>
<name>Christian Ulmann</name>
<email>christianulmann@gmail.com</email>
</author>
<published>2025-08-25T11:46:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=58953b8ef56a41feeaf976e22aeda3ee5acce481'/>
<id>58953b8ef56a41feeaf976e22aeda3ee5acce481</id>
<content type='text'>
This reverts commit c075fb8c37856365fb76d986ad3aefa2400b3240. This
commit introduces a caching bug that causes undesired collisions.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit c075fb8c37856365fb76d986ad3aefa2400b3240. This
commit introduces a caching bug that causes undesired collisions.</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR] Adopt LDBG() debug macro in BytecodeWriter.cpp (NFC) (#154642)</title>
<updated>2025-08-20T22:45:39+00:00</updated>
<author>
<name>Mehdi Amini</name>
<email>joker.eph@gmail.com</email>
</author>
<published>2025-08-20T22:45:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=62b29d9f76414e127d34e679151a239637071d87'/>
<id>62b29d9f76414e127d34e679151a239637071d87</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR] Fix duplicated attribute nodes in MLIR bytecode deserialization (#151267)</title>
<updated>2025-08-20T13:03:26+00:00</updated>
<author>
<name>Hank</name>
<email>49036880+hankluo6@users.noreply.github.com</email>
</author>
<published>2025-08-20T13:03:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c075fb8c37856365fb76d986ad3aefa2400b3240'/>
<id>c075fb8c37856365fb76d986ad3aefa2400b3240</id>
<content type='text'>
Fixes #150163 

MLIR bytecode does not preserve alias definitions, so each attribute
encountered during deserialization is treated as a new one. This can
generate duplicate `DISubprogram` nodes during deserialization.

The patch adds a `StringMap` cache that records attributes and fetches
them when encountered again.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #150163 

MLIR bytecode does not preserve alias definitions, so each attribute
encountered during deserialization is treated as a new one. This can
generate duplicate `DISubprogram` nodes during deserialization.

The patch adds a `StringMap` cache that records attributes and fetches
them when encountered again.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Use *Map::try_emplace (NFC) (#143341)</title>
<updated>2025-06-09T14:18:26+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-06-09T14:18:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b3b8a097fe1d6eba4d8a125e90b04273e95e96eb'/>
<id>b3b8a097fe1d6eba4d8a125e90b04273e95e96eb</id>
<content type='text'>
- try_emplace(Key) is shorter than insert({Key, nullptr}).
- try_emplace performs value initialization without value parameters.
- We overwrite values on successful insertion anyway.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- try_emplace(Key) is shorter than insert({Key, nullptr}).
- try_emplace performs value initialization without value parameters.
- We overwrite values on successful insertion anyway.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][Value] Add getNumUses, hasNUses, and hasNUsesOrMore to Value (#142084)</title>
<updated>2025-05-30T04:39:45+00:00</updated>
<author>
<name>Michael Maitland</name>
<email>michaeltmaitland@gmail.com</email>
</author>
<published>2025-05-30T04:39:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7454098a9ed46ca5ad310bf3ec9347eb08eba007'/>
<id>7454098a9ed46ca5ad310bf3ec9347eb08eba007</id>
<content type='text'>
We already have hasOneUse. Like llvm::Value we provide helper methods to
query the number of uses of a Value. Add unittests for Value, because
that was missing.

---------

Co-authored-by: Michael Maitland &lt;michaelmaitland@meta.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We already have hasOneUse. Like llvm::Value we provide helper methods to
query the number of uses of a Value. Add unittests for Value, because
that was missing.

---------

Co-authored-by: Michael Maitland &lt;michaelmaitland@meta.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Use llvm::make_first_range (NFC) (#135900)</title>
<updated>2025-04-16T06:17:33+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-04-16T06:17:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=52e3f3d68cbabf81c4c118cfb823828f03b712c4'/>
<id>52e3f3d68cbabf81c4c118cfb823828f03b712c4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Use llvm::append_range (NFC) (#135722)</title>
<updated>2025-04-15T05:22:04+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-04-15T05:22:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=eb7f51485e8060a390a36a61a30a6f4332c24aae'/>
<id>eb7f51485e8060a390a36a61a30a6f4332c24aae</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][NFC] Fix incomplete boundary comments. (#133516)</title>
<updated>2025-03-31T16:29:54+00:00</updated>
<author>
<name>Han-Chung Wang</name>
<email>hanhan0912@gmail.com</email>
</author>
<published>2025-03-31T16:29:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=66b0b0466bbd995146aadaf2cd18de5476c19941'/>
<id>66b0b0466bbd995146aadaf2cd18de5476c19941</id>
<content type='text'>
I observed that we have the boundary comments in the codebase like:

```
//===----------------------------------------------------------------------===//
// ...
//===----------------------------------------------------------------------===//
```

I also observed that there are incomplete boundary comments. The
revision is generated by a script that completes the boundary comments.

```
//===----------------------------------------------------------------------===//
// ...

...
```

Signed-off-by: hanhanW &lt;hanhan0912@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I observed that we have the boundary comments in the codebase like:

```
//===----------------------------------------------------------------------===//
// ...
//===----------------------------------------------------------------------===//
```

I also observed that there are incomplete boundary comments. The
revision is generated by a script that completes the boundary comments.

```
//===----------------------------------------------------------------------===//
// ...

...
```

Signed-off-by: hanhanW &lt;hanhan0912@gmail.com&gt;</pre>
</div>
</content>
</entry>
</feed>
