[m-rev.] for post-commit review: a start on getting type repn info from .int files
Peter Wang
novalazy at gmail.com
Thu Jul 22 11:52:41 AEST 2021
On Tue, 20 Jul 2021 20:07:52 +1000 Peter Wang <novalazy at gmail.com> wrote:
> On Tue, 20 Jul 2021 19:27:18 +1000 Julien Fischer <jfischer at opturion.com> wrote:
> >
> > On Tue, 20 Jul 2021, Zoltan Somogyi wrote:
> >
> > > 2021-07-20 16:29 GMT+10:00 "Zoltan Somogyi" <zoltan.somogyi at runbox.com>:
> > >> 2021-07-20 16:22 GMT+10:00 "Peter Wang" <novalazy at gmail.com>:
> > >>> The failures occur when bootchecking with this in Mmake.stage.params:
> > >>> > EXTRA_MCFLAGS=-O5 --intermod-opt
> > >>> > Zoltan, do you want to take a look at it?
> > >>
> > >> I could have sworn I have got clear bootchecks with those options
> > >> several times since then with those parameters, but yes, I will take a look.
> > >
> > > My bootcheck with -O5 --intermod-opt in hlc.gc just finished, and had
> > > no unexpected test failures. Unless someone can tell me how to reproduce
> > > the problems on testing, I can't look into those problems.
> >
> > Could the issue be related to the fact that on the test server, the
> > builds are bootstrapped from a source distribution? (That seems unlikely,
> > but I can't think what else would be causing this -- like Zoltan, when
> > I tried -O5 --intermod-opt on my machine, I could not reproduce this.)
>
> I'll take a look at it this week.
tests/invalid has a list of SINGLEMODULE programs, which are tested
without generating dependencies first. That has the side effect of NOT
creating the .int file before errorchecking the module.
Commit e627efcf5 introduces this call in
grab_plain_opt_and_int_for_opt_files:
+ % This compiler invocation can get type representation information
+ % for all the types it has access to in the .int and/or .int2 files
+ % of the modules it imported directly or indirectly, *except* for
+ % the types it defines itself. For representation information for
+ % these types, it must read its *own* .int file.
+ process_module_int1(Globals, rwi1_type_repn, ModuleName,
+ _SelfParseTreeInt1, !HaveReadModuleMaps, !ModuleAndImports, !IO),
That tries to read the <mainmodule>.int file, which doesn't exist,
so it adds an error to !ModuleAndImports, which is the source of the
new error messages:
+mercury_compile: cannot find `abstract_solver_type.int' in directories .,
+ /mnt/testing/run/build/mercury-srcdist-rotd-2021-07-21/stage2/library,
+ /mnt/testing/run/build/mercury-srcdist-rotd-2021-07-21/stage2/browser,
+ /mnt/testing/run/build/mercury-srcdist-rotd-2021-07-21/stage2/mdbcomp,
+ /mnt/testing/run/build/mercury-srcdist-rotd-2021-07-21/stage2/ssdb
1. My tests/Mmake.params contains:
EXTRA_MCFLAGS=--intermod-opt
GRADE = hlc.gc
2. In tests/invalid run:
WORKSPACE=../../stage2 mmake MC=lmc runtests_dir
(any workspace will do)
Or just compile any single module program with intermodule optimisation,
e.g.
% ~/local/stow/mercury-srcdist-rotd-2021-06-30/bin/mmc --intermod-opt hello
% ~/local/stow/mercury-srcdist-rotd-2021-07-19/bin/mmc --intermod-opt hello
mercury_compile: cannot find `hello.int' in directories .,
/home/wangp/local/stow/mercury-srcdist-rotd-2021-07-19/lib/mercury/ints
Peter
More information about the reviews
mailing list