summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/BasicTargetTransformInfo.cpp
diff options
context:
space:
mode:
authorArnold Schwaighofer <aschwaighofer@apple.com>2013-02-08 14:50:48 +0000
committerArnold Schwaighofer <aschwaighofer@apple.com>2013-02-08 14:50:48 +0000
commit594fa2dc2ba2f5748f294c25fe309b03d7eaf700 (patch)
tree6fe16384da8197bf293ad2d55f0a81bd6a1c7fe9 /llvm/lib/CodeGen/BasicTargetTransformInfo.cpp
parent897f2cf408c9522187b3a375e201bdf6938f404f (diff)
downloadbcm5719-llvm-594fa2dc2ba2f5748f294c25fe309b03d7eaf700.tar.gz
bcm5719-llvm-594fa2dc2ba2f5748f294c25fe309b03d7eaf700.zip
ARM cost model: Address computation in vector mem ops not free
Adds a function to target transform info to query for the cost of address computation. The cost model analysis pass now also queries this interface. The code in LoopVectorize adds the cost of address computation as part of the memory instruction cost calculation. Only there, we know whether the instruction will be scalarized or not. Increase the penality for inserting in to D registers on swift. This becomes necessary because we now always assume that address computation has a cost and three is a closer value to the architecture. radar://13097204 llvm-svn: 174713
Diffstat (limited to 'llvm/lib/CodeGen/BasicTargetTransformInfo.cpp')
-rw-r--r--llvm/lib/CodeGen/BasicTargetTransformInfo.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/BasicTargetTransformInfo.cpp b/llvm/lib/CodeGen/BasicTargetTransformInfo.cpp
index ea5e93747dd..e8b5b4fe8d1 100644
--- a/llvm/lib/CodeGen/BasicTargetTransformInfo.cpp
+++ b/llvm/lib/CodeGen/BasicTargetTransformInfo.cpp
@@ -101,6 +101,7 @@ public:
virtual unsigned getIntrinsicInstrCost(Intrinsic::ID, Type *RetTy,
ArrayRef<Type*> Tys) const;
virtual unsigned getNumberOfParts(Type *Tp) const;
+ virtual unsigned getAddressComputationCost(Type *Ty) const;
/// @}
};
@@ -400,3 +401,7 @@ unsigned BasicTTI::getNumberOfParts(Type *Tp) const {
std::pair<unsigned, MVT> LT = TLI->getTypeLegalizationCost(Tp);
return LT.first;
}
+
+unsigned BasicTTI::getAddressComputationCost(Type *Ty) const {
+ return 0;
+}
OpenPOWER on IntegriCloud