llvm.org GIT mirror llvm / 48d779f
[PBQP] Add support for graph-level metadata to the PBQP graph. This will be used in the future to attach useful information about the PBQP graph (e.g. the associated MachineFunction, pointers to regalloc passes) to the graph itself, making that information accessible to the solver. This should also allow the PBQPBuilder interface to be simplified. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218848 91177308-0d34-0410-b5e6-96231b3b80d8 Lang Hames 5 years ago
2 changed file(s) with 9 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
5555 typedef typename CostAllocator::MatrixPtr MatrixPtr;
5656 typedef typename SolverT::NodeMetadata NodeMetadata;
5757 typedef typename SolverT::EdgeMetadata EdgeMetadata;
58 typedef typename SolverT::GraphMetadata GraphMetadata;
5859
5960 private:
6061
171172
172173 // ----- MEMBERS -----
173174
175 GraphMetadata Metadata;
174176 CostAllocator CostAlloc;
175177 SolverT *Solver;
176178
329331
330332 /// \brief Construct an empty PBQP graph.
331333 Graph() : Solver(nullptr) { }
334
335 /// \brief Get a reference to the graph metadata.
336 GraphMetadata& getMetadata() { return Metadata; }
337
338 /// \brief Get a const-reference to the graph metadata.
339 const GraphMetadata& getMetadata() const { return Metadata; }
332340
333341 /// \brief Lock this graph to the given solver instance in preparation
334342 /// for running the solver. This method will call solver.handleAddNode for
143143 typedef RegAlloc::NodeMetadata NodeMetadata;
144144
145145 struct EdgeMetadata { };
146 struct GraphMetadata { };
146147
147148 typedef PBQP::Graph Graph;
148149