summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2013-01-09 01:15:42 +0000
committerNadav Rotem <nrotem@apple.com>2013-01-09 01:15:42 +0000
commitb696c36fcd94339787d979c4ed6fb8cc9b83afdd (patch)
tree0a8341f8831b3b5cf92603209af9f8e30d3671f4 /llvm/lib/Analysis
parent5e111fe533597a4bc46d69ad66f6d0c6b3c31689 (diff)
downloadbcm5719-llvm-b696c36fcd94339787d979c4ed6fb8cc9b83afdd.tar.gz
bcm5719-llvm-b696c36fcd94339787d979c4ed6fb8cc9b83afdd.zip
Cost Model: Move the 'max unroll factor' variable to the TTI and add initial Cost Model support on ARM.
llvm-svn: 171928
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/TargetTransformInfo.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/TargetTransformInfo.cpp b/llvm/lib/Analysis/TargetTransformInfo.cpp
index 63f495a4305..02af2d34c51 100644
--- a/llvm/lib/Analysis/TargetTransformInfo.cpp
+++ b/llvm/lib/Analysis/TargetTransformInfo.cpp
@@ -92,6 +92,10 @@ unsigned TargetTransformInfo::getNumberOfRegisters(bool Vector) const {
return PrevTTI->getNumberOfRegisters(Vector);
}
+unsigned TargetTransformInfo::getMaximumUnrollFactor() const {
+ return PrevTTI->getMaximumUnrollFactor();
+}
+
unsigned TargetTransformInfo::getArithmeticInstrCost(unsigned Opcode,
Type *Ty) const {
return PrevTTI->getArithmeticInstrCost(Opcode, Ty);
@@ -216,6 +220,10 @@ struct NoTTI : ImmutablePass, TargetTransformInfo {
return 8;
}
+ unsigned getMaximumUnrollFactor() const {
+ return 1;
+ }
+
unsigned getArithmeticInstrCost(unsigned Opcode, Type *Ty) const {
return 1;
}
OpenPOWER on IntegriCloud