[llvm] [mlir] [MLIR][Analysis] Consolidate topological sort utilities (PR #92563)

Théo Degioanni via llvm-commits llvm-commits at lists.llvm.org
Sun May 19 03:36:05 PDT 2024


================
@@ -104,6 +104,14 @@ bool computeTopologicalSorting(
     MutableArrayRef<Operation *> ops,
     function_ref<bool(Value, Operation *)> isOperandReady = nullptr);
 
+/// Get a list of blocks that is sorted according to dominance. This sort is
+/// stable.
+SetVector<Block *> getBlocksSortedByDominance(Region &region);
+
+/// Sorts all operation in `toSort` topologically while also region semantics.
+/// Does not support multi-sets.
----------------
Moxinilian wrote:

Ah, I'm being nitpicky today: could you also make the tense consistent with the comment above? Either `Get` and `Sort` or `Gets` and `Sorts`.

https://github.com/llvm/llvm-project/pull/92563


More information about the llvm-commits mailing list