[m-rev.] diff: do not allow --trans-intermod-opt and --make etc
Julien Fischer
juliensf at cs.mu.OZ.AU
Mon Feb 13 17:15:24 AEDT 2006
Estimated hours taken: 0.5
Branches: main
Emit an error message if `--intermod-opt' and `--intermodule-analysis' are
both enabled since they are not compatible with each other.
Emit an error message with `--make' and `--trans-intermod-opt' are enabled
together. We don't support transitive-intermodule optimization with `mmc
--make' but enabling both options together causes problems for termination
analysis (it expects that at least one more recompile is going to be performed
but it never is).
compiler/handle_options.m:
Emit an error message if `--intermod-opt' and `--intermodule-analysis'
are both specified.
Emit an error message if `--make' and `--trans-intermod-opt' are both
specified.
compiler/make.m:
Remove some preliminary support for transitive-intermodule
optimization. We aren't going to implement it for mmc --make.
Update the TODO list.
Julien.
Index: compiler/handle_options.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/handle_options.m,v
retrieving revision 1.254
diff -u -r1.254 handle_options.m
--- compiler/handle_options.m 6 Feb 2006 05:39:41 -0000 1.254
+++ compiler/handle_options.m 13 Feb 2006 05:49:08 -0000
@@ -676,13 +676,42 @@
% and they don't need to be recreated when compiling to C.
option_implies(invoked_by_mmc_make,
generate_mmc_make_module_dependencies, bool(no), !Globals),
+
+ % `--transitive-intermodule-optimization' and `--make' are
+ % not compatible with each other.
+ %
+ globals.lookup_bool_option(!.Globals, transitive_optimization,
+ TransOpt),
+ (
+ TransOpt = yes,
+ globals.lookup_bool_option(!.Globals, make, UsingMMC_Make),
+ globals.lookup_bool_option(!.Globals, invoked_by_mmc_make,
+ InvokedByMMC_Make),
+ ( UsingMMC_Make `bool.or` InvokedByMMC_Make = yes ->
+ add_error("`--transitive-intermodule-optimization' is" ++
+ " incompatible with `mmc --make'.", !Errors)
+ ;
+ true
+ )
+ ;
+ TransOpt = no
+ ),
- % --make does not handle --transitive-intermodule-optimization.
- % --transitive-intermodule-optimization is in the process of
- % being rewritten anyway.
- option_implies(make, transitive_optimization, bool(no), !Globals),
- option_implies(invoked_by_mmc_make, transitive_optimization, bool(no),
- !Globals),
+ % `--intermodule-optimization' and `--intermodule-analysis' are
+ % not compatible with each other.
+ globals.lookup_bool_option(!.Globals, intermodule_optimization,
+ InterModOpt),
+ globals.lookup_bool_option(!.Globals, intermodule_analysis,
+ InterModAnalysis),
+ (
+ InterModOpt = yes,
+ InterModAnalysis = yes
+ ->
+ add_error("`--intermodule-optimization' is" ++
+ " incompatible with `--intermodule-analysis'.", !Errors)
+ ;
+ true
+ ),
( io__have_symlinks ->
true
Index: compiler/make.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/make.m,v
retrieving revision 1.33
diff -u -r1.33 make.m
--- compiler/make.m 6 Feb 2006 05:39:42 -0000 1.33
+++ compiler/make.m 13 Feb 2006 05:27:39 -0000
@@ -11,14 +11,11 @@
% A builtin Mercury-specific make replacement.
%
% TODO:
-% - transitive inter-module optimization (probably won't bother since
-% that is being rewritten anyway)
% - parallel/distributed builds
%
%-----------------------------------------------------------------------------%
:- module make.
-
:- interface.
:- include_module make__options_file.
@@ -176,7 +173,6 @@
; make_interface
; make_private_interface
; make_optimization_interface
- ; make_transitive_optimization_interface
; make_analysis_registry
; compile_to_target_code.
--------------------------------------------------------------------------
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