Don't taint relaxed loads that immediately comes before an AcqRel read-modify-write op
[oota-llvm.git] / lib / Support / Allocator.cpp
index 9d9873981eb42d016d1384bf8d550ed4616b1ea5..f48edac0598ce13ece81ec075fbfbb9b0ca35a10 100644 (file)
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Support/Allocator.h"
-#include "llvm/Support/Compiler.h"
-#include "llvm/Support/DataTypes.h"
-#include "llvm/Support/Memory.h"
-#include "llvm/Support/Recycler.h"
 #include "llvm/Support/raw_ostream.h"
-#include <cstring>
 
 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);
-}
+namespace detail {
 
 void printBumpPtrAllocatorStats(unsigned NumSlabs, size_t BytesAllocated,
                                 size_t TotalMemory) {
@@ -42,6 +27,8 @@ void printBumpPtrAllocatorStats(unsigned NumSlabs, size_t BytesAllocated,
          << " (includes alignment, etc)\n";
 }
 
+} // End namespace detail.
+
 void PrintRecyclerStats(size_t Size,
                         size_t Align,
                         size_t FreeListSize) {