<br clear="all">When I searched for branch frequency profiling on the internet, I got this link  by a casual chance: <meta http-equiv="content-type" content="text/html; charset=utf-8"><a href="http://homepages.dcc.ufmg.br/~rimsa/tools/stprof-llvm.patch">http://homepages.dcc.ufmg.br/~rimsa/tools/stprof-llvm.patch</a>. <div>
It seems it was written by Andrei Rimsa.</div><div><br></div><div>So I downloaded and integrate these files into the llvm-2.8 building. After the building, I tried "opt -static-profile bitcnt_1.bc", and an segment fault error occured. I debugged it step by step, and found the initial reason was: </div>
<div>in StaticProfilePass.cpp: line 307 (funciton: PropagateCallFrequency), since the root of type CallGraphNode * has no valid function,  the node->getFunction() returned a NULL pointer, thus the F->getName() in line 307 caused a code down. I confirmed that there was a main function in bitcnt_1.c (from MiBench)</div>
<div><br></div><div>I need the help.</div><div>-- <br>Best regards,<div><br></div><div>Li Qingan</div><br>
</div>