[LLVMdev] number of static paths

John Criswell criswell at illinois.edu
Thu Jul 28 14:10:16 PDT 2011


On 7/28/11 4:03 PM, gkumar.patel wrote:
>
> Hi, I am a student at IIT Kanpur. I am working on Path Profiling, i 
> just came with a need to know about the number of static paths in a 
> program(actually in a function) before it's actually get run. As i saw 
> in PathProfiling.c file in llvm\runtime\libprofile they are just 
> storing the path information at run time and dynamically adding 
> entries for the new path. But i need to know the number of static 
> paths (total paths in a function ) whether they are executed or not. 
> Please help me know that, can LLVM provide me with number of static 
> paths or not.

I don't think LLVM has an analysis pass to do this.  However, writing a 
new LLVM analysis pass to count the number of paths should be pretty 
straightforward.

If you decide to write such an analysis, I recommending reading the 
relevant portions of:

http://llvm.org/docs/WritingAnLLVMPass.html
http://llvm.org/docs/LangRef.html
http://llvm.org/docs/ProgrammersManual.html

-- John T.
>
> -- 
> Gaurav Kumar
> MTech CSE
> IIT Kanpur
> +918960440344
> http://www.cse.iitk.ac.in/users/gourav/
>
>
>
>
> -- 
> Gaurav Kumar
> MTech CSE
> IIT Kanpur
> +918960440344
> http://www.cse.iitk.ac.in/users/gourav/
>
>
>
> _______________________________________________
> 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/20110728/9346059e/attachment.html>


More information about the llvm-dev mailing list