aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorArnold Schwaighofer <aschwaighofer@apple.com>2013-07-12 19:16:02 +0000
committerArnold Schwaighofer <aschwaighofer@apple.com>2013-07-12 19:16:02 +0000
commitc0a11edba6ea46c782672ab3fb4e4ab3dc267a22 (patch)
treedfd8a80460e3764c602d6e8df3e60176dab3f136 /include
parentec1170615515081135ea324e545b57c9503cd574 (diff)
downloadexternal_llvm-c0a11edba6ea46c782672ab3fb4e4ab3dc267a22.zip
external_llvm-c0a11edba6ea46c782672ab3fb4e4ab3dc267a22.tar.gz
external_llvm-c0a11edba6ea46c782672ab3fb4e4ab3dc267a22.tar.bz2
TargetTransformInfo: address calculation parameter for gather/scather
Address calculation for gather/scather in vectorized code can incur a significant cost making vectorization unbeneficial. Add infrastructure to add cost. Tests and cost model for targets will be in follow-up commits. radar://14351991 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186187 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Analysis/TargetTransformInfo.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/llvm/Analysis/TargetTransformInfo.h b/include/llvm/Analysis/TargetTransformInfo.h
index eb29e34..b8a44b5 100644
--- a/include/llvm/Analysis/TargetTransformInfo.h
+++ b/include/llvm/Analysis/TargetTransformInfo.h
@@ -339,7 +339,11 @@ public:
/// merged into the instruction indexing mode. Some targets might want to
/// distinguish between address computation for memory operations on vector
/// types and scalar types. Such targets should override this function.
- virtual unsigned getAddressComputationCost(Type *Ty) const;
+ /// The 'IsComplex' parameter is a hint that the address computation is likely
+ /// to involve multiple instructions and as such unlikely to be merged into
+ /// the address indexing mode.
+ virtual unsigned getAddressComputationCost(Type *Ty,
+ bool IsComplex = false) const;
/// @}