[m-dev.] for review: fix to liveness.m

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Feb 27 17:14:41 AEDT 2001


On 27-Feb-2001, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> compiler/options.m:
> 	Add a new option, --debug-liveness <predid>, that causes the HLDS of
> 	the specified procedure to be dumped to stdout between the major phases
> 	of the liveness pass. Without this, it is very difficult to debug the
> 	liveness pass.

The option documented there should also be documented in user_guide.texi.

> compiler/handle_options.m:
> 	Make HLDS dumps detailed when the new option is given.

> +++ compiler/handle_options.m	2001/02/08 04:34:52
> @@ -356,6 +357,18 @@
>  	option_implies(transitive_optimization, use_trans_opt_files, bool(no)),
>  
>  	option_implies(very_verbose, verbose, bool(yes)),
> +	globals__io_lookup_int_option(debug_liveness, DebugLiveness),
> +	(
> +		{ DebugLiveness >= 0 },
> +		{ convert_dump_alias("all", AllDumpOptions) }
> +	->
> +		globals__io_lookup_string_option(dump_hlds_options,
> +			DumpOptions0),
> +		{ string__append(DumpOptions0, AllDumpOptions, DumpOptions) },
> +		globals__io_set_option(dump_hlds_options, string(DumpOptions))
> +	;
> +		[]
> +	),

I think a comment there would be helpful.
Also a blank line before the newly inserted code.

Otherwise, that looks fine.  (I just did a quick review --
I didn't check the logic of the changes to the liveness computation.)

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