summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
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/CodeGen
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/CodeGen')
-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 c27e081a5e6..2f3ac9a9017 100644
--- a/llvm/lib/CodeGen/BasicTargetTransformInfo.cpp
+++ b/llvm/lib/CodeGen/BasicTargetTransformInfo.cpp
@@ -83,6 +83,7 @@ public:
/// @{
virtual unsigned getNumberOfRegisters(bool Vector) const;
+ virtual unsigned getMaximumUnrollFactor() const;
virtual unsigned getArithmeticInstrCost(unsigned Opcode, Type *Ty) const;
virtual unsigned getShuffleCost(ShuffleKind Kind, Type *Tp,
int Index, Type *SubTp) const;
@@ -182,6 +183,10 @@ unsigned BasicTTI::getNumberOfRegisters(bool Vector) const {
return 1;
}
+unsigned BasicTTI::getMaximumUnrollFactor() const {
+ return 1;
+}
+
unsigned BasicTTI::getArithmeticInstrCost(unsigned Opcode, Type *Ty) const {
// Check if any of the operands are vector operands.
int ISD = TLI->InstructionOpcodeToISD(Opcode);
OpenPOWER on IntegriCloud