14#ifndef LLVM_CODEGEN_COSTTABLE_H_
15#define LLVM_CODEGEN_COSTTABLE_H_
24template <
typename CostType>
33template <
class CostType>
37 return ISD == Entry.ISD && Ty == Entry.Type;
46template <
size_t N,
class CostType>
47inline const CostTblEntryT<CostType> *
50 return CostTableLookup<CostType>(Table, ISD, Ty);
54template <
typename CostType>
64template <
class CostType>
67 int ISD,
MVT Dst,
MVT Src) {
70 return ISD == Entry.ISD && Src == Entry.Src && Dst == Entry.Dst;
79template <
size_t N,
class CostType>
80inline const TypeConversionCostTblEntryT<CostType> *
82 int ISD,
MVT Dst,
MVT Src) {
84 return ConvertCostTableLookup<CostType>(Table, ISD, Dst, Src);
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
This is an optimization pass for GlobalISel generic memory operations.
const CostTblEntryT< CostType > * CostTableLookup(ArrayRef< CostTblEntryT< CostType > > Tbl, int ISD, MVT Ty)
Find in cost table.
auto find_if(R &&Range, UnaryPredicate P)
Provide wrappers to std::find_if which take ranges instead of having to pass begin/end explicitly.
const TypeConversionCostTblEntryT< CostType > * ConvertCostTableLookup(ArrayRef< TypeConversionCostTblEntryT< CostType > > Tbl, int ISD, MVT Dst, MVT Src)
Find in type conversion cost table.
MVT::SimpleValueType Type
Type Conversion Cost Table.