LLVM
8.0.1
|
#include "Target/X86/X86FrameLowering.h"
Public Member Functions | |
X86FrameLowering (const X86Subtarget &STI, unsigned StackAlignOverride) | |
void | emitStackProbe (MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, const DebugLoc &DL, bool InProlog) const |
Emit target stack probe code. More... | |
void | inlineStackProbe (MachineFunction &MF, MachineBasicBlock &PrologMBB) const override |
Replace a StackProbe inline-stub with the actual probe code inline. More... | |
void | emitCalleeSavedFrameMoves (MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, const DebugLoc &DL) const |
void | emitPrologue (MachineFunction &MF, MachineBasicBlock &MBB) const override |
emitProlog/emitEpilog - These methods insert prolog and epilog code into the function. More... | |
void | emitEpilogue (MachineFunction &MF, MachineBasicBlock &MBB) const override |
void | adjustForSegmentedStacks (MachineFunction &MF, MachineBasicBlock &PrologueMBB) const override |
Adjust the prologue to have the function use segmented stacks. More... | |
void | adjustForHiPEPrologue (MachineFunction &MF, MachineBasicBlock &PrologueMBB) const override |
Erlang programs may need a special prologue to handle the stack size they might need at runtime. More... | |
void | determineCalleeSaves (MachineFunction &MF, BitVector &SavedRegs, RegScavenger *RS=nullptr) const override |
This method determines which of the registers reported by TargetRegisterInfo::getCalleeSavedRegs() should actually get saved. More... | |
bool | assignCalleeSavedSpillSlots (MachineFunction &MF, const TargetRegisterInfo *TRI, std::vector< CalleeSavedInfo > &CSI) const override |
assignCalleeSavedSpillSlots - Allows target to override spill slot assignment logic. More... | |
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 true if it isn't possible / profitable to do so by issuing a series of store instructions via storeRegToStackSlot(). More... | |
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 true if it isn't possible / profitable to do so by issuing a series of load instructions via loadRegToStackSlot(). More... | |
bool | hasFP (const MachineFunction &MF) const override |
hasFP - Return true if the specified function should have a dedicated frame pointer register. More... | |
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. More... | |
bool | canSimplifyCallFramePseudos (const MachineFunction &MF) const override |
canSimplifyCallFramePseudos - If there is a reserved call frame, the call frame pseudos can be simplified. More... | |
bool | needsFrameIndexResolution (const MachineFunction &MF) const override |
int | getFrameIndexReference (const MachineFunction &MF, int FI, unsigned &FrameReg) const override |
getFrameIndexReference - This method should return the base register and offset used to reference a frame index location. More... | |
int | getFrameIndexReferenceSP (const MachineFunction &MF, int FI, unsigned &SPReg, int Adjustment) const |
int | getFrameIndexReferencePreferSP (const MachineFunction &MF, int FI, unsigned &FrameReg, bool IgnoreSPUpdates) const override |
Same as getFrameIndexReference , except that the stack pointer (as opposed to the frame pointer) will be the preferred value for FrameReg . More... | |
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 pseudo instructions (but only if the Target is using them). More... | |
unsigned | getWinEHParentFrameOffset (const MachineFunction &MF) const override |
void | processFunctionBeforeFrameFinalized (MachineFunction &MF, RegScavenger *RS) const override |
processFunctionBeforeFrameFinalized - This method is called immediately before the specified function's frame layout (MF.getFrameInfo()) is finalized. More... | |
int | mergeSPUpdates (MachineBasicBlock &MBB, MachineBasicBlock::iterator &MBBI, bool doMergeWithPrevious) const |
Check the instruction before/after the passed instruction. More... | |
void | emitSPUpdate (MachineBasicBlock &MBB, MachineBasicBlock::iterator &MBBI, const DebugLoc &DL, int64_t NumBytes, bool InEpilogue) const |
Emit a series of instructions to increment / decrement the stack pointer by a constant value. More... | |
bool | canUseLEAForSPInEpilogue (const MachineFunction &MF) const |
Check that LEA can be used on SP in an epilogue sequence for MF . More... | |
bool | canUseAsPrologue (const MachineBasicBlock &MBB) const override |
Check whether or not the given MBB can be used as a prologue for the target. More... | |
bool | canUseAsEpilogue (const MachineBasicBlock &MBB) const override |
Check whether or not the given MBB can be used as a epilogue for the target. More... | |
bool | enableShrinkWrapping (const MachineFunction &MF) const override |
Returns true if the target will correctly handle shrink wrapping. More... | |
void | orderFrameObjects (const MachineFunction &MF, SmallVectorImpl< int > &ObjectsToAllocate) const override |
Order the symbols in the local stack. More... | |
void | BuildCFI (MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, const DebugLoc &DL, const MCCFIInstruction &CFIInst) const |
Wraps up getting a CFI index and building a MachineInstr for it. More... | |
MachineBasicBlock::iterator | restoreWin32EHStackPointers (MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, const DebugLoc &DL, bool RestoreSP=false) const |
Sets up EBP and optionally ESI based on the incoming EBP value. More... | |
int | getInitialCFAOffset (const MachineFunction &MF) const override |
Return initial CFA offset value i.e. More... | |
unsigned | getInitialCFARegister (const MachineFunction &MF) const override |
Return initial CFA register value i.e. More... | |
Public Member Functions inherited from llvm::TargetFrameLowering | |
TargetFrameLowering (StackDirection D, unsigned StackAl, int LAO, unsigned TransAl=1, bool StackReal=true) | |
virtual | ~TargetFrameLowering () |
StackDirection | getStackGrowthDirection () const |
getStackGrowthDirection - Return the direction the stack grows More... | |
unsigned | getStackAlignment () const |
getStackAlignment - This method returns the number of bytes to which the stack pointer must be aligned on entry to a function. More... | |
int | alignSPAdjust (int SPAdj) const |
alignSPAdjust - This method aligns the stack adjustment to the correct alignment. More... | |
unsigned | getTransientStackAlignment () const |
getTransientStackAlignment - This method returns the number of bytes to which the stack pointer must be aligned at all times, even between calls. More... | |
bool | isStackRealignable () const |
isStackRealignable - This method returns whether the stack can be realigned. More... | |
virtual unsigned | getStackAlignmentSkew (const MachineFunction &MF) const |
Return the skew that has to be applied to stack alignment under certain conditions (e.g. More... | |
int | getOffsetOfLocalArea () const |
getOffsetOfLocalArea - This method returns the offset of the local area from the stack pointer on entrance to a function. More... | |
virtual bool | isFPCloseToIncomingSP () const |
isFPCloseToIncomingSP - Return true if the frame pointer is close to the incoming stack pointer, false if it is close to the post-prologue stack pointer. More... | |
virtual const SpillSlot * | getCalleeSavedSpillSlots (unsigned &NumEntries) const |
getCalleeSavedSpillSlots - This method returns a pointer to an array of pairs, that contains an entry for each callee saved register that must be spilled to a particular stack location if it is spilled. More... | |
virtual bool | targetHandlesStackFrameRounding () const |
targetHandlesStackFrameRounding - Returns true if the target is responsible for rounding up the stack frame (probably at emitPrologue time). More... | |
virtual bool | enableStackSlotScavenging (const MachineFunction &MF) const |
Returns true if the stack slot holes in the fixed and callee-save stack area should be used when allocating other stack locations to reduce stack size. More... | |
virtual bool | enableCalleeSaveSkip (const MachineFunction &MF) const |
Returns true if the target can safely skip saving callee-saved registers for noreturn nounwind functions. More... | |
virtual bool | keepFramePointer (const MachineFunction &MF) const |
Return true if the target wants to keep the frame pointer regardless of the function attribute "frame-pointer". More... | |
Public Attributes | |
const X86Subtarget & | STI |
const X86InstrInfo & | TII |
const X86RegisterInfo * | TRI |
unsigned | SlotSize |
bool | Is64Bit |
Is64Bit implies that x86_64 instructions are available. More... | |
bool | IsLP64 |
bool | Uses64BitFramePtr |
True if the 64-bit frame or stack pointer should be used. More... | |
unsigned | StackPtr |
Additional Inherited Members | |
Public Types inherited from llvm::TargetFrameLowering | |
enum | StackDirection { StackGrowsUp, StackGrowsDown } |
Static Public Member Functions inherited from llvm::TargetFrameLowering | |
static bool | isSafeForNoCSROpt (const Function &F) |
Check if given function is safe for not having callee saved registers. More... | |
Definition at line 27 of file X86FrameLowering.h.
X86FrameLowering::X86FrameLowering | ( | const X86Subtarget & | STI, |
unsigned | StackAlignOverride | ||
) |
Definition at line 38 of file X86FrameLowering.cpp.
References llvm::X86RegisterInfo::getSlotSize(), llvm::X86RegisterInfo::getStackRegister(), Is64Bit, llvm::X86Subtarget::is64Bit(), IsLP64, llvm::X86Subtarget::isTarget64BitLP64(), llvm::X86Subtarget::isTargetNaCl64(), SlotSize, StackPtr, TRI, and Uses64BitFramePtr.
|
overridevirtual |
Erlang programs may need a special prologue to handle the stack size they might need at runtime.
That is because Erlang/OTP does not implement a C stack but uses a custom implementation of hybrid stack/heap architecture. (for more information see Eric Stenman's Ph.D. thesis: http://publications.uu.se/uu/fulltext/nbn_se_uu_diva-2688.pdf)
CheckStack: temp0 = sp - MaxStack if( temp0 < SP_LIMIT(P) ) goto IncStack else goto OldStart OldStart: ... IncStack: call inc_stack # doubles the stack space temp0 = sp - MaxStack if( temp0 < SP_LIMIT(P) ) goto IncStack else goto OldStart
Reimplemented from llvm::TargetFrameLowering.
Definition at line 2526 of file X86FrameLowering.cpp.
References llvm::MachineBasicBlock::addLiveIn(), llvm::addRegOffset(), llvm::MachineBasicBlock::addSuccessor(), llvm::Function::arg_size(), assert(), llvm::MachineBasicBlock::begin(), llvm::MachineFunction::begin(), llvm::BuildMI(), llvm::MachineFunction::CreateMachineBasicBlock(), llvm::dyn_cast(), eliminateCallFramePseudoInstr(), llvm::N86::ESP, F(), llvm::StringRef::find(), llvm::StringRef::find_first_of(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getFunction(), llvm::MachineOperand::getGlobal(), getHiPELiteral(), llvm::MachineFunction::getMMI(), llvm::MachineModuleInfo::getModule(), llvm::Value::getName(), llvm::Module::getNamedMetadata(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getRegInfo(), GetScratchRegister(), llvm::MachineFrameInfo::getStackSize(), llvm::MachineFrameInfo::hasCalls(), Is64Bit, llvm::X86Subtarget::is64Bit(), llvm::MachineOperand::isGlobal(), llvm::MachineRegisterInfo::isLiveIn(), IsLP64, llvm::X86Subtarget::isTargetLinux(), llvm::MachineBasicBlock::liveins(), llvm::max(), MI, MRI, llvm::StringRef::npos, llvm::MachineFunction::push_front(), llvm::report_fatal_error(), SlotSize, STI, TII, TRI, and llvm::MachineFunction::verify().
|
overridevirtual |
Adjust the prologue to have the function use segmented stacks.
This works by adding a check even before the "normal" function prologue.
Reimplemented from llvm::TargetFrameLowering.
Definition at line 2245 of file X86FrameLowering.cpp.
References llvm::MachineInstrBuilder::addExternalSymbol(), llvm::MachineInstrBuilder::addImm(), llvm::MachineBasicBlock::addLiveIn(), llvm::MachineInstrBuilder::addReg(), llvm::MachineBasicBlock::addSuccessor(), assert(), llvm::MachineFunction::begin(), llvm::BuildMI(), llvm::MachineFunction::CreateMachineBasicBlock(), llvm::N86::EAX, llvm::N86::ESP, llvm::X86MachineFunctionInfo::getArgumentStackSize(), llvm::TargetMachine::getCodeModel(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getInfo(), llvm::MachineFunction::getMMI(), llvm::BranchProbability::getOne(), llvm::MachineFunction::getRegInfo(), GetScratchRegister(), llvm::MachineFrameInfo::getStackSize(), llvm::MachineFunction::getTarget(), llvm::BranchProbability::getZero(), HasNestArgument(), llvm::MachineFrameInfo::hasTailCall(), Is64Bit, llvm::MachineRegisterInfo::isLiveIn(), IsLP64, llvm::X86Subtarget::isTargetDarwin(), llvm::X86Subtarget::isTargetDragonFly(), llvm::X86Subtarget::isTargetFreeBSD(), llvm::X86Subtarget::isTargetLinux(), llvm::X86Subtarget::isTargetWin32(), llvm::X86Subtarget::isTargetWin64(), llvm::Function::isVarArg(), llvm::RegState::Kill, kSplitStackAvailable, llvm::CodeModel::Large, llvm::MachineBasicBlock::liveins(), llvm::MachineFunction::push_front(), llvm::report_fatal_error(), llvm::MachineModuleInfo::setHasNosplitStack(), llvm::MachineModuleInfo::setUsesMorestackAddr(), STI, TII, llvm::X86Subtarget::useRetpolineIndirectCalls(), and llvm::MachineFunction::verify().
|
overridevirtual |
assignCalleeSavedSpillSlots - Allows target to override spill slot assignment logic.
If implemented, assignCalleeSavedSpillSlots() should assign frame slots to all CSI entries and return true. If this method returns false, spill slots will be assigned using generic implementation. assignCalleeSavedSpillSlots() may add, delete or rearrange elements of CSI.
Reimplemented from llvm::TargetFrameLowering.
Definition at line 1927 of file X86FrameLowering.cpp.
References llvm::abs(), llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, contains(), llvm::MachineFrameInfo::CreateFixedObject(), llvm::MachineFrameInfo::CreateFixedSpillStackObject(), llvm::MachineFrameInfo::CreateSpillStackObject(), llvm::MachineFrameInfo::ensureMaxAlignment(), llvm::MachineFunction::getFrameInfo(), llvm::TargetRegisterInfo::getFrameRegister(), llvm::MachineFunction::getInfo(), llvm::TargetRegisterInfo::getMinimalPhysRegClass(), llvm::TargetFrameLowering::getOffsetOfLocalArea(), llvm::TargetRegisterInfo::getSpillAlignment(), llvm::TargetRegisterInfo::getSpillSize(), llvm::X86MachineFunctionInfo::getTCReturnAddrDelta(), llvm::X86Subtarget::hasBWI(), llvm::MachineFunction::hasEHFunclets(), hasFP(), llvm::MVT::Other, llvm::TargetRegisterInfo::regsOverlap(), llvm::X86MachineFunctionInfo::setCalleeSavedFrameSize(), llvm::MachineFrameInfo::setCVBytesOfCalleeSavedRegisters(), llvm::X86MachineFunctionInfo::setHasSEHFramePtrSave(), llvm::X86MachineFunctionInfo::setSEHFramePtrSaveIndex(), Size, SlotSize, STI, llvm::MVT::v16i1, and llvm::MVT::v64i1.
void X86FrameLowering::BuildCFI | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator | MBBI, | ||
const DebugLoc & | DL, | ||
const MCCFIInstruction & | CFIInst | ||
) | const |
Wraps up getting a CFI index and building a MachineInstr for it.
Definition at line 451 of file X86FrameLowering.cpp.
References llvm::MachineFunction::addFrameInst(), llvm::BuildMI(), llvm::MachineBasicBlock::getParent(), and TII.
Referenced by eliminateCallFramePseudoInstr(), emitCalleeSavedFrameMoves(), emitEpilogue(), emitPrologue(), and ExpandMOVImmSExti8().
|
overridevirtual |
canSimplifyCallFramePseudos - If there is a reserved call frame, the call frame pseudos can be simplified.
Having a FP, as in the default implementation, is not sufficient here since we can't always use it. Use a more nuanced condition.
Reimplemented from llvm::TargetFrameLowering.
Definition at line 62 of file X86FrameLowering.cpp.
References llvm::X86RegisterInfo::hasBasePointer(), hasFP(), hasReservedCallFrame(), and TRI.
|
overridevirtual |
Check whether or not the given MBB
can be used as a epilogue for the target.
The epilogue will be inserted before the first terminator of that block. This method is used by the shrink-wrapping pass to decide if MBB
will be correctly handled by the target.
Reimplemented from llvm::TargetFrameLowering.
Definition at line 2856 of file X86FrameLowering.cpp.
References assert(), canUseLEAForSPInEpilogue(), flagsNeedToBePreservedBeforeTheTerminators(), llvm::MachineBasicBlock::getParent(), llvm::MachineBasicBlock::isReturnBlock(), llvm::X86Subtarget::isTargetWin64(), STI, and llvm::MachineBasicBlock::succ_empty().
|
overridevirtual |
Check whether or not the given MBB
can be used as a prologue for the target.
The prologue will be inserted first in this basic block. This method is used by the shrink-wrapping pass to decide if MBB
will be correctly handled by the target. As soon as the target enable shrink-wrapping without overriding this method, we assume that each basic block is a valid prologue.
Reimplemented from llvm::TargetFrameLowering.
Definition at line 2850 of file X86FrameLowering.cpp.
References assert(), llvm::MachineBasicBlock::getParent(), llvm::MachineBasicBlock::isLiveIn(), and TRI.
bool X86FrameLowering::canUseLEAForSPInEpilogue | ( | const MachineFunction & | MF | ) | const |
Check that LEA can be used on SP in an epilogue sequence for MF
.
Definition at line 1501 of file X86FrameLowering.cpp.
References llvm::TargetMachine::getMCAsmInfo(), llvm::MachineFunction::getTarget(), hasFP(), and llvm::MCAsmInfo::usesWindowsCFI().
Referenced by canUseAsEpilogue(), and emitSPUpdate().
|
overridevirtual |
This method determines which of the registers reported by TargetRegisterInfo::getCalleeSavedRegs() should actually get saved.
The default implementation checks populates the SavedRegs
bitset with all registers which are modified in the function, targets may override this function to save additional registers. This method also sets up the register scavenger ensuring there is a free register or a frameindex available.
Reimplemented from llvm::TargetFrameLowering.
Definition at line 2179 of file X86FrameLowering.cpp.
References llvm::TargetFrameLowering::determineCalleeSaves(), llvm::X86RegisterInfo::getBaseRegister(), llvm::getX86SubSuperRegister(), llvm::X86RegisterInfo::hasBasePointer(), llvm::X86Subtarget::isTarget64BitILP32(), llvm::BitVector::set(), STI, and TRI.
|
overridevirtual |
This method is called during prolog/epilog code insertion to eliminate call frame setup and destroy pseudo instructions (but only if the Target is using them).
It is responsible for eliminating these instructions, replacing them with concrete instructions. This method need only be implemented if using call frame setup/destroy pseudo instructions. Returns an iterator pointing to the instruction after the replaced one.
Reimplemented from llvm::TargetFrameLowering.
Definition at line 2738 of file X86FrameLowering.cpp.
References llvm::alignTo(), B, llvm::MachineBasicBlock::begin(), BuildCFI(), llvm::MCCFIInstruction::createAdjustCfaOffset(), llvm::MCCFIInstruction::createGnuArgsSize(), llvm::DwarfCFI, llvm::MachineBasicBlock::end(), llvm::MachineBasicBlock::erase(), F(), llvm::X86InstrInfo::getFrameAdjustment(), llvm::MachineFunction::getFunction(), llvm::X86MachineFunctionInfo::getHasPushSequences(), llvm::MachineFunction::getInfo(), llvm::MachineFunction::getLandingPads(), llvm::TargetMachine::getMCAsmInfo(), llvm::MachineFunction::getMMI(), llvm::TargetFrameLowering::getStackAlignment(), llvm::MachineFunction::getTarget(), llvm::MachineModuleInfo::hasDebugInfo(), hasFP(), hasReservedCallFrame(), I, mergeSPUpdates(), llvm::Function::needsUnwindTableEntry(), llvm::Function::optForMinSize(), llvm::skipDebugInstructionsForward(), llvm::ARM::WinEH::StackAdjustment(), TII, and llvm::MCAsmInfo::usesWindowsCFI().
Referenced by adjustForHiPEPrologue().
void X86FrameLowering::emitCalleeSavedFrameMoves | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator | MBBI, | ||
const DebugLoc & | DL | ||
) | const |
Definition at line 461 of file X86FrameLowering.cpp.
References BuildCFI(), llvm::MCCFIInstruction::createOffset(), E, llvm::MachineFrameInfo::getCalleeSavedInfo(), llvm::MachineModuleInfo::getContext(), llvm::MCRegisterInfo::getDwarfRegNum(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getMMI(), llvm::MachineFrameInfo::getObjectOffset(), llvm::MachineBasicBlock::getParent(), llvm::MCContext::getRegisterInfo(), I, MRI, and Reg.
|
overridevirtual |
Implements llvm::TargetFrameLowering.
Definition at line 1580 of file X86FrameLowering.cpp.
References llvm::addRegOffset(), llvm::alignTo(), assert(), llvm::MachineBasicBlock::begin(), BuildCFI(), llvm::BuildMI(), calculateSetFPREG(), llvm::ISD::CATCHRET, llvm::MCCFIInstruction::createDefCfa(), llvm::MCCFIInstruction::createDefCfaOffset(), emitSPUpdate(), llvm::MachineBasicBlock::end(), llvm::N86::ESP, false, llvm::MachineInstr::FrameDestroy, llvm::X86MachineFunctionInfo::getCalleeSavedFrameSize(), llvm::MachineBasicBlock::getFirstTerminator(), llvm::MachineFunction::getFrameInfo(), llvm::X86RegisterInfo::getFrameRegister(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getInfo(), getLEArOpcode(), llvm::TargetMachine::getMCAsmInfo(), llvm::MachineFunction::getMMI(), llvm::MachineFrameInfo::getStackSize(), llvm::MachineFunction::getTarget(), llvm::TargetMachine::getTargetTriple(), llvm::X86MachineFunctionInfo::getTCReturnAddrDelta(), llvm::getX86SubSuperRegister(), llvm::MachineModuleInfo::hasDebugInfo(), hasFP(), llvm::MachineFrameInfo::hasVarSizedObjects(), llvm::MachineFunction::hasWinCFI(), Is64Bit, isFuncletReturnInstr(), llvm::Triple::isOSDarwin(), llvm::Triple::isOSWindows(), isTailCallOpcode(), llvm::X86Subtarget::isTarget64BitILP32(), mergeSPUpdates(), llvm::Function::needsUnwindTableEntry(), SlotSize, StackPtr, STI, llvm::MCID::Terminator, TII, TRI, Uses64BitFramePtr, and llvm::MCAsmInfo::usesWindowsCFI().
|
overridevirtual |
emitProlog/emitEpilog - These methods insert prolog and epilog code into the function.
emitPrologue - Push callee-saved registers onto the stack, which automatically adjust the stack pointer.
Adjust the stack pointer to allocate space for local variables. Also emit labels used by the exception handler to generate the exception handling frames.
Implements llvm::TargetFrameLowering.
Definition at line 960 of file X86FrameLowering.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineBasicBlock::addLiveIn(), llvm::MachineInstrBuilder::addReg(), llvm::addRegOffset(), llvm::MachineFrameInfo::adjustsStack(), llvm::alignTo(), llvm::Function::arg_size(), assert(), llvm::MachineBasicBlock::begin(), BuildCFI(), llvm::BuildMI(), llvm::classifyEHPersonality(), llvm::CoreCLR, llvm::MCCFIInstruction::createDefCfaOffset(), llvm::MCCFIInstruction::createDefCfaRegister(), llvm::MCCFIInstruction::createOffset(), llvm::N86::EAX, llvm::N86::ECX, llvm::N86::EDX, emitSPUpdate(), llvm::StringRef::empty(), llvm::MachineBasicBlock::end(), llvm::MachineInstr::FrameSetup, llvm::StringRef::getAsInteger(), llvm::X86RegisterInfo::getBaseRegister(), llvm::X86MachineFunctionInfo::getCalleeSavedFrameSize(), llvm::Function::getCallingConv(), llvm::Module::getCodeViewFlag(), llvm::Function::getFnAttribute(), llvm::MachineFunction::getFrameInfo(), llvm::X86RegisterInfo::getFrameRegister(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getInfo(), llvm::TargetMachine::getMCAsmInfo(), llvm::MachineFunction::getMMI(), llvm::MachineModuleInfo::getModule(), llvm::Function::getPersonalityFn(), llvm::MachineFunction::getRegInfo(), llvm::X86MachineFunctionInfo::getRestoreBasePointer(), llvm::X86TargetLowering::getStackProbeSymbolName(), llvm::MachineFrameInfo::getStackSize(), llvm::MachineFunction::getSubtarget(), llvm::MachineFunction::getTarget(), llvm::X86Subtarget::getTargetLowering(), llvm::X86MachineFunctionInfo::getTCReturnAddrDelta(), llvm::X86MachineFunctionInfo::getUsesRedZone(), llvm::Attribute::getValueAsString(), llvm::getX86SubSuperRegister(), llvm::MachineFrameInfo::hasCopyImplyingStackAdjustment(), llvm::MachineModuleInfo::hasDebugInfo(), llvm::MachineFunction::hasEHFunclets(), llvm::Function::hasFnAttribute(), hasFP(), llvm::Function::hasPersonalityFn(), llvm::MachineFrameInfo::hasVarSizedObjects(), Is64Bit, llvm::X86Subtarget::isCallingConvWin64(), isEAXLiveIn(), llvm::MachineBasicBlock::isEHFuncletEntry(), llvm::MachineRegisterInfo::isReserved(), llvm::X86Subtarget::isTarget64BitILP32(), llvm::X86Subtarget::isTargetWin32(), llvm::RegState::Kill, llvm::max(), mergeSPUpdates(), llvm::Function::needsUnwindTableEntry(), llvm::Attribute::NoRedZone, llvm::report_fatal_error(), llvm::X86MachineFunctionInfo::setCalleeSavedFrameSize(), llvm::MachineInstrBuilder::setMIFlag(), llvm::MachineFrameInfo::setOffsetAdjustment(), llvm::MachineFrameInfo::setStackSize(), llvm::X86MachineFunctionInfo::setUsesRedZone(), llvm::MachineFunction::shouldSplitStack(), SlotSize, StackPtr, STI, TII, TRI, llvm::Unknown, Uses64BitFramePtr, llvm::MCAsmInfo::usesWindowsCFI(), and llvm::CallingConv::X86_INTR.
void X86FrameLowering::emitSPUpdate | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator & | MBBI, | ||
const DebugLoc & | DL, | ||
int64_t | NumBytes, | ||
bool | InEpilogue | ||
) | const |
Emit a series of instructions to increment / decrement the stack pointer by a constant value.
emitSPUpdate - Emit a series of instructions to increment / decrement the stack pointer by a constant value.
Definition at line 250 of file X86FrameLowering.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::addRegOffset(), assert(), llvm::BuildMI(), canUseLEAForSPInEpilogue(), llvm::N86::EAX, findDeadCallerSavedReg(), flagsNeedToBePreservedBeforeTheTerminators(), llvm::MachineInstr::FrameDestroy, llvm::MachineInstr::FrameSetup, getADDriOpcode(), getADDrrOpcode(), llvm::getDefRegState(), getLEArOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), getSUBriOpcode(), getSUBrrOpcode(), llvm::getUndefRegState(), Is64Bit, isEAXLiveIn(), llvm::MachineBasicBlock::isLiveIn(), llvm::RegState::Kill, MI, Reg, llvm::MachineOperand::setIsDead(), llvm::MachineInstrBuilder::setMIFlag(), SlotSize, StackPtr, STI, TII, TRI, llvm::X86Subtarget::useLeaForSP(), and Uses64BitFramePtr.
Referenced by emitEpilogue(), and emitPrologue().
void X86FrameLowering::emitStackProbe | ( | MachineFunction & | MF, |
MachineBasicBlock & | MBB, | ||
MachineBasicBlock::iterator | MBBI, | ||
const DebugLoc & | DL, | ||
bool | InProlog | ||
) | const |
Emit target stack probe code.
This is required for all large stack allocations on Windows. The caller is required to materialize the number of bytes to probe in RAX/EAX.
Definition at line 485 of file X86FrameLowering.cpp.
References llvm::MachineFunction::getSubtarget(), llvm::X86Subtarget::isTargetWindowsCoreCLR(), and STI.
|
overridevirtual |
Returns true if the target will correctly handle shrink wrapping.
Reimplemented from llvm::TargetFrameLowering.
Definition at line 2876 of file X86FrameLowering.cpp.
References llvm::Function::getCallingConv(), llvm::MachineFunction::getFunction(), llvm::Function::hasFnAttribute(), hasFP(), llvm::CallingConv::HiPE, llvm::Attribute::NoUnwind, and llvm::MachineFunction::shouldSplitStack().
|
overridevirtual |
getFrameIndexReference - This method should return the base register and offset used to reference a frame index location.
Returns the displacement from the frame register to the stack frame of the specified index, along with the frame register used (in output arg FrameReg).
The offset is returned directly, and the base register is returned via FrameReg.
This is the default implementation which is overridden for some targets.
Reimplemented from llvm::TargetFrameLowering.
Definition at line 1750 of file X86FrameLowering.cpp.
References assert(), calculateSetFPREG(), llvm::X86RegisterInfo::getBaseRegister(), llvm::X86MachineFunctionInfo::getCalleeSavedFrameSize(), llvm::X86MachineFunctionInfo::getFAIndex(), llvm::MachineFunction::getFrameInfo(), llvm::X86RegisterInfo::getFramePtr(), llvm::X86RegisterInfo::getFrameRegister(), llvm::MachineFunction::getInfo(), llvm::TargetMachine::getMCAsmInfo(), llvm::MachineFrameInfo::getObjectAlignment(), llvm::MachineFrameInfo::getObjectOffset(), llvm::TargetFrameLowering::getOffsetOfLocalArea(), llvm::X86MachineFunctionInfo::getRestoreBasePointer(), llvm::X86RegisterInfo::getStackRegister(), llvm::MachineFrameInfo::getStackSize(), llvm::MachineFunction::getTarget(), llvm::X86MachineFunctionInfo::getTCReturnAddrDelta(), llvm::X86RegisterInfo::hasBasePointer(), llvm::MachineFrameInfo::hasCalls(), hasFP(), llvm::MachineFrameInfo::isFixedObjectIndex(), SlotSize, TRI, and llvm::MCAsmInfo::usesWindowsCFI().
Referenced by llvm::X86RegisterInfo::eliminateFrameIndex(), getFrameIndexReferencePreferSP(), and restoreWin32EHStackPointers().
|
overridevirtual |
Same as getFrameIndexReference
, except that the stack pointer (as opposed to the frame pointer) will be the preferred value for FrameReg
.
This is generally used for emitting statepoint or EH tables that use offsets from RSP. If IgnoreSPUpdates
is true, the returned offset is only guaranteed to be valid with respect to the value of SP at the end of the prologue.
Reimplemented from llvm::TargetFrameLowering.
Definition at line 1844 of file X86FrameLowering.cpp.
References assert(), getFrameIndexReference(), getFrameIndexReferenceSP(), llvm::MachineFunction::getFrameInfo(), llvm::TargetSubtargetInfo::getFrameLowering(), llvm::MachineFunction::getInfo(), llvm::MachineFrameInfo::getStackSize(), llvm::MachineFunction::getSubtarget(), llvm::X86MachineFunctionInfo::getTCReturnAddrDelta(), llvm::TargetFrameLowering::hasReservedCallFrame(), llvm::MachineFrameInfo::isFixedObjectIndex(), llvm::X86Subtarget::isTargetWin64(), STI, and TRI.
Referenced by isFuncletReturnInstr().
int X86FrameLowering::getFrameIndexReferenceSP | ( | const MachineFunction & | MF, |
int | FI, | ||
unsigned & | SPReg, | ||
int | Adjustment | ||
) | const |
Definition at line 1835 of file X86FrameLowering.cpp.
References llvm::MachineFunction::getFrameInfo(), llvm::MachineFrameInfo::getObjectOffset(), llvm::TargetFrameLowering::getOffsetOfLocalArea(), llvm::X86RegisterInfo::getStackRegister(), and TRI.
Referenced by llvm::X86RegisterInfo::eliminateFrameIndex(), and getFrameIndexReferencePreferSP().
|
overridevirtual |
Return initial CFA offset value i.e.
the one valid at the beginning of the function (before any stack operations).
Reimplemented from llvm::TargetFrameLowering.
Definition at line 2951 of file X86FrameLowering.cpp.
References llvm::X86RegisterInfo::getSlotSize(), and TRI.
|
overridevirtual |
Return initial CFA register value i.e.
the one valid at the beginning of the function (before any stack operations).
Reimplemented from llvm::TargetFrameLowering.
Definition at line 2955 of file X86FrameLowering.cpp.
|
overridevirtual |
Reimplemented from llvm::TargetFrameLowering.
Definition at line 3104 of file X86FrameLowering.cpp.
References llvm::MachineFunction::getInfo(), and SlotSize.
|
overridevirtual |
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.
Implements llvm::TargetFrameLowering.
Definition at line 84 of file X86FrameLowering.cpp.
References llvm::MachineFunction::callsEHReturn(), llvm::MachineFunction::callsUnwindInit(), llvm::TargetOptions::DisableFramePointerElim(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getInfo(), llvm::MachineFunction::getTarget(), llvm::MachineFrameInfo::hasCopyImplyingStackAdjustment(), llvm::MachineFunction::hasEHFunclets(), llvm::MachineFrameInfo::hasOpaqueSPAdjustment(), llvm::MachineFrameInfo::hasPatchPoint(), llvm::MachineFrameInfo::hasStackMap(), llvm::MachineFrameInfo::hasVarSizedObjects(), llvm::MachineFrameInfo::isFrameAddressTaken(), llvm::TargetMachine::Options, and TRI.
Referenced by assignCalleeSavedSpillSlots(), canSimplifyCallFramePseudos(), canUseLEAForSPInEpilogue(), eliminateCallFramePseudoInstr(), emitEpilogue(), llvm::X86AsmPrinter::EmitInstruction(), emitPrologue(), enableShrinkWrapping(), ExpandMOVImmSExti8(), getFrameIndexReference(), llvm::X86RegisterInfo::getFrameRegister(), llvm::X86RegisterInfo::getPointerRegClass(), llvm::X86RegisterInfo::getRegPressureLimit(), llvm::X86RegisterInfo::getReservedRegs(), inlineStackProbe(), and orderFrameObjects().
|
overridevirtual |
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.
This eliminates the need for add/sub sp brackets around call sites. Returns true if the call frame is included as part of the stack frame.
Reimplemented from llvm::TargetFrameLowering.
Definition at line 52 of file X86FrameLowering.cpp.
References llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getInfo(), and llvm::MachineFrameInfo::hasVarSizedObjects().
Referenced by canSimplifyCallFramePseudos(), and eliminateCallFramePseudoInstr().
|
overridevirtual |
Replace a StackProbe inline-stub with the actual probe code inline.
Reimplemented from llvm::TargetFrameLowering.
Definition at line 501 of file X86FrameLowering.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineBasicBlock::addLiveIn(), llvm::MachineInstrBuilder::addMBB(), llvm::MachineInstrBuilder::addReg(), llvm::addRegOffset(), llvm::MachineBasicBlock::addSuccessor(), assert(), llvm::MachineBasicBlock::begin(), llvm::BuildMI(), llvm::MachineFunction::createExternalSymbolName(), llvm::MachineFunction::CreateMachineBasicBlock(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::RegState::Define, llvm::N86::EAX, llvm::MachineBasicBlock::end(), llvm::MachineInstr::eraseFromParent(), llvm::N86::ESP, llvm::MachineInstr::FrameSetup, llvm::DebugLoc::get(), llvm::MachineBasicBlock::getBasicBlock(), llvm::X86MachineFunctionInfo::getCalleeSavedFrameSize(), llvm::TargetMachine::getCodeModel(), llvm::MachineBasicBlock::getFirstNonPHI(), llvm::MachineFunction::getInfo(), llvm::X86Subtarget::getInstrInfo(), llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::MachineFunction::getRegInfo(), llvm::X86TargetLowering::getStackProbeSymbolName(), getSUBrrOpcode(), llvm::MachineFunction::getSubtarget(), llvm::MachineFunction::getTarget(), llvm::X86Subtarget::getTargetLowering(), hasFP(), llvm::RegState::Implicit, llvm::MachineFunction::insert(), Is64Bit, llvm::X86Subtarget::is64Bit(), llvm::MachineInstr::isBundled(), llvm::MachineBasicBlock::isLiveIn(), llvm::X86Subtarget::isOSWindows(), llvm::X86Subtarget::isTargetWin64(), llvm::X86Subtarget::isTargetWindowsCoreCLR(), llvm::CodeModel::Large, MI, MRI, PageSize, llvm::report_fatal_error(), llvm::MachineBasicBlock::splice(), STI, llvm::ARMBuildAttrs::Symbol, TII, llvm::MachineBasicBlock::transferSuccessorsAndUpdatePHIs(), llvm::RegState::Undef, and llvm::X86Subtarget::useRetpolineIndirectCalls().
int X86FrameLowering::mergeSPUpdates | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator & | MBBI, | ||
bool | doMergeWithPrevious | ||
) | const |
Check the instruction before/after the passed instruction.
If it is an ADD/SUB/LEA instruction it is deleted argument and the stack adjustment is returned as a positive value for ADD/LEA and a negative for SUB.
Definition at line 395 of file X86FrameLowering.cpp.
References assert(), llvm::MachineBasicBlock::begin(), llvm::MachineBasicBlock::end(), llvm::MachineBasicBlock::erase(), llvm::skipDebugInstructionsBackward(), llvm::skipDebugInstructionsForward(), and StackPtr.
Referenced by eliminateCallFramePseudoInstr(), emitEpilogue(), and emitPrologue().
|
overridevirtual |
Reimplemented from llvm::TargetFrameLowering.
Definition at line 76 of file X86FrameLowering.cpp.
References llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getInfo(), and llvm::MachineFrameInfo::hasStackObjects().
|
overridevirtual |
Order the symbols in the local stack.
We want to place the local stack objects in some sort of sensible order. The heuristic we use is to try and pack them according to static number of uses and size in order to minimize code size.
Reimplemented from llvm::TargetFrameLowering.
Definition at line 3031 of file X86FrameLowering.cpp.
References llvm::SmallVectorBase::empty(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFrameInfo::getObjectAlignment(), llvm::MachineFrameInfo::getObjectIndexEnd(), llvm::MachineFrameInfo::getObjectSize(), hasFP(), MI, llvm::reverse(), and TRI.
|
overridevirtual |
processFunctionBeforeFrameFinalized - This method is called immediately before the specified function's frame layout (MF.getFrameInfo()) is finalized.
Once the frame is finalized, MO_FrameIndex operands are replaced with direct constants. This method is optional.
Reimplemented from llvm::TargetFrameLowering.
Definition at line 3116 of file X86FrameLowering.cpp.
References llvm::abs(), llvm::addFrameReference(), llvm::MachineInstrBuilder::addImm(), llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, llvm::MachineBasicBlock::begin(), llvm::BuildMI(), llvm::WinEHHandlerType::CatchObj, llvm::classifyEHPersonality(), llvm::MachineFrameInfo::CreateFixedObject(), llvm::MachineBasicBlock::end(), F(), llvm::MachineBasicBlock::findDebugLoc(), llvm::ISD::FrameIndex, llvm::WinEHHandlerType::FrameIndex, llvm::MachineInstr::FrameSetup, llvm::MachineFunction::front(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getFunction(), llvm::MachineFrameInfo::getObjectAlignment(), llvm::MachineFrameInfo::getObjectIndexBegin(), llvm::MachineFrameInfo::getObjectOffset(), llvm::MachineFrameInfo::getObjectSize(), llvm::Function::getPersonalityFn(), llvm::MachineFunction::getWinEHFuncInfo(), H, llvm::WinEHTryBlockMapEntry::HandlerArray, llvm::MachineFunction::hasEHFunclets(), I, llvm::X86Subtarget::is64Bit(), llvm::MSVC_CXX, llvm::MachineFunction::setHasWinCFI(), llvm::MachineFrameInfo::setObjectOffset(), SlotSize, STI, TII, llvm::WinEHFuncInfo::TryBlockMap, and llvm::WinEHFuncInfo::UnwindHelpFrameIdx.
|
overridevirtual |
restoreCalleeSavedRegisters - Issues instruction(s) to restore all callee saved registers and returns true if it isn't possible / profitable to do so by issuing a series of load instructions via loadRegToStackSlot().
If it returns true, and any of the registers in CSI is not restored, it sets the corresponding Restored flag in CSI to false. Returns false otherwise.
Reimplemented from llvm::TargetFrameLowering.
Definition at line 2124 of file X86FrameLowering.cpp.
References llvm::BuildMI(), llvm::ISD::CATCHRET, llvm::classifyEHPersonality(), contains(), llvm::MachineBasicBlock::end(), F(), llvm::MachineBasicBlock::findDebugLoc(), llvm::MachineInstr::FrameDestroy, llvm::MachineFunction::getFunction(), llvm::TargetRegisterInfo::getMinimalPhysRegClass(), llvm::MachineBasicBlock::getParent(), llvm::Function::getPersonalityFn(), llvm::X86Subtarget::hasBWI(), llvm::X86Subtarget::is32Bit(), llvm::X86Subtarget::is64Bit(), llvm::isAsynchronousEHPersonality(), isFuncletReturnInstr(), llvm::X86Subtarget::isOSWindows(), llvm::X86InstrInfo::loadRegFromStackSlot(), llvm::MVT::Other, Reg, STI, TII, llvm::MVT::v16i1, and llvm::MVT::v64i1.
MachineBasicBlock::iterator X86FrameLowering::restoreWin32EHStackPointers | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator | MBBI, | ||
const DebugLoc & | DL, | ||
bool | RestoreSP = false |
||
) | const |
Sets up EBP and optionally ESI based on the incoming EBP value.
Only needed for 32-bit. Used in funclet prologues and at catchret destinations.
Definition at line 2889 of file X86FrameLowering.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::addRegOffset(), assert(), llvm::BuildMI(), llvm::WinEHFuncInfo::EHRegNodeEndOffset, llvm::WinEHFuncInfo::EHRegNodeFrameIndex, llvm::N86::ESP, llvm::MachineInstr::FrameSetup, getADDriOpcode(), llvm::X86RegisterInfo::getBaseRegister(), getFrameIndexReference(), llvm::X86RegisterInfo::getFrameRegister(), llvm::X86MachineFunctionInfo::getHasSEHFramePtrSave(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::X86MachineFunctionInfo::getSEHFramePtrSaveIndex(), llvm::X86Subtarget::is32Bit(), llvm::X86Subtarget::isTargetWin32(), llvm::X86Subtarget::isTargetWindowsMSVC(), llvm_unreachable, llvm::MachineOperand::setIsDead(), llvm::MachineInstrBuilder::setMIFlag(), STI, TII, TRI, and Uses64BitFramePtr.
|
overridevirtual |
spillCalleeSavedRegisters - Issues instruction(s) to spill all callee saved registers and returns true if it isn't possible / profitable to do so by issuing a series of store instructions via storeRegToStackSlot().
Returns false otherwise.
Reimplemented from llvm::TargetFrameLowering.
Definition at line 2022 of file X86FrameLowering.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineBasicBlock::addLiveIn(), llvm::MachineInstrBuilder::addMBB(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), llvm::classifyEHPersonality(), contains(), llvm::N86::EAX, llvm::MachineBasicBlock::findDebugLoc(), llvm::MachineInstr::FrameSetup, llvm::MachineInstr::getDebugLoc(), llvm::MachineFunction::getFunction(), llvm::getKillRegState(), llvm::MachineOperand::getMBB(), llvm::TargetRegisterInfo::getMinimalPhysRegClass(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::Function::getPersonalityFn(), llvm::MachineFunction::getRegInfo(), llvm::X86Subtarget::hasBWI(), llvm::X86Subtarget::is32Bit(), llvm::X86Subtarget::is64Bit(), llvm::isAsynchronousEHPersonality(), llvm::MachineBasicBlock::isEHFuncletEntry(), llvm::MachineRegisterInfo::isLiveIn(), llvm::X86Subtarget::isOSWindows(), llvm::MCRegAliasIterator::isValid(), MI, MRI, llvm::MVT::Other, llvm::MachineBasicBlock::setHasAddressTaken(), STI, llvm::X86InstrInfo::storeRegToStackSlot(), TII, llvm::MVT::v16i1, and llvm::MVT::v64i1.
bool llvm::X86FrameLowering::Is64Bit |
Is64Bit implies that x86_64 instructions are available.
Definition at line 40 of file X86FrameLowering.h.
Referenced by adjustForHiPEPrologue(), adjustForSegmentedStacks(), emitEpilogue(), emitPrologue(), emitSPUpdate(), inlineStackProbe(), and X86FrameLowering().
bool llvm::X86FrameLowering::IsLP64 |
Definition at line 42 of file X86FrameLowering.h.
Referenced by adjustForHiPEPrologue(), adjustForSegmentedStacks(), and X86FrameLowering().
unsigned llvm::X86FrameLowering::SlotSize |
Definition at line 37 of file X86FrameLowering.h.
Referenced by adjustForHiPEPrologue(), assignCalleeSavedSpillSlots(), calculateSetFPREG(), emitEpilogue(), emitPrologue(), emitSPUpdate(), getFrameIndexReference(), getWinEHParentFrameOffset(), isFuncletReturnInstr(), processFunctionBeforeFrameFinalized(), and X86FrameLowering().
unsigned llvm::X86FrameLowering::StackPtr |
Definition at line 49 of file X86FrameLowering.h.
Referenced by emitEpilogue(), emitPrologue(), emitSPUpdate(), getInitialCFARegister(), mergeSPUpdates(), and X86FrameLowering().
const X86Subtarget& llvm::X86FrameLowering::STI |
Definition at line 33 of file X86FrameLowering.h.
Referenced by adjustForHiPEPrologue(), adjustForSegmentedStacks(), assignCalleeSavedSpillSlots(), canUseAsEpilogue(), determineCalleeSaves(), emitEpilogue(), emitPrologue(), emitSPUpdate(), emitStackProbe(), getFrameIndexReferencePreferSP(), inlineStackProbe(), processFunctionBeforeFrameFinalized(), restoreCalleeSavedRegisters(), restoreWin32EHStackPointers(), and spillCalleeSavedRegisters().
const X86InstrInfo& llvm::X86FrameLowering::TII |
Definition at line 34 of file X86FrameLowering.h.
Referenced by adjustForHiPEPrologue(), adjustForSegmentedStacks(), BuildCFI(), calculateSetFPREG(), eliminateCallFramePseudoInstr(), emitEpilogue(), emitPrologue(), emitSPUpdate(), inlineStackProbe(), processFunctionBeforeFrameFinalized(), restoreCalleeSavedRegisters(), restoreWin32EHStackPointers(), and spillCalleeSavedRegisters().
const X86RegisterInfo* llvm::X86FrameLowering::TRI |
Definition at line 35 of file X86FrameLowering.h.
Referenced by adjustForHiPEPrologue(), canSimplifyCallFramePseudos(), canUseAsPrologue(), determineCalleeSaves(), emitEpilogue(), emitPrologue(), emitSPUpdate(), getFrameIndexReference(), getFrameIndexReferencePreferSP(), getFrameIndexReferenceSP(), getInitialCFAOffset(), getInitialCFARegister(), hasFP(), isFuncletReturnInstr(), orderFrameObjects(), restoreWin32EHStackPointers(), and X86FrameLowering().
bool llvm::X86FrameLowering::Uses64BitFramePtr |
True if the 64-bit frame or stack pointer should be used.
True for most 64-bit targets with the exception of x32. If this is false, 32-bit instruction operands should be used to manipulate StackPtr and FramePtr.
Definition at line 47 of file X86FrameLowering.h.
Referenced by calculateSetFPREG(), emitEpilogue(), emitPrologue(), emitSPUpdate(), llvm::X86RegisterInfo::getPointerRegClass(), restoreWin32EHStackPointers(), and X86FrameLowering().