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 63 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 304 of file TargetLowering.h.
| typedef std::vector<ArgListEntry> llvm::TargetLowering::ArgListTy |
Definition at line 1071 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 67 of file TargetLowering.h.
Definition at line 80 of file TargetLowering.h.
Definition at line 86 of file TargetLowering.h.
Definition at line 1217 of file TargetLowering.h.
| TargetLowering::TargetLowering | ( | TargetMachine & | TM | ) | [explicit] |
Definition at line 399 of file TargetLowering.cpp.
References allowUnalignedMemoryAccesses, llvm::array_lengthof(), 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::TargetData::getIntPtrType(), llvm::TargetMachine::getTargetAsmInfo(), getValueType(), llvm::TargetAsmInfo::hasDotLocAndDotFile(), InitCmpLibcallCCs(), InitLibcallNames(), llvm::TargetData::isLittleEndian(), llvm::ISD::LAST_INDEXED_MODE, llvm::MVT::LAST_VALUETYPE, maxStoresPerMemcpy, maxStoresPerMemmove, maxStoresPerMemset, llvm::MVT::Other, llvm::ISD::PRE_INC, llvm::ISD::PREFETCH, SchedulingForLatency, setIndexedLoadAction(), setIndexedStoreAction(), setOperationAction(), llvm::ISD::TRAP, Undefined, UndefinedBooleanContent, and VT.
| TargetLowering::~TargetLowering | ( | ) | [virtual] |
Definition at line 480 of file TargetLowering.cpp.
| TargetMachine& llvm::TargetLowering::getTargetMachine | ( | ) | const [inline] |
Definition at line 94 of file TargetLowering.h.
Referenced by llvm::PPCTargetLowering::EmitAtomicBinary(), llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), llvm::SparcTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), llvm::AlphaTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), llvm::PPCTargetLowering::getByValTypeAlignment(), llvm::X86TargetLowering::IsEligibleForTailCallOptimization(), llvm::PPCTargetLowering::IsEligibleForTailCallOptimization(), llvm::X86TargetLowering::isLegalAddressingMode(), isOffsetFoldingLegal(), llvm::IA64TargetLowering::LowerArguments(), llvm::SPUTargetLowering::LowerOperation(), llvm::PPCTargetLowering::LowerOperation(), llvm::SPUTargetLowering::PerformDAGCombine(), llvm::PPCTargetLowering::PerformDAGCombine(), and llvm::SelectionDAGISel::runOnFunction().
| const TargetData* llvm::TargetLowering::getTargetData | ( | ) | const [inline] |
Definition at line 95 of file TargetLowering.h.
Referenced by ComputeValueVTs(), llvm::SelectionDAG::CreateStackTemporary(), llvm::SelectionDAG::getConstantPool(), llvm::SelectionDAG::getMemcpy(), llvm::SelectionDAG::getMemmove(), llvm::SelectionDAG::getMemset(), LowerArguments(), LowerCallTo(), MeetsMaxMemopRequirement(), llvm::FunctionLoweringInfo::set(), and llvm::X86TargetLowering::X86TargetLowering().
| bool llvm::TargetLowering::isBigEndian | ( | ) | const [inline] |
Definition at line 97 of file TargetLowering.h.
Referenced by getCopyFromParts(), and getCopyToParts().
| bool llvm::TargetLowering::isLittleEndian | ( | ) | const [inline] |
Definition at line 98 of file TargetLowering.h.
Referenced by ExpandUnalignedLoad(), ExpandUnalignedStore(), and getMemsetStringVal().
| MVT llvm::TargetLowering::getPointerTy | ( | ) | const [inline] |
Definition at line 99 of file TargetLowering.h.
Referenced by llvm::RegsForValue::AddInlineAsmOperands(), llvm::SelectionDAG::CreateStackTemporary(), ExpandConstantFP(), ExpandUnalignedLoad(), ExpandUnalignedStore(), llvm::FastISel::FastEmit_rf_(), llvm::SDISelAsmOperandInfo::getCallOperandValMVT(), getCopyToParts(), 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(), LowerArguments(), LowerCALL(), llvm::IA64TargetLowering::LowerCallTo(), LowerFORMAL_ARGUMENTS(), LowerINSERT_VECTOR_ELT(), LowerINTRINSIC_WO_CHAIN(), LowerLOAD(), LowerMemOpCallTo(), llvm::IA64TargetLowering::LowerOperation(), llvm::AlphaTargetLowering::LowerOperation(), LowerSTORE(), LowerVASTART(), LowerVECTOR_SHUFFLE(), LowerVECTOR_SHUFFLEv8i16(), llvm::PPCTargetLowering::SelectAddressRegImm(), llvm::PPCTargetLowering::SelectAddressRegImmShift(), llvm::SelectionDAGISel::SelectInlineAsmMemoryOperands(), llvm::SelectionDAGLowering::visitBitTestCase(), llvm::SelectionDAGLowering::visitBitTestHeader(), llvm::SelectionDAGLowering::visitJumpTable(), and llvm::SelectionDAGLowering::visitJumpTableHeader().
| MVT llvm::TargetLowering::getShiftAmountTy | ( | ) | const [inline] |
Definition at line 100 of file TargetLowering.h.
Referenced by BuildSDIV(), BuildUDIV(), ExpandFCOPYSIGNToBitwiseOps(), ExpandUnalignedLoad(), ExpandUnalignedStore(), getCopyFromParts(), getCopyToParts(), getMemsetValue(), llvm::SelectionDAG::getNode(), getVShift(), LowerI8Math(), SimplifyDemandedBits(), SimplifySetCC(), and llvm::SelectionDAGLowering::visitBitTestHeader().
| OutOfRangeShiftAmount llvm::TargetLowering::getShiftAmountFlavor | ( | ) | const [inline] |
Definition at line 101 of file TargetLowering.h.
| bool llvm::TargetLowering::usesGlobalOffsetTable | ( | ) | const [inline] |
usesGlobalOffsetTable - Return true if this target uses a GOT for PIC codegen.
Definition at line 105 of file TargetLowering.h.
Referenced by llvm::AsmPrinter::EmitJumpTableInfo(), llvm::X86TargetLowering::getPICJumpTableRelocBase(), and getPICJumpTableRelocBase().
| bool llvm::TargetLowering::isSelectExpensive | ( | ) | const [inline] |
isSelectExpensive - Return true if the select operation is expensive for this target.
Definition at line 109 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 113 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 117 of file TargetLowering.h.
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::SPUTargetLowering, llvm::IA64TargetLowering, llvm::MipsTargetLowering, llvm::PPCTargetLowering, and llvm::X86TargetLowering.
Definition at line 608 of file TargetLowering.cpp.
References llvm::TargetData::getIntPtrType(), and getValueType().
Referenced by LowerSELECT_CC(), 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 131 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 134 of file TargetLowering.h.
Referenced by llvm::createDefaultScheduler().
| TargetRegisterClass* llvm::TargetLowering::getRegClassFor | ( | MVT | 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 140 of file TargetLowering.h.
References llvm::array_lengthof(), and llvm::MVT::getSimpleVT().
Referenced by CheckDAGForTailCallsAndFixThem(), llvm::FastISel::getRegForValue(), llvm::IA64TargetLowering::LowerArguments(), llvm::SelectionDAGISel::MakeReg(), and llvm::FunctionLoweringInfo::MakeReg().
| bool llvm::TargetLowering::isTypeLegal | ( | MVT | VT | ) | const [inline] |
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 150 of file TargetLowering.h.
References llvm::array_lengthof(), llvm::MVT::getSimpleVT(), and llvm::MVT::isSimple().
Referenced by BuildSDIV(), BuildUDIV(), computeRegisterProperties(), ExpandUnalignedLoad(), ExpandUnalignedStore(), FindAssocWidenVecType(), FindWidenVecType(), getCopyToParts(), getRegForInlineAsmConstraint(), llvm::FastISel::getRegForValue(), getTypeToPromoteTo(), getVectorTypeBreakdown(), llvm::X86TargetLowering::getWidenVectorType(), getWidenVectorType(), isAllocatableRegister(), isConvertLegal(), isOperationLegal(), isTruncStoreLegal(), and MeetsMaxMemopRequirement().
| const ValueTypeActionImpl& llvm::TargetLowering::getValueTypeActions | ( | ) | const [inline] |
Definition at line 192 of file TargetLowering.h.
| LegalizeAction llvm::TargetLowering::getTypeAction | ( | MVT | 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 200 of file TargetLowering.h.
References llvm::TargetLowering::ValueTypeActionImpl::getTypeAction().
Referenced by getTypeToExpandTo(), getTypeToTransformTo(), and OptimizeNoopCopyExpression().
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 210 of file TargetLowering.h.
References llvm::array_lengthof(), llvm::MVT::getIntegerVT(), llvm::MVT::getPow2VectorType(), llvm::MVT::getRoundIntegerType(), llvm::MVT::getSimpleVT(), llvm::MVT::getSizeInBits(), getTypeAction(), llvm::MVT::getVectorElementType(), llvm::MVT::getVectorNumElements(), llvm::MVT::getVectorVT(), llvm::MVT::isInteger(), llvm::MVT::isSimple(), llvm::MVT::isVector(), and Promote.
Referenced by llvm::FastISel::getRegForValue(), getRegisterType(), getTypeToExpandTo(), getVectorTypeBreakdown(), and OptimizeNoopCopyExpression().