LLVM 20.0.0git
Public Member Functions | List of all members
llvm::PBQP::RegAlloc::PBQPRAGraph Class Reference

#include "llvm/CodeGen/RegAllocPBQP.h"

Inheritance diagram for llvm::PBQP::RegAlloc::PBQPRAGraph:
Inheritance graph
[legend]

Public Member Functions

 PBQPRAGraph (GraphMetadata Metadata)
 
void dump () const
 Dump this graph to dbgs().
 
void dump (raw_ostream &OS) const
 Dump this graph to an output stream.
 
void printDot (raw_ostream &OS) const
 Print a representation of this graph in DOT format.
 
- Public Member Functions inherited from llvm::PBQP::Graph< RegAllocSolverImpl >
 Graph ()=default
 Construct an empty PBQP graph.
 
 Graph (GraphMetadata Metadata)
 Construct an empty PBQP graph with the given graph metadata.
 
GraphMetadatagetMetadata ()
 Get a reference to the graph metadata.
 
const GraphMetadatagetMetadata () const
 Get a const-reference to the graph metadata.
 
void setSolver (RegAllocSolverImpl &S)
 Lock this graph to the given solver instance in preparation for running the solver.
 
void unsetSolver ()
 Release from solver instance.
 
NodeId addNode (OtherVectorT Costs)
 Add a node with the given costs.
 
NodeId addNodeBypassingCostAllocator (OtherVectorPtrT Costs)
 Add a node bypassing the cost allocator.
 
EdgeId addEdge (NodeId N1Id, NodeId N2Id, OtherVectorT Costs)
 Add an edge between the given nodes with the given costs.
 
NodeId addEdgeBypassingCostAllocator (NodeId N1Id, NodeId N2Id, OtherMatrixPtrT Costs)
 Add an edge bypassing the cost allocator.
 
bool empty () const
 Returns true if the graph is empty.
 
NodeIdSet nodeIds () const
 
EdgeIdSet edgeIds () const
 
AdjEdgeIdSet adjEdgeIds (NodeId NId)
 
unsigned getNumNodes () const
 Get the number of nodes in the graph.
 
unsigned getNumEdges () const
 Get the number of edges in the graph.
 
void setNodeCosts (NodeId NId, OtherVectorT Costs)
 Set a node's cost vector.
 
const VectorPtrgetNodeCostsPtr (NodeId NId) const
 Get a VectorPtr to a node's cost vector.
 
const VectorgetNodeCosts (NodeId NId) const
 Get a node's cost vector.
 
NodeMetadatagetNodeMetadata (NodeId NId)
 
const NodeMetadatagetNodeMetadata (NodeId NId) const
 
NodeEntry::AdjEdgeList::size_type getNodeDegree (NodeId NId) const
 
void updateEdgeCosts (EdgeId EId, OtherMatrixT Costs)
 Update an edge's cost matrix.
 
const MatrixPtrgetEdgeCostsPtr (EdgeId EId) const
 Get a MatrixPtr to a node's cost matrix.
 
const MatrixgetEdgeCosts (EdgeId EId) const
 Get an edge's cost matrix.
 
EdgeMetadatagetEdgeMetadata (EdgeId EId)
 
const EdgeMetadatagetEdgeMetadata (EdgeId EId) const
 
NodeId getEdgeNode1Id (EdgeId EId) const
 Get the first node connected to this edge.
 
NodeId getEdgeNode2Id (EdgeId EId) const
 Get the second node connected to this edge.
 
NodeId getEdgeOtherNodeId (EdgeId EId, NodeId NId)
 Get the "other" node connected to this edge.
 
EdgeId findEdge (NodeId N1Id, NodeId N2Id)
 Get the edge connecting two nodes.
 
void removeNode (NodeId NId)
 Remove a node from the graph.
 
void disconnectEdge (EdgeId EId, NodeId NId)
 Disconnect an edge from the given node.
 
void disconnectAllNeighborsFromNode (NodeId NId)
 Convenience method to disconnect all neighbours from the given node.
 
void reconnectEdge (EdgeId EId, NodeId NId)
 Re-attach an edge to its nodes.
 
void removeEdge (EdgeId EId)
 Remove an edge from the graph.
 
void clear ()
 Remove all nodes and edges from the graph.
 

Additional Inherited Members

- Public Types inherited from llvm::PBQP::Graph< RegAllocSolverImpl >
using RawVector = typename SolverT::RawVector
 
using RawMatrix = typename SolverT::RawMatrix
 
using Vector = typename SolverT::Vector
 
using Matrix = typename SolverT::Matrix
 
using VectorPtr = typename CostAllocator::VectorPtr
 
using MatrixPtr = typename CostAllocator::MatrixPtr
 
using NodeMetadata = typename SolverT::NodeMetadata
 
using EdgeMetadata = typename SolverT::EdgeMetadata
 
using GraphMetadata = typename SolverT::GraphMetadata
 
using AdjEdgeItr = typename NodeEntry::AdjEdgeItr
 
- Public Types inherited from llvm::PBQP::GraphBase
using NodeId = unsigned
 
using EdgeId = unsigned
 
- Static Public Member Functions inherited from llvm::PBQP::GraphBase
static NodeId invalidNodeId ()
 Returns a value representing an invalid (non-existent) node.
 
static EdgeId invalidEdgeId ()
 Returns a value representing an invalid (non-existent) edge.
 

Detailed Description

Definition at line 501 of file RegAllocPBQP.h.

Constructor & Destructor Documentation

◆ PBQPRAGraph()

llvm::PBQP::RegAlloc::PBQPRAGraph::PBQPRAGraph ( GraphMetadata  Metadata)
inline

Definition at line 506 of file RegAllocPBQP.h.

Member Function Documentation

◆ dump() [1/2]

LLVM_DUMP_METHOD void PBQP::RegAlloc::PBQPRAGraph::dump ( ) const

Dump this graph to dbgs().

Definition at line 922 of file RegAllocPBQP.cpp.

References llvm::dbgs(), and llvm::dump().

◆ dump() [2/2]

LLVM_DUMP_METHOD void PBQP::RegAlloc::PBQPRAGraph::dump ( raw_ostream OS) const

◆ printDot()

void PBQP::RegAlloc::PBQPRAGraph::printDot ( raw_ostream OS) const

Print a representation of this graph in DOT format.

Parameters
OSOutput stream to print on.

Definition at line 927 of file RegAllocPBQP.cpp.

References OS, and PrintNodeInfo().


The documentation for this class was generated from the following files: