[m-rev.] for review: read .opt files transitively

Peter Ross peter.ross at miscrit.be
Thu Apr 19 05:55:22 AEST 2001


On Wed, Apr 18, 2001 at 11:41:23PM +1000, Fergus Henderson wrote:
> Here's (a first draft of) a change to read in the `.opt' files transitively.
> See my post to mercury-developers for detailed rationale.
> 
> With this change, `tools/bootcheck --grade il' gets as far as building all
> the `.opt' and `.trans_opt' files, but dies when compiling benchmarking.m;
> the problem there is an unrelated one, namely that the IL back-end doesn't
> support nested classes.
> 
> This change is probably not quite ready for prime-time yet.
> There are a couple of XXXs that need to be investigated.
> I'm also not quite sure whether this is a good thing to do
> for grades other than .NET/Java.  On the one hand, it may well
> improve optimization.  On the other hand, it will increase
> compilation time.  (Presuming intermodule optimization is enabled,
> that is; otherwise this change will have no effect.)
> 
> Do you think we should just read `.opt' files transitively all the time,
> as is done in this patch?
> Or do you think it is worth adding yet another compilation option to
> control it?
> 
A patch like this is also needed for the reuse analysis, because the
type (and hence representation) of every variable needs to be known.  I
have one implemented on the reuse branch.  However I am not totally sure
of the correctness of my approach.

However the increased amount of inlining due to the transitive reading
in of the .opt files lead to a 5% speedup on the ICFP programming
contest entry, so I think it is worthwhile to make it the default
behaviour for intermodule optimization.

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