|
LLVM
4.0.0
|
SelectionDAGBuilder - This is the common target-independent lowering implementation that is parameterized by a TargetLowering object. More...
#include <SelectionDAGBuilder.h>
Classes | |
| struct | StatepointLoweringInfo |
| Describes a gc.statepoint or a gc.statepoint like thing for the purposes of lowering into a STATEPOINT node. More... | |
Public Member Functions | |
| SelectionDAGBuilder (SelectionDAG &dag, FunctionLoweringInfo &funcinfo, CodeGenOpt::Level ol) | |
| void | init (GCFunctionInfo *gfi, AliasAnalysis &aa, const TargetLibraryInfo *li) |
| void | clear () |
| clear - Clear out the current SelectionDAG and the associated state and prepare this SelectionDAGBuilder object to be used for a new block. More... | |
| void | clearDanglingDebugInfo () |
| clearDanglingDebugInfo - Clear the dangling debug information map. More... | |
| SDValue | getRoot () |
| getRoot - Return the current virtual root of the Selection DAG, flushing any PendingLoad items. More... | |
| SDValue | getControlRoot () |
| getControlRoot - Similar to getRoot, but instead of flushing all the PendingLoad items, flush all the PendingExports items. More... | |
| SDLoc | getCurSDLoc () const |
| DebugLoc | getCurDebugLoc () const |
| void | CopyValueToVirtualRegister (const Value *V, unsigned Reg) |
| void | visit (const Instruction &I) |
| void | visit (unsigned Opcode, const User &I) |
| SDValue | getCopyFromRegs (const Value *V, Type *Ty) |
| getCopyFromRegs - If there was virtual register allocated for the value V emit CopyFromReg of the specified type Ty. More... | |
| void | resolveDanglingDebugInfo (const Value *V, SDValue Val) |
| SDValue | getValue (const Value *V) |
| getValue - Return an SDValue for the given Value. More... | |
| bool | findValue (const Value *V) const |
| SDValue | getNonRegisterValue (const Value *V) |
| getNonRegisterValue - Return an SDValue for the given Value, but don't look in FuncInfo.ValueMap for a virtual register. More... | |
| SDValue | getValueImpl (const Value *V) |
| getValueImpl - Helper function for getValue and getNonRegisterValue. More... | |
| void | setValue (const Value *V, SDValue NewN) |
| void | setUnusedArgValue (const Value *V, SDValue NewN) |
| void | FindMergedConditions (const Value *Cond, MachineBasicBlock *TBB, MachineBasicBlock *FBB, MachineBasicBlock *CurBB, MachineBasicBlock *SwitchBB, Instruction::BinaryOps Opc, BranchProbability TW, BranchProbability FW) |
| FindMergedConditions - If Cond is an expression like. More... | |
| void | EmitBranchForMergedCondition (const Value *Cond, MachineBasicBlock *TBB, MachineBasicBlock *FBB, MachineBasicBlock *CurBB, MachineBasicBlock *SwitchBB, BranchProbability TW, BranchProbability FW) |
| EmitBranchForMergedCondition - Helper method for FindMergedConditions. More... | |
| bool | ShouldEmitAsBranches (const std::vector< CaseBlock > &Cases) |
| If the set of cases should be emitted as a series of branches, return true. More... | |
| bool | isExportableFromCurrentBlock (const Value *V, const BasicBlock *FromBB) |
| void | CopyToExportRegsIfNeeded (const Value *V) |
| CopyToExportRegsIfNeeded - If the given value has virtual registers created for it, emit nodes to copy the value into the virtual registers. More... | |
| void | ExportFromCurrentBlock (const Value *V) |
| ExportFromCurrentBlock - If this condition isn't known to be exported from the current basic block, add it to ValueMap now so that we'll get a CopyTo/FromReg. More... | |
| void | LowerCallTo (ImmutableCallSite CS, SDValue Callee, bool IsTailCall, const BasicBlock *EHPadBB=nullptr) |
| SDValue | lowerRangeToAssertZExt (SelectionDAG &DAG, const Instruction &I, SDValue Op) |
| void | populateCallLoweringInfo (TargetLowering::CallLoweringInfo &CLI, ImmutableCallSite CS, unsigned ArgIdx, unsigned NumArgs, SDValue Callee, Type *ReturnTy, bool IsPatchPoint) |
Populate a CallLowerinInfo (into CLI) based on the properties of the call being lowered. More... | |
| std::pair< SDValue, SDValue > | lowerInvokable (TargetLowering::CallLoweringInfo &CLI, const BasicBlock *EHPadBB=nullptr) |
| void | UpdateSplitBlock (MachineBasicBlock *First, MachineBasicBlock *Last) |
| UpdateSplitBlock - When an MBB was split during scheduling, update the references that need to refer to the last resulting block. More... | |
| SDValue | LowerAsSTATEPOINT (StatepointLoweringInfo &SLI) |
Lower SLI into a STATEPOINT instruction. More... | |
| void | LowerStatepoint (ImmutableStatepoint Statepoint, const BasicBlock *EHPadBB=nullptr) |
| void | LowerCallSiteWithDeoptBundle (ImmutableCallSite CS, SDValue Callee, const BasicBlock *EHPadBB) |
| void | LowerDeoptimizeCall (const CallInst *CI) |
| void | LowerDeoptimizingReturn () |
| void | LowerCallSiteWithDeoptBundleImpl (ImmutableCallSite CS, SDValue Callee, const BasicBlock *EHPadBB, bool VarArgDisallowed, bool ForceVoidReturnTy) |
| void | visitSwitchCase (CaseBlock &CB, MachineBasicBlock *SwitchBB) |
| visitSwitchCase - Emits the necessary code to represent a single node in the binary search tree resulting from lowering a switch instruction. More... | |
| void | visitSPDescriptorParent (StackProtectorDescriptor &SPD, MachineBasicBlock *ParentBB) |
| Codegen a new tail for a stack protector check ParentMBB which has had its tail spliced into a stack protector check success bb. More... | |
| void | visitSPDescriptorFailure (StackProtectorDescriptor &SPD) |
| Codegen the failure basic block for a stack protector check. More... | |
| void | visitBitTestHeader (BitTestBlock &B, MachineBasicBlock *SwitchBB) |
| visitBitTestHeader - This function emits necessary code to produce value suitable for "bit tests" More... | |
| void | visitBitTestCase (BitTestBlock &BB, MachineBasicBlock *NextMBB, BranchProbability BranchProbToNext, unsigned Reg, BitTestCase &B, MachineBasicBlock *SwitchBB) |
| visitBitTestCase - this function produces one "bit test" More... | |
| void | visitJumpTable (JumpTable &JT) |
| visitJumpTable - Emit JumpTable node in the current MBB More... | |
| void | visitJumpTableHeader (JumpTable &JT, JumpTableHeader &JTH, MachineBasicBlock *SwitchBB) |
| visitJumpTableHeader - This function emits necessary code to produce index in the JumpTable from switch case. More... | |
Public Attributes | |
| SmallVector< SDValue, 8 > | PendingLoads |
| PendingLoads - Loads are not emitted to the program immediately. More... | |
| StatepointLoweringState | StatepointLowering |
| State used while lowering a statepoint sequence (gc_statepoint, gc_relocate, and gc_result). More... | |
| SelectionDAG & | DAG |
| const DataLayout * | DL |
| AliasAnalysis * | AA |
| const TargetLibraryInfo * | LibInfo |
| std::vector< CaseBlock > | SwitchCases |
| SwitchCases - Vector of CaseBlock structures used to communicate SwitchInst code generation information. More... | |
| std::vector< JumpTableBlock > | JTCases |
| JTCases - Vector of JumpTable structures used to communicate SwitchInst code generation information. More... | |
| std::vector< BitTestBlock > | BitTestCases |
| BitTestCases - Vector of BitTestBlock structures used to communicate SwitchInst code generation information. More... | |
| StackProtectorDescriptor | SPDescriptor |
| A StackProtectorDescriptor structure used to communicate stack protector information in between SelectBasicBlock and FinishBasicBlock. More... | |
| DenseMap< const Constant *, unsigned > | ConstantsOut |
| FunctionLoweringInfo & | FuncInfo |
| FuncInfo - Information about the function as a whole. More... | |
| GCFunctionInfo * | GFI |
| GFI - Garbage collection metadata for the function. More... | |
| DenseMap< MachineBasicBlock *, SmallVector< unsigned, 4 > > | LPadToCallSiteMap |
| LPadToCallSiteMap - Map a landing pad to the call site indexes. More... | |
| bool | HasTailCall |
| HasTailCall - This is set to true if a call in the current block has been translated as a tail call. More... | |
| LLVMContext * | Context |
Static Public Attributes | |
| static const unsigned | LowestSDNodeOrder = 1 |
| Lowest valid SDNodeOrder. More... | |
SelectionDAGBuilder - This is the common target-independent lowering implementation that is parameterized by a TargetLowering object.
Definition at line 87 of file SelectionDAGBuilder.h.
|
inline |
Definition at line 609 of file SelectionDAGBuilder.h.
| void SelectionDAGBuilder::clear | ( | ) |
clear - Clear out the current SelectionDAG and the associated state and prepare this SelectionDAGBuilder object to be used for a new block.
This doesn't clear out information about additional blocks that are needed to complete switch lowering or PHI node updating; that information is cleared out as it is consumed.
Definition at line 859 of file SelectionDAGBuilder.cpp.
References llvm::StatepointLoweringState::clear(), HasTailCall, LowestSDNodeOrder, PendingLoads, and StatepointLowering.
| void SelectionDAGBuilder::clearDanglingDebugInfo | ( | ) |
clearDanglingDebugInfo - Clear the dangling debug information map.
This function is separated from the clear so that debug information that is dangling in a basic block can be properly resolved in a different basic block. This allows the SelectionDAG to resolve dangling debug information attached to PHI nodes.
Definition at line 876 of file SelectionDAGBuilder.cpp.
CopyToExportRegsIfNeeded - If the given value has virtual registers created for it, emit nodes to copy the value into the virtual registers.
Definition at line 1486 of file SelectionDAGBuilder.cpp.
References assert(), CopyValueToVirtualRegister(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), FuncInfo, llvm::Value::getType(), llvm::Type::isEmptyTy(), llvm::Value::use_empty(), and llvm::FunctionLoweringInfo::ValueMap.
Referenced by visit().
Definition at line 7974 of file SelectionDAGBuilder.cpp.
References llvm::ISD::ANY_EXTEND, assert(), llvm::ISD::CopyFromReg, DAG, FuncInfo, llvm::Value::getContext(), getCurSDLoc(), llvm::SelectionDAG::getDataLayout(), llvm::SelectionDAG::getEntryNode(), getNonRegisterValue(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), getReg(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::Value::getType(), llvm::TargetRegisterInfo::isPhysicalRegister(), and llvm::FunctionLoweringInfo::PreferredExtendType.
Referenced by CopyToExportRegsIfNeeded(), and ExportFromCurrentBlock().
| void SelectionDAGBuilder::EmitBranchForMergedCondition | ( | const Value * | Cond, |
| MachineBasicBlock * | TBB, | ||
| MachineBasicBlock * | FBB, | ||
| MachineBasicBlock * | CurBB, | ||
| MachineBasicBlock * | SwitchBB, | ||
| BranchProbability | TProb, | ||
| BranchProbability | FProb | ||
| ) |
EmitBranchForMergedCondition - Helper method for FindMergedConditions.
This function emits a branch and is used at the leaves of an OR or an AND operator tree.
Definition at line 1579 of file SelectionDAGBuilder.cpp.
References DAG, R600_InstFlag::FC, llvm::MachineBasicBlock::getBasicBlock(), llvm::SelectionDAG::getContext(), llvm::getFCmpCodeWithoutNaN(), llvm::getFCmpCondCode(), llvm::getICmpCondCode(), llvm::CmpInst::getPredicate(), llvm::ConstantInt::getTrue(), isExportableFromCurrentBlock(), llvm::ISD::SETEQ, SwitchCases, and llvm::SystemZISD::TM.
Referenced by FindMergedConditions().
ExportFromCurrentBlock - If this condition isn't known to be exported from the current basic block, add it to ValueMap now so that we'll get a CopyTo/FromReg.
Definition at line 1501 of file SelectionDAGBuilder.cpp.
References CopyValueToVirtualRegister(), FuncInfo, llvm::FunctionLoweringInfo::InitializeRegForValue(), and llvm::FunctionLoweringInfo::isExportedInst().
Referenced by lowerStatepointMetaArgs().
| void SelectionDAGBuilder::FindMergedConditions | ( | const Value * | Cond, |
| MachineBasicBlock * | TBB, | ||
| MachineBasicBlock * | FBB, | ||
| MachineBasicBlock * | CurBB, | ||
| MachineBasicBlock * | SwitchBB, | ||
| Instruction::BinaryOps | Opc, | ||
| BranchProbability | TW, | ||
| BranchProbability | FW | ||
| ) |
FindMergedConditions - If Cond is an expression like.
Definition at line 1621 of file SelectionDAGBuilder.cpp.
References llvm::APIntOps::And(), assert(), llvm::MachineFunction::CreateMachineBasicBlock(), DAG, llvm::dyn_cast(), EmitBranchForMergedCondition(), llvm::MachineBasicBlock::getBasicBlock(), llvm::SelectionDAG::getMachineFunction(), llvm::Instruction::getOpcode(), llvm::User::getOperand(), llvm::Instruction::getParent(), llvm::MachineBasicBlock::getParent(), llvm::Value::hasOneUse(), InBlock(), llvm::MachineFunction::insert(), llvm::BranchProbability::normalizeProbabilities(), and llvm::APIntOps::Or().
Definition at line 1035 of file SelectionDAGBuilder.cpp.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), FuncInfo, and llvm::FunctionLoweringInfo::ValueMap.
Referenced by getUniformBase().
| SDValue SelectionDAGBuilder::getControlRoot | ( | ) |
getControlRoot - Similar to getRoot, but instead of flushing all the PendingLoad items, flush all the PendingExports items.
It is necessary to do this before emitting a terminator instruction.
Definition at line 908 of file SelectionDAGBuilder.cpp.
References assert(), DAG, llvm::ISD::EntryToken, getCurSDLoc(), llvm::SelectionDAG::getNode(), llvm::SDValue::getOpcode(), llvm::SelectionDAG::getRoot(), i, llvm::MVT::Other, llvm::SelectionDAG::setRoot(), and llvm::ISD::TokenFactor.
Referenced by lowerInvokable(), visitBitTestCase(), visitBitTestHeader(), visitJumpTable(), visitJumpTableHeader(), and visitSwitchCase().
getCopyFromRegs - If there was virtual register allocated for the value V emit CopyFromReg of the specified type Ty.
Return empty SDValue() otherwise.
Definition at line 998 of file SelectionDAGBuilder.cpp.
References DAG, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), FuncInfo, llvm::SelectionDAG::getContext(), getCurSDLoc(), llvm::SelectionDAG::getDataLayout(), llvm::SelectionDAG::getEntryNode(), llvm::SelectionDAG::getTargetLoweringInfo(), resolveDanglingDebugInfo(), and llvm::FunctionLoweringInfo::ValueMap.
Referenced by getValue().
|
inline |
Definition at line 652 of file SelectionDAGBuilder.h.
References llvm::Instruction::getDebugLoc().
Referenced by createSwiftErrorEntriesInEntryBlock().
|
inline |
Definition at line 648 of file SelectionDAGBuilder.h.
Referenced by CopyValueToVirtualRegister(), getControlRoot(), getCopyFromRegs(), getMemCmpLoad(), getRoot(), getValueImpl(), LowerAsSTATEPOINT(), LowerCallTo(), LowerDeoptimizingReturn(), lowerInvokable(), lowerRangeToAssertZExt(), LowerStatepoint(), populateCallLoweringInfo(), pushStackMapConstant(), spillIncomingStatepointValue(), visitBitTestCase(), visitBitTestHeader(), visitJumpTable(), visitJumpTableHeader(), visitSPDescriptorFailure(), visitSPDescriptorParent(), and visitSwitchCase().
getNonRegisterValue - Return an SDValue for the given Value, but don't look in FuncInfo.ValueMap for a virtual register.
Definition at line 1042 of file SelectionDAGBuilder.cpp.
References llvm::SDValue::getNode(), getValueImpl(), N, resolveDanglingDebugInfo(), and llvm::SDNode::setDebugLoc().
Referenced by CopyValueToVirtualRegister().
| SDValue SelectionDAGBuilder::getRoot | ( | ) |
getRoot - Return the current virtual root of the Selection DAG, flushing any PendingLoad items.
This must be done before emitting a store or any other node that may need to be ordered after any prior load instructions.
Definition at line 885 of file SelectionDAGBuilder.cpp.
References DAG, getCurSDLoc(), llvm::SelectionDAG::getNode(), llvm::SelectionDAG::getRoot(), llvm::MVT::Other, PendingLoads, llvm::SelectionDAG::setRoot(), and llvm::ISD::TokenFactor.
Referenced by LowerAsSTATEPOINT(), LowerCallTo(), lowerIncomingStatepointValue(), lowerInvokable(), and populateCallLoweringInfo().
getValue - Return an SDValue for the given Value.
Definition at line 1015 of file SelectionDAGBuilder.cpp.
References getCopyFromRegs(), llvm::SDValue::getNode(), llvm::Value::getType(), getValueImpl(), N, and resolveDanglingDebugInfo().
Referenced by addStackMapLiveVars(), getMemCmpLoad(), getUniformBase(), getValueImpl(), LowerAsSTATEPOINT(), LowerCallTo(), LowerStatepoint(), lowerStatepointMetaArgs(), populateCallLoweringInfo(), removeDuplicateGCPtrs(), reservePreviousStackSlotForValue(), visitBitTestHeader(), visitJumpTableHeader(), visitSPDescriptorParent(), and visitSwitchCase().
getValueImpl - Helper function for getValue and getNonRegisterValue.
Create an SDValue for the given value.
Definition at line 1065 of file SelectionDAGBuilder.cpp.
References assert(), llvm::SmallVectorImpl< T >::assign(), llvm::ISD::BUILD_VECTOR, C, llvm::ComputeValueVTs(), DAG, FuncInfo, llvm::SelectionDAG::getBlockAddress(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getConstantFP(), llvm::SelectionDAG::getContext(), getCurSDLoc(), llvm::SelectionDAG::getDataLayout(), llvm::SequentialType::getElementType(), llvm::SelectionDAG::getEntryNode(), llvm::SelectionDAG::getFrameIndex(), llvm::SelectionDAG::getGlobalAddress(), llvm::SelectionDAG::getMergeValues(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::SequentialType::getNumElements(), llvm::SDNode::getNumValues(), llvm::Type::getPointerAddressSpace(), llvm::TargetLoweringBase::getPointerTy(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::Value::getType(), llvm::SelectionDAG::getUNDEF(), getValue(), llvm::TargetLoweringBase::getValueType(), i, llvm::FunctionLoweringInfo::InitializeRegForValue(), llvm::Type::isAggregateType(), llvm::EVT::isFloatingPoint(), llvm_unreachable, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), SI, llvm::SmallVectorTemplateCommon< T >::size(), llvm::FunctionLoweringInfo::StaticAllocaMap, and visit().
Referenced by getNonRegisterValue(), and getValue().
| void SelectionDAGBuilder::init | ( | GCFunctionInfo * | gfi, |
| AliasAnalysis & | aa, | ||
| const TargetLibraryInfo * | li | ||
| ) |
Definition at line 843 of file SelectionDAGBuilder.cpp.
References AA, aa, Context, DAG, DL, llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getDataLayout(), GFI, LibInfo, and LPadToCallSiteMap.
Referenced by llvm::SelectionDAGISel::runOnMachineFunction().
| bool SelectionDAGBuilder::isExportableFromCurrentBlock | ( | const Value * | V, |
| const BasicBlock * | FromBB | ||
| ) |
Definition at line 1512 of file SelectionDAGBuilder.cpp.
References FuncInfo, llvm::Function::getEntryBlock(), llvm::BasicBlock::getParent(), llvm::FunctionLoweringInfo::isExportedInst(), and VI.
Referenced by EmitBranchForMergedCondition().
| SDValue SelectionDAGBuilder::LowerAsSTATEPOINT | ( | SelectionDAGBuilder::StatepointLoweringInfo & | SI | ) |
Lower SLI into a STATEPOINT instruction.
Definition at line 569 of file StatepointLowering.cpp.
References assert(), llvm::SelectionDAGBuilder::StatepointLoweringInfo::Bases, llvm::TargetLowering::CallLoweringInfo::CallConv, llvm::SelectionDAGBuilder::StatepointLoweringInfo::CLI, DAG, llvm::SelectionDAG::DeleteNode(), llvm::SmallVectorTemplateCommon< T >::end(), fuzzer::Flags, FuncInfo, llvm::ISD::GC_TRANSITION_END, llvm::ISD::GC_TRANSITION_START, llvm::SelectionDAGBuilder::StatepointLoweringInfo::GCRelocates, llvm::GCTransition, llvm::SelectionDAGBuilder::StatepointLoweringInfo::GCTransitionArgs, getCurSDLoc(), llvm::SDNode::getGluedNode(), llvm::SelectionDAG::getMachineNode(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::SDNode::getNumOperands(), llvm::SDNode::getOperand(), llvm::Instruction::getParent(), getRoot(), llvm::SelectionDAG::getSrcValue(), llvm::SelectionDAG::getTargetConstant(), llvm::Value::getType(), llvm::SDValue::getValue(), getValue(), llvm::SelectionDAG::getVTList(), llvm::MVT::Glue, llvm::MVT::i32, llvm::MVT::i64, llvm::SelectionDAGBuilder::StatepointLoweringInfo::ID, llvm::SmallVectorImpl< T >::insert(), llvm::Type::isPointerTy(), lowerCallFromStatepointLoweringInfo(), lowerStatepointMetaArgs(), llvm::MaskAll, llvm::SelectionDAGBuilder::StatepointLoweringInfo::NumPatchBytes, llvm::SDNode::op_begin(), llvm::SDNode::op_end(), llvm::MVT::Other, llvm::SelectionDAGBuilder::StatepointLoweringInfo::Ptrs, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), pushStackMapConstant(), removeDuplicateGCPtrs(), llvm::SelectionDAG::ReplaceAllUsesWith(), llvm::StatepointLoweringState::scheduleRelocCall(), llvm::TargetLowering::CallLoweringInfo::setChain(), llvm::StatepointLoweringState::startNewStatepoint(), llvm::SelectionDAGBuilder::StatepointLoweringInfo::StatepointFlags, llvm::SelectionDAGBuilder::StatepointLoweringInfo::StatepointInstr, StatepointLowering, and llvm::FunctionLoweringInfo::StatepointSpillMaps.
Referenced by LowerCallSiteWithDeoptBundleImpl(), and LowerStatepoint().
| void SelectionDAGBuilder::LowerCallSiteWithDeoptBundle | ( | ImmutableCallSite | CS, |
| SDValue | Callee, | ||
| const BasicBlock * | EHPadBB | ||
| ) |
Definition at line 891 of file StatepointLowering.cpp.
References LowerCallSiteWithDeoptBundleImpl().
| void SelectionDAGBuilder::LowerCallSiteWithDeoptBundleImpl | ( | ImmutableCallSite | CS, |
| SDValue | Callee, | ||
| const BasicBlock * | EHPadBB, | ||
| bool | VarArgDisallowed, | ||
| bool | ForceVoidReturnTy | ||
| ) |
Definition at line 857 of file StatepointLowering.cpp.
References llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::arg_begin(), llvm::SelectionDAGBuilder::StatepointLoweringInfo::CLI, DAG, llvm::StatepointDirectives::DeoptBundleStatepointID, llvm::SelectionDAGBuilder::StatepointLoweringInfo::DeoptState, llvm::SelectionDAGBuilder::StatepointLoweringInfo::EHPadBB, llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getAttributes(), llvm::SelectionDAG::getContext(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getFunctionType(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getInstruction(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getNumArgOperands(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getOperandBundle(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getType(), llvm::Type::getVoidTy(), llvm::SelectionDAGBuilder::StatepointLoweringInfo::ID, llvm::FunctionType::isVarArg(), llvm::TargetLowering::CallLoweringInfo::IsVarArg, LowerAsSTATEPOINT(), lowerRangeToAssertZExt(), llvm::None, llvm::SelectionDAGBuilder::StatepointLoweringInfo::NumPatchBytes, llvm::LLVMContext::OB_deopt, llvm::User::op_begin(), llvm::parseStatepointDirectivesFromAttrs(), populateCallLoweringInfo(), setValue(), SI, and llvm::SelectionDAGBuilder::StatepointLoweringInfo::StatepointFlags.
Referenced by LowerCallSiteWithDeoptBundle(), and LowerDeoptimizeCall().
| void SelectionDAGBuilder::LowerCallTo | ( | ImmutableCallSite | CS, |
| SDValue | Callee, | ||
| bool | IsTailCall, | ||
| const BasicBlock * | EHPadBB = nullptr |
||
| ) |
Definition at line 5822 of file SelectionDAGBuilder.cpp.
References llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::arg_begin(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::arg_end(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::arg_size(), AMDGPU::RuntimeMD::KeyName::Args, llvm::MachineRegisterInfo::createVirtualRegister(), DAG, llvm::TargetLowering::CallLoweringInfo::DAG, llvm::TargetLowering::CallLoweringInfo::DL, FuncInfo, llvm::SelectionDAG::getCopyToReg(), getCurSDLoc(), llvm::SelectionDAG::getDataLayout(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getFunctionType(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getInstruction(), llvm::FunctionLoweringInfo::getOrCreateSwiftErrorVReg(), llvm::Instruction::getParent(), llvm::BasicBlock::getParent(), llvm::TargetLoweringBase::getPointerTy(), llvm::TargetLoweringBase::getRegClassFor(), llvm::MachineFunction::getRegInfo(), llvm::SelectionDAG::getRegister(), getRoot(), llvm::SelectionDAG::getTarget(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::Value::getType(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getType(), getValue(), i, llvm::TargetLowering::CallLoweringInfo::InVals, llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::isConvergent(), llvm::Type::isEmptyTy(), llvm::isInTailCallPosition(), llvm::TargetLowering::ArgListEntry::isSRet, llvm::TargetLowering::ArgListEntry::isSwiftError, lowerInvokable(), lowerRangeToAssertZExt(), llvm::FunctionLoweringInfo::MBB, llvm::FunctionLoweringInfo::MF, llvm::TargetLowering::ArgListEntry::Node, llvm::TargetLowering::ArgListEntry::setAttributes(), llvm::TargetLowering::CallLoweringInfo::setCallee(), llvm::TargetLowering::CallLoweringInfo::setChain(), llvm::TargetLowering::CallLoweringInfo::setConvergent(), llvm::FunctionLoweringInfo::setCurrentSwiftErrorVReg(), llvm::TargetLowering::CallLoweringInfo::setDebugLoc(), llvm::SelectionDAG::setRoot(), llvm::TargetLowering::CallLoweringInfo::setTailCall(), setValue(), llvm::TargetLowering::supportSwiftError(), and llvm::TargetLowering::ArgListEntry::Ty.
Definition at line 972 of file StatepointLowering.cpp.
References DAG, llvm::RTLIB::DEOPTIMIZE, llvm::SelectionDAG::getDataLayout(), llvm::SelectionDAG::getExternalSymbol(), llvm::SelectionDAG::getTargetLoweringInfo(), and LowerCallSiteWithDeoptBundleImpl().
| void SelectionDAGBuilder::LowerDeoptimizingReturn | ( | ) |
Definition at line 985 of file StatepointLowering.cpp.
References DAG, getCurSDLoc(), llvm::SelectionDAG::getNode(), llvm::SelectionDAG::getRoot(), llvm::SelectionDAG::getTarget(), llvm::TargetMachine::Options, llvm::MVT::Other, llvm::SelectionDAG::setRoot(), llvm::ISD::TRAP, and llvm::TargetOptions::TrapUnreachable.
| std::pair< SDValue, SDValue > SelectionDAGBuilder::lowerInvokable | ( | TargetLowering::CallLoweringInfo & | CLI, |
| const BasicBlock * | EHPadBB = nullptr |
||
| ) |
Definition at line 5753 of file SelectionDAGBuilder.cpp.
References llvm::MachineFunction::addInvoke(), llvm::WinEHFuncInfo::addIPToStateRange(), assert(), llvm::MCContext::createTempSymbol(), llvm::TargetLowering::CallLoweringInfo::CS, DAG, FuncInfo, llvm::MachineModuleInfo::getContext(), getControlRoot(), llvm::MachineModuleInfo::getCurrentCallSite(), getCurSDLoc(), llvm::SelectionDAG::getEHLabel(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getInstruction(), llvm::SelectionDAG::getMachineFunction(), llvm::MachineFunction::getMMI(), getRoot(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::MachineFunction::getWinEHFuncInfo(), llvm::MachineFunction::hasEHFunclets(), HasTailCall, llvm::TargetLowering::CallLoweringInfo::IsTailCall, llvm::TargetLowering::LowerCallTo(), LPadToCallSiteMap, llvm::FunctionLoweringInfo::MBBMap, llvm::MachineFunction::setCallSiteBeginLabel(), llvm::TargetLowering::CallLoweringInfo::setChain(), llvm::MachineModuleInfo::setCurrentCallSite(), and llvm::SelectionDAG::setRoot().
Referenced by lowerCallFromStatepointLoweringInfo(), and LowerCallTo().
| SDValue SelectionDAGBuilder::lowerRangeToAssertZExt | ( | SelectionDAG & | DAG, |
| const Instruction & | I, | ||
| SDValue | Op | ||
| ) |
Definition at line 7312 of file SelectionDAGBuilder.cpp.
References llvm::ISD::AssertZext, llvm::tgtok::Bits, llvm::APInt::getActiveBits(), llvm::getConstantRangeFromMetadata(), llvm::SelectionDAG::getContext(), getCurSDLoc(), llvm::EVT::getIntegerVT(), llvm::SelectionDAG::getMergeValues(), llvm::Instruction::getMetadata(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::SDNode::getNumValues(), llvm::ConstantRange::getUnsignedMax(), llvm::ConstantRange::getUnsignedMin(), llvm::SDValue::getValue(), llvm::SDValue::getValueType(), llvm::SelectionDAG::getValueType(), llvm::MipsISD::Hi, I, llvm::ConstantRange::isEmptySet(), llvm::ConstantRange::isFullSet(), llvm::APInt::isMinValue(), llvm::ConstantRange::isWrappedSet(), llvm::MipsISD::Lo, llvm::LLVMContext::MD_range, and llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back().
Referenced by LowerCallSiteWithDeoptBundleImpl(), and LowerCallTo().
| void SelectionDAGBuilder::LowerStatepoint | ( | ImmutableStatepoint | Statepoint, |
| const BasicBlock * | EHPadBB = nullptr |
||
| ) |
Definition at line 765 of file StatepointLowering.cpp.
References llvm::CallingConv::AnyReg, assert(), llvm::SelectionDAGBuilder::StatepointLoweringInfo::Bases, llvm::StatepointBase< const Function, const Instruction, const Value, ImmutableCallSite >::CallArgsBeginPos, llvm::SelectionDAGBuilder::StatepointLoweringInfo::CLI, llvm::FunctionLoweringInfo::CreateRegs(), DAG, llvm::SelectionDAGBuilder::StatepointLoweringInfo::DeoptState, DL, llvm::SelectionDAGBuilder::StatepointLoweringInfo::EHPadBB, FuncInfo, llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::gc_args_begin(), llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::gc_args_end(), llvm::SelectionDAGBuilder::StatepointLoweringInfo::GCArgs, llvm::SelectionDAGBuilder::StatepointLoweringInfo::GCRelocates, llvm::SelectionDAGBuilder::StatepointLoweringInfo::GCTransitionArgs, llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::getActualReturnType(), llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::getCalledValue(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getCallingConv(), llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::getCallSite(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getContext(), getCurSDLoc(), llvm::SelectionDAG::getDataLayout(), llvm::SelectionDAG::getEntryNode(), llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::getFlags(), llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::getGCResult(), llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::getID(), llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::getInstruction(), llvm::SelectionDAG::getIntPtrConstant(), llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::getNumCallArgs(), llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::getNumPatchBytes(), llvm::Instruction::getParent(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getParent(), llvm::Type::getPointerAddressSpace(), llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::getRelocates(), llvm::GCFunctionInfo::getStrategy(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::Value::getType(), getValue(), GFI, llvm::SelectionDAGBuilder::StatepointLoweringInfo::ID, llvm::Type::isVoidTy(), LowerAsSTATEPOINT(), llvm::SelectionDAGBuilder::StatepointLoweringInfo::NumPatchBytes, populateCallLoweringInfo(), llvm::SelectionDAGBuilder::StatepointLoweringInfo::Ptrs, setValue(), SI, llvm::SelectionDAGBuilder::StatepointLoweringInfo::StatepointFlags, llvm::SelectionDAGBuilder::StatepointLoweringInfo::StatepointInstr, llvm::GCStrategy::useStatepoints(), llvm::FunctionLoweringInfo::ValueMap, llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::verify(), llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::vm_state_begin(), and llvm::StatepointBase< FunTy, InstructionTy, ValueTy, CallSiteTy >::vm_state_end().
| void SelectionDAGBuilder::populateCallLoweringInfo | ( | TargetLowering::CallLoweringInfo & | CLI, |
| ImmutableCallSite | CS, | ||
| unsigned | ArgIdx, | ||
| unsigned | NumArgs, | ||
| SDValue | Callee, | ||
| Type * | ReturnTy, | ||
| bool | IsPatchPoint | ||
| ) |
Populate a CallLowerinInfo (into CLI) based on the properties of the call being lowered.
This is a helper for lowering intrinsics that follow a target calling convention or require stack pointer adjustment. Only a subset of the intrinsic's operands need to participate in the calling convention.
Definition at line 7355 of file SelectionDAGBuilder.cpp.
References AMDGPU::RuntimeMD::KeyName::Args, assert(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getCallingConv(), getCurSDLoc(), getRoot(), llvm::Value::getType(), getValue(), llvm::Type::isEmptyTy(), llvm::TargetLowering::ArgListEntry::Node, llvm::TargetLowering::CallLoweringInfo::setCallee(), llvm::TargetLowering::CallLoweringInfo::setChain(), and llvm::TargetLowering::CallLoweringInfo::setDebugLoc().
Referenced by LowerCallSiteWithDeoptBundleImpl(), and LowerStatepoint().
Definition at line 971 of file SelectionDAGBuilder.cpp.
References llvm::SelectionDAG::AddDbgValue(), assert(), DAG, llvm::dbgs(), DEBUG, llvm::DbgValueInst::getExpression(), llvm::SDValue::getNode(), llvm::DbgValueInst::getOffset(), llvm::DbgValueInst::getVariable(), llvm::DILocalVariable::isValidLocationForIntrinsic(), and Offset.
Referenced by getCopyFromRegs(), getNonRegisterValue(), and getValue().
Definition at line 681 of file SelectionDAGBuilder.h.
References assert(), llvm::SDValue::getNode(), and N.
Definition at line 675 of file SelectionDAGBuilder.h.
References assert(), llvm::SDValue::getNode(), and N.
Referenced by LowerCallSiteWithDeoptBundleImpl(), LowerCallTo(), and LowerStatepoint().
If the set of cases should be emitted as a series of branches, return true.
If we should emit this as a bunch of and/or'd together conditions, return false.
Definition at line 1720 of file SelectionDAGBuilder.cpp.
References llvm::ISD::SETEQ, and llvm::ISD::SETNE.
| void SelectionDAGBuilder::UpdateSplitBlock | ( | MachineBasicBlock * | First, |
| MachineBasicBlock * | Last | ||
| ) |
UpdateSplitBlock - When an MBB was split during scheduling, update the references that need to refer to the last resulting block.
Definition at line 2376 of file SelectionDAGBuilder.cpp.
References BitTestCases, i, and JTCases.
| void SelectionDAGBuilder::visit | ( | const Instruction & | I | ) |
Definition at line 934 of file SelectionDAGBuilder.cpp.
References CopyToExportRegsIfNeeded(), llvm::Instruction::getOpcode(), llvm::Instruction::getParent(), HasTailCall, I, and llvm::isStatepoint().
Referenced by getValueImpl().
Definition at line 957 of file SelectionDAGBuilder.cpp.
References llvm_unreachable.
| void SelectionDAGBuilder::visitBitTestCase | ( | BitTestBlock & | BB, |
| MachineBasicBlock * | NextMBB, | ||
| BranchProbability | BranchProbToNext, | ||
| unsigned | Reg, | ||
| BitTestCase & | B, | ||
| MachineBasicBlock * | SwitchBB | ||
| ) |
visitBitTestCase - this function produces one "bit test"
Definition at line 2157 of file SelectionDAGBuilder.cpp.
References llvm::ISD::AND, llvm::ISD::BR, llvm::ISD::BRCOND, llvm::countPopulation(), llvm::countTrailingOnes(), llvm::countTrailingZeros(), DAG, llvm::SelectionDAG::getBasicBlock(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getContext(), getControlRoot(), llvm::SelectionDAG::getCopyFromReg(), getCurSDLoc(), llvm::SelectionDAG::getDataLayout(), llvm::SelectionDAG::getNode(), llvm::SelectionDAG::getSetCC(), llvm::TargetLoweringBase::getSetCCResultType(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::MachineBasicBlock::normalizeSuccProbs(), llvm::MVT::Other, llvm::ISD::SETEQ, llvm::ISD::SETNE, llvm::SelectionDAG::setRoot(), and llvm::ISD::SHL.
| void SelectionDAGBuilder::visitBitTestHeader | ( | BitTestBlock & | B, |
| MachineBasicBlock * | SwitchBB | ||
| ) |
visitBitTestHeader - This function emits necessary code to produce value suitable for "bit tests"
Definition at line 2099 of file SelectionDAGBuilder.cpp.
References llvm::ISD::BR, llvm::ISD::BRCOND, llvm::FunctionLoweringInfo::CreateReg(), DAG, FuncInfo, llvm::SelectionDAG::getBasicBlock(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getContext(), getControlRoot(), llvm::SelectionDAG::getCopyToReg(), getCurSDLoc(), llvm::SelectionDAG::getDataLayout(), llvm::SelectionDAG::getNode(), llvm::TargetLoweringBase::getPointerTy(), llvm::SelectionDAG::getSetCC(), llvm::TargetLoweringBase::getSetCCResultType(), llvm::EVT::getSimpleVT(), llvm::EVT::getSizeInBits(), llvm::SelectionDAG::getTargetLoweringInfo(), getValue(), llvm::SDValue::getValueType(), llvm::SelectionDAG::getZExtOrTrunc(), i, llvm::TargetLoweringBase::isTypeLegal(), llvm::isUIntN(), MBB, llvm::MachineBasicBlock::normalizeSuccProbs(), llvm::MVT::Other, llvm::SelectionDAG::setRoot(), llvm::ISD::SETUGT, and llvm::ISD::SUB.
| void SelectionDAGBuilder::visitJumpTable | ( | JumpTable & | JT | ) |
visitJumpTable - Emit JumpTable node in the current MBB
Definition at line 1904 of file SelectionDAGBuilder.cpp.
References assert(), llvm::ISD::BR_JT, DAG, getControlRoot(), llvm::SelectionDAG::getCopyFromReg(), getCurSDLoc(), llvm::SelectionDAG::getDataLayout(), llvm::SelectionDAG::getJumpTable(), llvm::SelectionDAG::getNode(), llvm::TargetLoweringBase::getPointerTy(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::SDValue::getValue(), llvm::MVT::Other, and llvm::SelectionDAG::setRoot().
| void SelectionDAGBuilder::visitJumpTableHeader | ( | JumpTable & | JT, |
| JumpTableHeader & | JTH, | ||
| MachineBasicBlock * | SwitchBB | ||
| ) |
visitJumpTableHeader - This function emits necessary code to produce index in the JumpTable from switch case.
Definition at line 1919 of file SelectionDAGBuilder.cpp.
References llvm::ISD::BR, llvm::ISD::BRCOND, llvm::ARMISD::CMP, llvm::FunctionLoweringInfo::CreateReg(), DAG, FuncInfo, llvm::SelectionDAG::getBasicBlock(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getContext(), getControlRoot(), llvm::SelectionDAG::getCopyToReg(), getCurSDLoc(), llvm::SelectionDAG::getDataLayout(), llvm::SelectionDAG::getNode(), llvm::TargetLoweringBase::getPointerTy(), llvm::SelectionDAG::getSetCC(), llvm::TargetLoweringBase::getSetCCResultType(), llvm::SelectionDAG::getTargetLoweringInfo(), getValue(), llvm::SDValue::getValueType(), llvm::SelectionDAG::getZExtOrTrunc(), llvm::MVT::Other, llvm::SelectionDAG::setRoot(), llvm::ISD::SETUGT, and llvm::ISD::SUB.
| void SelectionDAGBuilder::visitSPDescriptorFailure | ( | StackProtectorDescriptor & | SPD | ) |
Codegen the failure basic block for a stack protector check.
A failure stack protector machine basic block consists simply of a call to __stack_chk_fail().
For a high level explanation of how this fits into the stack protector generation see the comment on the declaration of class StackProtectorDescriptor.
Definition at line 2089 of file SelectionDAGBuilder.cpp.
References DAG, getCurSDLoc(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::MVT::isVoid, llvm::TargetLowering::makeLibCall(), llvm::None, llvm::SelectionDAG::setRoot(), and llvm::RTLIB::STACKPROTECTOR_CHECK_FAIL.
| void SelectionDAGBuilder::visitSPDescriptorParent | ( | StackProtectorDescriptor & | SPD, |
| MachineBasicBlock * | ParentBB | ||
| ) |
Codegen a new tail for a stack protector check ParentMBB which has had its tail spliced into a stack protector check success bb.
For a high level explanation of how this fits into the stack protector generation see the comment on the declaration of class StackProtectorDescriptor.
Definition at line 1994 of file SelectionDAGBuilder.cpp.
References AMDGPU::RuntimeMD::KeyName::Args, assert(), llvm::ISD::BR, llvm::ISD::BRCOND, DAG, DL, llvm::SelectionDAG::getBasicBlock(), llvm::SelectionDAG::getConstant(), llvm::Module::getContext(), llvm::SelectionDAG::getContext(), getCurSDLoc(), llvm::SelectionDAG::getDataLayout(), llvm::SelectionDAG::getEntryNode(), llvm::MachinePointerInfo::getFixedStack(), llvm::SelectionDAG::getFrameIndex(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getFunction(), llvm::Type::getInt8PtrTy(), llvm::SelectionDAG::getLoad(), getLoadStackGuard(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getNode(), llvm::SDValue::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::GlobalValue::getParent(), llvm::TargetLoweringBase::getPointerTy(), llvm::DataLayout::getPrefTypeAlignment(), llvm::TargetLoweringBase::getSDagStackGuard(), llvm::SelectionDAG::getSetCC(), llvm::TargetLoweringBase::getSetCCResultType(), llvm::TargetLoweringBase::getSSPStackGuardCheck(), llvm::MachineFrameInfo::getStackProtectorIndex(), llvm::SelectionDAG::getTargetLoweringInfo(), getValue(), llvm::SDValue::getValueType(), llvm::TargetLowering::ArgListEntry::isInReg, llvm::TargetLowering::LowerCallTo(), llvm::MachineMemOperand::MOVolatile, llvm::TargetLowering::ArgListEntry::Node, llvm::MVT::Other, llvm::TargetLowering::CallLoweringInfo::setChain(), llvm::TargetLowering::CallLoweringInfo::setDebugLoc(), llvm::ISD::SETNE, llvm::SelectionDAG::setRoot(), llvm::ISD::SUB, llvm::TargetLowering::ArgListEntry::Ty, and llvm::TargetLowering::useLoadStackGuardNode().
| void SelectionDAGBuilder::visitSwitchCase | ( | CaseBlock & | CB, |
| MachineBasicBlock * | SwitchBB | ||
| ) |
visitSwitchCase - Emits the necessary code to represent a single node in the binary search tree resulting from lowering a switch instruction.
Definition at line 1835 of file SelectionDAGBuilder.cpp.
References assert(), llvm::ISD::BR, llvm::ISD::BRCOND, DAG, llvm::SelectionDAG::getBasicBlock(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getContext(), getControlRoot(), getCurSDLoc(), llvm::ConstantInt::getFalse(), llvm::SelectionDAG::getNode(), llvm::SelectionDAG::getSetCC(), llvm::ConstantInt::getTrue(), getValue(), llvm::SDValue::getValueType(), High, llvm::MVT::i1, llvm::MachineBasicBlock::normalizeSuccProbs(), llvm::MVT::Other, llvm::ISD::SETEQ, llvm::ISD::SETLE, llvm::SelectionDAG::setRoot(), llvm::ISD::SETULE, llvm::ISD::SUB, std::swap(), and llvm::ISD::XOR.
| AliasAnalysis* llvm::SelectionDAGBuilder::AA |
Definition at line 571 of file SelectionDAGBuilder.h.
Referenced by getMemCmpLoad(), and init().
| std::vector<BitTestBlock> llvm::SelectionDAGBuilder::BitTestCases |
BitTestCases - Vector of BitTestBlock structures used to communicate SwitchInst code generation information.
Definition at line 582 of file SelectionDAGBuilder.h.
Referenced by UpdateSplitBlock().
Definition at line 589 of file SelectionDAGBuilder.h.
| LLVMContext* llvm::SelectionDAGBuilder::Context |
Definition at line 607 of file SelectionDAGBuilder.h.
Referenced by init().
| SelectionDAG& llvm::SelectionDAGBuilder::DAG |
Definition at line 569 of file SelectionDAGBuilder.h.
Referenced by addStackMapLiveVars(), llvm::StatepointLoweringState::allocateStackSlot(), CopyValueToVirtualRegister(), EmitBranchForMergedCondition(), FindMergedConditions(), getControlRoot(), getCopyFromRegs(), getMemCmpLoad(), getRoot(), getUniformBase(), getValueImpl(), init(), LowerAsSTATEPOINT(), LowerCallSiteWithDeoptBundleImpl(), LowerCallTo(), LowerDeoptimizeCall(), LowerDeoptimizingReturn(), lowerIncomingStatepointValue(), lowerInvokable(), LowerStatepoint(), lowerStatepointMetaArgs(), pushStackMapConstant(), reservePreviousStackSlotForValue(), resolveDanglingDebugInfo(), spillIncomingStatepointValue(), visitBitTestCase(), visitBitTestHeader(), visitJumpTable(), visitJumpTableHeader(), visitSPDescriptorFailure(), visitSPDescriptorParent(), and visitSwitchCase().
| const DataLayout* llvm::SelectionDAGBuilder::DL |
Definition at line 570 of file SelectionDAGBuilder.h.
Referenced by getMemCmpLoad(), init(), LowerStatepoint(), and visitSPDescriptorParent().
| FunctionLoweringInfo& llvm::SelectionDAGBuilder::FuncInfo |
FuncInfo - Information about the function as a whole.
Definition at line 593 of file SelectionDAGBuilder.h.
Referenced by llvm::StatepointLoweringState::allocateStackSlot(), CopyToExportRegsIfNeeded(), CopyValueToVirtualRegister(), ExportFromCurrentBlock(), findPreviousSpillSlot(), findValue(), getCopyFromRegs(), getValueImpl(), isExportableFromCurrentBlock(), LowerAsSTATEPOINT(), LowerCallTo(), lowerInvokable(), LowerStatepoint(), lowerStatepointMetaArgs(), reservePreviousStackSlotForValue(), llvm::StatepointLoweringState::startNewStatepoint(), visitBitTestHeader(), and visitJumpTableHeader().
| GCFunctionInfo* llvm::SelectionDAGBuilder::GFI |
GFI - Garbage collection metadata for the function.
Definition at line 596 of file SelectionDAGBuilder.h.
Referenced by init(), LowerStatepoint(), and lowerStatepointMetaArgs().
| bool llvm::SelectionDAGBuilder::HasTailCall |
HasTailCall - This is set to true if a call in the current block has been translated as a tail call.
In this case, no subsequent DAG nodes should be created.
Definition at line 605 of file SelectionDAGBuilder.h.
Referenced by clear(), lowerInvokable(), and visit().
| std::vector<JumpTableBlock> llvm::SelectionDAGBuilder::JTCases |
JTCases - Vector of JumpTable structures used to communicate SwitchInst code generation information.
Definition at line 579 of file SelectionDAGBuilder.h.
Referenced by UpdateSplitBlock().
| const TargetLibraryInfo* llvm::SelectionDAGBuilder::LibInfo |
Definition at line 572 of file SelectionDAGBuilder.h.
Referenced by init().
Lowest valid SDNodeOrder.
The special case 0 is reserved for scheduling nodes without a corresponding SDNode.
Definition at line 567 of file SelectionDAGBuilder.h.
Referenced by clear().
| DenseMap<MachineBasicBlock*, SmallVector<unsigned, 4> > llvm::SelectionDAGBuilder::LPadToCallSiteMap |
LPadToCallSiteMap - Map a landing pad to the call site indexes.
Definition at line 599 of file SelectionDAGBuilder.h.
Referenced by init(), and lowerInvokable().
| SmallVector<SDValue, 8> llvm::SelectionDAGBuilder::PendingLoads |
PendingLoads - Loads are not emitted to the program immediately.
We bunch them up and then emit token factor nodes when possible. This allows us to get simple disambiguation between loads without worrying about alias analysis.
Definition at line 120 of file SelectionDAGBuilder.h.
Referenced by clear(), getMemCmpLoad(), and getRoot().
| StackProtectorDescriptor llvm::SelectionDAGBuilder::SPDescriptor |
A StackProtectorDescriptor structure used to communicate stack protector information in between SelectBasicBlock and FinishBasicBlock.
Definition at line 585 of file SelectionDAGBuilder.h.
| StatepointLoweringState llvm::SelectionDAGBuilder::StatepointLowering |
State used while lowering a statepoint sequence (gc_statepoint, gc_relocate, and gc_result).
See StatepointLowering.hpp/cpp for details.
Definition at line 124 of file SelectionDAGBuilder.h.
Referenced by clear(), LowerAsSTATEPOINT(), lowerStatepointMetaArgs(), reservePreviousStackSlotForValue(), and spillIncomingStatepointValue().
| std::vector<CaseBlock> llvm::SelectionDAGBuilder::SwitchCases |
SwitchCases - Vector of CaseBlock structures used to communicate SwitchInst code generation information.
Definition at line 576 of file SelectionDAGBuilder.h.
Referenced by EmitBranchForMergedCondition().
1.8.6