[llvm-dev] how to get LoopInfo in FunctionPass in LLVM3.7.0
Xiangyang Guo via llvm-dev
llvm-dev at lists.llvm.org
Wed Oct 28 06:29:00 PDT 2015
LoopInfo &LI = getAnalysis<LoopInfoWrapperPass>().getLoopInfo(); works for
me. Hope this helps.
2015-10-28 2:41 GMT-04:00 Marcello Maggioni via llvm-dev <
llvm-dev at lists.llvm.org>:
> You are not giving enough information to understand what your problem is ,
> but chances are that you didn’t add the LoopInfo pass into the required
> passes of your pass
> > On Oct 27, 2015, at 11:16 PM, Q Z via llvm-dev <llvm-dev at lists.llvm.org>
> > I want get some loop information(the methods are included in LoopInfo
> class) ,but when I use "const LoopInfo *LI=&getAnalysis<LoopInfo>()", I got
> a compiler error.
> > the version of LLVM is 3.7.0.
> > can anyone help me?please give me some example.thank you!
> > _______________________________________________
> > LLVM Developers mailing list
> > llvm-dev at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev