Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Learn LLVM Pass in Action
Rating: 2.7 out of 5(2 ratings)
15 students

Learn LLVM Pass in Action

Write LLVM Pass by Using the New Pass Manager System
Created byJames Jiang
Last updated 11/2024
English

What you'll learn

  • Setup LLVM pass development environment
  • Write LLVM function pass, module pass, loop pass
  • Write LLVM pass to analysis LLVM IR
  • Write LLVM pass to optimize LLVM IR
  • C++ programming skills

Course content

3 sections9 lectures49m total length
  • Tutorial Introduction1:56

    Course repository: https://github.com/xLox-x/llvm-pass-manager-demos

  • LLVM Pass Develop Setup2:16

Requirements

  • C++ programming skills
  • LLVM IR knowledge
  • LLVM Programming skills

Description

This is a practical class about LLVM pass programming. At the begging of the course, we will setup the LLVM pass manager develop environment on Ubuntu operation system. We will install  llvm-14, clang-14, c-make, git. We will use VSCode as our editor. The VSCode is installed on the windows, we use ssl to connect Ubuntu system.

After that, we will write LLVM pass hand by hand. At the early stage we will write a very basic pass that just display the function name in the C source files.  Then we will learn how to write a function pass to analysis function information, such as instruction count, basic block count. We will write a module pass to analysis module information, such as function count.  We will create a loop mass to analysis loop nested level. 

At the end stage we will create some powerful passes. For example, we will create a pass to collection function call count at compile time. We will write a pass to emit some LLVM IR to collection function called count at runtime. We will create a pass to analysis LLVM IR instructions to execute constant folding compile optimization.

This course covers all the aspect of LLVM pass development.

Who this course is for:

  • Beginner LLVM developers
  • Beginner Compiler Developers