LLVM API Documentation
#include <SelectionDAG.h>
The representation used by the SelectionDAG is a target-independent representation, which has some similarities to the GCC RTL representation, but is significantly more simple, powerful, and is a graph form instead of a linear form.
Definition at line 75 of file SelectionDAG.h.
| typedef ilist<SDNode>::const_iterator llvm::SelectionDAG::allnodes_const_iterator |
Definition at line 173 of file SelectionDAG.h.
| typedef ilist<SDNode>::iterator llvm::SelectionDAG::allnodes_iterator |
Definition at line 176 of file SelectionDAG.h.
| SelectionDAG::SelectionDAG | ( | TargetLowering & | tli, | |
| FunctionLoweringInfo & | fli | |||
| ) |
Definition at line 799 of file SelectionDAG.cpp.
| SelectionDAG::~SelectionDAG | ( | ) |
Definition at line 814 of file SelectionDAG.cpp.
| void SelectionDAG::init | ( | MachineFunction & | mf, | |
| MachineModuleInfo * | mmi, | |||
| DwarfWriter * | dw | |||
| ) |
init - Prepare this SelectionDAG to process code in the given MachineFunction.
Definition at line 806 of file SelectionDAG.cpp.
References llvm::Function::getContext(), and llvm::MachineFunction::getFunction().
Referenced by llvm::SelectionDAGISel::runOnMachineFunction().
| void SelectionDAG::clear | ( | ) |
clear - Clear state and free memory necessary to make this SelectionDAG ready to process a new block.
Definition at line 825 of file SelectionDAG.cpp.
References getEntryNode(), llvm::BumpPtrAllocator::Reset(), and llvm::SDNode::UseList.
Referenced by llvm::SelectionDAGLowering::clear().
| MachineFunction& llvm::SelectionDAG::getMachineFunction | ( | ) | const [inline] |
Definition at line 136 of file SelectionDAG.h.
Referenced by CalculateParameterAndLinkageAreaSize(), CalculateTailCallSPDiff(), CreateStackTemporary(), llvm::PIC16TargetLowering::ExpandFrameIndex(), llvm::SelectionDAGLowering::FindMergedConditions(), llvm::DOTGraphTraits< SelectionDAG * >::getGraphName(), llvm::X86TargetLowering::getOptimalMemOpType(), llvm::SelectionDAGLowering::GetRegistersForValue(), llvm::X86TargetLowering::getReturnAddressFrameIndex(), InferAlignment(), llvm::X86TargetLowering::IsEligibleForTailCallOptimization(), llvm::PPCTargetLowering::IsEligibleForTailCallOptimization(), LowerCTPOP(), llvm::SPUTargetLowering::LowerFormalArguments(), llvm::SparcTargetLowering::LowerFormalArguments(), llvm::PIC16TargetLowering::LowerFormalArguments(), LowerLOAD(), llvm::SPUTargetLowering::LowerReturn(), llvm::SparcTargetLowering::LowerReturn(), llvm::PIC16TargetLowering::LowerReturn(), LowerSTORE(), LowerVECTOR_SHUFFLE(), MeetsMaxMemopRequirement(), PerformMulCombine(), PerformShuffleCombine(), PerformSTORECombine(), PrepareTailCall(), llvm::X86InstrInfo::unfoldMemoryOperand(), and viewGraph().
| const TargetMachine & SelectionDAG::getTarget | ( | ) | const |
Definition at line 314 of file SelectionDAG.cpp.
References llvm::MachineFunction::getTarget().
Referenced by llvm::SDNode::getOperationName(), llvm::SelectionDAGLowering::GetRegistersForValue(), InferAlignment(), llvm::SelectionDAGLowering::init(), llvm::SparcTargetLowering::LowerCall(), LowerConstantPool(), LowerGlobalAddress(), LowerJumpTable(), and llvm::SparcTargetLowering::LowerReturn().
| TargetLowering& llvm::SelectionDAG::getTargetLoweringInfo | ( | ) | const [inline] |
Definition at line 138 of file SelectionDAG.h.
Referenced by llvm::RegsForValue::AddInlineAsmOperands(), combineSelectAndUse(), getCopyFromParts(), getCopyToParts(), getMemcpyLoadsAndStores(), getMemmoveLoadsAndStores(), getMemsetStores(), getMemsetValue(), llvm::SDNode::getOperationName(), isBLACompatibleAddress(), llvm::SPUTargetLowering::LowerCall(), llvm::SPUTargetLowering::LowerFormalArguments(), LowerINSERT_VECTOR_ELT(), LowerLOAD(), LowerMemOpCallTo(), LowerSTORE(), LowerVASTART(), LowerVECTOR_SHUFFLE(), PerformBTCombine(), PerformExtendCombine(), PerformSELECTCombine(), PrepareCall(), and llvm::TargetLowering::TargetLoweringOpt::ShrinkDemandedOp().
| FunctionLoweringInfo& llvm::SelectionDAG::getFunctionLoweringInfo | ( | ) | const [inline] |
| MachineModuleInfo* llvm::SelectionDAG::getMachineModuleInfo | ( | ) | const [inline] |
Definition at line 140 of file SelectionDAG.h.
Referenced by isVerifiedDebugInfoDesc(), and llvm::SelectionDAGLowering::LowerCallTo().
| DwarfWriter* llvm::SelectionDAG::getDwarfWriter | ( | ) | const [inline] |
Definition at line 141 of file SelectionDAG.h.
| LLVMContext* llvm::SelectionDAG::getContext | ( | ) | const [inline] |
Definition at line 142 of file SelectionDAG.h.
Referenced by llvm::RegsForValue::AddInlineAsmOperands(), CreateStackTemporary(), llvm::SelectionDAGLowering::EmitBranchForMergedCondition(), ExpandConstantFP(), ExpandLibCall(), ExpandUnalignedLoad(), ExpandUnalignedStore(), FindAssocWidenVecType(), getConstantFP(), getCopyFromParts(), llvm::RegsForValue::getCopyFromRegs(), getCopyToParts(), llvm::RegsForValue::getCopyToRegs(), getMemcpy(), getMemcpyLoadsAndStores(), getMemmove(), getMemset(), getMemsetStringVal(), llvm::SelectionDAGLowering::getValue(), llvm::X86TargetLowering::LowerAsmOperandForConstraint(), llvm::SparcTargetLowering::LowerCall(), llvm::AlphaTargetLowering::LowerCallResult(), LowerCTPOP(), llvm::SparcTargetLowering::LowerFormalArguments(), LowerLOAD(), llvm::SPUTargetLowering::LowerReturn(), llvm::SparcTargetLowering::LowerReturn(), LowerSTORE(), LowerTRUNCATE(), MeetsMaxMemopRequirement(), llvm::FunctionLoweringInfo::set(), llvm::TargetLowering::TargetLoweringOpt::ShrinkDemandedOp(), llvm::TargetLowering::SimplifySetCC(), and llvm::SelectionDAGLowering::visitSwitchCase().
| void SelectionDAG::viewGraph | ( | const std::string & | Title | ) |
viewGraph - Pop up a GraphViz/gv window with the DAG rendered using 'dot'.
viewGraph - Pop up a ghostview window with the reachable parts of the DAG rendered using 'dot'.
Definition at line 138 of file SelectionDAGPrinter.cpp.
References llvm::cerr(), getMachineFunction(), and llvm::ViewGraph().
| void SelectionDAG::viewGraph | ( | ) |
Definition at line 151 of file SelectionDAGPrinter.cpp.
| void SelectionDAG::clearGraphAttrs | ( | ) |
clearGraphAttrs - Clear all previously defined node graph attributes. Intended to be used from a debugging tool (eg. gdb).
clearGraphAttrs - Clear all previously defined node graph attributes. Intended to be used from a debugging tool (eg. gdb).
Definition at line 157 of file SelectionDAGPrinter.cpp.
References llvm::cerr(), and NodeGraphAttrs.
| void SelectionDAG::setGraphAttrs | ( | const SDNode * | N, | |
| const char * | Attrs | |||
| ) |
setGraphAttrs - Set graph attributes for a node. (eg. "color=red".)
Definition at line 169 of file SelectionDAGPrinter.cpp.
References llvm::cerr(), and NodeGraphAttrs.
| const std::string SelectionDAG::getGraphAttrs | ( | const SDNode * | N | ) | const |
getGraphAttrs - Get graph attributes for a node. (eg. "color=red".) Used from getNodeAttributes.
getGraphAttrs - Get graph attributes for a node. (eg. "color=red".) Used from getNodeAttributes.
Definition at line 181 of file SelectionDAGPrinter.cpp.
References llvm::cerr(), and NodeGraphAttrs.
Referenced by llvm::DOTGraphTraits< SelectionDAG * >::getNodeAttributes().
| void SelectionDAG::setGraphColor | ( | const SDNode * | N, | |
| const char * | Color | |||
| ) |
setGraphColor - Convenience for setting node color attribute.
Definition at line 199 of file SelectionDAGPrinter.cpp.
References llvm::cerr(), and NodeGraphAttrs.
| void SelectionDAG::setSubgraphColor | ( | SDNode * | N, | |
| const char * | Color | |||
| ) |
setGraphColor - Convenience for setting subgraph color attribute.
setSubgraphColor - Convenience for setting subgraph color attribute.
Definition at line 243 of file SelectionDAGPrinter.cpp.
References llvm::cerr().
| allnodes_const_iterator llvm::SelectionDAG::allnodes_begin | ( | ) | const [inline] |
Definition at line 174 of file SelectionDAG.h.
Referenced by AssignTopologicalOrder(), llvm::GraphTraits< SelectionDAG * >::nodes_begin(), RemoveDeadNodes(), and llvm::DAGTypeLegalizer::run().
| allnodes_const_iterator llvm::SelectionDAG::allnodes_end | ( | ) | const [inline] |
Definition at line 175 of file SelectionDAG.h.
Referenced by AssignTopologicalOrder(), llvm::GraphTraits< SelectionDAG * >::nodes_end(), RemoveDeadNodes(), and llvm::DAGTypeLegalizer::run().
| allnodes_iterator llvm::SelectionDAG::allnodes_begin | ( | ) | [inline] |
Definition at line 177 of file SelectionDAG.h.
| allnodes_iterator llvm::SelectionDAG::allnodes_end | ( | ) | [inline] |
Definition at line 178 of file SelectionDAG.h.
| const SDValue& llvm::SelectionDAG::getRoot | ( | ) | const [inline] |
getRoot - Return the root tag of the SelectionDAG.
Definition at line 185 of file SelectionDAG.h.
Referenced by llvm::DOTGraphTraits< SelectionDAG * >::addCustomGraphFeatures(), llvm::SelectionDAGLowering::getControlRoot(), llvm::ScheduleDAGSDNodes::getCustomGraphFeatures(), llvm::SelectionDAGLowering::getRoot(), llvm::SparcTargetLowering::LowerFormalArguments(), LowerSTORE(), RemoveDeadNodes(), and llvm::DAGTypeLegalizer::run().
| SDValue llvm::SelectionDAG::getEntryNode | ( | ) | const [inline] |
getEntryNode - Return the token chain corresponding to the entry of the function.
Definition at line 189 of file SelectionDAG.h.
Referenced by clear(), ExpandConstantFP(), ExpandLibCall(), getStackArgumentTokenFactor(), llvm::SelectionDAGLowering::getValue(), llvm::SparcTargetLowering::LowerCall(), llvm::SystemZTargetLowering::LowerGlobalAddress(), LowerToTLSExecModel(), LowerToTLSGeneralDynamicModel32(), LowerToTLSGeneralDynamicModel64(), and LowerVECTOR_SHUFFLE().
setRoot - Set the current root tag of the SelectionDAG.
Definition at line 195 of file SelectionDAG.h.
References llvm::SDValue::getNode(), llvm::SDValue::getValueType(), and llvm::MVT::Other.
Referenced by llvm::SelectionDAGLowering::getControlRoot(), llvm::SelectionDAGLowering::getRoot(), llvm::TargetLowering::LowerCallTo(), llvm::SelectionDAGLowering::LowerCallTo(), LowerSTORE(), RemoveDeadNodes(), llvm::DAGTypeLegalizer::run(), llvm::SelectionDAGLowering::visitBitTestCase(), llvm::SelectionDAGLowering::visitBitTestHeader(), llvm::SelectionDAGLowering::visitJumpTable(), llvm::SelectionDAGLowering::visitJumpTableHeader(), and llvm::SelectionDAGLowering::visitSwitchCase().
| void SelectionDAG::Combine | ( | CombineLevel | Level, | |
| AliasAnalysis & | AA, | |||
| CodeGenOpt::Level | OptLevel | |||
| ) |
Combine - This iterates over the nodes in the SelectionDAG, folding certain types of nodes together, or eliminating superfluous nodes. The Level argument controls whether Combine is allowed to produce nodes and types that are illegal on the target.
run - This is the main entry point to this class.
Definition at line 6255 of file DAGCombiner.cpp.
| bool SelectionDAG::LegalizeTypes | ( | ) |
LegalizeTypes - This transforms the SelectionDAG into a SelectionDAG that only uses types natively supported by the target. Returns "true" if it made any changes.
Note that this is an involved process that may invalidate pointers into the graph.
LegalizeTypes - This transforms the SelectionDAG into a SelectionDAG that only uses types natively supported by the target. Returns "true" if it made any changes.
Note that this is an involved process that may invalidate pointers into the graph.
Definition at line 1087 of file LegalizeTypes.cpp.
| void SelectionDAG::Legalize | ( | bool | TypesNeedLegalizing, | |
| CodeGenOpt::Level | OptLevel | |||
| ) |
Legalize - This transforms the SelectionDAG into a SelectionDAG that is compatible with the target instruction selector, as indicated by the TargetLowering object.
Note that this is an involved process that may invalidate pointers into the graph.
run - This is the main entry point to this class.
Definition at line 3074 of file LegalizeDAG.cpp.
| bool SelectionDAG::LegalizeVectors | ( | ) |
LegalizeVectors - This transforms the SelectionDAG into a SelectionDAG that only uses vector math operations supported by the target. This is necessary as a separate step from Legalize because unrolling a vector operation can introduce illegal types, which requires running LegalizeTypes again.
This returns true if it made any changes; in that case, LegalizeTypes is called again before Legalize.
Note that this is an involved process that may invalidate pointers into the graph.
Definition at line 337 of file LegalizeVectorOps.cpp.
| void SelectionDAG::RemoveDeadNodes | ( | ) |
RemoveDeadNodes - This method deletes all unreachable nodes in the SelectionDAG.
RemoveDeadNodes - This method deletes all unreachable nodes in the SelectionDAG.
Definition at line 529 of file SelectionDAG.cpp.
References allnodes_begin(), allnodes_end(), llvm::PIC16ISD::Dummy, E, getRoot(), llvm::HandleSDNode::getValue(), llvm::SmallVectorImpl< T >::push_back(), and setRoot().
Referenced by MorphNodeTo(), RemoveDeadNode(), and llvm::DAGTypeLegalizer::run().
| void SelectionDAG::DeleteNode | ( | SDNode * | N | ) |
DeleteNode - Remove the specified node from the system. This node must have no referrers.
Definition at line 584 of file SelectionDAG.cpp.
getVTList - Return an SDVTList that represents the list of values specified.
Definition at line 4002 of file SelectionDAG.cpp.
References makeVTList().
Referenced by llvm::TargetLowering::BuildSDIV(), llvm::TargetLowering::BuildUDIV(), ExpandBIT_CONVERT(), llvm::PIC16TargetLowering::ExpandLoad(), GeneratePerfectShuffle(), getAtomic(), getBasicBlock(), getCALLSEQ_END(), getCALLSEQ_START(), getConstant(), getConstantFP(), getConstantPool(), getCopyFromReg(), llvm::RegsForValue::getCopyFromRegs(), getCopyToReg(), getFrameIndex(), getGlobalAddress(), getIndexedStore(), getJumpTable(), getLabel(), getLoad(), getMemOperand(), getMergeValues(), getNode(), llvm::PIC16TargetLowering::getPIC16Cmp(), getRegister(), getSrcValue(), getStore(), getTargetNode(), GetTLSADDR(), getTruncStore(), getVAArg(), getVectorShuffle(), getVTList(), llvm::PIC16TargetLowering::LowerADD(), LowerBR_CC(), llvm::SPUTargetLowering::LowerCall(), llvm::PIC16TargetLowering::LowerCall(), llvm::TargetLowering::LowerCallTo(), llvm::PIC16TargetLowering::LowerDirectCallArguments(), llvm::PIC16TargetLowering::LowerDirectCallReturn(), llvm::PIC16TargetLowering::LowerFormalArguments(), llvm::PIC16TargetLowering::LowerIndirectCallArguments(), llvm::PIC16TargetLowering::LowerIndirectCallReturn(), LowerLOAD(), llvm::PIC16TargetLowering::LowerReturn(), llvm::SystemZTargetLowering::LowerSELECT_CC(), llvm::MSP430TargetLowering::LowerSELECT_CC(), LowerShift(), llvm::PIC16TargetLowering::LowerSUB(), LowerVECTOR_SHUFFLE(), MorphNodeTo(), PerformShuffleCombine(), llvm::X86TargetLowering::ReplaceNodeResults(), and SelectNodeTo().
Definition at line 4006 of file SelectionDAG.cpp.
References llvm::BumpPtrAllocator::Allocate(), E, and makeVTList().
Definition at line 4020 of file SelectionDAG.cpp.
References llvm::BumpPtrAllocator::Allocate(), E, and makeVTList().
Definition at line 4036 of file SelectionDAG.cpp.
References llvm::BumpPtrAllocator::Allocate(), E, and makeVTList().
Definition at line 4053 of file SelectionDAG.cpp.
References llvm::BumpPtrAllocator::Allocate(), E, getVTList(), llvm_unreachable, and makeVTList().
Definition at line 860 of file SelectionDAG.cpp.
References llvm::EVT::getSizeInBits(), llvm::EVT::getVectorElementType(), and llvm::EVT::isVector().
Referenced by BuildGetId(), BuildIntrinsicOp(), llvm::TargetLowering::BuildSDIV(), BuildSplatI(), llvm::TargetLowering::BuildUDIV(), CreateCopyOfByValArgument(), llvm::SystemZTargetLowering::EmitCmp(), ExpandBIT_CONVERT(), ExpandConstantFP(), llvm::PIC16TargetLowering::ExpandExternalSymbol(), llvm::PIC16TargetLowering::ExpandFrameIndex(), llvm::PIC16TargetLowering::ExpandGlobalAddress(), llvm::PIC16TargetLowering::ExpandLoad(), llvm::PIC16TargetLowering::ExpandStore(), ExpandUnalignedLoad(), ExpandUnalignedStore(), FoldConstantArithmetic(), FoldSetCC(), GeneratePerfectShuffle(), getARMCmp(), getARMIndexedAddressParts(), getBorrowGenerateShufMask(), getCarryGenerateShufMask(), getConstant(), getCopyFromParts(), getCopyToParts(), GetExponent(), getIntPtrConstant(), getMemBasePlusOffset(), getMemsetStringVal(), getMemsetValue(), getNode(), getNOT(), llvm::PIC16TargetLowering::getPIC16Cmp(), GetSignificand(), getT2IndexedAddressParts(), getTargetConstant(), llvm::SelectionDAGLowering::getValue(), getVShift(), getZeroExtendInReg(), isBLACompatibleAddress(), isLSAAddress(), llvm::MSP430TargetLowering::LowerBR_CC(), LowerBR_CC(), LowerBUILD_VECTOR(), LowerBuildVectorv16i8(), llvm::SPUTargetLowering::LowerCall(), llvm::SparcTargetLowering::LowerCall(), llvm::PIC16TargetLowering::LowerCall(), LowerConstantFP(), LowerConstantPool(), LowerCTPOP(), llvm::PIC16TargetLowering::LowerDirectCallArguments(), llvm::PIC16TargetLowering::LowerDirectCallReturn(), LowerDYNAMIC_STACKALLOC(), LowerEXTRACT_VECTOR_ELT(), LowerFCOPYSIGN(), llvm::SparcTargetLowering::LowerFormalArguments(), llvm::PIC16TargetLowering::LowerFormalArguments(), llvm::SystemZTargetLowering::LowerGlobalAddress(), LowerGlobalAddress(), LowerI8Math(), llvm::PIC16TargetLowering::LowerIndirectCallArguments(), llvm::PIC16TargetLowering::LowerIndirectCallReturn(), LowerINSERT_VECTOR_ELT(), LowerJumpTable(), LowerLOAD(), LowerMemOpCallTo(), llvm::AlphaTargetLowering::LowerOperation(), llvm::PIC16TargetLowering::LowerReturn(), LowerSCALAR_TO_VECTOR(), llvm::MSP430TargetLowering::LowerSELECT_CC(), LowerSELECT_CC(), LowerSETCC(), LowerShift(), LowerSTORE(), LowerTRUNCATE(), llvm::SPU::LowerV2I64Splat(), LowerVAARG(), LowerVASTART(), LowerVECTOR_SHUFFLE(), LowerVECTOR_SHUFFLEv16i8(), LowerVECTOR_SHUFFLEv8i16(), PerformCMOVCombine(), llvm::SPUTargetLowering::PerformDAGCombine(), llvm::PPCTargetLowering::PerformDAGCombine(), PerformIntrinsicCombine(), PerformMulCombine(), PerformSELECTCombine(), PerformShiftCombine(), PerformSTORECombine(), PrepareCall(), llvm::X86TargetLowering::ReplaceNodeResults(), llvm::PPCTargetLowering::ReplaceNodeResults(), llvm::TargetLowering::TargetLoweringOpt::ShrinkDemandedConstant(), llvm::TargetLowering::SimplifyDemandedBits(), llvm::TargetLowering::SimplifySetCC(), TranslateX86CC(), llvm::SelectionDAGLowering::visitBitTestCase(), llvm::SelectionDAGLowering::visitBitTestHeader(), llvm::SelectionDAGLowering::visitJumpTableHeader(), and llvm::SelectionDAGLowering::visitSwitchCase().
Definition at line 868 of file SelectionDAG.cpp.
References llvm::ConstantInt::get(), and getConstant().
| SDValue SelectionDAG::getConstant | ( | const ConstantInt & | Val, | |
| EVT | VT, | |||
| bool | isTarget = false | |||
| ) |
Definition at line 872 of file SelectionDAG.cpp.
References AddNodeIDNode(), llvm::FoldingSetNodeID::AddPointer(), llvm::SmallVectorImpl< T >::assign(), llvm::ISD::BUILD_VECTOR, llvm::ISD::Constant, llvm::ConstantInt::getBitWidth(), getNode(), llvm::DebugLoc::getUnknownLoc(), llvm::EVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), getVTList(), llvm::EVT::isInteger(), llvm::EVT::isVector(), llvm::SmallVectorImpl< T >::size(), and llvm::ISD::TargetConstant.
Definition at line 905 of file SelectionDAG.cpp.
References getConstant(), and llvm::TargetLowering::getPointerTy().
Referenced by getCopyFromParts(), LowerBUILD_VECTOR(), LowerBuildVectorv16i8(), LowerBuildVectorv8i16(), llvm::SPUTargetLowering::LowerCall(), llvm::SparcTargetLowering::LowerCall(), LowerCONCAT_VECTORS(), LowerVECTOR_SHUFFLEv16i8(), LowerVECTOR_SHUFFLEv8i16(), llvm::PPCTargetLowering::PerformDAGCombine(), PerformShiftCombine(), PrepareTailCall(), and llvm::PPCTargetLowering::ReplaceNodeResults().
Definition at line 260 of file SelectionDAG.h.
References getConstant().
Referenced by llvm::RegsForValue::AddInlineAsmOperands(), llvm::SPU::get_ILHUvec_imm(), llvm::SPU::get_v2i64_imm(), llvm::SPU::get_v4i32_imm(), llvm::SPU::get_vec_i10imm(), llvm::SPU::get_vec_i16imm(), llvm::SPU::get_vec_i8imm(), llvm::SPU::get_vec_u18imm(), llvm::PPC::get_VSPLTI_elt(), getAL(), getOnesVector(), getTargetExtractSubreg(), getZeroVector(), isVMOVSplat(), llvm::X86TargetLowering::LowerAsmOperandForConstraint(), llvm::TargetLowering::LowerAsmOperandForConstraint(), llvm::PPCTargetLowering::LowerAsmOperandForConstraint(), llvm::ARMTargetLowering::LowerAsmOperandForConstraint(), LowerByteImmed(), llvm::SPU::LowerV2I64Splat(), LowerVECTOR_SHUFFLE(), llvm::PPCTargetLowering::SelectAddressRegImm(), llvm::PPCTargetLowering::SelectAddressRegImmShift(), and llvm::SelectionDAGISel::SelectInlineAsmMemoryOperands().
| SDValue llvm::SelectionDAG::getTargetConstant | ( | const ConstantInt & | Val, | |
| EVT | VT | |||
| ) | [inline] |
Definition at line 950 of file SelectionDAG.cpp.
References llvm::lltok::APFloat, llvm::MVT::f32, llvm::EVT::getVectorElementType(), and llvm::EVT::isVector().
Referenced by getConstantFP(), getF32Constant(), getMemsetValue(), GetNegatedExpression(), getNode(), getTargetConstantFP(), llvm::SelectionDAGLowering::getValue(), LowerFCOPYSIGN(), and LowerSETCC().
Definition at line 910 of file SelectionDAG.cpp.
References llvm::ConstantFP::get(), getConstantFP(), and getContext().
| SDValue SelectionDAG::getConstantFP | ( | const ConstantFP & | CF, | |
| EVT | VT, | |||
| bool | isTarget = false | |||
| ) |
Definition at line 914 of file SelectionDAG.cpp.
References AddNodeIDNode(), llvm::FoldingSetNodeID::AddPointer(), llvm::SmallVectorImpl< T >::assign(), llvm::ISD::BUILD_VECTOR, llvm::ISD::ConstantFP, getNode(), llvm::DebugLoc::getUnknownLoc(), llvm::EVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), getVTList(), llvm::EVT::isFloatingPoint(), llvm::EVT::isVector(), llvm::SmallVectorImpl< T >::size(), and llvm::ISD::TargetConstantFP.
Definition at line 272 of file SelectionDAG.h.
References getConstantFP().
Referenced by getZeroVector().
| SDValue llvm::SelectionDAG::getTargetConstantFP | ( | const ConstantFP & | Val, | |
| EVT | VT | |||
| ) | [inline] |
| SDValue SelectionDAG::getGlobalAddress | ( | const GlobalValue * | GV, | |
| EVT | VT, | |||
| int64_t | offset = 0, |
|||
| bool | isTargetGA = false, |
|||
| unsigned char | TargetFlags = 0 | |||
| ) |
Definition at line 959 of file SelectionDAG.cpp.
References llvm::FoldingSetNodeID::AddInteger(), AddNodeIDNode(), llvm::FoldingSetNodeID::AddPointer(), llvm::dyn_cast(), E, llvm::TargetLowering::getPointerTy(), llvm::EVT::getSizeInBits(), getVTList(), llvm::ISD::GlobalAddress, llvm::ISD::GlobalTLSAddress, llvm::GlobalVariable::isThreadLocal(), llvm::ISD::TargetGlobalAddress, and llvm::ISD::TargetGlobalTLSAddress.
Referenced by getTargetGlobalAddress(), and llvm::SelectionDAGLowering::getValue().
| SDValue llvm::SelectionDAG::getTargetGlobalAddress | ( | const GlobalValue * | GV, | |
| EVT | VT, | |||
| int64_t | offset = 0, |
|||
| unsigned char | TargetFlags = 0 | |||
| ) | [inline] |
Definition at line 284 of file SelectionDAG.h.
References getGlobalAddress().
Referenced by llvm::PIC16TargetLowering::ExpandGlobalAddress(), GetTLSADDR(), llvm::X86TargetLowering::LowerAsmOperandForConstraint(), llvm::TargetLowering::LowerAsmOperandForConstraint(), llvm::SPUTargetLowering::LowerCall(), llvm::SparcTargetLowering::LowerCall(), llvm::PIC16TargetLowering::LowerCall(), llvm::SystemZTargetLowering::LowerGlobalAddress(), LowerGlobalAddress(), LowerGLOBALADDRESS(), llvm::MSP430TargetLowering::LowerGlobalAddress(), llvm::AlphaTargetLowering::LowerOperation(), LowerToTLSExecModel(), and PrepareCall().
Definition at line 1000 of file SelectionDAG.cpp.
References llvm::FoldingSetNodeID::AddInteger(), AddNodeIDNode(), E, llvm::ISD::FrameIndex, getVTList(), and llvm::ISD::TargetFrameIndex.
Referenced by CalculateTailCallArgDest(), CreateStackTemporary(), EmitTailCallStoreFPAndRetAddr(), EmitTailCallStoreRetAddr(), llvm::X86TargetLowering::getReturnAddressFrameIndex(), getTargetFrameIndex(), llvm::SelectionDAGLowering::getValue(), llvm::SPUTargetLowering::LowerFormalArguments(), llvm::SparcTargetLowering::LowerFormalArguments(), llvm::AlphaTargetLowering::LowerOperation(), and LowerVASTART().
Definition at line 290 of file SelectionDAG.h.
References getFrameIndex().
Referenced by llvm::PPCTargetLowering::SelectAddressRegImm(), and llvm::PPCTargetLowering::SelectAddressRegImmShift().
| SDValue SelectionDAG::getJumpTable | ( | int | JTI, | |
| EVT | VT, | |||
| bool | isTarget = false, |
|||
| unsigned char | TargetFlags = 0 | |||
| ) |
Definition at line 1015 of file SelectionDAG.cpp.
References llvm::FoldingSetNodeID::AddInteger(), AddNodeIDNode(), E, getVTList(), llvm::ISD::JumpTable, and llvm::ISD::TargetJumpTable.
Referenced by getTargetJumpTable(), and llvm::SelectionDAGLowering::visitJumpTable().
| SDValue llvm::SelectionDAG::getTargetJumpTable | ( | int | JTI, | |
| EVT | VT, | |||
| unsigned char | TargetFlags = 0 | |||
| ) | [inline] |
Definition at line 295 of file SelectionDAG.h.
References getJumpTable().
Referenced by llvm::SystemZTargetLowering::LowerJumpTable(), and LowerJumpTable().
| SDValue SelectionDAG::getConstantPool | ( | Constant * | C, | |
| EVT | VT, | |||
| unsigned | Align = 0, |
|||
| int | Offs = 0, |
|||
| bool | isT = false, |
|||
| unsigned char | TargetFlags = 0 | |||
| ) |
Definition at line 1034 of file SelectionDAG.cpp.
References llvm::FoldingSetNodeID::AddInteger(), AddNodeIDNode(), llvm::FoldingSetNodeID::AddPointer(), llvm::ISD::ConstantPool, E, llvm::TargetData::getPrefTypeAlignment(), llvm::TargetLowering::getTargetData(), llvm::Value::getType(), getVTList(), and llvm::ISD::TargetConstantPool.
Referenced by ExpandConstantFP(), and getTargetConstantPool().
| SDValue llvm::SelectionDAG::getTargetConstantPool | ( | Constant * | C, | |
| EVT | VT, | |||
| unsigned | Align = 0, |
|||
| int | Offset = 0, |
|||
| unsigned char | TargetFlags = 0 | |||
| ) | [inline] |
Definition at line 301 of file SelectionDAG.h.
References Align, getConstantPool(), and Offset.
Referenced by llvm::SystemZTargetLowering::LowerConstantPool(), LowerCONSTANTPOOL(), LowerConstantPool(), and llvm::AlphaTargetLowering::LowerOperation().
| SDValue SelectionDAG::getConstantPool | ( | MachineConstantPoolValue * | C, | |
| EVT | VT, | |||
| unsigned | Align = 0, |
|||
| int | Offs = 0, |
|||
| bool | isT = false, |
|||
| unsigned char | TargetFlags = 0 | |||
| ) |
Definition at line 1060 of file SelectionDAG.cpp.
References llvm::FoldingSetNodeID::AddInteger(), AddNodeIDNode(), llvm::MachineConstantPoolValue::AddSelectionDAGCSEId(), llvm::ISD::ConstantPool, E, llvm::TargetData::getPrefTypeAlignment(), llvm::TargetLowering::getTargetData(), llvm::MachineConstantPoolValue::getType(), getVTList(), and llvm::ISD::TargetConstantPool.
| SDValue llvm::SelectionDAG::getTargetConstantPool | ( | MachineConstantPoolValue * | C, | |
| EVT | VT, | |||
| unsigned | Align = 0, |
|||
| int | Offset = 0, |
|||
| unsigned char | TargetFlags = 0 | |||
| ) | [inline] |
| SDValue SelectionDAG::getBasicBlock | ( | MachineBasicBlock * | MBB | ) |
Definition at line 1085 of file SelectionDAG.cpp.
References AddNodeIDNode(), llvm::FoldingSetNodeID::AddPointer(), llvm::ISD::BasicBlock, E, getVTList(), and llvm::MVT::Other.
Referenced by AddNodeIDCustom(), llvm::SelectionDAGLowering::visitBitTestCase(), llvm::SelectionDAGLowering::visitBitTestHeader(), llvm::SelectionDAGLowering::visitJumpTableHeader(), and llvm::SelectionDAGLowering::visitSwitchCase().
| SDValue llvm::SelectionDAG::getBasicBlock | ( | MachineBasicBlock * | MBB, | |
| DebugLoc | dl | |||
| ) |
Definition at line 1114 of file SelectionDAG.cpp.
Referenced by ExpandLibCall(), getMemcpy(), getMemmove(), getMemset(), and llvm::AlphaTargetLowering::LowerOperation().
| SDValue SelectionDAG::getTargetExternalSymbol | ( | const char * | Sym, | |
| EVT | VT, | |||
| unsigned char | TargetFlags = 0 | |||
| ) |
Definition at line 1123 of file SelectionDAG.cpp.
Referenced by llvm::PIC16TargetLowering::ExpandExternalSymbol(), llvm::SPUTargetLowering::LowerCall(), llvm::SparcTargetLowering::LowerCall(), llvm::PIC16TargetLowering::LowerCall(), llvm::MSP430TargetLowering::LowerExternalSymbol(), llvm::PIC16TargetLowering::LowerFormalArguments(), llvm::AlphaTargetLowering::LowerOperation(), llvm::PIC16TargetLowering::LowerReturn(), and PrepareCall().
Definition at line 1099 of file SelectionDAG.cpp.
References llvm::EVT::getSimpleVT(), llvm::EVT::isExtended(), llvm::EVT::isSimple(), and llvm::MVT::SimpleTy.
Referenced by getCopyFromParts(), llvm::RegsForValue::getCopyFromRegs(), getNode(), llvm::AlphaTargetLowering::LowerCallResult(), LowerEXTRACT_VECTOR_ELT(), llvm::SparcTargetLowering::LowerFormalArguments(), llvm::MSP430TargetLowering::LowerSIGN_EXTEND(), and llvm::PPCTargetLowering::PerformDAGCombine().
Definition at line 1274 of file SelectionDAG.cpp.
References llvm::FoldingSetNodeID::AddInteger(), AddNodeIDNode(), E, getVTList(), and llvm::ISD::Register.
Referenced by llvm::RegsForValue::AddInlineAsmOperands(), getCopyFromReg(), getCopyToReg(), LowerBR_CC(), llvm::SPUTargetLowering::LowerCall(), llvm::SparcTargetLowering::LowerCall(), LowerFCOPYSIGN(), llvm::SPUTargetLowering::LowerFormalArguments(), LowerINSERT_VECTOR_ELT(), LowerMemOpCallTo(), LowerSELECT_CC(), LowerToTLSExecModel(), LowerVASTART(), llvm::PPCTargetLowering::PerformDAGCombine(), PrepareCall(), llvm::PPCTargetLowering::SelectAddressRegImm(), llvm::PPCTargetLowering::SelectAddressRegImmShift(), and llvm::PPCTargetLowering::SelectAddressRegRegOnly().
Definition at line 1298 of file SelectionDAG.cpp.
References llvm::FoldingSetNodeID::AddInteger(), AddNodeIDNode(), E, getVTList(), and llvm::MVT::Other.
Referenced by llvm::SelectionDAGLowering::LowerCallTo().
| SDValue llvm::SelectionDAG::getCopyToReg | ( | SDValue | Chain, | |
| DebugLoc | dl, | |||
| unsigned | Reg, | |||
| SDValue | N | |||
| ) | [inline] |
Definition at line 329 of file SelectionDAG.h.
References llvm::ISD::CopyToReg, getNode(), getRegister(), llvm::SDValue::getValueType(), and llvm::MVT::Other.
Referenced by llvm::RegsForValue::getCopyToRegs(), llvm::SPUTargetLowering::LowerCall(), llvm::SparcTargetLowering::LowerCall(), LowerCTPOP(), LowerDYNAMIC_STACKALLOC(), LowerLOAD(), llvm::SPUTargetLowering::LowerReturn(), llvm::SparcTargetLowering::LowerReturn(), LowerSTORE(), LowerToTLSGeneralDynamicModel32(), LowerVECTOR_SHUFFLE(), llvm::X86TargetLowering::ReplaceNodeResults(), llvm::SelectionDAGLowering::visitBitTestHeader(), and llvm::SelectionDAGLowering::visitJumpTableHeader().
| SDValue llvm::SelectionDAG::getCopyToReg | ( | SDValue | Chain, | |
| DebugLoc | dl, | |||
| unsigned | Reg, | |||
| SDValue | N, | |||
| SDValue | Flag | |||
| ) | [inline] |
Definition at line 337 of file SelectionDAG.h.
References llvm::ISD::CopyToReg, llvm::MVT::Flag, llvm::SDValue::getNode(), getNode(), getRegister(), llvm::SDValue::getValueType(), getVTList(), llvm::MVT::Other, and VTs.
| SDValue llvm::SelectionDAG::getCopyToReg | ( | SDValue | Chain, | |
| DebugLoc | dl, | |||
| SDValue | Reg, | |||
| SDValue | N, | |||
| SDValue | Flag | |||
| ) | [inline] |
Definition at line 345 of file SelectionDAG.h.
References llvm::ISD::CopyToReg, llvm::MVT::Flag, llvm::SDValue::getNode(), getNode(), getVTList(), and llvm::MVT::Other.
| SDValue llvm::SelectionDAG::getCopyFromReg | ( | SDValue | Chain, | |
| DebugLoc | dl, | |||
| unsigned | Reg, | |||
| EVT | VT | |||
| ) | [inline] |
Definition at line 352 of file SelectionDAG.h.
References llvm::ISD::CopyFromReg, getNode(), getRegister(), getVTList(), and llvm::MVT::Other.
Referenced by llvm::RegsForValue::getCopyFromRegs(), GetTLSADDR(), llvm::SPUTargetLowering::LowerCall(), llvm::SparcTargetLowering::LowerCall(), llvm::AlphaTargetLowering::LowerCallResult(), LowerCTPOP(), LowerDYNAMIC_STACKALLOC(), llvm::SPUTargetLowering::LowerFormalArguments(), llvm::SparcTargetLowering::LowerFormalArguments(), LowerLOAD(), LowerSTORE(), LowerVECTOR_SHUFFLE(), llvm::X86TargetLowering::ReplaceNodeResults(), llvm::BlackfinTargetLowering::ReplaceNodeResults(), llvm::SelectionDAGLowering::visitBitTestCase(), and llvm::SelectionDAGLowering::visitJumpTable().
| SDValue llvm::SelectionDAG::getCopyFromReg | ( | SDValue | Chain, | |
| DebugLoc | dl, | |||
| unsigned | Reg, | |||
| EVT | VT, | |||
| SDValue | Flag | |||
| ) | [inline] |
Definition at line 361 of file SelectionDAG.h.
References llvm::ISD::CopyFromReg, llvm::MVT::Flag, llvm::SDValue::getNode(), getNode(), getRegister(), getVTList(), and llvm::MVT::Other.
| SDValue SelectionDAG::getCondCode | ( | ISD::CondCode | Cond | ) |
Definition at line 1135 of file SelectionDAG.cpp.
Referenced by getSelectCC(), getSetCC(), and getVSetCC().
| SDValue SelectionDAG::getConvertRndSat | ( | EVT | VT, | |
| DebugLoc | dl, | |||
| SDValue | Val, | |||
| SDValue | DTy, | |||
| SDValue | STy, | |||
| SDValue | Rnd, | |||
| SDValue | Sat, | |||
| ISD::CvtCode | Code | |||
| ) |
Returns the ConvertRndSat Note: Avoid using this node because it may disappear in the future and most targets don't support it.
Definition at line 1252 of file SelectionDAG.cpp.
References llvm::ISD::CVT_FF, llvm::ISD::CVT_SS, llvm::ISD::CVT_UU, and E.
| SDValue SelectionDAG::getVectorShuffle | ( | EVT | VT, | |
| DebugLoc | dl, | |||
| SDValue | N1, | |||
| SDValue | N2, | |||
| const int * | MaskElts | |||
| ) |
getVectorShuffle - Return an ISD::VECTOR_SHUFFLE node. The number of elements in VT, which must be a vector type, must match the number of mask elements NumElts. A integer mask element equal to -1 is treated as undefined.
Definition at line 1162 of file SelectionDAG.cpp.
References llvm::FoldingSetNodeID::AddInteger(), AddNodeIDNode(), llvm::BumpPtrAllocator::Allocate(), commuteShuffle(), E, llvm::SDValue::getOpcode(), getUNDEF(), llvm::SDValue::getValueType(), llvm::EVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), getVTList(), llvm::EVT::isVector(), llvm::Intrinsic::memcpy, llvm::SmallVectorImpl< T >::push_back(), llvm::ISD::UNDEF, and llvm::ISD::VECTOR_SHUFFLE.
Referenced by BuildVSLDOI(), CommuteVectorShuffle(), GeneratePerfectShuffle(), getMOVL(), getShuffleVectorZeroOrUndef(), getUnpackh(), getUnpackl(), LowerVECTOR_SHUFFLE_4wide(), LowerVECTOR_SHUFFLEv8i16(), NormalizeMask(), PromoteSplat(), and RewriteAsNarrowerShuffle().
getZeroExtendInReg - Return the expression required to zero extend the Op value assuming it was the smaller SrcTy value.
Definition at line 843 of file SelectionDAG.cpp.
References llvm::ISD::AND, getConstant(), llvm::APInt::getLowBitsSet(), getNode(), llvm::EVT::getSizeInBits(), llvm::SDValue::getValueSizeInBits(), llvm::SDValue::getValueType(), and Imm.
getNOT - Create a bitwise NOT operation as (XOR Val, -1).
getNOT - Create a bitwise NOT operation as (XOR Val, -1).
Definition at line 853 of file SelectionDAG.cpp.
References llvm::APInt::getAllOnesValue(), getConstant(), getNode(), llvm::EVT::getSizeInBits(), llvm::EVT::getVectorElementType(), llvm::EVT::isVector(), and llvm::ISD::XOR.
Referenced by LowerVSETCC(), and llvm::TargetLowering::SimplifySetCC().
getCALLSEQ_START - Return a new CALLSEQ_START node, which always must have a flag result (to ensure it's not CSE'd). CALLSEQ_START does not have a useful DebugLoc.
Definition at line 393 of file SelectionDAG.h.
References llvm::ISD::CALLSEQ_START, llvm::MVT::Flag, getNode(), llvm::DebugLoc::getUnknownLoc(), getVTList(), and llvm::MVT::Other.
Referenced by llvm::SPUTargetLowering::LowerCall(), llvm::SparcTargetLowering::LowerCall(), and llvm::PIC16TargetLowering::LowerCall().
| SDValue llvm::SelectionDAG::getCALLSEQ_END | ( | SDValue | Chain, | |
| SDValue | Op1, | |||
| SDValue | Op2, | |||
| SDValue | InFlag | |||
| ) | [inline] |
getCALLSEQ_END - Return a new CALLSEQ_END node, which always must have a flag result (to ensure it's not CSE'd). CALLSEQ_END does not have a useful DebugLoc.
Definition at line 403 of file SelectionDAG.h.
References llvm::ISD::CALLSEQ_END, llvm::MVT::Flag, llvm::SDValue::getNode(), getNode(), llvm::DebugLoc::getUnknownLoc(), getVTList(), llvm::MVT::Other, llvm::SmallVectorImpl< T >::push_back(), and llvm::SmallVectorImpl< T >::size().
Referenced by llvm::SPUTargetLowering::LowerCall(), llvm::SparcTargetLowering::LowerCall(), llvm::PIC16TargetLowering::LowerCall(), and PrepareTailCall().
getUNDEF - Return an UNDEF node. UNDEF does not have a useful DebugLoc.
Definition at line 417 of file SelectionDAG.h.
References getNode(), llvm::DebugLoc::getUnknownLoc(), and llvm::ISD::UNDEF.
Referenced by FoldSetCC(), getExtLoad(), getLoad(), getNode(), getShuffleScalarElt(), getShuffleVectorZeroOrUndef(), getStore(), getTruncStore(), llvm::SelectionDAGLowering::getValue(), getVectorShuffle(), LowerBUILD_VECTOR(), LowerBuildVectorv16i8(), LowerBuildVectorv8i16(), LowerCONCAT_VECTORS(), llvm::SparcTargetLowering::LowerFormalArguments(), LowerVECTOR_SHUFFLEv8i16(), PromoteSplat(), llvm::TargetLowering::SimplifyDemandedBits(), and llvm::TargetLowering::SimplifySetCC().
getGLOBAL_OFFSET_TABLE - Return a GLOBAL_OFFSET_TABLE node. This does not have a useful DebugLoc.
Definition at line 423 of file SelectionDAG.h.
References getNode(), llvm::DebugLoc::getUnknownLoc(), and llvm::ISD::GLOBAL_OFFSET_TABLE.
Referenced by llvm::X86TargetLowering::getPICJumpTableRelocBase(), llvm::TargetLowering::getPICJumpTableRelocBase(), LowerJumpTable(), and llvm::AlphaTargetLowering::LowerOperation().
getNode - Gets or creates the specified node.
Definition at line 2246 of file SelectionDAG.cpp.
References AddNodeIDNode(), E, and getVTList().
Referenced by BuildGetId(), BuildIntrinsicOp(), llvm::TargetLowering::BuildSDIV(), BuildSplat(), BuildSplatI(), llvm::TargetLowering::BuildUDIV(), BuildVSLDOI(), combineSelectAndUse(), combineShlAddConstant(), llvm::SystemZTargetLowering::EmitCmp(), EmitCMP(), ExpandBIT_CONVERT(), llvm::PIC16TargetLowering::ExpandExternalSymbol(), llvm::PIC16TargetLowering::ExpandFrameIndex(), llvm::PIC16TargetLowering::ExpandGlobalAddress(), llvm::PIC16TargetLowering::ExpandLoad(), llvm::PIC16TargetLowering::ExpandStore(), ExpandUnalignedLoad(), ExpandUnalignedStore(), GeneratePerfectShuffle(), getARMCmp(), getBorrowGenerateShufMask(), getCALLSEQ_END(), getCALLSEQ_START(), getCarryGenerateShufMask(), getConstant(), getConstantFP(), llvm::SelectionDAGLowering::getControlRoot(), getCopyFromParts(), getCopyFromReg(), llvm::RegsForValue::getCopyFromRegs(), getCopyToParts(), getCopyToReg(), llvm::RegsForValue::getCopyToRegs(), GetExponent(), getGLOBAL_OFFSET_TABLE(), getMemBasePlusOffset(), getMemcpyLoadsAndStores(), getMemmoveLoadsAndStores(), getMemset(), getMemsetStringVal(), getMemsetValue(), getMergeValues(), GetNegatedExpression(), getNode(), getNOT(), getOnesVector(), llvm::PIC16TargetLowering::getPIC16Cmp(), llvm::X86TargetLowering::getPICJumpTableRelocBase(), llvm::SelectionDAGLowering::GetRegistersForValue(), llvm::SelectionDAGLowering::getRoot(), getSelectCC(), getSetCC(), getShiftAmountOperand(), GetSignificand(), getStackArgumentTokenFactor(), getTargetNode(), GetTLSADDR(), getUNDEF(), getVAArg(), llvm::SelectionDAGLowering::getValue(), getVFPCmp(), getVSetCC(), getVShift(), getVZextMovL(), getZeroExtendInReg(), getZeroVector(), llvm::PIC16TargetLowering::LowerADD(), llvm::PIC16TargetLowering::LowerBinOp(), llvm::SystemZTargetLowering::LowerBR_CC(), llvm::PIC16TargetLowering::LowerBR_CC(), llvm::MSP430TargetLowering::LowerBR_CC(), LowerBR_CC(), LowerBUILD_VECTOR(), LowerBuildVectorv16i8(), LowerBuildVectorv8i16(), LowerByteImmed(), llvm::SPUTargetLowering::LowerCall(), llvm::SparcTargetLowering::LowerCall(), llvm::PIC16TargetLowering::LowerCall(), llvm::AlphaTargetLowering::LowerCallResult(), llvm::TargetLowering::LowerCallTo(), LowerCONCAT_VECTORS(), LowerConstantFP(), llvm::SystemZTargetLowering::LowerConstantPool(), LowerCONSTANTPOOL(), LowerConstantPool(), LowerCTPOP(), llvm::PIC16TargetLowering::LowerDirectCallArguments(), llvm::PIC16TargetLowering::LowerDirectCallReturn(), LowerDYNAMIC_STACKALLOC(), llvm::MSP430TargetLowering::LowerExternalSymbol(), LowerEXTRACT_VECTOR_ELT(), LowerFCOPYSIGN(), llvm::SPUTargetLowering::LowerFormalArguments(), llvm::SparcTargetLowering::LowerFormalArguments(), llvm::PIC16TargetLowering::LowerFormalArguments(), LowerFP_TO_INT(), LowerFP_TO_SINT(), llvm::SystemZTargetLowering::LowerGlobalAddress(), LowerGlobalAddress(), LowerGLOBALADDRESS(), llvm::MSP430TargetLowering::LowerGlobalAddress(), LowerI8Math(), llvm::PIC16TargetLowering::LowerIndirectCallArguments(), llvm::PIC16TargetLowering::LowerIndirectCallReturn(), LowerINSERT_VECTOR_ELT(), LowerINT_TO_FP(), llvm::SystemZTargetLowering::LowerJumpTable(), LowerJumpTable(), LowerLOAD(), LowerMemOpCallTo(), LowerNeonVLDIntrinsic(), LowerNeonVSTIntrinsic(), llvm::AlphaTargetLowering::LowerOperation(), llvm::SPUTargetLowering::LowerReturn(), llvm::SparcTargetLowering::LowerReturn(), llvm::PIC16TargetLowering::LowerReturn(), LowerSCALAR_TO_VECTOR(), llvm::SystemZTargetLowering::LowerSELECT_CC(), llvm::PIC16TargetLowering::LowerSELECT_CC(), llvm::MSP430TargetLowering::LowerSELECT_CC(), LowerSELECT_CC(), LowerSETCC(), LowerShift(), llvm::MSP430TargetLowering::LowerShifts(), llvm::MSP430TargetLowering::LowerSIGN_EXTEND(), LowerSINT_TO_FP(), LowerSTORE(), llvm::PIC16TargetLowering::LowerSUB(), LowerToTLSExecModel(), LowerToTLSGeneralDynamicModel32(), LowerTRUNCATE(), llvm::SPU::LowerV2I64Splat(), LowerVAARG(), LowerVASTART(), LowerVECTOR_SHUFFLE(), LowerVECTOR_SHUFFLEv16i8(), LowerVECTOR_SHUFFLEv8i16(), LowerVSETCC(), MoveBelowCallSeqStart(), PerformCMOVCombine(), llvm::SPUTargetLowering::PerformDAGCombine(), llvm::PPCTargetLowering::PerformDAGCombine(), PerformExtendCombine(), PerformIntrinsicCombine(), PerformMulCombine(), PerformSELECTCombine(), PerformShiftCombine(), PerformShuffleCombine(), PerformSTORECombine(), PerformVZEXT_MOVLCombine(), PrepareCall(), PrepareTailCall(), PromoteSplat(), llvm::X86TargetLowering::ReplaceNodeResults(), llvm::PPCTargetLowering::ReplaceNodeResults(), llvm::BlackfinTargetLowering::ReplaceNodeResults(), RewriteAsNarrowerShuffle(), llvm::TargetLowering::TargetLoweringOpt::ShrinkDemandedConstant(), llvm::TargetLowering::TargetLoweringOpt::ShrinkDemandedOp(), llvm::TargetLowering::SimplifySetCC(), llvm::SelectionDAGLowering::visitBitTestCase(), llvm::SelectionDAGLowering::visitBitTestHeader(), llvm::SelectionDAGLowering::visitJumpTable(), llvm::SelectionDAGLowering::visitJumpTableHeader(), and llvm::SelectionDAGLowering::visitSwitchCase().
Definition at line 2263 of file SelectionDAG.cpp.
References AddNodeIDNode(), llvm::ISD::ANY_EXTEND, llvm::lltok::APFloat, llvm::ISD::BIT_CONVERT, llvm::APFloat::bitcastToAPInt(), llvm::EVT::bitsGT(), llvm::EVT::bitsLE(), llvm::EVT::bitsLT(), llvm::APInt::bitsToDouble(), llvm::APInt::bitsToFloat(), llvm::ISD::BSWAP, llvm::APInt::byteSwap(), llvm::CallingConv::C, llvm::APFloat::changeSign(), llvm::APFloat::clearSign(), llvm::ISD::CONCAT_VECTORS, llvm::APFloat::convert(), llvm::APFloat::convertFromAPInt(), llvm::APFloat::convertToInteger(), llvm::APInt::countLeadingZeros(), llvm::APInt::countPopulation(), llvm::APInt::countTrailingZeros(), llvm::ISD::CTLZ, llvm::ISD::CTPOP, llvm::ISD::CTTZ, E, EVTToAPFloatSemantics(), llvm::ISD::EXTRACT_VECTOR_ELT, llvm::MVT::f32, llvm::MVT::f64, llvm::ISD::FABS, llvm::MVT::Flag, llvm::ISD::FNEG, llvm::ISD::FP_EXTEND, llvm::ISD::FP_ROUND, llvm::ISD::FP_TO_SINT, llvm::ISD::FP_TO_UINT, llvm::ISD::FSUB, getConstant(), getConstantFP(), llvm::SDValue::getConstantOperandVal(), getNode(), llvm::SDValue::getNode(), llvm::SDValue::getOpcode(), llvm::SDNode::getOpcode(), llvm::SDValue::getOperand(), llvm::SDNode::getOperand(), llvm::EVT::getSizeInBits(), getUNDEF(), llvm::SDValue::getValueType(), llvm::EVT::getVectorElementType(), getVTList(), llvm::APInt::getZExtValue(), llvm::MVT::i32, llvm::MVT::i64, llvm::integerPartWidth, llvm::EVT::isFloatingPoint(), llvm::EVT::isInteger(), llvm::EVT::isVector(), llvm_unreachable, llvm::ISD::MERGE_VALUES, llvm::APFloat::opInvalidOp, llvm::MVT::ppcf128, llvm::APFloat::rmNearestTiesToEven, llvm::APFloat::rmTowardZero, llvm::ISD::SCALAR_TO_VECTOR, llvm::ISD::SIGN_EXTEND, llvm::ISD::SINT_TO_FP, llvm::ISD::TokenFactor, llvm::ISD::TRUNCATE, llvm::ISD::UINT_TO_FP, llvm::ISD::UNDEF, llvm::UnsafeFPMath, V, Val, VTs, zero, and llvm::ISD::ZERO_EXTEND.
Definition at line 2512 of file SelectionDAG.cpp.
References llvm::APFloat::add(), llvm::ISD::ADD, llvm::ISD::ADDC, llvm::ISD::ADDE, AddNodeIDNode(), llvm::ISD::AND, llvm::ISD::ANY_EXTEND, llvm::APInt::ashr(), llvm::ISD::AssertSext, llvm::ISD::AssertZext, llvm::EVT::bitsLE(), llvm::ISD::BUILD_PAIR, llvm::ISD::BUILD_VECTOR, llvm::CallingConv::C, llvm::ISD::CONCAT_VECTORS, llvm::APFloat::copySign(), llvm::APFloat::divide(), llvm::dyn_cast(), E, llvm::ISD::EntryToken, llvm::ISD::EXTRACT_ELEMENT, llvm::ISD::EXTRACT_SUBVECTOR, llvm::ISD::EXTRACT_VECTOR_ELT, llvm::ISD::FADD, llvm::ISD::FCOPYSIGN, llvm::ISD::FDIV, llvm::MVT::Flag, llvm::ISD::FMUL, FoldConstantArithmetic(), llvm::ISD::FP_ROUND, llvm::ISD::FP_ROUND_INREG, llvm::ISD::FREM, llvm::ISD::FSUB, llvm::APInt::getAllOnesValue(), llvm::ConstantSDNode::getAPIntValue(), llvm::APInt::getBitWidth(), getConstant(), getConstantFP(), getNode(), llvm::SDValue::getNode(), llvm::SDValue::getNumOperands(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::EVT::getSizeInBits(), getUNDEF(), llvm::ConstantFPSDNode::getValueAPF(), llvm::SDValue::getValueType(), llvm::EVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), getVTList(), llvm::MVT::i1, llvm::ISD::INSERT_VECTOR_ELT, isCommutativeBinOp(), llvm::EVT::isFloatingPoint(), llvm::EVT::isInteger(), llvm::EVT::isVector(), llvm::APFloat::mod(), llvm::ISD::MUL, llvm::ISD::MULHS, llvm::ISD::MULHU, llvm::APFloat::multiply(), llvm::SDNode::op_begin(), llvm::SDNode::op_end(), llvm::APFloat::opDivByZero, llvm::APFloat::opInvalidOp, llvm::ISD::OR, llvm::MVT::Other, llvm::MVT::ppcf128, llvm::APFloat::rmNearestTiesToEven, llvm::ISD::ROTL, llvm::ISD::ROTR, llvm::ISD::SDIV, llvm::ISD::SHL, llvm::ISD::SIGN_EXTEND_INREG, llvm::ISD::SRA, llvm::ISD::SREM, llvm::ISD::SRL, llvm::ISD::SUB, llvm::APFloat::subtract(), std::swap(), llvm::ISD::TokenFactor, llvm::APInt::trunc(), llvm::ISD::TRUNCATE, llvm::ISD::UDIV, llvm::ISD::UNDEF, llvm::UnsafeFPMath, llvm::ISD::UREM, V1, Val, VTs, and llvm::ISD::XOR.
| SDValue SelectionDAG::getNode | ( | unsigned | Opcode, | |
| DebugLoc | DL, | |||
| EVT | VT, | |||
| SDValue | N1, | |||
| SDValue | N2, | |||
| SDValue | N3 | |||
| ) |
Definition at line 2888 of file SelectionDAG.cpp.
References AddNodeIDNode(), llvm::ISD::BIT_CONVERT, llvm::ISD::BR, llvm::ISD::BRCOND, llvm::ISD::BUILD_VECTOR, llvm::ISD::CONCAT_VECTORS, llvm::dyn_cast(), E, llvm::MVT::Flag, FoldSetCC(), getNode(), llvm::SDValue::getNode(), llvm::SDValue::getOpcode(), llvm::SDValue::getValueType(), getVTList(), llvm::ConstantSDNode::getZExtValue(), llvm_unreachable, llvm::SDNode::op_begin(), llvm::SDNode::op_end(), llvm::MVT::Other, llvm::ISD::SELECT, llvm::ISD::SETCC, llvm::ISD::VECTOR_SHUFFLE, and VTs.
| SDValue SelectionDAG::getNode | ( | unsigned | Opcode, | |
| DebugLoc | DL, | |||
| EVT | VT, | |||
| const SDValue * | Ops, | |||
| unsigned | NumOps | |||
| ) |
Definition at line 3822 of file SelectionDAG.cpp.
References AddNodeIDNode(), llvm::ISD::BR_CC, E, llvm::MVT::Flag, getNode(), getValueType(), getVTList(), llvm::ISD::SELECT_CC, and VTs.
| SDValue SelectionDAG::getNode | ( | unsigned | Opcode, | |
| DebugLoc | DL, | |||
| SDVTList | VTs, | |||
| const SDValue * | Ops, | |||
| unsigned | NumOps | |||
| ) |
Definition at line 3894 of file SelectionDAG.cpp.
References AddNodeIDNode(), llvm::ISD::AND, E, llvm::MVT::Flag, getNode(), llvm::EVT::getSizeInBits(), llvm::MVT::i1, llvm::SDVTList::NumVTs, llvm::ISD::SHL_PARTS, llvm::ISD::SIGN_EXTEND_INREG, llvm::ISD::SRA_PARTS, llvm::ISD::SRL_PARTS, and llvm::SDVTList::VTs.
getStackArgumentTokenFactor - Compute a TokenFactor to force all the incoming stack arguments to be loaded from the stack. This is used in tail call lowering to protect stack arguments from being clobbered.
getStackArgumentTokenFactor - Compute a TokenFactor to force all the incoming stack arguments to be loaded from the stack.
Definition at line 2980 of file SelectionDAG.cpp.
References FI, llvm::SDValue::getDebugLoc(), getEntryNode(), getNode(), L, llvm::MVT::Other, llvm::SmallVectorImpl< T >::push_back(), llvm::SmallVectorImpl< T >::size(), and llvm::ISD::TokenFactor.
| SDValue SelectionDAG::getMemcpy | ( | SDValue | Chain, | |
| DebugLoc | dl, | |||
| SDValue | Dst, | |||
| SDValue | Src, | |||
| SDValue | Size, | |||
| unsigned | Align, | |||
| bool | AlwaysInline, | |||
| const Value * | DstSV, | |||
| uint64_t | DstSVOff, | |||
| const Value * | SrcSV, | |||
| uint64_t | SrcSVOff | |||
| ) |
Definition at line 3342 of file SelectionDAG.cpp.
References llvm::dyn_cast(), llvm::TargetLowering::EmitTargetCodeForMemcpy(), Entry, getContext(), getExternalSymbol(), llvm::TargetData::getIntPtrType(), llvm::TargetLowering::getLibcallCallingConv(), llvm::TargetLowering::getLibcallName(), getMemcpyLoadsAndStores(), llvm::SDValue::getNode(), llvm::TargetLowering::getPointerTy(), llvm::TargetLowering::getTargetData(), llvm::Type::getVoidTy(), llvm::ConstantSDNode::getZExtValue(), llvm::ConstantSDNode::isNullValue(), llvm::TargetLowering::LowerCallTo(), llvm::RTLIB::MEMCPY, llvm::TargetLowering::ArgListEntry::Node, and llvm::TargetLowering::ArgListEntry::Ty.
Referenced by CreateCopyOfByValArgument().
| SDValue SelectionDAG::getMemmove | ( | SDValue | Chain, | |
| DebugLoc | dl, | |||
| SDValue | Dst, | |||
| SDValue | Src, | |||
| SDValue | Size, | |||
| unsigned | Align, | |||
| const Value * | DstSV, | |||
| uint64_t | DstOSVff, | |||
| const Value * | SrcSV, | |||
| uint64_t | SrcSVOff | |||
| ) |
Definition at line 3401 of file SelectionDAG.cpp.
References llvm::dyn_cast(), llvm::TargetLowering::EmitTargetCodeForMemmove(), Entry, getContext(), getExternalSymbol(), llvm::TargetData::getIntPtrType(), llvm::TargetLowering::getLibcallCallingConv(), llvm::TargetLowering::getLibcallName(), getMemmoveLoadsAndStores(), llvm::SDValue::getNode(), llvm::TargetLowering::getPointerTy(), llvm::TargetLowering::getTargetData(), llvm::Type::getVoidTy(), llvm::ConstantSDNode::getZExtValue(), llvm::ConstantSDNode::isNullValue(), llvm::TargetLowering::LowerCallTo(), llvm::RTLIB::MEMMOVE, llvm::TargetLowering::ArgListEntry::Node, and llvm::TargetLowering::ArgListEntry::Ty.
| SDValue SelectionDAG::getMemset | ( | SDValue | Chain, | |
| DebugLoc | dl, | |||
| SDValue | Dst, | |||
| SDValue | Src, | |||
| SDValue | Size, | |||
| unsigned | Align, | |||
| const Value * | DstSV, | |||
| uint64_t | DstSVOff | |||
| ) |
Definition at line 3450 of file SelectionDAG.cpp.
References llvm::EVT::bitsGT(), llvm::dyn_cast(), llvm::TargetLowering::EmitTargetCodeForMemset(), Entry, getContext(), getExternalSymbol(), llvm::Type::getInt32Ty(), llvm::TargetData::getIntPtrType(), llvm::TargetLowering::getLibcallCallingConv(), llvm::TargetLowering::getLibcallName(), getMemsetStores(), getNode(), llvm::SDValue::getNode(), llvm::TargetLowering::getPointerTy(), llvm::TargetLowering::getTargetData(), llvm::SDValue::getValueType(), llvm::Type::getVoidTy(), llvm::ConstantSDNode::getZExtValue(), llvm::MVT::i32, llvm::ConstantSDNode::isNullValue(), llvm::TargetLowering::ArgListEntry::isSExt, llvm::TargetLowering::LowerCallTo(), llvm::RTLIB::MEMSET, llvm::TargetLowering::ArgListEntry::Node, llvm::ISD::TRUNCATE, llvm::TargetLowering::ArgListEntry::Ty, and llvm::ISD::ZERO_EXTEND.
| SDValue llvm::SelectionDAG::getSetCC | ( | DebugLoc | DL, | |
| EVT | VT, | |||
| SDValue | LHS, | |||
| SDValue | RHS, | |||
| ISD::CondCode | Cond | |||
| ) | [inline] |
getSetCC - Helper function to make it easier to build SetCC's if you just have an ISD::CondCode instead of an SDValue.
Definition at line 485 of file SelectionDAG.h.
References getCondCode(), getNode(), and llvm::ISD::SETCC.
Referenced by combineSelectAndUse(), FoldSetCC(), llvm::AlphaTargetLowering::LowerOperation(), LowerSETCC(), llvm::TargetLowering::SimplifySetCC(), llvm::SelectionDAGLowering::visitBitTestCase(), llvm::SelectionDAGLowering::visitBitTestHeader(), llvm::SelectionDAGLowering::visitJumpTableHeader(), and llvm::SelectionDAGLowering::visitSwitchCase().
| SDValue llvm::SelectionDAG::getVSetCC | ( | DebugLoc | DL, | |
| EVT | VT, | |||
| SDValue | LHS, | |||
| SDValue | RHS, | |||
| ISD::CondCode | Cond | |||
| ) | [inline] |
getVSetCC - Helper function to make it easier to build VSetCC's nodes if you just have an ISD::CondCode instead of an SDValue.
Definition at line 493 of file SelectionDAG.h.
References getCondCode(), getNode(), and llvm::ISD::VSETCC.
| SDValue llvm::SelectionDAG::getSelectCC | ( | DebugLoc | DL, | |
| SDValue | LHS, | |||
| SDValue | RHS, | |||
| SDValue | True, | |||
| SDValue | False, | |||
| ISD::CondCode | Cond | |||
| ) | [inline] |
getSelectCC - Helper function to make it easier to build SelectCC's if you just have an ISD::CondCode instead of an SDValue.
Definition at line 501 of file SelectionDAG.h.
References getCondCode(), getNode(), llvm::SDValue::getValueType(), and llvm::ISD::SELECT_CC.
Referenced by combineSelectAndUse().
getVAArg - VAArg produces a result and token chain, and takes a pointer and a source value as input.
Definition at line 3799 of file SelectionDAG.cpp.
References getNode(), getVTList(), llvm::MVT::Other, and llvm::ISD::VAARG.
| SDValue SelectionDAG::getAtomic | ( | unsigned | Opcode, | |
| DebugLoc | dl, | |||
| EVT | MemVT, | |||
| SDValue | Chain, | |||
| SDValue | Ptr, | |||
| SDValue | Cmp, | |||
| SDValue | Swp, | |||
| const Value * | PtrVal, | |||
| unsigned | Alignment = 0 | |||
| ) |
getAtomic - Gets a node for an atomic op, produces result and chain and takes 3 operands
Definition at line 3509 of file SelectionDAG.cpp.
References llvm::FoldingSetNodeID::AddInteger(), AddNodeIDNode(), llvm::ISD::ATOMIC_CMP_SWAP, E, llvm::EVT::getRawBits(), llvm::SDValue::getValueType(), getVTList(), llvm::MVT::Other, and VTs.
| SDValue SelectionDAG::getAtomic | ( | unsigned | Opcode, | |
| DebugLoc | dl, | |||
| EVT | MemVT, | |||
| SDValue | Chain, | |||
| SDValue | Ptr, | |||
| SDValue | Val, | |||
| const Value * | PtrVal, | |||
| unsigned | Alignment = 0 | |||
| ) |
getAtomic - Gets a node for an atomic op, produces result and chain and takes 2 operands.
Definition at line 3538 of file SelectionDAG.cpp.
References llvm::FoldingSetNodeID::AddInteger(), AddNodeIDNode(), llvm::ISD::ATOMIC_LOAD_ADD, llvm::ISD::ATOMIC_LOAD_AND, llvm::ISD::ATOMIC_LOAD_MAX, llvm::ISD::ATOMIC_LOAD_MIN, llvm::ISD::ATOMIC_LOAD_NAND, llvm::ISD::ATOMIC_LOAD_OR, llvm::ISD::ATOMIC_LOAD_SUB, llvm::ISD::ATOMIC_LOAD_UMAX, llvm::ISD::ATOMIC_LOAD_UMIN, llvm::ISD::ATOMIC_LOAD_XOR, llvm::ISD::ATOMIC_SWAP, E, llvm::EVT::getRawBits(), llvm::SDValue::getValueType(), getVTList(), llvm::MVT::Other, and VTs.
| SDValue SelectionDAG::getMemIntrinsicNode | ( | unsigned | Opcode, | |
| DebugLoc | dl, | |||
| const EVT * | VTs, | |||
| unsigned | NumVTs, | |||
| const SDValue * | Ops, | |||
| unsigned | NumOps, | |||
| EVT | MemVT, | |||
| const Value * | srcValue, | |||
| int | SVOff, | |||
| unsigned | Align = 0, |
|||
| bool | Vol = false, |
|||
| bool | ReadMem = true, |
|||
| bool | WriteMem = true | |||
| ) |
getMemIntrinsicNode - Creates a MemIntrinsicNode that may produce a result and takes a list of operands.
Definition at line 3593 of file SelectionDAG.cpp.
References makeVTList().
| SDValue SelectionDAG::getMemIntrinsicNode | ( | unsigned | Opcode, | |
| DebugLoc | dl, | |||
| SDVTList | VTList, | |||
| const SDValue * | Ops, | |||
| unsigned | NumOps, | |||
| EVT | MemVT, | |||
| const Value * | srcValue, | |||
| int | SVOff, | |||
| unsigned | Align = 0, |
|||
| bool | Vol = false, |
|||
| bool | ReadMem = true, |
|||
| bool | WriteMem = true | |||
| ) |
Definition at line 3605 of file SelectionDAG.cpp.
References AddNodeIDNode(), E, llvm::MVT::Flag, llvm::SDVTList::NumVTs, and llvm::SDVTList::VTs.
getMergeValues - Create a MERGE_VALUES node from the given operands.
getMergeValues - Create a MERGE_VALUES node from the given operands. Allowed to return something different (and simpler) if Simplify is true.
Definition at line 3579 of file SelectionDAG.cpp.
References getNode(), llvm::SDValue::getValueType(), getVTList(), llvm::ISD::MERGE_VALUES, llvm::SmallVectorImpl< T >::push_back(), llvm::SmallVectorImpl< T >::reserve(), and VTs.
Referenced by ExpandUnalignedLoad(), llvm::SelectionDAGLowering::getValue(), LowerDYNAMIC_STACKALLOC(), llvm::AlphaTargetLowering::LowerOperation(), and LowerVAARG().
| SDValue SelectionDAG::getLoad | ( | EVT | VT, | |
| DebugLoc | dl, | |||
| SDValue | Chain, | |||
| SDValue | Ptr, | |||
| const Value * | SV, | |||
| int | SVOffset, | |||
| bool | isVolatile = false, |
|||
| unsigned | Alignment = 0 | |||
| ) |
getLoad - Loads are not normal binary operators: their result type is not determined by their operands, and they produce a value AND a token chain.
Definition at line 3681 of file SelectionDAG.cpp.
References getUNDEF(), llvm::SDValue::getValueType(), llvm::ISD::NON_EXTLOAD, llvm::RegState::Undef, and llvm::ISD::UNINDEXED.
Referenced by ExpandConstantFP(), ExpandUnalignedLoad(), ExpandUnalignedStore(), getExtLoad(), getIndexedLoad(), getMemmoveLoadsAndStores(), llvm::SparcTargetLowering::LowerCall(), llvm::SPUTargetLowering::LowerFormalArguments(), llvm::SparcTargetLowering::LowerFormalArguments(), llvm::SystemZTargetLowering::LowerGlobalAddress(), LowerLOAD(), llvm::AlphaTargetLowering::LowerOperation(), LowerSTORE(), LowerToTLSExecModel(), LowerVAARG(), PerformShuffleCombine(), PerformSTORECombine(), llvm::X86TargetLowering::ReplaceNodeResults(), llvm::AlphaTargetLowering::ReplaceNodeResults(), and llvm::TargetLowering::SimplifySetCC().
| SDValue SelectionDAG::getExtLoad | ( | ISD::LoadExtType | ExtType, | |
| DebugLoc | dl, | |||
| EVT | VT, | |||
| SDValue | Chain, | |||
| SDValue | Ptr, | |||
| const Value * | SV, | |||
| int | SVOffset, | |||
| EVT | EVT, | |||
| bool | isVolatile = false, |
|||
| unsigned | Alignment = 0 | |||
| ) |
Definition at line 3690 of file SelectionDAG.cpp.
References getLoad(), getUNDEF(), llvm::SDValue::getValueType(), llvm::RegState::Undef, and llvm::ISD::UNINDEXED.
Referenced by ExpandConstantFP(), ExpandUnalignedLoad(), ExpandUnalignedStore(), getMemcpyLoadsAndStores(), llvm::SparcTargetLowering::LowerFormalArguments(), and llvm::AlphaTargetLowering::LowerOperation().
| SDValue SelectionDAG::getIndexedLoad | ( | SDValue | OrigLoad, | |
| DebugLoc | dl, | |||
| SDValue | Base, | |||
| SDValue | Offset, | |||
| ISD::MemIndexedMode | AM | |||
| ) |
Definition at line 3701 of file SelectionDAG.cpp.
References llvm::MemSDNode::getAlignment(), llvm::MemSDNode::getChain(), llvm::LoadSDNode::getExtensionType(), getLoad(), llvm::MemSDNode::getMemoryVT(), llvm::LoadSDNode::getOffset(), llvm::SDValue::getOpcode(), llvm::MemSDNode::getSrcValue(), llvm::MemSDNode::getSrcValueOffset(), llvm::SDValue::getValueType(), llvm::MemSDNode::isVolatile(), and llvm::ISD::UNDEF.
| SDValue SelectionDAG::getLoad | ( | ISD::MemIndexedMode | AM, | |
| DebugLoc | dl, | |||
| ISD::LoadExtType | ExtType, | |||
| EVT | VT, | |||
| SDValue | Chain, | |||
| SDValue | Ptr, | |||
| SDValue | Offset, | |||
| const Value * | SV, | |||
| int | SVOffset, | |||
| EVT | EVT, | |||
| bool | isVolatile = false, |
|||
| unsigned | Alignment = 0 | |||
| ) |
Definition at line 3633 of file SelectionDAG.cpp.
References llvm::FoldingSetNodeID::AddInteger(), AddNodeIDNode(), llvm::EVT::bitsLT(), E, encodeMemSDNodeFlags(), llvm::ISD::EXTLOAD, llvm::SDValue::getOpcode(), llvm::EVT::getRawBits(), llvm::SDValue::getValueType(), llvm::EVT::getVectorNumElements(), getVTList(), llvm::EVT::isInteger(), llvm::EVT::isVector(), llvm::ISD::LOAD, llvm::ISD::NON_EXTLOAD, llvm::MVT::Other, llvm::ISD::UNDEF, llvm::ISD::UNINDEXED, and VTs.
| SDValue SelectionDAG::getStore | ( | SDValue | Chain, | |
| DebugLoc | dl, | |||
| SDValue | Val, | |||
| SDValue | Ptr, | |||
| const Value * | SV, | |||
| int | SVOffset, | |||
| bool | isVolatile = false, |
|||
| unsigned | Alignment = 0 | |||
| ) |
getStore - Helper function to build ISD::STORE nodes.
Definition at line 3712 of file SelectionDAG.cpp.
References llvm::FoldingSetNodeID::AddInteger(), AddNodeIDNode(), E, encodeMemSDNodeFlags(), llvm::EVT::getRawBits(), getUNDEF(), llvm::SDValue::getValueType(), getVTList(), llvm::MVT::Other, llvm::ISD::STORE, llvm::RegState::Undef, llvm::ISD::UNINDEXED, and VTs.
Referenced by EmitTailCallStoreFPAndRetAddr(), EmitTailCallStoreRetAddr(), llvm::PIC16TargetLowering::ExpandStore(), ExpandUnalignedLoad(), ExpandUnalignedStore(), getMemcpyLoadsAndStores(), getMemmoveLoadsAndStores(), getTruncStore(), llvm::SPUTargetLowering::LowerCall(), llvm::SparcTargetLowering::LowerCall(), llvm::SPUTargetLowering::LowerFormalArguments(), llvm::SparcTargetLowering::LowerFormalArguments(), LowerMemOpCallTo(), llvm::AlphaTargetLowering::LowerOperation(), LowerSTORE(), LowerVAARG(), LowerVASTART(), PerformSTORECombine(), and StoreTailCallArgumentsToStackSlot().
| SDValue SelectionDAG::getTruncStore | ( | SDValue | Chain, | |
| DebugLoc | dl, | |||
| SDValue | Val, | |||
| SDValue | Ptr, | |||
| const Value * | SV, | |||
| int | SVOffset, | |||
| EVT | TVT, | |||
| bool | isVolatile = false, |
|||
| unsigned | Alignment = 0 | |||
| ) |
Definition at line 3739 of file SelectionDAG.cpp.
References llvm::FoldingSetNodeID::AddInteger(), AddNodeIDNode(), llvm::EVT::bitsGT(), E, encodeMemSDNodeFlags(), llvm::EVT::getRawBits(), getStore(), getUNDEF(), llvm::SDValue::getValueType(), getVTList(), llvm::EVT::isInteger(), llvm::MVT::Other, llvm::ISD::STORE, llvm::RegState::Undef, llvm::ISD::UNINDEXED, and VTs.
Referenced by ExpandUnalignedLoad(), ExpandUnalignedStore(), getMemcpyLoadsAndStores(), and llvm::AlphaTargetLowering::LowerOperation().
| SDValue SelectionDAG::getIndexedStore | ( | SDValue | OrigStoe, | |
| DebugLoc | dl, | |||
| SDValue | Base, | |||
| SDValue | Offset, | |||
| ISD::MemIndexedMode | AM | |||
| ) |
Definition at line 3775 of file SelectionDAG.cpp.
References llvm::FoldingSetNodeID::AddInteger(), AddNodeIDNode(), E, llvm::MemSDNode::getAlignment(), llvm::MemSDNode::getChain(), llvm::MemSDNode::getMemoryVT(), llvm::StoreSDNode::getOffset(), llvm::SDValue::getOpcode(), llvm::EVT::getRawBits(), llvm::MemSDNode::getRawSubclassData(), llvm::MemSDNode::getSrcValue(), llvm::MemSDNode::getSrcValueOffset(), llvm::StoreSDNode::getValue(), llvm::SDValue::getValueType(), getVTList(), llvm::StoreSDNode::isTruncatingStore(), llvm::MemSDNode::isVolatile(), llvm::MVT::Other, llvm::ISD::STORE, llvm::ISD::UNDEF, and VTs.
getSrcValue - Construct a node to track a Value* through the backend.
Definition at line 1315 of file SelectionDAG.cpp.
References AddNodeIDNode(), E, llvm::Value::getType(), getVTList(), llvm::MVT::Other, and llvm::ISD::SRCVALUE.
| SDValue SelectionDAG::getMemOperand | ( | const MachineMemOperand & | MO | ) |
getMemOperand - Construct a node to track a memory reference through the backend.
Definition at line 1334 of file SelectionDAG.cpp.
References AddNodeIDNode(), E, llvm::Value::getType(), llvm::MachineMemOperand::getValue(), getVTList(), llvm::ISD::MEMOPERAND, llvm::MVT::Other, and llvm::MachineMemOperand::Profile().
Referenced by llvm::PPCTargetLowering::PerformDAGCombine().
getShiftAmountOperand - Return the specified value casted to the target's desired shift amount type.
getShiftAmountOperand - Return the specified value casted to the target's desired shift amount type.
Definition at line 1358 of file SelectionDAG.cpp.
References llvm::EVT::bitsGT(), llvm::SDValue::getDebugLoc(), getNode(), llvm::TargetLowering::getShiftAmountTy(), llvm::SDValue::getValueType(), llvm::EVT::isVector(), llvm::ISD::TRUNCATE, and llvm::ISD::ZERO_EXTEND.
UpdateNodeOperands - *Mutate* the specified node in-place to have the specified operands. If the resultant node already exists in the DAG, this does not modify the specified node, instead it returns the node that already exists. If the resultant node does not exist in the DAG, the input node is returned. As a degenerate case, if you specify the same input operands as the node already has, the input node is returned.
UpdateNodeOperands - *Mutate* the specified node in-place to have the specified operands. If the resultant node already exists in the DAG, this does not modify the specified node, instead it returns the node that already exists. If the resultant node does not exist in the DAG, the input node is returned. As a degenerate case, if you specify the same input operands as the node already has, the input node is returned.
Definition at line 4091 of file SelectionDAG.cpp.
References llvm::SDValue::getNode(), llvm::SDNode::getNumOperands(), llvm::SDNode::getOperand(), llvm::SDValue::getResNo(), llvm::SDNode::OperandList, and llvm::SDUse::set().
Referenced by MoveBelowCallSeqStart(), MoveBelowTokenFactor(), PerformMEMBARRIERCombine(), UpdateNodeOperand(), and UpdateNodeOperands().
Definition at line 4117 of file SelectionDAG.cpp.
References llvm::SDValue::getNode(), llvm::SDNode::getNumOperands(), llvm::SDNode::getOperand(), llvm::SDValue::getResNo(), llvm::SDNode::OperandList, and llvm::SDUse::set().
Definition at line 4167 of file SelectionDAG.cpp.
References llvm::SDValue::getNode(), llvm::SDNode::getNumOperands(), llvm::SDNode::getOperand(), llvm::SDValue::getResNo(), llvm::SDNode::OperandList, and llvm::SDUse::set().
SelectNodeTo - These are used for target selectors to *mutate* the specified node to have the specified return type, Target opcode, and operands. Note that target opcodes are stored as ~TargetOpcode in the node opcode field. The resultant node is returned.
SelectNodeTo - These are wrappers around MorphNodeTo that accept a machine opcode.
Definition at line 4218 of file SelectionDAG.cpp.
References getVTList(), and VTs.
Referenced by SelectNodeTo().
MorphNodeTo - These *mutate* the specified node to have the specified return type, opcode, and operands.
Definition at line 4321 of file SelectionDAG.cpp.
References getVTList(), and VTs.
Referenced by MorphNodeTo(), and SelectNodeTo().
| SDNode * SelectionDAG::MorphNodeTo | ( | SDNode * | N, | |
| unsigned | Opc, | |||
| SDVTList | VTs, | |||
| const SDValue * | Ops, | |||
| unsigned | NumOps | |||
| ) |
MorphNodeTo - These *mutate* the specified node to have the specified return type, opcode, and operands.
Note that MorphNodeTo returns the resultant node. If there is already a node of the specified opcode and operands, it returns that node instead of the current one. Note that the DebugLoc need not be the same.
Using MorphNodeTo is faster than creating a new node and swapping it in with ReplaceAllUsesWith both because it often avoids allocating a new node, and because it doesn't require CSE recalculation for any of the node's users.
Definition at line 4414 of file SelectionDAG.cpp.
References AddNodeIDNode(), llvm::BumpPtrAllocator::Allocate(), llvm::SmallPtrSet< PtrType, SmallSize >::begin(), E, llvm::SmallPtrSet< PtrType, SmallSize >::end(), llvm::MVT::Flag, llvm::SDUse::getNode(), llvm::SmallPtrSet< PtrType, SmallSize >::insert(), llvm::SDNode::isMachineOpcode(), llvm::SDNode::NodeType, llvm::SDNode::NumOperands, llvm::SDNode::NumValues, llvm::SDVTList::NumVTs, llvm::SDNode::op_begin(), llvm::SDNode::op_end(), llvm::SDNode::OperandList, llvm::SDNode::OperandsNeedDelete, llvm::SmallVectorImpl< T >::push_back(), RemoveDeadNodes(), llvm::SDUse::set(), llvm::SDUse::setInitial(), llvm::SDUse::setUser(), llvm::SDNode::use_empty(), llvm::SDNode::ValueList, and llvm::SDVTList::VTs.
getTargetNode - These are used for target selectors to create a new node with specified return type(s), target opcode, and operands.
Note that getTargetNode returns the resultant node. If there is already a node of the specified opcode and operands, it returns that node instead of the current one.
getTargetNode - These are used for target selectors to create a new node with specified return type(s), target opcode, and operands.
Note that getTargetNode returns the resultant node. If there is already a node of the specified opcode and operands, it returns that node instead of the current one.
Definition at line 4491 of file SelectionDAG.cpp.
References llvm::SDValue::getNode(), and getNode().
Referenced by getTargetExtractSubreg(), llvm::PPCTargetLowering::SelectAddressRegImm(), llvm::PPCTargetLowering::SelectAddressRegImmShift(), and llvm::X86InstrInfo::unfoldMemoryOperand().
Definition at line 4495 of file SelectionDAG.cpp.
References llvm::SDValue::getNode(), and getNode().
| SDNode * SelectionDAG::getTargetNode | ( | unsigned | Opcode, | |
| DebugLoc | dl, | |||
| EVT | VT, | |||
| SDValue | Op1, | |||
| SDValue | Op2 | |||
| ) |
Definition at line 4500 of file SelectionDAG.cpp.
References llvm::SDValue::getNode(), and getNode().
| SDNode * SelectionDAG::getTargetNode | ( | unsigned | Opcode, | |
| DebugLoc | dl, | |||
| EVT | VT, | |||
| SDValue | Op1, | |||
| SDValue | Op2, | |||
| SDValue | Op3 | |||
| ) |
Definition at line 4505 of file SelectionDAG.cpp.
References llvm::SDValue::getNode(), and getNode().
| SDNode * SelectionDAG::getTargetNode | ( | unsigned | Opcode, | |
| DebugLoc | dl, | |||
| EVT | VT, | |||
| const SDValue * | Ops, | |||
| unsigned | NumOps | |||
| ) |
Definition at line 4511 of file SelectionDAG.cpp.
References llvm::SDValue::getNode(), and getNode().
Definition at line 4516 of file SelectionDAG.cpp.
References llvm::SDValue::getNode(), getNode(), getVTList(), and VTs.
| SDNode * SelectionDAG::getTargetNode | ( | unsigned | Opcode, | |
| DebugLoc | dl, | |||
| EVT | VT1, | |||
| EVT | VT2, | |||
| SDValue | Op1 | |||
| ) |
Definition at line 4523 of file SelectionDAG.cpp.
References llvm::SDValue::getNode(), getNode(), getVTList(), and VTs.
| SDNode * SelectionDAG::getTargetNode | ( | unsigned | Opcode, | |
| DebugLoc | dl, | |||
| EVT | VT1, | |||
| EVT | VT2, | |||
| SDValue | Op1, | |||
| SDValue | Op2 | |||
| ) |
Definition at line 4529 of file SelectionDAG.cpp.
References llvm::SDValue::getNode(), getNode(), getVTList(), and VTs.
| SDNode * SelectionDAG::getTargetNode | ( | unsigned | Opcode, | |
| DebugLoc | dl, | |||
| EVT | VT1, | |||
| EVT | VT2, | |||
| SDValue | Op1, | |||
| SDValue | Op2, | |||
| SDValue | Op3 | |||
| ) |
Definition at line 4537 of file SelectionDAG.cpp.
References llvm::SDValue::getNode(), getNode(), getVTList(), and VTs.
| SDNode * SelectionDAG::getTargetNode | ( | unsigned | Opcode, | |
| DebugLoc | dl, | |||
| EVT | VT1, | |||
| EVT | VT2, | |||
| const SDValue * | Ops, | |||
| unsigned | NumOps | |||
| ) |
Definition at line 4545 of file SelectionDAG.cpp.
References llvm::SDValue::getNode(), getNode(), getVTList(), and VTs.
| SDNode * SelectionDAG::getTargetNode | ( | unsigned | Opcode, | |
| DebugLoc | dl, | |||
| EVT | VT1, | |||
| EVT | VT2, | |||
| EVT | VT3, | |||
| SDValue | Op1, | |||
| SDValue | Op2 | |||
| ) |
Definition at line 4552 of file SelectionDAG.cpp.
References llvm::SDValue::getNode(), getNode(), getVTList(), and VTs.
| SDNode * SelectionDAG::getTargetNode | ( | unsigned | Opcode, | |
| DebugLoc | dl, | |||
| EVT | VT1, | |||
| EVT | VT2, | |||
| EVT | VT3, | |||
| SDValue | Op1, | |||
| SDValue | Op2, | |||
| SDValue | Op3 | |||
| ) |
Definition at line 4560 of file SelectionDAG.cpp.
References llvm::SDValue::getNode(), getNode(), getVTList(), and VTs.
| SDNode * SelectionDAG::getTargetNode | ( | unsigned | Opcode, | |
| DebugLoc | dl, | |||
| EVT | VT1, | |||
| EVT | VT2, | |||
| EVT | VT3, | |||
| const SDValue * | Ops, | |||
| unsigned | NumOps | |||
| ) |
Definition at line 4569 of file SelectionDAG.cpp.
References llvm::SDValue::getNode(), getNode(), getVTList(), and VTs.
| SDNode * SelectionDAG::getTargetNode | ( | unsigned | Opcode, | |
| DebugLoc | dl, | |||
| EVT | VT1, | |||
| EVT | VT2, | |||
| EVT | VT3, | |||
| EVT | VT4, | |||
| const SDValue * | Ops, | |||
| unsigned | NumOps | |||
| ) |
Definition at line 4576 of file SelectionDAG.cpp.
References llvm::SDValue::getNode(), getNode(), getVTList(), and VTs.
| SDNode * SelectionDAG::getTargetNode | ( | unsigned | Opcode, | |
| DebugLoc | dl, | |||
| const std::vector< EVT > & | ResultTys, | |||
| const SDValue * | Ops, | |||
| unsigned | NumOps | |||
| ) |
Definition at line 4583 of file SelectionDAG.cpp.
References llvm::SDValue::getNode(), and getNode().
getTargetExtractSubreg - A convenience function for creating TargetInstrInfo::EXTRACT_SUBREG nodes.
getTargetExtractSubreg - A convenience function for creating TargetInstrInfo::EXTRACT_SUBREG nodes.
Definition at line 4592 of file SelectionDAG.cpp.
References llvm::TargetInstrInfo::EXTRACT_SUBREG, getTargetConstant(), getTargetNode(), and llvm::MVT::i32.
| SDNode * SelectionDAG::getNodeIfExists | ( | unsigned | Opcode, | |
| SDVTList | VTList, | |||
| const SDValue * | Ops, | |||
| unsigned | NumOps | |||
| ) |
getNodeIfExists - Get the specified node if it's already available, or else return NULL.
getNodeIfExists - Get the specified node if it's already available, or else return NULL.
Definition at line 4602 of file SelectionDAG.cpp.
References AddNodeIDNode(), E, llvm::MVT::Flag, llvm::SDVTList::NumVTs, and llvm::SDVTList::VTs.
| void SelectionDAG::RemoveDeadNode | ( | SDNode * | N, | |
| DAGUpdateListener * | UpdateListener = 0 | |||
| ) |
RemoveDeadNode - Remove the specified node from the system. If any of its operands then becomes dead, remove them as well. Inform UpdateListener for each node deleted.
Definition at line 579 of file SelectionDAG.cpp.
References RemoveDeadNodes().
| void SelectionDAG::RemoveDeadNodes | ( | SmallVectorImpl< SDNode * > & | DeadNodes, | |
| DAGUpdateListener * | UpdateListener = 0 | |||
| ) |
RemoveDeadNodes - This method deletes the unreachable nodes in the given list, and any nodes that become unreachable as a result.
RemoveDeadNodes - This method deletes the unreachable nodes in the given list, and any nodes that become unreachable as a result.
Definition at line 549 of file SelectionDAG.cpp.
References E, llvm::SmallVectorImpl< T >::empty(), llvm::SDUse::getNode(), llvm::SelectionDAG::DAGUpdateListener::NodeDeleted(), llvm::SDNode::op_begin(), llvm::SDNode::op_end(), Operand, llvm::SmallVectorImpl< T >::pop_back_val(), llvm::SmallVectorImpl< T >::push_back(), llvm::SDUse::set(), and llvm::SDNode::use_empty().
| void SelectionDAG::ReplaceAllUsesWith | ( | SDValue | FromN, | |
| SDValue | To, | |||
| DAGUpdateListener * | UpdateListener = 0 | |||
| ) |
ReplaceAllUsesWith - Modify anything using 'From' to use 'To' instead. This can cause recursive merging of nodes in the DAG. Use the first version if 'From' is known to have a single result, use the second if you have two nodes with identical results (or if 'To' has a superset of the results of 'From'), use the third otherwise.
These methods all take an optional UpdateListener, which (if not null) is informed about nodes that are deleted and modified due to recursive changes in the dag.
These functions only replace all existing uses. It's possible that as these replacements are being performed, CSE may cause the From node to be given new uses. These new uses of From are left in place, and not automatically transfered to To.
ReplaceAllUsesWith - Modify anything using 'From' to use 'To' instead. This can cause recursive merging of nodes in the DAG.
This version assumes From has a single result value.
Definition at line 4619 of file SelectionDAG.cpp.
References llvm::SDValue::getNode(), llvm::SDNode::getNumValues(), llvm::SDValue::getResNo(), llvm::SDUse::set(), llvm::SDNode::use_begin(), and llvm::SDNode::use_end().
Referenced by ReplaceAllUsesOfValueWith(), ReplaceAllUsesWith(), and UpdateNodeOperand().
| void SelectionDAG::ReplaceAllUsesWith | ( | SDNode * | From, | |
| SDNode * | To, | |||
| DAGUpdateListener * | UpdateListener = 0 | |||
| ) |
ReplaceAllUsesWith - Modify anything using 'From' to use 'To' instead. This can cause recursive merging of nodes in the DAG.
This version assumes that for each value of From, there is a corresponding value in To in the same position with the same type.
Definition at line 4662 of file SelectionDAG.cpp.
References llvm::SDNode::getNumValues(), llvm::SDNode::use_iterator::getUse(), llvm::SDNode::getValueType(), llvm::SDNode::hasAnyUseOfValue(), llvm::SDUse::setNode(), llvm::SDNode::use_begin(), and llvm::SDNode::use_end().
| void SelectionDAG::ReplaceAllUsesWith | ( | SDNode * | From, | |
| const SDValue * | To, | |||
| DAGUpdateListener * | UpdateListener = 0 | |||
| ) |
ReplaceAllUsesWith - Modify anything using 'From' to use 'To' instead. This can cause recursive merging of nodes in the DAG.
This version can replace From with any result values. To must match the number and types of values returned by From.
Definition at line 4705 of file SelectionDAG.cpp.
References llvm::SDNode::getNumValues(), llvm::SDUse::getResNo(), llvm::SDNode::use_iterator::getUse(), ReplaceAllUsesWith(), llvm::SDUse::set(), llvm::SDNode::use_begin(), and llvm::SDNode::use_end().
| void SelectionDAG::ReplaceAllUsesOfValueWith | ( | SDValue | From, | |
| SDValue | To, | |||
| DAGUpdateListener * | UpdateListener = 0 | |||
| ) |
ReplaceAllUsesOfValueWith - Replace any uses of From with To, leaving uses of other values produced by From.Val alone.
ReplaceAllUsesOfValueWith - Replace any uses of From with To, leaving uses of other values produced by From.getNode() alone. The Deleted vector is handled the same way as for ReplaceAllUsesWith.
Definition at line 4740 of file SelectionDAG.cpp.
References llvm::SDValue::getNode(), llvm::SDNode::getNumValues(), llvm::SDUse::getResNo(), llvm::SDValue::getResNo(), llvm::SDNode::use_iterator::getUse(), ReplaceAllUsesWith(), llvm::SDUse::set(), llvm::SDNode::use_begin(), and llvm::SDNode::use_end().
Referenced by llvm::PIC16TargetLowering::PerformPIC16LoadCombine(), and ReplaceAllUsesOfValuesWith().
| void SelectionDAG::ReplaceAllUsesOfValuesWith | ( | const SDValue * | From, | |
| const SDValue * | To, | |||
| unsigned | Num, | |||
| DAGUpdateListener * | UpdateListener = 0 | |||
| ) |
ReplaceAllUsesOfValuesWith - Like ReplaceAllUsesOfValueWith, but for multiple values at once. This correctly handles the case where there is an overlap between the From values and the To values.
ReplaceAllUsesOfValuesWith - Replace any uses of From with To, leaving uses of other values produced by From.getNode() alone. The same value may appear in both the From and To list. The Deleted vector is handled the same way as for ReplaceAllUsesWith.
Definition at line 4813 of file SelectionDAG.cpp.
References llvm::SmallVectorImpl< T >::begin(), E, llvm::SmallVectorImpl< T >::end(), llvm::SDValue::getNode(), llvm::SDUse::getResNo(), llvm::SDValue::getResNo(), llvm::SmallVectorImpl< T >::push_back(), ReplaceAllUsesOfValueWith(), llvm::SDUse::set(), llvm::SmallVectorImpl< T >::size(), llvm::SDNode::use_begin(), llvm::SDNode::use_end(), and Uses.
| unsigned SelectionDAG::AssignTopologicalOrder | ( | ) |
AssignTopologicalOrder - Topological-sort the AllNodes list and a assign a unique node id for each node in the DAG based on their topological order. Returns the number of nodes.
AssignTopologicalOrder - Assign a unique node id for each node in the DAG based on their topological order. It returns the maximum id and a vector of the SDNodes* in assigned order by reference.
Definition at line 4871 of file SelectionDAG.cpp.
References allnodes_begin(), allnodes_end(), allnodes_size(), E, llvm::ISD::EntryToken, llvm::SDNode::getNodeId(), llvm::SDNode::getNumOperands(), Q, llvm::SDNode::setNodeId(), llvm::SDNode::use_begin(), and llvm::SDNode::use_end().
Referenced by llvm::SelectionDAGISel::SelectRootInit().
| void llvm::SelectionDAG::RepositionNode | ( | allnodes_iterator | Position, | |
| SDNode * | N | |||
| ) | [inline] |
RepositionNode - Move node N in the AllNodes list to be immediately before the given iterator Position. This may be used to update the topological ordering when the list of nodes is modified.
Definition at line 766 of file SelectionDAG.h.
isCommutativeBinOp - Returns true if the opcode is a commutative binary operation.
Definition at line 772 of file SelectionDAG.h.
References llvm::ISD::ADD, llvm::ISD::ADDC, llvm::ISD::ADDE, llvm::ISD::AND, llvm::ISD::FADD, llvm::ISD::FMUL, llvm::ISD::MUL, llvm::ISD::MULHS, llvm::ISD::MULHU, llvm::ISD::OR, llvm::ISD::SADDO, llvm::ISD::SMUL_LOHI, llvm::ISD::UADDO, llvm::ISD::UMUL_LOHI, and llvm::ISD::XOR.
Referenced by getNode(), and llvm::TargetLowering::SimplifySetCC().
| void SelectionDAG::dump | ( | ) | const |
CreateStackTemporary - Create a stack temporary, suitable for holding the specified value type. If minAlign is specified, the slot size will have at least that alignment.
CreateStackTemporary - Create a stack temporary, suitable for holding the specified value type.
Definition at line 1369 of file SelectionDAG.cpp.
References llvm::MachineFrameInfo::CreateStackObject(), FrameIdx, getContext(), getFrameIndex(), llvm::MachineFunction::getFrameInfo(), getMachineFunction(), llvm::TargetLowering::getPointerTy(), llvm::TargetData::getPrefTypeAlignment(), llvm::EVT::getStoreSizeInBits(), llvm::TargetLowering::getTargetData(), and llvm::EVT::getTypeForEVT().
Referenced by ExpandUnalignedLoad(), ExpandUnalignedStore(), and llvm::SparcTargetLowering::LowerCall().
CreateStackTemporary - Create a stack temporary suitable for holding either of the specified value types.
CreateStackTemporary - Create a stack temporary suitable for holding either of the specified value types.
Definition at line 1382 of file SelectionDAG.cpp.
References Align, FrameIdx, getContext(), getFrameIndex(), llvm::MachineFunction::getFrameInfo(), getMachineFunction(), llvm::TargetLowering::getPointerTy(), llvm::TargetData::getPrefTypeAlignment(), llvm::EVT::getStoreSizeInBits(), llvm::TargetLowering::getTargetData(), llvm::EVT::getTypeForEVT(), and TD.
| SDValue SelectionDAG::FoldConstantArithmetic | ( | unsigned | Opcode, | |
| EVT | VT, | |||
| ConstantSDNode * | Cst1, | |||
| ConstantSDNode * | Cst2 | |||
| ) |
FoldConstantArithmetic -.
Definition at line 2476 of file SelectionDAG.cpp.
References llvm::ISD::ADD, llvm::ISD::AND, llvm::APInt::ashr(), C2, llvm::ConstantSDNode::getAPIntValue(), getConstant(), llvm::APInt::lshr(), llvm::ISD::MUL, llvm::ISD::OR, llvm::APInt::rotl(), llvm::ISD::ROTL, llvm::APInt::rotr(), llvm::ISD::ROTR, llvm::APInt::sdiv(), llvm::ISD::SDIV, llvm::ISD::SHL, llvm::ISD::SRA, llvm::APInt::srem(), llvm::ISD::SREM, llvm::ISD::SRL, llvm::ISD::SUB, llvm::APInt::udiv(), llvm::ISD::UDIV, llvm::APInt::urem(), llvm::ISD::UREM, and llvm::ISD::XOR.
Referenced by getNode().
FoldSetCC - Constant fold a setcc to true or false.
Definition at line 1396 of file SelectionDAG.cpp.
References C2, llvm::APFloat::cmpEqual, llvm::APFloat::cmpGreaterThan, llvm::APFloat::cmpLessThan, llvm::APFloat::cmpUnordered, getConstant(), llvm::SDValue::getNode(), getSetCC(), llvm::ISD::getSetCCSwappedOperands(), getUNDEF(), llvm::SDValue::getValueType(), llvm::EVT::isInteger(), llvm_unreachable, llvm::MVT::ppcf128, R, llvm::ISD::SETEQ, llvm::ISD::SETFALSE, llvm::ISD::SETFALSE2, llvm::ISD::SETGE, llvm::ISD::SETGT, llvm::ISD::SETLE, llvm::ISD::SETLT, llvm::ISD::SETNE, llvm::ISD::SETO, llvm::ISD::SETOEQ, llvm::ISD::SETOGE, llvm::ISD::SETOGT, llvm::ISD::SETOLE, llvm::ISD::SETOLT, llvm::ISD::SETONE, llvm::ISD::SETTRUE, llvm::ISD::SETTRUE2, llvm::ISD::SETUEQ, llvm::ISD::SETUGE, llvm::ISD::SETUGT, llvm::ISD::SETULE, llvm::ISD::SETULT, llvm::ISD::SETUNE, llvm::ISD::SETUO, llvm::APInt::sge(), llvm::APInt::sgt(), llvm::APInt::sle(), llvm::APInt::slt(), llvm::APInt::uge(), llvm::APInt::ugt(), llvm::APInt::ule(), and llvm::APInt::ult().
Referenced by getNode(), and llvm::TargetLowering::SimplifySetCC().
SignBitIsZero - Return true if the sign bit of Op is known to be zero. We use this predicate to simplify operations downstream.
SignBitIsZero - Return true if the sign bit of Op is known to be zero. We use this predicate to simplify operations downstream.
Definition at line 1500 of file SelectionDAG.cpp.
References llvm::APInt::getSignBit(), llvm::SDValue::getValueSizeInBits(), llvm::SDValue::getValueType(), llvm::EVT::isVector(), and MaskedValueIsZero().
MaskedValueIsZero - Return true if 'Op & Mask' is known to be zero. We use this predicate to simplify operations downstream. Op and Mask are known to be the same type.
MaskedValueIsZero - Return true if 'V & Mask' is known to be zero. We use this predicate to simplify operations downstream. Mask is known to be zero for bits that V cannot have.
Definition at line 1512 of file SelectionDAG.cpp.
References ComputeMaskedBits().
Referenced by llvm::SelectionDAGISel::CheckAndMask(), SignBitIsZero(), and llvm::TargetLowering::SimplifySetCC().
| void SelectionDAG::ComputeMaskedBits | ( | SDValue | Op, | |
| const APInt & | Mask, | |||
| APInt & | KnownZero, | |||
| APInt & | KnownOne, | |||
| unsigned | Depth = 0 | |||
| ) | const |
ComputeMaskedBits - Determine which of the bits specified in Mask are known to be either zero or one and return them in the KnownZero/KnownOne bitsets. This code only analyzes bits in Mask, in order to short-circuit processing. Targets can implement the computeMaskedBitsForTargetNode method in the TargetLowering class to allow target nodes to be understood.
ComputeMaskedBits - Determine which of the bits specified in Mask are known to be either zero or one and return them in the KnownZero/KnownOne bitsets. This code only analyzes bits in Mask, in order to short-circuit processing.
Definition at line 1524 of file SelectionDAG.cpp.
References llvm::ISD::ADD, llvm::ISD::AND, llvm::ISD::ANY_EXTEND, llvm::ISD::AssertZext, llvm::ISD::BUILTIN_OP_END, llvm::TargetLowering::computeMaskedBitsForTargetNode(), llvm::ISD::Constant, llvm::ISD::CTLZ, llvm::ISD::CTPOP, llvm::ISD::CTTZ, llvm::ISD::FGETSIGN, llvm::APInt::getAllOnesValue(), llvm::APInt::getBitWidth(), llvm::TargetLowering::getBooleanContents(), llvm::APInt::getBoolValue(), llvm::APInt::getHighBitsSet(), llvm::APInt::getLowBitsSet(), llvm::MemSDNode::getMemoryVT(), llvm::SDValue::getNode(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::SDValue::getResNo(), llvm::APInt::getSignBit(), llvm::EVT::getSizeInBits(), llvm::SDValue::getValueType(), llvm::ISD::INTRINSIC_VOID, llvm::ISD::INTRINSIC_W_CHAIN, llvm::ISD::INTRINSIC_WO_CHAIN, llvm::APInt::isPowerOf2(), llvm::APInt::isStrictlyPositive(), llvm::ISD::isZEXTLoad(), llvm::ISD::LOAD, llvm::Log2_32(), llvm::APInt::lshr(), llvm::ISD::MUL, llvm::ISD::OR, llvm::ISD::SADDO, llvm::ISD::SELECT, llvm::ISD::SELECT_CC, llvm::ISD::SETCC, llvm::ISD::SHL, llvm::ISD::SIGN_EXTEND, llvm::ISD::SIGN_EXTEND_INREG, llvm::ISD::SMULO, llvm::ISD::SRA, llvm::ISD::SREM, llvm::ISD::SRL, llvm::ISD::SSUBO, llvm::ISD::SUB, llvm::APInt::trunc(), llvm::ISD::TRUNCATE, llvm::ISD::UADDO, llvm::ISD::UDIV, llvm::ISD::UMULO, llvm::ISD::UREM, llvm::ISD::USUBO, llvm::ISD::XOR, llvm::ISD::ZERO_EXTEND, llvm::TargetLowering::ZeroOrOneBooleanContent, and llvm::APInt::zext().
Referenced by llvm::SelectionDAGISel::CheckOrMask(), llvm::SparcTargetLowering::computeMaskedBitsForTargetNode(), llvm::ARMTargetLowering::computeMaskedBitsForTargetNode(), ComputeNumSignBits(), MaskedValueIsZero(), llvm::PPCTargetLowering::SelectAddressRegImm(), llvm::PPCTargetLowering::SelectAddressRegImmShift(), llvm::PPCTargetLowering::SelectAddressRegReg(), llvm::TargetLowering::SimplifyDemandedBits(), and ValueHasExactlyOneBitSet().
ComputeNumSignBits - Return the number of times the sign bit of the register is replicated into the other bits. We know that at least 1 bit is always equal to the sign bit (itself), but other cases can give us information. For example, immediately after an "SRA X, 2", we know that the top 3 bits are all equal to each other, so we return 3. Targets can implement the ComputeNumSignBitsForTarget method in the TargetLowering class to allow target nodes to be understood.
ComputeNumSignBits - Return the number of times the sign bit of the register is replicated into the other bits. We know that at least 1 bit is always equal to the sign bit (itself), but other cases can give us information. For example, immediately after an "SRA X, 2", we know that the top 3 bits are all equal to each other, so we return 3.
Definition at line 1982 of file SelectionDAG.cpp.
References llvm::ISD::ADD, llvm::ISD::AND, llvm::ISD::AssertSext, llvm::ISD::AssertZext, llvm::ISD::BUILTIN_OP_END, llvm::CallingConv::C, ComputeMaskedBits(), llvm::TargetLowering::ComputeNumSignBitsForTargetNode(), llvm::ISD::Constant, llvm::APInt::countLeadingOnes(), llvm::APInt::countLeadingZeros(), llvm::APInt::getAllOnesValue(), llvm::APInt::getBitWidth(), llvm::TargetLowering::getBooleanContents(), llvm::LoadSDNode::getExtensionType(), llvm::MemSDNode::getMemoryVT(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::SDValue::getResNo(), llvm::EVT::getSizeInBits(), llvm::SDValue::getValueType(), llvm::ISD::INTRINSIC_VOID, llvm::ISD::INTRINSIC_W_CHAIN, llvm::ISD::INTRINSIC_WO_CHAIN, llvm::EVT::isInteger(), llvm::APInt::isNegative(), llvm::ISD::LOAD, llvm::ISD::OR, llvm::ISD::ROTL, llvm::ISD::ROTR, llvm::ISD::SADDO, llvm::ISD::SELECT, llvm::ISD::SETCC, llvm::ISD::SEXTLOAD, llvm::ISD::SHL, llvm::ISD::SIGN_EXTEND, llvm::ISD::SIGN_EXTEND_INREG, llvm::ISD::SMULO, llvm::ISD::SRA, llvm::ISD::SSUBO, llvm::ISD::SUB, llvm::ISD::TRUNCATE, llvm::ISD::UADDO, llvm::ISD::UMULO, llvm::ISD::USUBO, Val, llvm::ISD::XOR, llvm::TargetLowering::ZeroOrNegativeOneBooleanContent, and llvm::ISD::ZEXTLOAD.
isVerifiedDebugInfoDesc - Returns true if the specified SDValue has been verified as a debug information descriptor.
Definition at line 2203 of file SelectionDAG.cpp.
References llvm::dyn_cast(), llvm::GlobalAddressSDNode::getGlobal(), getMachineModuleInfo(), llvm::GlobalAddressSDNode::getOffset(), GV, and llvm::MachineModuleInfo::hasDebugInfo().
| SDValue SelectionDAG::getShuffleScalarElt | ( | const ShuffleVectorSDNode * | N, | |
| unsigned | i | |||
| ) |
getShuffleScalarElt - Returns the scalar element that will make up the ith element of the result of the vector shuffle.
getShuffleScalarElt - Returns the scalar element that will make up the ith element of the result of the vector shuffle.
Definition at line 2216 of file SelectionDAG.cpp.
References llvm::ISD::BIT_CONVERT, llvm::ISD::BUILD_VECTOR, llvm::SDNode::getDebugLoc(), llvm::ShuffleVectorSDNode::getMaskElt(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::SDNode::getOperand(), getUNDEF(), llvm::SDValue::getValueType(), llvm::SDNode::getValueType(), llvm::EVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), Index, llvm::EVT::isVector(), llvm::ISD::SCALAR_TO_VECTOR, and V.
Referenced by EltsFromConsecutiveLoads(), and getNumOfConsecutiveZeros().
| std::map<const SDNode *, std::string> llvm::SelectionDAG::NodeGraphAttrs |
Definition at line 150 of file SelectionDAG.h.
Referenced by clearGraphAttrs(), getGraphAttrs(), setGraphAttrs(), and setGraphColor().