summaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86TargetTransformInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/X86/X86TargetTransformInfo.h')
-rw-r--r--lib/Target/X86/X86TargetTransformInfo.h25
1 files changed, 22 insertions, 3 deletions
diff --git a/lib/Target/X86/X86TargetTransformInfo.h b/lib/Target/X86/X86TargetTransformInfo.h
index ad0a0a2113012..6f01a6fd11df3 100644
--- a/lib/Target/X86/X86TargetTransformInfo.h
+++ b/lib/Target/X86/X86TargetTransformInfo.h
@@ -21,7 +21,7 @@
#include "X86TargetMachine.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/CodeGen/BasicTTIImpl.h"
-#include "llvm/Target/TargetLowering.h"
+#include "llvm/CodeGen/TargetLowering.h"
namespace llvm {
@@ -47,6 +47,14 @@ public:
/// @}
+ /// \name Cache TTI Implementation
+ /// @{
+ llvm::Optional<unsigned> getCacheSize(
+ TargetTransformInfo::CacheLevel Level) const;
+ llvm::Optional<unsigned> getCacheAssociativity(
+ TargetTransformInfo::CacheLevel Level) const;
+ /// @}
+
/// \name Vector TTI Implementations
/// @{
@@ -85,7 +93,11 @@ public:
ArrayRef<Value *> Args, FastMathFlags FMF,
unsigned VF = 1);
- int getReductionCost(unsigned Opcode, Type *Ty, bool IsPairwiseForm);
+ int getArithmeticReductionCost(unsigned Opcode, Type *Ty,
+ bool IsPairwiseForm);
+
+ int getMinMaxReductionCost(Type *Ty, Type *CondTy, bool IsPairwiseForm,
+ bool IsUnsigned);
int getInterleavedMemoryOpCost(unsigned Opcode, Type *VecTy,
unsigned Factor, ArrayRef<unsigned> Indices,
@@ -101,16 +113,23 @@ public:
int getIntImmCost(const APInt &Imm, Type *Ty);
+ unsigned getUserCost(const User *U, ArrayRef<const Value *> Operands);
+
int getIntImmCost(unsigned Opcode, unsigned Idx, const APInt &Imm, Type *Ty);
int getIntImmCost(Intrinsic::ID IID, unsigned Idx, const APInt &Imm,
Type *Ty);
+ bool isLSRCostLess(TargetTransformInfo::LSRCost &C1,
+ TargetTransformInfo::LSRCost &C2);
bool isLegalMaskedLoad(Type *DataType);
bool isLegalMaskedStore(Type *DataType);
bool isLegalMaskedGather(Type *DataType);
bool isLegalMaskedScatter(Type *DataType);
+ bool hasDivRemOp(Type *DataType, bool IsSigned);
+ bool isFCmpOrdCheaperThanFCmpZero(Type *Ty);
bool areInlineCompatible(const Function *Caller,
const Function *Callee) const;
- bool expandMemCmp(Instruction *I, unsigned &MaxLoadSize);
+ const TTI::MemCmpExpansionOptions *enableMemCmpExpansion(
+ bool IsZeroCmp) const;
bool enableInterleavedAccessVectorization();
private:
int getGSScalarCost(unsigned Opcode, Type *DataTy, bool VariableMask,