contifier bug

Stephen Weeks MLton@sourcelight.com
Fri, 23 Feb 2001 17:23:24 -0800 (PST)


> The transformation code had a small bug in handling uncontifiable sccs;
> it's fixed now.  Here are the results for kit (using G0 mlton, so the
> times are a little high):

That fixed the bug when running with contifyStrategy Dom.  It did not fix the
bug when running with contifyStrategy CallCont.  I turned off the call to the
shrinker in contify.fun and turned on type checking for the following run, which
shows the transformation produces a function out of scope.

benchmarks% $HOME/mlton/bin/mlton -v2 -contify cc kit.sml
MLton internal (built Fri Feb 23 16:59:35 2001 on eponym.epr.com)
  created this file on Fri Feb 23 17:02:47 2001.
Do not edit this file.
Flag settings: 
   aux: false
   chunk: chunk per function
   contify strategy: CallCont
   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: kit.sml
   instrument: false
   instrument Sxml: false
   keep Cps: false
   native: true
   native commented: 0
   native copy prop: true
   future: 64
   native ieee fp: false
   native live transfer: true
   native move hoist: true
   native optimize: 1
   native split: Some (20000)
   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
   verbosity: Pass
Compile SML starting
   pre codegen starting
      parse and elaborate starting
      parse and elaborate finished in 51.50 + 0.00 (0% GC)
      lex and parse totals 26.29 + 0.00 (0% GC)
      elaborate totals 25.21 + 0.00 (0% GC)
      dead starting
      dead finished in 0.49 + 0.00 (0% GC)
      gcc -DNODEBUG -DMLton_safe=TRUE -DMLton_detectOverflow=TRUE \
          -I/home/sweeks/mlton/include -o /tmp/fileyGu41d /tmp/file86PKcc.c \
          -L/home/sweeks/mlton/lib -lmlton -lm -lgmp
      /tmp/fileyGu41d /tmp/filetXNf2U
      infer starting
	 unification starting
	 unification finished in 27.58 + 0.00 (0% GC)
	 finish infer starting
	 finish infer finished in 34.18 + 0.00 (0% GC)
      infer finished in 63.25 + 0.00 (0% GC)
      typeCheck starting
      typeCheck finished in 24.47 + 0.00 (0% GC)
      infer simplify starting
      infer simplify finished in 49.78 + 0.00 (0% GC)
      typeCheck starting
      typeCheck finished in 14.86 + 0.00 (0% GC)
      mono starting
      mono finished in 77.32 + 0.00 (0% GC)
      typeCheck starting
      typeCheck finished in 11.62 + 0.00 (0% GC)
      mono simplify starting
      mono simplify finished in 40.45 + 0.00 (0% GC)
      typeCheck starting
      typeCheck finished in 10.92 + 0.00 (0% GC)
      implement exceptions starting
      implement exceptions finished in 1.64 + 0.00 (0% GC)
      typeCheck starting
      typeCheck finished in 11.94 + 0.00 (0% GC)
      implement exceptions simplify starting
      implement exceptions simplify finished in 34.72 + 0.00 (0% GC)
      typeCheck starting
      typeCheck finished in 11.80 + 0.00 (0% GC)
      polyvariance starting
      polyvariance finished in 109.49 + 0.00 (0% GC)
      closure convert starting
	 flow analysis starting
	 flow analysis finished in 13.84 + 0.00 (0% GC)
	 free variables starting
	 free variables finished in 6.89 + 0.00 (0% GC)
	 globalize starting
	 globalize finished in 2.41 + 0.00 (0% GC)
	 convert starting
	 convert finished in 107.53 + 0.00 (0% GC)
      closure convert finished in 134.91 + 0.00 (0% GC)
      typeCheck starting
	 checkScopes starting
	    inferHandlers starting
	    inferHandlers finished in 7.11 + 0.00 (0% GC)
	 checkScopes finished in 17.10 + 0.00 (0% GC)
      typeCheck finished in 37.95 + 0.00 (0% GC)
      closure convert simplify starting
	 removeUnused starting
	 removeUnused finished in 14.15 + 0.00 (0% GC)
	 checkDominators starting
	 checkDominators finished in 2.09 + 0.00 (0% GC)
	 typeCheck starting
	    checkScopes starting
	       inferHandlers starting
	       inferHandlers finished in 4.68 + 0.00 (0% GC)
	    checkScopes finished in 12.41 + 0.00 (0% GC)
	 typeCheck finished in 29.99 + 0.00 (0% GC)
	 leaf-inline starting
	    inline starting
	    inline finished in 30.50 + 0.00 (0% GC)
	 leaf-inline finished in 30.50 + 0.00 (0% GC)
	 typeCheck starting
	    checkScopes starting
	       inferHandlers starting
	       inferHandlers finished in 3.59 + 0.00 (0% GC)
	    checkScopes finished in 9.97 + 0.00 (0% GC)
	 typeCheck finished in 26.59 + 0.00 (0% GC)
	 raise-to-jump starting
	    inferHandlers starting
	    inferHandlers finished in 3.86 + 0.00 (0% GC)
	 raise-to-jump finished in 28.19 + 0.00 (0% GC)
	 typeCheck starting
	    checkScopes starting
	       inferHandlers starting
	       inferHandlers finished in 3.71 + 0.00 (0% GC)
	    checkScopes finished in 8.59 + 0.00 (0% GC)
	 typeCheck finished in 25.17 + 0.00 (0% GC)
	 contify starting
	    initReachCallerCallees starting
	    initReachCallerCallees finished in 2.20 + 0.00 (0% GC)
	    analyzeCall starting
	    analyzeCall finished in 0.23 + 0.00 (0% GC)
	    analyzeCont starting
	    analyzeCont finished in 0.17 + 0.00 (0% GC)
	    analyzeDom starting
	       buildGraph starting
	       buildGraph finished in 1.25 + 0.00 (0% GC)
	       computeDominators starting
	       computeDominators finished in 2.57 + 0.00 (0% GC)
	       compute ADom starting
	       compute ADom finished in 0.04 + 0.00 (0% GC)
	    analyzeDom finished in 3.94 + 0.00 (0% GC)
	    diagnostics starting
	    diagnostics finished in 0.00 + 0.00 (0% GC)
	    transform starting
	    transform finished in 4.08 + 0.00 (0% GC)
	 contify finished in 10.99 + 0.00 (0% GC)
	 typeCheck starting
	    checkScopes starting
	       inferHandlers starting
	       inferHandlers raised in 3.07 + 0.00 (0% GC)
	    checkScopes raised in 3.07 + 0.00 (0% GC)
	 typeCheck raised in 3.07 + 0.00 (0% GC)
      closure convert simplify raised in 204.13 + 0.00 (0% GC)
   pre codegen raised in 891.77 + 0.00 (0% GC)
Compile SML raised in 891.77 + 0.00 (0% GC)
mlton: action_0 has no handlers property