profiling basic block frequency in LLVM3.1

Dear All LLVM Users,

I’m new to LLVM environment. I want to perform basic block profiling. I’m using LLVM3.1
I tried it with a simple ‘c’ code to find Max.No, mentioned below.

The problem is solved.

While using llvm-prof, I was using instrumented bitcode. And this was the
actual reason for inconsistency between the actual CFG and instrumneted CFG,
which leads to wrong profiling frequencies.

Rajendra