<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/mlir/lib/Query/Matcher/Parser.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] Apply clang-tidy fixes for readability-identifier-naming in Parser.cpp (NFC)</title>
<updated>2025-11-17T15:42:12+00:00</updated>
<author>
<name>Mehdi Amini</name>
<email>joker.eph@gmail.com</email>
</author>
<published>2025-08-21T17:43:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=17cbb48c49a8d4408f7afa088f9c8a30be567a75'/>
<id>17cbb48c49a8d4408f7afa088f9c8a30be567a75</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</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>Reapply "Reapply "[mlir-query] Add function extraction feature to mlir-query""</title>
<updated>2024-03-03T13:56:56+00:00</updated>
<author>
<name>Jacques Pienaar</name>
<email>jpienaar@google.com</email>
</author>
<published>2024-03-03T13:56:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=58b44c8102afb0e76d1cb70d4a5d089f70d2f657'/>
<id>58b44c8102afb0e76d1cb70d4a5d089f70d2f657</id>
<content type='text'>
Fix ASAN by erasing the op extracted post printing.

This reverts commit 732a5cba8c739ed40a7280b5d74ca717910c2c4c.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix ASAN by erasing the op extracted post printing.

This reverts commit 732a5cba8c739ed40a7280b5d74ca717910c2c4c.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Reapply "[mlir-query] Add function extraction feature to mlir-query""</title>
<updated>2024-03-03T13:22:41+00:00</updated>
<author>
<name>Jacques Pienaar</name>
<email>jpienaar@google.com</email>
</author>
<published>2024-03-03T13:22:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=732a5cba8c739ed40a7280b5d74ca717910c2c4c'/>
<id>732a5cba8c739ed40a7280b5d74ca717910c2c4c</id>
<content type='text'>
Commit fails on sanitizers.

This reverts commit 22f34ea3b05537235956c99fe942aa95b88762c0.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit fails on sanitizers.

This reverts commit 22f34ea3b05537235956c99fe942aa95b88762c0.
</pre>
</div>
</content>
</entry>
<entry>
<title>Reapply "[mlir-query] Add function extraction feature to mlir-query"</title>
<updated>2024-03-03T11:37:10+00:00</updated>
<author>
<name>Jacques Pienaar</name>
<email>jpienaar@google.com</email>
</author>
<published>2024-03-03T11:37:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=22f34ea3b05537235956c99fe942aa95b88762c0'/>
<id>22f34ea3b05537235956c99fe942aa95b88762c0</id>
<content type='text'>
Fix build deps.

This reverts commit de55c2f869925a3ed7f26e168424021c6bc46799.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix build deps.

This reverts commit de55c2f869925a3ed7f26e168424021c6bc46799.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[mlir-query] Add function extraction feature to mlir-query"</title>
<updated>2024-02-29T21:14:00+00:00</updated>
<author>
<name>Mehdi Amini</name>
<email>joker.eph@gmail.com</email>
</author>
<published>2024-02-29T21:14:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=de55c2f869925a3ed7f26e168424021c6bc46799'/>
<id>de55c2f869925a3ed7f26e168424021c6bc46799</id>
<content type='text'>
This reverts commit c66f2d0c4a46ba66fb98a2cab4e63ad90888a261.

The bot is broken.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit c66f2d0c4a46ba66fb98a2cab4e63ad90888a261.

The bot is broken.
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir-query] Add function extraction feature to mlir-query</title>
<updated>2024-02-29T15:46:49+00:00</updated>
<author>
<name>Devajith Valaparambil Sreeramaswamy</name>
<email>devajithvs@gmail.com</email>
</author>
<published>2024-02-29T15:46:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c66f2d0c4a46ba66fb98a2cab4e63ad90888a261'/>
<id>c66f2d0c4a46ba66fb98a2cab4e63ad90888a261</id>
<content type='text'>
This enables specifying the extract modifier to extract all matches into
a function. This currently does this very directly by converting all
operands to function arguments (ones due to results of other matched ops
are dropped) and all results as return values.

Differential Revision: https://reviews.llvm.org/D158693
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This enables specifying the extract modifier to extract all matches into
a function. This currently does this very directly by converting all
operands to function arguments (ones due to results of other matched ops
are dropped) and all results as return values.

Differential Revision: https://reviews.llvm.org/D158693
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Use StringRef::ltrim (NFC)</title>
<updated>2024-01-09T05:49:32+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2024-01-09T05:49:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=abaa79b25dde740d5b54adab463432bee2840c85'/>
<id>abaa79b25dde740d5b54adab463432bee2840c85</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 StringRef::{starts,ends}_with (NFC)</title>
<updated>2023-12-14T06:58:30+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2023-12-14T06:58:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=88d319a29ff5d3be1bb9a7e88ef6e17df1dfe607'/>
<id>88d319a29ff5d3be1bb9a7e88ef6e17df1dfe607</id>
<content type='text'>
This patch replaces uses of StringRef::{starts,ends}with with
StringRef::{starts,ends}_with for consistency with
std::{string,string_view}::{starts,ends}_with in C++20.

I'm planning to deprecate and eventually remove
StringRef::{starts,ends}with.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch replaces uses of StringRef::{starts,ends}with with
StringRef::{starts,ends}_with for consistency with
std::{string,string_view}::{starts,ends}_with in C++20.

I'm planning to deprecate and eventually remove
StringRef::{starts,ends}with.
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][mlir-query] Introduce mlir-query tool with autocomplete support</title>
<updated>2023-10-13T21:03:27+00:00</updated>
<author>
<name>Devajith</name>
<email>devajithvs@gmail.com</email>
</author>
<published>2023-10-13T21:03:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=02d9f4d1f128e17e04ab6e602d3c9b9942612428'/>
<id>02d9f4d1f128e17e04ab6e602d3c9b9942612428</id>
<content type='text'>
This commit adds the initial version of the mlir-query tool, which leverages the pre-existing matchers defined in mlir/include/mlir/IR/Matchers.h

The tool provides the following set of basic queries:

hasOpAttrName(string)
hasOpName(string)
isConstantOp()
isNegInfFloat()
isNegZeroFloat()
isNonZero()
isOne()
isOneFloat()
isPosInfFloat()
isPosZeroFloat()
isZero()
isZeroFloat()

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D155127
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit adds the initial version of the mlir-query tool, which leverages the pre-existing matchers defined in mlir/include/mlir/IR/Matchers.h

The tool provides the following set of basic queries:

hasOpAttrName(string)
hasOpName(string)
isConstantOp()
isNegInfFloat()
isNegZeroFloat()
isNonZero()
isOne()
isOneFloat()
isPosInfFloat()
isPosZeroFloat()
isZero()
isZeroFloat()

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D155127
</pre>
</div>
</content>
</entry>
</feed>
