[LLVMdev] IVUsers (LoopPass) analysis in a ModulePass?
Tim Creech
tcreech at umd.edu
Thu Sep 1 11:46:28 PDT 2011
Hi all,
I have a loadable ModulePass which does transformations, and I would like to
use IVUsers analysis within it. I noticed when I try to do this (via
the usual addRequired<IVUsers>() and getAnalysis<IVUsers>(*F)), opt
fails an assert:
opt: /home/tcreech/build/llvm-2.9/include/llvm/PassAnalysisSupport.h:239: AnalysisType& llvm::Pass::getAnalysisID(const void*, llvm::Function&) [with AnalysisType = llvm::LoopInfo]: Assertion `ResultPass && "Unable to find requested analysis info"' failed.
...where I was using LoopInfo analysis without trouble before trying to
run IVUsers analysis as well. I suspect that I'm somehow doing something
that LLVM just doesn't allow. I know that LLVM allows getting
FunctionPass analysis from a ModulePass, but can I also get LoopPass
analysis from a ModulePass?
Thanks in advance for any help,
Tim Creech
More information about the llvm-dev
mailing list