15 #ifndef LLVM_SUPPORT_RECYCLINGALLOCATOR_H
16 #define LLVM_SUPPORT_RECYCLINGALLOCATOR_H
25 template <
class AllocatorType,
class T,
size_t Size =
sizeof(
T),
35 AllocatorType Allocator;
43 template<
class SubClass>
44 SubClass *
Allocate() {
return Base.template Allocate<SubClass>(Allocator); }
51 template<
class SubClass>
55 Allocator.PrintStats();
62 template<
class AllocatorType,
class T,
size_t Size,
size_t Align>
63 inline void *
operator new(
size_t size,
66 assert(size <= Size &&
"allocation size exceeded");
70 template<
class AllocatorType,
class T,
size_t Size,
size_t Align>
71 inline void operator delete(
void *
E,
void Deallocate(SubClass *E)
Deallocate - Release storage for the pointed-to object.
RecyclingAllocator - This class wraps an Allocator, adding the functionality of recycling deleted obj...
Recycler - This class manages a linked-list of deallocated nodes and facilitates reusing deallocated ...
constexpr char Size[]
Key for Kernel::Arg::Metadata::mSize.
SubClass * Allocate()
Allocate - Return a pointer to storage for an object of type SubClass.
constexpr char Align[]
Key for Kernel::Arg::Metadata::mAlign.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())