MLIR: lib/Conversion/PDLToPDLInterp/RootOrdering.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 #ifndef MLIR_LIB_CONVERSION_PDLTOPDLINTERP_ROOTORDERING_H_
20 #define MLIR_LIB_CONVERSION_PDLTOPDLINTERP_ROOTORDERING_H_
21
23 #include "llvm/ADT/DenseMap.h"
24 #include "llvm/ADT/SmallVector.h"
25 #include
26 #include
27
28 namespace mlir {
29 namespace pdl_to_pdl_interp {
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
60
61
62
63
64
65 std::pair<unsigned, unsigned> cost;
66
67
68
69
71 };
72
73
74
75
76
77
79
80
81
82
83
84
85
86
87
88
89
91 public:
92
93 using EdgeList = std::vector<std::pair<Value, Value>>;
94
95
97
98
99
100
101
102
103
104
105
106
107 unsigned solve();
108
109
110
112 return parents;
113 }
114
115
116
118
119 private:
120
122
123
125
126
127
128
129
130
132 };
133
134 }
135 }
136
137 #endif
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.