16 #ifndef LLVM_CODEGEN_BASICTTIIMPL_H
17 #define LLVM_CODEGEN_BASICTTIIMPL_H
47 unsigned getPermuteShuffleOverhead(
Type *Ty) {
58 Cost +=
static_cast<T *
>(
this)
60 Cost +=
static_cast<T *
>(
this)
68 return static_cast<const T *
>(
this)->getST();
73 return static_cast<const T *
>(
this)->getTLI();
87 unsigned Alignment,
bool *
Fast)
const {
112 bool HasBaseReg, int64_t Scale,
113 unsigned AddrSpace) {
127 bool HasBaseReg, int64_t Scale,
unsigned AddrSpace) {
159 if (getTLI()->isExtFree(I))
162 if (isa<ZExtInst>(I) || isa<SExtInst>(I))
163 if (
const LoadInst *LI = dyn_cast<LoadInst>(Src))
164 if (getTLI()->isExtLoad(LI, I,
DL))
177 if (IID == Intrinsic::cttz) {
178 if (getTLI()->isCheapToSpeculateCttz())
183 if (IID == Intrinsic::ctlz) {
184 if (getTLI()->isCheapToSpeculateCtlz())
193 unsigned &JumpTableSize) {
213 APInt MinCaseVal = MaxCaseVal;
214 for (
auto CI : SI.
cases()) {
215 const APInt &CaseVal = CI.getCaseValue()->getValue();
216 if (CaseVal.
sgt(MaxCaseVal))
217 MaxCaseVal = CaseVal;
218 if (CaseVal.
slt(MinCaseVal))
219 MinCaseVal = CaseVal;
226 Dests.
insert(
I.getCaseSuccessor());
235 if (N < 2 || N < TLI->getMinimumJumpTableEntries())
238 (MaxCaseVal - MinCaseVal).getLimitedValue(UINT64_MAX - 1) + 1;
241 JumpTableSize = Range;
275 case Instruction::Trunc: {
280 case Instruction::ZExt: {
332 if (isa<CallInst>(J) || isa<InvokeInst>(J)) {
335 if (!static_cast<T *>(
this)->isLoweredToCall(
F))
374 Cost +=
static_cast<T *
>(
this)
377 Cost +=
static_cast<T *
>(
this)
391 for (
const Value *
A : Args) {
392 if (!isa<Constant>(
A) && UniqueOperands.
insert(
A).second) {
393 Type *VecTy =
nullptr;
394 if (
A->getType()->isVectorTy()) {
395 VecTy =
A->getType();
398 "Vector argument does not match VF");
430 unsigned Opcode,
Type *Ty,
439 assert(ISD &&
"Invalid opcode");
446 unsigned OpCost = (IsFloat ? 2 : 1);
451 return LT.first * OpCost;
457 return LT.first * 2 * OpCost;
465 unsigned Cost =
static_cast<T *
>(
this)
480 return getPermuteShuffleOverhead(Tp);
489 assert(ISD &&
"Invalid opcode");
494 if (SrcLT.first == DstLT.first &&
495 SrcLT.second.getSizeInBits() == DstLT.second.getSizeInBits()) {
498 if (Opcode == Instruction::BitCast || Opcode == Instruction::Trunc)
502 if (Opcode == Instruction::Trunc &&
506 if (Opcode == Instruction::ZExt &&
510 if (Opcode == Instruction::AddrSpaceCast &&
517 if ((Opcode == Instruction::ZExt || Opcode == Instruction::SExt) &&
518 I && isa<LoadInst>(
I->getOperand(0))) {
528 if (SrcLT.first == DstLT.first &&
536 if (Opcode == Instruction::BitCast)
552 if (SrcLT.first == DstLT.first &&
553 SrcLT.second.getSizeInBits() == DstLT.second.getSizeInBits()) {
556 if (Opcode == Instruction::ZExt)
560 if (Opcode == Instruction::SExt)
567 return SrcLT.first * 1;
582 T *
TTI =
static_cast<T *
>(
this);
583 return TTI->getVectorSplitCost() +
584 (2 * TTI->getCastInstrCost(Opcode, SplitDst, SplitSrc,
I));
602 if (Opcode == Instruction::BitCast)
615 Instruction::ExtractElement, VecTy, Index) +
629 assert(ISD &&
"Invalid opcode");
633 assert(CondTy &&
"CondTy must exist");
639 if (!(ValTy->
isVectorTy() && !LT.second.isVector()) &&
666 std::pair<unsigned, MVT>
LT =
678 unsigned Cost = LT.first;
709 assert(VT &&
"Expect a vector type for interleaved memory op");
712 assert(Factor > 1 && NumElts % Factor == 0 &&
"Invalid interleave factor");
714 unsigned NumSubElts = NumElts / Factor;
719 Opcode, VecTy, Alignment, AddressSpace);
729 auto ceil = [](
unsigned A,
unsigned B) {
return (A +
B - 1) /
B; };
749 unsigned NumLegalInsts = ceil(VecTySize, VecTyLTSize);
753 unsigned NumEltsPerLegalInst = ceil(NumElts, NumLegalInsts);
756 BitVector UsedInsts(NumLegalInsts,
false);
757 for (
unsigned Index : Indices)
758 for (
unsigned Elt = 0; Elt < NumSubElts; ++Elt)
759 UsedInsts.
set((Index + Elt * Factor) / NumEltsPerLegalInst);
763 Cost *= UsedInsts.
count() / NumLegalInsts;
778 "Interleaved memory op has too many members");
780 for (
unsigned Index : Indices) {
781 assert(Index < Factor &&
"Invalid index for interleaved memory op");
784 for (
unsigned i = 0; i < NumSubElts; i++)
785 Cost += static_cast<T *>(
this)->getVectorInstrCost(
786 Instruction::ExtractElement, VT, Index + i * Factor);
789 unsigned InsSubCost = 0;
790 for (
unsigned i = 0; i < NumSubElts; i++)
791 InsSubCost += static_cast<T *>(
this)->getVectorInstrCost(
792 Instruction::InsertElement, SubVT, i);
794 Cost += Indices.size() * InsSubCost;
805 unsigned ExtSubCost = 0;
806 for (
unsigned i = 0; i < NumSubElts; i++)
807 ExtSubCost += static_cast<T *>(
this)->getVectorInstrCost(
808 Instruction::ExtractElement, SubVT, i);
809 Cost += ExtSubCost * Factor;
811 for (
unsigned i = 0; i < NumElts; i++)
812 Cost += static_cast<T *>(
this)
813 ->getVectorInstrCost(Instruction::InsertElement, VT, i);
824 assert ((RetVF == 1 || VF == 1) &&
"VF > 1 and RetVF is a vector type");
831 Type *OpTy =
Op->getType();
842 unsigned ScalarizationCost = UINT_MAX;
843 if (RetVF > 1 || VF > 1) {
844 ScalarizationCost = 0;
850 return static_cast<T *
>(
this)->
853 case Intrinsic::masked_scatter: {
854 assert (VF == 1 &&
"Can't vectorize types here.");
856 bool VarMask = !isa<Constant>(
Mask);
857 unsigned Alignment = cast<ConstantInt>(Args[2])->getZExtValue();
864 case Intrinsic::masked_gather: {
865 assert (VF == 1 &&
"Can't vectorize types here.");
867 bool VarMask = !isa<Constant>(
Mask);
868 unsigned Alignment = cast<ConstantInt>(Args[1])->getZExtValue();
871 RetTy, Args[0], VarMask,
882 unsigned ScalarizationCostPassed = UINT_MAX) {
884 unsigned SingleCallCost = 10;
888 unsigned ScalarizationCost = ScalarizationCostPassed;
889 unsigned ScalarCalls = 1;
890 Type *ScalarRetTy = RetTy;
892 if (ScalarizationCostPassed == UINT_MAX)
898 for (
unsigned i = 0, ie = Tys.
size(); i != ie; ++i) {
901 if (ScalarizationCostPassed == UINT_MAX)
908 if (ScalarCalls == 1)
912 IID, ScalarRetTy, ScalarTys, FMF);
914 return ScalarCalls * ScalarCost + ScalarizationCost;
918 case Intrinsic::sqrt:
930 case Intrinsic::exp2:
936 case Intrinsic::log10:
939 case Intrinsic::log2:
942 case Intrinsic::fabs:
955 case Intrinsic::copysign:
958 case Intrinsic::floor:
961 case Intrinsic::ceil:
964 case Intrinsic::trunc:
967 case Intrinsic::nearbyint:
970 case Intrinsic::rint:
982 case Intrinsic::fmuladd:
986 case Intrinsic::lifetime_start:
987 case Intrinsic::lifetime_end:
989 case Intrinsic::masked_store:
990 return static_cast<T *
>(
this)
992 case Intrinsic::masked_load:
993 return static_cast<T *
>(
this)
995 case Intrinsic::ctpop:
1009 for (
unsigned ISD : ISDs) {
1011 if (IID == Intrinsic::fabs && TLI->
isFAbsFree(LT.second)) {
1030 auto MinLegalCostI = std::min_element(LegalCost.
begin(), LegalCost.
end());
1031 if (MinLegalCostI != LegalCost.
end())
1032 return *MinLegalCostI;
1034 auto MinCustomCostI = std::min_element(CustomCost.
begin(), CustomCost.
end());
1035 if (MinCustomCostI != CustomCost.
end())
1036 return *MinCustomCostI;
1040 if (IID == Intrinsic::fmuladd)
1041 return static_cast<T *
>(
this)
1043 static_cast<T *
>(
this)
1050 unsigned ScalarizationCost = ((ScalarizationCostPassed != UINT_MAX) ?
1054 for (
unsigned i = 0, ie = Tys.
size(); i != ie; ++i) {
1062 for (
unsigned i = 0, ie = Tys.
size(); i != ie; ++i) {
1063 if (Tys[i]->isVectorTy()) {
1064 if (ScalarizationCostPassed == UINT_MAX)
1066 ScalarCalls =
std::max(ScalarCalls, Tys[i]->getVectorNumElements());
1070 return ScalarCalls * ScalarCost + ScalarizationCost;
1074 return SingleCallCost;
1141 unsigned NumReduxLevels =
Log2_32(NumVecElts);
1142 unsigned ArithCost = 0;
1143 unsigned ShuffleCost = 0;
1144 auto *ConcreteTTI =
static_cast<T *
>(
this);
1145 std::pair<unsigned, MVT>
LT =
1146 ConcreteTTI->getTLI()->getTypeLegalizationCost(
DL, Ty);
1147 unsigned LongVectorCount = 0;
1149 LT.second.isVector() ? LT.second.getVectorNumElements() : 1;
1150 while (NumVecElts > MVTLen) {
1153 ShuffleCost += (IsPairwise + 1) *
1156 ArithCost += ConcreteTTI->getArithmeticInstrCost(Opcode, Ty);
1164 ShuffleCost += (NumReduxLevels - LongVectorCount) * (IsPairwise + 1) *
1167 ArithCost += (NumReduxLevels - LongVectorCount) *
1168 ConcreteTTI->getArithmeticInstrCost(Opcode, Ty);
void push_back(const T &Elt)
bool isSuitableForBitTests(unsigned NumDests, unsigned NumCmps, const APInt &Low, const APInt &High, const DataLayout &DL) const
Return true if lowering to a bit test is suitable for a set of case clusters which contains NumDests ...
A parsed version of the target data layout string in and methods for querying it. ...
FMINNUM/FMAXNUM - Perform floating-point minimum or maximum on two values.
This represents an addressing mode of: BaseGV + BaseOffs + BaseReg + Scale*ScaleReg If BaseGV is null...
virtual bool isZExtFree(Type *FromTy, Type *ToTy) const
Return true if any actual instruction that defines a value of type FromTy implicitly zero-extends the...
unsigned getIntrinsicInstrCost(Intrinsic::ID IID, Type *RetTy, ArrayRef< Value * > Args, FastMathFlags FMF, unsigned VF=1)
Get intrinsic cost based on arguments.
GCNRegPressure max(const GCNRegPressure &P1, const GCNRegPressure &P2)
iterator_range< CaseIt > cases()
Iteration adapter for range-for loops.
LegalizeTypeAction getTypeAction(LLVMContext &Context, EVT VT) const
Return how we should legalize values of this type, either it is already legal (return 'Legal') or we ...
bool isSuitableForJumpTable(const SwitchInst *SI, uint64_t NumCases, uint64_t Range) const
Return true if lowering to a jump table is suitable for a set of case clusters which may contain NumC...
unsigned getScalarizationOverhead(Type *Ty, bool Insert, bool Extract)
Estimate the overhead of scalarizing an instruction.
The main scalar evolution driver.
unsigned getIntrinsicCost(Intrinsic::ID IID, Type *RetTy, ArrayRef< Type * > ParamTys)
static uint64_t round(uint64_t Acc, uint64_t Input)
CaseIt case_begin()
Returns a read/write iterator that points to the first case in the SwitchInst.
virtual bool isFAbsFree(EVT VT) const
Return true if an fabs operation is free to the point where it is never worthwhile to replace it with...
virtual bool isLegalICmpImmediate(int64_t) const
Return true if the specified immediate is legal icmp immediate, that is the target has icmp instructi...
Type * getScalarType() const
If this is a vector type, return the element type, otherwise return 'this'.
BasicTTIImplBase(const TargetMachine *TM, const DataLayout &DL)
int getExtCost(const Instruction *I, const Value *Src)
const Function * getParent() const
Return the enclosing method, or null if none.
unsigned getOperandsScalarizationOverhead(ArrayRef< const Value * > Args, unsigned VF)
Estimate the overhead of scalarizing an instructions unique non-constant operands.
virtual bool allowsMisalignedMemoryAccesses(EVT, unsigned AddrSpace=0, unsigned Align=1, bool *=nullptr) const
Determine if the target supports unaligned memory accesses.
An instruction for reading from memory.
int getGEPCost(Type *PointeeType, const Value *Ptr, ArrayRef< const Value * > Operands)
bool isProfitableToHoist(Instruction *I)
unsigned getCallInstrCost(Function *F, Type *RetTy, ArrayRef< Type * > Tys)
Compute a cost of the given call instruction.
Base class which can be used to help build a TTI implementation.
unsigned getMaxInterleaveFactor(unsigned VF)
iterator begin()
Instruction iterator methods.
unsigned getAddressComputationCost(Type *Ty, ScalarEvolution *, const SCEV *)
virtual bool isLegalAddImmediate(int64_t) const
Return true if the specified immediate is legal add immediate, that is the target has add instruction...
unsigned getExtractWithExtendCost(unsigned Opcode, Type *Dst, VectorType *VecTy, unsigned Index)
int getScalingFactorCost(Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset, bool HasBaseReg, int64_t Scale, unsigned AddrSpace)
virtual bool isNoopAddrSpaceCast(unsigned SrcAS, unsigned DestAS) const
Returns true if a cast between SrcAS and DestAS is a noop.
unsigned getRegisterBitWidth(bool Vector) const
unsigned getJumpBufSize() const
Returns the target's jmp_buf size in bytes (if never set, the default is 200)
const MCSchedModel & getSchedModel() const
Get the machine model for this subtarget's CPU.
unsigned getStoreSize() const
Return the number of bytes overwritten by a store of the specified value type.
Type * getVectorElementType() const
BasicTTIImpl(const TargetMachine *ST, const Function &F)
int InstructionOpcodeToISD(unsigned Opcode) const
Get the ISD node that corresponds to the Instruction class opcode.
unsigned getInterleavedMemoryOpCost(unsigned Opcode, Type *VecTy, unsigned Factor, ArrayRef< unsigned > Indices, unsigned Alignment, unsigned AddressSpace)
unsigned getCmpSelInstrCost(unsigned Opcode, Type *ValTy, Type *CondTy, const Instruction *I)
unsigned getJumpBufSize()
unsigned getReductionCost(unsigned Opcode, Type *Ty, bool IsPairwise)
Try to calculate arithmetic and shuffle op costs for reduction operations.
unsigned getCastInstrCost(unsigned Opcode, Type *Dst, Type *Src, const Instruction *I=nullptr)
LLVMContext & getContext() const
Return the LLVMContext in which this type was uniqued.
Select with a vector condition (op #0) and two vector operands (ops #1 and #2), returning a vector re...
bool sgt(const APInt &RHS) const
Signed greather than comparison.
LegalizeAction getTruncStoreAction(EVT ValVT, EVT MemVT) const
Return how this store with truncation should be treated: either it is legal, needs to be promoted to ...
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
EVT getValueType(const DataLayout &DL, Type *Ty, bool AllowUnknown=false) const
Return the EVT corresponding to this LLVM type.
bool isOperationLegalOrPromote(unsigned Op, EVT VT) const
Return true if the specified operation is legal on this target or can be made legal using promotion...
Type * getElementType() const
size_t size() const
size - Get the array size.
LegalizeAction getLoadExtAction(unsigned ExtType, EVT ValVT, EVT MemVT) const
Return how this load with extension should be treated: either it is legal, needs to be promoted to a ...
unsigned getFPOpCost(Type *Ty)
bool isTruncateFree(Type *Ty1, Type *Ty2)
bool isTypeLegal(EVT VT) const
Return true if the target has native support for the specified value type.
void getUnrollingPreferences(Loop *L, ScalarEvolution &SE, TTI::UnrollingPreferences &UP)
size_type count() const
count - Returns the number of bits which are set.
Concrete BasicTTIImpl that can be used if no further customization is needed.
LLVM Basic Block Representation.
The instances of the Type class are immutable: once they are created, they are never changed...
This is an important class for using LLVM in a threaded context.
bool isVectorTy() const
True if this is an instance of VectorType.
bool isOperationLegalOrCustom(unsigned Op, EVT VT) const
Return true if the specified operation is legal on this target or can be made legal with custom lower...
LLVM_ATTRIBUTE_ALWAYS_INLINE iterator begin()
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
bool areJTsAllowed(const Function *Fn) const
Return true if lowering to a jump table is allowed.
std::pair< iterator, bool > insert(PtrType Ptr)
Inserts Ptr if and only if there is no element in the container equal to Ptr.
uint64_t getNumElements() const
bool isLegalAddressingMode(Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset, bool HasBaseReg, int64_t Scale, unsigned AddrSpace)
unsigned getNumberOfParts(Type *Tp)
bool empty() const
empty - Check if the array is empty.
virtual int getScalingFactorCost(const DataLayout &DL, const AddrMode &AM, Type *Ty, unsigned AS=0) const
Return the cost of the scaling factor used in the addressing mode represented by AM for this target...
static wasm::ValType getType(const TargetRegisterClass *RC)
bool isFoldableMemAccessOffset(Instruction *I, int64_t Offset)
bool isFPOrFPVectorTy() const
Return true if this is a FP type or a vector of FP.
bool isLoadExtLegal(unsigned ExtType, EVT ValVT, EVT MemVT) const
Return true if the specified load with extension is legal on this target.
LLVM_READONLY APFloat maxnum(const APFloat &A, const APFloat &B)
Implements IEEE maxNum semantics.
bool isLegalAddImmediate(int64_t imm)
This base class for TargetLowering contains the SelectionDAG-independent parts that can be used from ...
unsigned getIntrinsicInstrCost(Intrinsic::ID IID, Type *RetTy, ArrayRef< Type * > Tys, FastMathFlags FMF, unsigned ScalarizationCostPassed=UINT_MAX)
Get intrinsic cost based on argument types.
LegalizeAction
This enum indicates whether operations are valid for a target, and if not, what action should be used...
unsigned getCFInstrCost(unsigned Opcode)
unsigned getShuffleCost(TTI::ShuffleKind Kind, Type *Tp, int Index, Type *SubTp)
unsigned getNumberOfRegisters(bool Vector)
Iterator for intrusive lists based on ilist_node.
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements...
unsigned getArithmeticInstrCost(unsigned Opcode, Type *Ty, TTI::OperandValueKind Opd1Info=TTI::OK_AnyValue, TTI::OperandValueKind Opd2Info=TTI::OK_AnyValue, TTI::OperandValueProperties Opd1PropInfo=TTI::OP_None, TTI::OperandValueProperties Opd2PropInfo=TTI::OP_None, ArrayRef< const Value * > Args=ArrayRef< const Value * >())
unsigned getVectorSplitCost()
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
cl::opt< unsigned > PartialUnrollingThreshold
virtual bool isProfitableToHoist(Instruction *I) const
unsigned Log2_32(uint32_t Value)
Return the floor log base 2 of the specified value, -1 if the value is zero.
unsigned getScalarizationOverhead(Type *VecTy, ArrayRef< const Value * > Args)
Class to represent vector types.
Class for arbitrary precision integers.
Select(COND, TRUEVAL, FALSEVAL).
std::pair< int, MVT > getTypeLegalizationCost(const DataLayout &DL, Type *Ty) const
Estimate the cost of type-legalization and the legalized type.
unsigned getVectorNumElements() const
std::vector< BlockT * >::const_iterator block_iterator
unsigned getMemoryOpCost(unsigned Opcode, Type *Src, unsigned Alignment, unsigned AddressSpace, const Instruction *I=nullptr)
unsigned LoopMicroOpBufferSize
FCOPYSIGN(X, Y) - Return the value of X with the sign of Y.
bool isAlwaysUniform(const Value *V)
FMINNAN/FMAXNAN - Behave identically to FMINNUM/FMAXNUM, except that when a single input is NaN...
unsigned getFlatAddressSpace()
llvm_unreachable("Unknown RegBank!")
TargetSubtargetInfo - Generic base class for all target subtargets.
block_iterator block_end() const
BR_JT - Jumptable branch.
LLVM_ATTRIBUTE_ALWAYS_INLINE iterator end()
unsigned getIntrinsicCost(Intrinsic::ID IID, Type *RetTy, ArrayRef< const Value * > Arguments)
unsigned getOperationCost(unsigned Opcode, Type *Ty, Type *OpTy)
This class represents an analyzed expression in the program.
bool allowsMisalignedMemoryAccesses(LLVMContext &Context, unsigned BitWidth, unsigned AddressSpace, unsigned Alignment, bool *Fast) const
bool hasBranchDivergence()
unsigned getJumpBufAlignment() const
Returns the target's jmp_buf alignment in bytes (if never set, the default is 0)
Represents a single loop in the control flow graph.
virtual bool isLegalAddressingMode(const DataLayout &DL, const AddrMode &AM, Type *Ty, unsigned AddrSpace) const
Return true if the addressing mode represented by AM is legal for this target, for a load/store of th...
unsigned getJumpBufAlignment()
bool shouldBuildLookupTables()
Establish a view to a call site for examination.
unsigned getPointerSizeInBits(unsigned AS=0) const
Layout pointer size, in bits FIXME: The defaults need to be removed once all of the backends/clients ...
unsigned getInliningThresholdMultiplier()
Fast - This calling convention attempts to make calls as fast as possible (e.g.
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
unsigned getVectorInstrCost(unsigned Opcode, Type *Val, unsigned Index)
uint64_t getTypeStoreSize(Type *Ty) const
Returns the maximum number of bytes that may be overwritten by storing the specified type...
virtual bool isFoldableMemAccessOffset(Instruction *I, int64_t Offset) const
static EVT getEVT(Type *Ty, bool HandleUnknown=false)
Return the value type corresponding to the specified type.
unsigned getNumCases() const
Return the number of 'cases' in this switch instruction, excluding the default case.
bool isLSRCostLess(TTI::LSRCost C1, TTI::LSRCost C2)
unsigned getEstimatedNumberOfCaseClusters(const SwitchInst &SI, unsigned &JumpTableSize)
virtual bool isTruncateFree(Type *FromTy, Type *ToTy) const
Return true if it's free to truncate a value of type FromTy to type ToTy.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
FunTy * getCalledFunction() const
Return the function being called if this is a direct call, otherwise return null (if it's an indirect...
bool isSourceOfDivergence(const Value *V)
unsigned getPrimitiveSizeInBits() const LLVM_READONLY
Return the basic size of this type if it is a primitive type.
LLVM Value Representation.
FMA - Perform a * b + c with no intermediate rounding step.
static VectorType * get(Type *ElementType, unsigned NumElements)
This static method is the primary way to construct an VectorType.
std::underlying_type< E >::type Mask()
Get a bitmask with 1s in all places up to the high-order bit of E's largest value.
bool isOperationExpand(unsigned Op, EVT VT) const
Return true if the specified operation is illegal on this target or unlikely to be made legal with cu...
Primary interface to the complete machine description for the target machine.
bool isTypeLegal(Type *Ty)
block_iterator block_begin() const
Convenience struct for specifying and reasoning about fast-math flags.
bool haveFastSqrt(Type *Ty)
bool isLegalICmpImmediate(int64_t imm)
unsigned getPointerAddressSpace() const
Get the address space of this pointer or pointer vector type.
static EVT getIntegerVT(LLVMContext &Context, unsigned BitWidth)
Returns the EVT that represents an integer with the given number of bits.
const BasicBlock * getParent() const
LLVM_READONLY APFloat minnum(const APFloat &A, const APFloat &B)
Implements IEEE minNum semantics.
bool noNaNs() const
Flag queries.
This file describes how to lower LLVM code to machine code.
bool isVoidTy() const
Return true if this is 'void'.
bool slt(const APInt &RHS) const
Signed less than comparison.