LLVM
8.0.1
|
FunctionLoweringInfo - This contains information that is global to a function that is used when lowering a region of the function. More...
#include "llvm/CodeGen/FunctionLoweringInfo.h"
Classes | |
struct | LiveOutInfo |
struct | StatepointSpillMap |
Keep track of frame indices allocated for statepoints as they could be used across basic block boundaries. More... | |
Public Types | |
using | SwiftErrorValues = SmallVector< const Value *, 1 > |
Public Member Functions | |
unsigned | getOrCreateSwiftErrorVReg (const MachineBasicBlock *, const Value *) |
Get or create the swifterror value virtual register in SwiftErrorVRegDefMap for this basic block. More... | |
void | setCurrentSwiftErrorVReg (const MachineBasicBlock *MBB, const Value *, unsigned) |
Set the swifterror virtual register in the SwiftErrorVRegDefMap for this basic block. More... | |
std::pair< unsigned, bool > | getOrCreateSwiftErrorVRegDefAt (const Instruction *) |
Get or create the swifterror value virtual register for a def of a swifterror by an instruction. More... | |
std::pair< unsigned, bool > | getOrCreateSwiftErrorVRegUseAt (const Instruction *, const MachineBasicBlock *, const Value *) |
const Value * | getValueFromVirtualReg (unsigned Vreg) |
This method is called from TargetLowerinInfo::isSDNodeSourceOfDivergence to get the Value corresponding to the live-in virtual register. More... | |
void | set (const Function &Fn, MachineFunction &MF, SelectionDAG *DAG) |
set - Initialize this FunctionLoweringInfo with the given Function and its associated MachineFunction. More... | |
void | clear () |
clear - Clear out all the function-specific state. More... | |
bool | isExportedInst (const Value *V) |
isExportedInst - Return true if the specified value is an instruction exported from its block. More... | |
unsigned | CreateReg (MVT VT) |
CreateReg - Allocate a single virtual register for the given type. More... | |
unsigned | CreateRegs (Type *Ty) |
CreateRegs - Allocate the appropriate number of virtual registers of the correctly promoted or expanded types. More... | |
unsigned | InitializeRegForValue (const Value *V) |
const LiveOutInfo * | GetLiveOutRegInfo (unsigned Reg) |
GetLiveOutRegInfo - Gets LiveOutInfo for a register, returning NULL if the register is a PHI destination and the PHI's LiveOutInfo is not valid. More... | |
const LiveOutInfo * | GetLiveOutRegInfo (unsigned Reg, unsigned BitWidth) |
GetLiveOutRegInfo - Gets LiveOutInfo for a register, returning NULL if the register is a PHI destination and the PHI's LiveOutInfo is not valid. More... | |
void | AddLiveOutRegInfo (unsigned Reg, unsigned NumSignBits, const KnownBits &Known) |
AddLiveOutRegInfo - Adds LiveOutInfo for a register. More... | |
void | ComputePHILiveOutRegInfo (const PHINode *) |
ComputePHILiveOutRegInfo - Compute LiveOutInfo for a PHI's destination register based on the LiveOutInfo of its operands. More... | |
void | InvalidatePHILiveOutRegInfo (const PHINode *PN) |
InvalidatePHILiveOutRegInfo - Invalidates a PHI's LiveOutInfo, to be called when a block is visited before all of its predecessors. More... | |
void | setArgumentFrameIndex (const Argument *A, int FI) |
setArgumentFrameIndex - Record frame index for the byval argument. More... | |
int | getArgumentFrameIndex (const Argument *A) |
getArgumentFrameIndex - Get frame index for the byval argument. More... | |
unsigned | getCatchPadExceptionPointerVReg (const Value *CPI, const TargetRegisterClass *RC) |
Public Attributes | |
const Function * | Fn |
MachineFunction * | MF |
const TargetLowering * | TLI |
MachineRegisterInfo * | RegInfo |
BranchProbabilityInfo * | BPI |
bool | CanLowerReturn |
CanLowerReturn - true iff the function's return value can be lowered to registers. More... | |
bool | SplitCSR |
True if part of the CSRs will be handled via explicit copies. More... | |
unsigned | DemoteRegister |
DemoteRegister - if CanLowerReturn is false, DemoteRegister is a vreg allocated to hold a pointer to the hidden sret parameter. More... | |
DenseMap< const BasicBlock *, MachineBasicBlock * > | MBBMap |
MBBMap - A mapping from LLVM basic blocks to their machine code entry. More... | |
DenseMap< std::pair< const MachineBasicBlock *, const Value * >, unsigned > | SwiftErrorVRegDefMap |
A map from swifterror value in a basic block to the virtual register it is currently represented by. More... | |
DenseMap< std::pair< const MachineBasicBlock *, const Value * >, unsigned > | SwiftErrorVRegUpwardsUse |
A list of upward exposed vreg uses that need to be satisfied by either a copy def or a phi node at the beginning of the basic block representing the predecessor(s) swifterror value. More... | |
llvm::DenseMap< PointerIntPair< const Instruction *, 1, bool >, unsigned > | SwiftErrorVRegDefUses |
A map from instructions that define/use a swifterror value to the virtual register that represents that def/use. More... | |
const Value * | SwiftErrorArg |
The swifterror argument of the current function. More... | |
SwiftErrorValues | SwiftErrorVals |
A function can only have a single swifterror argument. More... | |
DenseMap< const Value *, unsigned > | ValueMap |
ValueMap - Since we emit code for the function a basic block at a time, we must remember which virtual registers hold the values for cross-basic-block values. More... | |
DenseMap< unsigned, const Value * > | VirtReg2Value |
VirtReg2Value map is needed by the Divergence Analysis driven instruction selection. More... | |
DenseMap< const Value *, unsigned > | CatchPadExceptionPointers |
Track virtual registers created for exception pointers. More... | |
DenseMap< const Instruction *, StatepointSpillMap > | StatepointSpillMaps |
Maps gc.statepoint instructions to their corresponding StatepointSpillMap instances. More... | |
DenseMap< const AllocaInst *, int > | StaticAllocaMap |
StaticAllocaMap - Keep track of frame indices for fixed sized allocas in the entry block. More... | |
DenseMap< const Argument *, int > | ByValArgFrameIndexMap |
ByValArgFrameIndexMap - Keep track of frame indices for byval arguments. More... | |
SmallVector< MachineInstr *, 8 > | ArgDbgValues |
ArgDbgValues - A list of DBG_VALUE instructions created during isel for function arguments that are inserted after scheduling is completed. More... | |
DenseMap< unsigned, unsigned > | RegFixups |
RegFixups - Registers which need to be replaced after isel is done. More... | |
DenseSet< unsigned > | RegsWithFixups |
SmallVector< unsigned, 50 > | StatepointStackSlots |
StatepointStackSlots - A list of temporary stack slots (frame indices) used to spill values at a statepoint. More... | |
MachineBasicBlock * | MBB |
MBB - The current block. More... | |
MachineBasicBlock::iterator | InsertPt |
MBB - The current insert position inside the current block. More... | |
DenseMap< const Value *, ISD::NodeType > | PreferredExtendType |
Record the preferred extend type (ISD::SIGN_EXTEND or ISD::ZERO_EXTEND) for a value. More... | |
SmallPtrSet< const BasicBlock *, 4 > | VisitedBBs |
VisitedBBs - The set of basic blocks visited thus far by instruction selection. More... | |
std::vector< std::pair< MachineInstr *, unsigned > > | PHINodesToUpdate |
PHINodesToUpdate - A list of phi instructions whose operand list will be updated after processing the current basic block. More... | |
unsigned | OrigNumPHINodesToUpdate |
unsigned | ExceptionPointerVirtReg |
If the current MBB is a landing pad, the exception pointer and exception selector registers are copied into these virtual registers by SelectionDAGISel::PrepareEHLandingPad(). More... | |
unsigned | ExceptionSelectorVirtReg |
FunctionLoweringInfo - This contains information that is global to a function that is used when lowering a region of the function.
Definition at line 53 of file FunctionLoweringInfo.h.
Definition at line 93 of file FunctionLoweringInfo.h.
|
inline |
AddLiveOutRegInfo - Adds LiveOutInfo for a register.
Definition at line 274 of file FunctionLoweringInfo.h.
References ComputePHILiveOutRegInfo(), llvm::KnownBits::isUnknown(), llvm::FunctionLoweringInfo::LiveOutInfo::Known, llvm::FunctionLoweringInfo::LiveOutInfo::NumSignBits, llvm::KnownBits::One, Reg, and llvm::KnownBits::Zero.
void FunctionLoweringInfo::clear | ( | ) |
clear - Clear out all the function-specific state.
This returns this FunctionLoweringInfo to an empty state, ready to be used for a different function.
Definition at line 338 of file FunctionLoweringInfo.cpp.
References ArgDbgValues, ByValArgFrameIndexMap, llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::clear(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::clear(), llvm::ValueMap< KeyT, ValueT, Config >::clear(), llvm::SmallVectorImpl< T >::clear(), MBBMap, PreferredExtendType, RegFixups, RegsWithFixups, StatepointSpillMaps, StatepointStackSlots, StaticAllocaMap, VirtReg2Value, and VisitedBBs.
Referenced by llvm::SelectionDAGISel::runOnMachineFunction().
ComputePHILiveOutRegInfo - Compute LiveOutInfo for a PHI's destination register based on the LiveOutInfo of its operands.
Definition at line 411 of file FunctionLoweringInfo.cpp.
References assert(), llvm::ComputeValueVTs(), llvm::ValueMap< KeyT, ValueT, Config >::count(), llvm::APInt::getBitWidth(), llvm::Value::getContext(), llvm::MachineFunction::getDataLayout(), llvm::PHINode::getIncomingValue(), GetLiveOutRegInfo(), llvm::PHINode::getNumIncomingValues(), llvm::TargetLoweringBase::getNumRegisters(), llvm::APInt::getNumSignBits(), llvm::EVT::getSizeInBits(), llvm::Value::getType(), llvm::TargetLoweringBase::getTypeToTransformTo(), llvm::Type::isIntegerTy(), llvm::FunctionLoweringInfo::LiveOutInfo::IsValid, llvm::Type::isVectorTy(), llvm::TargetRegisterInfo::isVirtualRegister(), llvm::FunctionLoweringInfo::LiveOutInfo::Known, MF, llvm::FunctionLoweringInfo::LiveOutInfo::NumSignBits, llvm::KnownBits::One, llvm::SmallVectorBase::size(), TLI, llvm::KnownBits::Zero, and llvm::APInt::zextOrTrunc().
Referenced by AddLiveOutRegInfo().
CreateReg - Allocate a single virtual register for the given type.
Definition at line 355 of file FunctionLoweringInfo.cpp.
References llvm::MachineRegisterInfo::createVirtualRegister(), llvm::TargetLoweringBase::getRegClassFor(), llvm::MachineFunction::getSubtarget(), llvm::TargetSubtargetInfo::getTargetLowering(), MF, and RegInfo.
Referenced by CreateRegs(), llvm::HexagonDAGToDAGISel::EmitFunctionEntryCode(), and isExportedInst().
CreateRegs - Allocate the appropriate number of virtual registers of the correctly promoted or expanded types.
Assign these registers consecutive vreg numbers and return the first assigned number.
In the case that the given value has struct or array type, this function will assign registers for each member or element.
Definition at line 367 of file FunctionLoweringInfo.cpp.
References llvm::ComputeValueVTs(), CreateReg(), llvm::Type::getContext(), llvm::MachineFunction::getDataLayout(), llvm::TargetLoweringBase::getNumRegisters(), llvm::TargetLoweringBase::getRegisterType(), llvm::MachineFunction::getSubtarget(), llvm::TargetSubtargetInfo::getTargetLowering(), MF, llvm::SmallVectorBase::size(), and TLI.
Referenced by InitializeRegForValue(), and isExportedInst().
getArgumentFrameIndex - Get frame index for the byval argument.
If the argument does not have any assigned frame index then 0 is returned.
Definition at line 510 of file FunctionLoweringInfo.cpp.
References ByValArgFrameIndexMap, llvm::dbgs(), I, and LLVM_DEBUG.
Referenced by InvalidatePHILiveOutRegInfo(), lowerStatepointMetaArgs(), and processDbgDeclares().
unsigned FunctionLoweringInfo::getCatchPadExceptionPointerVReg | ( | const Value * | CPI, |
const TargetRegisterClass * | RC | ||
) |
Definition at line 518 of file FunctionLoweringInfo.cpp.
References assert(), CatchPadExceptionPointers, llvm::MachineRegisterInfo::createVirtualRegister(), llvm::MachineFunction::getRegInfo(), I, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::insert(), MF, and MRI.
Referenced by InvalidatePHILiveOutRegInfo(), and mapWasmLandingPadIndex().
|
inline |
GetLiveOutRegInfo - Gets LiveOutInfo for a register, returning NULL if the register is a PHI destination and the PHI's LiveOutInfo is not valid.
Definition at line 255 of file FunctionLoweringInfo.h.
References llvm::FunctionLoweringInfo::LiveOutInfo::IsValid, and Reg.
Referenced by ComputePHILiveOutRegInfo(), and llvm::RegsForValue::getCopyFromRegs().
const FunctionLoweringInfo::LiveOutInfo * FunctionLoweringInfo::GetLiveOutRegInfo | ( | unsigned | Reg, |
unsigned | BitWidth | ||
) |
GetLiveOutRegInfo - Gets LiveOutInfo for a register, returning NULL if the register is a PHI destination and the PHI's LiveOutInfo is not valid.
If the register's LiveOutInfo is for a smaller bit width, it is extended to the larger bit width by zero extension. The bit width must be no smaller than the LiveOutInfo's existing bit width.
Definition at line 393 of file FunctionLoweringInfo.cpp.
References llvm::KnownBits::getBitWidth(), llvm::FunctionLoweringInfo::LiveOutInfo::IsValid, llvm::FunctionLoweringInfo::LiveOutInfo::Known, llvm::FunctionLoweringInfo::LiveOutInfo::NumSignBits, Reg, and llvm::KnownBits::zextOrTrunc().
unsigned FunctionLoweringInfo::getOrCreateSwiftErrorVReg | ( | const MachineBasicBlock * | MBB, |
const Value * | Val | ||
) |
Get or create the swifterror value virtual register in SwiftErrorVRegDefMap for this basic block.
Definition at line 530 of file FunctionLoweringInfo.cpp.
References llvm::MachineRegisterInfo::createVirtualRegister(), llvm::MachineFunction::getDataLayout(), llvm::TargetLoweringBase::getPointerTy(), llvm::TargetLoweringBase::getRegClassFor(), llvm::MachineFunction::getRegInfo(), MF, SwiftErrorVRegDefMap, SwiftErrorVRegUpwardsUse, and TLI.
Referenced by getOrCreateSwiftErrorVRegUseAt(), and propagateSwiftErrorVRegs().
std::pair< unsigned, bool > FunctionLoweringInfo::getOrCreateSwiftErrorVRegDefAt | ( | const Instruction * | I | ) |
Get or create the swifterror value virtual register for a def of a swifterror by an instruction.
Definition at line 554 of file FunctionLoweringInfo.cpp.
References llvm::MachineRegisterInfo::createVirtualRegister(), llvm::MachineFunction::getDataLayout(), llvm::TargetLoweringBase::getPointerTy(), llvm::TargetLoweringBase::getRegClassFor(), llvm::MachineFunction::getRegInfo(), I, MF, SwiftErrorVRegDefUses, and TLI.
std::pair< unsigned, bool > FunctionLoweringInfo::getOrCreateSwiftErrorVRegUseAt | ( | const Instruction * | I, |
const MachineBasicBlock * | MBB, | ||
const Value * | Val | ||
) |
Definition at line 568 of file FunctionLoweringInfo.cpp.
References getOrCreateSwiftErrorVReg(), I, and SwiftErrorVRegDefUses.
This method is called from TargetLowerinInfo::isSDNodeSourceOfDivergence to get the Value corresponding to the live-in virtual register.
Definition at line 580 of file FunctionLoweringInfo.cpp.
References llvm::SmallVectorImpl< T >::clear(), llvm::ComputeValueVTs(), Fn, llvm::Function::getContext(), llvm::Module::getDataLayout(), llvm::TargetLoweringBase::getNumRegisters(), llvm::GlobalValue::getParent(), P, Reg, TLI, and VirtReg2Value.
Referenced by llvm::SITargetLowering::isSDNodeSourceOfDivergence().
Definition at line 243 of file FunctionLoweringInfo.h.
References assert(), CreateRegs(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::empty(), llvm::Value::getType(), and llvm::Type::isTokenTy().
Referenced by set().
InvalidatePHILiveOutRegInfo - Invalidates a PHI's LiveOutInfo, to be called when a block is visited before all of its predecessors.
Definition at line 293 of file FunctionLoweringInfo.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), getArgumentFrameIndex(), getCatchPadExceptionPointerVReg(), llvm::DenseMap< KeyT, ValueT, KeyInfoT, BucketT >::grow(), Reg, and setArgumentFrameIndex().
isExportedInst - Return true if the specified value is an instruction exported from its block.
Definition at line 235 of file FunctionLoweringInfo.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::count(), CreateReg(), and CreateRegs().
Referenced by isFoldedOrDeadInstruction().
void FunctionLoweringInfo::set | ( | const Function & | Fn, |
MachineFunction & | MF, | ||
SelectionDAG * | DAG | ||
) |
set - Initialize this FunctionLoweringInfo with the given Function and its associated MachineFunction.
Definition at line 81 of file FunctionLoweringInfo.cpp.
References llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, llvm::WinEHHandlerType::Alloca, assert(), llvm::BuildMI(), llvm::calculateClrEHStateNumbers(), llvm::calculateSEHStateNumbers(), llvm::calculateWasmEHInfo(), llvm::calculateWinCXXEHStateNumbers(), CanLowerReturn, llvm::WinEHHandlerType::CatchObj, llvm::classifyEHPersonality(), llvm::CxxUnwindMapEntry::Cleanup, llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::clear(), llvm::WinEHFuncInfo::ClrEHUnwindMap, llvm::ComputeValueVTs(), llvm::CoreCLR, llvm::MachineFrameInfo::CreateFixedObject(), llvm::MachineFunction::CreateMachineBasicBlock(), llvm::MachineFrameInfo::CreateStackObject(), llvm::MachineFrameInfo::CreateVariableSizedObject(), llvm::WinEHFuncInfo::CxxUnwindMap, llvm::WasmEHFuncInfo::EHPadUnwindMap, llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::find(), first, Fn, llvm::ISD::FrameIndex, llvm::WinEHHandlerType::FrameIndex, llvm::MCInstrInfo::get(), llvm::PointerUnion< PT1, PT2 >::get(), llvm::Function::getAttributes(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getCalledValue(), llvm::Function::getCallingConv(), llvm::Function::getContext(), llvm::MachineFunction::getDataLayout(), llvm::MachineFunction::getFrameInfo(), llvm::TargetSubtargetInfo::getFrameLowering(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::Function::getPersonalityFn(), getPreferredExtendForValue(), llvm::DataLayout::getPrefTypeAlignment(), llvm::MachineFunction::getRegInfo(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::GetReturnInfo(), llvm::Function::getReturnType(), llvm::TargetFrameLowering::getStackAlignment(), llvm::MachineFunction::getSubtarget(), llvm::TargetSubtargetInfo::getTargetLowering(), llvm::DataLayout::getTypeAllocSize(), llvm::MachineFunction::getWasmEHFuncInfo(), llvm::MachineFunction::getWinEHFuncInfo(), llvm::ConstantInt::getZExtValue(), H, llvm::SEHUnwindMapEntry::Handler, llvm::WinEHHandlerType::Handler, llvm::ClrEHUnwindMapEntry::Handler, llvm::WinEHTryBlockMapEntry::HandlerArray, llvm::Function::hasPersonalityFn(), I, InitializeRegForValue(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::insert(), llvm::isAsynchronousEHPersonality(), llvm::InlineAsm::isClobber, llvm::isFuncletEHPersonality(), llvm::TargetFrameLowering::isStackRealignable(), isUsedOutsideOfDefiningBlock(), llvm::Function::isVarArg(), llvm::max(), MBB, MBBMap, MF, llvm::MSVC_CXX, PreferredExtendType, llvm::MachineFunction::push_back(), RegInfo, llvm::WinEHFuncInfo::SEHUnwindMap, llvm::MachineBasicBlock::setHasAddressTaken(), llvm::MachineFunction::setHasEHFunclets(), llvm::MachineFunction::setHasEHScopes(), llvm::MachineFrameInfo::setHasMustTailInVarArgFunc(), llvm::MachineFrameInfo::setHasOpaqueSPAdjustment(), llvm::MachineFrameInfo::setHasVAStart(), llvm::MachineBasicBlock::setIsEHPad(), llvm::MachineFrameInfo::setObjectAlignment(), StaticAllocaMap, llvm::WasmEHFuncInfo::ThrowUnwindMap, TII, TLI, TRI, llvm::WinEHFuncInfo::TryBlockMap, llvm::Intrinsic::vastart, and llvm::Wasm_CXX.
Referenced by llvm::SelectionDAGISel::runOnMachineFunction().
setArgumentFrameIndex - Record frame index for the byval argument.
This overrides previous frame index entry for this argument, if any.
Definition at line 502 of file FunctionLoweringInfo.cpp.
References ByValArgFrameIndexMap.
Referenced by InvalidatePHILiveOutRegInfo().
void FunctionLoweringInfo::setCurrentSwiftErrorVReg | ( | const MachineBasicBlock * | MBB, |
const Value * | Val, | ||
unsigned | VReg | ||
) |
Set the swifterror virtual register in the SwiftErrorVRegDefMap for this basic block.
Definition at line 548 of file FunctionLoweringInfo.cpp.
References SwiftErrorVRegDefMap.
Referenced by createSwiftErrorEntriesInEntryBlock(), and propagateSwiftErrorVRegs().
SmallVector<MachineInstr*, 8> llvm::FunctionLoweringInfo::ArgDbgValues |
ArgDbgValues - A list of DBG_VALUE instructions created during isel for function arguments that are inserted after scheduling is completed.
Definition at line 176 of file FunctionLoweringInfo.h.
Referenced by clear(), and llvm::SelectionDAGISel::runOnMachineFunction().
BranchProbabilityInfo* llvm::FunctionLoweringInfo::BPI |
Definition at line 59 of file FunctionLoweringInfo.h.
Referenced by findUnwindDestinations(), getBranchHint(), and llvm::SelectionDAGISel::runOnMachineFunction().
ByValArgFrameIndexMap - Keep track of frame indices for byval arguments.
Definition at line 172 of file FunctionLoweringInfo.h.
Referenced by clear(), getArgumentFrameIndex(), and setArgumentFrameIndex().
bool llvm::FunctionLoweringInfo::CanLowerReturn |
CanLowerReturn - true iff the function's return value can be lowered to registers.
Definition at line 62 of file FunctionLoweringInfo.h.
Referenced by set().
Track virtual registers created for exception pointers.
Definition at line 133 of file FunctionLoweringInfo.h.
Referenced by getCatchPadExceptionPointerVReg().
unsigned llvm::FunctionLoweringInfo::DemoteRegister |
DemoteRegister - if CanLowerReturn is false, DemoteRegister is a vreg allocated to hold a pointer to the hidden sret parameter.
Definition at line 69 of file FunctionLoweringInfo.h.
Referenced by llvm::SITargetLowering::isSDNodeSourceOfDivergence().
unsigned llvm::FunctionLoweringInfo::ExceptionPointerVirtReg |
If the current MBB is a landing pad, the exception pointer and exception selector registers are copied into these virtual registers by SelectionDAGISel::PrepareEHLandingPad().
Definition at line 221 of file FunctionLoweringInfo.h.
Referenced by mapWasmLandingPadIndex().
unsigned llvm::FunctionLoweringInfo::ExceptionSelectorVirtReg |
Definition at line 221 of file FunctionLoweringInfo.h.
Referenced by mapWasmLandingPadIndex().
Definition at line 55 of file FunctionLoweringInfo.h.
Referenced by llvm::FastISel::fastEmit_ri_(), findArgumentCopyElisionCandidates(), findUnwindDestinations(), getBranchHint(), getValueFromVirtualReg(), llvm::SITargetLowering::isSDNodeSourceOfDivergence(), mapWasmLandingPadIndex(), processDbgDeclares(), and set().
MachineBasicBlock::iterator llvm::FunctionLoweringInfo::InsertPt |
MBB - The current insert position inside the current block.
Definition at line 193 of file FunctionLoweringInfo.h.
Referenced by llvm::FastISel::constrainOperandRegClass(), createSwiftErrorEntriesInEntryBlock(), llvm::FastISel::fastEmitInst_(), llvm::FastISel::fastEmitInst_extractsubreg(), llvm::FastISel::fastEmitInst_f(), llvm::FastISel::fastEmitInst_i(), llvm::FastISel::fastEmitInst_r(), llvm::FastISel::fastEmitInst_ri(), llvm::FastISel::fastEmitInst_rii(), llvm::FastISel::fastEmitInst_rr(), llvm::FastISel::fastEmitInst_rri(), llvm::FastISel::fastEmitInst_rrr(), mapWasmLandingPadIndex(), and llvm::FastISel::tryToFoldLoad().
MachineBasicBlock* llvm::FunctionLoweringInfo::MBB |
MBB - The current block.
Definition at line 190 of file FunctionLoweringInfo.h.
Referenced by llvm::FastISel::canFoldAddIntoGEP(), llvm::FastISel::constrainOperandRegClass(), createSwiftErrorEntriesInEntryBlock(), llvm::FastISel::fastEmitInst_(), llvm::FastISel::fastEmitInst_extractsubreg(), llvm::FastISel::fastEmitInst_f(), llvm::FastISel::fastEmitInst_i(), llvm::FastISel::fastEmitInst_r(), llvm::FastISel::fastEmitInst_ri(), llvm::FastISel::fastEmitInst_rii(), llvm::FastISel::fastEmitInst_rr(), llvm::FastISel::fastEmitInst_rri(), llvm::FastISel::fastEmitInst_rrr(), getBranchHint(), llvm::SelectionDAGISel::getUninvalidatedNodeId(), mapWasmLandingPadIndex(), set(), and llvm::FastISel::tryToFoldLoad().
DenseMap<const BasicBlock*, MachineBasicBlock *> llvm::FunctionLoweringInfo::MBBMap |
MBBMap - A mapping from LLVM basic blocks to their machine code entry.
Definition at line 72 of file FunctionLoweringInfo.h.
Referenced by llvm::FastISel::canFoldAddIntoGEP(), clear(), llvm::FastISel::fastEmitZExtFromI1(), findUnwindDestinations(), and set().
MachineFunction* llvm::FunctionLoweringInfo::MF |
Definition at line 56 of file FunctionLoweringInfo.h.
Referenced by ComputePHILiveOutRegInfo(), llvm::FastISel::constrainOperandRegClass(), llvm::MipsTargetLowering::createFastISel(), llvm::ARM::createFastISel(), llvm::PPC::createFastISel(), llvm::FastISel::createMachineMemOperandFor(), CreateReg(), CreateRegs(), createSwiftErrorEntriesInEntryBlock(), getCatchPadExceptionPointerVReg(), getOrCreateSwiftErrorVReg(), getOrCreateSwiftErrorVRegDefAt(), llvm::SITargetLowering::isSDNodeSourceOfDivergence(), processDbgDeclares(), propagateSwiftErrorVRegs(), set(), and tryToElideArgumentCopy().
unsigned llvm::FunctionLoweringInfo::OrigNumPHINodesToUpdate |
Definition at line 216 of file FunctionLoweringInfo.h.
Referenced by llvm::FastISel::fastEmitZExtFromI1().
std::vector<std::pair<MachineInstr*, unsigned> > llvm::FunctionLoweringInfo::PHINodesToUpdate |
PHINodesToUpdate - A list of phi instructions whose operand list will be updated after processing the current basic block.
TODO: This isn't per-function state, it's per-basic-block state. But there's no other convenient place for it to live right now.
Definition at line 215 of file FunctionLoweringInfo.h.
Referenced by llvm::FastISel::fastEmitZExtFromI1(), and isRegUsedByPhiNodes().
DenseMap<const Value *, ISD::NodeType> llvm::FunctionLoweringInfo::PreferredExtendType |
Record the preferred extend type (ISD::SIGN_EXTEND or ISD::ZERO_EXTEND) for a value.
Definition at line 205 of file FunctionLoweringInfo.h.
RegFixups - Registers which need to be replaced after isel is done.
Definition at line 179 of file FunctionLoweringInfo.h.
Referenced by clear(), and llvm::SelectionDAGISel::runOnMachineFunction().
MachineRegisterInfo* llvm::FunctionLoweringInfo::RegInfo |
Definition at line 58 of file FunctionLoweringInfo.h.
Referenced by CreateReg(), and set().
Definition at line 181 of file FunctionLoweringInfo.h.
Referenced by clear().
bool llvm::FunctionLoweringInfo::SplitCSR |
True if part of the CSRs will be handled via explicit copies.
Definition at line 65 of file FunctionLoweringInfo.h.
Referenced by llvm::SelectionDAGISel::runOnMachineFunction().
DenseMap<const Instruction *, StatepointSpillMap> llvm::FunctionLoweringInfo::StatepointSpillMaps |
Maps gc.statepoint instructions to their corresponding StatepointSpillMap instances.
Definition at line 164 of file FunctionLoweringInfo.h.
Referenced by clear(), findPreviousSpillSlot(), and lowerStatepointMetaArgs().
SmallVector<unsigned, 50> llvm::FunctionLoweringInfo::StatepointStackSlots |
StatepointStackSlots - A list of temporary stack slots (frame indices) used to spill values at a statepoint.
We store them here to enable reuse of the same stack slots across different statepoints in different basic blocks.
Definition at line 187 of file FunctionLoweringInfo.h.
Referenced by llvm::StatepointLoweringState::allocateStackSlot(), clear(), reservePreviousStackSlotForValue(), and llvm::StatepointLoweringState::startNewStatepoint().
DenseMap<const AllocaInst*, int> llvm::FunctionLoweringInfo::StaticAllocaMap |
StaticAllocaMap - Keep track of frame indices for fixed sized allocas in the entry block.
This allows the allocas to be efficiently referenced anywhere in the function.
Definition at line 169 of file FunctionLoweringInfo.h.
Referenced by clear(), findArgumentCopyElisionCandidates(), processDbgDeclares(), set(), and tryToElideArgumentCopy().
The swifterror argument of the current function.
Definition at line 91 of file FunctionLoweringInfo.h.
Referenced by createSwiftErrorEntriesInEntryBlock(), and setupSwiftErrorVals().
SwiftErrorValues llvm::FunctionLoweringInfo::SwiftErrorVals |
A function can only have a single swifterror argument.
And if it does have a swifterror argument, it must be the first entry in SwiftErrorVals.
Definition at line 97 of file FunctionLoweringInfo.h.
Referenced by createSwiftErrorEntriesInEntryBlock(), preassignSwiftErrorRegs(), propagateSwiftErrorVRegs(), and setupSwiftErrorVals().
DenseMap<std::pair<const MachineBasicBlock *, const Value *>, unsigned> llvm::FunctionLoweringInfo::SwiftErrorVRegDefMap |
A map from swifterror value in a basic block to the virtual register it is currently represented by.
Definition at line 77 of file FunctionLoweringInfo.h.
Referenced by getOrCreateSwiftErrorVReg(), propagateSwiftErrorVRegs(), setCurrentSwiftErrorVReg(), and setupSwiftErrorVals().
llvm::DenseMap<PointerIntPair<const Instruction *, 1, bool>, unsigned> llvm::FunctionLoweringInfo::SwiftErrorVRegDefUses |
A map from instructions that define/use a swifterror value to the virtual register that represents that def/use.
Definition at line 88 of file FunctionLoweringInfo.h.
Referenced by getOrCreateSwiftErrorVRegDefAt(), getOrCreateSwiftErrorVRegUseAt(), and setupSwiftErrorVals().
DenseMap<std::pair<const MachineBasicBlock *, const Value *>, unsigned> llvm::FunctionLoweringInfo::SwiftErrorVRegUpwardsUse |
A list of upward exposed vreg uses that need to be satisfied by either a copy def or a phi node at the beginning of the basic block representing the predecessor(s) swifterror value.
Definition at line 83 of file FunctionLoweringInfo.h.
Referenced by getOrCreateSwiftErrorVReg(), propagateSwiftErrorVRegs(), and setupSwiftErrorVals().
const TargetLowering* llvm::FunctionLoweringInfo::TLI |
Definition at line 57 of file FunctionLoweringInfo.h.
Referenced by ComputePHILiveOutRegInfo(), CreateRegs(), getOrCreateSwiftErrorVReg(), getOrCreateSwiftErrorVRegDefAt(), getValueFromVirtualReg(), propagateSwiftErrorVRegs(), and set().
ValueMap - Since we emit code for the function a basic block at a time, we must remember which virtual registers hold the values for cross-basic-block values.
Definition at line 119 of file FunctionLoweringInfo.h.
VirtReg2Value map is needed by the Divergence Analysis driven instruction selection.
It is reverted ValueMap. It is computed in lazy style - on demand. It is used to get the Value corresponding to the live in virtual register and is called from the TargetLowerinInfo::isSDNodeSourceOfDivergence.
Definition at line 126 of file FunctionLoweringInfo.h.
Referenced by clear(), and getValueFromVirtualReg().
SmallPtrSet<const BasicBlock*, 4> llvm::FunctionLoweringInfo::VisitedBBs |
VisitedBBs - The set of basic blocks visited thus far by instruction selection.
Definition at line 209 of file FunctionLoweringInfo.h.
Referenced by clear().