[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


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>


More information about the llvm-dev mailing list