To get to work with RALF, it is a
three step process.
- Download gcc compiler for the arm
target (stargate) and
install it. (Say it is installed in LD_HOME)
- Download the gcc based
- Set the environment to get a new compiler and linker. (A sample compiler and linker.)
- Tell the framework that you want to use your own register
allocator - Set DO_SARA=2
- Give the input
for your register allocator - Set
- Give the output
name in which your register allocator
gives the output - Set ILP_OUT
- Give the name of the file where statistics will be dumped - Set
- How to invoke your register allocator - Set ILP_SOLVE. .
- Finally set the compiler - Set
- The linker is present in
- Steps 1-7 can be put in a file rcc
and step 7 in a file rld. And these two can be used as the compiler and
linker respectively. Here is a sample rcc and rld.
- Write a register allocator. For
starters, we provide a few register allocators here.
- Now to compiler test.c : rcc -c test.c
; rld test.o -o tes
You can download the framework (that includes the sources) here.
Untar the downloaded file in your directory ($RALF_HOME). It has precompiled binaries that can run on
redhat linux on x86 machines.
If you want to rebuild the compiler, then type "make install" in the
$RALF_HOME/armtoolchain/gcc-2.95.2/" directory after setting the STATS_OUT environment variable:
$ export STATS_OUT=/tmp/stats.out # This file would contain some statistics generated by our compiler.
$ make install # Builds the RALF compiler.
(Note: RALF is dealing with
"compiling" only. We use an external linker to link. Also the framework
uses the header files of the linker setup and that's why we use the
path when we set the enviornment variable CC.)
One can just
install the linker or the complete compiler. The compiler we use can be
Unzip it in the root directory to install it (It install the linker in
/usr/local/arm* directories). Call the installation directory LD_HOME.
You can download the latest version from
But to use that compiler you may have to modify the paths in CC string.
If you are facing problems with the framework then please write to the authors. If you are reporting a
bug then please send the pre-processed test case, the framework
generated data file (if applicable), and the register allocator
generated output file (if applicable) as a tar file, with a subject
"Ralf Framework". Before sending your queries please read the FAQ and Known Bugs.
Currently RALF is only supported for ARM target. We have
tried it only on linux platform. If you try it on any other platform
(Windows/Unix*) successfully then please inform the author to place the
compilation instructions and binaries on the webpage.