[m-dev.] for review: added new option `--mark-tailcalls'

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Feb 5 01:04:30 AEDT 2001


On 05-Feb-2001, Julien Fischer <juliensf at students.cs.mu.oz.au> wrote:
> Index: compiler/handle_options.m
> @@ -334,6 +336,9 @@
> +	% --no-mlds_optimize implies --no-optimize-tailcalls
> +	option_neg_implies(optimize, optimize_tailcalls, bool(no)),

s/mlds_optimize/mlds-optimize/

> Index: compiler/options.m
> @@ -2530,7 +2536,9 @@
>  	io__write_string("\n    MLDS -> MLDS optimizations:\n"),
>  	write_tabbed_lines([
>  		"--no-mlds-optimize",
> -		"\tDisable the MLDS->MLDS optimization passes."
> +		"\tDisable the MLDS->MLDS optimization passes.",
> +		"--optimize-tailcalls",
> +		"\tOptimize tailcalls by turning self-tailcalls into loops."
>  	]).

Our convention for documenting options which have both a positive and
a negative form is to document the form that is not the default.  In
this case, the default optimization level is `-O2', and the optimization
is enabled at that optimization level, so to be consistent with the
documentation elsewhere the negative form `--no-optimize-tailcalls'
should be documented rather than the positive form.

So make that

		"--no-optimize-tailcalls",
		"\tDon't optimize tailcalls by turning self-tailcalls into loops."

or

		"--no-optimize-tailcalls",
		"\tTreat tailcalls as ordinary calls, rather than optimizing them",
		"\tby turning self-tailcalls into loops."

or something along those lines.

> +++ doc/user_guide.texi	2001/02/04 13:45:10
> @@ -4097,6 +4097,10 @@
>  @item --no-mlds-optimize
>  Disable the MLDS -> MLDS optimization passes.
>  
> + at sp 1
> + at item --optimize-tailcalls
> +Optimize tailcalls by turning self-tailcalls into loops.
> +

Likewise here.

Otherwise, that looks good.
Please post a relative diff, but feel free to commit it without waiting for review.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- 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