[m-dev.] Loop flattening and LCPS optimization
Ralph Becket
rbeck at microsoft.com
Tue Apr 24 02:48:20 AEST 2001
> From: Fergus Henderson [mailto:fjh at cs.mu.OZ.AU]
> Sent: 23 April 2001 17:17
>
> In general, currently we don't do a great job of loop optimization in
> the Mercury compiler. Another optimization which might pay quite
well,
> at least for some programs, is hoisting out loop-invariant
computations.
Wargh! I write a lot of code that assumes that loop-invariants get
lifted out.
Before I fret, you are saying that with
f(X) = (if X = g(123) then done(X) else f(succ(X))).
the compiled code will currently evaluate g(123) on every loop
iteration?
--------------------------------------------------------------------------
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