Using LoopInfo in a ModulePass

I'm writing a ModulePass that does work on a subset of the functions in a module.

I would like to get the LoopInfo for the functions that it works with. Is there some way to do this? As I understand, only a FunctionPass can register LoopInfo as a required analysis.


LoopInfo is a FunctionPass and a ModulePass can use FunctionPass in
certain cases. So you can do
to get loop info for Fn. Fn must be a function definition.