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
- public constexpr Register(llvm::MCRegister Val)
- public constexpr Register(unsigned int Val = 0)
- public llvm::MCRegister asMCReg() const
- public unsigned int id() const
- public static llvm::Register index2StackSlot(int FI)
- public static llvm::Register index2VirtReg(unsigned int Index)
- public bool isPhysical() const
- public static bool isPhysicalRegister(unsigned int Reg)
- public bool isStack() const
- 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 constexpr unsigned int operator unsigned int() const
- public static int stackSlot2Index(llvm::Register Reg)
- public static unsigned int virtReg2Index(llvm::Register Reg)
- public unsigned int virtRegIndex() const
Methods
¶constexpr Register(llvm::MCRegister Val)
constexpr Register(llvm::MCRegister Val)
Declared at: llvm/include/llvm/CodeGen/Register.h:24
Parameters
- llvm::MCRegister Val
¶constexpr Register(unsigned int Val = 0)
constexpr Register(unsigned int Val = 0)
Declared at: llvm/include/llvm/CodeGen/Register.h:23
Parameters
- unsigned int Val = 0
¶llvm::MCRegister asMCReg() const
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
unsigned int id() const
Declared at: llvm/include/llvm/CodeGen/Register.h:111
¶static llvm::Register index2StackSlot(int FI)
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)
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
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)
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
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)
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
bool isValid() const
Declared at: llvm/include/llvm/CodeGen/Register.h:126
¶bool isVirtual() const
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)
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
llvm::MCRegister operator MCRegister() const
Declared at: llvm/include/llvm/CodeGen/Register.h:113
¶constexpr unsigned int operator unsigned int()
const
constexpr unsigned int operator unsigned int()
const
Declared at: llvm/include/llvm/CodeGen/Register.h:107
¶static int stackSlot2Index(llvm::Register Reg)
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)
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
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