deliverable: peephole patterns
The implementation only uses 4 peephole patterns.
There are many more patterns that may be useful for the optimizer.
Think of as many as you can and implement them following the
You should examine
optimize.c to see the various primitives you can use
in your patterns.
In particular, a pattern may only use the given operations on the
goto graph (or clearly documented extensions)
makeCODExxx constructors defined in
You should hand in the following:
A Jar file containing:
- a file called
showing the results of running the
on your classes set of benchmarks.
Your log file must show that all benchmarks compiled correctly, verified
correctly, and ran with the correct output (i.e. no differences between
the expected output and what your optimized benchmark produced).
Making sure the patterns operate correctly on your benchmarks in necessary,
but not sufficient. In addition, we will be checking your patterns are
sound, in general, and any unsound patterns will be removed.
- a file called
size containing the result of running
totalbytes command for the .sj files as produced from
your A- compiler (with your peephole optimizations enabled).
A hard copy of these three files, clearly printed and
labeled with your group number, should
be handed in at the beginning of class.
Please refer to the handout provided about the format in which the
deliverable should be printed, as provided by Chris.
The deadline is MONDAY of the week in which the deliverable is
This deliverable is also the basis for the peephole
contest, where your group may win fabulous T-shirts!