Switch from using an ilist for uses to using a custom doubly linked list.
authorChris Lattner <sabre@nondot.org>
Tue, 1 Feb 2005 01:22:06 +0000 (01:22 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 1 Feb 2005 01:22:06 +0000 (01:22 +0000)
commita26619748932b146a09773d51465d7b7dcdb7dd2
tree9e3eb023a0c423bda87ffff0659d5809a90cd311
parentcaa7c19fb4ca60e21dc8fa9b10c736a05a9f9c22
Switch from using an ilist for uses to using a custom doubly linked list.
This list does not provide the ability to go backwards in the list (its
more of an unordered collection, stored in the shape of a list).

This change means that use iterators are now only forward iterators, not
bidirectional.

This improves the memory usage of use lists from '5 + 4*#use' per value to
'1 + 4*#use'.  While it would be better to reduce the multiplied factor,
I'm not smart enough to do so.  This list also has slightly more efficient
operators for manipulating list nodes (a few less loads/stores), due to not
needing to be able to iterate backwards through the list.

This change reduces the memory footprint required to hold 176.gcc from
66.025M -> 57.687M, a 14% reduction.  It also speeds up the compiler,
7.73% in the case of bytecode loading alone (release build loading 176.gcc).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19956 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/CFG.h
include/llvm/Use.h
include/llvm/Value.h