LLVM API Documentation
Public Member Functions | |
AvailableSpills (const MRegisterInfo *mri, const TargetInstrInfo *tii) | |
unsigned | getSpillSlotPhysReg (int Slot) const |
const MRegisterInfo * | getRegInfo () const |
void | addAvailable (int Slot, unsigned Reg, bool CanClobber=true) |
bool | canClobberPhysReg (int Slot) const |
void | ClobberPhysReg (unsigned PhysReg) |
void | ModifyStackSlot (int Slot) |
Note that not all physregs are created equal here. In particular, some physregs are reloads that we are allowed to clobber or ignore at any time. Other physregs are values that the register allocated program is using that we cannot CHANGE, but we can read if we like. We keep track of this on a per-stack-slot basis as the low bit in the value of the SpillSlotsAvailable entries. The predicate 'canClobberPhysReg()' checks this bit and addAvailable sets it if.
Definition at line 244 of file VirtRegMap.cpp.
AvailableSpills::AvailableSpills | ( | const MRegisterInfo * | mri, | |
const TargetInstrInfo * | tii | |||
) | [inline] |
Definition at line 260 of file VirtRegMap.cpp.
void AvailableSpills::addAvailable | ( | int | Slot, | |
unsigned | Reg, | |||
bool | CanClobber = true | |||
) | [inline] |
addAvailable - Mark that the specified stack slot is available in the specified physreg. If CanClobber is true, the physreg can be modified at any time without changing the semantics of the program.
Definition at line 278 of file VirtRegMap.cpp.
References DEBUG, llvm::MRegisterInfo::getName(), and MRI.
bool AvailableSpills::canClobberPhysReg | ( | int | Slot | ) | const [inline] |
canClobberPhysReg - Return true if the spiller is allowed to change the value of the specified stackslot register if it desires. The specified stack slot must be available in a physreg for this query to make sense.
Definition at line 293 of file VirtRegMap.cpp.
void AvailableSpills::ClobberPhysReg | ( | unsigned | PhysReg | ) |
ClobberPhysReg - This is called when the specified physreg changes value. We use this to invalidate any info about stuff we thing lives in it and any of its aliases.
Definition at line 328 of file VirtRegMap.cpp.
References llvm::MRegisterInfo::getAliasSet().
const MRegisterInfo* AvailableSpills::getRegInfo | ( | ) | const [inline] |
unsigned AvailableSpills::getSpillSlotPhysReg | ( | int | Slot | ) | const [inline] |
getSpillSlotPhysReg - If the specified stack slot is available in a physical register, return that PhysReg, otherwise return 0.
Definition at line 266 of file VirtRegMap.cpp.
References I.
void AvailableSpills::ModifyStackSlot | ( | int | Slot | ) |
ModifyStackSlot - This method is called when the value in a stack slot changes. This removes information about which register the previous value for this slot lives in (as the previous value is dead now).
Definition at line 337 of file VirtRegMap.cpp.
References Reg.