LLVM API Documentation

Public Types | Public Member Functions
llvm::PBQPRAProblem Class Reference

#include <RegAllocPBQP.h>

List of all members.

Public Types

typedef SmallVector< unsigned, 16 > AllowedSet

Public Member Functions

PBQPRAGraphgetGraph ()
const PBQPRAGraphgetGraph () 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 AllowedSetgetAllowedSet (unsigned vreg) const
 Returns the allowed set for the given virtual register.
unsigned getPRegForOption (unsigned vreg, unsigned option) const
 Get PReg for option.

Detailed Description

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.


Member Typedef Documentation

Definition at line 42 of file RegAllocPBQP.h.


Member Function Documentation

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().

Definition at line 44 of file RegAllocPBQP.h.

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().

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().

template<typename AllowedRegsItr >
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().


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