<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/mlir/lib/Transforms/ControlFlowSink.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] Remove `Transforms/SideEffectUtils.h` and move the methods into `Interface/SideEffectInterfaces.h`.</title>
<updated>2022-11-15T20:07:35+00:00</updated>
<author>
<name>Mahesh Ravishankar</name>
<email>ravishankarm@google.com</email>
</author>
<published>2022-11-11T17:10:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fc367dfa6770fda4adc4e5de79846f22e7e4e215'/>
<id>fc367dfa6770fda4adc4e5de79846f22e7e4e215</id>
<content type='text'>
The methods in `SideEffectUtils.h` (and their implementations in
`SideEffectUtils.cpp`) seem to have similar intent to methods already
existing in `SideEffectInterfaces.h`. Move the decleration (and
implementation) from `SideEffectUtils.h` (and `SideEffectUtils.cpp`)
into `SideEffectInterfaces.h` (and `SideEffectInterface.cpp`).

Also drop the `SideEffectInterface::hasNoEffect` method in favor of
`mlir::isMemoryEffectFree` which actually recurses into the operation
instead of just relying on the `hasRecursiveMemoryEffectTrait`
exclusively.

Differential Revision: https://reviews.llvm.org/D137857
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The methods in `SideEffectUtils.h` (and their implementations in
`SideEffectUtils.cpp`) seem to have similar intent to methods already
existing in `SideEffectInterfaces.h`. Move the decleration (and
implementation) from `SideEffectUtils.h` (and `SideEffectUtils.cpp`)
into `SideEffectInterfaces.h` (and `SideEffectInterface.cpp`).

Also drop the `SideEffectInterface::hasNoEffect` method in favor of
`mlir::isMemoryEffectFree` which actually recurses into the operation
instead of just relying on the `hasRecursiveMemoryEffectTrait`
exclusively.

Differential Revision: https://reviews.llvm.org/D137857
</pre>
</div>
</content>
</entry>
<entry>
<title>Introduce a ConditionallySpeculatable op interface</title>
<updated>2022-10-12T17:56:12+00:00</updated>
<author>
<name>Sanjoy Das</name>
<email>sanjoy.das@getcruise.com</email>
</author>
<published>2022-10-06T22:57:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=86771d0b65ee13242f89b8dfdf3c66f738eae4e5'/>
<id>86771d0b65ee13242f89b8dfdf3c66f738eae4e5</id>
<content type='text'>
This patch takes the first step towards a more principled modeling of undefined behavior in MLIR as discussed in the following discourse threads:

 1. https://discourse.llvm.org/t/semantics-modeling-undefined-behavior-and-side-effects/4812
 2. https://discourse.llvm.org/t/rfc-mark-tensor-dim-and-memref-dim-as-side-effecting/65729

This patch in particular does the following:

 1. Introduces a ConditionallySpeculatable OpInterface that dynamically determines whether an Operation can be speculated.
 2. Re-defines `NoSideEffect` to allow undefined behavior, making it necessary but not sufficient for speculation.  Also renames it to `NoMemoryEffect`.
 3. Makes LICM respect the above semantics.
 4. Changes all ops tagged with `NoSideEffect` today to additionally implement ConditionallySpeculatable and mark themselves as always speculatable.  This combined trait is named `Pure`.  This makes this change NFC.

For out of tree dialects:

 1. Replace `NoSideEffect` with `Pure` if the operation does not have any memory effects, undefined behavior or infinite loops.
 2. Replace `NoSideEffect` with `NoSideEffect` otherwise.

The next steps in this process are (I'm proposing to do these in upcoming patches):

 1. Update operations like `tensor.dim`, `memref.dim`, `scf.for`, `affine.for` to implement a correct hook for `ConditionallySpeculatable`.  I'm also happy to update ops in other dialects if the respective dialect owners would like to and can give me some pointers.
 2. Update other passes that speculate operations to consult `ConditionallySpeculatable` in addition to `NoMemoryEffect`.  I could not find any other than LICM on a quick skim, but I could have missed some.
 3. Add some documentation / FAQs detailing the differences between side effects, undefined behavior, speculatabilty.

Reviewed By: rriddle, mehdi_amini

Differential Revision: https://reviews.llvm.org/D135505
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch takes the first step towards a more principled modeling of undefined behavior in MLIR as discussed in the following discourse threads:

 1. https://discourse.llvm.org/t/semantics-modeling-undefined-behavior-and-side-effects/4812
 2. https://discourse.llvm.org/t/rfc-mark-tensor-dim-and-memref-dim-as-side-effecting/65729

This patch in particular does the following:

 1. Introduces a ConditionallySpeculatable OpInterface that dynamically determines whether an Operation can be speculated.
 2. Re-defines `NoSideEffect` to allow undefined behavior, making it necessary but not sufficient for speculation.  Also renames it to `NoMemoryEffect`.
 3. Makes LICM respect the above semantics.
 4. Changes all ops tagged with `NoSideEffect` today to additionally implement ConditionallySpeculatable and mark themselves as always speculatable.  This combined trait is named `Pure`.  This makes this change NFC.

For out of tree dialects:

 1. Replace `NoSideEffect` with `Pure` if the operation does not have any memory effects, undefined behavior or infinite loops.
 2. Replace `NoSideEffect` with `NoSideEffect` otherwise.

The next steps in this process are (I'm proposing to do these in upcoming patches):

 1. Update operations like `tensor.dim`, `memref.dim`, `scf.for`, `affine.for` to implement a correct hook for `ConditionallySpeculatable`.  I'm also happy to update ops in other dialects if the respective dialect owners would like to and can give me some pointers.
 2. Update other passes that speculate operations to consult `ConditionallySpeculatable` in addition to `NoMemoryEffect`.  I could not find any other than LICM on a quick skim, but I could have missed some.
 3. Add some documentation / FAQs detailing the differences between side effects, undefined behavior, speculatabilty.

Reviewed By: rriddle, mehdi_amini

Differential Revision: https://reviews.llvm.org/D135505
</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR] Update pass declarations to new autogenerated files</title>
<updated>2022-08-31T10:28:45+00:00</updated>
<author>
<name>Michele Scuttari</name>
<email>michele.scuttari@outlook.com</email>
</author>
<published>2022-08-31T08:16:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=67d0d7ac0acb0665d6a09f61278fbcf51f0114c2'/>
<id>67d0d7ac0acb0665d6a09f61278fbcf51f0114c2</id>
<content type='text'>
The patch introduces the required changes to update the pass declarations and definitions to use the new autogenerated files and allow dropping the old infrastructure.

Reviewed By: mehdi_amini, rriddle

Differential Review: https://reviews.llvm.org/D132838
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The patch introduces the required changes to update the pass declarations and definitions to use the new autogenerated files and allow dropping the old infrastructure.

Reviewed By: mehdi_amini, rriddle

Differential Review: https://reviews.llvm.org/D132838
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[MLIR] Update pass declarations to new autogenerated files"</title>
<updated>2022-08-30T20:21:55+00:00</updated>
<author>
<name>Michele Scuttari</name>
<email>michele.scuttari@outlook.com</email>
</author>
<published>2022-08-30T20:20:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=039b969b32b64b64123dce30dd28ec4e343d893f'/>
<id>039b969b32b64b64123dce30dd28ec4e343d893f</id>
<content type='text'>
This reverts commit 2be8af8f0e0780901213b6fd3013a5268ddc3359.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 2be8af8f0e0780901213b6fd3013a5268ddc3359.
</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR] Update pass declarations to new autogenerated files</title>
<updated>2022-08-30T19:56:31+00:00</updated>
<author>
<name>Michele Scuttari</name>
<email>michele.scuttari@outlook.com</email>
</author>
<published>2022-08-30T19:56:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2be8af8f0e0780901213b6fd3013a5268ddc3359'/>
<id>2be8af8f0e0780901213b6fd3013a5268ddc3359</id>
<content type='text'>
The patch introduces the required changes to update the pass declarations and definitions to use the new autogenerated files and allow dropping the old infrastructure.

Reviewed By: mehdi_amini, rriddle

Differential Review: https://reviews.llvm.org/D132838
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The patch introduces the required changes to update the pass declarations and definitions to use the new autogenerated files and allow dropping the old infrastructure.

Reviewed By: mehdi_amini, rriddle

Differential Review: https://reviews.llvm.org/D132838
</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>[mlir][NFC] Drop a few unnecessary includes from Pass.h</title>
<updated>2022-04-08T06:42:47+00:00</updated>
<author>
<name>River Riddle</name>
<email>riddleriver@gmail.com</email>
</author>
<published>2022-04-08T06:29:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=36d3efea15e6202edd64b05de38d8379e2baddb2'/>
<id>36d3efea15e6202edd64b05de38d8379e2baddb2</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>
</feed>
