[m-rev.] for review: --eliminate-local-vars

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Feb 7 22:30:34 AEDT 2002


On 07-Feb-2002, Peter Ross <peter.ross at miscrit.be> wrote:
> On Thu, Feb 07, 2002 at 04:34:16AM +1100, Fergus Henderson wrote:
> > Add a new MLDS->MLDS optimization option, --eliminate-local-variables.
> > The aim of this pass is to improve performance in cases where local
> > variables are costly -- for nondeterministic procedures,
> > for MLDS->C accurate GC, and for the .NET back-end.
>
> For interest, why are local variables costly on the .NET back-end?

I don't know.  That's the trouble with closed-source systems.

But I guess it is probably just because the JIT doesn't optimize them away.

> > Index: compiler/ml_elim_nested.m
> > +			% we need to strip out the initializer (if any)
> > +			% and convert it into an assignment statement,
> > +			% since this local variable is going to become
> > +			% a field, and fields can have initializers.
> 
> I assume that can have initializers should be *cannot* have initializers.

Right.  I will fix this.

> > +++ compiler/options.m	6 Feb 2002 14:35:44 -0000
> > @@ -1097,9 +1099,11 @@
> >  long_option("auto-comments",		auto_comments).
> >  long_option("show-dependency-graph",	show_dependency_graph).
> >  long_option("dump-hlds",		dump_hlds).
> > +long_option("hlds-dump",		dump_hlds).
> >  long_option("dump-hlds-alias",		dump_hlds_alias).
> >  long_option("dump-hlds-options",	dump_hlds_options).
> >  long_option("dump-mlds",		dump_mlds).
> > +long_option("mlds-dump",		dump_mlds).
> >  long_option("dump-rl",			dump_rl).
> >  long_option("dump-rl-bytecode",		dump_rl_bytecode).
> >  long_option("sign-assembly",		sign_assembly).
> 
> This change is not mentioned, I suggest doing this change seperately.

Oops.  I didn't mean to include that here.
But I've committed it already, I'm afraid.

The log message for that one should have been something like

	compiler/options.m:
		Allow `--mlds-dump' as an abbreviation for `--dump-mlds',
		and likewise for `--hlds-dump'.  This is because I keep
		forgetting which order the two words go in.

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