[m-rev.] for review: more work on intermodule analysis

Julien Fischer juliensf at cs.mu.OZ.AU
Fri Feb 3 14:40:30 AEDT 2006


On Thu, 2 Feb 2006, Peter Wang wrote:

> > > Index: compiler/make.m
> > > ===================================================================
> > > RCS file: /home/mercury1/repository/mercury/compiler/make.m,v
> > > retrieving revision 1.32
> > > diff -u -r1.32 make.m
> > > --- compiler/make.m	25 Jan 2006 03:27:35 -0000	1.32
> > > +++ compiler/make.m	31 Jan 2006 00:19:05 -0000
> > > @@ -144,8 +144,10 @@
> > >          importing_module        :: maybe(module_name),
> > >
> > >          % Targets specified on the command line.
> > > -        command_line_targets    :: set(pair(module_name, target_type))
> > > +        command_line_targets    :: set(pair(module_name, target_type)),
> > >
> > > +        % Number of repeated passes of analysis allowed.
> > > +        reanalysis_passes       :: int
> >
> >
> > I suggest naming the field max_analysis_passes or something similar?
> > It could be confusing as to whether this is supposed to be counting
> > the number of passes currently performe or whether it is a limit on
> > the number of passes.
>
> It's a counter that is decremented each time we do a pass, until it gets
> to zero.
>

That wasn't clear from either the field name or the comment.

...

> > > +        MaybeModuleStatus = no,
> > > +        % The analysis file does not exist.  The file might be optimal and
> > > +        % without any analysis results, or for some reason it wasn't created
> > > +        % in this or an earlier pass (and hence probably won't be created
> > > +        % no matter how many times we repeat the analysis).
> > > +        %
> >
> > I'm don't like the idea of analysis files with no results not existing.
> > Wouldn't it be safe just to have an empty file that is marked as optimal?
>
> Ok, I've reverted it.
>
...

> Interdiff follows.

...

> @@ -668,12 +668,16 @@
>          )
>      ;
>          MaybeModuleStatus = no,
> -        % The analysis file does not exist.  The file might be optimal and
> -        % without any analysis results, or for some reason it wasn't created
> -        % in this or an earlier pass (and hence probably won't be created
> -        % no matter how many times we repeat the analysis).
> +        % The analysis file does not exist.  For some reason it wasn't created
> +        % in this or an earlier pass (and hence probably won't be created no
> +        % matter how many times we repeat the analysis).
> +        %
> +        % XXX: Currently modules which are basically empty do not get
> +        % `.analysis' files produced.  After that is fixed we can probably
> +        % consider modules with missing `.analysis' files to be invalid.
>          %

We probably want something equivalent to `--use-trans-opt'.

My main concern with these missing analysis files is that there doesn't
seem to be a way to for the compiler to distinguish between analysis
files that are missing because there were no analysis results and those
that are missing because something went wrong.

...

> +    % This is largely a duplicate of output_trans_opt_file.
>      %

Whether it duplicates the process for building .trans_opt files
or not is also irrelevant.  (It also almost duplicates the process
for building .opt files for that matter).

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