I recently imported the first working version of the Linear Scan Register Allocator for the OCaml Native Code Compiler
ocamlopt into the linear-scan-register-allocator branch of my ocaml-experimental repository. The register allocator was implemented for
ocamlopt by Marcell Fischbach as part of his diploma thesis. It presents a first step towards a (better) native OCaml toplevel
ocamlnat. Use the following command to checkout the source code:
The implementation of the linear scan register allocator can be found in
asmcomp/linscan.mli (integrated into
ocamlopt via asmcomp/asmgen.ml).