[m-rev.] diff: fix unintuitive option behavior

Zoltan Somogyi zs at csse.unimelb.edu.au
Wed Jan 26 14:14:45 AEDT 2011


compiler/options.m:
	Change the options controlling implicit parallelism from being
	optimization options, which are reset to default values every time
	you specify -ON, to misc options, which are not.

doc/user_guide.text:
	Document the above.

	Comment out the documentation of an option that does not (yet) exist.

Zoltan.

cvs diff: Diffing .
cvs diff: Diffing analysis
cvs diff: Diffing bindist
cvs diff: Diffing boehm_gc
cvs diff: Diffing boehm_gc/Mac_files
cvs diff: Diffing boehm_gc/cord
cvs diff: Diffing boehm_gc/cord/private
cvs diff: Diffing boehm_gc/doc
cvs diff: Diffing boehm_gc/extra
cvs diff: Diffing boehm_gc/include
cvs diff: Diffing boehm_gc/include/extra
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing boehm_gc/libatomic_ops
cvs diff: Diffing boehm_gc/libatomic_ops/doc
cvs diff: Diffing boehm_gc/libatomic_ops/src
cvs diff: Diffing boehm_gc/libatomic_ops/src/atomic_ops
cvs diff: Diffing boehm_gc/libatomic_ops/src/atomic_ops/sysdeps
cvs diff: Diffing boehm_gc/libatomic_ops/src/atomic_ops/sysdeps/armcc
cvs diff: Diffing boehm_gc/libatomic_ops/src/atomic_ops/sysdeps/gcc
cvs diff: Diffing boehm_gc/libatomic_ops/src/atomic_ops/sysdeps/hpc
cvs diff: Diffing boehm_gc/libatomic_ops/src/atomic_ops/sysdeps/ibmc
cvs diff: Diffing boehm_gc/libatomic_ops/src/atomic_ops/sysdeps/icc
cvs diff: Diffing boehm_gc/libatomic_ops/src/atomic_ops/sysdeps/msftc
cvs diff: Diffing boehm_gc/libatomic_ops/src/atomic_ops/sysdeps/sunc
cvs diff: Diffing boehm_gc/libatomic_ops/tests
cvs diff: Diffing boehm_gc/libatomic_ops-1.2
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/doc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/tests
cvs diff: Diffing boehm_gc/m4
cvs diff: Diffing boehm_gc/tests
cvs diff: Diffing browser
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
Index: compiler/options.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/options.m,v
retrieving revision 1.687
diff -u -b -r1.687 options.m
--- compiler/options.m	23 Jan 2011 06:30:15 -0000	1.687
+++ compiler/options.m	26 Jan 2011 01:00:13 -0000
@@ -680,9 +680,6 @@
     ;       inline_par_builtins
     ;       always_specialize_in_dep_par_conjs
     ;       allow_some_paths_only_waits
-    ;       control_granularity
-    ;       distance_granularity
-    ;       implicit_parallelism
     ;       region_analysis
 
     % Stuff for the CTGC system (structure sharing / structure reuse).
@@ -983,6 +980,10 @@
             % option to control their code, but adding an option requires
             % recompiling most of the modules in the compiler. Having this
             % option permanently here should reduce the need for that.
+
+    ;       control_granularity
+    ;       distance_granularity
+    ;       implicit_parallelism
     ;       feedback_file.
 
 %----------------------------------------------------------------------------%
@@ -1552,9 +1553,6 @@
     inline_par_builtins                 -   bool(no),
     always_specialize_in_dep_par_conjs  -   bool(no),
     allow_some_paths_only_waits         -   bool(yes),
-    control_granularity                 -   bool(no),
-    distance_granularity                -   int(0),
-    implicit_parallelism                -   bool(no),
     region_analysis                     -   bool(no),
 
     % HLDS -> LLDS
@@ -1836,6 +1834,9 @@
     analysis_file_cache_dir             -   string(""),
     compiler_sufficiently_recent        -   bool(no),
     experiment                          -   string(""),
+    control_granularity                 -   bool(no),
+    distance_granularity                -   int(0),
+    implicit_parallelism                -   bool(no),
     feedback_file                       -   string("")
 ]).
 
@@ -2447,9 +2448,6 @@
                                     always_specialize_in_dep_par_conjs).
 long_option("allow-some-paths-only-waits",
                                     allow_some_paths_only_waits).
-long_option("control-granularity",  control_granularity).
-long_option("distance-granularity", distance_granularity).
-long_option("implicit-parallelism", implicit_parallelism).
 
 % CTGC related options.
 long_option("structure-sharing",    structure_sharing_analysis).
@@ -2784,6 +2782,9 @@
 long_option("java-generics-2010-04-13",
                                     compiler_sufficiently_recent).
 long_option("experiment",           experiment).
+long_option("control-granularity",  control_granularity).
+long_option("distance-granularity", distance_granularity).
+long_option("implicit-parallelism", implicit_parallelism).
 long_option("feedback-file",        feedback_file).
 
 %-----------------------------------------------------------------------------%
@@ -4974,7 +4975,7 @@
         "\tIdentify those goals that do not call procedures",
         "\tthat are evaluated using minimal model tabling.",
         "\tThis information is used to reduce the overhead",
-        "\tof minimal model tabling.",
+        "\tof minimal model tabling."
         % "--untuple",
         % "\tExpand out procedure arguments when the argument type",
         % "\tis a tuple or a type with exactly one functor.",
@@ -5010,19 +5011,6 @@
 %       "\tWhen the transformation for handling dependent parallel conjunctions",
 %       "\tadds waits and/or signals around a call, create a specialized",
 %       "\tversion of the called procedure, even if this is not profitable.",
-        "--control-granularity",
-        "\tDon't try to generate more parallelism than the machine can",
-        "\thandle, which may be specified at runtime or detected",
-        "\tautomatically.",
-        "--distance-granularity <distance>",
-        "\tControl the granularity of parallel execution using the",
-        "\tspecified distance value.", 
-        "--implicit-parallelism",
-        "\tIntroduce parallel conjunctions where it could be worthwhile", 
-        "\t(implicit parallelism) using information generated by",
-        "\tmdprof_feedback.",
-        "\tThe profiling feedback file can be specified using the",
-        "\t--feedback file option."
 % '--region-analysis' is not documented because it is still experimental.
 %        "--region-analysis",
 %        "\tEnable the analysis for region-based memory management."
@@ -5665,6 +5653,20 @@
         % The `--local-module-id' option is used by `mmc --make'.
         % The `--analysis-file-cache-dir' option is used by `mmc --make'.
 
+        "--control-granularity",
+        "\tDon't try to generate more parallelism than the machine can",
+        "\thandle, which may be specified at runtime or detected",
+        "\tautomatically.",
+        "--distance-granularity <distance>",
+        "\tControl the granularity of parallel execution using the",
+        "\tspecified distance value.", 
+        "--implicit-parallelism",
+        "\tIntroduce parallel conjunctions where it could be worthwhile", 
+        "\t(implicit parallelism) using information generated by",
+        "\tmdprof_feedback.",
+        "\tThe profiling feedback file can be specified using the",
+        "\t--feedback file option.",
+
         "--feedback-file",
         "\tUse the specified profiling feedback file which may currently",
         "\tonly be processed for implicit parallelism."
cvs diff: Diffing compiler/notes
cvs diff: Diffing deep_profiler
cvs diff: Diffing deep_profiler/notes
cvs diff: Diffing doc
Index: doc/user_guide.texi
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/doc/user_guide.texi,v
retrieving revision 1.620
diff -u -b -r1.620 user_guide.texi
--- doc/user_guide.texi	10 Jan 2011 06:40:25 -0000	1.620
+++ doc/user_guide.texi	26 Jan 2011 01:03:24 -0000
@@ -8735,34 +8735,6 @@
 @c adds waits and/or signals around a call, create a specialized
 @c version of the called procedure, even if this is not profitable.
 
- at sp 1
- at item --control-granularity
- at findex --control-granularity
-Don't try to generate more parallelism than the machine can handle,
-which may be specified at runtime or detected automatically.
-(see the @samp{-P} option in the @samp{MERCURY_OPTIONS} environment 
-variable.)
-
- at sp 1
- at item --distance-granularity @var{distance_value}
- at findex --distance-granularity
-Control the granularity of parallel execution using the specified distance
-value.
-
- at sp 1
- at item --parallelism-target @var{num_cpus}
- at findex --parallelism-target
-Specifies the number of CPUs of the target machine,
-for use by --control-granularity option.
-
- at sp 1
- at item --implicit-parallelism
- at findex --implicit-parallelism
-Introduce parallel conjunctions where it could be worthwhile (implicit
-parallelism) using deep profiling feedback information generated by
-mdprof_feedback. The profiling feedback file can be specified using the
---feedback-file option.
-
 @end table
 
 @node MLDS backend (MLDS -> MLDS) optimization options
@@ -9379,10 +9351,38 @@
 the typechecker will not process the predicate or function any further.
 
 @sp 1
+ at item --control-granularity
+ at findex --control-granularity
+Don't try to generate more parallelism than the machine can handle,
+which may be specified at runtime or detected automatically.
+(see the @samp{-P} option in the @samp{MERCURY_OPTIONS} environment variable.)
+
+ at sp 1
+ at item --distance-granularity @var{distance_value}
+ at findex --distance-granularity
+Control the granularity of parallel execution
+using the specified distance value.
+
+ at c Maybe this options *should* exist, but at the moment, it doesn't.
+ at c @sp 1
+ at c @item --parallelism-target @var{num_cpus}
+ at c @findex --parallelism-target
+ at c Specifies the number of CPUs of the target machine,
+ at c for use by --control-granularity option.
+
+ at sp 1
+ at item --implicit-parallelism
+ at findex --implicit-parallelism
+Introduce parallel conjunctions where it could be worthwhile (implicit
+parallelism) using deep profiling feedback information generated by
+mdprof_feedback. The profiling feedback file can be specified using the
+--feedback-file option.
+
+ at sp 1
 @item --feedback-file
 @findex --feedback-file
-Use the specified profiling feedback file which may currently only be processed
-for implicit parallelism.
+Use the specified profiling feedback file
+which may currently only be processed for implicit parallelism.
 
 @end table
 
cvs diff: Diffing extras
cvs diff: Diffing extras/base64
cvs diff: Diffing extras/cgi
cvs diff: Diffing extras/complex_numbers
cvs diff: Diffing extras/complex_numbers/samples
cvs diff: Diffing extras/complex_numbers/tests
cvs diff: Diffing extras/curs
cvs diff: Diffing extras/curs/samples
cvs diff: Diffing extras/curses
cvs diff: Diffing extras/curses/sample
cvs diff: Diffing extras/dynamic_linking
cvs diff: Diffing extras/error
cvs diff: Diffing extras/fixed
cvs diff: Diffing extras/gator
cvs diff: Diffing extras/gator/generations
cvs diff: Diffing extras/gator/generations/1
cvs diff: Diffing extras/graphics
cvs diff: Diffing extras/graphics/easyx
cvs diff: Diffing extras/graphics/easyx/samples
cvs diff: Diffing extras/graphics/mercury_allegro
cvs diff: Diffing extras/graphics/mercury_allegro/examples
cvs diff: Diffing extras/graphics/mercury_allegro/samples
cvs diff: Diffing extras/graphics/mercury_allegro/samples/demo
cvs diff: Diffing extras/graphics/mercury_allegro/samples/mandel
cvs diff: Diffing extras/graphics/mercury_allegro/samples/pendulum2
cvs diff: Diffing extras/graphics/mercury_allegro/samples/speed
cvs diff: Diffing extras/graphics/mercury_cairo
cvs diff: Diffing extras/graphics/mercury_cairo/samples
cvs diff: Diffing extras/graphics/mercury_cairo/samples/data
cvs diff: Diffing extras/graphics/mercury_cairo/tutorial
cvs diff: Diffing extras/graphics/mercury_glut
cvs diff: Diffing extras/graphics/mercury_opengl
cvs diff: Diffing extras/graphics/mercury_tcltk
cvs diff: Diffing extras/graphics/samples
cvs diff: Diffing extras/graphics/samples/calc
cvs diff: Diffing extras/graphics/samples/gears
cvs diff: Diffing extras/graphics/samples/maze
cvs diff: Diffing extras/graphics/samples/pent
cvs diff: Diffing extras/lazy_evaluation
cvs diff: Diffing extras/lex
cvs diff: Diffing extras/lex/samples
cvs diff: Diffing extras/lex/tests
cvs diff: Diffing extras/log4m
cvs diff: Diffing extras/logged_output
cvs diff: Diffing extras/monte
cvs diff: Diffing extras/moose
cvs diff: Diffing extras/moose/samples
cvs diff: Diffing extras/moose/tests
cvs diff: Diffing extras/mopenssl
cvs diff: Diffing extras/morphine
cvs diff: Diffing extras/morphine/non-regression-tests
cvs diff: Diffing extras/morphine/scripts
cvs diff: Diffing extras/morphine/source
cvs diff: Diffing extras/net
cvs diff: Diffing extras/odbc
cvs diff: Diffing extras/posix
cvs diff: Diffing extras/posix/samples
cvs diff: Diffing extras/quickcheck
cvs diff: Diffing extras/quickcheck/tutes
cvs diff: Diffing extras/references
cvs diff: Diffing extras/references/samples
cvs diff: Diffing extras/references/tests
cvs diff: Diffing extras/solver_types
cvs diff: Diffing extras/solver_types/library
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing extras/trailed_update/tests
cvs diff: Diffing extras/windows_installer_generator
cvs diff: Diffing extras/windows_installer_generator/sample
cvs diff: Diffing extras/windows_installer_generator/sample/images
cvs diff: Diffing extras/xml
cvs diff: Diffing extras/xml/samples
cvs diff: Diffing extras/xml_stylesheets
cvs diff: Diffing java
cvs diff: Diffing java/runtime
cvs diff: Diffing library
cvs diff: Diffing mdbcomp
cvs diff: Diffing profiler
cvs diff: Diffing robdd
cvs diff: Diffing runtime
cvs diff: Diffing runtime/GETOPT
cvs diff: Diffing runtime/machdeps
cvs diff: Diffing samples
cvs diff: Diffing samples/c_interface
cvs diff: Diffing samples/c_interface/c_calls_mercury
cvs diff: Diffing samples/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/mercury_calls_c
cvs diff: Diffing samples/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/standalone_c
cvs diff: Diffing samples/concurrency
cvs diff: Diffing samples/concurrency/dining_philosophers
cvs diff: Diffing samples/concurrency/midimon
cvs diff: Diffing samples/diff
cvs diff: Diffing samples/java_interface
cvs diff: Diffing samples/java_interface/java_calls_mercury
cvs diff: Diffing samples/java_interface/mercury_calls_java
cvs diff: Diffing samples/muz
cvs diff: Diffing samples/rot13
cvs diff: Diffing samples/solutions
cvs diff: Diffing samples/solver_types
cvs diff: Diffing samples/tests
cvs diff: Diffing samples/tests/c_interface
cvs diff: Diffing samples/tests/c_interface/c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/tests/c_interface/mercury_calls_c
cvs diff: Diffing samples/tests/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/tests/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/tests/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/tests/diff
cvs diff: Diffing samples/tests/muz
cvs diff: Diffing samples/tests/rot13
cvs diff: Diffing samples/tests/solutions
cvs diff: Diffing samples/tests/toplevel
cvs diff: Diffing scripts
cvs diff: Diffing slice
cvs diff: Diffing ssdb
cvs diff: Diffing tests
cvs diff: Diffing tests/analysis
cvs diff: Diffing tests/analysis/ctgc
cvs diff: Diffing tests/analysis/excp
cvs diff: Diffing tests/analysis/ext
cvs diff: Diffing tests/analysis/sharing
cvs diff: Diffing tests/analysis/table
cvs diff: Diffing tests/analysis/trail
cvs diff: Diffing tests/analysis/unused_args
cvs diff: Diffing tests/benchmarks
cvs diff: Diffing tests/debugger
cvs diff: Diffing tests/debugger/declarative
cvs diff: Diffing tests/dppd
cvs diff: Diffing tests/general
cvs diff: Diffing tests/general/accumulator
cvs diff: Diffing tests/general/string_format
cvs diff: Diffing tests/general/structure_reuse
cvs diff: Diffing tests/grade_subdirs
cvs diff: Diffing tests/hard_coded
cvs diff: Diffing tests/hard_coded/exceptions
cvs diff: Diffing tests/hard_coded/purity
cvs diff: Diffing tests/hard_coded/sub-modules
cvs diff: Diffing tests/hard_coded/typeclasses
cvs diff: Diffing tests/invalid
cvs diff: Diffing tests/invalid/purity
cvs diff: Diffing tests/misc_tests
cvs diff: Diffing tests/mmc_make
cvs diff: Diffing tests/mmc_make/lib
cvs diff: Diffing tests/par_conj
cvs diff: Diffing tests/recompilation
cvs diff: Diffing tests/stm
cvs diff: Diffing tests/stm/orig
cvs diff: Diffing tests/stm/orig/stm-compiler
cvs diff: Diffing tests/stm/orig/stm-compiler/test1
cvs diff: Diffing tests/stm/orig/stm-compiler/test10
cvs diff: Diffing tests/stm/orig/stm-compiler/test2
cvs diff: Diffing tests/stm/orig/stm-compiler/test3
cvs diff: Diffing tests/stm/orig/stm-compiler/test4
cvs diff: Diffing tests/stm/orig/stm-compiler/test5
cvs diff: Diffing tests/stm/orig/stm-compiler/test6
cvs diff: Diffing tests/stm/orig/stm-compiler/test7
cvs diff: Diffing tests/stm/orig/stm-compiler/test8
cvs diff: Diffing tests/stm/orig/stm-compiler/test9
cvs diff: Diffing tests/stm/orig/stm-compiler-par
cvs diff: Diffing tests/stm/orig/stm-compiler-par/bm1
cvs diff: Diffing tests/stm/orig/stm-compiler-par/bm2
cvs diff: Diffing tests/stm/orig/stm-compiler-par/stmqueue
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test1
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test10
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test11
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test2
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test3
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test4
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test5
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test6
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test7
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test8
cvs diff: Diffing tests/stm/orig/stm-compiler-par/test9
cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast
cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test1
cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test2
cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test3
cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test4
cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test5
cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test6
cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test7
cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test8
cvs diff: Diffing tests/stm/orig/stm-compiler-par-asm_fast/test9
cvs diff: Diffing tests/tabling
cvs diff: Diffing tests/term
cvs diff: Diffing tests/trailing
cvs diff: Diffing tests/valid
cvs diff: Diffing tests/warnings
cvs diff: Diffing tools
cvs diff: Diffing trace
cvs diff: Diffing util
cvs diff: Diffing vim
cvs diff: Diffing vim/after
cvs diff: Diffing vim/ftplugin
cvs diff: Diffing vim/syntax
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list