latest contify.fun

Stephen Weeks MLton@sourcelight.com
Thu, 22 Feb 2001 10:16:51 -0800 (PST)


> Overall, the dom analysis and the new transformation is a little more
> expensive.  

I'd say a lot more.  I see >10x time increase on the self compile.  Here are the
times for the three passes of the old versus the new contifier running a self
compile.

old	 3.58	 0.89	 2.97
new	40.33	25.33	18.36

> Finally, I'll rerun these numbers again to see which phases of the new
> analysis/transformation is really increasing the time.  There might be
> some finetuning that can be done in the transform routine.  Also, if
> anyone wants to take a quick glance at the new contify pass and point out
> any heinous inefficiencies, I'll try to work on them.

I added some Control.traceCalls to get a breakdown of where time is being spent
in the new contifier.  They show that most of the time (~ 90%) is spent in the
dominator analysis, and most of that (~ 90%) is spent in the Vector.foreach that
builds the graph that is the argument to Graph.dominators.  That seems very
weird to be spending time there.  It should be a simple pass over the program
(i.e. < 1 second).  If we can get rid of all that we should be back down close
to the old time.  I am investigating.

Here are the snippets of the self compile log that show the time breakdown.

	 contify starting
	    call starting
	    call finished in 0.080
	    cont starting
	    cont finished in 0.090
	    dom starting
	       build graph starting
	       build graph finished in 33.860
	       dominators starting
	       dominators finished in 2.370
	       use idom starting
	       use idom finished in 0.030
	    dom finished in 36.300
	    diagnostics starting
functions: 9896
  call_cont_dom: 3330  call_cont: 0
  call_dom: 871  cont_dom: 334
  call: 0  cont: 0  dom: 205
  rem_call_cont_dom: 992  rem_call_cont: 0
  rem_call_dom: 0  rem_cont_dom: 0
  rem_call: 0  rem_cont: 0  rem_dom: 0
	    diagnostics finished in 0.020
	    transform starting
	    transform finished in 3.530
	 contify finished in 40.330


	 contify starting
	    call starting
	    call finished in 0.050
	    cont starting
	    cont finished in 0.060
	    dom starting
	       build graph starting
	       build graph finished in 22.610
	       dominators starting
	       dominators finished in 1.530
	       use idom starting
	       use idom finished in 0.010
	    dom finished in 24.180
	    diagnostics starting
functions: 4153
  call_cont_dom: 423  call_cont: 0
  call_dom: 4  cont_dom: 8
  call: 0  cont: 0  dom: 3
  rem_call_cont_dom: 0  rem_call_cont: 0
  rem_call_dom: 0  rem_cont_dom: 0
  rem_call: 0  rem_cont: 0  rem_dom: 0
	    diagnostics finished in 0.010
	    transform starting
	    transform finished in 0.820
	 contify finished in 25.330

	 contify starting
	    call starting
	    call finished in 0.060
	    cont starting
	    cont finished in 0.070
	    dom starting
	       build graph starting
	       build graph finished in 15.130
	       dominators starting
	       dominators finished in 0.230
	       use idom starting
	       use idom finished in 0.0
functions: 1027
  call_cont_dom: 1  call_cont: 0
  call_dom: 0  cont_dom: 0
  call: 0  cont: 0  dom: 0
  rem_call_cont_dom: 0  rem_call_cont: 0
  rem_call_dom: 0  rem_cont_dom: 0
  rem_call: 0  rem_cont: 0  rem_dom: 0
	    dom finished in 16.840
	    diagnostics starting
	    diagnostics finished in 0.0
	    transform starting
	    transform finished in 1.180
	 contify finished in 18.360