<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/mlir/lib/Query/Query.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] Fix use-after-move issues (#165660)</title>
<updated>2025-10-30T07:25:10+00:00</updated>
<author>
<name>Slava Gurevich</name>
<email>sgurevich@gmail.com</email>
</author>
<published>2025-10-30T07:25:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=98ceb458f42ed05e2c3e9fb5bc75cd6b1df7a438'/>
<id>98ceb458f42ed05e2c3e9fb5bc75cd6b1df7a438</id>
<content type='text'>
This patch addresses two use-after-move issues:

1. `Timing.cpp` A variable was std::moved and then immediately passed to
an `assert()` check. Since the moved-from state made the assertion
condition trivially true, the check was effectively useless. The
`assert()` is removed.

2. `Query.cpp` The `matcher` object was moved-from and then subsequently
used as if it still retained valid state. The fix ensures no subsequent
use for the moved-from variable.

Testing:
`ninja check-mlir`</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch addresses two use-after-move issues:

1. `Timing.cpp` A variable was std::moved and then immediately passed to
an `assert()` check. Since the moved-from state made the assertion
condition trivially true, the check was effectively useless. The
`assert()` is removed.

2. `Query.cpp` The `matcher` object was moved-from and then subsequently
used as if it still retained valid state. The fix ensures no subsequent
use for the moved-from variable.

Testing:
`ninja check-mlir`</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR] Apply clang-tidy fixes for llvm-qualified-auto in Query.cpp (NFC)</title>
<updated>2025-08-28T17:10:35+00:00</updated>
<author>
<name>Mehdi Amini</name>
<email>joker.eph@gmail.com</email>
</author>
<published>2025-08-21T17:45:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2af8178035b21ab5cd80451e5324fb442a5b7aec'/>
<id>2af8178035b21ab5cd80451e5324fb442a5b7aec</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] update `mlir/lib` create APIs (26/n) (#149933)</title>
<updated>2025-07-22T12:40:42+00:00</updated>
<author>
<name>Maksim Levental</name>
<email>maksim.levental@gmail.com</email>
</author>
<published>2025-07-22T12:40:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2736fbd8324bf21a130c8abd4bd0e7d3aa840ac1'/>
<id>2736fbd8324bf21a130c8abd4bd0e7d3aa840ac1</id>
<content type='text'>
See https://github.com/llvm/llvm-project/pull/147168 for more info.

---------

Co-authored-by: Tobias Gysi &lt;tobias.gysi@nextsilicon.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
See https://github.com/llvm/llvm-project/pull/147168 for more info.

---------

Co-authored-by: Tobias Gysi &lt;tobias.gysi@nextsilicon.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Remove unused includes (NFC) (#148872)</title>
<updated>2025-07-16T03:47:53+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-07-16T03:47:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=606e7f90b1d59799829eb9485eccfca5101b775f'/>
<id>606e7f90b1d59799829eb9485eccfca5101b775f</id>
<content type='text'>
These are identified by misc-include-cleaner.  I've filtered out those
that break builds.  Also, I'm staying away from llvm-config.h,
config.h, and Compiler.h, which likely cause platform- or
compiler-specific build failures.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These are identified by misc-include-cleaner.  I've filtered out those
that break builds.  Also, I'm staying away from llvm-config.h,
config.h, and Compiler.h, which likely cause platform- or
compiler-specific build failures.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Reapply 141423 mlir-query combinators plus fix (#146156)</title>
<updated>2025-07-01T13:03:17+00:00</updated>
<author>
<name>Denzel-Brian Budii</name>
<email>73462654+chios202@users.noreply.github.com</email>
</author>
<published>2025-07-01T13:03:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3702d64801c872bf41a29b0aabda868ab3e26f12'/>
<id>3702d64801c872bf41a29b0aabda868ab3e26f12</id>
<content type='text'>
An uninitialized variable that caused a crash
(https://lab.llvm.org/buildbot/#/builders/164/builds/11004) was
identified using the memory analyzer, leading to the reversion of
https://github.com/llvm/llvm-project/pull/141423. This pull request
reapplies the previously reverted changes and includes the fix, which
has been tested locally following the steps at
https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild.

Note: the fix is included as part of the second commit</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
An uninitialized variable that caused a crash
(https://lab.llvm.org/buildbot/#/builders/164/builds/11004) was
identified using the memory analyzer, leading to the reversion of
https://github.com/llvm/llvm-project/pull/141423. This pull request
reapplies the previously reverted changes and includes the fix, which
has been tested locally following the steps at
https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild.

Note: the fix is included as part of the second commit</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[mlir] Improve mlir-query by adding matcher combinators" (#145534)</title>
<updated>2025-06-24T15:37:40+00:00</updated>
<author>
<name>Qinkun Bao</name>
<email>qinkun@google.com</email>
</author>
<published>2025-06-24T15:37:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=bb2bd5fb01c1750d10d77196db4653c14037815e'/>
<id>bb2bd5fb01c1750d10d77196db4653c14037815e</id>
<content type='text'>
Reverts llvm/llvm-project#141423</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reverts llvm/llvm-project#141423</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Improve mlir-query by adding matcher combinators (#141423)</title>
<updated>2025-06-17T12:07:20+00:00</updated>
<author>
<name>Denzel-Brian Budii</name>
<email>73462654+chios202@users.noreply.github.com</email>
</author>
<published>2025-06-17T12:07:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=12611a7fc71376e88aa01e3f0bbc74517f1a1703'/>
<id>12611a7fc71376e88aa01e3f0bbc74517f1a1703</id>
<content type='text'>
Whereas backward-slice matching provides support to limit traversal by
specifying the desired depth level, this pull request introduces support
for limiting traversal with a nested matcher (adding forward-slice
also). It also adds support for variadic operators, including `anyOf`
and `allOf`. Rather than simply stopping traversal when an operation
named foo is encountered, one can now define a matcher that specifies
different exit conditions. Variadic support implementation within
mlir-query is very similar to clang-query.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Whereas backward-slice matching provides support to limit traversal by
specifying the desired depth level, this pull request introduces support
for limiting traversal with a nested matcher (adding forward-slice
also). It also adds support for variadic operators, including `anyOf`
and `allOf`. Rather than simply stopping traversal when an operation
named foo is encountered, one can now define a matcher that specifies
different exit conditions. Variadic support implementation within
mlir-query is very similar to clang-query.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Improve mlir-query tool by implementing `getBackwardSlice` and `getForwardSlice` matchers (#115670)</title>
<updated>2025-05-13T11:18:14+00:00</updated>
<author>
<name>Denzel-Brian Budii</name>
<email>73462654+chios202@users.noreply.github.com</email>
</author>
<published>2025-05-13T11:18:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9b63bdd15418e90d0c6889d26e490db89ae744d1'/>
<id>9b63bdd15418e90d0c6889d26e490db89ae744d1</id>
<content type='text'>
Improve mlir-query tool by implementing `getBackwardSlice` and
`getForwardSlice` matchers. As an addition `SetQuery` also needed to be
added to enable custom configuration for each query. e.g: `inclusive`,
`omitUsesFromAbove`, `omitBlockArguments`.

Note: backwardSlice and forwardSlice algoritms are the same as the ones
in `mlir/lib/Analysis/SliceAnalysis.cpp`
Example of current matcher. The query was made to the file:
`mlir/test/mlir-query/complex-test.mlir`

```mlir
./mlir-query /home/dbudii/personal/llvm-project/mlir/test/mlir-query/complex-test.mlir -c "match getDefinitions(hasOpName(\"arith.add
f\"),2)"

Match #1:

/home/dbudii/personal/llvm-project/mlir/test/mlir-query/complex-test.mlir:5:8:
  %0 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%arg0 : tensor&lt;5x5xf32&gt;) outs(%arg1 : tensor&lt;5x5xf32&gt;) {
       ^
/home/dbudii/personal/llvm-project/mlir/test/mlir-query/complex-test.mlir:7:10: note: "root" binds here
    %2 = arith.addf %in, %in : f32
         ^
Match #2:

/home/dbudii/personal/llvm-project/mlir/test/mlir-query/complex-test.mlir:10:16:
  %collapsed = tensor.collapse_shape %0 [[0, 1]] : tensor&lt;5x5xf32&gt; into tensor&lt;25xf32&gt;
               ^
/home/dbudii/personal/llvm-project/mlir/test/mlir-query/complex-test.mlir:13:11:
    %c2 = arith.constant 2 : index
          ^
/home/dbudii/personal/llvm-project/mlir/test/mlir-query/complex-test.mlir:14:18:
    %extracted = tensor.extract %collapsed[%c2] : tensor&lt;25xf32&gt;
                 ^
/home/dbudii/personal/llvm-project/mlir/test/mlir-query/complex-test.mlir:15:10: note: "root" binds here
    %2 = arith.addf %extracted, %extracted : f32
         ^
2 matches.
```</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Improve mlir-query tool by implementing `getBackwardSlice` and
`getForwardSlice` matchers. As an addition `SetQuery` also needed to be
added to enable custom configuration for each query. e.g: `inclusive`,
`omitUsesFromAbove`, `omitBlockArguments`.

Note: backwardSlice and forwardSlice algoritms are the same as the ones
in `mlir/lib/Analysis/SliceAnalysis.cpp`
Example of current matcher. The query was made to the file:
`mlir/test/mlir-query/complex-test.mlir`

```mlir
./mlir-query /home/dbudii/personal/llvm-project/mlir/test/mlir-query/complex-test.mlir -c "match getDefinitions(hasOpName(\"arith.add
f\"),2)"

Match #1:

/home/dbudii/personal/llvm-project/mlir/test/mlir-query/complex-test.mlir:5:8:
  %0 = linalg.generic {indexing_maps = [#map, #map], iterator_types = ["parallel", "parallel"]} ins(%arg0 : tensor&lt;5x5xf32&gt;) outs(%arg1 : tensor&lt;5x5xf32&gt;) {
       ^
/home/dbudii/personal/llvm-project/mlir/test/mlir-query/complex-test.mlir:7:10: note: "root" binds here
    %2 = arith.addf %in, %in : f32
         ^
Match #2:

/home/dbudii/personal/llvm-project/mlir/test/mlir-query/complex-test.mlir:10:16:
  %collapsed = tensor.collapse_shape %0 [[0, 1]] : tensor&lt;5x5xf32&gt; into tensor&lt;25xf32&gt;
               ^
/home/dbudii/personal/llvm-project/mlir/test/mlir-query/complex-test.mlir:13:11:
    %c2 = arith.constant 2 : index
          ^
/home/dbudii/personal/llvm-project/mlir/test/mlir-query/complex-test.mlir:14:18:
    %extracted = tensor.extract %collapsed[%c2] : tensor&lt;25xf32&gt;
                 ^
/home/dbudii/personal/llvm-project/mlir/test/mlir-query/complex-test.mlir:15:10: note: "root" binds here
    %2 = arith.addf %extracted, %extracted : f32
         ^
2 matches.
```</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] allow function type cloning to fail (#137130)</title>
<updated>2025-04-30T07:26:42+00:00</updated>
<author>
<name>Oleksandr "Alex" Zinenko</name>
<email>git@ozinenko.com</email>
</author>
<published>2025-04-30T07:26:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7318074168e324097b7f6ec93e34915463bf70f1'/>
<id>7318074168e324097b7f6ec93e34915463bf70f1</id>
<content type='text'>
`FunctionOpInterface` assumed the fact that the function type (attribute
of the operation) can be cloned with arbirary lists of function
arguments and results to support argument and result list mutation. This
is not always correct, in particular, LLVM dialect functions require
exactly one result making it impossible to erase the result.

Allow function type cloning to fail and propagate this failure through
various APIs that use it. The common assumption is that existing IR has
not been modified.

Fixes #131142.

Reland a8c7ecdcbc3e89b493b495c6831cc93671c3b844 / #136300.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`FunctionOpInterface` assumed the fact that the function type (attribute
of the operation) can be cloned with arbirary lists of function
arguments and results to support argument and result list mutation. This
is not always correct, in particular, LLVM dialect functions require
exactly one result making it impossible to erase the result.

Allow function type cloning to fail and propagate this failure through
various APIs that use it. The common assumption is that existing IR has
not been modified.

Fixes #131142.

Reland a8c7ecdcbc3e89b493b495c6831cc93671c3b844 / #136300.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[mlir] allow function type cloning to fail (#136300)"</title>
<updated>2025-04-18T16:52:28+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-04-18T16:52:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7da385d79729bb7aa1bfc046d3a78e350b7a4f75'/>
<id>7da385d79729bb7aa1bfc046d3a78e350b7a4f75</id>
<content type='text'>
This reverts commit 20a104a7d6423784dab04371a5ca728cc27a15a9.

Buildbot failure:
https://lab.llvm.org/buildbot/#/builders/157/builds/25688

I've reproduced the build failure.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 20a104a7d6423784dab04371a5ca728cc27a15a9.

Buildbot failure:
https://lab.llvm.org/buildbot/#/builders/157/builds/25688

I've reproduced the build failure.
</pre>
</div>
</content>
</entry>
</feed>
