LLVM API Documentation
#include "ARMFrameLowering.h"
#include "ARMBaseInstrInfo.h"
#include "ARMBaseRegisterInfo.h"
#include "ARMConstantPoolValue.h"
#include "ARMMachineFunctionInfo.h"
#include "MCTargetDesc/ARMAddressingModes.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/RegisterScavenging.h"
#include "llvm/IR/CallingConv.h"
#include "llvm/IR/Function.h"
#include "llvm/MC/MCContext.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Target/TargetOptions.h"
Go to the source code of this file.
static uint32_t alignToARMConstant | ( | uint32_t | Value | ) | [static] |
Get the minimum constant for ARM that is greater than or equal to the argument. In ARM, constants can have any value that can be produced by rotating an 8-bit value to the right by an even number of bits within a 32-bit word.
Definition at line 1684 of file ARMFrameLowering.cpp.
Referenced by llvm::ARMFrameLowering::adjustForSegmentedStacks().
static void checkNumAlignedDPRCS2Regs | ( | MachineFunction & | MF | ) | [static] |
Definition at line 1332 of file ARMFrameLowering.cpp.
References llvm::ARMBaseRegisterInfo::canRealignStack(), llvm::AttributeSet::FunctionIndex, llvm::Function::getAttributes(), llvm::TargetSubtargetInfo::getFrameLowering(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getInfo(), llvm::MachineFunction::getRegInfo(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::TargetFrameLowering::getStackAlignment(), llvm::TargetMachine::getSubtarget(), llvm::MachineFunction::getSubtarget(), llvm::TargetMachine::getSubtargetImpl(), llvm::MachineFunction::getTarget(), llvm::AttributeSet::hasAttribute(), llvm::MachineRegisterInfo::isPhysRegUsed(), llvm::Attribute::Naked, llvm::MachineRegisterInfo::setPhysRegUsed(), and SpillAlignedNEONRegs.
Referenced by llvm::ARMFrameLowering::processFunctionBeforeCalleeSavedScan().
static void emitAlignedDPRCS2Restores | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator | MI, | ||
unsigned | NumAlignedDPRCS2Regs, | ||
const std::vector< CalleeSavedInfo > & | CSI, | ||
const TargetRegisterInfo * | TRI | ||
) | [static] |
Emit aligned reload instructions for NumAlignedDPRCS2Regs D-registers starting from d8. These instructions are assumed to execute while the stack is still aligned, unlike the code inserted by emitPopInst.
Definition at line 1124 of file ARMFrameLowering.cpp.
References llvm::AddDefaultCC(), llvm::AddDefaultPred(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::MachineInstr::addRegisterKilled(), llvm::BuildMI(), llvm::RegState::Define, llvm::MCInstrInfo::get(), llvm::MachineFunction::getInfo(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::TargetRegisterInfo::getMatchingSuperReg(), llvm::MachineBasicBlock::getParent(), getReg(), llvm::MachineFunction::getSubtarget(), llvm::RegState::ImplicitDefine, isThumb(), llvm::ARMFunctionInfo::isThumb1OnlyFunction(), llvm::ARMFunctionInfo::isThumbFunction(), and llvm::RegState::Kill.
Referenced by llvm::ARMFrameLowering::restoreCalleeSavedRegisters().
static void emitAlignedDPRCS2Spills | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator | MI, | ||
unsigned | NumAlignedDPRCS2Regs, | ||
const std::vector< CalleeSavedInfo > & | CSI, | ||
const TargetRegisterInfo * | TRI | ||
) | [static] |
Emit aligned spill instructions for NumAlignedDPRCS2Regs D-registers starting from d8. Also insert stack realignment code and leave the stack pointer pointing to the d8 spill slot.
Definition at line 965 of file ARMFrameLowering.cpp.
References llvm::AddDefaultCC(), llvm::AddDefaultPred(), llvm::MachineInstrBuilder::addImm(), llvm::MachineBasicBlock::addLiveIn(), llvm::MachineInstrBuilder::addReg(), llvm::MachineInstr::addRegisterKilled(), llvm::BuildMI(), llvm::MCInstrInfo::get(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getInfo(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::TargetRegisterInfo::getMatchingSuperReg(), llvm::MachineFrameInfo::getMaxAlignment(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getSubtarget(), llvm::RegState::ImplicitKill, isThumb(), llvm::ARMFunctionInfo::isThumb1OnlyFunction(), llvm::ARMFunctionInfo::isThumbFunction(), llvm::RegState::Kill, llvm::MachineFrameInfo::setObjectAlignment(), and llvm::ARMFunctionInfo::setShouldRestoreSPFromFP().
Referenced by llvm::ARMFrameLowering::spillCalleeSavedRegisters().
static void emitRegPlusImmediate | ( | bool | isARM, |
MachineBasicBlock & | MBB, | ||
MachineBasicBlock::iterator & | MBBI, | ||
DebugLoc | dl, | ||
const ARMBaseInstrInfo & | TII, | ||
unsigned | DestReg, | ||
unsigned | SrcReg, | ||
int | NumBytes, | ||
unsigned | MIFlags = MachineInstr::NoFlags , |
||
ARMCC::CondCodes | Pred = ARMCC::AL , |
||
unsigned | PredReg = 0 |
||
) | [static] |
Definition at line 114 of file ARMFrameLowering.cpp.
References llvm::emitARMRegPlusImmediate(), and llvm::emitT2RegPlusImmediate().
Referenced by llvm::ARMFrameLowering::emitPrologue(), and emitSPUpdate().
static void emitSPUpdate | ( | bool | isARM, |
MachineBasicBlock & | MBB, | ||
MachineBasicBlock::iterator & | MBBI, | ||
DebugLoc | dl, | ||
const ARMBaseInstrInfo & | TII, | ||
int | NumBytes, | ||
unsigned | MIFlags = MachineInstr::NoFlags , |
||
ARMCC::CondCodes | Pred = ARMCC::AL , |
||
unsigned | PredReg = 0 |
||
) | [static] |
Definition at line 129 of file ARMFrameLowering.cpp.
References emitRegPlusImmediate().
Referenced by llvm::ARMFrameLowering::emitEpilogue(), and llvm::ARMFrameLowering::emitPrologue().
static unsigned estimateRSStackSizeLimit | ( | MachineFunction & | MF, |
const TargetFrameLowering * | TFI | ||
) | [static] |
estimateRSStackSizeLimit - Look at each instruction that references stack frames and return the stack size limit beyond which some of these instructions will require a scratch register during their expansion later.
Definition at line 1279 of file ARMFrameLowering.cpp.
References llvm::ARMII::AddrMode3, llvm::ARMII::AddrMode4, llvm::ARMII::AddrMode5, llvm::ARMII::AddrMode6, llvm::ARMII::AddrModeMask, llvm::ARMII::AddrModeT2_i12, llvm::ARMII::AddrModeT2_i8, llvm::ARMII::AddrModeT2_i8s4, llvm::MachineFunction::getInfo(), llvm::TargetFrameLowering::hasFP(), and llvm::ARMFunctionInfo::hasStackFrame().
Referenced by llvm::ARMFrameLowering::processFunctionBeforeCalleeSavedScan().
static unsigned GetFunctionSizeInBytes | ( | const MachineFunction & | MF, |
const ARMBaseInstrInfo & | TII | ||
) | [static] |
Definition at line 1265 of file ARMFrameLowering.cpp.
References llvm::ARMBaseInstrInfo::GetInstSizeInBytes().
Referenced by llvm::ARMFrameLowering::processFunctionBeforeCalleeSavedScan().
static bool isCSRestore | ( | MachineInstr * | MI, |
const ARMBaseInstrInfo & | TII, | ||
const MCPhysReg * | CSRegs | ||
) | [static] |
Definition at line 92 of file ARMFrameLowering.cpp.
References llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::isCalleeSavedRegister(), and llvm::isPopOpcode().
Referenced by llvm::ARMFrameLowering::emitEpilogue().
static int sizeOfSPAdjustment | ( | const MachineInstr * | MI | ) | [static] |
Definition at line 139 of file ARMFrameLowering.cpp.
References llvm::MachineInstr::getNumOperands(), and llvm::MachineInstr::getOpcode().
Referenced by llvm::ARMFrameLowering::emitPrologue().
static MachineBasicBlock::iterator skipAlignedDPRCS2Spills | ( | MachineBasicBlock::iterator | MI, |
unsigned | NumAlignedDPRCS2Regs | ||
) | [static] |
Skip past the code inserted by emitAlignedDPRCS2Spills, and return an iterator to the following instruction.
Definition at line 1096 of file ARMFrameLowering.cpp.
References llvm::AArch64CC::MI.
Referenced by llvm::ARMFrameLowering::emitPrologue().
static bool WindowsRequiresStackProbe | ( | const MachineFunction & | MF, |
size_t | StackSizeInBytes | ||
) | [static] |
Definition at line 149 of file ARMFrameLowering.cpp.
References llvm::MachineFunction::getFrameInfo(), and llvm::MachineFrameInfo::getStackProtectorIndex().
Referenced by llvm::ARMFrameLowering::emitPrologue().
const uint64_t kSplitStackAvailable = 256 [static] |
Definition at line 1711 of file ARMFrameLowering.cpp.
Referenced by llvm::ARMFrameLowering::adjustForSegmentedStacks().
cl::opt<bool> SpillAlignedNEONRegs("align-neon-spills", cl::Hidden, cl::init(true), cl::desc("Align ARM NEON spills in prolog and epilog")) [static] |
Referenced by checkNumAlignedDPRCS2Regs().