[llvm-dev] count how many basic block executed
Linhai Song via llvm-dev
llvm-dev at lists.llvm.org
Thu Jan 25 22:04:59 PST 2018
Hello everyone,
I am writing a pass to instrument program and count how many basic block executed. What I have tried is to instrument a local counter inside each function, add 1 to the local counter inside each basic block, and save the counter value to a global counter. The current runtime overhead is around 25%. Is there any way I can try to lower the overhead? Like keeping the local counter inside a register or applying the path profiling algorithm?
Thanks a lot!
Best,
Linhai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180126/60684008/attachment.html>
More information about the llvm-dev
mailing list