LLVM: include/llvm/CodeGen/PBQP/Solution.h Source File (original) (raw)
Go to the documentation of this file.
1
2
3
4
5
6
7
8
9
10
11
12
13#ifndef LLVM_CODEGEN_PBQP_SOLUTION_H
14#define LLVM_CODEGEN_PBQP_SOLUTION_H
15
17#include
18#include
19
20namespace llvm {
21namespace PBQP {
22
23
24
25
27 private:
28 using SelectionsMap = std::map<GraphBase::NodeId, unsigned>;
29 SelectionsMap selections;
30
31 public:
32
34
35
36
37
39 selections[nodeId] = selection;
40 }
41
42
43
44
46 SelectionsMap::const_iterator sItr = selections.find(nodeId);
47 assert(sItr != selections.end() && "No selection for node.");
48 return sItr->second;
49 }
50 };
51
52}
53}
54
55#endif
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
void setSelection(GraphBase::NodeId nodeId, unsigned selection)
Set the selection for a given node.
Definition Solution.h:38
Solution()=default
Initialise an empty solution.
unsigned getSelection(GraphBase::NodeId nodeId) const
Get a node's selection.
Definition Solution.h:45
This is an optimization pass for GlobalISel generic memory operations.