Skip to content

Files

Latest commit

d2f52e1 · Feb 25, 2023

History

History

Tutorial02-Introduction_to_LLVM_ii

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Feb 20, 2023
Feb 25, 2023
Jan 15, 2023

Tutorial 2 Introduction to LLVM ii

Handout: [Overleaf]

TL'DR

  • User-Use-Value Relationship
  • LLVM Pass Manager: Require & Preserve

Examples

  1. Transform_Pass_Example shows you how to traverse through the users and operands of an instruction, and also how to insert new instructions into the module.
    /Example1-Transform_Pass_Example$ mkdir build && cd build
    /Example1-Transform_Pass_Example/build$ cmake -DCMAKE_BUILD_TYPE=Release ..
    /Example1-Transform_Pass_Example/build$ make
    /Example1-Transform_Pass_Example/build$ ctest -V
  2. Pass_Manager shows you how to require and preserve/abandon other analysis passes.
    /Example2-Pass_Manager$ mkdir build && cd build
    /Example2-Pass_Manager/build$ cmake -DCMAKE_BUILD_TYPE=Release ..
    /Example2-Pass_Manager/build$ make
    /Example2-Pass_Manager/build$ ctest -V