|
LLVM
10.0.0
|
#include "X86FrameLowering.h"#include "X86InstrBuilder.h"#include "X86InstrInfo.h"#include "X86MachineFunctionInfo.h"#include "X86Subtarget.h"#include "X86TargetMachine.h"#include "llvm/ADT/SmallSet.h"#include "llvm/Analysis/EHPersonalities.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/WinEHFuncInfo.h"#include "llvm/IR/DataLayout.h"#include "llvm/IR/Function.h"#include "llvm/MC/MCAsmInfo.h"#include "llvm/MC/MCSymbol.h"#include "llvm/Support/Debug.h"#include "llvm/Target/TargetOptions.h"#include <cstdlib>Go to the source code of this file.
Functions | |
| static unsigned | getSUBriOpcode (bool IsLP64, int64_t Imm) |
| static unsigned | getADDriOpcode (bool IsLP64, int64_t Imm) |
| static unsigned | getSUBrrOpcode (bool IsLP64) |
| static unsigned | getADDrrOpcode (bool IsLP64) |
| static unsigned | getANDriOpcode (bool IsLP64, int64_t Imm) |
| static unsigned | getLEArOpcode (bool IsLP64) |
| static unsigned | findDeadCallerSavedReg (MachineBasicBlock &MBB, MachineBasicBlock::iterator &MBBI, const X86RegisterInfo *TRI, bool Is64Bit) |
| findDeadCallerSavedReg - Return a caller-saved register that isn't live when it reaches the "return" instruction. More... | |
| static bool | isEAXLiveIn (MachineBasicBlock &MBB) |
| static bool | flagsNeedToBePreservedBeforeTheTerminators (const MachineBasicBlock &MBB) |
| Check if the flags need to be preserved before the terminators. More... | |
| static unsigned | calculateSetFPREG (uint64_t SPAdjust) |
| static bool | isFuncletReturnInstr (MachineInstr &MI) |
| static bool | isTailCallOpcode (unsigned Opc) |
| static bool | HasNestArgument (const MachineFunction *MF) |
| static unsigned | GetScratchRegister (bool Is64Bit, bool IsLP64, const MachineFunction &MF, bool Primary) |
| GetScratchRegister - Get a temp register for performing work in the segmented stack and the Erlang/HiPE stack prologue. More... | |
| static unsigned | getHiPELiteral (NamedMDNode *HiPELiteralsMD, const StringRef LiteralName) |
| Lookup an ERTS parameter in the !hipe.literals named metadata node. More... | |
| static bool | blockEndIsUnreachable (const MachineBasicBlock &MBB, MachineBasicBlock::const_iterator MBBI) |
Variables | |
| static const uint64_t | kSplitStackAvailable = 256 |
|
static |
Definition at line 2554 of file X86FrameLowering.cpp.
References llvm::all_of(), llvm::MachineBasicBlock::end(), MI, llvm::MachineBasicBlock::succ_begin(), and llvm::MachineBasicBlock::succ_end().
Referenced by llvm::X86FrameLowering::eliminateCallFramePseudoInstr().
|
static |
Definition at line 834 of file X86FrameLowering.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::BuildMI(), llvm::MachineInstr::FrameSetup, getANDriOpcode(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getFunction(), llvm::MachineFrameInfo::getMaxAlignment(), llvm::MachineInstr::getOperand(), llvm::TargetFrameLowering::getStackAlignment(), llvm::MachineFrameInfo::hasCalls(), llvm::Function::hasFnAttribute(), MI, Reg, llvm::MachineOperand::setIsDead(), llvm::MachineInstrBuilder::setMIFlag(), llvm::X86FrameLowering::SlotSize, llvm::X86FrameLowering::TII, and llvm::X86FrameLowering::Uses64BitFramePtr.
Referenced by llvm::X86FrameLowering::emitEpilogue(), and llvm::X86FrameLowering::getFrameIndexReference().
|
static |
findDeadCallerSavedReg - Return a caller-saved register that isn't live when it reaches the "return" instruction.
We can then pop a stack object to this register without worry about clobbering it.
Definition at line 145 of file X86FrameLowering.cpp.
References llvm::MachineFunction::callsEHReturn(), llvm::SmallSet< T, N, C >::count(), llvm::numbers::e, llvm::ISD::EH_RETURN, llvm::MachineBasicBlock::end(), llvm::N86::ESP, llvm::X86RegisterInfo::getGPRsForTailCall(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getReg(), llvm::SmallSet< T, N, C >::insert(), llvm::MachineOperand::isDef(), llvm::MachineOperand::isReg(), llvm::MCRegAliasIterator::isValid(), Reg, and llvm::ARCISD::RET.
Referenced by llvm::X86FrameLowering::emitSPUpdate().
|
static |
Check if the flags need to be preserved before the terminators.
This would be the case, if the eflags is live-in of the region composed by the terminators or live-out of that region, without being defined by a terminator.
Definition at line 213 of file X86FrameLowering.cpp.
References MI, Reg, llvm::MachineBasicBlock::successors(), and llvm::MachineBasicBlock::terminators().
Referenced by llvm::X86FrameLowering::canUseAsEpilogue(), and llvm::X86FrameLowering::emitSPUpdate().
Definition at line 107 of file X86FrameLowering.cpp.
References llvm::isInt< 8 >().
Referenced by llvm::X86FrameLowering::emitSPUpdate(), and llvm::X86FrameLowering::restoreWin32EHStackPointers().
Definition at line 123 of file X86FrameLowering.cpp.
Referenced by llvm::X86FrameLowering::emitSPUpdate().
Definition at line 127 of file X86FrameLowering.cpp.
References llvm::isInt< 8 >().
Referenced by calculateSetFPREG().
|
static |
Lookup an ERTS parameter in the !hipe.literals named metadata node.
HiPE provides Erlang Runtime System-internal parameters, such as PCB offsets to fields it needs, through a named metadata node "hipe.literals" containing name-value pairs.
Definition at line 2534 of file X86FrameLowering.cpp.
References llvm::numbers::e, and llvm::NamedMDNode::getNumOperands().
Referenced by llvm::X86FrameLowering::adjustForHiPEPrologue().
Definition at line 138 of file X86FrameLowering.cpp.
Referenced by llvm::X86FrameLowering::emitEpilogue(), and llvm::X86FrameLowering::emitSPUpdate().
|
static |
GetScratchRegister - Get a temp register for performing work in the segmented stack and the Erlang/HiPE stack prologue.
Depending on platform and the properties of the function either one or two registers will be needed. Set primary to true for the first register, false for the second.
Definition at line 2249 of file X86FrameLowering.cpp.
References llvm::N86::EAX, llvm::N86::EBX, llvm::N86::ECX, llvm::N86::EDI, llvm::N86::EDX, llvm::CallingConv::Fast, llvm::Function::getCallingConv(), llvm::MachineFunction::getFunction(), HasNestArgument(), llvm::CallingConv::HiPE, llvm::report_fatal_error(), llvm::CallingConv::Tail, and llvm::CallingConv::X86_FastCall.
Referenced by llvm::X86FrameLowering::adjustForHiPEPrologue(), and llvm::X86FrameLowering::adjustForSegmentedStacks().
Definition at line 95 of file X86FrameLowering.cpp.
References llvm::isInt< 8 >().
Referenced by llvm::X86FrameLowering::emitSPUpdate().
Definition at line 119 of file X86FrameLowering.cpp.
Referenced by llvm::X86FrameLowering::emitSPUpdate(), and llvm::X86FrameLowering::inlineStackProbe().
|
static |
Definition at line 2234 of file X86FrameLowering.cpp.
References llvm::Function::arg_begin(), llvm::Function::arg_end(), E, F(), llvm::MachineFunction::getFunction(), and I.
Referenced by llvm::X86FrameLowering::adjustForSegmentedStacks(), and GetScratchRegister().
|
static |
Definition at line 196 of file X86FrameLowering.cpp.
References llvm::AArch64CC::AL, llvm::N86::EAX, llvm::MachineBasicBlock::liveins(), and Reg.
Referenced by llvm::X86FrameLowering::emitPrologue(), and llvm::X86FrameLowering::emitSPUpdate().
|
static |
Definition at line 1517 of file X86FrameLowering.cpp.
References llvm::alignTo(), assert(), llvm::ISD::CATCHRET, llvm::classifyEHPersonality(), llvm::ISD::CLEANUPRET, llvm::CoreCLR, llvm::X86MachineFunctionInfo::getCalleeSavedFrameSize(), llvm::X86FrameLowering::getFrameIndexReferencePreferSP(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getInfo(), llvm::MachineFrameInfo::getMaxCallFrameSize(), llvm::MachineInstr::getOpcode(), llvm::Function::getPersonalityFn(), llvm::TargetFrameLowering::getStackAlignment(), llvm::X86RegisterInfo::getStackRegister(), llvm::MachineFunction::getWinEHFuncInfo(), llvm::X86MachineFunctionInfo::getWinEHXMMSlotInfo(), Info, llvm_unreachable, llvm::WinEHFuncInfo::PSPSymFrameIdx, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::size(), llvm::X86FrameLowering::SlotSize, and llvm::X86FrameLowering::TRI.
Referenced by llvm::X86FrameLowering::emitEpilogue(), and llvm::X86FrameLowering::restoreCalleeSavedRegisters().
Definition at line 1582 of file X86FrameLowering.cpp.
Referenced by llvm::X86FrameLowering::emitEpilogue().
|
static |
Definition at line 2284 of file X86FrameLowering.cpp.
Referenced by llvm::X86FrameLowering::adjustForSegmentedStacks().
1.8.13