diff options
author | Renato Golin <renato.golin@linaro.org> | 2013-01-20 20:57:20 +0000 |
---|---|---|
committer | Renato Golin <renato.golin@linaro.org> | 2013-01-20 20:57:20 +0000 |
commit | e1fb05932787d5e69ef693fcf01aa1a98f8b4ba5 (patch) | |
tree | 55a9ba3a23778a4084080a234b25175b8f503724 /llvm/lib/Analysis/TargetTransformInfo.cpp | |
parent | 779c4247f76828fd2ce07cbb064003910709be30 (diff) | |
download | bcm5719-llvm-e1fb05932787d5e69ef693fcf01aa1a98f8b4ba5.tar.gz bcm5719-llvm-e1fb05932787d5e69ef693fcf01aa1a98f8b4ba5.zip |
Revert CostTable algorithm, will re-write
llvm-svn: 172992
Diffstat (limited to 'llvm/lib/Analysis/TargetTransformInfo.cpp')
-rw-r--r-- | llvm/lib/Analysis/TargetTransformInfo.cpp | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/llvm/lib/Analysis/TargetTransformInfo.cpp b/llvm/lib/Analysis/TargetTransformInfo.cpp index 4873a7f923f..3ef74eb2d64 100644 --- a/llvm/lib/Analysis/TargetTransformInfo.cpp +++ b/llvm/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); -} |