| CS536 | ADVANCED COMPILER | July 2022 -Nov 2022 | Instructor: Dr. A. Sahu  (email:asahu) |
 TAs: [M Tech II: Abhijeet Padhy, Surbhi Jain, and PhD: K Chitra]
 Course Structure: Focus on Chapters 6, 7, 8, 9, 10 and 11 of Aho-Ulman Book 
-   Introduction to code optimization, efficient code generation and parallelizing compilers. Data-flow analysis : Classical theory, bi-directional flows, unified algorithms etc. Efficient code generation: Algorithms, register allocation heuristics and automated tools.  
-  Parallelism detection : Data dependence, control dependence, various restructuring transformations on loops. Inter-procedural analysis : Constant propagation, data dependence etc. Selected case studies. 
 Lectures  (Thanks to (a) Aho-Ulman, author of OS Book, for providing PPT/PDF Slides) 
-  Introduction to CS536 Advanced Compiler: Book, Grading, Policy  CS536-Lec-01.pdf  
-  Basic Compiler and Why Compilers  CS536-Lec-02.pdf  
-  Prog. Lang. Basic, Memory Layout of a C Program, Compiling Multiple C Files, AST CS536-Lec-03.pdf  
-  AST and SDT  CS536-Lec-04.pdf    
-  SDT  CS536-Lec-05.pdf    
-  SDT and Symbol Table  CS536-Lec-06.pdf    
-  SDT Annotation, Graph, Evaluation  CS536-Lec-07.pdf   
-  ST and IR  CS536-Lec-08.pdf    
-  Assignment I : A1 
-  IR: I Lang, I Code and I Rep CS536-Lec-09.pdf    
-  Type Translation and Flow Control  CS536-Lec-11.pdf    
-  Control Flow  CS536-Lec-12.pdf    
-  Control Flow   CS536-Lec-13.pdf    
-  Flow Graph and Basic Blocks  CS536-Lec-14.pdf    
-  Basic Blocks Optimization and Register Allocation  CS536-Lec-15.pdf    
-  Assignment II : A2 
-   Register Allocation  CS536-Lec-16.pdf    
-   MidSem-Sol.pdf  
-   Register Allocation and Instruction Selections  CS536-Lec-17.pdf    
-  Instruction Selections and Processor Types  CS536-Lec-18.pdf    
-  Machine Independent Optimizations  CS536-Lec-19.pdf  
-  Machine Independent Optimizations   CS536-Lec-20.pdf  
-  Loop Optimizations  CS536-Lec-21.pdf  
-  Loop Optimizations  CS536-Lec-22.pdf  
-  Loop Optimizations  CS536-Lec-23.pdf  
-  Assignment III : A3 
-  LP and Instruction Scheduling  NoSlides-CS536-Lec-24.pdf  
-  Control Flow and Data Flow Analysis  CS536-Lec-25.pdf  
-  Global Data Flow Analysis   CS536-Lec-26.pdf  
-  Control Flow and Data Flow Analysis   CS536-Lec-27.pdf  
-  Optimization for Parallelsim and locality  CS536-Lec-28.pdf  
-  Loop Iteration Space and Locality  CS536-Lec-30.pdf  
-  Loop Iteration Space and Locality   CS536-Lec-31.pdf  
-  Loop Iteration Space and Locality   CS536-Lec-32.pdf   
-  Matrix Modeling of Data Reuse and Dependency CS536-Lec-33.pdf   
-  Matrix Modeling of Data Reuse and Dependency  CS536-Lec-34.pdf   
-  Matrix Modeling of Data Reuse and Dependency  CS536-Lec-35.pdf   
-   EndSem-Sol.pdf   
 Text Book
-  Aho, Alfred Vaino; Lam, Monica Sin-Ling; Sethi, Ravi; Ullman, Jeffrey David (2006). Compilers: Principles, Techniques, and Tools (2 ed.). Boston, Massachusetts, USA: Addison-Wesley.   
Reference Books
-   S. Muchnick, Advanced Compiler Design and Implementation, Morgan Kaufmann, 1997.
-   M. J. Wolfe, High Performance Compilers for Parallel Computing, Addison-Wesley, 1995
-  V. Sarkar, Partitioning and Scheduling Parallel Programs for Multiprocessors, MIT Press, 1989.
-  The LLVM Compiler Infrastructure Project (LLVM Website https://llvm.org/  )  
-  Compilers for Machine Learning (C4ML): (C4ML.org) 
-  Compilers for Machine Learning (C4ML) Courses:  (C4ML @IITH) 
 Help and Support : 
  fft.c lbm.c supportingcode.c 
 LLVM_README_ABS_HOW_TO_INSTALL_Updated.txt 
 dotguide.pdf,  example.dot 
  EBook1.pdf,  EBook2.pdf,  EBook3.pdf 
 Class timing, Venue and Rules
-  Venue and timing : Room 5203 and Monday 4-5PM, Tue:4-5PM, Fri:3-4PM 
-  Rule: 75% attendance is mandatory  
-  Grading: 5% class participation, 35% mid sem, 40% end sem, 20% Coding Assignments in LLVM Framework