<div dir="auto"><div>The most definitive list you can probably hope to get will be obtained by passing -mllvm -debug-pass=Structure to a clang invocation.</div><div dir="auto"><br></div><div dir="auto">-- Sean Silva<br><div class="gmail_extra" dir="auto"><br><div class="gmail_quote">On Jun 24, 2017 7:10 AM, "Martin J. O'Riordan via llvm-dev" <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-IE" link="#0563C1" vlink="#954F72"><div class="m_1446958755194666459WordSection1"><p class="MsoNormal"><span style="font-size:12.0pt;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.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;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.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;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.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;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’?<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;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.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif">Thanks,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif"> MartinO<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Book Antiqua",serif"><u></u> <u></u></span></p></div></div><br>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div></div></div>