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

Member Variables

private unsigned int Reg

Method Overview

Methods

constexpr Register(llvm::MCRegister Val)

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

Parameters

llvm::MCRegister Val

constexpr Register(unsigned int Val = 0)

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

Parameters

unsigned int Val = 0

llvm::MCRegister asMCReg() const

Description

Utility to check-convert this value to a MCRegister. The caller is expected to have already validated that this Register is, indeed, physical.

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

unsigned int id() const

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

static llvm::Register index2StackSlot(int FI)

Description

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

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

Parameters

int FI

static llvm::Register 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:84

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:97

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:65

Parameters

unsigned int Reg

bool isStack() const

Description

Return true if this is a stack slot.

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

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. FIXME: remove in favor of member.

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

Parameters

unsigned int Reg

bool isValid() const

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

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:91

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:71

Parameters

unsigned int Reg

llvm::MCRegister operator MCRegister() const

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

constexpr unsigned int operator unsigned int()
    const

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

static int stackSlot2Index(llvm::Register Reg)

Description

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

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

Parameters

llvm::Register Reg

static unsigned int virtReg2Index(
    llvm::Register 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:77

Parameters

llvm::Register 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:103