summaryrefslogtreecommitdiffstats
path: root/llvm/lib
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
commit6f8d4ae3c0c8566d0b0384e40f160cddd3c8bb2a (patch)
treec1bcb1680c5c570378b7ea1d9af528e20bf102b5 /llvm/lib
parent491f9e89ae154fdf24fd2dc743d83397a2b89b04 (diff)
downloadbcm5719-llvm-6f8d4ae3c0c8566d0b0384e40f160cddd3c8bb2a.tar.gz
bcm5719-llvm-6f8d4ae3c0c8566d0b0384e40f160cddd3c8bb2a.zip
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. llvm-svn: 65776
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/VMCore/Function.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/llvm/lib/VMCore/Function.cpp b/llvm/lib/VMCore/Function.cpp
index cff4457a418..fefe082cb4e 100644
--- a/llvm/lib/VMCore/Function.cpp
+++ b/llvm/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();
}
OpenPOWER on IntegriCloud