Stack(x)
.
In order for your compiler to produce good code is necessary to put as many variables as possible into registers.
Extend module Tiger-VarEscape.r
in directory tas2ir/
in the TigerTrans package to detect only really escaping variables.
Sketch of the algorithm
x
in its declaration should be transformed into Reg(x)
.
x
in its declaration should be transformed into Stack(x)
.
The analysis can be very nicely expressed in a single traversal over the program tree using dynamic rules.
-- EelcoVisser - 16 Nov 2001