Loop Vectorizer: Update the cost model of scatter/gather operations and make
them more expensive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170995 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/TargetTransformImpl.cpp b/lib/Target/TargetTransformImpl.cpp
index 4320437..1f56850 100644
--- a/lib/Target/TargetTransformImpl.cpp
+++ b/lib/Target/TargetTransformImpl.cpp
@@ -132,7 +132,6 @@
std::pair<unsigned, MVT>
VectorTargetTransformImpl::getTypeLegalizationCost(Type *Ty) const {
-
LLVMContext &C = Ty->getContext();
EVT MTy = TLI->getValueType(Ty);
@@ -271,7 +270,7 @@
return getScalarizationOverhead(Dst, true, true) + Num * Cost;
}
- // We already handled vector-to-vector and scalar-to-scalar conversions. This
+ // We already handled vector-to-vector and scalar-to-scalar conversions. This
// is where we handle bitcast between vectors and scalars. We need to assume
// that the conversion is scalarized in one way or another.
if (Opcode == Instruction::BitCast)
@@ -283,6 +282,7 @@
}
unsigned VectorTargetTransformImpl::getCFInstrCost(unsigned Opcode) const {
+ // Branches are assumed to be predicted.
return 0;
}
@@ -331,12 +331,6 @@
}
unsigned
-VectorTargetTransformImpl::getInstrCost(unsigned Opcode, Type *Ty1,
- Type *Ty2) const {
- return 1;
-}
-
-unsigned
VectorTargetTransformImpl::getMemoryOpCost(unsigned Opcode, Type *Src,
unsigned Alignment,
unsigned AddressSpace) const {