Another way to say what William is saying:

Region analysis infers (a) which items have a statically bounded lifespan
and (b) whether the *set* of items in a given lifespan is statically
bounded (which tells you the size needed). Region analysis also reveals a
lifetime ordering relation that can be exploited for optimization. Finally,
region analysis subsumes escape analysis.

Given this information, a variety of optimizations and runtime choices
become possible that could not be done safely without the information that
the region analysis provided. The two most important examples of enabled
optimizations are stack allocation and recognition of many cases where
release can be performed without the need for liveness tracing. These
optimizations are complementary to, rather than a replacement for, GC.

In its explicit form, regions can also give you a place to stand to gather
objects together so that you can control the conditions and timing of their
release, and simultaneously *check* the non-liveness requirements that
allow you to bulk-release those pools without violating memory safety. The
same information from which the non-liveness requirements check is
performed can be used to figure out the root set of a given explicit
region, allowing GC to occur over smaller portions of the heap.

Region analysis is just that: an analysis.

The Tofte paper is very much worth reading. Among other things, it explains
why the region analysis problem can be viewed as a special case of
generalized effect analysis, which is useful for a whole bunch of things.
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to