LLVM API Documentation
#include <VirtRegMap.h>
Collaboration diagram for llvm::VirtRegMap:
Public Types | |
typedef std::multimap< MachineInstr *, std::pair< unsigned, ModRef > > | MI2VirtMapTy |
enum | ModRef { isRef = 1, isMod = 2, isModRef = 3 } |
Public Member Functions | |
VirtRegMap (MachineFunction &mf) | |
void | grow () |
bool | hasPhys (unsigned virtReg) const |
returns true if the specified virtual register is mapped to a physical register | |
unsigned | getPhys (unsigned virtReg) const |
returns the physical register mapped to the specified virtual register | |
void | assignVirt2Phys (unsigned virtReg, unsigned physReg) |
creates a mapping for the specified virtual register to the specified physical register | |
void | clearVirt (unsigned virtReg) |
clears the specified virtual register's, physical register mapping | |
void | clearAllVirt () |
clears all virtual to physical register mappings | |
bool | hasStackSlot (unsigned virtReg) const |
returns true is the specified virtual register is mapped to a stack slot | |
int | getStackSlot (unsigned virtReg) const |
returns the stack slot mapped to the specified virtual register | |
int | assignVirt2StackSlot (unsigned virtReg) |
create a mapping for the specifed virtual register to the next available stack slot | |
void | assignVirt2StackSlot (unsigned virtReg, int frameIndex) |
create a mapping for the specified virtual register to the specified stack slot | |
void | virtFolded (unsigned VirtReg, MachineInstr *OldMI, unsigned OpNum, MachineInstr *NewMI) |
Updates information about the specified virtual register's value folded into newMI machine instruction. The OpNum argument indicates the operand number of OldMI that is folded. | |
std::pair< MI2VirtMapTy::const_iterator, MI2VirtMapTy::const_iterator > | getFoldedVirts (MachineInstr *MI) const |
returns the virtual registers' values folded in memory operands of this instruction | |
void | print (std::ostream &OS) const |
void | dump () const |
Definition at line 27 of file VirtRegMap.h.
|
Definition at line 31 of file VirtRegMap.h. |
|
Definition at line 29 of file VirtRegMap.h. |
|
Definition at line 61 of file VirtRegMap.h. References grow(). |
|
creates a mapping for the specified virtual register to the specified physical register
Definition at line 83 of file VirtRegMap.h. References llvm::MRegisterInfo::isPhysicalRegister(), and llvm::MRegisterInfo::isVirtualRegister(). |
|
create a mapping for the specified virtual register to the specified stack slot
Definition at line 74 of file VirtRegMap.cpp. References llvm::MRegisterInfo::isVirtualRegister(). |
|
create a mapping for the specifed virtual register to the next available stack slot
Definition at line 62 of file VirtRegMap.cpp. References llvm::MachineFrameInfo::CreateStackObject(), llvm::TargetRegisterClass::getAlignment(), llvm::MachineFunction::getFrameInfo(), llvm::SSARegMap::getRegClass(), llvm::TargetRegisterClass::getSize(), llvm::MachineFunction::getSSARegMap(), llvm::MRegisterInfo::isVirtualRegister(), and NumSpills. Referenced by llvm::LiveIntervals::addIntervalsForSpills(). |
|
clears all virtual to physical register mappings
Definition at line 102 of file VirtRegMap.h. References llvm::DenseMap< T, ToIndexT >::clear(), and grow(). |
|
clears the specified virtual register's, physical register mapping
Definition at line 94 of file VirtRegMap.h. References llvm::MRegisterInfo::isVirtualRegister(). |
|
Definition at line 121 of file VirtRegMap.cpp. References print(). |
|
returns the virtual registers' values folded in memory operands of this instruction
Definition at line 136 of file VirtRegMap.h. |
|
returns the physical register mapped to the specified virtual register
Definition at line 76 of file VirtRegMap.h. References llvm::MRegisterInfo::isVirtualRegister(). Referenced by hasPhys(). |
|
returns the stack slot mapped to the specified virtual register
Definition at line 115 of file VirtRegMap.h. References llvm::MRegisterInfo::isVirtualRegister(). Referenced by hasStackSlot(). |
|
Definition at line 57 of file VirtRegMap.cpp. References llvm::SSARegMap::getLastVirtReg(), llvm::MachineFunction::getSSARegMap(), and llvm::DenseMap< T, ToIndexT >::grow(). Referenced by llvm::LiveIntervals::addIntervalsForSpills(), clearAllVirt(), and VirtRegMap(). |
|
returns true if the specified virtual register is mapped to a physical register
Definition at line 70 of file VirtRegMap.h. References getPhys(). |
|
returns true is the specified virtual register is mapped to a stack slot
Definition at line 109 of file VirtRegMap.h. References getStackSlot(). |
|
Definition at line 103 of file VirtRegMap.cpp. References llvm::MRegisterInfo::FirstVirtualRegister, llvm::SSARegMap::getLastVirtReg(), llvm::MRegisterInfo::getName(), llvm::TargetMachine::getRegisterInfo(), llvm::MachineFunction::getSSARegMap(), and llvm::MachineFunction::getTarget(). Referenced by dump(), and llvm::operator<<(). |
|
Updates information about the specified virtual register's value folded into newMI machine instruction. The OpNum argument indicates the operand number of OldMI that is folded.
Definition at line 81 of file VirtRegMap.cpp. References E, llvm::MachineInstr::getOperand(), I, llvm::MachineOperand::isDef(), isMod, isModRef, isRef, and llvm::MachineOperand::isUse(). Referenced by llvm::LiveIntervals::addIntervalsForSpills(). |