LLVM API Documentation

llvm::Recycler< T, Size, Align > Class Template Reference

#include <Recycler.h>

Inheritance diagram for llvm::Recycler< T, Size, Align >:
[legend]
Collaboration diagram for llvm::Recycler< T, Size, Align >:
[legend]

List of all members.

Public Member Functions

 ~Recycler ()
template<class AllocatorType>
void clear (AllocatorType &Allocator)
template<class SubClass, class AllocatorType>
SubClass * Allocate (AllocatorType &Allocator)
template<class AllocatorType>
T * Allocate (AllocatorType &Allocator)
template<class SubClass, class AllocatorType>
void Deallocate (AllocatorType &, SubClass *Element)
void PrintStats ()


Detailed Description

template<class T, size_t Size = sizeof(T), size_t Align = AlignOf<T>::Alignment>
class llvm::Recycler< T, Size, Align >

Recycler - This class manages a linked-list of deallocated nodes and facilitates reusing deallocated memory in place of allocating new memory.

Definition at line 59 of file Recycler.h.


Constructor & Destructor Documentation

template<class T, size_t Size = sizeof(T), size_t Align = AlignOf<T>::Alignment>
llvm::Recycler< T, Size, Align >::~Recycler (  )  [inline]

Definition at line 66 of file Recycler.h.


Member Function Documentation

template<class T, size_t Size = sizeof(T), size_t Align = AlignOf<T>::Alignment>
template<class AllocatorType>
void llvm::Recycler< T, Size, Align >::clear ( AllocatorType &  Allocator  )  [inline]

clear - Release all the tracked allocations to the allocator. The recycler must be free of any tracked allocations before being deleted; calling clear is one way to ensure this.

Definition at line 77 of file Recycler.h.

Referenced by llvm::RecyclingAllocator< llvm::BumpPtrAllocator, llvm::SDNode, sizeof(llvm::LoadSDNode), llvm::AlignOf< llvm::ARG_FLAGSSDNode >::Alignment >::~RecyclingAllocator().

template<class T, size_t Size = sizeof(T), size_t Align = AlignOf<T>::Alignment>
template<class SubClass, class AllocatorType>
SubClass* llvm::Recycler< T, Size, Align >::Allocate ( AllocatorType &  Allocator  )  [inline]

template<class T, size_t Size = sizeof(T), size_t Align = AlignOf<T>::Alignment>
template<class AllocatorType>
T* llvm::Recycler< T, Size, Align >::Allocate ( AllocatorType &  Allocator  )  [inline]

Definition at line 96 of file Recycler.h.

template<class T, size_t Size = sizeof(T), size_t Align = AlignOf<T>::Alignment>
template<class SubClass, class AllocatorType>
void llvm::Recycler< T, Size, Align >::Deallocate ( AllocatorType &  ,
SubClass *  Element 
) [inline]

template<class T, size_t Size = sizeof(T), size_t Align = AlignOf<T>::Alignment>
void llvm::Recycler< T, Size, Align >::PrintStats (  )  [inline]


The documentation for this class was generated from the following file: