class CalleeSavedInfo
Declaration
class CalleeSavedInfo { /* full declaration omitted */ };
Description
The CalleeSavedInfo class tracks the information need to locate where a callee saved register is in the current frame. Callee saved reg can also be saved to a different register rather than on the stack by setting DstReg instead of FrameIdx.
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:33
Member Variables
- private llvm::Register Reg
- private anonymous struct / union
- private bool Restored = true
- Flag indicating whether the register is actually restored in the epilog. In most cases, if a register is saved, it is also restored. There are some situations, though, when this is not the case. For example, the LR register on ARM is usually saved, but on exit from the function its saved value may be loaded directly into PC. Since liveness tracking of physical registers treats callee-saved registers are live outside of the function, LR would be treated as live-on-exit, even though in these scenarios it is not. This flag is added to indicate that the saved register described by this object is not restored in the epilog. The long-term solution is to model the liveness of callee-saved registers by implicit uses on the return instructions, however, the required changes in the ARM backend would be quite extensive.
- private bool SpilledToReg = false
- Flag indicating whether the register is spilled to stack or another register.
Method Overview
- public CalleeSavedInfo(unsigned int R, int FI = 0)
- public unsigned int getDstReg() const
- public int getFrameIdx() const
- public llvm::Register getReg() const
- public bool isRestored() const
- public bool isSpilledToReg() const
- public void setDstReg(llvm::Register SpillReg)
- public void setFrameIdx(int FI)
- public void setRestored(bool R)
Methods
¶CalleeSavedInfo(unsigned int R, int FI = 0)
CalleeSavedInfo(unsigned int R, int FI = 0)
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:57
Parameters
- unsigned int R
- int FI = 0
¶unsigned int getDstReg() const
unsigned int getDstReg() const
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:62
¶int getFrameIdx() const
int getFrameIdx() const
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:61
¶llvm::Register getReg() const
llvm::Register getReg() const
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:60
¶bool isRestored() const
bool isRestored() const
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:71
¶bool isSpilledToReg() const
bool isSpilledToReg() const
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:73
¶void setDstReg(llvm::Register SpillReg)
void setDstReg(llvm::Register SpillReg)
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:67
Parameters
- llvm::Register SpillReg
¶void setFrameIdx(int FI)
void setFrameIdx(int FI)
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:63
Parameters
- int FI
¶void setRestored(bool R)
void setRestored(bool R)
Declared at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:72
Parameters
- bool R