LLVM 22.0.0git
|
#include "llvm/CodeGen/VirtRegMap.h"
Public Member Functions | |
VirtRegMap () | |
VirtRegMap (const VirtRegMap &)=delete | |
VirtRegMap & | operator= (const VirtRegMap &)=delete |
VirtRegMap (VirtRegMap &&)=default | |
LLVM_ABI void | init (MachineFunction &MF) |
MachineFunction & | getMachineFunction () const |
MachineRegisterInfo & | getRegInfo () const |
const TargetRegisterInfo & | getTargetRegInfo () const |
LLVM_ABI void | grow () |
bool | hasPhys (Register virtReg) const |
returns true if the specified virtual register is mapped to a physical register | |
MCRegister | getPhys (Register virtReg) const |
returns the physical register mapped to the specified virtual register | |
LLVM_ABI void | assignVirt2Phys (Register virtReg, MCRegister physReg) |
creates a mapping for the specified virtual register to the specified physical register | |
bool | isShapeMapEmpty () const |
bool | hasShape (Register virtReg) const |
ShapeT | getShape (Register virtReg) const |
void | assignVirt2Shape (Register virtReg, ShapeT shape) |
void | clearVirt (Register virtReg) |
clears the specified virtual register's, physical register mapping | |
void | clearAllVirt () |
clears all virtual to physical register mappings | |
LLVM_ABI bool | hasPreferredPhys (Register VirtReg) const |
returns true if VirtReg is assigned to its preferred physreg. | |
LLVM_ABI bool | hasKnownPreference (Register VirtReg) const |
returns true if VirtReg has a known preferred register. | |
void | setIsSplitFromReg (Register virtReg, Register SReg) |
records virtReg is a split live interval from SReg. | |
Register | getPreSplitReg (Register virtReg) const |
returns the live interval virtReg is split from. | |
Register | getOriginal (Register VirtReg) const |
getOriginal - Return the original virtual register that VirtReg descends from through splitting. | |
bool | isAssignedReg (Register virtReg) const |
returns true if the specified virtual register is not mapped to a stack slot or rematerialized. | |
int | getStackSlot (Register virtReg) const |
returns the stack slot mapped to the specified virtual register | |
LLVM_ABI int | assignVirt2StackSlot (Register virtReg) |
create a mapping for the specifed virtual register to the next available stack slot | |
LLVM_ABI void | assignVirt2StackSlot (Register virtReg, int SS) |
create a mapping for the specified virtual register to the specified stack slot | |
LLVM_ABI void | print (raw_ostream &OS, const Module *M=nullptr) const |
LLVM_ABI void | dump () const |
Static Public Attributes | |
static constexpr int | NO_STACK_SLOT = INT_MAX |
Definition at line 35 of file VirtRegMap.h.
|
inline |
Definition at line 68 of file VirtRegMap.h.
References NO_STACK_SLOT.
Referenced by operator=(), VirtRegMap(), and VirtRegMap().
|
delete |
References VirtRegMap().
|
default |
References VirtRegMap().
void VirtRegMap::assignVirt2Phys | ( | Register | virtReg, |
MCRegister | physReg ) |
creates a mapping for the specified virtual register to the specified physical register
Definition at line 86 of file VirtRegMap.cpp.
References assert(), getRegInfo(), llvm::MCRegister::isPhysical(), and llvm::Register::isVirtual().
Definition at line 111 of file VirtRegMap.h.
Referenced by getTileShape().
int VirtRegMap::assignVirt2StackSlot | ( | Register | virtReg | ) |
create a mapping for the specifed virtual register to the next available stack slot
Definition at line 128 of file VirtRegMap.cpp.
References assert(), llvm::Register::isVirtual(), and NO_STACK_SLOT.
void VirtRegMap::assignVirt2StackSlot | ( | Register | virtReg, |
int | SS ) |
create a mapping for the specified virtual register to the specified stack slot
Definition at line 136 of file VirtRegMap.cpp.
References assert(), llvm::Register::isVirtual(), and NO_STACK_SLOT.
|
inline |
clears all virtual to physical register mappings
Definition at line 125 of file VirtRegMap.h.
References grow().
|
inline |
clears the specified virtual register's, physical register mapping
Definition at line 117 of file VirtRegMap.h.
References assert(), and llvm::Register::isVirtual().
LLVM_DUMP_METHOD void VirtRegMap::dump | ( | ) | const |
Definition at line 168 of file VirtRegMap.cpp.
References llvm::dbgs(), LLVM_DUMP_METHOD, and print().
|
inline |
Definition at line 75 of file VirtRegMap.h.
References assert().
Referenced by llvm::AllocationOrder::create(), and llvm::RegAllocBase::init().
getOriginal - Return the original virtual register that VirtReg descends from through splitting.
A register that was not created by splitting is its own original. This operation is idempotent.
Definition at line 155 of file VirtRegMap.h.
References getPreSplitReg().
|
inline |
returns the physical register mapped to the specified virtual register
Definition at line 91 of file VirtRegMap.h.
References assert(), and llvm::Register::isVirtual().
Referenced by llvm::LiveIntervals::addKillFlags(), assignedRegPartiallyOverlaps(), collectVirtRegShapes(), llvm::LiveDebugVariables::LDVImpl::emitDebugValues(), llvm::SystemZInstrInfo::foldMemoryOperandImpl(), getRC32(), llvm::AArch64RegisterInfo::getRegAllocationHints(), llvm::ARMBaseRegisterInfo::getRegAllocationHints(), llvm::PPCRegisterInfo::getRegAllocationHints(), llvm::RISCVRegisterInfo::getRegAllocationHints(), llvm::SIRegisterInfo::getRegAllocationHints(), llvm::SystemZRegisterInfo::getRegAllocationHints(), llvm::TargetRegisterInfo::getRegAllocationHints(), llvm::X86RegisterInfo::getRegAllocationHints(), hasPhys(), and hasPreferredPhys().
returns the live interval virtReg is split from.
Definition at line 147 of file VirtRegMap.h.
Referenced by getOriginal().
|
inline |
Definition at line 80 of file VirtRegMap.h.
Referenced by assignVirt2Phys(), and llvm::RegAllocBase::init().
Definition at line 106 of file VirtRegMap.h.
References assert(), and llvm::Register::isVirtual().
Referenced by collectVirtRegShapes(), getTileShape(), and setIsSplitFromReg().
|
inline |
returns the stack slot mapped to the specified virtual register
Definition at line 172 of file VirtRegMap.h.
References assert(), and llvm::Register::isVirtual().
Referenced by llvm::LiveDebugVariables::LDVImpl::emitDebugValues(), and isAssignedReg().
|
inline |
Definition at line 81 of file VirtRegMap.h.
Referenced by llvm::AllocationOrder::create(), and llvm::RegAllocBase::init().
void VirtRegMap::grow | ( | ) |
Definition at line 79 of file VirtRegMap.cpp.
Referenced by clearAllVirt().
returns true if VirtReg has a known preferred register.
This returns false if VirtReg has a preference that is a virtual register that hasn't been assigned yet.
Definition at line 119 of file VirtRegMap.cpp.
References hasPhys().
returns true if the specified virtual register is mapped to a physical register
Definition at line 87 of file VirtRegMap.h.
References getPhys(), and llvm::MCRegister::isValid().
Referenced by llvm::LiveDebugVariables::LDVImpl::emitDebugValues(), getRC32(), llvm::AArch64RegisterInfo::getRegAllocationHints(), llvm::ARMBaseRegisterInfo::getRegAllocationHints(), llvm::PPCRegisterInfo::getRegAllocationHints(), llvm::SIRegisterInfo::getRegAllocationHints(), and hasKnownPreference().
returns true if VirtReg is assigned to its preferred physreg.
Definition at line 110 of file VirtRegMap.cpp.
Definition at line 102 of file VirtRegMap.h.
Referenced by getTileShape(), and setIsSplitFromReg().
LLVM_ABI void llvm::VirtRegMap::init | ( | MachineFunction & | MF | ) |
References LLVM_ABI.
Referenced by llvm::LiveRegMatrix::init(), and llvm::VirtRegMapAnalysis::run().
returns true if the specified virtual register is not mapped to a stack slot or rematerialized.
Definition at line 162 of file VirtRegMap.h.
References getStackSlot(), and NO_STACK_SLOT.
Referenced by llvm::LiveDebugVariables::LDVImpl::emitDebugValues().
|
inline |
Definition at line 100 of file VirtRegMap.h.
|
delete |
References VirtRegMap().
void VirtRegMap::print | ( | raw_ostream & | OS, |
const Module * | M = nullptr ) const |
Definition at line 146 of file VirtRegMap.cpp.
References llvm::Register::index2VirtReg(), NO_STACK_SLOT, and llvm::printReg().
Referenced by dump(), and llvm::operator<<().
records virtReg is a split live interval from SReg.
Definition at line 139 of file VirtRegMap.h.
References getShape(), and hasShape().
|
staticconstexpr |
Definition at line 66 of file VirtRegMap.h.
Referenced by assignVirt2StackSlot(), assignVirt2StackSlot(), llvm::LiveDebugVariables::LDVImpl::emitDebugValues(), isAssignedReg(), print(), and VirtRegMap().