how to use LoopInfo outside of LLVM

Hi,

My project is outside of LLVM. Now I need get LoopInfo for a function. I know that if my project were a pass inside LLVM. I can get LoopInfo by “AU.addRequired()” and “getAnalysis()”. Also I know I can get a function pass by “llvm::FunctionPass* dce = llvm::createDeadCodeEliminationPass(); dce->runOnFunction(*func)” outside of LLVM. But I can’t figure out a way to get LoopInfo outside of LLVM. Is there any possible way to do it?

Thanks,
-Junjuan