Q Z via llvm-dev
2015-Oct-28 06:16 UTC
[llvm-dev] how to get LoopInfo in FunctionPass in LLVM3.7.0
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! -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151028/f7da5c47/attachment.html>
Marcello Maggioni via llvm-dev
2015-Oct-28 06:41 UTC
[llvm-dev] how to get LoopInfo in FunctionPass in LLVM3.7.0
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 Cheers, Marcello> On Oct 27, 2015, at 11:16 PM, Q Z via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > 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
Xiangyang Guo via llvm-dev
2015-Oct-28 13:29 UTC
[llvm-dev] how to get LoopInfo in FunctionPass in LLVM3.7.0
Hi, LoopInfo &LI = getAnalysis<LoopInfoWrapperPass>().getLoopInfo(); works for me. Hope this helps. Regards, Xiangyang 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 > > Cheers, > Marcello > > On Oct 27, 2015, at 11:16 PM, Q Z via llvm-dev <llvm-dev at lists.llvm.org> > wrote: > > > > 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 > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151028/10353176/attachment.html>