- Department of Theoretical Computer Science
Students will become acquainted with both theoretical and practical aspects of back-end of an optimizing programming language compiler.
Principles of parsing and translation, graph algorithms.
- Syllabus of lectures:
1. Overview of constructs of programming languages.
2. Basic notions: types, variables, type compatibility and dynamic data structures.
3. Basic notions: activation record, calling conventions.
4. Internal forms.
5. Direct code generation, AST $\to$ DAG $\to$ BB.
6. DAG analysis, BB, dependencies and antidependencies.
7. Register allocation, memory allocation (static, on the stack).
8. Intermediate code optimization.
9. Code generator, instruction selection.
10. Translation of a stack-based language into the native HW, HW dependent optimizations.
11. Modules and separate compilation.
12. Support for debugging.
13. Code generators for object-oriented programming languages.
- Syllabus of tutorials:
1. Revision - basic data types.
2. Revision - intermediate code and translation of basic program structures I.
3. Revision - intermediate code and translation of basic program structures II.
4. Assignment of semestral works.
5. AST -> DAG -> BB.
6. Intermediate code optimization.
7. Register allocation.
8. Instruction selection I.
9. Instruction selection II.
10. Further optimizations.
11. Consultations on semestral works.
12. Instruction scheduling and pipeling.
13. Checking semestral works.
- Study Objective:
The aim of the module is to complete the education in the field of compiling and compilers. Basic principles of compiler back-end construction, optimization and generation of code are explained.
- Study materials:
1. Wirth, N. ''Compiler Construction''. Addison-Wesley, 1996. ISBN 0201403536.
2. Aho, A. V., Lam, M. S., Sethi, R., Ullman, J. D. ''Compilers: Principles, Techniques, and Tools (2nd Edition)''. Addison Wesley, 2006. ISBN 0321486811.
- Further information:
- No time-table has been prepared for this course
- The course is a part of the following study plans: