[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
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!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev