An eager reference-counting garbage collection system performs a static
analysis on the intermediate representation of a program. The system then
uses liveness information to inject eager reference-counting updates into
the program. Through the use of the liveness information,
reference-counting decrements can be made earlier in execution than in
traditional reference-counting schemes, freeing up memory more
efficiently. Additionally, a reference-counting subsumption optimization
tool identifies redundant reference-counting updates and removes them,
lowering the number of garbage collection update calls and improving
execution throughput. Reference-counting subsumption can also be used as
a throughput enhancer in traditional reference-counting schemes that
maintain up-to-date tallies of references from the stack.