summaryrefslogtreecommitdiff
path: root/include/llvm/BasicBlock.h
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/BasicBlock.h
parent076aee32e86bc4a0c096262b3261923f25220dc6 (diff)
downloadllvm-c23b8719ef9d6b1220e854b37d40e9e1c48a82bc.tar.gz
llvm-c23b8719ef9d6b1220e854b37d40e9e1c48a82bc.tar.bz2
llvm-c23b8719ef9d6b1220e854b37d40e9e1c48a82bc.tar.xz
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/BasicBlock.h')
-rw-r--r--include/llvm/BasicBlock.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/BasicBlock.h b/include/llvm/BasicBlock.h
index 521815f53c..561dbb2791 100644
--- a/include/llvm/BasicBlock.h
+++ b/include/llvm/BasicBlock.h
@@ -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();