diff options
author | Gabor Greif <ggreif@gmail.com> | 2009-03-04 20:36:44 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2009-03-04 20:36:44 +0000 |
commit | c23b8719ef9d6b1220e854b37d40e9e1c48a82bc (patch) | |
tree | afd0f1a6f924ba5609ce8f6212078b7407895840 /include/llvm/Function.h | |
parent | 076aee32e86bc4a0c096262b3261923f25220dc6 (diff) | |
download | llvm-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/Function.h')
-rw-r--r-- | include/llvm/Function.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/Function.h b/include/llvm/Function.h index 37e8f19f62..cb3cc939d0 100644 --- a/include/llvm/Function.h +++ b/include/llvm/Function.h @@ -38,6 +38,10 @@ template<> struct ilist_traits<BasicBlock> return static_cast<BasicBlock*>(&Sentinel); } static void destroySentinel(BasicBlock*) {} + + BasicBlock *provideInitialHead() const { return createSentinel(); } + BasicBlock *ensureHead(BasicBlock*) const { return createSentinel(); } + static iplist<BasicBlock> &getList(Function *F); static ValueSymbolTable *getSymTab(Function *ItemParent); static int getListOffset(); @@ -52,6 +56,10 @@ template<> struct ilist_traits<Argument> return static_cast<Argument*>(&Sentinel); } static void destroySentinel(Argument*) {} + + Argument *provideInitialHead() const { return createSentinel(); } + Argument *ensureHead(Argument*) const { return createSentinel(); } + static iplist<Argument> &getList(Function *F); static ValueSymbolTable *getSymTab(Function *ItemParent); static int getListOffset(); |