19 #ifndef MLIR_LIB_CONVERSION_PDLTOPDLINTERP_ROOTORDERING_H_
20 #define MLIR_LIB_CONVERSION_PDLTOPDLINTERP_ROOTORDERING_H_
23 #include "llvm/ADT/DenseMap.h"
24 #include "llvm/ADT/SmallVector.h"
29 namespace pdl_to_pdl_interp {
65 std::pair<unsigned, unsigned>
cost;
93 using EdgeList = std::vector<std::pair<Value, Value>>;
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
The optimal branching algorithm solver.
unsigned solve()
Runs the Edmonds' algorithm for the current graph, returning the total cost of the minimum-weight spa...
std::vector< std::pair< Value, Value > > EdgeList
A list of edges (child, parent).
OptimalBranching(RootOrderingGraph graph, Value root)
Constructs the solver for the given graph and root value.
const DenseMap< Value, Value > & getRootOrderingParents() const
Returns the computed parent map.
EdgeList preOrderTraversal(ArrayRef< Value > nodes) const
Returns the computed edges as visited in the preorder traversal.
Include the generated interface declarations.
The information associated with an edge in the cost graph.
Value connector
The connector value in the intersection of the two subtrees rooted at the source and target root that...
std::pair< unsigned, unsigned > cost
The depth of the connector Value w.r.t.