aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/TargetTransformInfo.cpp
diff options
context:
space:
mode:
authorElena Demikhovsky <elena.demikhovsky@intel.com>2015-10-25 15:37:55 +0000
committerElena Demikhovsky <elena.demikhovsky@intel.com>2015-10-25 15:37:55 +0000
commit092858588a1c7f5019756e3cc75539396088b348 (patch)
treef9c57213eb27b41bcc3fd6eac6a64cc529019f8c /llvm/lib/Analysis/TargetTransformInfo.cpp
parentbe187a0a1a7754f4e07547ce969c27fcc973f2ce (diff)
downloadllvm-092858588a1c7f5019756e3cc75539396088b348.zip
llvm-092858588a1c7f5019756e3cc75539396088b348.tar.gz
llvm-092858588a1c7f5019756e3cc75539396088b348.tar.bz2
Scalarizer for masked.gather and masked.scatter intrinsics.
When the target does not support these intrinsics they should be converted to a chain of scalar load or store operations. If the mask is not constant, the scalarizer will build a chain of conditional basic blocks. I added isLegalMaskedGather() isLegalMaskedScatter() APIs. Differential Revision: http://reviews.llvm.org/D13722 llvm-svn: 251237
Diffstat (limited to 'llvm/lib/Analysis/TargetTransformInfo.cpp')
-rw-r--r--llvm/lib/Analysis/TargetTransformInfo.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/TargetTransformInfo.cpp b/llvm/lib/Analysis/TargetTransformInfo.cpp
index 427e1ed..f82af75 100644
--- a/llvm/lib/Analysis/TargetTransformInfo.cpp
+++ b/llvm/lib/Analysis/TargetTransformInfo.cpp
@@ -121,6 +121,14 @@ bool TargetTransformInfo::isLegalMaskedLoad(Type *DataType) const {
return TTIImpl->isLegalMaskedLoad(DataType);
}
+bool TargetTransformInfo::isLegalMaskedGather(Type *DataType) const {
+ return TTIImpl->isLegalMaskedGather(DataType);
+}
+
+bool TargetTransformInfo::isLegalMaskedScatter(Type *DataType) const {
+ return TTIImpl->isLegalMaskedGather(DataType);
+}
+
int TargetTransformInfo::getScalingFactorCost(Type *Ty, GlobalValue *BaseGV,
int64_t BaseOffset,
bool HasBaseReg,