Docsity

Homework 3 Problems - Compiler Design | CS 6241, Assignments of Computer Science

Toggle sidebar
bg1
CS6241: Homework 3
February 16, 2007
Total Points: 50
Due: Tuesday February 27th, 9:00 am.
Part 1 (20 Points)
The purpose of this lab is to familiarize you with the Trimaran infrastructure. You have
access to a pre-built version of Trimaran and you can find instructions on installing and
using it on the class website. Run the following benchmarks in Trimaran as instructed
below and report the effect in terms of code size and dynamic cycle counts.
1. Run the eight benchmark with basic block formation and hyperblock formation and
report the difference(if any) in terms of the number of instructions and dynamic cycle
count.
2. Run the mm benchmark with and without modulo scheduling and report the differ-
ences as above.
Part 2 (30 Points)
In this part, you will modify Trimaran to obtain some interesting data. After making
your modifications to the Trimaran source code, you have to recompile Trimaran by doing
”./install” in the top level Trimaran directory. For the following parts, you should report
data for the 179.art (link on the website) benchmark. Download the benchmark archive,
copy it into /trimaran/benchmarks/ and uncompress it.
Modify Trimaran to obtain the following data:
1. Average, minimum and maximum number of basic blocks and edges per proce-
dure/function. (HINT: Look at the files in the /trimaran/elcor/src/Graph/ directory
and /trimaran/elcor/src/Control/)
1
pf2

Partial preview of the text

Download Homework 3 Problems - Compiler Design | CS 6241 and more Assignments Computer Science in PDF only on Docsity!

CS6241: Homework 3

February 16, 2007

Total Points: 50

Due: Tuesday February 27th, 9:00 am.

Part 1 (20 Points)

The purpose of this lab is to familiarize you with the Trimaran infrastructure. You have access to a pre-built version of Trimaran and you can find instructions on installing and using it on the class website. Run the following benchmarks in Trimaran as instructed below and report the effect in terms of code size and dynamic cycle counts.

  1. Run the eight benchmark with basic block formation and hyperblock formation and report the difference(if any) in terms of the number of instructions and dynamic cycle count.
  2. Run the mm benchmark with and without modulo scheduling and report the differ- ences as above.

Part 2 (30 Points)

In this part, you will modify Trimaran to obtain some interesting data. After making your modifications to the Trimaran source code, you have to recompile Trimaran by doing ”./install” in the top level Trimaran directory. For the following parts, you should report data for the 179.art (link on the website) benchmark. Download the benchmark archive, copy it into /trimaran/benchmarks/ and uncompress it. Modify Trimaran to obtain the following data:

  1. Average, minimum and maximum number of basic blocks and edges per proce- dure/function. (HINT: Look at the files in the /trimaran/elcor/src/Graph/ directory and /trimaran/elcor/src/Control/)
  1. Average, minimum and maximum ratio of —edges— / —basic blocks— per procedure (CFG sparseness). (HINT: Look at the files in /trimaran/elcor/src/Analysis/ )
  2. Average, minimum, maximum number of nodes a given node dominates per proce- dure. (HINT: Look at /trimaran/elcor/src/Analysis/control analysis solver.cpp)
  3. Average, minimum and maximum Number of natural loops in each procedure. (HINT: Look at /trimaran/elcor/src/Control/el loop.h and el loop tools.cpp)

In addition, generate:

  1. EBB : An extended basic block consists of a structure in which there is a header node which could have multiple predecessors. All other nodes in an extended basic block have only one predecessor.
  2. Count, the minimum, maximum and average number of EBBs in procedures and func- tions. (HINT: Look at the region formation related source files in /trimaran/elcor/src/Control )