LLVM API Documentation
#include <RegAllocPBQP.h>
Public Types | |
typedef SmallVector< unsigned, 16 > | AllowedSet |
Public Member Functions | |
PBQPRAGraph & | getGraph () |
const PBQPRAGraph & | getGraph () const |
template<typename AllowedRegsItr > | |
void | recordVReg (unsigned vreg, PBQPRAGraph::NodeId nodeId, AllowedRegsItr arBegin, AllowedRegsItr arEnd) |
unsigned | getVRegForNode (PBQPRAGraph::NodeId nodeId) const |
Get the virtual register corresponding to the given PBQP node. | |
PBQPRAGraph::NodeId | getNodeForVReg (unsigned vreg) const |
Get the PBQP node corresponding to the given virtual register. | |
bool | isPRegOption (unsigned vreg, unsigned option) const |
bool | isSpillOption (unsigned vreg, unsigned option) const |
const AllowedSet & | getAllowedSet (unsigned vreg) const |
Returns the allowed set for the given virtual register. | |
unsigned | getPRegForOption (unsigned vreg, unsigned option) const |
Get PReg for option. |
This class wraps up a PBQP instance representing a register allocation problem, plus the structures necessary to map back from the PBQP solution to a register allocation solution. (i.e. The PBQP-node <--> vreg map, and the PBQP option <--> storage location map).
Definition at line 39 of file RegAllocPBQP.h.
typedef SmallVector<unsigned, 16> llvm::PBQPRAProblem::AllowedSet |
Definition at line 42 of file RegAllocPBQP.h.
const PBQPRAProblem::AllowedSet & PBQPRAProblem::getAllowedSet | ( | unsigned | vreg | ) | const |
Returns the allowed set for the given virtual register.
Definition at line 171 of file RegAllocPBQP.cpp.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::end(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::find().
Referenced by getPRegForOption().
PBQPRAGraph& llvm::PBQPRAProblem::getGraph | ( | ) | [inline] |
Definition at line 44 of file RegAllocPBQP.h.
const PBQPRAGraph& llvm::PBQPRAProblem::getGraph | ( | ) | const [inline] |
Definition at line 46 of file RegAllocPBQP.h.
PBQPRAGraph::NodeId PBQPRAProblem::getNodeForVReg | ( | unsigned | vreg | ) | const |
Get the PBQP node corresponding to the given virtual register.
Definition at line 163 of file RegAllocPBQP.cpp.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::end(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::find().
unsigned PBQPRAProblem::getPRegForOption | ( | unsigned | vreg, |
unsigned | option | ||
) | const |
Get PReg for option.
Definition at line 178 of file RegAllocPBQP.cpp.
References getAllowedSet(), isPRegOption(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
unsigned PBQPRAProblem::getVRegForNode | ( | PBQPRAGraph::NodeId | nodeId | ) | const |
Get the virtual register corresponding to the given PBQP node.
Definition at line 157 of file RegAllocPBQP.cpp.
bool llvm::PBQPRAProblem::isPRegOption | ( | unsigned | vreg, |
unsigned | option | ||
) | const [inline] |
Returns true if the given PBQP option represents a physical register, false otherwise.
Definition at line 74 of file RegAllocPBQP.h.
References isSpillOption().
Referenced by getPRegForOption().
bool llvm::PBQPRAProblem::isSpillOption | ( | unsigned | vreg, |
unsigned | option | ||
) | const [inline] |
Returns true if the given PBQP option represents spilling, false otherwise.
Definition at line 82 of file RegAllocPBQP.h.
Referenced by isPRegOption().
void llvm::PBQPRAProblem::recordVReg | ( | unsigned | vreg, |
PBQPRAGraph::NodeId | nodeId, | ||
AllowedRegsItr | arBegin, | ||
AllowedRegsItr | arEnd | ||
) | [inline] |
Record the mapping between the given virtual register and PBQP node, and the set of allowed pregs for the vreg.
If you are extending PBQPBuilder you are unlikely to need this: Nodes and options for all vregs will already have been set up for you by the base class.
Definition at line 55 of file RegAllocPBQP.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::end(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::find().