From 102a7c088c16b8bbed7cf56da9994fa52a9028c5 Mon Sep 17 00:00:00 2001 From: Hal Finkel Date: Fri, 26 Oct 2012 04:28:02 +0000 Subject: Add VectorTargetTransform::getNumberOfParts. As discussed on IRC, add VectorTargetTransform::getNumberOfParts to provide a stable interface to the vector legalization splitting factor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166751 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Target/TargetTransformImpl.h | 2 ++ include/llvm/TargetTransformInfo.h | 5 +++++ 2 files changed, 7 insertions(+) (limited to 'include') diff --git a/include/llvm/Target/TargetTransformImpl.h b/include/llvm/Target/TargetTransformImpl.h index 25a7ede..133be87 100644 --- a/include/llvm/Target/TargetTransformImpl.h +++ b/include/llvm/Target/TargetTransformImpl.h @@ -68,6 +68,8 @@ public: virtual unsigned getMemoryOpCost(unsigned Opcode, Type *Src, unsigned Alignment, unsigned AddressSpace) const; + + virtual unsigned getNumberOfParts(Type *Tp) const; }; } // end llvm namespace diff --git a/include/llvm/TargetTransformInfo.h b/include/llvm/TargetTransformInfo.h index 96470c3..71c78ec 100644 --- a/include/llvm/TargetTransformInfo.h +++ b/include/llvm/TargetTransformInfo.h @@ -156,6 +156,11 @@ public: return 1; } + /// Returns the number of pieces into which the provided type must be + /// split during legalization. Zero is returned when the answer is unknown. + virtual unsigned getNumberOfParts(Type *Tp) const { + return 0; + } }; } // End llvm namespace -- cgit v1.1