Click to expand
Authors:
- Teddy Xinyuan Chen (xchen87, github.com/tddschn) - Part 1 & 3
- Haojie Zhou (hzhou33) - Part 2
- https://github.com/ncsu-csc512-project/part1-dev
- https://github.com/ncsu-csc512-project/part1-submission
- https://github.com/ncsu-csc512-project/part2-dev
- https://github.com/ncsu-csc512-project/part2-submission
- https://github.com/ncsu-csc512-project/part3-dev
- https://github.com/ncsu-csc512-project/part3-submission
We decided that it's best to keep 2 passes separated so that our software is more modular and easier to maintain and develop. So to run part3, you just need to pass both passes to opt
:
Note
Please follow through previous 2 parts to get the .so files for each pass.
Part 1's Makefile also contains convenient commands to install LLVM 17 and setting up the environment (just run make || make
on a clean VCL machine).
# don't just copy and run! replace $VARIABLES with your own values
# use opt-17 & clang-17 if you come from part 1
opt -load-pass-plugin $PATH_TO_PART1_REPO/build/BranchPointerPass/libBranchPointerPass.so $PATH_TO_PART2_REPO/build/libDefUseAnalysisPass.so -passes=branch-pointer-pass,def-use-analysis inputs/input.ll # replace with your own .ll file emitted by clang
They are located in ./tests
directory, all from the TheAlgorithms/C repository, and are real-world programs, each program is around 700 lines.
Please note that they require C standard of at least C99.
tests
├── hash_blake2b.c
├── kohonen_som_topology.c
├── mcnaughton_yamada_thompson.c
└── red_black_tree.c