aboutsummaryrefslogtreecommitdiff
path: root/lib/Target
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2012-12-23 07:23:55 +0000
committerNadav Rotem <nrotem@apple.com>2012-12-23 07:23:55 +0000
commitd54fed27865dcbc69932e1e6c372bb5a932e662a (patch)
tree7696f8df2fe3099cef1cdac82f3485da5eae252d /lib/Target
parentc4265e1d68a88791a004224aac7af9e914a0d411 (diff)
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
Diffstat (limited to 'lib/Target')
-rw-r--r--lib/Target/TargetTransformImpl.cpp10
-rw-r--r--lib/Target/X86/X86ISelLowering.cpp1
2 files changed, 2 insertions, 9 deletions
diff --git a/lib/Target/TargetTransformImpl.cpp b/lib/Target/TargetTransformImpl.cpp
index 4320437020..1f568506d9 100644
--- a/lib/Target/TargetTransformImpl.cpp
+++ b/lib/Target/TargetTransformImpl.cpp
@@ -132,7 +132,6 @@ int VectorTargetTransformImpl::InstructionOpcodeToISD(unsigned Opcode) const {
std::pair<unsigned, MVT>
VectorTargetTransformImpl::getTypeLegalizationCost(Type *Ty) const {
-
LLVMContext &C = Ty->getContext();
EVT MTy = TLI->getValueType(Ty);
@@ -271,7 +270,7 @@ unsigned VectorTargetTransformImpl::getCastInstrCost(unsigned Opcode, Type *Dst,
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::getCastInstrCost(unsigned Opcode, Type *Dst,
}
unsigned VectorTargetTransformImpl::getCFInstrCost(unsigned Opcode) const {
+ // Branches are assumed to be predicted.
return 0;
}
@@ -331,12 +331,6 @@ unsigned VectorTargetTransformImpl::getVectorInstrCost(unsigned Opcode,
}
unsigned
-VectorTargetTransformImpl::getInstrCost(unsigned Opcode, Type *Ty1,
- Type *Ty2) const {
- return 1;
-}
-
-unsigned
VectorTargetTransformImpl::getMemoryOpCost(unsigned Opcode, Type *Src,
unsigned Alignment,
unsigned AddressSpace) const {
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp
index 262475e97f..b53a023a81 100644
--- a/lib/Target/X86/X86ISelLowering.cpp
+++ b/lib/Target/X86/X86ISelLowering.cpp
@@ -17988,7 +17988,6 @@ X86VectorTargetTransformInfo::getArithmeticInstrCost(unsigned Opcode,
return VectorTargetTransformImpl::getArithmeticInstrCost(Opcode, Ty);
}
-
unsigned
X86VectorTargetTransformInfo::getMemoryOpCost(unsigned Opcode, Type *Src,
unsigned Alignment,