I\'ve written a standard Analysis pass in LLVM, by extending the FunctionPass class. Everything seems to make sense.
Now what I\'d like to do is write a couple of in
In LTO all the modules are combined and you can see the whole program IR in one module.
You need to write a module pass like any module pass and add it to the list of LTO passes in populateLTOPassManager function in PassManagerBuilder.cpp. Here is the doc for PassManagerBuilder: http://llvm.org/docs/doxygen/html/classllvm_1_1PassManagerBuilder.html
When you do this, your pass will be executed with other LTO passes.