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"
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...
const DenseMap< Value, Value > & getRootOrderingParents() const
Returns the computed parent map.
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.
EdgeList preOrderTraversal(ArrayRef< Value > nodes) const
Returns the computed edges as visited in the preorder traversal.
DenseMap< Value, DenseMap< Value, RootOrderingEntry > > RootOrderingGraph
A directed graph representing the cost of ordering the roots in the predicate tree.
Include the generated interface declarations.
llvm::DenseMap< KeyT, ValueT, KeyInfoT, BucketT > DenseMap
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.