diff options
author | Chris Lattner <sabre@nondot.org> | 2007-04-17 03:26:42 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-04-17 03:26:42 +0000 |
commit | 17fcdd5e1b78b829068ca657c97357a39d6e768b (patch) | |
tree | db5c01cfda299d428837e2689e9aca31bf1bf556 /include/llvm/Instruction.h | |
parent | 205c27d4a904c12d1bfb0b2961daab70f286cc20 (diff) | |
download | llvm-17fcdd5e1b78b829068ca657c97357a39d6e768b.tar.gz llvm-17fcdd5e1b78b829068ca657c97357a39d6e768b.tar.bz2 llvm-17fcdd5e1b78b829068ca657c97357a39d6e768b.tar.xz |
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
Diffstat (limited to 'include/llvm/Instruction.h')
-rw-r--r-- | include/llvm/Instruction.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/include/llvm/Instruction.h b/include/llvm/Instruction.h index ed0357f823..dbf41f179f 100644 --- a/include/llvm/Instruction.h +++ b/include/llvm/Instruction.h @@ -22,9 +22,8 @@ namespace llvm { struct AssemblyAnnotationWriter; class BinaryOperator; -template<typename SC> struct ilist_traits; -template<typename ValueSubClass, typename ItemParentClass, typename SymTabClass, - typename SubClass> class SymbolTableListTraits; +template<typename ValueSubClass, typename ItemParentClass> + class SymbolTableListTraits; class Instruction : public User { void operator=(const Instruction &); // Do not implement @@ -36,8 +35,7 @@ class Instruction : public User { void setNext(Instruction *N) { Next = N; } void setPrev(Instruction *N) { Prev = N; } - friend class SymbolTableListTraits<Instruction, BasicBlock, Function, - ilist_traits<Instruction> >; + friend class SymbolTableListTraits<Instruction, BasicBlock>; void setParent(BasicBlock *P); protected: Instruction(const Type *Ty, unsigned iType, Use *Ops, unsigned NumOps, |