This repo has samples with LLVM/Clang.
- git
- build-essential
- llvm-6.0-dev
- clang-6.0
- graphviz
- nano
-
ex1
- Install LLVM/Clang
- Building with Clang
- Using opt
-
ex2
- Using Common Subexpression Elimination (CSE) from opt
-
ex3
- Using llvm tools: llvm-dis; lli; and llc
- pass_ex
- Building llvm pass as shared library
- Running llvm pass with opt
- Pass to count opcodes per functions using runOnFunction(Function &F)
- pass_countblkloop
- Building llvm pass as shared library
- Running llvm pass with opt
- Pass to count the number of Basic Blocks (BBs) inside each loop using getAnalysis().getLoopInfo()
- bin_pass
- Building llvm pass as a binary tool using function main
- Parse the input LLVM IR file into a module
- Create a pass manager and fill it with the passes we want to run
- Other llvm passes not classified