Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
Show First 20 Lines • Show All 441 Lines • ▼ Show 20 Lines | |||||
bool AArch64FrameLowering::shouldCombineCSRLocalStackBump( | bool AArch64FrameLowering::shouldCombineCSRLocalStackBump( | ||||
MachineFunction &MF, unsigned StackBumpBytes) const { | MachineFunction &MF, unsigned StackBumpBytes) const { | ||||
AArch64FunctionInfo *AFI = MF.getInfo<AArch64FunctionInfo>(); | AArch64FunctionInfo *AFI = MF.getInfo<AArch64FunctionInfo>(); | ||||
const MachineFrameInfo &MFI = MF.getFrameInfo(); | const MachineFrameInfo &MFI = MF.getFrameInfo(); | ||||
const AArch64Subtarget &Subtarget = MF.getSubtarget<AArch64Subtarget>(); | const AArch64Subtarget &Subtarget = MF.getSubtarget<AArch64Subtarget>(); | ||||
const AArch64RegisterInfo *RegInfo = Subtarget.getRegisterInfo(); | const AArch64RegisterInfo *RegInfo = Subtarget.getRegisterInfo(); | ||||
if (MF.getFunction().hasOptSize()) | |||||
return false; | |||||
if (AFI->getLocalStackSize() == 0) | if (AFI->getLocalStackSize() == 0) | ||||
return false; | return false; | ||||
// 512 is the maximum immediate for stp/ldp that will be used for | // 512 is the maximum immediate for stp/ldp that will be used for | ||||
// callee-save save/restores | // callee-save save/restores | ||||
if (StackBumpBytes >= 512 || windowsRequiresStackProbe(MF, StackBumpBytes)) | if (StackBumpBytes >= 512 || windowsRequiresStackProbe(MF, StackBumpBytes)) | ||||
return false; | return false; | ||||
▲ Show 20 Lines • Show All 1,950 Lines • Show Last 20 Lines |