polvariance or not

Stephen Weeks sweeks@research.nj.nec.com
Wed, 24 Feb 1999 16:17:08 -0500


Here are the dynamic counts of the instrumented Cps code to compare
runs with and without polyvariance.  

The most striking thing is the number of dispatches eliminated (see,
e.g. zern) and the number of calls converted from unknown to known
(see, e.g. nucleic).  Also, in some of the runs without polyvariance,
the number of dispatches far outnumbers the number of calls.

As a reminder, here are the meanings of the various categories.
The closure converter classifies every call it translates into one of
two classes:
  Known    the flow set for the function is a singleton
  Unknown  otherwise

The closure converter also annotates case expressions that are
introduced to implement dispatches and coercions.  These annotations
are preserved by all of the Cps optimization passes.

At the end of Cps optimization, counters are inserted in 4 places
  Call		a call to a top level Cps function
  Loop		at the start of the body of a cps loop
  Dispatch	at a case statement that implements a dispatch
  Coercion	at a case statement that implements a coercion

		no polyv.	polyv.
		-----------	-----------
barnes-hut
Known		259,123,724	408,342,424
Unknown		149,224,394		  2
Call		 56,485,436	 27,830,021
Loop		 21,368,168	 21,368,168
Dispatch	148,956,473		  2
Coerce		          0		  0

count-graphs
Known		773,972,606	770,100,923
Unknown		  4,397,202	          0
Call		 29,542,338	 29,323,457
Loop		 78,381,030	 78,381,030
Dispatch	    928,272	          0
Coerce		          0		  0

fft
Known		1,649,755,563	2,017,680,773
Unknown		  367,886,271	            0
Call		   10,488,296	   10,487,543
Loop		   62,369,546	   62,369,546
Dispatch	  367,886,270	            0
Coerce		            0		    0

knuth-bendix
Known		417,079,465	440,720,558
Unknown		 46,524,903	          2
Call		111,754,352	 91,541,051
Loop		 81,817,003	 84,887,403
Dispatch	 46,524,903	          2
Coerce		          0		  0

lexgen
Known		2,787,590,217	2,732,251,297
Unknown		   44,322,500	           62
Call		  129,284,159	  119,949,597
Loop		  375,716,288	  375,716,288
Dispatch	   44,322,500	           62
Coerce		            0		    0

life
Known		1,561,016,421	1,539,463,015
Unknown		  217,852,341	            0
Call		  130,775,804	   62,545,426
Loop		1,128,251,723	1,199,401,053
Dispatch	  183,708,243	            0
Coerce		            0		    0

logic
Known		574,449,556	526,715,592
Unknown		 34,155,990	 17,824,500
Call		228,306,030	215,958,320
Loop		254,864,161	241,545,921
Dispatch	 34,155,990	 17,824,500
Coerce		          0		  0

mandelbrot
Known		1,471,328,801	2,443,216,793
Unknown		1,182,628,731	            0
Call		            0	            0
Loop		  378,594,831	  378,594,831
Dispatch		    0	            0
Coerce			    0		    0

matrix-multiply
Known		1,448,408,195	1,448,406,182
Unknown		  160,402,000	            0
Call		        2,030	           20
Loop		   81,604,041	   81,604,041
Dispatch	  160,402,000	            0
Coerce		            0		    0

mlyacc
Known		953,299,036	923,197,338
Unknown		 38,569,627	    222,502
Call		 60,568,682	 62,002,667
Loop		166,304,279	166,304,279
Dispatch	 26,432,027	    207,302
Coerce		          0		  0

nucleic
Known		170,700,210	799,573,602
Unknown		687,572,200	    206,600
Call		 31,816,000	 31,866,400
Loop		 38,137,601	 40,002,401
Dispatch	658,963,000	    206,600
Coerce		          0		  0

ratio-regions
Known		2,980,835,912	2,855,415,389
Unknown		   41,615,193	            0
Call		  162,315,172	   37,254,192
Loop		  241,713,699	  241,713,699
Dispatch	   41,615,193		    0
Coerce		            0		    0

simple
Known		621,182,214	669,092,036
Unknown		 92,294,190	  4,832,999
Call		 87,675,496	 84,097,642
Loop		 31,149,484	 31,149,484
Dispatch	 83,017,980	  4,832,999
Coerce		  2,738,000		  0

tsp
Known		430,672,495	961,717,769
Unknown		531,060,643	          2
Call		 87,048,128	 86,065,113
Loop		 72,358,118	 72,358,118
Dispatch	531,060,643	          2
Coerce		          0		  0

vliw
Known		617,743,476	570,969,110
Unknown		 30,452,513	  2,788,427
Call		 57,524,153	 48,614,072
Loop		107,662,894	107,662,894
Dispatch	 29,413,103	  2,788,427
Coerce		    705,000		  0

zern
Known		3,794,643,588	4,515,496,563
Unknown		1,097,728,541	            0
Call		       38,012	       21,006
Loop		  575,428,611	  575,428,611
Dispatch	1,097,728,533		    0
Coerce			    0		    0