summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/BasicBlock.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-04-17 04:04:14 +0000
committerChris Lattner <sabre@nondot.org>2007-04-17 04:04:14 +0000
commit422cfcdcb3c33b50878fd66dca3fa4091e95ac9b (patch)
treea81201eb2030d0a063c90f22502039d85d28dc21 /llvm/lib/VMCore/BasicBlock.cpp
parentb47aa543bb7a2e1521eea79978dc83cf0c8125bc (diff)
downloadbcm5719-llvm-422cfcdcb3c33b50878fd66dca3fa4091e95ac9b.tar.gz
bcm5719-llvm-422cfcdcb3c33b50878fd66dca3fa4091e95ac9b.zip
The (negative) offset from a SymbolTableListTraits-using ilist to its container
object is always constant. As such, evaluate it at compile time instead of storing it as an ivar in SymbolTableListTraits. This shrinks every SymbolTableListTraits ilist by a word, shrinking BasicBlock from 44->40 bytes, Function from 96->88 bytes, and Module from 60->52 bytes. llvm-svn: 36189
Diffstat (limited to 'llvm/lib/VMCore/BasicBlock.cpp')
-rw-r--r--llvm/lib/VMCore/BasicBlock.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/BasicBlock.cpp b/llvm/lib/VMCore/BasicBlock.cpp
index e10948e2ad3..431bb5090a7 100644
--- a/llvm/lib/VMCore/BasicBlock.cpp
+++ b/llvm/lib/VMCore/BasicBlock.cpp
@@ -72,8 +72,6 @@ template class SymbolTableListTraits<Instruction, BasicBlock>;
BasicBlock::BasicBlock(const std::string &Name, Function *NewParent,
BasicBlock *InsertBefore)
: Value(Type::LabelTy, Value::BasicBlockVal), Parent(0) {
- // Initialize the instlist.
- InstList.setItemParent(this);
// Make sure that we get added to a function
LeakDetector::addGarbageObject(this);
OpenPOWER on IntegriCloud