<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 2/19/16 7:47 AM, Norilo Vesa-Petri
via llvm-dev wrote:<br>
</div>
<blockquote
cite="mid:HE1PR01MB077770A69862A83782BE3DD6DCA00@HE1PR01MB0777.eurprd01.prod.exchangelabs.com"
type="cite">
<meta http-equiv="Context-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<div class="WordSection1">
<p class="MsoNormal"><span lang="FI">Dear LLVMers,</span></p>
<p class="MsoNormal"><span lang="FI"> </span></p>
<p class="MsoNormal"><span lang="FI">I’m investigating the
response time of my JIT, and according to profiling,
optimization takes 85% of the compile time, while the rest
is being split evenly between the front-end and machine code
generation. Much of the optimizer time is spent in various
alias analysis passes. </span></p>
</div>
</blockquote>
<br>
One thing you might want to do is look at the pass pipeline and see
if the alias analysis passes are being re-run multiple times. If
they are, then maybe the issue is getting alias analysis to run
fewer times instead of trying to get it to run faster.<br>
<br>
There could be two culprits for running analysis passes over and
over again. First, it's possible that an analysis pass (or passes)
are invalidated over and over again by optimizations. Changing the
ordering of the optimizations or having key optimizations update the
analysis information might fix that problem.<br>
<br>
Second, unless it's been changed, using a FunctionPass from within a
ModulePass forces the FunctionPass to be re-run from scratch
whenever the getAnalysisUsage<FunctionPass>() method is
called. A poorly written ModulePass may cause a FunctionPass to be
run over and over again needlessly. I doubt that the in-tree
optimizations make this sort of mistake, but it is conceivably
possible.<br>
<br>
To be clear, I don't know that this is the cause of your overhead,
but if it were me, I'd check this first before trying to make alias
analysis run faster.<br>
<br>
Regards,<br>
<br>
John Criswell<br>
<br>
<blockquote
cite="mid:HE1PR01MB077770A69862A83782BE3DD6DCA00@HE1PR01MB0777.eurprd01.prod.exchangelabs.com"
type="cite">
<div class="WordSection1">
<p class="MsoNormal"><span lang="FI"> </span></p>
<p class="MsoNormal"><span lang="FI">I’m happy with the
generated code quality and wouldn’t like to lower the
optimization level (O2).</span></p>
<p class="MsoNormal"><span lang="FI"> </span></p>
<p class="MsoNormal"><span lang="FI">Would generating alias
metadata from the front-end help and speed up optimization?
</span></p>
<p class="MsoNormal"><span lang="FI"> </span></p>
<p class="MsoNormal"><span lang="FI">If so, what kind of AA
would have the best return on investment in terms of compile
time? TBAA is not applicable to my language, but I could
provide C99 restrict and related semantics fairly easily.</span></p>
<p class="MsoNormal"><span lang="FI"> </span></p>
<p class="MsoNormal"><span lang="FI">Thanks!!</span></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Vesa Norilo<br>
Lecturer<br>
Centre for Music and Technology<br>
University of Arts Helsinki</p>
<p class="MsoNormal"><span> </span></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
John Criswell
Assistant Professor
Department of Computer Science, University of Rochester
<a class="moz-txt-link-freetext" href="http://www.cs.rochester.edu/u/criswell">http://www.cs.rochester.edu/u/criswell</a></pre>
</body>
</html>