LLVM API Documentation
Abstract Stack Frame Information. More...
#include <MachineFrameInfo.h>
Classes | |
| struct | StackObject |
Public Member Functions | |
| MachineFrameInfo (const TargetFrameLowering &tfi, bool RealignOpt) | |
| bool | hasStackObjects () const |
| bool | hasVarSizedObjects () const |
| int | getStackProtectorIndex () const |
| void | setStackProtectorIndex (int I) |
| int | getFunctionContextIndex () const |
| void | setFunctionContextIndex (int I) |
| bool | isFrameAddressTaken () const |
| void | setFrameAddressIsTaken (bool T) |
| bool | isReturnAddressTaken () const |
| void | setReturnAddressIsTaken (bool s) |
| int | getObjectIndexBegin () const |
| int | getObjectIndexEnd () const |
| unsigned | getNumFixedObjects () const |
| getNumFixedObjects - Return the number of fixed objects. | |
| unsigned | getNumObjects () const |
| void | mapLocalFrameObject (int ObjectIndex, int64_t Offset) |
| mapLocalFrameObject - Map a frame index into the local object block | |
| std::pair< int, int64_t > | getLocalFrameObjectMap (int i) |
| getLocalFrameObjectMap - Get the local offset mapping for a for an object | |
| int64_t | getLocalFrameObjectCount () |
| void | setLocalFrameSize (int64_t sz) |
| setLocalFrameSize - Set the size of the local object blob. | |
| int64_t | getLocalFrameSize () const |
| getLocalFrameSize - Get the size of the local object blob. | |
| void | setLocalFrameMaxAlign (unsigned Align) |
| unsigned | getLocalFrameMaxAlign () const |
| bool | getUseLocalStackAllocationBlock () |
| void | setUseLocalStackAllocationBlock (bool v) |
| bool | isObjectPreAllocated (int ObjectIdx) const |
| int64_t | getObjectSize (int ObjectIdx) const |
| void | setObjectSize (int ObjectIdx, int64_t Size) |
| setObjectSize - Change the size of the specified stack object. | |
| unsigned | getObjectAlignment (int ObjectIdx) const |
| getObjectAlignment - Return the alignment of the specified stack object. | |
| void | setObjectAlignment (int ObjectIdx, unsigned Align) |
| setObjectAlignment - Change the alignment of the specified stack object. | |
| const AllocaInst * | getObjectAllocation (int ObjectIdx) const |
| bool | MayNeedStackProtector (int ObjectIdx) const |
| int64_t | getObjectOffset (int ObjectIdx) const |
| void | setObjectOffset (int ObjectIdx, int64_t SPOffset) |
| uint64_t | getStackSize () const |
| void | setStackSize (uint64_t Size) |
| unsigned | estimateStackSize (const MachineFunction &MF) const |
| Estimate and return the size of the stack frame. | |
| int | getOffsetAdjustment () const |
| void | setOffsetAdjustment (int Adj) |
| unsigned | getMaxAlignment () const |
| void | ensureMaxAlignment (unsigned Align) |
| bool | adjustsStack () const |
| void | setAdjustsStack (bool V) |
| bool | hasCalls () const |
| hasCalls - Return true if the current function has any function calls. | |
| void | setHasCalls (bool V) |
| unsigned | getMaxCallFrameSize () const |
| void | setMaxCallFrameSize (unsigned S) |
| int | CreateFixedObject (uint64_t Size, int64_t SPOffset, bool Immutable) |
| bool | isFixedObjectIndex (int ObjectIdx) const |
| bool | isImmutableObjectIndex (int ObjectIdx) const |
| bool | isSpillSlotObjectIndex (int ObjectIdx) const |
| bool | isDeadObjectIndex (int ObjectIdx) const |
| int | CreateStackObject (uint64_t Size, unsigned Alignment, bool isSS, bool MayNeedSP=false, const AllocaInst *Alloca=0) |
| int | CreateSpillStackObject (uint64_t Size, unsigned Alignment) |
| void | RemoveStackObject (int ObjectIdx) |
| int | CreateVariableSizedObject (unsigned Alignment) |
| const std::vector < CalleeSavedInfo > & | getCalleeSavedInfo () const |
| void | setCalleeSavedInfo (const std::vector< CalleeSavedInfo > &CSI) |
| bool | isCalleeSavedInfoValid () const |
| isCalleeSavedInfoValid - Has the callee saved info been calculated yet? | |
| void | setCalleeSavedInfoValid (bool v) |
| BitVector | getPristineRegs (const MachineBasicBlock *MBB) const |
| void | print (const MachineFunction &MF, raw_ostream &OS) const |
| void | dump (const MachineFunction &MF) const |
| dump - Print the function to stderr. | |
Abstract Stack Frame Information.
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted. This class is key to allowing stack frame representation optimizations, such as frame pointer elimination. It also allows more mundane (but still important) optimizations, such as reordering of abstract objects on the stack frame.
To support this, the class assigns unique integer identifiers to stack objects requested clients. These identifiers are negative integers for fixed stack objects (such as arguments passed on the stack) or nonnegative for objects that may be reordered. Instructions which refer to stack objects use a special MO_FrameIndex operand to represent these frame indexes.
Because this class keeps track of all references to the stack frame, it knows when a variable sized object is allocated on the stack. This is the sole condition which prevents frame pointer elimination, which is an important optimization on register-poor architectures. Because original variable sized alloca's in the source program are the only source of variable sized stack objects, it is safe to decide whether there will be any variable sized objects before all stack objects are known (for example, register allocator spill code never needs variable sized objects).
When prolog/epilog code emission is performed, the final stack frame is built and the machine instructions are modified to refer to the actual stack offsets of the object, eliminating all MO_FrameIndex operands from the program.
Definition at line 79 of file MachineFrameInfo.h.
| llvm::MachineFrameInfo::MachineFrameInfo | ( | const TargetFrameLowering & | tfi, |
| bool | RealignOpt | ||
| ) | [inline, explicit] |
Definition at line 227 of file MachineFrameInfo.h.
| bool llvm::MachineFrameInfo::adjustsStack | ( | ) | const [inline] |
AdjustsStack - Return true if this function adjusts the stack -- e.g., when calling another function. This is only valid during and after prolog/epilog code insertion.
Definition at line 446 of file MachineFrameInfo.h.
Referenced by llvm::ARMBaseRegisterInfo::cannotEliminateFrame(), llvm::PPCFrameLowering::determineFrameLayout(), llvm::MBlazeFrameLowering::emitEpilogue(), llvm::Mips16FrameLowering::emitPrologue(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::MBlazeFrameLowering::emitPrologue(), llvm::X86FrameLowering::emitPrologue(), llvm::MipsFrameLowering::estimateStackSize(), estimateStackSize(), llvm::MBlazeFrameLowering::processFunctionBeforeCalleeSavedScan(), and llvm::AArch64FrameLowering::processFunctionBeforeCalleeSavedScan().
| int MachineFrameInfo::CreateFixedObject | ( | uint64_t | Size, |
| int64_t | SPOffset, | ||
| bool | Immutable | ||
| ) |
CreateFixedObject - Create a new object at a fixed location on the stack. All fixed objects should be created before other objects are created for efficiency. By default, fixed objects are immutable. This returns an index with a negative value.
Definition at line 528 of file MachineFunction.cpp.
References Align(), clampStackAlignment(), llvm::TargetFrameLowering::getStackAlignment(), llvm::TargetFrameLowering::isStackRealignable(), llvm::MinAlign(), and Objects.
Referenced by CalculateTailCallArgDest(), EmitTailCallStoreFPAndRetAddr(), EmitTailCallStoreRetAddr(), llvm::MSP430TargetLowering::getReturnAddressFrameIndex(), llvm::X86TargetLowering::getReturnAddressFrameIndex(), llvm::AArch64TargetLowering::LowerCall(), llvm::HexagonTargetLowering::LowerFormalArguments(), llvm::SystemZTargetLowering::LowerFormalArguments(), llvm::SparcTargetLowering::LowerFormalArguments_32(), llvm::SparcTargetLowering::LowerFormalArguments_64(), llvm::PPCFrameLowering::processFunctionBeforeCalleeSavedScan(), llvm::XCoreFrameLowering::processFunctionBeforeCalleeSavedScan(), llvm::MBlazeFrameLowering::processFunctionBeforeCalleeSavedScan(), llvm::X86FrameLowering::processFunctionBeforeCalleeSavedScan(), llvm::MSP430FrameLowering::processFunctionBeforeFrameFinalized(), replaceFrameIndexes(), and llvm::AArch64TargetLowering::SaveVarArgRegisters().
| int MachineFrameInfo::CreateSpillStackObject | ( | uint64_t | Size, |
| unsigned | Alignment | ||
| ) |
CreateSpillStackObject - Create a new statically sized stack object that represents a spill slot, returning a nonnegative identifier to represent it.
Definition at line 499 of file MachineFunction.cpp.
References clampStackAlignment(), CreateStackObject(), ensureMaxAlignment(), llvm::TargetFrameLowering::getStackAlignment(), llvm::TargetFrameLowering::isStackRealignable(), and Objects.
Referenced by llvm::AArch64TargetLowering::EmitF128CSEL().
| int MachineFrameInfo::CreateStackObject | ( | uint64_t | Size, |
| unsigned | Alignment, | ||
| bool | isSS, | ||
| bool | MayNeedSP = false, |
||
| const AllocaInst * | Alloca = 0 |
||
| ) |
CreateStackObject - Create a new statically sized stack object, returning a nonnegative identifier to represent it.
Definition at line 482 of file MachineFunction.cpp.
References clampStackAlignment(), ensureMaxAlignment(), llvm::TargetFrameLowering::getStackAlignment(), llvm::TargetFrameLowering::isStackRealignable(), and Objects.
Referenced by llvm::PPCFrameLowering::addScavengingSpillSlot(), llvm::X86TargetLowering::BuildFILD(), llvm::MipsFunctionInfo::createEhDataRegsFI(), CreateSpillStackObject(), llvm::SelectionDAG::CreateStackTemporary(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), interruptFrameLayout(), llvm::SparcTargetLowering::LowerCall_32(), llvm::SelectionDAGBuilder::LowerCallTo(), llvm::NVPTXTargetLowering::LowerFormalArguments(), llvm::MipsSEFrameLowering::processFunctionBeforeCalleeSavedScan(), llvm::XCoreFrameLowering::processFunctionBeforeCalleeSavedScan(), llvm::AArch64FrameLowering::processFunctionBeforeCalleeSavedScan(), llvm::AArch64TargetLowering::SaveVarArgRegisters(), and llvm::FunctionLoweringInfo::set().
| int MachineFrameInfo::CreateVariableSizedObject | ( | unsigned | Alignment | ) |
CreateVariableSizedObject - Notify the MachineFrameInfo object that a variable sized object has been created. This must be created whenever a variable sized object is created, whether or not the index returned is actually used.
Definition at line 514 of file MachineFunction.cpp.
References clampStackAlignment(), ensureMaxAlignment(), llvm::TargetFrameLowering::getStackAlignment(), llvm::TargetFrameLowering::isStackRealignable(), and Objects.
| void MachineFrameInfo::dump | ( | const MachineFunction & | MF | ) | const |
dump - Print the function to stderr.
Definition at line 663 of file MachineFunction.cpp.
References llvm::dbgs(), and print().
| void MachineFrameInfo::ensureMaxAlignment | ( | unsigned | Align | ) |
ensureMaxAlignment - Make sure the function is at least Align bytes aligned.
Definition at line 461 of file MachineFunction.cpp.
References Align(), llvm::TargetFrameLowering::getStackAlignment(), and llvm::TargetFrameLowering::isStackRealignable().
Referenced by llvm::CCState::AllocateStack(), CreateSpillStackObject(), CreateStackObject(), CreateVariableSizedObject(), llvm::CCState::HandleByVal(), llvm::MachineFunction::MachineFunction(), and setObjectAlignment().
| unsigned MachineFrameInfo::estimateStackSize | ( | const MachineFunction & | MF | ) | const |
Estimate and return the size of the stack frame.
Definition at line 577 of file MachineFunction.cpp.
References adjustsStack(), Align(), llvm::TargetMachine::getFrameLowering(), getMaxAlignment(), getMaxCallFrameSize(), getObjectAlignment(), getObjectIndexBegin(), getObjectIndexEnd(), getObjectOffset(), getObjectSize(), llvm::TargetMachine::getRegisterInfo(), llvm::TargetFrameLowering::getStackAlignment(), llvm::MachineFunction::getTarget(), llvm::TargetFrameLowering::getTransientStackAlignment(), llvm::TargetFrameLowering::hasReservedCallFrame(), hasVarSizedObjects(), isDeadObjectIndex(), and llvm::TargetRegisterInfo::needsStackRealignment().
Referenced by llvm::PPCFrameLowering::determineFrameLayout(), and llvm::AArch64FrameLowering::processFunctionBeforeCalleeSavedScan().
| const std::vector<CalleeSavedInfo>& llvm::MachineFrameInfo::getCalleeSavedInfo | ( | ) | const [inline] |
getCalleeSavedInfo - Returns a reference to call saved info vector for the current function.
Definition at line 527 of file MachineFrameInfo.h.
Referenced by llvm::AArch64RegisterInfo::eliminateFrameIndex(), llvm::X86FrameLowering::emitCalleeSavedFrameMoves(), llvm::MipsSEFrameLowering::emitEpilogue(), llvm::AArch64FrameLowering::emitEpilogue(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::Thumb1FrameLowering::emitPrologue(), llvm::ARMFrameLowering::emitPrologue(), llvm::PPCFrameLowering::emitPrologue(), llvm::SystemZFrameLowering::emitPrologue(), llvm::AArch64FrameLowering::emitPrologue(), getPristineRegs(), llvm::MipsAsmPrinter::printSavedRegsBitmask(), and llvm::PPCFrameLowering::processFunctionBeforeFrameFinalized().
| int llvm::MachineFrameInfo::getFunctionContextIndex | ( | ) | const [inline] |
getFunctionContextIndex/setFunctionContextIndex - Return the index for the function context object. This object is used for SjLj exceptions.
Definition at line 263 of file MachineFrameInfo.h.
| unsigned llvm::MachineFrameInfo::getLocalFrameMaxAlign | ( | ) | const [inline] |
getLocalFrameMaxAlign - Return the required alignment of the local object blob.
Definition at line 322 of file MachineFrameInfo.h.
Referenced by llvm::ARMBaseRegisterInfo::needsFrameBaseReg().
| int64_t llvm::MachineFrameInfo::getLocalFrameObjectCount | ( | ) | [inline] |
getLocalFrameObjectCount - Return the number of objects allocated into the local object block.
Definition at line 308 of file MachineFrameInfo.h.
References llvm::SmallVectorTemplateCommon< T, typename >::size().
| std::pair<int, int64_t> llvm::MachineFrameInfo::getLocalFrameObjectMap | ( | int | i | ) | [inline] |
getLocalFrameObjectMap - Get the local offset mapping for a for an object
Definition at line 300 of file MachineFrameInfo.h.
References llvm::SmallVectorTemplateCommon< T, typename >::size().
| int64_t llvm::MachineFrameInfo::getLocalFrameSize | ( | ) | const [inline] |
getLocalFrameSize - Get the size of the local object blob.
Definition at line 314 of file MachineFrameInfo.h.
Referenced by llvm::ARMBaseRegisterInfo::hasBasePointer(), and llvm::ARMBaseRegisterInfo::needsFrameBaseReg().
| unsigned llvm::MachineFrameInfo::getMaxAlignment | ( | ) | const [inline] |
getMaxAlignment - Return the alignment in bytes that this function must be aligned to, which is greater than the default stack alignment provided by the target.
Definition at line 437 of file MachineFrameInfo.h.
Referenced by llvm::PPCFrameLowering::determineFrameLayout(), emitAlignedDPRCS2Spills(), llvm::PPCFrameLowering::emitEpilogue(), llvm::X86FrameLowering::emitEpilogue(), llvm::ARMFrameLowering::emitPrologue(), llvm::PPCFrameLowering::emitPrologue(), llvm::X86FrameLowering::emitPrologue(), llvm::MipsFrameLowering::estimateStackSize(), estimateStackSize(), llvm::PPCRegisterInfo::lowerDynamicAlloc(), llvm::X86RegisterInfo::needsStackRealignment(), and llvm::ARMBaseRegisterInfo::needsStackRealignment().
| unsigned llvm::MachineFrameInfo::getMaxCallFrameSize | ( | ) | const [inline] |
getMaxCallFrameSize - Return the maximum size of a call frame that must be allocated for an outgoing function call. This is only available if CallFrameSetup/Destroy pseudo instructions are used by the target, and then only during or after prolog/epilog code insertion.
Definition at line 458 of file MachineFrameInfo.h.
Referenced by llvm::PPCFrameLowering::determineFrameLayout(), llvm::HexagonFrameLowering::emitPrologue(), llvm::MipsFrameLowering::estimateStackSize(), estimateStackSize(), llvm::MipsSEFrameLowering::hasReservedCallFrame(), llvm::Mips16FrameLowering::hasReservedCallFrame(), llvm::Thumb1FrameLowering::hasReservedCallFrame(), llvm::ARMFrameLowering::hasReservedCallFrame(), and llvm::PPCRegisterInfo::lowerDynamicAlloc().
| unsigned llvm::MachineFrameInfo::getNumFixedObjects | ( | ) | const [inline] |
getNumFixedObjects - Return the number of fixed objects.
Definition at line 287 of file MachineFrameInfo.h.
| unsigned llvm::MachineFrameInfo::getNumObjects | ( | ) | const [inline] |
getNumObjects - Return the number of objects.
Definition at line 291 of file MachineFrameInfo.h.
Referenced by llvm::AMDGPUFrameLowering::getFrameIndexOffset(), llvm::R600InstrInfo::getIndirectIndexBegin(), and llvm::R600InstrInfo::getIndirectIndexEnd().
| unsigned llvm::MachineFrameInfo::getObjectAlignment | ( | int | ObjectIdx | ) | const [inline] |
getObjectAlignment - Return the alignment of the specified stack object.
Definition at line 360 of file MachineFrameInfo.h.
Referenced by llvm::addFrameReference(), AdjustStackOffset(), llvm::AArch64FrameLowering::emitFrameMemOps(), estimateStackSize(), llvm::TargetInstrInfo::foldMemoryOperand(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::X86FrameLowering::getFrameIndexOffset(), getMemcpyLoadsAndStores(), getMemmoveLoadsAndStores(), llvm::MipsInstrInfo::GetMemOperand(), getMemsetStores(), llvm::SelectionDAG::InferPtrAlignment(), llvm::Thumb1InstrInfo::loadRegFromStackSlot(), llvm::Thumb2InstrInfo::loadRegFromStackSlot(), llvm::AArch64InstrInfo::loadRegFromStackSlot(), llvm::MSP430InstrInfo::loadRegFromStackSlot(), llvm::HexagonInstrInfo::loadRegFromStackSlot(), llvm::ARMBaseInstrInfo::loadRegFromStackSlot(), llvm::PPCInstrInfo::loadRegFromStackSlot(), llvm::Thumb1InstrInfo::storeRegToStackSlot(), llvm::Thumb2InstrInfo::storeRegToStackSlot(), llvm::AArch64InstrInfo::storeRegToStackSlot(), llvm::MSP430InstrInfo::storeRegToStackSlot(), llvm::HexagonInstrInfo::storeRegToStackSlot(), llvm::ARMBaseInstrInfo::storeRegToStackSlot(), and llvm::PPCInstrInfo::storeRegToStackSlot().
| const AllocaInst* llvm::MachineFrameInfo::getObjectAllocation | ( | int | ObjectIdx | ) | const [inline] |
getObjectAllocation - Return the underlying Alloca of the specified stack object if it exists. Returns 0 if none exists.
Definition at line 376 of file MachineFrameInfo.h.
Referenced by llvm::AMDGPUFrameLowering::getFrameIndexOffset().
| int llvm::MachineFrameInfo::getObjectIndexBegin | ( | ) | const [inline] |
getObjectIndexBegin - Return the minimum frame object index.
Definition at line 280 of file MachineFrameInfo.h.
Referenced by llvm::VirtRegMap::assignVirt2StackSlot(), llvm::MipsFrameLowering::estimateStackSize(), estimateStackSize(), llvm::AMDGPUFrameLowering::getFrameIndexOffset(), llvm::X86RegisterInfo::hasReservedSpillSlot(), llvm::X86FrameLowering::processFunctionBeforeCalleeSavedScan(), and llvm::MSP430FrameLowering::processFunctionBeforeFrameFinalized().
| int llvm::MachineFrameInfo::getObjectIndexEnd | ( | ) | const [inline] |
getObjectIndexEnd - Return one past the maximum frame object index.
Definition at line 284 of file MachineFrameInfo.h.
Referenced by llvm::MipsFrameLowering::estimateStackSize(), estimateStackSize(), and INITIALIZE_PASS().
| int64_t llvm::MachineFrameInfo::getObjectOffset | ( | int | ObjectIdx | ) | const [inline] |
getObjectOffset - Return the assigned stack offset of the specified object from the incoming stack pointer.
Definition at line 393 of file MachineFrameInfo.h.
References isDeadObjectIndex().
Referenced by llvm::AArch64TargetLowering::addTokenForArgument(), llvm::SparcRegisterInfo::eliminateFrameIndex(), llvm::MSP430RegisterInfo::eliminateFrameIndex(), llvm::MBlazeRegisterInfo::eliminateFrameIndex(), llvm::NVPTXRegisterInfo::eliminateFrameIndex(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::MipsRegisterInfo::eliminateFrameIndex(), llvm::HexagonRegisterInfo::eliminateFrameIndex(), llvm::Thumb1RegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::X86FrameLowering::emitCalleeSavedFrameMoves(), llvm::XCoreFrameLowering::emitEpilogue(), llvm::PPCFrameLowering::emitEpilogue(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::XCoreFrameLowering::emitPrologue(), llvm::Thumb1FrameLowering::emitPrologue(), llvm::ARMFrameLowering::emitPrologue(), llvm::PPCFrameLowering::emitPrologue(), llvm::AArch64FrameLowering::emitPrologue(), llvm::MipsFrameLowering::estimateStackSize(), estimateStackSize(), llvm::TargetInstrInfo::foldMemoryOperand(), llvm::HexagonFrameLowering::getFrameIndexOffset(), llvm::SystemZFrameLowering::getFrameIndexOffset(), llvm::X86FrameLowering::getFrameIndexOffset(), llvm::TargetFrameLowering::getFrameIndexOffset(), llvm::SelectionDAG::isConsecutiveLoad(), MatchingStackOffset(), llvm::PPCFrameLowering::processFunctionBeforeFrameFinalized(), llvm::ARMFrameLowering::ResolveFrameIndexReference(), llvm::AArch64FrameLowering::resolveFrameIndexReference(), and llvm::rewriteA64FrameIndex().
| int64_t llvm::MachineFrameInfo::getObjectSize | ( | int | ObjectIdx | ) | const [inline] |
getObjectSize - Return the size of the specified object.
Definition at line 346 of file MachineFrameInfo.h.
Referenced by llvm::addFrameReference(), llvm::AArch64TargetLowering::addTokenForArgument(), AdjustStackOffset(), analyzeFrameIndexes(), llvm::MipsFrameLowering::estimateStackSize(), estimateStackSize(), llvm::TargetInstrInfo::foldMemoryOperand(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::MipsInstrInfo::GetMemOperand(), llvm::SelectionDAG::isConsecutiveLoad(), llvm::Thumb1InstrInfo::loadRegFromStackSlot(), llvm::Thumb2InstrInfo::loadRegFromStackSlot(), llvm::AArch64InstrInfo::loadRegFromStackSlot(), llvm::MSP430InstrInfo::loadRegFromStackSlot(), llvm::HexagonInstrInfo::loadRegFromStackSlot(), llvm::ARMBaseInstrInfo::loadRegFromStackSlot(), llvm::PPCInstrInfo::loadRegFromStackSlot(), MatchingStackOffset(), llvm::Thumb1InstrInfo::storeRegToStackSlot(), llvm::Thumb2InstrInfo::storeRegToStackSlot(), llvm::AArch64InstrInfo::storeRegToStackSlot(), llvm::MSP430InstrInfo::storeRegToStackSlot(), llvm::HexagonInstrInfo::storeRegToStackSlot(), llvm::ARMBaseInstrInfo::storeRegToStackSlot(), llvm::PPCInstrInfo::storeRegToStackSlot(), and llvm::X86InstrInfo::storeRegToStackSlot().
| int llvm::MachineFrameInfo::getOffsetAdjustment | ( | ) | const [inline] |
getOffsetAdjustment - Return the correction for frame offsets.
Definition at line 427 of file MachineFrameInfo.h.
Referenced by llvm::Thumb1FrameLowering::emitPrologue(), llvm::ARMFrameLowering::emitPrologue(), llvm::SystemZFrameLowering::getFrameIndexOffset(), and llvm::TargetFrameLowering::getFrameIndexOffset().
| BitVector MachineFrameInfo::getPristineRegs | ( | const MachineBasicBlock * | MBB | ) | const |
getPristineRegs - Return a set of physical registers that are pristine on entry to the MBB.
Pristine registers hold a value that is useless to the current function, but that must be preserved - they are callee saved registers that have not been saved yet.
Before the PrologueEpilogueInserter has placed the CSR spill code, this method always returns an empty set.
Definition at line 548 of file MachineFunction.cpp.
References llvm::MachineFunction::front(), getCalleeSavedInfo(), llvm::TargetRegisterInfo::getCalleeSavedRegs(), llvm::MCRegisterInfo::getNumRegs(), llvm::MachineBasicBlock::getParent(), llvm::TargetMachine::getRegisterInfo(), llvm::MachineFunction::getTarget(), I, isCalleeSavedInfoValid(), and llvm::BitVector::set().
Referenced by llvm::RegScavenger::initRegState(), llvm::CriticalAntiDepBreaker::StartBlock(), and llvm::AggressiveAntiDepBreaker::StartBlock().
| int llvm::MachineFrameInfo::getStackProtectorIndex | ( | ) | const [inline] |
getStackProtectorIndex/setStackProtectorIndex - Return the index for the stack protector object.
Definition at line 258 of file MachineFrameInfo.h.
| uint64_t llvm::MachineFrameInfo::getStackSize | ( | ) | const [inline] |
getStackSize - Return the number of bytes that must be allocated to hold all of the fixed size frame objects. This is only valid after Prolog/Epilog code insertion has finalized the stack frame layout.
Definition at line 416 of file MachineFrameInfo.h.
Referenced by llvm::X86FrameLowering::adjustForHiPEPrologue(), llvm::X86FrameLowering::adjustForSegmentedStacks(), llvm::PPCFrameLowering::determineFrameLayout(), determineFrameLayout(), llvm::MSP430RegisterInfo::eliminateFrameIndex(), llvm::MBlazeRegisterInfo::eliminateFrameIndex(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::MipsRegisterInfo::eliminateFrameIndex(), llvm::Thumb1RegisterInfo::eliminateFrameIndex(), llvm::HexagonRegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::Mips16FrameLowering::emitEpilogue(), llvm::MipsSEFrameLowering::emitEpilogue(), llvm::XCoreFrameLowering::emitEpilogue(), llvm::MSP430FrameLowering::emitEpilogue(), llvm::Thumb1FrameLowering::emitEpilogue(), llvm::ARMFrameLowering::emitEpilogue(), llvm::MBlazeFrameLowering::emitEpilogue(), llvm::PPCFrameLowering::emitEpilogue(), llvm::AArch64FrameLowering::emitEpilogue(), llvm::X86FrameLowering::emitEpilogue(), llvm::MipsAsmPrinter::emitFrameDirective(), llvm::Mips16FrameLowering::emitPrologue(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::XCoreFrameLowering::emitPrologue(), llvm::HexagonFrameLowering::emitPrologue(), llvm::SparcFrameLowering::emitPrologue(), llvm::MSP430FrameLowering::emitPrologue(), llvm::Thumb1FrameLowering::emitPrologue(), llvm::ARMFrameLowering::emitPrologue(), llvm::MBlazeFrameLowering::emitPrologue(), llvm::AArch64FrameLowering::emitPrologue(), llvm::X86FrameLowering::emitPrologue(), llvm::SystemZFrameLowering::getAllocatedStackSize(), llvm::SystemZFrameLowering::getEmergencySpillSlotSize(), llvm::X86FrameLowering::getFrameIndexOffset(), llvm::TargetFrameLowering::getFrameIndexOffset(), llvm::PPCFrameLowering::hasFP(), llvm::HexagonFrameLowering::hasFP(), llvm::PPCRegisterInfo::lowerDynamicAlloc(), and llvm::ARMFrameLowering::ResolveFrameIndexReference().
| bool llvm::MachineFrameInfo::getUseLocalStackAllocationBlock | ( | ) | [inline] |
getUseLocalStackAllocationBlock - Get whether the local allocation blob should be allocated together or let PEI allocate the locals in it directly.
Definition at line 327 of file MachineFrameInfo.h.
| bool llvm::MachineFrameInfo::hasCalls | ( | ) | const [inline] |
hasCalls - Return true if the current function has any function calls.
Definition at line 450 of file MachineFrameInfo.h.
Referenced by llvm::X86FrameLowering::adjustForHiPEPrologue(), llvm::TargetOptions::DisableFramePointerElim(), llvm::X86FrameLowering::emitEpilogue(), llvm::X86FrameLowering::emitPrologue(), llvm::SystemZFrameLowering::getAllocatedStackSize(), llvm::HexagonFrameLowering::hasFP(), llvm::ARMFrameLowering::hasFP(), llvm::AArch64FrameLowering::hasFP(), llvm::SystemZFrameLowering::processFunctionBeforeCalleeSavedScan(), and llvm::SelectionDAGISel::runOnMachineFunction().
| bool llvm::MachineFrameInfo::hasStackObjects | ( | ) | const [inline] |
hasStackObjects - Return true if there are any stack objects in this function.
Definition at line 247 of file MachineFrameInfo.h.
Referenced by llvm::NVPTXFrameLowering::emitPrologue().
| bool llvm::MachineFrameInfo::hasVarSizedObjects | ( | ) | const [inline] |
hasVarSizedObjects - This method may be called any time after instruction selection is complete to determine if the stack frame for this function contains any variable sized objects.
Definition at line 253 of file MachineFrameInfo.h.
Referenced by llvm::PPCFrameLowering::addScavengingSpillSlot(), llvm::ARMBaseRegisterInfo::cannotEliminateFrame(), llvm::X86RegisterInfo::canRealignStack(), llvm::ARMFrameLowering::canSimplifyCallFramePseudos(), llvm::PPCFrameLowering::determineFrameLayout(), llvm::HexagonRegisterInfo::eliminateFrameIndex(), llvm::Thumb1RegisterInfo::eliminateFrameIndex(), llvm::ARMBaseRegisterInfo::eliminateFrameIndex(), llvm::MSP430FrameLowering::emitEpilogue(), llvm::PPCFrameLowering::emitEpilogue(), llvm::AArch64FrameLowering::emitEpilogue(), llvm::X86FrameLowering::emitEpilogue(), llvm::Thumb1FrameLowering::emitPrologue(), llvm::ARMFrameLowering::emitPrologue(), llvm::X86FrameLowering::emitPrologue(), estimateStackSize(), llvm::SystemZFrameLowering::getAllocatedStackSize(), llvm::R600InstrInfo::getIndirectIndexEnd(), llvm::X86RegisterInfo::hasBasePointer(), llvm::ARMBaseRegisterInfo::hasBasePointer(), llvm::MipsFrameLowering::hasFP(), llvm::SparcFrameLowering::hasFP(), llvm::XCoreFrameLowering::hasFP(), llvm::MBlazeFrameLowering::hasFP(), llvm::ARMFrameLowering::hasFP(), llvm::MSP430FrameLowering::hasFP(), llvm::SystemZFrameLowering::hasFP(), llvm::X86FrameLowering::hasFP(), llvm::AArch64FrameLowering::hasFP(), llvm::MipsSEFrameLowering::hasReservedCallFrame(), llvm::SparcFrameLowering::hasReservedCallFrame(), llvm::Mips16FrameLowering::hasReservedCallFrame(), llvm::Thumb1FrameLowering::hasReservedCallFrame(), llvm::ARMFrameLowering::hasReservedCallFrame(), llvm::MSP430FrameLowering::hasReservedCallFrame(), llvm::X86FrameLowering::hasReservedCallFrame(), llvm::AArch64FrameLowering::hasReservedCallFrame(), llvm::PPCFrameLowering::needsFP(), llvm::ARMBaseRegisterInfo::needsFrameBaseReg(), llvm::AArch64FrameLowering::processFunctionBeforeCalleeSavedScan(), and llvm::AArch64FrameLowering::useFPForAddressing().
| bool llvm::MachineFrameInfo::isCalleeSavedInfoValid | ( | ) | const [inline] |
isCalleeSavedInfoValid - Has the callee saved info been calculated yet?
Definition at line 538 of file MachineFrameInfo.h.
Referenced by getPristineRegs().
| bool llvm::MachineFrameInfo::isDeadObjectIndex | ( | int | ObjectIdx | ) | const [inline] |
isDeadObjectIndex - Returns true if the specified index corresponds to a dead object.
Definition at line 493 of file MachineFrameInfo.h.
Referenced by estimateStackSize(), getObjectOffset(), and setObjectOffset().
| bool llvm::MachineFrameInfo::isFixedObjectIndex | ( | int | ObjectIdx | ) | const [inline] |
isFixedObjectIndex - Returns true if the specified index corresponds to a fixed stack object.
Definition at line 471 of file MachineFrameInfo.h.
Referenced by analyzeFrameIndexes(), llvm::MBlazeRegisterInfo::eliminateFrameIndex(), getMemcpyLoadsAndStores(), getMemmoveLoadsAndStores(), getMemsetStores(), llvm::FixedStackPseudoSourceValue::isAliased(), MatchingStackOffset(), and llvm::ARMFrameLowering::ResolveFrameIndexReference().
| bool llvm::MachineFrameInfo::isFrameAddressTaken | ( | ) | const [inline] |
isFrameAddressTaken - This method may be called any time after instruction selection is complete to determine if there is a call to @llvm.frameaddress in this function.
Definition at line 269 of file MachineFrameInfo.h.
Referenced by llvm::ARMBaseRegisterInfo::cannotEliminateFrame(), llvm::PPCFrameLowering::emitPrologue(), llvm::MipsFrameLowering::hasFP(), llvm::SparcFrameLowering::hasFP(), llvm::ARMFrameLowering::hasFP(), llvm::MSP430FrameLowering::hasFP(), llvm::X86FrameLowering::hasFP(), and llvm::AArch64FrameLowering::hasFP().
| bool llvm::MachineFrameInfo::isImmutableObjectIndex | ( | int | ObjectIdx | ) | const [inline] |
isImmutableObjectIndex - Returns true if the specified index corresponds to an immutable object.
Definition at line 477 of file MachineFrameInfo.h.
Referenced by llvm::FixedStackPseudoSourceValue::isConstant().
| bool llvm::MachineFrameInfo::isObjectPreAllocated | ( | int | ObjectIdx | ) | const [inline] |
isObjectPreAllocated - Return true if the object was pre-allocated into the local block.
Definition at line 338 of file MachineFrameInfo.h.
| bool llvm::MachineFrameInfo::isReturnAddressTaken | ( | ) | const [inline] |
isReturnAddressTaken - This method may be called any time after instruction selection is complete to determine if there is a call to @llvm.returnaddress in this function.
Definition at line 275 of file MachineFrameInfo.h.
Referenced by llvm::AArch64FrameLowering::determinePrologueDeath(), llvm::Mips16FrameLowering::spillCalleeSavedRegisters(), llvm::MipsSEFrameLowering::spillCalleeSavedRegisters(), and llvm::Thumb1FrameLowering::spillCalleeSavedRegisters().
| bool llvm::MachineFrameInfo::isSpillSlotObjectIndex | ( | int | ObjectIdx | ) | const [inline] |
isSpillSlotObjectIndex - Returns true if the specified index corresponds to a spill slot..
Definition at line 485 of file MachineFrameInfo.h.
Referenced by llvm::MBlazeRegisterInfo::eliminateFrameIndex(), emitComments(), llvm::FixedStackPseudoSourceValue::isAliased(), and llvm::FixedStackPseudoSourceValue::mayAlias().
| void llvm::MachineFrameInfo::mapLocalFrameObject | ( | int | ObjectIndex, |
| int64_t | Offset | ||
| ) | [inline] |
mapLocalFrameObject - Map a frame index into the local object block
Definition at line 294 of file MachineFrameInfo.h.
References llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().
| bool llvm::MachineFrameInfo::MayNeedStackProtector | ( | int | ObjectIdx | ) | const [inline] |
NeedsStackProtector - Returns true if the object may need stack protectors.
Definition at line 384 of file MachineFrameInfo.h.
| void MachineFrameInfo::print | ( | const MachineFunction & | MF, |
| raw_ostream & | OS | ||
| ) | const |
print - Used by the MachineFunction printer to print information about stack objects. Implemented in MachineFunction.cpp
Definition at line 626 of file MachineFunction.cpp.
References llvm::TargetMachine::getFrameLowering(), llvm::TargetFrameLowering::getOffsetOfLocalArea(), llvm::MachineFunction::getTarget(), and Objects.
Referenced by dump(), and llvm::MachineFunction::print().
| void llvm::MachineFrameInfo::RemoveStackObject | ( | int | ObjectIdx | ) | [inline] |
RemoveStackObject - Remove or mark dead a statically sized stack object.
Definition at line 513 of file MachineFrameInfo.h.
Referenced by replaceFrameIndexes().
| void llvm::MachineFrameInfo::setAdjustsStack | ( | bool | V | ) | [inline] |
Definition at line 447 of file MachineFrameInfo.h.
Referenced by GetTLSADDR().
| void llvm::MachineFrameInfo::setCalleeSavedInfo | ( | const std::vector< CalleeSavedInfo > & | CSI | ) | [inline] |
setCalleeSavedInfo - Used by prolog/epilog inserter to set the function's callee saved information.
Definition at line 533 of file MachineFrameInfo.h.
| void llvm::MachineFrameInfo::setCalleeSavedInfoValid | ( | bool | v | ) | [inline] |
Definition at line 540 of file MachineFrameInfo.h.
| void llvm::MachineFrameInfo::setFrameAddressIsTaken | ( | bool | T | ) | [inline] |
Definition at line 270 of file MachineFrameInfo.h.
References T.
Referenced by llvm::MSP430TargetLowering::LowerFRAMEADDR(), llvm::HexagonTargetLowering::LowerFRAMEADDR(), LowerFRAMEADDR(), and LowerINTRINSIC_W_CHAIN().
| void llvm::MachineFrameInfo::setFunctionContextIndex | ( | int | I | ) | [inline] |
Definition at line 264 of file MachineFrameInfo.h.
References I.
| void llvm::MachineFrameInfo::setHasCalls | ( | bool | V | ) | [inline] |
Definition at line 451 of file MachineFrameInfo.h.
Referenced by llvm::SelectionDAGISel::runOnMachineFunction().
| void llvm::MachineFrameInfo::setLocalFrameMaxAlign | ( | unsigned | Align | ) | [inline] |
setLocalFrameMaxAlign - Required alignment of the local object blob, which is the strictest alignment of any object in it.
Definition at line 318 of file MachineFrameInfo.h.
References Align().
| void llvm::MachineFrameInfo::setLocalFrameSize | ( | int64_t | sz | ) | [inline] |
setLocalFrameSize - Set the size of the local object blob.
Definition at line 311 of file MachineFrameInfo.h.
| void llvm::MachineFrameInfo::setMaxCallFrameSize | ( | unsigned | S | ) | [inline] |
Definition at line 459 of file MachineFrameInfo.h.
Referenced by llvm::PPCFrameLowering::determineFrameLayout().
| void llvm::MachineFrameInfo::setObjectAlignment | ( | int | ObjectIdx, |
| unsigned | Align | ||
| ) | [inline] |
setObjectAlignment - Change the alignment of the specified stack object.
Definition at line 367 of file MachineFrameInfo.h.
References Align(), and ensureMaxAlignment().
Referenced by emitAlignedDPRCS2Spills(), getMemcpyLoadsAndStores(), getMemmoveLoadsAndStores(), and getMemsetStores().
| void llvm::MachineFrameInfo::setObjectOffset | ( | int | ObjectIdx, |
| int64_t | SPOffset | ||
| ) | [inline] |
setObjectOffset - Set the stack frame offset of the specified object. The offset is relative to the stack pointer on entry to the function.
Definition at line 404 of file MachineFrameInfo.h.
References isDeadObjectIndex().
Referenced by llvm::MBlazeFunctionInfo::adjustLoadArgsFI(), AdjustStackOffset(), llvm::MBlazeFunctionInfo::adjustStoreVarArgsFI(), llvm::PPCFrameLowering::processFunctionBeforeFrameFinalized(), and llvm::MBlazeRegisterInfo::processFunctionBeforeFrameFinalized().
| void llvm::MachineFrameInfo::setObjectSize | ( | int | ObjectIdx, |
| int64_t | Size | ||
| ) | [inline] |
setObjectSize - Change the size of the specified stack object.
Definition at line 353 of file MachineFrameInfo.h.
| void llvm::MachineFrameInfo::setOffsetAdjustment | ( | int | Adj | ) | [inline] |
setOffsetAdjustment - Set the correction for frame offsets.
Definition at line 431 of file MachineFrameInfo.h.
Referenced by llvm::MSP430FrameLowering::emitPrologue(), llvm::Thumb1FrameLowering::emitPrologue(), llvm::ARMFrameLowering::emitPrologue(), llvm::AArch64FrameLowering::emitPrologue(), and llvm::X86FrameLowering::emitPrologue().
| void llvm::MachineFrameInfo::setReturnAddressIsTaken | ( | bool | s | ) | [inline] |
Definition at line 276 of file MachineFrameInfo.h.
Referenced by LowerINTRINSIC_W_CHAIN(), llvm::MSP430TargetLowering::LowerRETURNADDR(), llvm::HexagonTargetLowering::LowerRETURNADDR(), and LowerRETURNADDR().
| void llvm::MachineFrameInfo::setStackProtectorIndex | ( | int | I | ) | [inline] |
Definition at line 259 of file MachineFrameInfo.h.
References I.
| void llvm::MachineFrameInfo::setStackSize | ( | uint64_t | Size | ) | [inline] |
setStackSize - Set the size of the stack...
Definition at line 420 of file MachineFrameInfo.h.
Referenced by llvm::PPCFrameLowering::determineFrameLayout(), determineFrameLayout(), llvm::Thumb1FrameLowering::emitPrologue(), and llvm::X86FrameLowering::emitPrologue().
| void llvm::MachineFrameInfo::setUseLocalStackAllocationBlock | ( | bool | v | ) | [inline] |
setUseLocalStackAllocationBlock - Set whether the local allocation blob should be allocated together or let PEI allocate the locals in it directly.
Definition at line 332 of file MachineFrameInfo.h.
Referenced by INITIALIZE_PASS().