<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 26, 2017 at 5:04 AM, ORiordan, Martin <span dir="ltr"><<a href="mailto:martin.oriordan@intel.com" target="_blank">martin.oriordan@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-IE" link="blue" vlink="purple">
<div class="m_3271126307116653344WordSection1">
<p class="MsoNormal"><span style="font-family:"Book Antiqua",serif">Thanks Sean and Silva.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Book Antiqua",serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Book Antiqua",serif">I guess what I was seeking was a URL that I could point (non-compiler) people at, but I guess no such reference exists. What I can do if reference bot the source
manager and use ‘-</span>mllvm -debug-pass=Structure’ for each optimisation level, and document that. The downside is that this will continuously go out of data with each release.</p></div></div></blockquote><div><br></div><div><br></div><div>Yeah, the nasty thing is that as each user of LLVM is running potentially different pass pipelines, we don't really have a good way to write a user-facing (or at least non-compiler-dev-facing) page describing the optimizations that they should expect the compiler to do, as the compiler developers using LLVM may have changed it. In theory, we could provide such a page for the open-source clang. Such a page of course couldn't go into massive detail about each pass and as such will likely be mostly describing the basics.</div><div><br></div><div>Most of the information that users would care about is likely to not get out of date very easily (e.g. we might switch GVN implementations, but the way in which they differ isn't going to be relevant to such a document; we might switch EarlyCSE to MemorySSA, but that isn't relevant to such a document).</div><div><br></div><div>-- Sean Silva</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-IE" link="blue" vlink="purple"><div class="m_3271126307116653344WordSection1"><p class="MsoNormal"><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">All the best,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"> MartinO<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">PS: Movidius is now part of Intel, so I will be gradually switching to my Intel email address.<span style="font-family:"Book Antiqua",serif"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Book Antiqua",serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Ryan Taylor [mailto:<a href="mailto:ryta1203@gmail.com" target="_blank">ryta1203@gmail.com</a>]
<br>
<b>Sent:</b> Sunday, June 25, 2017 2:59 AM<br>
<b>To:</b> Sean Silva <<a href="mailto:chisophugis@gmail.com" target="_blank">chisophugis@gmail.com</a>><br>
<b>Cc:</b> Martin J. O'Riordan <<a href="mailto:martin.oriordan@movidius.com" target="_blank">martin.oriordan@movidius.com</a>><wbr>; llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>><br>
<b>Subject:</b> Re: [llvm-dev] Definitive list of optimisations at each optimisation level<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">I agree, it's much clearer, it just takes runs at multiple opt levels and therefore I don't find it to be a "one stop shop". <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Jun 24, 2017 8:44 PM, "Sean Silva" <<a href="mailto:chisophugis@gmail.com" target="_blank">chisophugis@gmail.com</a>> wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal">Looking at PassManagerBuilder can be useful because there are sometimes comments giving some idea of the intent of the particular choice of passes, but it can be difficult to see the big picture of all the passes that are run because it
is very parameterized and split across multiple subroutines.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Running clang at O0 through O3 with -mllvm -debug-pass=Structure is generally more enlightening because then you see everything in one place for each optimization level.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">-- Sean Silva<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Jun 24, 2017 12:54 PM, "Ryan Taylor" <<a href="mailto:ryta1203@gmail.com" target="_blank">ryta1203@gmail.com</a>> wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<p class="MsoNormal">Right but then you'll have to call each opt level. Have u looked in the pass manager? <u></u><u></u></p>
</div>
<div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Jun 24, 2017 3:52 PM, "Sean Silva via llvm-dev" <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal">The most definitive list you can probably hope to get will be obtained by passing -mllvm -debug-pass=Structure to a clang invocation.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">-- Sean Silva<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Jun 24, 2017 7:10 AM, "Martin J. O'Riordan via llvm-dev" <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Book Antiqua",serif">I am often asked what optimisations “our” compiler performs at each level. But “our” compiler is actually CLang/LLVM which we have
retargeted to our proprietary target.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:"Book Antiqua",serif"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:"Book Antiqua",serif">Most of the work we do is in maintaining our target specific backend. Certainly there are optimisations that we do to take best advantage
of our instruction set during lowering and instruction selection, and we have also added a couple of additional passes which manipulate the IR in advance of lowering to better shape it for our target.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:"Book Antiqua",serif"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:"Book Antiqua",serif">But in practice the vast majority of optimisations are contributed by the continuously evolving and excellent LLVM target independent
passes, and have little or nothing to do with the work we do in our backend - though it is obviously directed/tuned by the various target call-backs and the target cost models.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:"Book Antiqua",serif"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:"Book Antiqua",serif">Is there a “one stop shop” list of the optimisation passes that LLVM performs, and identification of which are enabled by default
for each of the 4 standard optimisation levels ‘-O0’ thru ‘-O3’?</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:"Book Antiqua",serif"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:"Book Antiqua",serif">The reason that I ask, is that I really don’t have an honest or informed answer that I can provide to people when they ask, and I
haven’t found a definitive statement of this in the LLVM documentation that I could refer them to.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:"Book Antiqua",serif"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:"Book Antiqua",serif">Thanks,</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:"Book Antiqua",serif"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:"Book Antiqua",serif"> MartinO</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:"Book Antiqua",serif"> </span><u></u><u></u></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><u></u><u></u></p>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><u></u><u></u></p>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div></div></div>
<p>------------------------------<wbr>------------------------------<wbr>--<br>
Intel Research and Development Ireland Limited<br>
Registered in Ireland<br>
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare<br>
Registered Number: 308263</p>
<p>This e-mail and any attachments may contain confidential material for the
sole use of the intended recipient(s). Any review or distribution by others is
strictly prohibited. If you are not the intended recipient, please contact the
sender and delete all copies.</p>
<p></p>
</div>
</blockquote></div><br></div></div>