mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Refactor SymbolTableListTraits to only have a single pointer in it, instead
of two. This shrinkifies Function by 8 bytes (104->96) and Module by 8 bytes (68->60). On a testcase of mine, this reduces the memory used to read a module header from 565680b to 561024, a little over 4K. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36188 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -44,8 +44,8 @@ iplist<Argument> &ilist_traits<Argument>::getList(Function *F) {
|
||||
|
||||
// Explicit instantiations of SymbolTableListTraits since some of the methods
|
||||
// are not in the public header file...
|
||||
template class SymbolTableListTraits<Argument, Function, Function>;
|
||||
template class SymbolTableListTraits<BasicBlock, Function, Function>;
|
||||
template class SymbolTableListTraits<Argument, Function>;
|
||||
template class SymbolTableListTraits<BasicBlock, Function>;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Argument Implementation
|
||||
@@ -144,9 +144,7 @@ Function::Function(const FunctionType *Ty, LinkageTypes Linkage,
|
||||
ParamAttrs = 0;
|
||||
CallingConvention = 0;
|
||||
BasicBlocks.setItemParent(this);
|
||||
BasicBlocks.setParent(this);
|
||||
ArgumentList.setItemParent(this);
|
||||
ArgumentList.setParent(this);
|
||||
SymTab = new ValueSymbolTable();
|
||||
|
||||
assert((getReturnType()->isFirstClassType() ||getReturnType() == Type::VoidTy)
|
||||
@@ -171,7 +169,6 @@ Function::~Function() {
|
||||
|
||||
// Delete all of the method arguments and unlink from symbol table...
|
||||
ArgumentList.clear();
|
||||
ArgumentList.setParent(0);
|
||||
delete SymTab;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user