Simple passes for CFG and DFG analysis
We have already bulid the file, so you can use it directly as long as the following requirements are satisified:
- you pc has already installed llvm & clang
- graphviz installed on your pc (use sudo apt-get install graphviz graphviz-doc if you do not possess one)
cd CFGPass/build
cmake ..
make
cd DFGPass/build
cmake ..
make
use the bash command to test our passes
sh testDFGPass.sh
sh testCFGPass.sh
the result is based on the c code: test.c
fig1: CFG for test.c
fig1: DFG for test.c
Note: each argument has been marked with different kinds of color. So the life span of each argument can be visible in this graph.