[llvm] 426f375 - [TTI][X86] Add X86TTIImpl::getScalarizationOverhead implementation.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 14 05:06:50 PDT 2020
Author: Simon Pilgrim
Date: 2020-04-14T12:58:19+01:00
New Revision: 426f37584ec331187583ee167c156b211f35caf2
URL: https://github.com/llvm/llvm-project/commit/426f37584ec331187583ee167c156b211f35caf2
DIFF: https://github.com/llvm/llvm-project/commit/426f37584ec331187583ee167c156b211f35caf2.diff
LOG: [TTI][X86] Add X86TTIImpl::getScalarizationOverhead implementation.
This is a currently just a wrapper to the base type, I'll be adding ISD::BUILD_VECTOR costs in a future patch.
Added:
Modified:
llvm/lib/Target/X86/X86TargetTransformInfo.cpp
llvm/lib/Target/X86/X86TargetTransformInfo.h
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86TargetTransformInfo.cpp b/llvm/lib/Target/X86/X86TargetTransformInfo.cpp
index c7df5ae69c5a..628154be0f68 100644
--- a/llvm/lib/Target/X86/X86TargetTransformInfo.cpp
+++ b/llvm/lib/Target/X86/X86TargetTransformInfo.cpp
@@ -2590,6 +2590,11 @@ int X86TTIImpl::getVectorInstrCost(unsigned Opcode, Type *Val, unsigned Index) {
return BaseT::getVectorInstrCost(Opcode, Val, Index) + RegisterFileMoveCost;
}
+unsigned X86TTIImpl::getScalarizationOverhead(Type *Ty, bool Insert,
+ bool Extract) {
+ return BaseT::getScalarizationOverhead(Ty, Insert, Extract);
+}
+
int X86TTIImpl::getMemoryOpCost(unsigned Opcode, Type *Src,
MaybeAlign Alignment, unsigned AddressSpace,
const Instruction *I) {
diff --git a/llvm/lib/Target/X86/X86TargetTransformInfo.h b/llvm/lib/Target/X86/X86TargetTransformInfo.h
index 30698ea51c84..9cbaae5e58b2 100644
--- a/llvm/lib/Target/X86/X86TargetTransformInfo.h
+++ b/llvm/lib/Target/X86/X86TargetTransformInfo.h
@@ -133,6 +133,7 @@ class X86TTIImpl : public BasicTTIImplBase<X86TTIImpl> {
int getCmpSelInstrCost(unsigned Opcode, Type *ValTy, Type *CondTy,
const Instruction *I = nullptr);
int getVectorInstrCost(unsigned Opcode, Type *Val, unsigned Index);
+ unsigned getScalarizationOverhead(Type *Ty, bool Insert, bool Extract);
int getMemoryOpCost(unsigned Opcode, Type *Src, MaybeAlign Alignment,
unsigned AddressSpace, const Instruction *I = nullptr);
int getMaskedMemoryOpCost(unsigned Opcode, Type *Src, unsigned Alignment,
More information about the llvm-commits
mailing list