[LLVMdev] Problem in accessing Loops in other Functions Problem in accessing Loops in other Functions problem in accessing the Loops in other functions
John Criswell
criswell at illinois.edu
Fri Apr 27 14:35:14 PDT 2012
On 4/27/12 2:05 PM, shanmuk rao wrote:
> Hi,
> I am using Loop pass ( runOnLoop() function )
> In this function I want to access all the Loops in all the functions
> in the current Module
>
> the LoopInfo Pass only gives the Loops in the function where the
> current Loop resides :-(
>
> Is there any other Pass by which I can access the Loops in others
> functions as well ?
I assume you're using a FunctionPass to do your analysis or
optimization. Try writing your pass as a ModulePass instead; a
FunctionPass should only operate on code within the function that it is
analyzing/modifying.
-- John T.
>
>
> ......
> Regards,
> Shanmukha Rao
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120427/26879d96/attachment.html>
More information about the llvm-dev
mailing list