Contributions
The optimizations provided by MLRISC are at a similar level to
those performed by the Impact compiler; several target back ends
exist (Dec Alpha, HPPA, x86, and PPC); but more importantly, the
framework has been demonstrated in real use for languages with
radically different execution models. These include:
| Compiler | Association
|
| SML/NJ
| Bell Labs and Princeton
|
| TIL
| CMU
|
| Tiger
| Princeton
|
| C--
| OGI
|
| SML/Regions
| DIKU
|
The strength of MLRISC lies in the ability to easily create high
quality code generator for each of these systems. For example:
- Tiger:
- Has an execution
model very similar to C with stack allocated activation frames,
and also maintains static and dynamic chains to support lexical
scoping.
- TIL:
- Is similar to C in its
use of activation frames, however it uses a typed
intermediate language that supports almost tag-free
garbage collection. This has severe implications on the
interaction of spilling and garbage collection. The set of live
variables and their locations, be it registers or frame slots,
is recorded in a trace table for a specific program point. When
spilling occurs, it is necessary to adjust some of these trace
tables to reflect the new locations of live variables.
- SML/NJ:
- Has no runtime
stack, but stores all execution context in a garbage collected
heap. This arrangement imposes special requirements for spilling
registers. SML/NJ also does dynamic linking --- that is
to say, no use is made of a conventional linker, but machine
code is generated directly and linked into the interactive
environment, dynamically.
It is not uncommon for any of these systems to store special global
values in dedicated registers, and use their own parameter passing
and callee-save conventions. In any language that supports garbage
collection, there is a subtle interaction between global code motion
past garbage collection points that must also be dealt with.
Lal
George Last modified: Tue Mar 31 11:50:34 EST
1998