15 #ifndef LLVM_TARGET_COSTTABLE_H_
16 #define LLVM_TARGET_COSTTABLE_H_
21 template <
class TypeTy>
29 template <
class TypeTy,
class CompareTy>
32 for (
unsigned int i = 0; i < len; ++i)
33 if (ISD == Tbl[i].ISD && Ty == Tbl[i].
Type)
41 template <
class TypeTy,
class CompareTy,
unsigned N>
48 template <
class TypeTy>
58 template <
class TypeTy,
class CompareTy>
60 unsigned len,
int ISD, CompareTy Dst,
62 for (
unsigned int i = 0; i < len; ++i)
63 if (ISD == Tbl[i].ISD && Src == Tbl[i].Src && Dst == Tbl[i].Dst)
72 template <
class TypeTy,
class CompareTy,
unsigned N>
74 int ISD, CompareTy Dst, CompareTy Src) {
int CostTableLookup(const CostTblEntry< TypeTy > *Tbl, unsigned len, int ISD, CompareTy Ty)
Find in cost table, TypeTy must be comparable to CompareTy by ==.
Type Conversion Cost Table.
The instances of the Type class are immutable: once they are created, they are never changed...
int ConvertCostTableLookup(const TypeConversionCostTblEntry< TypeTy > *Tbl, unsigned len, int ISD, CompareTy Dst, CompareTy Src)
Find in type conversion cost table, TypeTy must be comparable to CompareTy by ==. ...