//=======- ARMFrameLowering.cpp - ARM Frame Information --------*- C++ -*-====////// The LLVM Compiler Infrastructure//// This file is distributed under the University of Illinois Open Source// License. See LICENSE.TXT for details.////===----------------------------------------------------------------------===////// This file contains the ARM implementation of TargetFrameLowering class.////===----------------------------------------------------------------------===//#include"ARMFrameLowering.h"#include"ARMBaseInstrInfo.h"#include"ARMBaseRegisterInfo.h"#include"ARMMachineFunctionInfo.h"#include"MCTargetDesc/ARMAddressingModes.h"#include"llvm/Function.h"#include"llvm/CodeGen/MachineFrameInfo.h"#include"llvm/CodeGen/MachineFunction.h"#include"llvm/CodeGen/MachineInstrBuilder.h"#include"llvm/CodeGen/MachineRegisterInfo.h"#include"llvm/CodeGen/RegisterScavenging.h"#include"llvm/Target/TargetOptions.h"#include"llvm/Support/CommandLine.h"usingnamespacellvm;cl::opt<bool>SpillAlignedNEONRegs("align-neon-spills",cl::Hidden,cl::desc("Align ARM NEON spills in prolog and epilog"));staticMachineBasicBlock::iteratorskipAlignedDPRCS2Spills(MachineBasicBlock::iteratorMI,unsignedNumAlignedDPRCS2Regs);/// hasFP - Return true if the specified function should have a dedicated frame/// pointer register. This is true if the function has variable sized allocas/// or if frame pointer elimination is disabled.boolARMFrameLowering::hasFP(constMachineFunction&MF)const{constTargetRegisterInfo*RegInfo=MF.getTarget().getRegisterInfo();// iOS requires FP not to be clobbered for backtracing purpose.if(STI.isTargetIOS())returntrue;constMachineFrameInfo*MFI=MF.getFrameInfo();// Always eliminate non-leaf frame pointers.return((