Changeset View
Changeset View
Standalone View
Standalone View
llvm/include/llvm/Analysis/TargetTransformInfo.h
Show First 20 Lines • Show All 782 Lines • ▼ Show 20 Lines | public: | |||||||||
/// If target has efficient vector element load/store instructions, it can | /// If target has efficient vector element load/store instructions, it can | |||||||||
/// return true here so that insertion/extraction costs are not added to | /// return true here so that insertion/extraction costs are not added to | |||||||||
/// the scalarization cost of a load/store. | /// the scalarization cost of a load/store. | |||||||||
bool supportsEfficientVectorElementLoadStore() const; | bool supportsEfficientVectorElementLoadStore() const; | |||||||||
/// If the target supports tail calls. | /// If the target supports tail calls. | |||||||||
bool supportsTailCalls() const; | bool supportsTailCalls() const; | |||||||||
/// If target supports tail call on \p CB | ||||||||||
bool supportsTailCallFor(const CallBase *CB) const; | ||||||||||
ChuanqiXuUnsubmitted Done ReplyInline Actions
ChuanqiXu: | ||||||||||
/// Don't restrict interleaved unrolling to small loops. | /// Don't restrict interleaved unrolling to small loops. | |||||||||
bool enableAggressiveInterleaving(bool LoopHasReductions) const; | bool enableAggressiveInterleaving(bool LoopHasReductions) const; | |||||||||
/// Returns options for expansion of memcmp. IsZeroCmp is | /// Returns options for expansion of memcmp. IsZeroCmp is | |||||||||
// true if this is the expansion of memcmp(p1, p2, s) == 0. | // true if this is the expansion of memcmp(p1, p2, s) == 0. | |||||||||
struct MemCmpExpansionOptions { | struct MemCmpExpansionOptions { | |||||||||
// Return true if memcmp expansion is enabled. | // Return true if memcmp expansion is enabled. | |||||||||
operator bool() const { return MaxNumLoads > 0; } | operator bool() const { return MaxNumLoads > 0; } | |||||||||
▲ Show 20 Lines • Show All 858 Lines • ▼ Show 20 Lines | virtual InstructionCost getScalarizationOverhead(VectorType *Ty, | |||||||||
const APInt &DemandedElts, | const APInt &DemandedElts, | |||||||||
bool Insert, | bool Insert, | |||||||||
bool Extract) = 0; | bool Extract) = 0; | |||||||||
virtual InstructionCost | virtual InstructionCost | |||||||||
getOperandsScalarizationOverhead(ArrayRef<const Value *> Args, | getOperandsScalarizationOverhead(ArrayRef<const Value *> Args, | |||||||||
ArrayRef<Type *> Tys) = 0; | ArrayRef<Type *> Tys) = 0; | |||||||||
virtual bool supportsEfficientVectorElementLoadStore() = 0; | virtual bool supportsEfficientVectorElementLoadStore() = 0; | |||||||||
virtual bool supportsTailCalls() = 0; | virtual bool supportsTailCalls() = 0; | |||||||||
virtual bool supportsTailCallFor(const CallBase *CB) = 0; | ||||||||||
virtual bool enableAggressiveInterleaving(bool LoopHasReductions) = 0; | virtual bool enableAggressiveInterleaving(bool LoopHasReductions) = 0; | |||||||||
virtual MemCmpExpansionOptions | virtual MemCmpExpansionOptions | |||||||||
enableMemCmpExpansion(bool OptSize, bool IsZeroCmp) const = 0; | enableMemCmpExpansion(bool OptSize, bool IsZeroCmp) const = 0; | |||||||||
virtual bool enableInterleavedAccessVectorization() = 0; | virtual bool enableInterleavedAccessVectorization() = 0; | |||||||||
virtual bool enableMaskedInterleavedAccessVectorization() = 0; | virtual bool enableMaskedInterleavedAccessVectorization() = 0; | |||||||||
virtual bool isFPVectorizationPotentiallyUnsafe() = 0; | virtual bool isFPVectorizationPotentiallyUnsafe() = 0; | |||||||||
virtual bool allowsMisalignedMemoryAccesses(LLVMContext &Context, | virtual bool allowsMisalignedMemoryAccesses(LLVMContext &Context, | |||||||||
unsigned BitWidth, | unsigned BitWidth, | |||||||||
▲ Show 20 Lines • Show All 458 Lines • ▼ Show 20 Lines | getOperandsScalarizationOverhead(ArrayRef<const Value *> Args, | |||||||||
return Impl.getOperandsScalarizationOverhead(Args, Tys); | return Impl.getOperandsScalarizationOverhead(Args, Tys); | |||||||||
} | } | |||||||||
bool supportsEfficientVectorElementLoadStore() override { | bool supportsEfficientVectorElementLoadStore() override { | |||||||||
return Impl.supportsEfficientVectorElementLoadStore(); | return Impl.supportsEfficientVectorElementLoadStore(); | |||||||||
} | } | |||||||||
bool supportsTailCalls() override { return Impl.supportsTailCalls(); } | bool supportsTailCalls() override { return Impl.supportsTailCalls(); } | |||||||||
bool supportsTailCallFor(const CallBase *CB) override { | ||||||||||
return Impl.supportsTailCallFor(CB); | ||||||||||
} | ||||||||||
bool enableAggressiveInterleaving(bool LoopHasReductions) override { | bool enableAggressiveInterleaving(bool LoopHasReductions) override { | |||||||||
return Impl.enableAggressiveInterleaving(LoopHasReductions); | return Impl.enableAggressiveInterleaving(LoopHasReductions); | |||||||||
} | } | |||||||||
MemCmpExpansionOptions enableMemCmpExpansion(bool OptSize, | MemCmpExpansionOptions enableMemCmpExpansion(bool OptSize, | |||||||||
bool IsZeroCmp) const override { | bool IsZeroCmp) const override { | |||||||||
return Impl.enableMemCmpExpansion(OptSize, IsZeroCmp); | return Impl.enableMemCmpExpansion(OptSize, IsZeroCmp); | |||||||||
} | } | |||||||||
▲ Show 20 Lines • Show All 490 Lines • Show Last 20 Lines |