I intend to use llvm profiling to check my code and I am interested in
counting the calls per function.
I have used
profile.pl -function code.bc
but I get the error:
opt: Unknown command line argument '-insert-function-profiling'. Try: 'opt
Indeed, -insert-function-profiling is not listed as one of the options for
opt, displayed by opt -help. I am using llvm 2.8.
what could be the problem?
If I test with -edge, the tool requires an input code which contains the
main function. Since I test the SPEC CPU 2006 benches, the source code is
split in multiple files. How can I use the llvm profiler to obtain the most
frequently called functions in the whole program.
I mention that I transform each *.c file into a *.bc file to process it and
then link them together.