<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/mlir/lib/Rewrite/PatternApplicator.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] Adopt LDBG() debug macro in PatternApplicator.cpp (NFC) (#154724)</title>
<updated>2025-08-21T10:32:21+00:00</updated>
<author>
<name>Mehdi Amini</name>
<email>joker.eph@gmail.com</email>
</author>
<published>2025-08-21T10:32:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b20c291baec94ba3707e92b86836ff1c4bceda8c'/>
<id>b20c291baec94ba3707e92b86836ff1c4bceda8c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR] Migrate pattern application / dialect conversion to the LDBG logging format (#150991)</title>
<updated>2025-08-01T12:28:58+00:00</updated>
<author>
<name>Mehdi Amini</name>
<email>joker.eph@gmail.com</email>
</author>
<published>2025-08-01T12:28:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c569c1f15fdd1e75e7ef15503f78d53029817d79'/>
<id>c569c1f15fdd1e75e7ef15503f78d53029817d79</id>
<content type='text'>
This prefix the output with the DEBUG_TYPE.
Dialect conversion is using a ScopedPrinter, we insert the
raw_ldbg_ostream to consistently prefix each new line.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This prefix the output with the DEBUG_TYPE.
Dialect conversion is using a ScopedPrinter, we insert the
raw_ldbg_ostream to consistently prefix each new line.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][core] Add an MLIR "pattern catalog" generator (#146228)</title>
<updated>2025-07-17T16:09:12+00:00</updated>
<author>
<name>Jeremy Kun</name>
<email>jkun@google.com</email>
</author>
<published>2025-07-17T16:09:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7caf12da0bb09d6b6992bf42afd256d453753dcb'/>
<id>7caf12da0bb09d6b6992bf42afd256d453753dcb</id>
<content type='text'>
This PR adds a feature that attaches a listener to all RewritePatterns that
logs information about the modified operations.

When the MLIR test suite is run, these debug outputs can
be filtered and combined into an index linking operations to the
patterns that insert, modify, or replace them. This index is intended to
be used to create a website that allows one to look up patterns from an
operation name.

The debug logs emitted can be viewed with --debug-only=generate-pattern-catalog, 
and the lit config is modified to do this when the env var MLIR_GENERATE_PATTERN_CATALOG is set.

Example usage:

```
mkdir build &amp;&amp; cd build
cmake -G Ninja ../llvm \
  -DLLVM_ENABLE_PROJECTS="mlir" \
  -DLLVM_TARGETS_TO_BUILD="host" \
  -DCMAKE_BUILD_TYPE=DEBUG
ninja -j 24 check-mlir
MLIR_GENERATE_PATTERN_CATALOG=1 bin/llvm-lit -j 24 -v -a tools/mlir/test | grep 'pattern-logging-listener' | sed 's/^# | [pattern-logging-listener] //g' | sort | uniq &gt; pattern_catalog.txt
```

Sample pattern catalog output (that fits in a gist):
https://gist.github.com/j2kun/02d1ab8d31c10d71027724984c89905a

---------

Co-authored-by: Jeremy Kun &lt;j2kun@users.noreply.github.com&gt;
Co-authored-by: Mehdi Amini &lt;joker.eph@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR adds a feature that attaches a listener to all RewritePatterns that
logs information about the modified operations.

When the MLIR test suite is run, these debug outputs can
be filtered and combined into an index linking operations to the
patterns that insert, modify, or replace them. This index is intended to
be used to create a website that allows one to look up patterns from an
operation name.

The debug logs emitted can be viewed with --debug-only=generate-pattern-catalog, 
and the lit config is modified to do this when the env var MLIR_GENERATE_PATTERN_CATALOG is set.

Example usage:

```
mkdir build &amp;&amp; cd build
cmake -G Ninja ../llvm \
  -DLLVM_ENABLE_PROJECTS="mlir" \
  -DLLVM_TARGETS_TO_BUILD="host" \
  -DCMAKE_BUILD_TYPE=DEBUG
ninja -j 24 check-mlir
MLIR_GENERATE_PATTERN_CATALOG=1 bin/llvm-lit -j 24 -v -a tools/mlir/test | grep 'pattern-logging-listener' | sed 's/^# | [pattern-logging-listener] //g' | sort | uniq &gt; pattern_catalog.txt
```

Sample pattern catalog output (that fits in a gist):
https://gist.github.com/j2kun/02d1ab8d31c10d71027724984c89905a

---------

Co-authored-by: Jeremy Kun &lt;j2kun@users.noreply.github.com&gt;
Co-authored-by: Mehdi Amini &lt;joker.eph@gmail.com&gt;</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] Fix debug output for passes that modify top-level operation. (#80022)</title>
<updated>2024-01-31T10:52:56+00:00</updated>
<author>
<name>Robert Konicar</name>
<email>robert.konicar@trailofbits.com</email>
</author>
<published>2024-01-31T10:52:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=78e0cca135076154abab21eadd146dc1dfd3549f'/>
<id>78e0cca135076154abab21eadd146dc1dfd3549f</id>
<content type='text'>
Make it so that when the top-level (root) operation itself is being
modified, it is also used as the root for debug output in
PatternApplicator.

Fix #80021</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make it so that when the top-level (root) operation itself is being
modified, it is also used as the root for debug output in
PatternApplicator.

Fix #80021</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Add config for PDL (#69927)</title>
<updated>2024-01-04T04:37:20+00:00</updated>
<author>
<name>Jacques Pienaar</name>
<email>jpienaar@google.com</email>
</author>
<published>2024-01-04T04:37:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6ae7f66ff5169ddc5a7b9ab545707042c77e036c'/>
<id>6ae7f66ff5169ddc5a7b9ab545707042c77e036c</id>
<content type='text'>
Make it so that PDL in pattern rewrites can be optionally disabled.

PDL is still enabled by default and not optional bazel. So this should
be a NOP for most folks, while enabling other to disable.

This only works with tests disabled. With tests enabled this still
compiles but tests fail as there is no lit config to disable tests that
depend on PDL rewrites yet.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make it so that PDL in pattern rewrites can be optionally disabled.

PDL is still enabled by default and not optional bazel. So this should
be a NOP for most folks, while enabling other to disable.

This only works with tests disabled. With tests enabled this still
compiles but tests fail as there is no lit config to disable tests that
depend on PDL rewrites yet.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[mlir] Add config for PDL (#69927)"</title>
<updated>2024-01-03T18:16:19+00:00</updated>
<author>
<name>max</name>
<email>maksim.levental@gmail.com</email>
</author>
<published>2024-01-03T18:16:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b49e0ebedfefa2f3323081425016ca2ada902263'/>
<id>b49e0ebedfefa2f3323081425016ca2ada902263</id>
<content type='text'>
This reverts commit 5930725c891b60f5fb94058c6c08a55a2e03d83e.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 5930725c891b60f5fb94058c6c08a55a2e03d83e.
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Add config for PDL (#69927)</title>
<updated>2024-01-03T17:43:22+00:00</updated>
<author>
<name>Jacques Pienaar</name>
<email>jpienaar@google.com</email>
</author>
<published>2024-01-03T17:43:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5930725c891b60f5fb94058c6c08a55a2e03d83e'/>
<id>5930725c891b60f5fb94058c6c08a55a2e03d83e</id>
<content type='text'>
Make it so that PDL in pattern rewrites can be optionally disabled.

PDL is still enabled by default and not optional bazel. So this should
be a NOP for most folks, while enabling other to disable.

This is piped through mlir-tblgen invocation and that could be
changed/avoided by splitting up the passes file instead.

This only works with tests disabled. With tests enabled this still
compiles but tests fail as there is no lit config to disable tests that
depend on PDL rewrites yet.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make it so that PDL in pattern rewrites can be optionally disabled.

PDL is still enabled by default and not optional bazel. So this should
be a NOP for most folks, while enabling other to disable.

This is piped through mlir-tblgen invocation and that could be
changed/avoided by splitting up the passes file instead.

This only works with tests disabled. With tests enabled this still
compiles but tests fail as there is no lit config to disable tests that
depend on PDL rewrites yet.</pre>
</div>
</content>
</entry>
<entry>
<title>Add tracing for pattern application in a ApplyPatternAction</title>
<updated>2023-04-11T00:42:45+00:00</updated>
<author>
<name>Mehdi Amini</name>
<email>joker.eph@gmail.com</email>
</author>
<published>2023-04-11T00:39:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e24b91b063946a41afaba6c1ef0d38777fd8b601'/>
<id>e24b91b063946a41afaba6c1ef0d38777fd8b601</id>
<content type='text'>
Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D144816
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D144816
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir:PDL] Add support for DialectConversion with pattern configurations</title>
<updated>2022-11-08T09:57:57+00:00</updated>
<author>
<name>River Riddle</name>
<email>riddleriver@gmail.com</email>
</author>
<published>2022-09-08T23:59:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8c66344ee9f67f76b3cb6b3345a46345a2d3975a'/>
<id>8c66344ee9f67f76b3cb6b3345a46345a2d3975a</id>
<content type='text'>
Up until now PDL(L) has not supported dialect conversion because we had no
way of remapping values or integrating with type conversions. This commit
rectifies that by adding a new "pattern configuration" concept to PDL. This
essentially allows for attaching external configurations to patterns, which
can hook into pattern events (for now just the scope of a rewrite, but we
could also pass configs to native rewrites as well). This allows for injecting
the type converter into the conversion pattern rewriter.

Differential Revision: https://reviews.llvm.org/D133142
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Up until now PDL(L) has not supported dialect conversion because we had no
way of remapping values or integrating with type conversions. This commit
rectifies that by adding a new "pattern configuration" concept to PDL. This
essentially allows for attaching external configurations to patterns, which
can hook into pattern events (for now just the scope of a rewrite, but we
could also pass configs to native rewrites as well). This allows for injecting
the type converter into the conversion pattern rewriter.

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