[m-rev.] for review: intermodule analysis fixes

Julien Fischer juliensf at cs.mu.OZ.AU
Tue Feb 21 15:47:52 AEDT 2006


On Tue, 21 Feb 2006, Peter Wang wrote:

> This should allow the compiler to be built with --intermodule-analysis
> again.
>

again?

> Estimated hours taken: 10
> Branches: main
>
> compiler/make.program_target.m:
> 	Don't try to reanalyse suboptimal, non-local modules when using
> 	`--intermodule-analysis'.
>
> compiler/exception_analysis.m:
> compiler/trailing_analysis.m:
> compiler/unused_args.m:
> 	When looking up an analysis result, if the result came from a non-local
s/came/is/

> 	module and is `suboptimal', just assume it is `optimal' since we can't
> 	make requests to or reanalyse the non-local module anyway.  On the
> 	other hand, if we look up a result from a local module which doesn't
> 	yet exist, record the default (suboptimal) result that we are using
> 	into the module's analysis registry, so that when the module is
> 	reanalysed, if the answer pattern changes we will know that it changed
> 	and the modules which made use of the default result can be marked.
>

...

> Index: compiler/make.program_target.m
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/compiler/make.program_target.m,v
> retrieving revision 1.44
> diff -u -r1.44 make.program_target.m
> --- compiler/make.program_target.m	13 Feb 2006 07:57:21 -0000	1.44
> +++ compiler/make.program_target.m	21 Feb 2006 04:09:46 -0000
> @@ -619,7 +619,9 @@
>          Succeeded = no
>      ;
>          reverse_ordered_modules(!.Info ^ module_dependencies,
> -            TargetModules0, TargetModules),
> +            TargetModules0, TargetModules1),
> +        list.filter((pred(Mod::in) is semidet :- list.member(Mod, AllModules)),
> +            TargetModules1, TargetModules),
>          make_local_module_id_options(MainModuleName, Succeeded1,
>              LocalModulesOpts, !Info, !IO),
>          (

Add a comment above explaining the above call to list.filter is necessary.

That looks good otherwise.

Cheers,
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