16#ifndef LLVM_LIB_TARGET_SPIRV_SPIRVTARGETTRANSFORMINFO_H
17#define LLVM_LIB_TARGET_SPIRV_SPIRVTARGETTRANSFORMINFO_H
40 TLI(ST->getTargetLowering()) {}
56 return ST->isShader() ? 0 : 4;
61 Value *NewV)
const override;
69 unsigned Opcode,
Type *InputTypeA,
Type *InputTypeB,
Type *AccumType,
73 std::optional<FastMathFlags> FMF)
const override {
This file provides a helper that implements much of the TTI interface in terms of the target-independ...
static cl::opt< OutputCostKind > CostKind("cost-kind", cl::desc("Target cost kind"), cl::init(OutputCostKind::RecipThroughput), cl::values(clEnumValN(OutputCostKind::RecipThroughput, "throughput", "Reciprocal throughput"), clEnumValN(OutputCostKind::Latency, "latency", "Instruction latency"), clEnumValN(OutputCostKind::CodeSize, "code-size", "Code size"), clEnumValN(OutputCostKind::SizeAndLatency, "size-latency", "Code size and latency"), clEnumValN(OutputCostKind::All, "all", "Print all cost kinds")))
uint64_t IntrinsicInst * II
BasicTTIImplBase(const TargetMachine *TM, const DataLayout &DL)
static InstructionCost getInvalid(CostType Val=0)
A wrapper class for inspecting calls to intrinsic functions.
Value * rewriteIntrinsicWithAddressSpace(IntrinsicInst *II, Value *OldV, Value *NewV) const override
TTI::PopcntSupportKind getPopcntSupport(unsigned TyWidth) const override
bool isLegalMaskedScatter(Type *DataType, Align Alignment) const override
bool collectFlatAddressOperands(SmallVectorImpl< int > &OpIndexes, Intrinsic::ID IID) const override
SPIRVTTIImpl(const SPIRVTargetMachine *TM, const Function &F)
bool isLegalMaskedGather(Type *DataType, Align Alignment) const override
InstructionCost getPartialReductionCost(unsigned Opcode, Type *InputTypeA, Type *InputTypeB, Type *AccumType, ElementCount VF, TTI::PartialReductionExtendKind OpAExtend, TTI::PartialReductionExtendKind OpBExtend, std::optional< unsigned > BinOp, TTI::TargetCostKind CostKind, std::optional< FastMathFlags > FMF) const override
unsigned getFlatAddressSpace() const override
bool allowVectorElementIndexingUsingGEP() const override
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
TargetSubtargetInfo - Generic base class for all target subtargets.
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM Value Representation.
This is an optimization pass for GlobalISel generic memory operations.
constexpr bool isPowerOf2_32(uint32_t Value)
Return true if the argument is a power of two > 0.
This struct is a compact representation of a valid (non-zero power of two) alignment.