Does seem useful in a few limited cases, one comment - you do know about llvm-extract right? I see this being useful when debugging cross module type of optimizations etc, but you can run most of a set of passes on a module with llvm-extract after you take the function out as well. http://reviews.llvm.org/D6326