LLVM  9.0.0svn
Public Member Functions | Static Public Member Functions | List of all members
llvm::Register Class Reference

Wrapper class representing virtual and physical registers. More...

#include "llvm/CodeGen/Register.h"

Public Member Functions

 Register (unsigned Val=0)
 
bool isVirtual () const
 Return true if the specified register number is in the virtual register namespace. More...
 
bool isPhysical () const
 Return true if the specified register number is in the physical register namespace. More...
 
unsigned virtRegIndex () const
 Convert a virtual register number to a 0-based index. More...
 
 operator unsigned () const
 
bool isValid () const
 

Static Public Member Functions

static Register index2VirtReg (unsigned Index)
 Convert a 0-based index to a virtual register number. More...
 

Detailed Description

Wrapper class representing virtual and physical registers.

Should be passed by value.

Definition at line 18 of file Register.h.

Constructor & Destructor Documentation

◆ Register()

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

Definition at line 22 of file Register.h.

Referenced by index2VirtReg(), and llvm::HexagonMCChecker::reportBranchErrors().

Member Function Documentation

◆ index2VirtReg()

static Register llvm::Register::index2VirtReg ( unsigned  Index)
inlinestatic

Convert a 0-based index to a virtual register number.

This is the inverse operation of VirtReg2IndexFunctor below.

Definition at line 45 of file Register.h.

References Register().

◆ isPhysical()

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

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

Definition at line 32 of file Register.h.

Referenced by llvm::AMDGPULegalizerInfo::loadInputValue().

◆ isValid()

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

Definition at line 53 of file Register.h.

◆ isVirtual()

bool llvm::Register::isVirtual ( ) const
inline

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

Definition at line 26 of file Register.h.

Referenced by llvm::VirtRegMap::getPhys(), and virtRegIndex().

◆ operator unsigned()

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

Definition at line 49 of file Register.h.

◆ virtRegIndex()

unsigned llvm::Register::virtRegIndex ( ) const
inline

Convert a virtual register number to a 0-based index.

The first virtual register in a function will get the index 0.

Definition at line 38 of file Register.h.

References assert(), and isVirtual().


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