Ryan Taylor via llvm-dev
2017-Jun-24 19:54 UTC
[llvm-dev] Definitive list of optimisations at each optimisation level
Right but then you'll have to call each opt level. Have u looked in the pass manager? On Jun 24, 2017 3:52 PM, "Sean Silva via llvm-dev" <llvm-dev at lists.llvm.org> wrote:> The most definitive list you can probably hope to get will be obtained by > passing -mllvm -debug-pass=Structure to a clang invocation. > > -- Sean Silva > > On Jun 24, 2017 7:10 AM, "Martin J. O'Riordan via llvm-dev" < > llvm-dev at lists.llvm.org> wrote: > > 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. > > > > 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. > > > > 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. > > > > 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’? > > > > 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. > > > > Thanks, > > > > MartinO > > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170624/3e7fe689/attachment.html>
Sean Silva via llvm-dev
2017-Jun-25 00:44 UTC
[llvm-dev] Definitive list of optimisations at each optimisation level
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. 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. -- Sean Silva On Jun 24, 2017 12:54 PM, "Ryan Taylor" <ryta1203 at gmail.com> wrote: Right but then you'll have to call each opt level. Have u looked in the pass manager? On Jun 24, 2017 3:52 PM, "Sean Silva via llvm-dev" <llvm-dev at lists.llvm.org> wrote:> The most definitive list you can probably hope to get will be obtained by > passing -mllvm -debug-pass=Structure to a clang invocation. > > -- Sean Silva > > On Jun 24, 2017 7:10 AM, "Martin J. O'Riordan via llvm-dev" < > llvm-dev at lists.llvm.org> wrote: > > 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. > > > > 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. > > > > 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. > > > > 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’? > > > > 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. > > > > Thanks, > > > > MartinO > > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170624/fe1f4f70/attachment.html>
Ryan Taylor via llvm-dev
2017-Jun-25 01:59 UTC
[llvm-dev] Definitive list of optimisations at each optimisation level
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". On Jun 24, 2017 8:44 PM, "Sean Silva" <chisophugis at gmail.com> wrote:> 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. > > 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. > > -- Sean Silva > > On Jun 24, 2017 12:54 PM, "Ryan Taylor" <ryta1203 at gmail.com> wrote: > > Right but then you'll have to call each opt level. Have u looked in the > pass manager? > > On Jun 24, 2017 3:52 PM, "Sean Silva via llvm-dev" < > llvm-dev at lists.llvm.org> wrote: > >> The most definitive list you can probably hope to get will be obtained by >> passing -mllvm -debug-pass=Structure to a clang invocation. >> >> -- Sean Silva >> >> On Jun 24, 2017 7:10 AM, "Martin J. O'Riordan via llvm-dev" < >> llvm-dev at lists.llvm.org> wrote: >> >> 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. >> >> >> >> 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. >> >> >> >> 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. >> >> >> >> 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’? >> >> >> >> 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. >> >> >> >> Thanks, >> >> >> >> MartinO >> >> >> >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> >> >> >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> >> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170624/0637da01/attachment.html>
Reasonably Related Threads
- Definitive list of optimisations at each optimisation level
- Definitive list of optimisations at each optimisation level
- Definitive list of optimisations at each optimisation level
- Vectorization with fast-math on irregular ISA sub-sets
- Memory accesses and determining aliasing at the MI level