Basic Block Frequency counting in LLVM 2.9

Dear All,

I'm using LLVM2.9 for profiling basic block frequency.
I'm using following commands.

rdpatel55@ubuntu:~$ llvm-gcc -emit-llvm -O0 -c -o adpcm.bc adpcm.c
rdpatel55@ubuntu:~$ llvm-gcc -emit-llvm -O0 -c -o rawcaudio.bc rawcaudio.c
rdpatel55@ubuntu:~$ llvm-link -o main.bc rawcaudio.bc adpcm.bc
rdpatel55@ubuntu:~$ opt -q -f -insert-edge-profiling -o main.inst main.bc
rdpatel55@ubuntu:~$ lli -fake-argv0 'main.bc' -load
main.inst < ./small.pcm > op_small.adpcm
rdpatel55@ubuntu:~$ llvm-prof main.inst > profile.txt
rdpatel55@ubuntu:~$ llvm-prof -annotated-llvm main.inst > bb.txt (This gives BB
frequency for all Blocks)

It works fine. But I found that for certain blocks the execution frequency
calculated is wrong.

Is there someone to help me to figure out, where something is wrong?

Thank you,

Rajendra Patel

Both llvm-gcc and llvm 2.9 are ancient and dead. None are terribly
likely to be able to help you with debugging them. Sorry. =/