OLD | NEW |
1 //===- subzero/src/IceDefs.h - Common Subzero declarations ------*- C++ -*-===// | 1 //===- subzero/src/IceDefs.h - Common Subzero declarations ------*- C++ -*-===// |
2 // | 2 // |
3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 /// | 9 /// |
10 /// \file | 10 /// \file |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 #include <cassert> | 33 #include <cassert> |
34 #include <cstdint> | 34 #include <cstdint> |
35 #include <cstdio> // snprintf | 35 #include <cstdio> // snprintf |
36 #include <functional> // std::less | 36 #include <functional> // std::less |
37 #include <limits> | 37 #include <limits> |
38 #include <list> | 38 #include <list> |
39 #include <map> | 39 #include <map> |
40 #include <memory> | 40 #include <memory> |
41 #include <mutex> | 41 #include <mutex> |
| 42 #include <set> |
42 #include <string> | 43 #include <string> |
43 #include <system_error> | 44 #include <system_error> |
44 #include <unordered_map> | 45 #include <unordered_map> |
45 #include <unordered_set> | 46 #include <unordered_set> |
46 #include <utility> | 47 #include <utility> |
47 #include <vector> | 48 #include <vector> |
48 | 49 |
49 namespace Ice { | 50 namespace Ice { |
50 | 51 |
51 class Assembler; | 52 class Assembler; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 using InstList = llvm::ilist<Inst>; | 123 using InstList = llvm::ilist<Inst>; |
123 // Ideally PhiList would be llvm::ilist<InstPhi>, and similar for AssignList, | 124 // Ideally PhiList would be llvm::ilist<InstPhi>, and similar for AssignList, |
124 // but this runs into issues with SFINAE. | 125 // but this runs into issues with SFINAE. |
125 using PhiList = InstList; | 126 using PhiList = InstList; |
126 using AssignList = InstList; | 127 using AssignList = InstList; |
127 | 128 |
128 // Standard library containers with CfgLocalAllocator. | 129 // Standard library containers with CfgLocalAllocator. |
129 template <typename T> using CfgList = std::list<T, CfgLocalAllocator<T>>; | 130 template <typename T> using CfgList = std::list<T, CfgLocalAllocator<T>>; |
130 template <typename T, typename H = std::hash<T>, typename Eq = std::equal_to<T>> | 131 template <typename T, typename H = std::hash<T>, typename Eq = std::equal_to<T>> |
131 using CfgUnorderedSet = std::unordered_set<T, H, Eq, CfgLocalAllocator<T>>; | 132 using CfgUnorderedSet = std::unordered_set<T, H, Eq, CfgLocalAllocator<T>>; |
| 133 template <typename T, typename Cmp = std::less<T>> |
| 134 using CfgSet = std::set<T, Cmp, CfgLocalAllocator<T>>; |
132 template <typename T, typename U, typename H = std::hash<T>, | 135 template <typename T, typename U, typename H = std::hash<T>, |
133 typename Eq = std::equal_to<T>> | 136 typename Eq = std::equal_to<T>> |
134 using CfgUnorderedMap = | 137 using CfgUnorderedMap = |
135 std::unordered_map<T, U, H, Eq, CfgLocalAllocator<std::pair<const T, U>>>; | 138 std::unordered_map<T, U, H, Eq, CfgLocalAllocator<std::pair<const T, U>>>; |
136 template <typename T> using CfgVector = std::vector<T, CfgLocalAllocator<T>>; | 139 template <typename T> using CfgVector = std::vector<T, CfgLocalAllocator<T>>; |
137 | 140 |
138 // Containers that are arena-allocated from the Cfg's allocator. | 141 // Containers that are arena-allocated from the Cfg's allocator. |
139 using OperandList = CfgVector<Operand *>; | 142 using OperandList = CfgVector<Operand *>; |
140 using VarList = CfgVector<Variable *>; | 143 using VarList = CfgVector<Variable *>; |
141 using NodeList = CfgVector<CfgNode *>; | 144 using NodeList = CfgVector<CfgNode *>; |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 RPE_PooledConstantReordering, | 437 RPE_PooledConstantReordering, |
435 RPE_RegAllocRandomization, | 438 RPE_RegAllocRandomization, |
436 RPE_num | 439 RPE_num |
437 }; | 440 }; |
438 | 441 |
439 using RelocOffsetArray = llvm::SmallVector<class RelocOffset *, 4>; | 442 using RelocOffsetArray = llvm::SmallVector<class RelocOffset *, 4>; |
440 | 443 |
441 } // end of namespace Ice | 444 } // end of namespace Ice |
442 | 445 |
443 #endif // SUBZERO_SRC_ICEDEFS_H | 446 #endif // SUBZERO_SRC_ICEDEFS_H |
OLD | NEW |