Hello.
Is there a possibility to instruct at command line the clang or the opt tools to emit LLVM bitcode file after a certain optimization pass such as LoopVectorize (or all optimization passes)? (This question was asked also at http://stackoverflow.com/questions/17904440/dump-ir-after-each-llvm-optimization-each-pass-both-llvm-ir-passes-and-backen .)
As far as I can see giving:
clang -save-temps ...
generates a .bc file for the compiled module just before passing the module to the optimization passes (opt).
An alternative I have is to programmatically generate the corresponding bitcode file at the right time after finishing the pass in discussion - see, for example, http://stackoverflow.com/questions/13903686/writing-module-to-bc-bitcode-file, methods WriteBitcodeToFile() or WriteModule() .
Thank you,
Alex