LLVM: An Intro to LLVM: IR, optimizations, backends and more

When:
February 7, 2015 @ 8:30 am – 5:30 pm
2015-02-07T08:30:00-08:00
2015-02-07T17:30:00-08:00
Where:
San Ramon
Contact:
Chandler Carruth (Google) and Tanya Lattner (LLVM Foundation)

Topic Overview

  • High-level overview of LLVM & Clang
    • Will include how to get started coding on LLVM & Clang
    • Overview of core design elements, data structures, APIs, and patterns used in the codebase
    • High-level testing strategy for LLVM & Clang using tools like Clang’s ‘-verify’, opt, llc, FileCheck, and GoogleTest
    • Process of submitting a patch, code review, and community interactions
  • How to add an optimization pass to LLVM
    • Tutorial on the LLVM IR both in the abstract and at the level of internal APIs
    • Basic APIs and data structures needed to implement, test, and wire a new pass into the compiler.
    • Overview of the relationship between transform and analysis passes.
    • Overview of the different kinds of transformation passes, how they interact, and what they can and can’t do
    • Actually add a transformation pass and an analysis pass to the compiler that depend on each other and exercise this machinery.
      • Includes authoring relevant tests for each component
  • High-level overview of the architecture of an LLVM backend, with an emphasis on modifying or enhancing existing backends rather than adding a new one
    • Detailed review of where things are: from SelectionDAG to FastISel to the register allocator
    • Detailed review of exactly how a backend’s tablegen works, and how to make changes there and debug things
  • Add a target-independent SelectionDAG combine to the code generator
    • Include detailed walk through of the relevant DAG combine interfaces.
  • Add a target-specific DAG combine with special consideration of legalization
  • Add support for a new instruction pattern to a backend
  • Every bit of performance matters, and how the LLVM coding standard helps here