usage message
Stephen Weeks
MLton@sourcelight.com
Thu, 4 Jan 2001 11:41:38 -0800 (PST)
> It would be nice if the default setting of the option was indicated. For the
> true/false, just listing the default first, perhaps in parens or something,
> should be fine. For the others, it takes more space, but if they can fit it
> would be nice.
For cases where there is a list of choices, I put the default first. For
others, I listed it in parens at the end. I'm not too worried about it, since
you can always do mlton -v and see all the defaults.
> The only serious disadvantage with not being able to restart a
> mlton -stop g ...
> is if some one is actually modifying the assembler code generated (for
> instance by adding/changing some primitive or something). It is a bit of a
> shame to not do it, but I don't see it as a major problem.
I went ahead and added the ability to restart from a stop -g or a stop -o.
Following is a transcript of the output for the following sequence of calls to
mlton. Let me know if you see any other problems.
mlton
mlton -v
mlton -vv
mlton /tmp/z.sml
mlton -v /tmp/z.sml
mlton -vv /tmp/z.sml
mlton -v -stop g /tmp/z.sml
mlton -v -stop o /tmp/z.c /tmp/z.0.S
mlton -v /tmp/z.o /tmp/z.1.o
--------------------------------------------------------------------------------
+ mlton
must supply a file
usage: mlton [option ...] file.{cm|sml|c|o} [file.{S|o} ...] [library ...]
-contify {both|call|cont|none} ?specify contify strategy
-detect-overflow {true|false} overflow checking on Int.{+,*,-}
-Ddefine define symbolic constant
-g produce executable with debug info
-h heapSize[{k|m}] specify fixed heap size used by executable
-iinclude include a .h file in the C code
-indentation n specify indentation level in ILs (3)
-inline n specify inlining threshold (320)
-Idir specify a dir to search for include files
-keep {cps|g|il|o|sml} save intermediate files
-llibrary link with a library
-Ldir specify a dir to search for libraries
-native {true|false} use native x86 code generation
-native-commented n ?level of comments (0)
-native-copy-prop {true|false} ?enable/disable copy propagation
-native-ieee-fp {false|true} ?enable/disable strict IEEE floating-point
-native-move-hoist {true|false} ?enable/disable move hoisting
-native-optimize n ?level of optimizations (1)
-native-split n ?split assembly files at ~n lines (100000)
-no-polyvariance don't use polyvariance
-o file specify name of output file
-p produce executable with profiling info
-safe {true|false} bounds checking on arrays and other checks
-show-types {false|true} print types in ILs
-static produce a statically linked executable
-stop {f|g|o|sml} specify where to stop
-use-basis-library {true|false} prefix the basis library onto the program
-v be verbose about compiler passes
-vv be very verbose about compiler passes
mlton: failure
+ mlton -v
MLton internal (built Thu Jan 4 11:30:25 2001 on eponym.epr.com)
created this file on Thu Jan 4 11:36:07 2001.
Do not edit this file.
Flag settings:
aux: false
chunk: chunk per function
contify strategy: Both
debug: false
defines: [NODEBUG,MLton_safe=TRUE,MLton_detectOverflow=TRUE]
detect overflow: true
fixed heap: None
indentation: 3
includes: [mlton.h]
inline: NonRecursive {product = 320,small = 60}
input file:
instrument: false
instrument Sxml: false
keep Cps: false
match: left to right
native: true
native commented: 0
native copy prop: true
future: 64
native ieee fp: false
native move hoist: true
native optimize: 1
native split: Some(100000)
polyvariance: Some({rounds = 2,small = 30,product = 300})
print at fun entry: false
profile: false
safe: true
show types: false
static: false
use basis library: true
verbose: true
very verbose: false
+ mlton -vv
MLton internal (built Thu Jan 4 11:30:25 2001 on eponym.epr.com)
created this file on Thu Jan 4 11:36:07 2001.
Do not edit this file.
Flag settings:
aux: false
chunk: chunk per function
contify strategy: Both
debug: false
defines: [NODEBUG,MLton_safe=TRUE,MLton_detectOverflow=TRUE]
detect overflow: true
fixed heap: None
indentation: 3
includes: [mlton.h]
inline: NonRecursive {product = 320,small = 60}
input file:
instrument: false
instrument Sxml: false
keep Cps: false
match: left to right
native: true
native commented: 0
native copy prop: true
future: 64
native ieee fp: false
native move hoist: true
native optimize: 1
native split: Some(100000)
polyvariance: Some({rounds = 2,small = 30,product = 300})
print at fun entry: false
profile: false
safe: true
show types: false
static: false
use basis library: true
verbose: true
very verbose: true
+ mlton /tmp/z.sml
+ mlton -v /tmp/z.sml
Compile starting
gcc -DNODEBUG -DMLton_safe=TRUE -DMLton_detectOverflow=TRUE -I/home/sweeks/mlton/include -O1 -w -fomit-frame-pointer -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -o /tmp/filemcl9co /tmp/fileS9hT7L.c -L/home/sweeks/mlton/lib -lmlton -lm -lgmp
/tmp/filemcl9co /tmp/fileoiFXHl
Compile finished in 2.490
Compile C starting
gcc -S -DNODEBUG -DMLton_safe=TRUE -DMLton_detectOverflow=TRUE -I/home/sweeks/mlton/include -O1 -w -fomit-frame-pointer -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -o /tmp/fileJu2X9R.s /tmp/fileLgBKJo.c
Compile C finished in 0.000
Assemble starting
gcc -c -DNODEBUG -DMLton_safe=TRUE -DMLton_detectOverflow=TRUE -I/home/sweeks/mlton/include -O1 -w -fomit-frame-pointer -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -o /tmp/fileuzThfw.o /tmp/fileJu2X9R.s
gcc -c -DNODEBUG -DMLton_safe=TRUE -DMLton_detectOverflow=TRUE -I/home/sweeks/mlton/include -O1 -w -fomit-frame-pointer -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -o /tmp/file5YNeXc.o /tmp/fileW6LB1s.0.S
Assemble finished in 0.000
Link starting
gcc -DNODEBUG -DMLton_safe=TRUE -DMLton_detectOverflow=TRUE -I/home/sweeks/mlton/include -O1 -w -fomit-frame-pointer -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -o /tmp/z /tmp/fileuzThfw.o /tmp/file5YNeXc.o -L/home/sweeks/mlton/lib -lmlton -lm -lgmp
Link finished in 0.000
+ mlton -vv /tmp/z.sml
MLton internal (built Thu Jan 4 11:30:25 2001 on eponym.epr.com)
created this file on Thu Jan 4 11:36:14 2001.
Do not edit this file.
Flag settings:
aux: false
chunk: chunk per function
contify strategy: Both
debug: false
defines: [NODEBUG,MLton_safe=TRUE,MLton_detectOverflow=TRUE]
detect overflow: true
fixed heap: None
indentation: 3
includes: [mlton.h]
inline: NonRecursive {product = 320,small = 60}
input file: /tmp/z.sml
instrument: false
instrument Sxml: false
keep Cps: false
match: left to right
native: true
native commented: 0
native copy prop: true
future: 64
native ieee fp: false
native move hoist: true
native optimize: 1
native split: Some(100000)
polyvariance: Some({rounds = 2,small = 30,product = 300})
print at fun entry: false
profile: false
safe: true
show types: false
static: false
use basis library: true
verbose: true
very verbose: true
Compile starting
compile starting
parse and elaborate starting
parse and elaborate finished in 0.000
core-ml size is ~1 bytes
numPeeks = 14
average position in property list = 0.000
numPeeks = 36543
average position in bucket = 0.947
lexAndParse totals 0.000
elaborate totals 0.000
dead starting
dead finished in 0.020
basis size is ~1 bytes
numPeeks = 2214
average position in property list = 0.000
numPeeks = 36543
average position in bucket = 0.947
size = 557
gcc -DNODEBUG -DMLton_safe=TRUE -DMLton_detectOverflow=TRUE -I/home/sweeks/mlton/include -O1 -w -fomit-frame-pointer -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -o /tmp/fileMQjDUo /tmp/file15phth.c -L/home/sweeks/mlton/lib -lmlton -lm -lgmp
/tmp/fileMQjDUo /tmp/fileCOiHAI
infer starting
unification starting
unification finished in 0.060
finish infer starting
finish infer finished in 0.070
infer finished in 0.140
xml.unsimplified size is ~1 bytes
numPeeks = 5157
average position in property list = 0.000
numPeeks = 37086
average position in bucket = 0.944
typeCheck starting
typeCheck finished in 0.050
infer simplify starting
infer simplify finished in 0.120
xml size is ~1 bytes
numPeeks = 12518
average position in property list = 0.076
numPeeks = 37612
average position in bucket = 0.944
typeCheck starting
typeCheck finished in 0.040
size = 278
num types in program = 190
num distinct types = 326
hash table size is ~1 bytes
mono starting
mono finished in 0.110
mono.unsimplified size is ~1 bytes
numPeeks = 19165
average position in property list = 0.051
numPeeks = 39138
average position in bucket = 0.949
typeCheck starting
typeCheck finished in 0.030
mono simplify starting
mono simplify finished in 0.080
mono size is ~1 bytes
numPeeks = 24038
average position in property list = 0.070
numPeeks = 39379
average position in bucket = 0.949
typeCheck starting
typeCheck finished in 0.020
size = 239
num types in program = 54
num distinct types = 390
hash table size is ~1 bytes
implement exceptions starting
implement exceptions finished in 0.020
sxml.unsimplified size is ~1 bytes
numPeeks = 25183
average position in property list = 0.067
numPeeks = 39662
average position in bucket = 0.951
typeCheck starting
typeCheck finished in 0.040
implement exceptions simplify starting
implement exceptions simplify finished in 0.090
sxml size is ~1 bytes
numPeeks = 30680
average position in property list = 0.076
numPeeks = 40037
average position in bucket = 0.953
typeCheck starting
typeCheck finished in 0.020
polyvariance starting
size = 289
num types in program = 57
num distinct types = 405
hash table size is ~1 bytes
size = 285
num types in program = 56
num distinct types = 405
hash table size is ~1 bytes
polyvariance finished in 0.180
sxml.poly size is ~1 bytes
numPeeks = 42323
average position in property list = 0.095
numPeeks = 40335
average position in bucket = 0.955
size = 285
num types in program = 56
num distinct types = 405
hash table size is ~1 bytes
closure convert starting
flow analysis starting
flow analysis finished in 0.020
flow size is ~1 bytes
numPeeks = 44139
average position in property list = 0.091
numPeeks = 40356
average position in bucket = 0.955
free variables starting
free variables finished in 0.000
globalize starting
globalize finished in 0.010
convert starting
convert finished in 0.180
closure convert finished in 0.210
cps.unsimplified size is ~1 bytes
numPeeks = 53059
average position in property list = 0.229
numPeeks = 40492
average position in bucket = 0.954
typeCheck starting
checkScopes starting
inferHandlers starting
inferHandlers finished in 0.010
checkScopes finished in 0.030
typeCheck finished in 0.080
closure convert simplify starting
simplify starting
num functions 22
num local functions 176
num primExps 223
removeUnused starting
removeUnused finished in 0.000
num functions 21
num local functions 81
num primExps 171
typeCheck starting
checkScopes starting
inferHandlers starting
inferHandlers finished in 0.010
checkScopes finished in 0.030
typeCheck finished in 0.060
leaf-inline starting
inline starting
inline finished in 0.050
leaf-inline finished in 0.050
num functions 10
num local functions 58
num primExps 169
typeCheck starting
checkScopes starting
inferHandlers starting
inferHandlers finished in 0.000
checkScopes finished in 0.010
typeCheck finished in 0.060
raise-to-jump starting
inferHandlers starting
inferHandlers finished in 0.010
raise-to-jump finished in 0.040
num functions 10
num local functions 58
num primExps 169
typeCheck starting
checkScopes starting
inferHandlers starting
inferHandlers finished in 0.000
checkScopes finished in 0.010
typeCheck finished in 0.040
contify starting
contify finished in 0.030
num functions 3
num local functions 58
num primExps 169
typeCheck starting
checkScopes starting
inferHandlers starting
inferHandlers finished in 0.000
checkScopes finished in 0.000
typeCheck finished in 0.040
constantPropagation starting
inferHandlers starting
inferHandlers finished in 0.010
fixed point starting
fixed point finished in 0.030
constantPropagation finished in 0.070
num functions 3
num local functions 52
num primExps 122
typeCheck starting
checkScopes starting
inferHandlers starting
inferHandlers finished in 0.010
checkScopes finished in 0.010
typeCheck finished in 0.040
useless starting
analyze starting
analyze finished in 0.030
useless finished in 0.060
num functions 3
num local functions 40
num primExps 73
typeCheck starting
checkScopes starting
inferHandlers starting
inferHandlers finished in 0.010
checkScopes finished in 0.010
typeCheck finished in 0.020
removeUnused starting
removeUnused finished in 0.000
num functions 3
num local functions 39
num primExps 68
typeCheck starting
checkScopes starting
inferHandlers starting
inferHandlers finished in 0.020
checkScopes finished in 0.020
typeCheck finished in 0.040
simplifyTypes starting
fixed point starting
fixed point finished in 0.000
simplifyTypes finished in 0.020
num functions 3
num local functions 38
num primExps 68
typeCheck starting
checkScopes starting
inferHandlers starting
inferHandlers finished in 0.000
checkScopes finished in 0.010
typeCheck finished in 0.020
poly-equal starting
poly-equal finished in 0.000
num functions 3
num local functions 38
num primExps 68
typeCheck starting
checkScopes starting
inferHandlers starting
inferHandlers finished in 0.010
checkScopes finished in 0.010
typeCheck finished in 0.020
contify starting
contify finished in 0.010
num functions 2
num local functions 37
num primExps 68
typeCheck starting
checkScopes starting
inferHandlers starting
inferHandlers finished in 0.010
checkScopes finished in 0.010
typeCheck finished in 0.030
inline starting
inline finished in 0.010
num functions 1
num local functions 35
num primExps 69
typeCheck starting
checkScopes starting
inferHandlers starting
inferHandlers finished in 0.000
checkScopes finished in 0.010
typeCheck finished in 0.020
removeUnused starting
removeUnused finished in 0.010
num functions 1
num local functions 35
num primExps 68
typeCheck starting
checkScopes starting
inferHandlers starting
inferHandlers finished in 0.000
checkScopes finished in 0.000
typeCheck finished in 0.010
raise-to-jump starting
inferHandlers starting
inferHandlers finished in 0.000
raise-to-jump finished in 0.020
num functions 1
num local functions 33
num primExps 68
typeCheck starting
checkScopes starting
inferHandlers starting
inferHandlers finished in 0.000
checkScopes finished in 0.010
typeCheck finished in 0.020
contify starting
contify finished in 0.020
num functions 1
num local functions 33
num primExps 68
typeCheck starting
checkScopes starting
inferHandlers starting
inferHandlers finished in 0.000
checkScopes finished in 0.000
typeCheck finished in 0.020
introduce-loops starting
introduce-loops finished in 0.000
num functions 1
num local functions 33
num primExps 68
typeCheck starting
checkScopes starting
inferHandlers starting
inferHandlers finished in 0.000
checkScopes finished in 0.000
typeCheck finished in 0.020
loop-invariant starting
loop-invariant finished in 0.010
num functions 1
num local functions 33
num primExps 63
typeCheck starting
checkScopes starting
inferHandlers starting
inferHandlers finished in 0.000
checkScopes finished in 0.000
typeCheck finished in 0.020
flatten starting
analyze starting
analyze finished in 0.000
flatten finished in 0.020
num functions 1
num local functions 33
num primExps 53
typeCheck starting
checkScopes starting
inferHandlers starting
inferHandlers finished in 0.000
checkScopes finished in 0.000
typeCheck finished in 0.020
redundant starting
redundant finished in 0.000
num functions 1
num local functions 33
num primExps 53
typeCheck starting
checkScopes starting
inferHandlers starting
inferHandlers finished in 0.000
checkScopes finished in 0.000
typeCheck finished in 0.020
removeUnused starting
removeUnused finished in 0.000
num functions 1
num local functions 33
num primExps 50
typeCheck starting
checkScopes starting
inferHandlers starting
inferHandlers finished in 0.000
checkScopes finished in 0.000
typeCheck finished in 0.010
simplify finished in 0.980
closure convert simplify finished in 0.980
cps size is ~1 bytes
numPeeks = 105426
average position in property list = 0.184
numPeeks = 44306
average position in bucket = 0.965
typeCheck starting
checkScopes starting
inferHandlers starting
inferHandlers finished in 0.000
checkScopes finished in 0.010
typeCheck finished in 0.030
backend starting
compute representations starting
compute representations finished in 0.000
inferHandlers starting
inferHandlers finished in 0.000
chunkify starting
chunkify finished in 0.000
allocate registers starting
allocate registers finished in 0.020
backend finished in 0.030
size is ~1 bytes
numPeeks = 108424
average position in property list = 0.196
numPeeks = 44435
average position in bucket = 0.965
x86 code gen starting
outputC starting
outputC finished in 0.000
outputAssembly starting
translateChunk totals 0.010
simplify totals 0.120
verifyLiveInfo totals 0.010
computeJumpInfo totals 0.000
elimGoto totals 0.000
elimIff: 0
elimSwitch: 0
elimSimpleGoto totals 0.000
elimComplexGoto totals 0.000
verifyJumpInfo totals 0.000
peepholeBlock_pre totals 0.000
commuteBinALMD: 0
elimAddSub1: 2
elimMDPow2: 2
toLivenessBlock totals 0.020
moveHoist totals 0.010
peepholeLivenessBlock totals 0.020
elimALCopy: 6
elimFltACopy: 0
elimDeadDsts: 0
elimSelfMove: 0
elimFltSelfMove: 0
commuteBinALMD: 1
commuteFltBinA: 0
conditionalJump: 5
copyPropagate totals 0.000
peepholeLivenessBlock_minor totals 0.000
elimDeadDsts_minor: 0
elimSelfMove_minor: 0
elimFltSelfMove_minor: 0
verifyLivenessBlock totals 0.010
toBlock totals 0.000
peepholeBlock_post totals 0.010
elimBinALMDDouble: 0
elimFltBinADouble: 0
elimCMPTST: 0
generateTransfers totals 0.010
allocateRegisters totals 0.200
toLiveness totals 0.060
toNoLiveness totals 0.000
Assembly.allocateRegisters totals 0.140
Instruction.allocateRegisters totals 0.110
pre totals 0.040
post totals 0.010
allocateOperand totals 0.030
allocateFltOperand totals 0.000
allocateFltStackOperands totals 0.000
Directive.allocateRegisters totals 0.030
validate totals 0.010
outputAssembly finished in 0.350
x86 code gen finished in 0.350
numPeeks = 111691
average position in property list = 0.257
numPeeks = 44454
average position in bucket = 0.965
compile finished in 2.700
Compile finished in 2.700
Compile C starting
gcc -S -DNODEBUG -DMLton_safe=TRUE -DMLton_detectOverflow=TRUE -I/home/sweeks/mlton/include -O1 -w -fomit-frame-pointer -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -o /tmp/fileiWBj7l.s /tmp/fileGqZ48s.c
Compile C finished in 0.000
Assemble starting
gcc -c -DNODEBUG -DMLton_safe=TRUE -DMLton_detectOverflow=TRUE -I/home/sweeks/mlton/include -O1 -w -fomit-frame-pointer -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -o /tmp/fileNKKfAA.o /tmp/fileiWBj7l.s
gcc -c -DNODEBUG -DMLton_safe=TRUE -DMLton_detectOverflow=TRUE -I/home/sweeks/mlton/include -O1 -w -fomit-frame-pointer -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -o /tmp/filecOsrIR.o /tmp/fileqUURkd.0.S
Assemble finished in 0.010
Link starting
gcc -DNODEBUG -DMLton_safe=TRUE -DMLton_detectOverflow=TRUE -I/home/sweeks/mlton/include -O1 -w -fomit-frame-pointer -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -o /tmp/z /tmp/fileNKKfAA.o /tmp/filecOsrIR.o -L/home/sweeks/mlton/lib -lmlton -lm -lgmp
Link finished in 0.000
+ mlton -v -stop g /tmp/z.sml
Compile starting
gcc -DNODEBUG -DMLton_safe=TRUE -DMLton_detectOverflow=TRUE -I/home/sweeks/mlton/include -O1 -w -fomit-frame-pointer -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -o /tmp/filecAENeA /tmp/filebpPCaS.c -L/home/sweeks/mlton/lib -lmlton -lm -lgmp
/tmp/filecAENeA /tmp/fileHQU0JB
Compile finished in 2.500
+ mlton -v -stop o /tmp/z.c /tmp/z.0.S
Compile C starting
gcc -S -DNODEBUG -DMLton_safe=TRUE -DMLton_detectOverflow=TRUE -I/home/sweeks/mlton/include -O1 -w -fomit-frame-pointer -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -o /tmp/filendlOsO.s /tmp/z.c
Compile C finished in 0.000
Assemble starting
gcc -c -DNODEBUG -DMLton_safe=TRUE -DMLton_detectOverflow=TRUE -I/home/sweeks/mlton/include -O1 -w -fomit-frame-pointer -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -o /tmp/z.o /tmp/filendlOsO.s
gcc -c -DNODEBUG -DMLton_safe=TRUE -DMLton_detectOverflow=TRUE -I/home/sweeks/mlton/include -O1 -w -fomit-frame-pointer -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -o /tmp/z.1.o /tmp/z.0.S
Assemble finished in 0.000
+ mlton -v /tmp/z.o /tmp/z.1.o
Link starting
gcc -DNODEBUG -DMLton_safe=TRUE -DMLton_detectOverflow=TRUE -I/home/sweeks/mlton/include -O1 -w -fomit-frame-pointer -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -o /tmp/z /tmp/z.o /tmp/z.1.o -L/home/sweeks/mlton/lib -lmlton -lm -lgmp
Link finished in 0.000
bin%