summaryrefslogtreecommitdiff
path: root/include/llvm/Support/RecyclingAllocator.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-07-28 21:51:04 +0000
committerDan Gohman <gohman@apple.com>2008-07-28 21:51:04 +0000
commitfed90b6d097d50881afb45e4d79f430db66dd741 (patch)
tree7ec1a6f6b2a8a37e054b84505502b3346c6680c7 /include/llvm/Support/RecyclingAllocator.h
parent80e051dfdede65678ac66f1552278338bc1a1b33 (diff)
downloadllvm-fed90b6d097d50881afb45e4d79f430db66dd741.tar.gz
llvm-fed90b6d097d50881afb45e4d79f430db66dd741.tar.bz2
llvm-fed90b6d097d50881afb45e4d79f430db66dd741.tar.xz
Fold the useful features of alist and alist_node into ilist, and
a new ilist_node class, and remove them. Unlike alist_node, ilist_node doesn't attempt to manage storage itself, so it avoids the associated problems, including being opaque in gdb. Adjust the Recycler class so that it doesn't depend on alist_node. Also, change it to use explicit Size and Align parameters, allowing it to work when the largest-sized node doesn't have the greatest alignment requirement. Change MachineInstr's MachineMemOperand list from a pool-backed alist to a std::list for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54146 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/RecyclingAllocator.h')
-rw-r--r--include/llvm/Support/RecyclingAllocator.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/llvm/Support/RecyclingAllocator.h b/include/llvm/Support/RecyclingAllocator.h
index 071a61d9dc..8e957f1b26 100644
--- a/include/llvm/Support/RecyclingAllocator.h
+++ b/include/llvm/Support/RecyclingAllocator.h
@@ -22,12 +22,13 @@ namespace llvm {
/// RecyclingAllocator - This class wraps an Allocator, adding the
/// functionality of recycling deleted objects.
///
-template<class AllocatorType, class T, class LargestT = T>
+template<class AllocatorType, class T,
+ size_t Size = sizeof(T), size_t Align = AlignOf<T>::Alignment>
class RecyclingAllocator {
private:
/// Base - Implementation details.
///
- Recycler<T, LargestT> Base;
+ Recycler<T, Size, Align> Base;
/// Allocator - The wrapped allocator.
///