This is the assignments of the Code Analysis and Transformation class at Northwestern University (2023 Fall).
Website of the class: https://users.cs.northwestern.edu/~simonec/CAT.html
To build:
- Compile and install your code by invoking
./run_me.sh
. - The script run_me.sh compiles and installs an LLVM-based compiler that includes your CAT in the directory ~/CAT.
To run:
-
Add your compiler cat-c in your PATH (i.e.,
export PATH=~/CAT/bin:$PATH
) -
Invoke your compiler to compile a C/C++ program. For example:
$ cat-c program_to_analyse.c -o mybinary $ cat-c -O3 program_to_analyse.c -o mybinary $ cat-c -O0 program_to_analyse.bc -o mybinary