15-745 Spring '03
Using the SUIF Compiler

For homework assignments and term projects in 15-745, you will use the SUIF research compiler. SUIF stands for Stanford University Intermediate Format. You can look into the background of SUIF on the Stanford SUIF home page. Prof. Michael Smith's research group at Harvard has extended SUIF to support work on machine-specific optimizations. The resulting system, called Machine SUIF (machsuif for short), includes all the capabilities of Stanford SUIF (aka base SUIF), but adds facilities to generate and refine machine code for a number of target architectures.

SUIF Documentation

Base SUIF

Machine SUIF

Adjusting Your Environment for Use of Machine SUIF

The preferred machines to for 745 course work are the ``Bone Alphas''. However, there it is also possible to run the environment undex Linux, version 2.2 or higher. If you use Linux for your development you will have to convert your .c files to suif on an Alpha. To setup your environment to run on these machines you should use the script /afs/cs/academic/class/15745-s03/public/bin/setup-suif-env. You invoke the script as follows:

eval `/afs/cs/academic/class/15745-s03/public/bin/setup-suif-env`
If you like, you can put this command in your shell setup file, e.g., .bashrc. (Note, the script will make its best guess about the shell you are using. You can force it to use the proper type with the optional arguments -sh or -csh.) Finally, on the Alphas the C to suif conversion is performed with c2sby1 and on Linux it uses c2s.

Creating a Local Directory Structure to Write Your Own Machine SUIF Passes

As the Machine SUIF infrastructure is shared you will only have read access to it. On the other hand, to do the assignments and the project you will need a writable directory. The script /afs/cs/academic/class/15745-s03/public/bin/setup-suif-localtree creates the following directories:
${HOME}/localnci
${HOME}/localnci/bin
${HOME}/localnci/solib
${HOME}/localnci/include
Your Machine SUIF passes should be in subdirectories of ${HOME}/localnci (e.g. ${HOME}/localnci/assignment1).
Also, after creating such directories, you should define LOCAL_BASE in your shell initialization file (e.g. .cshrc for csh). Make sure you define it before setup-suif-env is evaluated.

Back to CS745 home page.