LLVM API Documentation
#include <RegAllocPBQP.h>
Public Types | |
typedef SmallVector< unsigned, 16 > | AllowedSet |
Public Member Functions | |
PBQP::Graph & | getGraph () |
const PBQP::Graph & | getGraph () const |
template<typename AllowedRegsItr > | |
void | recordVReg (unsigned vreg, PBQP::Graph::NodeId nodeId, AllowedRegsItr arBegin, AllowedRegsItr arEnd) |
unsigned | getVRegForNode (PBQP::Graph::NodeId nodeId) const |
Get the virtual register corresponding to the given PBQP node. More... | |
PBQP::Graph::NodeId | getNodeForVReg (unsigned vreg) const |
Get the PBQP node corresponding to the given virtual register. More... | |
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. More... | |
unsigned | getPRegForOption (unsigned vreg, unsigned option) const |
Get PReg for option. More... | |
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 174 of file RegAllocPBQP.cpp.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::end(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::find().
Referenced by llvm::PBQPBuilder::build(), llvm::PBQPBuilderWithCoalescing::build(), and getPRegForOption().
|
inline |
Definition at line 44 of file RegAllocPBQP.h.
Referenced by llvm::PBQPBuilder::build(), and llvm::PBQPBuilderWithCoalescing::build().
|
inline |
Definition at line 46 of file RegAllocPBQP.h.
PBQP::Graph::NodeId PBQPRAProblem::getNodeForVReg | ( | unsigned | vreg | ) | const |
Get the PBQP node corresponding to the given virtual register.
Definition at line 166 of file RegAllocPBQP.cpp.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::end(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::find().
Referenced by llvm::PBQPBuilder::build(), and llvm::PBQPBuilderWithCoalescing::build().
Get PReg for option.
Definition at line 181 of file RegAllocPBQP.cpp.
References getAllowedSet(), isPRegOption(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
unsigned PBQPRAProblem::getVRegForNode | ( | PBQP::Graph::NodeId | nodeId | ) | const |
Get the virtual register corresponding to the given PBQP node.
Definition at line 160 of file RegAllocPBQP.cpp.
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().
Returns true if the given PBQP option represents spilling, false otherwise.
Definition at line 82 of file RegAllocPBQP.h.
Referenced by isPRegOption().
|
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().
Referenced by llvm::PBQPBuilder::build().