OLD | NEW |
1 //===- subzero/src/IceCfg.h - Control flow graph ----------------*- C++ -*-===// | 1 //===- subzero/src/IceCfg.h - Control flow graph ----------------*- 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 // This file declares the Cfg class, which represents the control flow | 10 // This file declares the Cfg class, which represents the control flow |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 template <typename T> void deallocateArrayOf(T *Array) { | 157 template <typename T> void deallocateArrayOf(T *Array) { |
158 Allocator.Deallocate(Array); | 158 Allocator.Deallocate(Array); |
159 } | 159 } |
160 | 160 |
161 private: | 161 private: |
162 // TODO: for now, everything is allocated from the same allocator. In the | 162 // TODO: for now, everything is allocated from the same allocator. In the |
163 // future we may want to split this to several allocators, for example in | 163 // future we may want to split this to several allocators, for example in |
164 // order to use a "Recycler" to preserve memory. If we keep all allocation | 164 // order to use a "Recycler" to preserve memory. If we keep all allocation |
165 // requests from the Cfg exposed via methods, we can always switch the | 165 // requests from the Cfg exposed via methods, we can always switch the |
166 // implementation over at a later point. | 166 // implementation over at a later point. |
167 llvm::BumpPtrAllocator Allocator; | 167 llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 1024 * 1024> Allocator; |
168 | 168 |
169 GlobalContext *Ctx; | 169 GlobalContext *Ctx; |
170 IceString FunctionName; | 170 IceString FunctionName; |
171 Type ReturnType; | 171 Type ReturnType; |
172 bool IsInternalLinkage; | 172 bool IsInternalLinkage; |
173 bool HasError; | 173 bool HasError; |
174 bool FocusedTiming; | 174 bool FocusedTiming; |
175 IceString ErrorMessage; | 175 IceString ErrorMessage; |
176 CfgNode *Entry; // entry basic block | 176 CfgNode *Entry; // entry basic block |
177 NodeList Nodes; // linearized node list; Entry should be first | 177 NodeList Nodes; // linearized node list; Entry should be first |
(...skipping 10 matching lines...) Expand all Loading... |
188 // validating Variable::DefNode. Normally, a traversal over | 188 // validating Variable::DefNode. Normally, a traversal over |
189 // CfgNodes maintains this, but before global operations like | 189 // CfgNodes maintains this, but before global operations like |
190 // register allocation, resetCurrentNode() should be called to avoid | 190 // register allocation, resetCurrentNode() should be called to avoid |
191 // spurious validation failures. | 191 // spurious validation failures. |
192 const CfgNode *CurrentNode; | 192 const CfgNode *CurrentNode; |
193 }; | 193 }; |
194 | 194 |
195 } // end of namespace Ice | 195 } // end of namespace Ice |
196 | 196 |
197 #endif // SUBZERO_SRC_ICECFG_H | 197 #endif // SUBZERO_SRC_ICECFG_H |
OLD | NEW |