MLIR 22.0.0git
TopologicalSortUtils.h File Reference
#include "mlir/IR/Block.h"

Go to the source code of this file.

Namespaces

namespace  mlir
 Include the generated interface declarations.

Functions

bool mlir::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.
bool mlir::sortTopologically (Block *block, function_ref< bool(Value, Operation *)> isOperandReady=nullptr)
 Given a block, sort its operations in topological order, excluding its terminator if it has one.
bool mlir::computeTopologicalSorting (MutableArrayRef< Operation * > ops, function_ref< bool(Value, Operation *)> isOperandReady=nullptr)
 Compute a topological ordering of the given ops.
SetVector< Block * > mlir::getBlocksSortedByDominance (Region &region)
 Gets a list of blocks that is sorted according to dominance.
SetVector< Operation * > mlir::topologicalSort (const SetVector< Operation * > &toSort)
 Sorts all operations in toSort topologically while also considering region semantics.