aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/TargetTransformImpl.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Target/TargetTransformImpl.cpp b/lib/Target/TargetTransformImpl.cpp
index c8bd80ea25..3bf4bf72e1 100644
--- a/lib/Target/TargetTransformImpl.cpp
+++ b/lib/Target/TargetTransformImpl.cpp
@@ -196,3 +196,11 @@ VectorTargetTransformImpl::getMemoryOpCost(unsigned Opcode, Type *Src,
// Assume that all loads of legal types cost 1.
return LT.first;
}
+
+unsigned
+VectorTargetTransformImpl::getNumberOfParts(Type *Tp) const {
+ std::pair<unsigned, EVT> LT =
+ getTypeLegalizationCost(Tp->getContext(), TLI->getValueType(Tp));
+ return LT.first;
+}
+