[LLVMdev] get the "-stats" information from within the application (instead of from command line)

Zhoulai zell08v at gmail.com
Sat May 9 22:12:50 PDT 2015


Hi,

I am using "llvm/ADT/Statistic.h" for recording the iteration number of a
pass. However, instead of printing them with "opt -stat..." command line, I
need these information from within the application. How can I do this?

For example, if I have:
*STATISTIC ( HelloCounter, "Counts number of functions greeted" ) *
in my pass Hello.cpp, how can I retrieve the HelloCouner from other source
files? Thank you.

Zhoulai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150509/ae7be2af/attachment.html>


More information about the llvm-dev mailing list