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 | 053a2119835ac6ca3484f1b496cabd43c37e4279 (patch) | |
tree | 87be430a237dc3238c0f2a1fc70dd58935d40e61 /include/llvm | |
parent | 01812bebcc345b09ce261317b6fdefde8f097642 (diff) | |
download | external_llvm-053a2119835ac6ca3484f1b496cabd43c37e4279.zip external_llvm-053a2119835ac6ca3484f1b496cabd43c37e4279.tar.gz external_llvm-053a2119835ac6ca3484f1b496cabd43c37e4279.tar.bz2 |
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 'include/llvm')
-rw-r--r-- | include/llvm/Analysis/TargetTransformInfo.h | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/include/llvm/Analysis/TargetTransformInfo.h b/include/llvm/Analysis/TargetTransformInfo.h index 3d44e77..d694aa6 100644 --- a/include/llvm/Analysis/TargetTransformInfo.h +++ b/include/llvm/Analysis/TargetTransformInfo.h @@ -210,58 +210,6 @@ public: /// satisfy the queries. ImmutablePass *createNoTargetTransformInfoPass(); -//======================================= COST TABLES == - -/// \brief An entry in a cost table -/// -/// Use it as a static array and call the CostTable below to -/// iterate through it and find the elements you're looking for. -/// -/// Leaving Types with fixed size to avoid complications during -/// static destruction. -struct CostTableEntry { - int ISD; // instruction ID - MVT Types[2]; // Types { dest, source } - unsigned Cost; // ideal cost -}; - -/// \brief Cost table, containing one or more costs for different instructions -/// -/// This class implement the cost table lookup, to simplify -/// how targets declare their own costs. -class CostTable { - const CostTableEntry *table; - const size_t size; - const unsigned numTypes; - -protected: - /// Searches for costs on the table - unsigned _findCost(int ISD, MVT *Types) const; - - // We don't want to expose a multi-type cost table, since types are not - // sequential by nature. If you need more cost table types, implement - // them below. - CostTable(const CostTableEntry *table, const size_t size, unsigned numTypes); - -public: - /// Cost Not found while searching - static const unsigned COST_NOT_FOUND = -1; -}; - -/// Specialisation for one-type cost table -class UnaryCostTable : public CostTable { -public: - UnaryCostTable(const CostTableEntry *table, const size_t size); - unsigned findCost(int ISD, MVT Type) const; -}; - -/// Specialisation for two-type cost table -class BinaryCostTable : public CostTable { -public: - BinaryCostTable(const CostTableEntry *table, const size_t size); - unsigned findCost(int ISD, MVT Type, MVT SrcType) const; -}; - } // End llvm namespace #endif |