OSDN Git Service

[TargetTransformInfo] Refactor and improve getScalarizationOverhead()
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>
Thu, 26 Jan 2017 07:03:25 +0000 (07:03 +0000)
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>
Thu, 26 Jan 2017 07:03:25 +0000 (07:03 +0000)
commit7cb6abb7cbf8a383b193004f6c49d6418b95e22b
tree823ffe747a62c4bf32041fd781d300fbf6c2931a
parentadd597c306552f8b9029f4bfc912090261996e5a
[TargetTransformInfo]  Refactor and improve getScalarizationOverhead()

Refactoring to remove duplications of this method.

New method getOperandsScalarizationOverhead() that looks at the present unique
operands and add extract costs for them. Old behaviour was to just add extract
costs for one operand of the type always, which still happens in
getArithmeticInstrCost() if no operands are provided by the caller.

This is a good start of improving on this, but there are more places
that can be improved by using getOperandsScalarizationOverhead().

Review: Hal Finkel
https://reviews.llvm.org/D29017

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293155 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/TargetTransformInfo.h
include/llvm/Analysis/TargetTransformInfoImpl.h
include/llvm/CodeGen/BasicTTIImpl.h
lib/Analysis/TargetTransformInfo.cpp
lib/Target/AArch64/AArch64TargetTransformInfo.h
lib/Target/ARM/ARMTargetTransformInfo.h
lib/Target/X86/X86TargetTransformInfo.cpp
lib/Target/X86/X86TargetTransformInfo.h
lib/Transforms/Vectorize/LoopVectorize.cpp