cps & contification

Matthew Fluet Matthew Fluet <fluet@CS.Cornell.EDU>
Fri, 19 Jan 2001 13:46:55 -0500 (EST)


> Finally, with for a self-compile with -contify new, I get:
> 
> functions: 9179  call_cont_new: 3116  call_cont: 254  call_new: 793
> cont_new: 364  call: 1  cont: 0  new: 265
> functions: 3671  call_cont_new: 116  call_cont: 0  call_new: 13  cont_new:
> 7  call: 0  cont: 0  new: 3
> functions: 971  call_cont_new: 1  call_cont: 0  call_new: 1  cont_new: 0
> call: 0  cont: 0  new: 2
> 
> What's strange here is that the call and continuation based analyses found
> 254 functions contifiable that the new analyis missed (?); also, one
> function found by the call based analysis only.  I'm rerunning the
> self-compile with diagnostics to count the number of functions found
> uncalled by the cont and new analyses.  Hopefully, that will make up the
> discrepency.  I noticed that the existing continuation based analysis
> would determine that f has continuation j even if f was only called in a
> nontail call (g, f, j) with g uncalled; examples like that would be
> considered contifiable by call and cont, but would be determined uncalled
> by new.

Here are the revised numbers (rem_* counts the number of functions
removeable by that analysis; i.e., the analysis determined the function
had no return continuation). 

functions: 9180  call_cont_new: 3116  call_cont: 254  call_new: 793
cont_new: 363  call: 1  cont: 0  new: 267  rem_cont_new: 665  rem_cont: 0
rem_new: 303
functions: 3672  call_cont_new: 116  call_cont: 0  call_new: 13  cont_new:
7  call: 0  cont: 0  new: 3  rem_cont_new: 0  rem_cont: 0  rem_new: 0
functions: 972  call_cont_new: 1  call_cont: 0  call_new: 1  cont_new: 0
call: 0  cont: 0  new: 2  rem_cont_new: 0  rem_cont: 0  rem_new: 0

I was also able to verify that all functions determined call_cont
contifiable were determined uncalled by the new analysis; the one function
determined call contifiable was determined uncalled by both the cont & new
analyses.