[m-dev.] Reuse question

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Oct 3 11:21:58 AEDT 2000


On 02-Oct-2000, Peter Ross <petdr at miscrit.be> wrote:
> On Mon, Oct 02, 2000 at 04:08:20PM +0200, Peter Ross wrote:
> > On Mon, Oct 02, 2000 at 06:38:33AM -0700, Ralph Becket wrote:
> > > How low-level does the reuse analysis go?  It would be nice if, when
> > > mapping over a list of cells that are then up for reuse, the list cells
> > > were updated in place.
> > > 
> > Yes the current analysis detects that there is reuse available there
> > provided that the original list is never needed again.
> 
> I lied the current analysis doesn't mark it for reuse because the
> predicate contains an higher order call.  Higher order calls are
> currently handled by setting the possible aliasing to top (everything is
> possibly aliased with everything else).

If you compile with appropriate optimization enabled (e.g.
-O6 --intermodule-optimization), the compiler should specialize
the code for list__map, and convert the higher-order call into a first-order
call.

Is reuse analysis getting done before higher-order specialization?

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list