+void PrintRecyclerStats(size_t Size, size_t Align, size_t FreeListSize);
+
+/// RecyclerStruct - Implementation detail for Recycler. This is a
+/// class that the recycler imposes on free'd memory to carve out
+/// next/prev pointers.
+struct RecyclerStruct {
+ RecyclerStruct *Prev, *Next;
+};
+
+template<>
+struct ilist_traits<RecyclerStruct> :
+ public ilist_default_traits<RecyclerStruct> {
+ static RecyclerStruct *getPrev(const RecyclerStruct *t) { return t->Prev; }
+ static RecyclerStruct *getNext(const RecyclerStruct *t) { return t->Next; }
+ static void setPrev(RecyclerStruct *t, RecyclerStruct *p) { t->Prev = p; }
+ static void setNext(RecyclerStruct *t, RecyclerStruct *n) { t->Next = n; }
+
+ mutable RecyclerStruct Sentinel;
+ RecyclerStruct *createSentinel() const {
+ return &Sentinel;
+ }
+ static void destroySentinel(RecyclerStruct *) {}
+
+ RecyclerStruct *provideInitialHead() const { return createSentinel(); }
+ RecyclerStruct *ensureHead(RecyclerStruct*) const { return createSentinel(); }
+ static void noteHead(RecyclerStruct*, RecyclerStruct*) {}
+
+ static void deleteNode(RecyclerStruct *) {
+ llvm_unreachable("Recycler's ilist_traits shouldn't see a deleteNode call!");
+ }
+};