<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/mlir/lib/Transforms/Utils/ControlFlowSinkUtils.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() macro in ControlFlowSinkUtils.cpp (NFC)</title>
<updated>2025-08-23T19:49:31+00:00</updated>
<author>
<name>Mehdi Amini</name>
<email>joker.eph@gmail.com</email>
</author>
<published>2025-08-23T19:46:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9fbf75298666c27277f086bf4900cc55694a657c'/>
<id>9fbf75298666c27277f086bf4900cc55694a657c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[ADT][mlir][NFCI] Do not use non-const lvalue-refs with enumerate</title>
<updated>2023-03-15T14:43:56+00:00</updated>
<author>
<name>Jakub Kuderski</name>
<email>kubak@google.com</email>
</author>
<published>2023-03-15T14:43:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8c258fda1f9b33fc847cfff9c2ee33ce4615ff0b'/>
<id>8c258fda1f9b33fc847cfff9c2ee33ce4615ff0b</id>
<content type='text'>
Replace references to enumerate results with either result_pairs
(reference wrapper type) or structured bindings. I did not use
structured bindings everywhere as it wasn't clear to me it would
improve readability.

This is in preparation to the switch to zip semantics which won't
support non-const lvalue reference to elements:
https://reviews.llvm.org/D144503.

I chose to use values instead of const lvalue-refs because MLIR is
biased towards avoiding `const` local variables. This won't degrade
performance because currently `result_pair` is cheap to copy (size_t
+ iterator), and in the future, the enumerator iterator dereference
will return temporaries anyway.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D146006
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace references to enumerate results with either result_pairs
(reference wrapper type) or structured bindings. I did not use
structured bindings everywhere as it wasn't clear to me it would
improve readability.

This is in preparation to the switch to zip semantics which won't
support non-const lvalue reference to elements:
https://reviews.llvm.org/D144503.

I chose to use values instead of const lvalue-refs because MLIR is
biased towards avoiding `const` local variables. This won't degrade
performance because currently `result_pair` is cheap to copy (size_t
+ iterator), and in the future, the enumerator iterator dereference
will return temporaries anyway.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D146006
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Refactor LICM into a utility</title>
<updated>2022-04-16T00:37:07+00:00</updated>
<author>
<name>Mogball</name>
<email>jeffniu22@gmail.com</email>
</author>
<published>2022-04-16T00:36:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fa26c7ff4b5d94763106712bf0009f2abde343c0'/>
<id>fa26c7ff4b5d94763106712bf0009f2abde343c0</id>
<content type='text'>
LICM is refactored into a utility that is application on any region. The implementation is moved to Transform/Utils.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
LICM is refactored into a utility that is application on any region. The implementation is moved to Transform/Utils.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[mlir] Refactor LICM into a utility"</title>
<updated>2022-04-16T00:09:16+00:00</updated>
<author>
<name>Stella Stamenova</name>
<email>stilis@microsoft.com</email>
</author>
<published>2022-04-16T00:09:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=353f0a8e43f7e1d12ac96c5e8c37c4d887f51fe2'/>
<id>353f0a8e43f7e1d12ac96c5e8c37c4d887f51fe2</id>
<content type='text'>
This reverts commit 3131f808243abe3746280e016ab9459c14d9e53b.

This commit broke the Windows mlir bot:
https://lab.llvm.org/buildbot/#/builders/13/builds/19745
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 3131f808243abe3746280e016ab9459c14d9e53b.

This commit broke the Windows mlir bot:
https://lab.llvm.org/buildbot/#/builders/13/builds/19745
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] Refactor LICM into a utility</title>
<updated>2022-04-15T22:07:01+00:00</updated>
<author>
<name>Mogball</name>
<email>jeffniu22@gmail.com</email>
</author>
<published>2022-04-15T17:52:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3131f808243abe3746280e016ab9459c14d9e53b'/>
<id>3131f808243abe3746280e016ab9459c14d9e53b</id>
<content type='text'>
LICM is refactored into a utility that is application on any region. The implementation is moved to Transform/Utils.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
LICM is refactored into a utility that is application on any region. The implementation is moved to Transform/Utils.
</pre>
</div>
</content>
</entry>
<entry>
<title>Apply clang-tidy fixes for modernize-use-default-member-init in ControlFlowSinkUtils.cpp (NFC)</title>
<updated>2022-04-15T08:01:04+00:00</updated>
<author>
<name>Mehdi Amini</name>
<email>joker.eph@gmail.com</email>
</author>
<published>2022-04-04T00:03:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7a80912dd8430489f5090a84abcb212d9c40842f'/>
<id>7a80912dd8430489f5090a84abcb212d9c40842f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][cf-sink] Accept a callback for sinking operations</title>
<updated>2022-03-28T19:31:23+00:00</updated>
<author>
<name>Mogball</name>
<email>jeffniu22@gmail.com</email>
</author>
<published>2022-03-25T21:13:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b73f1d2c5d92a923c79435e423d7db9d6fa64eac'/>
<id>b73f1d2c5d92a923c79435e423d7db9d6fa64eac</id>
<content type='text'>
(This was a TODO from the initial patch).

The control-flow sink utility accepts a callback that is used to sink an operation into a region.
The `moveIntoRegion` is called on the same operation and region that return true for `shouldMoveIntoRegion`.
The callback must preserve the dominance of the operation within the region. In the default control-flow
sink implementation, this is moving the operation to the start of the entry block.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D122445
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(This was a TODO from the initial patch).

The control-flow sink utility accepts a callback that is used to sink an operation into a region.
The `moveIntoRegion` is called on the same operation and region that return true for `shouldMoveIntoRegion`.
The callback must preserve the dominance of the operation within the region. In the default control-flow
sink implementation, this is moving the operation to the start of the entry block.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D122445
</pre>
</div>
</content>
</entry>
<entry>
<title>Apply clang-tidy fixes for modernize-use-default-member-init to MLIR (NFC)</title>
<updated>2022-03-07T10:41:44+00:00</updated>
<author>
<name>Mehdi Amini</name>
<email>joker.eph@gmail.com</email>
</author>
<published>2022-03-07T10:12:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=671e30a12f8c6efc0181741d7060e5f1fc88c4f2'/>
<id>671e30a12f8c6efc0181741d7060e5f1fc88c4f2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir:Transforms] Move out the remaining non-dialect independent transforms and utilities</title>
<updated>2022-01-25T03:25:53+00:00</updated>
<author>
<name>River Riddle</name>
<email>riddleriver@gmail.com</email>
</author>
<published>2022-01-21T01:32:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a70aa7bb0d9a6066831b339e0a09a2c1bc74fe2b'/>
<id>a70aa7bb0d9a6066831b339e0a09a2c1bc74fe2b</id>
<content type='text'>
This has been a major TODO for a very long time, and is necessary for establishing a proper
dialect-free dependency layering for the Transforms library. Code was moved to effectively
two main locations:

* Affine/
There was quite a bit of affine dialect related code in Transforms/ do to historical reasons
(of a time way into MLIR's past). The following headers were moved to:
Transforms/LoopFusionUtils.h -&gt; Dialect/Affine/LoopFusionUtils.h
Transforms/LoopUtils.h -&gt; Dialect/Affine/LoopUtils.h
Transforms/Utils.h -&gt; Dialect/Affine/Utils.h

The following transforms were also moved:
AffineLoopFusion, AffinePipelineDataTransfer, LoopCoalescing

* SCF/
Only one SCF pass was in Transforms/ (likely accidentally placed here): ParallelLoopCollapsing
The SCF specific utilities in LoopUtils have been moved to SCF/Utils.h

* Misc:
mlir::moveLoopInvariantCode was also moved to LoopLikeInterface.h given
that it is a simple utility defined in terms of LoopLikeOpInterface.

Differential Revision: https://reviews.llvm.org/D117848
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This has been a major TODO for a very long time, and is necessary for establishing a proper
dialect-free dependency layering for the Transforms library. Code was moved to effectively
two main locations:

* Affine/
There was quite a bit of affine dialect related code in Transforms/ do to historical reasons
(of a time way into MLIR's past). The following headers were moved to:
Transforms/LoopFusionUtils.h -&gt; Dialect/Affine/LoopFusionUtils.h
Transforms/LoopUtils.h -&gt; Dialect/Affine/LoopUtils.h
Transforms/Utils.h -&gt; Dialect/Affine/Utils.h

The following transforms were also moved:
AffineLoopFusion, AffinePipelineDataTransfer, LoopCoalescing

* SCF/
Only one SCF pass was in Transforms/ (likely accidentally placed here): ParallelLoopCollapsing
The SCF specific utilities in LoopUtils have been moved to SCF/Utils.h

* Misc:
mlir::moveLoopInvariantCode was also moved to LoopLikeInterface.h given
that it is a simple utility defined in terms of LoopLikeOpInterface.

Differential Revision: https://reviews.llvm.org/D117848
</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir] NFC control-flow sink cleanup</title>
<updated>2022-01-24T23:34:42+00:00</updated>
<author>
<name>Mogball</name>
<email>jeffniu22@gmail.com</email>
</author>
<published>2022-01-24T23:31:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3628febcf8e3d88db5871c9f82a33ab98611e5a8'/>
<id>3628febcf8e3d88db5871c9f82a33ab98611e5a8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
