[m-dev.] for review: fix intermodule optimization bugs
Fergus Henderson
fjh at cs.mu.OZ.AU
Fri Nov 12 16:32:52 AEDT 1999
On 12-Nov-1999, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
>
>
> Estimated hours taken: 2
>
> Fix two bugs in intermodule optimization reported by Warwick Harvey.
>
> compiler/intermod.m:
> Don't read `.opt' files for nested modules.
Ouch.
That is fine as a work-around for the coming release,
but it would be nice if we could find a solution
(rather than a work-around) for that problem.
> @@ -1731,27 +1753,37 @@
> read_optimization_interfaces([], Items, Items, Error, Error) --> [].
> read_optimization_interfaces([Import | Imports],
> Items0, Items, Error0, Error) -->
> + ( { Import = qualified(_, _) } ->
> + % Don't read in optimization interfaces for
> + % nested modules, because we also need to read in
> + % the `.int0' file for the parent modules.
> + % Reading them in may cause problems because the
> + % `.int0' files duplicate information in the `.int'
> + % files.
> + { Error1 = Error0 },
> + { Items2 = Items0 }
That comment deserves an XXX, IMHO.
Also, I think it would make sense to change handle_options.m
to make `--check-termination' imply `--warn-missing-trans-opt-files'.
Apart from that, that change looks fine.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- 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