[m-rev.] for post-commit review: limit stack layout compression
Zoltan Somogyi
zs at csse.unimelb.edu.au
Tue May 24 19:13:05 AEST 2011
compiler/mercury_compile_llds_back_end.m:
Add progress messages that say when the compiler is converting the
information it gathered for the construction of layout structures
into the actual layout structures. In some cases (such as zm_enums.m),
these could take a very long time.
compiler/stack_layout.m:
Impose limits on how aggressive we want the compression of layout
structures to be. This is because in the absence of those limits,
the compression of the layout structures for zm_enums.m can literally
take an hour.
compiler/options.m:
Implement a new option controlling the limit to be applied by
stack_layout.m.
doc/user_guide.texi.m:
Document the new option.
tools/speedtest:
More changes to allow this diff to be tested for its performance
effects. With the default limit, the compiler compiles the 16 largest
modules in a debug grade 10% faster, but generates .c files that total
about 8.4% bigger. Both effects should be smaller for smaller modules;
small modules won't see any change at all.
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/mercury_compile_llds_back_end.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mercury_compile_llds_back_end.m,v
retrieving revision 1.14
diff -u -b -r1.14 mercury_compile_llds_back_end.m
--- compiler/mercury_compile_llds_back_end.m 23 May 2011 05:08:05 -0000 1.14
+++ compiler/mercury_compile_llds_back_end.m 24 May 2011 01:55:41 -0000
@@ -197,20 +197,21 @@
list.condense(PredSCCs, OrderedPredIds),
MaybeDupProcMap = yes(map.init)
),
- llds_backend_pass_by_preds_2(OrderedPredIds, !HLDS, !GlobalData,
- MaybeDupProcMap, [], RevCodes, !IO),
+ llds_backend_pass_by_preds_loop_over_preds(OrderedPredIds,
+ !HLDS, !GlobalData, MaybeDupProcMap, [], RevCodes, !IO),
list.reverse(RevCodes, Codes),
list.condense(Codes, LLDS).
-:- pred llds_backend_pass_by_preds_2(list(pred_id)::in,
+:- pred llds_backend_pass_by_preds_loop_over_preds(list(pred_id)::in,
module_info::in, module_info::out, global_data::in, global_data::out,
maybe(map(mdbcomp.prim_data.proc_label, mdbcomp.prim_data.proc_label))::in,
list(list(c_procedure))::in, list(list(c_procedure))::out, io::di, io::uo)
is det.
-llds_backend_pass_by_preds_2([], !HLDS, !GlobalData, _, !RevCodes, !IO).
-llds_backend_pass_by_preds_2([PredId | PredIds], !HLDS, !GlobalData,
- !.MaybeDupProcMap, !RevCodes, !IO) :-
+llds_backend_pass_by_preds_loop_over_preds([],
+ !HLDS, !GlobalData, _, !RevCodes, !IO).
+llds_backend_pass_by_preds_loop_over_preds([PredId | PredIds],
+ !HLDS, !GlobalData, !.MaybeDupProcMap, !RevCodes, !IO) :-
module_info_get_preds(!.HLDS, PredTable),
map.lookup(PredTable, PredId, PredInfo),
ProcIds = pred_info_non_imported_procids(PredInfo),
@@ -225,7 +226,8 @@
Verbose = yes,
io.write_string("% Generating code for ", !IO),
write_pred_id(!.HLDS, PredId, !IO),
- io.write_string("\n", !IO)
+ io.write_string("\n", !IO),
+ maybe_flush_output(Verbose, !IO)
;
Verbose = no
),
@@ -259,10 +261,13 @@
eliminate_duplicate_procs(IdProcList, ProcList,
DupProcMap0, DupProcMap),
!:MaybeDupProcMap = yes(DupProcMap)
- )
+ ),
+ maybe_write_string(Verbose, "% done.\n", !IO),
+ globals.lookup_bool_option(Globals0, statistics, Stats),
+ maybe_report_stats(Stats, !IO)
),
!:RevCodes = [ProcList | !.RevCodes],
- llds_backend_pass_by_preds_2(PredIds, !HLDS, !GlobalData,
+ llds_backend_pass_by_preds_loop_over_preds(PredIds, !HLDS, !GlobalData,
!.MaybeDupProcMap, !RevCodes, !IO).
:- pred llds_backend_pass_for_pred(list(proc_id)::in, pred_id::in,
@@ -563,6 +568,9 @@
globals.lookup_bool_option(Globals, verbose, Verbose),
globals.lookup_bool_option(Globals, statistics, Stats),
+ maybe_write_string(Verbose,
+ "% Generating layout data...", !IO),
+ maybe_flush_output(Verbose, !IO),
% Here we generate the LLDS representations for various data structures
% used for RTTI, type classes, and stack layouts.
% XXX This should perhaps be part of backend_pass rather than output_pass.
@@ -582,6 +590,8 @@
ProcHeadVarNums, ProcVarNames, ProcBodyBytecodes,
TableIoDecls, TableIoDeclMap, ProcEventLayouts,
ExecTraces, ProcLayoutDatas, ModuleLayoutDatas),
+ maybe_write_string(Verbose, " done.\n", !IO),
+ maybe_report_stats(Stats, !IO),
% Here we perform some optimizations on the LLDS data.
% XXX This should perhaps be part of backend_pass rather than output_pass.
Index: compiler/options.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/options.m,v
retrieving revision 1.692
diff -u -b -r1.692 options.m
--- compiler/options.m 23 May 2011 05:08:08 -0000 1.692
+++ compiler/options.m 24 May 2011 08:24:18 -0000
@@ -776,6 +776,7 @@
; optimize_delay_slot
; optimize_reassign
; optimize_repeat
+ ; layout_compression_limit
% - C
; use_macro_for_redo_fail
@@ -1623,6 +1624,7 @@
optimize_delay_slot - bool(no),
optimize_reassign - bool(no),
optimize_repeat - int(0),
+ layout_compression_limit - int(4000),
% LLDS -> C
use_macro_for_redo_fail - bool(no),
@@ -2555,6 +2557,7 @@
long_option("optimise-reassign", optimize_reassign).
long_option("optimize-repeat", optimize_repeat).
long_option("optimise-repeat", optimize_repeat).
+long_option("layout-compression-limit", layout_compression_limit).
% LLDS->C optimizations
long_option("use-macro-for-redo-fail", use_macro_for_redo_fail).
@@ -5162,7 +5165,11 @@
"\tOptimize away assignments to locations that already hold",
"\tthe assigned value.",
"--optimize-repeat <n>",
- "\tIterate most optimizations at most <n> times (default: 3)."
+ "\tIterate most optimizations at most <n> times (default: 3).",
+ "--layout-compression-limit <n>",
+ "\tAttempt to compress the layout structures used by the debugger",
+ "\tonly as long as the arrays involved have at most <n> elements",
+ "\t(default: 4000)."
]).
:- pred options_help_mlds_mlds_optimization(io::di, io::uo) is det.
Index: compiler/stack_layout.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/stack_layout.m,v
retrieving revision 1.160
diff -u -b -r1.160 stack_layout.m
--- compiler/stack_layout.m 23 May 2011 05:08:12 -0000 1.160
+++ compiler/stack_layout.m 24 May 2011 04:30:19 -0000
@@ -944,7 +944,11 @@
list.reverse(HeadVarNumVector, RevHeadVarNumVector),
list.length(HeadVarNumVector, NumHeadVars),
(
- CompressArrays = yes,
+ some [CompressionLimit] (
+ CompressArrays = yes(CompressionLimit),
+ !.ExecTraceInfo ^ eti_next_proc_head_var_num =<
+ CompressionLimit
+ ),
find_sequence(RevHeadVarNumVector, RevHeadVarNums0,
0, OldHeadVarNumOffset)
->
@@ -973,7 +977,10 @@
list.reverse(VarNameVector, RevVarNameVector),
list.length(VarNameVector, NumVarNames),
(
- CompressArrays = yes,
+ some [CompressionLimit] (
+ CompressArrays = yes(CompressionLimit),
+ !.ExecTraceInfo ^ eti_next_proc_var_name =< CompressionLimit
+ ),
find_sequence(RevVarNameVector, RevVarNames0, 0, OldVarNameOffset)
->
VarNameSlot = NextVarName0 - OldVarNameOffset - NumVarNames
@@ -1800,7 +1807,10 @@
NextPTISlot0 = !.LabelLayoutInfo ^ lli_next_pti,
list.reverse(PTIs, RevPTIs),
(
- CompressArrays = yes,
+ some [CompressionLimit] (
+ CompressArrays = yes(CompressionLimit),
+ !.LabelLayoutInfo ^ lli_next_pti =< CompressionLimit
+ ),
find_sequence(RevPTIs, AllRevPTIs0, 0, OldPTIOffset)
->
PTISlot = NextPTISlot0 - OldPTIOffset - NumPTIs
@@ -1825,7 +1835,10 @@
NextHLDSVarNumSlot0 = !.LabelLayoutInfo ^ lli_next_hlds_var_num,
list.reverse(HLDSVarNums, RevHLDSVarNums),
(
- CompressArrays = yes,
+ some [CompressionLimit] (
+ CompressArrays = yes(CompressionLimit),
+ !.LabelLayoutInfo ^ lli_next_hlds_var_num =< CompressionLimit
+ ),
find_sequence(RevHLDSVarNums, AllRevHLDSVarNums0,
0, OldHLDSVarNumsOffset)
->
@@ -1847,7 +1860,10 @@
NextShortLocnSlot0 = !.LabelLayoutInfo ^ lli_next_short_locn,
list.reverse(ShortLocns, RevShortLocns),
(
- CompressArrays = yes,
+ some [CompressionLimit] (
+ CompressArrays = yes(CompressionLimit),
+ !.LabelLayoutInfo ^ lli_next_short_locn =< CompressionLimit
+ ),
find_sequence(RevShortLocns, AllRevShortLocns0,
0, OldShortLocnsOffset)
->
@@ -1869,7 +1885,10 @@
NextLongLocnSlot0 = !.LabelLayoutInfo ^ lli_next_long_locn,
list.reverse(LongLocns, RevLongLocns),
(
- CompressArrays = yes,
+ some [CompressionLimit] (
+ CompressArrays = yes(CompressionLimit),
+ !.LabelLayoutInfo ^ lli_next_long_locn =< CompressionLimit
+ ),
find_sequence(RevLongLocns, AllRevLongLocns0,
0, OldLongLocnsOffset)
->
@@ -2405,7 +2424,9 @@
% We use the straightforward, brute force algorithm instead of more
% sophisticated algorithms like Knuth-Morris-Pratt because (a) those
% algorithms are nontrivial to adapt to working on lists instead of arrays
- % without losing their edge, and (b) this algorithm is fast enough.
+ % without losing their edge, (b) this algorithm is fast enough in most
+ % cases, and when it isn't, even KMP is unlikely to be fast enough.
+ %
% Turning this on optimization reduces the size of the generated .c and .o
% files by about 12% and 11% respectively (measured on the files in the
% library, mdbcomp and compiler directories in grade asm_fast.gc.debug),
@@ -2418,6 +2439,11 @@
% search sequence, instead of adding the whole search sequence to the
% array.
%
+ % Because of the brute force nature of this algorithm, it should not
+ % be invoked on lists that are longer than the compression limit.
+ % Ironically, the bigger the array, the more we want to compress it,
+ % but the less we can afford to do so.
+ %
:- pred find_sequence(list(T)::in, list(T)::in, int::in, int::out) is semidet.
:- pragma type_spec(find_sequence/4, T = int).
:- pragma type_spec(find_sequence/4, T = rval).
@@ -2469,7 +2495,7 @@
slp_procid_stack_layout :: bool,
% Should we try to compress arrays?
- slp_compress_arrays :: bool,
+ slp_compress_arrays :: maybe(int),
% Do we have static code addresses or unboxed floats?
slp_static_code_addresses :: bool,
@@ -2493,6 +2519,8 @@
globals.lookup_bool_option(Globals, static_code_addresses, StaticCodeAddr),
globals.lookup_bool_option(Globals, unboxed_float, UnboxedFloatOpt),
globals.lookup_bool_option(Globals, rtti_line_numbers, RttiLineNumbers),
+ globals.lookup_int_option(Globals, layout_compression_limit,
+ CompressLimit),
(
UnboxedFloatOpt = no,
UnboxedFloat = do_not_have_unboxed_floats
@@ -2500,8 +2528,15 @@
UnboxedFloatOpt = yes,
UnboxedFloat = have_unboxed_floats
),
+ (
+ CommonLayoutData = no,
+ CompressArrays = no
+ ;
+ CommonLayoutData = yes,
+ CompressArrays = yes(CompressLimit)
+ ),
Params = stack_layout_params(ModuleInfo, TraceLevel, TraceSuppress,
- DeepProfiling, AgcLayout, TraceLayout, ProcIdLayout, CommonLayoutData,
+ DeepProfiling, AgcLayout, TraceLayout, ProcIdLayout, CompressArrays,
StaticCodeAddr, UnboxedFloat, RttiLineNumbers).
%---------------------------------------------------------------------------%
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.628
diff -u -b -r1.628 user_guide.texi
--- doc/user_guide.texi 20 May 2011 04:16:51 -0000 1.628
+++ doc/user_guide.texi 24 May 2011 08:24:57 -0000
@@ -9078,6 +9078,13 @@
@findex --optimize-repeat
Iterate most optimizations at most @var{n} times (default: 3).
+ at sp 1
+ at item --layout-compression-limit @var{n}
+ at findex --layout-compression-limit
+Attempt to compress the layout structures used by the debugger
+only as long as the arrays involved have at most @var{n} elements
+(default: 4000).
+
@end table
@node Output-level (LLDS -> C) optimization options
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
Index: tools/speedtest
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/tools/speedtest,v
retrieving revision 1.24
diff -u -b -r1.24 speedtest
--- tools/speedtest 24 May 2011 00:53:04 -0000 1.24
+++ tools/speedtest 24 May 2011 08:19:27 -0000
@@ -2,7 +2,7 @@
#
# A program to test different versions of the compiler.
-usage="Usage: speedtest [-dstz] [-l | -1] [-g grade] [-c cmd] [-nN] [-ON] [-fFILE] batchname"
+usage="Usage: speedtest [-dstz] [-l | -1] [-g grade] [-o option]* [-c cmd] [-nN] [-ON] [-fFILE] batchname"
single_modulelist="typecheck.m"
# As of 13 oct 2010, these are the eight largest modules of the compiler.
@@ -33,7 +33,8 @@
framesizefile=""
modulelist="$short_modulelist"
limit=6
-opt="-O2"
+options=""
+optlevel="-O2"
size=false
table_io=false
zip=false
@@ -71,10 +72,15 @@
-n*)
limit="` expr $1 : '-n\(.*\)' `" ;;
+ -o)
+ options="$options $2" ; shift ;;
+ -o*)
+ options="$options ` expr $1 : '-f\(.*\)' `" ;;
+
-O)
- opt="-O$2" ; shift ;;
+ optlevel="-O$2" ; shift ;;
-O*)
- opt="$1" ;;
+ optlevel="$1" ;;
-s)
size=true ;;
@@ -97,7 +103,7 @@
if test "$cmd" = ""
then
- cmd="mmc -C $opt $grade $modulelist"
+ cmd="mmc -C $optlevel $options $grade $modulelist"
fi
if test $# != 1
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