| OLD | NEW |
| 1 //===- subzero/src/IceMemory.h - Memory management declarations -*- C++ -*-===// | 1 //===- subzero/src/IceMemory.h - Memory management 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 public: | 137 public: |
| 138 using allocator_type = ArenaAllocator *; | 138 using allocator_type = ArenaAllocator *; |
| 139 using manager_type = Cfg; | 139 using manager_type = Cfg; |
| 140 static constexpr bool cache_allocator = false; | 140 static constexpr bool cache_allocator = false; |
| 141 | 141 |
| 142 static void init() { ICE_TLS_INIT_FIELD(CfgAllocator); }; | 142 static void init() { ICE_TLS_INIT_FIELD(CfgAllocator); }; |
| 143 | 143 |
| 144 static allocator_type current(); | 144 static allocator_type current(); |
| 145 static void set_current(const manager_type *Manager); | 145 static void set_current(const manager_type *Manager); |
| 146 static void set_current(ArenaAllocator *Allocator); | 146 static void set_current(ArenaAllocator *Allocator); |
| 147 static void set_current(nullptr_t); | 147 static void set_current(std::nullptr_t); |
| 148 | 148 |
| 149 private: | 149 private: |
| 150 ICE_TLS_DECLARE_FIELD(ArenaAllocator *, CfgAllocator); | 150 ICE_TLS_DECLARE_FIELD(ArenaAllocator *, CfgAllocator); |
| 151 }; | 151 }; |
| 152 | 152 |
| 153 template <typename T> | 153 template <typename T> |
| 154 using CfgLocalAllocator = sz_allocator<T, CfgAllocatorTraits>; | 154 using CfgLocalAllocator = sz_allocator<T, CfgAllocatorTraits>; |
| 155 | 155 |
| 156 using CfgLocalAllocatorScope = sz_allocator_scope<CfgAllocatorTraits>; | 156 using CfgLocalAllocatorScope = sz_allocator_scope<CfgAllocatorTraits>; |
| 157 | 157 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 176 }; | 176 }; |
| 177 | 177 |
| 178 template <typename T> | 178 template <typename T> |
| 179 using LivenessAllocator = sz_allocator<T, LivenessAllocatorTraits>; | 179 using LivenessAllocator = sz_allocator<T, LivenessAllocatorTraits>; |
| 180 | 180 |
| 181 using LivenessAllocatorScope = sz_allocator_scope<LivenessAllocatorTraits>; | 181 using LivenessAllocatorScope = sz_allocator_scope<LivenessAllocatorTraits>; |
| 182 | 182 |
| 183 } // end of namespace Ice | 183 } // end of namespace Ice |
| 184 | 184 |
| 185 #endif // SUBZERO_SRC_ICEMEMORY_H | 185 #endif // SUBZERO_SRC_ICEMEMORY_H |
| OLD | NEW |