summaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/JIT
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-03-30 12:07:07 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-03-30 12:07:07 +0000
commit368a97729890a878389a9995e426c1042947f37a (patch)
tree1b123939a0636aa3d3c485402112960290aa67f1 /lib/ExecutionEngine/JIT
parent0331a894cdf46d8186e74cf855dab19775695adc (diff)
downloadllvm-368a97729890a878389a9995e426c1042947f37a.tar.gz
llvm-368a97729890a878389a9995e426c1042947f37a.tar.bz2
llvm-368a97729890a878389a9995e426c1042947f37a.tar.xz
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205143 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/JIT')
-rw-r--r--lib/ExecutionEngine/JIT/JITMemoryManager.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ExecutionEngine/JIT/JITMemoryManager.cpp b/lib/ExecutionEngine/JIT/JITMemoryManager.cpp
index 1cfed2803b..0d1ea0263c 100644
--- a/lib/ExecutionEngine/JIT/JITMemoryManager.cpp
+++ b/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);