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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 } | 137 } |
138 | 138 |
139 #define ENABLE_MAKE_UNIQUE friend struct ::Ice::Internal::MakeUniqueEnabler | 139 #define ENABLE_MAKE_UNIQUE friend struct ::Ice::Internal::MakeUniqueEnabler |
140 | 140 |
141 typedef std::string IceString; | 141 typedef std::string IceString; |
142 typedef llvm::ilist<Inst> InstList; | 142 typedef llvm::ilist<Inst> InstList; |
143 // Ideally PhiList would be llvm::ilist<InstPhi>, and similar for | 143 // Ideally PhiList would be llvm::ilist<InstPhi>, and similar for |
144 // AssignList, but this runs into issues with SFINAE. | 144 // AssignList, but this runs into issues with SFINAE. |
145 typedef InstList PhiList; | 145 typedef InstList PhiList; |
146 typedef InstList AssignList; | 146 typedef InstList AssignList; |
147 // VarList and NodeList are arena-allocated from the Cfg's allocator. | 147 |
| 148 // Containers that are arena-allocated from the Cfg's allocator. |
| 149 typedef std::vector<Operand *, CfgLocalAllocator<Operand *>> OperandList; |
148 typedef std::vector<Variable *, CfgLocalAllocator<Variable *>> VarList; | 150 typedef std::vector<Variable *, CfgLocalAllocator<Variable *>> VarList; |
149 typedef std::vector<CfgNode *, CfgLocalAllocator<CfgNode *>> NodeList; | 151 typedef std::vector<CfgNode *, CfgLocalAllocator<CfgNode *>> NodeList; |
| 152 |
| 153 // Contains that use the default (global) allocator. |
150 typedef std::vector<Constant *> ConstantList; | 154 typedef std::vector<Constant *> ConstantList; |
151 | 155 typedef std::vector<FunctionDeclaration *> FunctionDeclarationList; |
152 typedef std::vector<VariableDeclaration *> VariableDeclarationList; | 156 typedef std::vector<VariableDeclaration *> VariableDeclarationList; |
153 | 157 |
154 /// SizeT is for holding small-ish limits like number of source | 158 /// SizeT is for holding small-ish limits like number of source |
155 /// operands in an instruction. It is used instead of size_t (which | 159 /// operands in an instruction. It is used instead of size_t (which |
156 /// may be 64-bits wide) when we want to save space. | 160 /// may be 64-bits wide) when we want to save space. |
157 typedef uint32_t SizeT; | 161 typedef uint32_t SizeT; |
158 | 162 |
159 /// InstNumberT is for holding an instruction number. Instruction | 163 /// InstNumberT is for holding an instruction number. Instruction |
160 /// numbers are used for representing Variable live ranges. | 164 /// numbers are used for representing Variable live ranges. |
161 typedef int32_t InstNumberT; | 165 typedef int32_t InstNumberT; |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 llvm::iterator_range<typename T::reverse_iterator> reverse_range(T &Container) { | 275 llvm::iterator_range<typename T::reverse_iterator> reverse_range(T &Container) { |
272 return llvm::make_range(Container.rbegin(), Container.rend()); | 276 return llvm::make_range(Container.rbegin(), Container.rend()); |
273 } | 277 } |
274 | 278 |
275 /// Options for pooling and randomization of immediates. | 279 /// Options for pooling and randomization of immediates. |
276 enum RandomizeAndPoolImmediatesEnum { RPI_None, RPI_Randomize, RPI_Pool }; | 280 enum RandomizeAndPoolImmediatesEnum { RPI_None, RPI_Randomize, RPI_Pool }; |
277 | 281 |
278 } // end of namespace Ice | 282 } // end of namespace Ice |
279 | 283 |
280 #endif // SUBZERO_SRC_ICEDEFS_H | 284 #endif // SUBZERO_SRC_ICEDEFS_H |
OLD | NEW |