diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2014-03-30 12:07:07 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2014-03-30 12:07:07 +0000 |
commit | 9df0fd4018b8234c7100b9edf7871d76892fce34 (patch) | |
tree | 0ce4eaa4b5fe16dd1c4e688cc67deb9550344c83 /llvm/lib/ExecutionEngine/JIT/JITMemoryManager.cpp | |
parent | 379accd8716a82d91e694ac9dbc162f7f9274540 (diff) | |
download | bcm5719-llvm-9df0fd4018b8234c7100b9edf7871d76892fce34.tar.gz bcm5719-llvm-9df0fd4018b8234c7100b9edf7871d76892fce34.zip |
[Allocator] Lift the slab size and size threshold into template
parameters rather than runtime parameters.
There is only one user of these parameters and they are compile time for
that user. Making these compile time seems to better reflect their
intended usage as well.
llvm-svn: 205143
Diffstat (limited to 'llvm/lib/ExecutionEngine/JIT/JITMemoryManager.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/JIT/JITMemoryManager.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/JITMemoryManager.cpp b/llvm/lib/ExecutionEngine/JIT/JITMemoryManager.cpp index 1cfed2803b3..0d1ea0263c7 100644 --- a/llvm/lib/ExecutionEngine/JIT/JITMemoryManager.cpp +++ b/llvm/lib/ExecutionEngine/JIT/JITMemoryManager.cpp @@ -314,8 +314,8 @@ namespace { // confuse them with the blocks of memory described above. std::vector<sys::MemoryBlock> CodeSlabs; JITSlabAllocator BumpSlabAllocator; - BumpPtrAllocator StubAllocator; - BumpPtrAllocator DataAllocator; + BumpPtrAllocatorImpl<DefaultSlabSize, DefaultSizeThreshold> StubAllocator; + BumpPtrAllocatorImpl<DefaultSlabSize, DefaultSizeThreshold> DataAllocator; // Circular list of free blocks. FreeRangeHeader *FreeMemoryList; @@ -590,8 +590,8 @@ DefaultJITMemoryManager::DefaultJITMemoryManager() #endif LastSlab(0, 0), BumpSlabAllocator(*this), - StubAllocator(DefaultSlabSize, DefaultSizeThreshold, BumpSlabAllocator), - DataAllocator(DefaultSlabSize, DefaultSizeThreshold, BumpSlabAllocator) { + StubAllocator(BumpSlabAllocator), + DataAllocator(BumpSlabAllocator) { // Allocate space for code. sys::MemoryBlock MemBlock = allocateNewSlab(DefaultCodeSlabSize); |