CS912
Advanced Compiler Design
Fall 2000
Mon 6-9pm, King 319
Instructor: P. Hatcher
Office: Kingsbury M202
Phone: 862-2678
E-mail: pjh@cs.unh.edu
Office Hours: MWF 9:30-10am, MWF 11:10am-12noon, M 5:00-6:00pm,
or by appointment.
This course will study compiler back-ends.
We will begin with an intermediate representation of a program and
examine how to translate that intermediate form to efficient assembly language
for a given target machine.
As well as features (expressions, control flow, etc.) found in all languages,
we will also examine the implementation of advanced facilities
such as garbage collection, exceptions and parallel execution.
The following is an outline of the material that will be covered:
- Compiler intermediate forms
- abstract syntax trees
- three-address code
- basic blocks
- Code generation
- instruction selection
- register allocation
- instruction scheduling
- Analysis and optimization
- peephole optimization
- loop detection
- dataflow analysis
- common dataflow-driven optimizations
- Implementing garbage collection
- mark-and-sweep collectors
- stop-and-copy collectors
- conservative collectors
- incremental collectors
- Implementing object-oriented languages
- exceptions
- inheritance
- overloading
- Implementing parallel languages
- case study: Java threads on a cluster of machines
The prerequisites for this course are
CS611 and
CS671,
or the equivalent.
You do not need
CS712/CS812
to take this course.
The course has been re-organized to remove this prerequisite.
We will begin the course with a discussion of compiler intermediate forms.
(You may want to later take CS712/CS812 to learn about compiler front-ends:
how to translate programs in text form to an intermediate form.)
Undergraduates who are seniors and
who have a strong record (GPA at least 3.2) are encouraged to petition
to take this course.
The course will count as a Computer Science elective.
Please contact Prof. Hatcher
for more information.
Grading
There are three course requirements:
- Build a code selector for the Hyperion intermediate code. The
Hyperion intermediate code is used to compile Java programs.
Your code selector should target the Alpha architecture.
(No knowledge of Java or Alpha assembler is assumed coming into the
course.)
More details on this assignment are available
here.
- Complete a semester-long project. Project suggestions and
requirements are given
here.
- The final course requirement is that students keep up with the
assigned reading and participate in class discussion.
This is not a formal requirement and I do not plan to issue a
"participation" grade.
However, if the class does not seem to be taking the reading assignments
seriously, I reserve the right to schedule a final exam for finals week.
If no final exam is given, then the project will be worth 75% and the
code selection assignment will be worth 25%.
If a final exam is given, then the project will be worth 60%,
the code selection assignment will be worth 20%, and the exam 20%.
Warning: All students are expected to do their own work
on all assignments, unless otherwise explicitly approved by me.
Textbooks
There is no required textbook for this course.
On reserve in the Kingsbury library:
The last three books in the list will also be on reserve for CS611
students.
When asking for those books, you may need to look on the CS611 reserve
list.
Note that two of the books are available on-line.
You can also download PDF for the Tru64 Unix Assembly Language
Programmer's Guide here.
I do not think you need to purchase any of the above books.
Access to the copies on reserve in the library should be sufficient.
However, if you want to order your own copies of any of the books on reserve,
I suggest Quantum Books
or Amazon.com Books.
Other Reading
Articles from the current research literature will be
assigned periodically throughout the semester.
Computer Accounts
The UNH CIS Alpha servers (alberti.unh.edu, hypatia.unh.edu and hopper.unh.edu)
are the primary computing resource for this course.
You should automatically be given accounts on these machines.
During the semester you may use any other machines that you have access to,
but for grading purposes your programs must execute on the Alphas.
Last modified on August 7, 2000.
Comments and questions should be directed to
pjh@cs.unh.edu