LLVM API Documentation
#include <TargetLowering.h>
This class also defines callbacks that targets must implement to lower target-specific constructs to SelectionDAG operators.
Definition at line 81 of file TargetLowering.h.
getTgtMemIntrinsic: Given an intrinsic, checks if on the target the intrinsic will need to map to a MemIntrinsicNode (touches memory). If this is the case, it returns true and store the intrinsic information into the IntrinsicInfo that was passed to the function.
| typedef std::vector<APFloat>::const_iterator llvm::TargetLowering::legal_fpimm_iterator |
Definition at line 328 of file TargetLowering.h.
| typedef std::vector<ArgListEntry> llvm::TargetLowering::ArgListTy |
Definition at line 1146 of file TargetLowering.h.
LegalizeAction - This enum indicates whether operations are valid for a target, and if not, what action should be used to make them valid.
Definition at line 87 of file TargetLowering.h.
Definition at line 94 of file TargetLowering.h.
Definition at line 100 of file TargetLowering.h.
Definition at line 1339 of file TargetLowering.h.
| TargetLowering::TargetLowering | ( | TargetMachine & | TM, | |
| TargetLoweringObjectFile * | TLOF | |||
| ) | [explicit] |
NOTE: The constructor takes ownership of TLOF.
Definition at line 456 of file TargetLowering.cpp.
References llvm::array_lengthof(), benefitFromCodePlacementOpt, llvm::ISD::CONCAT_VECTORS, llvm::ISD::ConstantFP, llvm::ISD::DEBUG_LOC, Expand, llvm::MVT::f32, llvm::MVT::f64, llvm::MVT::f80, llvm::ISD::FEXP, llvm::ISD::FEXP2, llvm::ISD::FGETSIGN, llvm::ISD::FLOG, llvm::ISD::FLOG10, llvm::ISD::FLOG2, llvm::MVT::getIntegerVT(), llvm::TargetData::getPointerSize(), llvm::TargetMachine::getTargetAsmInfo(), llvm::TargetAsmInfo::hasDotLocAndDotFile(), InitCmpLibcallCCs(), InitLibcallCallingConvs(), InitLibcallNames(), llvm::TargetData::isLittleEndian(), llvm::ISD::LAST_INDEXED_MODE, llvm::MVT::LAST_VALUETYPE, maxStoresPerMemcpy, maxStoresPerMemmove, maxStoresPerMemset, llvm::Intrinsic::memset, llvm::MVT::Other, llvm::ISD::PRE_INC, llvm::ISD::PREFETCH, SchedulingForLatency, setIndexedLoadAction(), setIndexedStoreAction(), setOperationAction(), llvm::ISD::TRAP, UndefinedBooleanContent, and VT.
| TargetLowering::~TargetLowering | ( | ) | [virtual] |
Definition at line 538 of file TargetLowering.cpp.
| TargetMachine& llvm::TargetLowering::getTargetMachine | ( | ) | const [inline] |
Definition at line 109 of file TargetLowering.h.
Referenced by llvm::PPCTargetLowering::EmitAtomicBinary(), llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), llvm::SparcTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::PIC16TargetLowering::EmitInstrWithCustomInserter(), llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), llvm::AlphaTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), llvm::PPCTargetLowering::getByValTypeAlignment(), llvm::PPCTargetLowering::getFunctionAlignment(), llvm::ARMTargetLowering::getFunctionAlignment(), llvm::PPCTargetLowering::IsEligibleForTailCallOptimization(), llvm::X86TargetLowering::isLegalAddressingMode(), isOffsetFoldingLegal(), llvm::X86TargetLowering::LowerAsmOperandForConstraint(), llvm::AlphaTargetLowering::LowerCallResult(), llvm::SparcTargetLowering::LowerFormalArguments(), llvm::SystemZTargetLowering::LowerGlobalAddress(), llvm::SPUTargetLowering::LowerReturn(), llvm::SPUTargetLowering::PerformDAGCombine(), and llvm::PPCTargetLowering::PerformDAGCombine().
| const TargetData* llvm::TargetLowering::getTargetData | ( | ) | const [inline] |
Definition at line 110 of file TargetLowering.h.
Referenced by ComputeValueVTs(), llvm::SelectionDAG::CreateStackTemporary(), llvm::SelectionDAG::getConstantPool(), llvm::SelectionDAG::getMemcpy(), llvm::SelectionDAG::getMemmove(), llvm::SelectionDAG::getMemset(), LowerCallTo(), MeetsMaxMemopRequirement(), llvm::FunctionLoweringInfo::set(), and llvm::X86TargetLowering::X86TargetLowering().
| TargetLoweringObjectFile& llvm::TargetLowering::getObjFileLowering | ( | ) | const [inline] |
Definition at line 111 of file TargetLowering.h.
Referenced by llvm::AsmPrinter::getObjFileLowering(), and llvm::PIC16AsmPrinter::PIC16AsmPrinter().
| bool llvm::TargetLowering::isBigEndian | ( | ) | const [inline] |
Definition at line 113 of file TargetLowering.h.
Referenced by getCopyFromParts(), and getCopyToParts().
| bool llvm::TargetLowering::isLittleEndian | ( | ) | const [inline] |
Definition at line 114 of file TargetLowering.h.
Referenced by ExpandUnalignedLoad(), ExpandUnalignedStore(), and getMemsetStringVal().
| MVT llvm::TargetLowering::getPointerTy | ( | ) | const [inline] |
Definition at line 115 of file TargetLowering.h.
Referenced by llvm::RegsForValue::AddInlineAsmOperands(), ComputeReloadLoc(), llvm::SelectionDAG::CreateStackTemporary(), ExpandConstantFP(), ExpandLibCall(), ExpandUnalignedLoad(), ExpandUnalignedStore(), llvm::FastISel::FastEmit_rf_(), llvm::SDISelAsmOperandInfo::getCallOperandValEVT(), getCopyFromParts(), getCopyToParts(), GetExponent(), llvm::SelectionDAG::getGlobalAddress(), llvm::SelectionDAG::getIntPtrConstant(), llvm::SelectionDAG::getMemcpy(), llvm::SelectionDAG::getMemmove(), llvm::SelectionDAG::getMemset(), llvm::X86TargetLowering::getPICJumpTableRelocBase(), getPICJumpTableRelocBase(), llvm::FastISel::getRegForGEPIndex(), llvm::FastISel::getRegForValue(), llvm::X86TargetLowering::getReturnAddressFrameIndex(), llvm::SelectionDAGLowering::getValue(), isBLACompatibleAddress(), llvm::SPUTargetLowering::LowerCall(), llvm::SystemZTargetLowering::LowerConstantPool(), llvm::MSP430TargetLowering::LowerExternalSymbol(), llvm::SPUTargetLowering::LowerFormalArguments(), llvm::SystemZTargetLowering::LowerGlobalAddress(), llvm::MSP430TargetLowering::LowerGlobalAddress(), LowerINSERT_VECTOR_ELT(), llvm::SystemZTargetLowering::LowerJumpTable(), LowerLOAD(), LowerMemOpCallTo(), llvm::AlphaTargetLowering::LowerOperation(), LowerSTORE(), LowerVASTART(), LowerVECTOR_SHUFFLE(), PrepareCall(), llvm::PPCTargetLowering::SelectAddressRegImm(), llvm::PPCTargetLowering::SelectAddressRegImmShift(), llvm::SelectionDAGISel::SelectInlineAsmMemoryOperands(), SimplifySetCC(), llvm::SelectionDAGLowering::visitBitTestCase(), llvm::SelectionDAGLowering::visitBitTestHeader(), llvm::SelectionDAGLowering::visitJumpTable(), and llvm::SelectionDAGLowering::visitJumpTableHeader().
| MVT llvm::TargetLowering::getShiftAmountTy | ( | ) | const [inline] |
Definition at line 116 of file TargetLowering.h.
Referenced by BuildSDIV(), BuildUDIV(), ExpandUnalignedLoad(), ExpandUnalignedStore(), getMemsetValue(), llvm::SelectionDAG::getShiftAmountOperand(), getVShift(), LowerI8Math(), LowerVECTOR_SHUFFLEv16i8(), SimplifyDemandedBits(), and SimplifySetCC().
| bool llvm::TargetLowering::usesGlobalOffsetTable | ( | ) | const [inline] |
usesGlobalOffsetTable - Return true if this target uses a GOT for PIC codegen.
Definition at line 120 of file TargetLowering.h.
Referenced by llvm::AsmPrinter::EmitJumpTableInfo(), getPICJumpTableRelocBase(), and llvm::X86TargetLowering::getPICJumpTableRelocBase().
| bool llvm::TargetLowering::isSelectExpensive | ( | ) | const [inline] |
isSelectExpensive - Return true if the select operation is expensive for this target.
Definition at line 124 of file TargetLowering.h.
| bool llvm::TargetLowering::isIntDivCheap | ( | ) | const [inline] |
isIntDivCheap() - Return true if integer divide is usually cheaper than a sequence of several shifts, adds, and multiplies for this target.
Definition at line 128 of file TargetLowering.h.
| bool llvm::TargetLowering::isPow2DivCheap | ( | ) | const [inline] |
isPow2DivCheap() - Return true if pow2 div is cheaper than a chain of srl/add/sra.
Definition at line 132 of file TargetLowering.h.
| MVT::SimpleValueType TargetLowering::getSetCCResultType | ( | EVT | VT | ) | const [virtual] |
getSetCCResultType - Return the ValueType of the result of SETCC operations. Also used to obtain the target's preferred type for the condition operand of SELECT and BRCOND nodes. In the case of BRCOND the argument passed is MVT::Other since there are no other operands to get a type hint from.
Reimplemented in llvm::AlphaTargetLowering, llvm::BlackfinTargetLowering, llvm::SPUTargetLowering, llvm::MipsTargetLowering, llvm::PIC16TargetLowering, llvm::PPCTargetLowering, and llvm::X86TargetLowering.
Definition at line 713 of file TargetLowering.cpp.
References llvm::MVT::SimpleTy.
Referenced by LowerSELECT_CC(), LowerSETCC(), llvm::SelectionDAGLowering::visitBitTestCase(), llvm::SelectionDAGLowering::visitBitTestHeader(), and llvm::SelectionDAGLowering::visitJumpTableHeader().
| BooleanContent llvm::TargetLowering::getBooleanContents | ( | ) | const [inline] |
getBooleanContents - For targets without i1 registers, this gives the nature of the high-bits of boolean values held in types wider than i1. "Boolean values" are special true/false values produced by nodes like SETCC and consumed (as the condition) by nodes like SELECT and BRCOND. Not to be confused with general values promoted from i1.
Definition at line 147 of file TargetLowering.h.
Referenced by llvm::SelectionDAG::ComputeMaskedBits(), and llvm::SelectionDAG::ComputeNumSignBits().
| SchedPreference llvm::TargetLowering::getSchedulingPreference | ( | ) | const [inline] |
getSchedulingPreference - Return target scheduling preference.
Definition at line 150 of file TargetLowering.h.
Referenced by llvm::createDefaultScheduler().
| TargetRegisterClass* llvm::TargetLowering::getRegClassFor | ( | EVT | VT | ) | const [inline] |
getRegClassFor - Return the register class that should be used for the specified value type. This may only be called on legal types.
Definition at line 156 of file TargetLowering.h.
References llvm::EVT::getSimpleVT(), llvm::EVT::isSimple(), and llvm::MVT::SimpleTy.
Referenced by ComputeReloadLoc(), llvm::FastISel::FastEmitInst_extractsubreg(), llvm::FastISel::getRegForValue(), llvm::SelectionDAGISel::MakeReg(), and llvm::FunctionLoweringInfo::MakeReg().
isTypeLegal - Return true if the target has native support for the specified value type. This means that it has a register that directly holds it without promotions or expansions.
Definition at line 166 of file TargetLowering.h.
References llvm::array_lengthof(), llvm::EVT::getSimpleVT(), llvm::EVT::isSimple(), and llvm::MVT::SimpleTy.
Referenced by BuildSDIV(), BuildUDIV(), computeRegisterProperties(), ComputeReloadLoc(), ExpandUnalignedLoad(), ExpandUnalignedStore(), FindAssocWidenVecType(), getCopyToParts(), getRegForInlineAsmConstraint(), llvm::FastISel::getRegForValue(), getTypeToPromoteTo(), getVectorTypeBreakdown(), getVectorTypeBreakdownMVT(), llvm::X86TargetLowering::getWidenVectorType(), getWidenVectorType(), isAllocatableRegister(), isConvertLegal(), isOperationLegal(), isOperationLegalOrCustom(), isTruncStoreLegal(), MeetsMaxMemopRequirement(), PerformExtendCombine(), and PerformSELECTCombine().
| const ValueTypeActionImpl& llvm::TargetLowering::getValueTypeActions | ( | ) | const [inline] |
Definition at line 212 of file TargetLowering.h.
| LegalizeAction llvm::TargetLowering::getTypeAction | ( | LLVMContext & | Context, | |
| EVT | VT | |||
| ) | const [inline] |
getTypeAction - Return how we should legalize values of this type, either it is already legal (return 'Legal') or we need to promote it to a larger type (return 'Promote'), or we need to expand it into multiple registers of smaller integer type (return 'Expand'). 'Custom' is not an option.
Definition at line 220 of file TargetLowering.h.
References llvm::TargetLowering::ValueTypeActionImpl::getTypeAction().
Referenced by getTypeToExpandTo(), getTypeToTransformTo(), and OptimizeNoopCopyExpression().
| EVT llvm::TargetLowering::getTypeToTransformTo | ( | LLVMContext & | Context, | |
| EVT | VT | |||
| ) | const [inline] |
getTypeToTransformTo - For types supported by the target, this is an identity function. For types that must be promoted to larger types, this returns the larger type to promote to. For integer types that are larger than the largest integer register, this contains one step in the expansion to get to the smaller register. For illegal floating point types, this returns the integer type to transform to.
Definition at line 230 of file TargetLowering.h.
References llvm::array_lengthof(), llvm::EVT::getIntegerVT(), llvm::EVT::getPow2VectorType(), llvm::EVT::getRoundIntegerType(), llvm::EVT::getSimpleVT(), llvm::EVT::getSizeInBits(), getTypeAction(), llvm::EVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), llvm::EVT::getVectorVT(), llvm::EVT::isInteger(), llvm::EVT::isSimple(), llvm::EVT::isVector(), llvm::MVT::Other, Promote, and llvm::MVT::SimpleTy.
Referenced by getMemcpyLoadsAndStores(), llvm::FastISel::getRegForValue(), getRegisterType(), getTypeToExpandTo(), and OptimizeNoopCopyExpression().
| EVT llvm::TargetLowering::getTypeToExpandTo | ( | LLVMContext & | Context, | |
| EVT | VT | |||
| ) | const [inline] |
getTypeToExpandTo - For types supported by the target, this is an identity function. For types that must be expanded (i.e. integer types that are larger than the largest integer register or illegal floating point types), this returns the largest legal type it will be expanded to.
Definition at line 270 of file TargetLowering.h.
References Expand, getTypeAction(), getTypeToTransformTo(), llvm::EVT::isVector(), and Legal.
| unsigned TargetLowering::getVectorTypeBreakdown | ( | LLVMContext & | Context, | |
| EVT | VT, | |||
| EVT & | IntermediateVT, | |||
| unsigned & | NumIntermediates, | |||
| EVT & | RegisterVT | |||
| ) | const |
getVectorTypeBreakdown - Vector types are broken down into some number of legal first class types. For example, EVT::v8f32 maps to 2 EVT::v4f32 with Altivec or SSE1, or 8 promoted EVT::f64 values with the X86 FP stack. Similarly, EVT::v2i64 turns into 4 EVT::i32 values with both PPC and X86.
This method returns the number of registers needed, and the VT for each register. It also returns the VT and quantity of the intermediate values before they are promoted/expanded.
getVectorTypeBreakdown - Vector types are broken down into some number of legal first class types. For example, MVT::v8f32 maps to 2 MVT::v4f32 with Altivec or SSE1, or 8 promoted MVT::f64 values with the X86 FP stack. Similarly, MVT::v2i64 turns into 4 MVT::i32 values with both PPC and X86.
This method returns the number of registers needed, and the VT for each register. It also returns the VT and quantity of the intermediate values before they are promoted/expanded.
Definition at line 726 of file TargetLowering.cpp.
References llvm::EVT::bitsLT(), getRegisterType(), llvm::EVT::getSizeInBits(), llvm::EVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), llvm::EVT::getVectorVT(), llvm::isPowerOf2_32(), and isTypeLegal().
Referenced by getCopyFromParts(), getCopyToParts(), getNumRegisters(), and getRegisterType().
| virtual bool llvm::TargetLowering::getTgtMemIntrinsic | ( | IntrinsicInfo & | Info, | |
| CallInst & | I, | |||
| unsigned | Intrinsic | |||
| ) | [inline, virtual] |
Definition at line 316 of file TargetLowering.h.
getWidenVectorType: given a vector type, returns the type to widen to (e.g., v7i8 to v8i8). If the vector type is legal, it returns itself. If there is no vector type that we want to widen to, returns MVT::Other When and were to widen is target dependent based on the cost of scalarizing vs using the wider vector type.
getWidenVectorType: given a vector type, returns the type to widen to (e.g., v7i8 to v8i8). If the vector type is legal, it returns itself. If there is no vector type that we want to widen to, returns MVT::Other When and where to widen is target dependent based on the cost of scalarizing vs using the wider vector type.
Reimplemented in llvm::X86TargetLowering.
Definition at line 777 of file TargetLowering.cpp.
References isTypeLegal(), llvm::EVT::isVector(), and llvm::MVT::Other.
| legal_fpimm_iterator llvm::TargetLowering::legal_fpimm_begin | ( | ) | const [inline] |
Definition at line 329 of file TargetLowering.h.
| legal_fpimm_iterator llvm::TargetLowering::legal_fpimm_end | ( | ) | const [inline] |
Definition at line 332 of file TargetLowering.h.
| virtual bool llvm::TargetLowering::isShuffleMaskLegal | ( | const SmallVectorImpl< int > & | Mask, | |
| EVT | VT | |||
| ) | const [inline, virtual] |
isShuffleMaskLegal - Targets can use this to indicate that they only support *some* VECTOR_SHUFFLE operations, those with specific masks. By default, if a target supports the VECTOR_SHUFFLE node, all mask values are assumed to be legal.
Reimplemented in llvm::ARMTargetLowering, and llvm::X86TargetLowering.
Definition at line 340 of file TargetLowering.h.
| virtual bool llvm::TargetLowering::isVectorClearMaskLegal | ( | const SmallVectorImpl< int > & | Mask, | |
| EVT | VT | |||
| ) | const [inline, virtual] |
isVectorClearMaskLegal - Similar to isShuffleMaskLegal. This is used by Targets can use this to indicate if there is a suitable VECTOR_SHUFFLE that can be used to replace a VAND with a constant pool entry.
Reimplemented in llvm::X86TargetLowering.
Definition at line 349 of file TargetLowering.h.
| LegalizeAction llvm::TargetLowering::getOperationAction | ( | unsigned | Op, | |
| EVT | VT | |||
| ) | const [inline] |
getOperationAction - Return how this operation should be treated: either it is legal, needs to be promoted to a larger size, needs to be expanded to some other code sequence, or the target has a custom expander for it.
Definition at line 358 of file TargetLowering.h.
References llvm::array_lengthof(), Expand, llvm::EVT::getSimpleVT(), llvm::EVT::isExtended(), and llvm::MVT::SimpleTy.
Referenced by getTypeToPromoteTo(), isOperationLegal(), and isOperationLegalOrCustom().
isOperationLegalOrCustom - Return true if the specified operation is legal on this target or can be made legal with custom lowering. This is used to help guide high-level lowering decisions.
Definition at line 372 of file TargetLowering.h.
References Custom, getOperationAction(), isTypeLegal(), Legal, and llvm::MVT::Other.
Referenced by areJTsAllowed(), BuildSDIV(), and BuildUDIV().
isOperationLegal - Return true if the specified operation is legal on this target.
Definition at line 380 of file TargetLowering.h.
References getOperationAction(), isTypeLegal(), Legal, and llvm::MVT::Other.
Referenced by SimplifyDemandedBits(), and SimplifySetCC().
| LegalizeAction llvm::TargetLowering::getLoadExtAction | ( | unsigned | LType, | |
| EVT | VT | |||
| ) | const [inline] |
getLoadExtAction - Return how this load with extension should be treated: either it is legal, needs to be promoted to a larger size, needs to be expanded to some other code sequence, or the target has a custom expander for it.
Definition at line 389 of file TargetLowering.h.
References llvm::array_lengthof(), llvm::EVT::getSimpleVT(), and llvm::MVT::SimpleTy.
Referenced by isLoadExtLegal().
isLoadExtLegal - Return true if the specified load with extension is legal on this target.
Definition at line 399 of file TargetLowering.h.
References Custom, getLoadExtAction(), llvm::EVT::isSimple(), and Legal.
Referenced by ExpandConstantFP().
| LegalizeAction llvm::TargetLowering::getTruncStoreAction | ( | EVT | ValVT, | |
| EVT | MemVT | |||
| ) | const [inline] |
getTruncStoreAction - Return how this store with truncation should be treated: either it is legal, needs to be promoted to a larger size, needs to be expanded to some other code sequence, or the target has a custom expander for it.
Definition at line 409 of file TargetLowering.h.
References llvm::array_lengthof(), llvm::EVT::getSimpleVT(), and llvm::MVT::SimpleTy.
Referenced by isTruncStoreLegal().
isTruncStoreLegal - Return true if the specified store with truncation is legal on this target.
Definition at line 422 of file TargetLowering.h.
References Custom, getTruncStoreAction(), llvm::EVT::isSimple(), isTypeLegal(), and Legal.
| LegalizeAction llvm::TargetLowering::getIndexedLoadAction | ( | unsigned | IdxMode, | |
| EVT | VT | |||
| ) | const [inline] |
getIndexedLoadAction - Return how the indexed load should be treated: either it is legal, needs to be promoted to a larger size, needs to be expanded to some other code sequence, or the target has a custom expander for it.
Definition at line 433 of file TargetLowering.h.
References llvm::array_lengthof(), llvm::EVT::getSimpleVT(), llvm::MVT::LAST_VALUETYPE, and llvm::MVT::SimpleTy.
Referenced by isIndexedLoadLegal().
isIndexedLoadLegal - Return true if the specified indexed load is legal on this target.
Definition at line 443 of file TargetLowering.h.
References Custom, getIndexedLoadAction(), llvm::EVT::isSimple(), and Legal.
| LegalizeAction llvm::TargetLowering::getIndexedStoreAction | ( | unsigned | IdxMode, | |
| EVT | VT | |||
| ) | const [inline] |
getIndexedStoreAction - Return how the indexed store should be treated: either it is legal, needs to be promoted to a larger size, needs to be expanded to some other code sequence, or the target has a custom expander for it.
Definition at line 454 of file TargetLowering.h.
References llvm::array_lengthof(), llvm::EVT::getSimpleVT(), llvm::MVT::LAST_VALUETYPE, and llvm::MVT::SimpleTy.
Referenced by isIndexedStoreLegal().
isIndexedStoreLegal - Return true if the specified indexed load is legal on this target.
Definition at line 464 of file TargetLowering.h.
References Custom, getIndexedStoreAction(), llvm::EVT::isSimple(), and Legal.
| LegalizeAction llvm::TargetLowering::getConvertAction | ( | EVT | FromVT, | |
| EVT | ToVT | |||
| ) | const [inline] |
getConvertAction - Return how the conversion should be treated: either it is legal, needs to be promoted to a larger size, needs to be expanded to some other code sequence, or the target has a custom expander for it.
Definition at line 475 of file TargetLowering.h.
References llvm::array_lengthof(), llvm::EVT::getSimpleVT(), and llvm::MVT::SimpleTy.
Referenced by isConvertLegal().
isConvertLegal - Return true if the specified conversion is legal on this target.
Definition at line 487 of file TargetLowering.h.
References Custom, getConvertAction(), isTypeLegal(), and Legal.
| LegalizeAction llvm::TargetLowering::getCondCodeAction | ( | ISD::CondCode | CC, | |
| EVT | VT | |||
| ) | const [inline] |
getCondCodeAction - Return how the condition code should be treated: either it is legal, needs to be expanded to some other code sequence, or the target has a custom expander for it.
Definition at line 497 of file TargetLowering.h.
References Action, llvm::array_lengthof(), llvm::EVT::getSimpleVT(), Promote, and llvm::MVT::SimpleTy.
Referenced by isCondCodeLegal(), and SimplifySetCC().
| bool llvm::TargetLowering::isCondCodeLegal | ( | ISD::CondCode | CC, | |
| EVT | VT | |||
| ) | const [inline] |
isCondCodeLegal - Return true if the specified condition code is legal on this target.
Definition at line 509 of file TargetLowering.h.
References Custom, getCondCodeAction(), and Legal.
Referenced by combineSelectAndUse().
getTypeToPromoteTo - If the action for this operation is to promote, this method returns the ValueType to promote to.
Definition at line 517 of file TargetLowering.h.
References getOperationAction(), llvm::EVT::getSimpleVT(), llvm::EVT::isFloatingPoint(), llvm::EVT::isInteger(), isTypeLegal(), llvm::MVT::isVoid, Promote, and llvm::MVT::SimpleTy.
| EVT llvm::TargetLowering::getValueType | ( | const Type * | Ty, | |
| bool | AllowUnknown = false | |||
| ) | const [inline] |
getValueType - Return the EVT corresponding to this LLVM type. This is fixed by the LLVM operations except for the pointer size. If AllowUnknown is true, this will return MVT::Other for types with no EVT counterpart (e.g. structs), otherwise it will assert.
Definition at line 544 of file TargetLowering.h.
References llvm::EVT::getEVT(), llvm::MVT::iPTR, and VT.
Referenced by ComputeValueVTs(), llvm::SDISelAsmOperandInfo::getCallOperandValEVT(), llvm::FastISel::getRegForValue(), llvm::SelectionDAGLowering::getValue(), llvm::ARMTargetLowering::isLegalAddressingMode(), LowerCallTo(), OptimizeNoopCopyExpression(), and llvm::FastISel::SelectOperator().
getByValTypeAlignment - Return the desired alignment for ByVal aggregate function arguments in the caller parameter area. This is the actual alignment, not its logarithm.
getByValTypeAlignment - Return the desired alignment for ByVal aggregate function arguments in the caller parameter area. This is the actual alignment, not its logarithm.
Reimplemented in llvm::PPCTargetLowering, and llvm::X86TargetLowering.
Definition at line 789 of file TargetLowering.cpp.
References llvm::TargetData::getCallFrameTypeAlignment().
Referenced by LowerCallTo().
getRegisterType - Return the type of registers that this ValueType will eventually require.
Definition at line 556 of file TargetLowering.h.
References llvm::array_lengthof(), and llvm::MVT::SimpleTy.
Referenced by llvm::FunctionLoweringInfo::CreateRegForValue(), ExpandUnalignedLoad(), ExpandUnalignedStore(), getNumRegisters(), getRegisterType(), getVectorTypeBreakdown(), getVectorTypeBreakdownMVT(), LowerCallTo(), and llvm::RegsForValue::RegsForValue().
| EVT llvm::TargetLowering::getRegisterType | ( | LLVMContext & | Context, | |
| EVT | VT | |||
| ) | const [inline] |
getRegisterType - Return the type of registers that this ValueType will eventually require.
Definition at line 563 of file TargetLowering.h.
References llvm::array_lengthof(), getRegisterType(), llvm::EVT::getSimpleVT(), getTypeToTransformTo(), getVectorTypeBreakdown(), llvm::EVT::isInteger(), llvm::EVT::isSimple(), llvm::EVT::isVector(), llvm::MVT::Other, and llvm::MVT::SimpleTy.
| unsigned llvm::TargetLowering::getNumRegisters | ( | LLVMContext & | Context, | |
| EVT | VT | |||
| ) | const [inline] |
getNumRegisters - Return the number of registers that this ValueType will eventually require. This is one for any types promoted to live in larger registers, but may be more than one for types (like i64) that are split into pieces. For types like i140, which are first promoted then expanded, it is the number of registers needed to hold all the bits of the original type. For an i140 on a 32 bit machine this means 5 registers.
Definition at line 589 of file TargetLowering.h.
References llvm::array_lengthof(), getRegisterType(), llvm::EVT::getSimpleVT(), llvm::EVT::getSizeInBits(), getVectorTypeBreakdown(), llvm::EVT::isInteger(), llvm::EVT::isSimple(), llvm::EVT::isVector(), and llvm::MVT::SimpleTy.
Referenced by llvm::RegsForValue::AddInlineAsmOperands(), llvm::FunctionLoweringInfo::CreateRegForValue(), llvm::RegsForValue::getCopyFromRegs(), llvm::RegsForValue::getCopyToRegs(), llvm::SelectionDAGLowering::GetRegistersForValue(), LowerCallTo(), llvm::RegsForValue::RegsForValue(), and llvm::FunctionLoweringInfo::set().
ShouldShrinkFPConstant - If true, then instruction selection should seek to shrink the FP constant of the specified type to a smaller type in order to save space and / or reduce runtime.
Reimplemented in llvm::X86TargetLowering.
Definition at line 612 of file TargetLowering.h.
Referenced by ExpandConstantFP().
| bool llvm::TargetLowering::hasTargetDAGCombine | ( | ISD::NodeType | NT | ) | const [inline] |
hasTargetDAGCombine - If true, the target has custom DAG combine transformations that it can perform for the specified node.
Definition at line 616 of file TargetLowering.h.
References llvm::array_lengthof().
| unsigned llvm::TargetLowering::getMaxStoresPerMemset | ( | ) | const [inline] |
Get maximum # of store operations permitted for llvm.memset.
This function returns the maximum number of store operations permitted to replace a call to llvm.memset. The value is set by the target at the performance threshold for such a replacement.
Definition at line 625 of file TargetLowering.h.
References maxStoresPerMemset.
Referenced by getMemsetStores().
| unsigned llvm::TargetLowering::getMaxStoresPerMemcpy | ( | ) | const [inline] |
Get maximum # of store operations permitted for llvm.memcpy.
This function returns the maximum number of store operations permitted to replace a call to llvm.memcpy. The value is set by the target at the performance threshold for such a replacement.
Definition at line 631 of file TargetLowering.h.
References maxStoresPerMemcpy.
Referenced by getMemcpyLoadsAndStores().
| unsigned llvm::TargetLowering::getMaxStoresPerMemmove | ( | ) | const [inline] |
Get maximum # of store operations permitted for llvm.memmove.
This function returns the maximum number of store operations permitted to replace a call to llvm.memmove. The value is set by the target at the performance threshold for such a replacement.
Definition at line 637 of file TargetLowering.h.
References maxStoresPerMemmove.
Referenced by getMemmoveLoadsAndStores().
Determine if the target supports unaligned memory accesses.
This function returns true if the target allows unaligned memory accesses. of the specified type. This is used, for example, in situations where an array copy/move/set is converted to a sequence of store operations. It's use helps to ensure that such replacements don't generate code that causes an alignment error (trap) on the target machine.
Reimplemented in llvm::ARMTargetLowering, and llvm::X86TargetLowering.
Definition at line 645 of file TargetLowering.h.
Referenced by MeetsMaxMemopRequirement().
| bool llvm::TargetLowering::shouldOptimizeCodePlacement | ( | ) | const [inline] |
Determine if the target should perform code placement optimization.
This function returns true if the target would benefit from code placement optimization.
Definition at line 652 of file TargetLowering.h.
References benefitFromCodePlacementOpt.
| virtual EVT llvm::TargetLowering::getOptimalMemOpType | ( | uint64_t | Size, | |
| unsigned | Align, | |||
| bool | isSrcConst, | |||
| bool | isSrcStr, | |||
| SelectionDAG & | DAG | |||
| ) | const [inline, virtual] |
getOptimalMemOpType - Returns the target specific optimal type for load and store operations as a result of memset, memcpy, and memmove lowering. It returns EVT::iAny if SelectionDAG should be responsible for determining it.
Reimplemented in llvm::PPCTargetLowering, and llvm::X86TargetLowering.
Definition at line 660 of file TargetLowering.h.
References llvm::MVT::iAny.
Referenced by MeetsMaxMemopRequirement().
| bool llvm::TargetLowering::usesUnderscoreSetJmp | ( | ) | const [inline] |
usesUnderscoreSetJmp - Determine if we should use _setjmp or setjmp to implement llvm.setjmp.
Definition at line 668 of file TargetLowering.h.
| bool llvm::TargetLowering::usesUnderscoreLongJmp | ( | ) | const [inline] |
usesUnderscoreLongJmp - Determine if we should use _longjmp or longjmp to implement llvm.longjmp.
Definition at line 674 of file TargetLowering.h.
| unsigned llvm::TargetLowering::getStackPointerRegisterToSaveRestore | ( | ) | const [inline] |
getStackPointerRegisterToSaveRestore - If a physical register, this specifies the register that llvm.savestack/llvm.restorestack should save and restore.
Definition at line 681 of file TargetLowering.h.
Referenced by isSchedulingBoundary().
| unsigned llvm::TargetLowering::getExceptionAddressRegister | ( | ) | const [inline] |
getExceptionAddressRegister - If a physical register, this returns the register that receives the exception address on entry to a landing pad.
Definition at line 688 of file TargetLowering.h.
| unsigned llvm::TargetLowering::getExceptionSelectorRegister | ( | ) | const [inline] |
getExceptionSelectorRegister - If a physical register, this returns the register that receives the exception typeid on entry to a landing pad.
Definition at line 695 of file TargetLowering.h.
| unsigned llvm::TargetLowering::getJumpBufSize | ( | ) | const [inline] |
getJumpBufSize - returns the target's jmp_buf size in bytes (if never set, the default is 200)
Definition at line 701 of file TargetLowering.h.
| unsigned llvm::TargetLowering::getJumpBufAlignment | ( | ) | const [inline] |
getJumpBufAlignment - returns the target's jmp_buf alignment in bytes (if never set, the default is 0)
Definition at line 707 of file TargetLowering.h.
| unsigned llvm::TargetLowering::getIfCvtBlockSizeLimit | ( | ) | const [inline] |
getIfCvtBlockLimit - returns the target specific if-conversion block size limit. Any block whose size is greater should not be predicated.
Definition at line 713 of file TargetLowering.h.
| unsigned llvm::TargetLowering::getIfCvtDupBlockSizeLimit | ( | ) | const [inline] |
getIfCvtDupBlockLimit - returns the target specific size limit for a block to be considered for duplication. Any block whose size is greater should not be duplicated to facilitate its predication.
Definition at line 720 of file TargetLowering.h.
| unsigned llvm::TargetLowering::getPrefLoopAlignment | ( | ) | const [inline] |
getPrefLoopAlignment - return the preferred loop alignment.
Definition at line 726 of file TargetLowering.h.
| virtual bool llvm::TargetLowering::getPreIndexedAddressParts | ( | SDNode * | N, | |
| SDValue & | Base, | |||
| SDValue & | Offset, | |||
| ISD::MemIndexedMode & | AM, | |||
| SelectionDAG & | DAG | |||
| ) | const [inline, virtual] |
getPreIndexedAddressParts - returns true by value, base pointer and offset pointer and addressing mode by reference if the node's address can be legally represented as pre-indexed load / store address.
Reimplemented in llvm::ARMTargetLowering, and llvm::PPCTargetLowering.
Definition at line 733 of file TargetLowering.h.
| virtual bool llvm::TargetLowering::getPostIndexedAddressParts | ( | SDNode * | N, | |
| SDNode * | Op, | |||
| SDValue & | Base, | |||
| SDValue & | Offset, | |||
| ISD::MemIndexedMode & | AM, | |||
| SelectionDAG & | DAG | |||
| ) | const [inline, virtual] |
getPostIndexedAddressParts - returns true by value, base pointer and offset pointer and addressing mode by reference if this node can be combined with a load / store to form a post-indexed load / store.
Reimplemented in llvm::ARMTargetLowering.
Definition at line 743 of file TargetLowering.h.
| SDValue TargetLowering::getPICJumpTableRelocBase | ( | SDValue | Table, | |
| SelectionDAG & | DAG | |||
| ) | const [virtual] |
getPICJumpTableRelocaBase - Returns relocation base for the given PIC jumptable.
Reimplemented in llvm::X86TargetLowering.
Definition at line 793 of file TargetLowering.cpp.
References llvm::SelectionDAG::getGLOBAL_OFFSET_TABLE(), getPointerTy(), and usesGlobalOffsetTable().
| bool TargetLowering::isOffsetFoldingLegal | ( | const GlobalAddressSDNode * | GA | ) | const [virtual] |
isOffsetFoldingLegal - Return true if folding a constant offset with the given GlobalAddress is legal. It is frequently not legal in PIC relocation models.
Reimplemented in llvm::AlphaTargetLowering, llvm::BlackfinTargetLowering, llvm::SPUTargetLowering, llvm::PPCTargetLowering, and llvm::SparcTargetLowering.
Definition at line 801 of file TargetLowering.cpp.
References llvm::Reloc::DynamicNoPIC, llvm::GlobalAddressSDNode::getGlobal(), getTargetMachine(), llvm::GlobalValue::isDeclaration(), llvm::GlobalValue::isWeakForLinker(), and llvm::Reloc::Static.
| virtual unsigned llvm::TargetLowering::getFunctionAlignment | ( | const Function * | ) | const [pure virtual] |
getFunctionAlignment - Return the Log2 alignment of this function.
Implemented in llvm::AlphaTargetLowering, llvm::ARMTargetLowering, llvm::BlackfinTargetLowering, llvm::SPUTargetLowering, llvm::MipsTargetLowering, llvm::MSP430TargetLowering, llvm::PIC16TargetLowering, llvm::PPCTargetLowering, llvm::SparcTargetLowering, llvm::SystemZTargetLowering, llvm::X86TargetLowering, and llvm::XCoreTargetLowering.
Referenced by llvm::MachineFunction::MachineFunction().
| bool TargetLowering::SimplifyDemandedBits | ( | SDValue | Op, | |
| const APInt & | DemandedMask, | |||
| APInt & | KnownZero, | |||
| APInt & | KnownOne, | |||
| TargetLoweringOpt & | TLO, | |||
| unsigned | Depth = 0 | |||
| ) | const |
SimplifyDemandedBits - Look at Op. At this point, we know that only the DemandedMask bits of the result of Op are ever used downstream. If we can use this information to simplify Op, create a new simplified DAG node and return true, returning the original and new nodes in Old and New. Otherwise, analyze the expression and return a mask of KnownOne and KnownZero bits for the expression (used to simplify the caller). The KnownZero/One bits may only be accurate for those bits in the DemandedMask.
SimplifyDemandedBits - Look at Op. At this point, we know that only the DemandedMask bits of the result of Op are ever used downstream. If we can use this information to simplify Op, create a new simplified DAG node and return true, returning the original and new nodes in Old and New. Otherwise, analyze the expression and return a mask of KnownOne and KnownZero bits for the expression (used to simplify the caller). The KnownZero/One bits may only be accurate for those bits in the DemandedMask.
Definition at line 908 of file TargetLowering.cpp.
References llvm::ISD::ADD, llvm::ISD::AND, llvm::ISD::ANY_EXTEND, llvm::ISD::AssertZext, llvm::ISD::BIT_CONVERT, llvm::CallingConv::C, llvm::TargetLowering::TargetLoweringOpt::CombineTo(), llvm::SelectionDAG::ComputeMaskedBits(), llvm::ISD::Constant, llvm::TargetLowering::TargetLoweringOpt::DAG, llvm::ISD::FGETSIGN, llvm::APInt::getAllOnesValue(), llvm::APInt::getBitsSet(), llvm::APInt::getBitWidth(), llvm::SelectionDAG::getConstant(), llvm::SDValue::getDebugLoc(), llvm::APInt::getHighBitsSet(), llvm::APInt::getLowBitsSet(), llvm::SDValue::getNode(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), getShiftAmountTy(), llvm::APInt::getSignBit(), llvm::EVT::getSizeInBits(), llvm::SelectionDAG::getUNDEF(), llvm::SDValue::getValueSizeInBits(), llvm::SDValue::getValueType(), llvm::SDNode::hasOneUse(), llvm::APInt::intersects(), llvm::APInt::isAllOnesValue(), llvm::MVT::isFloatingPoint(), isOperationLegal(), llvm::MVT::isVector(), llvm::APInt::lshr(), llvm::ISD::MUL, llvm::ISD::OR, llvm::ISD::SELECT, llvm::ISD::SELECT_CC, llvm::ISD::SHL, llvm::TargetLowering::TargetLoweringOpt::ShrinkDemandedConstant(), llvm::ISD::SIGN_EXTEND, llvm::ISD::SIGN_EXTEND_INREG, llvm::ISD::SRA, llvm::ISD::SRL, llvm::ISD::SUB, llvm::APInt::trunc(), llvm::ISD::TRUNCATE, llvm::ISD::UNDEF, VT, llvm::ISD::XOR, llvm::ISD::ZERO_EXTEND, and llvm::APInt::zext().
Referenced by PerformBTCombine().
| void TargetLowering::computeMaskedBitsForTargetNode | ( | const SDValue | Op, | |
| const APInt & | Mask, | |||
| APInt & | KnownZero, | |||
| APInt & | KnownOne, | |||
| const SelectionDAG & | DAG, | |||
| unsigned | Depth = 0 | |||
| ) | const [virtual] |
computeMaskedBitsForTargetNode - Determine which of the bits specified in Mask are known to be either zero or one and return them in the KnownZero/KnownOne bitsets.
computeMaskedBitsForTargetNode - Determine which of the bits specified in Mask are known to be either zero or one and return them in the KnownZero/KnownOne bitsets.
Reimplemented in llvm::ARMTargetLowering, llvm::SPUTargetLowering, llvm::PPCTargetLowering, llvm::SparcTargetLowering, and llvm::X86TargetLowering.
Definition at line 1501 of file TargetLowering.cpp.
References llvm::ISD::BUILTIN_OP_END, llvm::APInt::getBitWidth(), llvm::SDValue::getOpcode(), llvm::ISD::INTRINSIC_VOID, llvm::ISD::INTRINSIC_W_CHAIN, and llvm::ISD::INTRINSIC_WO_CHAIN.
Referenced by llvm::SelectionDAG::ComputeMaskedBits().
| unsigned TargetLowering::ComputeNumSignBitsForTargetNode | ( | SDValue | Op, | |
| unsigned | Depth = 0 | |||
| ) | const [virtual] |
ComputeNumSignBitsForTargetNode - This method can be implemented by targets that want to expose additional information about sign bits to the DAG Combiner.
ComputeNumSignBitsForTargetNode - This method can be implemented by targets that want to expose additional information about sign bits to the DAG Combiner.
Reimplemented in llvm::SPUTargetLowering.
Definition at line 1519 of file TargetLowering.cpp.
References llvm::ISD::BUILTIN_OP_END, llvm::SDValue::getOpcode(), llvm::ISD::INTRINSIC_VOID, llvm::ISD::INTRINSIC_W_CHAIN, and llvm::ISD::INTRINSIC_WO_CHAIN.
Referenced by llvm::SelectionDAG::ComputeNumSignBits().
| SDValue TargetLowering::SimplifySetCC | ( | EVT | VT, | |
| SDValue | N0, | |||
| SDValue | N1, | |||
| ISD::CondCode | Cond, | |||
| bool | foldBooleans, | |||
| DAGCombinerInfo & | DCI, | |||
| DebugLoc | dl | |||
| ) | const |
SimplifySetCC - Try to simplify a setcc built with the specified operands and cc. If it is unable to simplify it, return a null SDValue.
SimplifySetCC - Try to simplify a setcc built with the specified operands and cc. If it is unable to simplify it, return a null SDValue.
Definition at line 1567 of file TargetLowering.cpp.
References llvm::ISD::ADD, llvm::TargetLowering::DAGCombinerInfo::AddToWorklist(), llvm::ISD::AND, llvm::ISD::Constant, Context, llvm::ISD::CTLZ, llvm::TargetLowering::DAGCombinerInfo::DAG, DAG, llvm::SelectionDAG::FoldSetCC(), llvm::MemSDNode::getAlignment(), llvm::APInt::getAllOnesValue(), llvm::LoadSDNode::getBasePtr(), llvm::MemSDNode::getChain(), getCondCodeAction(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getContext(), llvm::LoadSDNode::getExtensionType(), llvm::APInt::getHighBitsSet(), llvm::EVT::getIntegerVT(), llvm::SelectionDAG::getLoad(), llvm::APInt::getLowBitsSet(), llvm::APInt::getMaxValue(), llvm::MemSDNode::getMemoryVT(), llvm::APInt::getMinValue(), llvm::SelectionDAG::getNode(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNOT(), llvm::SDValue::getOpcode(), llvm::SDNode::getOperand(), llvm::SDValue::getOperand(), getPointerTy(), llvm::SelectionDAG::getSetCC(), llvm::ISD::getSetCCInverse(), llvm::ISD::getSetCCSwappedOperands(), getShiftAmountTy(), llvm::APInt::getSignedMaxValue(), llvm::APInt::getSignedMinValue(), llvm::EVT::getSizeInBits(), llvm::MemSDNode::getSrcValue(), llvm::MemSDNode::getSrcValueOffset(), llvm::SelectionDAG::getUNDEF(), llvm::ISD::getUnorderedFlavor(), llvm::SDValue::getValueSizeInBits(), llvm::SDValue::getValueType(), llvm::SDNode::hasOneUse(), llvm::MVT::i1, Imm, llvm::TargetLowering::DAGCombinerInfo::isBeforeLegalize(), llvm::TargetLowering::DAGCombinerInfo::isBeforeLegalizeOps(), llvm::TargetLowering::DAGCombinerInfo::isCalledByLegalizer(), llvm::SelectionDAG::isCommutativeBinOp(), llvm::EVT::isInteger(), llvm::TargetData::isLittleEndian(), isOperationLegal(), llvm::isPowerOf2_64(), llvm::EVT::isRound(), llvm::ISD::isSignedIntSetCC(), llvm::ISD::isTrueWhenEqual(), llvm::LSBaseSDNode::isUnindexed(), llvm::MemSDNode::isVolatile(), Legal, llvm_unreachable, llvm::Log2_32(), llvm::Log2_64(), llvm::SelectionDAG::MaskedValueIsZero(), llvm::MinAlign(), llvm::ISD::NON_EXTLOAD, llvm::SystemZCC::O, llvm::ISD::OR, llvm::ISD::SETCC, 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::SETTRUE, llvm::ISD::SETTRUE2, llvm::ISD::SETUGE, llvm::ISD::SETUGT, llvm::ISD::SETULE, llvm::ISD::SETULT, llvm::ISD::SETUO, llvm::ISD::SHL, llvm::ISD::SIGN_EXTEND_INREG, llvm::ISD::SRL, llvm::ISD::SUB, llvm::ISD::SUBC, Val, ValueHasExactlyOneBitSet(), llvm::ISD::XOR, and llvm::ISD::ZERO_EXTEND.
| bool TargetLowering::isGAPlusOffset | ( | SDNode * | N, | |
| GlobalValue *& | GA, | |||
| int64_t & | Offset | |||
| ) | const [virtual] |
isGAPlusOffset - Returns true (and the GlobalValue and the offset) if the node is a GlobalAddress + offset.
isGAPlusOffset - Returns true (and the GlobalValue and the offset) if the node is a GlobalAddress + offset.
Reimplemented in llvm::X86TargetLowering.
Definition at line 2121 of file TargetLowering.cpp.
References llvm::ISD::ADD, llvm::dyn_cast(), llvm::GlobalAddressSDNode::getGlobal(), llvm::SDValue::getNode(), llvm::GlobalAddressSDNode::getOffset(), llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), llvm::ConstantSDNode::getSExtValue(), and V.
Referenced by isBaseAlignmentOfN(), isConsecutiveLoad(), and llvm::X86TargetLowering::isGAPlusOffset().
| bool TargetLowering::isConsecutiveLoad | ( | LoadSDNode * | LD, | |
| LoadSDNode * | Base, | |||
| unsigned | Bytes, | |||
| int | Dist, | |||
| const MachineFrameInfo * | MFI | |||
| ) | const |
isConsecutiveLoad - Return true if LD is loading 'Bytes' bytes from a location that is 'Dist' units away from the location that the 'Base' load is loading from.
isConsecutiveLoad - Return true if LD is loading 'Bytes' bytes from a location that is 'Dist' units away from the location that the 'Base' load is loading from.
Definition at line 2154 of file TargetLowering.cpp.
References llvm::ISD::ADD, llvm::dyn_cast(), FI, llvm::ISD::FrameIndex, llvm::X86II::FS, llvm::MemSDNode::getChain(), llvm::SDValue::getNode(), llvm::MachineFrameInfo::getObjectOffset(), llvm::MachineFrameInfo::getObjectSize(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::SDNode::getOperand(), llvm::ConstantSDNode::getSExtValue(), llvm::EVT::getSizeInBits(), llvm::SDNode::getValueType(), isGAPlusOffset(), V, and VT.
Referenced by EltsFromConsecutiveLoads().
| SDValue TargetLowering::PerformDAGCombine | ( | SDNode * | N, | |
| DAGCombinerInfo & | DCI | |||
| ) | const [virtual] |
PerformDAGCombine - This method will be invoked for all target nodes and for any target-independent nodes that the target has registered with invoke it for.
The semantics are as follows: Return Value: SDValue.Val == 0 - No change was made SDValue.Val == N - N was replaced, is dead, and is already handled. otherwise - N should be replaced by the returned Operand.
In addition, methods provided by DAGCombinerInfo may be used to perform more complex transformations.
Reimplemented in llvm::ARMTargetLowering, llvm::SPUTargetLowering, llvm::PIC16TargetLowering, llvm::PPCTargetLowering, and llvm::X86TargetLowering.
Definition at line 2194 of file TargetLowering.cpp.
| void llvm::TargetLowering::setUsesGlobalOffsetTable | ( | bool | V | ) | [inline, protected] |
setUsesGlobalOffsetTable - Specify that this target does or doesn't use a GOT for PC-relative code.
Definition at line 890 of file TargetLowering.h.
Referenced by llvm::AlphaTargetLowering::AlphaTargetLowering(), and llvm::MipsTargetLowering::MipsTargetLowering().
| void llvm::TargetLowering::setShiftAmountType | ( | MVT | VT | ) | [inline, protected] |
setShiftAmountType - Describe the type that should be used for shift amounts. This type defaults to the pointer type.
Definition at line 894 of file TargetLowering.h.
Referenced by llvm::AlphaTargetLowering::AlphaTargetLowering(), llvm::BlackfinTargetLowering::BlackfinTargetLowering(), llvm::MSP430TargetLowering::MSP430TargetLowering(), llvm::PIC16TargetLowering::PIC16TargetLowering(), llvm::PPCTargetLowering::PPCTargetLowering(), llvm::SPUTargetLowering::SPUTargetLowering(), llvm::SystemZTargetLowering::SystemZTargetLowering(), llvm::X86TargetLowering::X86TargetLowering(), and llvm::XCoreTargetLowering::XCoreTargetLowering().
| void llvm::TargetLowering::setBooleanContents | ( | BooleanContent | Ty | ) | [inline, protected] |
setBooleanContents - Specify how the target extends the result of a boolean value from i1 to a wider type. See getBooleanContents.
Definition at line 898 of file TargetLowering.h.
Referenced by llvm::AlphaTargetLowering::AlphaTargetLowering(), llvm::BlackfinTargetLowering::BlackfinTargetLowering(), llvm::MipsTargetLowering::MipsTargetLowering(), llvm::MSP430TargetLowering::MSP430TargetLowering(), llvm::PPCTargetLowering::PPCTargetLowering(), llvm::SPUTargetLowering::SPUTargetLowering(), llvm::SystemZTargetLowering::SystemZTargetLowering(), llvm::X86TargetLowering::X86TargetLowering(), and llvm::XCoreTargetLowering::XCoreTargetLowering().
| void llvm::TargetLowering::setSchedulingPreference | ( | SchedPreference | Pref | ) | [inline, protected] |
setSchedulingPreference - Specify the target scheduling preference.
Definition at line 901 of file TargetLowering.h.
Referenced by llvm::ARMTargetLowering::ARMTargetLowering(), llvm::MSP430TargetLowering::MSP430TargetLowering(), llvm::SPUTargetLowering::SPUTargetLowering(), llvm::SystemZTargetLowering::SystemZTargetLowering(), llvm::X86TargetLowering::X86TargetLowering(), and llvm::XCoreTargetLowering::XCoreTargetLowering().
| void llvm::TargetLowering::setUseUnderscoreSetJmp | ( | bool | Val | ) | [inline, protected] |
setUseUnderscoreSetJmp - Indicate whether this target prefers to use _setjmp to implement llvm.setjmp or the non _ version. Defaults to false.
Definition at line 908 of file TargetLowering.h.
Referenced by llvm::PPCTargetLowering::PPCTargetLowering(), llvm::SPUTargetLowering::SPUTargetLowering(), and llvm::X86TargetLowering::X86TargetLowering().
| void llvm::TargetLowering::setUseUnderscoreLongJmp | ( | bool | Val | ) | [inline, protected] |
setUseUnderscoreLongJmp - Indicate whether this target prefers to use _longjmp to implement llvm.longjmp or the non _ version. Defaults to false.
Definition at line 915 of file TargetLowering.h.
Referenced by llvm::PPCTargetLowering::PPCTargetLowering(), llvm::SPUTargetLowering::SPUTargetLowering(), and llvm::X86TargetLowering::X86TargetLowering().
| void llvm::TargetLowering::setStackPointerRegisterToSaveRestore | ( | unsigned | R | ) | [inline, protected] |
setStackPointerRegisterToSaveRestore - If set to a physical register, this specifies the register that llvm.savestack/llvm.restorestack should save and restore.
Definition at line 922 of file TargetLowering.h.
Referenced by llvm::AlphaTargetLowering::AlphaTargetLowering(), llvm::ARMTargetLowering::ARMTargetLowering(), llvm::BlackfinTargetLowering::BlackfinTargetLowering(), llvm::MipsTargetLowering::MipsTargetLowering(), llvm::MSP430TargetLowering::MSP430TargetLowering(), llvm::PPCTargetLowering::PPCTargetLowering(), llvm::SparcTargetLowering::SparcTargetLowering(), llvm::SPUTargetLowering::SPUTargetLowering(), llvm::SystemZTargetLowering::SystemZTargetLowering(), llvm::X86TargetLowering::X86TargetLowering(), and llvm::XCoreTargetLowering::XCoreTargetLowering().
| void llvm::TargetLowering::setExceptionPointerRegister | ( | unsigned | R | ) | [inline, protected] |
setExceptionPointerRegister - If set to a physical register, this sets the register that receives the exception address on entry to a landing pad.
Definition at line 929 of file TargetLowering.h.
Referenced by llvm::PPCTargetLowering::PPCTargetLowering(), and llvm::X86TargetLowering::X86TargetLowering().
| void llvm::TargetLowering::setExceptionSelectorRegister | ( | unsigned | R | ) | [inline, protected] |
setExceptionSelectorRegister - If set to a physical register, this sets the register that receives the exception typeid on entry to a landing pad.
Definition at line 936 of file TargetLowering.h.
Referenced by llvm::ARMTargetLowering::ARMTargetLowering(), llvm::PPCTargetLowering::PPCTargetLowering(), and llvm::X86TargetLowering::X86TargetLowering().
| void llvm::TargetLowering::setSelectIsExpensive | ( | ) | [inline, protected] |
SelectIsExpensive - Tells the code generator not to expand operations into sequences that use the select operations if possible.
Definition at line 942 of file TargetLowering.h.
| void llvm::TargetLowering::setIntDivIsCheap | ( | bool | isCheap = true |
) | [inline, protected] |
setIntDivIsCheap - Tells the code generator that integer divide is expensive, and if possible, should be replaced by an alternate sequence of instructions not containing an integer divide.
Definition at line 947 of file TargetLowering.h.
Referenced by llvm::BlackfinTargetLowering::BlackfinTargetLowering(), llvm::MSP430TargetLowering::MSP430TargetLowering(), and llvm::XCoreTargetLowering::XCoreTargetLowering().
| void llvm::TargetLowering::setPow2DivIsCheap | ( | bool | isCheap = true |
) | [inline, protected] |
setPow2DivIsCheap - Tells the code generator that it shouldn't generate srl/add/sra for a signed divide by power of two, and let the target handle it.
Definition at line 952 of file TargetLowering.h.
Referenced by llvm::PPCTargetLowering::PPCTargetLowering(), and llvm::SPUTargetLowering::SPUTargetLowering().
| void llvm::TargetLowering::addRegisterClass | ( | EVT | VT, | |
| TargetRegisterClass * | RC | |||
| ) | [inline, protected] |
addRegisterClass - Add the specified register class as an available regclass for the specified value type. This indicates the selector can handle values of that class natively.
Definition at line 957 of file TargetLowering.h.
References llvm::array_lengthof(), llvm::EVT::getSimpleVT(), and llvm::MVT::SimpleTy.
Referenced by llvm::AlphaTargetLowering::AlphaTargetLowering(), llvm::ARMTargetLowering::ARMTargetLowering(), llvm::BlackfinTargetLowering::BlackfinTargetLowering(), llvm::MipsTargetLowering::MipsTargetLowering(), llvm::MSP430TargetLowering::MSP430TargetLowering(), llvm::PIC16TargetLowering::PIC16TargetLowering(), llvm::PPCTargetLowering::PPCTargetLowering(), llvm::SparcTargetLowering::SparcTargetLowering(), llvm::SPUTargetLowering::SPUTargetLowering(), llvm::SystemZTargetLowering::SystemZTargetLowering(), llvm::X86TargetLowering::X86TargetLowering(), and llvm::XCoreTargetLowering::XCoreTargetLowering().
| void TargetLowering::computeRegisterProperties | ( | ) | [protected] |
computeRegisterProperties - Once all of the register classes are added, this allows us to compute derived properties we expose.
computeRegisterProperties - Once all of the register classes are added, this allows us to compute derived properties we expose.
Definition at line 589 of file TargetLowering.cpp.
References Expand, llvm::MVT::f32, llvm::MVT::f64, llvm::MVT::FIRST_VECTOR_VALUETYPE, llvm::MVT::getPow2VectorType(), llvm::EVT::getVectorElementType(), llvm::MVT::getVectorElementType(), llvm::MVT::getVectorNumElements(), llvm::EVT::getVectorNumElements(), getVectorTypeBreakdownMVT(), llvm::MVT::i1, llvm::MVT::i32, llvm::MVT::i64, llvm::EVT::isInteger(), isTypeLegal(), llvm::MVT::isVoid, llvm::MVT::LAST_INTEGER_VALUETYPE, llvm::MVT::LAST_VALUETYPE, llvm::MVT::LAST_VECTOR_VALUETYPE, llvm::MVT::MAX_ALLOWED_VALUETYPE, llvm::MVT::Other, llvm::MVT::ppcf128, Promote, llvm::TargetLowering::ValueTypeActionImpl::setTypeAction(), and VT.
Referenced by llvm::AlphaTargetLowering::AlphaTargetLowering(), llvm::ARMTargetLowering::ARMTargetLowering(), llvm::BlackfinTargetLowering::BlackfinTargetLowering(), llvm::MipsTargetLowering::MipsTargetLowering(), llvm::MSP430TargetLowering::MSP430TargetLowering(), llvm::PIC16TargetLowering::PIC16TargetLowering(), llvm::PPCTargetLowering::PPCTargetLowering(), llvm::SparcTargetLowering::SparcTargetLowering(), llvm::SPUTargetLowering::SPUTargetLowering(), llvm::SystemZTargetLowering::SystemZTargetLowering(), llvm::X86TargetLowering::X86TargetLowering(), and llvm::XCoreTargetLowering::XCoreTargetLowering().
| void llvm::TargetLowering::setOperationAction | ( | unsigned | Op, | |
| MVT | VT, | |||
| LegalizeAction | Action | |||
| ) | [inline, protected] |
setOperationAction - Indicate that the specified operation does not work with the specified type and indicate what to do about it.
Definition at line 969 of file TargetLowering.h.
References llvm::MVT::SimpleTy.
Referenced by llvm::AlphaTargetLowering::AlphaTargetLowering(), llvm::ARMTargetLowering::ARMTargetLowering(), llvm::BlackfinTargetLowering::BlackfinTargetLowering(), llvm::MipsTargetLowering::MipsTargetLowering(), llvm::MSP430TargetLowering::MSP430TargetLowering(), llvm::PIC16TargetLowering::PIC16TargetLowering(), llvm::PPCTargetLowering::PPCTargetLowering(), llvm::SparcTargetLowering::SparcTargetLowering(), llvm::SPUTargetLowering::SPUTargetLowering(), llvm::SystemZTargetLowering::SystemZTargetLowering(), TargetLowering(), llvm::X86TargetLowering::X86TargetLowering(), and llvm::XCoreTargetLowering::XCoreTargetLowering().
| void llvm::TargetLowering::setLoadExtAction | ( | unsigned | ExtType, | |
| MVT | VT, | |||
| LegalizeAction | Action | |||
| ) | [inline, protected] |
setLoadExtAction - Indicate that the specified load with extension does not work with the with specified type and indicate what to do about it.
Definition at line 980 of file TargetLowering.h.
References llvm::array_lengthof(), and llvm::MVT::SimpleTy.
Referenced by llvm::AlphaTargetLowering::AlphaTargetLowering(), llvm::ARMTargetLowering::ARMTargetLowering(), llvm::BlackfinTargetLowering::BlackfinTargetLowering(), llvm::MipsTargetLowering::MipsTargetLowering(), llvm::MSP430TargetLowering::MSP430TargetLowering(), llvm::PPCTargetLowering::PPCTargetLowering(), llvm::SparcTargetLowering::SparcTargetLowering(), llvm::SPUTargetLowering::SPUTargetLowering(), llvm::SystemZTargetLowering::SystemZTargetLowering(), llvm::X86TargetLowering::X86TargetLowering(), and llvm::XCoreTargetLowering::XCoreTargetLowering().
| void llvm::TargetLowering::setTruncStoreAction | ( | MVT | ValVT, | |
| MVT | MemVT, | |||
| LegalizeAction | Action | |||
| ) | [inline, protected] |
setTruncStoreAction - Indicate that the specified truncating store does not work with the with specified type and indicate what to do about it.
Definition at line 991 of file TargetLowering.h.
References llvm::array_lengthof(), and llvm::MVT::SimpleTy.
Referenced by llvm::AlphaTargetLowering::AlphaTargetLowering(), llvm::ARMTargetLowering::ARMTargetLowering(), llvm::MipsTargetLowering::MipsTargetLowering(), llvm::MSP430TargetLowering::MSP430TargetLowering(), llvm::PIC16TargetLowering::PIC16TargetLowering(), llvm::PPCTargetLowering::PPCTargetLowering(), llvm::SparcTargetLowering::SparcTargetLowering(), llvm::SPUTargetLowering::SPUTargetLowering(), llvm::SystemZTargetLowering::SystemZTargetLowering(), and llvm::X86TargetLowering::X86TargetLowering().
| void llvm::TargetLowering::setIndexedLoadAction | ( | unsigned | IdxMode, | |
| MVT | VT, | |||
| LegalizeAction | Action | |||
| ) | [inline, protected] |
setIndexedLoadAction - Indicate that the specified indexed load does or does not work with the with specified type and indicate what to do abort it. NOTE: All indexed mode loads are initialized to Expand in TargetLowering.cpp
Definition at line 1004 of file TargetLowering.h.
References llvm::array_lengthof(), llvm::MVT::LAST_VALUETYPE, and llvm::MVT::SimpleTy.
Referenced by llvm::ARMTargetLowering::ARMTargetLowering(), llvm::PPCTargetLowering::PPCTargetLowering(), and TargetLowering().
| void llvm::TargetLowering::setIndexedStoreAction | ( | unsigned | IdxMode, | |
| MVT | VT, | |||
| LegalizeAction | Action | |||
| ) | [inline, protected] |
setIndexedStoreAction - Indicate that the specified indexed store does or does not work with the with specified type and indicate what to do about it. NOTE: All indexed mode stores are initialized to Expand in TargetLowering.cpp
Definition at line 1016 of file TargetLowering.h.
References llvm::array_lengthof(), llvm::MVT::LAST_VALUETYPE, and llvm::MVT::SimpleTy.
Referenced by llvm::ARMTargetLowering::ARMTargetLowering(), llvm::PPCTargetLowering::PPCTargetLowering(), and TargetLowering().
| void llvm::TargetLowering::setConvertAction | ( | MVT | FromVT, | |
| MVT | ToVT, | |||
| LegalizeAction | Action | |||
| ) | [inline, protected] |
setConvertAction - Indicate that the specified conversion does or does not work with the with specified type and indicate what to do about it.
Definition at line 1026 of file TargetLowering.h.
References llvm::array_lengthof(), and llvm::MVT::SimpleTy.
| void llvm::TargetLowering::setCondCodeAction | ( | ISD::CondCode | CC, | |
| MVT | VT, | |||
| LegalizeAction | Action | |||
| ) | [inline, protected] |
setCondCodeAction - Indicate that the specified condition code is or isn't supported on the target and indicate what to do about it.
Definition at line 1037 of file TargetLowering.h.
References llvm::array_lengthof(), and llvm::MVT::SimpleTy.
Referenced by llvm::PPCTargetLowering::PPCTargetLowering(), and llvm::X86TargetLowering::X86TargetLowering().
| void llvm::TargetLowering::AddPromotedToType | ( | unsigned | Opc, | |
| MVT | OrigVT, | |||
| MVT | DestVT | |||
| ) | [inline, protected] |
AddPromotedToType - If Opc/OrigVT is specified as being promoted, the promotion code defaults to trying a larger integer/fp until it can find one that works. If that default is insufficient, this method can be used by the target to override the default.
Definition at line 1050 of file TargetLowering.h.
References llvm::MVT::SimpleTy.
Referenced by llvm::MipsTargetLowering::MipsTargetLowering(), llvm::PPCTargetLowering::PPCTargetLowering(), and llvm::X86TargetLowering::X86TargetLowering().
| void llvm::TargetLowering::addLegalFPImmediate | ( | const APFloat & | Imm | ) | [inline, protected] |
addLegalFPImmediate - Indicate that this target can instruction select the specified FP immediate natively.
Definition at line 1056 of file TargetLowering.h.
Referenced by llvm::AlphaTargetLowering::AlphaTargetLowering(), llvm::MipsTargetLowering::MipsTargetLowering(), llvm::SystemZTargetLowering::SystemZTargetLowering(), and llvm::X86TargetLowering::X86TargetLowering().
| void llvm::TargetLowering::setTargetDAGCombine | ( | ISD::NodeType | NT | ) | [inline, protected] |
setTargetDAGCombine - Targets should invoke this method for each target independent node that they want to provide a custom DAG combiner for by implementing the PerformDAGCombine virtual method.
Definition at line 1063 of file TargetLowering.h.
References llvm::array_lengthof().
Referenced by llvm::ARMTargetLowering::ARMTargetLowering(), llvm::PPCTargetLowering::PPCTargetLowering(), llvm::SPUTargetLowering::SPUTargetLowering(), llvm::X86TargetLowering::X86TargetLowering(), and llvm::XCoreTargetLowering::XCoreTargetLowering().
| void llvm::TargetLowering::setJumpBufSize | ( | unsigned | Size | ) | [inline, protected] |
setJumpBufSize - Set the target's required jmp_buf buffer size (in bytes); default is 200
Definition at line 1070 of file TargetLowering.h.
Referenced by llvm::AlphaTargetLowering::AlphaTargetLowering().
| void llvm::TargetLowering::setJumpBufAlignment | ( | unsigned | Align | ) | [inline, protected] |
setJumpBufAlignment - Set the target's required jmp_buf buffer alignment (in bytes); default is 0
Definition at line 1076 of file TargetLowering.h.
Referenced by llvm::AlphaTargetLowering::AlphaTargetLowering().
| void llvm::TargetLowering::setIfCvtBlockSizeLimit | ( | unsigned | Limit | ) | [inline, protected] |
setIfCvtBlockSizeLimit - Set the target's if-conversion block size limit (in number of instructions); default is 2.
Definition at line 1082 of file TargetLowering.h.
Referenced by llvm::ARMTargetLowering::ARMTargetLowering().
| void llvm::TargetLowering::setIfCvtDupBlockSizeLimit | ( | unsigned | Limit | ) | [inline, protected] |
setIfCvtDupBlockSizeLimit - Set the target's block size limit (in number of instructions) to be considered for code duplication during if-conversion; default is 2.
Definition at line 1089 of file TargetLowering.h.
Referenced by llvm::ARMTargetLowering::ARMTargetLowering().
| void llvm::TargetLowering::setPrefLoopAlignment | ( | unsigned | Align | ) | [inline, protected] |
setPrefLoopAlignment - Set the target's preferred loop alignment. Default alignment is zero, it means the target does not care about loop alignment.
Definition at line 1095 of file TargetLowering.h.
Referenced by llvm::X86TargetLowering::X86TargetLowering().
| virtual const TargetSubtarget* llvm::TargetLowering::getSubtarget | ( | ) | [inline, virtual] |
Reimplemented in llvm::ARMTargetLowering, and llvm::X86TargetLowering.
Definition at line 1101 of file TargetLowering.h.
| virtual SDValue llvm::TargetLowering::LowerFormalArguments | ( | SDValue | Chain, | |
| unsigned | CallConv, | |||
| bool | isVarArg, | |||
| const SmallVectorImpl< ISD::InputArg > & | Ins, | |||
| DebugLoc | dl, | |||
| SelectionDAG & | DAG, | |||
| SmallVectorImpl< SDValue > & | InVals | |||
| ) | [inline, virtual] |
LowerFormalArguments - This hook must be implemented to lower the incoming (formal) arguments, described by the Ins array, into the specified DAG. The implementation should fill in the InVals array with legal-type argument values, and return the resulting token chain value.
Reimplemented in llvm::SPUTargetLowering, llvm::PIC16TargetLowering, and llvm::SparcTargetLowering.
Definition at line 1118 of file TargetLowering.h.
| std::pair< SDValue, SDValue > TargetLowering::LowerCallTo | ( | SDValue | Chain, | |
| const Type * | RetTy, | |||
| bool | RetSExt, | |||
| bool | RetZExt, | |||
| bool | isVarArg, | |||
| bool | isInreg, | |||
| unsigned | NumFixedArgs, | |||
| unsigned | CallConv, | |||
| bool | isTailCall, | |||
| bool | isReturnValueUsed, | |||
| SDValue | Callee, | |||
| ArgListTy & | Args, | |||
| SelectionDAG & | DAG, | |||
| DebugLoc | dl | |||
| ) |
TargetLowering::LowerCallTo - This is the default LowerCallTo implementation, which just calls LowerCall. FIXME: When all targets are migrated to using LowerCall, this hook should be integrated into SDISel.
Definition at line 5604 of file SelectionDAGBuild.cpp.
References llvm::ISD::ANY_EXTEND, llvm::ISD::AssertSext, llvm::ISD::AssertZext, ComputeValueVTs(), DEBUG, llvm::ISD::DELETED_NODE, E, llvm::SmallVectorImpl< T >::empty(), llvm::ISD::InputArg::Flags, llvm::ISD::OutputArg::Flags, llvm::TargetData::getABITypeAlignment(), getByValTypeAlignment(), llvm::Type::getContext(), getCopyFromParts(), getCopyToParts(), llvm::SequentialType::getElementType(), llvm::SelectionDAG::getNode(), llvm::SDValue::getNode(), getNumRegisters(), getRegisterType(), getTargetData(), llvm::TargetData::getTypeAllocSize(), llvm::EVT::getTypeForEVT(), getValueType(), llvm::SDValue::getValueType(), llvm::SelectionDAG::getVTList(), IsEligibleForTailCallOptimization(), LowerCall(), llvm::ISD::MERGE_VALUES, Node, llvm::MVT::Other, llvm::PerformTailCallOpt, llvm::SmallVectorImpl< T >::push_back(), llvm::SelectionDAG::setRoot(), llvm::ISD::SIGN_EXTEND, llvm::SmallVectorImpl< T >::size(), llvm::ISD::InputArg::Used, llvm::ISD::InputArg::VT, and llvm::ISD::ZERO_EXTEND.
Referenced by ExpandLibCall(), llvm::SelectionDAG::getMemcpy(), llvm::SelectionDAG::getMemmove(), llvm::SelectionDAG::getMemset(), and llvm::SelectionDAGLowering::LowerCallTo().
| virtual SDValue llvm::TargetLowering::LowerCall | ( | SDValue | Chain, | |
| SDValue | Callee, | |||
| unsigned | CallConv, | |||
| bool | isVarArg, | |||
| bool | isTailCall, | |||
| const SmallVectorImpl< ISD::OutputArg > & | Outs, | |||
| const SmallVectorImpl< ISD::InputArg > & | Ins, | |||
| DebugLoc | dl, | |||
| SelectionDAG & | DAG, | |||
| SmallVectorImpl< SDValue > & | InVals | |||
| ) | [inline, virtual] |
LowerCall - This hook must be implemented to lower calls into the the specified DAG. The outgoing arguments to the call are described by the Outs array, and the values to be returned by the call are described by the Ins array. The implementation should fill in the InVals array with legal-type return values from the call, and return the resulting token chain value.
The isTailCall flag here is normative. If it is true, the implementation must emit a tail call. The IsEligibleForTailCallOptimization hook should be used to catch cases that cannot be handled.
Reimplemented in llvm::SPUTargetLowering, llvm::PIC16TargetLowering, and llvm::SparcTargetLowering.
Definition at line 1166 of file TargetLowering.h.
Referenced by LowerCallTo().
| virtual SDValue llvm::TargetLowering::LowerReturn | ( | SDValue | Chain, | |
| unsigned | CallConv, | |||
| bool | isVarArg, | |||
| const SmallVectorImpl< ISD::OutputArg > & | Outs, | |||
| DebugLoc | dl, | |||
| SelectionDAG & | DAG | |||
| ) | [inline, virtual] |
LowerReturn - This hook must be implemented to lower outgoing return values, described by the Outs array, into the specified DAG. The implementation should return the resulting token chain value.
Reimplemented in llvm::SPUTargetLowering, llvm::PIC16TargetLowering, and llvm::SparcTargetLowering.
Definition at line 1182 of file TargetLowering.h.
| virtual SDValue llvm::TargetLowering::EmitTargetCodeForMemcpy | ( | SelectionDAG & | DAG, | |
| DebugLoc | dl, | |||
| SDValue | Chain, | |||
| SDValue | Op1, | |||
| SDValue | Op2, | |||
| SDValue | Op3, | |||
| unsigned | Align, | |||
| bool | AlwaysInline, | |||
| const Value * | DstSV, | |||
| uint64_t | DstOff, | |||
| const Value * | SrcSV, | |||
| uint64_t | SrcOff | |||
| ) | [inline, virtual] |
EmitTargetCodeForMemcpy - Emit target-specific code that performs a memcpy. This can be used by targets to provide code sequences for cases that don't fit the target's parameters for simple loads/stores and can be more efficient than using a library call. This function can return a null SDValue if the target declines to use custom code and a different lowering strategy should be used.
If AlwaysInline is true, the size is constant and the target should not emit any calls and is strongly encouraged to attempt to emit inline code even if it is beyond the usual threshold because this intrinsic is being expanded in a place where calls are not feasible (e.g. within the prologue for another call). If the target chooses to decline an AlwaysInline request here, legalize will resort to using simple loads and stores.
Definition at line 1203 of file TargetLowering.h.
Referenced by llvm::SelectionDAG::getMemcpy().
| virtual SDValue llvm::TargetLowering::EmitTargetCodeForMemmove | ( | SelectionDAG & | DAG, | |
| DebugLoc | dl, | |||
| SDValue | Chain, | |||
| SDValue | Op1, | |||
| SDValue | Op2, | |||
| SDValue | Op3, | |||
| unsigned | Align, | |||
| const Value * | DstSV, | |||
| uint64_t | DstOff, | |||
| const Value * | SrcSV, | |||
| uint64_t | SrcOff | |||
| ) | [inline, virtual] |
EmitTargetCodeForMemmove - Emit target-specific code that performs a memmove. This can be used by targets to provide code sequences for cases that don't fit the target's parameters for simple loads/stores and can be more efficient than using a library call. This function can return a null SDValue if the target declines to use custom code and a different lowering strategy should be used.
Definition at line 1220 of file TargetLowering.h.
Referenced by llvm::SelectionDAG::getMemmove().
| virtual SDValue llvm::TargetLowering::EmitTargetCodeForMemset | ( | SelectionDAG & | DAG, | |
| DebugLoc | dl, | |||
| SDValue | Chain, | |||
| SDValue | Op1, | |||
| SDValue | Op2, | |||
| SDValue | Op3, | |||
| unsigned | Align, | |||
| const Value * | DstSV, | |||
| uint64_t | DstOff | |||
| ) | [inline, virtual] |
EmitTargetCodeForMemset - Emit target-specific code that performs a memset. This can be used by targets to provide code sequences for cases that don't fit the target's parameters for simple stores and can be more efficient than using a library call. This function can return a null SDValue if the target declines to use custom code and a different lowering strategy should be used.
Definition at line 1236 of file TargetLowering.h.
Referenced by llvm::SelectionDAG::getMemset().
| void TargetLowering::LowerOperationWrapper | ( | SDNode * | N, | |
| SmallVectorImpl< SDValue > & | Results, | |||
| SelectionDAG & | DAG | |||
| ) | [virtual] |
LowerOperationWrapper - This callback is invoked by the type legalizer to legalize nodes with an illegal operand type but legal result types. It replaces the LowerOperation callback in the type Legalizer. The reason we can not do away with LowerOperation entirely is that LegalizeDAG isn't yet ready to use this callback. TODO: Consider merging with ReplaceNodeResults. The target places new result values for the node in Results (their number and types must exactly match those of the original return values of the node), or leaves Results empty, which indicates that the node is not to be custom lowered after all. The default implementation calls LowerOperation.
Reimplemented in llvm::PIC16TargetLowering.
Definition at line 5769 of file SelectionDAGBuild.cpp.
References llvm::SDValue::getNode(), LowerOperation(), and llvm::SmallVectorImpl< T >::push_back().
| SDValue TargetLowering::LowerOperation | ( | SDValue | Op, | |
| SelectionDAG & | DAG | |||
| ) | [virtual] |
LowerOperation - This callback is invoked for operations that are unsupported by the target, which are registered to use 'custom' lowering, and whose defined values are all legal. If the target has no operations that require custom lowering, it need not implement this. The default implementation of this aborts.
Reimplemented in llvm::AlphaTargetLowering, llvm::ARMTargetLowering, llvm::BlackfinTargetLowering, llvm::SPUTargetLowering, llvm::MipsTargetLowering, llvm::MSP430TargetLowering, llvm::PIC16TargetLowering, llvm::PPCTargetLowering, llvm::SparcTargetLowering, llvm::SystemZTargetLowering, llvm::X86TargetLowering, and llvm::XCoreTargetLowering.
Definition at line 5777 of file SelectionDAGBuild.cpp.
References llvm_unreachable.
Referenced by LowerOperationWrapper().
| virtual void llvm::TargetLowering::ReplaceNodeResults | ( | SDNode * | N, | |
| SmallVectorImpl< SDValue > & | Results, | |||
| SelectionDAG & | DAG | |||
| ) | [inline, virtual] |
ReplaceNodeResults - This callback is invoked when a node result type is illegal for the target, and the operation was registered to use 'custom' lowering for that result type. The target places new result values for the node in Results (their number and types must exactly match those of the original return values of the node), or leaves Results empty, which indicates that the node is not to be custom lowered after all.
If the target has no operations that require custom lowering, it need not implement this. The default implementation aborts.
Reimplemented in llvm::AlphaTargetLowering, llvm::ARMTargetLowering, llvm::BlackfinTargetLowering, llvm::SPUTargetLowering, llvm::PIC16TargetLowering, llvm::PPCTargetLowering, llvm::X86TargetLowering, and llvm::XCoreTargetLowering.
Definition at line 1276 of file TargetLowering.h.
| virtual bool llvm::TargetLowering::IsEligibleForTailCallOptimization | ( | SDValue | Callee, | |
| unsigned | CalleeCC, | |||
| bool | isVarArg, | |||
| const SmallVectorImpl< ISD::InputArg > & | Ins, | |||
| SelectionDAG & | DAG | |||
| ) | const [inline, virtual] |
IsEligibleForTailCallOptimization - Check whether the call is eligible for tail call optimization. Targets which want to do tail call optimization should override this function.
Reimplemented in llvm::PPCTargetLowering, and llvm::X86TargetLowering.
Definition at line 1285 of file TargetLowering.h.
Referenced by LowerCallTo().
| static SDValue llvm::TargetLowering::GetPossiblePreceedingTailCall | ( | SDValue | Chain, | |
| unsigned | TailCallNodeOpCode | |||
| ) | [inline, static] |
GetPossiblePreceedingTailCall - Get preceeding TailCallNodeOpCode node if it exists. Skip a possible ISD::TokenFactor.
Definition at line 1296 of file TargetLowering.h.
References llvm::SDValue::getNumOperands(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), and llvm::ISD::TokenFactor.
| const char * TargetLowering::getTargetNodeName | ( | unsigned | Opcode | ) | const [virtual] |
getTargetNodeName() - This method returns the name of a target specific DAG node.
Reimplemented in llvm::AlphaTargetLowering, llvm::ARMTargetLowering, llvm::BlackfinTargetLowering, llvm::SPUTargetLowering, llvm::MipsTargetLowering, llvm::MSP430TargetLowering, llvm::PIC16TargetLowering, llvm::PPCTargetLowering, llvm::SparcTargetLowering, llvm::SystemZTargetLowering, llvm::X86TargetLowering, and llvm::XCoreTargetLowering.
Definition at line 708 of file TargetLowering.cpp.
Referenced by llvm::SDNode::getOperationName().
| virtual FastISel* llvm::TargetLowering::createFastISel | ( | MachineFunction & | , | |
| MachineModuleInfo * | , | |||
| DwarfWriter * | , | |||
| DenseMap< const Value *, unsigned > & | , | |||
| DenseMap< const BasicBlock *, MachineBasicBlock * > & | , | |||
| DenseMap< const AllocaInst *, int > & | , | |||
| SmallSet< Instruction *, 8 > & | CatchInfoLost | |||
| ) | [inline, virtual] |
createFastISel - This method returns a target specific FastISel object, or null if the target does not support "fast" ISel.
Reimplemented in llvm::X86TargetLowering.
Definition at line 1315 of file TargetLowering.h.
ExpandInlineAsm - This hook allows the target to expand an inline asm call to be explicit llvm code if it wants to. This is useful for turning simple inline asms into LLVM intrinsics, which gives the compiler more information about the behavior of the code.
Reimplemented in llvm::X86TargetLowering.
Definition at line 1335 of file TargetLowering.h.
| void TargetLowering::ComputeConstraintToUse | ( | AsmOperandInfo & | OpInfo, | |
| SDValue | Op, | |||
| bool | hasMemory, | |||
| SelectionDAG * | DAG = 0 | |||
| ) | const [virtual] |
ComputeConstraintToUse - Determines the constraint code and constraint type to use for the specific AsmOperandInfo, setting OpInfo.ConstraintCode and OpInfo.ConstraintType. If the actual operand being passed in is available, it can be passed in as Op, otherwise an empty SDValue can be passed. If hasMemory is true it means one of the asm constraint of the inline asm instruction being processed is 'm'.
ComputeConstraintToUse - Determines the constraint code and constraint type to use for the specific AsmOperandInfo, setting OpInfo.ConstraintCode and OpInfo.ConstraintType.
Definition at line 2458 of file TargetLowering.cpp.
References llvm::TargetLowering::AsmOperandInfo::CallOperandVal, ChooseConstraint(), llvm::InlineAsm::ConstraintInfo::Codes, llvm::TargetLowering::AsmOperandInfo::ConstraintCode, llvm::TargetLowering::AsmOperandInfo::ConstraintType, llvm::TargetLowering::AsmOperandInfo::ConstraintVT, getConstraintType(), and LowerXConstraint().
Referenced by IsOperandAMemoryOperand().
| TargetLowering::ConstraintType TargetLowering::getConstraintType | ( | const std::string & | Constraint | ) | const [virtual] |
getConstraintType - Given a constraint, return the type of constraint it is for this target.
Reimplemented in llvm::AlphaTargetLowering, llvm::ARMTargetLowering, llvm::BlackfinTargetLowering, llvm::SPUTargetLowering, llvm::PPCTargetLowering, llvm::SparcTargetLowering, llvm::SystemZTargetLowering, and llvm::X86TargetLowering.
Definition at line 2205 of file TargetLowering.cpp.
References C_Memory, C_Other, C_Register, C_RegisterClass, and C_Unknown.
Referenced by ChooseConstraint(), ComputeConstraintToUse(), llvm::X86TargetLowering::getConstraintType(), llvm::SystemZTargetLowering::getConstraintType(), llvm::SPUTargetLowering::getConstraintType(), llvm::SparcTargetLowering::getConstraintType(), llvm::PPCTargetLowering::getConstraintType(), llvm::BlackfinTargetLowering::getConstraintType(), llvm::ARMTargetLowering::getConstraintType(), llvm::AlphaTargetLowering::getConstraintType(), and hasInlineAsmMemConstraint().
| std::vector< unsigned > TargetLowering::getRegClassForInlineAsmConstraint | ( | const std::string & | Constraint, | |
| EVT | VT | |||
| ) | const [virtual] |
getRegClassForInlineAsmConstraint - Given a constraint letter (e.g. "r"), return a list of registers that can be used to satisfy the constraint. This should only be used for C_RegisterClass constraints.
Reimplemented in llvm::AlphaTargetLowering, llvm::ARMTargetLowering, llvm::BlackfinTargetLowering, llvm::SparcTargetLowering, and llvm::X86TargetLowering.
Definition at line 2312 of file TargetLowering.cpp.
Referenced by llvm::SelectionDAGLowering::GetRegistersForValue().
| std::pair< unsigned, const TargetRegisterClass * > TargetLowering::getRegForInlineAsmConstraint | ( | const std::string & | Constraint, | |
| EVT | VT | |||
| ) | const [virtual] |
getRegForInlineAsmConstraint - Given a physical register constraint (e.g. {edx}), return the register number and the register class for the register.
Given a register class constraint, like 'r', if this corresponds directly to an LLVM register class, return a register of 0 and the register class pointer.
This should only be used for C_Register constraints. On error, this returns a register number of 0 and a null register class pointer..
Reimplemented in llvm::ARMTargetLowering, llvm::BlackfinTargetLowering, llvm::SPUTargetLowering, llvm::PPCTargetLowering, llvm::SparcTargetLowering, llvm::SystemZTargetLowering, and llvm::X86TargetLowering.
Definition at line 2319 of file TargetLowering.cpp.
References llvm::TargetRegisterClass::begin(), E, llvm::TargetRegisterClass::end(), llvm::TargetMachine::getRegisterInfo(), isTypeLegal(), llvm::StringsEqualNoCase(), llvm::TargetRegisterClass::vt_begin(), and llvm::TargetRegisterClass::vt_end().
Referenced by llvm::X86TargetLowering::getRegForInlineAsmConstraint(), llvm::SystemZTargetLowering::getRegForInlineAsmConstraint(), llvm::SPUTargetLowering::getRegForInlineAsmConstraint(), llvm::SparcTargetLowering::getRegForInlineAsmConstraint(), llvm::PPCTargetLowering::getRegForInlineAsmConstraint(), llvm::BlackfinTargetLowering::getRegForInlineAsmConstraint(), llvm::ARMTargetLowering::getRegForInlineAsmConstraint(), and llvm::SelectionDAGLowering::GetRegistersForValue().
| const char * TargetLowering::LowerXConstraint | ( | EVT | ConstraintVT | ) | const [virtual] |
LowerXConstraint - try to replace an X constraint, which matches anything, with another that has more specific requirements based on the type of the corresponding operand. This returns null if there is no replacement to make.
LowerXConstraint - try to replace an X constraint, which matches anything, with another that has more specific requirements based on the type of the corresponding operand.
Reimplemented in llvm::X86TargetLowering.
Definition at line 2240 of file TargetLowering.cpp.
References llvm::EVT::isFloatingPoint(), and llvm::EVT::isInteger().
Referenced by ComputeConstraintToUse(), and llvm::X86TargetLowering::LowerXConstraint().
| void TargetLowering::LowerAsmOperandForConstraint | ( | SDValue | Op, | |
| char | ConstraintLetter, | |||
| bool | hasMemory, | |||
| std::vector< SDValue > & | Ops, | |||
| SelectionDAG & | DAG | |||
| ) | const [virtual] |
LowerAsmOperandForConstraint - Lower the specified operand into the Ops vector. If it is invalid, don't add anything to Ops. If hasMemory is true it means one of the asm constraint of the inline asm instruction being processed is 'm'.
LowerAsmOperandForConstraint - Lower the specified operand into the Ops vector. If it is invalid, don't add anything to Ops.
Reimplemented in llvm::ARMTargetLowering, llvm::SPUTargetLowering, llvm::PPCTargetLowering, and llvm::X86TargetLowering.
Definition at line 2250 of file TargetLowering.cpp.
References llvm::ISD::ADD, llvm::ISD::BasicBlock, llvm::CallingConv::C, llvm::dyn_cast(), llvm::ConstantSDNode::getAPIntValue(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::APInt::getSExtValue(), llvm::SelectionDAG::getTargetConstant(), llvm::SelectionDAG::getTargetGlobalAddress(), llvm::SDValue::getValueType(), llvm::ConstantSDNode::getZExtValue(), and llvm::MVT::i64.
Referenced by ChooseConstraint(), llvm::X86TargetLowering::LowerAsmOperandForConstraint(), llvm::SPUTargetLowering::LowerAsmOperandForConstraint(), llvm::PPCTargetLowering::LowerAsmOperandForConstraint(), and llvm::ARMTargetLowering::LowerAsmOperandForConstraint().
| MachineBasicBlock * TargetLowering::EmitInstrWithCustomInserter | ( | MachineInstr * | MI, | |
| MachineBasicBlock * | MBB | |||
| ) | const [virtual] |
Reimplemented in llvm::AlphaTargetLowering, llvm::ARMTargetLowering, llvm::MSP430TargetLowering, llvm::PIC16TargetLowering, llvm::PPCTargetLowering, llvm::SparcTargetLowering, llvm::SystemZTargetLowering, llvm::X86TargetLowering, and llvm::XCoreTargetLowering.
Definition at line 155 of file SelectionDAGISel.cpp.
References llvm::cerr(), and llvm_unreachable.
Referenced by llvm::ScheduleDAGSDNodes::EmitNode().
isLegalAddressingMode - Return true if the addressing mode represented by AM is legal for this target, for a load/store of the specified type. The type may be VoidTy, in which case only return true if the addressing mode is legal for a load/store of any legal type. TODO: Handle pre/postinc as well.
isLegalAddressingMode - Return true if the addressing mode represented by AM is legal for this target, for a load/store of the specified type.
Reimplemented in llvm::ARMTargetLowering, llvm::PPCTargetLowering, llvm::X86TargetLowering, and llvm::XCoreTargetLowering.
Definition at line 2498 of file TargetLowering.cpp.
References llvm::TargetLowering::AddrMode::BaseGV, llvm::TargetLowering::AddrMode::BaseOffs, llvm::TargetLowering::AddrMode::HasBaseReg, and llvm::TargetLowering::AddrMode::Scale.
Referenced by fitsInAddressMode().
| virtual bool llvm::TargetLowering::isTruncateFree | ( | const Type * | Ty1, | |
| const Type * | Ty2 | |||
| ) | const [inline, virtual] |
isTruncateFree - Return true if it's free to truncate a value of type Ty1 to type Ty2. e.g. On x86 it's free to truncate a i32 value in register EAX to i16 by referencing its sub-register AX.
Reimplemented in llvm::X86TargetLowering.
Definition at line 1475 of file TargetLowering.h.
Referenced by ExtendUsesToFormExtLoad(), isInTailCallPosition(), and llvm::TargetLowering::TargetLoweringOpt::ShrinkDemandedOp().
| virtual bool llvm::TargetLowering::isZExtFree | ( | const Type * | Ty1, | |
| const Type * | Ty2 | |||
| ) | const [inline, virtual] |
isZExtFree - Return true if any actual instruction that defines a value of type Ty1 implicit zero-extends the value to Ty2 in the result register. This does not necessarily include registers defined in unknown ways, such as incoming arguments, or copies from unknown virtual registers. Also, if isTruncateFree(Ty2, Ty1) is true, this does not necessarily apply to truncate instructions. e.g. on x86-64, all instructions that define 32-bit values implicit zero-extend the result out to 64 bits.
Reimplemented in llvm::X86TargetLowering.
Definition at line 1491 of file TargetLowering.h.
Referenced by llvm::TargetLowering::TargetLoweringOpt::ShrinkDemandedOp().
| virtual bool llvm::TargetLowering::isNarrowingProfitable | ( | EVT | VT1, | |
| EVT | VT2 | |||
| ) | const [inline, virtual] |
isNarrowingProfitable - Return true if it's profitable to narrow operations of type VT1 to VT2. e.g. on x86, it's profitable to narrow from i32 to i8 but not from i32 to i16.
Reimplemented in llvm::X86TargetLowering.
Definition at line 1502 of file TargetLowering.h.
| SDValue TargetLowering::BuildSDIV | ( | SDNode * | N, | |
| SelectionDAG & | DAG, | |||
| std::vector< SDNode * > * | Created | |||
| ) | const |
BuildSDIVSequence - Given an ISD::SDIV node expressing a divide by constant, return a DAG expression to select that will generate the same value by multiplying by a magic number. See: <http://the.wall.riscom.net/books/proc/ppc/cwg/code2.html>
Definition at line 2534 of file TargetLowering.cpp.
References llvm::ISD::ADD, llvm::SelectionDAG::getConstant(), llvm::SDNode::getDebugLoc(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::SDNode::getOperand(), getShiftAmountTy(), llvm::EVT::getSizeInBits(), llvm::SDNode::getValueType(), llvm::SelectionDAG::getVTList(), llvm::APInt::isNegative(), isOperationLegalOrCustom(), llvm::APInt::isStrictlyPositive(), isTypeLegal(), llvm::APInt::ms::m, llvm::APInt::magic(), llvm::ISD::MULHS, Q, llvm::APInt::ms::s, llvm::ISD::SMUL_LOHI, llvm::ISD::SRA, llvm::ISD::SRL, llvm::ISD::SUB, T, and VT.
Referenced by llvm::AlphaTargetLowering::LowerOperation().
| SDValue TargetLowering::BuildUDIV | ( | SDNode * | N, | |
| SelectionDAG & | DAG, | |||
| std::vector< SDNode * > * | Created | |||
| ) | const |
BuildUDIVSequence - Given an ISD::UDIV node expressing a divide by constant, return a DAG expression to select that will generate the same value by multiplying by a magic number. See: <http://the.wall.riscom.net/books/proc/ppc/cwg/code2.html>
Definition at line 2591 of file TargetLowering.cpp.
References llvm::ISD::ADD, llvm::ConstantSDNode::getAPIntValue(), llvm::APInt::getBitWidth(), llvm::SelectionDAG::getConstant(), llvm::SDNode::getDebugLoc(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::SDNode::getOperand(), getShiftAmountTy(), llvm::SDNode::getValueType(), llvm::SelectionDAG::getVTList(), isOperationLegalOrCustom(), isTypeLegal(), llvm::APInt::magicu(), llvm::ISD::MULHU, Q, llvm::ISD::SRL, llvm::ISD::SUB, llvm::ISD::UMUL_LOHI, and VT.
Referenced by llvm::AlphaTargetLowering::LowerOperation().
| void llvm::TargetLowering::setLibcallName | ( | RTLIB::Libcall | Call, | |
| const char * | Name | |||
| ) | [inline] |
setLibcallName - Rename the default libcall routine name for the specified libcall.
Definition at line 1521 of file TargetLowering.h.
Referenced by llvm::ARMTargetLowering::ARMTargetLowering(), llvm::PIC16TargetLowering::PIC16TargetLowering(), llvm::PPCTargetLowering::PPCTargetLowering(), llvm::SPUTargetLowering::SPUTargetLowering(), and llvm::X86TargetLowering::X86TargetLowering().
| const char* llvm::TargetLowering::getLibcallName | ( | RTLIB::Libcall | Call | ) | const [inline] |
getLibcallName - Get the libcall routine name for the specified libcall.
Definition at line 1527 of file TargetLowering.h.
Referenced by ExpandLibCall(), llvm::SelectionDAG::getMemcpy(), llvm::SelectionDAG::getMemmove(), and llvm::SelectionDAG::getMemset().
| void llvm::TargetLowering::setCmpLibcallCC | ( | RTLIB::Libcall | Call, | |
| ISD::CondCode | CC | |||
| ) | [inline] |
setCmpLibcallCC - Override the default CondCode to be used to test the result of the comparison libcall against zero.
Definition at line 1533 of file TargetLowering.h.
Referenced by llvm::ARMTargetLowering::ARMTargetLowering(), and llvm::PIC16TargetLowering::PIC16TargetLowering().
| ISD::CondCode llvm::TargetLowering::getCmpLibcallCC | ( | RTLIB::Libcall | Call | ) | const [inline] |
getCmpLibcallCC - Get the CondCode that's to be used to test the result of the comparison libcall against zero.
Definition at line 1539 of file TargetLowering.h.
| void llvm::TargetLowering::setLibcallCallingConv | ( | RTLIB::Libcall | Call, | |
| CallingConv::ID | CC | |||
| ) | [inline] |
setLibcallCallingConv - Set the CallingConv that should be used for the specified libcall.
Definition at line 1545 of file TargetLowering.h.
Referenced by llvm::ARMTargetLowering::ARMTargetLowering().
| CallingConv::ID llvm::TargetLowering::getLibcallCallingConv | ( | RTLIB::Libcall | Call | ) | const [inline] |
getLibcallCallingConv - Get the CallingConv that should be used for the specified libcall.
Definition at line 1551 of file TargetLowering.h.
Referenced by ExpandLibCall(), llvm::SelectionDAG::getMemcpy(), llvm::SelectionDAG::getMemmove(), and llvm::SelectionDAG::getMemset().
unsigned llvm::TargetLowering::maxStoresPerMemset [protected] |
Specify maximum number of store instructions per memset call.
When lowering @llvm.memset this field specifies the maximum number of store operations that may be substituted for the call to memset. Targets must set this value based on the cost threshold for that target. Targets should assume that the memset will be done using as many of the largest store operations first, followed by smaller ones, if necessary, per alignment restrictions. For example, storing 9 bytes on a 32-bit machine with 16-bit alignment would result in four 2-byte stores and one 1-byte store. This only applies to setting a constant array of a constant size.
Definition at line 1735 of file TargetLowering.h.
Referenced by getMaxStoresPerMemset(), TargetLowering(), llvm::X86TargetLowering::X86TargetLowering(), and llvm::XCoreTargetLowering::XCoreTargetLowering().
unsigned llvm::TargetLowering::maxStoresPerMemcpy [protected] |
Specify maximum bytes of store instructions per memcpy call.
When lowering @llvm.memcpy this field specifies the maximum number of store operations that may be substituted for a call to memcpy. Targets must set this value based on the cost threshold for that target. Targets should assume that the memcpy will be done using as many of the largest store operations first, followed by smaller ones, if necessary, per alignment restrictions. For example, storing 7 bytes on a 32-bit machine with 32-bit alignment would result in one 4-byte store, a one 2-byte store and one 1-byte store. This only applies to copying a constant array of constant size.
Definition at line 1747 of file TargetLowering.h.
Referenced by llvm::ARMTargetLowering::ARMTargetLowering(), getMaxStoresPerMemcpy(), TargetLowering(), llvm::X86TargetLowering::X86TargetLowering(), and llvm::XCoreTargetLowering::XCoreTargetLowering().
unsigned llvm::TargetLowering::maxStoresPerMemmove [protected] |
Specify maximum bytes of store instructions per memmove call.
When lowering @llvm.memmove this field specifies the maximum number of store instructions that may be substituted for a call to memmove. Targets must set this value based on the cost threshold for that target. Targets should assume that the memmove will be done using as many of the largest store operations first, followed by smaller ones, if necessary, per alignment restrictions. For example, moving 9 bytes on a 32-bit machine with 8-bit alignment would result in nine 1-byte stores. This only applies to copying a constant array of constant size.
Definition at line 1758 of file TargetLowering.h.
Referenced by getMaxStoresPerMemmove(), TargetLowering(), llvm::X86TargetLowering::X86TargetLowering(), and llvm::XCoreTargetLowering::XCoreTargetLowering().
This field specifies whether the target can benefit from code placement optimization.
Definition at line 1762 of file TargetLowering.h.
Referenced by shouldOptimizeCodePlacement(), TargetLowering(), and llvm::X86TargetLowering::X86TargetLowering().