summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Allocator.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-04-14 05:11:27 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-04-14 05:11:27 +0000
commiteed3466a42bc949be5cffe9431c53176e8615994 (patch)
tree173bd3c67a0964b0fd44ed8ba505ac35cb03b4f6 /llvm/lib/Support/Allocator.cpp
parent6751e2586de3bbaf717891ed8b1f2e4f9392faa5 (diff)
downloadbcm5719-llvm-eed3466a42bc949be5cffe9431c53176e8615994.tar.gz
bcm5719-llvm-eed3466a42bc949be5cffe9431c53176e8615994.zip
[Allocator] Make the underlying allocator a template instead of an
abstract interface. The only user of this functionality is the JIT memory manager and it is quite happy to have a custom type here. This removes a virtual function call and a lot of unnecessary abstraction from the common case where this is just a *very* thin vaneer around a call to malloc. Hopefully still no functionality changed here. =] llvm-svn: 206149
Diffstat (limited to 'llvm/lib/Support/Allocator.cpp')
-rw-r--r--llvm/lib/Support/Allocator.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/llvm/lib/Support/Allocator.cpp b/llvm/lib/Support/Allocator.cpp
index 9d9873981eb..ae861c8c4b6 100644
--- a/llvm/lib/Support/Allocator.cpp
+++ b/llvm/lib/Support/Allocator.cpp
@@ -21,18 +21,6 @@
namespace llvm {
-SlabAllocator::~SlabAllocator() { }
-
-MallocSlabAllocator::~MallocSlabAllocator() { }
-
-void *MallocSlabAllocator::Allocate(size_t Size) {
- return Allocator.Allocate(Size, 0);
-}
-
-void MallocSlabAllocator::Deallocate(void *Slab, size_t Size) {
- Allocator.Deallocate(Slab);
-}
-
void printBumpPtrAllocatorStats(unsigned NumSlabs, size_t BytesAllocated,
size_t TotalMemory) {
errs() << "\nNumber of memory regions: " << NumSlabs << '\n'
OpenPOWER on IntegriCloud