Week 10
Exercises on optimization
- Consider the following two proposals for new peephole patterns.
Are they sound? How would those that are sound look as C-code?
Would they ever be relevant?
Motivation: get you thinking about the upcoming peephole
contest deliverable.
- Study the contents of the WIG run-time libraries in
wig/lib . How could you adapt
or port them for use by your own generated code?
Motivation: you may well want to implement such a library for
programs compiled by your own WIG compiler.
- Outline a strategy for WIG code generation. What parts are
tricky?
Motivation: codegen is the final phase left for you to
implement in your WIG compiler.
- What kinds of optimizations might be relevant for WIG programs? Why?
Motivation: domain-specific programming languages generally
present novel and interesting optimization opportunities.
- (Optional.) Study the code for optimizing JOOS programs. What
parts are unclear?
Motivation: help prepare you for the upcoming peephole contest deliverable.
|