<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/mlir/lib/Rewrite/ByteCode.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>[mlir] Replace `llvm::OwningArrayRef` with `std::vector` (#168803)</title>
<updated>2025-11-20T18:23:12+00:00</updated>
<author>
<name>David Stone</name>
<email>davidfromonline@gmail.com</email>
</author>
<published>2025-11-20T18:23:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bfbd191f35352df2decde46d117bb940864889bf'/>
<id>bfbd191f35352df2decde46d117bb940864889bf</id>
<content type='text'>
There are several places where we use `llvm::OwningArrayRef`. The
interface to this requires us to first construct temporary storage, then
allocate space and set the allocated memory to 0, then copy the values
we actually want into that memory, then move the array into place.
Instead we can just do it all inline in a single pass by using
`std::vector`. In one case we actually allocate a completely separate
container and then allocate + copy the data over because
`llvm::OwningArrayRef` does not (and can't) support `push_back`.

Note that `llvm::SmallVector` is not a suitable replacement here because
we rely on reference stability on move construction: when the outer
container reallocates, we need the the contents of the inner containers
to be fixed in memory, and `llvm::SmallVector` does not give us that
guarantee.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are several places where we use `llvm::OwningArrayRef`. The
interface to this requires us to first construct temporary storage, then
allocate space and set the allocated memory to 0, then copy the values
we actually want into that memory, then move the array into place.
Instead we can just do it all inline in a single pass by using
`std::vector`. In one case we actually allocate a completely separate
container and then allocate + copy the data over because
`llvm::OwningArrayRef` does not (and can't) support `push_back`.

Note that `llvm::SmallVector` is not a suitable replacement here because
we rely on reference stability on move construction: when the outer
container reallocates, we need the the contents of the inner containers
to be fixed in memory, and `llvm::SmallVector` does not give us that
guarantee.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Use llvm accumulate wrappers. NFCI. (#162957)</title>
<updated>2025-10-11T15:33:18+00:00</updated>
<author>
<name>Jakub Kuderski</name>
<email>jakub@nod-labs.com</email>
</author>
<published>2025-10-11T15:33:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0820266651649c0eb6c384df91da4c6f662e5136'/>
<id>0820266651649c0eb6c384df91da4c6f662e5136</id>
<content type='text'>
Use wrappers around `std::accumulate` to make the code more concise and
less bug-prone: https://github.com/llvm/llvm-project/pull/162129.

With `std::accumulate`, it's the initial value that determines the
accumulator type. `llvm::sum_of` and `llvm::product_of` pick the right
accumulator type based on the range element type.

Found some funny bugs like a local accumulate helper that calculated a
sum with initial value of 1 -- we didn't hit the bug because the code
was actually dead...</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use wrappers around `std::accumulate` to make the code more concise and
less bug-prone: https://github.com/llvm/llvm-project/pull/162129.

With `std::accumulate`, it's the initial value that determines the
accumulator type. `llvm::sum_of` and `llvm::product_of` pick the right
accumulator type based on the range element type.

Found some funny bugs like a local accumulate helper that calculated a
sum with initial value of 1 -- we didn't hit the bug because the code
was actually dead...</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Simplify unreachable type switch cases. NFC. (#162032)</title>
<updated>2025-10-06T13:23:25+00:00</updated>
<author>
<name>Jakub Kuderski</name>
<email>jakub@nod-labs.com</email>
</author>
<published>2025-10-06T13:23:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8bab6c4e8c4f9a7b32ac5dd94436922c84705a86'/>
<id>8bab6c4e8c4f9a7b32ac5dd94436922c84705a86</id>
<content type='text'>
Use `DefaultUnreachable` from
https://github.com/llvm/llvm-project/pull/161970.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use `DefaultUnreachable` from
https://github.com/llvm/llvm-project/pull/161970.</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR] Adopt LDBG() macro in PDL ByteCodeExecutor (NFC) (#154641)</title>
<updated>2025-08-20T22:40:52+00:00</updated>
<author>
<name>Mehdi Amini</name>
<email>joker.eph@gmail.com</email>
</author>
<published>2025-08-20T22:40:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=908eebcb93e2923a7915325c99131ee71ed52515'/>
<id>908eebcb93e2923a7915325c99131ee71ed52515</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::stable_sort (NFC) (#141186)</title>
<updated>2025-05-23T05:36:32+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-05-23T05:36:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6464238dc0d0517f3a786b28ced3f3a65db91c21'/>
<id>6464238dc0d0517f3a786b28ced3f3a65db91c21</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Silence an unused variable warnings in builds without asserts.</title>
<updated>2025-05-21T08:47:42+00:00</updated>
<author>
<name>Adrian Kuegel</name>
<email>akuegel@google.com</email>
</author>
<published>2025-05-21T08:46:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=67489c7f0f7badc249cd18805ea1ce4caa7b5ee5'/>
<id>67489c7f0f7badc249cd18805ea1ce4caa7b5ee5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][PDL] Skip over all results in the PDL Bytecode if a Constraint/Rewrite failed (#139255)</title>
<updated>2025-05-21T06:37:27+00:00</updated>
<author>
<name>Jonas Rickert</name>
<email>Jonas.Rickert@amd.com</email>
</author>
<published>2025-05-21T06:37:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a21986b152927b368eb9c7516ebeaa0b5fbd3167'/>
<id>a21986b152927b368eb9c7516ebeaa0b5fbd3167</id>
<content type='text'>
Skipping only over the first results leads to the curCodeIt pointing to
the wrong location in the bytecode, causing the execution to continue
with a wrong instruction after the Constraint/Rewrite.

Signed-off-by: Rickert, Jonas &lt;Jonas.Rickert@amd.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Skipping only over the first results leads to the curCodeIt pointing to
the wrong location in the bytecode, causing the execution to continue
with a wrong instruction after the Constraint/Rewrite.

Signed-off-by: Rickert, Jonas &lt;Jonas.Rickert@amd.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Use llvm::SmallVector::pop_back_val() (NFC) (#136452)</title>
<updated>2025-04-19T20:21:29+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-04-19T20:21:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1cf188a1bca6d1ce135eab4cce5dead4f8f55026'/>
<id>1cf188a1bca6d1ce135eab4cce5dead4f8f55026</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>
<entry>
<title>Fix unused variable in "[mlir][PDL] Add support for native constraints with results (#82760)"</title>
<updated>2024-03-02T23:01:14+00:00</updated>
<author>
<name>Matthias Gehre</name>
<email>matthias.gehre@amd.com</email>
</author>
<published>2024-03-02T22:44:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0ec318e57b0c7cbc0d9c899390daf3248cbe6a53'/>
<id>0ec318e57b0c7cbc0d9c899390daf3248cbe6a53</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
