[gclist] Compiler lifetime analysis

Jeremy Fitzhardinge jeremy@zip.com.au
Sat, 17 Aug 1996 18:41:50 +1000


Hi all,

I'm looking for information on compiler techniques to do lifetime
analysis of allocated objects, with a view to replacing calls to a
general allocator with faster allocation techniques where possible.

The best case would be if the compiler can prove that an object only has
local scope, and therefore replace the call to the allocator with stack
allocation.  Another possibility is that it could generate an explicit
free of an allocated object, though its less clear that that would have
dramatic performance improvements.

Also, could many general GC allocators make use of a lifetime hint when
the object is allocated?  The idea is that an object has sufficiently
complex usage characteristics that it still needs general GC, but the
compiler can guess that it has a short/long lifetime.  I'm wondering if
such a hint could appreciably increase the efficiency of the allocator.

As an aside, this seems to be related to the general case of the problem
of tail call elimination being discussed on this list.

Thanks,
	J