<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/llvm.git/mlir/lib/Transforms/Canonicalizer.cpp, branch EmptyLineAfterFunctionDefinition</title>
<subtitle>github.com: llvm/llvm-project.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/llvm.git/'/>
<entry>
<title>[mlir] Refactor AbstractOperation and OperationName</title>
<updated>2021-11-17T22:29:57+00:00</updated>
<author>
<name>River Riddle</name>
<email>riddleriver@gmail.com</email>
</author>
<published>2021-11-17T21:50:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/llvm.git/commit/?id=edc6c0ecb9627c7c57fdb8e0ca8267295dd77bcd'/>
<id>edc6c0ecb9627c7c57fdb8e0ca8267295dd77bcd</id>
<content type='text'>
The current implementation is quite clunky; OperationName stores either an Identifier
or an AbstractOperation that corresponds to an operation. This has several problems:

* OperationNames created before and after an operation are registered are different
* Accessing the identifier name/dialect/etc. from an OperationName are overly branchy
  - they need to dyn_cast a PointerUnion to check the state

This commit refactors this such that we create a single information struct for every
operation name, even operations that aren't registered yet. When an OperationName is
created for an unregistered operation, we only populate the name field. When the
operation is registered, we populate the remaining fields. With this we now have two
new classes: OperationName and RegisteredOperationName. These both point to the
same underlying operation information struct, but only RegisteredOperationName can
assume that the operation is actually registered. This leads to a much cleaner API, and
we can also move some AbstractOperation functionality directly to OperationName.

Differential Revision: https://reviews.llvm.org/D114049
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current implementation is quite clunky; OperationName stores either an Identifier
or an AbstractOperation that corresponds to an operation. This has several problems:

* OperationNames created before and after an operation are registered are different
* Accessing the identifier name/dialect/etc. from an OperationName are overly branchy
  - they need to dyn_cast a PointerUnion to check the state

This commit refactors this such that we create a single information struct for every
operation name, even operations that aren't registered yet. When an OperationName is
created for an unregistered operation, we only populate the name field. When the
operation is registered, we populate the remaining fields. With this we now have two
new classes: OperationName and RegisteredOperationName. These both point to the
same underlying operation information struct, but only RegisteredOperationName can
assume that the operation is actually registered. This leads to a much cleaner API, and
we can also move some AbstractOperation functionality directly to OperationName.

Differential Revision: https://reviews.llvm.org/D114049
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Add support for filtering patterns based on debug names and labels</title>
<updated>2021-06-02T19:05:25+00:00</updated>
<author>
<name>River Riddle</name>
<email>riddleriver@gmail.com</email>
</author>
<published>2021-06-02T18:43:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/llvm.git/commit/?id=0289a2692e0e1b6b846f0627262d15daa58160ac'/>
<id>0289a2692e0e1b6b846f0627262d15daa58160ac</id>
<content type='text'>
This revision allows for attaching "debug labels" to patterns, and provides to FrozenRewritePatternSet for  filtering patterns based on these labels (in addition to the debug name of the pattern). This will greatly simplify the ability to write tests targeted towards specific patterns (in cases where many patterns may interact),  will also simplify debugging pattern application by observing how application changes when enabling/disabling specific patterns.

To enable better reuse of pattern rewrite options between passes, this revision also adds a new PassUtil.td file to the Rewrite/ library that will allow for passes to easily hook into a common interface for pattern debugging. Two options are used to seed this utility, `disable-patterns` and `enable-patterns`, which are used to enable the filtering behavior indicated above.

Differential Revision: https://reviews.llvm.org/D102441
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This revision allows for attaching "debug labels" to patterns, and provides to FrozenRewritePatternSet for  filtering patterns based on these labels (in addition to the debug name of the pattern). This will greatly simplify the ability to write tests targeted towards specific patterns (in cases where many patterns may interact),  will also simplify debugging pattern application by observing how application changes when enabling/disabling specific patterns.

To enable better reuse of pattern rewrite options between passes, this revision also adds a new PassUtil.td file to the Rewrite/ library that will allow for passes to easily hook into a common interface for pattern debugging. Two options are used to seed this utility, `disable-patterns` and `enable-patterns`, which are used to enable the filtering behavior indicated above.

Differential Revision: https://reviews.llvm.org/D102441
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Add missing namespace to createCanonicalizerPass.</title>
<updated>2021-05-28T16:12:55+00:00</updated>
<author>
<name>Jacques Pienaar</name>
<email>jpienaar@google.com</email>
</author>
<published>2021-05-28T16:12:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/llvm.git/commit/?id=82f7b5e1b9994331b2ee556f69d820d6144b0482'/>
<id>82f7b5e1b9994331b2ee556f69d820d6144b0482</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Support dialect-wide canonicalization pattern registration</title>
<updated>2021-05-27T08:35:21+00:00</updated>
<author>
<name>Matthias Springer</name>
<email>springerm@google.com</email>
</author>
<published>2021-05-27T08:26:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/llvm.git/commit/?id=108ca7a7e73ca6d5f4c17a8291d0e94cd9f740d3'/>
<id>108ca7a7e73ca6d5f4c17a8291d0e94cd9f740d3</id>
<content type='text'>
* Add `hasCanonicalizer` option to Dialect.
* Initialize canonicalizer with dialect-wide canonicalization patterns.
* Add test case to TestDialect.

Dialect-wide canonicalization patterns are useful if a canonicalization pattern does not conceptually associate with any single operation, i.e., it should not be registered as part of an operation's `getCanonicalizationPatterns` function. E.g., this is the case for canonicalization patterns that match an op interface.

Differential Revision: https://reviews.llvm.org/D103226
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Add `hasCanonicalizer` option to Dialect.
* Initialize canonicalizer with dialect-wide canonicalization patterns.
* Add test case to TestDialect.

Dialect-wide canonicalization patterns are useful if a canonicalization pattern does not conceptually associate with any single operation, i.e., it should not be registered as part of an operation's `getCanonicalizationPatterns` function. E.g., this is the case for canonicalization patterns that match an op interface.

Differential Revision: https://reviews.llvm.org/D103226
</pre>
</div>
</content>
</entry>
<entry>
<title>[Canonicalize] Fully parameterize the pass based on config options. NFC.</title>
<updated>2021-05-25T20:09:51+00:00</updated>
<author>
<name>Chris Lattner</name>
<email>clattner@nondot.org</email>
</author>
<published>2021-05-25T04:23:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/llvm.git/commit/?id=2f23f9e641e3830948cd2357a8fa52798df8ffcb'/>
<id>2f23f9e641e3830948cd2357a8fa52798df8ffcb</id>
<content type='text'>
This allows C++ clients of the Canonicalize pass to specify their own
Config option struct to control how Canonicalize works, increasing reusability.

This also allows controlling these settings for the default Canonicalize pass
using command line options.  This is useful for testing and for playing with
things on the command line.

Differential Revision: https://reviews.llvm.org/D103069
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows C++ clients of the Canonicalize pass to specify their own
Config option struct to control how Canonicalize works, increasing reusability.

This also allows controlling these settings for the default Canonicalize pass
using command line options.  This is useful for testing and for playing with
things on the command line.

Differential Revision: https://reviews.llvm.org/D103069
</pre>
</div>
</content>
</entry>
<entry>
<title>[GreedyPatternRewriter] Introduce a config object that allows controlling internal parameters. NFC.</title>
<updated>2021-05-24T19:40:40+00:00</updated>
<author>
<name>Chris Lattner</name>
<email>clattner@nondot.org</email>
</author>
<published>2021-05-23T18:24:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/llvm.git/commit/?id=64716b2c39c10a3ea3a893da6106d2d55a0e8deb'/>
<id>64716b2c39c10a3ea3a893da6106d2d55a0e8deb</id>
<content type='text'>
This exposes the iterations and top-down processing as flags, and also
allows controlling whether region simplification is desirable for a client.
This allows deleting some duplicated entrypoints to
applyPatternsAndFoldGreedily.

This also deletes the Constant Preprocessing pass, which isn't worth it
on balance.

All defaults are all kept the same, so no one should see a behavior change.

Differential Revision: https://reviews.llvm.org/D102988
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This exposes the iterations and top-down processing as flags, and also
allows controlling whether region simplification is desirable for a client.
This allows deleting some duplicated entrypoints to
applyPatternsAndFoldGreedily.

This also deletes the Constant Preprocessing pass, which isn't worth it
on balance.

All defaults are all kept the same, so no one should see a behavior change.

Differential Revision: https://reviews.llvm.org/D102988
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge with mainline.</title>
<updated>2021-05-17T18:15:10+00:00</updated>
<author>
<name>Chris Lattner</name>
<email>clattner@nondot.org</email>
</author>
<published>2021-05-17T16:51:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/llvm.git/commit/?id=648f34a2840b75f4081884052f2ccb11f62f8209'/>
<id>648f34a2840b75f4081884052f2ccb11f62f8209</id>
<content type='text'>
Differential Revision: https://reviews.llvm.org/D102636
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Differential Revision: https://reviews.llvm.org/D102636
</pre>
</div>
</content>
</entry>
<entry>
<title>[WIP][mlir] Resolve memref dependency in canonicalize pass.</title>
<updated>2021-05-17T09:33:38+00:00</updated>
<author>
<name>Julian Gross</name>
<email>julian.gross@dfki.de</email>
</author>
<published>2021-05-07T10:38:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/llvm.git/commit/?id=1fbb484ea45f85740b7450b175096e5fcff6ecd9'/>
<id>1fbb484ea45f85740b7450b175096e5fcff6ecd9</id>
<content type='text'>
Splitting the memref dialect lead to an introduction of several dependencies
to avoid compilation issues. The canonicalize pass also depends on the
memref dialect, but it shouldn't. This patch resolves the dependencies
and the unintuitive includes are removed. However, the dependency moves
to the constructor of the std dialect.

Differential Revision: https://reviews.llvm.org/D102060
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Splitting the memref dialect lead to an introduction of several dependencies
to avoid compilation issues. The canonicalize pass also depends on the
memref dialect, but it shouldn't. This patch resolves the dependencies
and the unintuitive includes are removed. However, the dependency moves
to the constructor of the std dialect.

Differential Revision: https://reviews.llvm.org/D102060
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename FrozenRewritePatternList -&gt; FrozenRewritePatternSet; NFC.</title>
<updated>2021-03-23T00:40:45+00:00</updated>
<author>
<name>Chris Lattner</name>
<email>clattner@nondot.org</email>
</author>
<published>2021-03-23T00:36:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/llvm.git/commit/?id=79d7f618af5f0362e6c4a8cccdeb251e82654907'/>
<id>79d7f618af5f0362e6c4a8cccdeb251e82654907</id>
<content type='text'>
This nicely aligns the naming with RewritePatternSet.  This type isn't
as widely used, but we keep a using declaration in to help with
downstream consumption of this change.

Differential Revision: https://reviews.llvm.org/D99131
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This nicely aligns the naming with RewritePatternSet.  This type isn't
as widely used, but we keep a using declaration in to help with
downstream consumption of this change.

Differential Revision: https://reviews.llvm.org/D99131
</pre>
</div>
</content>
</entry>
<entry>
<title>[PatternMatch] Big mechanical rename OwningRewritePatternList -&gt; RewritePatternSet and insert -&gt; add.  NFC</title>
<updated>2021-03-23T00:20:50+00:00</updated>
<author>
<name>Chris Lattner</name>
<email>clattner@nondot.org</email>
</author>
<published>2021-03-22T23:58:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/llvm.git/commit/?id=dc4e913be9c3d1c37f66348d4b5047a107499b53'/>
<id>dc4e913be9c3d1c37f66348d4b5047a107499b53</id>
<content type='text'>
This doesn't change APIs, this just cleans up the many in-tree uses of these
names to use the new preferred names.  We'll keep the old names around for a
couple weeks to help transitions.

Differential Revision: https://reviews.llvm.org/D99127
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This doesn't change APIs, this just cleans up the many in-tree uses of these
names to use the new preferred names.  We'll keep the old names around for a
couple weeks to help transitions.

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