[m-rev.] for review: factoring out the types of common static cells

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Apr 30 21:52:12 AEST 2003


The general idea is definitely a good one.

On 30-Apr-2003, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> In order to avoid having to leave a copy of that code in llds_out,
> llds_common now has the task of converting *all* create rvals in the
> generated LLDS to references to common structures.
...
> compiler/mercury_compile.m:
...
> 	Always call llds_common, since llds_out can no longer handle the create
> 	rvals it eliminates.
> 
> compiler/options.m:
> doc/user_guide.texi:
> 	Delete the option that controlled whether llds_common was run.

So the "--no-common-data" option no longer works?
That is not good: it would make it much more difficult to do "fair"
comparisons between the MLDS and LLDS back-ends
(currently the MLDS back-end does not do common data optimizations

Also, in general I think it is a good idea if all optimizations
are disable-able.

So I would prefer to keep the "--no-common-data" option.

> compiler/llds_out.m:
> 	Conform to the changes to the llds.m.
> 
> 	Delete the code whose functionality was moved to llds_common.
> 
> 	Throw an exception if a create rval remains in the LLDS, since
> 	outputing it as a constant would require the code we moved
> 	to llds_common.

Couldn't the code in question just be exported from llds_common,
or put in some other module such as code_util.m,
and then called from both llds_common and llds_out?

(Haven't looked at the diff in detail yet.)

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list