aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/TargetTransformImpl.cpp
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2013-01-04 17:48:25 +0000
committerNadav Rotem <nrotem@apple.com>2013-01-04 17:48:25 +0000
commite503319874f57ab4a0354521b03a71cf8e07b866 (patch)
tree6d6b818c02185f5523b3cde95373bb1beb36432a /lib/Target/TargetTransformImpl.cpp
parente12bf1875481b02d07b6ce9c153ec3410068e234 (diff)
LoopVectorizer:
1. Add code to estimate register pressure. 2. Add code to select the unroll factor based on register pressure. 3. Add bits to TargetTransformInfo to provide the number of registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171469 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/TargetTransformImpl.cpp')
-rw-r--r--lib/Target/TargetTransformImpl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/TargetTransformImpl.cpp b/lib/Target/TargetTransformImpl.cpp
index f8c588934f..7d663f57f9 100644
--- a/lib/Target/TargetTransformImpl.cpp
+++ b/lib/Target/TargetTransformImpl.cpp
@@ -171,6 +171,10 @@ VectorTargetTransformImpl::getScalarizationOverhead(Type *Ty,
return Cost;
}
+unsigned VectorTargetTransformImpl::getNumberOfRegisters(bool Vector) const {
+ return 8;
+}
+
unsigned VectorTargetTransformImpl::getArithmeticInstrCost(unsigned Opcode,
Type *Ty) const {
// Check if any of the operands are vector operands.