number of static paths

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.

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:

– John T.