Gratian Lup
2011-Mar-23 15:35 UTC
[LLVMdev] GSOC Project Proposal: Profile-guided optimizations
Hi! My name is Gratian and I would like to participate to GSOC 2011. I'm interested in profile-guided optimizations, and I want to implement two optimizations that can bring tangible benefits for most applications: profile-guided function inlining and basic block positioning. Inlining can be greatly improved if we take into consideration how many times the function we want to inline was actually called. Functions that are not called at all, or are called infrequently should not be inlined, while the ones that are frequently called should have a higher chance of being inlined. The algorithm I want to use is based on a benefit/cost ratio, so it can take advantage of the existing InlineCost analysis. The algorithm is a variation of the one found in JikesRVM, of course adapted and tuned for LLVM. According to the paper, the performance of the application can be up to 57% better than with inlining done without any profile info. The second optimization is intended to replace the current BasicBlockPlacement pass, which uses a naive algorithm, with an algorithm that performs better in practice. It will be based on Algo2 from Pettis&Hansen, while the current one is Algo1. I think this is more useful than forming superblocks, because they may actually degrade the performance if new optimization opportunities are not discovered (the size of the code increases). If you think that superblocks are more useful, I could change the proposal (I read two papers about superblock formation and optimization, so I'm a bit familiar). The only problem would be that this, together with inlining, may be too much for the scope of GSOC. Any suggestions are welcome. Gratian -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110323/89b127ad/attachment.html>