LLVM Writing a Front End Pass

In this project you will need to write a pass that inserts a function call into the source code.

1. You should start this project off by compiling your source code to bitcode (a .bc file) using clang and the -emit-llvm flag.
2. You should create a new folder in the Transforms directory of the llvm source tree. Name it whatever you like.
3. You should put your pass source code files and a make file into the folder you created. See the hello world pass for more information on this.
3.5. Adjust any other necessary make files in the Transforms directory to make sure your pass builds properly
4. You need to write a pass that creates a function, then creates a new instruction to call that function, and inserts the instruction into the llvm IR.
5. Move to the llvm build tree and rebuild llvm Transforms to see your new pass is now built.
6. Run your new pass on your .bc file using the opt program as explained in the llvm writing a pass document.
7. Test your pass worked by transforming your .bc file and making it into assembly code. Open the assembly code and verify there is a new function call inserted into the source code.