aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2009-03-01 16:38:10 +0000
committerGabor Greif <ggreif@gmail.com>2009-03-01 16:38:10 +0000
commitabd6f28a74e74303725ec123bdfe9202617115c8 (patch)
treecaa4ebd3eb34a8b9cb748678a375678798e9f0d0 /lib/VMCore
parent358f24943aab6d3a168eb075f9435e31e85f6c38 (diff)
downloadexternal_llvm-abd6f28a74e74303725ec123bdfe9202617115c8.zip
external_llvm-abd6f28a74e74303725ec123bdfe9202617115c8.tar.gz
external_llvm-abd6f28a74e74303725ec123bdfe9202617115c8.tar.bz2
Reuse a technique (pioneered for BasicBlocks) of superposing ilist with
its sentinel. This is quite a win when a function really has a basic block. When the function is just a declaration (and stays so) the old way did not allocate a sentinel. So this change is most beneficial when the ratio of function definition to declaration is high. I.e. linkers etc. Incidentally these are the most resource demanding applications, so I expect that the reduced malloc traffic, locality and space savings outweigh the cost of addition of two pointers to Function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65776 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r--lib/VMCore/Function.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/lib/VMCore/Function.cpp b/lib/VMCore/Function.cpp
index cff4457..fefe082 100644
--- a/lib/VMCore/Function.cpp
+++ b/lib/VMCore/Function.cpp
@@ -22,13 +22,6 @@
#include "llvm/ADT/StringExtras.h"
using namespace llvm;
-BasicBlock *ilist_traits<BasicBlock>::createSentinel() {
- BasicBlock *Ret = BasicBlock::Create();
- // This should not be garbage monitored.
- LeakDetector::removeGarbageObject(Ret);
- return Ret;
-}
-
iplist<BasicBlock> &ilist_traits<BasicBlock>::getList(Function *F) {
return F->getBasicBlockList();
}