Compiler Construction Tools

ECEN 5523 / CSCI 5525

Course Overview

An in-depth study of optimization compiler design for processors.
The course will center on creating compilers/translators using the LLVM (Low-Level Virtual Machine) system as well as other compiler tools. LLVM includes compilation strategy designed to enable effective program optimization across the entire lifetime of a program. LLVM supports effective optimization at compile time, link-time (particularly interprocedural), run-time and offline (i.e., after software is installed). LLVM includes C and C++ front-ends and can generate code for X86, SparcV9, PowerPC, or it can emit C code. Details of LLVM can be found at: http://llvm.org/
The course involves investigating compiler optimization and transformation techniques for the purpose of improving the run-time behavior of an application. The purpose of the course is to familiarize students with use of compiler technology from source code to run-time execution, enabling the full potential of compilers to extract 2-4X speedup of an application.


Course Topics/Outline

  • I. Analysis
    • Control flow graph
    • Data dependence
    • Def-use chains, dominator, reaching definition, available expression
  • II. Representation
    • Syntax tree
    • SSA (Static Single Assignment)
    • PDG (Program Dependence Graph)
  • III. Traditional optimization
    • Subexpression elimination, dead code
  • IV. Interactions between architecture
    • Register Allocation and Graph Coloring
    • Machine scheduling
  • V. Profiling, instrumentation, and performance analysis
    • Collection of application execution information
    • Performance estimation (cache, branch prediction, code size)
  • VI. Advanced optimization
    • Loop unrolling
    • Profile
    • guided optimization (superblock)
    • Schedliing
  • VII. Advanced optimization II and advanced analysis
    • Function inlining
    • Interprocedural analysis
  • VIII. Run-time Optimization and Virtual Machines
    • Binary instruction and dynamic compilation