| 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 /// \file | 10 /// \file |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 | 219 |
| 220 /// \name Manage the CurrentNode field. | 220 /// \name Manage the CurrentNode field. |
| 221 /// CurrentNode is used for validating the Variable::DefNode field during | 221 /// CurrentNode is used for validating the Variable::DefNode field during |
| 222 /// dumping/emitting. | 222 /// dumping/emitting. |
| 223 /// @{ | 223 /// @{ |
| 224 void setCurrentNode(const CfgNode *Node) { CurrentNode = Node; } | 224 void setCurrentNode(const CfgNode *Node) { CurrentNode = Node; } |
| 225 void resetCurrentNode() { setCurrentNode(nullptr); } | 225 void resetCurrentNode() { setCurrentNode(nullptr); } |
| 226 const CfgNode *getCurrentNode() const { return CurrentNode; } | 226 const CfgNode *getCurrentNode() const { return CurrentNode; } |
| 227 /// @} | 227 /// @} |
| 228 | 228 |
| 229 /// Get the total amount of memory held by the per-Cfg allocator. This is | 229 /// Get the total amount of memory held by the per-Cfg allocator. |
| 230 /// mostly meant for use inside a debugger. | 230 size_t getTotalMemoryMB() const; |
| 231 static size_t getTotalMemoryMB(); | 231 |
| 232 /// Get the current memory usage due to liveness data structures. |
| 233 size_t getLivenessMemoryMB() const; |
| 232 | 234 |
| 233 void emit(); | 235 void emit(); |
| 234 void emitIAS(); | 236 void emitIAS(); |
| 235 static void emitTextHeader(GlobalString Name, GlobalContext *Ctx, | 237 static void emitTextHeader(GlobalString Name, GlobalContext *Ctx, |
| 236 const Assembler *Asm); | 238 const Assembler *Asm); |
| 237 void dump(const char *Message = ""); | 239 void dump(const char *Message = ""); |
| 238 | 240 |
| 239 /// Allocate data of type T using the per-Cfg allocator. | 241 /// Allocate data of type T using the per-Cfg allocator. |
| 240 template <typename T> T *allocate() { return Allocator->Allocate<T>(); } | 242 template <typename T> T *allocate() { return Allocator->Allocate<T>(); } |
| 241 | 243 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 using OwnerType = Cfg; | 344 using OwnerType = Cfg; |
| 343 static StringPool *getStrings(const OwnerType *PoolOwner) { | 345 static StringPool *getStrings(const OwnerType *PoolOwner) { |
| 344 return PoolOwner->getVarStrings(); | 346 return PoolOwner->getVarStrings(); |
| 345 } | 347 } |
| 346 }; | 348 }; |
| 347 using VariableString = StringID<VariableStringPoolTraits>; | 349 using VariableString = StringID<VariableStringPoolTraits>; |
| 348 | 350 |
| 349 } // end of namespace Ice | 351 } // end of namespace Ice |
| 350 | 352 |
| 351 #endif // SUBZERO_SRC_ICECFG_H | 353 #endif // SUBZERO_SRC_ICECFG_H |
| OLD | NEW |