detailed syllabus (tentative)

advertisement
DETAILED SYLLABUS (TENTATIVE)
B.Tech. (COMPUTER ENGINEERING) - VII Semester
SUBJECT: Language Processor II (Compiler Design – Advanced)
1. Introduction to the course, Review of various phases of compiler studied in the previous
semester.
2. Run-Time Environments
 Source language issues, Storage organization, Storage-allocation strategies, Access to
nonlocal names, Parameter passing
 Symbol-Table Structure: Storage Classes, Visibility, and Lifetimes, Symbol Attributes
and Symbol-Table Entries, Local Symbol-Table Management, Global Symbol-Table
Structure, Storage Binding and Symbolic Registers, Approaches to Generating Loads
and Stores, Language facilities for dynamic storage allocation, Dynamic storage
allocation techniques, Storage allocation in C
3. Intermediate Code Generation
 Intermediate languages, Declarations, Assignment statements, Boolean expressions,
Case statements, Backpatching, Procedure calls.
4. Code Generation
 Issues in the design of a code generator, The target machine, Run-time storage
management, Basic blocks and flow graphs, Next-use information, A simple code
generator, Register allocation and assignment, The dag representation of basic blocks,
Peephole optimization, Generating code from dags, Dynamic programming codegeneration algorithm, Code-generator generators
5. Code Optimization
 Global Optimizations, Flow Sensitivity and May vs. Must Information, Importance of
Individual Optimizations, Order and Repetition of Optimizations.
 Early Optimizations: Constant-Expression Evaluation (Constant Folding), Scalar
Replacement of Aggregates, Algebraic Simplifications and Reassociation, Value
numbering, Copy Propagation, Sparse Conditional Constant Propagation.
 Redundancy Elimination: Common-Subexpression Elimination, Loop-Invariant Code
Motion, Partial-Redundancy Elimination, Redundancy Elimination and Reassociation,
Code Hoisting.
 Loop Optimizations: Induction-Variable Optimizations, Unnecessary Bounds –
Checking Elimination.
 Procedure Optimizations: Tail-Call Optimization and Tail-Recursion Elimination,
Procedure Integration, In-Line Expansion, Leaf-Routine Optimization and Shrink
Wrapping.
6. Control-Flow Analysis
 Approaches to Control-Flow Analysis, Depth-First Search, Preorder Traversal,
Postorder Traversal, and Breadth-First Search, Dominators, Loops and Strongly
Connected Components, Reducibility, Interval Analysis and Control Trees, Structural
Analysis
7. Data-Flow Analysis
 An Example: Reaching Definitions, Basic Concepts: Lattices, Flow Functions, and
Fixed Points, Taxonomy of Data-Flow Problems and Solution Methods, Iterative DataFlow Analysis, Lattices of Flow Functions, Control-Tree-Based Data-Flow Analysis,
Structural Analysis, Interval Analysis, Other Approaches, Du-Chains, Ud-Chains, and
Webs, Static Single-Assignment (SSA) Form, Dealing with Arrays, Structures, and
Pointers, Automating Construction of Data-Flow Analyzers, More Ambitious Analyses
8. Dependence Analysis and Dependence Graph
 Dependence Relations, Basic-Block Dependence DAGs, Dependences in Loops,
Dependence Testing, Program-Dependence Graphs, Dependences Between
Dynamically Allocated Objects
9. Optimization of the Memory Hierarchy
 Impact of Data and Instruction Caches, Instruction-Cache Optimization, Scalar
Replacement of Array Elements, Data-Cache Optimization, Scalar vs. MemoryOriented Optimizations.
10. Case Studies of Compilers and Future Trends
o The Sun Compilers for SPARC, The IBM XL Compilers for the POWER and PowerPC
Architectures, Digital Equipment's Compilers for Alpha, The Intel Reference
Compilers for the Intel 386 Architecture, Future Trends in Compiler Design and
Implementation.
Text Books Recommended
1. Aho, A.V., Ravi Sethi and J.D. Ullman, Compilers- Principles, Techniques and Tools,
Pearson education
2. Steven S. Muchnick., Advanced Compiler Design and Implementation, Morgan Kauffman/
Elsevier Science India.
References:



Andrew W. Appel, Maia Ginsburg, Modern Compiler implementation in C, Oxford
university press.
John Levine, Tony Mason, Doug Brown, lex & yacc (A Nutshell Handbook)
Keith Cooper, Linda Torczon, Engineering a Compiler, Morgan Kauffman / Elsevier Science
India.
Download