Presentation is loading. Please wait.

Presentation is loading. Please wait.

CMPUT Compiler Design and Optimization

Similar presentations


Presentation on theme: "CMPUT Compiler Design and Optimization"— Presentation transcript:

1 CMPUT 680 - Compiler Design and Optimization
CMPUT680 - Winter 2001 Topic0: Introduction José Nelson Amaral CMPUT Compiler Design and Optimization

2 CMPUT 680 - Compiler Design and Optimization
Admin. Information Instructor: Prof. Jose Nelson Amaral Office ATH 351 Phone Office Hours: Anytime (appointment suggested but not required) webpage: CMPUT Compiler Design and Optimization

3 CMPUT 680 - Compiler Design and Optimization
Important Dates January 22 (Tuesday) : project assignment February 05 (Tuesday) : project interview February 14 (Thursday) : project proposal March 12 (Tuesday) : project progress report April 09 (Tuesday) : exam (tentative) April (Tuesday) : project presentations (tentative) April 23 (Tuesday) : final written project reports Course work will carry the following weights towards your final grade: Homework, Lab and Class Presentations: 30% Quiz: 30% Project: 40% CMPUT Compiler Design and Optimization

4 CMPUT 680 - Compiler Design and Optimization
Bibliography 1. A set of papers - to be assigned 2. Books: Randy Allen, Ken Kennedy, Optimizing Compilers for Modern Architectures: A Dependence-based Approach, Morgan Kauffman, 2001. Andrew W. Appel : Modern Compiler Implementation in C A. Aho, R. Sethi and J. Ullman, Compilers: Principles, Techniques and Tools (The Dragon Book), Addison Wesley, 1988 M. Wolfe, High Performance Compilers of Parallel Computing, Addison Wesley, 1995 S. Muchnick, Advanced Compiler Design and Implementation, Morgan Kaufman, 1997 CMPUT Compiler Design and Optimization

5 CMPUT 680 - Compiler Design and Optimization
Bibliography CMPUT Compiler Design and Optimization

6 CMPUT 680 - Compiler Design and Optimization
Bibliography 3. Journals IEEE Computer Transactions on Computers Concurrency Transactions on Parallel and Distributed Systems ACM TOPLAS - Transactions on Programming Languages and Systems Transaction on Computer Systems JPDC Journal of Parallel and Distributed computing JSC Journal of Supercomputing JPP International Journal of Parallel Programming PC Parallel Computing (North-Holland) JPL J. of Programming Languages CMPUT Compiler Design and Optimization

7 CMPUT 680 - Compiler Design and Optimization
Bibliography 4. Conference Proceedings PLDI ACM Symposium on Programming Language Design and Implementation POPL ACM Symposium on Principles of Programming Languages PPOPP ACM Symposium on Principles and Practice of Parallel Programming ICPP International Conference on Parallel Processing ICS International Conference on Supercomputing LCPC Intern. WS. on Languages and Compilers for Parallel Computing PACT Parallel Architectures and Compilation Techniques (since 1994) IPPS International Parallel Processing Symposium EUROPAR European Parallel Processing Conferences MICRO ACM/IEEE Symposium on Microarchitectures ISCA ACM/IEEE International Symposium on Computer Architecture ASPLOS ACM Symposium on Architecture Support for Program Languages and Operating Systems CMPUT Compiler Design and Optimization

8 Structure of an Optimizing Compiler
source code compiler front-end intermediate code loop optimization register allocation code generation code scheduling machine code CMPUT Compiler Design and Optimization

9 Phases of a Compiler Source program Intermediate-code Generator
Lexical Analyzer (Scanner) Non-optimized Intermediate Code Tokens Intermediate-code Optimizer Syntax Analyzer (Parser) Optimized Intermediate Code Parse tree Target-code Generator Semantic Analyzer Abstract Syntax Tree w/ Attributes CMPUT Compiler Design and Optimization Target machine code

10 Two models of compiler structures
Low-level Model Mixed-level Model String of characters String of tokens Parse tree Abstract Syntax tree Medium-level intermediate code Low-level intermediate code Relocatable object module or runnable machine code Lexical analyzer Abstract syntax tree Low-level intermediate code Relocatable object module or runnable machine code String of characters String of tokens Parse tree Lexical analyzer Parser Parser Semantic analyzer Semantic analyzer Intermediate-code generator Translator Optimizer Optimizer Code generator Final assembly Postpass optimizer Two models of compiler structures (Muchnick, pp. 08)

11 Course Teaching Sequence
2. Lexical Analysis 3. Parsing 4. Abstract Syntax 5. Semantic Analysis 6. Activation Records 7. Translation to Intermediate Code 8. Basic Blocks and traces 1. Introduction 9. Instruction Selection 12. Putting it All Together 10. Liveness Analysis 11. Register Allocation 17. Dataflow Analysis 18. Loop Optimizations 19. Static Single- Assignment Form 15. Functional Languages 16. Polymorphic Types 20. Pipelining, Scheduling 13. Garbage Collection 14. Object-Oriented Languages 21. Memory Hierarchies Course Teaching Sequence (Appel, pp. x)

12 Phases of a compiler, and interfaces between them
Environ- ments Tables Parsing Actions Semantic Analysis Canon- icalize Instruction Selection Source Program Lex Token Parse Reductions Abstract Syntax Translate Translate IR Trees IR Trees Assem Frame Frame Layout Control Flow Analysis Data Flow Analysis Relocatable Object Code Assem Flow Graph Interference Graph Register Allocation Register Assignment Code Emission Assembly Language Assembler Machine Language Linker Phases of a compiler, and interfaces between them (Appel, pp. 4)

13 CMPUT 680 - Compiler Design and Optimization
Mailing List Important announcements will be made through the class mailing list (some only in the list). To subscribe send an to with no subject and the following line subscribe cmput680 CMPUT Compiler Design and Optimization


Download ppt "CMPUT Compiler Design and Optimization"

Similar presentations


Ads by Google