Getting started

To get to work with RALF, it is a three step process.
  1. Download gcc compiler for the arm target (stargate) and install it. (Say it is installed in LD_HOME)
  2. Download the gcc based framework.
  3. Set the environment to get a new compiler and linker. (A sample compiler and linker.)
    1. Tell the framework that you want to use your own register allocator - Set DO_SARA=2
    2. Give the input file name for your register allocator - Set ILP_IN
    3. Give the output file name in which your register allocator gives the output - Set ILP_OUT
    4. Give the name of the file where statistics will be dumped - Set STATS_OUT
    5. How to invoke your register allocator - Set  ILP_SOLVE. .
    6. Finally set the compiler - Set CC="$RALF_HOME/armtoolchain/armbuild/bin/arm-linux-gcc -I${LD_HOME}/armbe/armv4b-unknown-linux/include/ -B${LD_HOME}/arm-linux/armv4b-unknown-linux/lib/ -B${LD_HOME}/arm-linux/lib/gcc-lib/armv4b-unknown-linux/2.95.2/ -B${RALF_HOME}/armtoolchain/gcc-2.95.2/gcc/ -B${LD_HOME}/armbe/bin/"
    7. The linker is present in $LD_HOME/arm/3.3.2/bin/arm-linux-gcc
    8. 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.
  4. Write a register allocator. For starters, we provide a few register allocators here.
  5. Now to compiler test.c : rcc -c test.c ;  rld test.o -o tes

Download Framework
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.)

Download Linker
One can just install the linker or the complete compiler. The compiler we use can be found here. 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 here. 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.