[m-dev.] for review: make tailcall loops an MLDS transformation

Zoltan Somogyi zs at cs.mu.OZ.AU
Tue Aug 22 14:13:52 AEST 2000


On 22-Aug-2000, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> compiler/ml_optimize.m:
> 	New file that performs MLDS->MLDS optimizations such as turning 
> 	self-tail calls into loops.

Having one file for all MLDS->MLDS optimizations will probably prove too
constraining. If I were you, I'd move the tailcall optimization into a separate
file (e.g. ml_tailcall.m), and have ml_optimize.m invoke ml_tailcall.m.
Then later you can add other optimizations in other files and just add
invocations of them to ml_optimize.m. This obeys the principle of separation
of concerns, and limits the sizes of source files. Optimize.m works this way
for the LLDS back end, and it has proven quite useful.

Zoltan.
--------------------------------------------------------------------------
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