LLVM  10.0.0svn
Public Member Functions | Static Public Member Functions | List of all members
llvm::MCRegister Class Reference

Wrapper class representing physical registers. Should be passed by value. More...

#include "llvm/MC/MCRegister.h"

Public Member Functions

 MCRegister (unsigned Val=0)
 
bool isPhysical () const
 Return true if the specified register number is in the physical register namespace. More...
 
 operator unsigned () const
 
unsigned id () const
 
bool isValid () const
 
bool operator== (const MCRegister &Other) const
 Comparisons between register objects. More...
 
bool operator!= (const MCRegister &Other) const
 
bool operator== (unsigned Other) const
 Comparisons against register constants. More...
 
bool operator!= (unsigned Other) const
 
bool operator== (int Other) const
 
bool operator!= (int Other) const
 
bool operator== (MCPhysReg Other) const
 
bool operator!= (MCPhysReg Other) const
 

Static Public Member Functions

static bool isStackSlot (unsigned Reg)
 This is the portion of the positive number space that is not a physical register. More...
 
static bool isPhysicalRegister (unsigned Reg)
 Return true if the specified register number is in the physical register namespace. More...
 

Detailed Description

Wrapper class representing physical registers. Should be passed by value.

Definition at line 22 of file MCRegister.h.

Constructor & Destructor Documentation

◆ MCRegister()

llvm::MCRegister::MCRegister ( unsigned  Val = 0)
inline

Definition at line 26 of file MCRegister.h.

Member Function Documentation

◆ id()

unsigned llvm::MCRegister::id ( ) const
inline

◆ isPhysical()

bool llvm::MCRegister::isPhysical ( ) const
inline

Return true if the specified register number is in the physical register namespace.

Definition at line 59 of file MCRegister.h.

References isPhysicalRegister().

Referenced by llvm::MachineBasicBlock::addLiveIn(), and llvm::MachineOperand::substPhysReg().

◆ isPhysicalRegister()

static bool llvm::MCRegister::isPhysicalRegister ( unsigned  Reg)
inlinestatic

Return true if the specified register number is in the physical register namespace.

Definition at line 52 of file MCRegister.h.

References assert(), and isStackSlot().

Referenced by isPhysical(), and llvm::Register::isPhysicalRegister().

◆ isStackSlot()

static bool llvm::MCRegister::isStackSlot ( unsigned  Reg)
inlinestatic

This is the portion of the positive number space that is not a physical register.

StackSlot values do not exist in the MC layer, see Register::isStackSlot() for the more information on them.

Note that isVirtualRegister() and isPhysicalRegister() cannot handle stack slots, so if a variable may contains a stack slot, always check isStackSlot() first.

Definition at line 46 of file MCRegister.h.

Referenced by isPhysicalRegister(), and llvm::Register::isStackSlot().

◆ isValid()

bool llvm::MCRegister::isValid ( ) const
inline

Definition at line 71 of file MCRegister.h.

◆ operator unsigned()

llvm::MCRegister::operator unsigned ( ) const
inline

Definition at line 63 of file MCRegister.h.

◆ operator!=() [1/4]

bool llvm::MCRegister::operator!= ( const MCRegister Other) const
inline

Definition at line 77 of file MCRegister.h.

◆ operator!=() [2/4]

bool llvm::MCRegister::operator!= ( unsigned  Other) const
inline

Definition at line 84 of file MCRegister.h.

◆ operator!=() [3/4]

bool llvm::MCRegister::operator!= ( int  Other) const
inline

Definition at line 86 of file MCRegister.h.

◆ operator!=() [4/4]

bool llvm::MCRegister::operator!= ( MCPhysReg  Other) const
inline

Definition at line 89 of file MCRegister.h.

◆ operator==() [1/4]

bool llvm::MCRegister::operator== ( const MCRegister Other) const
inline

Comparisons between register objects.

Definition at line 76 of file MCRegister.h.

◆ operator==() [2/4]

bool llvm::MCRegister::operator== ( unsigned  Other) const
inline

Comparisons against register constants.

E.g.

Definition at line 83 of file MCRegister.h.

◆ operator==() [3/4]

bool llvm::MCRegister::operator== ( int  Other) const
inline

Definition at line 85 of file MCRegister.h.

◆ operator==() [4/4]

bool llvm::MCRegister::operator== ( MCPhysReg  Other) const
inline

Definition at line 88 of file MCRegister.h.


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