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
- public Register(unsigned int Val = 0)
- public Register(llvm::MCRegister Val)
- public unsigned int id() const
- public static unsigned int index2StackSlot(int FI)
- public static unsigned int index2VirtReg(unsigned int Index)
- public bool isPhysical() const
- public static bool isPhysicalRegister(unsigned int Reg)
- public static bool isStackSlot(unsigned int Reg)
- public bool isValid() const
- public bool isVirtual() const
- public static bool isVirtualRegister(unsigned int Reg)
- public llvm::MCRegister operator MCRegister() const
- public unsigned int operator unsigned int() const
- public static int stackSlot2Index(unsigned int Reg)
- public static unsigned int virtReg2Index(unsigned int Reg)
- public unsigned int virtRegIndex() const
Methods
¶Register(unsigned int Val = 0)
Register(unsigned int Val = 0)Declared at: llvm/include/llvm/CodeGen/Register.h:23
Parameters
- unsigned int Val = 0
¶Register(llvm::MCRegister Val)
Register(llvm::MCRegister Val)Declared at: llvm/include/llvm/CodeGen/Register.h:24
Parameters
- llvm::MCRegister Val
¶unsigned int id() const
unsigned int id() constDeclared at: llvm/include/llvm/CodeGen/Register.h:109
¶static unsigned int index2StackSlot(int FI)
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)
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
bool isPhysical() constDescription
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)
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)
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
bool isValid() constDeclared at: llvm/include/llvm/CodeGen/Register.h:115
¶bool isVirtual() const
bool isVirtual() constDescription
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)
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
llvm::MCRegister operator MCRegister() constDeclared at: llvm/include/llvm/CodeGen/Register.h:111
¶unsigned int operator unsigned int() const
unsigned int operator unsigned int() constDeclared at: llvm/include/llvm/CodeGen/Register.h:105
¶static int stackSlot2Index(unsigned int Reg)
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)
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
unsigned int virtRegIndex() constDescription
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