LLVM: include/llvm/CodeGen/CostTable.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14#ifndef LLVM_CODEGEN_COSTTABLE_H_
15#define LLVM_CODEGEN_COSTTABLE_H_
16
20
21namespace llvm {
22
23
24template
31
32
33template
37 return ISD == Entry.ISD && Ty == Entry.Type;
38 });
39 if (I != Tbl.end())
40 return I;
41
42
43 return nullptr;
44}
45
46template <size_t N, class CostType>
47inline const CostTblEntryT *
52
53
54template
62
63
64template
68 auto I =
70 return ISD == Entry.ISD && Src == Entry.Src && Dst == Entry.Dst;
71 });
72 if (I != Tbl.end())
73 return I;
74
75
76 return nullptr;
77}
78
79template <size_t N, class CostType>
80inline const TypeConversionCostTblEntryT *
86
87}
88
89#endif
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
ISD namespace - This namespace contains an enum which represents all of the SelectionDAG node types a...
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.
Definition CostTable.h:35
TypeConversionCostTblEntryT< unsigned > TypeConversionCostTblEntry
Definition CostTable.h:61
CostTblEntryT< unsigned > CostTblEntry
Definition CostTable.h:30
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.
Definition CostTable.h:66
Cost Table Entry.
Definition CostTable.h:25
MVT::SimpleValueType Type
Definition CostTable.h:27
unsigned Cost
Definition CostTable.h:28
int ISD
Definition CostTable.h:26
Type Conversion Cost Table.
Definition CostTable.h:55
MVT::SimpleValueType Dst
Definition CostTable.h:57
unsigned Cost
Definition CostTable.h:59
int ISD
Definition CostTable.h:56
MVT::SimpleValueType Src
Definition CostTable.h:58