LLVM API Documentation
#include <Allocator.h>
Public Member Functions | |
| BumpPtrAllocator (size_t size=4096, size_t threshold=4096, SlabAllocator &allocator=DefaultSlabAllocator) | |
| ~BumpPtrAllocator () | |
| void | Reset () |
| void * | Allocate (size_t Size, size_t Alignment) |
| template<typename T> | |
| T * | Allocate () |
| template<typename T> | |
| T * | Allocate (size_t Num) |
| template<typename T> | |
| T * | Allocate (size_t Num, size_t Alignment) |
| void | Deallocate (const void *) |
| unsigned | GetNumSlabs () const |
| void | PrintStats () const |
Definition at line 85 of file Allocator.h.
| llvm::BumpPtrAllocator::BumpPtrAllocator | ( | size_t | size = 4096, |
|
| size_t | threshold = 4096, |
|||
| SlabAllocator & | allocator = DefaultSlabAllocator | |||
| ) |
Definition at line 23 of file Allocator.cpp.
| llvm::BumpPtrAllocator::~BumpPtrAllocator | ( | ) |
Definition at line 30 of file Allocator.cpp.
| void llvm::BumpPtrAllocator::Reset | ( | ) |
Reset - Deallocate all but the current slab and reset the current pointer to the beginning of it, freeing all memory allocated so far.
Reset - Deallocate all but the current slab and reset the current pointer to the beginning of it, freeing all memory allocated so far.
Definition at line 74 of file Allocator.cpp.
References llvm::MemSlab::NextPtr, and llvm::MemSlab::Size.
Referenced by llvm::SelectionDAG::clear(), llvm::ScalarEvolution::releaseMemory(), llvm::LiveIntervals::releaseMemory(), llvm::LiveStacks::releaseMemory(), and llvm::LoopDependenceAnalysis::releaseMemory().
| void * llvm::BumpPtrAllocator::Allocate | ( | size_t | Size, | |
| size_t | Alignment | |||
| ) |
Allocate - Allocate space at the specified alignment.
Definition at line 83 of file Allocator.cpp.
References llvm::SlabAllocator::Allocate(), llvm::MemSlab::NextPtr, and llvm::MemSlab::Size.
Referenced by llvm::MCContext::Allocate(), llvm::ImmutableListFactory< T >::Concat(), llvm::LiveInterval::createValueCopy(), llvm::ScalarEvolution::getAddExpr(), llvm::ScalarEvolution::getAddRecExpr(), llvm::ScalarEvolution::getAllocSizeExpr(), llvm::ScalarEvolution::getConstant(), llvm::ScalarEvolution::getFieldOffsetExpr(), llvm::MachineFunction::getInfo(), llvm::ScalarEvolution::getMulExpr(), llvm::LiveInterval::getNextValue(), llvm::ScalarEvolution::getSignExtendExpr(), llvm::ScalarEvolution::getSMaxExpr(), llvm::ScalarEvolution::getTruncateExpr(), llvm::ScalarEvolution::getUDivExpr(), llvm::ScalarEvolution::getUMaxExpr(), llvm::ScalarEvolution::getUnknown(), llvm::SelectionDAG::getVectorShuffle(), llvm::SelectionDAG::getVTList(), llvm::ScalarEvolution::getZeroExtendExpr(), llvm::MachineFunction::MachineFunction(), llvm::SelectionDAG::MorphNodeTo(), and llvm::Deserializer::ReadUIntPtr().
| T* llvm::BumpPtrAllocator::Allocate | ( | ) | [inline] |
Allocate space, but do not construct, one object.
Definition at line 149 of file Allocator.h.
References T.
Referenced by Allocate().
| T* llvm::BumpPtrAllocator::Allocate | ( | size_t | Num | ) | [inline] |
Allocate space for an array of objects. This does not construct the objects though.
Definition at line 156 of file Allocator.h.
References Allocate(), and T.
| T* llvm::BumpPtrAllocator::Allocate | ( | size_t | Num, | |
| size_t | Alignment | |||
| ) | [inline] |
Allocate space for a specific count of elements and with a specified alignment.
Definition at line 163 of file Allocator.h.
References Allocate(), and T.
| void llvm::BumpPtrAllocator::Deallocate | ( | const void * | ) | [inline] |
Definition at line 169 of file Allocator.h.
Referenced by llvm::MachineFunction::~MachineFunction().
| unsigned llvm::BumpPtrAllocator::GetNumSlabs | ( | ) | const |
| void llvm::BumpPtrAllocator::PrintStats | ( | ) | const |