LLVM 22.0.0git
|
RAII helper class for scavenging or spilling a register. More...
Public Member Functions | |
ScopedScavengeOrSpill (const ScopedScavengeOrSpill &)=delete | |
ScopedScavengeOrSpill (ScopedScavengeOrSpill &&)=delete | |
ScopedScavengeOrSpill (MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, Register SpillCandidate, const TargetRegisterClass &RC, LiveRegUnits const &UsedRegs, BitVector const &AllocatableRegs, std::optional< int > *MaybeSpillFI, Register PreferredReg=AArch64::NoRegister) | |
bool | hasSpilled () const |
Register | freeRegister () const |
Returns the free register (found from scavenging or spilling a register). | |
Register | operator* () const |
~ScopedScavengeOrSpill () | |
RAII helper class for scavenging or spilling a register.
On construction attempts to find a free register of class RC
(given UsedRegs
and AllocatableRegs
), if no register can be found spills SpillCandidate
to MaybeSpillFI
to free a register. The free'd register is returned via the FreeReg
output parameter. On destruction, if there is a spill, its previous value is reloaded. The spilling and scavenging is only valid at the insertion point MBBI
, this class should not be used in places that create or manipulate basic blocks, moving the expected insertion point.
Definition at line 4461 of file AArch64FrameLowering.cpp.
|
delete |
|
delete |
|
inline |
Definition at line 4465 of file AArch64FrameLowering.cpp.
References assert(), llvm::MachineFrameInfo::CreateSpillStackObject(), llvm::MachineFunction::getFrameInfo(), MBB, MBBI, llvm::HexagonInstrInfo::storeRegToStackSlot(), TII, TRI, and tryScavengeRegister().
|
inline |
Definition at line 4498 of file AArch64FrameLowering.cpp.
References llvm::HexagonInstrInfo::loadRegFromStackSlot(), MBB, MBBI, TII, and TRI.
|
inline |
Returns the free register (found from scavenging or spilling a register).
Definition at line 4494 of file AArch64FrameLowering.cpp.
|
inline |
Definition at line 4491 of file AArch64FrameLowering.cpp.
Referenced by expandFillPPRFromZPRSlotPseudo().
|
inline |
Definition at line 4496 of file AArch64FrameLowering.cpp.