[m-rev.] for review: fix foreign_decls in the LLDS grades

Peter Ross pro at missioncriticalit.com
Fri Aug 2 23:05:28 AEST 2002


On Fri, Aug 02, 2002 at 04:58:41PM +1000, Simon Taylor wrote:
> On 01-Aug-2002, Peter Ross <pro at missioncriticalit.com> wrote:
> > On Thu, Aug 01, 2002 at 08:23:00AM +1000, Fergus Henderson wrote:
> > > On 31-Jul-2002, Peter Ross <petdr at cs.mu.OZ.AU> wrote:
> > > > compiler/intermod.m:
> > > >     Don't add pragma foreign_code to .opt files until the limitation
> > > >     with foreign_import_module documented in
> > > >     intermod__write_intermod_info_2 is fixed.
> > > 
> > > That looks like it could cause a serious performance regression
> > > for a lot of programs.  Is this really needed?
> > > 
> > Well according to the XXX in intermod__write_intermod_info_2, using
> > foreign_include_module causes the library not to compile, so yes it is
> > needed.
> > 
> > I intend to look at fixing this problem as a seperate change.
> 
> It would be better to fix this first.
> 
> Fixing this properly is more difficult than it appears because
> `mmake depend' doesn't have information about the dependencies of
> modules in libraries, so it's not possible to work out the full
> set of header files that a given module could depend on.  After the
> first compilation the `.d' files can be updated with the correct set
> of headers.  We already get this wrong for `.opt' files with
> `--read-opt-files-transitively'.
> 
Well seeing that this fix actually fixes a bug that impacts me, I would
prefer to have it reviewed and checked in.  So if either you or fjh
could review it, that would be great.

I will look into fixing the problem with pragma foreign_import_module
today.

> In practice it shouldn't be too much of a problem, but we should document
> somewhere that `--intermodule-optimization' only works properly with
> `mmc --make'.
> 
Thanks for the explaination.

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