61 if (CFSize >= ((1 << 8) - 1) * 4 / 2)
89 unsigned Amount = TII.getFrameSize(Old);
98 if (Opc == ARM::ADJCALLSTACKDOWN || Opc == ARM::tADJCALLSTACKDOWN) {
101 assert(Opc == ARM::ADJCALLSTACKUP || Opc == ARM::tADJCALLSTACKUP);
123 assert(NumBytes >= ArgRegsSaveSize &&
124 "ArgRegsSaveSize is included in NumBytes");
136 NumBytes = (NumBytes + 3) & ~3;
141 unsigned GPRCS1Size = 0, GPRCS2Size = 0, DPRCSSize = 0;
142 int FramePtrSpillFI = 0;
144 if (ArgRegsSaveSize) {
145 emitSPUpdate(MBB, MBBI, TII, dl, *RegInfo, -ArgRegsSaveSize,
147 CFAOffset -= ArgRegsSaveSize;
150 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION))
151 .addCFIIndex(CFIIndex)
156 if (NumBytes - ArgRegsSaveSize != 0) {
157 emitSPUpdate(MBB, MBBI, TII, dl, *RegInfo, -(NumBytes - ArgRegsSaveSize),
159 CFAOffset -= NumBytes - ArgRegsSaveSize;
162 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION))
163 .addCFIIndex(CFIIndex)
169 for (
unsigned i = 0, e = CSI.size(); i != e; ++i) {
170 unsigned Reg = CSI[i].getReg();
171 int FI = CSI[i].getFrameIdx();
188 FramePtrSpillFI = FI;
196 if (MBBI != MBB.
end() && MBBI->getOpcode() == ARM::tPUSH) {
201 unsigned DPRCSOffset = NumBytes - ArgRegsSaveSize - (GPRCS1Size + GPRCS2Size + DPRCSSize);
202 unsigned GPRCS2Offset = DPRCSOffset + DPRCSSize;
203 unsigned GPRCS1Offset = GPRCS2Offset + GPRCS2Size;
204 bool HasFP =
hasFP(MF);
211 NumBytes = DPRCSOffset;
213 int FramePtrOffsetInBlock = 0;
214 unsigned adjustedGPRCS1Size = GPRCS1Size;
215 if (GPRCS1Size > 0 && GPRCS2Size == 0 &&
217 FramePtrOffsetInBlock = NumBytes;
218 adjustedGPRCS1Size += NumBytes;
222 if (adjustedGPRCS1Size) {
223 CFAOffset -= adjustedGPRCS1Size;
226 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION))
227 .addCFIIndex(CFIIndex)
230 for (std::vector<CalleeSavedInfo>::const_iterator
I = CSI.begin(),
231 E = CSI.end();
I !=
E; ++
I) {
232 unsigned Reg =
I->getReg();
233 int FI =
I->getFrameIdx();
254 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION))
255 .addCFIIndex(CFIIndex)
263 FramePtrOffsetInBlock +=
265 BuildMI(MBB, MBBI, dl, TII.get(ARM::tADDrSPi), FramePtr)
267 .
addImm(FramePtrOffsetInBlock / 4)
270 if(FramePtrOffsetInBlock) {
271 CFAOffset += FramePtrOffsetInBlock;
274 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION))
275 .addCFIIndex(CFIIndex)
281 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION))
282 .addCFIIndex(CFIIndex)
298 while (MBBI != MBB.
end() && MBBI->getOpcode() == ARM::tMOVr)
300 if (MBBI != MBB.
end() && MBBI->getOpcode() == ARM::tPUSH) {
312 for (
auto &
I : CSI) {
313 unsigned Reg =
I.getReg();
314 int FI =
I.getFrameIdx();
323 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION))
324 .addCFIIndex(CFIIndex)
338 CFAOffset -= NumBytes;
341 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION))
342 .addCFIIndex(CFIIndex)
355 if (RegInfo->needsStackRealignment(MF)) {
379 BuildMI(MBB, MBBI, dl, TII.get(ARM::tMOVr), ARM::SP)
391 BuildMI(MBB, MBBI, dl, TII.get(ARM::tMOVr), BasePtr)
412 }
else if (MI.
getOpcode() == ARM::tMOVr) {
415 return ((ARM::tGPRRegClass.
contains(Src) || Src == ARM::LR) &&
434 assert((
unsigned)NumBytes >= ArgRegsSaveSize &&
435 "ArgRegsSaveSize is included in NumBytes");
436 const MCPhysReg *CSRegs = RegInfo->getCalleeSavedRegs(&MF);
437 unsigned FramePtr = RegInfo->getFrameRegister(MF);
440 if (NumBytes - ArgRegsSaveSize != 0)
441 emitSPUpdate(MBB, MBBI, TII, dl, *RegInfo, NumBytes - ArgRegsSaveSize);
444 if (MBBI != MBB.
begin()) {
465 "No scratch register to restore SP from FP!");
468 BuildMI(MBB, MBBI, dl, TII.get(ARM::tMOVr), ARM::SP)
472 BuildMI(MBB, MBBI, dl, TII.get(ARM::tMOVr), ARM::SP)
476 if (MBBI != MBB.
end() && MBBI->getOpcode() == ARM::tBX_RET &&
477 &MBB.
front() != &*MBBI && std::prev(MBBI)->getOpcode() == ARM::tPOP) {
486 if (needPopSpecialFixUp(MF)) {
487 bool Done = emitPopSpecialFixUp(MBB,
true);
489 assert(Done &&
"Emission of the special fixup failed!?");
494 if (!needPopSpecialFixUp(*MBB.
getParent()))
498 return emitPopSpecialFixUp(*TmpMBB,
false);
501 bool Thumb1FrameLowering::needPopSpecialFixUp(
const MachineFunction &MF)
const {
509 if (CSI.getReg() == ARM::LR)
552 bool CanRestoreDirectly =
STI.
hasV5TOps() && !ArgRegsSaveSize;
553 if (CanRestoreDirectly) {
554 if (MBBI != MBB.
end() && MBBI->getOpcode() != ARM::tB)
555 CanRestoreDirectly = (MBBI->getOpcode() == ARM::tBX_RET ||
556 MBBI->getOpcode() == ARM::tPOP_RET);
558 auto MBBI_prev = MBBI;
560 assert(MBBI_prev->getOpcode() == ARM::tPOP);
565 CanRestoreDirectly =
false;
569 if (CanRestoreDirectly) {
570 if (!DoIt || MBBI->getOpcode() == ARM::tPOP_RET)
573 BuildMI(MBB, MBBI, MBBI->getDebugLoc(), TII.
get(ARM::tPOP_RET))
576 for (
auto MO: MBBI->operands())
577 if (MO.isReg() && (MO.isImplicit() || MO.isDef()))
595 for (
unsigned i = 0; CSRegs[i]; ++i)
596 UsedRegs.
addReg(CSRegs[i]);
599 if (MBBI != MBB.
end()) {
600 dl = MBBI->getDebugLoc();
601 auto InstUpToMBBI = MBB.
end();
602 while (InstUpToMBBI != MBBI)
611 unsigned TemporaryReg = 0;
618 PopFriendly.
set(ARM::R7);
620 assert(PopFriendly.
any() &&
"No allocatable pop-friendly register?!");
625 GPRsNoLRSP |= PopFriendly;
626 GPRsNoLRSP.
reset(ARM::LR);
627 GPRsNoLRSP.
reset(ARM::SP);
628 GPRsNoLRSP.
reset(ARM::PC);
634 bool UseLDRSP =
false;
635 if (!PopReg && MBBI != MBB.
begin()) {
636 auto PrevMBBI = MBBI;
638 if (PrevMBBI->getOpcode() == ARM::tPOP) {
648 if (!DoIt && !PopReg && !TemporaryReg)
651 assert((PopReg || TemporaryReg) &&
"Cannot get LR");
654 assert(PopReg &&
"Do not know how to get LR");
659 .
addImm(MBBI->getNumExplicitOperands() - 2)
669 emitSPUpdate(MBB, MBBI, TII, dl, *RegInfo, ArgRegsSaveSize + 4);
674 assert(!PopReg &&
"Unnecessary MOV is about to be inserted");
682 if (MBBI != MBB.
end() && MBBI->getOpcode() == ARM::tPOP_RET) {
686 BuildMI(MBB, MBBI, MBBI->getDebugLoc(), TII.
get(ARM::tPOP))
689 for (
auto MO: MBBI->operands())
690 if (MO.isReg() && (MO.isImplicit() || MO.isDef()) &&
691 MO.getReg() != ARM::PC) {
693 if (!MO.isImplicit())
705 assert(PopReg &&
"Do not know how to get LR");
710 emitSPUpdate(MBB, MBBI, TII, dl, *RegInfo, ArgRegsSaveSize);
733 const unsigned *OrderEnd) {
734 while (CurrentReg != OrderEnd && !EnabledRegs[*CurrentReg])
742 const std::vector<CalleeSavedInfo> &CSI,
758 for (
unsigned i = CSI.size(); i != 0; --i) {
759 unsigned Reg = CSI[i-1].getReg();
761 if (ARM::tGPRRegClass.
contains(Reg) || Reg == ARM::LR) {
762 LoRegsToSave[
Reg] =
true;
763 }
else if (ARM::hGPRRegClass.
contains(Reg) && Reg != ARM::LR) {
764 HiRegsToSave[
Reg] =
true;
769 if ((ARM::tGPRRegClass.
contains(Reg) || Reg == ARM::LR) &&
772 CopyRegs[
Reg] =
true;
776 for (
unsigned ArgReg : {ARM::R0, ARM::R1,
ARM::R2, ARM::R3})
778 CopyRegs[ArgReg] =
true;
782 if (!LoRegsToSave.none()) {
786 if (LoRegsToSave[
Reg]) {
806 static const unsigned AllCopyRegs[] = {ARM::LR, ARM::R7,
ARM::R6,
809 static const unsigned AllHighRegs[] = {ARM::R11, ARM::R10, ARM::R9, ARM::R8};
811 const unsigned *AllCopyRegsEnd =
std::end(AllCopyRegs);
812 const unsigned *AllHighRegsEnd =
std::end(AllHighRegs);
816 std::begin(AllHighRegs), HiRegsToSave, AllHighRegsEnd);
818 while (HiRegToSave != AllHighRegsEnd) {
820 const unsigned *CopyReg =
828 while (HiRegToSave != AllHighRegsEnd && CopyReg != AllCopyRegsEnd) {
829 if (HiRegsToSave[*HiRegToSave]) {
830 bool isKill = !MRI.
isLiveIn(*HiRegToSave);
841 RegsToPush.push_back(*CopyReg);
863 std::vector<CalleeSavedInfo> &CSI,
883 unsigned Reg =
I.getReg();
885 if (ARM::tGPRRegClass.
contains(Reg) || Reg == ARM::LR) {
886 LoRegsToRestore[
Reg] =
true;
887 }
else if (ARM::hGPRRegClass.
contains(Reg) && Reg != ARM::LR) {
888 HiRegsToRestore[
Reg] =
true;
895 if ((ARM::tGPRRegClass.
contains(Reg)) &&
897 CopyRegs[
Reg] =
true;
904 CopyRegs[ARM::R0] =
true;
905 CopyRegs[ARM::R1] =
true;
907 CopyRegs[ARM::R3] =
true;
910 CopyRegs[
Op.getReg()] =
false;
914 static const unsigned AllCopyRegs[] = {ARM::R0, ARM::R1,
ARM::R2, ARM::R3,
916 static const unsigned AllHighRegs[] = {ARM::R8, ARM::R9, ARM::R10, ARM::R11};
918 const unsigned *AllCopyRegsEnd =
std::end(AllCopyRegs);
919 const unsigned *AllHighRegsEnd =
std::end(AllHighRegs);
923 HiRegsToRestore, AllHighRegsEnd);
925 while (HiRegToRestore != AllHighRegsEnd) {
935 while (HiRegToRestore != AllHighRegsEnd && CopyReg != AllCopyRegsEnd) {
954 bool NeedsPop =
false;
955 for (
unsigned i = CSI.size(); i != 0; --i) {
960 if (!(ARM::tGPRRegClass.
contains(Reg) || Reg == ARM::LR))
963 if (Reg == ARM::LR) {
966 MI->getOpcode() == ARM::TCRETURNdi ||
967 MI->getOpcode() == ARM::TCRETURNri)
984 (*MIB).setDesc(TII.get(ARM::tPOP_RET));
BitVector getAllocatableSet(const MachineFunction &MF, const TargetRegisterClass *RC=nullptr) const
Returns a bitset indexed by register number indicating if a register is allocatable or not...
const MachineInstrBuilder & add(const MachineOperand &MO) const
const_iterator end(StringRef path)
Get end iterator over path.
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override
DILocation * get() const
Get the underlying DILocation.
const_iterator begin(StringRef path, Style style=Style::native)
Get begin iterator over path.
This class represents lattice values for constants.
MachineFunctionProperties & reset(Property P)
virtual const TargetRegisterInfo * getRegisterInfo() const
getRegisterInfo - If register information is available, return it.
const MachineFunctionProperties & getProperties() const
Get the function properties.
bool hasFP(const MachineFunction &MF) const override
hasFP - Return true if the specified function should have a dedicated frame pointer register...
const DebugLoc & getDebugLoc() const
Returns the debug location id of this MachineInstr.
iterator getFirstTerminator()
Returns an iterator to the first terminator instruction of this basic block.
unsigned getReg() const
getReg - Returns the register number.
static MCCFIInstruction createOffset(MCSymbol *L, unsigned Register, int Offset)
.cfi_offset Previous value of Register is saved at offset Offset from CFA.
bool test(unsigned Idx) const
bool restoreCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, std::vector< CalleeSavedInfo > &CSI, const TargetRegisterInfo *TRI) const override
restoreCalleeSavedRegisters - Issues instruction(s) to restore all callee saved registers and returns...
unsigned const TargetRegisterInfo * TRI
MachineModuleInfo & getMMI() const
uint64_t alignTo(uint64_t Value, uint64_t Align, uint64_t Skew=0)
Returns the next integer (mod 2**64) that is greater than or equal to Value and is a multiple of Alig...
bool contains(MCPhysReg Reg) const
Returns true if register Reg is contained in the set.
bool tryFoldSPUpdateIntoPushPop(const ARMSubtarget &Subtarget, MachineFunction &MF, MachineInstr *MI, unsigned NumBytes)
Tries to add registers to the reglist of a given base-updating push/pop instruction to adjust the sta...
void setGPRCalleeSavedArea2Offset(unsigned o)
static MCCFIInstruction createDefCfaOffset(MCSymbol *L, int Offset)
.cfi_def_cfa_offset modifies a rule for computing CFA.
MachineBasicBlock::iterator eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator MI) const override
This method is called during prolog/epilog code insertion to eliminate call frame setup and destroy p...
const TargetRegisterClass * getRegClass(unsigned i) const
Returns the register class associated with the enumeration value.
return AArch64::GPR64RegClass contains(Reg)
const ARMBaseInstrInfo * getInstrInfo() const override
instr_iterator erase(instr_iterator I)
Remove an instruction from the instruction list and delete it.
static void emitSPUpdate(MachineBasicBlock &MBB, MachineBasicBlock::iterator &MBBI, const TargetInstrInfo &TII, const DebugLoc &dl, const ThumbRegisterInfo &MRI, int NumBytes, unsigned MIFlags=MachineInstr::NoFlags)
const HexagonInstrInfo * TII
int find_first() const
find_first - Returns the index of the first set bit, -1 if none of the bits are set.
Thumb1FrameLowering(const ARMSubtarget &sti)
unsigned getFrameRegister(const MachineFunction &MF) const override
MachineBasicBlock iterator that automatically skips over MIs that are inside bundles (i...
int64_t getObjectOffset(int ObjectIdx) const
Return the assigned stack offset of the specified object from the incoming stack pointer.
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted...
bool hasVarSizedObjects() const
This method may be called any time after instruction selection is complete to determine if the stack ...
unsigned getOpcode() const
Returns the opcode of this MachineInstr.
int getDwarfRegNum(unsigned RegNum, bool isEH) const
Map a target register to an equivalent dwarf register number.
void setDPRCalleeSavedAreaOffset(unsigned o)
LLVM_NODISCARD unsigned addFrameInst(const MCCFIInstruction &Inst)
unsigned getArgRegsSaveSize() const
void setFramePtrSpillOffset(unsigned o)
auto reverse(ContainerTy &&C, typename std::enable_if< has_rbegin< ContainerTy >::value >::type *=nullptr) -> decltype(make_range(C.rbegin(), C.rend()))
static std::array< MachineOperand, 2 > predOps(ARMCC::CondCodes Pred, unsigned PredReg=0)
Get the operands corresponding to the given Pred value.
unsigned getDPRCalleeSavedAreaSize() const
bool splitFramePushPop(const MachineFunction &MF) const
Returns true if the frame setup is split into two separate pushes (first r0-r7,lr then r8-r11)...
void setShouldRestoreSPFromFP(bool s)
bool shouldRestoreSPFromFP() const
instr_iterator insert(instr_iterator I, MachineInstr *M)
Insert MI into the instruction list before I, possibly inside a bundle.
virtual const MCPhysReg * getCalleeSavedRegs(const MachineFunction *MF) const =0
Return a null-terminated list of all of the callee-saved registers on this target.
Analysis containing CSE Info
bool useR7AsFramePointer() const
unsigned getKillRegState(bool B)
uint16_t MCPhysReg
An unsigned integer type large enough to represent all physical registers, but not necessarily virtua...
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
TargetInstrInfo - Interface to description of machine instruction set.
unsigned getDefRegState(bool B)
MachineInstrBuilder BuildMI(MachineFunction &MF, const DebugLoc &DL, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.
static bool isCalleeSavedRegister(unsigned Reg, const MCPhysReg *CSRegs)
void addLiveIn(MCPhysReg PhysReg, LaneBitmask LaneMask=LaneBitmask::getAll())
Adds the specified register as a live in.
unsigned const MachineRegisterInfo * MRI
std::size_t countTrailingZeros(T Val, ZeroBehavior ZB=ZB_Width)
Count number of 0's from the least significant bit to the most stopping at the first 1...
static MCCFIInstruction createDefCfa(MCSymbol *L, unsigned Register, int Offset)
.cfi_def_cfa defines a rule for computing CFA as: take address from Register and add Offset to it...
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
static MCCFIInstruction createDefCfaRegister(MCSymbol *L, unsigned Register)
.cfi_def_cfa_register modifies a rule for computing CFA.
MachineFrameInfo & getFrameInfo()
getFrameInfo - Return the frame info object for the current function.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
void setStackSize(uint64_t Size)
Set the size of the stack.
void addLiveOuts(const MachineBasicBlock &MBB)
Adds all live-out registers of basic block MBB.
bool any() const
any - Returns true if any bit is set.
unsigned getGPRCalleeSavedArea1Size() const
bool canUseAsEpilogue(const MachineBasicBlock &MBB) const override
Check whether or not the given MBB can be used as a epilogue for the target.
void stepBackward(const MachineInstr &MI)
Simulates liveness when stepping backwards over an instruction(bundle).
unsigned getMaxAlignment() const
Return the alignment in bytes that this function must be aligned to, which is greater than the defaul...
Ty * getInfo()
getInfo - Keep track of various per-function pieces of information for backends that would like to do...
bool hasBasePointer(const MachineFunction &MF) const
void setGPRCalleeSavedArea2Size(unsigned s)
bool hasReservedCallFrame(const MachineFunction &MF) const override
hasReservedCallFrame - Under normal circumstances, when a frame pointer is not required, we reserve argument space for call sites in the function immediately on entry to the current function.
succ_iterator succ_begin()
void DeleteMachineInstr(MachineInstr *MI)
DeleteMachineInstr - Delete the given MachineInstr.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
This file implements the LivePhysRegs utility for tracking liveness of physical registers.
unsigned getStackAlignment() const
getStackAlignment - This method returns the number of bytes to which the stack pointer must be aligne...
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
void setGPRCalleeSavedArea1Size(unsigned s)
void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override
emitProlog/emitEpilog - These methods insert prolog and epilog code into the function.
unsigned getMaxCallFrameSize() const
Return the maximum size of a call frame that must be allocated for an outgoing function call...
static bool isCSRestore(MachineInstr &MI, const MCPhysReg *CSRegs)
void setOffsetAdjustment(int Adj)
Set the correction for frame offsets.
MachineInstr * getInstr() const
If conversion operators fail, use this method to get the MachineInstr explicitly. ...
unsigned getBaseRegister() const
The CalleeSavedInfo class tracks the information need to locate where a callee saved register is in t...
std::bitset< ARM::NUM_TARGET_REGS > ARMRegSet
const MachineInstrBuilder & copyImplicitOps(const MachineInstr &OtherMI) const
Copy all the implicit operands from OtherMI onto this one.
unsigned succ_size() const
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
bool isLiveIn(unsigned Reg) const
Representation of each machine instruction.
const MachineFunction * getParent() const
Return the MachineFunction containing this basic block.
const MachineInstrBuilder & addImm(int64_t Val) const
Add a new immediate operand.
unsigned getGPRCalleeSavedArea2Size() const
void setGPRCalleeSavedArea1Offset(unsigned o)
MachineRegisterInfo & getRegInfo()
getRegInfo - Return information about the registers currently in use.
A set of physical registers with utility functions to track liveness when walking backward/forward th...
const MachineInstrBuilder & setMIFlags(unsigned Flags) const
const std::vector< CalleeSavedInfo > & getCalleeSavedInfo() const
Returns a reference to call saved info vector for the current function.
ARMFunctionInfo - This class is derived from MachineFunctionInfo and contains private ARM-specific in...
const MCInstrDesc & get(unsigned Opcode) const
Return the machine instruction descriptor that corresponds to the specified instruction opcode...
const ARMBaseRegisterInfo * getRegisterInfo() const override
static const unsigned * findNextOrderedReg(const unsigned *CurrentReg, const ARMRegSet &EnabledRegs, const unsigned *OrderEnd)
bool isFI() const
isFI - Tests if this is a MO_FrameIndex operand.
void emitThumbRegPlusImmediate(MachineBasicBlock &MBB, MachineBasicBlock::iterator &MBBI, const DebugLoc &dl, unsigned DestReg, unsigned BaseReg, int NumBytes, const TargetInstrInfo &TII, const ARMBaseRegisterInfo &MRI, unsigned MIFlags=0)
emitThumbRegPlusImmediate - Emits a series of instructions to materialize a destreg = basereg + immed...
void setDPRCalleeSavedAreaSize(unsigned s)
bool hasStackFrame() const
int getOffsetAdjustment() const
Return the correction for frame offsets.
const MachineInstrBuilder & addReg(unsigned RegNo, unsigned flags=0, unsigned SubReg=0) const
Add a new virtual register operand.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
iterator_range< const_set_bits_iterator > set_bits() const
unsigned getFramePtrSpillOffset() const
void addReg(MCPhysReg Reg)
Adds a physical register and all its sub-registers to the set.
static void findTemporariesForLR(const BitVector &GPRsNoLRSP, const BitVector &PopFriendly, const LivePhysRegs &UsedRegs, unsigned &PopReg, unsigned &TmpReg)
BitVector getPristineRegs(const MachineFunction &MF) const
Return a set of physical registers that are pristine.
bool spillCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const std::vector< CalleeSavedInfo > &CSI, const TargetRegisterInfo *TRI) const override
spillCalleeSavedRegisters - Issues instruction(s) to spill all callee saved registers and returns tru...
const MachineOperand & getOperand(unsigned i) const
uint64_t getStackSize() const
Return the number of bytes that must be allocated to hold all of the fixed size frame objects...
bool isReserved(unsigned PhysReg) const
isReserved - Returns true when PhysReg is a reserved register.
This class contains meta information specific to a module.