class Register

Declaration

class Register { /* full declaration omitted */ };

Description

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

Declared at: llvm/include/llvm/CodeGen/Register.h:19

Method Overview

Methods

Register(unsigned int Val = 0)

Declared at: llvm/include/llvm/CodeGen/Register.h:23

Parameters

unsigned int Val = 0

Register(llvm::MCRegister Val)

Declared at: llvm/include/llvm/CodeGen/Register.h:24

Parameters

llvm::MCRegister Val

unsigned int id() const

Declared at: llvm/include/llvm/CodeGen/Register.h:109

static unsigned int index2StackSlot(int FI)

Description

Convert a non-negative frame index to a stack slot register value.

Declared at: llvm/include/llvm/CodeGen/Register.h:56

Parameters

int FI

static unsigned int index2VirtReg(
    unsigned int Index)

Description

Convert a 0-based index to a virtual register number. This is the inverse operation of VirtReg2IndexFunctor below.

Declared at: llvm/include/llvm/CodeGen/Register.h:83

Parameters

unsigned int Index

bool isPhysical() const

Description

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

Declared at: llvm/include/llvm/CodeGen/Register.h:95

static bool isPhysicalRegister(unsigned int Reg)

Description

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

Declared at: llvm/include/llvm/CodeGen/Register.h:63

Parameters

unsigned int Reg

static bool isStackSlot(unsigned int Reg)

Description

isStackSlot - Sometimes it is useful the be able to store a non-negative frame index in a variable that normally holds a register. isStackSlot() returns true if Reg is in the range used for stack slots. Note that isVirtualRegister() and isPhysicalRegister() cannot handle stack slots, so if a variable may contains a stack slot, always check isStackSlot() first.

Declared at: llvm/include/llvm/CodeGen/Register.h:45

Parameters

unsigned int Reg

bool isValid() const

Declared at: llvm/include/llvm/CodeGen/Register.h:115

bool isVirtual() const

Description

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

Declared at: llvm/include/llvm/CodeGen/Register.h:89

static bool isVirtualRegister(unsigned int Reg)

Description

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

Declared at: llvm/include/llvm/CodeGen/Register.h:69

Parameters

unsigned int Reg

llvm::MCRegister operator MCRegister() const

Declared at: llvm/include/llvm/CodeGen/Register.h:111

unsigned int operator unsigned int() const

Declared at: llvm/include/llvm/CodeGen/Register.h:105

static int stackSlot2Index(unsigned int Reg)

Description

Compute the frame index from a register value representing a stack slot.

Declared at: llvm/include/llvm/CodeGen/Register.h:50

Parameters

unsigned int Reg

static unsigned int virtReg2Index(
    unsigned int Reg)

Description

Convert a virtual register number to a 0-based index. The first virtual register in a function will get the index 0.

Declared at: llvm/include/llvm/CodeGen/Register.h:76

Parameters

unsigned int Reg

unsigned int virtRegIndex() const

Description

Convert a virtual register number to a 0-based index. The first virtual register in a function will get the index 0.

Declared at: llvm/include/llvm/CodeGen/Register.h:101