The CGCONTROL signature

There is little point in fiddling with these flags to improve the performance of the optimizer. Each flag either has little effect or is already set to an optimum value.


Synopsis

signature CGCONTROL
structure Control.CG : CGCONTROL

Interface

val tailrecur : bool ref
val recordopt : bool ref
val specialize : bool ref
val tail : bool ref
val allocprof : bool ref
val closureprint : bool ref
val closureStrategy : int ref
val lambdaopt : bool ref
val cpsopt : bool ref
val rounds : int ref
val path : bool ref
val betacontract : bool ref
val eta : bool ref
val selectopt : bool ref
val dropargs : bool ref
val deadvars : bool ref
val flattenargs : bool ref
val extraflatten : bool ref
val switchopt : bool ref
val handlerfold : bool ref
val branchfold : bool ref
val arithopt : bool ref
val betaexpand : bool ref
val unroll : bool ref
val knownfiddle : bool ref
val invariant : bool ref
val targeting : int ref
val lambdaprop : bool ref
val newconreps : bool ref
val boxedconstconreps : bool ref
val sharepath : bool ref
val staticprof : bool ref
val unroll_recur : bool ref
val hoistup : bool ref
val hoistdown : bool ref
val recordcopy : bool ref
val recordpath : bool ref
val debugcps : bool ref
val misc4 : int ref
val argrep : bool ref
val bodysize : int ref
val reducemore : int ref
val alphac : bool ref
val comment : bool ref
val knownGen : int ref
val knownClGen : int ref
val escapeGen : int ref
val calleeGen : int ref
val spillGen : int ref
val foldconst : bool ref
val etasplit : bool ref
val printLambda : bool ref
val printit : bool ref
val printsize : bool ref
val scheduling : bool ref
val cse : bool ref
val optafterclosure : bool ref
val uncurry : bool ref
val ifidiom : bool ref
val comparefold : bool ref
val csehoist : bool ref
val rangeopt : bool ref
val icount : bool ref
val debugRep : bool ref
val sharewrap : bool ref
val checklty1 : bool ref
val checklty2 : bool ref
val checklty3 : bool ref
val checkcps1 : bool ref
val checkcps2 : bool ref
val checkcps3 : bool ref
val checkcps : bool ref
val liftLiterals : bool ref
val flatfblock : bool ref
val deadup : bool ref
val pollChecks : bool ref
val pollRatioAtoI : real ref
datatype mlrisc_phase
  = NO_PHASE
  | AFTER_INSTR_SEL
  | AFTER_RA
  | AFTER_SCHED
  | PHASES of (mlrisc_phase * mlrisc_phase)
val printFlowgraph : mlrisc_phase ref
val printFlowgraphStream : TextIO.outstream ref
val memDisambiguate : bool ref
val mudebugging : bool ref
val eedebugging : bool ref
val insdebugging : bool ref
val smdebugging : bool ref
val emdebugging : bool ref
val esdebugging : bool ref
val etdebugging : bool ref
val ecdebugging : bool ref
val tmdebugging : bool ref

Description

tailrecur
Obsolete.

recordopt
Constant-fold record expressions, if true.

specialize
Perform monomorphic instantiation of polymorphic functions.

tail
Obsolete.

allocprof
Generate allocation-profiling code, if true.

closureprint
Print information about generated closures, if true.

closureStrategy
Choose flat vs. linked closures.

lambdaopt
Perform reduction of lambda-language before CPS-conversion, if true.

cpsopt
Perform optimization of CPS representation, if true.

rounds
How many alternating rounds of expansion/contraction.

path
Obsolete.

betacontract
Perform beta-contraction of functions called only once.

eta
Perform eta-reduction on CPS.

selectopt
Constant-folding of SELECT expressions.

dropargs
Remove unused arguments to known functions.

deadvars
Eliminate dead variables.

flattenargs
Flatten tupled arguments of known functions. Probably obsolete.

extraflatten
Flatten tupled arguments of known functions, even if this requires extra work at some call sites. Probably obsolete.

switchopt
Constant-folding of SWITCH expressions.

handlerfold
Constant-folding of exception handlers.

branchfold
Optimization of conditional branches whose clauses are alpha-equivalent.

arithopt
Constant-folding of arithmetic operators.

betaexpand
Inline-expansion of functions called more than once.

unroll
Loop unrolling.

knownfiddle
Scope localization of free variables.

invariant
Hoist loop-invariant computations.

targeting
Register targeting of results of subexpressions.

lambdaprop
Obsolete.

newconreps
Use efficient data-constructor representations.

boxedconstconreps
Use boxed constant constructor representations.

sharepath


staticprof


unroll_recur
Unrolling of non-tail-recursive functions.

hoistup
Enlarge scope of variables to merge closures. Obsolete.

hoistdown
Contract scope of variables to merge closures. Obsolete.

recordcopy


recordpath
Perform select-path optimization on record components.

debugcps


misc4


argrep
Use trace-based argument register selection.

bodysize
Control the optimism of the inline expander.

reducemore
Control the propensity of the optimizer to give up when few optimizations are found.

alphac
Perform alpha conversion when necessary.

comment
Generate comments in the assembly code. Obsolete.

knownGen
Count of the number of known functions without closures ever generated.

knownClGen
Count of the number of known functions with closures ever generated.

escapeGen
The number of escaping functions ever generated.

calleeGen
The number of callee-save closures ever generated.

spillGen
The number of spills ever generated.

foldconst
Do constant folding

etasplit
Local/global calling sequences for escaping functions.

printLambda
Show the lambda code of each compilation.

printit
Show the CPS code after each phase.

printsize
Show the size of CPS after each phase.

scheduling
Instruction scheduling.

cse
Common subexpression elimination.

optafterclosure
Perform CPS optimization after the closure phase. Obsolete.

uncurry
Do the uncurrying optimization.

ifidiom
Optimize the special SWITCH statements generated by if expressions.

comparefold
Constant-fold integer comparisons.

csehoist
Hoist common subexpressions. Obsolete.

rangeopt
Do range analysis.

icount
Enable instruction counting.

debugRep


sharewrap


checklty1


checklty2


checklty3


checkcps1


checkcps2


checkcps3


checkcps


liftLiterals


flatfblock


deadup


pollChecks


pollRatioAtoI


datatype mlrisc_phase

printFlowgraph


printFlowgraphStream


memDisambiguate


mudebugging


eedebugging


insdebugging


smdebugging


emdebugging


esdebugging


etdebugging


ecdebugging


tmdebugging