summaryrefslogtreecommitdiff
path: root/lib/Analysis/TargetTransformInfo.cpp
diff options
context:
space:
mode:
authorRenato Golin <renato.golin@linaro.org>2013-01-20 20:57:20 +0000
committerRenato Golin <renato.golin@linaro.org>2013-01-20 20:57:20 +0000
commit053a2119835ac6ca3484f1b496cabd43c37e4279 (patch)
tree87be430a237dc3238c0f2a1fc70dd58935d40e61 /lib/Analysis/TargetTransformInfo.cpp
parent01812bebcc345b09ce261317b6fdefde8f097642 (diff)
downloadllvm-053a2119835ac6ca3484f1b496cabd43c37e4279.tar.gz
llvm-053a2119835ac6ca3484f1b496cabd43c37e4279.tar.bz2
llvm-053a2119835ac6ca3484f1b496cabd43c37e4279.tar.xz
Revert CostTable algorithm, will re-write
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172992 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/TargetTransformInfo.cpp')
-rw-r--r--lib/Analysis/TargetTransformInfo.cpp45
1 files changed, 0 insertions, 45 deletions
diff --git a/lib/Analysis/TargetTransformInfo.cpp b/lib/Analysis/TargetTransformInfo.cpp
index 4873a7f923..3ef74eb2d6 100644
--- a/lib/Analysis/TargetTransformInfo.cpp
+++ b/lib/Analysis/TargetTransformInfo.cpp
@@ -286,48 +286,3 @@ char NoTTI::ID = 0;
ImmutablePass *llvm::createNoTargetTransformInfoPass() {
return new NoTTI();
}
-
-//======================================= COST TABLES ==
-
-CostTable::CostTable(const CostTableEntry *table,
- const size_t size,
- unsigned numTypes)
- : table(table), size(size), numTypes(numTypes) {
- assert(table && "missing cost table");
- assert(size > 0 && "empty cost table");
-}
-
-unsigned CostTable::_findCost(int ISD, MVT *Types) const {
- for (unsigned i = 0; i < size; ++i) {
- if (table[i].ISD != ISD)
- continue;
- bool found = true;
- for (unsigned t=0; t<numTypes; t++) {
- if (table[i].Types[t] != Types[t]) {
- found = false;
- break;
- }
- }
- if (found)
- return table[i].Cost;
- }
- return COST_NOT_FOUND;
-}
-
-UnaryCostTable::UnaryCostTable(const CostTableEntry *table,
- const size_t size)
- : CostTable(table, size, 1) { }
-
-unsigned UnaryCostTable::findCost(int ISD, MVT Type) const {
- MVT tys[1] = { Type };
- return _findCost(ISD, tys);
-}
-
-BinaryCostTable::BinaryCostTable(const CostTableEntry *table,
- const size_t size)
- : CostTable(table, size, 2) { }
-
-unsigned BinaryCostTable::findCost(int ISD, MVT Type, MVT SrcType) const {
- MVT tys[2] = { Type, SrcType };
- return _findCost(ISD, tys);
-}