In this lab, you will install and use the most popular processor simulator of computer architecture research - SimpleScalar. Please find the introduction of SimpleScalar at http://www.simplescalar.com/.
Please follow the directions on
http://www.cs.ucr.edu/yluo/cs162/lab1.html
to install SimpleScalar.
Next you will compile and run two programs with different compiler optimizations. Make observations on the impact of compiler optimizations on the performance (execution time) of the program.
To compile a program, use ``gcc'' from SimpleScalar package as follows:
/usr/local/pkgs/ss/sslittle-na-sstrix/bin/gcc -O0 example1.c -o example1
To run a program, use ``sim-outorder'' simulator:
/usr/local/pkgs/ss/simplesim-3.0/bin/sim-outorder example1
Use this example program
http://www.cs.ucr.edu/yluo/cs161L/labs/example2.c.
To compile a program, use ``gcc'' from SimpleScalar package as follows:
/usr/local/pkgs/ss/sslittle-na-sstrix/bin/gcc -O3 example2.c -o example2
To run the program:
/usr/local/pkgs/ss/simplesim-3.0/bin/sim-outorder example2
Record the ``sim_cycle'' number in the output of your simulations. Put these numbers into a bar graph in your report. Discuss the results.