[m-rev.] [reuse] diff: building trans_opt problem
Peter Ross
peter.ross at miscrit.be
Wed Mar 28 23:00:34 AEST 2001
Hi,
===================================================================
Estimated hours taken: 2
Branches: reuse
Fix a problem with choosing which trans_opts to read in when
--promise-no-modified-source-files.
compiler/mercury_compile.m:
If --promise-no-modified-source-files is true, you can safely import
modules higher in the dependency ordering.
Index: mercury_compile.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mercury_compile.m,v
retrieving revision 1.175.2.18
diff -u -r1.175.2.18 mercury_compile.m
--- mercury_compile.m 2001/03/23 11:13:07 1.175.2.18
+++ mercury_compile.m 2001/03/28 12:12:37
@@ -683,8 +683,14 @@
{ Imports1 = Imports0 },
{ Error1 = no }
),
+ { Imports0 = module_imports(_File, _Module, Ancestors,
+ InterfaceImports, ImplementationImports,
+ _IndirectImports, _PublicChildren, _FactDeps,
+ _ForeignCode, _Items, _Error) },
+ { list__condense([Ancestors, InterfaceImports,
+ ImplementationImports], TransOptFiles) },
( { MakeTransOptInt = yes } ->
- ( { MaybeTransOptDeps = yes(TransOptDeps) } ->
+ ( { MaybeTransOptDeps = yes(TransOptDeps0) } ->
% When creating the trans_opt file, only import the
% trans_opt files which are lower in the ordering
% however when none of the src files have been
@@ -693,9 +699,11 @@
% information.
{ NoModifiedSrcFiles = yes ->
HigherDeps = [],
+ TransOptDeps = TransOptFiles,
Transitive = yes
;
Transitive = no,
+ TransOptDeps = TransOptDeps0,
HigherDeps = list__delete_elems(
Imports0 ^ int_deps ++
Imports0 ^ impl_deps,
@@ -740,16 +748,10 @@
{ Error2 = no }
;
( { TransOpt = yes } ->
- % If transitive optimization is enabled, but we are
- % not creating the .opt or .trans opt file, then import
- % the trans_opt files for all the modules that are
- % imported (or used), and for all ancestor modules.
- { Imports0 = module_imports(_File, _Module, Ancestors,
- InterfaceImports, ImplementationImports,
- _IndirectImports, _PublicChildren, _FactDeps,
- _ForeignCode, _Items, _Error) },
- { list__condense([Ancestors, InterfaceImports,
- ImplementationImports], TransOptFiles) },
+ % If transitive optimization is enabled, but we are
+ % not creating the .opt or .trans opt file, then import
+ % the trans_opt files for all the modules that are
+ % imported (or used), and for all ancestor modules.
trans_opt__grab_optfiles(yes, Imports1,
[OrigModuleName], TransOptFiles,
Imports, Error2)
--------------------------------------------------------------------------
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