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
This commit is contained in:
Gabor Greif
2009-03-04 20:36:44 +00:00
parent 076aee32e8
commit c23b8719ef
7 changed files with 71 additions and 11 deletions

View File

@@ -41,6 +41,10 @@ template<> struct ilist_traits<Instruction>
return static_cast<Instruction*>(&Sentinel);
}
static void destroySentinel(Instruction*) {}
Instruction *provideInitialHead() const { return createSentinel(); }
Instruction *ensureHead(Instruction*) const { return createSentinel(); }
static iplist<Instruction> &getList(BasicBlock *BB);
static ValueSymbolTable *getSymTab(BasicBlock *ItemParent);
static int getListOffset();