The goal of this project is to eliminate dead code and optimize the final code.
Caio Vinícius Raposo Ribeiro - 2021679084
Alexander Thomas Mol Holquist - 2018066255
Instructor: Fernando Magno Quintão Pereira
LLVM version 10.0.0
OS: Ubuntu Linux 20.04.2
First, let us define a set of path variables:
There is a shell script file 'run.sh'. Inside it you can set this information:
$> LLVM_INSTALL_DIR=</path/to/llvm/>
$> LLVM_OPT=</path/to/opt>
$> CLANG=</path/to/clang>
For run all fine, It's necessary the use of LLVM build from the git.
To compile and run the program, execute the "run.sh" shell script.
All dot files generated are shown on the "results" file. With the dot before and after executing the pass. The number of instructions and block basic elimination can be viewed on executing the "run.sh" shell script.
We use the name of the function ‘foo’ only to create the dot cfg using the pass of “-dot-cfg” automatically.