<div dir="ltr">It is currently done in Clang FE: tools/clang/lib/CodeGen/CodeGenPGO.cpp -- CodeGenPGO::assignRegionCounters(..)<div><br></div><div>David</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 26, 2015 at 7:34 AM, John Criswell <span dir="ltr"><<a href="mailto:jtcriswel@gmail.com" target="_blank">jtcriswel@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Naveed,<br>
<br>
Have you verified that edge profiling was integrated into LLVM? This paper applies a patch to an older version of LLVM to add the edge profiling feature, so it looks like edge profiling wasn't integrated into LLVM at that time.  It's not clear to me whether it was added after the paper was published and whether that feature still exists.<br>
<br>
A simple grep on trunk does not show an LLVM pass providing the insert-edge-profiling command line option.  A quick Google search shows something like an edge profiling pass in LLVM 3.3 (<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_svn_llvm-2Dproject_llvm_branches_release-5F33_lib_Transforms_Instrumentation_OptimalEdgeProfiling.cpp&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=ATNQYRF8YdwOZ2wAQAhyoDJ07O46tiMReVbRb8sDDJM&s=KJ_WPtth41mrts1ziJzseFLVP9yFmY07ZIK6V1tIeSA&e=" target="_blank">https://llvm.org/svn/llvm-project/llvm/branches/release_33/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp</a>), but I don't see that code in LLVM trunk now.<br>
<br>
I don't use LLVM's profiling features myself.  Other people that work on the profiling code can better tell you whether edge profiling exists in LLVM now or existed in a previous version.  If you don't hear from anyone within the next few days, please start a new thread on the mailing list with a subject of "Edge Profiling Support" (a more specific thread title can sometimes elicit more responses).<br>
<br>
Regards,<br>
<br>
John Criswell<div class="HOEnZb"><div class="h5"><br>
<br>
On 5/25/15 3:08 PM, Naveed Ul Mustafa wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi guys,<br>
<br>
I am trying to perform edge profiling using on hello.bc file by using<br>
following command<br>
<br>
opt -insert-edge-profiling hello.bc -o hello-edge.bc<br>
<br>
but I get the error that option "-insert-edge-profiling" is unknown. Can<br>
you please help me to solve the issue. Please note that I am following the<br>
paper available at this link<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_pubs_2010-2D12-2DPreuss-2DPathProfiling.pdf&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=ATNQYRF8YdwOZ2wAQAhyoDJ07O46tiMReVbRb8sDDJM&s=nbx4i3Cnpt9oKO_Mz1medQuxT9Ak-rzTucyDsddtwU0&e=" target="_blank">http://llvm.org/pubs/2010-12-Preuss-PathProfiling.pdf</a><br>
<br>
Thanks<br>
<br>
Naveed Ul Mustafa<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote>
<br>
<br></div></div><span class="HOEnZb"><font color="#888888">
-- <br>
John Criswell<br>
Assistant Professor<br>
Department of Computer Science, University of Rochester<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.cs.rochester.edu_u_criswell&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=ATNQYRF8YdwOZ2wAQAhyoDJ07O46tiMReVbRb8sDDJM&s=6YIsS_fjLJ07i65r5P4TvMsXBNDDIwg8ilLgbFl9Nrs&e=" target="_blank">http://www.cs.rochester.edu/u/criswell</a></font></span><div class="HOEnZb"><div class="h5"><br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</div></div></blockquote></div><br></div>