ssa restore

Matthew Fluet fluet@CS.Cornell.EDU
Wed, 5 Dec 2001 17:24:18 -0500 (EST)


I checked in an ssa restoration pass and ported localRef to use it.  See
the comments in the file for more details.  Here's an abbreviated
benchmark suite:

MLton0 -- mlton -drop-pass localRef
MLton1 -- mlton 
compile time
benchmark     MLton0 MLton1
hamlet         52.85  55.68
imp-for         0.61   0.59
lexgen          5.37   5.86
mlyacc         20.93  25.10
psdes-random    0.63   0.63
raytrace        8.93   9.01
vector-concat   0.63   0.63
vector-rev      0.62   0.61
wc-input1       1.59   1.56
wc-scanStream   1.68   1.65
zebra           6.66   6.71
run time
benchmark     MLton0 MLton1
hamlet          8.61   8.38
imp-for        13.43   8.23
lexgen         10.61  10.64
mlyacc          9.42   9.53
psdes-random    3.40   3.36
raytrace        4.79   4.80
vector-concat   5.74   5.69
vector-rev      4.10   4.11
wc-input1       2.02   1.81
wc-scanStream   3.10   3.48
zebra           2.35   2.38
run time ratio
benchmark     MLton1
hamlet          0.97
imp-for         0.61
lexgen          1.00
mlyacc          1.01
psdes-random    0.99
raytrace        1.00
vector-concat   0.99
vector-rev      1.00
wc-input1       0.90
wc-scanStream   1.12
zebra           1.01
size
benchmark        MLton0    MLton1
hamlet        1,496,651 1,502,795
imp-for          22,600    21,296
lexgen          151,048   168,568
mlyacc          546,264   616,984
psdes-random     22,672    22,160
raytrace        205,784   205,256
vector-concat    22,296    22,024
vector-rev       22,120    21,840
wc-input1        46,289    45,289
wc-scanStream    48,921    46,585
zebra           130,545   129,161

imp-for (imperative for loops) is just there to show off.
The huge code-size increases in lexgen and mlyacc are due to the way
wrappers are added along with the fact that the restore pass will rewrite
NonTail calls to push and pop handlers.  I'm thinking about a fix for it.