LLVM  4.0.0
Public Types | Public Member Functions | Public Attributes | List of all members
llvm::MCRegisterClass Class Reference

MCRegisterClass - Base class of TargetRegisterClass. More...

#include <MCRegisterInfo.h>

Collaboration diagram for llvm::MCRegisterClass:
[legend]

Public Types

typedef const MCPhysRegiterator
 
typedef const MCPhysRegconst_iterator
 

Public Member Functions

unsigned getID () const
 getID() - Return the register class ID number. More...
 
iterator begin () const
 begin/end - Return all of the registers in this class. More...
 
iterator end () const
 
unsigned getNumRegs () const
 getNumRegs - Return the number of registers in this class. More...
 
unsigned getRegister (unsigned i) const
 getRegister - Return the specified register in the class. More...
 
bool contains (unsigned Reg) const
 contains - Return true if the specified register is included in this register class. More...
 
bool contains (unsigned Reg1, unsigned Reg2) const
 contains - Return true if both registers are in this class. More...
 
unsigned getSize () const
 getSize - Return the size of the register in bytes, which is also the size of a stack slot allocated to hold a spilled copy of this register. More...
 
unsigned getAlignment () const
 getAlignment - Return the minimum required alignment for a register of this class. More...
 
int getCopyCost () const
 getCopyCost - Return the cost of copying a value between two registers in this class. More...
 
bool isAllocatable () const
 isAllocatable - Return true if this register class may be used to create virtual registers. More...
 

Public Attributes

const iterator RegsBegin
 
const uint8_t *const RegSet
 
const uint32_t NameIdx
 
const uint16_t RegsSize
 
const uint16_t RegSetSize
 
const uint16_t ID
 
const uint16_t RegSize
 
const uint16_t Alignment
 
const int8_t CopyCost
 
const bool Allocatable
 

Detailed Description

MCRegisterClass - Base class of TargetRegisterClass.

Definition at line 31 of file MCRegisterInfo.h.

Member Typedef Documentation

Definition at line 34 of file MCRegisterInfo.h.

Definition at line 33 of file MCRegisterInfo.h.

Member Function Documentation

iterator llvm::MCRegisterClass::begin ( ) const
inline

begin/end - Return all of the registers in this class.

Definition at line 52 of file MCRegisterInfo.h.

References RegsBegin.

Referenced by llvm::TargetRegisterClass::begin(), getReg(), and llvm::TargetRegisterClass::getRegisters().

bool llvm::MCRegisterClass::contains ( unsigned  Reg) const
inline

contains - Return true if the specified register is included in this register class.

This does not include virtual registers.

Definition at line 68 of file MCRegisterInfo.h.

References RegSet, and RegSetSize.

Referenced by contains(), llvm::TargetRegisterClass::contains(), llvm::MCRegisterInfo::getMatchingSuperReg(), llvm::ARMInstPrinter::printInst(), llvm::AMDGPUInstPrinter::printRegOperand(), llvm::AArch64InstPrinter::printVectorList(), and llvm::MipsRegInfoRecord::SetPhysRegUsed().

bool llvm::MCRegisterClass::contains ( unsigned  Reg1,
unsigned  Reg2 
) const
inline

contains - Return true if both registers are in this class.

Definition at line 77 of file MCRegisterInfo.h.

References contains().

iterator llvm::MCRegisterClass::end ( ) const
inline

Definition at line 53 of file MCRegisterInfo.h.

References RegsBegin, and RegsSize.

Referenced by llvm::TargetRegisterClass::end(), and llvm::TargetRegisterClass::getRegisters().

unsigned llvm::MCRegisterClass::getAlignment ( ) const
inline

getAlignment - Return the minimum required alignment for a register of this class.

Definition at line 87 of file MCRegisterInfo.h.

References Alignment.

Referenced by llvm::TargetRegisterClass::getAlignment().

int llvm::MCRegisterClass::getCopyCost ( ) const
inline

getCopyCost - Return the cost of copying a value between two registers in this class.

A negative number means the register class is very expensive to copy e.g. status flag register classes.

Definition at line 92 of file MCRegisterInfo.h.

References CopyCost.

Referenced by llvm::TargetRegisterClass::getCopyCost().

unsigned llvm::MCRegisterClass::getID ( ) const
inline

getID() - Return the register class ID number.

Definition at line 48 of file MCRegisterInfo.h.

References ID.

Referenced by llvm::TargetRegisterClass::getID(), and llvm::AMDGPU::getRegBitWidth().

unsigned llvm::MCRegisterClass::getNumRegs ( ) const
inline

getNumRegs - Return the number of registers in this class.

Definition at line 57 of file MCRegisterInfo.h.

References RegsSize.

Referenced by llvm::TargetRegisterClass::getNumRegs(), and getRegister().

unsigned llvm::MCRegisterClass::getRegister ( unsigned  i) const
inline

getRegister - Return the specified register in the class.

Definition at line 61 of file MCRegisterInfo.h.

References assert(), getNumRegs(), i, and RegsBegin.

Referenced by llvm::TargetRegisterClass::getRegister().

unsigned llvm::MCRegisterClass::getSize ( ) const
inline

getSize - Return the size of the register in bytes, which is also the size of a stack slot allocated to hold a spilled copy of this register.

Definition at line 83 of file MCRegisterInfo.h.

References RegSize.

Referenced by llvm::TargetRegisterClass::getSize().

bool llvm::MCRegisterClass::isAllocatable ( ) const
inline

isAllocatable - Return true if this register class may be used to create virtual registers.

Definition at line 96 of file MCRegisterInfo.h.

References Allocatable.

Referenced by llvm::TargetRegisterClass::isAllocatable().

Member Data Documentation

const uint16_t llvm::MCRegisterClass::Alignment

Definition at line 42 of file MCRegisterInfo.h.

Referenced by getAlignment().

const bool llvm::MCRegisterClass::Allocatable

Definition at line 44 of file MCRegisterInfo.h.

Referenced by isAllocatable().

const int8_t llvm::MCRegisterClass::CopyCost

Definition at line 43 of file MCRegisterInfo.h.

Referenced by getCopyCost().

const uint16_t llvm::MCRegisterClass::ID

Definition at line 41 of file MCRegisterInfo.h.

Referenced by getID().

const uint32_t llvm::MCRegisterClass::NameIdx

Definition at line 38 of file MCRegisterInfo.h.

Referenced by llvm::MCRegisterInfo::getRegClassName().

const iterator llvm::MCRegisterClass::RegsBegin

Definition at line 36 of file MCRegisterInfo.h.

Referenced by begin(), end(), and getRegister().

const uint8_t* const llvm::MCRegisterClass::RegSet

Definition at line 37 of file MCRegisterInfo.h.

Referenced by contains().

const uint16_t llvm::MCRegisterClass::RegSetSize

Definition at line 40 of file MCRegisterInfo.h.

Referenced by contains().

const uint16_t llvm::MCRegisterClass::RegSize

Definition at line 42 of file MCRegisterInfo.h.

Referenced by getSize().

const uint16_t llvm::MCRegisterClass::RegsSize

Definition at line 39 of file MCRegisterInfo.h.

Referenced by end(), and getNumRegs().


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