|
|
|
dOvs |
The goal of this assignment is to write a collection of peephole
patterns to optimize the bytecode output of the code generation
phase. It does not include any compiler phases as part of the
assignment itself. The peephole optimization is performed by the
You must hand in a file You enable peephole optimization in the Joos compiler by running it with the option -O peepholes.peep (where peepholes.peep is the pattern collection you want to use).
Another option you may find useful is the -noverify option
which tells the
You can check your peephole patterns for static correctness by running the command java dovs.peephole.Loader peepholes.peep (with the Joos classes in your classpath).
As in the code generation phase, you are allowed to add more
instruction classes to the existing collection if you find them useful
in your peephole patterns. These should be uploaded under
optimization along with your peephole patterns. Any
instructions added must implement all methods declared in the
The peephole contestApart from being part of the project, your peephole collection will also enter into the dOvs 2010 Peephole Contest. The goal of the contest is to write the collection of peephole patterns that reduces the sizes of the benchmark programs as much as possible. We will compile all of the Joos 1 benchmark programs that were handed in, using joos2c -joos1 with your peephole collection. We then measure the size of the output by running this script on the outputjasmin files. The winner of the competition
is the group whose peephole pattern collection obtains the smallest
total size of all benchmark programs.To qualify for the competition, your pattern collection must be sound. At the very least, it must not cause any failures when used in the online test with -joos1 and only the optimization phase enabled for testing. We will also briefly inspect your pattern collection and disqualify patterns with any obvious soundness violations. The results of the contest will be announced at an event after the multiple choice test, and the winners will receive fabulous prizes!
Note that the contest has no relationship with the project or the exam.
|