diff options
author | Jonas Paulsson <paulsson@linux.vnet.ibm.com> | 2017-03-14 06:35:36 +0000 |
---|---|---|
committer | Jonas Paulsson <paulsson@linux.vnet.ibm.com> | 2017-03-14 06:35:36 +0000 |
commit | a48ea231c06e97ce518cace0fb9b1c1da71977dc (patch) | |
tree | 07214834bd1b8c17d6263f9a1eaeb1e072b09c1c /llvm/lib/Target/X86/X86TargetTransformInfo.h | |
parent | 9d50e187cd4f0f74010eddea7d2fb6b77139b2b1 (diff) | |
download | bcm5719-llvm-a48ea231c06e97ce518cace0fb9b1c1da71977dc.tar.gz bcm5719-llvm-a48ea231c06e97ce518cace0fb9b1c1da71977dc.zip |
[TargetTransformInfo] getIntrinsicInstrCost() scalarization estimation improved
getIntrinsicInstrCost() used to only compute scalarization cost based on types.
This patch improves this so that the actual arguments are checked when they are
available, in order to handle only unique non-constant operands.
Tests updates:
Analysis/CostModel/X86/arith-fp.ll
Transforms/LoopVectorize/AArch64/interleaved_cost.ll
Transforms/LoopVectorize/ARM/interleaved_cost.ll
The improvement in getOperandsScalarizationOverhead() to differentiate on
constants made it necessary to update the interleaved_cost.ll tests even
though they do not relate to intrinsics.
Review: Hal Finkel
https://reviews.llvm.org/D29540
llvm-svn: 297705
Diffstat (limited to 'llvm/lib/Target/X86/X86TargetTransformInfo.h')
-rw-r--r-- | llvm/lib/Target/X86/X86TargetTransformInfo.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86TargetTransformInfo.h b/llvm/lib/Target/X86/X86TargetTransformInfo.h index 63a1493002f..0622fcf2815 100644 --- a/llvm/lib/Target/X86/X86TargetTransformInfo.h +++ b/llvm/lib/Target/X86/X86TargetTransformInfo.h @@ -74,9 +74,11 @@ public: const SCEV *Ptr); int getIntrinsicInstrCost(Intrinsic::ID IID, Type *RetTy, - ArrayRef<Type *> Tys, FastMathFlags FMF); + ArrayRef<Type *> Tys, FastMathFlags FMF, + unsigned ScalarizationCostPassed = UINT_MAX); int getIntrinsicInstrCost(Intrinsic::ID IID, Type *RetTy, - ArrayRef<Value *> Args, FastMathFlags FMF); + ArrayRef<Value *> Args, FastMathFlags FMF, + unsigned VF = 1); int getReductionCost(unsigned Opcode, Type *Ty, bool IsPairwiseForm); |