Machine-specific optimization methods for C/C++ applications that are distributed in the LLVM intermediate representation format
Abstract
Also, the technique for converting dynamically collected profile to LLVM profile format for statically compiled applications is presented. This paper evaluates both existing optimizations modified for using the collected profile and the newly developed ones. Implemented profile based inlining, outlining, speculative devirtualization. Also implemented annotation of control flow graph by profile weights to make profile based optimizations easy for debugging. Proposed the technique which allows using the prefetch instructions to improve the effectiveness of array processing codes. This paper describes the approach for building a specific cloud application storage that allows solving program optimization and protection problems. Finally, we present the approach for reducing compilation and optimization overhead in the cloud infrastructure.
References
1. Chris Lattner. LLVM: An Infrastructure for Multi-Stage Optimization.— Master’s thesis, Computer Science Dept., University of Illinois at Urbana-Champaign, Urbana, IL.
2. Arutyun Avetisyan. Dvukhehtapnaya kompilyatsiya dlya optimizatsii i razvertyvaniya programm na yazykakh obshhego naznacheniya. [Two-stage compilation for optimizing and deploying programs in general purpose languages]. Trudy ISP RАN [The Proceedings of ISP RAS], 2012, vol. 22, pp. 11-18 (in Russian).
3. A.I. Avetisyan, K.U. Dolgorukova; Sh.F. Kurmangaleev. Dinamicheskoe profilirovanie programmy dlya sistemy LLVM [Dynamic profile collection for LLVM]. Trudy ISP RАN [The Proceedings of ISP RAS], 2011, vol. 21, pp. 71-82 (in Russian)
4. OProfile official website. http://oprofile.sourceforge.net.
5. Ian Lance Taylor (2008). "A New ELF Linker". GCC Developers' Summit 2008. pp. 129–136.
6.
7. GNU Binutils, http://www.gnu.org/software/binutils
8. Introduction to the Autotools, http://www.dwheeler.com/autotools/
9. CheckInstall, http://asic-linux.com.mx/~izto/checkinstall/
10. Pratschner, S. An overview of the .net compact framework garbage collector.— 2004. http://blogs.msdn.com/b/stevenpr/archive/2004/07/26/197254.aspx.
11. Soman, S. Efficient and General On-Stack Replacement for Aggressive Program Specialization / Sunil Soman, Chandra Krintz // International Conference on Programming Languages and Compilers. — 2006. — . —http://www.cs.ucsb.edu/~{}ckrintz/papers/osr.pdf.
12. Graphviz Documentation, http://www.graphviz.org/Documentation.php
13. Peng Zhao “Code and Data Outlining”, 2005.
14. Mandel' I. D. Klasternyj analiz [Cluster Analysis]. — M.: Finansy i statistika, 1988. (in Russian)
15. Jun-Pyo Lee, Jae-Jin Kim, Soo-Mook Moon, Suhyun Kim ”Aggressive Function Splitting for Partial Inlining”, Seoul, South Korea, 2011.
16. David F. Bacon and Peter F. Sweeny, Fast Static Analysis of C++ Virtual Functuion Call, 1996
17. Clang: a C language family frontend for LLVM, http://clang.llvm.org/
18. GCC Free software foundation, http://gcc.gnu.org
19. ARM architecture., http://infocenter.arm.com
20. Youfeng Wu, James R. Larus. Static Branch Frequency and Program Profile Analysis. 27th International Symposium on Microarchitecture, 1994
21. Arutyun Avetisyan, Andrey Belevantsev, Alexey Borodin, Vladimir Nesov. Ispol'zovanie staticheskogo analiza dlya poiska uyazvimostej i kriticheskikh oshibok v iskhodnom kode programm [Using static analysis for finding security vulnerabilities and critical errors in source code]. Trudy ISP RАN [The Proceedings of ISP RAS], 2011, vol. 21, pp. 23-38. (in Russian)
22. Kurmangaleev S.F. Korchagin V.P. Matevosyan H.A. Opisanie podkhoda k razrabotke obfustsiruyushhego kompilyatora. [Description of the approach to development of the obfuscating compiler]. Trudy ISP RАN [The Proceedings of ISP RAS], 2012, vol.23, pp. 67-76 (in Russian)
23. Kurmangaleev S.F. Korchagin V.P. Savchenko V.V. Sargsyan S.S. Postroenie obfustsiruyushhego kompilyatora na osnove infrastruktury LLVM. [Building obfuscation compiler based on LLVM infrastructure]. Trudy ISP RАN [The Proceedings of ISP RAS], 2012, vol. 23, pp. 77-92. (in Russian)
24. Roman Zhuykov, Dmitry Plotnikov, Mamikon Vardanyan. Аvtomaticheskaya nastrojka optimizatsionnykh preobrazovanij kompilyatora GCC dlya platformy ARM. [Automatic tuning of GCC optimizations for ARM platform]. Trudy ISP RАN [The Proceedings of ISP RAS], 2012, vol. 22, pp. 49-66, (in Russian)
25. K. Pettis, R. C. Hansen. Profile guided code positioning . SIGPLAN Not. 1990 June.Vol. 25, no. 6, pp. 16-27. http://dx.doi.org/10.1145/93548.93550.
26. P. P. Chang, S. A. Mahlke, W.-m. W. Hwu. Using profile information to assist classic code optimizations. Center for Reliable and High-Performance Computing. Urbana-Champaign: University of Illinois, 1991.
27. Da Silva, A. F. Our Experiences with Optimizations in Sun’s Java Just-In-Time Compilers / Anderson F. Da Silva, Vitor S. Costa // Journal of Universal Computer Science. — 2006. — Vol. 12.
28. M. Arnold, Stephen J. Fink, D. Grove, M. Hind, Peter F. Sweeney. A Survey of Adaptive Optimization in Virtual Machines. IBM T. J. Watson Research Center, Hawthorne, USA, 2004.
29. Stephen Fink, David Grove, Michael Hind. Dynamic Compilation and Adaptive Optimization in Virtual Machines. IBM, June 2004.
30. Holzle, U. Adaptive Optimization for SELF: Reconciling High Performance with Exploratory Programming: Ph. D. thesis / Stanford University. —1994. —http://research.sun.com/self/papers/hoelzle-thesis.ps.gz.
Review
For citations:
Kurmangaleev Sh.F. Machine-specific optimization methods for C/C++ applications that are distributed in the LLVM intermediate representation format. Proceedings of the Institute for System Programming of the RAS (Proceedings of ISP RAS). 2013;24. (In Russ.)