9 #ifndef MLIR_ANALYSIS_TOPOLOGICALSORTUTILS_H
10 #define MLIR_ANALYSIS_TOPOLOGICALSORTUTILS_H
89 Block *block, iterator_range<Block::iterator> ops,
90 function_ref<
bool(Value, Operation *)> isOperandReady =
nullptr);
96 function_ref<
bool(Value, Operation *)> isOperandReady =
nullptr);
104 MutableArrayRef<Operation *> ops,
105 function_ref<
bool(Value, Operation *)> isOperandReady =
nullptr);
113 SetVector<Operation *>
topologicalSort(
const SetVector<Operation *> &toSort);
Include the generated interface declarations.
llvm::function_ref< Fn > function_ref
SetVector< Block * > getBlocksSortedByDominance(Region ®ion)
Gets a list of blocks that is sorted according to dominance.
bool computeTopologicalSorting(MutableArrayRef< Operation * > ops, function_ref< bool(Value, Operation *)> isOperandReady=nullptr)
Compute a topological ordering of the given ops.
bool sortTopologically(Block *block, iterator_range< Block::iterator > ops, function_ref< bool(Value, Operation *)> isOperandReady=nullptr)
Given a block, sort a range operations in said block in topological order.
SetVector< Operation * > topologicalSort(const SetVector< Operation * > &toSort)
Sorts all operations in toSort topologically while also considering region semantics.