From c23b8719ef9d6b1220e854b37d40e9e1c48a82bc Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Wed, 4 Mar 2009 20:36:44 +0000 Subject: Give sentinel traits the right to determine the policy where the sentinel is kept. This should result in less indirect memory accesses, less dead writes and tighter code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66061 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/Recycler.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/llvm/Support') diff --git a/include/llvm/Support/Recycler.h b/include/llvm/Support/Recycler.h index 3f235b6e72..39c992bc53 100644 --- a/include/llvm/Support/Recycler.h +++ b/include/llvm/Support/Recycler.h @@ -46,6 +46,9 @@ struct ilist_traits : ilist_default_traits { } static void destroySentinel(RecyclerStruct *) {} + RecyclerStruct *provideInitialHead() const { return createSentinel(); } + RecyclerStruct *ensureHead(RecyclerStruct*) const { return createSentinel(); } + static void deleteNode(RecyclerStruct *) { assert(0 && "Recycler's ilist_traits shouldn't see a deleteNode call!"); } -- cgit v1.2.3