diff options
| author | Nadav Rotem <nrotem@apple.com> | 2012-12-23 07:23:55 +0000 |
|---|---|---|
| committer | Nadav Rotem <nrotem@apple.com> | 2012-12-23 07:23:55 +0000 |
| commit | 2cade68025a29feb887212941f6ba7c3d8a37881 (patch) | |
| tree | 8cf191e8d0b5b2364a536b5b382b4c85b04c2876 /llvm/lib/Target | |
| parent | fe25144e6819d8ac47658afce4789c6029d7ad5c (diff) | |
| download | bcm5719-llvm-2cade68025a29feb887212941f6ba7c3d8a37881.tar.gz bcm5719-llvm-2cade68025a29feb887212941f6ba7c3d8a37881.zip | |
Loop Vectorizer: Update the cost model of scatter/gather operations and make
them more expensive.
llvm-svn: 170995
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/TargetTransformImpl.cpp | 10 | ||||
| -rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 1 |
2 files changed, 2 insertions, 9 deletions
diff --git a/llvm/lib/Target/TargetTransformImpl.cpp b/llvm/lib/Target/TargetTransformImpl.cpp index 43204370202..1f568506d9a 100644 --- a/llvm/lib/Target/TargetTransformImpl.cpp +++ b/llvm/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/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 262475e97fc..b53a023a81b 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/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, |

