LLVM API Documentation
#include <Recycler.h>
Public Member Functions | |
~Recycler () | |
template<class AllocatorType > | |
void | clear (AllocatorType &Allocator) |
void | clear (BumpPtrAllocator &) |
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 () |
Recycler - This class manages a linked-list of deallocated nodes and facilitates reusing deallocated memory in place of allocating new memory.
Definition at line 66 of file Recycler.h.
llvm::Recycler< T, Size, Align >::~Recycler | ( | ) | [inline] |
Definition at line 73 of file Recycler.h.
SubClass* llvm::Recycler< T, Size, Align >::Allocate | ( | AllocatorType & | Allocator | ) | [inline] |
Definition at line 101 of file Recycler.h.
Referenced by llvm::RecyclingAllocator< BumpPtrAllocator, SDNode, sizeof(LargestSDNode), AlignOf< MostAlignedSDNode >::Alignment >::Allocate(), llvm::MachineFunction::CloneMachineInstr(), llvm::MachineFunction::CreateMachineBasicBlock(), and llvm::MachineFunction::CreateMachineInstr().
T* llvm::Recycler< T, Size, Align >::Allocate | ( | AllocatorType & | Allocator | ) | [inline] |
Definition at line 112 of file Recycler.h.
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 84 of file Recycler.h.
Referenced by llvm::MachineFunction::~MachineFunction(), and llvm::RecyclingAllocator< BumpPtrAllocator, SDNode, sizeof(LargestSDNode), AlignOf< MostAlignedSDNode >::Alignment >::~RecyclingAllocator().
void llvm::Recycler< T, Size, Align >::clear | ( | BumpPtrAllocator & | ) | [inline] |
Special case for BumpPtrAllocator which has an empty Deallocate() function.
There is no need to traverse the free list, pulling all the objects into cache.
Definition at line 96 of file Recycler.h.
void llvm::Recycler< T, Size, Align >::Deallocate | ( | AllocatorType & | , |
SubClass * | Element | ||
) | [inline] |
void llvm::Recycler< T, Size, Align >::PrintStats | ( | ) | [inline] |
Definition at line 121 of file Recycler.h.
Referenced by llvm::RecyclingAllocator< BumpPtrAllocator, SDNode, sizeof(LargestSDNode), AlignOf< MostAlignedSDNode >::Alignment >::PrintStats().