<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/mlir/lib/Transforms/TopologicalSort.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][Analysis] Consolidate topological sort utilities  (#92563)</title>
<updated>2024-05-22T06:48:10+00:00</updated>
<author>
<name>Christian Ulmann</name>
<email>christianulmann@gmail.com</email>
</author>
<published>2024-05-22T06:48:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b00e0c167186d69e1e6bceda57c09b272bd6acfc'/>
<id>b00e0c167186d69e1e6bceda57c09b272bd6acfc</id>
<content type='text'>
This PR attempts to consolidate the different topological sort utilities
into one place. It adds them to the analysis folder because the
`SliceAnalysis` uses some of these.

There are now two different sorting strategies: 
1. Sort only according to SSA use-def chains
2. Sort while taking regions into account. This requires a much more
elaborate traversal and cannot be applied on graph regions that easily.

This additionally reimplements the region aware topological sorting
because the previous implementation had an exponential space complexity.

I'm open to suggestions on how to combine this further or how to fuse
the test passes.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR attempts to consolidate the different topological sort utilities
into one place. It adds them to the analysis folder because the
`SliceAnalysis` uses some of these.

There are now two different sorting strategies: 
1. Sort only according to SSA use-def chains
2. Sort while taking regions into account. This requires a much more
elaborate traversal and cannot be applied on graph regions that easily.

This additionally reimplements the region aware topological sorting
because the previous implementation had an exponential space complexity.

I'm open to suggestions on how to combine this further or how to fuse
the test passes.</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] 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][transforms] Add a topological sort utility and pass</title>
<updated>2022-05-16T20:47:30+00:00</updated>
<author>
<name>Mogball</name>
<email>jeffniu22@gmail.com</email>
</author>
<published>2022-05-16T20:45:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c8457eb5323ca99361c1748a22a16edb3160ae5f'/>
<id>c8457eb5323ca99361c1748a22a16edb3160ae5f</id>
<content type='text'>
This patch adds a topological sort utility and pass. A topological sort reorders
the operations in a block without SSA dominance such that, as much as possible,
users of values come after their producers.

The utility function sorts topologically the operation range in a given block
with an optional user-provided callback that can be used to virtually break cycles.
The toposort pass itself recursively sorts graph regions under the target op.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D125063
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds a topological sort utility and pass. A topological sort reorders
the operations in a block without SSA dominance such that, as much as possible,
users of values come after their producers.

The utility function sorts topologically the operation range in a given block
with an optional user-provided callback that can be used to virtually break cycles.
The toposort pass itself recursively sorts graph regions under the target op.

Reviewed By: mehdi_amini

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