LLVM: llvm::MCRegisterInfo Class Reference (original) (raw)
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc objects that represent all of the machine registers that the target has. More...
#include "[llvm/MC/MCRegisterInfo.h](MCRegisterInfo%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| iterator_range< MCSubRegIterator > | subregs (MCRegister Reg) const |
| Return an iterator range over all sub-registers of Reg, excluding Reg. | |
| iterator_range< MCSubRegIterator > | subregs_inclusive (MCRegister Reg) const |
| Return an iterator range over all sub-registers of Reg, including Reg. | |
| iterator_range< MCSuperRegIterator > | superregs (MCRegister Reg) const |
| Return an iterator range over all super-registers of Reg, excluding Reg. | |
| iterator_range< MCSuperRegIterator > | superregs_inclusive (MCRegister Reg) const |
| Return an iterator range over all super-registers of Reg, including Reg. | |
| detail::concat_range< const MCPhysReg, iterator_range< MCSubRegIterator >, iterator_range< MCSuperRegIterator > > | sub_and_superregs_inclusive (MCRegister Reg) const |
| Return an iterator range over all sub- and super-registers of Reg, including Reg. | |
| iota_range< MCRegUnit > | regunits () const |
| Returns an iterator range over all regunits. | |
| iterator_range< MCRegUnitIterator > | regunits (MCRegister Reg) const |
| Returns an iterator range over all regunits for Reg. | |
| virtual | ~MCRegisterInfo ()=default |
| void | InitMCRegisterInfo (const MCRegisterDesc *D, unsigned NR, unsigned RA, unsigned PC, const MCRegisterClass *C, unsigned NC, const MCPhysReg(*RURoots)[2], unsigned NRU, const int16_t *DL, const LaneBitmask *RUMS, const char *Strings, const char *ClassStrings, const uint16_t *SubIndices, unsigned NumIndices, const uint16_t *RET) |
| Initialize MCRegisterInfo, called by TableGen auto-generated routines. | |
| void | mapLLVMRegsToDwarfRegs (const DwarfLLVMRegPair *Map, unsigned Size, bool isEH) |
| Used to initialize LLVM register to Dwarf register number mapping. | |
| void | mapDwarfRegsToLLVMRegs (const DwarfLLVMRegPair *Map, unsigned Size, bool isEH) |
| Used to initialize Dwarf register to LLVM register number mapping. | |
| void | mapLLVMRegToSEHReg (MCRegister LLVMReg, int SEHReg) |
| mapLLVMRegToSEHReg - Used to initialize LLVM register to SEH register number mapping. | |
| void | mapLLVMRegToCVReg (MCRegister LLVMReg, int CVReg) |
| MCRegister | getRARegister () const |
| This method should return the register where the return address can be found. | |
| MCRegister | getProgramCounter () const |
| Return the register which is the program counter. | |
| const MCRegisterDesc & | operator[] (MCRegister Reg) const |
| const MCRegisterDesc & | get (MCRegister Reg) const |
| Provide a get method, equivalent to [], but more useful with a pointer to this object. | |
| MCRegister | getSubReg (MCRegister Reg, unsigned Idx) const |
| Returns the physical register number of sub-register "Index" for physical register RegNo. | |
| MCRegister | getMatchingSuperReg (MCRegister Reg, unsigned SubIdx, const MCRegisterClass *RC) const |
| Return a super-register of the specified register Reg so its sub-register of index SubIdx is Reg. | |
| unsigned | getSubRegIndex (MCRegister RegNo, MCRegister SubRegNo) const |
| For a given register pair, return the sub-register index if the second register is a sub-register of the first. | |
| const char * | getName (MCRegister RegNo) const |
| Return the human-readable symbolic target-specific name for the specified physical register. | |
| bool | isConstant (MCRegister RegNo) const |
| Returns true if the given register is constant. | |
| bool | isArtificial (MCRegister RegNo) const |
| Returns true if the given register is artificial, which means it represents a regunit that is not separately addressable but still needs to be modelled, such as the top 16-bits of a 32-bit GPR. | |
| bool | isArtificialRegUnit (MCRegUnit Unit) const |
| Returns true when the given register unit is considered artificial. | |
| unsigned | getNumRegs () const |
| Return the number of registers this target has (useful for sizing arrays holding per register information) | |
| unsigned | getNumSubRegIndices () const |
| Return the number of sub-register indices understood by the target. | |
| unsigned | getNumRegUnits () const |
| Return the number of (native) register units in the target. | |
| virtual int64_t | getDwarfRegNum (MCRegister Reg, bool isEH) const |
| Map a target register to an equivalent dwarf register number. | |
| std::optional< MCRegister > | getLLVMRegNum (uint64_t RegNum, bool isEH) const |
| Map a dwarf register back to a target register. | |
| int64_t | getDwarfRegNumFromDwarfEHRegNum (uint64_t RegNum) const |
| Map a target EH register number to an equivalent DWARF register number. | |
| int | getSEHRegNum (MCRegister Reg) const |
| Map a target register to an equivalent SEH register number. | |
| int | getCodeViewRegNum (MCRegister Reg) const |
| Map a target register to an equivalent CodeView register number. | |
| regclass_iterator | regclass_begin () const |
| regclass_iterator | regclass_end () const |
| iterator_range< regclass_iterator > | regclasses () const |
| unsigned | getNumRegClasses () const |
| const MCRegisterClass & | getRegClass (unsigned i) const |
| Returns the register class associated with the enumeration value. | |
| const char * | getRegClassName (const MCRegisterClass *Class) const |
| uint16_t | getEncodingValue (MCRegister Reg) const |
| Returns the encoding for Reg. | |
| bool | isSubRegister (MCRegister RegA, MCRegister RegB) const |
| Returns true if RegB is a sub-register of RegA. | |
| bool | isSuperRegister (MCRegister RegA, MCRegister RegB) const |
| Returns true if RegB is a super-register of RegA. | |
| bool | isSubRegisterEq (MCRegister RegA, MCRegister RegB) const |
| Returns true if RegB is a sub-register of RegA or if RegB == RegA. | |
| bool | isSuperRegisterEq (MCRegister RegA, MCRegister RegB) const |
| Returns true if RegB is a super-register of RegA or if RegB == RegA. | |
| bool | isSuperOrSubRegisterEq (MCRegister RegA, MCRegister RegB) const |
| Returns true if RegB is a super-register or sub-register of RegA or if RegB == RegA. | |
| bool | regsOverlap (MCRegister RegA, MCRegister RegB) const |
| Returns true if the two registers are equal or alias each other. |
| Friends | |
|---|---|
| class | MCSubRegIterator |
| class | MCSubRegIndexIterator |
| class | MCSuperRegIterator |
| class | MCRegUnitIterator |
| class | MCRegUnitMaskIterator |
| class | MCRegUnitRootIterator |
| class | MCRegAliasIterator |
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc objects that represent all of the machine registers that the target has.
As such, we simply have to track a pointer to this array so that we can turn register number into a register descriptor.
Note this class is designed to be a base class of TargetRegisterInfo, which is the interface used by codegen. However, specific targets should never specialize this class. MCRegisterInfo should only contain getters to access TableGen generated physical register data. It must not be extended with virtual methods.
Definition at line 151 of file MCRegisterInfo.h.
◆ regclass_iterator
| virtual llvm::MCRegisterInfo::~MCRegisterInfo ( ) | virtualdefault |
|---|
◆ get()
Provide a get method, equivalent to [], but more useful with a pointer to this object.
Definition at line 379 of file MCRegisterInfo.h.
Referenced by getName(), llvm::LLVMDisasmContext::getRegisterInfo(), getSubReg(), getSubRegIndex(), isArtificial(), isConstant(), llvm::MCRegUnitIterator::MCRegUnitIterator(), llvm::MCRegUnitMaskIterator::MCRegUnitMaskIterator(), llvm::MCSubRegIndexIterator::MCSubRegIndexIterator(), llvm::MCSubRegIterator::MCSubRegIterator(), and llvm::MCSuperRegIterator::MCSuperRegIterator().
◆ getCodeViewRegNum()
| int MCRegisterInfo::getCodeViewRegNum | ( | MCRegister | Reg | ) | const |
|---|
◆ getDwarfRegNum()
| int64_t MCRegisterInfo::getDwarfRegNum ( MCRegister Reg, bool isEH ) const | virtual |
|---|
◆ getDwarfRegNumFromDwarfEHRegNum()
| int64_t MCRegisterInfo::getDwarfRegNumFromDwarfEHRegNum | ( | uint64_t | RegNum | ) | const |
|---|
◆ getEncodingValue()
◆ getLLVMRegNum()
◆ getMatchingSuperReg()
◆ getName()
◆ getNumRegClasses()
| unsigned llvm::MCRegisterInfo::getNumRegClasses ( ) const | inline |
|---|
◆ getNumRegs()
| unsigned llvm::MCRegisterInfo::getNumRegs ( ) const | inline |
|---|
◆ getNumRegUnits()
| unsigned llvm::MCRegisterInfo::getNumRegUnits ( ) const | inline |
|---|
◆ getNumSubRegIndices()
| unsigned llvm::MCRegisterInfo::getNumSubRegIndices ( ) const | inline |
|---|
◆ getProgramCounter()
| MCRegister llvm::MCRegisterInfo::getProgramCounter ( ) const | inline |
|---|
◆ getRARegister()
| MCRegister llvm::MCRegisterInfo::getRARegister ( ) const | inline |
|---|
◆ getRegClass()
◆ getRegClassName()
◆ getSEHRegNum()
| int MCRegisterInfo::getSEHRegNum | ( | MCRegister | Reg | ) | const |
|---|
Map a target register to an equivalent SEH register number.
Returns LLVM register number if there is no equivalent value.
Definition at line 194 of file MCRegisterInfo.cpp.
References I.
◆ getSubReg()
Returns the physical register number of sub-register "Index" for physical register RegNo.
Return zero if the sub-register does not exist.
Definition at line 116 of file MCRegisterInfo.cpp.
References assert(), get(), getNumSubRegIndices(), llvm::Sub, llvm::MCRegisterDesc::SubRegIndices, and subregs().
Referenced by addSavedGPR(), getMatchingSuperReg(), getPairedGPR(), llvm::HexagonAsmPrinter::HexagonProcessInstruction(), llvm::PPCRegisterInfo::lowerACCSpilling(), llvm::PPCRegisterInfo::lowerDMRRestore(), and llvm::PPCRegisterInfo::lowerDMRSpilling().
◆ getSubRegIndex()
◆ InitMCRegisterInfo()
| void llvm::MCRegisterInfo::InitMCRegisterInfo ( const MCRegisterDesc * D, unsigned NR, unsigned RA, unsigned PC, const MCRegisterClass * C, unsigned NC, const MCPhysReg(*) _RURoots_[2], unsigned NRU, const int16_t * DL, const LaneBitmask * RUMS, const char * Strings, const char * ClassStrings, const uint16_t * SubIndices, unsigned NumIndices, const uint16_t * RET ) | inline |
|---|
◆ isArtificial()
| bool llvm::MCRegisterInfo::isArtificial ( MCRegister RegNo) const | inline |
|---|
◆ isArtificialRegUnit()
| bool MCRegisterInfo::isArtificialRegUnit | ( | MCRegUnit | Unit | ) | const |
|---|
◆ isConstant()
| bool llvm::MCRegisterInfo::isConstant ( MCRegister RegNo) const | inline |
|---|
◆ isSubRegister()
◆ isSubRegisterEq()
◆ isSuperOrSubRegisterEq()
◆ isSuperRegister()
◆ isSuperRegisterEq()
◆ mapDwarfRegsToLLVMRegs()
Used to initialize Dwarf register to LLVM register number mapping.
Called by TableGen auto-generated routines. DO NOT USE.
Definition at line 336 of file MCRegisterInfo.h.
References Size.
◆ mapLLVMRegsToDwarfRegs()
Used to initialize LLVM register to Dwarf register number mapping.
Called by TableGen auto-generated routines. DO NOT USE.
Definition at line 322 of file MCRegisterInfo.h.
References Size.
◆ mapLLVMRegToCVReg()
| void llvm::MCRegisterInfo::mapLLVMRegToCVReg ( MCRegister LLVMReg, int CVReg ) | inline |
|---|
◆ mapLLVMRegToSEHReg()
| void llvm::MCRegisterInfo::mapLLVMRegToSEHReg ( MCRegister LLVMReg, int SEHReg ) | inline |
|---|
mapLLVMRegToSEHReg - Used to initialize LLVM register to SEH register number mapping.
By default the SEH register number is just the same as the LLVM register number. FIXME: TableGen these numbers. Currently this requires target specific initialization code.
Definition at line 352 of file MCRegisterInfo.h.
◆ operator[]()
◆ regclass_begin()
| regclass_iterator llvm::MCRegisterInfo::regclass_begin ( ) const | inline |
|---|
◆ regclass_end()
| regclass_iterator llvm::MCRegisterInfo::regclass_end ( ) const | inline |
|---|
◆ regclasses()
◆ regsOverlap()
◆ regunits() [1/2]
| iota_range< MCRegUnit > llvm::MCRegisterInfo::regunits ( ) const | inline |
|---|
◆ regunits() [2/2]
◆ sub_and_superregs_inclusive()
◆ subregs()
◆ subregs_inclusive()
◆ superregs()
Return an iterator range over all super-registers of Reg, excluding Reg.
Definition at line 791 of file MCRegisterInfo.h.
References llvm::make_range(), MCSuperRegIterator, and Reg.
Referenced by llvm::TargetRegisterInfo::checkAllSuperRegsMarked(), getHexagonRegisterPair(), getMatchingSuperReg(), getPairedGPR(), llvm::getSuperReg(), llvm::isSuperReg(), isSuperRegister(), and sub_and_superregs_inclusive().
◆ superregs_inclusive()
◆ MCRegAliasIterator
◆ MCRegUnitIterator
◆ MCRegUnitMaskIterator
◆ MCRegUnitRootIterator
◆ MCSubRegIndexIterator
◆ MCSubRegIterator
◆ MCSuperRegIterator
The documentation for this class was generated from the following files:
- include/llvm/MC/MCRegisterInfo.h
- lib/MC/MCRegisterInfo.cpp