aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Support
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2009-03-04 20:36:44 +0000
committerGabor Greif <ggreif@gmail.com>2009-03-04 20:36:44 +0000
commitc23b8719ef9d6b1220e854b37d40e9e1c48a82bc (patch)
treeafd0f1a6f924ba5609ce8f6212078b7407895840 /include/llvm/Support
parent076aee32e86bc4a0c096262b3261923f25220dc6 (diff)
downloadexternal_llvm-c23b8719ef9d6b1220e854b37d40e9e1c48a82bc.tar.gz
external_llvm-c23b8719ef9d6b1220e854b37d40e9e1c48a82bc.tar.bz2
external_llvm-c23b8719ef9d6b1220e854b37d40e9e1c48a82bc.zip
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
Diffstat (limited to 'include/llvm/Support')
-rw-r--r--include/llvm/Support/Recycler.h3
1 files changed, 3 insertions, 0 deletions
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<RecyclerStruct> : ilist_default_traits<RecyclerStruct> {
}
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!");
}