<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Dear Najem,<br>
<br>
You might want to read the llvm-prof documentation if you haven't
already: <a class="moz-txt-link-freetext" href="http://llvm.org/cmds/llvm-prof.html">http://llvm.org/cmds/llvm-prof.html</a>. The documentation
mentions a script in the utils directory that automates some of the
profiling tasks for you.<br>
<br>
I suspect the way that llvm-prof works is to compile your whole
program to a single LLVM bitcode file, run a transform on it, and
then generate native code, link in the LLVM profiling run-time
library, and then run the program. You then use llvm-prof to
analyze the original bitcode file and the output from running the
program to get the report. That's just a guess, though; I've never
used llvm-prof myself.<br>
<br>
I bet looking at the script in the utils directory will shed light
on how to use llvm-prof.<br>
<br>
-- John T.<br>
<br>
<br>
On 3/21/11 4:46 PM, Andrew Trick wrote:
<blockquote
cite="mid:F37B2A84-4837-4F15-9C94-833C6440C9DC@apple.com"
type="cite"><base href="x-msg://4688/">
<div>
<div>Hi Najem,</div>
<div><br>
</div>
<div>On Mar 21, 2011, at 9:47 AM, NaJeM ErMeLeH wrote:</div>
<blockquote type="cite"><span class="Apple-style-span"
style="border-collapse: separate; font-family: Helvetica;
font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px;
font-size: medium;">
<div class="hmmessage" style="font-size: 10pt; font-family:
Tahoma;">I'm assisting my doctor who is doing a research
and he wants to use the llvm compiler, my job is to
profile build the benchmarks using llvm-prof.<br>
<br>
What i want to know is the following<br>
<br>
1- does llvm support profile feedback optimizations!?<br>
</div>
</span></blockquote>
<div><br>
</div>
<div>Not yet. Please see Bob's proposal:</div>
<a moz-do-not-send="true"
href="http://article.gmane.org/gmane.comp.compilers.llvm.devel/37107/match=profile">http://article.gmane.org/gmane.comp.compilers.llvm.devel/37107/match=profile</a></div>
<div><br>
<blockquote type="cite">
<div class="hmmessage" style="font-size: 10pt; font-family:
Tahoma;">2- when i've used the llvm-prof it's input is an
object file (not binary as other compilers) my question is
how could I profile a whole benchmark program using the
llvm-prof ?<span class="Apple-converted-space"> </span><font
class="Apple-style-span" color="#000000" face="Helvetica"><span
class="Apple-style-span" style="font-size: medium;"><font
class="Apple-style-span" color="#144fae" face="Tahoma"
size="3"><span class="Apple-style-span"
style="font-size: 13px;"><br>
</span></font></span></font></div>
</blockquote>
<div><br>
</div>
<div>I haven't done it, but I think the correct answer is to use
llvm-ld to generate a single bitcode file, then run llvm-prof.</div>
<br>
<blockquote type="cite">
<div class="hmmessage" style="font-size: 10pt; font-family:
Tahoma;">3- is there a way to print the spill code
information (e.g. spill code count in a single function or
basic block) ?<br>
</div>
</blockquote>
<div><br>
</div>
<div>-stats give you aggregate counts. Unfortunately, I don't
know a way to do per-function reporting without using
llvm-extract.</div>
<div><br>
</div>
<div>You might be able to scrape -debug-only=spiller output for
block info.</div>
<div><br>
</div>
<div>-Andy</div>
<br>
<blockquote type="cite">
<div class="hmmessage" style="font-size: 10pt; font-family:
Tahoma;">your help is appreciated.<br>
<br>
regards,<br>
~Najem<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a moz-do-not-send="true" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a><span
class="Apple-converted-space"> </span> <a
moz-do-not-send="true" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><br>
<a moz-do-not-send="true"
href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</div>
</blockquote>
</div>
<br>
</blockquote>
<br>
</body>
</html>